@stytch/vanilla-js 4.8.0 → 4.9.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.
@@ -500,60 +500,75 @@ function ue(e) {
500
500
  }
501
501
  }
502
502
  function de(e, t) {
503
- return function (e) {
504
- if (Array.isArray(e)) return e;
505
- }(e) || function (e, t) {
506
- var n = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
507
- if (null != n) {
508
- var r,
509
- o,
510
- i,
511
- a,
512
- s = [],
513
- c = !0,
514
- l = !1;
503
+ var _n2 = "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
504
+ if (!_n2) {
505
+ if (Array.isArray(e) || (_n2 = function (e, t) {
506
+ if (!e) return;
507
+ if ("string" == typeof e) return pe(e, t);
508
+ var n = Object.prototype.toString.call(e).slice(8, -1);
509
+ "Object" === n && e.constructor && (n = e.constructor.name);
510
+ if ("Map" === n || "Set" === n) return Array.from(e);
511
+ if ("Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return pe(e, t);
512
+ }(e)) || t && e && "number" == typeof e.length) {
513
+ _n2 && (e = _n2);
514
+ var r = 0,
515
+ o = function o() {};
516
+ return {
517
+ s: o,
518
+ n: function n() {
519
+ return r >= e.length ? {
520
+ done: !0
521
+ } : {
522
+ done: !1,
523
+ value: e[r++]
524
+ };
525
+ },
526
+ e: function e(_e2) {
527
+ throw _e2;
528
+ },
529
+ f: o
530
+ };
531
+ }
532
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
533
+ }
534
+ var i,
535
+ a = !0,
536
+ s = !1;
537
+ return {
538
+ s: function s() {
539
+ _n2 = _n2.call(e);
540
+ },
541
+ n: function n() {
542
+ var e = _n2.next();
543
+ return a = e.done, e;
544
+ },
545
+ e: function e(_e3) {
546
+ s = !0, i = _e3;
547
+ },
548
+ f: function f() {
515
549
  try {
516
- if (i = (n = n.call(e)).next, 0 === t) {
517
- if (Object(n) !== n) return;
518
- c = !1;
519
- } else for (; !(c = (r = i.call(n)).done) && (s.push(r.value), s.length !== t); c = !0);
520
- } catch (e) {
521
- l = !0, o = e;
550
+ a || null == _n2["return"] || _n2["return"]();
522
551
  } finally {
523
- try {
524
- if (!c && null != n["return"] && (a = n["return"](), Object(a) !== a)) return;
525
- } finally {
526
- if (l) throw o;
527
- }
552
+ if (s) throw i;
528
553
  }
529
- return s;
530
554
  }
531
- }(e, t) || pe(e, t) || function () {
532
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
533
- }();
555
+ };
534
556
  }
535
557
  function pe(e, t) {
536
- if (e) {
537
- if ("string" == typeof e) return he(e, t);
538
- var n = Object.prototype.toString.call(e).slice(8, -1);
539
- return "Object" === n && e.constructor && (n = e.constructor.name), "Map" === n || "Set" === n ? Array.from(e) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? he(e, t) : void 0;
540
- }
541
- }
542
- function he(e, t) {
543
558
  (null == t || t > e.length) && (t = e.length);
544
559
  for (var n = 0, r = new Array(t); n < t; n++) r[n] = e[n];
545
560
  return r;
546
561
  }
547
- function me(e) {
548
- return me = "function" == typeof Symbol && "symbol" == _typeof(Symbol.iterator) ? function (e) {
562
+ function he(e) {
563
+ return he = "function" == typeof Symbol && "symbol" == _typeof(Symbol.iterator) ? function (e) {
549
564
  return _typeof(e);
550
565
  } : function (e) {
551
566
  return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof(e);
552
- }, me(e);
567
+ }, he(e);
553
568
  }
554
- function fe() {
569
+ function me() {
555
570
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
556
- fe = function fe() {
571
+ me = function me() {
557
572
  return t;
558
573
  };
559
574
  var e,
@@ -633,7 +648,7 @@ function fe() {
633
648
  if ("throw" !== c.type) {
634
649
  var l = c.arg,
635
650
  u = l.value;
636
- return u && "object" == me(u) && r.call(u, "__await") ? t.resolve(u.__await).then(function (e) {
651
+ return u && "object" == he(u) && r.call(u, "__await") ? t.resolve(u.__await).then(function (e) {
637
652
  n("next", e, a, s);
638
653
  }, function (e) {
639
654
  n("throw", e, a, s);
@@ -732,7 +747,7 @@ function fe() {
732
747
  return i.next = i;
733
748
  }
734
749
  }
735
- throw new TypeError(me(t) + " is not iterable");
750
+ throw new TypeError(he(t) + " is not iterable");
736
751
  }
737
752
  return A.prototype = v, o(k, "constructor", {
738
753
  value: v,
@@ -853,46 +868,46 @@ function fe() {
853
868
  }
854
869
  }, t;
855
870
  }
856
- function ge(e, t) {
871
+ function fe(e, t) {
857
872
  for (var n = 0; n < t.length; n++) {
858
873
  var r = t[n];
859
- r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, Ae(r.key), r);
874
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, _e(r.key), r);
860
875
  }
861
876
  }
862
- function _e(e, t, n) {
863
- return t && ge(e.prototype, t), n && ge(e, n), Object.defineProperty(e, "prototype", {
877
+ function ge(e, t, n) {
878
+ return t && fe(e.prototype, t), n && fe(e, n), Object.defineProperty(e, "prototype", {
864
879
  writable: !1
865
880
  }), e;
866
881
  }
867
- function Ae(e) {
882
+ function _e(e) {
868
883
  var t = function (e, t) {
869
- if ("object" != me(e) || !e) return e;
884
+ if ("object" != he(e) || !e) return e;
870
885
  var n = e[Symbol.toPrimitive];
871
886
  if (void 0 !== n) {
872
887
  var r = n.call(e, t || "default");
873
- if ("object" != me(r)) return r;
888
+ if ("object" != he(r)) return r;
874
889
  throw new TypeError("@@toPrimitive must return a primitive value.");
875
890
  }
876
891
  return ("string" === t ? String : Number)(e);
877
892
  }(e, "string");
878
- return "symbol" == me(t) ? t : String(t);
893
+ return "symbol" == he(t) ? t : String(t);
879
894
  }
880
- function ve(e, t) {
895
+ function Ae(e, t) {
881
896
  if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
882
897
  }
883
- function ye(e, t, n) {
884
- return t = Ee(t), function (e, t) {
885
- if (t && ("object" === me(t) || "function" == typeof t)) return t;
898
+ function ve(e, t, n) {
899
+ return t = ke(t), function (e, t) {
900
+ if (t && ("object" === he(t) || "function" == typeof t)) return t;
886
901
  if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined");
887
902
  return function (e) {
888
903
  if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
889
904
  return e;
890
905
  }(e);
891
- }(e, we() ? Reflect.construct(t, n || [], Ee(e).constructor) : t.apply(e, n));
906
+ }(e, be() ? Reflect.construct(t, n || [], ke(e).constructor) : t.apply(e, n));
892
907
  }
893
- function be(e) {
908
+ function ye(e) {
894
909
  var t = "function" == typeof Map ? new Map() : void 0;
895
- return be = function be(e) {
910
+ return ye = function ye(e) {
896
911
  if (null === e || !function (e) {
897
912
  try {
898
913
  return -1 !== Function.toString.call(e).indexOf("[native code]");
@@ -907,12 +922,12 @@ function be(e) {
907
922
  }
908
923
  function n() {
909
924
  return function (e, t, n) {
910
- if (we()) return Reflect.construct.apply(null, arguments);
925
+ if (be()) return Reflect.construct.apply(null, arguments);
911
926
  var r = [null];
912
927
  r.push.apply(r, t);
913
928
  var o = new (e.bind.apply(e, r))();
914
- return n && ke(o, n.prototype), o;
915
- }(e, arguments, Ee(this).constructor);
929
+ return n && we(o, n.prototype), o;
930
+ }(e, arguments, ke(this).constructor);
916
931
  }
917
932
  return n.prototype = Object.create(e.prototype, {
918
933
  constructor: {
@@ -921,26 +936,26 @@ function be(e) {
921
936
  writable: !0,
922
937
  configurable: !0
923
938
  }
924
- }), ke(n, e);
925
- }, be(e);
939
+ }), we(n, e);
940
+ }, ye(e);
926
941
  }
927
- function we() {
942
+ function be() {
928
943
  try {
929
944
  var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
930
945
  } catch (e) {}
931
- return (we = function we() {
946
+ return (be = function be() {
932
947
  return !!e;
933
948
  })();
934
949
  }
935
- function ke(e, t) {
936
- return ke = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (e, t) {
950
+ function we(e, t) {
951
+ return we = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (e, t) {
937
952
  return e.__proto__ = t, e;
938
- }, ke(e, t);
953
+ }, we(e, t);
939
954
  }
940
- function Ee(e) {
941
- return Ee = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (e) {
955
+ function ke(e) {
956
+ return ke = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (e) {
942
957
  return e.__proto__ || Object.getPrototypeOf(e);
943
- }, Ee(e);
958
+ }, ke(e);
944
959
  }
945
960
  !function (e) {
946
961
  e.emailMagicLinks = "emailMagicLinks", e.sso = "sso", e.passwords = "passwords", e.oauth = "oauth";
@@ -951,8 +966,8 @@ function Ee(e) {
951
966
  }(b || (b = {})), function (e) {
952
967
  e.Google = "google", e.Microsoft = "microsoft";
953
968
  }(w || (w = {}));
954
- var Se;
955
- function Ce(e, t, n, r) {
969
+ var Ee;
970
+ function Se(e, t, n, r) {
956
971
  return new (n || (n = Promise))(function (o, i) {
957
972
  function a(e) {
958
973
  try {
@@ -979,12 +994,12 @@ function Ce(e, t, n, r) {
979
994
  }
980
995
  "function" == typeof SuppressedError && SuppressedError, function (e) {
981
996
  e.RequiredCatcha = "Catcha Required";
982
- }(Se || (Se = {}));
983
- var xe,
984
- Oe = function (e) {
997
+ }(Ee || (Ee = {}));
998
+ var Ce,
999
+ xe = function (e) {
985
1000
  function t(e) {
986
1001
  var n;
987
- return ve(this, t), (n = ye(this, t, [e])).type = e, n;
1002
+ return Ae(this, t), (n = ve(this, t, [e])).type = e, n;
988
1003
  }
989
1004
  return function (e, t) {
990
1005
  if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
@@ -996,10 +1011,10 @@ var xe,
996
1011
  }
997
1012
  }), Object.defineProperty(e, "prototype", {
998
1013
  writable: !1
999
- }), t && ke(e, t);
1000
- }(t, be(Error)), _e(t);
1014
+ }), t && we(e, t);
1015
+ }(t, ye(Error)), ge(t);
1001
1016
  }();
1002
- function Pe(e) {
1017
+ function Oe(e) {
1003
1018
  var t,
1004
1019
  n = e.method,
1005
1020
  r = e.finalURL,
@@ -1007,9 +1022,9 @@ function Pe(e) {
1007
1022
  i = e.xSDKClientHeader,
1008
1023
  a = e.xSDKParentHostHeader,
1009
1024
  s = e.body;
1010
- return Ce(this, void 0, void 0, fe().mark(function e() {
1025
+ return Se(this, void 0, void 0, me().mark(function e() {
1011
1026
  var c, l, u, d, p, h;
1012
- return fe().wrap(function (e) {
1027
+ return me().wrap(function (e) {
1013
1028
  for (;;) switch (e.prev = e.next) {
1014
1029
  case 0:
1015
1030
  return c = {
@@ -1073,7 +1088,7 @@ function Pe(e) {
1073
1088
  e.next = 49;
1074
1089
  break;
1075
1090
  }
1076
- throw new Oe(Se.RequiredCatcha);
1091
+ throw new xe(Ee.RequiredCatcha);
1077
1092
  case 49:
1078
1093
  throw new P("Invalid response from the Stytch servers.");
1079
1094
  case 50:
@@ -1083,43 +1098,43 @@ function Pe(e) {
1083
1098
  }, e, null, [[3, 9], [15, 22], [26, 32], [38, 44]]);
1084
1099
  }));
1085
1100
  }
1086
- var Te = new Uint8Array(16);
1087
- function Ie() {
1088
- if (!xe && !(xe = "undefined" != typeof crypto && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || "undefined" != typeof msCrypto && "function" == typeof msCrypto.getRandomValues && msCrypto.getRandomValues.bind(msCrypto))) throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
1089
- return xe(Te);
1101
+ var Pe = new Uint8Array(16);
1102
+ function Te() {
1103
+ if (!Ce && !(Ce = "undefined" != typeof crypto && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || "undefined" != typeof msCrypto && "function" == typeof msCrypto.getRandomValues && msCrypto.getRandomValues.bind(msCrypto))) throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
1104
+ return Ce(Pe);
1090
1105
  }
1091
- var Me = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
1092
- for (var Be = [], Re = 0; Re < 256; ++Re) Be.push((Re + 256).toString(16).substr(1));
1093
- function je(e) {
1106
+ var Ie = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
1107
+ for (var Me = [], Be = 0; Be < 256; ++Be) Me.push((Be + 256).toString(16).substr(1));
1108
+ function Re(e) {
1094
1109
  var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0,
1095
- n = (Be[e[t + 0]] + Be[e[t + 1]] + Be[e[t + 2]] + Be[e[t + 3]] + "-" + Be[e[t + 4]] + Be[e[t + 5]] + "-" + Be[e[t + 6]] + Be[e[t + 7]] + "-" + Be[e[t + 8]] + Be[e[t + 9]] + "-" + Be[e[t + 10]] + Be[e[t + 11]] + Be[e[t + 12]] + Be[e[t + 13]] + Be[e[t + 14]] + Be[e[t + 15]]).toLowerCase();
1110
+ n = (Me[e[t + 0]] + Me[e[t + 1]] + Me[e[t + 2]] + Me[e[t + 3]] + "-" + Me[e[t + 4]] + Me[e[t + 5]] + "-" + Me[e[t + 6]] + Me[e[t + 7]] + "-" + Me[e[t + 8]] + Me[e[t + 9]] + "-" + Me[e[t + 10]] + Me[e[t + 11]] + Me[e[t + 12]] + Me[e[t + 13]] + Me[e[t + 14]] + Me[e[t + 15]]).toLowerCase();
1096
1111
  if (!function (e) {
1097
- return "string" == typeof e && Me.test(e);
1112
+ return "string" == typeof e && Ie.test(e);
1098
1113
  }(n)) throw TypeError("Stringified UUID is invalid");
1099
1114
  return n;
1100
1115
  }
1101
- function De(e, t, n) {
1102
- var r = (e = e || {}).random || (e.rng || Ie)();
1116
+ function je(e, t, n) {
1117
+ var r = (e = e || {}).random || (e.rng || Te)();
1103
1118
  if (r[6] = 15 & r[6] | 64, r[8] = 63 & r[8] | 128, t) {
1104
1119
  n = n || 0;
1105
1120
  for (var o = 0; o < 16; ++o) t[n + o] = r[o];
1106
1121
  return t;
1107
1122
  }
1108
- return je(r);
1123
+ return Re(r);
1109
1124
  }
1110
- var Le = {};
1111
- function ze(e, t) {
1112
- return Ce(this, void 0, void 0, fe().mark(function n() {
1113
- return fe().wrap(function (n) {
1125
+ var De = {};
1126
+ function Le(e, t) {
1127
+ return Se(this, void 0, void 0, me().mark(function n() {
1128
+ return me().wrap(function (n) {
1114
1129
  for (;;) switch (n.prev = n.next) {
1115
1130
  case 0:
1116
- if (void 0 === Le[e]) {
1131
+ if (void 0 === De[e]) {
1117
1132
  n.next = 2;
1118
1133
  break;
1119
1134
  }
1120
- return n.abrupt("return", Le[e]);
1135
+ return n.abrupt("return", De[e]);
1121
1136
  case 2:
1122
- return Le[e] = Fe(e, t), n.abrupt("return", Le[e]);
1137
+ return De[e] = ze(e, t), n.abrupt("return", De[e]);
1123
1138
  case 4:
1124
1139
  case "end":
1125
1140
  return n.stop();
@@ -1127,10 +1142,10 @@ function ze(e, t) {
1127
1142
  }, n);
1128
1143
  }));
1129
1144
  }
1130
- function Fe(e, t) {
1145
+ function ze(e, t) {
1131
1146
  return new Promise(function (n, r) {
1132
1147
  var o = function (e) {
1133
- var t = Ne(e);
1148
+ var t = Fe(e);
1134
1149
  if (t[0]) return t[0];
1135
1150
  }(e);
1136
1151
  if (o && "true" === o.dataset.loaded) try {
@@ -1154,21 +1169,21 @@ function Fe(e, t) {
1154
1169
  });
1155
1170
  });
1156
1171
  }
1157
- var Ne = function Ne(e) {
1172
+ var Fe = function Fe(e) {
1158
1173
  return document.querySelectorAll('script[src="'.concat(e, '"]'));
1159
1174
  };
1160
- var Ue,
1161
- Qe = ["[Stytch]"],
1162
- $e = function $e() {
1175
+ var Ne,
1176
+ Ue = ["[Stytch]"],
1177
+ Qe = function Qe() {
1163
1178
  for (var e, t = arguments.length, n = new Array(t), r = 0; r < t; r++) n[r] = arguments[r];
1164
- return (e = console).warn.apply(e, Qe.concat(n));
1179
+ return (e = console).warn.apply(e, Ue.concat(n));
1165
1180
  },
1166
- He = function He() {
1181
+ $e = function $e() {
1167
1182
  for (var e, t = arguments.length, n = new Array(t), r = 0; r < t; r++) n[r] = arguments[r];
1168
- return (e = console).error.apply(e, Qe.concat(n));
1183
+ return (e = console).error.apply(e, Ue.concat(n));
1169
1184
  },
1170
- Ke = "\nYou can find your public token at https://stytch.com/dashboard/api-keys.",
1171
- Ve = {
1185
+ He = "\nYou can find your public token at https://stytch.com/dashboard/api-keys.",
1186
+ Ke = {
1172
1187
  US: "1",
1173
1188
  AX: "358",
1174
1189
  AS: "1684",
@@ -1286,13 +1301,13 @@ var Ue,
1286
1301
  VA: "379",
1287
1302
  EH: "212"
1288
1303
  },
1289
- qe = function qe(e) {
1304
+ Ve = function Ve(e) {
1290
1305
  return e.includes("public-token-test");
1291
1306
  },
1292
- We = function We(e) {
1307
+ qe = function qe(e) {
1293
1308
  var t = {
1294
1309
  isObject: function isObject(n, r) {
1295
- var o = "object" === me(r) && !Array.isArray(r) && null !== r;
1310
+ var o = "object" === he(r) && !Array.isArray(r) && null !== r;
1296
1311
  if (!o) throw new E(e, n + " must be an object.");
1297
1312
  return t;
1298
1313
  },
@@ -1309,54 +1324,7 @@ var Ue,
1309
1324
  isStringArray: function isStringArray(n, r) {
1310
1325
  if (!Array.isArray(r)) throw new E(e, n + " must be an array of strings.");
1311
1326
  var o,
1312
- i = function (e, t) {
1313
- var _n2 = "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
1314
- if (!_n2) {
1315
- if (Array.isArray(e) || (_n2 = pe(e)) || t && e && "number" == typeof e.length) {
1316
- _n2 && (e = _n2);
1317
- var r = 0,
1318
- o = function o() {};
1319
- return {
1320
- s: o,
1321
- n: function n() {
1322
- return r >= e.length ? {
1323
- done: !0
1324
- } : {
1325
- done: !1,
1326
- value: e[r++]
1327
- };
1328
- },
1329
- e: function e(_e2) {
1330
- throw _e2;
1331
- },
1332
- f: o
1333
- };
1334
- }
1335
- throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1336
- }
1337
- var i,
1338
- a = !0,
1339
- s = !1;
1340
- return {
1341
- s: function s() {
1342
- _n2 = _n2.call(e);
1343
- },
1344
- n: function n() {
1345
- var e = _n2.next();
1346
- return a = e.done, e;
1347
- },
1348
- e: function e(_e3) {
1349
- s = !0, i = _e3;
1350
- },
1351
- f: function f() {
1352
- try {
1353
- a || null == _n2["return"] || _n2["return"]();
1354
- } finally {
1355
- if (s) throw i;
1356
- }
1357
- }
1358
- };
1359
- }(r);
1327
+ i = de(r);
1360
1328
  try {
1361
1329
  for (i.s(); !(o = i.n()).done;) {
1362
1330
  if ("string" != typeof o.value) throw new E(e, n + " must be an array of strings.");
@@ -1388,14 +1356,14 @@ var Ue,
1388
1356
  };
1389
1357
  return t;
1390
1358
  },
1391
- Ge = _e(function e(t, n, r) {
1359
+ We = ge(function e(t, n, r) {
1392
1360
  var o = this,
1393
1361
  i = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : function () {
1394
1362
  return Promise.resolve(void 0);
1395
1363
  };
1396
- ve(this, e), this.bootstrapPromise = r, this.isEnabled = function () {
1397
- return Ce(o, void 0, void 0, fe().mark(function e() {
1398
- return fe().wrap(function (e) {
1364
+ Ae(this, e), this.bootstrapPromise = r, this.isEnabled = function () {
1365
+ return Se(o, void 0, void 0, me().mark(function e() {
1366
+ return me().wrap(function (e) {
1399
1367
  for (;;) switch (e.prev = e.next) {
1400
1368
  case 0:
1401
1369
  return e.abrupt("return", this.state.then(function (e) {
@@ -1408,9 +1376,9 @@ var Ue,
1408
1376
  }, e, this);
1409
1377
  }));
1410
1378
  }, this.getTelemetryID = function () {
1411
- return Ce(o, void 0, void 0, fe().mark(function e() {
1379
+ return Se(o, void 0, void 0, me().mark(function e() {
1412
1380
  var t, n, r, o;
1413
- return fe().wrap(function (e) {
1381
+ return me().wrap(function (e) {
1414
1382
  for (;;) switch (e.prev = e.next) {
1415
1383
  case 0:
1416
1384
  return e.next = 2, this.state;
@@ -1431,9 +1399,9 @@ var Ue,
1431
1399
  }, e, this);
1432
1400
  }));
1433
1401
  }, this.getDFPTelemetryIDAndCaptcha = function () {
1434
- return Ce(o, void 0, void 0, fe().mark(function e() {
1402
+ return Se(o, void 0, void 0, me().mark(function e() {
1435
1403
  var t, n, r, o, i, a;
1436
- return fe().wrap(function (e) {
1404
+ return me().wrap(function (e) {
1437
1405
  for (;;) switch (e.prev = e.next) {
1438
1406
  case 0:
1439
1407
  return e.next = 2, this.state;
@@ -1476,14 +1444,14 @@ var Ue,
1476
1444
  }, e, this);
1477
1445
  }));
1478
1446
  }, this.retryWithCaptchaAndDFP = function (e, t) {
1479
- return Ce(o, void 0, void 0, fe().mark(function n() {
1447
+ return Se(o, void 0, void 0, me().mark(function n() {
1480
1448
  var r, o, i;
1481
- return fe().wrap(function (n) {
1449
+ return me().wrap(function (n) {
1482
1450
  for (;;) switch (n.prev = n.next) {
1483
1451
  case 0:
1484
1452
  return n.next = 2, this.state;
1485
1453
  case 2:
1486
- if (r = n.sent, o = r.enabled, i = r.executeRecaptcha, e.type !== Se.RequiredCatcha || !o) {
1454
+ if (r = n.sent, o = r.enabled, i = r.executeRecaptcha, e.type !== Ee.RequiredCatcha || !o) {
1487
1455
  n.next = 14;
1488
1456
  break;
1489
1457
  }
@@ -1507,8 +1475,8 @@ var Ue,
1507
1475
  }, n, this);
1508
1476
  }));
1509
1477
  }, this.state = r.then(function (e) {
1510
- return Ce(o, void 0, void 0, fe().mark(function r() {
1511
- return fe().wrap(function (r) {
1478
+ return Se(o, void 0, void 0, me().mark(function r() {
1479
+ return me().wrap(function (r) {
1512
1480
  for (;;) switch (r.prev = r.next) {
1513
1481
  case 0:
1514
1482
  if (e.runDFPProtectedAuth) {
@@ -1523,7 +1491,7 @@ var Ue,
1523
1491
  executeRecaptcha: i
1524
1492
  });
1525
1493
  case 2:
1526
- return r.next = 4, ze("".concat("https://elements.stytch.com", "/telemetry.js"), function () {
1494
+ return r.next = 4, Le("".concat("https://elements.stytch.com", "/telemetry.js"), function () {
1527
1495
  return window.GetTelemetryID;
1528
1496
  });
1529
1497
  case 4:
@@ -1543,11 +1511,11 @@ var Ue,
1543
1511
  }));
1544
1512
  });
1545
1513
  }),
1546
- Je = function Je() {
1514
+ Ge = function Ge() {
1547
1515
  return {
1548
1516
  isEnabled: function isEnabled() {
1549
- return Ce(void 0, void 0, void 0, fe().mark(function e() {
1550
- return fe().wrap(function (e) {
1517
+ return Se(void 0, void 0, void 0, me().mark(function e() {
1518
+ return me().wrap(function (e) {
1551
1519
  for (;;) switch (e.prev = e.next) {
1552
1520
  case 0:
1553
1521
  return e.abrupt("return", !1);
@@ -1559,8 +1527,8 @@ var Ue,
1559
1527
  }));
1560
1528
  },
1561
1529
  getTelemetryID: function getTelemetryID() {
1562
- return Ce(void 0, void 0, void 0, fe().mark(function e() {
1563
- return fe().wrap(function (e) {
1530
+ return Se(void 0, void 0, void 0, me().mark(function e() {
1531
+ return me().wrap(function (e) {
1564
1532
  for (;;) switch (e.prev = e.next) {
1565
1533
  case 0:
1566
1534
  return e.abrupt("return", void 0);
@@ -1572,8 +1540,8 @@ var Ue,
1572
1540
  }));
1573
1541
  },
1574
1542
  getDFPTelemetryIDAndCaptcha: function getDFPTelemetryIDAndCaptcha() {
1575
- return Ce(void 0, void 0, void 0, fe().mark(function e() {
1576
- return fe().wrap(function (e) {
1543
+ return Se(void 0, void 0, void 0, me().mark(function e() {
1544
+ return me().wrap(function (e) {
1577
1545
  for (;;) switch (e.prev = e.next) {
1578
1546
  case 0:
1579
1547
  return e.abrupt("return", {
@@ -1588,8 +1556,8 @@ var Ue,
1588
1556
  }));
1589
1557
  },
1590
1558
  retryWithCaptchaAndDFP: function retryWithCaptchaAndDFP() {
1591
- return Ce(void 0, void 0, void 0, fe().mark(function e() {
1592
- return fe().wrap(function (e) {
1559
+ return Se(void 0, void 0, void 0, me().mark(function e() {
1560
+ return me().wrap(function (e) {
1593
1561
  for (;;) switch (e.prev = e.next) {
1594
1562
  case 0:
1595
1563
  throw new Error("DFP protected auth is disabled");
@@ -1602,11 +1570,11 @@ var Ue,
1602
1570
  }
1603
1571
  };
1604
1572
  },
1605
- Ye = function () {
1573
+ Je = function () {
1606
1574
  function e() {
1607
- ve(this, e);
1575
+ Ae(this, e);
1608
1576
  }
1609
- return _e(e, null, [{
1577
+ return ge(e, null, [{
1610
1578
  key: "marshall",
1611
1579
  value: function value(e) {
1612
1580
  return Object.assign(Object.assign({}, e), {
@@ -1654,11 +1622,11 @@ var Ue,
1654
1622
  }
1655
1623
  }]), e;
1656
1624
  }(),
1657
- Ze = function () {
1625
+ Ye = function () {
1658
1626
  function e(t) {
1659
- ve(this, e), this.maxBatchSize = t.maxBatchSize, this.logEventURL = t.logEventURL, setInterval(this.flush.bind(this), t.intervalDurationMs), this.batch = [];
1627
+ Ae(this, e), this.maxBatchSize = t.maxBatchSize, this.logEventURL = t.logEventURL, setInterval(this.flush.bind(this), t.intervalDurationMs), this.batch = [];
1660
1628
  }
1661
- return _e(e, [{
1629
+ return ge(e, [{
1662
1630
  key: "logEvent",
1663
1631
  value: function value(e, t) {
1664
1632
  this.batch.push({
@@ -1669,9 +1637,9 @@ var Ue,
1669
1637
  }, {
1670
1638
  key: "flush",
1671
1639
  value: function value() {
1672
- return Ce(this, void 0, void 0, fe().mark(function e() {
1640
+ return Se(this, void 0, void 0, me().mark(function e() {
1673
1641
  var t;
1674
- return fe().wrap(function (e) {
1642
+ return me().wrap(function (e) {
1675
1643
  for (;;) switch (e.prev = e.next) {
1676
1644
  case 0:
1677
1645
  if (this.batch.length) {
@@ -1703,26 +1671,26 @@ var Ue,
1703
1671
  }();
1704
1672
  !function (e) {
1705
1673
  e.LoginOrCreateEML = "login_or_create_eml", e.LoginOrCreateOTP = "login_or_create_otp", e.ResetPassword = "reset_password";
1706
- }(Ue || (Ue = {})), Promise.resolve({
1674
+ }(Ne || (Ne = {})), Promise.resolve({
1707
1675
  pkceRequiredForEmailMagicLinks: !1
1708
1676
  }), Promise.resolve({
1709
1677
  pkceRequiredForPasswordResets: !1
1710
1678
  });
1711
- var Xe = Promise.resolve({
1679
+ var Ze = Promise.resolve({
1712
1680
  pkceRequiredForEmailMagicLinks: !1
1713
1681
  }),
1714
- et = function () {
1682
+ Xe = function () {
1715
1683
  function e(t, n, r, o) {
1716
1684
  var i = this,
1717
- a = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : Xe,
1718
- s = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : Je();
1719
- ve(this, e), this._networkClient = t, this._subscriptionService = n, this._pkceManager = r, this._passwordResetPKCEManager = o, this._config = a, this.dfpProtectedAuth = s, this.email = {
1685
+ a = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : Ze,
1686
+ s = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : Ge();
1687
+ Ae(this, e), this._networkClient = t, this._subscriptionService = n, this._pkceManager = r, this._passwordResetPKCEManager = o, this._config = a, this.dfpProtectedAuth = s, this.email = {
1720
1688
  invite: function invite(e) {
1721
- return Ce(i, void 0, void 0, fe().mark(function t() {
1722
- return fe().wrap(function (t) {
1689
+ return Se(i, void 0, void 0, me().mark(function t() {
1690
+ return me().wrap(function (t) {
1723
1691
  for (;;) switch (t.prev = t.next) {
1724
1692
  case 0:
1725
- return We("stytch.magicLinks.email.loginOrSignup").isString("email_address", e.email_address).isOptionalString("invite_redirect_url", e.invite_redirect_url).isOptionalString("invite_template_id", e.invite_template_id).isOptionalString("name", e.name).isOptionalString("locale", e.locale).isOptionalStringArray("roles", e.roles), t.abrupt("return", this._networkClient.fetchSDK({
1693
+ return qe("stytch.magicLinks.email.loginOrSignup").isString("email_address", e.email_address).isOptionalString("invite_redirect_url", e.invite_redirect_url).isOptionalString("invite_template_id", e.invite_template_id).isOptionalString("name", e.name).isOptionalString("locale", e.locale).isOptionalStringArray("roles", e.roles), t.abrupt("return", this._networkClient.fetchSDK({
1726
1694
  url: "/b2b/magic_links/email/invite",
1727
1695
  body: e,
1728
1696
  errorMessage: "Failed to send invite.",
@@ -1736,12 +1704,12 @@ var Xe = Promise.resolve({
1736
1704
  }));
1737
1705
  },
1738
1706
  loginOrSignup: function loginOrSignup(e) {
1739
- return Ce(i, void 0, void 0, fe().mark(function t() {
1707
+ return Se(i, void 0, void 0, me().mark(function t() {
1740
1708
  var n, r;
1741
- return fe().wrap(function (t) {
1709
+ return me().wrap(function (t) {
1742
1710
  for (;;) switch (t.prev = t.next) {
1743
1711
  case 0:
1744
- return We("stytch.magicLinks.email.loginOrSignup").isString("email_address", e.email_address).isString("organization_id", e.organization_id).isOptionalString("login_redirect_url", e.login_redirect_url).isOptionalString("login_template_id", e.login_template_id).isOptionalString("signup_redirect_url", e.signup_redirect_url).isOptionalString("signup_template_id", e.signup_template_id).isOptionalString("locale", e.locale), t.next = 3, this.getCodeChallenge();
1712
+ return qe("stytch.magicLinks.email.loginOrSignup").isString("email_address", e.email_address).isString("organization_id", e.organization_id).isOptionalString("login_redirect_url", e.login_redirect_url).isOptionalString("login_template_id", e.login_template_id).isOptionalString("signup_redirect_url", e.signup_redirect_url).isOptionalString("signup_template_id", e.signup_template_id).isOptionalString("locale", e.locale), t.next = 3, this.getCodeChallenge();
1745
1713
  case 3:
1746
1714
  return n = t.sent, r = Object.assign(Object.assign({}, e), {
1747
1715
  pkce_code_challenge: n
@@ -1760,12 +1728,12 @@ var Xe = Promise.resolve({
1760
1728
  },
1761
1729
  discovery: {
1762
1730
  send: function send(e) {
1763
- return Ce(i, void 0, void 0, fe().mark(function t() {
1731
+ return Se(i, void 0, void 0, me().mark(function t() {
1764
1732
  var n, r;
1765
- return fe().wrap(function (t) {
1733
+ return me().wrap(function (t) {
1766
1734
  for (;;) switch (t.prev = t.next) {
1767
1735
  case 0:
1768
- return We("stytch.magicLinks.email.discovery.send").isString("email_address", e.email_address).isOptionalString("discovery_redirect_url", e.discovery_redirect_url).isOptionalString("login_template_id", e.login_template_id).isOptionalString("locale", e.locale), t.next = 3, this.getCodeChallenge();
1736
+ return qe("stytch.magicLinks.email.discovery.send").isString("email_address", e.email_address).isOptionalString("discovery_redirect_url", e.discovery_redirect_url).isOptionalString("login_template_id", e.login_template_id).isOptionalString("locale", e.locale), t.next = 3, this.getCodeChallenge();
1769
1737
  case 3:
1770
1738
  return n = t.sent, r = Object.assign(Object.assign({}, e), {
1771
1739
  pkce_code_challenge: n
@@ -1784,12 +1752,12 @@ var Xe = Promise.resolve({
1784
1752
  }
1785
1753
  }
1786
1754
  }, this.authenticate = function (e) {
1787
- return Ce(i, void 0, void 0, fe().mark(function t() {
1755
+ return Se(i, void 0, void 0, me().mark(function t() {
1788
1756
  var n, r;
1789
- return fe().wrap(function (t) {
1757
+ return me().wrap(function (t) {
1790
1758
  for (;;) switch (t.prev = t.next) {
1791
1759
  case 0:
1792
- return We("stytch.magicLinks.authenticate").isString("magic_links_token", e.magic_links_token).isNumber("session_duration_minutes", e.session_duration_minutes).isOptionalString("locale", e.locale), t.next = 3, this._passwordResetPKCEManager.getPKPair();
1760
+ return qe("stytch.magicLinks.authenticate").isString("magic_links_token", e.magic_links_token).isNumber("session_duration_minutes", e.session_duration_minutes).isOptionalString("locale", e.locale), t.next = 3, this._passwordResetPKCEManager.getPKPair();
1793
1761
  case 3:
1794
1762
  if (n = t.sent, r = null, !(null == n ? void 0 : n.code_verifier)) {
1795
1763
  t.next = 19;
@@ -1840,12 +1808,12 @@ var Xe = Promise.resolve({
1840
1808
  }));
1841
1809
  }, this.discovery = {
1842
1810
  authenticate: function authenticate(e) {
1843
- return Ce(i, void 0, void 0, fe().mark(function t() {
1811
+ return Se(i, void 0, void 0, me().mark(function t() {
1844
1812
  var n, r, o, i, a, s;
1845
- return fe().wrap(function (t) {
1813
+ return me().wrap(function (t) {
1846
1814
  for (;;) switch (t.prev = t.next) {
1847
1815
  case 0:
1848
- return We("stytch.magicLinks.discovery.authenticate").isString("discovery_magic_links_token", e.discovery_magic_links_token), t.next = 3, this._pkceManager.getPKPair();
1816
+ return qe("stytch.magicLinks.discovery.authenticate").isString("discovery_magic_links_token", e.discovery_magic_links_token), t.next = 3, this._pkceManager.getPKPair();
1849
1817
  case 3:
1850
1818
  return n = t.sent, t.next = 6, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
1851
1819
  case 6:
@@ -1876,12 +1844,12 @@ var Xe = Promise.resolve({
1876
1844
  }
1877
1845
  };
1878
1846
  }
1879
- return _e(e, [{
1847
+ return ge(e, [{
1880
1848
  key: "getCodeChallenge",
1881
1849
  value: function value() {
1882
- return Ce(this, void 0, void 0, fe().mark(function e() {
1850
+ return Se(this, void 0, void 0, me().mark(function e() {
1883
1851
  var t, n;
1884
- return fe().wrap(function (e) {
1852
+ return me().wrap(function (e) {
1885
1853
  for (;;) switch (e.prev = e.next) {
1886
1854
  case 0:
1887
1855
  return e.next = 2, this._config;
@@ -1913,9 +1881,9 @@ var Xe = Promise.resolve({
1913
1881
  }, {
1914
1882
  key: "handlePKCEForAuthenticate",
1915
1883
  value: function value(e, t) {
1916
- return Ce(this, void 0, void 0, fe().mark(function n() {
1884
+ return Se(this, void 0, void 0, me().mark(function n() {
1917
1885
  var r, o, i, a, s, c;
1918
- return fe().wrap(function (n) {
1886
+ return me().wrap(function (n) {
1919
1887
  for (;;) switch (n.prev = n.next) {
1920
1888
  case 0:
1921
1889
  return n.next = 2, e.getPKPair();
@@ -1953,12 +1921,12 @@ var Xe = Promise.resolve({
1953
1921
  }
1954
1922
  }]), e;
1955
1923
  }(),
1956
- tt = _e(function e(t, n) {
1924
+ et = ge(function e(t, n) {
1957
1925
  var r = this;
1958
- ve(this, e), this._networkClient = t, this._subscriptionService = n, this.get = function () {
1959
- return Ce(r, void 0, void 0, fe().mark(function e() {
1926
+ Ae(this, e), this._networkClient = t, this._subscriptionService = n, this.get = function () {
1927
+ return Se(r, void 0, void 0, me().mark(function e() {
1960
1928
  var t;
1961
- return fe().wrap(function (e) {
1929
+ return me().wrap(function (e) {
1962
1930
  for (;;) switch (e.prev = e.next) {
1963
1931
  case 0:
1964
1932
  return e.next = 2, this._networkClient.fetchSDK({
@@ -1976,18 +1944,23 @@ var Xe = Promise.resolve({
1976
1944
  }));
1977
1945
  }, this.getSync = function () {
1978
1946
  return r._subscriptionService.getMember();
1947
+ }, this.getInfo = function () {
1948
+ return {
1949
+ member: r.getSync(),
1950
+ fromCache: r._subscriptionService.getFromCache()
1951
+ };
1979
1952
  }, this.onChange = function (e) {
1980
1953
  return r._subscriptionService.subscribeToState(function (t) {
1981
1954
  var n;
1982
1955
  return e(null !== (n = null == t ? void 0 : t.member) && void 0 !== n ? n : null);
1983
1956
  });
1984
1957
  }, this.update = function (e) {
1985
- return Ce(r, void 0, void 0, fe().mark(function t() {
1958
+ return Se(r, void 0, void 0, me().mark(function t() {
1986
1959
  var n;
1987
- return fe().wrap(function (t) {
1960
+ return me().wrap(function (t) {
1988
1961
  for (;;) switch (t.prev = t.next) {
1989
1962
  case 0:
1990
- return We("stytch.self.update").isOptionalString("name", e.name).isOptionalObject("untrusted_metadata", e.untrusted_metadata).isOptionalBoolean("mfa_enrolled", e.mfa_enrolled).isOptionalString("mfa_phone_number", e.mfa_phone_number).isOptionalString("default_mfa_method", e.default_mfa_method), t.next = 3, this._networkClient.fetchSDK({
1963
+ return qe("stytch.self.update").isOptionalString("name", e.name).isOptionalObject("untrusted_metadata", e.untrusted_metadata).isOptionalBoolean("mfa_enrolled", e.mfa_enrolled).isOptionalString("mfa_phone_number", e.mfa_phone_number).isOptionalString("default_mfa_method", e.default_mfa_method), t.next = 3, this._networkClient.fetchSDK({
1991
1964
  url: "/b2b/organizations/members/update",
1992
1965
  body: e,
1993
1966
  errorMessage: "Failed to update member.",
@@ -2002,9 +1975,9 @@ var Xe = Promise.resolve({
2002
1975
  }, t, this);
2003
1976
  }));
2004
1977
  }, this.deleteMFAPhoneNumber = function () {
2005
- return Ce(r, void 0, void 0, fe().mark(function e() {
1978
+ return Se(r, void 0, void 0, me().mark(function e() {
2006
1979
  var t;
2007
- return fe().wrap(function (e) {
1980
+ return me().wrap(function (e) {
2008
1981
  for (;;) switch (e.prev = e.next) {
2009
1982
  case 0:
2010
1983
  return e.next = 2, this._networkClient.fetchSDK({
@@ -2021,9 +1994,9 @@ var Xe = Promise.resolve({
2021
1994
  }, e, this);
2022
1995
  }));
2023
1996
  }, this.deleteMFATOTP = function () {
2024
- return Ce(r, void 0, void 0, fe().mark(function e() {
1997
+ return Se(r, void 0, void 0, me().mark(function e() {
2025
1998
  var t;
2026
- return fe().wrap(function (e) {
1999
+ return me().wrap(function (e) {
2027
2000
  for (;;) switch (e.prev = e.next) {
2028
2001
  case 0:
2029
2002
  return e.next = 2, this._networkClient.fetchSDK({
@@ -2040,9 +2013,9 @@ var Xe = Promise.resolve({
2040
2013
  }, e, this);
2041
2014
  }));
2042
2015
  }, this.deletePassword = function (e) {
2043
- return Ce(r, void 0, void 0, fe().mark(function t() {
2016
+ return Se(r, void 0, void 0, me().mark(function t() {
2044
2017
  var n;
2045
- return fe().wrap(function (t) {
2018
+ return me().wrap(function (t) {
2046
2019
  for (;;) switch (t.prev = t.next) {
2047
2020
  case 0:
2048
2021
  return t.next = 2, this._networkClient.fetchSDK({
@@ -2060,14 +2033,14 @@ var Xe = Promise.resolve({
2060
2033
  }));
2061
2034
  };
2062
2035
  }),
2063
- nt = function () {
2036
+ tt = function () {
2064
2037
  function e(t, n, r, o, i) {
2065
2038
  var a = this,
2066
- s = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : Je();
2067
- ve(this, e), this._networkClient = t, this._subscriptionService = n, this._pkceManager = r, this._dynamicConfig = o, this._config = i, this.dfpProtectedAuth = s, this.saml = {
2039
+ s = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : Ge();
2040
+ Ae(this, e), this._networkClient = t, this._subscriptionService = n, this._pkceManager = r, this._dynamicConfig = o, this._config = i, this.dfpProtectedAuth = s, this.saml = {
2068
2041
  createConnection: function createConnection(e) {
2069
- return Ce(a, void 0, void 0, fe().mark(function t() {
2070
- return fe().wrap(function (t) {
2042
+ return Se(a, void 0, void 0, me().mark(function t() {
2043
+ return me().wrap(function (t) {
2071
2044
  for (;;) switch (t.prev = t.next) {
2072
2045
  case 0:
2073
2046
  return t.next = 2, this._networkClient.fetchSDK({
@@ -2086,8 +2059,8 @@ var Xe = Promise.resolve({
2086
2059
  }));
2087
2060
  },
2088
2061
  updateConnection: function updateConnection(e) {
2089
- return Ce(a, void 0, void 0, fe().mark(function t() {
2090
- return fe().wrap(function (t) {
2062
+ return Se(a, void 0, void 0, me().mark(function t() {
2063
+ return me().wrap(function (t) {
2091
2064
  for (;;) switch (t.prev = t.next) {
2092
2065
  case 0:
2093
2066
  return t.next = 2, this._networkClient.fetchSDK({
@@ -2106,8 +2079,8 @@ var Xe = Promise.resolve({
2106
2079
  }));
2107
2080
  },
2108
2081
  updateConnectionByURL: function updateConnectionByURL(e) {
2109
- return Ce(a, void 0, void 0, fe().mark(function t() {
2110
- return fe().wrap(function (t) {
2082
+ return Se(a, void 0, void 0, me().mark(function t() {
2083
+ return me().wrap(function (t) {
2111
2084
  for (;;) switch (t.prev = t.next) {
2112
2085
  case 0:
2113
2086
  return t.next = 2, this._networkClient.fetchSDK({
@@ -2126,8 +2099,8 @@ var Xe = Promise.resolve({
2126
2099
  }));
2127
2100
  },
2128
2101
  deleteVerificationCertificate: function deleteVerificationCertificate(e) {
2129
- return Ce(a, void 0, void 0, fe().mark(function t() {
2130
- return fe().wrap(function (t) {
2102
+ return Se(a, void 0, void 0, me().mark(function t() {
2103
+ return me().wrap(function (t) {
2131
2104
  for (;;) switch (t.prev = t.next) {
2132
2105
  case 0:
2133
2106
  return t.next = 2, this._networkClient.fetchSDK({
@@ -2146,8 +2119,8 @@ var Xe = Promise.resolve({
2146
2119
  }
2147
2120
  }, this.oidc = {
2148
2121
  createConnection: function createConnection(e) {
2149
- return Ce(a, void 0, void 0, fe().mark(function t() {
2150
- return fe().wrap(function (t) {
2122
+ return Se(a, void 0, void 0, me().mark(function t() {
2123
+ return me().wrap(function (t) {
2151
2124
  for (;;) switch (t.prev = t.next) {
2152
2125
  case 0:
2153
2126
  return t.next = 2, this._networkClient.fetchSDK({
@@ -2166,8 +2139,8 @@ var Xe = Promise.resolve({
2166
2139
  }));
2167
2140
  },
2168
2141
  updateConnection: function updateConnection(e) {
2169
- return Ce(a, void 0, void 0, fe().mark(function t() {
2170
- return fe().wrap(function (t) {
2142
+ return Se(a, void 0, void 0, me().mark(function t() {
2143
+ return me().wrap(function (t) {
2171
2144
  for (;;) switch (t.prev = t.next) {
2172
2145
  case 0:
2173
2146
  return t.next = 2, this._networkClient.fetchSDK({
@@ -2187,17 +2160,17 @@ var Xe = Promise.resolve({
2187
2160
  }
2188
2161
  };
2189
2162
  }
2190
- return _e(e, [{
2163
+ return ge(e, [{
2191
2164
  key: "authenticate",
2192
2165
  value: function value(e) {
2193
- return Ce(this, void 0, void 0, fe().mark(function t() {
2166
+ return Se(this, void 0, void 0, me().mark(function t() {
2194
2167
  var n, r, o, i, a;
2195
- return fe().wrap(function (t) {
2168
+ return me().wrap(function (t) {
2196
2169
  for (;;) switch (t.prev = t.next) {
2197
2170
  case 0:
2198
- return We("stytch.sso.authenticate").isString("sso_token", e.sso_token).isNumber("session_duration_minutes", e.session_duration_minutes).isOptionalString("locale", e.locale), t.next = 3, this._pkceManager.getPKPair();
2171
+ return qe("stytch.sso.authenticate").isString("sso_token", e.sso_token).isNumber("session_duration_minutes", e.session_duration_minutes).isOptionalString("locale", e.locale), t.next = 3, this._pkceManager.getPKPair();
2199
2172
  case 3:
2200
- return (n = t.sent) || $e("No code verifier found in local storage for SSO flow.\nConsider using stytch.sso.start() to add PKCE to your SSO flows for added security.\nSee https://stytch.com/docs/oauth#guides_pkce for more information."), t.next = 7, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
2173
+ return (n = t.sent) || Qe("No code verifier found in local storage for SSO flow.\nConsider using stytch.sso.start() to add PKCE to your SSO flows for added security.\nSee https://stytch.com/docs/oauth#guides_pkce for more information."), t.next = 7, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
2201
2174
  case 7:
2202
2175
  return r = t.sent, o = r.dfp_telemetry_id, i = r.captcha_token, t.t0 = this._networkClient, t.t1 = Object, t.t2 = Object.assign({
2203
2176
  pkce_code_verifier: null == n ? void 0 : n.code_verifier
@@ -2246,11 +2219,11 @@ var Xe = Promise.resolve({
2246
2219
  }, {
2247
2220
  key: "getBaseApiUrl",
2248
2221
  value: function value() {
2249
- return Ce(this, void 0, void 0, fe().mark(function e() {
2250
- return fe().wrap(function (e) {
2222
+ return Se(this, void 0, void 0, me().mark(function e() {
2223
+ return me().wrap(function (e) {
2251
2224
  for (;;) switch (e.prev = e.next) {
2252
2225
  case 0:
2253
- if (!qe(this._config.publicToken)) {
2226
+ if (!Ve(this._config.publicToken)) {
2254
2227
  e.next = 2;
2255
2228
  break;
2256
2229
  }
@@ -2270,9 +2243,9 @@ var Xe = Promise.resolve({
2270
2243
  var t = e.connection_id,
2271
2244
  n = e.login_redirect_url,
2272
2245
  r = e.signup_redirect_url;
2273
- return Ce(this, void 0, void 0, fe().mark(function e() {
2246
+ return Se(this, void 0, void 0, me().mark(function e() {
2274
2247
  var o, i, a, s, c;
2275
- return fe().wrap(function (e) {
2248
+ return me().wrap(function (e) {
2276
2249
  for (;;) switch (e.prev = e.next) {
2277
2250
  case 0:
2278
2251
  return e.next = 2, this._dynamicConfig;
@@ -2301,8 +2274,8 @@ var Xe = Promise.resolve({
2301
2274
  }, {
2302
2275
  key: "getConnections",
2303
2276
  value: function value() {
2304
- return Ce(this, void 0, void 0, fe().mark(function e() {
2305
- return fe().wrap(function (e) {
2277
+ return Se(this, void 0, void 0, me().mark(function e() {
2278
+ return me().wrap(function (e) {
2306
2279
  for (;;) switch (e.prev = e.next) {
2307
2280
  case 0:
2308
2281
  return e.next = 2, this._networkClient.fetchSDK({
@@ -2322,8 +2295,8 @@ var Xe = Promise.resolve({
2322
2295
  }, {
2323
2296
  key: "deleteConnection",
2324
2297
  value: function value(e) {
2325
- return Ce(this, void 0, void 0, fe().mark(function t() {
2326
- return fe().wrap(function (t) {
2298
+ return Se(this, void 0, void 0, me().mark(function t() {
2299
+ return me().wrap(function (t) {
2327
2300
  for (;;) switch (t.prev = t.next) {
2328
2301
  case 0:
2329
2302
  return t.abrupt("return", this._networkClient.fetchSDK({
@@ -2340,12 +2313,12 @@ var Xe = Promise.resolve({
2340
2313
  }
2341
2314
  }]), e;
2342
2315
  }(),
2343
- rt = _e(function e(t, n) {
2316
+ nt = ge(function e(t, n) {
2344
2317
  var r = this;
2345
- ve(this, e), this._networkClient = t, this._subscriptionService = n, this.get = function () {
2346
- return Ce(r, void 0, void 0, fe().mark(function e() {
2318
+ Ae(this, e), this._networkClient = t, this._subscriptionService = n, this.get = function () {
2319
+ return Se(r, void 0, void 0, me().mark(function e() {
2347
2320
  var t;
2348
- return fe().wrap(function (e) {
2321
+ return me().wrap(function (e) {
2349
2322
  for (;;) switch (e.prev = e.next) {
2350
2323
  case 0:
2351
2324
  return e.next = 2, this._networkClient.fetchSDK({
@@ -2363,15 +2336,20 @@ var Xe = Promise.resolve({
2363
2336
  }));
2364
2337
  }, this.getSync = function () {
2365
2338
  return r._subscriptionService.getOrganization();
2339
+ }, this.getInfo = function () {
2340
+ return {
2341
+ organization: r.getSync(),
2342
+ fromCache: r._subscriptionService.getFromCache()
2343
+ };
2366
2344
  }, this.onChange = function (e) {
2367
2345
  return r._subscriptionService.subscribeToState(function (t) {
2368
2346
  var n;
2369
2347
  return e(null !== (n = null == t ? void 0 : t.organization) && void 0 !== n ? n : null);
2370
2348
  });
2371
2349
  }, this.update = function (e) {
2372
- return Ce(r, void 0, void 0, fe().mark(function t() {
2350
+ return Se(r, void 0, void 0, me().mark(function t() {
2373
2351
  var n;
2374
- return fe().wrap(function (t) {
2352
+ return me().wrap(function (t) {
2375
2353
  for (;;) switch (t.prev = t.next) {
2376
2354
  case 0:
2377
2355
  return t.next = 2, this._networkClient.fetchSDK({
@@ -2389,9 +2367,9 @@ var Xe = Promise.resolve({
2389
2367
  }, t, this);
2390
2368
  }));
2391
2369
  }, this["delete"] = function () {
2392
- return Ce(r, void 0, void 0, fe().mark(function e() {
2370
+ return Se(r, void 0, void 0, me().mark(function e() {
2393
2371
  var t;
2394
- return fe().wrap(function (e) {
2372
+ return me().wrap(function (e) {
2395
2373
  for (;;) switch (e.prev = e.next) {
2396
2374
  case 0:
2397
2375
  return e.next = 2, this._networkClient.fetchSDK({
@@ -2409,8 +2387,8 @@ var Xe = Promise.resolve({
2409
2387
  }));
2410
2388
  }, this.members = {
2411
2389
  create: function create(e) {
2412
- return Ce(r, void 0, void 0, fe().mark(function t() {
2413
- return fe().wrap(function (t) {
2390
+ return Se(r, void 0, void 0, me().mark(function t() {
2391
+ return me().wrap(function (t) {
2414
2392
  for (;;) switch (t.prev = t.next) {
2415
2393
  case 0:
2416
2394
  return t.abrupt("return", this._networkClient.fetchSDK({
@@ -2427,8 +2405,8 @@ var Xe = Promise.resolve({
2427
2405
  }));
2428
2406
  },
2429
2407
  search: function search(e) {
2430
- return Ce(r, void 0, void 0, fe().mark(function t() {
2431
- return fe().wrap(function (t) {
2408
+ return Se(r, void 0, void 0, me().mark(function t() {
2409
+ return me().wrap(function (t) {
2432
2410
  for (;;) switch (t.prev = t.next) {
2433
2411
  case 0:
2434
2412
  return t.abrupt("return", this._networkClient.fetchSDK({
@@ -2445,8 +2423,8 @@ var Xe = Promise.resolve({
2445
2423
  }));
2446
2424
  },
2447
2425
  update: function update(e) {
2448
- return Ce(r, void 0, void 0, fe().mark(function t() {
2449
- return fe().wrap(function (t) {
2426
+ return Se(r, void 0, void 0, me().mark(function t() {
2427
+ return me().wrap(function (t) {
2450
2428
  for (;;) switch (t.prev = t.next) {
2451
2429
  case 0:
2452
2430
  return t.abrupt("return", this._networkClient.fetchSDK({
@@ -2463,8 +2441,8 @@ var Xe = Promise.resolve({
2463
2441
  }));
2464
2442
  },
2465
2443
  deletePassword: function deletePassword(e) {
2466
- return Ce(r, void 0, void 0, fe().mark(function t() {
2467
- return fe().wrap(function (t) {
2444
+ return Se(r, void 0, void 0, me().mark(function t() {
2445
+ return me().wrap(function (t) {
2468
2446
  for (;;) switch (t.prev = t.next) {
2469
2447
  case 0:
2470
2448
  return t.abrupt("return", this._networkClient.fetchSDK({
@@ -2480,8 +2458,8 @@ var Xe = Promise.resolve({
2480
2458
  }));
2481
2459
  },
2482
2460
  deleteMFAPhoneNumber: function deleteMFAPhoneNumber(e) {
2483
- return Ce(r, void 0, void 0, fe().mark(function t() {
2484
- return fe().wrap(function (t) {
2461
+ return Se(r, void 0, void 0, me().mark(function t() {
2462
+ return me().wrap(function (t) {
2485
2463
  for (;;) switch (t.prev = t.next) {
2486
2464
  case 0:
2487
2465
  return t.abrupt("return", this._networkClient.fetchSDK({
@@ -2497,8 +2475,8 @@ var Xe = Promise.resolve({
2497
2475
  }));
2498
2476
  },
2499
2477
  deleteMFATOTP: function deleteMFATOTP(e) {
2500
- return Ce(r, void 0, void 0, fe().mark(function t() {
2501
- return fe().wrap(function (t) {
2478
+ return Se(r, void 0, void 0, me().mark(function t() {
2479
+ return me().wrap(function (t) {
2502
2480
  for (;;) switch (t.prev = t.next) {
2503
2481
  case 0:
2504
2482
  return t.abrupt("return", this._networkClient.fetchSDK({
@@ -2514,8 +2492,8 @@ var Xe = Promise.resolve({
2514
2492
  }));
2515
2493
  },
2516
2494
  "delete": function _delete(e) {
2517
- return Ce(r, void 0, void 0, fe().mark(function t() {
2518
- return fe().wrap(function (t) {
2495
+ return Se(r, void 0, void 0, me().mark(function t() {
2496
+ return me().wrap(function (t) {
2519
2497
  for (;;) switch (t.prev = t.next) {
2520
2498
  case 0:
2521
2499
  return t.abrupt("return", this._networkClient.fetchSDK({
@@ -2531,8 +2509,8 @@ var Xe = Promise.resolve({
2531
2509
  }));
2532
2510
  },
2533
2511
  reactivate: function reactivate(e) {
2534
- return Ce(r, void 0, void 0, fe().mark(function t() {
2535
- return fe().wrap(function (t) {
2512
+ return Se(r, void 0, void 0, me().mark(function t() {
2513
+ return me().wrap(function (t) {
2536
2514
  for (;;) switch (t.prev = t.next) {
2537
2515
  case 0:
2538
2516
  return t.abrupt("return", this._networkClient.fetchSDK({
@@ -2549,18 +2527,18 @@ var Xe = Promise.resolve({
2549
2527
  }
2550
2528
  };
2551
2529
  }),
2552
- ot = function () {
2530
+ rt = function () {
2553
2531
  function e(t, n, r, o, i) {
2554
2532
  var a = this,
2555
- s = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : Je();
2556
- ve(this, e), this._networkClient = t, this._subscriptionService = n, this._pkceManager = r, this._dynamicConfig = o, this._config = i, this.dfpProtectedAuth = s, this.discovery = {
2533
+ s = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : Ge();
2534
+ Ae(this, e), this._networkClient = t, this._subscriptionService = n, this._pkceManager = r, this._dynamicConfig = o, this._config = i, this.dfpProtectedAuth = s, this.discovery = {
2557
2535
  authenticate: function authenticate(e) {
2558
- return Ce(a, void 0, void 0, fe().mark(function t() {
2536
+ return Se(a, void 0, void 0, me().mark(function t() {
2559
2537
  var n, r, o, i, a, s;
2560
- return fe().wrap(function (t) {
2538
+ return me().wrap(function (t) {
2561
2539
  for (;;) switch (t.prev = t.next) {
2562
2540
  case 0:
2563
- return We("stytch.oauth.discovery.authenticate").isString("discovery_oauth_token", e.discovery_oauth_token), t.next = 3, this._pkceManager.getPKPair();
2541
+ return qe("stytch.oauth.discovery.authenticate").isString("discovery_oauth_token", e.discovery_oauth_token), t.next = 3, this._pkceManager.getPKPair();
2564
2542
  case 3:
2565
2543
  return n = t.sent, t.next = 6, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
2566
2544
  case 6:
@@ -2601,17 +2579,17 @@ var Xe = Promise.resolve({
2601
2579
  }
2602
2580
  };
2603
2581
  }
2604
- return _e(e, [{
2582
+ return ge(e, [{
2605
2583
  key: "authenticate",
2606
2584
  value: function value(e) {
2607
- return Ce(this, void 0, void 0, fe().mark(function t() {
2585
+ return Se(this, void 0, void 0, me().mark(function t() {
2608
2586
  var n, r, o, i, a;
2609
- return fe().wrap(function (t) {
2587
+ return me().wrap(function (t) {
2610
2588
  for (;;) switch (t.prev = t.next) {
2611
2589
  case 0:
2612
- return We("stytch.oauth.authenticate").isString("oauth_token", e.oauth_token).isNumber("session_duration_minutes", e.session_duration_minutes).isOptionalString("locale", e.locale), t.next = 3, this._pkceManager.getPKPair();
2590
+ return qe("stytch.oauth.authenticate").isString("oauth_token", e.oauth_token).isNumber("session_duration_minutes", e.session_duration_minutes).isOptionalString("locale", e.locale), t.next = 3, this._pkceManager.getPKPair();
2613
2591
  case 3:
2614
- return (n = t.sent) || $e("No code verifier found in local storage for OAuth flow.\nConsider using stytch.oauth.$provider.start() to add PKCE to your OAuth flows for added security.\nSee https://stytch.com/docs/oauth#guides_pkce for more information."), t.next = 7, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
2592
+ return (n = t.sent) || Qe("No code verifier found in local storage for OAuth flow.\nConsider using stytch.oauth.$provider.start() to add PKCE to your OAuth flows for added security.\nSee https://stytch.com/docs/oauth#guides_pkce for more information."), t.next = 7, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
2615
2593
  case 7:
2616
2594
  return r = t.sent, o = r.dfp_telemetry_id, i = r.captcha_token, t.t0 = this._networkClient, t.t1 = Object, t.t2 = null == n ? void 0 : n.code_verifier, t.t3 = o, t.t4 = i, t.next = 17, this._subscriptionService.getIntermediateSessionToken();
2617
2595
  case 17:
@@ -2659,9 +2637,9 @@ var Xe = Promise.resolve({
2659
2637
  }, {
2660
2638
  key: "getBaseApiUrl",
2661
2639
  value: function value() {
2662
- return Ce(this, void 0, void 0, fe().mark(function e() {
2640
+ return Se(this, void 0, void 0, me().mark(function e() {
2663
2641
  var t, n;
2664
- return fe().wrap(function (e) {
2642
+ return me().wrap(function (e) {
2665
2643
  for (;;) switch (e.prev = e.next) {
2666
2644
  case 0:
2667
2645
  return e.next = 2, this._dynamicConfig;
@@ -2672,7 +2650,7 @@ var Xe = Promise.resolve({
2672
2650
  }
2673
2651
  return e.abrupt("return", "https://".concat(n));
2674
2652
  case 6:
2675
- if (!qe(this._config.publicToken)) {
2653
+ if (!Ve(this._config.publicToken)) {
2676
2654
  e.next = 8;
2677
2655
  break;
2678
2656
  }
@@ -2697,16 +2675,16 @@ var Xe = Promise.resolve({
2697
2675
  a = n.signup_redirect_url,
2698
2676
  s = n.custom_scopes,
2699
2677
  c = n.provider_params;
2700
- return Ce(t, void 0, void 0, fe().mark(function t() {
2678
+ return Se(t, void 0, void 0, me().mark(function t() {
2701
2679
  var n, l, u, d, p, h;
2702
- return fe().wrap(function (t) {
2680
+ return me().wrap(function (t) {
2703
2681
  for (;;) switch (t.prev = t.next) {
2704
2682
  case 0:
2705
2683
  return t.next = 2, this._dynamicConfig;
2706
2684
  case 2:
2707
2685
  return n = t.sent, l = n.pkceRequiredForOAuth, t.next = 6, this.getBaseApiUrl();
2708
2686
  case 6:
2709
- if (u = t.sent, (d = new URL("".concat(u, "/v1/b2b/public/oauth/").concat(e, "/start"))).searchParams.set("public_token", this._config.publicToken), r && "" != r && d.searchParams.set("organization_id", r), o && "" != o && d.searchParams.set("slug", o), s && (We("startOAuthFlow").isStringArray("custom_scopes", s), d.searchParams.set("custom_scopes", s.join(" "))), c) for (p in We("startOAuthFlow").isOptionalObject("provider_params", c), c) d.searchParams.set("provider_" + p, c[p]);
2687
+ if (u = t.sent, (d = new URL("".concat(u, "/v1/b2b/public/oauth/").concat(e, "/start"))).searchParams.set("public_token", this._config.publicToken), r && "" != r && d.searchParams.set("organization_id", r), o && "" != o && d.searchParams.set("slug", o), s && (qe("startOAuthFlow").isStringArray("custom_scopes", s), d.searchParams.set("custom_scopes", s.join(" "))), c) for (p in qe("startOAuthFlow").isOptionalObject("provider_params", c), c) d.searchParams.set("provider_" + p, c[p]);
2710
2688
  if (!l) {
2711
2689
  t.next = 20;
2712
2690
  break;
@@ -2735,16 +2713,16 @@ var Xe = Promise.resolve({
2735
2713
  var r = n.discovery_redirect_url,
2736
2714
  o = n.custom_scopes,
2737
2715
  i = n.provider_params;
2738
- return Ce(t, void 0, void 0, fe().mark(function t() {
2716
+ return Se(t, void 0, void 0, me().mark(function t() {
2739
2717
  var n, a, s, c, l, u;
2740
- return fe().wrap(function (t) {
2718
+ return me().wrap(function (t) {
2741
2719
  for (;;) switch (t.prev = t.next) {
2742
2720
  case 0:
2743
2721
  return t.next = 2, this._dynamicConfig;
2744
2722
  case 2:
2745
2723
  return n = t.sent, a = n.pkceRequiredForOAuth, t.next = 6, this.getBaseApiUrl();
2746
2724
  case 6:
2747
- if (s = t.sent, (c = new URL("".concat(s, "/v1/b2b/public/oauth/").concat(e, "/discovery/start"))).searchParams.set("public_token", this._config.publicToken), o && (We("startOAuthFlow").isStringArray("custom_scopes", o), c.searchParams.set("custom_scopes", o.join(" "))), i) for (l in We("startOAuthFlow").isOptionalObject("provider_params", i), i) c.searchParams.set("provider_" + l, i[l]);
2725
+ if (s = t.sent, (c = new URL("".concat(s, "/v1/b2b/public/oauth/").concat(e, "/discovery/start"))).searchParams.set("public_token", this._config.publicToken), o && (qe("startOAuthFlow").isStringArray("custom_scopes", o), c.searchParams.set("custom_scopes", o.join(" "))), i) for (l in qe("startOAuthFlow").isOptionalObject("provider_params", i), i) c.searchParams.set("provider_" + l, i[l]);
2748
2726
  if (!a) {
2749
2727
  t.next = 18;
2750
2728
  break;
@@ -2767,20 +2745,25 @@ var Xe = Promise.resolve({
2767
2745
  }
2768
2746
  }]), e;
2769
2747
  }(),
2770
- it = function () {
2748
+ ot = function () {
2771
2749
  function e(t, n) {
2772
2750
  var r = this;
2773
- ve(this, e), this._networkClient = t, this._subscriptionService = n, this.getSync = function () {
2751
+ Ae(this, e), this._networkClient = t, this._subscriptionService = n, this.getSync = function () {
2774
2752
  return r._subscriptionService.getSession();
2753
+ }, this.getInfo = function () {
2754
+ return {
2755
+ session: r.getSync(),
2756
+ fromCache: r._subscriptionService.getFromCache()
2757
+ };
2775
2758
  }, this.onChange = function (e) {
2776
2759
  return r._subscriptionService.subscribeToState(function (t) {
2777
2760
  var n;
2778
2761
  return e(null !== (n = null == t ? void 0 : t.session) && void 0 !== n ? n : null);
2779
2762
  });
2780
2763
  }, this.revoke = function (e) {
2781
- return Ce(r, void 0, void 0, fe().mark(function t() {
2764
+ return Se(r, void 0, void 0, me().mark(function t() {
2782
2765
  var n;
2783
- return fe().wrap(function (t) {
2766
+ return me().wrap(function (t) {
2784
2767
  for (;;) switch (t.prev = t.next) {
2785
2768
  case 0:
2786
2769
  return t.prev = 0, t.next = 3, this._networkClient.fetchSDK({
@@ -2799,13 +2782,13 @@ var Xe = Promise.resolve({
2799
2782
  }, t, this, [[0, 8]]);
2800
2783
  }));
2801
2784
  }, this.authenticate = function (e) {
2802
- return Ce(r, void 0, void 0, fe().mark(function t() {
2785
+ return Se(r, void 0, void 0, me().mark(function t() {
2803
2786
  var n,
2804
2787
  r,
2805
2788
  o,
2806
2789
  i,
2807
2790
  a = this;
2808
- return fe().wrap(function (t) {
2791
+ return me().wrap(function (t) {
2809
2792
  for (;;) switch (t.prev = t.next) {
2810
2793
  case 0:
2811
2794
  return n = this._subscriptionService.getSession(), r = function r() {
@@ -2851,12 +2834,12 @@ var Xe = Promise.resolve({
2851
2834
  }, t, this, [[2, 13]]);
2852
2835
  }));
2853
2836
  }, this.exchange = function (e) {
2854
- return Ce(r, void 0, void 0, fe().mark(function t() {
2837
+ return Se(r, void 0, void 0, me().mark(function t() {
2855
2838
  var n;
2856
- return fe().wrap(function (t) {
2839
+ return me().wrap(function (t) {
2857
2840
  for (;;) switch (t.prev = t.next) {
2858
2841
  case 0:
2859
- return We("stytch.sessions.exchange").isString("organization_id", e.organization_id).isNumber("session_duration_minutes", e.session_duration_minutes).isOptionalString("locale", e.locale), t.prev = 1, t.next = 4, this._networkClient.fetchSDK({
2842
+ return qe("stytch.sessions.exchange").isString("organization_id", e.organization_id).isNumber("session_duration_minutes", e.session_duration_minutes).isOptionalString("locale", e.locale), t.prev = 1, t.next = 4, this._networkClient.fetchSDK({
2860
2843
  url: "/b2b/sessions/exchange",
2861
2844
  body: e,
2862
2845
  errorMessage: "Failed to exchange session",
@@ -2888,7 +2871,7 @@ var Xe = Promise.resolve({
2888
2871
  }));
2889
2872
  };
2890
2873
  }
2891
- return _e(e, [{
2874
+ return ge(e, [{
2892
2875
  key: "getTokens",
2893
2876
  value: function value() {
2894
2877
  return this._subscriptionService.getTokens();
@@ -2900,12 +2883,12 @@ var Xe = Promise.resolve({
2900
2883
  }
2901
2884
  }]), e;
2902
2885
  }(),
2903
- at = _e(function e(t, n) {
2886
+ it = ge(function e(t, n) {
2904
2887
  var r = this;
2905
- ve(this, e), this._networkClient = t, this._subscriptionService = n, this.organizations = {
2888
+ Ae(this, e), this._networkClient = t, this._subscriptionService = n, this.organizations = {
2906
2889
  list: function list() {
2907
- return Ce(r, void 0, void 0, fe().mark(function e() {
2908
- return fe().wrap(function (e) {
2890
+ return Se(r, void 0, void 0, me().mark(function e() {
2891
+ return me().wrap(function (e) {
2909
2892
  for (;;) switch (e.prev = e.next) {
2910
2893
  case 0:
2911
2894
  return e.t0 = this._networkClient, e.next = 3, this._subscriptionService.getIntermediateSessionToken();
@@ -2932,12 +2915,12 @@ var Xe = Promise.resolve({
2932
2915
  }));
2933
2916
  },
2934
2917
  create: function create(e) {
2935
- return Ce(r, void 0, void 0, fe().mark(function t() {
2918
+ return Se(r, void 0, void 0, me().mark(function t() {
2936
2919
  var n, r;
2937
- return fe().wrap(function (t) {
2920
+ return me().wrap(function (t) {
2938
2921
  for (;;) switch (t.prev = t.next) {
2939
2922
  case 0:
2940
- return We("stytch.discovery.organizations.create").isNumber("session_duration_minutes", e.session_duration_minutes).isOptionalString("organization_name", e.organization_name).isOptionalString("organization_slug", e.organization_slug).isOptionalString("organization_logo_url", e.organization_logo_url).isOptionalString("sso_jit_provisioning", e.sso_jit_provisioning).isOptionalStringArray("email_allowed_domains", e.email_allowed_domains).isOptionalString("email_invites", e.email_invites).isOptionalString("auth_methods", e.auth_methods).isOptionalStringArray("allowed_auth_methods", e.allowed_auth_methods).isOptionalString("mfa_policy", e.mfa_policy), t.t0 = Object, t.t1 = Object.assign({}, e), t.next = 5, this._subscriptionService.getIntermediateSessionToken();
2923
+ return qe("stytch.discovery.organizations.create").isNumber("session_duration_minutes", e.session_duration_minutes).isOptionalString("organization_name", e.organization_name).isOptionalString("organization_slug", e.organization_slug).isOptionalString("organization_logo_url", e.organization_logo_url).isOptionalString("sso_jit_provisioning", e.sso_jit_provisioning).isOptionalStringArray("email_allowed_domains", e.email_allowed_domains).isOptionalString("email_invites", e.email_invites).isOptionalString("auth_methods", e.auth_methods).isOptionalStringArray("allowed_auth_methods", e.allowed_auth_methods).isOptionalString("mfa_policy", e.mfa_policy), t.t0 = Object, t.t1 = Object.assign({}, e), t.next = 5, this._subscriptionService.getIntermediateSessionToken();
2941
2924
  case 5:
2942
2925
  if (t.t2 = t.sent, t.t2) {
2943
2926
  t.next = 8;
@@ -2978,12 +2961,12 @@ var Xe = Promise.resolve({
2978
2961
  }
2979
2962
  }, this.intermediateSessions = {
2980
2963
  exchange: function exchange(e) {
2981
- return Ce(r, void 0, void 0, fe().mark(function t() {
2964
+ return Se(r, void 0, void 0, me().mark(function t() {
2982
2965
  var n, r;
2983
- return fe().wrap(function (t) {
2966
+ return me().wrap(function (t) {
2984
2967
  for (;;) switch (t.prev = t.next) {
2985
2968
  case 0:
2986
- return We("stytch.discovery.intermediateSessions.exchange").isString("organization_id", e.organization_id).isNumber("session_duration_minutes", e.session_duration_minutes).isOptionalString("locale", e.locale), t.t0 = Object, t.t1 = Object.assign({}, e), t.next = 5, this._subscriptionService.getIntermediateSessionToken();
2969
+ return qe("stytch.discovery.intermediateSessions.exchange").isString("organization_id", e.organization_id).isNumber("session_duration_minutes", e.session_duration_minutes).isOptionalString("locale", e.locale), t.t0 = Object, t.t1 = Object.assign({}, e), t.next = 5, this._subscriptionService.getIntermediateSessionToken();
2987
2970
  case 5:
2988
2971
  if (t.t2 = t.sent, t.t2) {
2989
2972
  t.next = 8;
@@ -3024,21 +3007,21 @@ var Xe = Promise.resolve({
3024
3007
  }
3025
3008
  };
3026
3009
  }),
3027
- st = Promise.resolve({
3010
+ at = Promise.resolve({
3028
3011
  pkceRequiredForPasswordResets: !1
3029
3012
  }),
3030
- ct = function () {
3013
+ st = function () {
3031
3014
  function e(t, n, r) {
3032
- var o = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : st,
3033
- i = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : Je();
3034
- ve(this, e), this._networkClient = t, this._subscriptionService = n, this._pkceManager = r, this._config = o, this.dfpProtectedAuth = i;
3015
+ var o = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : at,
3016
+ i = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : Ge();
3017
+ Ae(this, e), this._networkClient = t, this._subscriptionService = n, this._pkceManager = r, this._config = o, this.dfpProtectedAuth = i;
3035
3018
  }
3036
- return _e(e, [{
3019
+ return ge(e, [{
3037
3020
  key: "getCodeChallenge",
3038
3021
  value: function value() {
3039
- return Ce(this, void 0, void 0, fe().mark(function e() {
3022
+ return Se(this, void 0, void 0, me().mark(function e() {
3040
3023
  var t, n;
3041
- return fe().wrap(function (e) {
3024
+ return me().wrap(function (e) {
3042
3025
  for (;;) switch (e.prev = e.next) {
3043
3026
  case 0:
3044
3027
  return e.next = 2, this._config;
@@ -3070,12 +3053,12 @@ var Xe = Promise.resolve({
3070
3053
  }, {
3071
3054
  key: "authenticate",
3072
3055
  value: function value(e) {
3073
- return Ce(this, void 0, void 0, fe().mark(function t() {
3056
+ return Se(this, void 0, void 0, me().mark(function t() {
3074
3057
  var n, r, o, i, a, s;
3075
- return fe().wrap(function (t) {
3058
+ return me().wrap(function (t) {
3076
3059
  for (;;) switch (t.prev = t.next) {
3077
3060
  case 0:
3078
- return We("stytch.passwords.authenticate").isString("org_id", e.organization_id).isString("password", e.password).isString("email_address", e.email_address).isNumber("session_duration_minutes", e.session_duration_minutes).isOptionalString("locale", e.locale), t.next = 3, this._pkceManager.getPKPair();
3061
+ return qe("stytch.passwords.authenticate").isString("org_id", e.organization_id).isString("password", e.password).isString("email_address", e.email_address).isNumber("session_duration_minutes", e.session_duration_minutes).isOptionalString("locale", e.locale), t.next = 3, this._pkceManager.getPKPair();
3079
3062
  case 3:
3080
3063
  return n = t.sent, r = null == n ? void 0 : n.code_verifier, t.next = 7, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
3081
3064
  case 7:
@@ -3130,12 +3113,12 @@ var Xe = Promise.resolve({
3130
3113
  }, {
3131
3114
  key: "resetByEmailStart",
3132
3115
  value: function value(e) {
3133
- return Ce(this, void 0, void 0, fe().mark(function t() {
3116
+ return Se(this, void 0, void 0, me().mark(function t() {
3134
3117
  var n, r, o, i;
3135
- return fe().wrap(function (t) {
3118
+ return me().wrap(function (t) {
3136
3119
  for (;;) switch (t.prev = t.next) {
3137
3120
  case 0:
3138
- return We("stytch.passwords.resetByEmailStart").isString("email", e.email_address).isOptionalString("login_redirect_url", e.login_redirect_url).isOptionalString("reset_password_redirect_url", e.reset_password_redirect_url).isOptionalString("reset_password_template_id", e.reset_password_template_id).isOptionalNumber("reset_password_expiration_minutes", e.reset_password_expiration_minutes), t.next = 3, this.getCodeChallenge();
3121
+ return qe("stytch.passwords.resetByEmailStart").isString("email", e.email_address).isOptionalString("login_redirect_url", e.login_redirect_url).isOptionalString("reset_password_redirect_url", e.reset_password_redirect_url).isOptionalString("reset_password_template_id", e.reset_password_template_id).isOptionalNumber("reset_password_expiration_minutes", e.reset_password_expiration_minutes), t.next = 3, this.getCodeChallenge();
3139
3122
  case 3:
3140
3123
  return n = t.sent, t.next = 6, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
3141
3124
  case 6:
@@ -3166,12 +3149,12 @@ var Xe = Promise.resolve({
3166
3149
  }, {
3167
3150
  key: "resetByEmail",
3168
3151
  value: function value(e) {
3169
- return Ce(this, void 0, void 0, fe().mark(function t() {
3152
+ return Se(this, void 0, void 0, me().mark(function t() {
3170
3153
  var n, r, o, i, a, s;
3171
- return fe().wrap(function (t) {
3154
+ return me().wrap(function (t) {
3172
3155
  for (;;) switch (t.prev = t.next) {
3173
3156
  case 0:
3174
- return We("stytch.passwords.resetByEmail").isString("password_reset_token", e.password_reset_token).isString("password", e.password).isNumber("session_duration_minutes", e.session_duration_minutes).isOptionalString("locale", e.locale), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
3157
+ return qe("stytch.passwords.resetByEmail").isString("password_reset_token", e.password_reset_token).isString("password", e.password).isNumber("session_duration_minutes", e.session_duration_minutes).isOptionalString("locale", e.locale), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
3175
3158
  case 3:
3176
3159
  return n = t.sent, r = n.dfp_telemetry_id, o = n.captcha_token, t.next = 8, this._pkceManager.getPKPair();
3177
3160
  case 8:
@@ -3225,12 +3208,12 @@ var Xe = Promise.resolve({
3225
3208
  }, {
3226
3209
  key: "resetByExistingPassword",
3227
3210
  value: function value(e) {
3228
- return Ce(this, void 0, void 0, fe().mark(function t() {
3211
+ return Se(this, void 0, void 0, me().mark(function t() {
3229
3212
  var n, r, o, i;
3230
- return fe().wrap(function (t) {
3213
+ return me().wrap(function (t) {
3231
3214
  for (;;) switch (t.prev = t.next) {
3232
3215
  case 0:
3233
- return We("stytch.passwords.resetByExistingPassword").isString("email", e.email_address).isString("existing_password", e.existing_password).isString("new_password", e.new_password).isOptionalString("locale", e.locale), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
3216
+ return qe("stytch.passwords.resetByExistingPassword").isString("email", e.email_address).isString("existing_password", e.existing_password).isString("new_password", e.new_password).isOptionalString("locale", e.locale), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
3234
3217
  case 3:
3235
3218
  return n = t.sent, r = n.dfp_telemetry_id, o = n.captcha_token, t.next = 8, this._networkClient.retriableFetchSDK({
3236
3219
  url: "/b2b/passwords/existing_password/reset",
@@ -3274,12 +3257,12 @@ var Xe = Promise.resolve({
3274
3257
  }, {
3275
3258
  key: "resetBySession",
3276
3259
  value: function value(e) {
3277
- return Ce(this, void 0, void 0, fe().mark(function t() {
3260
+ return Se(this, void 0, void 0, me().mark(function t() {
3278
3261
  var n, r, o, i;
3279
- return fe().wrap(function (t) {
3262
+ return me().wrap(function (t) {
3280
3263
  for (;;) switch (t.prev = t.next) {
3281
3264
  case 0:
3282
- return We("stytch.passwords.resetBySession").isString("password", e.password), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
3265
+ return qe("stytch.passwords.resetBySession").isString("password", e.password), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
3283
3266
  case 3:
3284
3267
  return n = t.sent, r = n.dfp_telemetry_id, o = n.captcha_token, t.next = 8, this._networkClient.retriableFetchSDK({
3285
3268
  url: "/b2b/passwords/session/reset",
@@ -3313,11 +3296,11 @@ var Xe = Promise.resolve({
3313
3296
  }, {
3314
3297
  key: "strengthCheck",
3315
3298
  value: function value(e) {
3316
- return Ce(this, void 0, void 0, fe().mark(function t() {
3317
- return fe().wrap(function (t) {
3299
+ return Se(this, void 0, void 0, me().mark(function t() {
3300
+ return me().wrap(function (t) {
3318
3301
  for (;;) switch (t.prev = t.next) {
3319
3302
  case 0:
3320
- return We("stytch.passwords.strengthCheck").isOptionalString("email", e.email_address).isString("password", e.password), t.abrupt("return", this._networkClient.fetchSDK({
3303
+ return qe("stytch.passwords.strengthCheck").isOptionalString("email", e.email_address).isString("password", e.password), t.abrupt("return", this._networkClient.fetchSDK({
3321
3304
  url: "/b2b/passwords/strength_check",
3322
3305
  method: "POST",
3323
3306
  errorMessage: "Failed to check password strength.",
@@ -3335,17 +3318,17 @@ var Xe = Promise.resolve({
3335
3318
  }
3336
3319
  }]), e;
3337
3320
  }(),
3338
- lt = _e(function e(t, n) {
3321
+ ct = ge(function e(t, n) {
3339
3322
  var r = this,
3340
- o = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : Je();
3341
- ve(this, e), this._networkClient = t, this._subscriptionService = n, this.dfpProtectedAuth = o, this.sms = {
3323
+ o = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : Ge();
3324
+ Ae(this, e), this._networkClient = t, this._subscriptionService = n, this.dfpProtectedAuth = o, this.sms = {
3342
3325
  send: function send(e) {
3343
- return Ce(r, void 0, void 0, fe().mark(function t() {
3326
+ return Se(r, void 0, void 0, me().mark(function t() {
3344
3327
  var n, r, o;
3345
- return fe().wrap(function (t) {
3328
+ return me().wrap(function (t) {
3346
3329
  for (;;) switch (t.prev = t.next) {
3347
3330
  case 0:
3348
- return We("stytch.otps.sms.send").isString("organization_id", e.organization_id).isString("member_id", e.member_id).isOptionalString("mfa_phone_number", e.mfa_phone_number).isOptionalString("locale", e.locale), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
3331
+ return qe("stytch.otps.sms.send").isString("organization_id", e.organization_id).isString("member_id", e.member_id).isOptionalString("mfa_phone_number", e.mfa_phone_number).isOptionalString("locale", e.locale), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
3349
3332
  case 3:
3350
3333
  return n = t.sent, r = n.dfp_telemetry_id, o = n.captcha_token, t.t0 = this._networkClient, t.t1 = Object, t.t2 = Object.assign({}, e), t.t3 = r, t.t4 = o, t.next = 13, this._subscriptionService.getIntermediateSessionToken();
3351
3334
  case 13:
@@ -3374,12 +3357,12 @@ var Xe = Promise.resolve({
3374
3357
  }));
3375
3358
  },
3376
3359
  authenticate: function authenticate(e) {
3377
- return Ce(r, void 0, void 0, fe().mark(function t() {
3360
+ return Se(r, void 0, void 0, me().mark(function t() {
3378
3361
  var n, r, o, i, a;
3379
- return fe().wrap(function (t) {
3362
+ return me().wrap(function (t) {
3380
3363
  for (;;) switch (t.prev = t.next) {
3381
3364
  case 0:
3382
- return We("stytch.otps.sms.authenticate").isString("organization_id", e.organization_id).isString("member_id", e.member_id).isString("code", e.code).isOptionalString("set_mfa_enrollment", e.set_mfa_enrollment), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
3365
+ return qe("stytch.otps.sms.authenticate").isString("organization_id", e.organization_id).isString("member_id", e.member_id).isString("code", e.code).isOptionalString("set_mfa_enrollment", e.set_mfa_enrollment), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
3383
3366
  case 3:
3384
3367
  return n = t.sent, r = n.dfp_telemetry_id, o = n.captcha_token, t.t0 = Object, t.t1 = Object.assign({}, e), t.t2 = r, t.t3 = o, t.next = 12, this._subscriptionService.getIntermediateSessionToken();
3385
3368
  case 12:
@@ -3420,20 +3403,20 @@ var Xe = Promise.resolve({
3420
3403
  }
3421
3404
  };
3422
3405
  }),
3423
- ut = function () {
3406
+ lt = function () {
3424
3407
  function e(t, n) {
3425
- var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : Je();
3426
- ve(this, e), this._networkClient = t, this._subscriptionService = n, this.dfpProtectedAuth = r;
3408
+ var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : Ge();
3409
+ Ae(this, e), this._networkClient = t, this._subscriptionService = n, this.dfpProtectedAuth = r;
3427
3410
  }
3428
- return _e(e, [{
3411
+ return ge(e, [{
3429
3412
  key: "create",
3430
3413
  value: function value(e) {
3431
- return Ce(this, void 0, void 0, fe().mark(function t() {
3414
+ return Se(this, void 0, void 0, me().mark(function t() {
3432
3415
  var n, r, o;
3433
- return fe().wrap(function (t) {
3416
+ return me().wrap(function (t) {
3434
3417
  for (;;) switch (t.prev = t.next) {
3435
3418
  case 0:
3436
- return We("stytch.totp.create").isString("organization_id", e.organization_id).isString("member_id", e.member_id).isOptionalNumber("expiration_minutes", e.expiration_minutes), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
3419
+ return qe("stytch.totp.create").isString("organization_id", e.organization_id).isString("member_id", e.member_id).isOptionalNumber("expiration_minutes", e.expiration_minutes), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
3437
3420
  case 3:
3438
3421
  return n = t.sent, r = n.dfp_telemetry_id, o = n.captcha_token, t.t0 = this._networkClient, t.t1 = Object, t.t2 = Object.assign({}, e), t.t3 = r, t.t4 = o, t.next = 13, this._subscriptionService.getIntermediateSessionToken();
3439
3422
  case 13:
@@ -3464,12 +3447,12 @@ var Xe = Promise.resolve({
3464
3447
  }, {
3465
3448
  key: "authenticate",
3466
3449
  value: function value(e) {
3467
- return Ce(this, void 0, void 0, fe().mark(function t() {
3450
+ return Se(this, void 0, void 0, me().mark(function t() {
3468
3451
  var n, r, o, i, a;
3469
- return fe().wrap(function (t) {
3452
+ return me().wrap(function (t) {
3470
3453
  for (;;) switch (t.prev = t.next) {
3471
3454
  case 0:
3472
- return We("stytch.totp.authenticate").isString("organization_id", e.organization_id).isString("member_id", e.member_id).isString("code", e.code).isOptionalString("set_mfa_enrollment", e.set_mfa_enrollment).isOptionalBoolean("set_default_mfa", e.set_default_mfa), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
3455
+ return qe("stytch.totp.authenticate").isString("organization_id", e.organization_id).isString("member_id", e.member_id).isString("code", e.code).isOptionalString("set_mfa_enrollment", e.set_mfa_enrollment).isOptionalBoolean("set_default_mfa", e.set_default_mfa), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
3473
3456
  case 3:
3474
3457
  return n = t.sent, r = n.dfp_telemetry_id, o = n.captcha_token, t.t0 = Object, t.t1 = Object.assign({}, e), t.t2 = r, t.t3 = o, t.next = 12, this._subscriptionService.getIntermediateSessionToken();
3475
3458
  case 12:
@@ -3510,20 +3493,20 @@ var Xe = Promise.resolve({
3510
3493
  }
3511
3494
  }]), e;
3512
3495
  }(),
3513
- dt = function () {
3496
+ ut = function () {
3514
3497
  function e(t, n) {
3515
- var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : Je();
3516
- ve(this, e), this._networkClient = t, this._subscriptionService = n, this.dfpProtectedAuth = r;
3498
+ var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : Ge();
3499
+ Ae(this, e), this._networkClient = t, this._subscriptionService = n, this.dfpProtectedAuth = r;
3517
3500
  }
3518
- return _e(e, [{
3501
+ return ge(e, [{
3519
3502
  key: "recover",
3520
3503
  value: function value(e) {
3521
- return Ce(this, void 0, void 0, fe().mark(function t() {
3504
+ return Se(this, void 0, void 0, me().mark(function t() {
3522
3505
  var n, r, o, i, a;
3523
- return fe().wrap(function (t) {
3506
+ return me().wrap(function (t) {
3524
3507
  for (;;) switch (t.prev = t.next) {
3525
3508
  case 0:
3526
- return We("stytch.recoveryCodes.recover").isString("organization_id", e.organization_id).isString("member_id", e.member_id).isString("recovery_code", e.recovery_code), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
3509
+ return qe("stytch.recoveryCodes.recover").isString("organization_id", e.organization_id).isString("member_id", e.member_id).isString("recovery_code", e.recovery_code), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
3527
3510
  case 3:
3528
3511
  return n = t.sent, r = n.dfp_telemetry_id, o = n.captcha_token, t.t0 = Object, t.t1 = Object.assign({}, e), t.t2 = r, t.t3 = o, t.next = 12, this._subscriptionService.getIntermediateSessionToken();
3529
3512
  case 12:
@@ -3565,9 +3548,9 @@ var Xe = Promise.resolve({
3565
3548
  }, {
3566
3549
  key: "rotate",
3567
3550
  value: function value() {
3568
- return Ce(this, void 0, void 0, fe().mark(function e() {
3551
+ return Se(this, void 0, void 0, me().mark(function e() {
3569
3552
  var t, n, r;
3570
- return fe().wrap(function (e) {
3553
+ return me().wrap(function (e) {
3571
3554
  for (;;) switch (e.prev = e.next) {
3572
3555
  case 0:
3573
3556
  return e.next = 2, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
@@ -3592,8 +3575,8 @@ var Xe = Promise.resolve({
3592
3575
  }, {
3593
3576
  key: "get",
3594
3577
  value: function value() {
3595
- return Ce(this, void 0, void 0, fe().mark(function e() {
3596
- return fe().wrap(function (e) {
3578
+ return Se(this, void 0, void 0, me().mark(function e() {
3579
+ return me().wrap(function (e) {
3597
3580
  for (;;) switch (e.prev = e.next) {
3598
3581
  case 0:
3599
3582
  return e.abrupt("return", this._networkClient.fetchSDK({
@@ -3610,10 +3593,10 @@ var Xe = Promise.resolve({
3610
3593
  }
3611
3594
  }]), e;
3612
3595
  }(),
3613
- pt = function () {
3596
+ dt = function () {
3614
3597
  function e(t, n, r) {
3615
3598
  var o = this;
3616
- ve(this, e), this._subscriptionService = r, this.isAuthorizedSync = function (e, t) {
3599
+ Ae(this, e), this._subscriptionService = r, this.isAuthorizedSync = function (e, t) {
3617
3600
  var n;
3618
3601
  return !!(null === (n = o.cachedPolicy) || void 0 === n ? void 0 : n.callerIsAuthorized(o.roleIds(), e, t));
3619
3602
  }, this.isAuthorized = function (e, t) {
@@ -3621,10 +3604,10 @@ var Xe = Promise.resolve({
3621
3604
  return n.callerIsAuthorized(o.roleIds(), e, t);
3622
3605
  });
3623
3606
  }, this.cachedPolicy = t.rbacPolicy ? gt.fromJSON(t.rbacPolicy) : null, this.policyPromise = n.then(function (e) {
3624
- return e.rbacPolicy ? (o.cachedPolicy = gt.fromJSON(e.rbacPolicy), o.cachedPolicy) : (He("Unable to retrieve RBAC policy from servers. Assuming caller has no permissions."), new gt([], []));
3607
+ return e.rbacPolicy ? (o.cachedPolicy = gt.fromJSON(e.rbacPolicy), o.cachedPolicy) : ($e("Unable to retrieve RBAC policy from servers. Assuming caller has no permissions."), new gt([], []));
3625
3608
  });
3626
3609
  }
3627
- return _e(e, [{
3610
+ return ge(e, [{
3628
3611
  key: "allPermissions",
3629
3612
  value: function value() {
3630
3613
  var e = this;
@@ -3641,15 +3624,15 @@ var Xe = Promise.resolve({
3641
3624
  }
3642
3625
  }]), e;
3643
3626
  }(),
3644
- ht = function () {
3627
+ pt = function () {
3645
3628
  function e(t) {
3646
- ve(this, e), this.iframeURL = t, this.createIframe();
3629
+ Ae(this, e), this.iframeURL = t, this.createIframe();
3647
3630
  }
3648
- return _e(e, [{
3631
+ return ge(e, [{
3649
3632
  key: "createIframe",
3650
3633
  value: function value() {
3651
3634
  var e = document.querySelector('[src~="'.concat(this.iframeURL, '"]'));
3652
- e ? $e("It looks like you're creating multiple copies of the Stytch client. This behavior is unsupported, and unintended side effects may occur. Make sure you are creating the Stytch client at the global level, and not inside a component's render function.") : ((e = document.createElement("iframe")).src = this.iframeURL, e.style.position = "absolute", e.style.width = "0", e.style.height = "0", e.style.border = "0", document.body.appendChild(e)), "true" !== e.dataset.loaded ? this.frame = new Promise(function (t) {
3635
+ e ? Qe("It looks like you're creating multiple copies of the Stytch client. This behavior is unsupported, and unintended side effects may occur. Make sure you are creating the Stytch client at the global level, and not inside a component's render function.") : ((e = document.createElement("iframe")).src = this.iframeURL, e.style.position = "absolute", e.style.width = "0", e.style.height = "0", e.style.border = "0", document.body.appendChild(e)), "true" !== e.dataset.loaded ? this.frame = new Promise(function (t) {
3653
3636
  e.addEventListener("load", function () {
3654
3637
  e.dataset.loaded = "true", t(e);
3655
3638
  }, {
@@ -3660,11 +3643,11 @@ var Xe = Promise.resolve({
3660
3643
  }, {
3661
3644
  key: "call",
3662
3645
  value: function value(e, t) {
3663
- return Ce(this, void 0, void 0, fe().mark(function n() {
3646
+ return Se(this, void 0, void 0, me().mark(function n() {
3664
3647
  var r,
3665
3648
  o,
3666
3649
  i = this;
3667
- return fe().wrap(function (n) {
3650
+ return me().wrap(function (n) {
3668
3651
  for (;;) switch (n.prev = n.next) {
3669
3652
  case 0:
3670
3653
  return n.next = 2, this.frame;
@@ -3673,7 +3656,7 @@ var Xe = Promise.resolve({
3673
3656
  var s;
3674
3657
  o.port1.onmessage = function (e) {
3675
3658
  var t = e.data;
3676
- o.port1.close(), t.success ? n(t.payload) : a(Ye.unmarshall(t.error));
3659
+ o.port1.close(), t.success ? n(t.payload) : a(Je.unmarshall(t.error));
3677
3660
  };
3678
3661
  var c = {
3679
3662
  method: e,
@@ -3690,11 +3673,11 @@ var Xe = Promise.resolve({
3690
3673
  }
3691
3674
  }]), e;
3692
3675
  }(),
3693
- mt = function () {
3676
+ ht = function () {
3694
3677
  function e(t, n) {
3695
- ve(this, e), this._networkClient = t, this.dfpProtectedAuth = n;
3678
+ Ae(this, e), this._networkClient = t, this.dfpProtectedAuth = n;
3696
3679
  }
3697
- return _e(e, [{
3680
+ return ge(e, [{
3698
3681
  key: "searchUser",
3699
3682
  value: function value(e) {
3700
3683
  var t = this;
@@ -3740,15 +3723,17 @@ var Xe = Promise.resolve({
3740
3723
  }
3741
3724
  }]), e;
3742
3725
  }(),
3743
- ft = function () {
3726
+ mt = function () {
3744
3727
  function e(t, n) {
3745
3728
  var r = this;
3746
- ve(this, e), this._subscriptionService = t, this._headlessSessionClient = n, this._onDataChange = function (e) {
3747
- (null == e ? void 0 : e.session) ? r.scheduleBackgroundRefresh() : r.cancelBackgroundRefresh();
3729
+ Ae(this, e), this._subscriptionService = t, this._headlessSessionClient = n, this._onDataChange = function (e) {
3730
+ !function (e) {
3731
+ return !!(null == e ? void 0 : e.session);
3732
+ }(e) ? r.cancelBackgroundRefresh() : r.scheduleBackgroundRefresh();
3748
3733
  }, this._reauthenticateWithBackoff = function () {
3749
- return Ce(r, void 0, void 0, fe().mark(function t() {
3734
+ return Se(r, void 0, void 0, me().mark(function t() {
3750
3735
  var n;
3751
- return fe().wrap(function (t) {
3736
+ return me().wrap(function (t) {
3752
3737
  for (;;) switch (t.prev = t.next) {
3753
3738
  case 0:
3754
3739
  n = 0;
@@ -3777,14 +3762,14 @@ var Xe = Promise.resolve({
3777
3762
  }));
3778
3763
  }, this.timeout = null, this._subscriptionService.subscribeToState(this._onDataChange);
3779
3764
  }
3780
- return _e(e, [{
3765
+ return ge(e, [{
3781
3766
  key: "performBackgroundRefresh",
3782
3767
  value: function value() {
3783
3768
  var e = this;
3784
3769
  this._reauthenticateWithBackoff().then(function () {
3785
3770
  e.scheduleBackgroundRefresh();
3786
3771
  })["catch"](function (t) {
3787
- $e("Session background refresh failed. Signalling to app that user is logged out.", {
3772
+ Qe("Session background refresh failed. Signalling to app that user is logged out.", {
3788
3773
  error: t
3789
3774
  }), e._subscriptionService.destroySession();
3790
3775
  });
@@ -3814,48 +3799,56 @@ var Xe = Promise.resolve({
3814
3799
  }
3815
3800
  }]), e;
3816
3801
  }();
3817
- ft.REFRESH_INTERVAL_MS = 18e4;
3818
- var gt = function () {
3819
- function e(t, n) {
3802
+ mt.REFRESH_INTERVAL_MS = 18e4;
3803
+ var ft = ge(function e(t, n) {
3820
3804
  var r = this;
3821
- ve(this, e), this.roles = t, this.resources = n, this.rolesByID = {}, t.forEach(function (e) {
3822
- return r.rolesByID[e.role_id] = e;
3823
- });
3824
- }
3825
- return _e(e, [{
3826
- key: "callerIsAuthorized",
3827
- value: function value(e, t, n) {
3805
+ Ae(this, e), this._subscriptionService = t, this.emptyState = n, this.onStateChange = function (e) {
3806
+ return r._subscriptionService.subscribeToState(function (t) {
3807
+ e(null != t ? t : r.emptyState);
3808
+ });
3809
+ };
3810
+ }),
3811
+ gt = function () {
3812
+ function e(t, n) {
3828
3813
  var r = this;
3829
- return !!e.map(function (e) {
3830
- return r.rolesByID[e];
3831
- }).filter(function (e) {
3832
- return e;
3833
- }).flatMap(function (e) {
3834
- return e.permissions;
3835
- }).filter(function (e) {
3836
- return e.resource_id === t;
3837
- }).find(function (e) {
3838
- return e.actions.includes(n) || e.actions.includes("*");
3814
+ Ae(this, e), this.roles = t, this.resources = n, this.rolesByID = {}, t.forEach(function (e) {
3815
+ return r.rolesByID[e.role_id] = e;
3839
3816
  });
3840
3817
  }
3841
- }, {
3842
- key: "allPermissionsForCaller",
3843
- value: function value(e) {
3844
- var t = this,
3845
- n = {};
3846
- return this.resources.forEach(function (r) {
3847
- n[r.resource_id] = {}, r.actions.forEach(function (o) {
3848
- n[r.resource_id][o] = t.callerIsAuthorized(e, r.resource_id, o);
3818
+ return ge(e, [{
3819
+ key: "callerIsAuthorized",
3820
+ value: function value(e, t, n) {
3821
+ var r = this;
3822
+ return !!e.map(function (e) {
3823
+ return r.rolesByID[e];
3824
+ }).filter(function (e) {
3825
+ return e;
3826
+ }).flatMap(function (e) {
3827
+ return e.permissions;
3828
+ }).filter(function (e) {
3829
+ return e.resource_id === t;
3830
+ }).find(function (e) {
3831
+ return e.actions.includes(n) || e.actions.includes("*");
3849
3832
  });
3850
- }), n;
3851
- }
3852
- }], [{
3853
- key: "fromJSON",
3854
- value: function value(t) {
3855
- return new e(t.roles, t.resources);
3856
- }
3857
- }]), e;
3858
- }();
3833
+ }
3834
+ }, {
3835
+ key: "allPermissionsForCaller",
3836
+ value: function value(e) {
3837
+ var t = this,
3838
+ n = {};
3839
+ return this.resources.forEach(function (r) {
3840
+ n[r.resource_id] = {}, r.actions.forEach(function (o) {
3841
+ n[r.resource_id][o] = t.callerIsAuthorized(e, r.resource_id, o);
3842
+ });
3843
+ }), n;
3844
+ }
3845
+ }], [{
3846
+ key: "fromJSON",
3847
+ value: function value(t) {
3848
+ return new e(t.roles, t.resources);
3849
+ }
3850
+ }]), e;
3851
+ }();
3859
3852
  var _t = "bootstrap";
3860
3853
  var At = /*#__PURE__*/function () {
3861
3854
  function At(e, t, n) {
@@ -3868,7 +3861,7 @@ var At = /*#__PURE__*/function () {
3868
3861
  }).then(At.mapBootstrapData).then(function (e) {
3869
3862
  return _this._dataLayer.setItem(_t, JSON.stringify(e)), e;
3870
3863
  })["catch"](function (e) {
3871
- return He(e), {
3864
+ return $e(e), {
3872
3865
  displayWatermark: !1,
3873
3866
  cnameDomain: null,
3874
3867
  emailDomains: ["stytch.com"],
@@ -4035,7 +4028,7 @@ var yt = /*#__PURE__*/_createClass(function yt(e) {
4035
4028
  }
4036
4029
  _context2.t1 = !0;
4037
4030
  _context2.next = 4;
4038
- return t = e.captchaSettings.siteKey, ze("https://www.google.com/recaptcha/enterprise.js?render=".concat(t), function () {
4031
+ return t = e.captchaSettings.siteKey, Le("https://www.google.com/recaptcha/enterprise.js?render=".concat(t), function () {
4039
4032
  return window.grecaptcha.enterprise;
4040
4033
  });
4041
4034
  case 4:
@@ -4078,7 +4071,7 @@ var bt = /*#__PURE__*/function () {
4078
4071
  key: "frameClient",
4079
4072
  get: function get() {
4080
4073
  var e;
4081
- return this._frameClient = null !== (e = this._frameClient) && void 0 !== e ? e : new ht(this.iframeURL), this._frameClient;
4074
+ return this._frameClient = null !== (e = this._frameClient) && void 0 !== e ? e : new pt(this.iframeURL), this._frameClient;
4082
4075
  }
4083
4076
  }, {
4084
4077
  key: "call",
@@ -4093,7 +4086,7 @@ var wt = /*#__PURE__*/function () {
4093
4086
  _classCallCheck(this, wt);
4094
4087
  this._publicToken = e, this._subscriptionDataLayer = t, this.baseURL = n, this.additionalTelemetryDataFn = r, this.updateSessionToken = function () {
4095
4088
  return null;
4096
- }, this.eventLogger = new Ze({
4089
+ }, this.eventLogger = new Ye({
4097
4090
  maxBatchSize: 15,
4098
4091
  intervalDurationMs: 800,
4099
4092
  logEventURL: this.buildSDKUrl("/events")
@@ -4119,9 +4112,9 @@ var wt = /*#__PURE__*/function () {
4119
4112
  key: "createTelemetryBlob",
4120
4113
  value: function createTelemetryBlob() {
4121
4114
  return Object.assign(Object.assign({
4122
- event_id: "event-id-".concat(De()),
4123
- app_session_id: "app-session-id-".concat(De()),
4124
- persistent_id: "persistent-id-".concat(De()),
4115
+ event_id: "event-id-".concat(je()),
4116
+ app_session_id: "app-session-id-".concat(je()),
4117
+ persistent_id: "persistent-id-".concat(je()),
4125
4118
  client_sent_at: new Date().toISOString(),
4126
4119
  timezone: Intl.DateTimeFormat().resolvedOptions().timeZone
4127
4120
  }, this.additionalTelemetryDataFn()), {
@@ -4130,7 +4123,7 @@ var wt = /*#__PURE__*/function () {
4130
4123
  },
4131
4124
  sdk: {
4132
4125
  identifier: "Stytch.js Javascript SDK",
4133
- version: "4.8.0"
4126
+ version: "4.9.0"
4134
4127
  }
4135
4128
  });
4136
4129
  }
@@ -4147,7 +4140,7 @@ var wt = /*#__PURE__*/function () {
4147
4140
  while (1) switch (_context3.prev = _context3.next) {
4148
4141
  case 0:
4149
4142
  o = this._subscriptionDataLayer.readSessionCookie().session_token, i = "Basic " + window.btoa(this._publicToken + ":" + (o || this._publicToken)), a = window.btoa(JSON.stringify(this.createTelemetryBlob())), s = window.location.origin;
4150
- return _context3.abrupt("return", Pe({
4143
+ return _context3.abrupt("return", Oe({
4151
4144
  basicAuthHeader: i,
4152
4145
  body: t,
4153
4146
  errorMessage: n,
@@ -4186,9 +4179,9 @@ var wt = /*#__PURE__*/function () {
4186
4179
  a = e.xSDKParentHostHeader,
4187
4180
  s = e.body,
4188
4181
  c = e.retryCallback;
4189
- return Ce(this, void 0, void 0, fe().mark(function e() {
4182
+ return Se(this, void 0, void 0, me().mark(function e() {
4190
4183
  var l;
4191
- return fe().wrap(function (e) {
4184
+ return me().wrap(function (e) {
4192
4185
  for (;;) switch (e.prev = e.next) {
4193
4186
  case 0:
4194
4187
  return l = {
@@ -4199,18 +4192,18 @@ var wt = /*#__PURE__*/function () {
4199
4192
  xSDKClientHeader: i,
4200
4193
  xSDKParentHostHeader: a,
4201
4194
  body: s
4202
- }, e.prev = 1, e.next = 4, Pe(l);
4195
+ }, e.prev = 1, e.next = 4, Oe(l);
4203
4196
  case 4:
4204
4197
  case 15:
4205
4198
  return e.abrupt("return", e.sent);
4206
4199
  case 7:
4207
- if (e.prev = 7, e.t0 = e["catch"](1), !(e.t0 instanceof Oe)) {
4200
+ if (e.prev = 7, e.t0 = e["catch"](1), !(e.t0 instanceof xe)) {
4208
4201
  e.next = 16;
4209
4202
  break;
4210
4203
  }
4211
4204
  return e.next = 12, c(e.t0, l);
4212
4205
  case 12:
4213
- return l = e.sent, e.next = 15, Pe(l);
4206
+ return l = e.sent, e.next = 15, Oe(l);
4214
4207
  case 16:
4215
4208
  throw e.t0;
4216
4209
  case 17:
@@ -4285,7 +4278,7 @@ var Et = /*#__PURE__*/function () {
4285
4278
  if (null !== e) try {
4286
4279
  return JSON.parse(e);
4287
4280
  } catch (e) {
4288
- return void $e("Found malformed Proof Key pair in localstorage.");
4281
+ return void Qe("Found malformed Proof Key pair in localstorage.");
4289
4282
  }
4290
4283
  }
4291
4284
  }, {
@@ -4422,7 +4415,7 @@ var Bt = /*#__PURE__*/function () {
4422
4415
  removeItem: function removeItem(e) {
4423
4416
  return sessionStorage.removeItem(Pt(_this4.publicToken, e));
4424
4417
  }
4425
- }, this.publicToken = e, this.state = null, this.stateKeysUpdated = new Set(), this.subscriptions = {}, (null == t ? void 0 : t.cookieOptions) ? (We("SubscriptionDataLayer").isOptionalString("cookieOptions.opaqueTokenCookieName", t.cookieOptions.opaqueTokenCookieName).isOptionalString("cookieOptions.jwtCookieName", t.cookieOptions.jwtCookieName).isOptionalString("cookieOptions.istCookieName", t.cookieOptions.istCookieName).isOptionalString("cookieOptions.path", t.cookieOptions.path).isOptionalString("cookieOptions.domain", t.cookieOptions.domain), this._jwtCookieName = t.cookieOptions.jwtCookieName || null, this._opaqueTokenCookieName = t.cookieOptions.opaqueTokenCookieName || null, this._cookiePath = t.cookieOptions.path || null, this._domain = t.cookieOptions.domain || null, this._cookieAvailableToSubdomains = t.cookieOptions.availableToSubdomains || !1, this._istCookieName = t.cookieOptions.istCookieName || null) : (this._opaqueTokenCookieName = null, this._jwtCookieName = null, this._cookiePath = null, this._domain = null, this._cookieAvailableToSubdomains = !1, this._istCookieName = null);
4418
+ }, this.publicToken = e, this.state = null, this.stateKeysUpdated = new Set(), this.subscriptions = {}, (null == t ? void 0 : t.cookieOptions) ? (qe("SubscriptionDataLayer").isOptionalString("cookieOptions.opaqueTokenCookieName", t.cookieOptions.opaqueTokenCookieName).isOptionalString("cookieOptions.jwtCookieName", t.cookieOptions.jwtCookieName).isOptionalString("cookieOptions.istCookieName", t.cookieOptions.istCookieName).isOptionalString("cookieOptions.path", t.cookieOptions.path).isOptionalString("cookieOptions.domain", t.cookieOptions.domain), this._jwtCookieName = t.cookieOptions.jwtCookieName || null, this._opaqueTokenCookieName = t.cookieOptions.opaqueTokenCookieName || null, this._cookiePath = t.cookieOptions.path || null, this._domain = t.cookieOptions.domain || null, this._cookieAvailableToSubdomains = t.cookieOptions.availableToSubdomains || !1, this._istCookieName = t.cookieOptions.istCookieName || null) : (this._opaqueTokenCookieName = null, this._jwtCookieName = null, this._cookiePath = null, this._domain = null, this._cookieAvailableToSubdomains = !1, this._istCookieName = null);
4426
4419
  var n = localStorage.getItem(Pt(this.publicToken));
4427
4420
  if (!n) return;
4428
4421
  var r;
@@ -4484,7 +4477,7 @@ var Bt = /*#__PURE__*/function () {
4484
4477
  path: this._cookiePath,
4485
4478
  domain: this._domain
4486
4479
  });
4487
- Ct(this.jwtCookieName) && Ot.remove(this.jwtCookieName, l), Ct(this.opaqueTokenCookieName) && Ot.remove(this.opaqueTokenCookieName, l), Ct(this.jwtCookieName) && $e("Could not remove extraneous JWT cookie. This might happen if the cookie has been set using multiple `path` settings, and may produce unwanted behavior."), Ct(this.opaqueTokenCookieName) && $e("Could not remove extraneous opaque token cookie.");
4480
+ Ct(this.jwtCookieName) && Ot.remove(this.jwtCookieName, l), Ct(this.opaqueTokenCookieName) && Ot.remove(this.opaqueTokenCookieName, l), Ct(this.jwtCookieName) && Qe("Could not remove extraneous JWT cookie. This might happen if the cookie has been set using multiple `path` settings, and may produce unwanted behavior."), Ct(this.opaqueTokenCookieName) && Qe("Could not remove extraneous opaque token cookie.");
4488
4481
  }
4489
4482
  }, {
4490
4483
  key: "writeIntermediateSessionTokenCookie",
@@ -4548,15 +4541,6 @@ var Bt = /*#__PURE__*/function () {
4548
4541
  value: function removeItem(e) {
4549
4542
  return localStorage.removeItem(Pt(this.publicToken, e));
4550
4543
  }
4551
- }, {
4552
- key: "markStateKeysUpdated",
4553
- value: function markStateKeysUpdated(e) {
4554
- var _this6 = this;
4555
- var t = this.stateKeysUpdated.size;
4556
- return e.forEach(function (e) {
4557
- return _this6.stateKeysUpdated.add(e);
4558
- }), t !== this.stateKeysUpdated.size;
4559
- }
4560
4544
  }], [{
4561
4545
  key: "generateCookieOpts",
4562
4546
  value: function generateCookieOpts(_ref4) {
@@ -4595,32 +4579,35 @@ var jt = Symbol["for"]("__stytch_b2b_DataLayer"),
4595
4579
  });
4596
4580
  },
4597
4581
  zt = function () {
4598
- var e = (arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}).KEYS_TO_EXCLUDE,
4599
- t = void 0 === e ? [] : e;
4600
- return function e(n, r) {
4601
- return me(n) === me(r) && (null === n || null === r ? n === r : "object" === me(n) ? Object.keys(n).length === Object.keys(r).length && !Object.keys(n).some(function (e) {
4582
+ var _ref5 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
4583
+ _ref5$KEYS_TO_EXCLUDE = _ref5.KEYS_TO_EXCLUDE,
4584
+ e = _ref5$KEYS_TO_EXCLUDE === void 0 ? [] : _ref5$KEYS_TO_EXCLUDE;
4585
+ var t = function t(n, r) {
4586
+ return _typeof(n) == _typeof(r) && (null === n || null === r ? n === r : "object" == _typeof(n) ? Object.keys(n).length === Object.keys(r).length && !Object.keys(n).some(function (e) {
4602
4587
  return !(e in r);
4603
- }) && Object.entries(n).filter(function (e) {
4604
- var n = de(e, 1)[0];
4605
- return !t.includes(n);
4606
- }).every(function (t) {
4607
- var n = de(t, 2),
4608
- o = n[0],
4609
- i = n[1];
4610
- return e(i, r[o]);
4588
+ }) && Object.entries(n).filter(function (_ref6) {
4589
+ var _ref7 = _slicedToArray(_ref6, 1),
4590
+ t = _ref7[0];
4591
+ return !e.includes(t);
4592
+ }).every(function (_ref8) {
4593
+ var _ref9 = _slicedToArray(_ref8, 2),
4594
+ e = _ref9[0],
4595
+ n = _ref9[1];
4596
+ return t(n, r[e]);
4611
4597
  }) : n === r);
4612
4598
  };
4599
+ return t;
4613
4600
  }({
4614
4601
  KEYS_TO_EXCLUDE: ["last_accessed_at"]
4615
4602
  });
4616
4603
  var Ft = /*#__PURE__*/function () {
4617
4604
  function Ft(e, t) {
4618
- var _this7 = this;
4605
+ var _this6 = this;
4619
4606
  _classCallCheck(this, Ft);
4620
- this._publicToken = e, this._datalayer = t, this._listen = function (e) {
4621
- if (e.key !== Pt(_this7._publicToken)) return;
4607
+ this._publicToken = e, this._datalayer = t, this.fromCache = !0, this._listen = function (e) {
4608
+ if (e.key !== Pt(_this6._publicToken)) return;
4622
4609
  var t = null === e.newValue || "null" === e.newValue ? null : JSON.parse(e.newValue);
4623
- _this7.updateState(t, !0);
4610
+ _this6.updateState(t, !0);
4624
4611
  }, window.addEventListener("storage", this._listen);
4625
4612
  var _this$_datalayer$read = this._datalayer.readSessionCookie(),
4626
4613
  n = _this$_datalayer$read.session_token;
@@ -4663,8 +4650,8 @@ var Ft = /*#__PURE__*/function () {
4663
4650
  var t = this._datalayer.state,
4664
4651
  n = null === e.state ? null : Object.assign(Object.assign({}, this._datalayer.state), e.state);
4665
4652
  this._datalayer.state = n;
4666
- var r = e.state ? Object.keys(e.state) : [];
4667
- !this._datalayer.markStateKeysUpdated(r) && zt(t, n) || Lt(this._datalayer.subscriptions, n);
4653
+ var r = this.getFromCache();
4654
+ this.setCacheRefreshed(), !r && zt(t, n) || Lt(this._datalayer.subscriptions, n);
4668
4655
  }
4669
4656
  }, {
4670
4657
  key: "updateStateAndTokens",
@@ -4678,10 +4665,10 @@ var Ft = /*#__PURE__*/function () {
4678
4665
  var n = this._datalayer.state,
4679
4666
  r = null === e ? null : Object.assign(Object.assign({}, this._datalayer.state), e);
4680
4667
  this._datalayer.state = r;
4681
- var o = e ? Object.keys(e) : [],
4682
- i = this._datalayer.markStateKeysUpdated(o),
4683
- a = !zt(n, r);
4684
- (i || a) && (Lt(this._datalayer.subscriptions, r), a && !t && this._datalayer.syncToLocalStorage());
4668
+ var o = this.getFromCache();
4669
+ this.setCacheRefreshed();
4670
+ var i = !zt(n, r);
4671
+ (o || i) && (Lt(this._datalayer.subscriptions, r), i && !t && this._datalayer.syncToLocalStorage());
4685
4672
  }
4686
4673
  }, {
4687
4674
  key: "updateTokens",
@@ -4720,33 +4707,43 @@ var Ft = /*#__PURE__*/function () {
4720
4707
  value: function syncFromDeviceStorage() {
4721
4708
  return null;
4722
4709
  }
4710
+ }, {
4711
+ key: "getFromCache",
4712
+ value: function getFromCache() {
4713
+ return this.fromCache;
4714
+ }
4715
+ }, {
4716
+ key: "setCacheRefreshed",
4717
+ value: function setCacheRefreshed() {
4718
+ this.fromCache = !1;
4719
+ }
4723
4720
  }]);
4724
4721
  return Ft;
4725
4722
  }();
4726
4723
  var Nt = /*#__PURE__*/function (_Ft) {
4727
4724
  _inherits(Nt, _Ft);
4728
4725
  function Nt() {
4729
- var _this8;
4726
+ var _this7;
4730
4727
  _classCallCheck(this, Nt);
4731
- _this8 = _callSuper(this, Nt, arguments), _this8.updateMember = function (e) {
4732
- return _this8.updateState({
4728
+ _this7 = _callSuper(this, Nt, arguments), _this7.updateMember = function (e) {
4729
+ return _this7.updateState({
4733
4730
  member: e
4734
4731
  });
4735
- }, _this8.getMember = function () {
4732
+ }, _this7.getMember = function () {
4736
4733
  var e, t;
4737
- return null !== (t = null === (e = _this8.getState()) || void 0 === e ? void 0 : e.member) && void 0 !== t ? t : null;
4738
- }, _this8.updateOrganization = function (e) {
4739
- return _this8.updateState({
4734
+ return null !== (t = null === (e = _this7.getState()) || void 0 === e ? void 0 : e.member) && void 0 !== t ? t : null;
4735
+ }, _this7.updateOrganization = function (e) {
4736
+ return _this7.updateState({
4740
4737
  organization: e
4741
4738
  });
4742
- }, _this8.getOrganization = function () {
4739
+ }, _this7.getOrganization = function () {
4743
4740
  var e, t;
4744
- return null !== (t = null === (e = _this8.getState()) || void 0 === e ? void 0 : e.organization) && void 0 !== t ? t : null;
4745
- }, _this8.getSession = function () {
4741
+ return null !== (t = null === (e = _this7.getState()) || void 0 === e ? void 0 : e.organization) && void 0 !== t ? t : null;
4742
+ }, _this7.getSession = function () {
4746
4743
  var e, t;
4747
- return null !== (t = null === (e = _this8.getState()) || void 0 === e ? void 0 : e.session) && void 0 !== t ? t : null;
4744
+ return null !== (t = null === (e = _this7.getState()) || void 0 === e ? void 0 : e.session) && void 0 !== t ? t : null;
4748
4745
  };
4749
- return _this8;
4746
+ return _this7;
4750
4747
  }
4751
4748
  return _createClass(Nt);
4752
4749
  }(Ft);
@@ -4757,12 +4754,12 @@ var Ut = Symbol["for"]("stytch__internal_b2b"),
4757
4754
  return t[Ut];
4758
4755
  };
4759
4756
  var $t = /*#__PURE__*/_createClass(function $t(e, t) {
4760
- var _this9 = this;
4757
+ var _this8 = this;
4761
4758
  _classCallCheck(this, $t);
4762
4759
  var n;
4763
4760
  !function (e) {
4764
4761
  if ("undefined" == typeof window) throw new Error("The ".concat(e, " is not compatible with server-side environments.\nIf using nextjs, use the create").concat(e, " method instead.\n```\n").concat("import { createStytchB2BHeadlessClient } from '@stytch/nextjs/b2b';\n \n const stytch = createStytchB2BHeadlessClient('public-token-...');\n ", "\n```\n"));
4765
- }("StytchB2BHeadlessClient"), "string" != typeof (n = e) ? $e("Public token is malformed. Expected a string, got ".concat(me(n), ".").concat(Ke)) : "" === n ? $e('Public token is malformed. Expected "public-token-...", got an empty string.'.concat(Ke)) : n.startsWith("public-token-") || $e('Public token is malformed. Expected "public-token-...", got '.concat(n, ".").concat(Ke));
4762
+ }("StytchB2BHeadlessClient"), "string" != typeof (n = e) ? Qe("Public token is malformed. Expected a string, got ".concat(he(n), ".").concat(He)) : "" === n ? Qe('Public token is malformed. Expected "public-token-...", got an empty string.'.concat(He)) : n.startsWith("public-token-") || Qe('Public token is malformed. Expected "public-token-...", got '.concat(n, ".").concat(He));
4766
4763
  var r = t,
4767
4764
  o = function (e) {
4768
4765
  var t, n, r, o, i, a, s, c, l, u;
@@ -4777,29 +4774,32 @@ var $t = /*#__PURE__*/_createClass(function $t(e, t) {
4777
4774
  }
4778
4775
  };
4779
4776
  }(r);
4780
- this._dataLayer = Dt(e, r), this._subscriptionService = new Nt(e, this._dataLayer);
4777
+ this._dataLayer = Dt(e, r), this._subscriptionService = new Nt(e, this._dataLayer), this._stateChangeClient = new ft(this._subscriptionService, {}), this.onStateChange = function () {
4778
+ var _this8$_stateChangeCl;
4779
+ return (_this8$_stateChangeCl = _this8._stateChangeClient).onStateChange.apply(_this8$_stateChangeCl, arguments);
4780
+ };
4781
4781
  var i = new Et(this._dataLayer, "passwords");
4782
4782
  this._networkClient = new wt(e, this._dataLayer, o.endpoints.sdkBackendURL, function () {
4783
4783
  var e, t, n, r;
4784
4784
  return {
4785
- stytch_member_id: null === (t = null === (e = _this9._dataLayer.state) || void 0 === e ? void 0 : e.member) || void 0 === t ? void 0 : t.member_id,
4786
- stytch_member_session_id: null === (r = null === (n = _this9._dataLayer.state) || void 0 === n ? void 0 : n.session) || void 0 === r ? void 0 : r.member_session_id
4785
+ stytch_member_id: null === (t = null === (e = _this8._dataLayer.state) || void 0 === e ? void 0 : e.member) || void 0 === t ? void 0 : t.member_id,
4786
+ stytch_member_session_id: null === (r = null === (n = _this8._dataLayer.state) || void 0 === n ? void 0 : n.session) || void 0 === r ? void 0 : r.member_session_id
4787
4787
  };
4788
4788
  });
4789
4789
  var a = new At(e, this._networkClient, this._dataLayer),
4790
4790
  s = new yt(a.getAsync()),
4791
- c = new Ge(e, o.endpoints.dfpBackendURL, a.getAsync(), s.executeRecaptcha),
4791
+ c = new We(e, o.endpoints.dfpBackendURL, a.getAsync(), s.executeRecaptcha),
4792
4792
  l = new bt(o.endpoints.clientsideServicesIframeURL);
4793
- this.organization = new rt(this._networkClient, this._subscriptionService), this.member = new tt(this._networkClient, this._subscriptionService), this.self = new tt(this._networkClient, this._subscriptionService), this.session = new it(this._networkClient, this._subscriptionService), this.magicLinks = new et(this._networkClient, this._subscriptionService, new Et(this._dataLayer, "magic_links"), i, a.getAsync(), c), this.oauth = new ot(this._networkClient, this._subscriptionService, new Et(this._dataLayer, "oauth"), a.getAsync(), {
4793
+ this.organization = new nt(this._networkClient, this._subscriptionService), this.member = new et(this._networkClient, this._subscriptionService), this.self = new et(this._networkClient, this._subscriptionService), this.session = new ot(this._networkClient, this._subscriptionService), this.magicLinks = new Xe(this._networkClient, this._subscriptionService, new Et(this._dataLayer, "magic_links"), i, a.getAsync(), c), this.oauth = new rt(this._networkClient, this._subscriptionService, new Et(this._dataLayer, "oauth"), a.getAsync(), {
4794
4794
  publicToken: e,
4795
4795
  testAPIURL: o.endpoints.testAPIURL,
4796
4796
  liveAPIURL: o.endpoints.liveAPIURL
4797
- }, c), this.sso = new nt(this._networkClient, this._subscriptionService, new Et(this._dataLayer, "sso"), a.getAsync(), {
4797
+ }, c), this.sso = new tt(this._networkClient, this._subscriptionService, new Et(this._dataLayer, "sso"), a.getAsync(), {
4798
4798
  publicToken: e,
4799
4799
  testAPIURL: o.endpoints.testAPIURL,
4800
4800
  liveAPIURL: o.endpoints.liveAPIURL
4801
- }), this.discovery = new at(this._networkClient, this._subscriptionService), this.passwords = new ct(this._networkClient, this._subscriptionService, i, a.getAsync(), c), this.otps = new lt(this._networkClient, this._subscriptionService, c), this.totp = new ut(this._networkClient, this._subscriptionService, c), this.recoveryCodes = new dt(this._networkClient, this._subscriptionService, c), this.rbac = new pt(a.getSync(), a.getAsync(), this._subscriptionService), this._sessionManager = new ft(this._subscriptionService, this.session);
4802
- var u = new mt(this._networkClient, c);
4801
+ }), this.discovery = new it(this._networkClient, this._subscriptionService), this.passwords = new st(this._networkClient, this._subscriptionService, i, a.getAsync(), c), this.otps = new ct(this._networkClient, this._subscriptionService, c), this.totp = new lt(this._networkClient, this._subscriptionService, c), this.recoveryCodes = new ut(this._networkClient, this._subscriptionService, c), this.rbac = new dt(a.getSync(), a.getAsync(), this._subscriptionService), this._sessionManager = new mt(this._subscriptionService, this.session);
4802
+ var u = new ht(this._networkClient, c);
4803
4803
  this._dataLayer.readSessionCookie().session_token && this._sessionManager.performBackgroundRefresh(), this._networkClient.logEvent({
4804
4804
  name: "b2b_sdk_instance_instantiated",
4805
4805
  details: {
@@ -7160,10 +7160,10 @@ var Na = {
7160
7160
  Ua = function Ua(e) {
7161
7161
  return Boolean(e);
7162
7162
  },
7163
- Qa = function Qa(_ref5) {
7164
- var e = _ref5.allMethods,
7165
- t = _ref5.orgSupportedMethods,
7166
- n = _ref5.uiIncludedMethods;
7163
+ Qa = function Qa(_ref10) {
7164
+ var e = _ref10.allMethods,
7165
+ t = _ref10.orgSupportedMethods,
7166
+ n = _ref10.uiIncludedMethods;
7167
7167
  if (null == t ? void 0 : t.length) return new Set(t);
7168
7168
  var r = (null == n ? void 0 : n.length) ? n : e;
7169
7169
  return new Set(r);
@@ -7467,12 +7467,12 @@ var Wa = {
7467
7467
  return null;
7468
7468
  }]
7469
7469
  }),
7470
- Ya = function Ya(_ref6) {
7471
- var e = _ref6.children,
7472
- t = _ref6.client,
7473
- n = _ref6.config,
7474
- r = _ref6.callbacks,
7475
- o = _ref6.initialState;
7470
+ Ya = function Ya(_ref11) {
7471
+ var e = _ref11.children,
7472
+ t = _ref11.client,
7473
+ n = _ref11.config,
7474
+ r = _ref11.callbacks,
7475
+ o = _ref11.initialState;
7476
7476
  var i = lo.useReducer(Va, null != o ? o : Wa);
7477
7477
  return lo.createElement(Ja.Provider, {
7478
7478
  value: {
@@ -8033,9 +8033,9 @@ lo.createContext({
8033
8033
  }]
8034
8034
  });
8035
8035
  var us = "#8296A1",
8036
- ds = function ds(_ref7) {
8037
- var e = _ref7.styles,
8038
- t = _ref7.displayWatermark;
8036
+ ds = function ds(_ref12) {
8037
+ var e = _ref12.styles,
8038
+ t = _ref12.displayWatermark;
8039
8039
  return Jn(function () {
8040
8040
  return function (e) {
8041
8041
  var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
@@ -8790,88 +8790,88 @@ var Oc = function Oc() {
8790
8790
  jc = function jc(e) {
8791
8791
  return e ? "".concat(e, "px") : void 0;
8792
8792
  },
8793
- Dc = za.div(_templateObject || (_templateObject = _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 (_ref9) {
8794
- var e = _ref9.inline;
8793
+ Dc = za.div(_templateObject || (_templateObject = _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 (_ref14) {
8794
+ var e = _ref14.inline;
8795
8795
  return e ? "inline-flex" : "flex";
8796
- }, function (_ref10) {
8797
- var e = _ref10.direction;
8798
- return Rc(e);
8799
- }, function (_ref11) {
8800
- var e = _ref11.justifyContent,
8801
- t = _ref11.center;
8802
- return t ? "center" : Rc(e);
8803
- }, function (_ref12) {
8804
- var e = _ref12.alignItems,
8805
- t = _ref12.center;
8806
- return t ? "center" : Rc(e);
8807
- }, function (_ref13) {
8808
- var e = _ref13.grow;
8809
- return Rc(e);
8810
- }, function (_ref14) {
8811
- var e = _ref14.shrink;
8812
- return Rc(e);
8813
8796
  }, function (_ref15) {
8814
- var e = _ref15.order;
8797
+ var e = _ref15.direction;
8815
8798
  return Rc(e);
8816
8799
  }, function (_ref16) {
8817
- var e = _ref16.alignSelf;
8818
- return Rc(e);
8800
+ var e = _ref16.justifyContent,
8801
+ t = _ref16.center;
8802
+ return t ? "center" : Rc(e);
8819
8803
  }, function (_ref17) {
8820
- var e = _ref17.flow;
8821
- return Rc(e);
8804
+ var e = _ref17.alignItems,
8805
+ t = _ref17.center;
8806
+ return t ? "center" : Rc(e);
8822
8807
  }, function (_ref18) {
8823
- var e = _ref18.wrap;
8808
+ var e = _ref18.grow;
8824
8809
  return Rc(e);
8825
8810
  }, function (_ref19) {
8826
- var e = _ref19.width;
8827
- return "string" == typeof e ? e : jc(e);
8811
+ var e = _ref19.shrink;
8812
+ return Rc(e);
8828
8813
  }, function (_ref20) {
8829
- var e = _ref20.height;
8830
- return "string" == typeof e ? e : jc(e);
8814
+ var e = _ref20.order;
8815
+ return Rc(e);
8831
8816
  }, function (_ref21) {
8832
- var e = _ref21.maxWidth;
8833
- return "string" == typeof e ? e : jc(e);
8817
+ var e = _ref21.alignSelf;
8818
+ return Rc(e);
8834
8819
  }, function (_ref22) {
8835
- var e = _ref22.maxHeight;
8836
- return "string" == typeof e ? e : jc(e);
8820
+ var e = _ref22.flow;
8821
+ return Rc(e);
8837
8822
  }, function (_ref23) {
8838
- var e = _ref23.minWidth;
8839
- return "string" == typeof e ? e : jc(e);
8823
+ var e = _ref23.wrap;
8824
+ return Rc(e);
8840
8825
  }, function (_ref24) {
8841
- var e = _ref24.minHeight;
8826
+ var e = _ref24.width;
8842
8827
  return "string" == typeof e ? e : jc(e);
8843
8828
  }, function (_ref25) {
8844
- var e = _ref25.padding;
8845
- return jc(e);
8829
+ var e = _ref25.height;
8830
+ return "string" == typeof e ? e : jc(e);
8846
8831
  }, function (_ref26) {
8847
- var e = _ref26.margin;
8848
- return jc(e);
8832
+ var e = _ref26.maxWidth;
8833
+ return "string" == typeof e ? e : jc(e);
8849
8834
  }, function (_ref27) {
8850
- var e = _ref27.marginTop;
8851
- return jc(e);
8835
+ var e = _ref27.maxHeight;
8836
+ return "string" == typeof e ? e : jc(e);
8852
8837
  }, function (_ref28) {
8853
- var e = _ref28.marginRight;
8854
- return jc(e);
8838
+ var e = _ref28.minWidth;
8839
+ return "string" == typeof e ? e : jc(e);
8855
8840
  }, function (_ref29) {
8856
- var e = _ref29.marginBottom;
8857
- return jc(e);
8841
+ var e = _ref29.minHeight;
8842
+ return "string" == typeof e ? e : jc(e);
8858
8843
  }, function (_ref30) {
8859
- var e = _ref30.marginLeft;
8844
+ var e = _ref30.padding;
8860
8845
  return jc(e);
8861
8846
  }, function (_ref31) {
8862
- var e = _ref31.paddingTop;
8847
+ var e = _ref31.margin;
8863
8848
  return jc(e);
8864
8849
  }, function (_ref32) {
8865
- var e = _ref32.paddingRight;
8850
+ var e = _ref32.marginTop;
8866
8851
  return jc(e);
8867
8852
  }, function (_ref33) {
8868
- var e = _ref33.paddingBottom;
8853
+ var e = _ref33.marginRight;
8869
8854
  return jc(e);
8870
8855
  }, function (_ref34) {
8871
- var e = _ref34.paddingLeft;
8856
+ var e = _ref34.marginBottom;
8872
8857
  return jc(e);
8873
8858
  }, function (_ref35) {
8874
- var e = _ref35.gap;
8859
+ var e = _ref35.marginLeft;
8860
+ return jc(e);
8861
+ }, function (_ref36) {
8862
+ var e = _ref36.paddingTop;
8863
+ return jc(e);
8864
+ }, function (_ref37) {
8865
+ var e = _ref37.paddingRight;
8866
+ return jc(e);
8867
+ }, function (_ref38) {
8868
+ var e = _ref38.paddingBottom;
8869
+ return jc(e);
8870
+ }, function (_ref39) {
8871
+ var e = _ref39.paddingLeft;
8872
+ return jc(e);
8873
+ }, function (_ref40) {
8874
+ var e = _ref40.gap;
8875
8875
  return jc(e);
8876
8876
  }),
8877
8877
  Lc = za.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: ", ";\n text-align: ", ";\n ", ";\n"])), function (e) {
@@ -8957,8 +8957,8 @@ var zc = function zc() {
8957
8957
  }))));
8958
8958
  },
8959
8959
  Fc = za(Lc)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n text-align: center;\n"]))),
8960
- Nc = function Nc(_ref36) {
8961
- var e = _ref36.errorMessage;
8960
+ Nc = function Nc(_ref41) {
8961
+ var e = _ref41.errorMessage;
8962
8962
  return lo.createElement(Dc, {
8963
8963
  direction: "column",
8964
8964
  gap: 24,
@@ -9070,10 +9070,10 @@ var pl = function pl(e) {
9070
9070
  return o;
9071
9071
  };
9072
9072
  var hl = !0;
9073
- var _ref37 = sl && window.addEventListener ? [window.addEventListener.bind(window), window.removeEventListener.bind(window)] : [el, el],
9074
- _ref38 = _slicedToArray(_ref37, 2),
9075
- ml = _ref38[0],
9076
- fl = _ref38[1],
9073
+ var _ref42 = sl && window.addEventListener ? [window.addEventListener.bind(window), window.removeEventListener.bind(window)] : [el, el],
9074
+ _ref43 = _slicedToArray(_ref42, 2),
9075
+ ml = _ref43[0],
9076
+ fl = _ref43[1],
9077
9077
  gl = {
9078
9078
  isOnline: function isOnline() {
9079
9079
  return hl;
@@ -9260,7 +9260,7 @@ function Il() {
9260
9260
  var Ml = function Ml(e, t) {
9261
9261
  for (var _n7 in e) e[_n7][0] && e[_n7][0](t);
9262
9262
  },
9263
- _ref8 = function (e, t) {
9263
+ _ref13 = function (e, t) {
9264
9264
  if (!Yc.has(e)) {
9265
9265
  var _n8 = il(_l, t),
9266
9266
  _r3 = {},
@@ -9304,9 +9304,9 @@ var Ml = function Ml(e, t) {
9304
9304
  }
9305
9305
  return [e, Yc.get(e)[4]];
9306
9306
  }(new Map()),
9307
- _ref39 = _slicedToArray(_ref8, 2),
9308
- Bl = _ref39[0],
9309
- Rl = _ref39[1],
9307
+ _ref44 = _slicedToArray(_ref13, 2),
9308
+ Bl = _ref44[0],
9309
+ Rl = _ref44[1],
9310
9310
  jl = il({
9311
9311
  onLoadingSlow: el,
9312
9312
  onSuccess: el,
@@ -9638,7 +9638,7 @@ var Kl = function (e, t) {
9638
9638
  i = Wn(t),
9639
9639
  a = Wn(n),
9640
9640
  s = Wn(0),
9641
- _ref40 = function (e) {
9641
+ _ref45 = function (e) {
9642
9642
  var t = Hn({})[1],
9643
9643
  n = Wn(!1),
9644
9644
  r = Wn(e),
@@ -9668,10 +9668,10 @@ var Kl = function (e, t) {
9668
9668
  error: tl,
9669
9669
  isMutating: !1
9670
9670
  }),
9671
- _ref41 = _slicedToArray(_ref40, 3),
9672
- c = _ref41[0],
9673
- l = _ref41[1],
9674
- u = _ref41[2],
9671
+ _ref46 = _slicedToArray(_ref45, 3),
9672
+ c = _ref46[0],
9673
+ l = _ref46[1],
9674
+ u = _ref46[2],
9675
9675
  d = c.current,
9676
9676
  p = Yn(function (e, t) {
9677
9677
  return vt(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
@@ -9927,9 +9927,9 @@ var Xl = Da(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n
9927
9927
  return e.size;
9928
9928
  }, Xl),
9929
9929
  ru = za.svg(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n display: block;\n"]))),
9930
- ou = function ou(_ref42) {
9931
- var e = _ref42.size,
9932
- t = _ref42.thickness;
9930
+ ou = function ou(_ref47) {
9931
+ var e = _ref47.size,
9932
+ t = _ref47.thickness;
9933
9933
  return lo.createElement(nu, {
9934
9934
  size: e
9935
9935
  }, lo.createElement(ru, {
@@ -9975,13 +9975,13 @@ var Xl = Da(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n
9975
9975
  }, function (e) {
9976
9976
  return e.theme.colors.disabled;
9977
9977
  }),
9978
- su = function su(_ref43) {
9979
- var e = _ref43.email,
9980
- t = _ref43.setEmail,
9981
- _ref43$disableInput = _ref43.disableInput,
9982
- n = _ref43$disableInput === void 0 ? !1 : _ref43$disableInput,
9983
- _ref43$hasPasskeys = _ref43.hasPasskeys,
9984
- r = _ref43$hasPasskeys === void 0 ? !1 : _ref43$hasPasskeys;
9978
+ su = function su(_ref48) {
9979
+ var e = _ref48.email,
9980
+ t = _ref48.setEmail,
9981
+ _ref48$disableInput = _ref48.disableInput,
9982
+ n = _ref48$disableInput === void 0 ? !1 : _ref48$disableInput,
9983
+ _ref48$hasPasskeys = _ref48.hasPasskeys,
9984
+ r = _ref48$hasPasskeys === void 0 ? !1 : _ref48$hasPasskeys;
9985
9985
  return lo.createElement(au, Object.assign({
9986
9986
  placeholder: "example@email.com",
9987
9987
  name: "email",
@@ -9999,8 +9999,8 @@ var Xl = Da(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n
9999
9999
  } : {}));
10000
10000
  },
10001
10001
  cu = /https:\/\/stytch\.com\/[#a-zA-Z0-9/-]+/g,
10002
- lu = function lu(_ref44) {
10003
- var e = _ref44.errorMessage;
10002
+ lu = function lu(_ref49) {
10003
+ var e = _ref49.errorMessage;
10004
10004
  var t = Jn(function () {
10005
10005
  return function (e) {
10006
10006
  var t = e.split(cu),
@@ -10026,9 +10026,9 @@ var Xl = Da(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n
10026
10026
  }, t);
10027
10027
  },
10028
10028
  uu = ["email_jit_provisioning_not_allowed", "invalid_email_for_jit_provisioning"],
10029
- du = function du(e, _ref45) {
10030
- var t = _ref45.email,
10031
- n = _ref45.org;
10029
+ du = function du(e, _ref50) {
10030
+ var t = _ref50.email,
10031
+ n = _ref50.org;
10032
10032
  return uu.includes(e.error_type) ? "".concat(t, " does not have access to ").concat(n, ". If you think this is a mistake, contact your admin") : e.message;
10033
10033
  },
10034
10034
  pu = function pu() {
@@ -10042,8 +10042,8 @@ var Xl = Da(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n
10042
10042
  _Hn12 = _slicedToArray(_Hn11, 2),
10043
10043
  o = _Hn12[0],
10044
10044
  i = _Hn12[1],
10045
- _ql = ql("stytch.magicLinks.email.loginOrSignup", function (e, _ref46) {
10046
- var t = _ref46.arg.organization_id;
10045
+ _ql = ql("stytch.magicLinks.email.loginOrSignup", function (e, _ref51) {
10046
+ var t = _ref51.arg.organization_id;
10047
10047
  var i, a, s, c;
10048
10048
  return n.magicLinks.email.loginOrSignup({
10049
10049
  email_address: o,
@@ -10165,9 +10165,9 @@ var Xl = Da(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n
10165
10165
  text: "Continue with email"
10166
10166
  })));
10167
10167
  },
10168
- mu = function mu(_ref47) {
10169
- var e = _ref47.display_name,
10170
- t = _ref47.connection_id;
10168
+ mu = function mu(_ref52) {
10169
+ var e = _ref52.display_name,
10170
+ t = _ref52.connection_id;
10171
10171
  var n = Xa(),
10172
10172
  r = ts();
10173
10173
  return on(Zl, {
@@ -10230,9 +10230,9 @@ var Xl = Da(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n
10230
10230
  $placement: "right"
10231
10231
  }));
10232
10232
  },
10233
- yu = function yu(_ref48) {
10234
- var _ref48$enabled = _ref48.enabled,
10235
- e = _ref48$enabled === void 0 ? !1 : _ref48$enabled;
10233
+ yu = function yu(_ref53) {
10234
+ var _ref53$enabled = _ref53.enabled,
10235
+ e = _ref53$enabled === void 0 ? !1 : _ref53$enabled;
10236
10236
  return lo.createElement("svg", {
10237
10237
  width: "20",
10238
10238
  height: "14",
@@ -10281,10 +10281,10 @@ var Xl = Da(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n
10281
10281
  return e.theme.inputs.placeholderColor;
10282
10282
  }),
10283
10283
  Eu = za.button(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n all: unset;\n cursor: pointer;\n"]))),
10284
- Su = function Su(_ref49) {
10285
- var e = _ref49.onClick,
10286
- t = _ref49.enabled,
10287
- n = _ref49.visible;
10284
+ Su = function Su(_ref54) {
10285
+ var e = _ref54.onClick,
10286
+ t = _ref54.enabled,
10287
+ n = _ref54.visible;
10288
10288
  return lo.createElement(Eu, {
10289
10289
  onClick: e,
10290
10290
  type: "button"
@@ -10292,10 +10292,10 @@ var Xl = Da(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n
10292
10292
  enabled: t
10293
10293
  }));
10294
10294
  },
10295
- Cu = function Cu(_ref50) {
10296
- var e = _ref50.password,
10297
- t = _ref50.setPassword,
10298
- n = _ref50.type;
10295
+ Cu = function Cu(_ref55) {
10296
+ var e = _ref55.password,
10297
+ t = _ref55.setPassword,
10298
+ n = _ref55.type;
10299
10299
  var _Hn15 = Hn(!1),
10300
10300
  _Hn16 = _slicedToArray(_Hn15, 2),
10301
10301
  r = _Hn16[0],
@@ -10325,8 +10325,8 @@ var Xl = Da(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n
10325
10325
  }));
10326
10326
  },
10327
10327
  xu = za.button(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n all: unset;\n cursor: pointer;\n"]))),
10328
- Ou = function Ou(_ref51) {
10329
- var e = _ref51.color;
10328
+ Ou = function Ou(_ref56) {
10329
+ var e = _ref56.color;
10330
10330
  return lo.createElement("svg", {
10331
10331
  width: "24",
10332
10332
  height: "24",
@@ -10338,8 +10338,8 @@ var Xl = Da(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n
10338
10338
  fill: e
10339
10339
  }));
10340
10340
  },
10341
- Pu = function Pu(_ref52) {
10342
- var e = _ref52.onClick;
10341
+ Pu = function Pu(_ref57) {
10342
+ var e = _ref57.onClick;
10343
10343
  var t = La();
10344
10344
  return lo.createElement(xu, {
10345
10345
  type: "button",
@@ -10473,8 +10473,8 @@ var Xl = Da(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n
10473
10473
  case 0:
10474
10474
  t.preventDefault();
10475
10475
  o = s.organization_id;
10476
- m ? r.match(St) ? (l(""), d(!0), Qt(n).searchManager.searchMember(r, s.organization_id).then(function (_ref53) {
10477
- var t = _ref53.member;
10476
+ m ? r.match(St) ? (l(""), d(!0), Qt(n).searchManager.searchMember(r, s.organization_id).then(function (_ref58) {
10477
+ var t = _ref58.member;
10478
10478
  if (null == t ? void 0 : t.member_password_id) return f(!1), d(!1), void e({
10479
10479
  type: "set_password_state",
10480
10480
  email: r
@@ -10611,8 +10611,8 @@ var ju = Ru("google", function () {
10611
10611
  d: "M43.611,20.083H42V20H24v8h11.303c-0.792,2.237-2.231,4.166-4.087,5.571c0.001-0.001,0.002-0.001,0.003-0.002l6.19,5.238C36.971,39.205,44,34,44,24C44,22.659,43.862,21.35,43.611,20.083z"
10612
10612
  }));
10613
10613
  });
10614
- var Du = Ru("microsoft", function (_ref54) {
10615
- var e = _ref54.patternId;
10614
+ var Du = Ru("microsoft", function (_ref59) {
10615
+ var e = _ref59.patternId;
10616
10616
  return lo.createElement("svg", {
10617
10617
  width: "100%",
10618
10618
  height: "100%",
@@ -10655,7 +10655,7 @@ var Lu = function Lu() {
10655
10655
  var u = [];
10656
10656
  r.flowState.organization && "RESTRICTED" === r.flowState.organization.auth_methods && (u = null !== (t = null === (e = r.flowState.organization) || void 0 === e ? void 0 : e.allowed_auth_methods) && void 0 !== t ? t : []);
10657
10657
  var d = o.map(function (e) {
10658
- var _ref55 = function (e) {
10658
+ var _ref60 = function (e) {
10659
10659
  switch (e) {
10660
10660
  case w.Google:
10661
10661
  return {
@@ -10677,9 +10677,9 @@ var Lu = function Lu() {
10677
10677
  };
10678
10678
  }
10679
10679
  }(e),
10680
- t = _ref55.icon,
10681
- n = _ref55.providerTypeTitle,
10682
- o = _ref55.allowedAuthMethod;
10680
+ t = _ref60.icon,
10681
+ n = _ref60.providerTypeTitle,
10682
+ o = _ref60.allowedAuthMethod;
10683
10683
  return !r.flowState.organization || "ALL_ALLOWED" === r.flowState.organization.auth_methods || u.includes(o) ? on(Bu, {
10684
10684
  key: "oauth-".concat(e),
10685
10685
  providerType: e,
@@ -10721,9 +10721,9 @@ var Nu;
10721
10721
  var Uu = za(Dc)(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n > * + * {\n margin-top: 24px;\n }\n"]))),
10722
10722
  Qu = za.img(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n max-height: 50px;\n max-width: 100px;\n"]))),
10723
10723
  $u = za(Lc)(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n text-align: center;\n"]))),
10724
- Hu = function Hu(_ref56) {
10725
- var e = _ref56.orgLogo,
10726
- t = _ref56.appLogo;
10724
+ Hu = function Hu(_ref61) {
10725
+ var e = _ref61.orgLogo,
10726
+ t = _ref61.appLogo;
10727
10727
  return "" !== e && "" !== t ? lo.createElement(lo.Fragment, null) : lo.createElement(Dc, {
10728
10728
  justifyContent: "center",
10729
10729
  gap: 4
@@ -10733,8 +10733,8 @@ var Uu = za(Dc)(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral
10733
10733
  src: t
10734
10734
  }));
10735
10735
  },
10736
- Ku = function Ku(_ref57) {
10737
- var e = _ref57.components;
10736
+ Ku = function Ku(_ref62) {
10737
+ var e = _ref62.components;
10738
10738
  var t = e.map(function (e) {
10739
10739
  switch (e) {
10740
10740
  case Nu.MagicLinkEmailForm:
@@ -10910,8 +10910,8 @@ var Wu = Ru("outlook", function () {
10910
10910
  }
10911
10911
  })));
10912
10912
  });
10913
- var Gu = Ru("yahoo", function (_ref58) {
10914
- var e = _ref58.patternId;
10913
+ var Gu = Ru("yahoo", function (_ref63) {
10914
+ var e = _ref63.patternId;
10915
10915
  return lo.createElement("svg", {
10916
10916
  width: "100%",
10917
10917
  height: "100%",
@@ -10940,10 +10940,10 @@ var Gu = Ru("yahoo", function (_ref58) {
10940
10940
  var Ju = za.a(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n all: unset;\n cursor: pointer;\n\n &:hover {\n text-decoration: underline;\n text-decoration-color: ", ";\n }\n"])), function (e) {
10941
10941
  return e.theme.colors.primary;
10942
10942
  }),
10943
- Yu = function Yu(_ref59) {
10944
- var e = _ref59.label,
10945
- t = _ref59.href,
10946
- n = _ref59.Icon;
10943
+ Yu = function Yu(_ref64) {
10944
+ var e = _ref64.label,
10945
+ t = _ref64.href,
10946
+ n = _ref64.Icon;
10947
10947
  return lo.createElement(Dc, {
10948
10948
  gap: 4
10949
10949
  }, n, lo.createElement(Ju, {
@@ -10952,11 +10952,11 @@ var Ju = za.a(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral([
10952
10952
  rel: "noopener noreferrer"
10953
10953
  }, lo.createElement(Lc, null, "Open in ", e)));
10954
10954
  },
10955
- Zu = function Zu(_ref60) {
10956
- var e = _ref60.emailDomain,
10957
- t = _ref60.reset,
10958
- n = _ref60.email;
10959
- var _ref61 = function (e) {
10955
+ Zu = function Zu(_ref65) {
10956
+ var e = _ref65.emailDomain,
10957
+ t = _ref65.reset,
10958
+ n = _ref65.email;
10959
+ var _ref66 = function (e) {
10960
10960
  return e ? {
10961
10961
  GMAIL: "https://mail.google.com/mail/u/0/#search/".concat(encodeURIComponent("from:@".concat(e, " in:anywhere"))),
10962
10962
  OUTLOOK: "https://outlook.office.com/mail/0/inbox",
@@ -10967,9 +10967,9 @@ var Ju = za.a(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral([
10967
10967
  YAHOO: "https://mail.yahoo.com/d/search/referrer=unread"
10968
10968
  };
10969
10969
  }(e),
10970
- r = _ref61.GMAIL,
10971
- o = _ref61.YAHOO,
10972
- i = _ref61.OUTLOOK;
10970
+ r = _ref66.GMAIL,
10971
+ o = _ref66.YAHOO,
10972
+ i = _ref66.OUTLOOK;
10973
10973
  return lo.createElement(Dc, {
10974
10974
  direction: "column",
10975
10975
  gap: 24
@@ -11015,8 +11015,8 @@ var Ju = za.a(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral([
11015
11015
  o = _Hn22[0],
11016
11016
  i = _Hn22[1];
11017
11017
  return Vn(function () {
11018
- Qt(n).bootstrap.getAsync().then(function (_ref62) {
11019
- var e = _ref62.emailDomains;
11018
+ Qt(n).bootstrap.getAsync().then(function (_ref67) {
11019
+ var e = _ref67.emailDomains;
11020
11020
  i(e);
11021
11021
  });
11022
11022
  }, [n]), (null === (e = r.emailMagicLinksOptions) || void 0 === e ? void 0 : e.domainHint) ? null === (t = r.emailMagicLinksOptions) || void 0 === t ? void 0 : t.domainHint : 1 === o.length ? o[0] : null;
@@ -11057,23 +11057,23 @@ var Ju = za.a(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral([
11057
11057
  thickness: 8
11058
11058
  }));
11059
11059
  },
11060
- nd = za(Dc)(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n border: ", ";\n border-radius: ", ";\n > div + div {\n border-top: ", ";\n }\n"])), function (_ref63) {
11061
- var e = _ref63.theme;
11060
+ nd = za(Dc)(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n border: ", ";\n border-radius: ", ";\n > div + div {\n border-top: ", ";\n }\n"])), function (_ref68) {
11061
+ var e = _ref68.theme;
11062
11062
  return e.container.border;
11063
- }, function (_ref64) {
11064
- var e = _ref64.theme;
11063
+ }, function (_ref69) {
11064
+ var e = _ref69.theme;
11065
11065
  return e.container.borderRadius;
11066
- }, function (_ref65) {
11067
- var e = _ref65.theme;
11066
+ }, function (_ref70) {
11067
+ var e = _ref70.theme;
11068
11068
  return e.container.border;
11069
11069
  }),
11070
11070
  rd = za(Dc)(_templateObject25 || (_templateObject25 = _taggedTemplateLiteral(["\n cursor: pointer;\n"]))),
11071
11071
  od = za.img(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["\n height: 40px;\n width: 40px;\n border-radius: 4px;\n"]))),
11072
- id = za(Dc)(_templateObject27 || (_templateObject27 = _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 (_ref66) {
11073
- var e = _ref66.theme;
11072
+ id = za(Dc)(_templateObject27 || (_templateObject27 = _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 (_ref71) {
11073
+ var e = _ref71.theme;
11074
11074
  return e.buttons.primary.backgroundColor;
11075
- }, function (_ref67) {
11076
- var e = _ref67.theme;
11075
+ }, function (_ref72) {
11076
+ var e = _ref72.theme;
11077
11077
  return e.buttons.primary.textColor;
11078
11078
  }),
11079
11079
  ad = function ad() {
@@ -11088,9 +11088,9 @@ var Ju = za.a(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral([
11088
11088
  fill: "#19303D"
11089
11089
  }));
11090
11090
  },
11091
- sd = function sd(_ref68) {
11092
- var e = _ref68.name,
11093
- t = _ref68.logo;
11091
+ sd = function sd(_ref73) {
11092
+ var e = _ref73.name,
11093
+ t = _ref73.logo;
11094
11094
  return "" !== t ? on(od, {
11095
11095
  src: t
11096
11096
  }) : on(id, {
@@ -11098,8 +11098,8 @@ var Ju = za.a(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral([
11098
11098
  justifyContent: "center"
11099
11099
  }, e[0]);
11100
11100
  },
11101
- cd = function cd(_ref69) {
11102
- var e = _ref69.type;
11101
+ cd = function cd(_ref74) {
11102
+ var e = _ref74.type;
11103
11103
  return "eligible_to_join_by_email_domain" === e || "pending_member" === e ? on(Lc, null, "Join") : "invited_member" === e ? on(Lc, null, "Accept Invite") : on(cn, null);
11104
11104
  },
11105
11105
  ld = function ld() {
@@ -11203,8 +11203,8 @@ var Ju = za.a(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral([
11203
11203
  connection_id: e
11204
11204
  });
11205
11205
  }, [r]),
11206
- _ql4 = ql("stytch.discovery.intermediateSessions.exchange", function (e, _ref70) {
11207
- var t = _ref70.arg.organizationId;
11206
+ _ql4 = ql("stytch.discovery.intermediateSessions.exchange", function (e, _ref75) {
11207
+ var t = _ref75.arg.organizationId;
11208
11208
  return r.discovery.intermediateSessions.exchange({
11209
11209
  organization_id: t,
11210
11210
  session_duration_minutes: o.sessionOptions.sessionDurationMinutes
@@ -11384,8 +11384,8 @@ var Ju = za.a(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral([
11384
11384
  size: "header"
11385
11385
  }, "Success!"), on(Lc, null, "You have successfully logged in."), on(dd, null));
11386
11386
  };
11387
- var hd = Ru("chevron", function (_ref71) {
11388
- var e = _ref71.patternId;
11387
+ var hd = Ru("chevron", function (_ref76) {
11388
+ var e = _ref76.patternId;
11389
11389
  return lo.createElement("svg", {
11390
11390
  width: 24,
11391
11391
  height: 24,
@@ -11411,9 +11411,9 @@ var md = za.button(_templateObject28 || (_templateObject28 = _taggedTemplateLite
11411
11411
  }),
11412
11412
  fd = za.div(_templateObject29 || (_templateObject29 = _taggedTemplateLiteral(["\n flex: 1 1 auto;\n"]))),
11413
11413
  gd = za.span(_templateObject30 || (_templateObject30 = _taggedTemplateLiteral(["\n flex: 0 0 auto;\n"]))),
11414
- _d = function _d(_ref72) {
11415
- var e = _ref72.children,
11416
- t = _ref72.onClick;
11414
+ _d = function _d(_ref77) {
11415
+ var e = _ref77.children,
11416
+ t = _ref77.onClick;
11417
11417
  return lo.createElement(md, {
11418
11418
  onClick: t
11419
11419
  }, lo.createElement(fd, null, e), lo.createElement(gd, {
@@ -11460,9 +11460,9 @@ var md = za.button(_templateObject28 || (_templateObject28 = _taggedTemplateLite
11460
11460
  size: "header"
11461
11461
  }, "Set up Multi-Factor Authentication"), lo.createElement(Lc, null, "Your organization requires an additional form of verification to make your account more secure."), lo.createElement(Dc, {
11462
11462
  direction: "column"
11463
- }, i.map(function (_ref73) {
11464
- var e = _ref73.option,
11465
- t = _ref73.label;
11463
+ }, i.map(function (_ref78) {
11464
+ var e = _ref78.option,
11465
+ t = _ref78.label;
11466
11466
  return lo.createElement(_d, {
11467
11467
  key: e,
11468
11468
  onClick: function onClick() {
@@ -11477,10 +11477,10 @@ var md = za.button(_templateObject28 || (_templateObject28 = _taggedTemplateLite
11477
11477
  yd = za.a(_templateObject31 || (_templateObject31 = _taggedTemplateLiteral(["\n all: unset;\n cursor: pointer;\n\n &:hover {\n text-decoration: underline;\n text-decoration-color: ", ";\n }\n"])), function (e) {
11478
11478
  return e.theme.colors.primary;
11479
11479
  }),
11480
- bd = function bd(_ref74) {
11481
- var e = _ref74.label,
11482
- t = _ref74.href,
11483
- n = _ref74.Icon;
11480
+ bd = function bd(_ref79) {
11481
+ var e = _ref79.label,
11482
+ t = _ref79.href,
11483
+ n = _ref79.Icon;
11484
11484
  return lo.createElement(Dc, {
11485
11485
  gap: 4
11486
11486
  }, n, lo.createElement(yd, {
@@ -11489,11 +11489,11 @@ var md = za.button(_templateObject28 || (_templateObject28 = _taggedTemplateLite
11489
11489
  rel: "noopener noreferrer"
11490
11490
  }, lo.createElement(Lc, null, "Open in ", e)));
11491
11491
  },
11492
- wd = function wd(_ref75) {
11493
- var e = _ref75.emailDomain,
11494
- t = _ref75.reset,
11495
- n = _ref75.email;
11496
- var _ref76 = function (e) {
11492
+ wd = function wd(_ref80) {
11493
+ var e = _ref80.emailDomain,
11494
+ t = _ref80.reset,
11495
+ n = _ref80.email;
11496
+ var _ref81 = function (e) {
11497
11497
  return e ? {
11498
11498
  GMAIL: "https://mail.google.com/mail/u/0/#search/".concat(encodeURIComponent("from:@".concat(e, " in:anywhere"))),
11499
11499
  OUTLOOK: "https://outlook.office.com/mail/0/inbox"
@@ -11502,8 +11502,8 @@ var md = za.button(_templateObject28 || (_templateObject28 = _taggedTemplateLite
11502
11502
  OUTLOOK: "https://outlook.office.com/mail/0/inbox"
11503
11503
  };
11504
11504
  }(e),
11505
- r = _ref76.GMAIL,
11506
- o = _ref76.OUTLOOK,
11505
+ r = _ref81.GMAIL,
11506
+ o = _ref81.OUTLOOK,
11507
11507
  _es29 = es(),
11508
11508
  _es30 = _slicedToArray(_es29, 2),
11509
11509
  i = _es30[1];
@@ -11560,8 +11560,8 @@ var md = za.button(_templateObject28 || (_templateObject28 = _taggedTemplateLite
11560
11560
  o = _Hn24[0],
11561
11561
  i = _Hn24[1];
11562
11562
  return Vn(function () {
11563
- Qt(n).bootstrap.getAsync().then(function (_ref77) {
11564
- var e = _ref77.emailDomains;
11563
+ Qt(n).bootstrap.getAsync().then(function (_ref82) {
11564
+ var e = _ref82.emailDomains;
11565
11565
  i(e);
11566
11566
  });
11567
11567
  }, [n]), (null === (e = r.emailMagicLinksOptions) || void 0 === e ? void 0 : e.domainHint) ? null === (t = r.emailMagicLinksOptions) || void 0 === t ? void 0 : t.domainHint : 1 === o.length ? o[0] : null;
@@ -11583,8 +11583,8 @@ var md = za.button(_templateObject28 || (_templateObject28 = _taggedTemplateLite
11583
11583
  Ed = za.div(_templateObject32 || (_templateObject32 = _taggedTemplateLiteral(["\n height: 4px;\n width: 25%;\n background-color: ", ";\n"])), function (e) {
11584
11584
  return e.$bgColor;
11585
11585
  }),
11586
- Sd = function Sd(_ref78) {
11587
- var e = _ref78.score;
11586
+ Sd = function Sd(_ref83) {
11587
+ var e = _ref83.score;
11588
11588
  var t = [];
11589
11589
  switch (e) {
11590
11590
  case 0:
@@ -11747,13 +11747,13 @@ var md = za.button(_templateObject28 || (_templateObject28 = _taggedTemplateLite
11747
11747
  }(function (t) {
11748
11748
  return e.passwords.strengthCheck({
11749
11749
  password: t
11750
- }).then(function (_ref79) {
11751
- var e = _ref79.score,
11752
- t = _ref79.valid_password,
11753
- n = _ref79.zxcvbn_feedback,
11754
- r = _ref79.luds_feedback,
11755
- o = _ref79.strength_policy,
11756
- i = _ref79.breached_password;
11750
+ }).then(function (_ref84) {
11751
+ var e = _ref84.score,
11752
+ t = _ref84.valid_password,
11753
+ n = _ref84.zxcvbn_feedback,
11754
+ r = _ref84.luds_feedback,
11755
+ o = _ref84.strength_policy,
11756
+ i = _ref84.breached_password;
11757
11757
  E(o), y(!t), "zxcvbn" === o ? (f(e), A(n.warning)) : "luds" === o && (C(r.missing_characters), O(r.missing_complexity), T(i));
11758
11758
  });
11759
11759
  });
@@ -11932,8 +11932,8 @@ var md = za.button(_templateObject28 || (_templateObject28 = _taggedTemplateLite
11932
11932
  return _regeneratorRuntime().wrap(function _callee15$(_context15) {
11933
11933
  while (1) switch (_context15.prev = _context15.next) {
11934
11934
  case 0:
11935
- r.preventDefault(), i.match(St) ? (l(""), d(!0), Qt(o).searchManager.searchMember(i, s.organization_id).then(function (_ref80) {
11936
- var r = _ref80.member;
11935
+ r.preventDefault(), i.match(St) ? (l(""), d(!0), Qt(o).searchManager.searchMember(i, s.organization_id).then(function (_ref85) {
11936
+ var r = _ref85.member;
11937
11937
  var a, c, u, h;
11938
11938
  (null == r ? void 0 : r.member_password_id) ? o.passwords.resetByEmailStart({
11939
11939
  email_address: i,
@@ -12009,12 +12009,12 @@ var md = za.button(_templateObject28 || (_templateObject28 = _taggedTemplateLite
12009
12009
  _Hn50 = _slicedToArray(_Hn49, 2),
12010
12010
  a = _Hn50[0],
12011
12011
  s = _Hn50[1],
12012
- _ql6 = ql("stytch.recoveryCodes.recover", function (t, _ref81) {
12013
- var _ref81$arg = _ref81.arg,
12014
- n = _ref81$arg.recoveryCode,
12015
- r = _ref81$arg.memberId,
12016
- o = _ref81$arg.organizationId,
12017
- i = _ref81$arg.sessionDurationMinutes;
12012
+ _ql6 = ql("stytch.recoveryCodes.recover", function (t, _ref86) {
12013
+ var _ref86$arg = _ref86.arg,
12014
+ n = _ref86$arg.recoveryCode,
12015
+ r = _ref86$arg.memberId,
12016
+ o = _ref86$arg.organizationId,
12017
+ i = _ref86$arg.sessionDurationMinutes;
12018
12018
  return e.recoveryCodes.recover({
12019
12019
  recovery_code: n,
12020
12020
  member_id: r,
@@ -12155,9 +12155,9 @@ var md = za.button(_templateObject28 || (_templateObject28 = _taggedTemplateLite
12155
12155
  }, function (e) {
12156
12156
  return e.theme.typography.fontFamily;
12157
12157
  }),
12158
- Fd = function Fd(_ref82) {
12159
- var e = _ref82.country,
12160
- t = _ref82.setCountry;
12158
+ Fd = function Fd(_ref87) {
12159
+ var e = _ref87.country,
12160
+ t = _ref87.setCountry;
12161
12161
  var n = new Intl.DisplayNames(["en"], {
12162
12162
  type: "region"
12163
12163
  });
@@ -12167,10 +12167,10 @@ var md = za.button(_templateObject28 || (_templateObject28 = _taggedTemplateLite
12167
12167
  onChange: function onChange(e) {
12168
12168
  t(e.target.value);
12169
12169
  }
12170
- }, Object.entries(Ve).map(function (_ref83) {
12171
- var _ref84 = _slicedToArray(_ref83, 2),
12172
- t = _ref84[0],
12173
- r = _ref84[1];
12170
+ }, Object.entries(Ke).map(function (_ref88) {
12171
+ var _ref89 = _slicedToArray(_ref88, 2),
12172
+ t = _ref89[0],
12173
+ r = _ref89[1];
12174
12174
  return lo.createElement("option", {
12175
12175
  key: t,
12176
12176
  value: t
@@ -12178,13 +12178,13 @@ var md = za.button(_templateObject28 || (_templateObject28 = _taggedTemplateLite
12178
12178
  }));
12179
12179
  },
12180
12180
  Nd = za(au)(_templateObject37 || (_templateObject37 = _taggedTemplateLiteral(["\n flex-grow: 1;\n"]))),
12181
- Ud = function Ud(_ref85) {
12182
- var e = _ref85.phone,
12183
- t = _ref85.setPhone,
12184
- n = _ref85.country,
12185
- r = _ref85.setCountry,
12186
- o = _ref85.parsePhoneNumber,
12187
- i = _ref85.hasPasskeys;
12181
+ Ud = function Ud(_ref90) {
12182
+ var e = _ref90.phone,
12183
+ t = _ref90.setPhone,
12184
+ n = _ref90.country,
12185
+ r = _ref90.setCountry,
12186
+ o = _ref90.parsePhoneNumber,
12187
+ i = _ref90.hasPasskeys;
12188
12188
  return lo.createElement(Dc, {
12189
12189
  direction: "row",
12190
12190
  wrap: "nowrap",
@@ -12261,8 +12261,8 @@ var $d = function $d() {
12261
12261
  regionCode: t
12262
12262
  });
12263
12263
  },
12264
- _ql7 = ql("stytch.otps.sms.send", function (e, _ref86) {
12265
- var t = _ref86.arg.parsedNumber;
12264
+ _ql7 = ql("stytch.otps.sms.send", function (e, _ref91) {
12265
+ var t = _ref91.arg.parsedNumber;
12266
12266
  return vt(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee19() {
12267
12267
  return _regeneratorRuntime().wrap(function _callee19$(_context19) {
12268
12268
  while (1) switch (_context19.prev = _context19.next) {
@@ -12285,7 +12285,7 @@ var $d = function $d() {
12285
12285
  response: e,
12286
12286
  countryCode: u,
12287
12287
  phoneNumber: p,
12288
- formattedPhoneNumber: "+".concat(Ve[u], " ").concat(p)
12288
+ formattedPhoneNumber: "+".concat(Ke[u], " ").concat(p)
12289
12289
  });
12290
12290
  },
12291
12291
  onError: function onError(e) {
@@ -12363,9 +12363,9 @@ var $d = function $d() {
12363
12363
  Hd = function Hd(e) {
12364
12364
  return e instanceof I && e.error_message ? e.error_message : e.message;
12365
12365
  },
12366
- Kd = function Kd(_ref87) {
12367
- var e = _ref87.onClick,
12368
- t = _ref87.children;
12366
+ Kd = function Kd(_ref92) {
12367
+ var e = _ref92.onClick,
12368
+ t = _ref92.children;
12369
12369
  return lo.createElement("button", {
12370
12370
  onClick: e,
12371
12371
  style: {
@@ -12377,44 +12377,44 @@ var $d = function $d() {
12377
12377
  }
12378
12378
  }, t));
12379
12379
  },
12380
- Vd = za.div(_templateObject38 || (_templateObject38 = _taggedTemplateLiteral(["\n display: grid;\n grid-template-rows: ", ";\n transition: grid-template-rows 0.15s ease-out;\n"])), function (_ref88) {
12381
- var e = _ref88.isOpen;
12380
+ Vd = za.div(_templateObject38 || (_templateObject38 = _taggedTemplateLiteral(["\n display: grid;\n grid-template-rows: ", ";\n transition: grid-template-rows 0.15s ease-out;\n"])), function (_ref93) {
12381
+ var e = _ref93.isOpen;
12382
12382
  return e ? "1fr" : "0fr";
12383
12383
  }),
12384
12384
  qd = za.div(_templateObject39 || (_templateObject39 = _taggedTemplateLiteral(["\n overflow: hidden;\n"]))),
12385
- Wd = function Wd(_ref89) {
12386
- var e = _ref89.isOpen,
12387
- t = _ref89.children;
12385
+ Wd = function Wd(_ref94) {
12386
+ var e = _ref94.isOpen,
12387
+ t = _ref94.children;
12388
12388
  return lo.createElement(Vd, {
12389
12389
  isOpen: e
12390
12390
  }, lo.createElement(qd, null, t));
12391
12391
  },
12392
- Gd = za.div(_templateObject40 || (_templateObject40 = _taggedTemplateLiteral(["\n height: 4px;\n background-color: ", ";\n border-radius: 3px;\n overflow: hidden;\n"])), function (_ref90) {
12393
- var e = _ref90.theme;
12392
+ Gd = za.div(_templateObject40 || (_templateObject40 = _taggedTemplateLiteral(["\n height: 4px;\n background-color: ", ";\n border-radius: 3px;\n overflow: hidden;\n"])), function (_ref95) {
12393
+ var e = _ref95.theme;
12394
12394
  return e.colors.disabled;
12395
12395
  }),
12396
12396
  Jd = Da(_templateObject41 || (_templateObject41 = _taggedTemplateLiteral(["\n 0% {\n transform: translateX(-100%);\n }\n 100% {\n transform: translateX(-1%);\n }\n"]))),
12397
- Yd = za.div(_templateObject42 || (_templateObject42 = _taggedTemplateLiteral(["\n height: 100%;\n width: 100%;\n background-color: ", ";\n animation: ", " 10s cubic-bezier(0.22, 1, 0.36, 1);\n"])), function (_ref91) {
12398
- var e = _ref91.theme;
12397
+ Yd = za.div(_templateObject42 || (_templateObject42 = _taggedTemplateLiteral(["\n height: 100%;\n width: 100%;\n background-color: ", ";\n animation: ", " 10s cubic-bezier(0.22, 1, 0.36, 1);\n"])), function (_ref96) {
12398
+ var e = _ref96.theme;
12399
12399
  return e.colors.primary;
12400
12400
  }, Jd),
12401
- Zd = function Zd(_ref92) {
12402
- var e = _ref92.isLoading;
12401
+ Zd = function Zd(_ref97) {
12402
+ var e = _ref97.isLoading;
12403
12403
  return lo.createElement(Gd, null, e && lo.createElement(Yd, null));
12404
12404
  },
12405
12405
  Xd = "46px",
12406
12406
  ep = "46px",
12407
- tp = za.div(_templateObject43 || (_templateObject43 = _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 (_ref93) {
12408
- var e = _ref93.disabled,
12409
- t = _ref93.theme;
12407
+ tp = za.div(_templateObject43 || (_templateObject43 = _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 (_ref98) {
12408
+ var e = _ref98.disabled,
12409
+ t = _ref98.theme;
12410
12410
  return e ? t.colors.disabled : "#ADBCC5";
12411
- }, ep, Xd, function (_ref94) {
12412
- var e = _ref94.disabled,
12413
- t = _ref94.theme;
12411
+ }, ep, Xd, function (_ref99) {
12412
+ var e = _ref99.disabled,
12413
+ t = _ref99.theme;
12414
12414
  return e ? t.colors.disabled : t.inputs.backgroundColor;
12415
- }, function (_ref95) {
12416
- var e = _ref95.disabled,
12417
- t = _ref95.theme;
12415
+ }, function (_ref100) {
12416
+ var e = _ref100.disabled,
12417
+ t = _ref100.theme;
12418
12418
  return e ? t.colors.disabledText : t.inputs.textColor;
12419
12419
  }),
12420
12420
  np = {
@@ -12444,20 +12444,20 @@ var $d = function $d() {
12444
12444
  paddingLeft: "calc(0.5 * ".concat(Xd, ")"),
12445
12445
  zIndex: 10
12446
12446
  },
12447
- ip = function ip(_ref96) {
12448
- var e = _ref96.index,
12449
- t = _ref96.disabled,
12450
- n = _ref96.otp;
12447
+ ip = function ip(_ref101) {
12448
+ var e = _ref101.index,
12449
+ t = _ref101.disabled,
12450
+ n = _ref101.otp;
12451
12451
  var r = n ? n[e] : "";
12452
12452
  return lo.createElement(tp, {
12453
12453
  disabled: t,
12454
12454
  "data-testid": "otp-".concat(e)
12455
12455
  }, r);
12456
12456
  },
12457
- ap = function ap(_ref97) {
12458
- var e = _ref97.otp,
12459
- t = _ref97.setOtp,
12460
- n = _ref97.disabled;
12457
+ ap = function ap(_ref102) {
12458
+ var e = _ref102.otp,
12459
+ t = _ref102.setOtp,
12460
+ n = _ref102.disabled;
12461
12461
  return lo.createElement("div", {
12462
12462
  style: rp
12463
12463
  }, lo.createElement("input", {
@@ -12485,10 +12485,10 @@ var $d = function $d() {
12485
12485
  });
12486
12486
  })));
12487
12487
  },
12488
- sp = function sp(_ref98) {
12489
- var e = _ref98.isSubmitting,
12490
- t = _ref98.onSubmit,
12491
- n = _ref98.errorMessage;
12488
+ sp = function sp(_ref103) {
12489
+ var e = _ref103.isSubmitting,
12490
+ t = _ref103.onSubmit,
12491
+ n = _ref103.errorMessage;
12492
12492
  var _Hn51 = Hn(""),
12493
12493
  _Hn52 = _slicedToArray(_Hn51, 2),
12494
12494
  r = _Hn52[0],
@@ -12517,13 +12517,13 @@ var $d = function $d() {
12517
12517
  errorMessage: null != n ? n : ""
12518
12518
  }));
12519
12519
  },
12520
- cp = function cp(_ref99) {
12521
- var e = _ref99.header,
12522
- t = _ref99.helperContent,
12523
- n = _ref99.instruction,
12524
- r = _ref99.isSubmitting,
12525
- o = _ref99.onSubmit,
12526
- i = _ref99.errorMessage;
12520
+ cp = function cp(_ref104) {
12521
+ var e = _ref104.header,
12522
+ t = _ref104.helperContent,
12523
+ n = _ref104.instruction,
12524
+ r = _ref104.isSubmitting,
12525
+ o = _ref104.onSubmit,
12526
+ i = _ref104.errorMessage;
12527
12527
  return lo.createElement(Dc, {
12528
12528
  direction: "column",
12529
12529
  gap: 24
@@ -12542,9 +12542,9 @@ var $d = function $d() {
12542
12542
  var t = new Date();
12543
12543
  return Math.ceil((e.getTime() - t.getTime()) / 1e3);
12544
12544
  },
12545
- up = function up(_ref100) {
12546
- var e = _ref100.expiration,
12547
- t = _ref100.resendOTP;
12545
+ up = function up(_ref105) {
12546
+ var e = _ref105.expiration,
12547
+ t = _ref105.resendOTP;
12548
12548
  var _Hn53 = Hn(function () {
12549
12549
  return lp(e);
12550
12550
  }),
@@ -12570,13 +12570,13 @@ var $d = function $d() {
12570
12570
  onClick: t
12571
12571
  }, "Resend code"));
12572
12572
  },
12573
- dp = function dp(_ref101) {
12574
- var e = _ref101.expiration,
12575
- t = _ref101.formattedDestination,
12576
- n = _ref101.isSubmitting,
12577
- r = _ref101.onSubmit,
12578
- o = _ref101.errorMessage,
12579
- i = _ref101.resendOTP;
12573
+ dp = function dp(_ref106) {
12574
+ var e = _ref106.expiration,
12575
+ t = _ref106.formattedDestination,
12576
+ n = _ref106.isSubmitting,
12577
+ r = _ref106.onSubmit,
12578
+ o = _ref106.errorMessage,
12579
+ i = _ref106.resendOTP;
12580
12580
  return lo.createElement(cp, {
12581
12581
  header: "Enter passcode",
12582
12582
  helperContent: lo.createElement(up, {
@@ -12609,10 +12609,10 @@ var $d = function $d() {
12609
12609
  u = _r$mfa$primaryInfo2.memberPhoneNumber,
12610
12610
  d = _r$mfa$primaryInfo2.organizationId,
12611
12611
  p = _r$mfa$primaryInfo2.organizationMfaOptionsSupported,
12612
- _ql8 = ql("stytch.otps.sms.send", function (e, _ref102) {
12613
- var _ref102$arg = _ref102.arg,
12614
- n = _ref102$arg.memberId,
12615
- r = _ref102$arg.organizationId;
12612
+ _ql8 = ql("stytch.otps.sms.send", function (e, _ref107) {
12613
+ var _ref107$arg = _ref107.arg,
12614
+ n = _ref107$arg.memberId,
12615
+ r = _ref107$arg.organizationId;
12616
12616
  return o({
12617
12617
  type: "sms_otp/send"
12618
12618
  }), t.otps.sms.send({
@@ -12636,12 +12636,12 @@ var $d = function $d() {
12636
12636
  h = _ql8.trigger,
12637
12637
  m = _ql8.isMutating,
12638
12638
  f = _ql8.error,
12639
- _ql9 = ql("stytch.otps.sms.authenticate", function (e, _ref103) {
12640
- var _ref103$arg = _ref103.arg,
12641
- n = _ref103$arg.otp,
12642
- r = _ref103$arg.memberId,
12643
- o = _ref103$arg.organizationId,
12644
- i = _ref103$arg.sessionDurationMinutes;
12639
+ _ql9 = ql("stytch.otps.sms.authenticate", function (e, _ref108) {
12640
+ var _ref108$arg = _ref108.arg,
12641
+ n = _ref108$arg.otp,
12642
+ r = _ref108$arg.memberId,
12643
+ o = _ref108$arg.organizationId,
12644
+ i = _ref108$arg.sessionDurationMinutes;
12645
12645
  return t.otps.sms.authenticate({
12646
12646
  code: n,
12647
12647
  member_id: r,
@@ -12834,10 +12834,10 @@ var mp = za.button(_templateObject44 || (_templateObject44 = _taggedTemplateLite
12834
12834
  _t$mfa$primaryInfo = t.mfa.primaryInfo,
12835
12835
  a = _t$mfa$primaryInfo.memberId,
12836
12836
  s = _t$mfa$primaryInfo.organizationId,
12837
- _ql10 = ql("stytch.totp.create", function (t, _ref104) {
12838
- var _ref104$arg = _ref104.arg,
12839
- r = _ref104$arg.memberId,
12840
- o = _ref104$arg.organizationId;
12837
+ _ql10 = ql("stytch.totp.create", function (t, _ref109) {
12838
+ var _ref109$arg = _ref109.arg,
12839
+ r = _ref109$arg.memberId,
12840
+ o = _ref109$arg.organizationId;
12841
12841
  return n({
12842
12842
  type: "totp/create"
12843
12843
  }), e.totp.create({
@@ -12892,11 +12892,11 @@ var mp = za.button(_templateObject44 || (_templateObject44 = _taggedTemplateLite
12892
12892
  }
12893
12893
  }, "Continue")) : lo.createElement(td, null));
12894
12894
  },
12895
- bp = function bp(_ref105) {
12896
- var e = _ref105.helperContent,
12897
- t = _ref105.isSubmitting,
12898
- n = _ref105.onSubmit,
12899
- r = _ref105.errorMessage;
12895
+ bp = function bp(_ref110) {
12896
+ var e = _ref110.helperContent,
12897
+ t = _ref110.isSubmitting,
12898
+ n = _ref110.onSubmit,
12899
+ r = _ref110.errorMessage;
12900
12900
  return lo.createElement(cp, {
12901
12901
  header: "Enter verification code",
12902
12902
  instruction: "Enter the 6-digit code from your authenticator app.",
@@ -12920,12 +12920,12 @@ var mp = za.button(_templateObject44 || (_templateObject44 = _taggedTemplateLite
12920
12920
  a = _n$mfa$primaryInfo2.memberId,
12921
12921
  s = _n$mfa$primaryInfo2.organizationId,
12922
12922
  c = _n$mfa$primaryInfo2.organizationMfaOptionsSupported,
12923
- _ql11 = ql("stytch.totp.authenticate", function (t, _ref106) {
12924
- var _ref106$arg = _ref106.arg,
12925
- n = _ref106$arg.memberId,
12926
- r = _ref106$arg.organizationId,
12927
- o = _ref106$arg.otp,
12928
- i = _ref106$arg.sessionDurationMinutes;
12923
+ _ql11 = ql("stytch.totp.authenticate", function (t, _ref111) {
12924
+ var _ref111$arg = _ref111.arg,
12925
+ n = _ref111$arg.memberId,
12926
+ r = _ref111$arg.organizationId,
12927
+ o = _ref111$arg.otp,
12928
+ i = _ref111$arg.sessionDurationMinutes;
12929
12929
  return e.totp.authenticate({
12930
12930
  code: o,
12931
12931
  member_id: n,
@@ -12993,20 +12993,20 @@ var mp = za.button(_templateObject44 || (_templateObject44 = _taggedTemplateLite
12993
12993
  }
12994
12994
  }, "Text me a code instead")));
12995
12995
  },
12996
- kp = za.div(_templateObject49 || (_templateObject49 = _taggedTemplateLiteral(["\n width: ", ";\n font-family: ", ";\n padding: 24px 32px;\n box-sizing: border-box;\n * {\n box-sizing: content-box;\n }\n background-color: ", ";\n border: ", ";\n border-radius: ", ";\n"])), function (_ref107) {
12997
- var e = _ref107.theme;
12996
+ kp = za.div(_templateObject49 || (_templateObject49 = _taggedTemplateLiteral(["\n width: ", ";\n font-family: ", ";\n padding: 24px 32px;\n box-sizing: border-box;\n * {\n box-sizing: content-box;\n }\n background-color: ", ";\n border: ", ";\n border-radius: ", ";\n"])), function (_ref112) {
12997
+ var e = _ref112.theme;
12998
12998
  return e.container.width;
12999
- }, function (_ref108) {
13000
- var e = _ref108.theme;
12999
+ }, function (_ref113) {
13000
+ var e = _ref113.theme;
13001
13001
  return e.typography.fontFamily;
13002
- }, function (_ref109) {
13003
- var e = _ref109.theme;
13002
+ }, function (_ref114) {
13003
+ var e = _ref114.theme;
13004
13004
  return e.container.backgroundColor;
13005
- }, function (_ref110) {
13006
- var e = _ref110.theme;
13005
+ }, function (_ref115) {
13006
+ var e = _ref115.theme;
13007
13007
  return e.container.border;
13008
- }, function (_ref111) {
13009
- var e = _ref111.theme;
13008
+ }, function (_ref116) {
13009
+ var e = _ref116.theme;
13010
13010
  return e.container.borderRadius;
13011
13011
  }),
13012
13012
  Ep = za.img(_templateObject50 || (_templateObject50 = _taggedTemplateLiteral(["\n width: 150px;\n"]))),
@@ -13046,8 +13046,8 @@ var mp = za.button(_templateObject44 || (_templateObject44 = _taggedTemplateLite
13046
13046
  screen: qa.Error
13047
13047
  });
13048
13048
  },
13049
- _ql12 = ql("stytch.magicLinks.authenticate", function (e, _ref113) {
13050
- var t = _ref113.arg.token;
13049
+ _ql12 = ql("stytch.magicLinks.authenticate", function (e, _ref118) {
13050
+ var t = _ref118.arg.token;
13051
13051
  return n.magicLinks.authenticate({
13052
13052
  magic_links_token: t,
13053
13053
  session_duration_minutes: r.sessionOptions.sessionDurationMinutes
@@ -13058,8 +13058,8 @@ var mp = za.button(_templateObject44 || (_templateObject44 = _taggedTemplateLite
13058
13058
  }),
13059
13059
  u = _ql12.trigger,
13060
13060
  d = _ql12.isMutating,
13061
- _ql13 = ql("stytch.oauth.authenticate", function (e, _ref114) {
13062
- var t = _ref114.arg.token;
13061
+ _ql13 = ql("stytch.oauth.authenticate", function (e, _ref119) {
13062
+ var t = _ref119.arg.token;
13063
13063
  return n.oauth.authenticate({
13064
13064
  oauth_token: t,
13065
13065
  session_duration_minutes: r.sessionOptions.sessionDurationMinutes
@@ -13070,8 +13070,8 @@ var mp = za.button(_templateObject44 || (_templateObject44 = _taggedTemplateLite
13070
13070
  }),
13071
13071
  p = _ql13.trigger,
13072
13072
  h = _ql13.isMutating,
13073
- _ql14 = ql("stytch.oauth.discovery.authenticate", function (e, _ref115) {
13074
- var t = _ref115.arg.token;
13073
+ _ql14 = ql("stytch.oauth.discovery.authenticate", function (e, _ref120) {
13074
+ var t = _ref120.arg.token;
13075
13075
  return n.oauth.discovery.authenticate({
13076
13076
  discovery_oauth_token: t
13077
13077
  });
@@ -13081,8 +13081,8 @@ var mp = za.button(_templateObject44 || (_templateObject44 = _taggedTemplateLite
13081
13081
  }),
13082
13082
  m = _ql14.trigger,
13083
13083
  f = _ql14.isMutating,
13084
- _ql15 = ql("stytch.sso.authenticate", function (e, _ref116) {
13085
- var t = _ref116.arg.token;
13084
+ _ql15 = ql("stytch.sso.authenticate", function (e, _ref121) {
13085
+ var t = _ref121.arg.token;
13086
13086
  return n.sso.authenticate({
13087
13087
  sso_token: t,
13088
13088
  session_duration_minutes: r.sessionOptions.sessionDurationMinutes
@@ -13093,8 +13093,8 @@ var mp = za.button(_templateObject44 || (_templateObject44 = _taggedTemplateLite
13093
13093
  }),
13094
13094
  g = _ql15.trigger,
13095
13095
  _ = _ql15.isMutating,
13096
- _ql16 = ql("stytch.magicLinks.discovery.authenticate", function (e, _ref117) {
13097
- var t = _ref117.arg.token;
13096
+ _ql16 = ql("stytch.magicLinks.discovery.authenticate", function (e, _ref122) {
13097
+ var t = _ref122.arg.token;
13098
13098
  return n.magicLinks.discovery.authenticate({
13099
13099
  discovery_magic_links_token: t
13100
13100
  });
@@ -13104,7 +13104,7 @@ var mp = za.button(_templateObject44 || (_templateObject44 = _taggedTemplateLite
13104
13104
  }),
13105
13105
  A = _ql16.trigger,
13106
13106
  v = _ql16.isMutating,
13107
- _ref112 = function () {
13107
+ _ref117 = function () {
13108
13108
  var _es55 = es(),
13109
13109
  _es56 = _slicedToArray(_es55, 2),
13110
13110
  e = _es56[0],
@@ -13115,12 +13115,12 @@ var mp = za.button(_templateObject44 || (_templateObject44 = _taggedTemplateLite
13115
13115
  r = _Hn56[1],
13116
13116
  o = Xa(),
13117
13117
  i = Yl(n),
13118
- _ql17 = ql("stytch.searchOrganization", function (e, _ref118) {
13119
- var t = _ref118.arg.slug;
13118
+ _ql17 = ql("stytch.searchOrganization", function (e, _ref123) {
13119
+ var t = _ref123.arg.slug;
13120
13120
  return Qt(o).searchManager.searchOrganization(t);
13121
13121
  }, {
13122
- onSuccess: function onSuccess(_ref119) {
13123
- var e = _ref119.organization;
13122
+ onSuccess: function onSuccess(_ref124) {
13123
+ var e = _ref124.organization;
13124
13124
  t(null === e ? {
13125
13125
  type: "transition",
13126
13126
  screen: qa.ErrorOrganization
@@ -13133,8 +13133,8 @@ var mp = za.button(_templateObject44 || (_templateObject44 = _taggedTemplateLite
13133
13133
  a = _ql17.trigger,
13134
13134
  s = _ql17.isMutating;
13135
13135
  return Vn(function () {
13136
- Qt(o).bootstrap.getAsync().then(function (_ref120) {
13137
- var e = _ref120.slugPattern;
13136
+ Qt(o).bootstrap.getAsync().then(function (_ref125) {
13137
+ var e = _ref125.slugPattern;
13138
13138
  r(e);
13139
13139
  });
13140
13140
  }, [o]), Vn(function () {
@@ -13145,7 +13145,7 @@ var mp = za.button(_templateObject44 || (_templateObject44 = _taggedTemplateLite
13145
13145
  isSearching: s
13146
13146
  };
13147
13147
  }(),
13148
- b = _ref112.isSearching;
13148
+ b = _ref117.isSearching;
13149
13149
  return Vn(function () {
13150
13150
  var t = new URL(window.location.href),
13151
13151
  n = t.searchParams.get("stytch_token_type"),
@@ -13174,11 +13174,11 @@ var mp = za.button(_templateObject44 || (_templateObject44 = _taggedTemplateLite
13174
13174
  }))));
13175
13175
  },
13176
13176
  Cp = "stytch-b2b-ui",
13177
- xp = (Op = function Op(_ref121) {
13178
- var e = _ref121.client,
13179
- t = _ref121.styles,
13180
- n = _ref121.callbacks,
13181
- r = _ref121.config;
13177
+ xp = (Op = function Op(_ref126) {
13178
+ var e = _ref126.client,
13179
+ t = _ref126.styles,
13180
+ n = _ref126.callbacks,
13181
+ r = _ref126.config;
13182
13182
  var _Hn57 = Hn(function () {
13183
13183
  var _Qt$bootstrap$getSync3 = Qt(e).bootstrap.getSync(),
13184
13184
  t = _Qt$bootstrap$getSync3.displayWatermark;
@@ -13193,8 +13193,8 @@ var mp = za.button(_templateObject44 || (_templateObject44 = _taggedTemplateLite
13193
13193
  details: {
13194
13194
  options: r
13195
13195
  }
13196
- }), Qt(e).bootstrap.getAsync().then(function (_ref122) {
13197
- var e = _ref122.displayWatermark;
13196
+ }), Qt(e).bootstrap.getAsync().then(function (_ref127) {
13197
+ var e = _ref127.displayWatermark;
13198
13198
  i(e);
13199
13199
  });
13200
13200
  }, [e]);
@@ -13226,12 +13226,12 @@ var mp = za.button(_templateObject44 || (_templateObject44 = _taggedTemplateLite
13226
13226
  var r = /*#__PURE__*/function (_HTMLElement) {
13227
13227
  _inherits(r, _HTMLElement);
13228
13228
  function r(e) {
13229
- var _this10;
13229
+ var _this9;
13230
13230
  _classCallCheck(this, r);
13231
- _this10 = _callSuper(this, r), _this10.props = e, _this10.rootRef = _this10.attachShadow({
13231
+ _this9 = _callSuper(this, r), _this9.props = e, _this9.rootRef = _this9.attachShadow({
13232
13232
  mode: "open"
13233
13233
  });
13234
- return _this10;
13234
+ return _this9;
13235
13235
  }
13236
13236
  _createClass(r, [{
13237
13237
  key: "connectedCallback",
@@ -13276,10 +13276,10 @@ var mp = za.button(_templateObject44 || (_templateObject44 = _taggedTemplateLite
13276
13276
  var r = /*#__PURE__*/function (_HTMLElement2) {
13277
13277
  _inherits(r, _HTMLElement2);
13278
13278
  function r(e) {
13279
- var _this11;
13279
+ var _this10;
13280
13280
  _classCallCheck(this, r);
13281
- _this11 = _callSuper(this, r), _this11.props = e, _this11.rootRef = document.createElement("div"), _this11.append(_this11.rootRef);
13282
- return _this11;
13281
+ _this10 = _callSuper(this, r), _this10.props = e, _this10.rootRef = document.createElement("div"), _this10.append(_this10.rootRef);
13282
+ return _this10;
13283
13283
  }
13284
13284
  _createClass(r, [{
13285
13285
  key: "connectedCallback",
@@ -13312,7 +13312,7 @@ var Op, Pp;
13312
13312
  var Tp = /*#__PURE__*/function (_$t) {
13313
13313
  _inherits(Tp, _$t);
13314
13314
  function Tp() {
13315
- var _this12;
13315
+ var _this11;
13316
13316
  _classCallCheck(this, Tp);
13317
13317
  for (var _len6 = arguments.length, e = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
13318
13318
  e[_key6] = arguments[_key6];
@@ -13320,16 +13320,16 @@ var Tp = /*#__PURE__*/function (_$t) {
13320
13320
  !function (e) {
13321
13321
  var t = "StytchUIClient" === e ? "import { createStytchUIClient } from '@stytch/nextjs/ui';\n \nconst stytch = createStytchUIClient('public-token-...');\n" : "import { createStytchHeadlessClient } from '@stytch/nextjs/ui';\n \nconst stytch = createStytchHeadlessClient('public-token-...');\n";
13322
13322
  if ("undefined" == typeof window) throw new Error("The ".concat(e, " is not compatible with server-side environments.\nIf using nextjs, use the create").concat(e, " method instead.\n```\n").concat(t, "\n```\n"));
13323
- }("StytchUIClient"), _this12 = _callSuper(this, Tp, [].concat(e));
13324
- return _this12;
13323
+ }("StytchUIClient"), _this11 = _callSuper(this, Tp, [].concat(e));
13324
+ return _this11;
13325
13325
  }
13326
13326
  _createClass(Tp, [{
13327
13327
  key: "mount",
13328
- value: function mount(_ref123) {
13329
- var e = _ref123.elementId,
13330
- t = _ref123.styles,
13331
- n = _ref123.callbacks,
13332
- r = _ref123.config;
13328
+ value: function mount(_ref128) {
13329
+ var e = _ref128.elementId,
13330
+ t = _ref128.styles,
13331
+ n = _ref128.callbacks,
13332
+ r = _ref128.config;
13333
13333
  var o;
13334
13334
  var i = document.querySelector(e);
13335
13335
  if (!i) {