@neuctra/authix 1.1.68 → 1.1.69
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.
|
@@ -16,7 +16,7 @@ function hr(t) {
|
|
|
16
16
|
let e;
|
|
17
17
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && Nt(t.buffer), e;
|
|
18
18
|
}
|
|
19
|
-
const
|
|
19
|
+
const mr = We("string"), re = We("function"), Lt = We("number"), Pe = (t) => t !== null && typeof t == "object", gr = (t) => t === !0 || t === !1, _e = (t) => {
|
|
20
20
|
if (Me(t) !== "object")
|
|
21
21
|
return !1;
|
|
22
22
|
const e = st(t);
|
|
@@ -29,7 +29,7 @@ const gr = We("string"), re = We("function"), Lt = We("number"), Pe = (t) => t !
|
|
|
29
29
|
} catch {
|
|
30
30
|
return !1;
|
|
31
31
|
}
|
|
32
|
-
}, br = ae("Date"), wr = ae("File"), jr = ae("Blob"),
|
|
32
|
+
}, br = ae("Date"), wr = ae("File"), jr = ae("Blob"), vr = ae("FileList"), Sr = (t) => Pe(t) && re(t.pipe), Er = (t) => {
|
|
33
33
|
let e;
|
|
34
34
|
return t && (typeof FormData == "function" && t instanceof FormData || re(t.append) && ((e = Me(t)) === "formdata" || // detect form-data instance
|
|
35
35
|
e === "object" && re(t.toString) && t.toString() === "[object FormData]"));
|
|
@@ -44,10 +44,10 @@ function Ie(t, e, { allOwnKeys: r = !1 } = {}) {
|
|
|
44
44
|
else {
|
|
45
45
|
if (Re(t))
|
|
46
46
|
return;
|
|
47
|
-
const
|
|
47
|
+
const o = r ? Object.getOwnPropertyNames(t) : Object.keys(t), a = o.length;
|
|
48
48
|
let c;
|
|
49
|
-
for (s = 0; s <
|
|
50
|
-
c =
|
|
49
|
+
for (s = 0; s < a; s++)
|
|
50
|
+
c = o[s], e.call(null, t[c], c, t);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
function Ft(t, e) {
|
|
@@ -63,27 +63,27 @@ function Ft(t, e) {
|
|
|
63
63
|
}
|
|
64
64
|
const xe = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, qt = (t) => !ye(t) && t !== xe;
|
|
65
65
|
function Ze() {
|
|
66
|
-
const { caseless: t, skipUndefined: e } = qt(this) && this || {}, r = {}, s = (i,
|
|
67
|
-
const
|
|
68
|
-
_e(r[
|
|
66
|
+
const { caseless: t, skipUndefined: e } = qt(this) && this || {}, r = {}, s = (i, o) => {
|
|
67
|
+
const a = t && Ft(r, o) || o;
|
|
68
|
+
_e(r[a]) && _e(i) ? r[a] = Ze(r[a], i) : _e(i) ? r[a] = Ze({}, i) : we(i) ? r[a] = i.slice() : (!e || !ye(i)) && (r[a] = i);
|
|
69
69
|
};
|
|
70
|
-
for (let i = 0,
|
|
70
|
+
for (let i = 0, o = arguments.length; i < o; i++)
|
|
71
71
|
arguments[i] && Ie(arguments[i], s);
|
|
72
72
|
return r;
|
|
73
73
|
}
|
|
74
|
-
const Or = (t, e, r, { allOwnKeys: s } = {}) => (Ie(e, (i,
|
|
75
|
-
r && re(i) ? t[
|
|
74
|
+
const Or = (t, e, r, { allOwnKeys: s } = {}) => (Ie(e, (i, o) => {
|
|
75
|
+
r && re(i) ? t[o] = Dt(i, r) : t[o] = i;
|
|
76
76
|
}, { allOwnKeys: s }), t), zr = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), Ar = (t, e, r, s) => {
|
|
77
77
|
t.prototype = Object.create(e.prototype, s), t.prototype.constructor = t, Object.defineProperty(t, "super", {
|
|
78
78
|
value: e.prototype
|
|
79
79
|
}), r && Object.assign(t.prototype, r);
|
|
80
80
|
}, Ur = (t, e, r, s) => {
|
|
81
|
-
let i,
|
|
81
|
+
let i, o, a;
|
|
82
82
|
const c = {};
|
|
83
83
|
if (e = e || {}, t == null) return e;
|
|
84
84
|
do {
|
|
85
|
-
for (i = Object.getOwnPropertyNames(t),
|
|
86
|
-
|
|
85
|
+
for (i = Object.getOwnPropertyNames(t), o = i.length; o-- > 0; )
|
|
86
|
+
a = i[o], (!s || s(a, t, e)) && !c[a] && (e[a] = t[a], c[a] = !0);
|
|
87
87
|
t = r !== !1 && st(t);
|
|
88
88
|
} while (t && (!r || r(t, e)) && t !== Object.prototype);
|
|
89
89
|
return e;
|
|
@@ -104,8 +104,8 @@ const Or = (t, e, r, { allOwnKeys: s } = {}) => (Ie(e, (i, a) => {
|
|
|
104
104
|
const s = (t && t[qe]).call(t);
|
|
105
105
|
let i;
|
|
106
106
|
for (; (i = s.next()) && !i.done; ) {
|
|
107
|
-
const
|
|
108
|
-
e.call(t,
|
|
107
|
+
const o = i.value;
|
|
108
|
+
e.call(t, o[0], o[1]);
|
|
109
109
|
}
|
|
110
110
|
}, Lr = (t, e) => {
|
|
111
111
|
let r;
|
|
@@ -120,9 +120,9 @@ const Or = (t, e, r, { allOwnKeys: s } = {}) => (Ie(e, (i, a) => {
|
|
|
120
120
|
}
|
|
121
121
|
), xt = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype), Mr = ae("RegExp"), Mt = (t, e) => {
|
|
122
122
|
const r = Object.getOwnPropertyDescriptors(t), s = {};
|
|
123
|
-
Ie(r, (i,
|
|
124
|
-
let
|
|
125
|
-
(
|
|
123
|
+
Ie(r, (i, o) => {
|
|
124
|
+
let a;
|
|
125
|
+
(a = e(i, o, t)) !== !1 && (s[o] = a || i);
|
|
126
126
|
}), Object.defineProperties(t, s);
|
|
127
127
|
}, Wr = (t) => {
|
|
128
128
|
Mt(t, (e, r) => {
|
|
@@ -141,8 +141,8 @@ const Or = (t, e, r, { allOwnKeys: s } = {}) => (Ie(e, (i, a) => {
|
|
|
141
141
|
});
|
|
142
142
|
}, Br = (t, e) => {
|
|
143
143
|
const r = {}, s = (i) => {
|
|
144
|
-
i.forEach((
|
|
145
|
-
r[
|
|
144
|
+
i.forEach((o) => {
|
|
145
|
+
r[o] = !0;
|
|
146
146
|
});
|
|
147
147
|
};
|
|
148
148
|
return we(t) ? s(t) : s(String(t).split(e)), r;
|
|
@@ -160,18 +160,18 @@ const Kr = (t) => {
|
|
|
160
160
|
return s;
|
|
161
161
|
if (!("toJSON" in s)) {
|
|
162
162
|
e[i] = s;
|
|
163
|
-
const
|
|
164
|
-
return Ie(s, (
|
|
165
|
-
const
|
|
166
|
-
!ye(
|
|
167
|
-
}), e[i] = void 0,
|
|
163
|
+
const o = we(s) ? [] : {};
|
|
164
|
+
return Ie(s, (a, c) => {
|
|
165
|
+
const h = r(a, i + 1);
|
|
166
|
+
!ye(h) && (o[c] = h);
|
|
167
|
+
}), e[i] = void 0, o;
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
return s;
|
|
171
171
|
};
|
|
172
172
|
return r(t, 0);
|
|
173
|
-
}, Jr = ae("AsyncFunction"), Gr = (t) => t && (Pe(t) || re(t)) && re(t.then) && re(t.catch), Wt = ((t, e) => t ? setImmediate : e ? ((r, s) => (xe.addEventListener("message", ({ source: i, data:
|
|
174
|
-
i === xe &&
|
|
173
|
+
}, Jr = ae("AsyncFunction"), Gr = (t) => t && (Pe(t) || re(t)) && re(t.then) && re(t.catch), Wt = ((t, e) => t ? setImmediate : e ? ((r, s) => (xe.addEventListener("message", ({ source: i, data: o }) => {
|
|
174
|
+
i === xe && o === r && s.length && s.shift()();
|
|
175
175
|
}, !1), (i) => {
|
|
176
176
|
s.push(i), xe.postMessage(r, "*");
|
|
177
177
|
}))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(
|
|
@@ -183,9 +183,9 @@ const Kr = (t) => {
|
|
|
183
183
|
isBuffer: Re,
|
|
184
184
|
isFormData: Er,
|
|
185
185
|
isArrayBufferView: hr,
|
|
186
|
-
isString:
|
|
186
|
+
isString: mr,
|
|
187
187
|
isNumber: Lt,
|
|
188
|
-
isBoolean:
|
|
188
|
+
isBoolean: gr,
|
|
189
189
|
isObject: Pe,
|
|
190
190
|
isPlainObject: _e,
|
|
191
191
|
isEmptyObject: yr,
|
|
@@ -199,10 +199,10 @@ const Kr = (t) => {
|
|
|
199
199
|
isBlob: jr,
|
|
200
200
|
isRegExp: Mr,
|
|
201
201
|
isFunction: re,
|
|
202
|
-
isStream:
|
|
202
|
+
isStream: Sr,
|
|
203
203
|
isURLSearchParams: kr,
|
|
204
204
|
isTypedArray: $r,
|
|
205
|
-
isFileList:
|
|
205
|
+
isFileList: vr,
|
|
206
206
|
forEach: Ie,
|
|
207
207
|
merge: Ze,
|
|
208
208
|
extend: Or,
|
|
@@ -281,13 +281,13 @@ const Bt = N.prototype, Ht = {};
|
|
|
281
281
|
});
|
|
282
282
|
Object.defineProperties(N, Ht);
|
|
283
283
|
Object.defineProperty(Bt, "isAxiosError", { value: !0 });
|
|
284
|
-
N.from = (t, e, r, s, i,
|
|
285
|
-
const
|
|
286
|
-
f.toFlatObject(t,
|
|
284
|
+
N.from = (t, e, r, s, i, o) => {
|
|
285
|
+
const a = Object.create(Bt);
|
|
286
|
+
f.toFlatObject(t, a, function(d) {
|
|
287
287
|
return d !== Error.prototype;
|
|
288
288
|
}, (p) => p !== "isAxiosError");
|
|
289
|
-
const c = t && t.message ? t.message : "Error",
|
|
290
|
-
return N.call(
|
|
289
|
+
const c = t && t.message ? t.message : "Error", h = e == null && t ? t.code : e;
|
|
290
|
+
return N.call(a, c, h, r, s, i), t && a.cause == null && Object.defineProperty(a, "cause", { value: t, configurable: !0 }), a.name = t && t.name || "Error", o && Object.assign(a, o), a;
|
|
291
291
|
};
|
|
292
292
|
const Qr = null;
|
|
293
293
|
function Qe(t) {
|
|
@@ -297,8 +297,8 @@ function Vt(t) {
|
|
|
297
297
|
return f.endsWith(t, "[]") ? t.slice(0, -2) : t;
|
|
298
298
|
}
|
|
299
299
|
function ht(t, e, r) {
|
|
300
|
-
return t ? t.concat(e).map(function(i,
|
|
301
|
-
return i = Vt(i), !r &&
|
|
300
|
+
return t ? t.concat(e).map(function(i, o) {
|
|
301
|
+
return i = Vt(i), !r && o ? "[" + i + "]" : i;
|
|
302
302
|
}).join(r ? "." : "") : e;
|
|
303
303
|
}
|
|
304
304
|
function en(t) {
|
|
@@ -317,7 +317,7 @@ function Be(t, e, r) {
|
|
|
317
317
|
}, !1, function(w, x) {
|
|
318
318
|
return !f.isUndefined(x[w]);
|
|
319
319
|
});
|
|
320
|
-
const s = r.metaTokens, i = r.visitor || d,
|
|
320
|
+
const s = r.metaTokens, i = r.visitor || d, o = r.dots, a = r.indexes, h = (r.Blob || typeof Blob < "u" && Blob) && f.isSpecCompliantForm(e);
|
|
321
321
|
if (!f.isFunction(i))
|
|
322
322
|
throw new TypeError("visitor must be a function");
|
|
323
323
|
function p(u) {
|
|
@@ -326,9 +326,9 @@ function Be(t, e, r) {
|
|
|
326
326
|
return u.toISOString();
|
|
327
327
|
if (f.isBoolean(u))
|
|
328
328
|
return u.toString();
|
|
329
|
-
if (!
|
|
329
|
+
if (!h && f.isBlob(u))
|
|
330
330
|
throw new N("Blob is not supported. Use a Buffer instead.");
|
|
331
|
-
return f.isArrayBuffer(u) || f.isTypedArray(u) ?
|
|
331
|
+
return f.isArrayBuffer(u) || f.isTypedArray(u) ? h && typeof Blob == "function" ? new Blob([u]) : Buffer.from(u) : u;
|
|
332
332
|
}
|
|
333
333
|
function d(u, w, x) {
|
|
334
334
|
let C = u;
|
|
@@ -339,23 +339,23 @@ function Be(t, e, r) {
|
|
|
339
339
|
return w = Vt(w), C.forEach(function(A, y) {
|
|
340
340
|
!(f.isUndefined(A) || A === null) && e.append(
|
|
341
341
|
// eslint-disable-next-line no-nested-ternary
|
|
342
|
-
|
|
342
|
+
a === !0 ? ht([w], y, o) : a === null ? w : w + "[]",
|
|
343
343
|
p(A)
|
|
344
344
|
);
|
|
345
345
|
}), !1;
|
|
346
346
|
}
|
|
347
|
-
return Qe(u) ? !0 : (e.append(ht(x, w,
|
|
347
|
+
return Qe(u) ? !0 : (e.append(ht(x, w, o), p(u)), !1);
|
|
348
348
|
}
|
|
349
|
-
const
|
|
349
|
+
const m = [], P = Object.assign(tn, {
|
|
350
350
|
defaultVisitor: d,
|
|
351
351
|
convertValue: p,
|
|
352
352
|
isVisitable: Qe
|
|
353
353
|
});
|
|
354
354
|
function O(u, w) {
|
|
355
355
|
if (!f.isUndefined(u)) {
|
|
356
|
-
if (
|
|
356
|
+
if (m.indexOf(u) !== -1)
|
|
357
357
|
throw Error("Circular reference detected in " + w.join("."));
|
|
358
|
-
|
|
358
|
+
m.push(u), f.forEach(u, function(C, T) {
|
|
359
359
|
(!(f.isUndefined(C) || C === null) && i.call(
|
|
360
360
|
e,
|
|
361
361
|
C,
|
|
@@ -363,14 +363,14 @@ function Be(t, e, r) {
|
|
|
363
363
|
w,
|
|
364
364
|
P
|
|
365
365
|
)) === !0 && O(C, w ? w.concat(T) : [T]);
|
|
366
|
-
}),
|
|
366
|
+
}), m.pop();
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
369
|
if (!f.isObject(t))
|
|
370
370
|
throw new TypeError("data must be an object");
|
|
371
371
|
return O(t), e;
|
|
372
372
|
}
|
|
373
|
-
function
|
|
373
|
+
function mt(t) {
|
|
374
374
|
const e = {
|
|
375
375
|
"!": "%21",
|
|
376
376
|
"'": "%27",
|
|
@@ -393,8 +393,8 @@ Yt.append = function(e, r) {
|
|
|
393
393
|
};
|
|
394
394
|
Yt.toString = function(e) {
|
|
395
395
|
const r = e ? function(s) {
|
|
396
|
-
return e.call(this, s,
|
|
397
|
-
} :
|
|
396
|
+
return e.call(this, s, mt);
|
|
397
|
+
} : mt;
|
|
398
398
|
return this._pairs.map(function(i) {
|
|
399
399
|
return r(i[0]) + "=" + r(i[1]);
|
|
400
400
|
}, "").join("&");
|
|
@@ -410,14 +410,14 @@ function Kt(t, e, r) {
|
|
|
410
410
|
serialize: r
|
|
411
411
|
});
|
|
412
412
|
const i = r && r.serialize;
|
|
413
|
-
let
|
|
414
|
-
if (i ?
|
|
415
|
-
const
|
|
416
|
-
|
|
413
|
+
let o;
|
|
414
|
+
if (i ? o = i(e, r) : o = f.isURLSearchParams(e) ? e.toString() : new it(e, r).toString(s), o) {
|
|
415
|
+
const a = t.indexOf("#");
|
|
416
|
+
a !== -1 && (t = t.slice(0, a)), t += (t.indexOf("?") === -1 ? "?" : "&") + o;
|
|
417
417
|
}
|
|
418
418
|
return t;
|
|
419
419
|
}
|
|
420
|
-
class
|
|
420
|
+
class gt {
|
|
421
421
|
constructor() {
|
|
422
422
|
this.handlers = [];
|
|
423
423
|
}
|
|
@@ -475,30 +475,30 @@ const Jt = {
|
|
|
475
475
|
silentJSONParsing: !0,
|
|
476
476
|
forcedJSONParsing: !0,
|
|
477
477
|
clarifyTimeoutError: !1
|
|
478
|
-
}, nn = typeof URLSearchParams < "u" ? URLSearchParams : it, sn = typeof FormData < "u" ? FormData : null,
|
|
478
|
+
}, nn = typeof URLSearchParams < "u" ? URLSearchParams : it, sn = typeof FormData < "u" ? FormData : null, an = typeof Blob < "u" ? Blob : null, on = {
|
|
479
479
|
isBrowser: !0,
|
|
480
480
|
classes: {
|
|
481
481
|
URLSearchParams: nn,
|
|
482
482
|
FormData: sn,
|
|
483
|
-
Blob:
|
|
483
|
+
Blob: an
|
|
484
484
|
},
|
|
485
485
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
486
|
-
},
|
|
487
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", dn =
|
|
486
|
+
}, at = typeof window < "u" && typeof document < "u", et = typeof navigator == "object" && navigator || void 0, ln = at && (!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 = at && window.location.href || "http://localhost", un = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
488
488
|
__proto__: null,
|
|
489
|
-
hasBrowserEnv:
|
|
489
|
+
hasBrowserEnv: at,
|
|
490
490
|
hasStandardBrowserEnv: ln,
|
|
491
491
|
hasStandardBrowserWebWorkerEnv: cn,
|
|
492
492
|
navigator: et,
|
|
493
493
|
origin: dn
|
|
494
494
|
}, Symbol.toStringTag, { value: "Module" })), ee = {
|
|
495
495
|
...un,
|
|
496
|
-
...
|
|
496
|
+
...on
|
|
497
497
|
};
|
|
498
498
|
function pn(t, e) {
|
|
499
499
|
return Be(t, new ee.classes.URLSearchParams(), {
|
|
500
|
-
visitor: function(r, s, i,
|
|
501
|
-
return ee.isNode && f.isBuffer(r) ? (this.append(s, r.toString("base64")), !1) :
|
|
500
|
+
visitor: function(r, s, i, o) {
|
|
501
|
+
return ee.isNode && f.isBuffer(r) ? (this.append(s, r.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
502
502
|
},
|
|
503
503
|
...e
|
|
504
504
|
});
|
|
@@ -510,17 +510,17 @@ function xn(t) {
|
|
|
510
510
|
const e = {}, r = Object.keys(t);
|
|
511
511
|
let s;
|
|
512
512
|
const i = r.length;
|
|
513
|
-
let
|
|
513
|
+
let o;
|
|
514
514
|
for (s = 0; s < i; s++)
|
|
515
|
-
|
|
515
|
+
o = r[s], e[o] = t[o];
|
|
516
516
|
return e;
|
|
517
517
|
}
|
|
518
518
|
function Gt(t) {
|
|
519
|
-
function e(r, s, i,
|
|
520
|
-
let
|
|
521
|
-
if (
|
|
522
|
-
const c = Number.isFinite(+
|
|
523
|
-
return
|
|
519
|
+
function e(r, s, i, o) {
|
|
520
|
+
let a = r[o++];
|
|
521
|
+
if (a === "__proto__") return !0;
|
|
522
|
+
const c = Number.isFinite(+a), h = o >= r.length;
|
|
523
|
+
return a = !a && f.isArray(i) ? i.length : a, h ? (f.hasOwnProp(i, a) ? i[a] = [i[a], s] : i[a] = s, !c) : ((!i[a] || !f.isObject(i[a])) && (i[a] = []), e(r, s, i[a], o) && f.isArray(i[a]) && (i[a] = xn(i[a])), !c);
|
|
524
524
|
}
|
|
525
525
|
if (f.isFormData(t) && f.isFunction(t.entries)) {
|
|
526
526
|
const r = {};
|
|
@@ -544,8 +544,8 @@ const Oe = {
|
|
|
544
544
|
transitional: Jt,
|
|
545
545
|
adapter: ["xhr", "http", "fetch"],
|
|
546
546
|
transformRequest: [function(e, r) {
|
|
547
|
-
const s = r.getContentType() || "", i = s.indexOf("application/json") > -1,
|
|
548
|
-
if (
|
|
547
|
+
const s = r.getContentType() || "", i = s.indexOf("application/json") > -1, o = f.isObject(e);
|
|
548
|
+
if (o && f.isHTMLForm(e) && (e = new FormData(e)), f.isFormData(e))
|
|
549
549
|
return i ? JSON.stringify(Gt(e)) : e;
|
|
550
550
|
if (f.isArrayBuffer(e) || f.isBuffer(e) || f.isStream(e) || f.isFile(e) || f.isBlob(e) || f.isReadableStream(e))
|
|
551
551
|
return e;
|
|
@@ -554,30 +554,30 @@ const Oe = {
|
|
|
554
554
|
if (f.isURLSearchParams(e))
|
|
555
555
|
return r.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
|
|
556
556
|
let c;
|
|
557
|
-
if (
|
|
557
|
+
if (o) {
|
|
558
558
|
if (s.indexOf("application/x-www-form-urlencoded") > -1)
|
|
559
559
|
return pn(e, this.formSerializer).toString();
|
|
560
560
|
if ((c = f.isFileList(e)) || s.indexOf("multipart/form-data") > -1) {
|
|
561
|
-
const
|
|
561
|
+
const h = this.env && this.env.FormData;
|
|
562
562
|
return Be(
|
|
563
563
|
c ? { "files[]": e } : e,
|
|
564
|
-
|
|
564
|
+
h && new h(),
|
|
565
565
|
this.formSerializer
|
|
566
566
|
);
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
return
|
|
569
|
+
return o || i ? (r.setContentType("application/json", !1), hn(e)) : e;
|
|
570
570
|
}],
|
|
571
571
|
transformResponse: [function(e) {
|
|
572
572
|
const r = this.transitional || Oe.transitional, s = r && r.forcedJSONParsing, i = this.responseType === "json";
|
|
573
573
|
if (f.isResponse(e) || f.isReadableStream(e))
|
|
574
574
|
return e;
|
|
575
575
|
if (e && f.isString(e) && (s && !this.responseType || i)) {
|
|
576
|
-
const
|
|
576
|
+
const a = !(r && r.silentJSONParsing) && i;
|
|
577
577
|
try {
|
|
578
578
|
return JSON.parse(e, this.parseReviver);
|
|
579
579
|
} catch (c) {
|
|
580
|
-
if (
|
|
580
|
+
if (a)
|
|
581
581
|
throw c.name === "SyntaxError" ? N.from(c, N.ERR_BAD_RESPONSE, this, null, this.response) : c;
|
|
582
582
|
}
|
|
583
583
|
}
|
|
@@ -609,7 +609,7 @@ const Oe = {
|
|
|
609
609
|
f.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => {
|
|
610
610
|
Oe.headers[t] = {};
|
|
611
611
|
});
|
|
612
|
-
const
|
|
612
|
+
const mn = f.toObjectSet([
|
|
613
613
|
"age",
|
|
614
614
|
"authorization",
|
|
615
615
|
"content-length",
|
|
@@ -627,12 +627,12 @@ const gn = f.toObjectSet([
|
|
|
627
627
|
"referer",
|
|
628
628
|
"retry-after",
|
|
629
629
|
"user-agent"
|
|
630
|
-
]),
|
|
630
|
+
]), gn = (t) => {
|
|
631
631
|
const e = {};
|
|
632
632
|
let r, s, i;
|
|
633
633
|
return t && t.split(`
|
|
634
|
-
`).forEach(function(
|
|
635
|
-
i =
|
|
634
|
+
`).forEach(function(a) {
|
|
635
|
+
i = a.indexOf(":"), r = a.substring(0, i).trim().toLowerCase(), s = a.substring(i + 1).trim(), !(!r || e[r] && mn[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
|
}, yt = Symbol("internals");
|
|
638
638
|
function Ee(t) {
|
|
@@ -666,8 +666,8 @@ function jn(t, e) {
|
|
|
666
666
|
const r = f.toCamelCase(" " + e);
|
|
667
667
|
["get", "set", "has"].forEach((s) => {
|
|
668
668
|
Object.defineProperty(t, s + r, {
|
|
669
|
-
value: function(i,
|
|
670
|
-
return this[s].call(this, e, i,
|
|
669
|
+
value: function(i, o, a) {
|
|
670
|
+
return this[s].call(this, e, i, o, a);
|
|
671
671
|
},
|
|
672
672
|
configurable: !0
|
|
673
673
|
});
|
|
@@ -679,28 +679,28 @@ let ne = class {
|
|
|
679
679
|
}
|
|
680
680
|
set(e, r, s) {
|
|
681
681
|
const i = this;
|
|
682
|
-
function
|
|
683
|
-
const d = Ee(
|
|
682
|
+
function o(c, h, p) {
|
|
683
|
+
const d = Ee(h);
|
|
684
684
|
if (!d)
|
|
685
685
|
throw new Error("header name must be a non-empty string");
|
|
686
|
-
const
|
|
687
|
-
(!
|
|
686
|
+
const m = f.findKey(i, d);
|
|
687
|
+
(!m || i[m] === void 0 || p === !0 || p === void 0 && i[m] !== !1) && (i[m || h] = De(c));
|
|
688
688
|
}
|
|
689
|
-
const
|
|
689
|
+
const a = (c, h) => f.forEach(c, (p, d) => o(p, d, h));
|
|
690
690
|
if (f.isPlainObject(e) || e instanceof this.constructor)
|
|
691
|
-
|
|
691
|
+
a(e, r);
|
|
692
692
|
else if (f.isString(e) && (e = e.trim()) && !bn(e))
|
|
693
|
-
|
|
693
|
+
a(gn(e), r);
|
|
694
694
|
else if (f.isObject(e) && f.isIterable(e)) {
|
|
695
|
-
let c = {},
|
|
695
|
+
let c = {}, h, p;
|
|
696
696
|
for (const d of e) {
|
|
697
697
|
if (!f.isArray(d))
|
|
698
698
|
throw TypeError("Object iterator must return a key-value pair");
|
|
699
|
-
c[p = d[0]] = (
|
|
699
|
+
c[p = d[0]] = (h = c[p]) ? f.isArray(h) ? [...h, d[1]] : [h, d[1]] : d[1];
|
|
700
700
|
}
|
|
701
|
-
|
|
701
|
+
a(c, r);
|
|
702
702
|
} else
|
|
703
|
-
e != null &&
|
|
703
|
+
e != null && o(r, e, s);
|
|
704
704
|
return this;
|
|
705
705
|
}
|
|
706
706
|
get(e, r) {
|
|
@@ -730,33 +730,33 @@ let ne = class {
|
|
|
730
730
|
delete(e, r) {
|
|
731
731
|
const s = this;
|
|
732
732
|
let i = !1;
|
|
733
|
-
function a
|
|
734
|
-
if (
|
|
735
|
-
const c = f.findKey(s,
|
|
733
|
+
function o(a) {
|
|
734
|
+
if (a = Ee(a), a) {
|
|
735
|
+
const c = f.findKey(s, a);
|
|
736
736
|
c && (!r || Ye(s, s[c], c, r)) && (delete s[c], i = !0);
|
|
737
737
|
}
|
|
738
738
|
}
|
|
739
|
-
return f.isArray(e) ? e.forEach(
|
|
739
|
+
return f.isArray(e) ? e.forEach(o) : o(e), i;
|
|
740
740
|
}
|
|
741
741
|
clear(e) {
|
|
742
742
|
const r = Object.keys(this);
|
|
743
743
|
let s = r.length, i = !1;
|
|
744
744
|
for (; s--; ) {
|
|
745
|
-
const
|
|
746
|
-
(!e || Ye(this, this[
|
|
745
|
+
const o = r[s];
|
|
746
|
+
(!e || Ye(this, this[o], o, e, !0)) && (delete this[o], i = !0);
|
|
747
747
|
}
|
|
748
748
|
return i;
|
|
749
749
|
}
|
|
750
750
|
normalize(e) {
|
|
751
751
|
const r = this, s = {};
|
|
752
|
-
return f.forEach(this, (i,
|
|
753
|
-
const
|
|
754
|
-
if (
|
|
755
|
-
r[
|
|
752
|
+
return f.forEach(this, (i, o) => {
|
|
753
|
+
const a = f.findKey(s, o);
|
|
754
|
+
if (a) {
|
|
755
|
+
r[a] = De(i), delete r[o];
|
|
756
756
|
return;
|
|
757
757
|
}
|
|
758
|
-
const c = e ? wn(
|
|
759
|
-
c !==
|
|
758
|
+
const c = e ? wn(o) : String(o).trim();
|
|
759
|
+
c !== o && delete r[o], r[c] = De(i), s[c] = !0;
|
|
760
760
|
}), this;
|
|
761
761
|
}
|
|
762
762
|
concat(...e) {
|
|
@@ -792,11 +792,11 @@ let ne = class {
|
|
|
792
792
|
const s = (this[yt] = this[yt] = {
|
|
793
793
|
accessors: {}
|
|
794
794
|
}).accessors, i = this.prototype;
|
|
795
|
-
function a
|
|
796
|
-
const c = Ee(
|
|
797
|
-
s[c] || (jn(i,
|
|
795
|
+
function o(a) {
|
|
796
|
+
const c = Ee(a);
|
|
797
|
+
s[c] || (jn(i, a), s[c] = !0);
|
|
798
798
|
}
|
|
799
|
-
return f.isArray(e) ? e.forEach(
|
|
799
|
+
return f.isArray(e) ? e.forEach(o) : o(e), this;
|
|
800
800
|
}
|
|
801
801
|
};
|
|
802
802
|
ne.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
@@ -812,10 +812,10 @@ f.reduceDescriptors(ne.prototype, ({ value: t }, e) => {
|
|
|
812
812
|
f.freezeMethods(ne);
|
|
813
813
|
function Ke(t, e) {
|
|
814
814
|
const r = this || Oe, s = e || r, i = ne.from(s.headers);
|
|
815
|
-
let
|
|
815
|
+
let o = s.data;
|
|
816
816
|
return f.forEach(t, function(c) {
|
|
817
|
-
|
|
818
|
-
}), i.normalize(),
|
|
817
|
+
o = c.call(r, o, i.normalize(), e ? e.status : void 0);
|
|
818
|
+
}), i.normalize(), o;
|
|
819
819
|
}
|
|
820
820
|
function Xt(t) {
|
|
821
821
|
return !!(t && t.__CANCEL__);
|
|
@@ -836,56 +836,56 @@ function Zt(t, e, r) {
|
|
|
836
836
|
r
|
|
837
837
|
));
|
|
838
838
|
}
|
|
839
|
-
function
|
|
839
|
+
function vn(t) {
|
|
840
840
|
const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(t);
|
|
841
841
|
return e && e[1] || "";
|
|
842
842
|
}
|
|
843
|
-
function
|
|
843
|
+
function Sn(t, e) {
|
|
844
844
|
t = t || 10;
|
|
845
845
|
const r = new Array(t), s = new Array(t);
|
|
846
|
-
let i = 0,
|
|
847
|
-
return e = e !== void 0 ? e : 1e3, function(
|
|
848
|
-
const p = Date.now(), d = s[
|
|
849
|
-
|
|
850
|
-
let
|
|
851
|
-
for (;
|
|
852
|
-
P += r[
|
|
853
|
-
if (i = (i + 1) % t, i ===
|
|
846
|
+
let i = 0, o = 0, a;
|
|
847
|
+
return e = e !== void 0 ? e : 1e3, function(h) {
|
|
848
|
+
const p = Date.now(), d = s[o];
|
|
849
|
+
a || (a = p), r[i] = h, s[i] = p;
|
|
850
|
+
let m = o, P = 0;
|
|
851
|
+
for (; m !== i; )
|
|
852
|
+
P += r[m++], m = m % t;
|
|
853
|
+
if (i = (i + 1) % t, i === o && (o = (o + 1) % t), p - a < e)
|
|
854
854
|
return;
|
|
855
855
|
const O = d && p - d;
|
|
856
856
|
return O ? Math.round(P * 1e3 / O) : void 0;
|
|
857
857
|
};
|
|
858
858
|
}
|
|
859
859
|
function En(t, e) {
|
|
860
|
-
let r = 0, s = 1e3 / e, i,
|
|
861
|
-
const
|
|
862
|
-
r = d, i = null,
|
|
860
|
+
let r = 0, s = 1e3 / e, i, o;
|
|
861
|
+
const a = (p, d = Date.now()) => {
|
|
862
|
+
r = d, i = null, o && (clearTimeout(o), o = null), t(...p);
|
|
863
863
|
};
|
|
864
864
|
return [(...p) => {
|
|
865
|
-
const d = Date.now(),
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
}, s -
|
|
869
|
-
}, () => i &&
|
|
865
|
+
const d = Date.now(), m = d - r;
|
|
866
|
+
m >= s ? a(p, d) : (i = p, o || (o = setTimeout(() => {
|
|
867
|
+
o = null, a(i);
|
|
868
|
+
}, s - m)));
|
|
869
|
+
}, () => i && a(i)];
|
|
870
870
|
}
|
|
871
871
|
const Fe = (t, e, r = 3) => {
|
|
872
872
|
let s = 0;
|
|
873
|
-
const i =
|
|
874
|
-
return En((
|
|
875
|
-
const
|
|
876
|
-
s =
|
|
877
|
-
const
|
|
878
|
-
loaded:
|
|
873
|
+
const i = Sn(50, 250);
|
|
874
|
+
return En((o) => {
|
|
875
|
+
const a = o.loaded, c = o.lengthComputable ? o.total : void 0, h = a - s, p = i(h), d = a <= c;
|
|
876
|
+
s = a;
|
|
877
|
+
const m = {
|
|
878
|
+
loaded: a,
|
|
879
879
|
total: c,
|
|
880
|
-
progress: c ?
|
|
881
|
-
bytes:
|
|
880
|
+
progress: c ? a / c : void 0,
|
|
881
|
+
bytes: h,
|
|
882
882
|
rate: p || void 0,
|
|
883
|
-
estimated: p && c && d ? (c -
|
|
884
|
-
event:
|
|
883
|
+
estimated: p && c && d ? (c - a) / p : void 0,
|
|
884
|
+
event: o,
|
|
885
885
|
lengthComputable: c != null,
|
|
886
886
|
[e ? "download" : "upload"]: !0
|
|
887
887
|
};
|
|
888
|
-
t(
|
|
888
|
+
t(m);
|
|
889
889
|
}, r);
|
|
890
890
|
}, bt = (t, e) => {
|
|
891
891
|
const r = t != null;
|
|
@@ -900,9 +900,9 @@ const Fe = (t, e, r = 3) => {
|
|
|
900
900
|
) : () => !0, Cn = ee.hasStandardBrowserEnv ? (
|
|
901
901
|
// Standard browser envs support document.cookie
|
|
902
902
|
{
|
|
903
|
-
write(t, e, r, s, i,
|
|
904
|
-
const
|
|
905
|
-
f.isNumber(r) &&
|
|
903
|
+
write(t, e, r, s, i, o) {
|
|
904
|
+
const a = [t + "=" + encodeURIComponent(e)];
|
|
905
|
+
f.isNumber(r) && a.push("expires=" + new Date(r).toGMTString()), f.isString(s) && a.push("path=" + s), f.isString(i) && a.push("domain=" + i), o === !0 && a.push("secure"), document.cookie = a.join("; ");
|
|
906
906
|
},
|
|
907
907
|
read(t) {
|
|
908
908
|
const e = document.cookie.match(new RegExp("(^|;\\s*)(" + t + ")=([^;]*)"));
|
|
@@ -935,97 +935,97 @@ function Qt(t, e, r) {
|
|
|
935
935
|
return t && (s || r == !1) ? Rn(t, e) : e;
|
|
936
936
|
}
|
|
937
937
|
const jt = (t) => t instanceof ne ? { ...t } : t;
|
|
938
|
-
function
|
|
938
|
+
function me(t, e) {
|
|
939
939
|
e = e || {};
|
|
940
940
|
const r = {};
|
|
941
|
-
function s(p, d,
|
|
941
|
+
function s(p, d, m, P) {
|
|
942
942
|
return f.isPlainObject(p) && f.isPlainObject(d) ? f.merge.call({ caseless: P }, p, d) : f.isPlainObject(d) ? f.merge({}, d) : f.isArray(d) ? d.slice() : d;
|
|
943
943
|
}
|
|
944
|
-
function i(p, d,
|
|
944
|
+
function i(p, d, m, P) {
|
|
945
945
|
if (f.isUndefined(d)) {
|
|
946
946
|
if (!f.isUndefined(p))
|
|
947
|
-
return s(void 0, p,
|
|
948
|
-
} else return s(p, d,
|
|
947
|
+
return s(void 0, p, m, P);
|
|
948
|
+
} else return s(p, d, m, P);
|
|
949
949
|
}
|
|
950
|
-
function
|
|
950
|
+
function o(p, d) {
|
|
951
951
|
if (!f.isUndefined(d))
|
|
952
952
|
return s(void 0, d);
|
|
953
953
|
}
|
|
954
|
-
function
|
|
954
|
+
function a(p, d) {
|
|
955
955
|
if (f.isUndefined(d)) {
|
|
956
956
|
if (!f.isUndefined(p))
|
|
957
957
|
return s(void 0, p);
|
|
958
958
|
} else return s(void 0, d);
|
|
959
959
|
}
|
|
960
|
-
function c(p, d,
|
|
961
|
-
if (
|
|
960
|
+
function c(p, d, m) {
|
|
961
|
+
if (m in e)
|
|
962
962
|
return s(p, d);
|
|
963
|
-
if (
|
|
963
|
+
if (m in t)
|
|
964
964
|
return s(void 0, p);
|
|
965
965
|
}
|
|
966
|
-
const
|
|
967
|
-
url:
|
|
968
|
-
method:
|
|
969
|
-
data:
|
|
970
|
-
baseURL:
|
|
971
|
-
transformRequest:
|
|
972
|
-
transformResponse:
|
|
973
|
-
paramsSerializer:
|
|
974
|
-
timeout:
|
|
975
|
-
timeoutMessage:
|
|
976
|
-
withCredentials:
|
|
977
|
-
withXSRFToken:
|
|
978
|
-
adapter:
|
|
979
|
-
responseType:
|
|
980
|
-
xsrfCookieName:
|
|
981
|
-
xsrfHeaderName:
|
|
982
|
-
onUploadProgress:
|
|
983
|
-
onDownloadProgress:
|
|
984
|
-
decompress:
|
|
985
|
-
maxContentLength:
|
|
986
|
-
maxBodyLength:
|
|
987
|
-
beforeRedirect:
|
|
988
|
-
transport:
|
|
989
|
-
httpAgent:
|
|
990
|
-
httpsAgent:
|
|
991
|
-
cancelToken:
|
|
992
|
-
socketPath:
|
|
993
|
-
responseEncoding:
|
|
966
|
+
const h = {
|
|
967
|
+
url: o,
|
|
968
|
+
method: o,
|
|
969
|
+
data: o,
|
|
970
|
+
baseURL: a,
|
|
971
|
+
transformRequest: a,
|
|
972
|
+
transformResponse: a,
|
|
973
|
+
paramsSerializer: a,
|
|
974
|
+
timeout: a,
|
|
975
|
+
timeoutMessage: a,
|
|
976
|
+
withCredentials: a,
|
|
977
|
+
withXSRFToken: a,
|
|
978
|
+
adapter: a,
|
|
979
|
+
responseType: a,
|
|
980
|
+
xsrfCookieName: a,
|
|
981
|
+
xsrfHeaderName: a,
|
|
982
|
+
onUploadProgress: a,
|
|
983
|
+
onDownloadProgress: a,
|
|
984
|
+
decompress: a,
|
|
985
|
+
maxContentLength: a,
|
|
986
|
+
maxBodyLength: a,
|
|
987
|
+
beforeRedirect: a,
|
|
988
|
+
transport: a,
|
|
989
|
+
httpAgent: a,
|
|
990
|
+
httpsAgent: a,
|
|
991
|
+
cancelToken: a,
|
|
992
|
+
socketPath: a,
|
|
993
|
+
responseEncoding: a,
|
|
994
994
|
validateStatus: c,
|
|
995
|
-
headers: (p, d,
|
|
995
|
+
headers: (p, d, m) => i(jt(p), jt(d), m, !0)
|
|
996
996
|
};
|
|
997
997
|
return f.forEach(Object.keys({ ...t, ...e }), function(d) {
|
|
998
|
-
const
|
|
999
|
-
f.isUndefined(P) &&
|
|
998
|
+
const m = h[d] || i, P = m(t[d], e[d], d);
|
|
999
|
+
f.isUndefined(P) && m !== c || (r[d] = P);
|
|
1000
1000
|
}), r;
|
|
1001
1001
|
}
|
|
1002
1002
|
const er = (t) => {
|
|
1003
|
-
const e =
|
|
1004
|
-
let { data: r, withXSRFToken: s, xsrfHeaderName: i, xsrfCookieName:
|
|
1005
|
-
if (e.headers =
|
|
1003
|
+
const e = me({}, t);
|
|
1004
|
+
let { data: r, withXSRFToken: s, xsrfHeaderName: i, xsrfCookieName: o, headers: a, auth: c } = e;
|
|
1005
|
+
if (e.headers = a = ne.from(a), e.url = Kt(Qt(e.baseURL, e.url, e.allowAbsoluteUrls), t.params, t.paramsSerializer), c && a.set(
|
|
1006
1006
|
"Authorization",
|
|
1007
1007
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1008
1008
|
), f.isFormData(r)) {
|
|
1009
1009
|
if (ee.hasStandardBrowserEnv || ee.hasStandardBrowserWebWorkerEnv)
|
|
1010
|
-
|
|
1010
|
+
a.setContentType(void 0);
|
|
1011
1011
|
else if (f.isFunction(r.getHeaders)) {
|
|
1012
|
-
const
|
|
1013
|
-
Object.entries(
|
|
1014
|
-
p.includes(d.toLowerCase()) &&
|
|
1012
|
+
const h = r.getHeaders(), p = ["content-type", "content-length"];
|
|
1013
|
+
Object.entries(h).forEach(([d, m]) => {
|
|
1014
|
+
p.includes(d.toLowerCase()) && a.set(d, m);
|
|
1015
1015
|
});
|
|
1016
1016
|
}
|
|
1017
1017
|
}
|
|
1018
1018
|
if (ee.hasStandardBrowserEnv && (s && f.isFunction(s) && (s = s(e)), s || s !== !1 && kn(e.url))) {
|
|
1019
|
-
const
|
|
1020
|
-
|
|
1019
|
+
const h = i && o && Cn.read(o);
|
|
1020
|
+
h && a.set(i, h);
|
|
1021
1021
|
}
|
|
1022
1022
|
return e;
|
|
1023
1023
|
}, Pn = typeof XMLHttpRequest < "u", In = Pn && function(t) {
|
|
1024
1024
|
return new Promise(function(r, s) {
|
|
1025
1025
|
const i = er(t);
|
|
1026
|
-
let
|
|
1027
|
-
const
|
|
1028
|
-
let { responseType: c, onUploadProgress:
|
|
1026
|
+
let o = i.data;
|
|
1027
|
+
const a = ne.from(i.headers).normalize();
|
|
1028
|
+
let { responseType: c, onUploadProgress: h, onDownloadProgress: p } = i, d, m, P, O, u;
|
|
1029
1029
|
function w() {
|
|
1030
1030
|
O && O(), u && u(), i.cancelToken && i.cancelToken.unsubscribe(d), i.signal && i.signal.removeEventListener("abort", d);
|
|
1031
1031
|
}
|
|
@@ -1044,10 +1044,10 @@ const er = (t) => {
|
|
|
1044
1044
|
config: t,
|
|
1045
1045
|
request: x
|
|
1046
1046
|
};
|
|
1047
|
-
Zt(function(
|
|
1048
|
-
r(
|
|
1049
|
-
}, function(
|
|
1050
|
-
s(
|
|
1047
|
+
Zt(function(v) {
|
|
1048
|
+
r(v), w();
|
|
1049
|
+
}, function(v) {
|
|
1050
|
+
s(v), w();
|
|
1051
1051
|
}, U), x = null;
|
|
1052
1052
|
}
|
|
1053
1053
|
"onloadend" in x ? x.onloadend = C : x.onreadystatechange = function() {
|
|
@@ -1055,8 +1055,8 @@ const er = (t) => {
|
|
|
1055
1055
|
}, x.onabort = function() {
|
|
1056
1056
|
x && (s(new N("Request aborted", N.ECONNABORTED, t, x)), x = null);
|
|
1057
1057
|
}, x.onerror = function(y) {
|
|
1058
|
-
const U = y && y.message ? y.message : "Network Error",
|
|
1059
|
-
|
|
1058
|
+
const U = y && y.message ? y.message : "Network Error", g = new N(U, N.ERR_NETWORK, t, x);
|
|
1059
|
+
g.event = y || null, s(g), x = null;
|
|
1060
1060
|
}, x.ontimeout = function() {
|
|
1061
1061
|
let y = i.timeout ? "timeout of " + i.timeout + "ms exceeded" : "timeout exceeded";
|
|
1062
1062
|
const U = i.transitional || Jt;
|
|
@@ -1066,40 +1066,40 @@ const er = (t) => {
|
|
|
1066
1066
|
t,
|
|
1067
1067
|
x
|
|
1068
1068
|
)), x = null;
|
|
1069
|
-
},
|
|
1069
|
+
}, o === void 0 && a.setContentType(null), "setRequestHeader" in x && f.forEach(a.toJSON(), function(y, U) {
|
|
1070
1070
|
x.setRequestHeader(U, y);
|
|
1071
|
-
}), f.isUndefined(i.withCredentials) || (x.withCredentials = !!i.withCredentials), c && c !== "json" && (x.responseType = i.responseType), p && ([P, u] = Fe(p, !0), x.addEventListener("progress", P)),
|
|
1071
|
+
}), f.isUndefined(i.withCredentials) || (x.withCredentials = !!i.withCredentials), c && c !== "json" && (x.responseType = i.responseType), p && ([P, u] = Fe(p, !0), x.addEventListener("progress", P)), h && x.upload && ([m, O] = Fe(h), x.upload.addEventListener("progress", m), x.upload.addEventListener("loadend", O)), (i.cancelToken || i.signal) && (d = (A) => {
|
|
1072
1072
|
x && (s(!A || A.type ? new je(null, t, x) : A), x.abort(), x = null);
|
|
1073
1073
|
}, i.cancelToken && i.cancelToken.subscribe(d), i.signal && (i.signal.aborted ? d() : i.signal.addEventListener("abort", d)));
|
|
1074
|
-
const T =
|
|
1074
|
+
const T = vn(i.url);
|
|
1075
1075
|
if (T && ee.protocols.indexOf(T) === -1) {
|
|
1076
1076
|
s(new N("Unsupported protocol " + T + ":", N.ERR_BAD_REQUEST, t));
|
|
1077
1077
|
return;
|
|
1078
1078
|
}
|
|
1079
|
-
x.send(
|
|
1079
|
+
x.send(o || null);
|
|
1080
1080
|
});
|
|
1081
1081
|
}, On = (t, e) => {
|
|
1082
1082
|
const { length: r } = t = t ? t.filter(Boolean) : [];
|
|
1083
1083
|
if (e || r) {
|
|
1084
1084
|
let s = new AbortController(), i;
|
|
1085
|
-
const
|
|
1085
|
+
const o = function(p) {
|
|
1086
1086
|
if (!i) {
|
|
1087
1087
|
i = !0, c();
|
|
1088
1088
|
const d = p instanceof Error ? p : this.reason;
|
|
1089
1089
|
s.abort(d instanceof N ? d : new je(d instanceof Error ? d.message : d));
|
|
1090
1090
|
}
|
|
1091
1091
|
};
|
|
1092
|
-
let
|
|
1093
|
-
|
|
1092
|
+
let a = e && setTimeout(() => {
|
|
1093
|
+
a = null, o(new N(`timeout ${e} of ms exceeded`, N.ETIMEDOUT));
|
|
1094
1094
|
}, e);
|
|
1095
1095
|
const c = () => {
|
|
1096
|
-
t && (
|
|
1097
|
-
p.unsubscribe ? p.unsubscribe(
|
|
1096
|
+
t && (a && clearTimeout(a), a = null, t.forEach((p) => {
|
|
1097
|
+
p.unsubscribe ? p.unsubscribe(o) : p.removeEventListener("abort", o);
|
|
1098
1098
|
}), t = null);
|
|
1099
1099
|
};
|
|
1100
|
-
t.forEach((p) => p.addEventListener("abort",
|
|
1101
|
-
const { signal:
|
|
1102
|
-
return
|
|
1100
|
+
t.forEach((p) => p.addEventListener("abort", o));
|
|
1101
|
+
const { signal: h } = s;
|
|
1102
|
+
return h.unsubscribe = () => f.asap(c), h;
|
|
1103
1103
|
}
|
|
1104
1104
|
}, zn = function* (t, e) {
|
|
1105
1105
|
let r = t.byteLength;
|
|
@@ -1129,36 +1129,36 @@ const er = (t) => {
|
|
|
1129
1129
|
} finally {
|
|
1130
1130
|
await e.cancel();
|
|
1131
1131
|
}
|
|
1132
|
-
},
|
|
1132
|
+
}, vt = (t, e, r, s) => {
|
|
1133
1133
|
const i = An(t, e);
|
|
1134
|
-
let
|
|
1135
|
-
|
|
1134
|
+
let o = 0, a, c = (h) => {
|
|
1135
|
+
a || (a = !0, s && s(h));
|
|
1136
1136
|
};
|
|
1137
1137
|
return new ReadableStream({
|
|
1138
|
-
async pull(
|
|
1138
|
+
async pull(h) {
|
|
1139
1139
|
try {
|
|
1140
1140
|
const { done: p, value: d } = await i.next();
|
|
1141
1141
|
if (p) {
|
|
1142
|
-
c(),
|
|
1142
|
+
c(), h.close();
|
|
1143
1143
|
return;
|
|
1144
1144
|
}
|
|
1145
|
-
let
|
|
1145
|
+
let m = d.byteLength;
|
|
1146
1146
|
if (r) {
|
|
1147
|
-
let P =
|
|
1147
|
+
let P = o += m;
|
|
1148
1148
|
r(P);
|
|
1149
1149
|
}
|
|
1150
|
-
|
|
1150
|
+
h.enqueue(new Uint8Array(d));
|
|
1151
1151
|
} catch (p) {
|
|
1152
1152
|
throw c(p), p;
|
|
1153
1153
|
}
|
|
1154
1154
|
},
|
|
1155
|
-
cancel(
|
|
1156
|
-
return c(
|
|
1155
|
+
cancel(h) {
|
|
1156
|
+
return c(h), i.return();
|
|
1157
1157
|
}
|
|
1158
1158
|
}, {
|
|
1159
1159
|
highWaterMark: 2
|
|
1160
1160
|
});
|
|
1161
|
-
},
|
|
1161
|
+
}, St = 64 * 1024, { isFunction: Ae } = f, _n = (({ Request: t, Response: e }) => ({
|
|
1162
1162
|
Request: t,
|
|
1163
1163
|
Response: e
|
|
1164
1164
|
}))(f.global), {
|
|
@@ -1174,10 +1174,10 @@ const er = (t) => {
|
|
|
1174
1174
|
t = f.merge.call({
|
|
1175
1175
|
skipUndefined: !0
|
|
1176
1176
|
}, _n, t);
|
|
1177
|
-
const { fetch: e, Request: r, Response: s } = t, i = e ? Ae(e) : typeof fetch == "function",
|
|
1177
|
+
const { fetch: e, Request: r, Response: s } = t, i = e ? Ae(e) : typeof fetch == "function", o = Ae(r), a = Ae(s);
|
|
1178
1178
|
if (!i)
|
|
1179
1179
|
return !1;
|
|
1180
|
-
const c = i && Ae(Et),
|
|
1180
|
+
const c = i && Ae(Et), h = i && (typeof kt == "function" ? /* @__PURE__ */ ((u) => (w) => u.encode(w))(new kt()) : async (u) => new Uint8Array(await new r(u).arrayBuffer())), p = o && c && Ct(() => {
|
|
1181
1181
|
let u = !1;
|
|
1182
1182
|
const w = new r(ee.origin, {
|
|
1183
1183
|
body: new Et(),
|
|
@@ -1187,11 +1187,11 @@ const er = (t) => {
|
|
|
1187
1187
|
}
|
|
1188
1188
|
}).headers.has("Content-Type");
|
|
1189
1189
|
return u && !w;
|
|
1190
|
-
}), d =
|
|
1190
|
+
}), d = a && c && Ct(() => f.isReadableStream(new s("").body)), m = {
|
|
1191
1191
|
stream: d && ((u) => u.body)
|
|
1192
1192
|
};
|
|
1193
1193
|
i && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((u) => {
|
|
1194
|
-
!
|
|
1194
|
+
!m[u] && (m[u] = (w, x) => {
|
|
1195
1195
|
let C = w && w[u];
|
|
1196
1196
|
if (C)
|
|
1197
1197
|
return C.call(w);
|
|
@@ -1211,7 +1211,7 @@ const er = (t) => {
|
|
|
1211
1211
|
if (f.isArrayBufferView(u) || f.isArrayBuffer(u))
|
|
1212
1212
|
return u.byteLength;
|
|
1213
1213
|
if (f.isURLSearchParams(u) && (u = u + ""), f.isString(u))
|
|
1214
|
-
return (await
|
|
1214
|
+
return (await h(u)).byteLength;
|
|
1215
1215
|
}, O = async (u, w) => {
|
|
1216
1216
|
const x = f.toFiniteNumber(u.getContentLength());
|
|
1217
1217
|
return x ?? P(w);
|
|
@@ -1225,35 +1225,35 @@ const er = (t) => {
|
|
|
1225
1225
|
cancelToken: A,
|
|
1226
1226
|
timeout: y,
|
|
1227
1227
|
onDownloadProgress: U,
|
|
1228
|
-
onUploadProgress:
|
|
1229
|
-
responseType:
|
|
1228
|
+
onUploadProgress: g,
|
|
1229
|
+
responseType: v,
|
|
1230
1230
|
headers: L,
|
|
1231
1231
|
withCredentials: _ = "same-origin",
|
|
1232
1232
|
fetchOptions: M
|
|
1233
1233
|
} = er(u), X = e || fetch;
|
|
1234
|
-
|
|
1234
|
+
v = v ? (v + "").toLowerCase() : "text";
|
|
1235
1235
|
let k = On([T, A && A.toAbortSignal()], y), V = null;
|
|
1236
1236
|
const z = k && k.unsubscribe && (() => {
|
|
1237
1237
|
k.unsubscribe();
|
|
1238
1238
|
});
|
|
1239
1239
|
let I;
|
|
1240
1240
|
try {
|
|
1241
|
-
if (
|
|
1241
|
+
if (g && p && x !== "get" && x !== "head" && (I = await O(L, C)) !== 0) {
|
|
1242
1242
|
let l = new r(w, {
|
|
1243
1243
|
method: "POST",
|
|
1244
1244
|
body: C,
|
|
1245
1245
|
duplex: "half"
|
|
1246
1246
|
}), b;
|
|
1247
1247
|
if (f.isFormData(C) && (b = l.headers.get("content-type")) && L.setContentType(b), l.body) {
|
|
1248
|
-
const [
|
|
1248
|
+
const [S, j] = bt(
|
|
1249
1249
|
I,
|
|
1250
|
-
Fe(wt(
|
|
1250
|
+
Fe(wt(g))
|
|
1251
1251
|
);
|
|
1252
|
-
C =
|
|
1252
|
+
C = vt(l.body, St, S, j);
|
|
1253
1253
|
}
|
|
1254
1254
|
}
|
|
1255
1255
|
f.isString(_) || (_ = _ ? "include" : "omit");
|
|
1256
|
-
const W =
|
|
1256
|
+
const W = o && "credentials" in r.prototype, Z = {
|
|
1257
1257
|
...M,
|
|
1258
1258
|
signal: k,
|
|
1259
1259
|
method: x.toUpperCase(),
|
|
@@ -1262,27 +1262,27 @@ const er = (t) => {
|
|
|
1262
1262
|
duplex: "half",
|
|
1263
1263
|
credentials: W ? _ : void 0
|
|
1264
1264
|
};
|
|
1265
|
-
V =
|
|
1266
|
-
let B = await (
|
|
1267
|
-
const K = d && (
|
|
1265
|
+
V = o && new r(w, Z);
|
|
1266
|
+
let B = await (o ? X(V, M) : X(w, Z));
|
|
1267
|
+
const K = d && (v === "stream" || v === "response");
|
|
1268
1268
|
if (d && (U || K && z)) {
|
|
1269
1269
|
const l = {};
|
|
1270
1270
|
["status", "statusText", "headers"].forEach((G) => {
|
|
1271
1271
|
l[G] = B[G];
|
|
1272
1272
|
});
|
|
1273
|
-
const b = f.toFiniteNumber(B.headers.get("content-length")), [
|
|
1273
|
+
const b = f.toFiniteNumber(B.headers.get("content-length")), [S, j] = U && bt(
|
|
1274
1274
|
b,
|
|
1275
1275
|
Fe(wt(U), !0)
|
|
1276
1276
|
) || [];
|
|
1277
1277
|
B = new s(
|
|
1278
|
-
|
|
1278
|
+
vt(B.body, St, S, () => {
|
|
1279
1279
|
j && j(), z && z();
|
|
1280
1280
|
}),
|
|
1281
1281
|
l
|
|
1282
1282
|
);
|
|
1283
1283
|
}
|
|
1284
|
-
|
|
1285
|
-
let F = await
|
|
1284
|
+
v = v || "text";
|
|
1285
|
+
let F = await m[f.findKey(m, v) || "text"](B, u);
|
|
1286
1286
|
return !K && z && z(), await new Promise((l, b) => {
|
|
1287
1287
|
Zt(l, b, {
|
|
1288
1288
|
data: F,
|
|
@@ -1304,14 +1304,14 @@ const er = (t) => {
|
|
|
1304
1304
|
};
|
|
1305
1305
|
}, $n = /* @__PURE__ */ new Map(), tr = (t) => {
|
|
1306
1306
|
let e = t ? t.env : {};
|
|
1307
|
-
const { fetch: r, Request: s, Response: i } = e,
|
|
1307
|
+
const { fetch: r, Request: s, Response: i } = e, o = [
|
|
1308
1308
|
s,
|
|
1309
1309
|
i,
|
|
1310
1310
|
r
|
|
1311
1311
|
];
|
|
1312
|
-
let
|
|
1312
|
+
let a = o.length, c = a, h, p, d = $n;
|
|
1313
1313
|
for (; c--; )
|
|
1314
|
-
|
|
1314
|
+
h = o[c], p = d.get(h), p === void 0 && d.set(h, p = c ? /* @__PURE__ */ new Map() : Dn(e)), d = p;
|
|
1315
1315
|
return p;
|
|
1316
1316
|
};
|
|
1317
1317
|
tr();
|
|
@@ -1336,23 +1336,23 @@ const Tt = (t) => `- ${t}`, Nn = (t) => f.isFunction(t) || t === null || t === !
|
|
|
1336
1336
|
t = f.isArray(t) ? t : [t];
|
|
1337
1337
|
const { length: r } = t;
|
|
1338
1338
|
let s, i;
|
|
1339
|
-
const
|
|
1340
|
-
for (let
|
|
1341
|
-
s = t[
|
|
1339
|
+
const o = {};
|
|
1340
|
+
for (let a = 0; a < r; a++) {
|
|
1341
|
+
s = t[a];
|
|
1342
1342
|
let c;
|
|
1343
1343
|
if (i = s, !Nn(s) && (i = tt[(c = String(s)).toLowerCase()], i === void 0))
|
|
1344
1344
|
throw new N(`Unknown adapter '${c}'`);
|
|
1345
1345
|
if (i && (f.isFunction(i) || (i = i.get(e))))
|
|
1346
1346
|
break;
|
|
1347
|
-
|
|
1347
|
+
o[c || "#" + a] = i;
|
|
1348
1348
|
}
|
|
1349
1349
|
if (!i) {
|
|
1350
|
-
const
|
|
1351
|
-
([
|
|
1350
|
+
const a = Object.entries(o).map(
|
|
1351
|
+
([h, p]) => `adapter ${h} ` + (p === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1352
1352
|
);
|
|
1353
|
-
let c = r ?
|
|
1354
|
-
` +
|
|
1355
|
-
`) : " " + Tt(
|
|
1353
|
+
let c = r ? a.length > 1 ? `since :
|
|
1354
|
+
` + a.map(Tt).join(`
|
|
1355
|
+
`) : " " + Tt(a[0]) : "as no adapter specified";
|
|
1356
1356
|
throw new N(
|
|
1357
1357
|
"There is no suitable adapter to dispatch the request " + c,
|
|
1358
1358
|
"ERR_NOT_SUPPORT"
|
|
@@ -1392,21 +1392,21 @@ const nr = "1.12.2", He = {};
|
|
|
1392
1392
|
});
|
|
1393
1393
|
const Pt = {};
|
|
1394
1394
|
He.transitional = function(e, r, s) {
|
|
1395
|
-
function i(
|
|
1396
|
-
return "[Axios v" + nr + "] Transitional option '" +
|
|
1395
|
+
function i(o, a) {
|
|
1396
|
+
return "[Axios v" + nr + "] Transitional option '" + o + "'" + a + (s ? ". " + s : "");
|
|
1397
1397
|
}
|
|
1398
|
-
return (
|
|
1398
|
+
return (o, a, c) => {
|
|
1399
1399
|
if (e === !1)
|
|
1400
1400
|
throw new N(
|
|
1401
|
-
i(
|
|
1401
|
+
i(a, " has been removed" + (r ? " in " + r : "")),
|
|
1402
1402
|
N.ERR_DEPRECATED
|
|
1403
1403
|
);
|
|
1404
|
-
return r && !Pt[
|
|
1404
|
+
return r && !Pt[a] && (Pt[a] = !0, console.warn(
|
|
1405
1405
|
i(
|
|
1406
|
-
|
|
1406
|
+
a,
|
|
1407
1407
|
" has been deprecated since v" + r + " and will be removed in the near future"
|
|
1408
1408
|
)
|
|
1409
|
-
)), e ? e(
|
|
1409
|
+
)), e ? e(o, a, c) : !0;
|
|
1410
1410
|
};
|
|
1411
1411
|
};
|
|
1412
1412
|
He.spelling = function(e) {
|
|
@@ -1418,15 +1418,15 @@ function Ln(t, e, r) {
|
|
|
1418
1418
|
const s = Object.keys(t);
|
|
1419
1419
|
let i = s.length;
|
|
1420
1420
|
for (; i-- > 0; ) {
|
|
1421
|
-
const
|
|
1422
|
-
if (
|
|
1423
|
-
const c = t[
|
|
1424
|
-
if (
|
|
1425
|
-
throw new N("option " +
|
|
1421
|
+
const o = s[i], a = e[o];
|
|
1422
|
+
if (a) {
|
|
1423
|
+
const c = t[o], h = c === void 0 || a(c, o, t);
|
|
1424
|
+
if (h !== !0)
|
|
1425
|
+
throw new N("option " + o + " must be " + h, N.ERR_BAD_OPTION_VALUE);
|
|
1426
1426
|
continue;
|
|
1427
1427
|
}
|
|
1428
1428
|
if (r !== !0)
|
|
1429
|
-
throw new N("Unknown option " +
|
|
1429
|
+
throw new N("Unknown option " + o, N.ERR_BAD_OPTION);
|
|
1430
1430
|
}
|
|
1431
1431
|
}
|
|
1432
1432
|
const $e = {
|
|
@@ -1436,8 +1436,8 @@ const $e = {
|
|
|
1436
1436
|
let he = class {
|
|
1437
1437
|
constructor(e) {
|
|
1438
1438
|
this.defaults = e || {}, this.interceptors = {
|
|
1439
|
-
request: new
|
|
1440
|
-
response: new
|
|
1439
|
+
request: new gt(),
|
|
1440
|
+
response: new gt()
|
|
1441
1441
|
};
|
|
1442
1442
|
}
|
|
1443
1443
|
/**
|
|
@@ -1455,10 +1455,10 @@ let he = class {
|
|
|
1455
1455
|
if (s instanceof Error) {
|
|
1456
1456
|
let i = {};
|
|
1457
1457
|
Error.captureStackTrace ? Error.captureStackTrace(i) : i = new Error();
|
|
1458
|
-
const
|
|
1458
|
+
const o = i.stack ? i.stack.replace(/^.+\n/, "") : "";
|
|
1459
1459
|
try {
|
|
1460
|
-
s.stack ?
|
|
1461
|
-
` +
|
|
1460
|
+
s.stack ? o && !String(s.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (s.stack += `
|
|
1461
|
+
` + o) : s.stack = o;
|
|
1462
1462
|
} catch {
|
|
1463
1463
|
}
|
|
1464
1464
|
}
|
|
@@ -1466,8 +1466,8 @@ let he = class {
|
|
|
1466
1466
|
}
|
|
1467
1467
|
}
|
|
1468
1468
|
_request(e, r) {
|
|
1469
|
-
typeof e == "string" ? (r = r || {}, r.url = e) : r = e || {}, r =
|
|
1470
|
-
const { transitional: s, paramsSerializer: i, headers:
|
|
1469
|
+
typeof e == "string" ? (r = r || {}, r.url = e) : r = e || {}, r = me(this.defaults, r);
|
|
1470
|
+
const { transitional: s, paramsSerializer: i, headers: o } = r;
|
|
1471
1471
|
s !== void 0 && $e.assertOptions(s, {
|
|
1472
1472
|
silentJSONParsing: ce.transitional(ce.boolean),
|
|
1473
1473
|
forcedJSONParsing: ce.transitional(ce.boolean),
|
|
@@ -1481,36 +1481,36 @@ let he = class {
|
|
|
1481
1481
|
baseUrl: ce.spelling("baseURL"),
|
|
1482
1482
|
withXsrfToken: ce.spelling("withXSRFToken")
|
|
1483
1483
|
}, !0), r.method = (r.method || this.defaults.method || "get").toLowerCase();
|
|
1484
|
-
let
|
|
1485
|
-
|
|
1486
|
-
|
|
1484
|
+
let a = o && f.merge(
|
|
1485
|
+
o.common,
|
|
1486
|
+
o[r.method]
|
|
1487
1487
|
);
|
|
1488
|
-
|
|
1488
|
+
o && f.forEach(
|
|
1489
1489
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1490
1490
|
(u) => {
|
|
1491
|
-
delete
|
|
1491
|
+
delete o[u];
|
|
1492
1492
|
}
|
|
1493
|
-
), r.headers = ne.concat(
|
|
1493
|
+
), r.headers = ne.concat(a, o);
|
|
1494
1494
|
const c = [];
|
|
1495
|
-
let
|
|
1495
|
+
let h = !0;
|
|
1496
1496
|
this.interceptors.request.forEach(function(w) {
|
|
1497
|
-
typeof w.runWhen == "function" && w.runWhen(r) === !1 || (
|
|
1497
|
+
typeof w.runWhen == "function" && w.runWhen(r) === !1 || (h = h && w.synchronous, c.unshift(w.fulfilled, w.rejected));
|
|
1498
1498
|
});
|
|
1499
1499
|
const p = [];
|
|
1500
1500
|
this.interceptors.response.forEach(function(w) {
|
|
1501
1501
|
p.push(w.fulfilled, w.rejected);
|
|
1502
1502
|
});
|
|
1503
|
-
let d,
|
|
1504
|
-
if (!
|
|
1503
|
+
let d, m = 0, P;
|
|
1504
|
+
if (!h) {
|
|
1505
1505
|
const u = [Rt.bind(this), void 0];
|
|
1506
|
-
for (u.unshift(...c), u.push(...p), P = u.length, d = Promise.resolve(r);
|
|
1507
|
-
d = d.then(u[
|
|
1506
|
+
for (u.unshift(...c), u.push(...p), P = u.length, d = Promise.resolve(r); m < P; )
|
|
1507
|
+
d = d.then(u[m++], u[m++]);
|
|
1508
1508
|
return d;
|
|
1509
1509
|
}
|
|
1510
1510
|
P = c.length;
|
|
1511
1511
|
let O = r;
|
|
1512
|
-
for (;
|
|
1513
|
-
const u = c[
|
|
1512
|
+
for (; m < P; ) {
|
|
1513
|
+
const u = c[m++], w = c[m++];
|
|
1514
1514
|
try {
|
|
1515
1515
|
O = u(O);
|
|
1516
1516
|
} catch (x) {
|
|
@@ -1523,19 +1523,19 @@ let he = class {
|
|
|
1523
1523
|
} catch (u) {
|
|
1524
1524
|
return Promise.reject(u);
|
|
1525
1525
|
}
|
|
1526
|
-
for (
|
|
1527
|
-
d = d.then(p[
|
|
1526
|
+
for (m = 0, P = p.length; m < P; )
|
|
1527
|
+
d = d.then(p[m++], p[m++]);
|
|
1528
1528
|
return d;
|
|
1529
1529
|
}
|
|
1530
1530
|
getUri(e) {
|
|
1531
|
-
e =
|
|
1531
|
+
e = me(this.defaults, e);
|
|
1532
1532
|
const r = Qt(e.baseURL, e.url, e.allowAbsoluteUrls);
|
|
1533
1533
|
return Kt(r, e.params, e.paramsSerializer);
|
|
1534
1534
|
}
|
|
1535
1535
|
};
|
|
1536
1536
|
f.forEach(["delete", "get", "head", "options"], function(e) {
|
|
1537
1537
|
he.prototype[e] = function(r, s) {
|
|
1538
|
-
return this.request(
|
|
1538
|
+
return this.request(me(s || {}, {
|
|
1539
1539
|
method: e,
|
|
1540
1540
|
url: r,
|
|
1541
1541
|
data: (s || {}).data
|
|
@@ -1544,14 +1544,14 @@ f.forEach(["delete", "get", "head", "options"], function(e) {
|
|
|
1544
1544
|
});
|
|
1545
1545
|
f.forEach(["post", "put", "patch"], function(e) {
|
|
1546
1546
|
function r(s) {
|
|
1547
|
-
return function(
|
|
1548
|
-
return this.request(
|
|
1547
|
+
return function(o, a, c) {
|
|
1548
|
+
return this.request(me(c || {}, {
|
|
1549
1549
|
method: e,
|
|
1550
1550
|
headers: s ? {
|
|
1551
1551
|
"Content-Type": "multipart/form-data"
|
|
1552
1552
|
} : {},
|
|
1553
|
-
url:
|
|
1554
|
-
data:
|
|
1553
|
+
url: o,
|
|
1554
|
+
data: a
|
|
1555
1555
|
}));
|
|
1556
1556
|
};
|
|
1557
1557
|
}
|
|
@@ -1562,26 +1562,26 @@ let Fn = class sr {
|
|
|
1562
1562
|
if (typeof e != "function")
|
|
1563
1563
|
throw new TypeError("executor must be a function.");
|
|
1564
1564
|
let r;
|
|
1565
|
-
this.promise = new Promise(function(
|
|
1566
|
-
r =
|
|
1565
|
+
this.promise = new Promise(function(o) {
|
|
1566
|
+
r = o;
|
|
1567
1567
|
});
|
|
1568
1568
|
const s = this;
|
|
1569
1569
|
this.promise.then((i) => {
|
|
1570
1570
|
if (!s._listeners) return;
|
|
1571
|
-
let
|
|
1572
|
-
for (;
|
|
1573
|
-
s._listeners[
|
|
1571
|
+
let o = s._listeners.length;
|
|
1572
|
+
for (; o-- > 0; )
|
|
1573
|
+
s._listeners[o](i);
|
|
1574
1574
|
s._listeners = null;
|
|
1575
1575
|
}), this.promise.then = (i) => {
|
|
1576
|
-
let
|
|
1577
|
-
const
|
|
1578
|
-
s.subscribe(c),
|
|
1576
|
+
let o;
|
|
1577
|
+
const a = new Promise((c) => {
|
|
1578
|
+
s.subscribe(c), o = c;
|
|
1579
1579
|
}).then(i);
|
|
1580
|
-
return
|
|
1581
|
-
s.unsubscribe(
|
|
1582
|
-
},
|
|
1583
|
-
}, e(function(
|
|
1584
|
-
s.reason || (s.reason = new je(
|
|
1580
|
+
return a.cancel = function() {
|
|
1581
|
+
s.unsubscribe(o);
|
|
1582
|
+
}, a;
|
|
1583
|
+
}, e(function(o, a, c) {
|
|
1584
|
+
s.reason || (s.reason = new je(o, a, c), r(s.reason));
|
|
1585
1585
|
});
|
|
1586
1586
|
}
|
|
1587
1587
|
/**
|
|
@@ -1709,7 +1709,7 @@ Object.entries(rt).forEach(([t, e]) => {
|
|
|
1709
1709
|
function ir(t) {
|
|
1710
1710
|
const e = new he(t), r = Dt(he.prototype.request, e);
|
|
1711
1711
|
return f.extend(r, he.prototype, e, { allOwnKeys: !0 }), f.extend(r, e, null, { allOwnKeys: !0 }), r.create = function(i) {
|
|
1712
|
-
return ir(
|
|
1712
|
+
return ir(me(t, i));
|
|
1713
1713
|
}, r;
|
|
1714
1714
|
}
|
|
1715
1715
|
const J = ir(Oe);
|
|
@@ -1726,7 +1726,7 @@ J.all = function(e) {
|
|
|
1726
1726
|
};
|
|
1727
1727
|
J.spread = qn;
|
|
1728
1728
|
J.isAxiosError = Mn;
|
|
1729
|
-
J.mergeConfig =
|
|
1729
|
+
J.mergeConfig = me;
|
|
1730
1730
|
J.AxiosHeaders = ne;
|
|
1731
1731
|
J.formToJSON = (t) => Gt(f.isHTMLForm(t) ? new FormData(t) : t);
|
|
1732
1732
|
J.getAdapter = rr.getAdapter;
|
|
@@ -1744,8 +1744,8 @@ const {
|
|
|
1744
1744
|
isAxiosError: ni,
|
|
1745
1745
|
spread: si,
|
|
1746
1746
|
toFormData: ii,
|
|
1747
|
-
AxiosHeaders:
|
|
1748
|
-
HttpStatusCode:
|
|
1747
|
+
AxiosHeaders: ai,
|
|
1748
|
+
HttpStatusCode: oi,
|
|
1749
1749
|
formToJSON: li,
|
|
1750
1750
|
getAdapter: ci,
|
|
1751
1751
|
mergeConfig: di
|
|
@@ -1783,22 +1783,22 @@ class ui {
|
|
|
1783
1783
|
*/
|
|
1784
1784
|
async request(e, r, s, i = {}) {
|
|
1785
1785
|
try {
|
|
1786
|
-
const
|
|
1786
|
+
const o = {
|
|
1787
1787
|
...this.appId ? { appId: this.appId } : {},
|
|
1788
1788
|
...s || {}
|
|
1789
1789
|
};
|
|
1790
1790
|
return (await this.client.request({
|
|
1791
1791
|
url: r,
|
|
1792
1792
|
method: e,
|
|
1793
|
-
data:
|
|
1793
|
+
data: o,
|
|
1794
1794
|
headers: i
|
|
1795
1795
|
})).data;
|
|
1796
|
-
} catch (
|
|
1797
|
-
throw J.isAxiosError(
|
|
1798
|
-
message:
|
|
1799
|
-
status:
|
|
1796
|
+
} catch (o) {
|
|
1797
|
+
throw J.isAxiosError(o) ? {
|
|
1798
|
+
message: o.response?.data?.message || o.message || "Request failed",
|
|
1799
|
+
status: o.response?.status ?? 0
|
|
1800
1800
|
} : {
|
|
1801
|
-
message:
|
|
1801
|
+
message: o.message || "Unexpected error occurred"
|
|
1802
1802
|
};
|
|
1803
1803
|
}
|
|
1804
1804
|
}
|
|
@@ -2017,7 +2017,7 @@ class ui {
|
|
|
2017
2017
|
throw new Error("searchUserDataByKeys: 'userId' is required");
|
|
2018
2018
|
const i = new URLSearchParams(
|
|
2019
2019
|
Object.entries(s).reduce(
|
|
2020
|
-
(
|
|
2020
|
+
(o, [a, c]) => (c != null && (o[a] = String(c)), o),
|
|
2021
2021
|
{}
|
|
2022
2022
|
)
|
|
2023
2023
|
).toString();
|
|
@@ -2042,7 +2042,7 @@ class ui {
|
|
|
2042
2042
|
);
|
|
2043
2043
|
const s = new URLSearchParams(
|
|
2044
2044
|
Object.entries(e).reduce(
|
|
2045
|
-
(i, [
|
|
2045
|
+
(i, [o, a]) => (a != null && (i[o] = String(a)), i),
|
|
2046
2046
|
{}
|
|
2047
2047
|
)
|
|
2048
2048
|
).toString();
|
|
@@ -2229,19 +2229,19 @@ function Wn() {
|
|
|
2229
2229
|
if (It) return ke;
|
|
2230
2230
|
It = 1;
|
|
2231
2231
|
var t = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
|
|
2232
|
-
function r(s, i,
|
|
2233
|
-
var
|
|
2234
|
-
if (
|
|
2235
|
-
|
|
2232
|
+
function r(s, i, o) {
|
|
2233
|
+
var a = null;
|
|
2234
|
+
if (o !== void 0 && (a = "" + o), i.key !== void 0 && (a = "" + i.key), "key" in i) {
|
|
2235
|
+
o = {};
|
|
2236
2236
|
for (var c in i)
|
|
2237
|
-
c !== "key" && (
|
|
2238
|
-
} else
|
|
2239
|
-
return i =
|
|
2237
|
+
c !== "key" && (o[c] = i[c]);
|
|
2238
|
+
} else o = i;
|
|
2239
|
+
return i = o.ref, {
|
|
2240
2240
|
$$typeof: t,
|
|
2241
2241
|
type: s,
|
|
2242
|
-
key:
|
|
2242
|
+
key: a,
|
|
2243
2243
|
ref: i !== void 0 ? i : null,
|
|
2244
|
-
props:
|
|
2244
|
+
props: o
|
|
2245
2245
|
};
|
|
2246
2246
|
}
|
|
2247
2247
|
return ke.Fragment = e, ke.jsx = r, ke.jsxs = r, ke;
|
|
@@ -2271,9 +2271,9 @@ function Bn() {
|
|
|
2271
2271
|
return "Profiler";
|
|
2272
2272
|
case C:
|
|
2273
2273
|
return "StrictMode";
|
|
2274
|
-
case
|
|
2274
|
+
case g:
|
|
2275
2275
|
return "Suspense";
|
|
2276
|
-
case
|
|
2276
|
+
case v:
|
|
2277
2277
|
return "SuspenseList";
|
|
2278
2278
|
case M:
|
|
2279
2279
|
return "Activity";
|
|
@@ -2314,8 +2314,8 @@ function Bn() {
|
|
|
2314
2314
|
}
|
|
2315
2315
|
if (b) {
|
|
2316
2316
|
b = console;
|
|
2317
|
-
var
|
|
2318
|
-
return
|
|
2317
|
+
var S = b.error, j = typeof Symbol == "function" && Symbol.toStringTag && l[Symbol.toStringTag] || l.constructor.name || "Object";
|
|
2318
|
+
return S.call(
|
|
2319
2319
|
b,
|
|
2320
2320
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
2321
2321
|
j
|
|
@@ -2337,10 +2337,10 @@ function Bn() {
|
|
|
2337
2337
|
var l = k.A;
|
|
2338
2338
|
return l === null ? null : l.getOwner();
|
|
2339
2339
|
}
|
|
2340
|
-
function
|
|
2340
|
+
function o() {
|
|
2341
2341
|
return Error("react-stack-top-frame");
|
|
2342
2342
|
}
|
|
2343
|
-
function
|
|
2343
|
+
function a(l) {
|
|
2344
2344
|
if (V.call(l, "key")) {
|
|
2345
2345
|
var b = Object.getOwnPropertyDescriptor(l, "key").get;
|
|
2346
2346
|
if (b && b.isReactWarning) return !1;
|
|
@@ -2348,34 +2348,34 @@ function Bn() {
|
|
|
2348
2348
|
return l.key !== void 0;
|
|
2349
2349
|
}
|
|
2350
2350
|
function c(l, b) {
|
|
2351
|
-
function
|
|
2351
|
+
function S() {
|
|
2352
2352
|
W || (W = !0, console.error(
|
|
2353
2353
|
"%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)",
|
|
2354
2354
|
b
|
|
2355
2355
|
));
|
|
2356
2356
|
}
|
|
2357
|
-
|
|
2358
|
-
get:
|
|
2357
|
+
S.isReactWarning = !0, Object.defineProperty(l, "key", {
|
|
2358
|
+
get: S,
|
|
2359
2359
|
configurable: !0
|
|
2360
2360
|
});
|
|
2361
2361
|
}
|
|
2362
|
-
function
|
|
2362
|
+
function h() {
|
|
2363
2363
|
var l = t(this.type);
|
|
2364
2364
|
return Z[l] || (Z[l] = !0, console.error(
|
|
2365
2365
|
"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."
|
|
2366
2366
|
)), l = this.props.ref, l !== void 0 ? l : null;
|
|
2367
2367
|
}
|
|
2368
|
-
function p(l, b,
|
|
2369
|
-
var Y =
|
|
2368
|
+
function p(l, b, S, j, G, pe) {
|
|
2369
|
+
var Y = S.ref;
|
|
2370
2370
|
return l = {
|
|
2371
2371
|
$$typeof: u,
|
|
2372
2372
|
type: l,
|
|
2373
2373
|
key: b,
|
|
2374
|
-
props:
|
|
2374
|
+
props: S,
|
|
2375
2375
|
_owner: j
|
|
2376
2376
|
}, (Y !== void 0 ? Y : null) !== null ? Object.defineProperty(l, "ref", {
|
|
2377
2377
|
enumerable: !1,
|
|
2378
|
-
get:
|
|
2378
|
+
get: h
|
|
2379
2379
|
}) : Object.defineProperty(l, "ref", { enumerable: !1, value: null }), l._store = {}, Object.defineProperty(l._store, "validated", {
|
|
2380
2380
|
configurable: !1,
|
|
2381
2381
|
enumerable: !1,
|
|
@@ -2398,25 +2398,25 @@ function Bn() {
|
|
|
2398
2398
|
value: pe
|
|
2399
2399
|
}), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
|
|
2400
2400
|
}
|
|
2401
|
-
function d(l, b,
|
|
2401
|
+
function d(l, b, S, j, G, pe) {
|
|
2402
2402
|
var Y = b.children;
|
|
2403
2403
|
if (Y !== void 0)
|
|
2404
2404
|
if (j)
|
|
2405
2405
|
if (z(Y)) {
|
|
2406
2406
|
for (j = 0; j < Y.length; j++)
|
|
2407
|
-
|
|
2407
|
+
m(Y[j]);
|
|
2408
2408
|
Object.freeze && Object.freeze(Y);
|
|
2409
2409
|
} else
|
|
2410
2410
|
console.error(
|
|
2411
2411
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
2412
2412
|
);
|
|
2413
|
-
else
|
|
2413
|
+
else m(Y);
|
|
2414
2414
|
if (V.call(b, "key")) {
|
|
2415
2415
|
Y = t(l);
|
|
2416
|
-
var
|
|
2416
|
+
var oe = Object.keys(b).filter(function(Ve) {
|
|
2417
2417
|
return Ve !== "key";
|
|
2418
2418
|
});
|
|
2419
|
-
j = 0 <
|
|
2419
|
+
j = 0 < oe.length ? "{key: someKey, " + oe.join(": ..., ") + ": ...}" : "{key: someKey}", F[Y + j] || (oe = 0 < oe.length ? "{" + oe.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
2420
2420
|
`A props object containing a "key" prop is being spread into JSX:
|
|
2421
2421
|
let props = %s;
|
|
2422
2422
|
<%s {...props} />
|
|
@@ -2425,34 +2425,34 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2425
2425
|
<%s key={someKey} {...props} />`,
|
|
2426
2426
|
j,
|
|
2427
2427
|
Y,
|
|
2428
|
-
|
|
2428
|
+
oe,
|
|
2429
2429
|
Y
|
|
2430
2430
|
), F[Y + j] = !0);
|
|
2431
2431
|
}
|
|
2432
|
-
if (Y = null,
|
|
2433
|
-
|
|
2434
|
-
for (var
|
|
2435
|
-
|
|
2436
|
-
} else
|
|
2432
|
+
if (Y = null, S !== void 0 && (r(S), Y = "" + S), a(b) && (r(b.key), Y = "" + b.key), "key" in b) {
|
|
2433
|
+
S = {};
|
|
2434
|
+
for (var ve in b)
|
|
2435
|
+
ve !== "key" && (S[ve] = b[ve]);
|
|
2436
|
+
} else S = b;
|
|
2437
2437
|
return Y && c(
|
|
2438
|
-
|
|
2438
|
+
S,
|
|
2439
2439
|
typeof l == "function" ? l.displayName || l.name || "Unknown" : l
|
|
2440
2440
|
), p(
|
|
2441
2441
|
l,
|
|
2442
2442
|
Y,
|
|
2443
|
-
|
|
2443
|
+
S,
|
|
2444
2444
|
i(),
|
|
2445
2445
|
G,
|
|
2446
2446
|
pe
|
|
2447
2447
|
);
|
|
2448
2448
|
}
|
|
2449
|
-
function
|
|
2449
|
+
function m(l) {
|
|
2450
2450
|
P(l) ? l._store && (l._store.validated = 1) : typeof l == "object" && l !== null && l.$$typeof === _ && (l._payload.status === "fulfilled" ? P(l._payload.value) && l._payload.value._store && (l._payload.value._store.validated = 1) : l._store && (l._store.validated = 1));
|
|
2451
2451
|
}
|
|
2452
2452
|
function P(l) {
|
|
2453
2453
|
return typeof l == "object" && l !== null && l.$$typeof === u;
|
|
2454
2454
|
}
|
|
2455
|
-
var O = Te, u = Symbol.for("react.transitional.element"), w = Symbol.for("react.portal"), x = Symbol.for("react.fragment"), C = Symbol.for("react.strict_mode"), T = Symbol.for("react.profiler"), A = Symbol.for("react.consumer"), y = Symbol.for("react.context"), U = Symbol.for("react.forward_ref"),
|
|
2455
|
+
var O = Te, u = Symbol.for("react.transitional.element"), w = Symbol.for("react.portal"), x = Symbol.for("react.fragment"), C = Symbol.for("react.strict_mode"), T = Symbol.for("react.profiler"), A = Symbol.for("react.consumer"), y = Symbol.for("react.context"), U = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), L = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), M = Symbol.for("react.activity"), X = Symbol.for("react.client.reference"), k = O.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, V = Object.prototype.hasOwnProperty, z = Array.isArray, I = console.createTask ? console.createTask : function() {
|
|
2456
2456
|
return null;
|
|
2457
2457
|
};
|
|
2458
2458
|
O = {
|
|
@@ -2462,24 +2462,24 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2462
2462
|
};
|
|
2463
2463
|
var W, Z = {}, B = O.react_stack_bottom_frame.bind(
|
|
2464
2464
|
O,
|
|
2465
|
-
|
|
2466
|
-
)(), K = I(s(
|
|
2467
|
-
Ce.Fragment = x, Ce.jsx = function(l, b,
|
|
2465
|
+
o
|
|
2466
|
+
)(), K = I(s(o)), F = {};
|
|
2467
|
+
Ce.Fragment = x, Ce.jsx = function(l, b, S) {
|
|
2468
2468
|
var j = 1e4 > k.recentlyCreatedOwnerStacks++;
|
|
2469
2469
|
return d(
|
|
2470
2470
|
l,
|
|
2471
2471
|
b,
|
|
2472
|
-
|
|
2472
|
+
S,
|
|
2473
2473
|
!1,
|
|
2474
2474
|
j ? Error("react-stack-top-frame") : B,
|
|
2475
2475
|
j ? I(s(l)) : K
|
|
2476
2476
|
);
|
|
2477
|
-
}, Ce.jsxs = function(l, b,
|
|
2477
|
+
}, Ce.jsxs = function(l, b, S) {
|
|
2478
2478
|
var j = 1e4 > k.recentlyCreatedOwnerStacks++;
|
|
2479
2479
|
return d(
|
|
2480
2480
|
l,
|
|
2481
2481
|
b,
|
|
2482
|
-
|
|
2482
|
+
S,
|
|
2483
2483
|
!0,
|
|
2484
2484
|
j ? Error("react-stack-top-frame") : B,
|
|
2485
2485
|
j ? I(s(l)) : K
|
|
@@ -2504,7 +2504,7 @@ const Vn = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Yn = (
|
|
|
2504
2504
|
), At = (t) => {
|
|
2505
2505
|
const e = Yn(t);
|
|
2506
2506
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
2507
|
-
},
|
|
2507
|
+
}, ar = (...t) => t.filter((e, r, s) => !!e && e.trim() !== "" && s.indexOf(e) === r).join(" ").trim(), Kn = (t) => {
|
|
2508
2508
|
for (const e in t)
|
|
2509
2509
|
if (e.startsWith("aria-") || e === "role" || e === "title")
|
|
2510
2510
|
return !0;
|
|
@@ -2539,25 +2539,25 @@ const Gn = _t(
|
|
|
2539
2539
|
strokeWidth: r = 2,
|
|
2540
2540
|
absoluteStrokeWidth: s,
|
|
2541
2541
|
className: i = "",
|
|
2542
|
-
children:
|
|
2543
|
-
iconNode:
|
|
2542
|
+
children: o,
|
|
2543
|
+
iconNode: a,
|
|
2544
2544
|
...c
|
|
2545
|
-
},
|
|
2545
|
+
}, h) => Xe(
|
|
2546
2546
|
"svg",
|
|
2547
2547
|
{
|
|
2548
|
-
ref:
|
|
2548
|
+
ref: h,
|
|
2549
2549
|
...Jn,
|
|
2550
2550
|
width: e,
|
|
2551
2551
|
height: e,
|
|
2552
2552
|
stroke: t,
|
|
2553
2553
|
strokeWidth: s ? Number(r) * 24 / Number(e) : r,
|
|
2554
|
-
className:
|
|
2555
|
-
...!
|
|
2554
|
+
className: ar("lucide", i),
|
|
2555
|
+
...!o && !Kn(c) && { "aria-hidden": "true" },
|
|
2556
2556
|
...c
|
|
2557
2557
|
},
|
|
2558
2558
|
[
|
|
2559
|
-
...
|
|
2560
|
-
...Array.isArray(
|
|
2559
|
+
...a.map(([p, d]) => Xe(p, d)),
|
|
2560
|
+
...Array.isArray(o) ? o : [o]
|
|
2561
2561
|
]
|
|
2562
2562
|
)
|
|
2563
2563
|
);
|
|
@@ -2569,10 +2569,10 @@ const Gn = _t(
|
|
|
2569
2569
|
*/
|
|
2570
2570
|
const q = (t, e) => {
|
|
2571
2571
|
const r = _t(
|
|
2572
|
-
({ className: s, ...i },
|
|
2573
|
-
ref:
|
|
2572
|
+
({ className: s, ...i }, o) => Xe(Gn, {
|
|
2573
|
+
ref: o,
|
|
2574
2574
|
iconNode: e,
|
|
2575
|
-
className:
|
|
2575
|
+
className: ar(
|
|
2576
2576
|
`lucide-${Vn(At(t))}`,
|
|
2577
2577
|
`lucide-${t}`,
|
|
2578
2578
|
s
|
|
@@ -2631,7 +2631,7 @@ const rs = [
|
|
|
2631
2631
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
2632
2632
|
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
2633
2633
|
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
2634
|
-
],
|
|
2634
|
+
], se = q("circle-alert", rs);
|
|
2635
2635
|
/**
|
|
2636
2636
|
* @license lucide-react v0.544.0 - ISC
|
|
2637
2637
|
*
|
|
@@ -2662,18 +2662,18 @@ const is = [
|
|
|
2662
2662
|
["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3", key: "msslwz" }],
|
|
2663
2663
|
["path", { d: "M3 5V19A9 3 0 0 0 21 19V5", key: "1wlel7" }],
|
|
2664
2664
|
["path", { d: "M3 12A9 3 0 0 0 21 12", key: "mv7ke4" }]
|
|
2665
|
-
],
|
|
2665
|
+
], as = q("database", is);
|
|
2666
2666
|
/**
|
|
2667
2667
|
* @license lucide-react v0.544.0 - ISC
|
|
2668
2668
|
*
|
|
2669
2669
|
* This source code is licensed under the ISC license.
|
|
2670
2670
|
* See the LICENSE file in the root directory of this source tree.
|
|
2671
2671
|
*/
|
|
2672
|
-
const
|
|
2672
|
+
const os = [
|
|
2673
2673
|
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
|
|
2674
2674
|
["circle", { cx: "12", cy: "5", r: "1", key: "gxeob9" }],
|
|
2675
2675
|
["circle", { cx: "12", cy: "19", r: "1", key: "lyex9k" }]
|
|
2676
|
-
], ls = q("ellipsis-vertical",
|
|
2676
|
+
], ls = q("ellipsis-vertical", os);
|
|
2677
2677
|
/**
|
|
2678
2678
|
* @license lucide-react v0.544.0 - ISC
|
|
2679
2679
|
*
|
|
@@ -2697,7 +2697,7 @@ const cs = [
|
|
|
2697
2697
|
}
|
|
2698
2698
|
],
|
|
2699
2699
|
["path", { d: "m2 2 20 20", key: "1ooewy" }]
|
|
2700
|
-
],
|
|
2700
|
+
], ot = q("eye-off", cs);
|
|
2701
2701
|
/**
|
|
2702
2702
|
* @license lucide-react v0.544.0 - ISC
|
|
2703
2703
|
*
|
|
@@ -2740,7 +2740,7 @@ const fs = [
|
|
|
2740
2740
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
|
|
2741
2741
|
["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
|
|
2742
2742
|
["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
|
|
2743
|
-
],
|
|
2743
|
+
], or = q("image", fs);
|
|
2744
2744
|
/**
|
|
2745
2745
|
* @license lucide-react v0.544.0 - ISC
|
|
2746
2746
|
*
|
|
@@ -2774,18 +2774,18 @@ const hs = [
|
|
|
2774
2774
|
* This source code is licensed under the ISC license.
|
|
2775
2775
|
* See the LICENSE file in the root directory of this source tree.
|
|
2776
2776
|
*/
|
|
2777
|
-
const
|
|
2777
|
+
const ms = [
|
|
2778
2778
|
["path", { d: "M9 17H7A5 5 0 0 1 7 7h2", key: "8i5ue5" }],
|
|
2779
2779
|
["path", { d: "M15 7h2a5 5 0 1 1 0 10h-2", key: "1b9ql8" }],
|
|
2780
2780
|
["line", { x1: "8", x2: "16", y1: "12", y2: "12", key: "1jonct" }]
|
|
2781
|
-
],
|
|
2781
|
+
], gs = q("link-2", ms);
|
|
2782
2782
|
/**
|
|
2783
2783
|
* @license lucide-react v0.544.0 - ISC
|
|
2784
2784
|
*
|
|
2785
2785
|
* This source code is licensed under the ISC license.
|
|
2786
2786
|
* See the LICENSE file in the root directory of this source tree.
|
|
2787
2787
|
*/
|
|
2788
|
-
const ys = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]],
|
|
2788
|
+
const ys = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], ie = q("loader-circle", ys);
|
|
2789
2789
|
/**
|
|
2790
2790
|
* @license lucide-react v0.544.0 - ISC
|
|
2791
2791
|
*
|
|
@@ -2811,28 +2811,28 @@ const bs = [
|
|
|
2811
2811
|
const js = [
|
|
2812
2812
|
["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
|
|
2813
2813
|
["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }]
|
|
2814
|
-
],
|
|
2814
|
+
], ge = q("lock", js);
|
|
2815
2815
|
/**
|
|
2816
2816
|
* @license lucide-react v0.544.0 - ISC
|
|
2817
2817
|
*
|
|
2818
2818
|
* This source code is licensed under the ISC license.
|
|
2819
2819
|
* See the LICENSE file in the root directory of this source tree.
|
|
2820
2820
|
*/
|
|
2821
|
-
const
|
|
2821
|
+
const vs = [
|
|
2822
2822
|
["path", { d: "m16 17 5-5-5-5", key: "1bji2h" }],
|
|
2823
2823
|
["path", { d: "M21 12H9", key: "dn1m92" }],
|
|
2824
2824
|
["path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4", key: "1uf3rs" }]
|
|
2825
|
-
], dt = q("log-out",
|
|
2825
|
+
], dt = q("log-out", vs);
|
|
2826
2826
|
/**
|
|
2827
2827
|
* @license lucide-react v0.544.0 - ISC
|
|
2828
2828
|
*
|
|
2829
2829
|
* This source code is licensed under the ISC license.
|
|
2830
2830
|
* See the LICENSE file in the root directory of this source tree.
|
|
2831
2831
|
*/
|
|
2832
|
-
const
|
|
2832
|
+
const Ss = [
|
|
2833
2833
|
["path", { d: "m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7", key: "132q7q" }],
|
|
2834
2834
|
["rect", { x: "2", y: "4", width: "20", height: "16", rx: "2", key: "izxlao" }]
|
|
2835
|
-
], fe = q("mail",
|
|
2835
|
+
], fe = q("mail", Ss);
|
|
2836
2836
|
/**
|
|
2837
2837
|
* @license lucide-react v0.544.0 - ISC
|
|
2838
2838
|
*
|
|
@@ -3019,16 +3019,16 @@ const qs = [
|
|
|
3019
3019
|
title: r = "Create Your Account",
|
|
3020
3020
|
subtitle: s = "Join our platform today",
|
|
3021
3021
|
footerText: i = "Secure authentication powered by Neuctra Authix",
|
|
3022
|
-
primaryColor:
|
|
3023
|
-
gradient:
|
|
3022
|
+
primaryColor: o = "#00C214",
|
|
3023
|
+
gradient: a = "linear-gradient(135deg, #22c55e, #00C214)",
|
|
3024
3024
|
darkMode: c = !0,
|
|
3025
3025
|
// Only avatar is optional
|
|
3026
|
-
showAvatar:
|
|
3026
|
+
showAvatar: h = !1,
|
|
3027
3027
|
roles: p = [],
|
|
3028
3028
|
// 🔥 FIXED
|
|
3029
3029
|
showRoleSelector: d = !1,
|
|
3030
3030
|
// 🔥 FIXED
|
|
3031
|
-
loginUrl:
|
|
3031
|
+
loginUrl: m,
|
|
3032
3032
|
onSuccess: P,
|
|
3033
3033
|
onError: O
|
|
3034
3034
|
}) => {
|
|
@@ -3037,8 +3037,8 @@ const qs = [
|
|
|
3037
3037
|
email: "",
|
|
3038
3038
|
password: "",
|
|
3039
3039
|
role: p.length ? p[0] : "user",
|
|
3040
|
-
...
|
|
3041
|
-
}, [x, C] = R(w), [T, A] = R(!1), [y, U] = R(!1), [
|
|
3040
|
+
...h && { avatarUrl: "" }
|
|
3041
|
+
}, [x, C] = R(w), [T, A] = R(!1), [y, U] = R(!1), [g, v] = R(null), [L, _] = R({}), [M, X] = R(!1), k = c ? "#ffffff" : "#111827", V = c ? "#a1a1aa" : "#6b7280", z = c ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.02)", I = c ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)";
|
|
3042
3042
|
Te.useEffect(() => {
|
|
3043
3043
|
if (typeof window < "u") {
|
|
3044
3044
|
const F = () => X(window.innerWidth < 768);
|
|
@@ -3047,13 +3047,13 @@ const qs = [
|
|
|
3047
3047
|
}, []);
|
|
3048
3048
|
const W = (F) => {
|
|
3049
3049
|
const { name: l, value: b } = F.target;
|
|
3050
|
-
C((
|
|
3050
|
+
C((S) => ({ ...S, [l]: b })), L[l] && _((S) => ({ ...S, [l]: void 0 }));
|
|
3051
3051
|
}, Z = () => {
|
|
3052
3052
|
const F = {};
|
|
3053
3053
|
return x.name.trim() || (F.name = "Name is required"), x.email.trim() ? /\S+@\S+\.\S+/.test(x.email) || (F.email = "Invalid email address") : F.email = "Email is required", x.password ? x.password.length < 6 && (F.password = "Password must be at least 6 characters") : F.password = "Password is required", _(F), Object.keys(F).length === 0;
|
|
3054
3054
|
}, B = async (F) => {
|
|
3055
3055
|
if (F.preventDefault(), !!Z()) {
|
|
3056
|
-
U(!0),
|
|
3056
|
+
U(!0), v(null);
|
|
3057
3057
|
try {
|
|
3058
3058
|
const l = {
|
|
3059
3059
|
name: x.name,
|
|
@@ -3062,12 +3062,12 @@ const qs = [
|
|
|
3062
3062
|
role: x.role,
|
|
3063
3063
|
...x.avatarUrl ? { avatarUrl: x.avatarUrl } : {}
|
|
3064
3064
|
}, b = await u.signupUser(l);
|
|
3065
|
-
b.success ? (
|
|
3065
|
+
b.success ? (v({
|
|
3066
3066
|
type: "success",
|
|
3067
3067
|
text: b.message || "Account created successfully!"
|
|
3068
|
-
}), P?.(b.user)) : (
|
|
3068
|
+
}), P?.(b.user)) : (v({ type: "error", text: b.message || "Signup failed" }), O?.(b));
|
|
3069
3069
|
} catch (l) {
|
|
3070
|
-
|
|
3070
|
+
v({
|
|
3071
3071
|
type: "error",
|
|
3072
3072
|
text: l.message || "Signup failed. Please try again."
|
|
3073
3073
|
}), O?.(l);
|
|
@@ -3140,7 +3140,7 @@ const qs = [
|
|
|
3140
3140
|
be,
|
|
3141
3141
|
{
|
|
3142
3142
|
size: 40,
|
|
3143
|
-
color:
|
|
3143
|
+
color: o,
|
|
3144
3144
|
style: { marginBottom: "10px" }
|
|
3145
3145
|
}
|
|
3146
3146
|
),
|
|
@@ -3169,7 +3169,7 @@ const qs = [
|
|
|
3169
3169
|
]
|
|
3170
3170
|
}
|
|
3171
3171
|
),
|
|
3172
|
-
|
|
3172
|
+
h && x.avatarUrl && /* @__PURE__ */ n.jsx(
|
|
3173
3173
|
"div",
|
|
3174
3174
|
{
|
|
3175
3175
|
style: {
|
|
@@ -3187,7 +3187,7 @@ const qs = [
|
|
|
3187
3187
|
height: "60px",
|
|
3188
3188
|
borderRadius: "50%",
|
|
3189
3189
|
objectFit: "cover",
|
|
3190
|
-
border: `2px solid ${
|
|
3190
|
+
border: `2px solid ${o}30`
|
|
3191
3191
|
},
|
|
3192
3192
|
onError: (F) => {
|
|
3193
3193
|
const l = F.target;
|
|
@@ -3263,7 +3263,7 @@ const qs = [
|
|
|
3263
3263
|
zIndex: 10,
|
|
3264
3264
|
border: "none",
|
|
3265
3265
|
background: "transparent",
|
|
3266
|
-
color: x.role === p[0] ?
|
|
3266
|
+
color: x.role === p[0] ? o : c ? "#9ca3af" : "#6b7280",
|
|
3267
3267
|
// theme-aware inactive color
|
|
3268
3268
|
fontWeight: x.role === p[0] ? 600 : 500,
|
|
3269
3269
|
fontSize: "14px",
|
|
@@ -3285,7 +3285,7 @@ const qs = [
|
|
|
3285
3285
|
zIndex: 10,
|
|
3286
3286
|
border: "none",
|
|
3287
3287
|
background: "transparent",
|
|
3288
|
-
color: x.role === p[1] ?
|
|
3288
|
+
color: x.role === p[1] ? o : c ? "#9ca3af" : "#6b7280",
|
|
3289
3289
|
fontWeight: x.role === p[1] ? 600 : 500,
|
|
3290
3290
|
fontSize: "14px",
|
|
3291
3291
|
display: "flex",
|
|
@@ -3427,7 +3427,7 @@ const qs = [
|
|
|
3427
3427
|
),
|
|
3428
3428
|
/* @__PURE__ */ n.jsxs("div", { style: { position: "relative" }, children: [
|
|
3429
3429
|
/* @__PURE__ */ n.jsx(
|
|
3430
|
-
|
|
3430
|
+
ge,
|
|
3431
3431
|
{
|
|
3432
3432
|
size: 20,
|
|
3433
3433
|
style: {
|
|
@@ -3470,7 +3470,7 @@ const qs = [
|
|
|
3470
3470
|
cursor: "pointer",
|
|
3471
3471
|
padding: "4px"
|
|
3472
3472
|
},
|
|
3473
|
-
children: T ? /* @__PURE__ */ n.jsx(
|
|
3473
|
+
children: T ? /* @__PURE__ */ n.jsx(ot, { size: 20 }) : /* @__PURE__ */ n.jsx(lt, { size: 20 })
|
|
3474
3474
|
}
|
|
3475
3475
|
)
|
|
3476
3476
|
] }),
|
|
@@ -3486,7 +3486,7 @@ const qs = [
|
|
|
3486
3486
|
}
|
|
3487
3487
|
)
|
|
3488
3488
|
] }),
|
|
3489
|
-
|
|
3489
|
+
h && /* @__PURE__ */ n.jsxs(
|
|
3490
3490
|
"div",
|
|
3491
3491
|
{
|
|
3492
3492
|
style: { display: "flex", flexDirection: "column", gap: "4px" },
|
|
@@ -3505,7 +3505,7 @@ const qs = [
|
|
|
3505
3505
|
),
|
|
3506
3506
|
/* @__PURE__ */ n.jsxs("div", { style: { position: "relative" }, children: [
|
|
3507
3507
|
/* @__PURE__ */ n.jsx(
|
|
3508
|
-
|
|
3508
|
+
or,
|
|
3509
3509
|
{
|
|
3510
3510
|
size: 20,
|
|
3511
3511
|
style: {
|
|
@@ -3533,7 +3533,7 @@ const qs = [
|
|
|
3533
3533
|
]
|
|
3534
3534
|
}
|
|
3535
3535
|
),
|
|
3536
|
-
|
|
3536
|
+
m && /* @__PURE__ */ n.jsx(
|
|
3537
3537
|
"div",
|
|
3538
3538
|
{
|
|
3539
3539
|
style: {
|
|
@@ -3544,9 +3544,9 @@ const qs = [
|
|
|
3544
3544
|
children: /* @__PURE__ */ n.jsx(
|
|
3545
3545
|
"a",
|
|
3546
3546
|
{
|
|
3547
|
-
href:
|
|
3547
|
+
href: m,
|
|
3548
3548
|
style: {
|
|
3549
|
-
color:
|
|
3549
|
+
color: o,
|
|
3550
3550
|
textDecoration: "none",
|
|
3551
3551
|
fontWeight: 500
|
|
3552
3552
|
},
|
|
@@ -3555,7 +3555,7 @@ const qs = [
|
|
|
3555
3555
|
)
|
|
3556
3556
|
}
|
|
3557
3557
|
),
|
|
3558
|
-
|
|
3558
|
+
g && /* @__PURE__ */ n.jsxs(
|
|
3559
3559
|
"div",
|
|
3560
3560
|
{
|
|
3561
3561
|
style: {
|
|
@@ -3565,13 +3565,13 @@ const qs = [
|
|
|
3565
3565
|
display: "flex",
|
|
3566
3566
|
alignItems: "start",
|
|
3567
3567
|
gap: "10px",
|
|
3568
|
-
backgroundColor:
|
|
3569
|
-
border:
|
|
3570
|
-
color:
|
|
3568
|
+
backgroundColor: g.type === "success" ? `${o}15` : "rgba(239,68,68,0.1)",
|
|
3569
|
+
border: g.type === "success" ? `1px solid ${o}30` : "1px solid rgba(239,68,68,0.3)",
|
|
3570
|
+
color: g.type === "success" ? o : "#ef4444"
|
|
3571
3571
|
},
|
|
3572
3572
|
children: [
|
|
3573
|
-
|
|
3574
|
-
/* @__PURE__ */ n.jsx("span", { children:
|
|
3573
|
+
g.type === "success" ? /* @__PURE__ */ n.jsx(de, { size: 20 }) : /* @__PURE__ */ n.jsx(se, { size: 20 }),
|
|
3574
|
+
/* @__PURE__ */ n.jsx("span", { children: g.text })
|
|
3575
3575
|
]
|
|
3576
3576
|
}
|
|
3577
3577
|
),
|
|
@@ -3582,7 +3582,7 @@ const qs = [
|
|
|
3582
3582
|
disabled: y,
|
|
3583
3583
|
style: {
|
|
3584
3584
|
padding: "12px",
|
|
3585
|
-
background:
|
|
3585
|
+
background: a,
|
|
3586
3586
|
color: "#fff",
|
|
3587
3587
|
border: "none",
|
|
3588
3588
|
borderRadius: "10px",
|
|
@@ -3623,7 +3623,7 @@ const qs = [
|
|
|
3623
3623
|
children: [
|
|
3624
3624
|
"Secure authentication powered by",
|
|
3625
3625
|
" ",
|
|
3626
|
-
/* @__PURE__ */ n.jsx("span", { style: { color:
|
|
3626
|
+
/* @__PURE__ */ n.jsx("span", { style: { color: o, fontWeight: 600 }, children: "Neuctra Authix" })
|
|
3627
3627
|
]
|
|
3628
3628
|
}
|
|
3629
3629
|
)
|
|
@@ -3645,28 +3645,28 @@ const qs = [
|
|
|
3645
3645
|
title: r = "Sign In to Your Account",
|
|
3646
3646
|
subtitle: s = "Welcome back! Please enter your details",
|
|
3647
3647
|
footerText: i = "Secure authentication powered by Neuctra Authix",
|
|
3648
|
-
primaryColor:
|
|
3649
|
-
gradient:
|
|
3648
|
+
primaryColor: o = "#00C214",
|
|
3649
|
+
gradient: a = "linear-gradient(135deg, #22c55e, #00C214)",
|
|
3650
3650
|
darkMode: c = !0,
|
|
3651
|
-
signupUrl:
|
|
3651
|
+
signupUrl: h,
|
|
3652
3652
|
onSuccess: p,
|
|
3653
3653
|
onError: d
|
|
3654
3654
|
}) => {
|
|
3655
|
-
const
|
|
3655
|
+
const m = ue(), [P, O] = R("login"), [u, w] = R(1), [x, C] = R(!1), [T, A] = R(!1), [y, U] = R(null), [g, v] = R(""), [L, _] = R(""), [M, X] = R({
|
|
3656
3656
|
email: "",
|
|
3657
3657
|
otp: "",
|
|
3658
3658
|
newPassword: ""
|
|
3659
3659
|
}), [k, V] = R(!1), z = c ? "#ffffff" : "#111827", I = c ? "#a1a1aa" : "#6b7280", W = c ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.02)", Z = c ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)";
|
|
3660
3660
|
Te.useEffect(() => {
|
|
3661
3661
|
if (typeof window < "u") {
|
|
3662
|
-
const
|
|
3663
|
-
return
|
|
3662
|
+
const S = () => V(window.innerWidth < 768);
|
|
3663
|
+
return S(), window.addEventListener("resize", S), () => window.removeEventListener("resize", S);
|
|
3664
3664
|
}
|
|
3665
3665
|
}, []);
|
|
3666
|
-
const B = async (
|
|
3667
|
-
|
|
3666
|
+
const B = async (S) => {
|
|
3667
|
+
S.preventDefault(), A(!0), U(null);
|
|
3668
3668
|
try {
|
|
3669
|
-
const j = await
|
|
3669
|
+
const j = await m.loginUser({ email: g, password: L }), { user: G } = j;
|
|
3670
3670
|
if (!G)
|
|
3671
3671
|
throw new Error(j.message || "Login failed");
|
|
3672
3672
|
U({ type: "success", text: `Welcome ${G.name}` }), p?.(G);
|
|
@@ -3676,12 +3676,12 @@ const qs = [
|
|
|
3676
3676
|
} finally {
|
|
3677
3677
|
A(!1);
|
|
3678
3678
|
}
|
|
3679
|
-
}, K = (
|
|
3680
|
-
X({ ...M, [
|
|
3681
|
-
}, F = async (
|
|
3682
|
-
|
|
3679
|
+
}, K = (S) => {
|
|
3680
|
+
X({ ...M, [S.target.name]: S.target.value });
|
|
3681
|
+
}, F = async (S) => {
|
|
3682
|
+
S.preventDefault(), A(!0), U(null);
|
|
3683
3683
|
try {
|
|
3684
|
-
const j = await
|
|
3684
|
+
const j = await m.requestResetUserPasswordOTP({
|
|
3685
3685
|
email: M.email
|
|
3686
3686
|
});
|
|
3687
3687
|
j.success ? (w(2), U({
|
|
@@ -3699,10 +3699,10 @@ const qs = [
|
|
|
3699
3699
|
} finally {
|
|
3700
3700
|
A(!1);
|
|
3701
3701
|
}
|
|
3702
|
-
}, l = async (
|
|
3703
|
-
|
|
3702
|
+
}, l = async (S) => {
|
|
3703
|
+
S.preventDefault(), A(!0), U(null);
|
|
3704
3704
|
try {
|
|
3705
|
-
const j = await
|
|
3705
|
+
const j = await m.resetUserPassword({
|
|
3706
3706
|
email: M.email,
|
|
3707
3707
|
otp: M.otp,
|
|
3708
3708
|
newPassword: M.newPassword
|
|
@@ -3782,7 +3782,7 @@ const qs = [
|
|
|
3782
3782
|
be,
|
|
3783
3783
|
{
|
|
3784
3784
|
size: 40,
|
|
3785
|
-
color:
|
|
3785
|
+
color: o,
|
|
3786
3786
|
style: { marginBottom: "10px" }
|
|
3787
3787
|
}
|
|
3788
3788
|
),
|
|
@@ -3854,8 +3854,8 @@ const qs = [
|
|
|
3854
3854
|
id: "login-email",
|
|
3855
3855
|
type: "email",
|
|
3856
3856
|
placeholder: "Enter your email",
|
|
3857
|
-
value:
|
|
3858
|
-
onChange: (
|
|
3857
|
+
value: g,
|
|
3858
|
+
onChange: (S) => v(S.target.value),
|
|
3859
3859
|
style: b
|
|
3860
3860
|
}
|
|
3861
3861
|
)
|
|
@@ -3882,7 +3882,7 @@ const qs = [
|
|
|
3882
3882
|
),
|
|
3883
3883
|
/* @__PURE__ */ n.jsxs("div", { style: { position: "relative" }, children: [
|
|
3884
3884
|
/* @__PURE__ */ n.jsx(
|
|
3885
|
-
|
|
3885
|
+
ge,
|
|
3886
3886
|
{
|
|
3887
3887
|
size: 20,
|
|
3888
3888
|
style: {
|
|
@@ -3901,7 +3901,7 @@ const qs = [
|
|
|
3901
3901
|
type: x ? "text" : "password",
|
|
3902
3902
|
placeholder: "Enter your password",
|
|
3903
3903
|
value: L,
|
|
3904
|
-
onChange: (
|
|
3904
|
+
onChange: (S) => _(S.target.value),
|
|
3905
3905
|
style: b
|
|
3906
3906
|
}
|
|
3907
3907
|
),
|
|
@@ -3921,7 +3921,7 @@ const qs = [
|
|
|
3921
3921
|
color: I,
|
|
3922
3922
|
cursor: "pointer"
|
|
3923
3923
|
},
|
|
3924
|
-
children: x ? /* @__PURE__ */ n.jsx(
|
|
3924
|
+
children: x ? /* @__PURE__ */ n.jsx(ot, { size: 20 }) : /* @__PURE__ */ n.jsx(lt, { size: 20 })
|
|
3925
3925
|
}
|
|
3926
3926
|
)
|
|
3927
3927
|
] })
|
|
@@ -3937,12 +3937,12 @@ const qs = [
|
|
|
3937
3937
|
fontSize: "13px"
|
|
3938
3938
|
},
|
|
3939
3939
|
children: [
|
|
3940
|
-
|
|
3940
|
+
h && /* @__PURE__ */ n.jsx(
|
|
3941
3941
|
"a",
|
|
3942
3942
|
{
|
|
3943
|
-
href:
|
|
3943
|
+
href: h,
|
|
3944
3944
|
style: {
|
|
3945
|
-
color:
|
|
3945
|
+
color: o,
|
|
3946
3946
|
textDecoration: "none",
|
|
3947
3947
|
fontWeight: 500
|
|
3948
3948
|
},
|
|
@@ -3957,7 +3957,7 @@ const qs = [
|
|
|
3957
3957
|
style: {
|
|
3958
3958
|
background: "none",
|
|
3959
3959
|
border: "none",
|
|
3960
|
-
color:
|
|
3960
|
+
color: o,
|
|
3961
3961
|
fontWeight: 500,
|
|
3962
3962
|
cursor: "pointer"
|
|
3963
3963
|
},
|
|
@@ -3974,7 +3974,7 @@ const qs = [
|
|
|
3974
3974
|
disabled: T,
|
|
3975
3975
|
style: {
|
|
3976
3976
|
padding: "12px",
|
|
3977
|
-
background:
|
|
3977
|
+
background: a,
|
|
3978
3978
|
color: "#fff",
|
|
3979
3979
|
border: "none",
|
|
3980
3980
|
borderRadius: "10px",
|
|
@@ -4114,7 +4114,7 @@ const qs = [
|
|
|
4114
4114
|
),
|
|
4115
4115
|
/* @__PURE__ */ n.jsxs("div", { style: { position: "relative" }, children: [
|
|
4116
4116
|
/* @__PURE__ */ n.jsx(
|
|
4117
|
-
|
|
4117
|
+
ge,
|
|
4118
4118
|
{
|
|
4119
4119
|
size: 20,
|
|
4120
4120
|
style: {
|
|
@@ -4150,7 +4150,7 @@ const qs = [
|
|
|
4150
4150
|
disabled: T,
|
|
4151
4151
|
style: {
|
|
4152
4152
|
padding: "12px",
|
|
4153
|
-
background:
|
|
4153
|
+
background: a,
|
|
4154
4154
|
color: "#fff",
|
|
4155
4155
|
border: "none",
|
|
4156
4156
|
fontSize: "14px",
|
|
@@ -4192,12 +4192,12 @@ const qs = [
|
|
|
4192
4192
|
display: "flex",
|
|
4193
4193
|
alignItems: "center",
|
|
4194
4194
|
gap: "10px",
|
|
4195
|
-
backgroundColor: y.type === "success" ? `${
|
|
4196
|
-
border: y.type === "success" ? `1px solid ${
|
|
4197
|
-
color: y.type === "success" ?
|
|
4195
|
+
backgroundColor: y.type === "success" ? `${o}15` : "rgba(239,68,68,0.1)",
|
|
4196
|
+
border: y.type === "success" ? `1px solid ${o}30` : "1px solid rgba(239,68,68,0.3)",
|
|
4197
|
+
color: y.type === "success" ? o : "#ef4444"
|
|
4198
4198
|
},
|
|
4199
4199
|
children: [
|
|
4200
|
-
y.type === "success" ? /* @__PURE__ */ n.jsx(de, { size: 20 }) : /* @__PURE__ */ n.jsx(
|
|
4200
|
+
y.type === "success" ? /* @__PURE__ */ n.jsx(de, { size: 20 }) : /* @__PURE__ */ n.jsx(se, { size: 20 }),
|
|
4201
4201
|
/* @__PURE__ */ n.jsx("span", { children: y.text })
|
|
4202
4202
|
]
|
|
4203
4203
|
}
|
|
@@ -4215,7 +4215,7 @@ const qs = [
|
|
|
4215
4215
|
children: [
|
|
4216
4216
|
"Secure authentication powered by",
|
|
4217
4217
|
" ",
|
|
4218
|
-
/* @__PURE__ */ n.jsx("span", { style: { color:
|
|
4218
|
+
/* @__PURE__ */ n.jsx("span", { style: { color: o, fontWeight: 600 }, children: "Neuctra Authix" })
|
|
4219
4219
|
]
|
|
4220
4220
|
}
|
|
4221
4221
|
)
|
|
@@ -4229,19 +4229,18 @@ const qs = [
|
|
|
4229
4229
|
fallback: e = null,
|
|
4230
4230
|
loading: r = null
|
|
4231
4231
|
}) => {
|
|
4232
|
-
const s = ue(), [i,
|
|
4232
|
+
const s = ue(), [i, o] = R(!1), [a, c] = R(null);
|
|
4233
4233
|
if (te(() => {
|
|
4234
|
-
|
|
4234
|
+
o(!0), (async () => {
|
|
4235
4235
|
try {
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
console.error("[ReactSignedIn] Error fetching session:", h), c(!1);
|
|
4236
|
+
const m = await s.checkUserSession();
|
|
4237
|
+
c(!!m?.authenticated);
|
|
4238
|
+
} catch {
|
|
4239
|
+
c(!1);
|
|
4241
4240
|
}
|
|
4242
4241
|
})();
|
|
4243
4242
|
}, [s]), !i) return null;
|
|
4244
|
-
const
|
|
4243
|
+
const h = (d) => typeof d == "function" ? d() : d, p = /* @__PURE__ */ n.jsxs(
|
|
4245
4244
|
"div",
|
|
4246
4245
|
{
|
|
4247
4246
|
style: {
|
|
@@ -4275,25 +4274,24 @@ const qs = [
|
|
|
4275
4274
|
]
|
|
4276
4275
|
}
|
|
4277
4276
|
);
|
|
4278
|
-
return
|
|
4279
|
-
},
|
|
4277
|
+
return a === null ? h(r) ?? p : a ? /* @__PURE__ */ n.jsx(n.Fragment, { children: t }) : h(e);
|
|
4278
|
+
}, mi = ({
|
|
4280
4279
|
children: t,
|
|
4281
4280
|
fallback: e = null,
|
|
4282
4281
|
loading: r = null
|
|
4283
4282
|
}) => {
|
|
4284
|
-
const s = ue(), [i,
|
|
4283
|
+
const s = ue(), [i, o] = R(!1), [a, c] = R(null);
|
|
4285
4284
|
if (te(() => {
|
|
4286
|
-
|
|
4285
|
+
o(!0), (async () => {
|
|
4287
4286
|
try {
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
console.error("[ReactSignedOut] Error fetching session:", h), c(!0);
|
|
4287
|
+
const m = await s.checkUserSession();
|
|
4288
|
+
c(!m?.authenticated);
|
|
4289
|
+
} catch {
|
|
4290
|
+
c(!0);
|
|
4293
4291
|
}
|
|
4294
4292
|
})();
|
|
4295
4293
|
}, [s]), !i) return null;
|
|
4296
|
-
const
|
|
4294
|
+
const h = (d) => typeof d == "function" ? d() : d, p = /* @__PURE__ */ n.jsxs(
|
|
4297
4295
|
"div",
|
|
4298
4296
|
{
|
|
4299
4297
|
style: {
|
|
@@ -4327,17 +4325,17 @@ const qs = [
|
|
|
4327
4325
|
]
|
|
4328
4326
|
}
|
|
4329
4327
|
);
|
|
4330
|
-
return
|
|
4328
|
+
return a === null ? h(r) ?? p : a ? /* @__PURE__ */ n.jsx(n.Fragment, { children: t }) : h(e);
|
|
4331
4329
|
}, Ms = ({
|
|
4332
4330
|
isOpen: t,
|
|
4333
4331
|
onClose: e,
|
|
4334
4332
|
onSuccess: r,
|
|
4335
4333
|
onError: s,
|
|
4336
4334
|
userId: i,
|
|
4337
|
-
token:
|
|
4338
|
-
colors:
|
|
4335
|
+
token: o,
|
|
4336
|
+
colors: a
|
|
4339
4337
|
}) => {
|
|
4340
|
-
const c = ue(), [
|
|
4338
|
+
const c = ue(), [h, p] = R(!1), [d, m] = R(""), [P, O] = R("warning"), [u, w] = R(!1);
|
|
4341
4339
|
if (te(() => {
|
|
4342
4340
|
if (typeof window > "u") return;
|
|
4343
4341
|
const y = () => {
|
|
@@ -4407,7 +4405,7 @@ const qs = [
|
|
|
4407
4405
|
"h3",
|
|
4408
4406
|
{
|
|
4409
4407
|
style: {
|
|
4410
|
-
color:
|
|
4408
|
+
color: a.textPrimary,
|
|
4411
4409
|
margin: 0,
|
|
4412
4410
|
fontSize: "20px",
|
|
4413
4411
|
fontWeight: 700,
|
|
@@ -4427,7 +4425,7 @@ const qs = [
|
|
|
4427
4425
|
style: {
|
|
4428
4426
|
background: "transparent",
|
|
4429
4427
|
border: "none",
|
|
4430
|
-
color:
|
|
4428
|
+
color: a.textTertiary,
|
|
4431
4429
|
cursor: "pointer",
|
|
4432
4430
|
padding: "8px",
|
|
4433
4431
|
borderRadius: "8px",
|
|
@@ -4440,10 +4438,10 @@ const qs = [
|
|
|
4440
4438
|
transition: "all 0.2s ease"
|
|
4441
4439
|
},
|
|
4442
4440
|
onMouseOver: (y) => {
|
|
4443
|
-
y.currentTarget.style.backgroundColor =
|
|
4441
|
+
y.currentTarget.style.backgroundColor = a.border, y.currentTarget.style.color = a.textPrimary;
|
|
4444
4442
|
},
|
|
4445
4443
|
onMouseOut: (y) => {
|
|
4446
|
-
y.currentTarget.style.backgroundColor = "transparent", y.currentTarget.style.color =
|
|
4444
|
+
y.currentTarget.style.backgroundColor = "transparent", y.currentTarget.style.color = a.textTertiary;
|
|
4447
4445
|
},
|
|
4448
4446
|
children: /* @__PURE__ */ n.jsx(ze, { size: 20 })
|
|
4449
4447
|
}
|
|
@@ -4458,8 +4456,8 @@ const qs = [
|
|
|
4458
4456
|
display: "flex",
|
|
4459
4457
|
gap: "16px",
|
|
4460
4458
|
padding: "20px",
|
|
4461
|
-
background: `${
|
|
4462
|
-
border: `1px solid ${
|
|
4459
|
+
background: `${a.error}15`,
|
|
4460
|
+
border: `1px solid ${a.error}30`,
|
|
4463
4461
|
borderRadius: "12px",
|
|
4464
4462
|
marginBottom: "20px"
|
|
4465
4463
|
},
|
|
@@ -4468,7 +4466,7 @@ const qs = [
|
|
|
4468
4466
|
"div",
|
|
4469
4467
|
{
|
|
4470
4468
|
style: {
|
|
4471
|
-
color:
|
|
4469
|
+
color: a.error,
|
|
4472
4470
|
flexShrink: 0,
|
|
4473
4471
|
display: "flex",
|
|
4474
4472
|
alignItems: "flex-start"
|
|
@@ -4481,7 +4479,7 @@ const qs = [
|
|
|
4481
4479
|
"h4",
|
|
4482
4480
|
{
|
|
4483
4481
|
style: {
|
|
4484
|
-
color:
|
|
4482
|
+
color: a.textPrimary,
|
|
4485
4483
|
margin: "0 0 12px 0",
|
|
4486
4484
|
fontSize: "16px",
|
|
4487
4485
|
fontWeight: 600
|
|
@@ -4499,7 +4497,7 @@ const qs = [
|
|
|
4499
4497
|
},
|
|
4500
4498
|
children: [
|
|
4501
4499
|
{
|
|
4502
|
-
icon: /* @__PURE__ */ n.jsx(
|
|
4500
|
+
icon: /* @__PURE__ */ n.jsx(as, { size: 16 }),
|
|
4503
4501
|
text: "All your data will be permanently deleted"
|
|
4504
4502
|
},
|
|
4505
4503
|
{
|
|
@@ -4518,10 +4516,10 @@ const qs = [
|
|
|
4518
4516
|
alignItems: "center",
|
|
4519
4517
|
gap: "10px",
|
|
4520
4518
|
fontSize: "14px",
|
|
4521
|
-
color:
|
|
4519
|
+
color: a.textSecondary
|
|
4522
4520
|
},
|
|
4523
4521
|
children: [
|
|
4524
|
-
/* @__PURE__ */ n.jsx("div", { style: { color:
|
|
4522
|
+
/* @__PURE__ */ n.jsx("div", { style: { color: a.error, flexShrink: 0 }, children: y.icon }),
|
|
4525
4523
|
/* @__PURE__ */ n.jsx("span", { children: y.text })
|
|
4526
4524
|
]
|
|
4527
4525
|
},
|
|
@@ -4551,9 +4549,9 @@ const qs = [
|
|
|
4551
4549
|
style: {
|
|
4552
4550
|
padding: "10px 24px",
|
|
4553
4551
|
borderRadius: "10px",
|
|
4554
|
-
border: `1.5px solid ${
|
|
4552
|
+
border: `1.5px solid ${a.border}`,
|
|
4555
4553
|
background: "transparent",
|
|
4556
|
-
color:
|
|
4554
|
+
color: a.textPrimary,
|
|
4557
4555
|
fontSize: "14px",
|
|
4558
4556
|
fontWeight: 500,
|
|
4559
4557
|
cursor: "pointer",
|
|
@@ -4562,7 +4560,7 @@ const qs = [
|
|
|
4562
4560
|
transition: "all 0.2s ease"
|
|
4563
4561
|
},
|
|
4564
4562
|
onMouseOver: (y) => {
|
|
4565
|
-
y.currentTarget.style.backgroundColor =
|
|
4563
|
+
y.currentTarget.style.backgroundColor = a.border, y.currentTarget.style.transform = "translateY(-1px)";
|
|
4566
4564
|
},
|
|
4567
4565
|
onMouseOut: (y) => {
|
|
4568
4566
|
y.currentTarget.style.backgroundColor = "transparent", y.currentTarget.style.transform = "translateY(0)";
|
|
@@ -4641,7 +4639,7 @@ const qs = [
|
|
|
4641
4639
|
"h3",
|
|
4642
4640
|
{
|
|
4643
4641
|
style: {
|
|
4644
|
-
color:
|
|
4642
|
+
color: a.textPrimary,
|
|
4645
4643
|
margin: 0,
|
|
4646
4644
|
fontSize: "20px",
|
|
4647
4645
|
fontWeight: 700,
|
|
@@ -4658,7 +4656,7 @@ const qs = [
|
|
|
4658
4656
|
"p",
|
|
4659
4657
|
{
|
|
4660
4658
|
style: {
|
|
4661
|
-
color:
|
|
4659
|
+
color: a.textSecondary,
|
|
4662
4660
|
marginBottom: "16px",
|
|
4663
4661
|
fontSize: "14px",
|
|
4664
4662
|
lineHeight: "1.5"
|
|
@@ -4666,7 +4664,7 @@ const qs = [
|
|
|
4666
4664
|
children: [
|
|
4667
4665
|
"Type",
|
|
4668
4666
|
" ",
|
|
4669
|
-
/* @__PURE__ */ n.jsx("strong", { style: { color:
|
|
4667
|
+
/* @__PURE__ */ n.jsx("strong", { style: { color: a.textPrimary }, children: '"delete my account"' }),
|
|
4670
4668
|
" ",
|
|
4671
4669
|
"to confirm:"
|
|
4672
4670
|
]
|
|
@@ -4677,22 +4675,22 @@ const qs = [
|
|
|
4677
4675
|
{
|
|
4678
4676
|
type: "text",
|
|
4679
4677
|
value: d,
|
|
4680
|
-
onChange: (y) =>
|
|
4678
|
+
onChange: (y) => m(y.target.value),
|
|
4681
4679
|
placeholder: "delete my account",
|
|
4682
4680
|
style: {
|
|
4683
4681
|
width: "100%",
|
|
4684
4682
|
padding: "14px 16px",
|
|
4685
4683
|
borderRadius: "10px",
|
|
4686
|
-
border: `2px solid ${C ?
|
|
4684
|
+
border: `2px solid ${C ? a.success : a.error}`,
|
|
4687
4685
|
backgroundColor: "transparent",
|
|
4688
|
-
color:
|
|
4686
|
+
color: a.textPrimary,
|
|
4689
4687
|
fontSize: "15px",
|
|
4690
4688
|
outline: "none",
|
|
4691
4689
|
transition: "all 0.2s ease",
|
|
4692
4690
|
boxSizing: "border-box"
|
|
4693
4691
|
},
|
|
4694
4692
|
onFocus: (y) => {
|
|
4695
|
-
y.target.style.boxShadow = `0 0 0 3px ${
|
|
4693
|
+
y.target.style.boxShadow = `0 0 0 3px ${a.accent}20`;
|
|
4696
4694
|
},
|
|
4697
4695
|
onBlur: (y) => {
|
|
4698
4696
|
y.target.style.boxShadow = "none";
|
|
@@ -4708,7 +4706,7 @@ const qs = [
|
|
|
4708
4706
|
alignItems: "center",
|
|
4709
4707
|
gap: "8px",
|
|
4710
4708
|
marginTop: "10px",
|
|
4711
|
-
color:
|
|
4709
|
+
color: a.success,
|
|
4712
4710
|
fontSize: "14px",
|
|
4713
4711
|
fontWeight: 500
|
|
4714
4712
|
},
|
|
@@ -4734,14 +4732,14 @@ const qs = [
|
|
|
4734
4732
|
"button",
|
|
4735
4733
|
{
|
|
4736
4734
|
onClick: () => {
|
|
4737
|
-
O("warning"),
|
|
4735
|
+
O("warning"), m("");
|
|
4738
4736
|
},
|
|
4739
4737
|
style: {
|
|
4740
4738
|
padding: "10px 24px",
|
|
4741
4739
|
borderRadius: "10px",
|
|
4742
|
-
border: `1.5px solid ${
|
|
4740
|
+
border: `1.5px solid ${a.border}`,
|
|
4743
4741
|
background: "transparent",
|
|
4744
|
-
color:
|
|
4742
|
+
color: a.textPrimary,
|
|
4745
4743
|
fontSize: "14px",
|
|
4746
4744
|
fontWeight: 500,
|
|
4747
4745
|
cursor: "pointer",
|
|
@@ -4750,7 +4748,7 @@ const qs = [
|
|
|
4750
4748
|
transition: "all 0.2s ease"
|
|
4751
4749
|
},
|
|
4752
4750
|
onMouseOver: (y) => {
|
|
4753
|
-
y.currentTarget.style.backgroundColor =
|
|
4751
|
+
y.currentTarget.style.backgroundColor = a.border, y.currentTarget.style.transform = "translateY(-1px)";
|
|
4754
4752
|
},
|
|
4755
4753
|
onMouseOut: (y) => {
|
|
4756
4754
|
y.currentTarget.style.backgroundColor = "transparent", y.currentTarget.style.transform = "translateY(0)";
|
|
@@ -4762,7 +4760,7 @@ const qs = [
|
|
|
4762
4760
|
"button",
|
|
4763
4761
|
{
|
|
4764
4762
|
onClick: x,
|
|
4765
|
-
disabled: !C ||
|
|
4763
|
+
disabled: !C || h,
|
|
4766
4764
|
style: {
|
|
4767
4765
|
padding: "10px 24px",
|
|
4768
4766
|
borderRadius: "10px",
|
|
@@ -4771,22 +4769,22 @@ const qs = [
|
|
|
4771
4769
|
color: "white",
|
|
4772
4770
|
fontSize: "14px",
|
|
4773
4771
|
fontWeight: 600,
|
|
4774
|
-
cursor: !C ||
|
|
4772
|
+
cursor: !C || h ? "not-allowed" : "pointer",
|
|
4775
4773
|
flex: u ? "none" : 1,
|
|
4776
4774
|
minWidth: u ? "100%" : "140px",
|
|
4777
|
-
opacity: !C ||
|
|
4775
|
+
opacity: !C || h ? 0.6 : 1,
|
|
4778
4776
|
display: "flex",
|
|
4779
4777
|
alignItems: "center",
|
|
4780
4778
|
justifyContent: "center",
|
|
4781
4779
|
gap: "8px",
|
|
4782
4780
|
transition: "all 0.2s ease",
|
|
4783
|
-
boxShadow: !C ||
|
|
4781
|
+
boxShadow: !C || h ? "none" : "0 4px 12px rgba(239, 68, 68, 0.4)"
|
|
4784
4782
|
},
|
|
4785
4783
|
onMouseOver: (y) => {
|
|
4786
|
-
C && !
|
|
4784
|
+
C && !h && (y.currentTarget.style.transform = "translateY(-1px)", y.currentTarget.style.boxShadow = "0 6px 20px rgba(239, 68, 68, 0.5)");
|
|
4787
4785
|
},
|
|
4788
4786
|
onMouseOut: (y) => {
|
|
4789
|
-
C && !
|
|
4787
|
+
C && !h && (y.currentTarget.style.transform = "translateY(0)", y.currentTarget.style.boxShadow = "0 4px 12px rgba(239, 68, 68, 0.4)");
|
|
4790
4788
|
},
|
|
4791
4789
|
children: [
|
|
4792
4790
|
/* @__PURE__ */ n.jsx(Ne, { size: 16 }),
|
|
@@ -4825,7 +4823,7 @@ const qs = [
|
|
|
4825
4823
|
flexShrink: 0
|
|
4826
4824
|
},
|
|
4827
4825
|
children: /* @__PURE__ */ n.jsx(
|
|
4828
|
-
|
|
4826
|
+
ie,
|
|
4829
4827
|
{
|
|
4830
4828
|
size: 20,
|
|
4831
4829
|
style: {
|
|
@@ -4840,7 +4838,7 @@ const qs = [
|
|
|
4840
4838
|
"h3",
|
|
4841
4839
|
{
|
|
4842
4840
|
style: {
|
|
4843
|
-
color:
|
|
4841
|
+
color: a.textPrimary,
|
|
4844
4842
|
margin: 0,
|
|
4845
4843
|
fontSize: "20px",
|
|
4846
4844
|
fontWeight: 700,
|
|
@@ -4853,7 +4851,7 @@ const qs = [
|
|
|
4853
4851
|
"p",
|
|
4854
4852
|
{
|
|
4855
4853
|
style: {
|
|
4856
|
-
color:
|
|
4854
|
+
color: a.textTertiary,
|
|
4857
4855
|
margin: "4px 0 0 0",
|
|
4858
4856
|
fontSize: "14px",
|
|
4859
4857
|
lineHeight: "1.4"
|
|
@@ -4887,7 +4885,7 @@ const qs = [
|
|
|
4887
4885
|
padding: "12px",
|
|
4888
4886
|
borderRadius: "8px",
|
|
4889
4887
|
transition: "all 0.2s ease",
|
|
4890
|
-
backgroundColor: y.active ? `${
|
|
4888
|
+
backgroundColor: y.active ? `${a.accent}10` : "transparent"
|
|
4891
4889
|
},
|
|
4892
4890
|
children: [
|
|
4893
4891
|
/* @__PURE__ */ n.jsx(
|
|
@@ -4897,9 +4895,9 @@ const qs = [
|
|
|
4897
4895
|
width: "8px",
|
|
4898
4896
|
height: "8px",
|
|
4899
4897
|
borderRadius: "50%",
|
|
4900
|
-
backgroundColor: y.active ?
|
|
4898
|
+
backgroundColor: y.active ? a.accent : a.textTertiary,
|
|
4901
4899
|
transition: "all 0.3s ease",
|
|
4902
|
-
boxShadow: y.active ? `0 0 0 4px ${
|
|
4900
|
+
boxShadow: y.active ? `0 0 0 4px ${a.accent}20` : "none"
|
|
4903
4901
|
}
|
|
4904
4902
|
}
|
|
4905
4903
|
),
|
|
@@ -4908,7 +4906,7 @@ const qs = [
|
|
|
4908
4906
|
{
|
|
4909
4907
|
style: {
|
|
4910
4908
|
fontSize: "14px",
|
|
4911
|
-
color: y.active ?
|
|
4909
|
+
color: y.active ? a.textPrimary : a.textSecondary,
|
|
4912
4910
|
fontWeight: y.active ? 500 : 400
|
|
4913
4911
|
},
|
|
4914
4912
|
children: y.text
|
|
@@ -4928,17 +4926,17 @@ const qs = [
|
|
|
4928
4926
|
alignItems: "center",
|
|
4929
4927
|
gap: "10px",
|
|
4930
4928
|
padding: "16px",
|
|
4931
|
-
background: `${
|
|
4929
|
+
background: `${a.accent}10`,
|
|
4932
4930
|
borderRadius: "10px",
|
|
4933
4931
|
fontSize: "14px",
|
|
4934
|
-
color:
|
|
4932
|
+
color: a.textSecondary
|
|
4935
4933
|
},
|
|
4936
4934
|
children: [
|
|
4937
4935
|
/* @__PURE__ */ n.jsx(
|
|
4938
4936
|
cr,
|
|
4939
4937
|
{
|
|
4940
4938
|
size: 18,
|
|
4941
|
-
style: { color:
|
|
4939
|
+
style: { color: a.accent, flexShrink: 0 }
|
|
4942
4940
|
}
|
|
4943
4941
|
),
|
|
4944
4942
|
/* @__PURE__ */ n.jsx("span", { children: "You will be redirected to the login page shortly" })
|
|
@@ -4980,7 +4978,7 @@ const qs = [
|
|
|
4980
4978
|
"h3",
|
|
4981
4979
|
{
|
|
4982
4980
|
style: {
|
|
4983
|
-
color:
|
|
4981
|
+
color: a.textPrimary,
|
|
4984
4982
|
margin: 0,
|
|
4985
4983
|
fontSize: "20px",
|
|
4986
4984
|
fontWeight: 700,
|
|
@@ -4993,7 +4991,7 @@ const qs = [
|
|
|
4993
4991
|
"p",
|
|
4994
4992
|
{
|
|
4995
4993
|
style: {
|
|
4996
|
-
color:
|
|
4994
|
+
color: a.textTertiary,
|
|
4997
4995
|
margin: "4px 0 0 0",
|
|
4998
4996
|
fontSize: "14px",
|
|
4999
4997
|
lineHeight: "1.4"
|
|
@@ -5011,8 +5009,8 @@ const qs = [
|
|
|
5011
5009
|
style: {
|
|
5012
5010
|
textAlign: "center",
|
|
5013
5011
|
padding: "20px",
|
|
5014
|
-
background: `${
|
|
5015
|
-
border: `1px solid ${
|
|
5012
|
+
background: `${a.success}10`,
|
|
5013
|
+
border: `1px solid ${a.success}20`,
|
|
5016
5014
|
borderRadius: "12px",
|
|
5017
5015
|
marginBottom: "24px"
|
|
5018
5016
|
},
|
|
@@ -5022,7 +5020,7 @@ const qs = [
|
|
|
5022
5020
|
{
|
|
5023
5021
|
size: 48,
|
|
5024
5022
|
style: {
|
|
5025
|
-
color:
|
|
5023
|
+
color: a.success,
|
|
5026
5024
|
marginBottom: "12px",
|
|
5027
5025
|
display: "block",
|
|
5028
5026
|
margin: "0 auto 12px auto"
|
|
@@ -5033,7 +5031,7 @@ const qs = [
|
|
|
5033
5031
|
"p",
|
|
5034
5032
|
{
|
|
5035
5033
|
style: {
|
|
5036
|
-
color:
|
|
5034
|
+
color: a.textPrimary,
|
|
5037
5035
|
fontSize: "16px",
|
|
5038
5036
|
fontWeight: 600,
|
|
5039
5037
|
margin: "0 0 8px 0"
|
|
@@ -5045,7 +5043,7 @@ const qs = [
|
|
|
5045
5043
|
"p",
|
|
5046
5044
|
{
|
|
5047
5045
|
style: {
|
|
5048
|
-
color:
|
|
5046
|
+
color: a.textSecondary,
|
|
5049
5047
|
fontSize: "14px",
|
|
5050
5048
|
margin: 0,
|
|
5051
5049
|
lineHeight: "1.5"
|
|
@@ -5064,20 +5062,20 @@ const qs = [
|
|
|
5064
5062
|
alignItems: "center",
|
|
5065
5063
|
gap: "10px",
|
|
5066
5064
|
padding: "16px",
|
|
5067
|
-
background: `${
|
|
5065
|
+
background: `${a.accent}10`,
|
|
5068
5066
|
borderRadius: "10px",
|
|
5069
5067
|
fontSize: "14px",
|
|
5070
|
-
color:
|
|
5068
|
+
color: a.textSecondary,
|
|
5071
5069
|
justifyContent: "center"
|
|
5072
5070
|
},
|
|
5073
5071
|
children: [
|
|
5074
5072
|
/* @__PURE__ */ n.jsx(
|
|
5075
|
-
|
|
5073
|
+
ie,
|
|
5076
5074
|
{
|
|
5077
5075
|
size: 16,
|
|
5078
5076
|
style: {
|
|
5079
5077
|
animation: "spin 1s linear infinite",
|
|
5080
|
-
color:
|
|
5078
|
+
color: a.accent
|
|
5081
5079
|
}
|
|
5082
5080
|
}
|
|
5083
5081
|
),
|
|
@@ -5109,8 +5107,8 @@ const qs = [
|
|
|
5109
5107
|
"div",
|
|
5110
5108
|
{
|
|
5111
5109
|
style: {
|
|
5112
|
-
backgroundColor:
|
|
5113
|
-
border: `1px solid ${
|
|
5110
|
+
backgroundColor: a.surface,
|
|
5111
|
+
border: `1px solid ${a.border}`,
|
|
5114
5112
|
borderRadius: "20px",
|
|
5115
5113
|
width: "100%",
|
|
5116
5114
|
maxWidth: "480px",
|
|
@@ -5186,7 +5184,7 @@ const qs = [
|
|
|
5186
5184
|
onUpdate: r,
|
|
5187
5185
|
colors: s
|
|
5188
5186
|
}) => {
|
|
5189
|
-
const [i,
|
|
5187
|
+
const [i, o] = R(""), [a, c] = R(!1), [h, p] = R(!1), [d, m] = R({ isValid: !1, message: "", type: null });
|
|
5190
5188
|
if (te(() => {
|
|
5191
5189
|
if (typeof window > "u") return;
|
|
5192
5190
|
const u = () => {
|
|
@@ -5195,12 +5193,12 @@ const qs = [
|
|
|
5195
5193
|
return u(), window.addEventListener("resize", u), () => window.removeEventListener("resize", u);
|
|
5196
5194
|
}, []), te(() => {
|
|
5197
5195
|
if (!i.trim()) {
|
|
5198
|
-
|
|
5196
|
+
m({ isValid: !1, message: "", type: null });
|
|
5199
5197
|
return;
|
|
5200
5198
|
}
|
|
5201
5199
|
try {
|
|
5202
5200
|
const u = new URL(i), w = /\.(jpg|jpeg|png|gif|webp|svg)$/i.test(u.pathname);
|
|
5203
|
-
|
|
5201
|
+
m(w ? {
|
|
5204
5202
|
isValid: !0,
|
|
5205
5203
|
message: "Valid image URL",
|
|
5206
5204
|
type: "success"
|
|
@@ -5210,7 +5208,7 @@ const qs = [
|
|
|
5210
5208
|
type: "warning"
|
|
5211
5209
|
});
|
|
5212
5210
|
} catch {
|
|
5213
|
-
|
|
5211
|
+
m({
|
|
5214
5212
|
isValid: !1,
|
|
5215
5213
|
message: "Please enter a valid URL",
|
|
5216
5214
|
type: "error"
|
|
@@ -5221,7 +5219,7 @@ const qs = [
|
|
|
5221
5219
|
if (!(!i || !d.isValid)) {
|
|
5222
5220
|
c(!0);
|
|
5223
5221
|
try {
|
|
5224
|
-
await r(i) && (
|
|
5222
|
+
await r(i) && (o(""), e());
|
|
5225
5223
|
} finally {
|
|
5226
5224
|
c(!1);
|
|
5227
5225
|
}
|
|
@@ -5370,7 +5368,7 @@ const qs = [
|
|
|
5370
5368
|
gap: "6px"
|
|
5371
5369
|
},
|
|
5372
5370
|
children: [
|
|
5373
|
-
/* @__PURE__ */ n.jsx(
|
|
5371
|
+
/* @__PURE__ */ n.jsx(gs, { size: 16 }),
|
|
5374
5372
|
"Avatar URL"
|
|
5375
5373
|
]
|
|
5376
5374
|
}
|
|
@@ -5383,7 +5381,7 @@ const qs = [
|
|
|
5383
5381
|
id: "avatar-url",
|
|
5384
5382
|
placeholder: "https://example.com/your-avatar.jpg",
|
|
5385
5383
|
value: i,
|
|
5386
|
-
onChange: (u) =>
|
|
5384
|
+
onChange: (u) => o(u.target.value),
|
|
5387
5385
|
style: {
|
|
5388
5386
|
width: "100%",
|
|
5389
5387
|
padding: "14px 16px",
|
|
@@ -5403,7 +5401,7 @@ const qs = [
|
|
|
5403
5401
|
onBlur: (u) => {
|
|
5404
5402
|
u.target.style.borderColor = d.type === "error" ? s.error : d.type === "success" ? s.success : s.border, u.target.style.boxShadow = "none";
|
|
5405
5403
|
},
|
|
5406
|
-
disabled:
|
|
5404
|
+
disabled: a
|
|
5407
5405
|
}
|
|
5408
5406
|
),
|
|
5409
5407
|
/* @__PURE__ */ n.jsx(
|
|
@@ -5416,7 +5414,7 @@ const qs = [
|
|
|
5416
5414
|
transform: "translateY(-50%)",
|
|
5417
5415
|
color: s.textTertiary
|
|
5418
5416
|
},
|
|
5419
|
-
children: /* @__PURE__ */ n.jsx(
|
|
5417
|
+
children: /* @__PURE__ */ n.jsx(or, { size: 18 })
|
|
5420
5418
|
}
|
|
5421
5419
|
)
|
|
5422
5420
|
] }),
|
|
@@ -5433,8 +5431,8 @@ const qs = [
|
|
|
5433
5431
|
},
|
|
5434
5432
|
children: [
|
|
5435
5433
|
d.type === "success" && /* @__PURE__ */ n.jsx(de, { size: 14 }),
|
|
5436
|
-
d.type === "error" && /* @__PURE__ */ n.jsx(
|
|
5437
|
-
d.type === "warning" && /* @__PURE__ */ n.jsx(
|
|
5434
|
+
d.type === "error" && /* @__PURE__ */ n.jsx(se, { size: 14 }),
|
|
5435
|
+
d.type === "warning" && /* @__PURE__ */ n.jsx(se, { size: 14 }),
|
|
5438
5436
|
d.message
|
|
5439
5437
|
]
|
|
5440
5438
|
}
|
|
@@ -5493,7 +5491,7 @@ const qs = [
|
|
|
5493
5491
|
style: {
|
|
5494
5492
|
display: "flex",
|
|
5495
5493
|
gap: "12px",
|
|
5496
|
-
flexDirection:
|
|
5494
|
+
flexDirection: h ? "column-reverse" : "row",
|
|
5497
5495
|
justifyContent: "flex-end",
|
|
5498
5496
|
alignItems: "stretch",
|
|
5499
5497
|
marginTop: "24px"
|
|
@@ -5503,7 +5501,7 @@ const qs = [
|
|
|
5503
5501
|
"button",
|
|
5504
5502
|
{
|
|
5505
5503
|
onClick: e,
|
|
5506
|
-
disabled:
|
|
5504
|
+
disabled: a,
|
|
5507
5505
|
style: {
|
|
5508
5506
|
padding: "10px 24px",
|
|
5509
5507
|
borderRadius: "10px",
|
|
@@ -5512,17 +5510,17 @@ const qs = [
|
|
|
5512
5510
|
color: s.textPrimary,
|
|
5513
5511
|
fontSize: "14px",
|
|
5514
5512
|
fontWeight: 500,
|
|
5515
|
-
cursor:
|
|
5516
|
-
flex:
|
|
5517
|
-
minWidth:
|
|
5518
|
-
opacity:
|
|
5513
|
+
cursor: a ? "not-allowed" : "pointer",
|
|
5514
|
+
flex: h ? "none" : 1,
|
|
5515
|
+
minWidth: h ? "100%" : "120px",
|
|
5516
|
+
opacity: a ? 0.6 : 1,
|
|
5519
5517
|
transition: "all 0.2s ease"
|
|
5520
5518
|
},
|
|
5521
5519
|
onMouseOver: (u) => {
|
|
5522
|
-
|
|
5520
|
+
a || (u.currentTarget.style.backgroundColor = s.border, u.currentTarget.style.transform = "translateY(-1px)");
|
|
5523
5521
|
},
|
|
5524
5522
|
onMouseOut: (u) => {
|
|
5525
|
-
|
|
5523
|
+
a || (u.currentTarget.style.backgroundColor = "transparent", u.currentTarget.style.transform = "translateY(0)");
|
|
5526
5524
|
},
|
|
5527
5525
|
children: "Cancel"
|
|
5528
5526
|
}
|
|
@@ -5531,7 +5529,7 @@ const qs = [
|
|
|
5531
5529
|
"button",
|
|
5532
5530
|
{
|
|
5533
5531
|
onClick: P,
|
|
5534
|
-
disabled:
|
|
5532
|
+
disabled: a || !d.isValid,
|
|
5535
5533
|
style: {
|
|
5536
5534
|
padding: "10px 24px",
|
|
5537
5535
|
borderRadius: "10px",
|
|
@@ -5540,26 +5538,26 @@ const qs = [
|
|
|
5540
5538
|
color: "#fff",
|
|
5541
5539
|
fontSize: "14px",
|
|
5542
5540
|
fontWeight: 600,
|
|
5543
|
-
cursor:
|
|
5544
|
-
flex:
|
|
5545
|
-
minWidth:
|
|
5546
|
-
opacity:
|
|
5541
|
+
cursor: a || !d.isValid ? "not-allowed" : "pointer",
|
|
5542
|
+
flex: h ? "none" : 1,
|
|
5543
|
+
minWidth: h ? "100%" : "140px",
|
|
5544
|
+
opacity: a || !d.isValid ? 0.6 : 1,
|
|
5547
5545
|
display: "flex",
|
|
5548
5546
|
alignItems: "center",
|
|
5549
5547
|
justifyContent: "center",
|
|
5550
5548
|
gap: "8px",
|
|
5551
5549
|
transition: "all 0.2s ease",
|
|
5552
|
-
boxShadow:
|
|
5550
|
+
boxShadow: a || !d.isValid ? "none" : `0 4px 12px ${s.accent}40`
|
|
5553
5551
|
},
|
|
5554
5552
|
onMouseOver: (u) => {
|
|
5555
|
-
!
|
|
5553
|
+
!a && d.isValid && (u.currentTarget.style.transform = "translateY(-1px)", u.currentTarget.style.boxShadow = `0 6px 20px ${s.accent}60`);
|
|
5556
5554
|
},
|
|
5557
5555
|
onMouseOut: (u) => {
|
|
5558
|
-
!
|
|
5556
|
+
!a && d.isValid && (u.currentTarget.style.transform = "translateY(0)", u.currentTarget.style.boxShadow = `0 4px 12px ${s.accent}40`);
|
|
5559
5557
|
},
|
|
5560
|
-
children:
|
|
5558
|
+
children: a ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
5561
5559
|
/* @__PURE__ */ n.jsx(
|
|
5562
|
-
|
|
5560
|
+
ie,
|
|
5563
5561
|
{
|
|
5564
5562
|
size: 16,
|
|
5565
5563
|
style: {
|
|
@@ -5638,48 +5636,48 @@ const qs = [
|
|
|
5638
5636
|
onSuccess: r,
|
|
5639
5637
|
onError: s,
|
|
5640
5638
|
userId: i,
|
|
5641
|
-
colors:
|
|
5639
|
+
colors: o
|
|
5642
5640
|
}) => {
|
|
5643
|
-
const
|
|
5641
|
+
const a = ue(), [c, h] = R({
|
|
5644
5642
|
currentPassword: "",
|
|
5645
5643
|
newPassword: "",
|
|
5646
5644
|
confirmPassword: ""
|
|
5647
|
-
}), [p, d] = R({}), [
|
|
5645
|
+
}), [p, d] = R({}), [m, P] = R(!1), [O, u] = R({
|
|
5648
5646
|
currentPassword: !1,
|
|
5649
5647
|
newPassword: !1,
|
|
5650
5648
|
confirmPassword: !1
|
|
5651
5649
|
}), [w, x] = R(!1);
|
|
5652
5650
|
if (Te.useEffect(() => {
|
|
5653
5651
|
if (typeof window > "u") return;
|
|
5654
|
-
const
|
|
5652
|
+
const g = () => {
|
|
5655
5653
|
x(window.innerWidth < 640);
|
|
5656
5654
|
};
|
|
5657
|
-
return
|
|
5655
|
+
return g(), window.addEventListener("resize", g), () => window.removeEventListener("resize", g);
|
|
5658
5656
|
}, []), !t) return null;
|
|
5659
|
-
const C = (
|
|
5660
|
-
const { name:
|
|
5661
|
-
|
|
5662
|
-
}, T = (
|
|
5663
|
-
u((
|
|
5657
|
+
const C = (g) => {
|
|
5658
|
+
const { name: v, value: L } = g.target;
|
|
5659
|
+
h((_) => ({ ..._, [v]: L })), p[v] && d((_) => ({ ..._, [v]: "" }));
|
|
5660
|
+
}, T = (g) => {
|
|
5661
|
+
u((v) => ({ ...v, [g]: !v[g] }));
|
|
5664
5662
|
}, A = () => {
|
|
5665
|
-
const
|
|
5666
|
-
return c.currentPassword || (
|
|
5667
|
-
}, y = async (
|
|
5668
|
-
if (
|
|
5663
|
+
const g = {};
|
|
5664
|
+
return c.currentPassword || (g.currentPassword = "Current password is required"), c.newPassword ? c.newPassword.length < 6 && (g.newPassword = "Password must be at least 6 characters") : g.newPassword = "New password is required", c.newPassword !== c.confirmPassword && (g.confirmPassword = "Passwords do not match"), d(g), Object.keys(g).length === 0;
|
|
5665
|
+
}, y = async (g) => {
|
|
5666
|
+
if (g.preventDefault(), !!A()) {
|
|
5669
5667
|
P(!0);
|
|
5670
5668
|
try {
|
|
5671
|
-
const { data:
|
|
5669
|
+
const { data: v } = await a.changePassword({
|
|
5672
5670
|
currentPassword: c.currentPassword,
|
|
5673
5671
|
newPassword: c.newPassword,
|
|
5674
5672
|
userId: i
|
|
5675
5673
|
});
|
|
5676
|
-
|
|
5674
|
+
v.success ? (r(v.message || "Password updated successfully"), h({
|
|
5677
5675
|
currentPassword: "",
|
|
5678
5676
|
newPassword: "",
|
|
5679
5677
|
confirmPassword: ""
|
|
5680
|
-
}), e()) : s(
|
|
5681
|
-
} catch (
|
|
5682
|
-
s(
|
|
5678
|
+
}), e()) : s(v.message || "Failed to update password");
|
|
5679
|
+
} catch (v) {
|
|
5680
|
+
s(v.response?.data?.message || "Something went wrong");
|
|
5683
5681
|
} finally {
|
|
5684
5682
|
P(!1);
|
|
5685
5683
|
}
|
|
@@ -5693,12 +5691,12 @@ const qs = [
|
|
|
5693
5691
|
{
|
|
5694
5692
|
field: "newPassword",
|
|
5695
5693
|
label: "New Password",
|
|
5696
|
-
icon: /* @__PURE__ */ n.jsx(
|
|
5694
|
+
icon: /* @__PURE__ */ n.jsx(ge, { size: 18 })
|
|
5697
5695
|
},
|
|
5698
5696
|
{
|
|
5699
5697
|
field: "confirmPassword",
|
|
5700
5698
|
label: "Confirm Password",
|
|
5701
|
-
icon: /* @__PURE__ */ n.jsx(
|
|
5699
|
+
icon: /* @__PURE__ */ n.jsx(ge, { size: 18 })
|
|
5702
5700
|
}
|
|
5703
5701
|
];
|
|
5704
5702
|
return /* @__PURE__ */ n.jsx(
|
|
@@ -5719,8 +5717,8 @@ const qs = [
|
|
|
5719
5717
|
"div",
|
|
5720
5718
|
{
|
|
5721
5719
|
style: {
|
|
5722
|
-
backgroundColor:
|
|
5723
|
-
border: `1px solid ${
|
|
5720
|
+
backgroundColor: o.surface,
|
|
5721
|
+
border: `1px solid ${o.border}`,
|
|
5724
5722
|
borderRadius: "16px",
|
|
5725
5723
|
maxWidth: "440px",
|
|
5726
5724
|
width: "100%",
|
|
@@ -5759,21 +5757,21 @@ const qs = [
|
|
|
5759
5757
|
width: "40px",
|
|
5760
5758
|
height: "40px",
|
|
5761
5759
|
borderRadius: "10px",
|
|
5762
|
-
background: `linear-gradient(135deg, ${
|
|
5760
|
+
background: `linear-gradient(135deg, ${o.accent}20, ${o.accent}40)`,
|
|
5763
5761
|
display: "flex",
|
|
5764
5762
|
alignItems: "center",
|
|
5765
5763
|
justifyContent: "center",
|
|
5766
|
-
color:
|
|
5764
|
+
color: o.accent,
|
|
5767
5765
|
flexShrink: 0
|
|
5768
5766
|
},
|
|
5769
|
-
children: /* @__PURE__ */ n.jsx(
|
|
5767
|
+
children: /* @__PURE__ */ n.jsx(ge, { size: 20 })
|
|
5770
5768
|
}
|
|
5771
5769
|
),
|
|
5772
5770
|
/* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx(
|
|
5773
5771
|
"h3",
|
|
5774
5772
|
{
|
|
5775
5773
|
style: {
|
|
5776
|
-
color:
|
|
5774
|
+
color: o.textPrimary,
|
|
5777
5775
|
margin: 0,
|
|
5778
5776
|
fontSize: "18px",
|
|
5779
5777
|
fontWeight: 600,
|
|
@@ -5793,7 +5791,7 @@ const qs = [
|
|
|
5793
5791
|
style: {
|
|
5794
5792
|
background: "transparent",
|
|
5795
5793
|
border: "none",
|
|
5796
|
-
color:
|
|
5794
|
+
color: o.textTertiary,
|
|
5797
5795
|
cursor: "pointer",
|
|
5798
5796
|
padding: "8px",
|
|
5799
5797
|
borderRadius: "8px",
|
|
@@ -5804,11 +5802,11 @@ const qs = [
|
|
|
5804
5802
|
alignItems: "center",
|
|
5805
5803
|
justifyContent: "center"
|
|
5806
5804
|
},
|
|
5807
|
-
onMouseOver: (
|
|
5808
|
-
|
|
5805
|
+
onMouseOver: (g) => {
|
|
5806
|
+
g.currentTarget.style.backgroundColor = o.border, g.currentTarget.style.color = o.textPrimary;
|
|
5809
5807
|
},
|
|
5810
|
-
onMouseOut: (
|
|
5811
|
-
|
|
5808
|
+
onMouseOut: (g) => {
|
|
5809
|
+
g.currentTarget.style.backgroundColor = "transparent", g.currentTarget.style.color = o.textTertiary;
|
|
5812
5810
|
},
|
|
5813
5811
|
children: /* @__PURE__ */ n.jsx(ze, { size: 20 })
|
|
5814
5812
|
}
|
|
@@ -5817,7 +5815,7 @@ const qs = [
|
|
|
5817
5815
|
}
|
|
5818
5816
|
),
|
|
5819
5817
|
/* @__PURE__ */ n.jsxs("form", { onSubmit: y, children: [
|
|
5820
|
-
U.map(({ field:
|
|
5818
|
+
U.map(({ field: g, label: v, icon: L }) => /* @__PURE__ */ n.jsxs(
|
|
5821
5819
|
"div",
|
|
5822
5820
|
{
|
|
5823
5821
|
style: {
|
|
@@ -5828,16 +5826,16 @@ const qs = [
|
|
|
5828
5826
|
/* @__PURE__ */ n.jsx(
|
|
5829
5827
|
"label",
|
|
5830
5828
|
{
|
|
5831
|
-
htmlFor:
|
|
5829
|
+
htmlFor: g,
|
|
5832
5830
|
style: {
|
|
5833
5831
|
display: "block",
|
|
5834
5832
|
marginBottom: "8px",
|
|
5835
|
-
color:
|
|
5833
|
+
color: o.textPrimary,
|
|
5836
5834
|
fontSize: "14px",
|
|
5837
5835
|
fontWeight: 500,
|
|
5838
5836
|
lineHeight: "1.4"
|
|
5839
5837
|
},
|
|
5840
|
-
children:
|
|
5838
|
+
children: v
|
|
5841
5839
|
}
|
|
5842
5840
|
),
|
|
5843
5841
|
/* @__PURE__ */ n.jsxs("div", { style: { position: "relative" }, children: [
|
|
@@ -5849,7 +5847,7 @@ const qs = [
|
|
|
5849
5847
|
left: "14px",
|
|
5850
5848
|
top: "50%",
|
|
5851
5849
|
transform: "translateY(-50%)",
|
|
5852
|
-
color:
|
|
5850
|
+
color: o.textTertiary,
|
|
5853
5851
|
zIndex: 2
|
|
5854
5852
|
},
|
|
5855
5853
|
children: L
|
|
@@ -5858,29 +5856,29 @@ const qs = [
|
|
|
5858
5856
|
/* @__PURE__ */ n.jsx(
|
|
5859
5857
|
"input",
|
|
5860
5858
|
{
|
|
5861
|
-
type: O[
|
|
5862
|
-
id:
|
|
5863
|
-
name:
|
|
5864
|
-
placeholder: `Enter ${
|
|
5865
|
-
value: c[
|
|
5859
|
+
type: O[g] ? "text" : "password",
|
|
5860
|
+
id: g,
|
|
5861
|
+
name: g,
|
|
5862
|
+
placeholder: `Enter ${v.toLowerCase()}`,
|
|
5863
|
+
value: c[g],
|
|
5866
5864
|
onChange: C,
|
|
5867
5865
|
style: {
|
|
5868
5866
|
width: "100%",
|
|
5869
5867
|
padding: "14px 48px 14px 44px",
|
|
5870
5868
|
borderRadius: "10px",
|
|
5871
|
-
border: `1.5px solid ${p[
|
|
5869
|
+
border: `1.5px solid ${p[g] ? o.error : o.border}`,
|
|
5872
5870
|
backgroundColor: "transparent",
|
|
5873
|
-
color:
|
|
5871
|
+
color: o.textPrimary,
|
|
5874
5872
|
fontSize: "15px",
|
|
5875
5873
|
outline: "none",
|
|
5876
5874
|
transition: "all 0.2s ease",
|
|
5877
5875
|
boxSizing: "border-box"
|
|
5878
5876
|
},
|
|
5879
5877
|
onFocus: (_) => {
|
|
5880
|
-
_.target.style.borderColor =
|
|
5878
|
+
_.target.style.borderColor = o.accent, _.target.style.boxShadow = `0 0 0 3px ${o.accent}20`;
|
|
5881
5879
|
},
|
|
5882
5880
|
onBlur: (_) => {
|
|
5883
|
-
_.target.style.borderColor = p[
|
|
5881
|
+
_.target.style.borderColor = p[g] ? o.error : o.border, _.target.style.boxShadow = "none";
|
|
5884
5882
|
}
|
|
5885
5883
|
}
|
|
5886
5884
|
),
|
|
@@ -5888,7 +5886,7 @@ const qs = [
|
|
|
5888
5886
|
"button",
|
|
5889
5887
|
{
|
|
5890
5888
|
type: "button",
|
|
5891
|
-
onClick: () => T(
|
|
5889
|
+
onClick: () => T(g),
|
|
5892
5890
|
style: {
|
|
5893
5891
|
position: "absolute",
|
|
5894
5892
|
right: "14px",
|
|
@@ -5897,7 +5895,7 @@ const qs = [
|
|
|
5897
5895
|
background: "transparent",
|
|
5898
5896
|
border: "none",
|
|
5899
5897
|
cursor: "pointer",
|
|
5900
|
-
color:
|
|
5898
|
+
color: o.textTertiary,
|
|
5901
5899
|
padding: "4px",
|
|
5902
5900
|
borderRadius: "4px",
|
|
5903
5901
|
width: "32px",
|
|
@@ -5907,21 +5905,21 @@ const qs = [
|
|
|
5907
5905
|
justifyContent: "center"
|
|
5908
5906
|
},
|
|
5909
5907
|
onMouseOver: (_) => {
|
|
5910
|
-
_.currentTarget.style.backgroundColor =
|
|
5908
|
+
_.currentTarget.style.backgroundColor = o.border, _.currentTarget.style.color = o.textPrimary;
|
|
5911
5909
|
},
|
|
5912
5910
|
onMouseOut: (_) => {
|
|
5913
|
-
_.currentTarget.style.backgroundColor = "transparent", _.currentTarget.style.color =
|
|
5911
|
+
_.currentTarget.style.backgroundColor = "transparent", _.currentTarget.style.color = o.textTertiary;
|
|
5914
5912
|
},
|
|
5915
|
-
children: O[
|
|
5913
|
+
children: O[g] ? /* @__PURE__ */ n.jsx(ot, { size: 18 }) : /* @__PURE__ */ n.jsx(lt, { size: 18 })
|
|
5916
5914
|
}
|
|
5917
5915
|
)
|
|
5918
5916
|
] }),
|
|
5919
|
-
p[
|
|
5917
|
+
p[g] && /* @__PURE__ */ n.jsxs(
|
|
5920
5918
|
"div",
|
|
5921
5919
|
{
|
|
5922
5920
|
style: {
|
|
5923
5921
|
fontSize: "13px",
|
|
5924
|
-
color:
|
|
5922
|
+
color: o.error,
|
|
5925
5923
|
marginTop: "6px",
|
|
5926
5924
|
display: "flex",
|
|
5927
5925
|
alignItems: "center",
|
|
@@ -5929,13 +5927,13 @@ const qs = [
|
|
|
5929
5927
|
},
|
|
5930
5928
|
children: [
|
|
5931
5929
|
/* @__PURE__ */ n.jsx("span", { style: { fontSize: "16px" }, children: "⚠" }),
|
|
5932
|
-
p[
|
|
5930
|
+
p[g]
|
|
5933
5931
|
]
|
|
5934
5932
|
}
|
|
5935
5933
|
)
|
|
5936
5934
|
]
|
|
5937
5935
|
},
|
|
5938
|
-
|
|
5936
|
+
g
|
|
5939
5937
|
)),
|
|
5940
5938
|
/* @__PURE__ */ n.jsxs(
|
|
5941
5939
|
"div",
|
|
@@ -5953,26 +5951,26 @@ const qs = [
|
|
|
5953
5951
|
{
|
|
5954
5952
|
type: "button",
|
|
5955
5953
|
onClick: e,
|
|
5956
|
-
disabled:
|
|
5954
|
+
disabled: m,
|
|
5957
5955
|
style: {
|
|
5958
5956
|
padding: "14px 24px",
|
|
5959
5957
|
borderRadius: "10px",
|
|
5960
|
-
border: `1.5px solid ${
|
|
5958
|
+
border: `1.5px solid ${o.border}`,
|
|
5961
5959
|
background: "transparent",
|
|
5962
|
-
color:
|
|
5960
|
+
color: o.textPrimary,
|
|
5963
5961
|
fontSize: "14px",
|
|
5964
5962
|
fontWeight: 500,
|
|
5965
|
-
cursor:
|
|
5963
|
+
cursor: m ? "not-allowed" : "pointer",
|
|
5966
5964
|
flex: w ? "none" : 1,
|
|
5967
5965
|
minWidth: w ? "100%" : "120px",
|
|
5968
|
-
opacity:
|
|
5966
|
+
opacity: m ? 0.6 : 1,
|
|
5969
5967
|
transition: "all 0.2s ease"
|
|
5970
5968
|
},
|
|
5971
|
-
onMouseOver: (
|
|
5972
|
-
|
|
5969
|
+
onMouseOver: (g) => {
|
|
5970
|
+
m || (g.currentTarget.style.backgroundColor = o.border, g.currentTarget.style.transform = "translateY(-1px)");
|
|
5973
5971
|
},
|
|
5974
|
-
onMouseOut: (
|
|
5975
|
-
|
|
5972
|
+
onMouseOut: (g) => {
|
|
5973
|
+
m || (g.currentTarget.style.backgroundColor = "transparent", g.currentTarget.style.transform = "translateY(0)");
|
|
5976
5974
|
},
|
|
5977
5975
|
children: "Cancel"
|
|
5978
5976
|
}
|
|
@@ -5981,35 +5979,35 @@ const qs = [
|
|
|
5981
5979
|
"button",
|
|
5982
5980
|
{
|
|
5983
5981
|
type: "submit",
|
|
5984
|
-
disabled:
|
|
5982
|
+
disabled: m,
|
|
5985
5983
|
style: {
|
|
5986
5984
|
padding: "14px 24px",
|
|
5987
5985
|
borderRadius: "10px",
|
|
5988
5986
|
border: "none",
|
|
5989
|
-
background: `linear-gradient(135deg, ${
|
|
5987
|
+
background: `linear-gradient(135deg, ${o.accent}, ${o.accent}E6)`,
|
|
5990
5988
|
color: "#fff",
|
|
5991
5989
|
fontSize: "14px",
|
|
5992
5990
|
fontWeight: 600,
|
|
5993
|
-
cursor:
|
|
5991
|
+
cursor: m ? "not-allowed" : "pointer",
|
|
5994
5992
|
flex: w ? "none" : 1,
|
|
5995
5993
|
minWidth: w ? "100%" : "140px",
|
|
5996
|
-
opacity:
|
|
5994
|
+
opacity: m ? 0.8 : 1,
|
|
5997
5995
|
display: "flex",
|
|
5998
5996
|
alignItems: "center",
|
|
5999
5997
|
justifyContent: "center",
|
|
6000
5998
|
gap: "8px",
|
|
6001
5999
|
transition: "all 0.2s ease",
|
|
6002
|
-
boxShadow:
|
|
6000
|
+
boxShadow: m ? "none" : `0 4px 12px ${o.accent}40`
|
|
6003
6001
|
},
|
|
6004
|
-
onMouseOver: (
|
|
6005
|
-
|
|
6002
|
+
onMouseOver: (g) => {
|
|
6003
|
+
m || (g.currentTarget.style.transform = "translateY(-1px)", g.currentTarget.style.boxShadow = `0 6px 20px ${o.accent}60`);
|
|
6006
6004
|
},
|
|
6007
|
-
onMouseOut: (
|
|
6008
|
-
|
|
6005
|
+
onMouseOut: (g) => {
|
|
6006
|
+
m || (g.currentTarget.style.transform = "translateY(0)", g.currentTarget.style.boxShadow = `0 4px 12px ${o.accent}40`);
|
|
6009
6007
|
},
|
|
6010
|
-
children:
|
|
6008
|
+
children: m ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
6011
6009
|
/* @__PURE__ */ n.jsx(
|
|
6012
|
-
|
|
6010
|
+
ie,
|
|
6013
6011
|
{
|
|
6014
6012
|
size: 16,
|
|
6015
6013
|
style: {
|
|
@@ -6040,12 +6038,12 @@ const qs = [
|
|
|
6040
6038
|
}
|
|
6041
6039
|
|
|
6042
6040
|
.change-password-modal::-webkit-scrollbar-thumb {
|
|
6043
|
-
background: ${
|
|
6041
|
+
background: ${o.border};
|
|
6044
6042
|
border-radius: 3px;
|
|
6045
6043
|
}
|
|
6046
6044
|
|
|
6047
6045
|
.change-password-modal::-webkit-scrollbar-thumb:hover {
|
|
6048
|
-
background: ${
|
|
6046
|
+
background: ${o.textTertiary};
|
|
6049
6047
|
}
|
|
6050
6048
|
|
|
6051
6049
|
/* Mobile responsiveness */
|
|
@@ -6075,16 +6073,16 @@ const qs = [
|
|
|
6075
6073
|
onVerify: r,
|
|
6076
6074
|
onSendOTP: s,
|
|
6077
6075
|
verifyFormData: i,
|
|
6078
|
-
setVerifyFormData:
|
|
6079
|
-
otpSent:
|
|
6076
|
+
setVerifyFormData: o,
|
|
6077
|
+
otpSent: a,
|
|
6080
6078
|
verifying: c,
|
|
6081
|
-
user:
|
|
6079
|
+
user: h,
|
|
6082
6080
|
colors: p,
|
|
6083
6081
|
darkMode: d
|
|
6084
6082
|
}) => {
|
|
6085
6083
|
if (!t) return null;
|
|
6086
|
-
const
|
|
6087
|
-
e(),
|
|
6084
|
+
const m = () => {
|
|
6085
|
+
e(), o({ email: h?.email || "", otp: "" });
|
|
6088
6086
|
};
|
|
6089
6087
|
return /* @__PURE__ */ n.jsxs(
|
|
6090
6088
|
"div",
|
|
@@ -6108,7 +6106,7 @@ const qs = [
|
|
|
6108
6106
|
/* @__PURE__ */ n.jsx(
|
|
6109
6107
|
"button",
|
|
6110
6108
|
{
|
|
6111
|
-
onClick:
|
|
6109
|
+
onClick: m,
|
|
6112
6110
|
className: "close-btn",
|
|
6113
6111
|
style: { color: p.textTertiary },
|
|
6114
6112
|
"aria-label": "Close verification modal",
|
|
@@ -6126,7 +6124,7 @@ const qs = [
|
|
|
6126
6124
|
{
|
|
6127
6125
|
type: "email",
|
|
6128
6126
|
value: i.email,
|
|
6129
|
-
onChange: (P) =>
|
|
6127
|
+
onChange: (P) => o((O) => ({ ...O, email: P.target.value })),
|
|
6130
6128
|
placeholder: "Enter your email",
|
|
6131
6129
|
style: {
|
|
6132
6130
|
backgroundColor: p.surfaceLight,
|
|
@@ -6140,7 +6138,7 @@ const qs = [
|
|
|
6140
6138
|
)
|
|
6141
6139
|
] })
|
|
6142
6140
|
] }),
|
|
6143
|
-
|
|
6141
|
+
a && /* @__PURE__ */ n.jsxs("div", { className: "form-group", children: [
|
|
6144
6142
|
/* @__PURE__ */ n.jsx("label", { style: { color: p.textSecondary }, children: "OTP" }),
|
|
6145
6143
|
/* @__PURE__ */ n.jsxs("div", { className: "input-container", children: [
|
|
6146
6144
|
/* @__PURE__ */ n.jsx(lr, { size: 18, style: { color: p.textTertiary }, "aria-hidden": "true" }),
|
|
@@ -6149,7 +6147,7 @@ const qs = [
|
|
|
6149
6147
|
{
|
|
6150
6148
|
type: "text",
|
|
6151
6149
|
value: i.otp,
|
|
6152
|
-
onChange: (P) =>
|
|
6150
|
+
onChange: (P) => o((O) => ({ ...O, otp: P.target.value })),
|
|
6153
6151
|
placeholder: "Enter OTP",
|
|
6154
6152
|
style: {
|
|
6155
6153
|
backgroundColor: p.surfaceLight,
|
|
@@ -6163,7 +6161,7 @@ const qs = [
|
|
|
6163
6161
|
)
|
|
6164
6162
|
] })
|
|
6165
6163
|
] }),
|
|
6166
|
-
/* @__PURE__ */ n.jsx("div", { className: "modal-actions", children:
|
|
6164
|
+
/* @__PURE__ */ n.jsx("div", { className: "modal-actions", children: a ? /* @__PURE__ */ n.jsxs(
|
|
6167
6165
|
"button",
|
|
6168
6166
|
{
|
|
6169
6167
|
type: "submit",
|
|
@@ -6175,7 +6173,7 @@ const qs = [
|
|
|
6175
6173
|
},
|
|
6176
6174
|
"aria-label": c ? "Verifying email" : "Verify email",
|
|
6177
6175
|
children: [
|
|
6178
|
-
c ? /* @__PURE__ */ n.jsx(
|
|
6176
|
+
c ? /* @__PURE__ */ n.jsx(ie, { size: 16, className: "spinner", "aria-hidden": "true" }) : /* @__PURE__ */ n.jsx(de, { size: 16, "aria-hidden": "true" }),
|
|
6179
6177
|
c ? "Verifying..." : "Verify Email"
|
|
6180
6178
|
]
|
|
6181
6179
|
}
|
|
@@ -6192,7 +6190,7 @@ const qs = [
|
|
|
6192
6190
|
},
|
|
6193
6191
|
"aria-label": c ? "Sending OTP" : "Send OTP",
|
|
6194
6192
|
children: [
|
|
6195
|
-
c ? /* @__PURE__ */ n.jsx(
|
|
6193
|
+
c ? /* @__PURE__ */ n.jsx(ie, { size: 16, className: "spinner", "aria-hidden": "true" }) : /* @__PURE__ */ n.jsx(ut, { size: 16, "aria-hidden": "true" }),
|
|
6196
6194
|
c ? "Sending..." : "Send OTP"
|
|
6197
6195
|
]
|
|
6198
6196
|
}
|
|
@@ -6352,19 +6350,19 @@ const qs = [
|
|
|
6352
6350
|
]
|
|
6353
6351
|
}
|
|
6354
6352
|
);
|
|
6355
|
-
},
|
|
6353
|
+
}, gi = ({
|
|
6356
6354
|
token: t,
|
|
6357
6355
|
user: e = null,
|
|
6358
6356
|
darkMode: r = !0,
|
|
6359
6357
|
homeUrl: s,
|
|
6360
6358
|
onLogout: i,
|
|
6361
|
-
onVerify:
|
|
6362
|
-
primaryColor:
|
|
6359
|
+
onVerify: o,
|
|
6360
|
+
primaryColor: a = "#00C212"
|
|
6363
6361
|
}) => {
|
|
6364
|
-
const c = ue(), [
|
|
6362
|
+
const c = ue(), [h, p] = R(null), [d, m] = R(e), [P, O] = R(!0), [u, w] = R(!1), [x, C] = R(!1), [T, A] = R(!1), [y, U] = R(!1), [g, v] = R(!1), [L, _] = R(!1), [M, X] = R(!1), [k, V] = R(!1), [z, I] = R(null), [W, Z] = R(!1), [B, K] = R({
|
|
6365
6363
|
email: "",
|
|
6366
6364
|
otp: ""
|
|
6367
|
-
}), [F, l] = R(!1), [b,
|
|
6365
|
+
}), [F, l] = R(!1), [b, S] = R(!1);
|
|
6368
6366
|
te(() => {
|
|
6369
6367
|
if (typeof window < "u") {
|
|
6370
6368
|
const E = () => p(window.innerWidth);
|
|
@@ -6399,7 +6397,7 @@ const qs = [
|
|
|
6399
6397
|
return;
|
|
6400
6398
|
}
|
|
6401
6399
|
try {
|
|
6402
|
-
|
|
6400
|
+
S(!0);
|
|
6403
6401
|
const E = await c.requestEmailVerificationOTP({
|
|
6404
6402
|
userId: d.id,
|
|
6405
6403
|
email: B.email
|
|
@@ -6409,7 +6407,7 @@ const qs = [
|
|
|
6409
6407
|
const D = E?.response?.data?.message || E?.message || "Server error";
|
|
6410
6408
|
j("error", D);
|
|
6411
6409
|
} finally {
|
|
6412
|
-
|
|
6410
|
+
S(!1);
|
|
6413
6411
|
}
|
|
6414
6412
|
}, Y = async (E) => {
|
|
6415
6413
|
if (E.preventDefault(), !B.email || !B.otp) {
|
|
@@ -6421,29 +6419,29 @@ const qs = [
|
|
|
6421
6419
|
return;
|
|
6422
6420
|
}
|
|
6423
6421
|
try {
|
|
6424
|
-
|
|
6422
|
+
S(!0);
|
|
6425
6423
|
const D = await c.verifyEmail({
|
|
6426
6424
|
email: B.email,
|
|
6427
6425
|
otp: B.otp
|
|
6428
6426
|
}), H = D?.data?.success ?? D?.success, Q = D?.data?.message ?? D?.message;
|
|
6429
6427
|
if (H) {
|
|
6430
6428
|
j("success", Q || "Email verified!");
|
|
6431
|
-
const
|
|
6432
|
-
|
|
6433
|
-
const
|
|
6429
|
+
const le = { ...d, isVerified: !0 };
|
|
6430
|
+
m(le);
|
|
6431
|
+
const Se = d?.token ?? "";
|
|
6434
6432
|
localStorage.setItem(
|
|
6435
6433
|
"userInfo",
|
|
6436
|
-
JSON.stringify({ ...
|
|
6437
|
-
), typeof
|
|
6434
|
+
JSON.stringify({ ...le, token: Se })
|
|
6435
|
+
), typeof o == "function" && o(le), K({ email: le.email, otp: "" }), l(!1), _?.(!1);
|
|
6438
6436
|
} else
|
|
6439
6437
|
j("error", Q || "Verification failed");
|
|
6440
6438
|
} catch (D) {
|
|
6441
6439
|
const H = D?.response?.data?.message || D?.message || "Something went wrong";
|
|
6442
6440
|
j("error", H);
|
|
6443
6441
|
} finally {
|
|
6444
|
-
|
|
6442
|
+
S(!1);
|
|
6445
6443
|
}
|
|
6446
|
-
},
|
|
6444
|
+
}, oe = async (E) => {
|
|
6447
6445
|
if (!d) return !1;
|
|
6448
6446
|
try {
|
|
6449
6447
|
const D = await c.updateUser({
|
|
@@ -6458,13 +6456,13 @@ const qs = [
|
|
|
6458
6456
|
// 🔁 merge backend response if present
|
|
6459
6457
|
avatarUrl: E
|
|
6460
6458
|
};
|
|
6461
|
-
return
|
|
6459
|
+
return m(H), j("success", "Avatar updated successfully!"), !0;
|
|
6462
6460
|
}
|
|
6463
6461
|
return j("error", D?.message || "Failed to update avatar"), !1;
|
|
6464
6462
|
} catch (D) {
|
|
6465
6463
|
return console.error("Avatar update error:", D), j("error", "Failed to update avatar"), !1;
|
|
6466
6464
|
}
|
|
6467
|
-
},
|
|
6465
|
+
}, ve = async () => {
|
|
6468
6466
|
if (d) {
|
|
6469
6467
|
C(!0);
|
|
6470
6468
|
try {
|
|
@@ -6480,7 +6478,7 @@ const qs = [
|
|
|
6480
6478
|
// overwrite updated fields
|
|
6481
6479
|
isVerified: H ? !1 : d.isVerified
|
|
6482
6480
|
};
|
|
6483
|
-
|
|
6481
|
+
m(Q), localStorage.setItem("userInfo", JSON.stringify(Q)), j(
|
|
6484
6482
|
"success",
|
|
6485
6483
|
H ? "Email updated. Please verify your new email." : "Profile updated successfully"
|
|
6486
6484
|
), w(!1);
|
|
@@ -6495,7 +6493,7 @@ const qs = [
|
|
|
6495
6493
|
}, Ve = async (E) => {
|
|
6496
6494
|
try {
|
|
6497
6495
|
const D = await c.checkIfUserExists(E);
|
|
6498
|
-
D?.success === !0 && D?.exists === !1 && (console.warn("❌ User does not exist on server. Clearing session..."), localStorage.removeItem("userInfo"),
|
|
6496
|
+
D?.success === !0 && D?.exists === !1 && (console.warn("❌ User does not exist on server. Clearing session..."), localStorage.removeItem("userInfo"), m(null));
|
|
6499
6497
|
} catch (D) {
|
|
6500
6498
|
console.error("⚠️ User validation request failed:", D);
|
|
6501
6499
|
}
|
|
@@ -6508,14 +6506,14 @@ const qs = [
|
|
|
6508
6506
|
if (D.user?.id) {
|
|
6509
6507
|
const H = D.user.id, Q = await c.getUserProfile({ userId: H });
|
|
6510
6508
|
if (Q.user) {
|
|
6511
|
-
const
|
|
6512
|
-
|
|
6509
|
+
const le = Q.user;
|
|
6510
|
+
m(le), Ve(H);
|
|
6513
6511
|
} else
|
|
6514
|
-
|
|
6512
|
+
m(null), localStorage.removeItem("userInfo");
|
|
6515
6513
|
} else
|
|
6516
|
-
|
|
6514
|
+
m(null), localStorage.removeItem("userInfo");
|
|
6517
6515
|
} catch (D) {
|
|
6518
|
-
console.error("User init failed:", D),
|
|
6516
|
+
console.error("User init failed:", D), m(null), localStorage.removeItem("userInfo");
|
|
6519
6517
|
} finally {
|
|
6520
6518
|
O(!1);
|
|
6521
6519
|
}
|
|
@@ -6524,8 +6522,8 @@ const qs = [
|
|
|
6524
6522
|
d?.email && K((E) => ({ ...E, email: d.email }));
|
|
6525
6523
|
}, [d?.email]);
|
|
6526
6524
|
const pt = (E, D) => {
|
|
6527
|
-
let H = parseInt(E.replace("#", ""), 16), Q = (H >> 16) + D,
|
|
6528
|
-
return Q = Math.min(255, Math.max(0, Q)),
|
|
6525
|
+
let H = parseInt(E.replace("#", ""), 16), Q = (H >> 16) + D, le = (H >> 8 & 255) + D, Se = (H & 255) + D;
|
|
6526
|
+
return Q = Math.min(255, Math.max(0, Q)), le = Math.min(255, Math.max(0, le)), Se = Math.min(255, Math.max(0, Se)), `#${(Se | le << 8 | Q << 16).toString(16).padStart(6, "0")}`;
|
|
6529
6527
|
}, $ = r ? {
|
|
6530
6528
|
background: "#000000",
|
|
6531
6529
|
surface: "#09090b",
|
|
@@ -6534,8 +6532,8 @@ const qs = [
|
|
|
6534
6532
|
textPrimary: "#ffffff",
|
|
6535
6533
|
textSecondary: "#d4d4d8",
|
|
6536
6534
|
textTertiary: "#a1a1aa",
|
|
6537
|
-
accent:
|
|
6538
|
-
accentHover: pt(
|
|
6535
|
+
accent: a,
|
|
6536
|
+
accentHover: pt(a, -15),
|
|
6539
6537
|
success: "#10b981",
|
|
6540
6538
|
error: "#ef4444",
|
|
6541
6539
|
border: "#27272a",
|
|
@@ -6548,8 +6546,8 @@ const qs = [
|
|
|
6548
6546
|
textPrimary: "#18181b",
|
|
6549
6547
|
textSecondary: "#52525b",
|
|
6550
6548
|
textTertiary: "#71717a",
|
|
6551
|
-
accent:
|
|
6552
|
-
accentHover: pt(
|
|
6549
|
+
accent: a,
|
|
6550
|
+
accentHover: pt(a, -15),
|
|
6553
6551
|
success: "#10b981",
|
|
6554
6552
|
error: "#ef4444",
|
|
6555
6553
|
border: "#e4e4e7",
|
|
@@ -6580,7 +6578,7 @@ const qs = [
|
|
|
6580
6578
|
},
|
|
6581
6579
|
children: [
|
|
6582
6580
|
/* @__PURE__ */ n.jsx(
|
|
6583
|
-
|
|
6581
|
+
ie,
|
|
6584
6582
|
{
|
|
6585
6583
|
size: 40,
|
|
6586
6584
|
color: $.accent,
|
|
@@ -6618,7 +6616,7 @@ const qs = [
|
|
|
6618
6616
|
textAlign: "center"
|
|
6619
6617
|
},
|
|
6620
6618
|
children: [
|
|
6621
|
-
/* @__PURE__ */ n.jsx(
|
|
6619
|
+
/* @__PURE__ */ n.jsx(se, { size: 40, color: $.error, "aria-hidden": "true" }),
|
|
6622
6620
|
/* @__PURE__ */ n.jsx("p", { style: { color: $.textTertiary, margin: 0 }, children: "No profile found. Please log in again." })
|
|
6623
6621
|
]
|
|
6624
6622
|
}
|
|
@@ -6702,7 +6700,7 @@ const qs = [
|
|
|
6702
6700
|
role: "alert",
|
|
6703
6701
|
"aria-live": "polite",
|
|
6704
6702
|
children: [
|
|
6705
|
-
z.type === "success" ? /* @__PURE__ */ n.jsx(de, { size: 20, "aria-hidden": "true" }) : /* @__PURE__ */ n.jsx(
|
|
6703
|
+
z.type === "success" ? /* @__PURE__ */ n.jsx(de, { size: 20, "aria-hidden": "true" }) : /* @__PURE__ */ n.jsx(se, { size: 20, "aria-hidden": "true" }),
|
|
6706
6704
|
z.message
|
|
6707
6705
|
]
|
|
6708
6706
|
}
|
|
@@ -6723,14 +6721,14 @@ const qs = [
|
|
|
6723
6721
|
display: "grid",
|
|
6724
6722
|
gap: "24px",
|
|
6725
6723
|
gridTemplateColumns: "1fr",
|
|
6726
|
-
...
|
|
6724
|
+
...h && window.innerWidth >= 1024 && {
|
|
6727
6725
|
gridTemplateColumns: "1fr 2fr",
|
|
6728
6726
|
gap: "10px"
|
|
6729
6727
|
},
|
|
6730
|
-
...
|
|
6728
|
+
...h && window.innerWidth >= 768 && h && window.innerWidth < 1024 && {
|
|
6731
6729
|
gap: "10px"
|
|
6732
6730
|
},
|
|
6733
|
-
...
|
|
6731
|
+
...h && window.innerWidth >= 600 && h && window.innerWidth < 768 && {
|
|
6734
6732
|
gap: "28px"
|
|
6735
6733
|
}
|
|
6736
6734
|
},
|
|
@@ -6877,7 +6875,7 @@ const qs = [
|
|
|
6877
6875
|
marginTop: "8px"
|
|
6878
6876
|
},
|
|
6879
6877
|
children: [
|
|
6880
|
-
d.isVerified ? /* @__PURE__ */ n.jsx(de, { size: 16, "aria-hidden": "true" }) : /* @__PURE__ */ n.jsx(
|
|
6878
|
+
d.isVerified ? /* @__PURE__ */ n.jsx(de, { size: 16, "aria-hidden": "true" }) : /* @__PURE__ */ n.jsx(se, { size: 16, "aria-hidden": "true" }),
|
|
6881
6879
|
d.isVerified ? "Email Verified" : "Not Verified"
|
|
6882
6880
|
]
|
|
6883
6881
|
}
|
|
@@ -6915,7 +6913,7 @@ const qs = [
|
|
|
6915
6913
|
gap: "8px",
|
|
6916
6914
|
textDecoration: "none",
|
|
6917
6915
|
minHeight: "36px",
|
|
6918
|
-
flex:
|
|
6916
|
+
flex: h && window.innerWidth < 1024 ? "1" : "auto"
|
|
6919
6917
|
},
|
|
6920
6918
|
children: [
|
|
6921
6919
|
/* @__PURE__ */ n.jsx(ze, { size: 16, "aria-hidden": "true" }),
|
|
@@ -6926,7 +6924,7 @@ const qs = [
|
|
|
6926
6924
|
/* @__PURE__ */ n.jsxs(
|
|
6927
6925
|
"button",
|
|
6928
6926
|
{
|
|
6929
|
-
onClick:
|
|
6927
|
+
onClick: ve,
|
|
6930
6928
|
disabled: x,
|
|
6931
6929
|
style: {
|
|
6932
6930
|
background: `linear-gradient(to right, ${$.accent}, ${$.accentHover})`,
|
|
@@ -6945,11 +6943,11 @@ const qs = [
|
|
|
6945
6943
|
gap: "8px",
|
|
6946
6944
|
textDecoration: "none",
|
|
6947
6945
|
minHeight: "36px",
|
|
6948
|
-
flex:
|
|
6946
|
+
flex: h && window.innerWidth < 1024 ? "1" : "auto"
|
|
6949
6947
|
},
|
|
6950
6948
|
children: [
|
|
6951
6949
|
x ? /* @__PURE__ */ n.jsx(
|
|
6952
|
-
|
|
6950
|
+
ie,
|
|
6953
6951
|
{
|
|
6954
6952
|
size: 16,
|
|
6955
6953
|
style: { animation: "spin 1s linear infinite" },
|
|
@@ -6981,7 +6979,7 @@ const qs = [
|
|
|
6981
6979
|
gap: "8px",
|
|
6982
6980
|
textDecoration: "none",
|
|
6983
6981
|
minHeight: "36px",
|
|
6984
|
-
flex:
|
|
6982
|
+
flex: h && window.innerWidth < 1024 ? "1" : "auto"
|
|
6985
6983
|
},
|
|
6986
6984
|
children: [
|
|
6987
6985
|
/* @__PURE__ */ n.jsx(Ts, { size: 16, "aria-hidden": "true" }),
|
|
@@ -7011,11 +7009,11 @@ const qs = [
|
|
|
7011
7009
|
gap: "8px",
|
|
7012
7010
|
minHeight: "36px",
|
|
7013
7011
|
opacity: W ? 0.7 : 1,
|
|
7014
|
-
flex:
|
|
7012
|
+
flex: h && window.innerWidth < 1024 ? "1" : "auto"
|
|
7015
7013
|
},
|
|
7016
7014
|
children: [
|
|
7017
7015
|
W ? /* @__PURE__ */ n.jsx(
|
|
7018
|
-
|
|
7016
|
+
ie,
|
|
7019
7017
|
{
|
|
7020
7018
|
size: 14,
|
|
7021
7019
|
style: { animation: "spin 1s linear infinite" },
|
|
@@ -7139,7 +7137,7 @@ const qs = [
|
|
|
7139
7137
|
"button",
|
|
7140
7138
|
{
|
|
7141
7139
|
onClick: () => {
|
|
7142
|
-
|
|
7140
|
+
v(!0), G();
|
|
7143
7141
|
},
|
|
7144
7142
|
style: {
|
|
7145
7143
|
width: "100%",
|
|
@@ -7221,7 +7219,7 @@ const qs = [
|
|
|
7221
7219
|
display: "grid",
|
|
7222
7220
|
gap: "20px",
|
|
7223
7221
|
gridTemplateColumns: "1fr",
|
|
7224
|
-
...
|
|
7222
|
+
...h && window.innerWidth >= 600 && {
|
|
7225
7223
|
gridTemplateColumns: "1fr 1fr",
|
|
7226
7224
|
gap: "20px"
|
|
7227
7225
|
}
|
|
@@ -7260,13 +7258,13 @@ const qs = [
|
|
|
7260
7258
|
type: E.type,
|
|
7261
7259
|
name: E.name,
|
|
7262
7260
|
value: d[E.name],
|
|
7263
|
-
onChange: (H) =>
|
|
7261
|
+
onChange: (H) => m(
|
|
7264
7262
|
(Q) => Q && { ...Q, [H.target.name]: H.target.value }
|
|
7265
7263
|
),
|
|
7266
7264
|
style: {
|
|
7267
7265
|
padding: "12px",
|
|
7268
7266
|
borderRadius: "8px",
|
|
7269
|
-
border: `1px solid ${
|
|
7267
|
+
border: `1px solid ${a}`,
|
|
7270
7268
|
backgroundColor: "transparent",
|
|
7271
7269
|
color: $.textPrimary,
|
|
7272
7270
|
fontSize: "12px",
|
|
@@ -7394,7 +7392,7 @@ const qs = [
|
|
|
7394
7392
|
/* @__PURE__ */ n.jsx(de, { size: 16, "aria-hidden": "true" }),
|
|
7395
7393
|
"Verified"
|
|
7396
7394
|
] }) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
7397
|
-
/* @__PURE__ */ n.jsx(
|
|
7395
|
+
/* @__PURE__ */ n.jsx(se, { size: 16, "aria-hidden": "true" }),
|
|
7398
7396
|
"Not Verified"
|
|
7399
7397
|
] })
|
|
7400
7398
|
}
|
|
@@ -7444,7 +7442,7 @@ const qs = [
|
|
|
7444
7442
|
onClose: () => {
|
|
7445
7443
|
A(!1);
|
|
7446
7444
|
},
|
|
7447
|
-
onUpdate:
|
|
7445
|
+
onUpdate: oe,
|
|
7448
7446
|
colors: $
|
|
7449
7447
|
}
|
|
7450
7448
|
),
|
|
@@ -7464,8 +7462,8 @@ const qs = [
|
|
|
7464
7462
|
{
|
|
7465
7463
|
userId: d.id,
|
|
7466
7464
|
token: t,
|
|
7467
|
-
isOpen:
|
|
7468
|
-
onClose: () =>
|
|
7465
|
+
isOpen: g,
|
|
7466
|
+
onClose: () => v(!1),
|
|
7469
7467
|
onSuccess: (E) => j("success", E),
|
|
7470
7468
|
onError: (E) => j("error", E),
|
|
7471
7469
|
colors: $
|
|
@@ -7587,21 +7585,21 @@ const qs = [
|
|
|
7587
7585
|
onLogout: r,
|
|
7588
7586
|
varient: s = "classic",
|
|
7589
7587
|
propUser: i,
|
|
7590
|
-
className:
|
|
7588
|
+
className: o = "",
|
|
7591
7589
|
// New URL props with defaults
|
|
7592
|
-
profileUrl:
|
|
7590
|
+
profileUrl: a,
|
|
7593
7591
|
settingsUrl: c,
|
|
7594
7592
|
// Menu item visibility with defaults
|
|
7595
|
-
showProfileMenuItem:
|
|
7593
|
+
showProfileMenuItem: h = !0,
|
|
7596
7594
|
showSettingsMenuItem: p = !0,
|
|
7597
7595
|
showViewProfileMenuItem: d = !0,
|
|
7598
7596
|
// Custom labels with defaults
|
|
7599
|
-
profileLabel:
|
|
7597
|
+
profileLabel: m = "My Profile",
|
|
7600
7598
|
settingsLabel: P = "Settings",
|
|
7601
7599
|
viewProfileLabel: O = "View Profile",
|
|
7602
7600
|
logoutLabel: u = "Sign Out"
|
|
7603
7601
|
}) => {
|
|
7604
|
-
const w = ue(), [x, C] = R(!1), [T, A] = R(null), [y, U] = R(!0), [
|
|
7602
|
+
const w = ue(), [x, C] = R(!1), [T, A] = R(null), [y, U] = R(!0), [g, v] = R(null), L = ft(null), _ = ft(null), [M, X] = R(!1), [k, V] = R(!1);
|
|
7605
7603
|
te(() => {
|
|
7606
7604
|
if (typeof window > "u") return;
|
|
7607
7605
|
const l = () => {
|
|
@@ -7612,27 +7610,27 @@ const qs = [
|
|
|
7612
7610
|
let l = !0;
|
|
7613
7611
|
return (async () => {
|
|
7614
7612
|
try {
|
|
7615
|
-
if (U(!0),
|
|
7613
|
+
if (U(!0), v(null), i) {
|
|
7616
7614
|
if (!i.id || !i.name || !i.email)
|
|
7617
7615
|
throw new Error("Invalid user data provided");
|
|
7618
7616
|
l && A(i);
|
|
7619
7617
|
return;
|
|
7620
7618
|
}
|
|
7621
|
-
const
|
|
7619
|
+
const S = await w.checkUserSession();
|
|
7622
7620
|
if (!l) return;
|
|
7623
|
-
if (!
|
|
7621
|
+
if (!S?.authenticated || !S.user) {
|
|
7624
7622
|
A(null);
|
|
7625
7623
|
return;
|
|
7626
7624
|
}
|
|
7627
7625
|
const j = {
|
|
7628
|
-
id:
|
|
7629
|
-
email:
|
|
7630
|
-
name:
|
|
7626
|
+
id: S.user.id,
|
|
7627
|
+
email: S.user.email,
|
|
7628
|
+
name: S.user.email.split("@")[0]
|
|
7631
7629
|
// fallback until backend sends name
|
|
7632
7630
|
};
|
|
7633
7631
|
A(j);
|
|
7634
|
-
} catch (
|
|
7635
|
-
console.error("User initialization failed:",
|
|
7632
|
+
} catch (S) {
|
|
7633
|
+
console.error("User initialization failed:", S), l && (A(null), v(S.message || "Failed to load user"));
|
|
7636
7634
|
} finally {
|
|
7637
7635
|
l && U(!1);
|
|
7638
7636
|
}
|
|
@@ -7643,10 +7641,10 @@ const qs = [
|
|
|
7643
7641
|
if (typeof window > "u") return;
|
|
7644
7642
|
const l = () => {
|
|
7645
7643
|
if (!x || !_.current) return;
|
|
7646
|
-
const b = _.current.getBoundingClientRect(),
|
|
7644
|
+
const b = _.current.getBoundingClientRect(), S = window.innerWidth, j = window.innerHeight, G = 280, pe = S - b.right, Y = b.left;
|
|
7647
7645
|
j - b.bottom;
|
|
7648
|
-
const
|
|
7649
|
-
X(
|
|
7646
|
+
const oe = pe >= G || pe > Y;
|
|
7647
|
+
X(oe);
|
|
7650
7648
|
};
|
|
7651
7649
|
return l(), window.addEventListener("resize", l), () => window.removeEventListener("resize", l);
|
|
7652
7650
|
}, [x]), te(() => {
|
|
@@ -7656,11 +7654,11 @@ const qs = [
|
|
|
7656
7654
|
L.current && !L.current.contains(j.target) && !_.current?.contains(j.target) && C(!1);
|
|
7657
7655
|
}, b = (j) => {
|
|
7658
7656
|
j.key === "Escape" && C(!1);
|
|
7659
|
-
},
|
|
7657
|
+
}, S = () => {
|
|
7660
7658
|
x && C(!1);
|
|
7661
7659
|
};
|
|
7662
|
-
return x && (document.addEventListener("mousedown", l), document.addEventListener("keydown", b), window.addEventListener("scroll",
|
|
7663
|
-
document.removeEventListener("mousedown", l), document.removeEventListener("keydown", b), window.removeEventListener("scroll",
|
|
7660
|
+
return x && (document.addEventListener("mousedown", l), document.addEventListener("keydown", b), window.addEventListener("scroll", S)), () => {
|
|
7661
|
+
document.removeEventListener("mousedown", l), document.removeEventListener("keydown", b), window.removeEventListener("scroll", S);
|
|
7664
7662
|
};
|
|
7665
7663
|
}, [x]);
|
|
7666
7664
|
const z = t ? {
|
|
@@ -7880,7 +7878,7 @@ const qs = [
|
|
|
7880
7878
|
transition: "background-color 0.2s ease"
|
|
7881
7879
|
}
|
|
7882
7880
|
}, W = async () => {
|
|
7883
|
-
|
|
7881
|
+
v(null), U(!0);
|
|
7884
7882
|
try {
|
|
7885
7883
|
if (i) {
|
|
7886
7884
|
if (!i.id || !i.name || !i.email)
|
|
@@ -7890,7 +7888,7 @@ const qs = [
|
|
|
7890
7888
|
}
|
|
7891
7889
|
const l = await w.checkUserSession();
|
|
7892
7890
|
if (!l?.authenticated || !l.user) {
|
|
7893
|
-
A(null),
|
|
7891
|
+
A(null), v("User is not authenticated");
|
|
7894
7892
|
return;
|
|
7895
7893
|
}
|
|
7896
7894
|
const b = {
|
|
@@ -7901,13 +7899,13 @@ const qs = [
|
|
|
7901
7899
|
};
|
|
7902
7900
|
A(b);
|
|
7903
7901
|
} catch (l) {
|
|
7904
|
-
console.error("Retry failed:", l), A(null),
|
|
7902
|
+
console.error("Retry failed:", l), A(null), v(l.message || "Failed to reload user");
|
|
7905
7903
|
} finally {
|
|
7906
7904
|
U(!1);
|
|
7907
7905
|
}
|
|
7908
7906
|
}, Z = (l, b) => {
|
|
7909
7907
|
(l.key === "Enter" || l.key === " ") && (l.preventDefault(), b());
|
|
7910
|
-
}, B = () =>
|
|
7908
|
+
}, B = () => a || T?.profileUrl, K = () => {
|
|
7911
7909
|
const l = B();
|
|
7912
7910
|
l && window.open(l, "_self", "noopener,noreferrer");
|
|
7913
7911
|
}, F = () => {
|
|
@@ -7918,7 +7916,7 @@ const qs = [
|
|
|
7918
7916
|
{
|
|
7919
7917
|
style: I.wrapper,
|
|
7920
7918
|
ref: L,
|
|
7921
|
-
className:
|
|
7919
|
+
className: o,
|
|
7922
7920
|
role: "menu",
|
|
7923
7921
|
"aria-label": "User menu",
|
|
7924
7922
|
children: [
|
|
@@ -8060,7 +8058,7 @@ const qs = [
|
|
|
8060
8058
|
] })
|
|
8061
8059
|
] }),
|
|
8062
8060
|
/* @__PURE__ */ n.jsxs("div", { style: I.dropdownSection, children: [
|
|
8063
|
-
|
|
8061
|
+
h && B() && /* @__PURE__ */ n.jsxs(
|
|
8064
8062
|
"button",
|
|
8065
8063
|
{
|
|
8066
8064
|
style: I.menuItem,
|
|
@@ -8076,7 +8074,7 @@ const qs = [
|
|
|
8076
8074
|
tabIndex: 0,
|
|
8077
8075
|
children: [
|
|
8078
8076
|
/* @__PURE__ */ n.jsx(be, { style: I.icon, "aria-hidden": "true" }),
|
|
8079
|
-
/* @__PURE__ */ n.jsx("span", { style: I.menuItemText, children:
|
|
8077
|
+
/* @__PURE__ */ n.jsx("span", { style: I.menuItemText, children: m })
|
|
8080
8078
|
]
|
|
8081
8079
|
}
|
|
8082
8080
|
),
|
|
@@ -8154,12 +8152,12 @@ const qs = [
|
|
|
8154
8152
|
{
|
|
8155
8153
|
style: { display: "flex", alignItems: "center", gap: "8px" },
|
|
8156
8154
|
children: [
|
|
8157
|
-
/* @__PURE__ */ n.jsx(
|
|
8158
|
-
/* @__PURE__ */ n.jsx("span", { children:
|
|
8155
|
+
/* @__PURE__ */ n.jsx(se, { size: 16, "aria-hidden": "true" }),
|
|
8156
|
+
/* @__PURE__ */ n.jsx("span", { children: g || "Not signed in" })
|
|
8159
8157
|
]
|
|
8160
8158
|
}
|
|
8161
8159
|
),
|
|
8162
|
-
|
|
8160
|
+
g && g !== "Not signed in" && /* @__PURE__ */ n.jsx(
|
|
8163
8161
|
"button",
|
|
8164
8162
|
{
|
|
8165
8163
|
style: I.retryButton,
|
|
@@ -8202,23 +8200,23 @@ const qs = [
|
|
|
8202
8200
|
gap: 5
|
|
8203
8201
|
},
|
|
8204
8202
|
children: [
|
|
8205
|
-
/* @__PURE__ */ n.jsx(
|
|
8203
|
+
/* @__PURE__ */ n.jsx(se, { size: 24, style: { marginBottom: 8 } }),
|
|
8206
8204
|
/* @__PURE__ */ n.jsx("p", { style: { margin: 0 }, children: "User data is required to verify email." })
|
|
8207
8205
|
]
|
|
8208
8206
|
}
|
|
8209
8207
|
);
|
|
8210
|
-
const [
|
|
8208
|
+
const [o, a] = R(!1), [c, h] = R({
|
|
8211
8209
|
email: t?.email || "",
|
|
8212
8210
|
otp: ""
|
|
8213
|
-
}), [p, d] = R(!1), [
|
|
8211
|
+
}), [p, d] = R(!1), [m, P] = R(!1), [O, u] = R(null);
|
|
8214
8212
|
Te.useEffect(() => {
|
|
8215
8213
|
if (typeof window < "u") {
|
|
8216
|
-
const
|
|
8217
|
-
return
|
|
8214
|
+
const g = () => a(window.innerWidth < 768);
|
|
8215
|
+
return g(), window.addEventListener("resize", g), () => window.removeEventListener("resize", g);
|
|
8218
8216
|
}
|
|
8219
8217
|
}, []);
|
|
8220
|
-
const w = (
|
|
8221
|
-
let L = parseInt(
|
|
8218
|
+
const w = (g, v) => {
|
|
8219
|
+
let L = parseInt(g.replace("#", ""), 16), _ = (L >> 16) + v, M = (L >> 8 & 255) + v, X = (L & 255) + v;
|
|
8222
8220
|
return _ = Math.min(255, Math.max(0, _)), M = Math.min(255, Math.max(0, M)), X = Math.min(255, Math.max(0, X)), `#${(X | M << 8 | _ << 16).toString(16).padStart(6, "0")}`;
|
|
8223
8221
|
}, x = e ? {
|
|
8224
8222
|
surface: "#000000",
|
|
@@ -8242,10 +8240,10 @@ const qs = [
|
|
|
8242
8240
|
warning: "#d97706"
|
|
8243
8241
|
};
|
|
8244
8242
|
te(() => {
|
|
8245
|
-
t?.email &&
|
|
8243
|
+
t?.email && h((g) => ({ ...g, email: t.email }));
|
|
8246
8244
|
}, [t?.email]);
|
|
8247
|
-
const C = (
|
|
8248
|
-
u({ type:
|
|
8245
|
+
const C = (g, v) => {
|
|
8246
|
+
u({ type: g, message: v }), setTimeout(() => u(null), 3e3);
|
|
8249
8247
|
}, T = async () => {
|
|
8250
8248
|
if (!c.email || !/\S+@\S+\.\S+/.test(c.email)) {
|
|
8251
8249
|
C("error", "Please enter a valid email");
|
|
@@ -8257,40 +8255,40 @@ const qs = [
|
|
|
8257
8255
|
}
|
|
8258
8256
|
try {
|
|
8259
8257
|
P(!0);
|
|
8260
|
-
const
|
|
8258
|
+
const g = await i.requestEmailVerificationOTP({
|
|
8261
8259
|
userId: t.id,
|
|
8262
8260
|
email: c.email
|
|
8263
8261
|
});
|
|
8264
|
-
if (console.log("Send OTP response:",
|
|
8265
|
-
const
|
|
8266
|
-
C("success",
|
|
8262
|
+
if (console.log("Send OTP response:", g), g.success || g.data?.success) {
|
|
8263
|
+
const v = g.message || g.data?.message || "OTP sent!";
|
|
8264
|
+
C("success", v), d(!0);
|
|
8267
8265
|
} else {
|
|
8268
|
-
const
|
|
8269
|
-
C("error",
|
|
8266
|
+
const v = g.message || g.data?.message || "Failed to send OTP";
|
|
8267
|
+
C("error", v);
|
|
8270
8268
|
}
|
|
8271
|
-
} catch (
|
|
8272
|
-
console.error("Send OTP error:",
|
|
8269
|
+
} catch (g) {
|
|
8270
|
+
console.error("Send OTP error:", g), C("error", g.message || "Server error");
|
|
8273
8271
|
} finally {
|
|
8274
8272
|
P(!1);
|
|
8275
8273
|
}
|
|
8276
|
-
}, A = async (
|
|
8277
|
-
if (
|
|
8274
|
+
}, A = async (g) => {
|
|
8275
|
+
if (g.preventDefault(), !c.email || !c.otp) {
|
|
8278
8276
|
C("error", "Please fill in all fields");
|
|
8279
8277
|
return;
|
|
8280
8278
|
}
|
|
8281
8279
|
try {
|
|
8282
8280
|
P(!0);
|
|
8283
|
-
const
|
|
8281
|
+
const v = await i.verifyEmail({
|
|
8284
8282
|
email: c.email,
|
|
8285
8283
|
otp: c.otp
|
|
8286
8284
|
});
|
|
8287
|
-
if (
|
|
8285
|
+
if (v.success) {
|
|
8288
8286
|
const L = { ...t, isVerified: !0 };
|
|
8289
|
-
s?.(L), C("success",
|
|
8287
|
+
s?.(L), C("success", v.message || "Email verified!"), d(!1), h({ email: t.email, otp: "" });
|
|
8290
8288
|
} else
|
|
8291
|
-
C("error",
|
|
8292
|
-
} catch (
|
|
8293
|
-
C("error",
|
|
8289
|
+
C("error", v.message || "Verification failed");
|
|
8290
|
+
} catch (v) {
|
|
8291
|
+
C("error", v.message || "Server error");
|
|
8294
8292
|
} finally {
|
|
8295
8293
|
P(!1);
|
|
8296
8294
|
}
|
|
@@ -8303,15 +8301,15 @@ const qs = [
|
|
|
8303
8301
|
color: x.textPrimary,
|
|
8304
8302
|
fontSize: 14,
|
|
8305
8303
|
outline: "none"
|
|
8306
|
-
}, U = (
|
|
8304
|
+
}, U = (g = !1) => ({
|
|
8307
8305
|
flex: 1,
|
|
8308
8306
|
padding: 12,
|
|
8309
8307
|
borderRadius: 8,
|
|
8310
8308
|
color: "#fff",
|
|
8311
8309
|
fontWeight: 500,
|
|
8312
|
-
cursor:
|
|
8310
|
+
cursor: g ? "not-allowed" : "pointer",
|
|
8313
8311
|
background: `linear-gradient(to right, ${x.accent}, ${x.accentHover})`,
|
|
8314
|
-
opacity:
|
|
8312
|
+
opacity: g ? 0.7 : 1,
|
|
8315
8313
|
display: "flex",
|
|
8316
8314
|
alignItems: "center",
|
|
8317
8315
|
justifyContent: "center",
|
|
@@ -8325,7 +8323,7 @@ const qs = [
|
|
|
8325
8323
|
onSubmit: A,
|
|
8326
8324
|
style: {
|
|
8327
8325
|
width: "100%",
|
|
8328
|
-
maxWidth:
|
|
8326
|
+
maxWidth: o ? "340px" : "400px",
|
|
8329
8327
|
display: "flex",
|
|
8330
8328
|
flexDirection: "column",
|
|
8331
8329
|
gap: 20,
|
|
@@ -8390,7 +8388,7 @@ const qs = [
|
|
|
8390
8388
|
gap: 8
|
|
8391
8389
|
},
|
|
8392
8390
|
children: [
|
|
8393
|
-
O.type === "success" ? /* @__PURE__ */ n.jsx(de, { size: 16 }) : /* @__PURE__ */ n.jsx(
|
|
8391
|
+
O.type === "success" ? /* @__PURE__ */ n.jsx(de, { size: 16 }) : /* @__PURE__ */ n.jsx(se, { size: 16 }),
|
|
8394
8392
|
O.message
|
|
8395
8393
|
]
|
|
8396
8394
|
}
|
|
@@ -8422,7 +8420,7 @@ const qs = [
|
|
|
8422
8420
|
{
|
|
8423
8421
|
type: "email",
|
|
8424
8422
|
value: c.email,
|
|
8425
|
-
onChange: (
|
|
8423
|
+
onChange: (g) => h((v) => ({ ...v, email: g.target.value })),
|
|
8426
8424
|
placeholder: "Enter your email",
|
|
8427
8425
|
style: {
|
|
8428
8426
|
...y,
|
|
@@ -8473,7 +8471,7 @@ const qs = [
|
|
|
8473
8471
|
{
|
|
8474
8472
|
type: "text",
|
|
8475
8473
|
value: c.otp,
|
|
8476
|
-
onChange: (
|
|
8474
|
+
onChange: (g) => h((v) => ({ ...v, otp: g.target.value })),
|
|
8477
8475
|
placeholder: "Enter OTP",
|
|
8478
8476
|
style: {
|
|
8479
8477
|
...y,
|
|
@@ -8500,16 +8498,16 @@ const qs = [
|
|
|
8500
8498
|
"button",
|
|
8501
8499
|
{
|
|
8502
8500
|
type: "submit",
|
|
8503
|
-
disabled:
|
|
8501
|
+
disabled: m,
|
|
8504
8502
|
style: {
|
|
8505
|
-
...U(
|
|
8503
|
+
...U(m),
|
|
8506
8504
|
borderRadius: 12,
|
|
8507
8505
|
padding: "12px 16px",
|
|
8508
8506
|
fontSize: 14
|
|
8509
8507
|
},
|
|
8510
8508
|
children: [
|
|
8511
|
-
|
|
8512
|
-
|
|
8509
|
+
m ? /* @__PURE__ */ n.jsx(ie, { size: 16, className: "spinner" }) : /* @__PURE__ */ n.jsx(de, { size: 16 }),
|
|
8510
|
+
m ? "Verifying..." : "Verify Email"
|
|
8513
8511
|
]
|
|
8514
8512
|
}
|
|
8515
8513
|
) : /* @__PURE__ */ n.jsxs(
|
|
@@ -8517,16 +8515,16 @@ const qs = [
|
|
|
8517
8515
|
{
|
|
8518
8516
|
type: "button",
|
|
8519
8517
|
onClick: T,
|
|
8520
|
-
disabled:
|
|
8518
|
+
disabled: m || !t?.id,
|
|
8521
8519
|
style: {
|
|
8522
|
-
...U(
|
|
8520
|
+
...U(m),
|
|
8523
8521
|
borderRadius: 12,
|
|
8524
8522
|
padding: "12px 16px",
|
|
8525
8523
|
fontSize: 14
|
|
8526
8524
|
},
|
|
8527
8525
|
children: [
|
|
8528
|
-
|
|
8529
|
-
|
|
8526
|
+
m ? /* @__PURE__ */ n.jsx(ie, { size: 16, className: "spinner" }) : /* @__PURE__ */ n.jsx(ut, { size: 16 }),
|
|
8527
|
+
m ? "Sending..." : "Send OTP"
|
|
8530
8528
|
]
|
|
8531
8529
|
}
|
|
8532
8530
|
) })
|
|
@@ -8547,10 +8545,10 @@ export {
|
|
|
8547
8545
|
ui as NeuctraAuthix,
|
|
8548
8546
|
bi as ReactEmailVerification,
|
|
8549
8547
|
hi as ReactSignedIn,
|
|
8550
|
-
|
|
8548
|
+
mi as ReactSignedOut,
|
|
8551
8549
|
yi as ReactUserButton,
|
|
8552
8550
|
xi as ReactUserLogin,
|
|
8553
|
-
|
|
8551
|
+
gi as ReactUserProfile,
|
|
8554
8552
|
fi as ReactUserSignUp,
|
|
8555
8553
|
ji as getSdkConfig,
|
|
8556
8554
|
wi as setSdkConfig
|