@neuctra/authix 1.1.57 → 1.1.58

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.
@@ -29,7 +29,7 @@ const br = Me("string"), re = Me("function"), Ft = Me("number"), Te = (t) => t !
29
29
  } catch {
30
30
  return !1;
31
31
  }
32
- }, vr = ie("Date"), Sr = ie("File"), kr = ie("Blob"), Er = ie("FileList"), Cr = (t) => Te(t) && re(t.pipe), Tr = (t) => {
32
+ }, Sr = ie("Date"), vr = ie("File"), kr = ie("Blob"), Er = ie("FileList"), Cr = (t) => Te(t) && re(t.pipe), Tr = (t) => {
33
33
  let e;
34
34
  return t && (typeof FormData == "function" && t instanceof FormData || re(t.append) && ((e = qe(t)) === "formdata" || // detect form-data instance
35
35
  e === "object" && re(t.toString) && t.toString() === "[object FormData]"));
@@ -194,8 +194,8 @@ const Xr = (t) => {
194
194
  isResponse: Or,
195
195
  isHeaders: Ar,
196
196
  isUndefined: ye,
197
- isDate: vr,
198
- isFile: Sr,
197
+ isDate: Sr,
198
+ isFile: vr,
199
199
  isBlob: kr,
200
200
  isRegExp: Hr,
201
201
  isFunction: re,
@@ -283,8 +283,8 @@ Object.defineProperties(L, Vt);
283
283
  Object.defineProperty(Ht, "isAxiosError", { value: !0 });
284
284
  L.from = (t, e, r, s, a, o) => {
285
285
  const i = Object.create(Ht);
286
- p.toFlatObject(t, i, function(d) {
287
- return d !== Error.prototype;
286
+ p.toFlatObject(t, i, function(u) {
287
+ return u !== Error.prototype;
288
288
  }, (c) => c !== "isAxiosError");
289
289
  const l = t && t.message ? t.message : "Error", h = e == null && t ? t.code : e;
290
290
  return L.call(i, l, h, r, s, a), t && i.cause == null && Object.defineProperty(i, "cause", { value: t, configurable: !0 }), i.name = t && t.name || "Error", o && Object.assign(i, o), i;
@@ -317,25 +317,25 @@ function We(t, e, r) {
317
317
  }, !1, function(j, m) {
318
318
  return !p.isUndefined(m[j]);
319
319
  });
320
- const s = r.metaTokens, a = r.visitor || d, o = r.dots, i = r.indexes, h = (r.Blob || typeof Blob < "u" && Blob) && p.isSpecCompliantForm(e);
320
+ const s = r.metaTokens, a = r.visitor || u, o = r.dots, i = r.indexes, h = (r.Blob || typeof Blob < "u" && Blob) && p.isSpecCompliantForm(e);
321
321
  if (!p.isFunction(a))
322
322
  throw new TypeError("visitor must be a function");
323
- function c(u) {
324
- if (u === null) return "";
325
- if (p.isDate(u))
326
- return u.toISOString();
327
- if (p.isBoolean(u))
328
- return u.toString();
329
- if (!h && p.isBlob(u))
323
+ function c(d) {
324
+ if (d === null) return "";
325
+ if (p.isDate(d))
326
+ return d.toISOString();
327
+ if (p.isBoolean(d))
328
+ return d.toString();
329
+ if (!h && p.isBlob(d))
330
330
  throw new L("Blob is not supported. Use a Buffer instead.");
331
- return p.isArrayBuffer(u) || p.isTypedArray(u) ? h && typeof Blob == "function" ? new Blob([u]) : Buffer.from(u) : u;
331
+ return p.isArrayBuffer(d) || p.isTypedArray(d) ? h && typeof Blob == "function" ? new Blob([d]) : Buffer.from(d) : d;
332
332
  }
333
- function d(u, j, m) {
334
- let $ = u;
335
- if (u && !m && typeof u == "object") {
333
+ function u(d, j, m) {
334
+ let $ = d;
335
+ if (d && !m && typeof d == "object") {
336
336
  if (p.endsWith(j, "{}"))
337
- j = s ? j : j.slice(0, -2), u = JSON.stringify(u);
338
- else if (p.isArray(u) && nn(u) || (p.isFileList(u) || p.endsWith(j, "[]")) && ($ = p.toArray(u)))
337
+ j = s ? j : j.slice(0, -2), d = JSON.stringify(d);
338
+ else if (p.isArray(d) && nn(d) || (p.isFileList(d) || p.endsWith(j, "[]")) && ($ = p.toArray(d)))
339
339
  return j = Yt(j), $.forEach(function(z, C) {
340
340
  !(p.isUndefined(z) || z === null) && e.append(
341
341
  // eslint-disable-next-line no-nested-ternary
@@ -344,18 +344,18 @@ function We(t, e, r) {
344
344
  );
345
345
  }), !1;
346
346
  }
347
- return Qe(u) ? !0 : (e.append(gt(m, j, o), c(u)), !1);
347
+ return Qe(d) ? !0 : (e.append(gt(m, j, o), c(d)), !1);
348
348
  }
349
349
  const b = [], y = Object.assign(sn, {
350
- defaultVisitor: d,
350
+ defaultVisitor: u,
351
351
  convertValue: c,
352
352
  isVisitable: Qe
353
353
  });
354
- function w(u, j) {
355
- if (!p.isUndefined(u)) {
356
- if (b.indexOf(u) !== -1)
354
+ function w(d, j) {
355
+ if (!p.isUndefined(d)) {
356
+ if (b.indexOf(d) !== -1)
357
357
  throw Error("Circular reference detected in " + j.join("."));
358
- b.push(u), p.forEach(u, function($, R) {
358
+ b.push(d), p.forEach(d, function($, R) {
359
359
  (!(p.isUndefined($) || $ === null) && a.call(
360
360
  e,
361
361
  $,
@@ -635,7 +635,7 @@ const bn = p.toObjectSet([
635
635
  a = i.indexOf(":"), r = i.substring(0, a).trim().toLowerCase(), s = i.substring(a + 1).trim(), !(!r || e[r] && bn[r]) && (r === "set-cookie" ? e[r] ? e[r].push(s) : e[r] = [s] : e[r] = e[r] ? e[r] + ", " + s : s);
636
636
  }), e;
637
637
  }, bt = Symbol("internals");
638
- function Se(t) {
638
+ function ve(t) {
639
639
  return t && String(t).trim().toLowerCase();
640
640
  }
641
641
  function $e(t) {
@@ -648,7 +648,7 @@ function jn(t) {
648
648
  e[s[1]] = s[2];
649
649
  return e;
650
650
  }
651
- const vn = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
651
+ const Sn = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
652
652
  function Ye(t, e, r, s, a) {
653
653
  if (p.isFunction(s))
654
654
  return s.call(this, e, r);
@@ -659,7 +659,7 @@ function Ye(t, e, r, s, a) {
659
659
  return s.test(e);
660
660
  }
661
661
  }
662
- function Sn(t) {
662
+ function vn(t) {
663
663
  return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, r, s) => r.toUpperCase() + s);
664
664
  }
665
665
  function kn(t, e) {
@@ -680,23 +680,23 @@ let ne = class {
680
680
  set(e, r, s) {
681
681
  const a = this;
682
682
  function o(l, h, c) {
683
- const d = Se(h);
684
- if (!d)
683
+ const u = ve(h);
684
+ if (!u)
685
685
  throw new Error("header name must be a non-empty string");
686
- const b = p.findKey(a, d);
686
+ const b = p.findKey(a, u);
687
687
  (!b || a[b] === void 0 || c === !0 || c === void 0 && a[b] !== !1) && (a[b || h] = $e(l));
688
688
  }
689
- const i = (l, h) => p.forEach(l, (c, d) => o(c, d, h));
689
+ const i = (l, h) => p.forEach(l, (c, u) => o(c, u, h));
690
690
  if (p.isPlainObject(e) || e instanceof this.constructor)
691
691
  i(e, r);
692
- else if (p.isString(e) && (e = e.trim()) && !vn(e))
692
+ else if (p.isString(e) && (e = e.trim()) && !Sn(e))
693
693
  i(wn(e), r);
694
694
  else if (p.isObject(e) && p.isIterable(e)) {
695
695
  let l = {}, h, c;
696
- for (const d of e) {
697
- if (!p.isArray(d))
696
+ for (const u of e) {
697
+ if (!p.isArray(u))
698
698
  throw TypeError("Object iterator must return a key-value pair");
699
- l[c = d[0]] = (h = l[c]) ? p.isArray(h) ? [...h, d[1]] : [h, d[1]] : d[1];
699
+ l[c = u[0]] = (h = l[c]) ? p.isArray(h) ? [...h, u[1]] : [h, u[1]] : u[1];
700
700
  }
701
701
  i(l, r);
702
702
  } else
@@ -704,7 +704,7 @@ let ne = class {
704
704
  return this;
705
705
  }
706
706
  get(e, r) {
707
- if (e = Se(e), e) {
707
+ if (e = ve(e), e) {
708
708
  const s = p.findKey(this, e);
709
709
  if (s) {
710
710
  const a = this[s];
@@ -721,7 +721,7 @@ let ne = class {
721
721
  }
722
722
  }
723
723
  has(e, r) {
724
- if (e = Se(e), e) {
724
+ if (e = ve(e), e) {
725
725
  const s = p.findKey(this, e);
726
726
  return !!(s && this[s] !== void 0 && (!r || Ye(this, this[s], s, r)));
727
727
  }
@@ -731,7 +731,7 @@ let ne = class {
731
731
  const s = this;
732
732
  let a = !1;
733
733
  function o(i) {
734
- if (i = Se(i), i) {
734
+ if (i = ve(i), i) {
735
735
  const l = p.findKey(s, i);
736
736
  l && (!r || Ye(s, s[l], l, r)) && (delete s[l], a = !0);
737
737
  }
@@ -755,7 +755,7 @@ let ne = class {
755
755
  r[i] = $e(a), delete r[o];
756
756
  return;
757
757
  }
758
- const l = e ? Sn(o) : String(o).trim();
758
+ const l = e ? vn(o) : String(o).trim();
759
759
  l !== o && delete r[o], r[l] = $e(a), s[l] = !0;
760
760
  }), this;
761
761
  }
@@ -793,7 +793,7 @@ let ne = class {
793
793
  accessors: {}
794
794
  }).accessors, a = this.prototype;
795
795
  function o(i) {
796
- const l = Se(i);
796
+ const l = ve(i);
797
797
  s[l] || (kn(a, i), s[l] = !0);
798
798
  }
799
799
  return p.isArray(e) ? e.forEach(o) : o(e), this;
@@ -845,25 +845,25 @@ function Cn(t, e) {
845
845
  const r = new Array(t), s = new Array(t);
846
846
  let a = 0, o = 0, i;
847
847
  return e = e !== void 0 ? e : 1e3, function(h) {
848
- const c = Date.now(), d = s[o];
848
+ const c = Date.now(), u = s[o];
849
849
  i || (i = c), r[a] = h, s[a] = c;
850
850
  let b = o, y = 0;
851
851
  for (; b !== a; )
852
852
  y += r[b++], b = b % t;
853
853
  if (a = (a + 1) % t, a === o && (o = (o + 1) % t), c - i < e)
854
854
  return;
855
- const w = d && c - d;
855
+ const w = u && c - u;
856
856
  return w ? Math.round(y * 1e3 / w) : void 0;
857
857
  };
858
858
  }
859
859
  function Tn(t, e) {
860
860
  let r = 0, s = 1e3 / e, a, o;
861
- const i = (c, d = Date.now()) => {
862
- r = d, a = null, o && (clearTimeout(o), o = null), t(...c);
861
+ const i = (c, u = Date.now()) => {
862
+ r = u, a = null, o && (clearTimeout(o), o = null), t(...c);
863
863
  };
864
864
  return [(...c) => {
865
- const d = Date.now(), b = d - r;
866
- b >= s ? i(c, d) : (a = c, o || (o = setTimeout(() => {
865
+ const u = Date.now(), b = u - r;
866
+ b >= s ? i(c, u) : (a = c, o || (o = setTimeout(() => {
867
867
  o = null, i(a);
868
868
  }, s - b)));
869
869
  }, () => a && i(a)];
@@ -872,7 +872,7 @@ const Ue = (t, e, r = 3) => {
872
872
  let s = 0;
873
873
  const a = Cn(50, 250);
874
874
  return Tn((o) => {
875
- const i = o.loaded, l = o.lengthComputable ? o.total : void 0, h = i - s, c = a(h), d = i <= l;
875
+ const i = o.loaded, l = o.lengthComputable ? o.total : void 0, h = i - s, c = a(h), u = i <= l;
876
876
  s = i;
877
877
  const b = {
878
878
  loaded: i,
@@ -880,7 +880,7 @@ const Ue = (t, e, r = 3) => {
880
880
  progress: l ? i / l : void 0,
881
881
  bytes: h,
882
882
  rate: c || void 0,
883
- estimated: c && l && d ? (l - i) / c : void 0,
883
+ estimated: c && l && u ? (l - i) / c : void 0,
884
884
  event: o,
885
885
  lengthComputable: l != null,
886
886
  [e ? "download" : "upload"]: !0
@@ -934,32 +934,32 @@ function er(t, e, r) {
934
934
  let s = !Pn(e);
935
935
  return t && (s || r == !1) ? On(t, e) : e;
936
936
  }
937
- const vt = (t) => t instanceof ne ? { ...t } : t;
937
+ const St = (t) => t instanceof ne ? { ...t } : t;
938
938
  function he(t, e) {
939
939
  e = e || {};
940
940
  const r = {};
941
- function s(c, d, b, y) {
942
- return p.isPlainObject(c) && p.isPlainObject(d) ? p.merge.call({ caseless: y }, c, d) : p.isPlainObject(d) ? p.merge({}, d) : p.isArray(d) ? d.slice() : d;
941
+ function s(c, u, b, y) {
942
+ return p.isPlainObject(c) && p.isPlainObject(u) ? p.merge.call({ caseless: y }, c, u) : p.isPlainObject(u) ? p.merge({}, u) : p.isArray(u) ? u.slice() : u;
943
943
  }
944
- function a(c, d, b, y) {
945
- if (p.isUndefined(d)) {
944
+ function a(c, u, b, y) {
945
+ if (p.isUndefined(u)) {
946
946
  if (!p.isUndefined(c))
947
947
  return s(void 0, c, b, y);
948
- } else return s(c, d, b, y);
948
+ } else return s(c, u, b, y);
949
949
  }
950
- function o(c, d) {
951
- if (!p.isUndefined(d))
952
- return s(void 0, d);
950
+ function o(c, u) {
951
+ if (!p.isUndefined(u))
952
+ return s(void 0, u);
953
953
  }
954
- function i(c, d) {
955
- if (p.isUndefined(d)) {
954
+ function i(c, u) {
955
+ if (p.isUndefined(u)) {
956
956
  if (!p.isUndefined(c))
957
957
  return s(void 0, c);
958
- } else return s(void 0, d);
958
+ } else return s(void 0, u);
959
959
  }
960
- function l(c, d, b) {
960
+ function l(c, u, b) {
961
961
  if (b in e)
962
- return s(c, d);
962
+ return s(c, u);
963
963
  if (b in t)
964
964
  return s(void 0, c);
965
965
  }
@@ -992,11 +992,11 @@ function he(t, e) {
992
992
  socketPath: i,
993
993
  responseEncoding: i,
994
994
  validateStatus: l,
995
- headers: (c, d, b) => a(vt(c), vt(d), b, !0)
995
+ headers: (c, u, b) => a(St(c), St(u), b, !0)
996
996
  };
997
- return p.forEach(Object.keys({ ...t, ...e }), function(d) {
998
- const b = h[d] || a, y = b(t[d], e[d], d);
999
- p.isUndefined(y) && b !== l || (r[d] = y);
997
+ return p.forEach(Object.keys({ ...t, ...e }), function(u) {
998
+ const b = h[u] || a, y = b(t[u], e[u], u);
999
+ p.isUndefined(y) && b !== l || (r[u] = y);
1000
1000
  }), r;
1001
1001
  }
1002
1002
  const tr = (t) => {
@@ -1010,8 +1010,8 @@ const tr = (t) => {
1010
1010
  i.setContentType(void 0);
1011
1011
  else if (p.isFunction(r.getHeaders)) {
1012
1012
  const h = r.getHeaders(), c = ["content-type", "content-length"];
1013
- Object.entries(h).forEach(([d, b]) => {
1014
- c.includes(d.toLowerCase()) && i.set(d, b);
1013
+ Object.entries(h).forEach(([u, b]) => {
1014
+ c.includes(u.toLowerCase()) && i.set(u, b);
1015
1015
  });
1016
1016
  }
1017
1017
  }
@@ -1025,9 +1025,9 @@ const tr = (t) => {
1025
1025
  const a = tr(t);
1026
1026
  let o = a.data;
1027
1027
  const i = ne.from(a.headers).normalize();
1028
- let { responseType: l, onUploadProgress: h, onDownloadProgress: c } = a, d, b, y, w, u;
1028
+ let { responseType: l, onUploadProgress: h, onDownloadProgress: c } = a, u, b, y, w, d;
1029
1029
  function j() {
1030
- w && w(), u && u(), a.cancelToken && a.cancelToken.unsubscribe(d), a.signal && a.signal.removeEventListener("abort", d);
1030
+ w && w(), d && d(), a.cancelToken && a.cancelToken.unsubscribe(u), a.signal && a.signal.removeEventListener("abort", u);
1031
1031
  }
1032
1032
  let m = new XMLHttpRequest();
1033
1033
  m.open(a.method.toUpperCase(), a.url, !0), m.timeout = a.timeout;
@@ -1068,9 +1068,9 @@ const tr = (t) => {
1068
1068
  )), m = null;
1069
1069
  }, o === void 0 && i.setContentType(null), "setRequestHeader" in m && p.forEach(i.toJSON(), function(C, q) {
1070
1070
  m.setRequestHeader(q, C);
1071
- }), p.isUndefined(a.withCredentials) || (m.withCredentials = !!a.withCredentials), l && l !== "json" && (m.responseType = a.responseType), c && ([y, u] = Ue(c, !0), m.addEventListener("progress", y)), h && m.upload && ([b, w] = Ue(h), m.upload.addEventListener("progress", b), m.upload.addEventListener("loadend", w)), (a.cancelToken || a.signal) && (d = (z) => {
1071
+ }), p.isUndefined(a.withCredentials) || (m.withCredentials = !!a.withCredentials), l && l !== "json" && (m.responseType = a.responseType), c && ([y, d] = Ue(c, !0), m.addEventListener("progress", y)), h && m.upload && ([b, w] = Ue(h), m.upload.addEventListener("progress", b), m.upload.addEventListener("loadend", w)), (a.cancelToken || a.signal) && (u = (z) => {
1072
1072
  m && (s(!z || z.type ? new je(null, t, m) : z), m.abort(), m = null);
1073
- }, a.cancelToken && a.cancelToken.subscribe(d), a.signal && (a.signal.aborted ? d() : a.signal.addEventListener("abort", d)));
1073
+ }, a.cancelToken && a.cancelToken.subscribe(u), a.signal && (a.signal.aborted ? u() : a.signal.addEventListener("abort", u)));
1074
1074
  const R = En(a.url);
1075
1075
  if (R && ee.protocols.indexOf(R) === -1) {
1076
1076
  s(new L("Unsupported protocol " + R + ":", L.ERR_BAD_REQUEST, t));
@@ -1085,8 +1085,8 @@ const tr = (t) => {
1085
1085
  const o = function(c) {
1086
1086
  if (!a) {
1087
1087
  a = !0, l();
1088
- const d = c instanceof Error ? c : this.reason;
1089
- s.abort(d instanceof L ? d : new je(d instanceof Error ? d.message : d));
1088
+ const u = c instanceof Error ? c : this.reason;
1089
+ s.abort(u instanceof L ? u : new je(u instanceof Error ? u.message : u));
1090
1090
  }
1091
1091
  };
1092
1092
  let i = e && setTimeout(() => {
@@ -1129,7 +1129,7 @@ const tr = (t) => {
1129
1129
  } finally {
1130
1130
  await e.cancel();
1131
1131
  }
1132
- }, St = (t, e, r, s) => {
1132
+ }, vt = (t, e, r, s) => {
1133
1133
  const a = Nn(t, e);
1134
1134
  let o = 0, i, l = (h) => {
1135
1135
  i || (i = !0, s && s(h));
@@ -1137,17 +1137,17 @@ const tr = (t) => {
1137
1137
  return new ReadableStream({
1138
1138
  async pull(h) {
1139
1139
  try {
1140
- const { done: c, value: d } = await a.next();
1140
+ const { done: c, value: u } = await a.next();
1141
1141
  if (c) {
1142
1142
  l(), h.close();
1143
1143
  return;
1144
1144
  }
1145
- let b = d.byteLength;
1145
+ let b = u.byteLength;
1146
1146
  if (r) {
1147
1147
  let y = o += b;
1148
1148
  r(y);
1149
1149
  }
1150
- h.enqueue(new Uint8Array(d));
1150
+ h.enqueue(new Uint8Array(u));
1151
1151
  } catch (c) {
1152
1152
  throw l(c), c;
1153
1153
  }
@@ -1177,46 +1177,46 @@ const tr = (t) => {
1177
1177
  const { fetch: e, Request: r, Response: s } = t, a = e ? Oe(e) : typeof fetch == "function", o = Oe(r), i = Oe(s);
1178
1178
  if (!a)
1179
1179
  return !1;
1180
- const l = a && Oe(Et), h = a && (typeof Ct == "function" ? /* @__PURE__ */ ((u) => (j) => u.encode(j))(new Ct()) : async (u) => new Uint8Array(await new r(u).arrayBuffer())), c = o && l && Tt(() => {
1181
- let u = !1;
1180
+ const l = a && Oe(Et), h = a && (typeof Ct == "function" ? /* @__PURE__ */ ((d) => (j) => d.encode(j))(new Ct()) : async (d) => new Uint8Array(await new r(d).arrayBuffer())), c = o && l && Tt(() => {
1181
+ let d = !1;
1182
1182
  const j = new r(ee.origin, {
1183
1183
  body: new Et(),
1184
1184
  method: "POST",
1185
1185
  get duplex() {
1186
- return u = !0, "half";
1186
+ return d = !0, "half";
1187
1187
  }
1188
1188
  }).headers.has("Content-Type");
1189
- return u && !j;
1190
- }), d = i && l && Tt(() => p.isReadableStream(new s("").body)), b = {
1191
- stream: d && ((u) => u.body)
1189
+ return d && !j;
1190
+ }), u = i && l && Tt(() => p.isReadableStream(new s("").body)), b = {
1191
+ stream: u && ((d) => d.body)
1192
1192
  };
1193
- a && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((u) => {
1194
- !b[u] && (b[u] = (j, m) => {
1195
- let $ = j && j[u];
1193
+ a && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((d) => {
1194
+ !b[d] && (b[d] = (j, m) => {
1195
+ let $ = j && j[d];
1196
1196
  if ($)
1197
1197
  return $.call(j);
1198
- throw new L(`Response type '${u}' is not supported`, L.ERR_NOT_SUPPORT, m);
1198
+ throw new L(`Response type '${d}' is not supported`, L.ERR_NOT_SUPPORT, m);
1199
1199
  });
1200
1200
  });
1201
- const y = async (u) => {
1202
- if (u == null)
1201
+ const y = async (d) => {
1202
+ if (d == null)
1203
1203
  return 0;
1204
- if (p.isBlob(u))
1205
- return u.size;
1206
- if (p.isSpecCompliantForm(u))
1204
+ if (p.isBlob(d))
1205
+ return d.size;
1206
+ if (p.isSpecCompliantForm(d))
1207
1207
  return (await new r(ee.origin, {
1208
1208
  method: "POST",
1209
- body: u
1209
+ body: d
1210
1210
  }).arrayBuffer()).byteLength;
1211
- if (p.isArrayBufferView(u) || p.isArrayBuffer(u))
1212
- return u.byteLength;
1213
- if (p.isURLSearchParams(u) && (u = u + ""), p.isString(u))
1214
- return (await h(u)).byteLength;
1215
- }, w = async (u, j) => {
1216
- const m = p.toFiniteNumber(u.getContentLength());
1211
+ if (p.isArrayBufferView(d) || p.isArrayBuffer(d))
1212
+ return d.byteLength;
1213
+ if (p.isURLSearchParams(d) && (d = d + ""), p.isString(d))
1214
+ return (await h(d)).byteLength;
1215
+ }, w = async (d, j) => {
1216
+ const m = p.toFiniteNumber(d.getContentLength());
1217
1217
  return m ?? y(j);
1218
1218
  };
1219
- return async (u) => {
1219
+ return async (d) => {
1220
1220
  let {
1221
1221
  url: j,
1222
1222
  method: m,
@@ -1227,10 +1227,10 @@ const tr = (t) => {
1227
1227
  onDownloadProgress: q,
1228
1228
  onUploadProgress: g,
1229
1229
  responseType: I,
1230
- headers: v,
1230
+ headers: S,
1231
1231
  withCredentials: D = "same-origin",
1232
1232
  fetchOptions: W
1233
- } = tr(u), F = e || fetch;
1233
+ } = tr(d), F = e || fetch;
1234
1234
  I = I ? (I + "").toLowerCase() : "text";
1235
1235
  let V = $n([R, z && z.toAbortSignal()], C), Z = null;
1236
1236
  const T = V && V.unsubscribe && (() => {
@@ -1238,18 +1238,18 @@ const tr = (t) => {
1238
1238
  });
1239
1239
  let J;
1240
1240
  try {
1241
- if (g && c && m !== "get" && m !== "head" && (J = await w(v, $)) !== 0) {
1241
+ if (g && c && m !== "get" && m !== "head" && (J = await w(S, $)) !== 0) {
1242
1242
  let f = new r(j, {
1243
1243
  method: "POST",
1244
1244
  body: $,
1245
1245
  duplex: "half"
1246
- }), S;
1247
- if (p.isFormData($) && (S = f.headers.get("content-type")) && v.setContentType(S), f.body) {
1246
+ }), v;
1247
+ if (p.isFormData($) && (v = f.headers.get("content-type")) && S.setContentType(v), f.body) {
1248
1248
  const [x, k] = wt(
1249
1249
  J,
1250
1250
  Ue(jt(g))
1251
1251
  );
1252
- $ = St(f.body, kt, x, k);
1252
+ $ = vt(f.body, kt, x, k);
1253
1253
  }
1254
1254
  }
1255
1255
  p.isString(D) || (D = D ? "include" : "omit");
@@ -1257,49 +1257,49 @@ const tr = (t) => {
1257
1257
  ...W,
1258
1258
  signal: V,
1259
1259
  method: m.toUpperCase(),
1260
- headers: v.normalize().toJSON(),
1260
+ headers: S.normalize().toJSON(),
1261
1261
  body: $,
1262
1262
  duplex: "half",
1263
1263
  credentials: A ? D : void 0
1264
1264
  };
1265
1265
  Z = o && new r(j, O);
1266
1266
  let K = await (o ? F(Z, W) : F(j, O));
1267
- const Q = d && (I === "stream" || I === "response");
1268
- if (d && (q || Q && T)) {
1267
+ const Q = u && (I === "stream" || I === "response");
1268
+ if (u && (q || Q && T)) {
1269
1269
  const f = {};
1270
1270
  ["status", "statusText", "headers"].forEach((_) => {
1271
1271
  f[_] = K[_];
1272
1272
  });
1273
- const S = p.toFiniteNumber(K.headers.get("content-length")), [x, k] = q && wt(
1274
- S,
1273
+ const v = p.toFiniteNumber(K.headers.get("content-length")), [x, k] = q && wt(
1274
+ v,
1275
1275
  Ue(jt(q), !0)
1276
1276
  ) || [];
1277
1277
  K = new s(
1278
- St(K.body, kt, x, () => {
1278
+ vt(K.body, kt, x, () => {
1279
1279
  k && k(), T && T();
1280
1280
  }),
1281
1281
  f
1282
1282
  );
1283
1283
  }
1284
1284
  I = I || "text";
1285
- let G = await b[p.findKey(b, I) || "text"](K, u);
1286
- return !Q && T && T(), await new Promise((f, S) => {
1287
- Qt(f, S, {
1285
+ let G = await b[p.findKey(b, I) || "text"](K, d);
1286
+ return !Q && T && T(), await new Promise((f, v) => {
1287
+ Qt(f, v, {
1288
1288
  data: G,
1289
1289
  headers: ne.from(K.headers),
1290
1290
  status: K.status,
1291
1291
  statusText: K.statusText,
1292
- config: u,
1292
+ config: d,
1293
1293
  request: Z
1294
1294
  });
1295
1295
  });
1296
1296
  } catch (A) {
1297
1297
  throw T && T(), A && A.name === "TypeError" && /Load failed|fetch/i.test(A.message) ? Object.assign(
1298
- new L("Network Error", L.ERR_NETWORK, u, Z),
1298
+ new L("Network Error", L.ERR_NETWORK, d, Z),
1299
1299
  {
1300
1300
  cause: A.cause || A
1301
1301
  }
1302
- ) : L.from(A, A && A.code, u, Z);
1302
+ ) : L.from(A, A && A.code, d, Z);
1303
1303
  }
1304
1304
  };
1305
1305
  }, Fn = /* @__PURE__ */ new Map(), rr = (t) => {
@@ -1309,9 +1309,9 @@ const tr = (t) => {
1309
1309
  a,
1310
1310
  r
1311
1311
  ];
1312
- let i = o.length, l = i, h, c, d = Fn;
1312
+ let i = o.length, l = i, h, c, u = Fn;
1313
1313
  for (; l--; )
1314
- h = o[l], c = d.get(h), c === void 0 && d.set(h, c = l ? /* @__PURE__ */ new Map() : Ln(e)), d = c;
1314
+ h = o[l], c = u.get(h), c === void 0 && u.set(h, c = l ? /* @__PURE__ */ new Map() : Ln(e)), u = c;
1315
1315
  return c;
1316
1316
  };
1317
1317
  rr();
@@ -1487,8 +1487,8 @@ let xe = class {
1487
1487
  );
1488
1488
  o && p.forEach(
1489
1489
  ["delete", "get", "head", "post", "put", "patch", "common"],
1490
- (u) => {
1491
- delete o[u];
1490
+ (d) => {
1491
+ delete o[d];
1492
1492
  }
1493
1493
  ), r.headers = ne.concat(i, o);
1494
1494
  const l = [];
@@ -1500,32 +1500,32 @@ let xe = class {
1500
1500
  this.interceptors.response.forEach(function(j) {
1501
1501
  c.push(j.fulfilled, j.rejected);
1502
1502
  });
1503
- let d, b = 0, y;
1503
+ let u, b = 0, y;
1504
1504
  if (!h) {
1505
- const u = [It.bind(this), void 0];
1506
- for (u.unshift(...l), u.push(...c), y = u.length, d = Promise.resolve(r); b < y; )
1507
- d = d.then(u[b++], u[b++]);
1508
- return d;
1505
+ const d = [It.bind(this), void 0];
1506
+ for (d.unshift(...l), d.push(...c), y = d.length, u = Promise.resolve(r); b < y; )
1507
+ u = u.then(d[b++], d[b++]);
1508
+ return u;
1509
1509
  }
1510
1510
  y = l.length;
1511
1511
  let w = r;
1512
1512
  for (; b < y; ) {
1513
- const u = l[b++], j = l[b++];
1513
+ const d = l[b++], j = l[b++];
1514
1514
  try {
1515
- w = u(w);
1515
+ w = d(w);
1516
1516
  } catch (m) {
1517
1517
  j.call(this, m);
1518
1518
  break;
1519
1519
  }
1520
1520
  }
1521
1521
  try {
1522
- d = It.call(this, w);
1523
- } catch (u) {
1524
- return Promise.reject(u);
1522
+ u = It.call(this, w);
1523
+ } catch (d) {
1524
+ return Promise.reject(d);
1525
1525
  }
1526
1526
  for (b = 0, y = c.length; b < y; )
1527
- d = d.then(c[b++], c[b++]);
1528
- return d;
1527
+ u = u.then(c[b++], c[b++]);
1528
+ return u;
1529
1529
  }
1530
1530
  getUri(e) {
1531
1531
  e = he(this.defaults, e);
@@ -2270,14 +2270,14 @@ function Yn() {
2270
2270
  case z:
2271
2271
  return (f._context.displayName || "Context") + ".Consumer";
2272
2272
  case q:
2273
- var S = f.render;
2274
- return f = f.displayName, f || (f = S.displayName || S.name || "", f = f !== "" ? "ForwardRef(" + f + ")" : "ForwardRef"), f;
2275
- case v:
2276
- return S = f.displayName || null, S !== null ? S : t(f.type) || "Memo";
2273
+ var v = f.render;
2274
+ return f = f.displayName, f || (f = v.displayName || v.name || "", f = f !== "" ? "ForwardRef(" + f + ")" : "ForwardRef"), f;
2275
+ case S:
2276
+ return v = f.displayName || null, v !== null ? v : t(f.type) || "Memo";
2277
2277
  case D:
2278
- S = f._payload, f = f._init;
2278
+ v = f._payload, f = f._init;
2279
2279
  try {
2280
- return t(f(S));
2280
+ return t(f(v));
2281
2281
  } catch {
2282
2282
  }
2283
2283
  }
@@ -2289,15 +2289,15 @@ function Yn() {
2289
2289
  function r(f) {
2290
2290
  try {
2291
2291
  e(f);
2292
- var S = !1;
2292
+ var v = !1;
2293
2293
  } catch {
2294
- S = !0;
2294
+ v = !0;
2295
2295
  }
2296
- if (S) {
2297
- S = console;
2298
- var x = S.error, k = typeof Symbol == "function" && Symbol.toStringTag && f[Symbol.toStringTag] || f.constructor.name || "Object";
2296
+ if (v) {
2297
+ v = console;
2298
+ var x = v.error, k = typeof Symbol == "function" && Symbol.toStringTag && f[Symbol.toStringTag] || f.constructor.name || "Object";
2299
2299
  return x.call(
2300
- S,
2300
+ v,
2301
2301
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
2302
2302
  k
2303
2303
  ), e(f);
@@ -2308,8 +2308,8 @@ function Yn() {
2308
2308
  if (typeof f == "object" && f !== null && f.$$typeof === D)
2309
2309
  return "<...>";
2310
2310
  try {
2311
- var S = t(f);
2312
- return S ? "<" + S + ">" : "<...>";
2311
+ var v = t(f);
2312
+ return v ? "<" + v + ">" : "<...>";
2313
2313
  } catch {
2314
2314
  return "<...>";
2315
2315
  }
@@ -2323,16 +2323,16 @@ function Yn() {
2323
2323
  }
2324
2324
  function i(f) {
2325
2325
  if (Z.call(f, "key")) {
2326
- var S = Object.getOwnPropertyDescriptor(f, "key").get;
2327
- if (S && S.isReactWarning) return !1;
2326
+ var v = Object.getOwnPropertyDescriptor(f, "key").get;
2327
+ if (v && v.isReactWarning) return !1;
2328
2328
  }
2329
2329
  return f.key !== void 0;
2330
2330
  }
2331
- function l(f, S) {
2331
+ function l(f, v) {
2332
2332
  function x() {
2333
2333
  A || (A = !0, console.error(
2334
2334
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
2335
- S
2335
+ v
2336
2336
  ));
2337
2337
  }
2338
2338
  x.isReactWarning = !0, Object.defineProperty(f, "key", {
@@ -2346,12 +2346,12 @@ function Yn() {
2346
2346
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
2347
2347
  )), f = this.props.ref, f !== void 0 ? f : null;
2348
2348
  }
2349
- function c(f, S, x, k, _, N) {
2349
+ function c(f, v, x, k, _, N) {
2350
2350
  var Y = x.ref;
2351
2351
  return f = {
2352
- $$typeof: u,
2352
+ $$typeof: d,
2353
2353
  type: f,
2354
- key: S,
2354
+ key: v,
2355
2355
  props: x,
2356
2356
  _owner: k
2357
2357
  }, (Y !== void 0 ? Y : null) !== null ? Object.defineProperty(f, "ref", {
@@ -2379,8 +2379,8 @@ function Yn() {
2379
2379
  value: N
2380
2380
  }), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
2381
2381
  }
2382
- function d(f, S, x, k, _, N) {
2383
- var Y = S.children;
2382
+ function u(f, v, x, k, _, N) {
2383
+ var Y = v.children;
2384
2384
  if (Y !== void 0)
2385
2385
  if (k)
2386
2386
  if (T(Y)) {
@@ -2392,10 +2392,10 @@ function Yn() {
2392
2392
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
2393
2393
  );
2394
2394
  else b(Y);
2395
- if (Z.call(S, "key")) {
2395
+ if (Z.call(v, "key")) {
2396
2396
  Y = t(f);
2397
- var se = Object.keys(S).filter(function(ve) {
2398
- return ve !== "key";
2397
+ var se = Object.keys(v).filter(function(Se) {
2398
+ return Se !== "key";
2399
2399
  });
2400
2400
  k = 0 < se.length ? "{key: someKey, " + se.join(": ..., ") + ": ...}" : "{key: someKey}", G[Y + k] || (se = 0 < se.length ? "{" + se.join(": ..., ") + ": ...}" : "{}", console.error(
2401
2401
  `A props object containing a "key" prop is being spread into JSX:
@@ -2410,11 +2410,11 @@ React keys must be passed directly to JSX without using spread:
2410
2410
  Y
2411
2411
  ), G[Y + k] = !0);
2412
2412
  }
2413
- if (Y = null, x !== void 0 && (r(x), Y = "" + x), i(S) && (r(S.key), Y = "" + S.key), "key" in S) {
2413
+ if (Y = null, x !== void 0 && (r(x), Y = "" + x), i(v) && (r(v.key), Y = "" + v.key), "key" in v) {
2414
2414
  x = {};
2415
- for (var ue in S)
2416
- ue !== "key" && (x[ue] = S[ue]);
2417
- } else x = S;
2415
+ for (var ue in v)
2416
+ ue !== "key" && (x[ue] = v[ue]);
2417
+ } else x = v;
2418
2418
  return Y && l(
2419
2419
  x,
2420
2420
  typeof f == "function" ? f.displayName || f.name || "Unknown" : f
@@ -2431,9 +2431,9 @@ React keys must be passed directly to JSX without using spread:
2431
2431
  y(f) ? f._store && (f._store.validated = 1) : typeof f == "object" && f !== null && f.$$typeof === D && (f._payload.status === "fulfilled" ? y(f._payload.value) && f._payload.value._store && (f._payload.value._store.validated = 1) : f._store && (f._store.validated = 1));
2432
2432
  }
2433
2433
  function y(f) {
2434
- return typeof f == "object" && f !== null && f.$$typeof === u;
2434
+ return typeof f == "object" && f !== null && f.$$typeof === d;
2435
2435
  }
2436
- var w = Le, u = Symbol.for("react.transitional.element"), j = Symbol.for("react.portal"), m = Symbol.for("react.fragment"), $ = Symbol.for("react.strict_mode"), R = Symbol.for("react.profiler"), z = Symbol.for("react.consumer"), C = Symbol.for("react.context"), q = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), I = Symbol.for("react.suspense_list"), v = Symbol.for("react.memo"), D = Symbol.for("react.lazy"), W = Symbol.for("react.activity"), F = Symbol.for("react.client.reference"), V = w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Z = Object.prototype.hasOwnProperty, T = Array.isArray, J = console.createTask ? console.createTask : function() {
2436
+ var w = Le, d = Symbol.for("react.transitional.element"), j = Symbol.for("react.portal"), m = Symbol.for("react.fragment"), $ = Symbol.for("react.strict_mode"), R = Symbol.for("react.profiler"), z = Symbol.for("react.consumer"), C = Symbol.for("react.context"), q = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), I = Symbol.for("react.suspense_list"), S = Symbol.for("react.memo"), D = Symbol.for("react.lazy"), W = Symbol.for("react.activity"), F = Symbol.for("react.client.reference"), V = w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Z = Object.prototype.hasOwnProperty, T = Array.isArray, J = console.createTask ? console.createTask : function() {
2437
2437
  return null;
2438
2438
  };
2439
2439
  w = {
@@ -2445,21 +2445,21 @@ React keys must be passed directly to JSX without using spread:
2445
2445
  w,
2446
2446
  o
2447
2447
  )(), Q = J(s(o)), G = {};
2448
- Ee.Fragment = m, Ee.jsx = function(f, S, x) {
2448
+ Ee.Fragment = m, Ee.jsx = function(f, v, x) {
2449
2449
  var k = 1e4 > V.recentlyCreatedOwnerStacks++;
2450
- return d(
2450
+ return u(
2451
2451
  f,
2452
- S,
2452
+ v,
2453
2453
  x,
2454
2454
  !1,
2455
2455
  k ? Error("react-stack-top-frame") : K,
2456
2456
  k ? J(s(f)) : Q
2457
2457
  );
2458
- }, Ee.jsxs = function(f, S, x) {
2458
+ }, Ee.jsxs = function(f, v, x) {
2459
2459
  var k = 1e4 > V.recentlyCreatedOwnerStacks++;
2460
- return d(
2460
+ return u(
2461
2461
  f,
2462
- S,
2462
+ v,
2463
2463
  x,
2464
2464
  !0,
2465
2465
  k ? Error("react-stack-top-frame") : K,
@@ -2474,7 +2474,7 @@ function Kn() {
2474
2474
  }
2475
2475
  var n = Kn();
2476
2476
  const Jn = async (t, e) => {
2477
- const { name: r, email: s, password: a, appId: o, phone: i, address: l, avatarUrl: h, isActive: c = !0, role: d = "user" } = t, { baseUrl: b, apiKey: y } = e;
2477
+ const { name: r, email: s, password: a, appId: o, phone: i, address: l, avatarUrl: h, isActive: c = !0, role: u = "user" } = t, { baseUrl: b, apiKey: y } = e;
2478
2478
  if (!y)
2479
2479
  throw new Error("API key is required for signup");
2480
2480
  if (!r || !s || !a || !o)
@@ -2491,7 +2491,7 @@ const Jn = async (t, e) => {
2491
2491
  address: l,
2492
2492
  avatarUrl: h,
2493
2493
  isActive: c,
2494
- role: d
2494
+ role: u
2495
2495
  },
2496
2496
  {
2497
2497
  headers: {
@@ -2502,15 +2502,15 @@ const Jn = async (t, e) => {
2502
2502
  );
2503
2503
  return w.data?.user && localStorage.setItem("userInfo", JSON.stringify(w.data.user)), w.data.user;
2504
2504
  } catch (w) {
2505
- const u = w.response?.data?.message || w.message || "Signup failed";
2506
- if (console.error("Signup API Error:", u), w.response?.status === 400) {
2507
- if (u.includes("already exists"))
2505
+ const d = w.response?.data?.message || w.message || "Signup failed";
2506
+ if (console.error("Signup API Error:", d), w.response?.status === 400) {
2507
+ if (d.includes("already exists"))
2508
2508
  throw {
2509
2509
  success: !1,
2510
2510
  message: "User with this email already exists for this app",
2511
2511
  status: 400
2512
2512
  };
2513
- if (u.includes("inactive"))
2513
+ if (d.includes("inactive"))
2514
2514
  throw {
2515
2515
  success: !1,
2516
2516
  message: "Cannot signup under an inactive app",
@@ -2523,7 +2523,7 @@ const Jn = async (t, e) => {
2523
2523
  status: 404
2524
2524
  } : {
2525
2525
  success: !1,
2526
- message: u,
2526
+ message: d,
2527
2527
  status: w.response?.status || 500
2528
2528
  };
2529
2529
  }
@@ -2592,7 +2592,7 @@ const es = Nt(
2592
2592
  ...l
2593
2593
  },
2594
2594
  [
2595
- ...i.map(([c, d]) => Xe(c, d)),
2595
+ ...i.map(([c, u]) => Xe(c, u)),
2596
2596
  ...Array.isArray(o) ? o : [o]
2597
2597
  ]
2598
2598
  )
@@ -2821,17 +2821,17 @@ const js = [
2821
2821
  ["path", { d: "m4.9 19.1 2.9-2.9", key: "bwix9q" }],
2822
2822
  ["path", { d: "M2 12h4", key: "j09sii" }],
2823
2823
  ["path", { d: "m4.9 4.9 2.9 2.9", key: "giyufr" }]
2824
- ], vs = B("loader", js);
2824
+ ], Ss = B("loader", js);
2825
2825
  /**
2826
2826
  * @license lucide-react v0.544.0 - ISC
2827
2827
  *
2828
2828
  * This source code is licensed under the ISC license.
2829
2829
  * See the LICENSE file in the root directory of this source tree.
2830
2830
  */
2831
- const Ss = [
2831
+ const vs = [
2832
2832
  ["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
2833
2833
  ["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }]
2834
- ], me = B("lock", Ss);
2834
+ ], me = B("lock", vs);
2835
2835
  /**
2836
2836
  * @license lucide-react v0.544.0 - ISC
2837
2837
  *
@@ -3046,39 +3046,39 @@ const Ws = [
3046
3046
  showAvatar: h = !1,
3047
3047
  roles: c = [],
3048
3048
  // 🔥 FIXED
3049
- showRoleSelector: d = !1,
3049
+ showRoleSelector: u = !1,
3050
3050
  // 🔥 FIXED
3051
3051
  loginUrl: b,
3052
3052
  onSuccess: y,
3053
3053
  onError: w
3054
3054
  }) => {
3055
- const { baseUrl: u, apiKey: j, appId: m } = ge(), $ = {
3055
+ const { baseUrl: d, apiKey: j, appId: m } = ge(), $ = {
3056
3056
  name: "",
3057
3057
  email: "",
3058
3058
  password: "",
3059
3059
  role: c.length ? c[0] : "user",
3060
3060
  ...h && { avatarUrl: "" }
3061
- }, [R, z] = P($), [C, q] = P(!1), [g, I] = P(!1), [v, D] = P(null), [W, F] = P({}), [V, Z] = P(!1), T = l ? "#ffffff" : "#111827", J = l ? "#a1a1aa" : "#6b7280", A = l ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.02)", O = l ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)";
3061
+ }, [R, z] = P($), [C, q] = P(!1), [g, I] = P(!1), [S, D] = P(null), [W, F] = P({}), [V, Z] = P(!1), T = l ? "#ffffff" : "#111827", J = l ? "#a1a1aa" : "#6b7280", A = l ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.02)", O = l ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)";
3062
3062
  Le.useEffect(() => {
3063
3063
  if (typeof window < "u") {
3064
- const S = () => Z(window.innerWidth < 768);
3065
- return S(), window.addEventListener("resize", S), () => window.removeEventListener("resize", S);
3064
+ const v = () => Z(window.innerWidth < 768);
3065
+ return v(), window.addEventListener("resize", v), () => window.removeEventListener("resize", v);
3066
3066
  }
3067
3067
  }, []);
3068
- const K = (S) => {
3069
- const { name: x, value: k } = S.target;
3068
+ const K = (v) => {
3069
+ const { name: x, value: k } = v.target;
3070
3070
  z((_) => ({ ..._, [x]: k })), W[x] && F((_) => ({ ..._, [x]: void 0 }));
3071
3071
  }, Q = () => {
3072
- const S = {};
3073
- return R.name.trim() || (S.name = "Name is required"), R.email.trim() ? /\S+@\S+\.\S+/.test(R.email) || (S.email = "Invalid email address") : S.email = "Email is required", R.password ? R.password.length < 6 && (S.password = "Password must be at least 6 characters") : S.password = "Password is required", F(S), Object.keys(S).length === 0;
3074
- }, G = async (S) => {
3075
- if (S.preventDefault(), !!Q()) {
3072
+ const v = {};
3073
+ return R.name.trim() || (v.name = "Name is required"), R.email.trim() ? /\S+@\S+\.\S+/.test(R.email) || (v.email = "Invalid email address") : v.email = "Email is required", R.password ? R.password.length < 6 && (v.password = "Password must be at least 6 characters") : v.password = "Password is required", F(v), Object.keys(v).length === 0;
3074
+ }, G = async (v) => {
3075
+ if (v.preventDefault(), !!Q()) {
3076
3076
  I(!0), D(null);
3077
3077
  try {
3078
3078
  const x = {
3079
3079
  ...R,
3080
3080
  appId: m
3081
- }, k = await Jn(x, { baseUrl: u, apiKey: j });
3081
+ }, k = await Jn(x, { baseUrl: d, apiKey: j });
3082
3082
  D({ type: "success", text: "Account created successfully!" }), y && y(k);
3083
3083
  } catch (x) {
3084
3084
  const k = x.message || "Signup failed. Please try again.";
@@ -3201,8 +3201,8 @@ const Ws = [
3201
3201
  objectFit: "cover",
3202
3202
  border: `2px solid ${o}30`
3203
3203
  },
3204
- onError: (S) => {
3205
- const x = S.target;
3204
+ onError: (v) => {
3205
+ const x = v.target;
3206
3206
  x.style.display = "none";
3207
3207
  }
3208
3208
  }
@@ -3215,7 +3215,7 @@ const Ws = [
3215
3215
  onSubmit: G,
3216
3216
  style: { display: "flex", flexDirection: "column", gap: "14px" },
3217
3217
  children: [
3218
- d && c && c.length === 2 && /* @__PURE__ */ n.jsxs(
3218
+ u && c && c.length === 2 && /* @__PURE__ */ n.jsxs(
3219
3219
  "div",
3220
3220
  {
3221
3221
  style: { display: "flex", flexDirection: "column", gap: "4px" },
@@ -3269,7 +3269,7 @@ const Ws = [
3269
3269
  "button",
3270
3270
  {
3271
3271
  type: "button",
3272
- onClick: () => z((S) => ({ ...S, role: c[0] })),
3272
+ onClick: () => z((v) => ({ ...v, role: c[0] })),
3273
3273
  style: {
3274
3274
  flex: 1,
3275
3275
  zIndex: 10,
@@ -3291,7 +3291,7 @@ const Ws = [
3291
3291
  "button",
3292
3292
  {
3293
3293
  type: "button",
3294
- onClick: () => z((S) => ({ ...S, role: c[1] })),
3294
+ onClick: () => z((v) => ({ ...v, role: c[1] })),
3295
3295
  style: {
3296
3296
  flex: 1,
3297
3297
  zIndex: 10,
@@ -3567,7 +3567,7 @@ const Ws = [
3567
3567
  )
3568
3568
  }
3569
3569
  ),
3570
- v && /* @__PURE__ */ n.jsxs(
3570
+ S && /* @__PURE__ */ n.jsxs(
3571
3571
  "div",
3572
3572
  {
3573
3573
  style: {
@@ -3577,13 +3577,13 @@ const Ws = [
3577
3577
  display: "flex",
3578
3578
  alignItems: "start",
3579
3579
  gap: "10px",
3580
- backgroundColor: v.type === "success" ? `${o}15` : "rgba(239,68,68,0.1)",
3581
- border: v.type === "success" ? `1px solid ${o}30` : "1px solid rgba(239,68,68,0.3)",
3582
- color: v.type === "success" ? o : "#ef4444"
3580
+ backgroundColor: S.type === "success" ? `${o}15` : "rgba(239,68,68,0.1)",
3581
+ border: S.type === "success" ? `1px solid ${o}30` : "1px solid rgba(239,68,68,0.3)",
3582
+ color: S.type === "success" ? o : "#ef4444"
3583
3583
  },
3584
3584
  children: [
3585
- v.type === "success" ? /* @__PURE__ */ n.jsx(ce, { size: 20 }) : /* @__PURE__ */ n.jsx(le, { size: 20 }),
3586
- /* @__PURE__ */ n.jsx("span", { children: v.text })
3585
+ S.type === "success" ? /* @__PURE__ */ n.jsx(ce, { size: 20 }) : /* @__PURE__ */ n.jsx(le, { size: 20 }),
3586
+ /* @__PURE__ */ n.jsx("span", { children: S.text })
3587
3587
  ]
3588
3588
  }
3589
3589
  ),
@@ -3609,7 +3609,7 @@ const Ws = [
3609
3609
  },
3610
3610
  children: g ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
3611
3611
  /* @__PURE__ */ n.jsx(
3612
- vs,
3612
+ Ss,
3613
3613
  {
3614
3614
  size: 18,
3615
3615
  style: { animation: "spin 1s linear infinite" }
@@ -3691,9 +3691,9 @@ const Ws = [
3691
3691
  darkMode: l = !0,
3692
3692
  signupUrl: h,
3693
3693
  onSuccess: c,
3694
- onError: d
3694
+ onError: u
3695
3695
  }) => {
3696
- const { baseUrl: b, apiKey: y, appId: w } = ge(), [u, j] = P("login"), [m, $] = P(1), [R, z] = P(!1), [C, q] = P(!1), [g, I] = P(null), [v, D] = P(""), [W, F] = P(""), [V, Z] = P({
3696
+ const { baseUrl: b, apiKey: y, appId: w } = ge(), [d, j] = P("login"), [m, $] = P(1), [R, z] = P(!1), [C, q] = P(!1), [g, I] = P(null), [S, D] = P(""), [W, F] = P(""), [V, Z] = P({
3697
3697
  email: "",
3698
3698
  otp: "",
3699
3699
  newPassword: "",
@@ -3709,19 +3709,19 @@ const Ws = [
3709
3709
  _.preventDefault(), q(!0), I(null);
3710
3710
  try {
3711
3711
  const N = await Bs(
3712
- { email: v, password: W, appId: w },
3712
+ { email: S, password: W, appId: w },
3713
3713
  { baseUrl: b, apiKey: y }
3714
3714
  );
3715
3715
  I({ type: "success", text: `Welcome ${N.name}` }), c?.(N);
3716
3716
  } catch (N) {
3717
3717
  const Y = N.message || "Login failed";
3718
- I({ type: "error", text: Y }), d?.(N);
3718
+ I({ type: "error", text: Y }), u?.(N);
3719
3719
  } finally {
3720
3720
  q(!1);
3721
3721
  }
3722
3722
  }, f = (_) => {
3723
3723
  Z({ ...V, [_.target.name]: _.target.value });
3724
- }, S = async (_) => {
3724
+ }, v = async (_) => {
3725
3725
  _.preventDefault(), q(!0), I(null);
3726
3726
  try {
3727
3727
  const N = await M.post(
@@ -3837,7 +3837,7 @@ const Ws = [
3837
3837
  color: A,
3838
3838
  margin: 0
3839
3839
  },
3840
- children: u === "login" ? r : m === 1 ? "Forgot Password" : "Reset Password"
3840
+ children: d === "login" ? r : m === 1 ? "Forgot Password" : "Reset Password"
3841
3841
  }
3842
3842
  ),
3843
3843
  /* @__PURE__ */ n.jsx(
@@ -3847,13 +3847,13 @@ const Ws = [
3847
3847
  fontSize: "14px",
3848
3848
  color: O
3849
3849
  },
3850
- children: u === "login" ? s : "Follow the steps to reset your password"
3850
+ children: d === "login" ? s : "Follow the steps to reset your password"
3851
3851
  }
3852
3852
  )
3853
3853
  ]
3854
3854
  }
3855
3855
  ),
3856
- u === "login" && /* @__PURE__ */ n.jsxs(
3856
+ d === "login" && /* @__PURE__ */ n.jsxs(
3857
3857
  "form",
3858
3858
  {
3859
3859
  onSubmit: G,
@@ -3896,7 +3896,7 @@ const Ws = [
3896
3896
  id: "login-email",
3897
3897
  type: "email",
3898
3898
  placeholder: "Enter your email",
3899
- value: v,
3899
+ value: S,
3900
3900
  onChange: (_) => D(_.target.value),
3901
3901
  style: k
3902
3902
  }
@@ -4029,10 +4029,10 @@ const Ws = [
4029
4029
  ]
4030
4030
  }
4031
4031
  ),
4032
- u === "forgot" && /* @__PURE__ */ n.jsxs(
4032
+ d === "forgot" && /* @__PURE__ */ n.jsxs(
4033
4033
  "form",
4034
4034
  {
4035
- onSubmit: m === 1 ? S : x,
4035
+ onSubmit: m === 1 ? v : x,
4036
4036
  style: { display: "flex", flexDirection: "column", gap: "14px" },
4037
4037
  children: [
4038
4038
  m === 1 ? /* @__PURE__ */ n.jsxs(
@@ -4282,24 +4282,55 @@ const Ws = [
4282
4282
  width: a,
4283
4283
  height: o
4284
4284
  }) => {
4285
- const i = pr(), [l, h] = P(!1), [c, d] = P(null);
4286
- return te(() => {
4287
- h(!0), (async () => {
4285
+ const i = pr(), [l, h] = P(!1), [c, u] = P(null);
4286
+ if (te(() => {
4287
+ console.log("[ReactSignedIn] Component mounted"), h(!0), (async () => {
4288
4288
  try {
4289
- const y = await i.getSession();
4290
- d(!!y?.authenticated);
4291
- } catch {
4292
- d(!1);
4289
+ console.log("[ReactSignedIn] Checking session...");
4290
+ const d = await i.getSession();
4291
+ console.log("[ReactSignedIn] Session response:", d), u(!!d?.authenticated), console.log("[ReactSignedIn] SignedIn state set to:", !!d?.authenticated);
4292
+ } catch (d) {
4293
+ console.error("[ReactSignedIn] Error fetching session:", d), u(!1);
4293
4294
  }
4294
4295
  })();
4295
- }, [i]), l ? c === null ? typeof r == "function" ? r() : r : c ? /* @__PURE__ */ n.jsx(
4296
+ }, [i]), !l) return null;
4297
+ const b = (w) => typeof w == "function" ? w() : w, y = /* @__PURE__ */ n.jsxs(
4298
+ "div",
4299
+ {
4300
+ style: {
4301
+ display: "flex",
4302
+ alignItems: "center",
4303
+ justifyContent: "center",
4304
+ width: a || "100%",
4305
+ height: o || "100%"
4306
+ },
4307
+ children: [
4308
+ /* @__PURE__ */ n.jsx("div", { className: "react-signedin-spinner" }),
4309
+ /* @__PURE__ */ n.jsx("style", { children: `
4310
+ .react-signedin-spinner {
4311
+ border: 4px solid rgba(0, 0, 0, 0.1);
4312
+ border-top: 4px solid #3498db;
4313
+ border-radius: 50%;
4314
+ width: 36px;
4315
+ height: 36px;
4316
+ animation: spin 1s linear infinite;
4317
+ }
4318
+ @keyframes spin {
4319
+ 0% { transform: rotate(0deg);}
4320
+ 100% { transform: rotate(360deg);}
4321
+ }
4322
+ ` })
4323
+ ]
4324
+ }
4325
+ );
4326
+ return c === null ? (console.log("[ReactSignedIn] Still loading session..."), b(r) ?? y) : c ? (console.log("[ReactSignedIn] User signed in, rendering children"), /* @__PURE__ */ n.jsx(
4296
4327
  "div",
4297
4328
  {
4298
4329
  className: s,
4299
4330
  style: { display: "flex", alignItems: "center", width: a, height: o },
4300
4331
  children: t
4301
4332
  }
4302
- ) : typeof e == "function" ? e() : e : null;
4333
+ )) : (console.log("[ReactSignedIn] User not signed in, showing fallback"), b(e));
4303
4334
  }, wa = ({
4304
4335
  children: t,
4305
4336
  fallback: e = null,
@@ -4308,14 +4339,14 @@ const Ws = [
4308
4339
  width: a,
4309
4340
  height: o
4310
4341
  }) => {
4311
- const i = pr(), [l, h] = P(!1), [c, d] = P(null);
4342
+ const i = pr(), [l, h] = P(!1), [c, u] = P(null);
4312
4343
  return te(() => {
4313
4344
  h(!0), (async () => {
4314
4345
  try {
4315
4346
  const y = await i.getSession();
4316
- d(!y?.authenticated);
4347
+ u(!y?.authenticated);
4317
4348
  } catch {
4318
- d(!0);
4349
+ u(!0);
4319
4350
  }
4320
4351
  })();
4321
4352
  }, [i]), l ? c === null ? typeof r == "function" ? r() : r : c ? /* @__PURE__ */ n.jsx(
@@ -4335,7 +4366,7 @@ const Ws = [
4335
4366
  token: o,
4336
4367
  colors: i
4337
4368
  }) => {
4338
- const { baseUrl: l, apiKey: h, appId: c } = ge(), [d, b] = P(!1), [y, w] = P(""), [u, j] = P("warning"), [m, $] = P(!1);
4369
+ const { baseUrl: l, apiKey: h, appId: c } = ge(), [u, b] = P(!1), [y, w] = P(""), [d, j] = P("warning"), [m, $] = P(!1);
4339
4370
  if (te(() => {
4340
4371
  if (typeof window > "u") return;
4341
4372
  const g = () => {
@@ -4361,9 +4392,9 @@ const Ws = [
4361
4392
  b(!1);
4362
4393
  }
4363
4394
  }, z = y.toLowerCase() === "delete my account", C = (g) => {
4364
- g.target === g.currentTarget && u !== "processing" && u !== "success" && e();
4395
+ g.target === g.currentTarget && d !== "processing" && d !== "success" && e();
4365
4396
  }, q = () => {
4366
- switch (u) {
4397
+ switch (d) {
4367
4398
  case "warning":
4368
4399
  return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
4369
4400
  /* @__PURE__ */ n.jsxs(
@@ -4763,7 +4794,7 @@ const Ws = [
4763
4794
  "button",
4764
4795
  {
4765
4796
  onClick: R,
4766
- disabled: !z || d,
4797
+ disabled: !z || u,
4767
4798
  style: {
4768
4799
  padding: "10px 24px",
4769
4800
  borderRadius: "10px",
@@ -4772,22 +4803,22 @@ const Ws = [
4772
4803
  color: "white",
4773
4804
  fontSize: "14px",
4774
4805
  fontWeight: 600,
4775
- cursor: !z || d ? "not-allowed" : "pointer",
4806
+ cursor: !z || u ? "not-allowed" : "pointer",
4776
4807
  flex: m ? "none" : 1,
4777
4808
  minWidth: m ? "100%" : "140px",
4778
- opacity: !z || d ? 0.6 : 1,
4809
+ opacity: !z || u ? 0.6 : 1,
4779
4810
  display: "flex",
4780
4811
  alignItems: "center",
4781
4812
  justifyContent: "center",
4782
4813
  gap: "8px",
4783
4814
  transition: "all 0.2s ease",
4784
- boxShadow: !z || d ? "none" : "0 4px 12px rgba(239, 68, 68, 0.4)"
4815
+ boxShadow: !z || u ? "none" : "0 4px 12px rgba(239, 68, 68, 0.4)"
4785
4816
  },
4786
4817
  onMouseOver: (g) => {
4787
- z && !d && (g.currentTarget.style.transform = "translateY(-1px)", g.currentTarget.style.boxShadow = "0 6px 20px rgba(239, 68, 68, 0.5)");
4818
+ z && !u && (g.currentTarget.style.transform = "translateY(-1px)", g.currentTarget.style.boxShadow = "0 6px 20px rgba(239, 68, 68, 0.5)");
4788
4819
  },
4789
4820
  onMouseOut: (g) => {
4790
- z && !d && (g.currentTarget.style.transform = "translateY(0)", g.currentTarget.style.boxShadow = "0 4px 12px rgba(239, 68, 68, 0.4)");
4821
+ z && !u && (g.currentTarget.style.transform = "translateY(0)", g.currentTarget.style.boxShadow = "0 4px 12px rgba(239, 68, 68, 0.4)");
4791
4822
  },
4792
4823
  children: [
4793
4824
  /* @__PURE__ */ n.jsx(Ne, { size: 16 }),
@@ -5187,20 +5218,20 @@ const Ws = [
5187
5218
  onUpdate: r,
5188
5219
  colors: s
5189
5220
  }) => {
5190
- const [a, o] = P(""), [i, l] = P(!1), [h, c] = P(!1), [d, b] = P({ isValid: !1, message: "", type: null });
5221
+ const [a, o] = P(""), [i, l] = P(!1), [h, c] = P(!1), [u, b] = P({ isValid: !1, message: "", type: null });
5191
5222
  if (te(() => {
5192
5223
  if (typeof window > "u") return;
5193
- const u = () => {
5224
+ const d = () => {
5194
5225
  c(window.innerWidth < 640);
5195
5226
  };
5196
- return u(), window.addEventListener("resize", u), () => window.removeEventListener("resize", u);
5227
+ return d(), window.addEventListener("resize", d), () => window.removeEventListener("resize", d);
5197
5228
  }, []), te(() => {
5198
5229
  if (!a.trim()) {
5199
5230
  b({ isValid: !1, message: "", type: null });
5200
5231
  return;
5201
5232
  }
5202
5233
  try {
5203
- const u = new URL(a), j = /\.(jpg|jpeg|png|gif|webp|svg)$/i.test(u.pathname);
5234
+ const d = new URL(a), j = /\.(jpg|jpeg|png|gif|webp|svg)$/i.test(d.pathname);
5204
5235
  b(j ? {
5205
5236
  isValid: !0,
5206
5237
  message: "Valid image URL",
@@ -5219,7 +5250,7 @@ const Ws = [
5219
5250
  }
5220
5251
  }, [a]), !t) return null;
5221
5252
  const y = async () => {
5222
- if (!(!a || !d.isValid)) {
5253
+ if (!(!a || !u.isValid)) {
5223
5254
  l(!0);
5224
5255
  try {
5225
5256
  await r(a) && (o(""), e());
@@ -5227,8 +5258,8 @@ const Ws = [
5227
5258
  l(!1);
5228
5259
  }
5229
5260
  }
5230
- }, w = (u) => {
5231
- u.target === u.currentTarget && e();
5261
+ }, w = (d) => {
5262
+ d.target === d.currentTarget && e();
5232
5263
  };
5233
5264
  return /* @__PURE__ */ n.jsxs(
5234
5265
  "div",
@@ -5335,11 +5366,11 @@ const Ws = [
5335
5366
  flexShrink: 0,
5336
5367
  transition: "all 0.2s ease"
5337
5368
  },
5338
- onMouseOver: (u) => {
5339
- u.currentTarget.style.backgroundColor = s.border, u.currentTarget.style.color = s.textPrimary;
5369
+ onMouseOver: (d) => {
5370
+ d.currentTarget.style.backgroundColor = s.border, d.currentTarget.style.color = s.textPrimary;
5340
5371
  },
5341
- onMouseOut: (u) => {
5342
- u.currentTarget.style.backgroundColor = "transparent", u.currentTarget.style.color = s.textTertiary;
5372
+ onMouseOut: (d) => {
5373
+ d.currentTarget.style.backgroundColor = "transparent", d.currentTarget.style.color = s.textTertiary;
5343
5374
  },
5344
5375
  children: /* @__PURE__ */ n.jsx(Pe, { size: 20 })
5345
5376
  }
@@ -5384,13 +5415,13 @@ const Ws = [
5384
5415
  id: "avatar-url",
5385
5416
  placeholder: "https://example.com/your-avatar.jpg",
5386
5417
  value: a,
5387
- onChange: (u) => o(u.target.value),
5418
+ onChange: (d) => o(d.target.value),
5388
5419
  style: {
5389
5420
  width: "100%",
5390
5421
  padding: "14px 16px",
5391
5422
  paddingLeft: "44px",
5392
5423
  borderRadius: "12px",
5393
- border: `1.5px solid ${d.type === "error" ? s.error : d.type === "success" ? s.success : s.border}`,
5424
+ border: `1.5px solid ${u.type === "error" ? s.error : u.type === "success" ? s.success : s.border}`,
5394
5425
  backgroundColor: "transparent",
5395
5426
  color: s.textPrimary,
5396
5427
  fontSize: "15px",
@@ -5398,11 +5429,11 @@ const Ws = [
5398
5429
  transition: "all 0.2s ease",
5399
5430
  boxSizing: "border-box"
5400
5431
  },
5401
- onFocus: (u) => {
5402
- u.target.style.borderColor = s.accent, u.target.style.boxShadow = `0 0 0 3px ${s.accent}20`;
5432
+ onFocus: (d) => {
5433
+ d.target.style.borderColor = s.accent, d.target.style.boxShadow = `0 0 0 3px ${s.accent}20`;
5403
5434
  },
5404
- onBlur: (u) => {
5405
- u.target.style.borderColor = d.type === "error" ? s.error : d.type === "success" ? s.success : s.border, u.target.style.boxShadow = "none";
5435
+ onBlur: (d) => {
5436
+ d.target.style.borderColor = u.type === "error" ? s.error : u.type === "success" ? s.success : s.border, d.target.style.boxShadow = "none";
5406
5437
  },
5407
5438
  disabled: i
5408
5439
  }
@@ -5421,7 +5452,7 @@ const Ws = [
5421
5452
  }
5422
5453
  )
5423
5454
  ] }),
5424
- d.message && /* @__PURE__ */ n.jsxs(
5455
+ u.message && /* @__PURE__ */ n.jsxs(
5425
5456
  "div",
5426
5457
  {
5427
5458
  style: {
@@ -5430,18 +5461,18 @@ const Ws = [
5430
5461
  gap: "6px",
5431
5462
  marginTop: "8px",
5432
5463
  fontSize: "13px",
5433
- color: d.type === "success" ? s.success : d.type === "error" ? s.error : s.textTertiary
5464
+ color: u.type === "success" ? s.success : u.type === "error" ? s.error : s.textTertiary
5434
5465
  },
5435
5466
  children: [
5436
- d.type === "success" && /* @__PURE__ */ n.jsx(ce, { size: 14 }),
5437
- d.type === "error" && /* @__PURE__ */ n.jsx(le, { size: 14 }),
5438
- d.type === "warning" && /* @__PURE__ */ n.jsx(le, { size: 14 }),
5439
- d.message
5467
+ u.type === "success" && /* @__PURE__ */ n.jsx(ce, { size: 14 }),
5468
+ u.type === "error" && /* @__PURE__ */ n.jsx(le, { size: 14 }),
5469
+ u.type === "warning" && /* @__PURE__ */ n.jsx(le, { size: 14 }),
5470
+ u.message
5440
5471
  ]
5441
5472
  }
5442
5473
  )
5443
5474
  ] }),
5444
- a && d.type === "success" && /* @__PURE__ */ n.jsxs(
5475
+ a && u.type === "success" && /* @__PURE__ */ n.jsxs(
5445
5476
  "div",
5446
5477
  {
5447
5478
  style: {
@@ -5477,8 +5508,8 @@ const Ws = [
5477
5508
  border: `2px solid ${s.success}40`,
5478
5509
  margin: "0 auto"
5479
5510
  },
5480
- onError: (u) => {
5481
- u.currentTarget.style.display = "none";
5511
+ onError: (d) => {
5512
+ d.currentTarget.style.display = "none";
5482
5513
  }
5483
5514
  }
5484
5515
  )
@@ -5519,11 +5550,11 @@ const Ws = [
5519
5550
  opacity: i ? 0.6 : 1,
5520
5551
  transition: "all 0.2s ease"
5521
5552
  },
5522
- onMouseOver: (u) => {
5523
- i || (u.currentTarget.style.backgroundColor = s.border, u.currentTarget.style.transform = "translateY(-1px)");
5553
+ onMouseOver: (d) => {
5554
+ i || (d.currentTarget.style.backgroundColor = s.border, d.currentTarget.style.transform = "translateY(-1px)");
5524
5555
  },
5525
- onMouseOut: (u) => {
5526
- i || (u.currentTarget.style.backgroundColor = "transparent", u.currentTarget.style.transform = "translateY(0)");
5556
+ onMouseOut: (d) => {
5557
+ i || (d.currentTarget.style.backgroundColor = "transparent", d.currentTarget.style.transform = "translateY(0)");
5527
5558
  },
5528
5559
  children: "Cancel"
5529
5560
  }
@@ -5532,7 +5563,7 @@ const Ws = [
5532
5563
  "button",
5533
5564
  {
5534
5565
  onClick: y,
5535
- disabled: i || !d.isValid,
5566
+ disabled: i || !u.isValid,
5536
5567
  style: {
5537
5568
  padding: "10px 24px",
5538
5569
  borderRadius: "10px",
@@ -5541,22 +5572,22 @@ const Ws = [
5541
5572
  color: "#fff",
5542
5573
  fontSize: "14px",
5543
5574
  fontWeight: 600,
5544
- cursor: i || !d.isValid ? "not-allowed" : "pointer",
5575
+ cursor: i || !u.isValid ? "not-allowed" : "pointer",
5545
5576
  flex: h ? "none" : 1,
5546
5577
  minWidth: h ? "100%" : "140px",
5547
- opacity: i || !d.isValid ? 0.6 : 1,
5578
+ opacity: i || !u.isValid ? 0.6 : 1,
5548
5579
  display: "flex",
5549
5580
  alignItems: "center",
5550
5581
  justifyContent: "center",
5551
5582
  gap: "8px",
5552
5583
  transition: "all 0.2s ease",
5553
- boxShadow: i || !d.isValid ? "none" : `0 4px 12px ${s.accent}40`
5584
+ boxShadow: i || !u.isValid ? "none" : `0 4px 12px ${s.accent}40`
5554
5585
  },
5555
- onMouseOver: (u) => {
5556
- !i && d.isValid && (u.currentTarget.style.transform = "translateY(-1px)", u.currentTarget.style.boxShadow = `0 6px 20px ${s.accent}60`);
5586
+ onMouseOver: (d) => {
5587
+ !i && u.isValid && (d.currentTarget.style.transform = "translateY(-1px)", d.currentTarget.style.boxShadow = `0 6px 20px ${s.accent}60`);
5557
5588
  },
5558
- onMouseOut: (u) => {
5559
- !i && d.isValid && (u.currentTarget.style.transform = "translateY(0)", u.currentTarget.style.boxShadow = `0 4px 12px ${s.accent}40`);
5589
+ onMouseOut: (d) => {
5590
+ !i && u.isValid && (d.currentTarget.style.transform = "translateY(0)", d.currentTarget.style.boxShadow = `0 4px 12px ${s.accent}40`);
5560
5591
  },
5561
5592
  children: i ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
5562
5593
  /* @__PURE__ */ n.jsx(
@@ -5641,33 +5672,33 @@ const Ws = [
5641
5672
  userId: a,
5642
5673
  colors: o
5643
5674
  }) => {
5644
- const { baseUrl: i, apiKey: l, appId: h } = ge(), [c, d] = P({
5675
+ const { baseUrl: i, apiKey: l, appId: h } = ge(), [c, u] = P({
5645
5676
  currentPassword: "",
5646
5677
  newPassword: "",
5647
5678
  confirmPassword: ""
5648
- }), [b, y] = P({}), [w, u] = P(!1), [j, m] = P({
5679
+ }), [b, y] = P({}), [w, d] = P(!1), [j, m] = P({
5649
5680
  currentPassword: !1,
5650
5681
  newPassword: !1,
5651
5682
  confirmPassword: !1
5652
5683
  }), [$, R] = P(!1);
5653
5684
  if (Le.useEffect(() => {
5654
5685
  if (typeof window > "u") return;
5655
- const v = () => {
5686
+ const S = () => {
5656
5687
  R(window.innerWidth < 640);
5657
5688
  };
5658
- return v(), window.addEventListener("resize", v), () => window.removeEventListener("resize", v);
5689
+ return S(), window.addEventListener("resize", S), () => window.removeEventListener("resize", S);
5659
5690
  }, []), !t) return null;
5660
- const z = (v) => {
5661
- const { name: D, value: W } = v.target;
5662
- d((F) => ({ ...F, [D]: W })), b[D] && y((F) => ({ ...F, [D]: "" }));
5663
- }, C = (v) => {
5664
- m((D) => ({ ...D, [v]: !D[v] }));
5691
+ const z = (S) => {
5692
+ const { name: D, value: W } = S.target;
5693
+ u((F) => ({ ...F, [D]: W })), b[D] && y((F) => ({ ...F, [D]: "" }));
5694
+ }, C = (S) => {
5695
+ m((D) => ({ ...D, [S]: !D[S] }));
5665
5696
  }, q = () => {
5666
- const v = {};
5667
- return c.currentPassword || (v.currentPassword = "Current password is required"), c.newPassword ? c.newPassword.length < 6 && (v.newPassword = "Password must be at least 6 characters") : v.newPassword = "New password is required", c.newPassword !== c.confirmPassword && (v.confirmPassword = "Passwords do not match"), y(v), Object.keys(v).length === 0;
5668
- }, g = async (v) => {
5669
- if (v.preventDefault(), !!q()) {
5670
- u(!0);
5697
+ const S = {};
5698
+ return c.currentPassword || (S.currentPassword = "Current password is required"), c.newPassword ? c.newPassword.length < 6 && (S.newPassword = "Password must be at least 6 characters") : S.newPassword = "New password is required", c.newPassword !== c.confirmPassword && (S.confirmPassword = "Passwords do not match"), y(S), Object.keys(S).length === 0;
5699
+ }, g = async (S) => {
5700
+ if (S.preventDefault(), !!q()) {
5701
+ d(!0);
5671
5702
  try {
5672
5703
  const { data: D } = await M.put(
5673
5704
  `${i}/users/change-password/${a}`,
@@ -5682,7 +5713,7 @@ const Ws = [
5682
5713
  }
5683
5714
  }
5684
5715
  );
5685
- D.success ? (r(D.message || "Password updated successfully"), d({
5716
+ D.success ? (r(D.message || "Password updated successfully"), u({
5686
5717
  currentPassword: "",
5687
5718
  newPassword: "",
5688
5719
  confirmPassword: ""
@@ -5690,7 +5721,7 @@ const Ws = [
5690
5721
  } catch (D) {
5691
5722
  s(D.response?.data?.message || "Something went wrong");
5692
5723
  } finally {
5693
- u(!1);
5724
+ d(!1);
5694
5725
  }
5695
5726
  }
5696
5727
  }, I = [
@@ -5813,11 +5844,11 @@ const Ws = [
5813
5844
  alignItems: "center",
5814
5845
  justifyContent: "center"
5815
5846
  },
5816
- onMouseOver: (v) => {
5817
- v.currentTarget.style.backgroundColor = o.border, v.currentTarget.style.color = o.textPrimary;
5847
+ onMouseOver: (S) => {
5848
+ S.currentTarget.style.backgroundColor = o.border, S.currentTarget.style.color = o.textPrimary;
5818
5849
  },
5819
- onMouseOut: (v) => {
5820
- v.currentTarget.style.backgroundColor = "transparent", v.currentTarget.style.color = o.textTertiary;
5850
+ onMouseOut: (S) => {
5851
+ S.currentTarget.style.backgroundColor = "transparent", S.currentTarget.style.color = o.textTertiary;
5821
5852
  },
5822
5853
  children: /* @__PURE__ */ n.jsx(Pe, { size: 20 })
5823
5854
  }
@@ -5826,7 +5857,7 @@ const Ws = [
5826
5857
  }
5827
5858
  ),
5828
5859
  /* @__PURE__ */ n.jsxs("form", { onSubmit: g, children: [
5829
- I.map(({ field: v, label: D, icon: W }) => /* @__PURE__ */ n.jsxs(
5860
+ I.map(({ field: S, label: D, icon: W }) => /* @__PURE__ */ n.jsxs(
5830
5861
  "div",
5831
5862
  {
5832
5863
  style: {
@@ -5837,7 +5868,7 @@ const Ws = [
5837
5868
  /* @__PURE__ */ n.jsx(
5838
5869
  "label",
5839
5870
  {
5840
- htmlFor: v,
5871
+ htmlFor: S,
5841
5872
  style: {
5842
5873
  display: "block",
5843
5874
  marginBottom: "8px",
@@ -5867,17 +5898,17 @@ const Ws = [
5867
5898
  /* @__PURE__ */ n.jsx(
5868
5899
  "input",
5869
5900
  {
5870
- type: j[v] ? "text" : "password",
5871
- id: v,
5872
- name: v,
5901
+ type: j[S] ? "text" : "password",
5902
+ id: S,
5903
+ name: S,
5873
5904
  placeholder: `Enter ${D.toLowerCase()}`,
5874
- value: c[v],
5905
+ value: c[S],
5875
5906
  onChange: z,
5876
5907
  style: {
5877
5908
  width: "100%",
5878
5909
  padding: "14px 48px 14px 44px",
5879
5910
  borderRadius: "10px",
5880
- border: `1.5px solid ${b[v] ? o.error : o.border}`,
5911
+ border: `1.5px solid ${b[S] ? o.error : o.border}`,
5881
5912
  backgroundColor: "transparent",
5882
5913
  color: o.textPrimary,
5883
5914
  fontSize: "15px",
@@ -5889,7 +5920,7 @@ const Ws = [
5889
5920
  F.target.style.borderColor = o.accent, F.target.style.boxShadow = `0 0 0 3px ${o.accent}20`;
5890
5921
  },
5891
5922
  onBlur: (F) => {
5892
- F.target.style.borderColor = b[v] ? o.error : o.border, F.target.style.boxShadow = "none";
5923
+ F.target.style.borderColor = b[S] ? o.error : o.border, F.target.style.boxShadow = "none";
5893
5924
  }
5894
5925
  }
5895
5926
  ),
@@ -5897,7 +5928,7 @@ const Ws = [
5897
5928
  "button",
5898
5929
  {
5899
5930
  type: "button",
5900
- onClick: () => C(v),
5931
+ onClick: () => C(S),
5901
5932
  style: {
5902
5933
  position: "absolute",
5903
5934
  right: "14px",
@@ -5921,11 +5952,11 @@ const Ws = [
5921
5952
  onMouseOut: (F) => {
5922
5953
  F.currentTarget.style.backgroundColor = "transparent", F.currentTarget.style.color = o.textTertiary;
5923
5954
  },
5924
- children: j[v] ? /* @__PURE__ */ n.jsx(ot, { size: 18 }) : /* @__PURE__ */ n.jsx(lt, { size: 18 })
5955
+ children: j[S] ? /* @__PURE__ */ n.jsx(ot, { size: 18 }) : /* @__PURE__ */ n.jsx(lt, { size: 18 })
5925
5956
  }
5926
5957
  )
5927
5958
  ] }),
5928
- b[v] && /* @__PURE__ */ n.jsxs(
5959
+ b[S] && /* @__PURE__ */ n.jsxs(
5929
5960
  "div",
5930
5961
  {
5931
5962
  style: {
@@ -5938,13 +5969,13 @@ const Ws = [
5938
5969
  },
5939
5970
  children: [
5940
5971
  /* @__PURE__ */ n.jsx("span", { style: { fontSize: "16px" }, children: "⚠" }),
5941
- b[v]
5972
+ b[S]
5942
5973
  ]
5943
5974
  }
5944
5975
  )
5945
5976
  ]
5946
5977
  },
5947
- v
5978
+ S
5948
5979
  )),
5949
5980
  /* @__PURE__ */ n.jsxs(
5950
5981
  "div",
@@ -5977,11 +6008,11 @@ const Ws = [
5977
6008
  opacity: w ? 0.6 : 1,
5978
6009
  transition: "all 0.2s ease"
5979
6010
  },
5980
- onMouseOver: (v) => {
5981
- w || (v.currentTarget.style.backgroundColor = o.border, v.currentTarget.style.transform = "translateY(-1px)");
6011
+ onMouseOver: (S) => {
6012
+ w || (S.currentTarget.style.backgroundColor = o.border, S.currentTarget.style.transform = "translateY(-1px)");
5982
6013
  },
5983
- onMouseOut: (v) => {
5984
- w || (v.currentTarget.style.backgroundColor = "transparent", v.currentTarget.style.transform = "translateY(0)");
6014
+ onMouseOut: (S) => {
6015
+ w || (S.currentTarget.style.backgroundColor = "transparent", S.currentTarget.style.transform = "translateY(0)");
5985
6016
  },
5986
6017
  children: "Cancel"
5987
6018
  }
@@ -6010,11 +6041,11 @@ const Ws = [
6010
6041
  transition: "all 0.2s ease",
6011
6042
  boxShadow: w ? "none" : `0 4px 12px ${o.accent}40`
6012
6043
  },
6013
- onMouseOver: (v) => {
6014
- w || (v.currentTarget.style.transform = "translateY(-1px)", v.currentTarget.style.boxShadow = `0 6px 20px ${o.accent}60`);
6044
+ onMouseOver: (S) => {
6045
+ w || (S.currentTarget.style.transform = "translateY(-1px)", S.currentTarget.style.boxShadow = `0 6px 20px ${o.accent}60`);
6015
6046
  },
6016
- onMouseOut: (v) => {
6017
- w || (v.currentTarget.style.transform = "translateY(0)", v.currentTarget.style.boxShadow = `0 4px 12px ${o.accent}40`);
6047
+ onMouseOut: (S) => {
6048
+ w || (S.currentTarget.style.transform = "translateY(0)", S.currentTarget.style.boxShadow = `0 4px 12px ${o.accent}40`);
6018
6049
  },
6019
6050
  children: w ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
6020
6051
  /* @__PURE__ */ n.jsx(
@@ -6089,7 +6120,7 @@ const Ws = [
6089
6120
  verifying: l,
6090
6121
  user: h,
6091
6122
  colors: c,
6092
- darkMode: d
6123
+ darkMode: u
6093
6124
  }) => {
6094
6125
  if (!t) return null;
6095
6126
  const b = () => {
@@ -6100,7 +6131,7 @@ const Ws = [
6100
6131
  {
6101
6132
  className: "modal-overlay",
6102
6133
  style: {
6103
- backgroundColor: d ? "rgba(0, 0, 0, 0.8)" : "rgba(0, 0, 0, 0.5)"
6134
+ backgroundColor: u ? "rgba(0, 0, 0, 0.8)" : "rgba(0, 0, 0, 0.5)"
6104
6135
  },
6105
6136
  children: [
6106
6137
  /* @__PURE__ */ n.jsxs(
@@ -6259,7 +6290,7 @@ const Ws = [
6259
6290
  }
6260
6291
 
6261
6292
  .close-btn:hover {
6262
- background-color: ${d ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)"};
6293
+ background-color: ${u ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)"};
6263
6294
  }
6264
6295
 
6265
6296
  .verify-form {
@@ -6370,11 +6401,11 @@ const Ws = [
6370
6401
  onVerify: o,
6371
6402
  primaryColor: i = "#00C212"
6372
6403
  }) => {
6373
- const { baseUrl: l, apiKey: h, appId: c } = ge(), [d, b] = P(null), [y, w] = P(e), [u, j] = P(!0), [m, $] = P(!1), [R, z] = P(!1), [C, q] = P(!1), [g, I] = P(!1), [v, D] = P(!1), [W, F] = P(!1), [V, Z] = P(!1), [T, J] = P(!1), [A, O] = P(null), [K, Q] = P(!1), [G, f] = P({
6404
+ const { baseUrl: l, apiKey: h, appId: c } = ge(), [u, b] = P(null), [y, w] = P(e), [d, j] = P(!0), [m, $] = P(!1), [R, z] = P(!1), [C, q] = P(!1), [g, I] = P(!1), [S, D] = P(!1), [W, F] = P(!1), [V, Z] = P(!1), [T, J] = P(!1), [A, O] = P(null), [K, Q] = P(!1), [G, f] = P({
6374
6405
  email: "",
6375
6406
  otp: "",
6376
6407
  appId: c
6377
- }), [S, x] = P(!1), [k, _] = P(!1);
6408
+ }), [v, x] = P(!1), [k, _] = P(!1);
6378
6409
  te(() => {
6379
6410
  if (typeof window < "u") {
6380
6411
  const E = () => b(window.innerWidth);
@@ -6449,7 +6480,7 @@ const Ws = [
6449
6480
  } finally {
6450
6481
  _(!1);
6451
6482
  }
6452
- }, ve = async (E) => {
6483
+ }, Se = async (E) => {
6453
6484
  if (!y) return !1;
6454
6485
  try {
6455
6486
  const H = { ...y, avatarUrl: E }, { data: X } = await M.put(
@@ -6542,7 +6573,7 @@ const Ws = [
6542
6573
  border: "#e4e4e7",
6543
6574
  warning: "#d97706"
6544
6575
  };
6545
- if (u)
6576
+ if (d)
6546
6577
  return /* @__PURE__ */ n.jsx(
6547
6578
  "div",
6548
6579
  {
@@ -6710,14 +6741,14 @@ const Ws = [
6710
6741
  display: "grid",
6711
6742
  gap: "24px",
6712
6743
  gridTemplateColumns: "1fr",
6713
- ...d && window.innerWidth >= 1024 && {
6744
+ ...u && window.innerWidth >= 1024 && {
6714
6745
  gridTemplateColumns: "1fr 2fr",
6715
6746
  gap: "10px"
6716
6747
  },
6717
- ...d && window.innerWidth >= 768 && d && window.innerWidth < 1024 && {
6748
+ ...u && window.innerWidth >= 768 && u && window.innerWidth < 1024 && {
6718
6749
  gap: "10px"
6719
6750
  },
6720
- ...d && window.innerWidth >= 600 && d && window.innerWidth < 768 && {
6751
+ ...u && window.innerWidth >= 600 && u && window.innerWidth < 768 && {
6721
6752
  gap: "28px"
6722
6753
  }
6723
6754
  },
@@ -6902,7 +6933,7 @@ const Ws = [
6902
6933
  gap: "8px",
6903
6934
  textDecoration: "none",
6904
6935
  minHeight: "36px",
6905
- flex: d && window.innerWidth < 1024 ? "1" : "auto"
6936
+ flex: u && window.innerWidth < 1024 ? "1" : "auto"
6906
6937
  },
6907
6938
  children: [
6908
6939
  /* @__PURE__ */ n.jsx(Pe, { size: 16, "aria-hidden": "true" }),
@@ -6932,7 +6963,7 @@ const Ws = [
6932
6963
  gap: "8px",
6933
6964
  textDecoration: "none",
6934
6965
  minHeight: "36px",
6935
- flex: d && window.innerWidth < 1024 ? "1" : "auto"
6966
+ flex: u && window.innerWidth < 1024 ? "1" : "auto"
6936
6967
  },
6937
6968
  children: [
6938
6969
  R ? /* @__PURE__ */ n.jsx(
@@ -6968,7 +6999,7 @@ const Ws = [
6968
6999
  gap: "8px",
6969
7000
  textDecoration: "none",
6970
7001
  minHeight: "36px",
6971
- flex: d && window.innerWidth < 1024 ? "1" : "auto"
7002
+ flex: u && window.innerWidth < 1024 ? "1" : "auto"
6972
7003
  },
6973
7004
  children: [
6974
7005
  /* @__PURE__ */ n.jsx(Is, { size: 16, "aria-hidden": "true" }),
@@ -6998,7 +7029,7 @@ const Ws = [
6998
7029
  gap: "8px",
6999
7030
  minHeight: "36px",
7000
7031
  opacity: K ? 0.7 : 1,
7001
- flex: d && window.innerWidth < 1024 ? "1" : "auto"
7032
+ flex: u && window.innerWidth < 1024 ? "1" : "auto"
7002
7033
  },
7003
7034
  children: [
7004
7035
  K ? /* @__PURE__ */ n.jsx(
@@ -7208,7 +7239,7 @@ const Ws = [
7208
7239
  display: "grid",
7209
7240
  gap: "20px",
7210
7241
  gridTemplateColumns: "1fr",
7211
- ...d && window.innerWidth >= 600 && {
7242
+ ...u && window.innerWidth >= 600 && {
7212
7243
  gridTemplateColumns: "1fr 1fr",
7213
7244
  gap: "20px"
7214
7245
  }
@@ -7431,7 +7462,7 @@ const Ws = [
7431
7462
  onClose: () => {
7432
7463
  q(!1);
7433
7464
  },
7434
- onUpdate: ve,
7465
+ onUpdate: Se,
7435
7466
  colors: U
7436
7467
  }
7437
7468
  ),
@@ -7457,7 +7488,7 @@ const Ws = [
7457
7488
  appId: c,
7458
7489
  userId: y.id,
7459
7490
  token: t,
7460
- isOpen: v,
7491
+ isOpen: S,
7461
7492
  onClose: () => D(!1),
7462
7493
  onSuccess: (E) => N("success", E),
7463
7494
  onError: (E) => N("error", E),
@@ -7475,7 +7506,7 @@ const Ws = [
7475
7506
  onSendOTP: se,
7476
7507
  verifyFormData: G,
7477
7508
  setVerifyFormData: f,
7478
- otpSent: S,
7509
+ otpSent: v,
7479
7510
  verifying: k,
7480
7511
  user: y,
7481
7512
  colors: U,
@@ -7574,7 +7605,7 @@ const Ws = [
7574
7605
  ]
7575
7606
  }
7576
7607
  );
7577
- }, va = ({
7608
+ }, Sa = ({
7578
7609
  darkMode: t = !0,
7579
7610
  primaryColor: e = "#3b82f6",
7580
7611
  onLogout: r,
@@ -7587,14 +7618,14 @@ const Ws = [
7587
7618
  // Menu item visibility with defaults
7588
7619
  showProfileMenuItem: h = !0,
7589
7620
  showSettingsMenuItem: c = !0,
7590
- showViewProfileMenuItem: d = !0,
7621
+ showViewProfileMenuItem: u = !0,
7591
7622
  // Custom labels with defaults
7592
7623
  profileLabel: b = "My Profile",
7593
7624
  settingsLabel: y = "Settings",
7594
7625
  viewProfileLabel: w = "View Profile",
7595
- logoutLabel: u = "Sign Out"
7626
+ logoutLabel: d = "Sign Out"
7596
7627
  }) => {
7597
- const { baseUrl: j, apiKey: m, appId: $ } = ge(), [R, z] = P(!1), [C, q] = P(null), [g, I] = P(!0), [v, D] = P(null), W = xt(null), F = xt(null), [V, Z] = P(!1), [T, J] = P(!1);
7628
+ const { baseUrl: j, apiKey: m, appId: $ } = ge(), [R, z] = P(!1), [C, q] = P(null), [g, I] = P(!0), [S, D] = P(null), W = xt(null), F = xt(null), [V, Z] = P(!1), [T, J] = P(!1);
7598
7629
  te(() => {
7599
7630
  if (typeof window > "u") return;
7600
7631
  const x = () => {
@@ -7632,8 +7663,8 @@ const Ws = [
7632
7663
  if (!R || !F.current) return;
7633
7664
  const k = F.current.getBoundingClientRect(), _ = window.innerWidth, N = window.innerHeight, Y = 280, se = _ - k.right, ue = k.left;
7634
7665
  N - k.bottom;
7635
- const ve = se >= Y || se > ue;
7636
- Z(ve);
7666
+ const Se = se >= Y || se > ue;
7667
+ Z(Se);
7637
7668
  };
7638
7669
  return x(), window.addEventListener("resize", x), () => window.removeEventListener("resize", x);
7639
7670
  }, [R]), te(() => {
@@ -7884,7 +7915,7 @@ const Ws = [
7884
7915
  }, G = () => i || C?.profileUrl, f = () => {
7885
7916
  const x = G();
7886
7917
  x && window.open(x, "_self", "noopener,noreferrer");
7887
- }, S = () => {
7918
+ }, v = () => {
7888
7919
  l && window.open(l, "_self", "noopener,noreferrer");
7889
7920
  };
7890
7921
  return /* @__PURE__ */ n.jsxs(
@@ -8058,14 +8089,14 @@ const Ws = [
8058
8089
  "button",
8059
8090
  {
8060
8091
  style: O.menuItem,
8061
- onClick: S,
8092
+ onClick: v,
8062
8093
  onMouseOver: (x) => {
8063
8094
  x.currentTarget.style.backgroundColor = A.surfaceHover;
8064
8095
  },
8065
8096
  onMouseOut: (x) => {
8066
8097
  x.currentTarget.style.backgroundColor = "transparent";
8067
8098
  },
8068
- onKeyDown: (x) => Q(x, S),
8099
+ onKeyDown: (x) => Q(x, v),
8069
8100
  role: "menuitem",
8070
8101
  tabIndex: 0,
8071
8102
  children: [
@@ -8074,7 +8105,7 @@ const Ws = [
8074
8105
  ]
8075
8106
  }
8076
8107
  ),
8077
- d && C.profileUrl && /* @__PURE__ */ n.jsxs(
8108
+ u && C.profileUrl && /* @__PURE__ */ n.jsxs(
8078
8109
  "a",
8079
8110
  {
8080
8111
  href: C.profileUrl,
@@ -8118,7 +8149,7 @@ const Ws = [
8118
8149
  "aria-hidden": "true"
8119
8150
  }
8120
8151
  ),
8121
- /* @__PURE__ */ n.jsx("span", { style: O.menuItemText, children: u })
8152
+ /* @__PURE__ */ n.jsx("span", { style: O.menuItemText, children: d })
8122
8153
  ]
8123
8154
  }
8124
8155
  ) })
@@ -8129,11 +8160,11 @@ const Ws = [
8129
8160
  style: { display: "flex", alignItems: "center", gap: "8px" },
8130
8161
  children: [
8131
8162
  /* @__PURE__ */ n.jsx(le, { size: 16, "aria-hidden": "true" }),
8132
- /* @__PURE__ */ n.jsx("span", { children: v || "Not signed in" })
8163
+ /* @__PURE__ */ n.jsx("span", { children: S || "Not signed in" })
8133
8164
  ]
8134
8165
  }
8135
8166
  ),
8136
- v && v !== "Not signed in" && /* @__PURE__ */ n.jsx(
8167
+ S && S !== "Not signed in" && /* @__PURE__ */ n.jsx(
8137
8168
  "button",
8138
8169
  {
8139
8170
  style: O.retryButton,
@@ -8151,7 +8182,7 @@ const Ws = [
8151
8182
  ]
8152
8183
  }
8153
8184
  );
8154
- }, Sa = ({
8185
+ }, va = ({
8155
8186
  user: t,
8156
8187
  darkMode: e = !0,
8157
8188
  primaryColor: r = "#00C212",
@@ -8161,8 +8192,8 @@ const Ws = [
8161
8192
  email: t?.email || "",
8162
8193
  otp: "",
8163
8194
  appId: a
8164
- }), [c, d] = P(!1), [b, y] = P(!1), [w, u] = P(null), j = (g, I) => {
8165
- let v = parseInt(g.replace("#", ""), 16), D = (v >> 16) + I, W = (v >> 8 & 255) + I, F = (v & 255) + I;
8195
+ }), [c, u] = P(!1), [b, y] = P(!1), [w, d] = P(null), j = (g, I) => {
8196
+ let S = parseInt(g.replace("#", ""), 16), D = (S >> 16) + I, W = (S >> 8 & 255) + I, F = (S & 255) + I;
8166
8197
  return D = Math.min(255, Math.max(0, D)), W = Math.min(255, Math.max(0, W)), F = Math.min(255, Math.max(0, F)), `#${(F | W << 8 | D << 16).toString(16).padStart(6, "0")}`;
8167
8198
  }, m = e ? {
8168
8199
  surface: "#09090b",
@@ -8191,7 +8222,7 @@ const Ws = [
8191
8222
  t?.email && h((g) => ({ ...g, email: t.email }));
8192
8223
  }, [t?.email]);
8193
8224
  const $ = (g, I) => {
8194
- u({ type: g, message: I }), setTimeout(() => u(null), 3e3);
8225
+ d({ type: g, message: I }), setTimeout(() => d(null), 3e3);
8195
8226
  }, R = async () => {
8196
8227
  if (!l.email || !/\S+@\S+\.\S+/.test(l.email)) {
8197
8228
  $("error", "Please enter a valid email");
@@ -8204,7 +8235,7 @@ const Ws = [
8204
8235
  { email: l.email },
8205
8236
  { headers: { "x-api-key": i, "x-app-id": a } }
8206
8237
  );
8207
- g.data.success ? ($("success", g.data.message || "OTP sent!"), d(!0)) : $("error", g.data.message || "Failed to send OTP");
8238
+ g.data.success ? ($("success", g.data.message || "OTP sent!"), u(!0)) : $("error", g.data.message || "Failed to send OTP");
8208
8239
  } catch (g) {
8209
8240
  $("error", g.response?.data?.message || "Server error");
8210
8241
  } finally {
@@ -8219,8 +8250,8 @@ const Ws = [
8219
8250
  y(!0);
8220
8251
  const I = await M.post(`${o}/users/verify-email`, l);
8221
8252
  if (I.data.success && t) {
8222
- const v = { ...t, isVerified: !0 };
8223
- s?.(v), $("success", I.data.message || "Email verified!"), d(!1), h({ email: t.email, otp: "", appId: a });
8253
+ const S = { ...t, isVerified: !0 };
8254
+ s?.(S), $("success", I.data.message || "Email verified!"), u(!1), h({ email: t.email, otp: "", appId: a });
8224
8255
  } else
8225
8256
  $("error", I.data.message || "Verification failed");
8226
8257
  } catch (I) {
@@ -8373,10 +8404,10 @@ const Ws = [
8373
8404
  export {
8374
8405
  ya as AuthixProvider,
8375
8406
  xa as NeuctraAuthix,
8376
- Sa as ReactEmailVerification,
8407
+ va as ReactEmailVerification,
8377
8408
  ba as ReactSignedIn,
8378
8409
  wa as ReactSignedOut,
8379
- va as ReactUserButton,
8410
+ Sa as ReactUserButton,
8380
8411
  ma as ReactUserLogin,
8381
8412
  ja as ReactUserProfile,
8382
8413
  ga as ReactUserSignUp,