@neuctra/authix 1.1.55 → 1.1.56
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.
|
@@ -283,9 +283,9 @@ Object.defineProperties(L, Vt);
|
|
|
283
283
|
Object.defineProperty(Ht, "isAxiosError", { value: !0 });
|
|
284
284
|
L.from = (t, e, r, s, a, i) => {
|
|
285
285
|
const o = Object.create(Ht);
|
|
286
|
-
p.toFlatObject(t, o, function(
|
|
287
|
-
return
|
|
288
|
-
}, (
|
|
286
|
+
p.toFlatObject(t, o, function(d) {
|
|
287
|
+
return d !== Error.prototype;
|
|
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(o, l, h, r, s, a), t && o.cause == null && Object.defineProperty(o, "cause", { value: t, configurable: !0 }), o.name = t && t.name || "Error", i && Object.assign(o, i), o;
|
|
291
291
|
};
|
|
@@ -317,10 +317,10 @@ 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 ||
|
|
320
|
+
const s = r.metaTokens, a = r.visitor || d, i = r.dots, o = 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
|
|
323
|
+
function c(u) {
|
|
324
324
|
if (u === null) return "";
|
|
325
325
|
if (p.isDate(u))
|
|
326
326
|
return u.toISOString();
|
|
@@ -330,7 +330,7 @@ function We(t, e, r) {
|
|
|
330
330
|
throw new L("Blob is not supported. Use a Buffer instead.");
|
|
331
331
|
return p.isArrayBuffer(u) || p.isTypedArray(u) ? h && typeof Blob == "function" ? new Blob([u]) : Buffer.from(u) : u;
|
|
332
332
|
}
|
|
333
|
-
function
|
|
333
|
+
function d(u, j, m) {
|
|
334
334
|
let $ = u;
|
|
335
335
|
if (u && !m && typeof u == "object") {
|
|
336
336
|
if (p.endsWith(j, "{}"))
|
|
@@ -340,30 +340,30 @@ function We(t, e, r) {
|
|
|
340
340
|
!(p.isUndefined(z) || z === null) && e.append(
|
|
341
341
|
// eslint-disable-next-line no-nested-ternary
|
|
342
342
|
o === !0 ? gt([j], C, i) : o === null ? j : j + "[]",
|
|
343
|
-
|
|
343
|
+
c(z)
|
|
344
344
|
);
|
|
345
345
|
}), !1;
|
|
346
346
|
}
|
|
347
|
-
return Qe(u) ? !0 : (e.append(gt(m, j, i),
|
|
347
|
+
return Qe(u) ? !0 : (e.append(gt(m, j, i), c(u)), !1);
|
|
348
348
|
}
|
|
349
|
-
const
|
|
350
|
-
defaultVisitor:
|
|
351
|
-
convertValue:
|
|
349
|
+
const b = [], y = Object.assign(tn, {
|
|
350
|
+
defaultVisitor: d,
|
|
351
|
+
convertValue: c,
|
|
352
352
|
isVisitable: Qe
|
|
353
353
|
});
|
|
354
354
|
function w(u, j) {
|
|
355
355
|
if (!p.isUndefined(u)) {
|
|
356
|
-
if (
|
|
356
|
+
if (b.indexOf(u) !== -1)
|
|
357
357
|
throw Error("Circular reference detected in " + j.join("."));
|
|
358
|
-
|
|
358
|
+
b.push(u), p.forEach(u, function($, R) {
|
|
359
359
|
(!(p.isUndefined($) || $ === null) && a.call(
|
|
360
360
|
e,
|
|
361
361
|
$,
|
|
362
362
|
p.isString(R) ? R.trim() : R,
|
|
363
363
|
j,
|
|
364
|
-
|
|
364
|
+
y
|
|
365
365
|
)) === !0 && w($, j ? j.concat(R) : [R]);
|
|
366
|
-
}),
|
|
366
|
+
}), b.pop();
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
369
|
if (!p.isObject(t))
|
|
@@ -483,14 +483,14 @@ const Gt = {
|
|
|
483
483
|
Blob: an
|
|
484
484
|
},
|
|
485
485
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
486
|
-
}, ot = typeof window < "u" && typeof document < "u", et = typeof navigator == "object" && navigator || void 0, ln = ot && (!et || ["ReactNative", "NativeScript", "NS"].indexOf(et.product) < 0),
|
|
487
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
486
|
+
}, ot = typeof window < "u" && typeof document < "u", et = typeof navigator == "object" && navigator || void 0, ln = ot && (!et || ["ReactNative", "NativeScript", "NS"].indexOf(et.product) < 0), cn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
487
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", dn = ot && window.location.href || "http://localhost", un = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
488
488
|
__proto__: null,
|
|
489
489
|
hasBrowserEnv: ot,
|
|
490
490
|
hasStandardBrowserEnv: ln,
|
|
491
|
-
hasStandardBrowserWebWorkerEnv:
|
|
491
|
+
hasStandardBrowserWebWorkerEnv: cn,
|
|
492
492
|
navigator: et,
|
|
493
|
-
origin:
|
|
493
|
+
origin: dn
|
|
494
494
|
}, Symbol.toStringTag, { value: "Module" })), ee = {
|
|
495
495
|
...un,
|
|
496
496
|
...on
|
|
@@ -679,24 +679,24 @@ let ne = class {
|
|
|
679
679
|
}
|
|
680
680
|
set(e, r, s) {
|
|
681
681
|
const a = this;
|
|
682
|
-
function i(l, h,
|
|
683
|
-
const
|
|
684
|
-
if (!
|
|
682
|
+
function i(l, h, c) {
|
|
683
|
+
const d = Se(h);
|
|
684
|
+
if (!d)
|
|
685
685
|
throw new Error("header name must be a non-empty string");
|
|
686
|
-
const
|
|
687
|
-
(!
|
|
686
|
+
const b = p.findKey(a, d);
|
|
687
|
+
(!b || a[b] === void 0 || c === !0 || c === void 0 && a[b] !== !1) && (a[b || h] = $e(l));
|
|
688
688
|
}
|
|
689
|
-
const o = (l, h) => p.forEach(l, (
|
|
689
|
+
const o = (l, h) => p.forEach(l, (c, d) => i(c, d, h));
|
|
690
690
|
if (p.isPlainObject(e) || e instanceof this.constructor)
|
|
691
691
|
o(e, r);
|
|
692
692
|
else if (p.isString(e) && (e = e.trim()) && !bn(e))
|
|
693
693
|
o(mn(e), r);
|
|
694
694
|
else if (p.isObject(e) && p.isIterable(e)) {
|
|
695
|
-
let l = {}, h,
|
|
696
|
-
for (const
|
|
697
|
-
if (!p.isArray(
|
|
695
|
+
let l = {}, h, c;
|
|
696
|
+
for (const d of e) {
|
|
697
|
+
if (!p.isArray(d))
|
|
698
698
|
throw TypeError("Object iterator must return a key-value pair");
|
|
699
|
-
l[
|
|
699
|
+
l[c = d[0]] = (h = l[c]) ? p.isArray(h) ? [...h, d[1]] : [h, d[1]] : d[1];
|
|
700
700
|
}
|
|
701
701
|
o(l, r);
|
|
702
702
|
} else
|
|
@@ -845,47 +845,47 @@ function Sn(t, e) {
|
|
|
845
845
|
const r = new Array(t), s = new Array(t);
|
|
846
846
|
let a = 0, i = 0, o;
|
|
847
847
|
return e = e !== void 0 ? e : 1e3, function(h) {
|
|
848
|
-
const
|
|
849
|
-
o || (o =
|
|
850
|
-
let
|
|
851
|
-
for (;
|
|
852
|
-
|
|
853
|
-
if (a = (a + 1) % t, a === i && (i = (i + 1) % t),
|
|
848
|
+
const c = Date.now(), d = s[i];
|
|
849
|
+
o || (o = c), r[a] = h, s[a] = c;
|
|
850
|
+
let b = i, y = 0;
|
|
851
|
+
for (; b !== a; )
|
|
852
|
+
y += r[b++], b = b % t;
|
|
853
|
+
if (a = (a + 1) % t, a === i && (i = (i + 1) % t), c - o < e)
|
|
854
854
|
return;
|
|
855
|
-
const w =
|
|
856
|
-
return w ? Math.round(
|
|
855
|
+
const w = d && c - d;
|
|
856
|
+
return w ? Math.round(y * 1e3 / w) : void 0;
|
|
857
857
|
};
|
|
858
858
|
}
|
|
859
859
|
function kn(t, e) {
|
|
860
860
|
let r = 0, s = 1e3 / e, a, i;
|
|
861
|
-
const o = (
|
|
862
|
-
r =
|
|
861
|
+
const o = (c, d = Date.now()) => {
|
|
862
|
+
r = d, a = null, i && (clearTimeout(i), i = null), t(...c);
|
|
863
863
|
};
|
|
864
|
-
return [(...
|
|
865
|
-
const
|
|
866
|
-
|
|
864
|
+
return [(...c) => {
|
|
865
|
+
const d = Date.now(), b = d - r;
|
|
866
|
+
b >= s ? o(c, d) : (a = c, i || (i = setTimeout(() => {
|
|
867
867
|
i = null, o(a);
|
|
868
|
-
}, s -
|
|
868
|
+
}, s - b)));
|
|
869
869
|
}, () => a && o(a)];
|
|
870
870
|
}
|
|
871
871
|
const Ue = (t, e, r = 3) => {
|
|
872
872
|
let s = 0;
|
|
873
873
|
const a = Sn(50, 250);
|
|
874
874
|
return kn((i) => {
|
|
875
|
-
const o = i.loaded, l = i.lengthComputable ? i.total : void 0, h = o - s,
|
|
875
|
+
const o = i.loaded, l = i.lengthComputable ? i.total : void 0, h = o - s, c = a(h), d = o <= l;
|
|
876
876
|
s = o;
|
|
877
|
-
const
|
|
877
|
+
const b = {
|
|
878
878
|
loaded: o,
|
|
879
879
|
total: l,
|
|
880
880
|
progress: l ? o / l : void 0,
|
|
881
881
|
bytes: h,
|
|
882
|
-
rate:
|
|
883
|
-
estimated:
|
|
882
|
+
rate: c || void 0,
|
|
883
|
+
estimated: c && l && d ? (l - o) / c : void 0,
|
|
884
884
|
event: i,
|
|
885
885
|
lengthComputable: l != null,
|
|
886
886
|
[e ? "download" : "upload"]: !0
|
|
887
887
|
};
|
|
888
|
-
t(
|
|
888
|
+
t(b);
|
|
889
889
|
}, r);
|
|
890
890
|
}, wt = (t, e) => {
|
|
891
891
|
const r = t != null;
|
|
@@ -938,30 +938,30 @@ const vt = (t) => t instanceof ne ? { ...t } : t;
|
|
|
938
938
|
function he(t, e) {
|
|
939
939
|
e = e || {};
|
|
940
940
|
const r = {};
|
|
941
|
-
function s(d,
|
|
942
|
-
return p.isPlainObject(
|
|
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;
|
|
943
943
|
}
|
|
944
|
-
function a(d,
|
|
945
|
-
if (p.isUndefined(
|
|
946
|
-
if (!p.isUndefined(
|
|
947
|
-
return s(void 0,
|
|
948
|
-
} else return s(d,
|
|
944
|
+
function a(c, d, b, y) {
|
|
945
|
+
if (p.isUndefined(d)) {
|
|
946
|
+
if (!p.isUndefined(c))
|
|
947
|
+
return s(void 0, c, b, y);
|
|
948
|
+
} else return s(c, d, b, y);
|
|
949
949
|
}
|
|
950
|
-
function i(
|
|
951
|
-
if (!p.isUndefined(
|
|
952
|
-
return s(void 0,
|
|
950
|
+
function i(c, d) {
|
|
951
|
+
if (!p.isUndefined(d))
|
|
952
|
+
return s(void 0, d);
|
|
953
953
|
}
|
|
954
|
-
function o(
|
|
955
|
-
if (p.isUndefined(
|
|
956
|
-
if (!p.isUndefined(
|
|
957
|
-
return s(void 0,
|
|
958
|
-
} else return s(void 0,
|
|
954
|
+
function o(c, d) {
|
|
955
|
+
if (p.isUndefined(d)) {
|
|
956
|
+
if (!p.isUndefined(c))
|
|
957
|
+
return s(void 0, c);
|
|
958
|
+
} else return s(void 0, d);
|
|
959
959
|
}
|
|
960
|
-
function l(
|
|
961
|
-
if (
|
|
962
|
-
return s(
|
|
963
|
-
if (
|
|
964
|
-
return s(void 0,
|
|
960
|
+
function l(c, d, b) {
|
|
961
|
+
if (b in e)
|
|
962
|
+
return s(c, d);
|
|
963
|
+
if (b in t)
|
|
964
|
+
return s(void 0, c);
|
|
965
965
|
}
|
|
966
966
|
const h = {
|
|
967
967
|
url: i,
|
|
@@ -992,11 +992,11 @@ function he(t, e) {
|
|
|
992
992
|
socketPath: o,
|
|
993
993
|
responseEncoding: o,
|
|
994
994
|
validateStatus: l,
|
|
995
|
-
headers: (
|
|
995
|
+
headers: (c, d, b) => a(vt(c), vt(d), b, !0)
|
|
996
996
|
};
|
|
997
|
-
return p.forEach(Object.keys({ ...t, ...e }), function(
|
|
998
|
-
const
|
|
999
|
-
p.isUndefined(
|
|
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);
|
|
1000
1000
|
}), r;
|
|
1001
1001
|
}
|
|
1002
1002
|
const tr = (t) => {
|
|
@@ -1009,9 +1009,9 @@ const tr = (t) => {
|
|
|
1009
1009
|
if (ee.hasStandardBrowserEnv || ee.hasStandardBrowserWebWorkerEnv)
|
|
1010
1010
|
o.setContentType(void 0);
|
|
1011
1011
|
else if (p.isFunction(r.getHeaders)) {
|
|
1012
|
-
const h = r.getHeaders(),
|
|
1013
|
-
Object.entries(h).forEach(([
|
|
1014
|
-
|
|
1012
|
+
const h = r.getHeaders(), c = ["content-type", "content-length"];
|
|
1013
|
+
Object.entries(h).forEach(([d, b]) => {
|
|
1014
|
+
c.includes(d.toLowerCase()) && o.set(d, b);
|
|
1015
1015
|
});
|
|
1016
1016
|
}
|
|
1017
1017
|
}
|
|
@@ -1025,9 +1025,9 @@ const tr = (t) => {
|
|
|
1025
1025
|
const a = tr(t);
|
|
1026
1026
|
let i = a.data;
|
|
1027
1027
|
const o = ne.from(a.headers).normalize();
|
|
1028
|
-
let { responseType: l, onUploadProgress: h, onDownloadProgress:
|
|
1028
|
+
let { responseType: l, onUploadProgress: h, onDownloadProgress: c } = a, d, b, y, w, u;
|
|
1029
1029
|
function j() {
|
|
1030
|
-
w && w(), u && u(), a.cancelToken && a.cancelToken.unsubscribe(
|
|
1030
|
+
w && w(), u && u(), a.cancelToken && a.cancelToken.unsubscribe(d), a.signal && a.signal.removeEventListener("abort", d);
|
|
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
|
}, i === void 0 && o.setContentType(null), "setRequestHeader" in m && p.forEach(o.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),
|
|
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) => {
|
|
1072
1072
|
m && (s(!z || z.type ? new je(null, t, m) : z), m.abort(), m = null);
|
|
1073
|
-
}, a.cancelToken && a.cancelToken.subscribe(
|
|
1073
|
+
}, a.cancelToken && a.cancelToken.subscribe(d), a.signal && (a.signal.aborted ? d() : a.signal.addEventListener("abort", d)));
|
|
1074
1074
|
const R = vn(a.url);
|
|
1075
1075
|
if (R && ee.protocols.indexOf(R) === -1) {
|
|
1076
1076
|
s(new L("Unsupported protocol " + R + ":", L.ERR_BAD_REQUEST, t));
|
|
@@ -1082,22 +1082,22 @@ const tr = (t) => {
|
|
|
1082
1082
|
const { length: r } = t = t ? t.filter(Boolean) : [];
|
|
1083
1083
|
if (e || r) {
|
|
1084
1084
|
let s = new AbortController(), a;
|
|
1085
|
-
const i = function(
|
|
1085
|
+
const i = function(c) {
|
|
1086
1086
|
if (!a) {
|
|
1087
1087
|
a = !0, l();
|
|
1088
|
-
const
|
|
1089
|
-
s.abort(
|
|
1088
|
+
const d = c instanceof Error ? c : this.reason;
|
|
1089
|
+
s.abort(d instanceof L ? d : new je(d instanceof Error ? d.message : d));
|
|
1090
1090
|
}
|
|
1091
1091
|
};
|
|
1092
1092
|
let o = e && setTimeout(() => {
|
|
1093
1093
|
o = null, i(new L(`timeout ${e} of ms exceeded`, L.ETIMEDOUT));
|
|
1094
1094
|
}, e);
|
|
1095
1095
|
const l = () => {
|
|
1096
|
-
t && (o && clearTimeout(o), o = null, t.forEach((
|
|
1097
|
-
|
|
1096
|
+
t && (o && clearTimeout(o), o = null, t.forEach((c) => {
|
|
1097
|
+
c.unsubscribe ? c.unsubscribe(i) : c.removeEventListener("abort", i);
|
|
1098
1098
|
}), t = null);
|
|
1099
1099
|
};
|
|
1100
|
-
t.forEach((
|
|
1100
|
+
t.forEach((c) => c.addEventListener("abort", i));
|
|
1101
1101
|
const { signal: h } = s;
|
|
1102
1102
|
return h.unsubscribe = () => p.asap(l), h;
|
|
1103
1103
|
}
|
|
@@ -1137,19 +1137,19 @@ const tr = (t) => {
|
|
|
1137
1137
|
return new ReadableStream({
|
|
1138
1138
|
async pull(h) {
|
|
1139
1139
|
try {
|
|
1140
|
-
const { done:
|
|
1141
|
-
if (
|
|
1140
|
+
const { done: c, value: d } = await a.next();
|
|
1141
|
+
if (c) {
|
|
1142
1142
|
l(), h.close();
|
|
1143
1143
|
return;
|
|
1144
1144
|
}
|
|
1145
|
-
let
|
|
1145
|
+
let b = d.byteLength;
|
|
1146
1146
|
if (r) {
|
|
1147
|
-
let
|
|
1148
|
-
r(
|
|
1147
|
+
let y = i += b;
|
|
1148
|
+
r(y);
|
|
1149
1149
|
}
|
|
1150
|
-
h.enqueue(new Uint8Array(
|
|
1151
|
-
} catch (
|
|
1152
|
-
throw l(
|
|
1150
|
+
h.enqueue(new Uint8Array(d));
|
|
1151
|
+
} catch (c) {
|
|
1152
|
+
throw l(c), c;
|
|
1153
1153
|
}
|
|
1154
1154
|
},
|
|
1155
1155
|
cancel(h) {
|
|
@@ -1177,7 +1177,7 @@ const tr = (t) => {
|
|
|
1177
1177
|
const { fetch: e, Request: r, Response: s } = t, a = e ? Oe(e) : typeof fetch == "function", i = Oe(r), o = 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())),
|
|
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 = i && l && Tt(() => {
|
|
1181
1181
|
let u = !1;
|
|
1182
1182
|
const j = new r(ee.origin, {
|
|
1183
1183
|
body: new Et(),
|
|
@@ -1187,18 +1187,18 @@ const tr = (t) => {
|
|
|
1187
1187
|
}
|
|
1188
1188
|
}).headers.has("Content-Type");
|
|
1189
1189
|
return u && !j;
|
|
1190
|
-
}),
|
|
1191
|
-
stream:
|
|
1190
|
+
}), d = o && l && Tt(() => p.isReadableStream(new s("").body)), b = {
|
|
1191
|
+
stream: d && ((u) => u.body)
|
|
1192
1192
|
};
|
|
1193
1193
|
a && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((u) => {
|
|
1194
|
-
!
|
|
1194
|
+
!b[u] && (b[u] = (j, m) => {
|
|
1195
1195
|
let $ = j && j[u];
|
|
1196
1196
|
if ($)
|
|
1197
1197
|
return $.call(j);
|
|
1198
1198
|
throw new L(`Response type '${u}' is not supported`, L.ERR_NOT_SUPPORT, m);
|
|
1199
1199
|
});
|
|
1200
1200
|
});
|
|
1201
|
-
const
|
|
1201
|
+
const y = async (u) => {
|
|
1202
1202
|
if (u == null)
|
|
1203
1203
|
return 0;
|
|
1204
1204
|
if (p.isBlob(u))
|
|
@@ -1214,7 +1214,7 @@ const tr = (t) => {
|
|
|
1214
1214
|
return (await h(u)).byteLength;
|
|
1215
1215
|
}, w = async (u, j) => {
|
|
1216
1216
|
const m = p.toFiniteNumber(u.getContentLength());
|
|
1217
|
-
return m ??
|
|
1217
|
+
return m ?? y(j);
|
|
1218
1218
|
};
|
|
1219
1219
|
return async (u) => {
|
|
1220
1220
|
let {
|
|
@@ -1238,7 +1238,7 @@ const tr = (t) => {
|
|
|
1238
1238
|
});
|
|
1239
1239
|
let J;
|
|
1240
1240
|
try {
|
|
1241
|
-
if (g &&
|
|
1241
|
+
if (g && c && m !== "get" && m !== "head" && (J = await w(v, $)) !== 0) {
|
|
1242
1242
|
let f = new r(j, {
|
|
1243
1243
|
method: "POST",
|
|
1244
1244
|
body: $,
|
|
@@ -1264,8 +1264,8 @@ const tr = (t) => {
|
|
|
1264
1264
|
};
|
|
1265
1265
|
Z = i && new r(j, O);
|
|
1266
1266
|
let K = await (i ? F(Z, W) : F(j, O));
|
|
1267
|
-
const Q =
|
|
1268
|
-
if (
|
|
1267
|
+
const Q = d && (I === "stream" || I === "response");
|
|
1268
|
+
if (d && (q || Q && T)) {
|
|
1269
1269
|
const f = {};
|
|
1270
1270
|
["status", "statusText", "headers"].forEach((_) => {
|
|
1271
1271
|
f[_] = K[_];
|
|
@@ -1282,7 +1282,7 @@ const tr = (t) => {
|
|
|
1282
1282
|
);
|
|
1283
1283
|
}
|
|
1284
1284
|
I = I || "text";
|
|
1285
|
-
let G = await
|
|
1285
|
+
let G = await b[p.findKey(b, I) || "text"](K, u);
|
|
1286
1286
|
return !Q && T && T(), await new Promise((f, S) => {
|
|
1287
1287
|
Qt(f, S, {
|
|
1288
1288
|
data: G,
|
|
@@ -1309,10 +1309,10 @@ const tr = (t) => {
|
|
|
1309
1309
|
a,
|
|
1310
1310
|
r
|
|
1311
1311
|
];
|
|
1312
|
-
let o = i.length, l = o, h,
|
|
1312
|
+
let o = i.length, l = o, h, c, d = Dn;
|
|
1313
1313
|
for (; l--; )
|
|
1314
|
-
h = i[l],
|
|
1315
|
-
return
|
|
1314
|
+
h = i[l], c = d.get(h), c === void 0 && d.set(h, c = l ? /* @__PURE__ */ new Map() : Nn(e)), d = c;
|
|
1315
|
+
return c;
|
|
1316
1316
|
};
|
|
1317
1317
|
rr();
|
|
1318
1318
|
const tt = {
|
|
@@ -1348,7 +1348,7 @@ const Rt = (t) => `- ${t}`, Un = (t) => p.isFunction(t) || t === null || t === !
|
|
|
1348
1348
|
}
|
|
1349
1349
|
if (!a) {
|
|
1350
1350
|
const o = Object.entries(i).map(
|
|
1351
|
-
([h,
|
|
1351
|
+
([h, c]) => `adapter ${h} ` + (c === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1352
1352
|
);
|
|
1353
1353
|
let l = r ? o.length > 1 ? `since :
|
|
1354
1354
|
` + o.map(Rt).join(`
|
|
@@ -1496,21 +1496,21 @@ let xe = class {
|
|
|
1496
1496
|
this.interceptors.request.forEach(function(j) {
|
|
1497
1497
|
typeof j.runWhen == "function" && j.runWhen(r) === !1 || (h = h && j.synchronous, l.unshift(j.fulfilled, j.rejected));
|
|
1498
1498
|
});
|
|
1499
|
-
const
|
|
1499
|
+
const c = [];
|
|
1500
1500
|
this.interceptors.response.forEach(function(j) {
|
|
1501
|
-
|
|
1501
|
+
c.push(j.fulfilled, j.rejected);
|
|
1502
1502
|
});
|
|
1503
|
-
let
|
|
1503
|
+
let d, b = 0, y;
|
|
1504
1504
|
if (!h) {
|
|
1505
1505
|
const u = [It.bind(this), void 0];
|
|
1506
|
-
for (u.unshift(...l), u.push(...
|
|
1507
|
-
|
|
1508
|
-
return
|
|
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;
|
|
1509
1509
|
}
|
|
1510
|
-
|
|
1510
|
+
y = l.length;
|
|
1511
1511
|
let w = r;
|
|
1512
|
-
for (;
|
|
1513
|
-
const u = l[
|
|
1512
|
+
for (; b < y; ) {
|
|
1513
|
+
const u = l[b++], j = l[b++];
|
|
1514
1514
|
try {
|
|
1515
1515
|
w = u(w);
|
|
1516
1516
|
} catch (m) {
|
|
@@ -1519,13 +1519,13 @@ let xe = class {
|
|
|
1519
1519
|
}
|
|
1520
1520
|
}
|
|
1521
1521
|
try {
|
|
1522
|
-
|
|
1522
|
+
d = It.call(this, w);
|
|
1523
1523
|
} catch (u) {
|
|
1524
1524
|
return Promise.reject(u);
|
|
1525
1525
|
}
|
|
1526
|
-
for (
|
|
1527
|
-
|
|
1528
|
-
return
|
|
1526
|
+
for (b = 0, y = c.length; b < y; )
|
|
1527
|
+
d = d.then(c[b++], c[b++]);
|
|
1528
|
+
return d;
|
|
1529
1529
|
}
|
|
1530
1530
|
getUri(e) {
|
|
1531
1531
|
e = he(this.defaults, e);
|
|
@@ -1746,8 +1746,8 @@ const {
|
|
|
1746
1746
|
toFormData: oa,
|
|
1747
1747
|
AxiosHeaders: ia,
|
|
1748
1748
|
HttpStatusCode: la,
|
|
1749
|
-
formToJSON:
|
|
1750
|
-
getAdapter:
|
|
1749
|
+
formToJSON: ca,
|
|
1750
|
+
getAdapter: da,
|
|
1751
1751
|
mergeConfig: ua
|
|
1752
1752
|
} = M;
|
|
1753
1753
|
class pa {
|
|
@@ -2346,7 +2346,7 @@ function Bn() {
|
|
|
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
|
|
2349
|
+
function c(f, S, x, k, _, N) {
|
|
2350
2350
|
var Y = x.ref;
|
|
2351
2351
|
return f = {
|
|
2352
2352
|
$$typeof: u,
|
|
@@ -2379,19 +2379,19 @@ function Bn() {
|
|
|
2379
2379
|
value: N
|
|
2380
2380
|
}), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
|
|
2381
2381
|
}
|
|
2382
|
-
function
|
|
2382
|
+
function d(f, S, x, k, _, N) {
|
|
2383
2383
|
var Y = S.children;
|
|
2384
2384
|
if (Y !== void 0)
|
|
2385
2385
|
if (k)
|
|
2386
2386
|
if (T(Y)) {
|
|
2387
2387
|
for (k = 0; k < Y.length; k++)
|
|
2388
|
-
|
|
2388
|
+
b(Y[k]);
|
|
2389
2389
|
Object.freeze && Object.freeze(Y);
|
|
2390
2390
|
} else
|
|
2391
2391
|
console.error(
|
|
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
|
-
else
|
|
2394
|
+
else b(Y);
|
|
2395
2395
|
if (Z.call(S, "key")) {
|
|
2396
2396
|
Y = t(f);
|
|
2397
2397
|
var se = Object.keys(S).filter(function(ve) {
|
|
@@ -2418,7 +2418,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2418
2418
|
return Y && l(
|
|
2419
2419
|
x,
|
|
2420
2420
|
typeof f == "function" ? f.displayName || f.name || "Unknown" : f
|
|
2421
|
-
),
|
|
2421
|
+
), c(
|
|
2422
2422
|
f,
|
|
2423
2423
|
Y,
|
|
2424
2424
|
x,
|
|
@@ -2427,10 +2427,10 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2427
2427
|
N
|
|
2428
2428
|
);
|
|
2429
2429
|
}
|
|
2430
|
-
function y(f) {
|
|
2431
|
-
b(f) ? f._store && (f._store.validated = 1) : typeof f == "object" && f !== null && f.$$typeof === D && (f._payload.status === "fulfilled" ? b(f._payload.value) && f._payload.value._store && (f._payload.value._store.validated = 1) : f._store && (f._store.validated = 1));
|
|
2432
|
-
}
|
|
2433
2430
|
function b(f) {
|
|
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
|
+
}
|
|
2433
|
+
function y(f) {
|
|
2434
2434
|
return typeof f == "object" && f !== null && f.$$typeof === u;
|
|
2435
2435
|
}
|
|
2436
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() {
|
|
@@ -2447,7 +2447,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2447
2447
|
)(), Q = J(s(i)), G = {};
|
|
2448
2448
|
Ee.Fragment = m, Ee.jsx = function(f, S, x) {
|
|
2449
2449
|
var k = 1e4 > V.recentlyCreatedOwnerStacks++;
|
|
2450
|
-
return
|
|
2450
|
+
return d(
|
|
2451
2451
|
f,
|
|
2452
2452
|
S,
|
|
2453
2453
|
x,
|
|
@@ -2457,7 +2457,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2457
2457
|
);
|
|
2458
2458
|
}, Ee.jsxs = function(f, S, x) {
|
|
2459
2459
|
var k = 1e4 > V.recentlyCreatedOwnerStacks++;
|
|
2460
|
-
return
|
|
2460
|
+
return d(
|
|
2461
2461
|
f,
|
|
2462
2462
|
S,
|
|
2463
2463
|
x,
|
|
@@ -2474,14 +2474,14 @@ function Hn() {
|
|
|
2474
2474
|
}
|
|
2475
2475
|
var n = Hn();
|
|
2476
2476
|
const Vn = async (t, e) => {
|
|
2477
|
-
const { name: r, email: s, password: a, appId: i, phone: o, address: l, avatarUrl: h, isActive:
|
|
2478
|
-
if (!
|
|
2477
|
+
const { name: r, email: s, password: a, appId: i, phone: o, address: l, avatarUrl: h, isActive: c = !0, role: d = "user" } = t, { baseUrl: b, apiKey: y } = e;
|
|
2478
|
+
if (!y)
|
|
2479
2479
|
throw new Error("API key is required for signup");
|
|
2480
2480
|
if (!r || !s || !a || !i)
|
|
2481
2481
|
throw new Error("Name, email, password, and appId are required");
|
|
2482
2482
|
try {
|
|
2483
2483
|
const w = await M.post(
|
|
2484
|
-
`${
|
|
2484
|
+
`${b}/users/signup`,
|
|
2485
2485
|
{
|
|
2486
2486
|
name: r,
|
|
2487
2487
|
email: s,
|
|
@@ -2490,13 +2490,13 @@ const Vn = async (t, e) => {
|
|
|
2490
2490
|
phone: o,
|
|
2491
2491
|
address: l,
|
|
2492
2492
|
avatarUrl: h,
|
|
2493
|
-
isActive:
|
|
2494
|
-
role:
|
|
2493
|
+
isActive: c,
|
|
2494
|
+
role: d
|
|
2495
2495
|
},
|
|
2496
2496
|
{
|
|
2497
2497
|
headers: {
|
|
2498
2498
|
"Content-Type": "application/json",
|
|
2499
|
-
"x-api-key":
|
|
2499
|
+
"x-api-key": y
|
|
2500
2500
|
}
|
|
2501
2501
|
}
|
|
2502
2502
|
);
|
|
@@ -2592,7 +2592,7 @@ const Xn = Nt(
|
|
|
2592
2592
|
...l
|
|
2593
2593
|
},
|
|
2594
2594
|
[
|
|
2595
|
-
...o.map(([
|
|
2595
|
+
...o.map(([c, d]) => Xe(c, d)),
|
|
2596
2596
|
...Array.isArray(i) ? i : [i]
|
|
2597
2597
|
]
|
|
2598
2598
|
)
|
|
@@ -2661,7 +2661,7 @@ const ts = [
|
|
|
2661
2661
|
const rs = [
|
|
2662
2662
|
["path", { d: "M21.801 10A10 10 0 1 1 17 3.335", key: "yps3ct" }],
|
|
2663
2663
|
["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
|
|
2664
|
-
],
|
|
2664
|
+
], ce = B("circle-check-big", rs);
|
|
2665
2665
|
/**
|
|
2666
2666
|
* @license lucide-react v0.544.0 - ISC
|
|
2667
2667
|
*
|
|
@@ -2724,7 +2724,7 @@ const ls = [
|
|
|
2724
2724
|
* This source code is licensed under the ISC license.
|
|
2725
2725
|
* See the LICENSE file in the root directory of this source tree.
|
|
2726
2726
|
*/
|
|
2727
|
-
const
|
|
2727
|
+
const cs = [
|
|
2728
2728
|
[
|
|
2729
2729
|
"path",
|
|
2730
2730
|
{
|
|
@@ -2733,14 +2733,14 @@ const ds = [
|
|
|
2733
2733
|
}
|
|
2734
2734
|
],
|
|
2735
2735
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
2736
|
-
], lt = B("eye",
|
|
2736
|
+
], lt = B("eye", cs);
|
|
2737
2737
|
/**
|
|
2738
2738
|
* @license lucide-react v0.544.0 - ISC
|
|
2739
2739
|
*
|
|
2740
2740
|
* This source code is licensed under the ISC license.
|
|
2741
2741
|
* See the LICENSE file in the root directory of this source tree.
|
|
2742
2742
|
*/
|
|
2743
|
-
const
|
|
2743
|
+
const ds = [
|
|
2744
2744
|
["path", { d: "M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8", key: "5wwlr5" }],
|
|
2745
2745
|
[
|
|
2746
2746
|
"path",
|
|
@@ -2749,7 +2749,7 @@ const cs = [
|
|
|
2749
2749
|
key: "r6nss1"
|
|
2750
2750
|
}
|
|
2751
2751
|
]
|
|
2752
|
-
], us = B("house",
|
|
2752
|
+
], us = B("house", ds);
|
|
2753
2753
|
/**
|
|
2754
2754
|
* @license lucide-react v0.544.0 - ISC
|
|
2755
2755
|
*
|
|
@@ -2776,7 +2776,7 @@ const fs = [
|
|
|
2776
2776
|
}
|
|
2777
2777
|
],
|
|
2778
2778
|
["circle", { cx: "16.5", cy: "7.5", r: ".5", fill: "currentColor", key: "w0ekpg" }]
|
|
2779
|
-
],
|
|
2779
|
+
], cr = B("key-round", fs);
|
|
2780
2780
|
/**
|
|
2781
2781
|
* @license lucide-react v0.544.0 - ISC
|
|
2782
2782
|
*
|
|
@@ -2787,7 +2787,7 @@ const xs = [
|
|
|
2787
2787
|
["path", { d: "m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4", key: "g0fldk" }],
|
|
2788
2788
|
["path", { d: "m21 2-9.6 9.6", key: "1j0ho8" }],
|
|
2789
2789
|
["circle", { cx: "7.5", cy: "15.5", r: "5.5", key: "yqb3hr" }]
|
|
2790
|
-
],
|
|
2790
|
+
], ct = B("key", xs);
|
|
2791
2791
|
/**
|
|
2792
2792
|
* @license lucide-react v0.544.0 - ISC
|
|
2793
2793
|
*
|
|
@@ -2842,7 +2842,7 @@ const js = [
|
|
|
2842
2842
|
["path", { d: "m16 17 5-5-5-5", key: "1bji2h" }],
|
|
2843
2843
|
["path", { d: "M21 12H9", key: "dn1m92" }],
|
|
2844
2844
|
["path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4", key: "1uf3rs" }]
|
|
2845
|
-
],
|
|
2845
|
+
], dt = B("log-out", js);
|
|
2846
2846
|
/**
|
|
2847
2847
|
* @license lucide-react v0.544.0 - ISC
|
|
2848
2848
|
*
|
|
@@ -2852,7 +2852,7 @@ const js = [
|
|
|
2852
2852
|
const vs = [
|
|
2853
2853
|
["path", { d: "m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7", key: "132q7q" }],
|
|
2854
2854
|
["rect", { x: "2", y: "4", width: "20", height: "16", rx: "2", key: "izxlao" }]
|
|
2855
|
-
],
|
|
2855
|
+
], de = B("mail", vs);
|
|
2856
2856
|
/**
|
|
2857
2857
|
* @license lucide-react v0.544.0 - ISC
|
|
2858
2858
|
*
|
|
@@ -2963,7 +2963,7 @@ const $s = [
|
|
|
2963
2963
|
key: "oel41y"
|
|
2964
2964
|
}
|
|
2965
2965
|
]
|
|
2966
|
-
],
|
|
2966
|
+
], dr = B("shield", $s);
|
|
2967
2967
|
/**
|
|
2968
2968
|
* @license lucide-react v0.544.0 - ISC
|
|
2969
2969
|
*
|
|
@@ -3044,19 +3044,19 @@ const Fs = [
|
|
|
3044
3044
|
darkMode: l = !0,
|
|
3045
3045
|
// Only avatar is optional
|
|
3046
3046
|
showAvatar: h = !1,
|
|
3047
|
-
roles:
|
|
3047
|
+
roles: c = [],
|
|
3048
3048
|
// 🔥 FIXED
|
|
3049
|
-
showRoleSelector:
|
|
3049
|
+
showRoleSelector: d = !1,
|
|
3050
3050
|
// 🔥 FIXED
|
|
3051
|
-
loginUrl:
|
|
3052
|
-
onSuccess:
|
|
3051
|
+
loginUrl: b,
|
|
3052
|
+
onSuccess: y,
|
|
3053
3053
|
onError: w
|
|
3054
3054
|
}) => {
|
|
3055
3055
|
const { baseUrl: u, apiKey: j, appId: m } = ge(), $ = {
|
|
3056
3056
|
name: "",
|
|
3057
3057
|
email: "",
|
|
3058
3058
|
password: "",
|
|
3059
|
-
role:
|
|
3059
|
+
role: c.length ? c[0] : "user",
|
|
3060
3060
|
...h && { avatarUrl: "" }
|
|
3061
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)";
|
|
3062
3062
|
Le.useEffect(() => {
|
|
@@ -3079,7 +3079,7 @@ const Fs = [
|
|
|
3079
3079
|
...R,
|
|
3080
3080
|
appId: m
|
|
3081
3081
|
}, k = await Vn(x, { baseUrl: u, apiKey: j });
|
|
3082
|
-
D({ type: "success", text: "Account created successfully!" }),
|
|
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.";
|
|
3085
3085
|
D({ type: "error", text: k }), w && w(x);
|
|
@@ -3215,7 +3215,7 @@ const Fs = [
|
|
|
3215
3215
|
onSubmit: G,
|
|
3216
3216
|
style: { display: "flex", flexDirection: "column", gap: "14px" },
|
|
3217
3217
|
children: [
|
|
3218
|
-
|
|
3218
|
+
d && c && c.length === 2 && /* @__PURE__ */ n.jsxs(
|
|
3219
3219
|
"div",
|
|
3220
3220
|
{
|
|
3221
3221
|
style: { display: "flex", flexDirection: "column", gap: "4px" },
|
|
@@ -3260,7 +3260,7 @@ const Fs = [
|
|
|
3260
3260
|
// subtle shadow
|
|
3261
3261
|
borderRadius: "10px",
|
|
3262
3262
|
transition: "transform 0.3s ease, background-color 0.3s ease",
|
|
3263
|
-
transform: R.role ===
|
|
3263
|
+
transform: R.role === c[1] ? "translateX(100%)" : "translateX(0)",
|
|
3264
3264
|
zIndex: 0
|
|
3265
3265
|
}
|
|
3266
3266
|
}
|
|
@@ -3269,43 +3269,43 @@ const Fs = [
|
|
|
3269
3269
|
"button",
|
|
3270
3270
|
{
|
|
3271
3271
|
type: "button",
|
|
3272
|
-
onClick: () => z((S) => ({ ...S, role:
|
|
3272
|
+
onClick: () => z((S) => ({ ...S, role: c[0] })),
|
|
3273
3273
|
style: {
|
|
3274
3274
|
flex: 1,
|
|
3275
3275
|
zIndex: 10,
|
|
3276
3276
|
border: "none",
|
|
3277
3277
|
background: "transparent",
|
|
3278
|
-
color: R.role ===
|
|
3278
|
+
color: R.role === c[0] ? i : l ? "#9ca3af" : "#6b7280",
|
|
3279
3279
|
// theme-aware inactive color
|
|
3280
|
-
fontWeight: R.role ===
|
|
3280
|
+
fontWeight: R.role === c[0] ? 600 : 500,
|
|
3281
3281
|
fontSize: "14px",
|
|
3282
3282
|
display: "flex",
|
|
3283
3283
|
alignItems: "center",
|
|
3284
3284
|
justifyContent: "center",
|
|
3285
3285
|
transition: "color 0.2s ease"
|
|
3286
3286
|
},
|
|
3287
|
-
children:
|
|
3287
|
+
children: c[0].charAt(0).toUpperCase() + c[0].slice(1)
|
|
3288
3288
|
}
|
|
3289
3289
|
),
|
|
3290
3290
|
/* @__PURE__ */ n.jsx(
|
|
3291
3291
|
"button",
|
|
3292
3292
|
{
|
|
3293
3293
|
type: "button",
|
|
3294
|
-
onClick: () => z((S) => ({ ...S, role:
|
|
3294
|
+
onClick: () => z((S) => ({ ...S, role: c[1] })),
|
|
3295
3295
|
style: {
|
|
3296
3296
|
flex: 1,
|
|
3297
3297
|
zIndex: 10,
|
|
3298
3298
|
border: "none",
|
|
3299
3299
|
background: "transparent",
|
|
3300
|
-
color: R.role ===
|
|
3301
|
-
fontWeight: R.role ===
|
|
3300
|
+
color: R.role === c[1] ? i : l ? "#9ca3af" : "#6b7280",
|
|
3301
|
+
fontWeight: R.role === c[1] ? 600 : 500,
|
|
3302
3302
|
fontSize: "14px",
|
|
3303
3303
|
display: "flex",
|
|
3304
3304
|
alignItems: "center",
|
|
3305
3305
|
justifyContent: "center",
|
|
3306
3306
|
transition: "color 0.2s ease"
|
|
3307
3307
|
},
|
|
3308
|
-
children:
|
|
3308
|
+
children: c[1].charAt(0).toUpperCase() + c[1].slice(1)
|
|
3309
3309
|
}
|
|
3310
3310
|
)
|
|
3311
3311
|
]
|
|
@@ -3384,7 +3384,7 @@ const Fs = [
|
|
|
3384
3384
|
),
|
|
3385
3385
|
/* @__PURE__ */ n.jsxs("div", { style: { position: "relative" }, children: [
|
|
3386
3386
|
/* @__PURE__ */ n.jsx(
|
|
3387
|
-
|
|
3387
|
+
de,
|
|
3388
3388
|
{
|
|
3389
3389
|
size: 20,
|
|
3390
3390
|
style: {
|
|
@@ -3545,7 +3545,7 @@ const Fs = [
|
|
|
3545
3545
|
]
|
|
3546
3546
|
}
|
|
3547
3547
|
),
|
|
3548
|
-
|
|
3548
|
+
b && /* @__PURE__ */ n.jsx(
|
|
3549
3549
|
"div",
|
|
3550
3550
|
{
|
|
3551
3551
|
style: {
|
|
@@ -3556,7 +3556,7 @@ const Fs = [
|
|
|
3556
3556
|
children: /* @__PURE__ */ n.jsx(
|
|
3557
3557
|
"a",
|
|
3558
3558
|
{
|
|
3559
|
-
href:
|
|
3559
|
+
href: b,
|
|
3560
3560
|
style: {
|
|
3561
3561
|
color: i,
|
|
3562
3562
|
textDecoration: "none",
|
|
@@ -3582,7 +3582,7 @@ const Fs = [
|
|
|
3582
3582
|
color: v.type === "success" ? i : "#ef4444"
|
|
3583
3583
|
},
|
|
3584
3584
|
children: [
|
|
3585
|
-
v.type === "success" ? /* @__PURE__ */ n.jsx(
|
|
3585
|
+
v.type === "success" ? /* @__PURE__ */ n.jsx(ce, { size: 20 }) : /* @__PURE__ */ n.jsx(le, { size: 20 }),
|
|
3586
3586
|
/* @__PURE__ */ n.jsx("span", { children: v.text })
|
|
3587
3587
|
]
|
|
3588
3588
|
}
|
|
@@ -3690,10 +3690,10 @@ const Fs = [
|
|
|
3690
3690
|
gradient: o = "linear-gradient(135deg, #22c55e, #00C214)",
|
|
3691
3691
|
darkMode: l = !0,
|
|
3692
3692
|
signupUrl: h,
|
|
3693
|
-
onSuccess:
|
|
3694
|
-
onError:
|
|
3693
|
+
onSuccess: c,
|
|
3694
|
+
onError: d
|
|
3695
3695
|
}) => {
|
|
3696
|
-
const { baseUrl:
|
|
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({
|
|
3697
3697
|
email: "",
|
|
3698
3698
|
otp: "",
|
|
3699
3699
|
newPassword: "",
|
|
@@ -3710,12 +3710,12 @@ const Fs = [
|
|
|
3710
3710
|
try {
|
|
3711
3711
|
const N = await qs(
|
|
3712
3712
|
{ email: v, password: W, appId: w },
|
|
3713
|
-
{ baseUrl:
|
|
3713
|
+
{ baseUrl: b, apiKey: y }
|
|
3714
3714
|
);
|
|
3715
|
-
I({ type: "success", text: `Welcome ${N.name}` }),
|
|
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 }),
|
|
3718
|
+
I({ type: "error", text: Y }), d?.(N);
|
|
3719
3719
|
} finally {
|
|
3720
3720
|
q(!1);
|
|
3721
3721
|
}
|
|
@@ -3725,12 +3725,12 @@ const Fs = [
|
|
|
3725
3725
|
_.preventDefault(), q(!0), I(null);
|
|
3726
3726
|
try {
|
|
3727
3727
|
const N = await M.post(
|
|
3728
|
-
`${
|
|
3728
|
+
`${b}/users/forgot-password`,
|
|
3729
3729
|
{
|
|
3730
3730
|
email: V.email,
|
|
3731
3731
|
appId: w
|
|
3732
3732
|
},
|
|
3733
|
-
{ headers: { "x-api-key":
|
|
3733
|
+
{ headers: { "x-api-key": y } }
|
|
3734
3734
|
);
|
|
3735
3735
|
N.data.success ? ($(2), I({ type: "success", text: "OTP sent to your email" })) : I({
|
|
3736
3736
|
type: "error",
|
|
@@ -3748,9 +3748,9 @@ const Fs = [
|
|
|
3748
3748
|
_.preventDefault(), q(!0), I(null);
|
|
3749
3749
|
try {
|
|
3750
3750
|
const N = await M.post(
|
|
3751
|
-
`${
|
|
3751
|
+
`${b}/users/reset-password`,
|
|
3752
3752
|
V,
|
|
3753
|
-
{ headers: { "x-api-key":
|
|
3753
|
+
{ headers: { "x-api-key": y } }
|
|
3754
3754
|
);
|
|
3755
3755
|
N.data.success ? (I({ type: "success", text: "Password reset successfully!" }), $(1), Z({ email: "", otp: "", newPassword: "", appId: w }), j("login")) : I({ type: "error", text: N.data.message || "Reset failed" });
|
|
3756
3756
|
} catch (N) {
|
|
@@ -3878,7 +3878,7 @@ const Fs = [
|
|
|
3878
3878
|
),
|
|
3879
3879
|
/* @__PURE__ */ n.jsxs("div", { style: { position: "relative" }, children: [
|
|
3880
3880
|
/* @__PURE__ */ n.jsx(
|
|
3881
|
-
|
|
3881
|
+
de,
|
|
3882
3882
|
{
|
|
3883
3883
|
size: 20,
|
|
3884
3884
|
style: {
|
|
@@ -4054,7 +4054,7 @@ const Fs = [
|
|
|
4054
4054
|
),
|
|
4055
4055
|
/* @__PURE__ */ n.jsxs("div", { style: { position: "relative" }, children: [
|
|
4056
4056
|
/* @__PURE__ */ n.jsx(
|
|
4057
|
-
|
|
4057
|
+
de,
|
|
4058
4058
|
{
|
|
4059
4059
|
size: 20,
|
|
4060
4060
|
style: {
|
|
@@ -4105,7 +4105,7 @@ const Fs = [
|
|
|
4105
4105
|
),
|
|
4106
4106
|
/* @__PURE__ */ n.jsxs("div", { style: { position: "relative" }, children: [
|
|
4107
4107
|
/* @__PURE__ */ n.jsx(
|
|
4108
|
-
|
|
4108
|
+
cr,
|
|
4109
4109
|
{
|
|
4110
4110
|
size: 20,
|
|
4111
4111
|
style: {
|
|
@@ -4239,7 +4239,7 @@ const Fs = [
|
|
|
4239
4239
|
color: g.type === "success" ? i : "#ef4444"
|
|
4240
4240
|
},
|
|
4241
4241
|
children: [
|
|
4242
|
-
g.type === "success" ? /* @__PURE__ */ n.jsx(
|
|
4242
|
+
g.type === "success" ? /* @__PURE__ */ n.jsx(ce, { size: 20 }) : /* @__PURE__ */ n.jsx(le, { size: 20 }),
|
|
4243
4243
|
/* @__PURE__ */ n.jsx("span", { children: g.text })
|
|
4244
4244
|
]
|
|
4245
4245
|
}
|
|
@@ -4270,72 +4270,66 @@ const Fs = [
|
|
|
4270
4270
|
authix: t,
|
|
4271
4271
|
children: e,
|
|
4272
4272
|
fallback: r = null,
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4273
|
+
loading: s = null,
|
|
4274
|
+
className: a = "",
|
|
4275
|
+
width: i,
|
|
4276
|
+
height: o
|
|
4276
4277
|
}) => {
|
|
4277
|
-
const [
|
|
4278
|
+
const [l, h] = P(!1), [c, d] = P(null);
|
|
4278
4279
|
return te(() => {
|
|
4279
|
-
|
|
4280
|
-
const c = async () => {
|
|
4280
|
+
h(!0), (async () => {
|
|
4281
4281
|
try {
|
|
4282
|
-
const
|
|
4283
|
-
d(!!
|
|
4282
|
+
const y = await t.getSession();
|
|
4283
|
+
d(!!y?.authenticated);
|
|
4284
4284
|
} catch {
|
|
4285
4285
|
d(!1);
|
|
4286
4286
|
}
|
|
4287
|
-
};
|
|
4288
|
-
|
|
4289
|
-
const y = () => c();
|
|
4290
|
-
return window.addEventListener("storage", y), () => window.removeEventListener("storage", y);
|
|
4291
|
-
}, [t]), !o || h === null ? null : h ? /* @__PURE__ */ n.jsx(
|
|
4287
|
+
})();
|
|
4288
|
+
}, [t]), l ? c === null ? typeof s == "function" ? s() : s : c ? /* @__PURE__ */ n.jsx(
|
|
4292
4289
|
"div",
|
|
4293
4290
|
{
|
|
4294
|
-
className:
|
|
4291
|
+
className: a,
|
|
4295
4292
|
style: {
|
|
4296
4293
|
display: "flex",
|
|
4297
4294
|
alignItems: "center",
|
|
4298
|
-
width:
|
|
4299
|
-
height:
|
|
4295
|
+
width: i,
|
|
4296
|
+
height: o
|
|
4300
4297
|
},
|
|
4301
4298
|
children: e
|
|
4302
4299
|
}
|
|
4303
|
-
) : typeof r == "function" ? r() : r;
|
|
4300
|
+
) : typeof r == "function" ? r() : r : null;
|
|
4304
4301
|
}, ma = ({
|
|
4305
4302
|
authix: t,
|
|
4306
4303
|
children: e,
|
|
4307
4304
|
fallback: r = null,
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4305
|
+
loading: s = null,
|
|
4306
|
+
className: a = "",
|
|
4307
|
+
width: i,
|
|
4308
|
+
height: o
|
|
4311
4309
|
}) => {
|
|
4312
|
-
const [
|
|
4310
|
+
const [l, h] = P(!1), [c, d] = P(null);
|
|
4313
4311
|
return te(() => {
|
|
4314
|
-
|
|
4315
|
-
const c = async () => {
|
|
4312
|
+
h(!0), (async () => {
|
|
4316
4313
|
try {
|
|
4317
|
-
const
|
|
4318
|
-
d(!
|
|
4314
|
+
const y = await t.getSession();
|
|
4315
|
+
d(!y?.authenticated);
|
|
4319
4316
|
} catch {
|
|
4320
4317
|
d(!0);
|
|
4321
4318
|
}
|
|
4322
|
-
};
|
|
4323
|
-
|
|
4324
|
-
const y = () => c();
|
|
4325
|
-
return window.addEventListener("storage", y), () => window.removeEventListener("storage", y);
|
|
4326
|
-
}, [t]), !o || h === null ? null : h ? /* @__PURE__ */ n.jsx(
|
|
4319
|
+
})();
|
|
4320
|
+
}, [t]), l ? c === null ? typeof s == "function" ? s() : s : c ? /* @__PURE__ */ n.jsx(
|
|
4327
4321
|
"div",
|
|
4328
4322
|
{
|
|
4329
|
-
className:
|
|
4323
|
+
className: a,
|
|
4330
4324
|
style: {
|
|
4331
4325
|
display: "flex",
|
|
4332
4326
|
alignItems: "center",
|
|
4333
|
-
width:
|
|
4334
|
-
height:
|
|
4327
|
+
width: i,
|
|
4328
|
+
height: o
|
|
4335
4329
|
},
|
|
4336
4330
|
children: e
|
|
4337
4331
|
}
|
|
4338
|
-
) : typeof r == "function" ? r() : r;
|
|
4332
|
+
) : typeof r == "function" ? r() : r : null;
|
|
4339
4333
|
}, Ms = ({
|
|
4340
4334
|
isOpen: t,
|
|
4341
4335
|
onClose: e,
|
|
@@ -4345,7 +4339,7 @@ const Fs = [
|
|
|
4345
4339
|
token: i,
|
|
4346
4340
|
colors: o
|
|
4347
4341
|
}) => {
|
|
4348
|
-
const { baseUrl: l, apiKey: h, appId:
|
|
4342
|
+
const { baseUrl: l, apiKey: h, appId: c } = ge(), [d, b] = P(!1), [y, w] = P(""), [u, j] = P("warning"), [m, $] = P(!1);
|
|
4349
4343
|
if (te(() => {
|
|
4350
4344
|
if (typeof window > "u") return;
|
|
4351
4345
|
const g = () => {
|
|
@@ -4354,10 +4348,10 @@ const Fs = [
|
|
|
4354
4348
|
return g(), window.addEventListener("resize", g), () => window.removeEventListener("resize", g);
|
|
4355
4349
|
}, []), !t) return null;
|
|
4356
4350
|
const R = async () => {
|
|
4357
|
-
|
|
4351
|
+
b(!0), j("processing");
|
|
4358
4352
|
try {
|
|
4359
4353
|
const { data: g } = await M.delete(`${l}/users/delete/${a}`, {
|
|
4360
|
-
data: { appId:
|
|
4354
|
+
data: { appId: c },
|
|
4361
4355
|
headers: {
|
|
4362
4356
|
"x-api-key": h
|
|
4363
4357
|
}
|
|
@@ -4368,9 +4362,9 @@ const Fs = [
|
|
|
4368
4362
|
} catch (g) {
|
|
4369
4363
|
s(g.response?.data?.message || "Something went wrong"), j("warning");
|
|
4370
4364
|
} finally {
|
|
4371
|
-
|
|
4365
|
+
b(!1);
|
|
4372
4366
|
}
|
|
4373
|
-
}, z =
|
|
4367
|
+
}, z = y.toLowerCase() === "delete my account", C = (g) => {
|
|
4374
4368
|
g.target === g.currentTarget && u !== "processing" && u !== "success" && e();
|
|
4375
4369
|
}, q = () => {
|
|
4376
4370
|
switch (u) {
|
|
@@ -4518,7 +4512,7 @@ const Fs = [
|
|
|
4518
4512
|
text: "This action cannot be reversed"
|
|
4519
4513
|
},
|
|
4520
4514
|
{
|
|
4521
|
-
icon: /* @__PURE__ */ n.jsx(
|
|
4515
|
+
icon: /* @__PURE__ */ n.jsx(dt, { size: 16 }),
|
|
4522
4516
|
text: "You will lose access to all services"
|
|
4523
4517
|
}
|
|
4524
4518
|
].map((g, I) => /* @__PURE__ */ n.jsxs(
|
|
@@ -4687,7 +4681,7 @@ const Fs = [
|
|
|
4687
4681
|
"input",
|
|
4688
4682
|
{
|
|
4689
4683
|
type: "text",
|
|
4690
|
-
value:
|
|
4684
|
+
value: y,
|
|
4691
4685
|
onChange: (g) => w(g.target.value),
|
|
4692
4686
|
placeholder: "delete my account",
|
|
4693
4687
|
style: {
|
|
@@ -4773,7 +4767,7 @@ const Fs = [
|
|
|
4773
4767
|
"button",
|
|
4774
4768
|
{
|
|
4775
4769
|
onClick: R,
|
|
4776
|
-
disabled: !z ||
|
|
4770
|
+
disabled: !z || d,
|
|
4777
4771
|
style: {
|
|
4778
4772
|
padding: "10px 24px",
|
|
4779
4773
|
borderRadius: "10px",
|
|
@@ -4782,22 +4776,22 @@ const Fs = [
|
|
|
4782
4776
|
color: "white",
|
|
4783
4777
|
fontSize: "14px",
|
|
4784
4778
|
fontWeight: 600,
|
|
4785
|
-
cursor: !z ||
|
|
4779
|
+
cursor: !z || d ? "not-allowed" : "pointer",
|
|
4786
4780
|
flex: m ? "none" : 1,
|
|
4787
4781
|
minWidth: m ? "100%" : "140px",
|
|
4788
|
-
opacity: !z ||
|
|
4782
|
+
opacity: !z || d ? 0.6 : 1,
|
|
4789
4783
|
display: "flex",
|
|
4790
4784
|
alignItems: "center",
|
|
4791
4785
|
justifyContent: "center",
|
|
4792
4786
|
gap: "8px",
|
|
4793
4787
|
transition: "all 0.2s ease",
|
|
4794
|
-
boxShadow: !z ||
|
|
4788
|
+
boxShadow: !z || d ? "none" : "0 4px 12px rgba(239, 68, 68, 0.4)"
|
|
4795
4789
|
},
|
|
4796
4790
|
onMouseOver: (g) => {
|
|
4797
|
-
z && !
|
|
4791
|
+
z && !d && (g.currentTarget.style.transform = "translateY(-1px)", g.currentTarget.style.boxShadow = "0 6px 20px rgba(239, 68, 68, 0.5)");
|
|
4798
4792
|
},
|
|
4799
4793
|
onMouseOut: (g) => {
|
|
4800
|
-
z && !
|
|
4794
|
+
z && !d && (g.currentTarget.style.transform = "translateY(0)", g.currentTarget.style.boxShadow = "0 4px 12px rgba(239, 68, 68, 0.4)");
|
|
4801
4795
|
},
|
|
4802
4796
|
children: [
|
|
4803
4797
|
/* @__PURE__ */ n.jsx(Ne, { size: 16 }),
|
|
@@ -4946,7 +4940,7 @@ const Fs = [
|
|
|
4946
4940
|
},
|
|
4947
4941
|
children: [
|
|
4948
4942
|
/* @__PURE__ */ n.jsx(
|
|
4949
|
-
|
|
4943
|
+
dr,
|
|
4950
4944
|
{
|
|
4951
4945
|
size: 18,
|
|
4952
4946
|
style: { color: o.accent, flexShrink: 0 }
|
|
@@ -5197,21 +5191,21 @@ const Fs = [
|
|
|
5197
5191
|
onUpdate: r,
|
|
5198
5192
|
colors: s
|
|
5199
5193
|
}) => {
|
|
5200
|
-
const [a, i] = P(""), [o, l] = P(!1), [h,
|
|
5194
|
+
const [a, i] = P(""), [o, l] = P(!1), [h, c] = P(!1), [d, b] = P({ isValid: !1, message: "", type: null });
|
|
5201
5195
|
if (te(() => {
|
|
5202
5196
|
if (typeof window > "u") return;
|
|
5203
5197
|
const u = () => {
|
|
5204
|
-
|
|
5198
|
+
c(window.innerWidth < 640);
|
|
5205
5199
|
};
|
|
5206
5200
|
return u(), window.addEventListener("resize", u), () => window.removeEventListener("resize", u);
|
|
5207
5201
|
}, []), te(() => {
|
|
5208
5202
|
if (!a.trim()) {
|
|
5209
|
-
|
|
5203
|
+
b({ isValid: !1, message: "", type: null });
|
|
5210
5204
|
return;
|
|
5211
5205
|
}
|
|
5212
5206
|
try {
|
|
5213
5207
|
const u = new URL(a), j = /\.(jpg|jpeg|png|gif|webp|svg)$/i.test(u.pathname);
|
|
5214
|
-
|
|
5208
|
+
b(j ? {
|
|
5215
5209
|
isValid: !0,
|
|
5216
5210
|
message: "Valid image URL",
|
|
5217
5211
|
type: "success"
|
|
@@ -5221,15 +5215,15 @@ const Fs = [
|
|
|
5221
5215
|
type: "warning"
|
|
5222
5216
|
});
|
|
5223
5217
|
} catch {
|
|
5224
|
-
|
|
5218
|
+
b({
|
|
5225
5219
|
isValid: !1,
|
|
5226
5220
|
message: "Please enter a valid URL",
|
|
5227
5221
|
type: "error"
|
|
5228
5222
|
});
|
|
5229
5223
|
}
|
|
5230
5224
|
}, [a]), !t) return null;
|
|
5231
|
-
const
|
|
5232
|
-
if (!(!a || !
|
|
5225
|
+
const y = async () => {
|
|
5226
|
+
if (!(!a || !d.isValid)) {
|
|
5233
5227
|
l(!0);
|
|
5234
5228
|
try {
|
|
5235
5229
|
await r(a) && (i(""), e());
|
|
@@ -5400,7 +5394,7 @@ const Fs = [
|
|
|
5400
5394
|
padding: "14px 16px",
|
|
5401
5395
|
paddingLeft: "44px",
|
|
5402
5396
|
borderRadius: "12px",
|
|
5403
|
-
border: `1.5px solid ${
|
|
5397
|
+
border: `1.5px solid ${d.type === "error" ? s.error : d.type === "success" ? s.success : s.border}`,
|
|
5404
5398
|
backgroundColor: "transparent",
|
|
5405
5399
|
color: s.textPrimary,
|
|
5406
5400
|
fontSize: "15px",
|
|
@@ -5412,7 +5406,7 @@ const Fs = [
|
|
|
5412
5406
|
u.target.style.borderColor = s.accent, u.target.style.boxShadow = `0 0 0 3px ${s.accent}20`;
|
|
5413
5407
|
},
|
|
5414
5408
|
onBlur: (u) => {
|
|
5415
|
-
u.target.style.borderColor =
|
|
5409
|
+
u.target.style.borderColor = d.type === "error" ? s.error : d.type === "success" ? s.success : s.border, u.target.style.boxShadow = "none";
|
|
5416
5410
|
},
|
|
5417
5411
|
disabled: o
|
|
5418
5412
|
}
|
|
@@ -5431,7 +5425,7 @@ const Fs = [
|
|
|
5431
5425
|
}
|
|
5432
5426
|
)
|
|
5433
5427
|
] }),
|
|
5434
|
-
|
|
5428
|
+
d.message && /* @__PURE__ */ n.jsxs(
|
|
5435
5429
|
"div",
|
|
5436
5430
|
{
|
|
5437
5431
|
style: {
|
|
@@ -5440,18 +5434,18 @@ const Fs = [
|
|
|
5440
5434
|
gap: "6px",
|
|
5441
5435
|
marginTop: "8px",
|
|
5442
5436
|
fontSize: "13px",
|
|
5443
|
-
color:
|
|
5437
|
+
color: d.type === "success" ? s.success : d.type === "error" ? s.error : s.textTertiary
|
|
5444
5438
|
},
|
|
5445
5439
|
children: [
|
|
5446
|
-
|
|
5447
|
-
|
|
5448
|
-
|
|
5449
|
-
|
|
5440
|
+
d.type === "success" && /* @__PURE__ */ n.jsx(ce, { size: 14 }),
|
|
5441
|
+
d.type === "error" && /* @__PURE__ */ n.jsx(le, { size: 14 }),
|
|
5442
|
+
d.type === "warning" && /* @__PURE__ */ n.jsx(le, { size: 14 }),
|
|
5443
|
+
d.message
|
|
5450
5444
|
]
|
|
5451
5445
|
}
|
|
5452
5446
|
)
|
|
5453
5447
|
] }),
|
|
5454
|
-
a &&
|
|
5448
|
+
a && d.type === "success" && /* @__PURE__ */ n.jsxs(
|
|
5455
5449
|
"div",
|
|
5456
5450
|
{
|
|
5457
5451
|
style: {
|
|
@@ -5541,8 +5535,8 @@ const Fs = [
|
|
|
5541
5535
|
/* @__PURE__ */ n.jsx(
|
|
5542
5536
|
"button",
|
|
5543
5537
|
{
|
|
5544
|
-
onClick:
|
|
5545
|
-
disabled: o || !
|
|
5538
|
+
onClick: y,
|
|
5539
|
+
disabled: o || !d.isValid,
|
|
5546
5540
|
style: {
|
|
5547
5541
|
padding: "10px 24px",
|
|
5548
5542
|
borderRadius: "10px",
|
|
@@ -5551,22 +5545,22 @@ const Fs = [
|
|
|
5551
5545
|
color: "#fff",
|
|
5552
5546
|
fontSize: "14px",
|
|
5553
5547
|
fontWeight: 600,
|
|
5554
|
-
cursor: o || !
|
|
5548
|
+
cursor: o || !d.isValid ? "not-allowed" : "pointer",
|
|
5555
5549
|
flex: h ? "none" : 1,
|
|
5556
5550
|
minWidth: h ? "100%" : "140px",
|
|
5557
|
-
opacity: o || !
|
|
5551
|
+
opacity: o || !d.isValid ? 0.6 : 1,
|
|
5558
5552
|
display: "flex",
|
|
5559
5553
|
alignItems: "center",
|
|
5560
5554
|
justifyContent: "center",
|
|
5561
5555
|
gap: "8px",
|
|
5562
5556
|
transition: "all 0.2s ease",
|
|
5563
|
-
boxShadow: o || !
|
|
5557
|
+
boxShadow: o || !d.isValid ? "none" : `0 4px 12px ${s.accent}40`
|
|
5564
5558
|
},
|
|
5565
5559
|
onMouseOver: (u) => {
|
|
5566
|
-
!o &&
|
|
5560
|
+
!o && d.isValid && (u.currentTarget.style.transform = "translateY(-1px)", u.currentTarget.style.boxShadow = `0 6px 20px ${s.accent}60`);
|
|
5567
5561
|
},
|
|
5568
5562
|
onMouseOut: (u) => {
|
|
5569
|
-
!o &&
|
|
5563
|
+
!o && d.isValid && (u.currentTarget.style.transform = "translateY(0)", u.currentTarget.style.boxShadow = `0 4px 12px ${s.accent}40`);
|
|
5570
5564
|
},
|
|
5571
5565
|
children: o ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
5572
5566
|
/* @__PURE__ */ n.jsx(
|
|
@@ -5651,11 +5645,11 @@ const Fs = [
|
|
|
5651
5645
|
userId: a,
|
|
5652
5646
|
colors: i
|
|
5653
5647
|
}) => {
|
|
5654
|
-
const { baseUrl: o, apiKey: l, appId: h } = ge(), [
|
|
5648
|
+
const { baseUrl: o, apiKey: l, appId: h } = ge(), [c, d] = P({
|
|
5655
5649
|
currentPassword: "",
|
|
5656
5650
|
newPassword: "",
|
|
5657
5651
|
confirmPassword: ""
|
|
5658
|
-
}), [
|
|
5652
|
+
}), [b, y] = P({}), [w, u] = P(!1), [j, m] = P({
|
|
5659
5653
|
currentPassword: !1,
|
|
5660
5654
|
newPassword: !1,
|
|
5661
5655
|
confirmPassword: !1
|
|
@@ -5669,12 +5663,12 @@ const Fs = [
|
|
|
5669
5663
|
}, []), !t) return null;
|
|
5670
5664
|
const z = (v) => {
|
|
5671
5665
|
const { name: D, value: W } = v.target;
|
|
5672
|
-
|
|
5666
|
+
d((F) => ({ ...F, [D]: W })), b[D] && y((F) => ({ ...F, [D]: "" }));
|
|
5673
5667
|
}, C = (v) => {
|
|
5674
5668
|
m((D) => ({ ...D, [v]: !D[v] }));
|
|
5675
5669
|
}, q = () => {
|
|
5676
5670
|
const v = {};
|
|
5677
|
-
return
|
|
5671
|
+
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;
|
|
5678
5672
|
}, g = async (v) => {
|
|
5679
5673
|
if (v.preventDefault(), !!q()) {
|
|
5680
5674
|
u(!0);
|
|
@@ -5683,8 +5677,8 @@ const Fs = [
|
|
|
5683
5677
|
`${o}/users/change-password/${a}`,
|
|
5684
5678
|
{
|
|
5685
5679
|
appId: h,
|
|
5686
|
-
currentPassword:
|
|
5687
|
-
newPassword:
|
|
5680
|
+
currentPassword: c.currentPassword,
|
|
5681
|
+
newPassword: c.newPassword
|
|
5688
5682
|
},
|
|
5689
5683
|
{
|
|
5690
5684
|
headers: {
|
|
@@ -5692,7 +5686,7 @@ const Fs = [
|
|
|
5692
5686
|
}
|
|
5693
5687
|
}
|
|
5694
5688
|
);
|
|
5695
|
-
D.success ? (r(D.message || "Password updated successfully"),
|
|
5689
|
+
D.success ? (r(D.message || "Password updated successfully"), d({
|
|
5696
5690
|
currentPassword: "",
|
|
5697
5691
|
newPassword: "",
|
|
5698
5692
|
confirmPassword: ""
|
|
@@ -5707,7 +5701,7 @@ const Fs = [
|
|
|
5707
5701
|
{
|
|
5708
5702
|
field: "currentPassword",
|
|
5709
5703
|
label: "Current Password",
|
|
5710
|
-
icon: /* @__PURE__ */ n.jsx(
|
|
5704
|
+
icon: /* @__PURE__ */ n.jsx(ct, { size: 18 })
|
|
5711
5705
|
},
|
|
5712
5706
|
{
|
|
5713
5707
|
field: "newPassword",
|
|
@@ -5881,13 +5875,13 @@ const Fs = [
|
|
|
5881
5875
|
id: v,
|
|
5882
5876
|
name: v,
|
|
5883
5877
|
placeholder: `Enter ${D.toLowerCase()}`,
|
|
5884
|
-
value:
|
|
5878
|
+
value: c[v],
|
|
5885
5879
|
onChange: z,
|
|
5886
5880
|
style: {
|
|
5887
5881
|
width: "100%",
|
|
5888
5882
|
padding: "14px 48px 14px 44px",
|
|
5889
5883
|
borderRadius: "10px",
|
|
5890
|
-
border: `1.5px solid ${
|
|
5884
|
+
border: `1.5px solid ${b[v] ? i.error : i.border}`,
|
|
5891
5885
|
backgroundColor: "transparent",
|
|
5892
5886
|
color: i.textPrimary,
|
|
5893
5887
|
fontSize: "15px",
|
|
@@ -5899,7 +5893,7 @@ const Fs = [
|
|
|
5899
5893
|
F.target.style.borderColor = i.accent, F.target.style.boxShadow = `0 0 0 3px ${i.accent}20`;
|
|
5900
5894
|
},
|
|
5901
5895
|
onBlur: (F) => {
|
|
5902
|
-
F.target.style.borderColor =
|
|
5896
|
+
F.target.style.borderColor = b[v] ? i.error : i.border, F.target.style.boxShadow = "none";
|
|
5903
5897
|
}
|
|
5904
5898
|
}
|
|
5905
5899
|
),
|
|
@@ -5935,7 +5929,7 @@ const Fs = [
|
|
|
5935
5929
|
}
|
|
5936
5930
|
)
|
|
5937
5931
|
] }),
|
|
5938
|
-
|
|
5932
|
+
b[v] && /* @__PURE__ */ n.jsxs(
|
|
5939
5933
|
"div",
|
|
5940
5934
|
{
|
|
5941
5935
|
style: {
|
|
@@ -5948,7 +5942,7 @@ const Fs = [
|
|
|
5948
5942
|
},
|
|
5949
5943
|
children: [
|
|
5950
5944
|
/* @__PURE__ */ n.jsx("span", { style: { fontSize: "16px" }, children: "⚠" }),
|
|
5951
|
-
|
|
5945
|
+
b[v]
|
|
5952
5946
|
]
|
|
5953
5947
|
}
|
|
5954
5948
|
)
|
|
@@ -6098,11 +6092,11 @@ const Fs = [
|
|
|
6098
6092
|
otpSent: o,
|
|
6099
6093
|
verifying: l,
|
|
6100
6094
|
user: h,
|
|
6101
|
-
colors:
|
|
6102
|
-
darkMode:
|
|
6095
|
+
colors: c,
|
|
6096
|
+
darkMode: d
|
|
6103
6097
|
}) => {
|
|
6104
6098
|
if (!t) return null;
|
|
6105
|
-
const
|
|
6099
|
+
const b = () => {
|
|
6106
6100
|
e(), i({ email: h?.email || "", otp: "", appId: a.appId });
|
|
6107
6101
|
};
|
|
6108
6102
|
return /* @__PURE__ */ n.jsxs(
|
|
@@ -6110,7 +6104,7 @@ const Fs = [
|
|
|
6110
6104
|
{
|
|
6111
6105
|
className: "modal-overlay",
|
|
6112
6106
|
style: {
|
|
6113
|
-
backgroundColor:
|
|
6107
|
+
backgroundColor: d ? "rgba(0, 0, 0, 0.8)" : "rgba(0, 0, 0, 0.5)"
|
|
6114
6108
|
},
|
|
6115
6109
|
children: [
|
|
6116
6110
|
/* @__PURE__ */ n.jsxs(
|
|
@@ -6118,18 +6112,18 @@ const Fs = [
|
|
|
6118
6112
|
{
|
|
6119
6113
|
className: "verify-email-modal",
|
|
6120
6114
|
style: {
|
|
6121
|
-
backgroundColor:
|
|
6122
|
-
border: `1px solid ${
|
|
6115
|
+
backgroundColor: c.surface,
|
|
6116
|
+
border: `1px solid ${c.border}`
|
|
6123
6117
|
},
|
|
6124
6118
|
children: [
|
|
6125
6119
|
/* @__PURE__ */ n.jsxs("div", { className: "modal-header", children: [
|
|
6126
|
-
/* @__PURE__ */ n.jsx("h3", { style: { color:
|
|
6120
|
+
/* @__PURE__ */ n.jsx("h3", { style: { color: c.textPrimary }, children: "Verify Your Email" }),
|
|
6127
6121
|
/* @__PURE__ */ n.jsx(
|
|
6128
6122
|
"button",
|
|
6129
6123
|
{
|
|
6130
|
-
onClick:
|
|
6124
|
+
onClick: b,
|
|
6131
6125
|
className: "close-btn",
|
|
6132
|
-
style: { color:
|
|
6126
|
+
style: { color: c.textTertiary },
|
|
6133
6127
|
"aria-label": "Close verification modal",
|
|
6134
6128
|
children: /* @__PURE__ */ n.jsx(Pe, { size: 20, "aria-hidden": "true" })
|
|
6135
6129
|
}
|
|
@@ -6137,20 +6131,20 @@ const Fs = [
|
|
|
6137
6131
|
] }),
|
|
6138
6132
|
/* @__PURE__ */ n.jsxs("form", { className: "verify-form", onSubmit: r, children: [
|
|
6139
6133
|
/* @__PURE__ */ n.jsxs("div", { className: "form-group", children: [
|
|
6140
|
-
/* @__PURE__ */ n.jsx("label", { style: { color:
|
|
6134
|
+
/* @__PURE__ */ n.jsx("label", { style: { color: c.textSecondary }, children: "Email" }),
|
|
6141
6135
|
/* @__PURE__ */ n.jsxs("div", { className: "input-container", children: [
|
|
6142
|
-
/* @__PURE__ */ n.jsx(
|
|
6136
|
+
/* @__PURE__ */ n.jsx(de, { size: 18, style: { color: c.textTertiary }, "aria-hidden": "true" }),
|
|
6143
6137
|
/* @__PURE__ */ n.jsx(
|
|
6144
6138
|
"input",
|
|
6145
6139
|
{
|
|
6146
6140
|
type: "email",
|
|
6147
6141
|
value: a.email,
|
|
6148
|
-
onChange: (
|
|
6142
|
+
onChange: (y) => i((w) => ({ ...w, email: y.target.value })),
|
|
6149
6143
|
placeholder: "Enter your email",
|
|
6150
6144
|
style: {
|
|
6151
|
-
backgroundColor:
|
|
6152
|
-
color:
|
|
6153
|
-
borderColor:
|
|
6145
|
+
backgroundColor: c.surfaceLight,
|
|
6146
|
+
color: c.textPrimary,
|
|
6147
|
+
borderColor: c.border
|
|
6154
6148
|
},
|
|
6155
6149
|
required: !0,
|
|
6156
6150
|
"aria-required": "true",
|
|
@@ -6160,20 +6154,20 @@ const Fs = [
|
|
|
6160
6154
|
] })
|
|
6161
6155
|
] }),
|
|
6162
6156
|
o && /* @__PURE__ */ n.jsxs("div", { className: "form-group", children: [
|
|
6163
|
-
/* @__PURE__ */ n.jsx("label", { style: { color:
|
|
6157
|
+
/* @__PURE__ */ n.jsx("label", { style: { color: c.textSecondary }, children: "OTP" }),
|
|
6164
6158
|
/* @__PURE__ */ n.jsxs("div", { className: "input-container", children: [
|
|
6165
|
-
/* @__PURE__ */ n.jsx(
|
|
6159
|
+
/* @__PURE__ */ n.jsx(cr, { size: 18, style: { color: c.textTertiary }, "aria-hidden": "true" }),
|
|
6166
6160
|
/* @__PURE__ */ n.jsx(
|
|
6167
6161
|
"input",
|
|
6168
6162
|
{
|
|
6169
6163
|
type: "text",
|
|
6170
6164
|
value: a.otp,
|
|
6171
|
-
onChange: (
|
|
6165
|
+
onChange: (y) => i((w) => ({ ...w, otp: y.target.value })),
|
|
6172
6166
|
placeholder: "Enter OTP",
|
|
6173
6167
|
style: {
|
|
6174
|
-
backgroundColor:
|
|
6175
|
-
color:
|
|
6176
|
-
borderColor:
|
|
6168
|
+
backgroundColor: c.surfaceLight,
|
|
6169
|
+
color: c.textPrimary,
|
|
6170
|
+
borderColor: c.border
|
|
6177
6171
|
},
|
|
6178
6172
|
required: !0,
|
|
6179
6173
|
"aria-required": "true",
|
|
@@ -6189,12 +6183,12 @@ const Fs = [
|
|
|
6189
6183
|
disabled: l,
|
|
6190
6184
|
className: "btn-primary",
|
|
6191
6185
|
style: {
|
|
6192
|
-
background: `linear-gradient(to right, ${
|
|
6186
|
+
background: `linear-gradient(to right, ${c.accent}, ${c.accentHover})`,
|
|
6193
6187
|
opacity: l ? 0.7 : 1
|
|
6194
6188
|
},
|
|
6195
6189
|
"aria-label": l ? "Verifying email" : "Verify email",
|
|
6196
6190
|
children: [
|
|
6197
|
-
l ? /* @__PURE__ */ n.jsx(ae, { size: 16, className: "spinner", "aria-hidden": "true" }) : /* @__PURE__ */ n.jsx(
|
|
6191
|
+
l ? /* @__PURE__ */ n.jsx(ae, { size: 16, className: "spinner", "aria-hidden": "true" }) : /* @__PURE__ */ n.jsx(ce, { size: 16, "aria-hidden": "true" }),
|
|
6198
6192
|
l ? "Verifying..." : "Verify Email"
|
|
6199
6193
|
]
|
|
6200
6194
|
}
|
|
@@ -6206,7 +6200,7 @@ const Fs = [
|
|
|
6206
6200
|
disabled: l,
|
|
6207
6201
|
className: "btn-primary",
|
|
6208
6202
|
style: {
|
|
6209
|
-
background: `linear-gradient(to right, ${
|
|
6203
|
+
background: `linear-gradient(to right, ${c.accent}, ${c.accentHover})`,
|
|
6210
6204
|
opacity: l ? 0.7 : 1
|
|
6211
6205
|
},
|
|
6212
6206
|
"aria-label": l ? "Sending OTP" : "Send OTP",
|
|
@@ -6269,7 +6263,7 @@ const Fs = [
|
|
|
6269
6263
|
}
|
|
6270
6264
|
|
|
6271
6265
|
.close-btn:hover {
|
|
6272
|
-
background-color: ${
|
|
6266
|
+
background-color: ${d ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)"};
|
|
6273
6267
|
}
|
|
6274
6268
|
|
|
6275
6269
|
.verify-form {
|
|
@@ -6313,8 +6307,8 @@ const Fs = [
|
|
|
6313
6307
|
}
|
|
6314
6308
|
|
|
6315
6309
|
.input-container input:focus {
|
|
6316
|
-
border-color: ${
|
|
6317
|
-
box-shadow: 0 0 0 3px ${
|
|
6310
|
+
border-color: ${c.accent};
|
|
6311
|
+
box-shadow: 0 0 0 3px ${c.accent}20;
|
|
6318
6312
|
}
|
|
6319
6313
|
|
|
6320
6314
|
.modal-actions {
|
|
@@ -6380,14 +6374,14 @@ const Fs = [
|
|
|
6380
6374
|
onVerify: i,
|
|
6381
6375
|
primaryColor: o = "#00C212"
|
|
6382
6376
|
}) => {
|
|
6383
|
-
const { baseUrl: l, apiKey: h, appId:
|
|
6377
|
+
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({
|
|
6384
6378
|
email: "",
|
|
6385
6379
|
otp: "",
|
|
6386
|
-
appId:
|
|
6380
|
+
appId: c
|
|
6387
6381
|
}), [S, x] = P(!1), [k, _] = P(!1);
|
|
6388
6382
|
te(() => {
|
|
6389
6383
|
if (typeof window < "u") {
|
|
6390
|
-
const E = () =>
|
|
6384
|
+
const E = () => b(window.innerWidth);
|
|
6391
6385
|
return E(), window.addEventListener("resize", E), () => window.removeEventListener("resize", E);
|
|
6392
6386
|
}
|
|
6393
6387
|
}, []);
|
|
@@ -6417,10 +6411,10 @@ const Fs = [
|
|
|
6417
6411
|
try {
|
|
6418
6412
|
_(!0);
|
|
6419
6413
|
const E = await M.post(
|
|
6420
|
-
`${l}/users/send-verify-otp/${
|
|
6414
|
+
`${l}/users/send-verify-otp/${y?.id}`,
|
|
6421
6415
|
{ email: G.email },
|
|
6422
6416
|
{
|
|
6423
|
-
headers: { "x-api-key": h, "x-app-id":
|
|
6417
|
+
headers: { "x-api-key": h, "x-app-id": c }
|
|
6424
6418
|
}
|
|
6425
6419
|
);
|
|
6426
6420
|
E.data.success ? (N("success", E.data.message || "OTP sent to email!"), x(!0)) : N("error", E.data.message || "Failed to send OTP");
|
|
@@ -6441,14 +6435,14 @@ const Fs = [
|
|
|
6441
6435
|
G
|
|
6442
6436
|
);
|
|
6443
6437
|
if (H.data.success) {
|
|
6444
|
-
if (N("success", H.data.message || "Email verified!"),
|
|
6445
|
-
const X = { ...
|
|
6438
|
+
if (N("success", H.data.message || "Email verified!"), y) {
|
|
6439
|
+
const X = { ...y, isVerified: !0 };
|
|
6446
6440
|
w(X), localStorage.setItem(
|
|
6447
6441
|
"userInfo",
|
|
6448
6442
|
JSON.stringify({ ...X, token: t })
|
|
6449
6443
|
), typeof i == "function" && i(X);
|
|
6450
6444
|
}
|
|
6451
|
-
f({ email: "", otp: "", appId:
|
|
6445
|
+
f({ email: "", otp: "", appId: c }), x(!1), F(!1);
|
|
6452
6446
|
} else
|
|
6453
6447
|
N("error", H.data.message || "Verification failed");
|
|
6454
6448
|
} catch (H) {
|
|
@@ -6460,10 +6454,10 @@ const Fs = [
|
|
|
6460
6454
|
_(!1);
|
|
6461
6455
|
}
|
|
6462
6456
|
}, ve = async (E) => {
|
|
6463
|
-
if (!
|
|
6457
|
+
if (!y) return !1;
|
|
6464
6458
|
try {
|
|
6465
|
-
const H = { ...
|
|
6466
|
-
`${l}/users/update/${
|
|
6459
|
+
const H = { ...y, avatarUrl: E }, { data: X } = await M.put(
|
|
6460
|
+
`${l}/users/update/${y.id}`,
|
|
6467
6461
|
H,
|
|
6468
6462
|
{ headers: { "x-api-key": h } }
|
|
6469
6463
|
);
|
|
@@ -6475,12 +6469,12 @@ const Fs = [
|
|
|
6475
6469
|
return console.error("Avatar update error:", H), N("error", "Failed to update avatar"), !1;
|
|
6476
6470
|
}
|
|
6477
6471
|
}, ur = async () => {
|
|
6478
|
-
if (
|
|
6472
|
+
if (y) {
|
|
6479
6473
|
z(!0);
|
|
6480
6474
|
try {
|
|
6481
6475
|
const { data: E } = await M.put(
|
|
6482
|
-
`${l}/users/update/${
|
|
6483
|
-
|
|
6476
|
+
`${l}/users/update/${y.id}`,
|
|
6477
|
+
y,
|
|
6484
6478
|
{ headers: { "x-api-key": h } }
|
|
6485
6479
|
);
|
|
6486
6480
|
E.success ? (w(E.user), $(!1), localStorage.setItem(
|
|
@@ -6496,7 +6490,7 @@ const Fs = [
|
|
|
6496
6490
|
}, pt = async (E) => {
|
|
6497
6491
|
try {
|
|
6498
6492
|
const { data: H } = await M.get(
|
|
6499
|
-
`${l}/users/check-user/${E}?appId=${
|
|
6493
|
+
`${l}/users/check-user/${E}?appId=${c}`,
|
|
6500
6494
|
{ headers: { "x-api-key": h } }
|
|
6501
6495
|
);
|
|
6502
6496
|
H?.success === !0 && H?.exists === !1 && (console.warn("❌ User does not exist on server. Clearing session..."), localStorage.removeItem("userInfo"), w(null));
|
|
@@ -6518,8 +6512,8 @@ const Fs = [
|
|
|
6518
6512
|
}
|
|
6519
6513
|
})();
|
|
6520
6514
|
}, [e]), te(() => {
|
|
6521
|
-
|
|
6522
|
-
}, [
|
|
6515
|
+
y?.email && f((E) => ({ ...E, email: y.email }));
|
|
6516
|
+
}, [y?.email]);
|
|
6523
6517
|
const ft = (E, H) => {
|
|
6524
6518
|
let X = parseInt(E.replace("#", ""), 16), pe = (X >> 16) + H, He = (X >> 8 & 255) + H, Ve = (X & 255) + H;
|
|
6525
6519
|
return pe = Math.min(255, Math.max(0, pe)), He = Math.min(255, Math.max(0, He)), Ve = Math.min(255, Math.max(0, Ve)), `#${(Ve | He << 8 | pe << 16).toString(16).padStart(6, "0")}`;
|
|
@@ -6591,7 +6585,7 @@ const Fs = [
|
|
|
6591
6585
|
)
|
|
6592
6586
|
}
|
|
6593
6587
|
);
|
|
6594
|
-
if (!
|
|
6588
|
+
if (!y)
|
|
6595
6589
|
return /* @__PURE__ */ n.jsx(
|
|
6596
6590
|
"div",
|
|
6597
6591
|
{
|
|
@@ -6625,28 +6619,28 @@ const Fs = [
|
|
|
6625
6619
|
const pr = [
|
|
6626
6620
|
{
|
|
6627
6621
|
label: "Full Name",
|
|
6628
|
-
value:
|
|
6622
|
+
value: y.name,
|
|
6629
6623
|
name: "name",
|
|
6630
6624
|
type: "text",
|
|
6631
6625
|
icon: be
|
|
6632
6626
|
},
|
|
6633
6627
|
{
|
|
6634
6628
|
label: "Email Address",
|
|
6635
|
-
value:
|
|
6629
|
+
value: y.email,
|
|
6636
6630
|
name: "email",
|
|
6637
6631
|
type: "email",
|
|
6638
|
-
icon:
|
|
6632
|
+
icon: de
|
|
6639
6633
|
},
|
|
6640
6634
|
{
|
|
6641
6635
|
label: "Phone Number",
|
|
6642
|
-
value:
|
|
6636
|
+
value: y.phone || "Not set",
|
|
6643
6637
|
name: "phone",
|
|
6644
6638
|
type: "tel",
|
|
6645
6639
|
icon: Rs
|
|
6646
6640
|
},
|
|
6647
6641
|
{
|
|
6648
6642
|
label: "Address",
|
|
6649
|
-
value:
|
|
6643
|
+
value: y.address || "Not provided",
|
|
6650
6644
|
name: "address",
|
|
6651
6645
|
type: "text",
|
|
6652
6646
|
icon: ks
|
|
@@ -6699,7 +6693,7 @@ const Fs = [
|
|
|
6699
6693
|
role: "alert",
|
|
6700
6694
|
"aria-live": "polite",
|
|
6701
6695
|
children: [
|
|
6702
|
-
A.type === "success" ? /* @__PURE__ */ n.jsx(
|
|
6696
|
+
A.type === "success" ? /* @__PURE__ */ n.jsx(ce, { size: 20, "aria-hidden": "true" }) : /* @__PURE__ */ n.jsx(le, { size: 20, "aria-hidden": "true" }),
|
|
6703
6697
|
A.message
|
|
6704
6698
|
]
|
|
6705
6699
|
}
|
|
@@ -6720,14 +6714,14 @@ const Fs = [
|
|
|
6720
6714
|
display: "grid",
|
|
6721
6715
|
gap: "24px",
|
|
6722
6716
|
gridTemplateColumns: "1fr",
|
|
6723
|
-
...
|
|
6717
|
+
...d && window.innerWidth >= 1024 && {
|
|
6724
6718
|
gridTemplateColumns: "1fr 2fr",
|
|
6725
6719
|
gap: "10px"
|
|
6726
6720
|
},
|
|
6727
|
-
...
|
|
6721
|
+
...d && window.innerWidth >= 768 && d && window.innerWidth < 1024 && {
|
|
6728
6722
|
gap: "10px"
|
|
6729
6723
|
},
|
|
6730
|
-
...
|
|
6724
|
+
...d && window.innerWidth >= 600 && d && window.innerWidth < 768 && {
|
|
6731
6725
|
gap: "28px"
|
|
6732
6726
|
}
|
|
6733
6727
|
},
|
|
@@ -6790,10 +6784,10 @@ const Fs = [
|
|
|
6790
6784
|
/* @__PURE__ */ n.jsx(
|
|
6791
6785
|
"img",
|
|
6792
6786
|
{
|
|
6793
|
-
src:
|
|
6794
|
-
|
|
6787
|
+
src: y.avatarUrl || `https://api.dicebear.com/9.x/initials/svg?seed=${encodeURIComponent(
|
|
6788
|
+
y.name
|
|
6795
6789
|
)}`,
|
|
6796
|
-
alt: `Profile avatar of ${
|
|
6790
|
+
alt: `Profile avatar of ${y.name}`,
|
|
6797
6791
|
style: {
|
|
6798
6792
|
width: "128px",
|
|
6799
6793
|
height: "128px",
|
|
@@ -6844,7 +6838,7 @@ const Fs = [
|
|
|
6844
6838
|
margin: "0 0 4px 0",
|
|
6845
6839
|
color: U.textPrimary
|
|
6846
6840
|
},
|
|
6847
|
-
children:
|
|
6841
|
+
children: y.name
|
|
6848
6842
|
}
|
|
6849
6843
|
),
|
|
6850
6844
|
/* @__PURE__ */ n.jsx(
|
|
@@ -6854,16 +6848,16 @@ const Fs = [
|
|
|
6854
6848
|
color: U.textTertiary,
|
|
6855
6849
|
margin: "0 0 8px 0"
|
|
6856
6850
|
},
|
|
6857
|
-
children:
|
|
6851
|
+
children: y.email
|
|
6858
6852
|
}
|
|
6859
6853
|
),
|
|
6860
6854
|
/* @__PURE__ */ n.jsxs(
|
|
6861
6855
|
"div",
|
|
6862
6856
|
{
|
|
6863
6857
|
style: {
|
|
6864
|
-
backgroundColor:
|
|
6865
|
-
color:
|
|
6866
|
-
border: `1px solid ${
|
|
6858
|
+
backgroundColor: y.isVerified ? r ? "rgba(16, 185, 129, 0.1)" : "rgba(16, 185, 129, 0.05)" : r ? "rgba(245, 158, 11, 0.1)" : "rgba(245, 158, 11, 0.05)",
|
|
6859
|
+
color: y.isVerified ? U.success : U.warning,
|
|
6860
|
+
border: `1px solid ${y.isVerified ? r ? "rgba(16, 185, 129, 0.3)" : "rgba(16, 185, 129, 0.2)" : r ? "rgba(245, 158, 11, 0.3)" : "rgba(245, 158, 11, 0.2)"}`,
|
|
6867
6861
|
padding: "6px 12px",
|
|
6868
6862
|
borderRadius: "20px",
|
|
6869
6863
|
fontSize: "12px",
|
|
@@ -6874,8 +6868,8 @@ const Fs = [
|
|
|
6874
6868
|
marginTop: "8px"
|
|
6875
6869
|
},
|
|
6876
6870
|
children: [
|
|
6877
|
-
|
|
6878
|
-
|
|
6871
|
+
y.isVerified ? /* @__PURE__ */ n.jsx(ce, { size: 16, "aria-hidden": "true" }) : /* @__PURE__ */ n.jsx(le, { size: 16, "aria-hidden": "true" }),
|
|
6872
|
+
y.isVerified ? "Email Verified" : "Not Verified"
|
|
6879
6873
|
]
|
|
6880
6874
|
}
|
|
6881
6875
|
)
|
|
@@ -6912,7 +6906,7 @@ const Fs = [
|
|
|
6912
6906
|
gap: "8px",
|
|
6913
6907
|
textDecoration: "none",
|
|
6914
6908
|
minHeight: "36px",
|
|
6915
|
-
flex:
|
|
6909
|
+
flex: d && window.innerWidth < 1024 ? "1" : "auto"
|
|
6916
6910
|
},
|
|
6917
6911
|
children: [
|
|
6918
6912
|
/* @__PURE__ */ n.jsx(Pe, { size: 16, "aria-hidden": "true" }),
|
|
@@ -6942,7 +6936,7 @@ const Fs = [
|
|
|
6942
6936
|
gap: "8px",
|
|
6943
6937
|
textDecoration: "none",
|
|
6944
6938
|
minHeight: "36px",
|
|
6945
|
-
flex:
|
|
6939
|
+
flex: d && window.innerWidth < 1024 ? "1" : "auto"
|
|
6946
6940
|
},
|
|
6947
6941
|
children: [
|
|
6948
6942
|
R ? /* @__PURE__ */ n.jsx(
|
|
@@ -6978,7 +6972,7 @@ const Fs = [
|
|
|
6978
6972
|
gap: "8px",
|
|
6979
6973
|
textDecoration: "none",
|
|
6980
6974
|
minHeight: "36px",
|
|
6981
|
-
flex:
|
|
6975
|
+
flex: d && window.innerWidth < 1024 ? "1" : "auto"
|
|
6982
6976
|
},
|
|
6983
6977
|
children: [
|
|
6984
6978
|
/* @__PURE__ */ n.jsx(Cs, { size: 16, "aria-hidden": "true" }),
|
|
@@ -6986,7 +6980,7 @@ const Fs = [
|
|
|
6986
6980
|
]
|
|
6987
6981
|
}
|
|
6988
6982
|
),
|
|
6989
|
-
!
|
|
6983
|
+
!y.isVerified && /* @__PURE__ */ n.jsxs(
|
|
6990
6984
|
"button",
|
|
6991
6985
|
{
|
|
6992
6986
|
onClick: () => F(!0),
|
|
@@ -7008,7 +7002,7 @@ const Fs = [
|
|
|
7008
7002
|
gap: "8px",
|
|
7009
7003
|
minHeight: "36px",
|
|
7010
7004
|
opacity: K ? 0.7 : 1,
|
|
7011
|
-
flex:
|
|
7005
|
+
flex: d && window.innerWidth < 1024 ? "1" : "auto"
|
|
7012
7006
|
},
|
|
7013
7007
|
children: [
|
|
7014
7008
|
K ? /* @__PURE__ */ n.jsx(
|
|
@@ -7096,7 +7090,7 @@ const Fs = [
|
|
|
7096
7090
|
onMouseEnter: (E) => E.currentTarget.style.backgroundColor = U.surfaceLight,
|
|
7097
7091
|
onMouseLeave: (E) => E.currentTarget.style.backgroundColor = "transparent",
|
|
7098
7092
|
children: [
|
|
7099
|
-
/* @__PURE__ */ n.jsx(
|
|
7093
|
+
/* @__PURE__ */ n.jsx(ct, { size: 14, "aria-hidden": "true" }),
|
|
7100
7094
|
"Change Password"
|
|
7101
7095
|
]
|
|
7102
7096
|
}
|
|
@@ -7127,7 +7121,7 @@ const Fs = [
|
|
|
7127
7121
|
},
|
|
7128
7122
|
onMouseLeave: (E) => E.currentTarget.style.backgroundColor = "transparent",
|
|
7129
7123
|
children: [
|
|
7130
|
-
/* @__PURE__ */ n.jsx(
|
|
7124
|
+
/* @__PURE__ */ n.jsx(dt, { size: 14, "aria-hidden": "true" }),
|
|
7131
7125
|
"Logout"
|
|
7132
7126
|
]
|
|
7133
7127
|
}
|
|
@@ -7218,7 +7212,7 @@ const Fs = [
|
|
|
7218
7212
|
display: "grid",
|
|
7219
7213
|
gap: "20px",
|
|
7220
7214
|
gridTemplateColumns: "1fr",
|
|
7221
|
-
...
|
|
7215
|
+
...d && window.innerWidth >= 600 && {
|
|
7222
7216
|
gridTemplateColumns: "1fr 1fr",
|
|
7223
7217
|
gap: "20px"
|
|
7224
7218
|
}
|
|
@@ -7256,7 +7250,7 @@ const Fs = [
|
|
|
7256
7250
|
{
|
|
7257
7251
|
type: E.type,
|
|
7258
7252
|
name: E.name,
|
|
7259
|
-
value:
|
|
7253
|
+
value: y[E.name],
|
|
7260
7254
|
onChange: (X) => w(
|
|
7261
7255
|
(pe) => pe && { ...pe, [X.target.name]: X.target.value }
|
|
7262
7256
|
),
|
|
@@ -7327,7 +7321,7 @@ const Fs = [
|
|
|
7327
7321
|
gap: "8px"
|
|
7328
7322
|
},
|
|
7329
7323
|
children: [
|
|
7330
|
-
/* @__PURE__ */ n.jsx(
|
|
7324
|
+
/* @__PURE__ */ n.jsx(dr, { size: 20, "aria-hidden": "true" }),
|
|
7331
7325
|
"Security Status"
|
|
7332
7326
|
]
|
|
7333
7327
|
}
|
|
@@ -7361,7 +7355,7 @@ const Fs = [
|
|
|
7361
7355
|
color: U.textSecondary
|
|
7362
7356
|
},
|
|
7363
7357
|
children: [
|
|
7364
|
-
/* @__PURE__ */ n.jsx(
|
|
7358
|
+
/* @__PURE__ */ n.jsx(de, { size: 16, "aria-hidden": "true" }),
|
|
7365
7359
|
/* @__PURE__ */ n.jsx("span", { children: "Email Verification" })
|
|
7366
7360
|
]
|
|
7367
7361
|
}
|
|
@@ -7377,7 +7371,7 @@ const Fs = [
|
|
|
7377
7371
|
display: "flex",
|
|
7378
7372
|
alignItems: "center",
|
|
7379
7373
|
gap: "6px",
|
|
7380
|
-
...
|
|
7374
|
+
...y.isVerified ? {
|
|
7381
7375
|
backgroundColor: r ? "rgba(16, 185, 129, 0.1)" : "rgba(16, 185, 129, 0.05)",
|
|
7382
7376
|
color: U.success,
|
|
7383
7377
|
border: `1px solid ${r ? "rgba(16, 185, 129, 0.3)" : "rgba(16, 185, 129, 0.2)"}`
|
|
@@ -7387,8 +7381,8 @@ const Fs = [
|
|
|
7387
7381
|
border: `1px solid ${r ? "rgba(245, 158, 11, 0.3)" : "rgba(245, 158, 11, 0.2)"}`
|
|
7388
7382
|
}
|
|
7389
7383
|
},
|
|
7390
|
-
children:
|
|
7391
|
-
/* @__PURE__ */ n.jsx(
|
|
7384
|
+
children: y.isVerified ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
7385
|
+
/* @__PURE__ */ n.jsx(ce, { size: 16, "aria-hidden": "true" }),
|
|
7392
7386
|
"Verified"
|
|
7393
7387
|
] }) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
7394
7388
|
/* @__PURE__ */ n.jsx(le, { size: 16, "aria-hidden": "true" }),
|
|
@@ -7399,7 +7393,7 @@ const Fs = [
|
|
|
7399
7393
|
]
|
|
7400
7394
|
}
|
|
7401
7395
|
),
|
|
7402
|
-
!
|
|
7396
|
+
!y.isVerified && /* @__PURE__ */ n.jsx(
|
|
7403
7397
|
"div",
|
|
7404
7398
|
{
|
|
7405
7399
|
style: {
|
|
@@ -7450,8 +7444,8 @@ const Fs = [
|
|
|
7450
7444
|
{
|
|
7451
7445
|
baseUrl: l,
|
|
7452
7446
|
apiKey: h,
|
|
7453
|
-
appId:
|
|
7454
|
-
userId:
|
|
7447
|
+
appId: c,
|
|
7448
|
+
userId: y.id,
|
|
7455
7449
|
isOpen: g,
|
|
7456
7450
|
onClose: () => I(!1),
|
|
7457
7451
|
onSuccess: (E) => N("success", E),
|
|
@@ -7464,8 +7458,8 @@ const Fs = [
|
|
|
7464
7458
|
{
|
|
7465
7459
|
baseUrl: l,
|
|
7466
7460
|
apiKey: h,
|
|
7467
|
-
appId:
|
|
7468
|
-
userId:
|
|
7461
|
+
appId: c,
|
|
7462
|
+
userId: y.id,
|
|
7469
7463
|
token: t,
|
|
7470
7464
|
isOpen: v,
|
|
7471
7465
|
onClose: () => D(!1),
|
|
@@ -7479,7 +7473,7 @@ const Fs = [
|
|
|
7479
7473
|
{
|
|
7480
7474
|
isOpen: W,
|
|
7481
7475
|
onClose: () => {
|
|
7482
|
-
F(!1), x(!1), f({ email:
|
|
7476
|
+
F(!1), x(!1), f({ email: y?.email || "", otp: "", appId: c });
|
|
7483
7477
|
},
|
|
7484
7478
|
onVerify: ue,
|
|
7485
7479
|
onSendOTP: se,
|
|
@@ -7487,7 +7481,7 @@ const Fs = [
|
|
|
7487
7481
|
setVerifyFormData: f,
|
|
7488
7482
|
otpSent: S,
|
|
7489
7483
|
verifying: k,
|
|
7490
|
-
user:
|
|
7484
|
+
user: y,
|
|
7491
7485
|
colors: U,
|
|
7492
7486
|
darkMode: r
|
|
7493
7487
|
}
|
|
@@ -7596,11 +7590,11 @@ const Fs = [
|
|
|
7596
7590
|
settingsUrl: l,
|
|
7597
7591
|
// Menu item visibility with defaults
|
|
7598
7592
|
showProfileMenuItem: h = !0,
|
|
7599
|
-
showSettingsMenuItem:
|
|
7600
|
-
showViewProfileMenuItem:
|
|
7593
|
+
showSettingsMenuItem: c = !0,
|
|
7594
|
+
showViewProfileMenuItem: d = !0,
|
|
7601
7595
|
// Custom labels with defaults
|
|
7602
|
-
profileLabel:
|
|
7603
|
-
settingsLabel:
|
|
7596
|
+
profileLabel: b = "My Profile",
|
|
7597
|
+
settingsLabel: y = "Settings",
|
|
7604
7598
|
viewProfileLabel: w = "View Profile",
|
|
7605
7599
|
logoutLabel: u = "Sign Out"
|
|
7606
7600
|
}) => {
|
|
@@ -8060,11 +8054,11 @@ const Fs = [
|
|
|
8060
8054
|
tabIndex: 0,
|
|
8061
8055
|
children: [
|
|
8062
8056
|
/* @__PURE__ */ n.jsx(be, { style: O.icon, "aria-hidden": "true" }),
|
|
8063
|
-
/* @__PURE__ */ n.jsx("span", { style: O.menuItemText, children:
|
|
8057
|
+
/* @__PURE__ */ n.jsx("span", { style: O.menuItemText, children: b })
|
|
8064
8058
|
]
|
|
8065
8059
|
}
|
|
8066
8060
|
),
|
|
8067
|
-
|
|
8061
|
+
c && l && /* @__PURE__ */ n.jsxs(
|
|
8068
8062
|
"button",
|
|
8069
8063
|
{
|
|
8070
8064
|
style: O.menuItem,
|
|
@@ -8080,11 +8074,11 @@ const Fs = [
|
|
|
8080
8074
|
tabIndex: 0,
|
|
8081
8075
|
children: [
|
|
8082
8076
|
/* @__PURE__ */ n.jsx(zs, { style: O.icon, "aria-hidden": "true" }),
|
|
8083
|
-
/* @__PURE__ */ n.jsx("span", { style: O.menuItemText, children:
|
|
8077
|
+
/* @__PURE__ */ n.jsx("span", { style: O.menuItemText, children: y })
|
|
8084
8078
|
]
|
|
8085
8079
|
}
|
|
8086
8080
|
),
|
|
8087
|
-
|
|
8081
|
+
d && C.profileUrl && /* @__PURE__ */ n.jsxs(
|
|
8088
8082
|
"a",
|
|
8089
8083
|
{
|
|
8090
8084
|
href: C.profileUrl,
|
|
@@ -8100,7 +8094,7 @@ const Fs = [
|
|
|
8100
8094
|
role: "menuitem",
|
|
8101
8095
|
tabIndex: 0,
|
|
8102
8096
|
children: [
|
|
8103
|
-
/* @__PURE__ */ n.jsx(
|
|
8097
|
+
/* @__PURE__ */ n.jsx(de, { style: O.icon, "aria-hidden": "true" }),
|
|
8104
8098
|
/* @__PURE__ */ n.jsx("span", { style: O.menuItemText, children: w })
|
|
8105
8099
|
]
|
|
8106
8100
|
}
|
|
@@ -8122,7 +8116,7 @@ const Fs = [
|
|
|
8122
8116
|
tabIndex: 0,
|
|
8123
8117
|
children: [
|
|
8124
8118
|
/* @__PURE__ */ n.jsx(
|
|
8125
|
-
|
|
8119
|
+
dt,
|
|
8126
8120
|
{
|
|
8127
8121
|
style: { ...O.icon, color: A.error },
|
|
8128
8122
|
"aria-hidden": "true"
|
|
@@ -8171,7 +8165,7 @@ const Fs = [
|
|
|
8171
8165
|
email: t?.email || "",
|
|
8172
8166
|
otp: "",
|
|
8173
8167
|
appId: a
|
|
8174
|
-
}), [
|
|
8168
|
+
}), [c, d] = P(!1), [b, y] = P(!1), [w, u] = P(null), j = (g, I) => {
|
|
8175
8169
|
let v = parseInt(g.replace("#", ""), 16), D = (v >> 16) + I, W = (v >> 8 & 255) + I, F = (v & 255) + I;
|
|
8176
8170
|
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")}`;
|
|
8177
8171
|
}, m = e ? {
|
|
@@ -8208,17 +8202,17 @@ const Fs = [
|
|
|
8208
8202
|
return;
|
|
8209
8203
|
}
|
|
8210
8204
|
try {
|
|
8211
|
-
|
|
8205
|
+
y(!0);
|
|
8212
8206
|
const g = await M.post(
|
|
8213
8207
|
`${i}/users/send-verify-otp/${t?.id}`,
|
|
8214
8208
|
{ email: l.email },
|
|
8215
8209
|
{ headers: { "x-api-key": o, "x-app-id": a } }
|
|
8216
8210
|
);
|
|
8217
|
-
g.data.success ? ($("success", g.data.message || "OTP sent!"),
|
|
8211
|
+
g.data.success ? ($("success", g.data.message || "OTP sent!"), d(!0)) : $("error", g.data.message || "Failed to send OTP");
|
|
8218
8212
|
} catch (g) {
|
|
8219
8213
|
$("error", g.response?.data?.message || "Server error");
|
|
8220
8214
|
} finally {
|
|
8221
|
-
|
|
8215
|
+
y(!1);
|
|
8222
8216
|
}
|
|
8223
8217
|
}, z = async (g) => {
|
|
8224
8218
|
if (g.preventDefault(), !l.email || !l.otp) {
|
|
@@ -8226,17 +8220,17 @@ const Fs = [
|
|
|
8226
8220
|
return;
|
|
8227
8221
|
}
|
|
8228
8222
|
try {
|
|
8229
|
-
|
|
8223
|
+
y(!0);
|
|
8230
8224
|
const I = await M.post(`${i}/users/verify-email`, l);
|
|
8231
8225
|
if (I.data.success && t) {
|
|
8232
8226
|
const v = { ...t, isVerified: !0 };
|
|
8233
|
-
s?.(v), $("success", I.data.message || "Email verified!"),
|
|
8227
|
+
s?.(v), $("success", I.data.message || "Email verified!"), d(!1), h({ email: t.email, otp: "", appId: a });
|
|
8234
8228
|
} else
|
|
8235
8229
|
$("error", I.data.message || "Verification failed");
|
|
8236
8230
|
} catch (I) {
|
|
8237
8231
|
$("error", I.response?.data?.message || "Server error");
|
|
8238
8232
|
} finally {
|
|
8239
|
-
|
|
8233
|
+
y(!1);
|
|
8240
8234
|
}
|
|
8241
8235
|
}, C = {
|
|
8242
8236
|
width: "100%",
|
|
@@ -8295,7 +8289,7 @@ const Fs = [
|
|
|
8295
8289
|
gap: 8
|
|
8296
8290
|
},
|
|
8297
8291
|
children: [
|
|
8298
|
-
w.type === "success" ? /* @__PURE__ */ n.jsx(
|
|
8292
|
+
w.type === "success" ? /* @__PURE__ */ n.jsx(ce, { size: 16 }) : /* @__PURE__ */ n.jsx(le, { size: 16 }),
|
|
8299
8293
|
w.message
|
|
8300
8294
|
]
|
|
8301
8295
|
}
|
|
@@ -8304,7 +8298,7 @@ const Fs = [
|
|
|
8304
8298
|
/* @__PURE__ */ n.jsx("label", { style: { color: m.textSecondary }, children: "Email" }),
|
|
8305
8299
|
/* @__PURE__ */ n.jsxs("div", { style: { position: "relative" }, children: [
|
|
8306
8300
|
/* @__PURE__ */ n.jsx(
|
|
8307
|
-
|
|
8301
|
+
de,
|
|
8308
8302
|
{
|
|
8309
8303
|
size: 18,
|
|
8310
8304
|
style: {
|
|
@@ -8330,11 +8324,11 @@ const Fs = [
|
|
|
8330
8324
|
)
|
|
8331
8325
|
] })
|
|
8332
8326
|
] }),
|
|
8333
|
-
|
|
8327
|
+
c && /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
|
|
8334
8328
|
/* @__PURE__ */ n.jsx("label", { style: { color: m.textSecondary }, children: "OTP" }),
|
|
8335
8329
|
/* @__PURE__ */ n.jsxs("div", { style: { position: "relative" }, children: [
|
|
8336
8330
|
/* @__PURE__ */ n.jsx(
|
|
8337
|
-
|
|
8331
|
+
ct,
|
|
8338
8332
|
{
|
|
8339
8333
|
size: 18,
|
|
8340
8334
|
style: {
|
|
@@ -8360,19 +8354,19 @@ const Fs = [
|
|
|
8360
8354
|
)
|
|
8361
8355
|
] })
|
|
8362
8356
|
] }),
|
|
8363
|
-
/* @__PURE__ */ n.jsx("div", { style: { display: "flex", gap: 12 }, children:
|
|
8364
|
-
|
|
8365
|
-
|
|
8357
|
+
/* @__PURE__ */ n.jsx("div", { style: { display: "flex", gap: 12 }, children: c ? /* @__PURE__ */ n.jsxs("button", { type: "submit", disabled: b, style: q(b), children: [
|
|
8358
|
+
b ? /* @__PURE__ */ n.jsx(ae, { size: 16, className: "spinner" }) : /* @__PURE__ */ n.jsx(ce, { size: 16 }),
|
|
8359
|
+
b ? "Verifying..." : "Verify Email"
|
|
8366
8360
|
] }) : /* @__PURE__ */ n.jsxs(
|
|
8367
8361
|
"button",
|
|
8368
8362
|
{
|
|
8369
8363
|
type: "button",
|
|
8370
8364
|
onClick: R,
|
|
8371
|
-
disabled:
|
|
8372
|
-
style: q(
|
|
8365
|
+
disabled: b,
|
|
8366
|
+
style: q(b),
|
|
8373
8367
|
children: [
|
|
8374
|
-
|
|
8375
|
-
|
|
8368
|
+
b ? /* @__PURE__ */ n.jsx(ae, { size: 16, className: "spinner" }) : /* @__PURE__ */ n.jsx(ut, { size: 16 }),
|
|
8369
|
+
b ? "Sending..." : "Send OTP"
|
|
8376
8370
|
]
|
|
8377
8371
|
}
|
|
8378
8372
|
) })
|