@neuctra/authix 1.2.8 → 1.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/neuctra-authix.es.js +707 -689
- package/dist/neuctra-authix.umd.js +47 -47
- package/dist/sdk/index.d.ts +6 -1
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/interfaces.d.ts +4 -0
- package/dist/sdk/interfaces.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -4,23 +4,23 @@ function At(t, e) {
|
|
|
4
4
|
return t.apply(e, arguments);
|
|
5
5
|
};
|
|
6
6
|
}
|
|
7
|
-
const { toString: ur } = Object.prototype, { getPrototypeOf: rt } = Object, { iterator:
|
|
7
|
+
const { toString: ur } = Object.prototype, { getPrototypeOf: rt } = Object, { iterator: Fe, toStringTag: _t } = Symbol, Le = /* @__PURE__ */ ((t) => (e) => {
|
|
8
8
|
const n = ur.call(e);
|
|
9
9
|
return t[n] || (t[n] = n.slice(8, -1).toLowerCase());
|
|
10
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
10
|
+
})(/* @__PURE__ */ Object.create(null)), ie = (t) => (t = t.toLowerCase(), (e) => Le(e) === t), qe = (t) => (e) => typeof e === t, { isArray: je } = Array, be = qe("undefined");
|
|
11
11
|
function Te(t) {
|
|
12
12
|
return t !== null && !be(t) && t.constructor !== null && !be(t.constructor) && te(t.constructor.isBuffer) && t.constructor.isBuffer(t);
|
|
13
13
|
}
|
|
14
|
-
const Ut =
|
|
14
|
+
const Ut = ie("ArrayBuffer");
|
|
15
15
|
function pr(t) {
|
|
16
16
|
let e;
|
|
17
17
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && Ut(t.buffer), e;
|
|
18
18
|
}
|
|
19
19
|
const fr = qe("string"), te = qe("function"), $t = qe("number"), Re = (t) => t !== null && typeof t == "object", xr = (t) => t === !0 || t === !1, _e = (t) => {
|
|
20
|
-
if (
|
|
20
|
+
if (Le(t) !== "object")
|
|
21
21
|
return !1;
|
|
22
22
|
const e = rt(t);
|
|
23
|
-
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(_t in t) && !(
|
|
23
|
+
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(_t in t) && !(Fe in t);
|
|
24
24
|
}, hr = (t) => {
|
|
25
25
|
if (!Re(t) || Te(t))
|
|
26
26
|
return !1;
|
|
@@ -29,25 +29,25 @@ const fr = qe("string"), te = qe("function"), $t = qe("number"), Re = (t) => t !
|
|
|
29
29
|
} catch {
|
|
30
30
|
return !1;
|
|
31
31
|
}
|
|
32
|
-
}, mr =
|
|
32
|
+
}, mr = ie("Date"), gr = ie("File"), yr = ie("Blob"), br = ie("FileList"), wr = (t) => Re(t) && te(t.pipe), jr = (t) => {
|
|
33
33
|
let e;
|
|
34
|
-
return t && (typeof FormData == "function" && t instanceof FormData || te(t.append) && ((e =
|
|
34
|
+
return t && (typeof FormData == "function" && t instanceof FormData || te(t.append) && ((e = Le(t)) === "formdata" || // detect form-data instance
|
|
35
35
|
e === "object" && te(t.toString) && t.toString() === "[object FormData]"));
|
|
36
|
-
}, vr =
|
|
36
|
+
}, vr = ie("URLSearchParams"), [Sr, kr, Er, Cr] = ["ReadableStream", "Request", "Response", "Headers"].map(ie), Tr = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
37
37
|
function Pe(t, e, { allOwnKeys: n = !1 } = {}) {
|
|
38
38
|
if (t === null || typeof t > "u")
|
|
39
39
|
return;
|
|
40
|
-
let s,
|
|
40
|
+
let s, a;
|
|
41
41
|
if (typeof t != "object" && (t = [t]), je(t))
|
|
42
|
-
for (s = 0,
|
|
42
|
+
for (s = 0, a = t.length; s < a; s++)
|
|
43
43
|
e.call(null, t[s], s, t);
|
|
44
44
|
else {
|
|
45
45
|
if (Te(t))
|
|
46
46
|
return;
|
|
47
|
-
const
|
|
47
|
+
const i = n ? Object.getOwnPropertyNames(t) : Object.keys(t), o = i.length;
|
|
48
48
|
let c;
|
|
49
49
|
for (s = 0; s < o; s++)
|
|
50
|
-
c =
|
|
50
|
+
c = i[s], e.call(null, t[c], c, t);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
function Dt(t, e) {
|
|
@@ -55,35 +55,35 @@ function Dt(t, e) {
|
|
|
55
55
|
return null;
|
|
56
56
|
e = e.toLowerCase();
|
|
57
57
|
const n = Object.keys(t);
|
|
58
|
-
let s = n.length,
|
|
58
|
+
let s = n.length, a;
|
|
59
59
|
for (; s-- > 0; )
|
|
60
|
-
if (
|
|
61
|
-
return
|
|
60
|
+
if (a = n[s], e === a.toLowerCase())
|
|
61
|
+
return a;
|
|
62
62
|
return null;
|
|
63
63
|
}
|
|
64
64
|
const xe = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Nt = (t) => !be(t) && t !== xe;
|
|
65
65
|
function Ge() {
|
|
66
|
-
const { caseless: t, skipUndefined: e } = Nt(this) && this || {}, n = {}, s = (
|
|
67
|
-
const o = t && Dt(n,
|
|
68
|
-
_e(n[o]) && _e(
|
|
66
|
+
const { caseless: t, skipUndefined: e } = Nt(this) && this || {}, n = {}, s = (a, i) => {
|
|
67
|
+
const o = t && Dt(n, i) || i;
|
|
68
|
+
_e(n[o]) && _e(a) ? n[o] = Ge(n[o], a) : _e(a) ? n[o] = Ge({}, a) : je(a) ? n[o] = a.slice() : (!e || !be(a)) && (n[o] = a);
|
|
69
69
|
};
|
|
70
|
-
for (let
|
|
71
|
-
arguments[
|
|
70
|
+
for (let a = 0, i = arguments.length; a < i; a++)
|
|
71
|
+
arguments[a] && Pe(arguments[a], s);
|
|
72
72
|
return n;
|
|
73
73
|
}
|
|
74
|
-
const Rr = (t, e, n, { allOwnKeys: s } = {}) => (Pe(e, (
|
|
75
|
-
n && te(
|
|
76
|
-
}, { allOwnKeys: s }), t), Pr = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t),
|
|
74
|
+
const Rr = (t, e, n, { allOwnKeys: s } = {}) => (Pe(e, (a, i) => {
|
|
75
|
+
n && te(a) ? t[i] = At(a, n) : t[i] = a;
|
|
76
|
+
}, { allOwnKeys: s }), t), Pr = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), Ir = (t, e, n, 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
|
}), n && Object.assign(t.prototype, n);
|
|
80
|
-
},
|
|
81
|
-
let
|
|
80
|
+
}, Or = (t, e, n, s) => {
|
|
81
|
+
let a, i, o;
|
|
82
82
|
const c = {};
|
|
83
83
|
if (e = e || {}, t == null) return e;
|
|
84
84
|
do {
|
|
85
|
-
for (
|
|
86
|
-
o = i
|
|
85
|
+
for (a = Object.getOwnPropertyNames(t), i = a.length; i-- > 0; )
|
|
86
|
+
o = a[i], (!s || s(o, t, e)) && !c[o] && (e[o] = t[o], c[o] = !0);
|
|
87
87
|
t = n !== !1 && rt(t);
|
|
88
88
|
} while (t && (!n || n(t, e)) && t !== Object.prototype);
|
|
89
89
|
return e;
|
|
@@ -101,11 +101,11 @@ const Rr = (t, e, n, { allOwnKeys: s } = {}) => (Pe(e, (i, a) => {
|
|
|
101
101
|
n[e] = t[e];
|
|
102
102
|
return n;
|
|
103
103
|
}, _r = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && rt(Uint8Array)), Ur = (t, e) => {
|
|
104
|
-
const s = (t && t[
|
|
105
|
-
let
|
|
106
|
-
for (; (
|
|
107
|
-
const
|
|
108
|
-
e.call(t,
|
|
104
|
+
const s = (t && t[Fe]).call(t);
|
|
105
|
+
let a;
|
|
106
|
+
for (; (a = s.next()) && !a.done; ) {
|
|
107
|
+
const i = a.value;
|
|
108
|
+
e.call(t, i[0], i[1]);
|
|
109
109
|
}
|
|
110
110
|
}, $r = (t, e) => {
|
|
111
111
|
let n;
|
|
@@ -113,19 +113,19 @@ const Rr = (t, e, n, { allOwnKeys: s } = {}) => (Pe(e, (i, a) => {
|
|
|
113
113
|
for (; (n = t.exec(e)) !== null; )
|
|
114
114
|
s.push(n);
|
|
115
115
|
return s;
|
|
116
|
-
}, Dr =
|
|
116
|
+
}, Dr = ie("HTMLFormElement"), Nr = (t) => t.toLowerCase().replace(
|
|
117
117
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
118
|
-
function(n, s,
|
|
119
|
-
return s.toUpperCase() +
|
|
118
|
+
function(n, s, a) {
|
|
119
|
+
return s.toUpperCase() + a;
|
|
120
120
|
}
|
|
121
|
-
), ut = (({ hasOwnProperty: t }) => (e, n) => t.call(e, n))(Object.prototype),
|
|
121
|
+
), ut = (({ hasOwnProperty: t }) => (e, n) => t.call(e, n))(Object.prototype), Fr = ie("RegExp"), Ft = (t, e) => {
|
|
122
122
|
const n = Object.getOwnPropertyDescriptors(t), s = {};
|
|
123
|
-
Pe(n, (
|
|
123
|
+
Pe(n, (a, i) => {
|
|
124
124
|
let o;
|
|
125
|
-
(o = e(
|
|
125
|
+
(o = e(a, i, t)) !== !1 && (s[i] = o || a);
|
|
126
126
|
}), Object.defineProperties(t, s);
|
|
127
|
-
},
|
|
128
|
-
|
|
127
|
+
}, Lr = (t) => {
|
|
128
|
+
Ft(t, (e, n) => {
|
|
129
129
|
if (te(t) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
130
130
|
return !1;
|
|
131
131
|
const s = t[n];
|
|
@@ -140,44 +140,44 @@ const Rr = (t, e, n, { allOwnKeys: s } = {}) => (Pe(e, (i, a) => {
|
|
|
140
140
|
}
|
|
141
141
|
});
|
|
142
142
|
}, qr = (t, e) => {
|
|
143
|
-
const n = {}, s = (
|
|
144
|
-
|
|
145
|
-
n[
|
|
143
|
+
const n = {}, s = (a) => {
|
|
144
|
+
a.forEach((i) => {
|
|
145
|
+
n[i] = !0;
|
|
146
146
|
});
|
|
147
147
|
};
|
|
148
148
|
return je(t) ? s(t) : s(String(t).split(e)), n;
|
|
149
149
|
}, Mr = () => {
|
|
150
150
|
}, Wr = (t, e) => t != null && Number.isFinite(t = +t) ? t : e;
|
|
151
151
|
function Br(t) {
|
|
152
|
-
return !!(t && te(t.append) && t[_t] === "FormData" && t[
|
|
152
|
+
return !!(t && te(t.append) && t[_t] === "FormData" && t[Fe]);
|
|
153
153
|
}
|
|
154
154
|
const Hr = (t) => {
|
|
155
|
-
const e = new Array(10), n = (s,
|
|
155
|
+
const e = new Array(10), n = (s, a) => {
|
|
156
156
|
if (Re(s)) {
|
|
157
157
|
if (e.indexOf(s) >= 0)
|
|
158
158
|
return;
|
|
159
159
|
if (Te(s))
|
|
160
160
|
return s;
|
|
161
161
|
if (!("toJSON" in s)) {
|
|
162
|
-
e[
|
|
163
|
-
const
|
|
162
|
+
e[a] = s;
|
|
163
|
+
const i = je(s) ? [] : {};
|
|
164
164
|
return Pe(s, (o, c) => {
|
|
165
|
-
const u = n(o,
|
|
166
|
-
!be(u) && (
|
|
167
|
-
}), e[
|
|
165
|
+
const u = n(o, a + 1);
|
|
166
|
+
!be(u) && (i[c] = u);
|
|
167
|
+
}), e[a] = void 0, i;
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
return s;
|
|
171
171
|
};
|
|
172
172
|
return n(t, 0);
|
|
173
|
-
}, Vr =
|
|
174
|
-
|
|
175
|
-
}, !1), (
|
|
176
|
-
s.push(
|
|
173
|
+
}, Vr = ie("AsyncFunction"), Yr = (t) => t && (Re(t) || te(t)) && te(t.then) && te(t.catch), Lt = ((t, e) => t ? setImmediate : e ? ((n, s) => (xe.addEventListener("message", ({ source: a, data: i }) => {
|
|
174
|
+
a === xe && i === n && s.length && s.shift()();
|
|
175
|
+
}, !1), (a) => {
|
|
176
|
+
s.push(a), xe.postMessage(n, "*");
|
|
177
177
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
178
178
|
typeof setImmediate == "function",
|
|
179
179
|
te(xe.postMessage)
|
|
180
|
-
), Jr = typeof queueMicrotask < "u" ? queueMicrotask.bind(xe) : typeof process < "u" && process.nextTick ||
|
|
180
|
+
), Jr = typeof queueMicrotask < "u" ? queueMicrotask.bind(xe) : typeof process < "u" && process.nextTick || Lt, Kr = (t) => t != null && te(t[Fe]), f = {
|
|
181
181
|
isArray: je,
|
|
182
182
|
isArrayBuffer: Ut,
|
|
183
183
|
isBuffer: Te,
|
|
@@ -197,7 +197,7 @@ const Hr = (t) => {
|
|
|
197
197
|
isDate: mr,
|
|
198
198
|
isFile: gr,
|
|
199
199
|
isBlob: yr,
|
|
200
|
-
isRegExp:
|
|
200
|
+
isRegExp: Fr,
|
|
201
201
|
isFunction: te,
|
|
202
202
|
isStream: wr,
|
|
203
203
|
isURLSearchParams: vr,
|
|
@@ -208,10 +208,10 @@ const Hr = (t) => {
|
|
|
208
208
|
extend: Rr,
|
|
209
209
|
trim: Tr,
|
|
210
210
|
stripBOM: Pr,
|
|
211
|
-
inherits:
|
|
212
|
-
toFlatObject:
|
|
213
|
-
kindOf:
|
|
214
|
-
kindOfTest:
|
|
211
|
+
inherits: Ir,
|
|
212
|
+
toFlatObject: Or,
|
|
213
|
+
kindOf: Le,
|
|
214
|
+
kindOfTest: ie,
|
|
215
215
|
endsWith: zr,
|
|
216
216
|
toArray: Ar,
|
|
217
217
|
forEachEntry: Ur,
|
|
@@ -220,8 +220,8 @@ const Hr = (t) => {
|
|
|
220
220
|
hasOwnProperty: ut,
|
|
221
221
|
hasOwnProp: ut,
|
|
222
222
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
223
|
-
reduceDescriptors:
|
|
224
|
-
freezeMethods:
|
|
223
|
+
reduceDescriptors: Ft,
|
|
224
|
+
freezeMethods: Lr,
|
|
225
225
|
toObjectSet: qr,
|
|
226
226
|
toCamelCase: Nr,
|
|
227
227
|
noop: Mr,
|
|
@@ -233,12 +233,12 @@ const Hr = (t) => {
|
|
|
233
233
|
toJSONObject: Hr,
|
|
234
234
|
isAsyncFn: Vr,
|
|
235
235
|
isThenable: Yr,
|
|
236
|
-
setImmediate:
|
|
236
|
+
setImmediate: Lt,
|
|
237
237
|
asap: Jr,
|
|
238
238
|
isIterable: Kr
|
|
239
239
|
};
|
|
240
|
-
function $(t, e, n, s,
|
|
241
|
-
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = t, this.name = "AxiosError", e && (this.code = e), n && (this.config = n), s && (this.request = s),
|
|
240
|
+
function $(t, e, n, s, a) {
|
|
241
|
+
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = t, this.name = "AxiosError", e && (this.code = e), n && (this.config = n), s && (this.request = s), a && (this.response = a, this.status = a.status ? a.status : null);
|
|
242
242
|
}
|
|
243
243
|
f.inherits($, Error, {
|
|
244
244
|
toJSON: function() {
|
|
@@ -281,13 +281,13 @@ const qt = $.prototype, Mt = {};
|
|
|
281
281
|
});
|
|
282
282
|
Object.defineProperties($, Mt);
|
|
283
283
|
Object.defineProperty(qt, "isAxiosError", { value: !0 });
|
|
284
|
-
$.from = (t, e, n, s,
|
|
284
|
+
$.from = (t, e, n, s, a, i) => {
|
|
285
285
|
const o = Object.create(qt);
|
|
286
286
|
f.toFlatObject(t, o, function(d) {
|
|
287
287
|
return d !== Error.prototype;
|
|
288
288
|
}, (x) => x !== "isAxiosError");
|
|
289
289
|
const c = t && t.message ? t.message : "Error", u = e == null && t ? t.code : e;
|
|
290
|
-
return $.call(o, c, u, n, s,
|
|
290
|
+
return $.call(o, c, u, n, s, a), t && o.cause == null && Object.defineProperty(o, "cause", { value: t, configurable: !0 }), o.name = t && t.name || "Error", i && Object.assign(o, i), o;
|
|
291
291
|
};
|
|
292
292
|
const Gr = null;
|
|
293
293
|
function Xe(t) {
|
|
@@ -297,8 +297,8 @@ function Wt(t) {
|
|
|
297
297
|
return f.endsWith(t, "[]") ? t.slice(0, -2) : t;
|
|
298
298
|
}
|
|
299
299
|
function pt(t, e, n) {
|
|
300
|
-
return t ? t.concat(e).map(function(
|
|
301
|
-
return
|
|
300
|
+
return t ? t.concat(e).map(function(a, i) {
|
|
301
|
+
return a = Wt(a), !n && i ? "[" + a + "]" : a;
|
|
302
302
|
}).join(n ? "." : "") : e;
|
|
303
303
|
}
|
|
304
304
|
function Xr(t) {
|
|
@@ -317,8 +317,8 @@ function Me(t, e, n) {
|
|
|
317
317
|
}, !1, function(w, h) {
|
|
318
318
|
return !f.isUndefined(h[w]);
|
|
319
319
|
});
|
|
320
|
-
const s = n.metaTokens,
|
|
321
|
-
if (!f.isFunction(
|
|
320
|
+
const s = n.metaTokens, a = n.visitor || d, i = n.dots, o = n.indexes, u = (n.Blob || typeof Blob < "u" && Blob) && f.isSpecCompliantForm(e);
|
|
321
|
+
if (!f.isFunction(a))
|
|
322
322
|
throw new TypeError("visitor must be a function");
|
|
323
323
|
function x(p) {
|
|
324
324
|
if (p === null) return "";
|
|
@@ -331,20 +331,20 @@ function Me(t, e, n) {
|
|
|
331
331
|
return f.isArrayBuffer(p) || f.isTypedArray(p) ? u && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
|
|
332
332
|
}
|
|
333
333
|
function d(p, w, h) {
|
|
334
|
-
let
|
|
334
|
+
let I = p;
|
|
335
335
|
if (p && !h && typeof p == "object") {
|
|
336
336
|
if (f.endsWith(w, "{}"))
|
|
337
337
|
w = s ? w : w.slice(0, -2), p = JSON.stringify(p);
|
|
338
|
-
else if (f.isArray(p) && Xr(p) || (f.isFileList(p) || f.endsWith(w, "[]")) && (
|
|
339
|
-
return w = Wt(w),
|
|
338
|
+
else if (f.isArray(p) && Xr(p) || (f.isFileList(p) || f.endsWith(w, "[]")) && (I = f.toArray(p)))
|
|
339
|
+
return w = Wt(w), I.forEach(function(g, A) {
|
|
340
340
|
!(f.isUndefined(g) || g === null) && e.append(
|
|
341
341
|
// eslint-disable-next-line no-nested-ternary
|
|
342
|
-
o === !0 ? pt([w], A,
|
|
342
|
+
o === !0 ? pt([w], A, i) : o === null ? w : w + "[]",
|
|
343
343
|
x(g)
|
|
344
344
|
);
|
|
345
345
|
}), !1;
|
|
346
346
|
}
|
|
347
|
-
return Xe(p) ? !0 : (e.append(pt(h, w,
|
|
347
|
+
return Xe(p) ? !0 : (e.append(pt(h, w, i), x(p)), !1);
|
|
348
348
|
}
|
|
349
349
|
const y = [], k = Object.assign(Zr, {
|
|
350
350
|
defaultVisitor: d,
|
|
@@ -355,14 +355,14 @@ function Me(t, e, n) {
|
|
|
355
355
|
if (!f.isUndefined(p)) {
|
|
356
356
|
if (y.indexOf(p) !== -1)
|
|
357
357
|
throw Error("Circular reference detected in " + w.join("."));
|
|
358
|
-
y.push(p), f.forEach(p, function(
|
|
359
|
-
(!(f.isUndefined(
|
|
358
|
+
y.push(p), f.forEach(p, function(I, C) {
|
|
359
|
+
(!(f.isUndefined(I) || I === null) && a.call(
|
|
360
360
|
e,
|
|
361
|
-
|
|
361
|
+
I,
|
|
362
362
|
f.isString(C) ? C.trim() : C,
|
|
363
363
|
w,
|
|
364
364
|
k
|
|
365
|
-
)) === !0 && E(
|
|
365
|
+
)) === !0 && E(I, w ? w.concat(C) : [C]);
|
|
366
366
|
}), y.pop();
|
|
367
367
|
}
|
|
368
368
|
}
|
|
@@ -395,8 +395,8 @@ Bt.toString = function(e) {
|
|
|
395
395
|
const n = e ? function(s) {
|
|
396
396
|
return e.call(this, s, ft);
|
|
397
397
|
} : ft;
|
|
398
|
-
return this._pairs.map(function(
|
|
399
|
-
return n(
|
|
398
|
+
return this._pairs.map(function(a) {
|
|
399
|
+
return n(a[0]) + "=" + n(a[1]);
|
|
400
400
|
}, "").join("&");
|
|
401
401
|
};
|
|
402
402
|
function Qr(t) {
|
|
@@ -409,11 +409,11 @@ function Ht(t, e, n) {
|
|
|
409
409
|
f.isFunction(n) && (n = {
|
|
410
410
|
serialize: n
|
|
411
411
|
});
|
|
412
|
-
const
|
|
413
|
-
let
|
|
414
|
-
if (
|
|
412
|
+
const a = n && n.serialize;
|
|
413
|
+
let i;
|
|
414
|
+
if (a ? i = a(e, n) : i = f.isURLSearchParams(e) ? e.toString() : new nt(e, n).toString(s), i) {
|
|
415
415
|
const o = t.indexOf("#");
|
|
416
|
-
o !== -1 && (t = t.slice(0, o)), t += (t.indexOf("?") === -1 ? "?" : "&") +
|
|
416
|
+
o !== -1 && (t = t.slice(0, o)), t += (t.indexOf("?") === -1 ? "?" : "&") + i;
|
|
417
417
|
}
|
|
418
418
|
return t;
|
|
419
419
|
}
|
|
@@ -497,8 +497,8 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", on
|
|
|
497
497
|
};
|
|
498
498
|
function cn(t, e) {
|
|
499
499
|
return Me(t, new Q.classes.URLSearchParams(), {
|
|
500
|
-
visitor: function(n, s,
|
|
501
|
-
return Q.isNode && f.isBuffer(n) ? (this.append(s, n.toString("base64")), !1) :
|
|
500
|
+
visitor: function(n, s, a, i) {
|
|
501
|
+
return Q.isNode && f.isBuffer(n) ? (this.append(s, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
502
502
|
},
|
|
503
503
|
...e
|
|
504
504
|
});
|
|
@@ -509,23 +509,23 @@ function dn(t) {
|
|
|
509
509
|
function un(t) {
|
|
510
510
|
const e = {}, n = Object.keys(t);
|
|
511
511
|
let s;
|
|
512
|
-
const
|
|
513
|
-
let
|
|
514
|
-
for (s = 0; s <
|
|
515
|
-
|
|
512
|
+
const a = n.length;
|
|
513
|
+
let i;
|
|
514
|
+
for (s = 0; s < a; s++)
|
|
515
|
+
i = n[s], e[i] = t[i];
|
|
516
516
|
return e;
|
|
517
517
|
}
|
|
518
518
|
function Yt(t) {
|
|
519
|
-
function e(n, s,
|
|
520
|
-
let o = n[
|
|
519
|
+
function e(n, s, a, i) {
|
|
520
|
+
let o = n[i++];
|
|
521
521
|
if (o === "__proto__") return !0;
|
|
522
|
-
const c = Number.isFinite(+o), u =
|
|
523
|
-
return o = !o && f.isArray(
|
|
522
|
+
const c = Number.isFinite(+o), u = i >= n.length;
|
|
523
|
+
return o = !o && f.isArray(a) ? a.length : o, u ? (f.hasOwnProp(a, o) ? a[o] = [a[o], s] : a[o] = s, !c) : ((!a[o] || !f.isObject(a[o])) && (a[o] = []), e(n, s, a[o], i) && f.isArray(a[o]) && (a[o] = un(a[o])), !c);
|
|
524
524
|
}
|
|
525
525
|
if (f.isFormData(t) && f.isFunction(t.entries)) {
|
|
526
526
|
const n = {};
|
|
527
|
-
return f.forEachEntry(t, (s,
|
|
528
|
-
e(dn(s),
|
|
527
|
+
return f.forEachEntry(t, (s, a) => {
|
|
528
|
+
e(dn(s), a, n, 0);
|
|
529
529
|
}), n;
|
|
530
530
|
}
|
|
531
531
|
return null;
|
|
@@ -540,13 +540,13 @@ function pn(t, e, n) {
|
|
|
540
540
|
}
|
|
541
541
|
return (n || JSON.stringify)(t);
|
|
542
542
|
}
|
|
543
|
-
const
|
|
543
|
+
const Ie = {
|
|
544
544
|
transitional: Vt,
|
|
545
545
|
adapter: ["xhr", "http", "fetch"],
|
|
546
546
|
transformRequest: [function(e, n) {
|
|
547
|
-
const s = n.getContentType() || "",
|
|
548
|
-
if (
|
|
549
|
-
return
|
|
547
|
+
const s = n.getContentType() || "", a = s.indexOf("application/json") > -1, i = f.isObject(e);
|
|
548
|
+
if (i && f.isHTMLForm(e) && (e = new FormData(e)), f.isFormData(e))
|
|
549
|
+
return a ? JSON.stringify(Yt(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;
|
|
552
552
|
if (f.isArrayBufferView(e))
|
|
@@ -554,7 +554,7 @@ const Oe = {
|
|
|
554
554
|
if (f.isURLSearchParams(e))
|
|
555
555
|
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
|
|
556
556
|
let c;
|
|
557
|
-
if (
|
|
557
|
+
if (i) {
|
|
558
558
|
if (s.indexOf("application/x-www-form-urlencoded") > -1)
|
|
559
559
|
return cn(e, this.formSerializer).toString();
|
|
560
560
|
if ((c = f.isFileList(e)) || s.indexOf("multipart/form-data") > -1) {
|
|
@@ -566,14 +566,14 @@ const Oe = {
|
|
|
566
566
|
);
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
return
|
|
569
|
+
return i || a ? (n.setContentType("application/json", !1), pn(e)) : e;
|
|
570
570
|
}],
|
|
571
571
|
transformResponse: [function(e) {
|
|
572
|
-
const n = this.transitional ||
|
|
572
|
+
const n = this.transitional || Ie.transitional, s = n && n.forcedJSONParsing, a = this.responseType === "json";
|
|
573
573
|
if (f.isResponse(e) || f.isReadableStream(e))
|
|
574
574
|
return e;
|
|
575
|
-
if (e && f.isString(e) && (s && !this.responseType ||
|
|
576
|
-
const o = !(n && n.silentJSONParsing) &&
|
|
575
|
+
if (e && f.isString(e) && (s && !this.responseType || a)) {
|
|
576
|
+
const o = !(n && n.silentJSONParsing) && a;
|
|
577
577
|
try {
|
|
578
578
|
return JSON.parse(e, this.parseReviver);
|
|
579
579
|
} catch (c) {
|
|
@@ -607,7 +607,7 @@ const Oe = {
|
|
|
607
607
|
}
|
|
608
608
|
};
|
|
609
609
|
f.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => {
|
|
610
|
-
|
|
610
|
+
Ie.headers[t] = {};
|
|
611
611
|
});
|
|
612
612
|
const fn = f.toObjectSet([
|
|
613
613
|
"age",
|
|
@@ -629,10 +629,10 @@ const fn = f.toObjectSet([
|
|
|
629
629
|
"user-agent"
|
|
630
630
|
]), xn = (t) => {
|
|
631
631
|
const e = {};
|
|
632
|
-
let n, s,
|
|
632
|
+
let n, s, a;
|
|
633
633
|
return t && t.split(`
|
|
634
634
|
`).forEach(function(o) {
|
|
635
|
-
|
|
635
|
+
a = o.indexOf(":"), n = o.substring(0, a).trim().toLowerCase(), s = o.substring(a + 1).trim(), !(!n || e[n] && fn[n]) && (n === "set-cookie" ? e[n] ? e[n].push(s) : e[n] = [s] : e[n] = e[n] ? e[n] + ", " + s : s);
|
|
636
636
|
}), e;
|
|
637
637
|
}, ht = Symbol("internals");
|
|
638
638
|
function Se(t) {
|
|
@@ -649,10 +649,10 @@ function hn(t) {
|
|
|
649
649
|
return e;
|
|
650
650
|
}
|
|
651
651
|
const mn = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
|
|
652
|
-
function He(t, e, n, s,
|
|
652
|
+
function He(t, e, n, s, a) {
|
|
653
653
|
if (f.isFunction(s))
|
|
654
654
|
return s.call(this, e, n);
|
|
655
|
-
if (
|
|
655
|
+
if (a && (e = n), !!f.isString(e)) {
|
|
656
656
|
if (f.isString(s))
|
|
657
657
|
return e.indexOf(s) !== -1;
|
|
658
658
|
if (f.isRegExp(s))
|
|
@@ -666,8 +666,8 @@ function yn(t, e) {
|
|
|
666
666
|
const n = f.toCamelCase(" " + e);
|
|
667
667
|
["get", "set", "has"].forEach((s) => {
|
|
668
668
|
Object.defineProperty(t, s + n, {
|
|
669
|
-
value: function(
|
|
670
|
-
return this[s].call(this, e,
|
|
669
|
+
value: function(a, i, o) {
|
|
670
|
+
return this[s].call(this, e, a, i, o);
|
|
671
671
|
},
|
|
672
672
|
configurable: !0
|
|
673
673
|
});
|
|
@@ -678,15 +678,15 @@ let re = class {
|
|
|
678
678
|
e && this.set(e);
|
|
679
679
|
}
|
|
680
680
|
set(e, n, s) {
|
|
681
|
-
const
|
|
682
|
-
function
|
|
681
|
+
const a = this;
|
|
682
|
+
function i(c, u, x) {
|
|
683
683
|
const d = Se(u);
|
|
684
684
|
if (!d)
|
|
685
685
|
throw new Error("header name must be a non-empty string");
|
|
686
|
-
const y = f.findKey(
|
|
687
|
-
(!y ||
|
|
686
|
+
const y = f.findKey(a, d);
|
|
687
|
+
(!y || a[y] === void 0 || x === !0 || x === void 0 && a[y] !== !1) && (a[y || u] = Ue(c));
|
|
688
688
|
}
|
|
689
|
-
const o = (c, u) => f.forEach(c, (x, d) =>
|
|
689
|
+
const o = (c, u) => f.forEach(c, (x, d) => i(x, d, u));
|
|
690
690
|
if (f.isPlainObject(e) || e instanceof this.constructor)
|
|
691
691
|
o(e, n);
|
|
692
692
|
else if (f.isString(e) && (e = e.trim()) && !mn(e))
|
|
@@ -700,22 +700,22 @@ let re = class {
|
|
|
700
700
|
}
|
|
701
701
|
o(c, n);
|
|
702
702
|
} else
|
|
703
|
-
e != null &&
|
|
703
|
+
e != null && i(n, e, s);
|
|
704
704
|
return this;
|
|
705
705
|
}
|
|
706
706
|
get(e, n) {
|
|
707
707
|
if (e = Se(e), e) {
|
|
708
708
|
const s = f.findKey(this, e);
|
|
709
709
|
if (s) {
|
|
710
|
-
const
|
|
710
|
+
const a = this[s];
|
|
711
711
|
if (!n)
|
|
712
|
-
return
|
|
712
|
+
return a;
|
|
713
713
|
if (n === !0)
|
|
714
|
-
return hn(
|
|
714
|
+
return hn(a);
|
|
715
715
|
if (f.isFunction(n))
|
|
716
|
-
return n.call(this,
|
|
716
|
+
return n.call(this, a, s);
|
|
717
717
|
if (f.isRegExp(n))
|
|
718
|
-
return n.exec(
|
|
718
|
+
return n.exec(a);
|
|
719
719
|
throw new TypeError("parser must be boolean|regexp|function");
|
|
720
720
|
}
|
|
721
721
|
}
|
|
@@ -729,34 +729,34 @@ let re = class {
|
|
|
729
729
|
}
|
|
730
730
|
delete(e, n) {
|
|
731
731
|
const s = this;
|
|
732
|
-
let
|
|
733
|
-
function
|
|
732
|
+
let a = !1;
|
|
733
|
+
function i(o) {
|
|
734
734
|
if (o = Se(o), o) {
|
|
735
735
|
const c = f.findKey(s, o);
|
|
736
|
-
c && (!n || He(s, s[c], c, n)) && (delete s[c],
|
|
736
|
+
c && (!n || He(s, s[c], c, n)) && (delete s[c], a = !0);
|
|
737
737
|
}
|
|
738
738
|
}
|
|
739
|
-
return f.isArray(e) ? e.forEach(
|
|
739
|
+
return f.isArray(e) ? e.forEach(i) : i(e), a;
|
|
740
740
|
}
|
|
741
741
|
clear(e) {
|
|
742
742
|
const n = Object.keys(this);
|
|
743
|
-
let s = n.length,
|
|
743
|
+
let s = n.length, a = !1;
|
|
744
744
|
for (; s--; ) {
|
|
745
|
-
const
|
|
746
|
-
(!e || He(this, this[
|
|
745
|
+
const i = n[s];
|
|
746
|
+
(!e || He(this, this[i], i, e, !0)) && (delete this[i], a = !0);
|
|
747
747
|
}
|
|
748
|
-
return
|
|
748
|
+
return a;
|
|
749
749
|
}
|
|
750
750
|
normalize(e) {
|
|
751
751
|
const n = this, s = {};
|
|
752
|
-
return f.forEach(this, (
|
|
753
|
-
const o = f.findKey(s,
|
|
752
|
+
return f.forEach(this, (a, i) => {
|
|
753
|
+
const o = f.findKey(s, i);
|
|
754
754
|
if (o) {
|
|
755
|
-
n[o] = Ue(
|
|
755
|
+
n[o] = Ue(a), delete n[i];
|
|
756
756
|
return;
|
|
757
757
|
}
|
|
758
|
-
const c = e ? gn(
|
|
759
|
-
c !==
|
|
758
|
+
const c = e ? gn(i) : String(i).trim();
|
|
759
|
+
c !== i && delete n[i], n[c] = Ue(a), s[c] = !0;
|
|
760
760
|
}), this;
|
|
761
761
|
}
|
|
762
762
|
concat(...e) {
|
|
@@ -764,8 +764,8 @@ let re = class {
|
|
|
764
764
|
}
|
|
765
765
|
toJSON(e) {
|
|
766
766
|
const n = /* @__PURE__ */ Object.create(null);
|
|
767
|
-
return f.forEach(this, (s,
|
|
768
|
-
s != null && s !== !1 && (n[
|
|
767
|
+
return f.forEach(this, (s, a) => {
|
|
768
|
+
s != null && s !== !1 && (n[a] = e && f.isArray(s) ? s.join(", ") : s);
|
|
769
769
|
}), n;
|
|
770
770
|
}
|
|
771
771
|
[Symbol.iterator]() {
|
|
@@ -786,17 +786,17 @@ let re = class {
|
|
|
786
786
|
}
|
|
787
787
|
static concat(e, ...n) {
|
|
788
788
|
const s = new this(e);
|
|
789
|
-
return n.forEach((
|
|
789
|
+
return n.forEach((a) => s.set(a)), s;
|
|
790
790
|
}
|
|
791
791
|
static accessor(e) {
|
|
792
792
|
const s = (this[ht] = this[ht] = {
|
|
793
793
|
accessors: {}
|
|
794
|
-
}).accessors,
|
|
795
|
-
function
|
|
794
|
+
}).accessors, a = this.prototype;
|
|
795
|
+
function i(o) {
|
|
796
796
|
const c = Se(o);
|
|
797
|
-
s[c] || (yn(
|
|
797
|
+
s[c] || (yn(a, o), s[c] = !0);
|
|
798
798
|
}
|
|
799
|
-
return f.isArray(e) ? e.forEach(
|
|
799
|
+
return f.isArray(e) ? e.forEach(i) : i(e), this;
|
|
800
800
|
}
|
|
801
801
|
};
|
|
802
802
|
re.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
@@ -811,11 +811,11 @@ f.reduceDescriptors(re.prototype, ({ value: t }, e) => {
|
|
|
811
811
|
});
|
|
812
812
|
f.freezeMethods(re);
|
|
813
813
|
function Ve(t, e) {
|
|
814
|
-
const n = this ||
|
|
815
|
-
let
|
|
814
|
+
const n = this || Ie, s = e || n, a = re.from(s.headers);
|
|
815
|
+
let i = s.data;
|
|
816
816
|
return f.forEach(t, function(c) {
|
|
817
|
-
|
|
818
|
-
}),
|
|
817
|
+
i = c.call(n, i, a.normalize(), e ? e.status : void 0);
|
|
818
|
+
}), a.normalize(), i;
|
|
819
819
|
}
|
|
820
820
|
function Jt(t) {
|
|
821
821
|
return !!(t && t.__CANCEL__);
|
|
@@ -843,36 +843,36 @@ function bn(t) {
|
|
|
843
843
|
function wn(t, e) {
|
|
844
844
|
t = t || 10;
|
|
845
845
|
const n = new Array(t), s = new Array(t);
|
|
846
|
-
let
|
|
846
|
+
let a = 0, i = 0, o;
|
|
847
847
|
return e = e !== void 0 ? e : 1e3, function(u) {
|
|
848
|
-
const x = Date.now(), d = s[
|
|
849
|
-
o || (o = x), n[
|
|
850
|
-
let y =
|
|
851
|
-
for (; y !==
|
|
848
|
+
const x = Date.now(), d = s[i];
|
|
849
|
+
o || (o = x), n[a] = u, s[a] = x;
|
|
850
|
+
let y = i, k = 0;
|
|
851
|
+
for (; y !== a; )
|
|
852
852
|
k += n[y++], y = y % t;
|
|
853
|
-
if (
|
|
853
|
+
if (a = (a + 1) % t, a === i && (i = (i + 1) % t), x - o < e)
|
|
854
854
|
return;
|
|
855
855
|
const E = d && x - d;
|
|
856
856
|
return E ? Math.round(k * 1e3 / E) : void 0;
|
|
857
857
|
};
|
|
858
858
|
}
|
|
859
859
|
function jn(t, e) {
|
|
860
|
-
let n = 0, s = 1e3 / e,
|
|
860
|
+
let n = 0, s = 1e3 / e, a, i;
|
|
861
861
|
const o = (x, d = Date.now()) => {
|
|
862
|
-
n = d,
|
|
862
|
+
n = d, a = null, i && (clearTimeout(i), i = null), t(...x);
|
|
863
863
|
};
|
|
864
864
|
return [(...x) => {
|
|
865
865
|
const d = Date.now(), y = d - n;
|
|
866
|
-
y >= s ? o(x, d) : (
|
|
867
|
-
|
|
866
|
+
y >= s ? o(x, d) : (a = x, i || (i = setTimeout(() => {
|
|
867
|
+
i = null, o(a);
|
|
868
868
|
}, s - y)));
|
|
869
|
-
}, () =>
|
|
869
|
+
}, () => a && o(a)];
|
|
870
870
|
}
|
|
871
871
|
const Ne = (t, e, n = 3) => {
|
|
872
872
|
let s = 0;
|
|
873
|
-
const
|
|
874
|
-
return jn((
|
|
875
|
-
const o =
|
|
873
|
+
const a = wn(50, 250);
|
|
874
|
+
return jn((i) => {
|
|
875
|
+
const o = i.loaded, c = i.lengthComputable ? i.total : void 0, u = o - s, x = a(u), d = o <= c;
|
|
876
876
|
s = o;
|
|
877
877
|
const y = {
|
|
878
878
|
loaded: o,
|
|
@@ -881,7 +881,7 @@ const Ne = (t, e, n = 3) => {
|
|
|
881
881
|
bytes: u,
|
|
882
882
|
rate: x || void 0,
|
|
883
883
|
estimated: x && c && d ? (c - o) / x : void 0,
|
|
884
|
-
event:
|
|
884
|
+
event: i,
|
|
885
885
|
lengthComputable: c != null,
|
|
886
886
|
[e ? "download" : "upload"]: !0
|
|
887
887
|
};
|
|
@@ -900,9 +900,9 @@ const Ne = (t, e, n = 3) => {
|
|
|
900
900
|
) : () => !0, Sn = Q.hasStandardBrowserEnv ? (
|
|
901
901
|
// Standard browser envs support document.cookie
|
|
902
902
|
{
|
|
903
|
-
write(t, e, n, s,
|
|
903
|
+
write(t, e, n, s, a, i) {
|
|
904
904
|
const o = [t + "=" + encodeURIComponent(e)];
|
|
905
|
-
f.isNumber(n) && o.push("expires=" + new Date(n).toGMTString()), f.isString(s) && o.push("path=" + s), f.isString(
|
|
905
|
+
f.isNumber(n) && o.push("expires=" + new Date(n).toGMTString()), f.isString(s) && o.push("path=" + s), f.isString(a) && o.push("domain=" + a), i === !0 && o.push("secure"), document.cookie = o.join("; ");
|
|
906
906
|
},
|
|
907
907
|
read(t) {
|
|
908
908
|
const e = document.cookie.match(new RegExp("(^|;\\s*)(" + t + ")=([^;]*)"));
|
|
@@ -941,13 +941,13 @@ function me(t, e) {
|
|
|
941
941
|
function s(x, d, y, k) {
|
|
942
942
|
return f.isPlainObject(x) && f.isPlainObject(d) ? f.merge.call({ caseless: k }, x, d) : f.isPlainObject(d) ? f.merge({}, d) : f.isArray(d) ? d.slice() : d;
|
|
943
943
|
}
|
|
944
|
-
function
|
|
944
|
+
function a(x, d, y, k) {
|
|
945
945
|
if (f.isUndefined(d)) {
|
|
946
946
|
if (!f.isUndefined(x))
|
|
947
947
|
return s(void 0, x, y, k);
|
|
948
948
|
} else return s(x, d, y, k);
|
|
949
949
|
}
|
|
950
|
-
function
|
|
950
|
+
function i(x, d) {
|
|
951
951
|
if (!f.isUndefined(d))
|
|
952
952
|
return s(void 0, d);
|
|
953
953
|
}
|
|
@@ -964,9 +964,9 @@ function me(t, e) {
|
|
|
964
964
|
return s(void 0, x);
|
|
965
965
|
}
|
|
966
966
|
const u = {
|
|
967
|
-
url:
|
|
968
|
-
method:
|
|
969
|
-
data:
|
|
967
|
+
url: i,
|
|
968
|
+
method: i,
|
|
969
|
+
data: i,
|
|
970
970
|
baseURL: o,
|
|
971
971
|
transformRequest: o,
|
|
972
972
|
transformResponse: o,
|
|
@@ -992,16 +992,16 @@ function me(t, e) {
|
|
|
992
992
|
socketPath: o,
|
|
993
993
|
responseEncoding: o,
|
|
994
994
|
validateStatus: c,
|
|
995
|
-
headers: (x, d, y) =>
|
|
995
|
+
headers: (x, d, y) => a(yt(x), yt(d), y, !0)
|
|
996
996
|
};
|
|
997
997
|
return f.forEach(Object.keys({ ...t, ...e }), function(d) {
|
|
998
|
-
const y = u[d] ||
|
|
998
|
+
const y = u[d] || a, k = y(t[d], e[d], d);
|
|
999
999
|
f.isUndefined(k) && y !== c || (n[d] = k);
|
|
1000
1000
|
}), n;
|
|
1001
1001
|
}
|
|
1002
1002
|
const Xt = (t) => {
|
|
1003
1003
|
const e = me({}, t);
|
|
1004
|
-
let { data: n, withXSRFToken: s, xsrfHeaderName:
|
|
1004
|
+
let { data: n, withXSRFToken: s, xsrfHeaderName: a, xsrfCookieName: i, headers: o, auth: c } = e;
|
|
1005
1005
|
if (e.headers = o = re.from(o), e.url = Ht(Gt(e.baseURL, e.url, e.allowAbsoluteUrls), t.params, t.paramsSerializer), c && o.set(
|
|
1006
1006
|
"Authorization",
|
|
1007
1007
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
@@ -1016,22 +1016,22 @@ const Xt = (t) => {
|
|
|
1016
1016
|
}
|
|
1017
1017
|
}
|
|
1018
1018
|
if (Q.hasStandardBrowserEnv && (s && f.isFunction(s) && (s = s(e)), s || s !== !1 && vn(e.url))) {
|
|
1019
|
-
const u =
|
|
1020
|
-
u && o.set(
|
|
1019
|
+
const u = a && i && Sn.read(i);
|
|
1020
|
+
u && o.set(a, u);
|
|
1021
1021
|
}
|
|
1022
1022
|
return e;
|
|
1023
1023
|
}, Cn = typeof XMLHttpRequest < "u", Tn = Cn && function(t) {
|
|
1024
1024
|
return new Promise(function(n, s) {
|
|
1025
|
-
const
|
|
1026
|
-
let
|
|
1027
|
-
const o = re.from(
|
|
1028
|
-
let { responseType: c, onUploadProgress: u, onDownloadProgress: x } =
|
|
1025
|
+
const a = Xt(t);
|
|
1026
|
+
let i = a.data;
|
|
1027
|
+
const o = re.from(a.headers).normalize();
|
|
1028
|
+
let { responseType: c, onUploadProgress: u, onDownloadProgress: x } = a, d, y, k, E, p;
|
|
1029
1029
|
function w() {
|
|
1030
|
-
E && E(), p && p(),
|
|
1030
|
+
E && E(), p && p(), a.cancelToken && a.cancelToken.unsubscribe(d), a.signal && a.signal.removeEventListener("abort", d);
|
|
1031
1031
|
}
|
|
1032
1032
|
let h = new XMLHttpRequest();
|
|
1033
|
-
h.open(
|
|
1034
|
-
function
|
|
1033
|
+
h.open(a.method.toUpperCase(), a.url, !0), h.timeout = a.timeout;
|
|
1034
|
+
function I() {
|
|
1035
1035
|
if (!h)
|
|
1036
1036
|
return;
|
|
1037
1037
|
const g = re.from(
|
|
@@ -1050,54 +1050,54 @@ const Xt = (t) => {
|
|
|
1050
1050
|
s(j), w();
|
|
1051
1051
|
}, N), h = null;
|
|
1052
1052
|
}
|
|
1053
|
-
"onloadend" in h ? h.onloadend =
|
|
1054
|
-
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(
|
|
1053
|
+
"onloadend" in h ? h.onloadend = I : h.onreadystatechange = function() {
|
|
1054
|
+
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(I);
|
|
1055
1055
|
}, h.onabort = function() {
|
|
1056
1056
|
h && (s(new $("Request aborted", $.ECONNABORTED, t, h)), h = null);
|
|
1057
1057
|
}, h.onerror = function(A) {
|
|
1058
1058
|
const N = A && A.message ? A.message : "Network Error", b = new $(N, $.ERR_NETWORK, t, h);
|
|
1059
1059
|
b.event = A || null, s(b), h = null;
|
|
1060
1060
|
}, h.ontimeout = function() {
|
|
1061
|
-
let A =
|
|
1062
|
-
const N =
|
|
1063
|
-
|
|
1061
|
+
let A = a.timeout ? "timeout of " + a.timeout + "ms exceeded" : "timeout exceeded";
|
|
1062
|
+
const N = a.transitional || Vt;
|
|
1063
|
+
a.timeoutErrorMessage && (A = a.timeoutErrorMessage), s(new $(
|
|
1064
1064
|
A,
|
|
1065
1065
|
N.clarifyTimeoutError ? $.ETIMEDOUT : $.ECONNABORTED,
|
|
1066
1066
|
t,
|
|
1067
1067
|
h
|
|
1068
1068
|
)), h = null;
|
|
1069
|
-
},
|
|
1069
|
+
}, i === void 0 && o.setContentType(null), "setRequestHeader" in h && f.forEach(o.toJSON(), function(A, N) {
|
|
1070
1070
|
h.setRequestHeader(N, A);
|
|
1071
|
-
}), f.isUndefined(
|
|
1071
|
+
}), f.isUndefined(a.withCredentials) || (h.withCredentials = !!a.withCredentials), c && c !== "json" && (h.responseType = a.responseType), x && ([k, p] = Ne(x, !0), h.addEventListener("progress", k)), u && h.upload && ([y, E] = Ne(u), h.upload.addEventListener("progress", y), h.upload.addEventListener("loadend", E)), (a.cancelToken || a.signal) && (d = (g) => {
|
|
1072
1072
|
h && (s(!g || g.type ? new ve(null, t, h) : g), h.abort(), h = null);
|
|
1073
|
-
},
|
|
1074
|
-
const C = bn(
|
|
1073
|
+
}, a.cancelToken && a.cancelToken.subscribe(d), a.signal && (a.signal.aborted ? d() : a.signal.addEventListener("abort", d)));
|
|
1074
|
+
const C = bn(a.url);
|
|
1075
1075
|
if (C && Q.protocols.indexOf(C) === -1) {
|
|
1076
1076
|
s(new $("Unsupported protocol " + C + ":", $.ERR_BAD_REQUEST, t));
|
|
1077
1077
|
return;
|
|
1078
1078
|
}
|
|
1079
|
-
h.send(
|
|
1079
|
+
h.send(i || null);
|
|
1080
1080
|
});
|
|
1081
1081
|
}, Rn = (t, e) => {
|
|
1082
1082
|
const { length: n } = t = t ? t.filter(Boolean) : [];
|
|
1083
1083
|
if (e || n) {
|
|
1084
|
-
let s = new AbortController(),
|
|
1085
|
-
const
|
|
1086
|
-
if (!
|
|
1087
|
-
|
|
1084
|
+
let s = new AbortController(), a;
|
|
1085
|
+
const i = function(x) {
|
|
1086
|
+
if (!a) {
|
|
1087
|
+
a = !0, c();
|
|
1088
1088
|
const d = x instanceof Error ? x : this.reason;
|
|
1089
1089
|
s.abort(d instanceof $ ? d : new ve(d instanceof Error ? d.message : d));
|
|
1090
1090
|
}
|
|
1091
1091
|
};
|
|
1092
1092
|
let o = e && setTimeout(() => {
|
|
1093
|
-
o = null,
|
|
1093
|
+
o = null, i(new $(`timeout ${e} of ms exceeded`, $.ETIMEDOUT));
|
|
1094
1094
|
}, e);
|
|
1095
1095
|
const c = () => {
|
|
1096
1096
|
t && (o && clearTimeout(o), o = null, t.forEach((x) => {
|
|
1097
|
-
x.unsubscribe ? x.unsubscribe(
|
|
1097
|
+
x.unsubscribe ? x.unsubscribe(i) : x.removeEventListener("abort", i);
|
|
1098
1098
|
}), t = null);
|
|
1099
1099
|
};
|
|
1100
|
-
t.forEach((x) => x.addEventListener("abort",
|
|
1100
|
+
t.forEach((x) => x.addEventListener("abort", i));
|
|
1101
1101
|
const { signal: u } = s;
|
|
1102
1102
|
return u.unsubscribe = () => f.asap(c), u;
|
|
1103
1103
|
}
|
|
@@ -1107,13 +1107,13 @@ const Xt = (t) => {
|
|
|
1107
1107
|
yield t;
|
|
1108
1108
|
return;
|
|
1109
1109
|
}
|
|
1110
|
-
let s = 0,
|
|
1110
|
+
let s = 0, a;
|
|
1111
1111
|
for (; s < n; )
|
|
1112
|
-
|
|
1113
|
-
},
|
|
1114
|
-
for await (const n of
|
|
1112
|
+
a = s + e, yield t.slice(s, a), s = a;
|
|
1113
|
+
}, In = async function* (t, e) {
|
|
1114
|
+
for await (const n of On(t))
|
|
1115
1115
|
yield* Pn(n, e);
|
|
1116
|
-
},
|
|
1116
|
+
}, On = async function* (t) {
|
|
1117
1117
|
if (t[Symbol.asyncIterator]) {
|
|
1118
1118
|
yield* t;
|
|
1119
1119
|
return;
|
|
@@ -1130,21 +1130,21 @@ const Xt = (t) => {
|
|
|
1130
1130
|
await e.cancel();
|
|
1131
1131
|
}
|
|
1132
1132
|
}, bt = (t, e, n, s) => {
|
|
1133
|
-
const
|
|
1134
|
-
let
|
|
1133
|
+
const a = In(t, e);
|
|
1134
|
+
let i = 0, o, c = (u) => {
|
|
1135
1135
|
o || (o = !0, s && s(u));
|
|
1136
1136
|
};
|
|
1137
1137
|
return new ReadableStream({
|
|
1138
1138
|
async pull(u) {
|
|
1139
1139
|
try {
|
|
1140
|
-
const { done: x, value: d } = await
|
|
1140
|
+
const { done: x, value: d } = await a.next();
|
|
1141
1141
|
if (x) {
|
|
1142
1142
|
c(), u.close();
|
|
1143
1143
|
return;
|
|
1144
1144
|
}
|
|
1145
1145
|
let y = d.byteLength;
|
|
1146
1146
|
if (n) {
|
|
1147
|
-
let k =
|
|
1147
|
+
let k = i += y;
|
|
1148
1148
|
n(k);
|
|
1149
1149
|
}
|
|
1150
1150
|
u.enqueue(new Uint8Array(d));
|
|
@@ -1153,7 +1153,7 @@ const Xt = (t) => {
|
|
|
1153
1153
|
}
|
|
1154
1154
|
},
|
|
1155
1155
|
cancel(u) {
|
|
1156
|
-
return c(u),
|
|
1156
|
+
return c(u), a.return();
|
|
1157
1157
|
}
|
|
1158
1158
|
}, {
|
|
1159
1159
|
highWaterMark: 2
|
|
@@ -1174,10 +1174,10 @@ const Xt = (t) => {
|
|
|
1174
1174
|
t = f.merge.call({
|
|
1175
1175
|
skipUndefined: !0
|
|
1176
1176
|
}, zn, t);
|
|
1177
|
-
const { fetch: e, Request: n, Response: s } = t,
|
|
1178
|
-
if (!
|
|
1177
|
+
const { fetch: e, Request: n, Response: s } = t, a = e ? ze(e) : typeof fetch == "function", i = ze(n), o = ze(s);
|
|
1178
|
+
if (!a)
|
|
1179
1179
|
return !1;
|
|
1180
|
-
const c =
|
|
1180
|
+
const c = a && ze(jt), u = a && (typeof vt == "function" ? /* @__PURE__ */ ((p) => (w) => p.encode(w))(new vt()) : async (p) => new Uint8Array(await new n(p).arrayBuffer())), x = i && c && St(() => {
|
|
1181
1181
|
let p = !1;
|
|
1182
1182
|
const w = new n(Q.origin, {
|
|
1183
1183
|
body: new jt(),
|
|
@@ -1190,11 +1190,11 @@ const Xt = (t) => {
|
|
|
1190
1190
|
}), d = o && c && St(() => f.isReadableStream(new s("").body)), y = {
|
|
1191
1191
|
stream: d && ((p) => p.body)
|
|
1192
1192
|
};
|
|
1193
|
-
|
|
1193
|
+
a && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((p) => {
|
|
1194
1194
|
!y[p] && (y[p] = (w, h) => {
|
|
1195
|
-
let
|
|
1196
|
-
if (
|
|
1197
|
-
return
|
|
1195
|
+
let I = w && w[p];
|
|
1196
|
+
if (I)
|
|
1197
|
+
return I.call(w);
|
|
1198
1198
|
throw new $(`Response type '${p}' is not supported`, $.ERR_NOT_SUPPORT, h);
|
|
1199
1199
|
});
|
|
1200
1200
|
});
|
|
@@ -1220,7 +1220,7 @@ const Xt = (t) => {
|
|
|
1220
1220
|
let {
|
|
1221
1221
|
url: w,
|
|
1222
1222
|
method: h,
|
|
1223
|
-
data:
|
|
1223
|
+
data: I,
|
|
1224
1224
|
signal: C,
|
|
1225
1225
|
cancelToken: g,
|
|
1226
1226
|
timeout: A,
|
|
@@ -1228,7 +1228,7 @@ const Xt = (t) => {
|
|
|
1228
1228
|
onUploadProgress: b,
|
|
1229
1229
|
responseType: j,
|
|
1230
1230
|
headers: q,
|
|
1231
|
-
withCredentials:
|
|
1231
|
+
withCredentials: O = "same-origin",
|
|
1232
1232
|
fetchOptions: X
|
|
1233
1233
|
} = Xt(p), W = e || fetch;
|
|
1234
1234
|
j = j ? (j + "").toLowerCase() : "text";
|
|
@@ -1238,34 +1238,34 @@ const Xt = (t) => {
|
|
|
1238
1238
|
});
|
|
1239
1239
|
let z;
|
|
1240
1240
|
try {
|
|
1241
|
-
if (b && x && h !== "get" && h !== "head" && (z = await E(q,
|
|
1241
|
+
if (b && x && h !== "get" && h !== "head" && (z = await E(q, I)) !== 0) {
|
|
1242
1242
|
let l = new n(w, {
|
|
1243
1243
|
method: "POST",
|
|
1244
|
-
body:
|
|
1244
|
+
body: I,
|
|
1245
1245
|
duplex: "half"
|
|
1246
1246
|
}), m;
|
|
1247
|
-
if (f.isFormData(
|
|
1247
|
+
if (f.isFormData(I) && (m = l.headers.get("content-type")) && q.setContentType(m), l.body) {
|
|
1248
1248
|
const [S, D] = mt(
|
|
1249
1249
|
z,
|
|
1250
1250
|
Ne(gt(b))
|
|
1251
1251
|
);
|
|
1252
|
-
|
|
1252
|
+
I = bt(l.body, wt, S, D);
|
|
1253
1253
|
}
|
|
1254
1254
|
}
|
|
1255
|
-
f.isString(
|
|
1256
|
-
const M =
|
|
1255
|
+
f.isString(O) || (O = O ? "include" : "omit");
|
|
1256
|
+
const M = i && "credentials" in n.prototype, K = {
|
|
1257
1257
|
...X,
|
|
1258
1258
|
signal: T,
|
|
1259
1259
|
method: h.toUpperCase(),
|
|
1260
1260
|
headers: q.normalize().toJSON(),
|
|
1261
|
-
body:
|
|
1261
|
+
body: I,
|
|
1262
1262
|
duplex: "half",
|
|
1263
|
-
credentials: M ?
|
|
1263
|
+
credentials: M ? O : void 0
|
|
1264
1264
|
};
|
|
1265
|
-
G =
|
|
1266
|
-
let H = await (
|
|
1267
|
-
const
|
|
1268
|
-
if (d && (N ||
|
|
1265
|
+
G = i && new n(w, K);
|
|
1266
|
+
let H = await (i ? W(G, X) : W(w, K));
|
|
1267
|
+
const F = d && (j === "stream" || j === "response");
|
|
1268
|
+
if (d && (N || F && R)) {
|
|
1269
1269
|
const l = {};
|
|
1270
1270
|
["status", "statusText", "headers"].forEach((ne) => {
|
|
1271
1271
|
l[ne] = H[ne];
|
|
@@ -1283,7 +1283,7 @@ const Xt = (t) => {
|
|
|
1283
1283
|
}
|
|
1284
1284
|
j = j || "text";
|
|
1285
1285
|
let Y = await y[f.findKey(y, j) || "text"](H, p);
|
|
1286
|
-
return !
|
|
1286
|
+
return !F && R && R(), await new Promise((l, m) => {
|
|
1287
1287
|
Kt(l, m, {
|
|
1288
1288
|
data: Y,
|
|
1289
1289
|
headers: re.from(H.headers),
|
|
@@ -1304,14 +1304,14 @@ const Xt = (t) => {
|
|
|
1304
1304
|
};
|
|
1305
1305
|
}, _n = /* @__PURE__ */ new Map(), Zt = (t) => {
|
|
1306
1306
|
let e = t ? t.env : {};
|
|
1307
|
-
const { fetch: n, Request: s, Response:
|
|
1307
|
+
const { fetch: n, Request: s, Response: a } = e, i = [
|
|
1308
1308
|
s,
|
|
1309
|
-
|
|
1309
|
+
a,
|
|
1310
1310
|
n
|
|
1311
1311
|
];
|
|
1312
|
-
let o =
|
|
1312
|
+
let o = i.length, c = o, u, x, d = _n;
|
|
1313
1313
|
for (; c--; )
|
|
1314
|
-
u =
|
|
1314
|
+
u = i[c], x = d.get(u), x === void 0 && d.set(u, x = c ? /* @__PURE__ */ new Map() : An(e)), d = x;
|
|
1315
1315
|
return x;
|
|
1316
1316
|
};
|
|
1317
1317
|
Zt();
|
|
@@ -1335,19 +1335,19 @@ const kt = (t) => `- ${t}`, Un = (t) => f.isFunction(t) || t === null || t === !
|
|
|
1335
1335
|
getAdapter: (t, e) => {
|
|
1336
1336
|
t = f.isArray(t) ? t : [t];
|
|
1337
1337
|
const { length: n } = t;
|
|
1338
|
-
let s,
|
|
1339
|
-
const
|
|
1338
|
+
let s, a;
|
|
1339
|
+
const i = {};
|
|
1340
1340
|
for (let o = 0; o < n; o++) {
|
|
1341
1341
|
s = t[o];
|
|
1342
1342
|
let c;
|
|
1343
|
-
if (
|
|
1343
|
+
if (a = s, !Un(s) && (a = Qe[(c = String(s)).toLowerCase()], a === void 0))
|
|
1344
1344
|
throw new $(`Unknown adapter '${c}'`);
|
|
1345
|
-
if (
|
|
1345
|
+
if (a && (f.isFunction(a) || (a = a.get(e))))
|
|
1346
1346
|
break;
|
|
1347
|
-
|
|
1347
|
+
i[c || "#" + o] = a;
|
|
1348
1348
|
}
|
|
1349
|
-
if (!
|
|
1350
|
-
const o = Object.entries(
|
|
1349
|
+
if (!a) {
|
|
1350
|
+
const o = Object.entries(i).map(
|
|
1351
1351
|
([u, x]) => `adapter ${u} ` + (x === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1352
1352
|
);
|
|
1353
1353
|
let c = n ? o.length > 1 ? `since :
|
|
@@ -1358,7 +1358,7 @@ const kt = (t) => `- ${t}`, Un = (t) => f.isFunction(t) || t === null || t === !
|
|
|
1358
1358
|
"ERR_NOT_SUPPORT"
|
|
1359
1359
|
);
|
|
1360
1360
|
}
|
|
1361
|
-
return
|
|
1361
|
+
return a;
|
|
1362
1362
|
},
|
|
1363
1363
|
adapters: Qe
|
|
1364
1364
|
};
|
|
@@ -1370,7 +1370,7 @@ function Et(t) {
|
|
|
1370
1370
|
return Ye(t), t.headers = re.from(t.headers), t.data = Ve.call(
|
|
1371
1371
|
t,
|
|
1372
1372
|
t.transformRequest
|
|
1373
|
-
), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), Qt.getAdapter(t.adapter ||
|
|
1373
|
+
), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), Qt.getAdapter(t.adapter || Ie.adapter, t)(t).then(function(s) {
|
|
1374
1374
|
return Ye(t), s.data = Ve.call(
|
|
1375
1375
|
t,
|
|
1376
1376
|
t.transformResponse,
|
|
@@ -1392,21 +1392,21 @@ const er = "1.12.2", We = {};
|
|
|
1392
1392
|
});
|
|
1393
1393
|
const Ct = {};
|
|
1394
1394
|
We.transitional = function(e, n, s) {
|
|
1395
|
-
function i
|
|
1396
|
-
return "[Axios v" + er + "] Transitional option '" +
|
|
1395
|
+
function a(i, o) {
|
|
1396
|
+
return "[Axios v" + er + "] Transitional option '" + i + "'" + o + (s ? ". " + s : "");
|
|
1397
1397
|
}
|
|
1398
|
-
return (
|
|
1398
|
+
return (i, o, c) => {
|
|
1399
1399
|
if (e === !1)
|
|
1400
1400
|
throw new $(
|
|
1401
|
-
|
|
1401
|
+
a(o, " has been removed" + (n ? " in " + n : "")),
|
|
1402
1402
|
$.ERR_DEPRECATED
|
|
1403
1403
|
);
|
|
1404
1404
|
return n && !Ct[o] && (Ct[o] = !0, console.warn(
|
|
1405
|
-
|
|
1405
|
+
a(
|
|
1406
1406
|
o,
|
|
1407
1407
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
1408
1408
|
)
|
|
1409
|
-
)), e ? e(
|
|
1409
|
+
)), e ? e(i, o, c) : !0;
|
|
1410
1410
|
};
|
|
1411
1411
|
};
|
|
1412
1412
|
We.spelling = function(e) {
|
|
@@ -1416,17 +1416,17 @@ function $n(t, e, n) {
|
|
|
1416
1416
|
if (typeof t != "object")
|
|
1417
1417
|
throw new $("options must be an object", $.ERR_BAD_OPTION_VALUE);
|
|
1418
1418
|
const s = Object.keys(t);
|
|
1419
|
-
let
|
|
1420
|
-
for (;
|
|
1421
|
-
const
|
|
1419
|
+
let a = s.length;
|
|
1420
|
+
for (; a-- > 0; ) {
|
|
1421
|
+
const i = s[a], o = e[i];
|
|
1422
1422
|
if (o) {
|
|
1423
|
-
const c = t[
|
|
1423
|
+
const c = t[i], u = c === void 0 || o(c, i, t);
|
|
1424
1424
|
if (u !== !0)
|
|
1425
|
-
throw new $("option " +
|
|
1425
|
+
throw new $("option " + i + " must be " + u, $.ERR_BAD_OPTION_VALUE);
|
|
1426
1426
|
continue;
|
|
1427
1427
|
}
|
|
1428
1428
|
if (n !== !0)
|
|
1429
|
-
throw new $("Unknown option " +
|
|
1429
|
+
throw new $("Unknown option " + i, $.ERR_BAD_OPTION);
|
|
1430
1430
|
}
|
|
1431
1431
|
}
|
|
1432
1432
|
const $e = {
|
|
@@ -1453,12 +1453,12 @@ let he = class {
|
|
|
1453
1453
|
return await this._request(e, n);
|
|
1454
1454
|
} catch (s) {
|
|
1455
1455
|
if (s instanceof Error) {
|
|
1456
|
-
let
|
|
1457
|
-
Error.captureStackTrace ? Error.captureStackTrace(
|
|
1458
|
-
const
|
|
1456
|
+
let a = {};
|
|
1457
|
+
Error.captureStackTrace ? Error.captureStackTrace(a) : a = new Error();
|
|
1458
|
+
const i = a.stack ? a.stack.replace(/^.+\n/, "") : "";
|
|
1459
1459
|
try {
|
|
1460
|
-
s.stack ?
|
|
1461
|
-
` +
|
|
1460
|
+
s.stack ? i && !String(s.stack).endsWith(i.replace(/^.+\n.+\n/, "")) && (s.stack += `
|
|
1461
|
+
` + i) : s.stack = i;
|
|
1462
1462
|
} catch {
|
|
1463
1463
|
}
|
|
1464
1464
|
}
|
|
@@ -1467,30 +1467,30 @@ let he = class {
|
|
|
1467
1467
|
}
|
|
1468
1468
|
_request(e, n) {
|
|
1469
1469
|
typeof e == "string" ? (n = n || {}, n.url = e) : n = e || {}, n = me(this.defaults, n);
|
|
1470
|
-
const { transitional: s, paramsSerializer:
|
|
1470
|
+
const { transitional: s, paramsSerializer: a, headers: i } = n;
|
|
1471
1471
|
s !== void 0 && $e.assertOptions(s, {
|
|
1472
1472
|
silentJSONParsing: ce.transitional(ce.boolean),
|
|
1473
1473
|
forcedJSONParsing: ce.transitional(ce.boolean),
|
|
1474
1474
|
clarifyTimeoutError: ce.transitional(ce.boolean)
|
|
1475
|
-
}, !1),
|
|
1476
|
-
serialize:
|
|
1477
|
-
} : $e.assertOptions(
|
|
1475
|
+
}, !1), a != null && (f.isFunction(a) ? n.paramsSerializer = {
|
|
1476
|
+
serialize: a
|
|
1477
|
+
} : $e.assertOptions(a, {
|
|
1478
1478
|
encode: ce.function,
|
|
1479
1479
|
serialize: ce.function
|
|
1480
1480
|
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), $e.assertOptions(n, {
|
|
1481
1481
|
baseUrl: ce.spelling("baseURL"),
|
|
1482
1482
|
withXsrfToken: ce.spelling("withXSRFToken")
|
|
1483
1483
|
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1484
|
-
let o =
|
|
1485
|
-
|
|
1486
|
-
|
|
1484
|
+
let o = i && f.merge(
|
|
1485
|
+
i.common,
|
|
1486
|
+
i[n.method]
|
|
1487
1487
|
);
|
|
1488
|
-
|
|
1488
|
+
i && f.forEach(
|
|
1489
1489
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1490
1490
|
(p) => {
|
|
1491
|
-
delete
|
|
1491
|
+
delete i[p];
|
|
1492
1492
|
}
|
|
1493
|
-
), n.headers = re.concat(o,
|
|
1493
|
+
), n.headers = re.concat(o, i);
|
|
1494
1494
|
const c = [];
|
|
1495
1495
|
let u = !0;
|
|
1496
1496
|
this.interceptors.request.forEach(function(w) {
|
|
@@ -1544,13 +1544,13 @@ f.forEach(["delete", "get", "head", "options"], function(e) {
|
|
|
1544
1544
|
});
|
|
1545
1545
|
f.forEach(["post", "put", "patch"], function(e) {
|
|
1546
1546
|
function n(s) {
|
|
1547
|
-
return function(
|
|
1547
|
+
return function(i, o, c) {
|
|
1548
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:
|
|
1553
|
+
url: i,
|
|
1554
1554
|
data: o
|
|
1555
1555
|
}));
|
|
1556
1556
|
};
|
|
@@ -1562,26 +1562,26 @@ let Dn = class tr {
|
|
|
1562
1562
|
if (typeof e != "function")
|
|
1563
1563
|
throw new TypeError("executor must be a function.");
|
|
1564
1564
|
let n;
|
|
1565
|
-
this.promise = new Promise(function(
|
|
1566
|
-
n =
|
|
1565
|
+
this.promise = new Promise(function(i) {
|
|
1566
|
+
n = i;
|
|
1567
1567
|
});
|
|
1568
1568
|
const s = this;
|
|
1569
|
-
this.promise.then((
|
|
1569
|
+
this.promise.then((a) => {
|
|
1570
1570
|
if (!s._listeners) return;
|
|
1571
|
-
let
|
|
1572
|
-
for (;
|
|
1573
|
-
s._listeners[
|
|
1571
|
+
let i = s._listeners.length;
|
|
1572
|
+
for (; i-- > 0; )
|
|
1573
|
+
s._listeners[i](a);
|
|
1574
1574
|
s._listeners = null;
|
|
1575
|
-
}), this.promise.then = (
|
|
1576
|
-
let
|
|
1575
|
+
}), this.promise.then = (a) => {
|
|
1576
|
+
let i;
|
|
1577
1577
|
const o = new Promise((c) => {
|
|
1578
|
-
s.subscribe(c),
|
|
1579
|
-
}).then(
|
|
1578
|
+
s.subscribe(c), i = c;
|
|
1579
|
+
}).then(a);
|
|
1580
1580
|
return o.cancel = function() {
|
|
1581
|
-
s.unsubscribe(
|
|
1581
|
+
s.unsubscribe(i);
|
|
1582
1582
|
}, o;
|
|
1583
|
-
}, e(function(
|
|
1584
|
-
s.reason || (s.reason = new ve(
|
|
1583
|
+
}, e(function(i, o, c) {
|
|
1584
|
+
s.reason || (s.reason = new ve(i, o, c), n(s.reason));
|
|
1585
1585
|
});
|
|
1586
1586
|
}
|
|
1587
1587
|
/**
|
|
@@ -1623,8 +1623,8 @@ let Dn = class tr {
|
|
|
1623
1623
|
static source() {
|
|
1624
1624
|
let e;
|
|
1625
1625
|
return {
|
|
1626
|
-
token: new tr(function(
|
|
1627
|
-
e =
|
|
1626
|
+
token: new tr(function(a) {
|
|
1627
|
+
e = a;
|
|
1628
1628
|
}),
|
|
1629
1629
|
cancel: e
|
|
1630
1630
|
};
|
|
@@ -1635,7 +1635,7 @@ function Nn(t) {
|
|
|
1635
1635
|
return t.apply(null, n);
|
|
1636
1636
|
};
|
|
1637
1637
|
}
|
|
1638
|
-
function
|
|
1638
|
+
function Fn(t) {
|
|
1639
1639
|
return f.isObject(t) && t.isAxiosError === !0;
|
|
1640
1640
|
}
|
|
1641
1641
|
const et = {
|
|
@@ -1708,11 +1708,11 @@ Object.entries(et).forEach(([t, e]) => {
|
|
|
1708
1708
|
});
|
|
1709
1709
|
function rr(t) {
|
|
1710
1710
|
const e = new he(t), n = At(he.prototype.request, e);
|
|
1711
|
-
return f.extend(n, he.prototype, e, { allOwnKeys: !0 }), f.extend(n, e, null, { allOwnKeys: !0 }), n.create = function(
|
|
1712
|
-
return rr(me(t,
|
|
1711
|
+
return f.extend(n, he.prototype, e, { allOwnKeys: !0 }), f.extend(n, e, null, { allOwnKeys: !0 }), n.create = function(a) {
|
|
1712
|
+
return rr(me(t, a));
|
|
1713
1713
|
}, n;
|
|
1714
1714
|
}
|
|
1715
|
-
const J = rr(
|
|
1715
|
+
const J = rr(Ie);
|
|
1716
1716
|
J.Axios = he;
|
|
1717
1717
|
J.CanceledError = ve;
|
|
1718
1718
|
J.CancelToken = Dn;
|
|
@@ -1725,7 +1725,7 @@ J.all = function(e) {
|
|
|
1725
1725
|
return Promise.all(e);
|
|
1726
1726
|
};
|
|
1727
1727
|
J.spread = Nn;
|
|
1728
|
-
J.isAxiosError =
|
|
1728
|
+
J.isAxiosError = Fn;
|
|
1729
1729
|
J.mergeConfig = me;
|
|
1730
1730
|
J.AxiosHeaders = re;
|
|
1731
1731
|
J.formToJSON = (t) => Yt(f.isHTMLForm(t) ? new FormData(t) : t);
|
|
@@ -1741,16 +1741,16 @@ const {
|
|
|
1741
1741
|
VERSION: Xs,
|
|
1742
1742
|
all: Zs,
|
|
1743
1743
|
Cancel: Qs,
|
|
1744
|
-
isAxiosError:
|
|
1745
|
-
spread:
|
|
1746
|
-
toFormData:
|
|
1747
|
-
AxiosHeaders:
|
|
1748
|
-
HttpStatusCode:
|
|
1749
|
-
formToJSON:
|
|
1750
|
-
getAdapter:
|
|
1751
|
-
mergeConfig:
|
|
1744
|
+
isAxiosError: ea,
|
|
1745
|
+
spread: ta,
|
|
1746
|
+
toFormData: ra,
|
|
1747
|
+
AxiosHeaders: na,
|
|
1748
|
+
HttpStatusCode: sa,
|
|
1749
|
+
formToJSON: aa,
|
|
1750
|
+
getAdapter: ia,
|
|
1751
|
+
mergeConfig: oa
|
|
1752
1752
|
} = J;
|
|
1753
|
-
class
|
|
1753
|
+
class la {
|
|
1754
1754
|
baseUrl;
|
|
1755
1755
|
apiKey;
|
|
1756
1756
|
appId;
|
|
@@ -1781,7 +1781,7 @@ class li {
|
|
|
1781
1781
|
* @param data Optional request body
|
|
1782
1782
|
* @param extraHeaders Optional custom headers
|
|
1783
1783
|
*/
|
|
1784
|
-
async request(e, n, s,
|
|
1784
|
+
async request(e, n, s, a = {}, i = !1) {
|
|
1785
1785
|
try {
|
|
1786
1786
|
const o = {
|
|
1787
1787
|
...this.appId ? { appId: this.appId } : {},
|
|
@@ -1791,8 +1791,8 @@ class li {
|
|
|
1791
1791
|
url: n,
|
|
1792
1792
|
method: e,
|
|
1793
1793
|
data: o,
|
|
1794
|
-
headers:
|
|
1795
|
-
withCredentials:
|
|
1794
|
+
headers: a,
|
|
1795
|
+
withCredentials: i
|
|
1796
1796
|
// 👈 override axios default
|
|
1797
1797
|
})).data;
|
|
1798
1798
|
} catch (o) {
|
|
@@ -1808,8 +1808,8 @@ class li {
|
|
|
1808
1808
|
* @param params user details
|
|
1809
1809
|
*/
|
|
1810
1810
|
async signupUser(e) {
|
|
1811
|
-
const { name: n, email: s, password:
|
|
1812
|
-
if (!n || !s || !
|
|
1811
|
+
const { name: n, email: s, password: a } = e;
|
|
1812
|
+
if (!n || !s || !a)
|
|
1813
1813
|
throw new Error("signup: 'name', 'email', and 'password' are required");
|
|
1814
1814
|
return await this.request("POST", "/users/signup", e, {}, !0);
|
|
1815
1815
|
}
|
|
@@ -1829,8 +1829,8 @@ class li {
|
|
|
1829
1829
|
{},
|
|
1830
1830
|
!0
|
|
1831
1831
|
);
|
|
1832
|
-
} catch (
|
|
1833
|
-
throw new Error(
|
|
1832
|
+
} catch (a) {
|
|
1833
|
+
throw new Error(a.message || "Login failed due to an unknown error");
|
|
1834
1834
|
}
|
|
1835
1835
|
}
|
|
1836
1836
|
/**
|
|
@@ -1856,16 +1856,16 @@ class li {
|
|
|
1856
1856
|
* @param params requires userId, currentPassword, newPassword
|
|
1857
1857
|
*/
|
|
1858
1858
|
async changePassword(e) {
|
|
1859
|
-
const { userId: n, currentPassword: s, newPassword:
|
|
1859
|
+
const { userId: n, currentPassword: s, newPassword: a } = e;
|
|
1860
1860
|
if (!n) throw new Error("changePassword: 'userId' is required");
|
|
1861
|
-
if (!s || !
|
|
1861
|
+
if (!s || !a)
|
|
1862
1862
|
throw new Error(
|
|
1863
1863
|
"changePassword: both 'currentPassword' and 'newPassword' are required"
|
|
1864
1864
|
);
|
|
1865
1865
|
return await this.request(
|
|
1866
1866
|
"PUT",
|
|
1867
1867
|
`/users/change-password/${n}`,
|
|
1868
|
-
{ currentPassword: s, newPassword:
|
|
1868
|
+
{ currentPassword: s, newPassword: a },
|
|
1869
1869
|
{},
|
|
1870
1870
|
!0
|
|
1871
1871
|
);
|
|
@@ -1894,10 +1894,10 @@ class li {
|
|
|
1894
1894
|
{},
|
|
1895
1895
|
!0
|
|
1896
1896
|
);
|
|
1897
|
-
} catch (
|
|
1898
|
-
throw console.error("requestEmailVerificationOTP Error:",
|
|
1899
|
-
message:
|
|
1900
|
-
status:
|
|
1897
|
+
} catch (a) {
|
|
1898
|
+
throw console.error("requestEmailVerificationOTP Error:", a), {
|
|
1899
|
+
message: a?.message || "Failed to send verification OTP",
|
|
1900
|
+
status: a?.status || 500
|
|
1901
1901
|
};
|
|
1902
1902
|
}
|
|
1903
1903
|
}
|
|
@@ -1917,10 +1917,10 @@ class li {
|
|
|
1917
1917
|
{},
|
|
1918
1918
|
!0
|
|
1919
1919
|
);
|
|
1920
|
-
} catch (
|
|
1920
|
+
} catch (a) {
|
|
1921
1921
|
throw {
|
|
1922
|
-
message:
|
|
1923
|
-
status:
|
|
1922
|
+
message: a.message || "Failed to verify email",
|
|
1923
|
+
status: a.status || 500
|
|
1924
1924
|
};
|
|
1925
1925
|
}
|
|
1926
1926
|
}
|
|
@@ -2007,15 +2007,15 @@ class li {
|
|
|
2007
2007
|
* @param params requires email, otp, newPassword
|
|
2008
2008
|
*/
|
|
2009
2009
|
async resetUserPassword(e) {
|
|
2010
|
-
const { email: n, otp: s, newPassword:
|
|
2011
|
-
if (!n || !s || !
|
|
2010
|
+
const { email: n, otp: s, newPassword: a } = e;
|
|
2011
|
+
if (!n || !s || !a)
|
|
2012
2012
|
throw new Error(
|
|
2013
2013
|
"resetPassword: 'email', 'otp' and 'newPassword' are required"
|
|
2014
2014
|
);
|
|
2015
2015
|
return await this.request("POST", "/users/reset-password", {
|
|
2016
2016
|
email: n,
|
|
2017
2017
|
otp: s,
|
|
2018
|
-
newPassword:
|
|
2018
|
+
newPassword: a
|
|
2019
2019
|
});
|
|
2020
2020
|
}
|
|
2021
2021
|
/**
|
|
@@ -2035,10 +2035,10 @@ class li {
|
|
|
2035
2035
|
async searchUserData(e) {
|
|
2036
2036
|
const { userId: n, ...s } = e;
|
|
2037
2037
|
if (!n) throw new Error("userId required");
|
|
2038
|
-
const
|
|
2038
|
+
const a = new URLSearchParams(s).toString();
|
|
2039
2039
|
return await this.request(
|
|
2040
2040
|
"GET",
|
|
2041
|
-
`/users/${n}/data/search?${
|
|
2041
|
+
`/users/${n}/data/search?${a}`,
|
|
2042
2042
|
void 0,
|
|
2043
2043
|
{},
|
|
2044
2044
|
!1
|
|
@@ -2060,15 +2060,15 @@ class li {
|
|
|
2060
2060
|
const { userId: n, ...s } = e;
|
|
2061
2061
|
if (!n)
|
|
2062
2062
|
throw new Error("searchUserDataByKeys: 'userId' is required");
|
|
2063
|
-
const
|
|
2063
|
+
const a = new URLSearchParams(
|
|
2064
2064
|
Object.entries(s).reduce(
|
|
2065
|
-
(
|
|
2065
|
+
(i, [o, c]) => (c != null && (i[o] = String(c)), i),
|
|
2066
2066
|
{}
|
|
2067
2067
|
)
|
|
2068
2068
|
).toString();
|
|
2069
2069
|
return await this.request(
|
|
2070
2070
|
"GET",
|
|
2071
|
-
`/users/${n}/data/searchbyref?${
|
|
2071
|
+
`/users/${n}/data/searchbyref?${a}`,
|
|
2072
2072
|
void 0,
|
|
2073
2073
|
{},
|
|
2074
2074
|
!1
|
|
@@ -2113,17 +2113,17 @@ class li {
|
|
|
2113
2113
|
* @param params requires userId and data object
|
|
2114
2114
|
*/
|
|
2115
2115
|
async addUserData(e) {
|
|
2116
|
-
const { userId: n, dataCategory: s, data:
|
|
2116
|
+
const { userId: n, dataCategory: s, data: a } = e;
|
|
2117
2117
|
if (!n) throw new Error("addUserData: 'userId' is required");
|
|
2118
2118
|
if (!s)
|
|
2119
2119
|
throw new Error("addUserData: 'dataCategory' is required");
|
|
2120
|
-
if (!
|
|
2120
|
+
if (!a) throw new Error("addUserData: 'data' is required");
|
|
2121
2121
|
return await this.request(
|
|
2122
2122
|
"POST",
|
|
2123
2123
|
`/users/${n}/data`,
|
|
2124
2124
|
{
|
|
2125
2125
|
dataCategory: s,
|
|
2126
|
-
...
|
|
2126
|
+
...a
|
|
2127
2127
|
},
|
|
2128
2128
|
{},
|
|
2129
2129
|
!1
|
|
@@ -2135,14 +2135,14 @@ class li {
|
|
|
2135
2135
|
* @param params requires userId, dataId, and updated fields
|
|
2136
2136
|
*/
|
|
2137
2137
|
async updateUserData(e) {
|
|
2138
|
-
const { userId: n, dataId: s, data:
|
|
2138
|
+
const { userId: n, dataId: s, data: a } = e;
|
|
2139
2139
|
if (!n || !s)
|
|
2140
2140
|
throw new Error("updateUserData: 'userId' and 'dataId' are required");
|
|
2141
|
-
if (!
|
|
2141
|
+
if (!a) throw new Error("updateUserData: 'data' is required");
|
|
2142
2142
|
return await this.request(
|
|
2143
2143
|
"PUT",
|
|
2144
2144
|
`/users/${n}/data/${s}`,
|
|
2145
|
-
|
|
2145
|
+
a,
|
|
2146
2146
|
{},
|
|
2147
2147
|
!1
|
|
2148
2148
|
// 👈 no credentials
|
|
@@ -2165,6 +2165,24 @@ class li {
|
|
|
2165
2165
|
// 👈 no credentials
|
|
2166
2166
|
);
|
|
2167
2167
|
}
|
|
2168
|
+
/**
|
|
2169
|
+
* Search all users' data by category from a specific app
|
|
2170
|
+
* @param params requires appId and category
|
|
2171
|
+
*/
|
|
2172
|
+
async searchAllUsersDataFromApp(e) {
|
|
2173
|
+
const { appId: n, category: s } = e;
|
|
2174
|
+
if (!n) throw new Error("searchAllUsersDataFromApp: 'appId' is required");
|
|
2175
|
+
if (!s)
|
|
2176
|
+
throw new Error("searchAllUsersDataFromApp: 'category' is required");
|
|
2177
|
+
return await this.request(
|
|
2178
|
+
"GET",
|
|
2179
|
+
`/users/app/${encodeURIComponent(n)}/category/${encodeURIComponent(s)}`,
|
|
2180
|
+
void 0,
|
|
2181
|
+
{},
|
|
2182
|
+
!1
|
|
2183
|
+
// 👈 no credentials
|
|
2184
|
+
);
|
|
2185
|
+
}
|
|
2168
2186
|
// ================= APP DATA =================
|
|
2169
2187
|
/**
|
|
2170
2188
|
* Get all app data items for the current app
|
|
@@ -2221,15 +2239,15 @@ class li {
|
|
|
2221
2239
|
async addAppData(e) {
|
|
2222
2240
|
const n = this.appId;
|
|
2223
2241
|
if (!n) throw new Error("addAppData: 'appId' is required");
|
|
2224
|
-
const { dataCategory: s, data:
|
|
2242
|
+
const { dataCategory: s, data: a } = e;
|
|
2225
2243
|
if (!s)
|
|
2226
2244
|
throw new Error("addAppData: 'dataCategory' is required");
|
|
2227
|
-
if (!
|
|
2245
|
+
if (!a || typeof a != "object")
|
|
2228
2246
|
throw new Error("addAppData: 'data' is required");
|
|
2229
2247
|
return await this.request(
|
|
2230
2248
|
"POST",
|
|
2231
2249
|
`/app/${n}/data/${encodeURIComponent(s)}`,
|
|
2232
|
-
{ item:
|
|
2250
|
+
{ item: a },
|
|
2233
2251
|
{},
|
|
2234
2252
|
!1
|
|
2235
2253
|
);
|
|
@@ -2277,23 +2295,23 @@ var Ae = { exports: {} }, ke = {};
|
|
|
2277
2295
|
* LICENSE file in the root directory of this source tree.
|
|
2278
2296
|
*/
|
|
2279
2297
|
var Tt;
|
|
2280
|
-
function
|
|
2298
|
+
function Ln() {
|
|
2281
2299
|
if (Tt) return ke;
|
|
2282
2300
|
Tt = 1;
|
|
2283
2301
|
var t = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
|
|
2284
|
-
function n(s,
|
|
2302
|
+
function n(s, a, i) {
|
|
2285
2303
|
var o = null;
|
|
2286
|
-
if (
|
|
2287
|
-
|
|
2288
|
-
for (var c in
|
|
2289
|
-
c !== "key" && (
|
|
2290
|
-
} else
|
|
2291
|
-
return
|
|
2304
|
+
if (i !== void 0 && (o = "" + i), a.key !== void 0 && (o = "" + a.key), "key" in a) {
|
|
2305
|
+
i = {};
|
|
2306
|
+
for (var c in a)
|
|
2307
|
+
c !== "key" && (i[c] = a[c]);
|
|
2308
|
+
} else i = a;
|
|
2309
|
+
return a = i.ref, {
|
|
2292
2310
|
$$typeof: t,
|
|
2293
2311
|
type: s,
|
|
2294
2312
|
key: o,
|
|
2295
|
-
ref:
|
|
2296
|
-
props:
|
|
2313
|
+
ref: a !== void 0 ? a : null,
|
|
2314
|
+
props: i
|
|
2297
2315
|
};
|
|
2298
2316
|
}
|
|
2299
2317
|
return ke.Fragment = e, ke.jsx = n, ke.jsxs = n, ke;
|
|
@@ -2321,7 +2339,7 @@ function qn() {
|
|
|
2321
2339
|
return "Fragment";
|
|
2322
2340
|
case C:
|
|
2323
2341
|
return "Profiler";
|
|
2324
|
-
case
|
|
2342
|
+
case I:
|
|
2325
2343
|
return "StrictMode";
|
|
2326
2344
|
case b:
|
|
2327
2345
|
return "Suspense";
|
|
@@ -2345,7 +2363,7 @@ function qn() {
|
|
|
2345
2363
|
return l = l.displayName, l || (l = m.displayName || m.name || "", l = l !== "" ? "ForwardRef(" + l + ")" : "ForwardRef"), l;
|
|
2346
2364
|
case q:
|
|
2347
2365
|
return m = l.displayName || null, m !== null ? m : t(l.type) || "Memo";
|
|
2348
|
-
case
|
|
2366
|
+
case O:
|
|
2349
2367
|
m = l._payload, l = l._init;
|
|
2350
2368
|
try {
|
|
2351
2369
|
return t(l(m));
|
|
@@ -2376,7 +2394,7 @@ function qn() {
|
|
|
2376
2394
|
}
|
|
2377
2395
|
function s(l) {
|
|
2378
2396
|
if (l === h) return "<>";
|
|
2379
|
-
if (typeof l == "object" && l !== null && l.$$typeof ===
|
|
2397
|
+
if (typeof l == "object" && l !== null && l.$$typeof === O)
|
|
2380
2398
|
return "<...>";
|
|
2381
2399
|
try {
|
|
2382
2400
|
var m = t(l);
|
|
@@ -2385,11 +2403,11 @@ function qn() {
|
|
|
2385
2403
|
return "<...>";
|
|
2386
2404
|
}
|
|
2387
2405
|
}
|
|
2388
|
-
function
|
|
2406
|
+
function a() {
|
|
2389
2407
|
var l = T.A;
|
|
2390
2408
|
return l === null ? null : l.getOwner();
|
|
2391
2409
|
}
|
|
2392
|
-
function
|
|
2410
|
+
function i() {
|
|
2393
2411
|
return Error("react-stack-top-frame");
|
|
2394
2412
|
}
|
|
2395
2413
|
function o(l) {
|
|
@@ -2493,18 +2511,18 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2493
2511
|
l,
|
|
2494
2512
|
B,
|
|
2495
2513
|
S,
|
|
2496
|
-
|
|
2514
|
+
a(),
|
|
2497
2515
|
ne,
|
|
2498
2516
|
oe
|
|
2499
2517
|
);
|
|
2500
2518
|
}
|
|
2501
2519
|
function y(l) {
|
|
2502
|
-
k(l) ? l._store && (l._store.validated = 1) : typeof l == "object" && l !== null && l.$$typeof ===
|
|
2520
|
+
k(l) ? l._store && (l._store.validated = 1) : typeof l == "object" && l !== null && l.$$typeof === O && (l._payload.status === "fulfilled" ? k(l._payload.value) && l._payload.value._store && (l._payload.value._store.validated = 1) : l._store && (l._store.validated = 1));
|
|
2503
2521
|
}
|
|
2504
2522
|
function k(l) {
|
|
2505
2523
|
return typeof l == "object" && l !== null && l.$$typeof === p;
|
|
2506
2524
|
}
|
|
2507
|
-
var E = Ce, p = Symbol.for("react.transitional.element"), w = Symbol.for("react.portal"), h = Symbol.for("react.fragment"),
|
|
2525
|
+
var E = Ce, p = Symbol.for("react.transitional.element"), w = Symbol.for("react.portal"), h = Symbol.for("react.fragment"), I = Symbol.for("react.strict_mode"), C = Symbol.for("react.profiler"), g = Symbol.for("react.consumer"), A = Symbol.for("react.context"), N = Symbol.for("react.forward_ref"), b = Symbol.for("react.suspense"), j = Symbol.for("react.suspense_list"), q = Symbol.for("react.memo"), O = Symbol.for("react.lazy"), X = Symbol.for("react.activity"), W = Symbol.for("react.client.reference"), T = E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, G = Object.prototype.hasOwnProperty, R = Array.isArray, z = console.createTask ? console.createTask : function() {
|
|
2508
2526
|
return null;
|
|
2509
2527
|
};
|
|
2510
2528
|
E = {
|
|
@@ -2514,8 +2532,8 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2514
2532
|
};
|
|
2515
2533
|
var M, K = {}, H = E.react_stack_bottom_frame.bind(
|
|
2516
2534
|
E,
|
|
2517
|
-
|
|
2518
|
-
)(),
|
|
2535
|
+
i
|
|
2536
|
+
)(), F = z(s(i)), Y = {};
|
|
2519
2537
|
Ee.Fragment = h, Ee.jsx = function(l, m, S) {
|
|
2520
2538
|
var D = 1e4 > T.recentlyCreatedOwnerStacks++;
|
|
2521
2539
|
return d(
|
|
@@ -2524,7 +2542,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2524
2542
|
S,
|
|
2525
2543
|
!1,
|
|
2526
2544
|
D ? Error("react-stack-top-frame") : H,
|
|
2527
|
-
D ? z(s(l)) :
|
|
2545
|
+
D ? z(s(l)) : F
|
|
2528
2546
|
);
|
|
2529
2547
|
}, Ee.jsxs = function(l, m, S) {
|
|
2530
2548
|
var D = 1e4 > T.recentlyCreatedOwnerStacks++;
|
|
@@ -2534,14 +2552,14 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2534
2552
|
S,
|
|
2535
2553
|
!0,
|
|
2536
2554
|
D ? Error("react-stack-top-frame") : H,
|
|
2537
|
-
D ? z(s(l)) :
|
|
2555
|
+
D ? z(s(l)) : F
|
|
2538
2556
|
);
|
|
2539
2557
|
};
|
|
2540
2558
|
})()), Ee;
|
|
2541
2559
|
}
|
|
2542
2560
|
var Pt;
|
|
2543
2561
|
function Mn() {
|
|
2544
|
-
return Pt || (Pt = 1, process.env.NODE_ENV === "production" ? Ae.exports =
|
|
2562
|
+
return Pt || (Pt = 1, process.env.NODE_ENV === "production" ? Ae.exports = Ln() : Ae.exports = qn()), Ae.exports;
|
|
2545
2563
|
}
|
|
2546
2564
|
var r = Mn();
|
|
2547
2565
|
/**
|
|
@@ -2553,7 +2571,7 @@ var r = Mn();
|
|
|
2553
2571
|
const Wn = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Bn = (t) => t.replace(
|
|
2554
2572
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
2555
2573
|
(e, n, s) => s ? s.toUpperCase() : n.toLowerCase()
|
|
2556
|
-
),
|
|
2574
|
+
), It = (t) => {
|
|
2557
2575
|
const e = Bn(t);
|
|
2558
2576
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
2559
2577
|
}, nr = (...t) => t.filter((e, n, s) => !!e && e.trim() !== "" && s.indexOf(e) === n).join(" ").trim(), Hn = (t) => {
|
|
@@ -2590,8 +2608,8 @@ const Yn = zt(
|
|
|
2590
2608
|
size: e = 24,
|
|
2591
2609
|
strokeWidth: n = 2,
|
|
2592
2610
|
absoluteStrokeWidth: s,
|
|
2593
|
-
className:
|
|
2594
|
-
children:
|
|
2611
|
+
className: a = "",
|
|
2612
|
+
children: i,
|
|
2595
2613
|
iconNode: o,
|
|
2596
2614
|
...c
|
|
2597
2615
|
}, u) => Ke(
|
|
@@ -2603,13 +2621,13 @@ const Yn = zt(
|
|
|
2603
2621
|
height: e,
|
|
2604
2622
|
stroke: t,
|
|
2605
2623
|
strokeWidth: s ? Number(n) * 24 / Number(e) : n,
|
|
2606
|
-
className: nr("lucide",
|
|
2607
|
-
...!
|
|
2624
|
+
className: nr("lucide", a),
|
|
2625
|
+
...!i && !Hn(c) && { "aria-hidden": "true" },
|
|
2608
2626
|
...c
|
|
2609
2627
|
},
|
|
2610
2628
|
[
|
|
2611
2629
|
...o.map(([x, d]) => Ke(x, d)),
|
|
2612
|
-
...Array.isArray(
|
|
2630
|
+
...Array.isArray(i) ? i : [i]
|
|
2613
2631
|
]
|
|
2614
2632
|
)
|
|
2615
2633
|
);
|
|
@@ -2619,20 +2637,20 @@ const Yn = zt(
|
|
|
2619
2637
|
* This source code is licensed under the ISC license.
|
|
2620
2638
|
* See the LICENSE file in the root directory of this source tree.
|
|
2621
2639
|
*/
|
|
2622
|
-
const
|
|
2640
|
+
const L = (t, e) => {
|
|
2623
2641
|
const n = zt(
|
|
2624
|
-
({ className: s, ...
|
|
2625
|
-
ref:
|
|
2642
|
+
({ className: s, ...a }, i) => Ke(Yn, {
|
|
2643
|
+
ref: i,
|
|
2626
2644
|
iconNode: e,
|
|
2627
2645
|
className: nr(
|
|
2628
|
-
`lucide-${Wn(
|
|
2646
|
+
`lucide-${Wn(It(t))}`,
|
|
2629
2647
|
`lucide-${t}`,
|
|
2630
2648
|
s
|
|
2631
2649
|
),
|
|
2632
|
-
...
|
|
2650
|
+
...a
|
|
2633
2651
|
})
|
|
2634
2652
|
);
|
|
2635
|
-
return n.displayName =
|
|
2653
|
+
return n.displayName = It(t), n;
|
|
2636
2654
|
};
|
|
2637
2655
|
/**
|
|
2638
2656
|
* @license lucide-react v0.544.0 - ISC
|
|
@@ -2649,7 +2667,7 @@ const Jn = [
|
|
|
2649
2667
|
}
|
|
2650
2668
|
],
|
|
2651
2669
|
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
2652
|
-
], Kn =
|
|
2670
|
+
], Kn = L("badge-check", Jn);
|
|
2653
2671
|
/**
|
|
2654
2672
|
* @license lucide-react v0.544.0 - ISC
|
|
2655
2673
|
*
|
|
@@ -2665,14 +2683,14 @@ const Gn = [
|
|
|
2665
2683
|
}
|
|
2666
2684
|
],
|
|
2667
2685
|
["circle", { cx: "12", cy: "13", r: "3", key: "1vg3eu" }]
|
|
2668
|
-
], tt =
|
|
2686
|
+
], tt = L("camera", Gn);
|
|
2669
2687
|
/**
|
|
2670
2688
|
* @license lucide-react v0.544.0 - ISC
|
|
2671
2689
|
*
|
|
2672
2690
|
* This source code is licensed under the ISC license.
|
|
2673
2691
|
* See the LICENSE file in the root directory of this source tree.
|
|
2674
2692
|
*/
|
|
2675
|
-
const Xn = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], Zn =
|
|
2693
|
+
const Xn = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], Zn = L("chevron-down", Xn);
|
|
2676
2694
|
/**
|
|
2677
2695
|
* @license lucide-react v0.544.0 - ISC
|
|
2678
2696
|
*
|
|
@@ -2683,7 +2701,7 @@ const Qn = [
|
|
|
2683
2701
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
2684
2702
|
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
2685
2703
|
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
2686
|
-
], se =
|
|
2704
|
+
], se = L("circle-alert", Qn);
|
|
2687
2705
|
/**
|
|
2688
2706
|
* @license lucide-react v0.544.0 - ISC
|
|
2689
2707
|
*
|
|
@@ -2693,7 +2711,7 @@ const Qn = [
|
|
|
2693
2711
|
const es = [
|
|
2694
2712
|
["path", { d: "M21.801 10A10 10 0 1 1 17 3.335", key: "yps3ct" }],
|
|
2695
2713
|
["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
|
|
2696
|
-
], ue =
|
|
2714
|
+
], ue = L("circle-check-big", es);
|
|
2697
2715
|
/**
|
|
2698
2716
|
* @license lucide-react v0.544.0 - ISC
|
|
2699
2717
|
*
|
|
@@ -2703,7 +2721,7 @@ const es = [
|
|
|
2703
2721
|
const ts = [
|
|
2704
2722
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
2705
2723
|
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
2706
|
-
], Je =
|
|
2724
|
+
], Je = L("circle-check", ts);
|
|
2707
2725
|
/**
|
|
2708
2726
|
* @license lucide-react v0.544.0 - ISC
|
|
2709
2727
|
*
|
|
@@ -2714,7 +2732,7 @@ const rs = [
|
|
|
2714
2732
|
["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3", key: "msslwz" }],
|
|
2715
2733
|
["path", { d: "M3 5V19A9 3 0 0 0 21 19V5", key: "1wlel7" }],
|
|
2716
2734
|
["path", { d: "M3 12A9 3 0 0 0 21 12", key: "mv7ke4" }]
|
|
2717
|
-
], ns =
|
|
2735
|
+
], ns = L("database", rs);
|
|
2718
2736
|
/**
|
|
2719
2737
|
* @license lucide-react v0.544.0 - ISC
|
|
2720
2738
|
*
|
|
@@ -2725,14 +2743,14 @@ const ss = [
|
|
|
2725
2743
|
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
|
|
2726
2744
|
["circle", { cx: "12", cy: "5", r: "1", key: "gxeob9" }],
|
|
2727
2745
|
["circle", { cx: "12", cy: "19", r: "1", key: "lyex9k" }]
|
|
2728
|
-
],
|
|
2746
|
+
], as = L("ellipsis-vertical", ss);
|
|
2729
2747
|
/**
|
|
2730
2748
|
* @license lucide-react v0.544.0 - ISC
|
|
2731
2749
|
*
|
|
2732
2750
|
* This source code is licensed under the ISC license.
|
|
2733
2751
|
* See the LICENSE file in the root directory of this source tree.
|
|
2734
2752
|
*/
|
|
2735
|
-
const
|
|
2753
|
+
const is = [
|
|
2736
2754
|
[
|
|
2737
2755
|
"path",
|
|
2738
2756
|
{
|
|
@@ -2749,7 +2767,7 @@ const as = [
|
|
|
2749
2767
|
}
|
|
2750
2768
|
],
|
|
2751
2769
|
["path", { d: "m2 2 20 20", key: "1ooewy" }]
|
|
2752
|
-
],
|
|
2770
|
+
], at = L("eye-off", is);
|
|
2753
2771
|
/**
|
|
2754
2772
|
* @license lucide-react v0.544.0 - ISC
|
|
2755
2773
|
*
|
|
@@ -2765,7 +2783,7 @@ const os = [
|
|
|
2765
2783
|
}
|
|
2766
2784
|
],
|
|
2767
2785
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
2768
|
-
],
|
|
2786
|
+
], it = L("eye", os);
|
|
2769
2787
|
/**
|
|
2770
2788
|
* @license lucide-react v0.544.0 - ISC
|
|
2771
2789
|
*
|
|
@@ -2781,7 +2799,7 @@ const ls = [
|
|
|
2781
2799
|
key: "r6nss1"
|
|
2782
2800
|
}
|
|
2783
2801
|
]
|
|
2784
|
-
], cs =
|
|
2802
|
+
], cs = L("house", ls);
|
|
2785
2803
|
/**
|
|
2786
2804
|
* @license lucide-react v0.544.0 - ISC
|
|
2787
2805
|
*
|
|
@@ -2792,7 +2810,7 @@ const ds = [
|
|
|
2792
2810
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
|
|
2793
2811
|
["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
|
|
2794
2812
|
["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
|
|
2795
|
-
], sr =
|
|
2813
|
+
], sr = L("image", ds);
|
|
2796
2814
|
/**
|
|
2797
2815
|
* @license lucide-react v0.544.0 - ISC
|
|
2798
2816
|
*
|
|
@@ -2808,7 +2826,7 @@ const us = [
|
|
|
2808
2826
|
}
|
|
2809
2827
|
],
|
|
2810
2828
|
["circle", { cx: "16.5", cy: "7.5", r: ".5", fill: "currentColor", key: "w0ekpg" }]
|
|
2811
|
-
],
|
|
2829
|
+
], ar = L("key-round", us);
|
|
2812
2830
|
/**
|
|
2813
2831
|
* @license lucide-react v0.544.0 - ISC
|
|
2814
2832
|
*
|
|
@@ -2819,7 +2837,7 @@ const ps = [
|
|
|
2819
2837
|
["path", { d: "m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4", key: "g0fldk" }],
|
|
2820
2838
|
["path", { d: "m21 2-9.6 9.6", key: "1j0ho8" }],
|
|
2821
2839
|
["circle", { cx: "7.5", cy: "15.5", r: "5.5", key: "yqb3hr" }]
|
|
2822
|
-
], ot =
|
|
2840
|
+
], ot = L("key", ps);
|
|
2823
2841
|
/**
|
|
2824
2842
|
* @license lucide-react v0.544.0 - ISC
|
|
2825
2843
|
*
|
|
@@ -2830,14 +2848,14 @@ const fs = [
|
|
|
2830
2848
|
["path", { d: "M9 17H7A5 5 0 0 1 7 7h2", key: "8i5ue5" }],
|
|
2831
2849
|
["path", { d: "M15 7h2a5 5 0 1 1 0 10h-2", key: "1b9ql8" }],
|
|
2832
2850
|
["line", { x1: "8", x2: "16", y1: "12", y2: "12", key: "1jonct" }]
|
|
2833
|
-
], xs =
|
|
2851
|
+
], xs = L("link-2", fs);
|
|
2834
2852
|
/**
|
|
2835
2853
|
* @license lucide-react v0.544.0 - ISC
|
|
2836
2854
|
*
|
|
2837
2855
|
* This source code is licensed under the ISC license.
|
|
2838
2856
|
* See the LICENSE file in the root directory of this source tree.
|
|
2839
2857
|
*/
|
|
2840
|
-
const hs = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]],
|
|
2858
|
+
const hs = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], ae = L("loader-circle", hs);
|
|
2841
2859
|
/**
|
|
2842
2860
|
* @license lucide-react v0.544.0 - ISC
|
|
2843
2861
|
*
|
|
@@ -2853,7 +2871,7 @@ const ms = [
|
|
|
2853
2871
|
["path", { d: "m4.9 19.1 2.9-2.9", key: "bwix9q" }],
|
|
2854
2872
|
["path", { d: "M2 12h4", key: "j09sii" }],
|
|
2855
2873
|
["path", { d: "m4.9 4.9 2.9 2.9", key: "giyufr" }]
|
|
2856
|
-
], gs =
|
|
2874
|
+
], gs = L("loader", ms);
|
|
2857
2875
|
/**
|
|
2858
2876
|
* @license lucide-react v0.544.0 - ISC
|
|
2859
2877
|
*
|
|
@@ -2863,7 +2881,7 @@ const ms = [
|
|
|
2863
2881
|
const ys = [
|
|
2864
2882
|
["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
|
|
2865
2883
|
["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }]
|
|
2866
|
-
], ye =
|
|
2884
|
+
], ye = L("lock", ys);
|
|
2867
2885
|
/**
|
|
2868
2886
|
* @license lucide-react v0.544.0 - ISC
|
|
2869
2887
|
*
|
|
@@ -2874,7 +2892,7 @@ const bs = [
|
|
|
2874
2892
|
["path", { d: "m16 17 5-5-5-5", key: "1bji2h" }],
|
|
2875
2893
|
["path", { d: "M21 12H9", key: "dn1m92" }],
|
|
2876
2894
|
["path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4", key: "1uf3rs" }]
|
|
2877
|
-
], lt =
|
|
2895
|
+
], lt = L("log-out", bs);
|
|
2878
2896
|
/**
|
|
2879
2897
|
* @license lucide-react v0.544.0 - ISC
|
|
2880
2898
|
*
|
|
@@ -2884,7 +2902,7 @@ const bs = [
|
|
|
2884
2902
|
const ws = [
|
|
2885
2903
|
["path", { d: "m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7", key: "132q7q" }],
|
|
2886
2904
|
["rect", { x: "2", y: "4", width: "20", height: "16", rx: "2", key: "izxlao" }]
|
|
2887
|
-
], fe =
|
|
2905
|
+
], fe = L("mail", ws);
|
|
2888
2906
|
/**
|
|
2889
2907
|
* @license lucide-react v0.544.0 - ISC
|
|
2890
2908
|
*
|
|
@@ -2900,7 +2918,7 @@ const js = [
|
|
|
2900
2918
|
}
|
|
2901
2919
|
],
|
|
2902
2920
|
["circle", { cx: "12", cy: "10", r: "3", key: "ilqhr7" }]
|
|
2903
|
-
], vs =
|
|
2921
|
+
], vs = L("map-pin", js);
|
|
2904
2922
|
/**
|
|
2905
2923
|
* @license lucide-react v0.544.0 - ISC
|
|
2906
2924
|
*
|
|
@@ -2916,7 +2934,7 @@ const Ss = [
|
|
|
2916
2934
|
key: "1a8usu"
|
|
2917
2935
|
}
|
|
2918
2936
|
]
|
|
2919
|
-
], ks =
|
|
2937
|
+
], ks = L("pen-line", Ss);
|
|
2920
2938
|
/**
|
|
2921
2939
|
* @license lucide-react v0.544.0 - ISC
|
|
2922
2940
|
*
|
|
@@ -2931,7 +2949,7 @@ const Es = [
|
|
|
2931
2949
|
key: "9njp5v"
|
|
2932
2950
|
}
|
|
2933
2951
|
]
|
|
2934
|
-
], Cs =
|
|
2952
|
+
], Cs = L("phone", Es);
|
|
2935
2953
|
/**
|
|
2936
2954
|
* @license lucide-react v0.544.0 - ISC
|
|
2937
2955
|
*
|
|
@@ -2948,7 +2966,7 @@ const Ts = [
|
|
|
2948
2966
|
],
|
|
2949
2967
|
["path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7", key: "1ydtos" }],
|
|
2950
2968
|
["path", { d: "M7 3v4a1 1 0 0 0 1 1h7", key: "t51u73" }]
|
|
2951
|
-
], Rs =
|
|
2969
|
+
], Rs = L("save", Ts);
|
|
2952
2970
|
/**
|
|
2953
2971
|
* @license lucide-react v0.544.0 - ISC
|
|
2954
2972
|
*
|
|
@@ -2964,14 +2982,14 @@ const Ps = [
|
|
|
2964
2982
|
}
|
|
2965
2983
|
],
|
|
2966
2984
|
["path", { d: "m21.854 2.147-10.94 10.939", key: "12cjpa" }]
|
|
2967
|
-
], ct =
|
|
2985
|
+
], ct = L("send", Ps);
|
|
2968
2986
|
/**
|
|
2969
2987
|
* @license lucide-react v0.544.0 - ISC
|
|
2970
2988
|
*
|
|
2971
2989
|
* This source code is licensed under the ISC license.
|
|
2972
2990
|
* See the LICENSE file in the root directory of this source tree.
|
|
2973
2991
|
*/
|
|
2974
|
-
const
|
|
2992
|
+
const Is = [
|
|
2975
2993
|
[
|
|
2976
2994
|
"path",
|
|
2977
2995
|
{
|
|
@@ -2980,7 +2998,7 @@ const Os = [
|
|
|
2980
2998
|
}
|
|
2981
2999
|
],
|
|
2982
3000
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
2983
|
-
],
|
|
3001
|
+
], Os = L("settings", Is);
|
|
2984
3002
|
/**
|
|
2985
3003
|
* @license lucide-react v0.544.0 - ISC
|
|
2986
3004
|
*
|
|
@@ -2995,7 +3013,7 @@ const zs = [
|
|
|
2995
3013
|
key: "oel41y"
|
|
2996
3014
|
}
|
|
2997
3015
|
]
|
|
2998
|
-
],
|
|
3016
|
+
], ir = L("shield", zs);
|
|
2999
3017
|
/**
|
|
3000
3018
|
* @license lucide-react v0.544.0 - ISC
|
|
3001
3019
|
*
|
|
@@ -3008,7 +3026,7 @@ const As = [
|
|
|
3008
3026
|
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
|
|
3009
3027
|
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
3010
3028
|
["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
|
|
3011
|
-
], De =
|
|
3029
|
+
], De = L("trash-2", As);
|
|
3012
3030
|
/**
|
|
3013
3031
|
* @license lucide-react v0.544.0 - ISC
|
|
3014
3032
|
*
|
|
@@ -3025,7 +3043,7 @@ const _s = [
|
|
|
3025
3043
|
],
|
|
3026
3044
|
["path", { d: "M12 9v4", key: "juzpu7" }],
|
|
3027
3045
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
3028
|
-
],
|
|
3046
|
+
], Ot = L("triangle-alert", _s);
|
|
3029
3047
|
/**
|
|
3030
3048
|
* @license lucide-react v0.544.0 - ISC
|
|
3031
3049
|
*
|
|
@@ -3037,7 +3055,7 @@ const Us = [
|
|
|
3037
3055
|
["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }],
|
|
3038
3056
|
["line", { x1: "17", x2: "22", y1: "8", y2: "13", key: "3nzzx3" }],
|
|
3039
3057
|
["line", { x1: "22", x2: "17", y1: "8", y2: "13", key: "1swrse" }]
|
|
3040
|
-
], $s =
|
|
3058
|
+
], $s = L("user-x", Us);
|
|
3041
3059
|
/**
|
|
3042
3060
|
* @license lucide-react v0.544.0 - ISC
|
|
3043
3061
|
*
|
|
@@ -3047,7 +3065,7 @@ const Us = [
|
|
|
3047
3065
|
const Ds = [
|
|
3048
3066
|
["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
|
|
3049
3067
|
["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
|
|
3050
|
-
], we =
|
|
3068
|
+
], we = L("user", Ds);
|
|
3051
3069
|
/**
|
|
3052
3070
|
* @license lucide-react v0.544.0 - ISC
|
|
3053
3071
|
*
|
|
@@ -3057,7 +3075,7 @@ const Ds = [
|
|
|
3057
3075
|
const Ns = [
|
|
3058
3076
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
3059
3077
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
3060
|
-
],
|
|
3078
|
+
], Oe = L("x", Ns), or = cr(null), ca = ({
|
|
3061
3079
|
authix: t,
|
|
3062
3080
|
children: e
|
|
3063
3081
|
}) => /* @__PURE__ */ r.jsx(or.Provider, { value: t, children: e }), pe = () => {
|
|
@@ -3065,13 +3083,13 @@ const Ns = [
|
|
|
3065
3083
|
if (!t)
|
|
3066
3084
|
throw new Error("useAuthix must be used inside <AuthixProvider />");
|
|
3067
3085
|
return t;
|
|
3068
|
-
},
|
|
3086
|
+
}, da = ({
|
|
3069
3087
|
logoUrl: t,
|
|
3070
3088
|
logoLinkUrl: e,
|
|
3071
3089
|
title: n = "Create Your Account",
|
|
3072
3090
|
subtitle: s = "Join our platform today",
|
|
3073
|
-
primaryColor:
|
|
3074
|
-
gradient:
|
|
3091
|
+
primaryColor: a = "#00C214",
|
|
3092
|
+
gradient: i = "linear-gradient(135deg, #22c55e, #00C214)",
|
|
3075
3093
|
darkMode: o = !0,
|
|
3076
3094
|
// Only avatar is optional
|
|
3077
3095
|
showAvatar: c = !1,
|
|
@@ -3089,21 +3107,21 @@ const Ns = [
|
|
|
3089
3107
|
password: "",
|
|
3090
3108
|
role: u.length ? u[0] : "user",
|
|
3091
3109
|
...c && { avatarUrl: "" }
|
|
3092
|
-
}, [w, h] = P(p), [
|
|
3110
|
+
}, [w, h] = P(p), [I, C] = P(!1), [g, A] = P(!1), [N, b] = P(null), [j, q] = P({}), [O, X] = P(!1), W = o ? "#ffffff" : "#111827", T = o ? "#a1a1aa" : "#6b7280", G = o ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.02)", R = o ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)";
|
|
3093
3111
|
Ce.useEffect(() => {
|
|
3094
3112
|
if (typeof window < "u") {
|
|
3095
|
-
const
|
|
3096
|
-
return
|
|
3113
|
+
const F = () => X(window.innerWidth < 768);
|
|
3114
|
+
return F(), window.addEventListener("resize", F), () => window.removeEventListener("resize", F);
|
|
3097
3115
|
}
|
|
3098
3116
|
}, []);
|
|
3099
|
-
const z = (
|
|
3100
|
-
const { name: Y, value: l } =
|
|
3117
|
+
const z = (F) => {
|
|
3118
|
+
const { name: Y, value: l } = F.target;
|
|
3101
3119
|
h((m) => ({ ...m, [Y]: l })), j[Y] && q((m) => ({ ...m, [Y]: void 0 }));
|
|
3102
3120
|
}, M = () => {
|
|
3103
|
-
const
|
|
3104
|
-
return w.name.trim() || (
|
|
3105
|
-
}, K = async (
|
|
3106
|
-
if (
|
|
3121
|
+
const F = {};
|
|
3122
|
+
return w.name.trim() || (F.name = "Name is required"), w.email.trim() ? /\S+@\S+\.\S+/.test(w.email) || (F.email = "Invalid email address") : F.email = "Email is required", w.password ? w.password.length < 6 && (F.password = "Password must be at least 6 characters") : F.password = "Password is required", q(F), Object.keys(F).length === 0;
|
|
3123
|
+
}, K = async (F) => {
|
|
3124
|
+
if (F.preventDefault(), !!M()) {
|
|
3107
3125
|
A(!0), b(null);
|
|
3108
3126
|
try {
|
|
3109
3127
|
const Y = {
|
|
@@ -3128,7 +3146,7 @@ const Ns = [
|
|
|
3128
3146
|
}
|
|
3129
3147
|
}, H = {
|
|
3130
3148
|
width: "100%",
|
|
3131
|
-
padding:
|
|
3149
|
+
padding: O ? "10px 14px 10px 44px" : "10px 16px 10px 44px",
|
|
3132
3150
|
backgroundColor: G,
|
|
3133
3151
|
border: `1px solid ${R}`,
|
|
3134
3152
|
borderRadius: "10px",
|
|
@@ -3151,15 +3169,15 @@ const Ns = [
|
|
|
3151
3169
|
"div",
|
|
3152
3170
|
{
|
|
3153
3171
|
style: {
|
|
3154
|
-
minWidth:
|
|
3172
|
+
minWidth: O ? "320px" : "380px",
|
|
3155
3173
|
width: "100%",
|
|
3156
|
-
maxWidth:
|
|
3174
|
+
maxWidth: O ? "340px" : "390px",
|
|
3157
3175
|
display: "flex",
|
|
3158
3176
|
flexDirection: "column",
|
|
3159
3177
|
borderRadius: "10px",
|
|
3160
3178
|
fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
|
|
3161
3179
|
backgroundColor: o ? "#000000" : "#ffffff",
|
|
3162
|
-
padding:
|
|
3180
|
+
padding: O ? "30px 24px" : "20px 28px"
|
|
3163
3181
|
},
|
|
3164
3182
|
children: [
|
|
3165
3183
|
/* @__PURE__ */ r.jsxs(
|
|
@@ -3191,7 +3209,7 @@ const Ns = [
|
|
|
3191
3209
|
we,
|
|
3192
3210
|
{
|
|
3193
3211
|
size: 40,
|
|
3194
|
-
color:
|
|
3212
|
+
color: a,
|
|
3195
3213
|
style: { marginBottom: "10px" }
|
|
3196
3214
|
}
|
|
3197
3215
|
),
|
|
@@ -3238,10 +3256,10 @@ const Ns = [
|
|
|
3238
3256
|
height: "60px",
|
|
3239
3257
|
borderRadius: "50%",
|
|
3240
3258
|
objectFit: "cover",
|
|
3241
|
-
border: `2px solid ${
|
|
3259
|
+
border: `2px solid ${a}30`
|
|
3242
3260
|
},
|
|
3243
|
-
onError: (
|
|
3244
|
-
const Y =
|
|
3261
|
+
onError: (F) => {
|
|
3262
|
+
const Y = F.target;
|
|
3245
3263
|
Y.style.display = "none";
|
|
3246
3264
|
}
|
|
3247
3265
|
}
|
|
@@ -3308,13 +3326,13 @@ const Ns = [
|
|
|
3308
3326
|
"button",
|
|
3309
3327
|
{
|
|
3310
3328
|
type: "button",
|
|
3311
|
-
onClick: () => h((
|
|
3329
|
+
onClick: () => h((F) => ({ ...F, role: u[0] })),
|
|
3312
3330
|
style: {
|
|
3313
3331
|
flex: 1,
|
|
3314
3332
|
zIndex: 10,
|
|
3315
3333
|
border: "none",
|
|
3316
3334
|
background: "transparent",
|
|
3317
|
-
color: w.role === u[0] ?
|
|
3335
|
+
color: w.role === u[0] ? a : o ? "#9ca3af" : "#6b7280",
|
|
3318
3336
|
// theme-aware inactive color
|
|
3319
3337
|
fontWeight: w.role === u[0] ? 600 : 500,
|
|
3320
3338
|
fontSize: "14px",
|
|
@@ -3330,13 +3348,13 @@ const Ns = [
|
|
|
3330
3348
|
"button",
|
|
3331
3349
|
{
|
|
3332
3350
|
type: "button",
|
|
3333
|
-
onClick: () => h((
|
|
3351
|
+
onClick: () => h((F) => ({ ...F, role: u[1] })),
|
|
3334
3352
|
style: {
|
|
3335
3353
|
flex: 1,
|
|
3336
3354
|
zIndex: 10,
|
|
3337
3355
|
border: "none",
|
|
3338
3356
|
background: "transparent",
|
|
3339
|
-
color: w.role === u[1] ?
|
|
3357
|
+
color: w.role === u[1] ? a : o ? "#9ca3af" : "#6b7280",
|
|
3340
3358
|
fontWeight: w.role === u[1] ? 600 : 500,
|
|
3341
3359
|
fontSize: "14px",
|
|
3342
3360
|
display: "flex",
|
|
@@ -3494,7 +3512,7 @@ const Ns = [
|
|
|
3494
3512
|
"input",
|
|
3495
3513
|
{
|
|
3496
3514
|
id: "signup-password",
|
|
3497
|
-
type:
|
|
3515
|
+
type: I ? "text" : "password",
|
|
3498
3516
|
name: "password",
|
|
3499
3517
|
placeholder: "Create a secure password",
|
|
3500
3518
|
value: w.password,
|
|
@@ -3509,7 +3527,7 @@ const Ns = [
|
|
|
3509
3527
|
"button",
|
|
3510
3528
|
{
|
|
3511
3529
|
type: "button",
|
|
3512
|
-
onClick: () => C(!
|
|
3530
|
+
onClick: () => C(!I),
|
|
3513
3531
|
style: {
|
|
3514
3532
|
position: "absolute",
|
|
3515
3533
|
right: "14px",
|
|
@@ -3521,7 +3539,7 @@ const Ns = [
|
|
|
3521
3539
|
cursor: "pointer",
|
|
3522
3540
|
padding: "4px"
|
|
3523
3541
|
},
|
|
3524
|
-
children:
|
|
3542
|
+
children: I ? /* @__PURE__ */ r.jsx(at, { size: 20 }) : /* @__PURE__ */ r.jsx(it, { size: 20 })
|
|
3525
3543
|
}
|
|
3526
3544
|
)
|
|
3527
3545
|
] }),
|
|
@@ -3597,7 +3615,7 @@ const Ns = [
|
|
|
3597
3615
|
{
|
|
3598
3616
|
href: d,
|
|
3599
3617
|
style: {
|
|
3600
|
-
color:
|
|
3618
|
+
color: a,
|
|
3601
3619
|
textDecoration: "none",
|
|
3602
3620
|
fontWeight: 500
|
|
3603
3621
|
},
|
|
@@ -3616,9 +3634,9 @@ const Ns = [
|
|
|
3616
3634
|
display: "flex",
|
|
3617
3635
|
alignItems: "start",
|
|
3618
3636
|
gap: "10px",
|
|
3619
|
-
backgroundColor: N.type === "success" ? `${
|
|
3620
|
-
border: N.type === "success" ? `1px solid ${
|
|
3621
|
-
color: N.type === "success" ?
|
|
3637
|
+
backgroundColor: N.type === "success" ? `${a}15` : "rgba(239,68,68,0.1)",
|
|
3638
|
+
border: N.type === "success" ? `1px solid ${a}30` : "1px solid rgba(239,68,68,0.3)",
|
|
3639
|
+
color: N.type === "success" ? a : "#ef4444"
|
|
3622
3640
|
},
|
|
3623
3641
|
children: [
|
|
3624
3642
|
N.type === "success" ? /* @__PURE__ */ r.jsx(ue, { size: 20 }) : /* @__PURE__ */ r.jsx(se, { size: 20 }),
|
|
@@ -3633,7 +3651,7 @@ const Ns = [
|
|
|
3633
3651
|
disabled: g,
|
|
3634
3652
|
style: {
|
|
3635
3653
|
padding: "12px",
|
|
3636
|
-
background:
|
|
3654
|
+
background: i,
|
|
3637
3655
|
color: "#fff",
|
|
3638
3656
|
border: "none",
|
|
3639
3657
|
borderRadius: "10px",
|
|
@@ -3674,7 +3692,7 @@ const Ns = [
|
|
|
3674
3692
|
children: [
|
|
3675
3693
|
"Secure authentication powered by",
|
|
3676
3694
|
" ",
|
|
3677
|
-
/* @__PURE__ */ r.jsx("span", { style: { color:
|
|
3695
|
+
/* @__PURE__ */ r.jsx("span", { style: { color: a, fontWeight: 600 }, children: "Neuctra Authix" })
|
|
3678
3696
|
]
|
|
3679
3697
|
}
|
|
3680
3698
|
)
|
|
@@ -3690,19 +3708,19 @@ const Ns = [
|
|
|
3690
3708
|
]
|
|
3691
3709
|
}
|
|
3692
3710
|
);
|
|
3693
|
-
},
|
|
3711
|
+
}, ua = ({
|
|
3694
3712
|
logoUrl: t,
|
|
3695
3713
|
logoLinkUrl: e,
|
|
3696
3714
|
title: n = "Sign In to Your Account",
|
|
3697
3715
|
subtitle: s = "Welcome back! Please enter your details",
|
|
3698
|
-
primaryColor:
|
|
3699
|
-
gradient:
|
|
3716
|
+
primaryColor: a = "#00C214",
|
|
3717
|
+
gradient: i = "linear-gradient(135deg, #22c55e, #00C214)",
|
|
3700
3718
|
darkMode: o = !0,
|
|
3701
3719
|
signupUrl: c,
|
|
3702
3720
|
onSuccess: u,
|
|
3703
3721
|
onError: x
|
|
3704
3722
|
}) => {
|
|
3705
|
-
const d = pe(), [y, k] = P("login"), [E, p] = P(1), [w, h] = P(!1), [
|
|
3723
|
+
const d = pe(), [y, k] = P("login"), [E, p] = P(1), [w, h] = P(!1), [I, C] = P(!1), [g, A] = P(null), [N, b] = P(""), [j, q] = P(""), [O, X] = P({
|
|
3706
3724
|
email: "",
|
|
3707
3725
|
otp: "",
|
|
3708
3726
|
newPassword: ""
|
|
@@ -3731,12 +3749,12 @@ const Ns = [
|
|
|
3731
3749
|
C(!1);
|
|
3732
3750
|
}
|
|
3733
3751
|
}, H = (m) => {
|
|
3734
|
-
X({ ...
|
|
3735
|
-
},
|
|
3752
|
+
X({ ...O, [m.target.name]: m.target.value });
|
|
3753
|
+
}, F = async (m) => {
|
|
3736
3754
|
m.preventDefault(), C(!0), A(null);
|
|
3737
3755
|
try {
|
|
3738
3756
|
const S = await d.requestResetUserPasswordOTP({
|
|
3739
|
-
email:
|
|
3757
|
+
email: O.email
|
|
3740
3758
|
});
|
|
3741
3759
|
S.success ? (p(2), A({
|
|
3742
3760
|
type: "success",
|
|
@@ -3757,9 +3775,9 @@ const Ns = [
|
|
|
3757
3775
|
m.preventDefault(), C(!0), A(null);
|
|
3758
3776
|
try {
|
|
3759
3777
|
const S = await d.resetUserPassword({
|
|
3760
|
-
email:
|
|
3761
|
-
otp:
|
|
3762
|
-
newPassword:
|
|
3778
|
+
email: O.email,
|
|
3779
|
+
otp: O.otp,
|
|
3780
|
+
newPassword: O.newPassword
|
|
3763
3781
|
});
|
|
3764
3782
|
S.success ? (A({
|
|
3765
3783
|
type: "success",
|
|
@@ -3836,7 +3854,7 @@ const Ns = [
|
|
|
3836
3854
|
we,
|
|
3837
3855
|
{
|
|
3838
3856
|
size: 40,
|
|
3839
|
-
color:
|
|
3857
|
+
color: a,
|
|
3840
3858
|
style: { marginBottom: "10px" }
|
|
3841
3859
|
}
|
|
3842
3860
|
),
|
|
@@ -3975,7 +3993,7 @@ const Ns = [
|
|
|
3975
3993
|
color: R,
|
|
3976
3994
|
cursor: "pointer"
|
|
3977
3995
|
},
|
|
3978
|
-
children: w ? /* @__PURE__ */ r.jsx(
|
|
3996
|
+
children: w ? /* @__PURE__ */ r.jsx(at, { size: 20 }) : /* @__PURE__ */ r.jsx(it, { size: 20 })
|
|
3979
3997
|
}
|
|
3980
3998
|
)
|
|
3981
3999
|
] })
|
|
@@ -3996,7 +4014,7 @@ const Ns = [
|
|
|
3996
4014
|
{
|
|
3997
4015
|
href: c,
|
|
3998
4016
|
style: {
|
|
3999
|
-
color:
|
|
4017
|
+
color: a,
|
|
4000
4018
|
textDecoration: "none",
|
|
4001
4019
|
fontWeight: 500
|
|
4002
4020
|
},
|
|
@@ -4011,7 +4029,7 @@ const Ns = [
|
|
|
4011
4029
|
style: {
|
|
4012
4030
|
background: "none",
|
|
4013
4031
|
border: "none",
|
|
4014
|
-
color:
|
|
4032
|
+
color: a,
|
|
4015
4033
|
fontWeight: 500,
|
|
4016
4034
|
cursor: "pointer"
|
|
4017
4035
|
},
|
|
@@ -4025,17 +4043,17 @@ const Ns = [
|
|
|
4025
4043
|
"button",
|
|
4026
4044
|
{
|
|
4027
4045
|
type: "submit",
|
|
4028
|
-
disabled:
|
|
4046
|
+
disabled: I,
|
|
4029
4047
|
style: {
|
|
4030
4048
|
padding: "12px",
|
|
4031
|
-
background:
|
|
4049
|
+
background: i,
|
|
4032
4050
|
color: "#fff",
|
|
4033
4051
|
border: "none",
|
|
4034
4052
|
borderRadius: "10px",
|
|
4035
4053
|
fontSize: "14px",
|
|
4036
4054
|
fontWeight: 600
|
|
4037
4055
|
},
|
|
4038
|
-
children:
|
|
4056
|
+
children: I ? "Signing In..." : "Sign In"
|
|
4039
4057
|
}
|
|
4040
4058
|
)
|
|
4041
4059
|
]
|
|
@@ -4044,7 +4062,7 @@ const Ns = [
|
|
|
4044
4062
|
y === "forgot" && /* @__PURE__ */ r.jsxs(
|
|
4045
4063
|
"form",
|
|
4046
4064
|
{
|
|
4047
|
-
onSubmit: E === 1 ?
|
|
4065
|
+
onSubmit: E === 1 ? F : Y,
|
|
4048
4066
|
style: { display: "flex", flexDirection: "column", gap: "14px" },
|
|
4049
4067
|
children: [
|
|
4050
4068
|
E === 1 ? /* @__PURE__ */ r.jsxs(
|
|
@@ -4085,7 +4103,7 @@ const Ns = [
|
|
|
4085
4103
|
type: "email",
|
|
4086
4104
|
name: "email",
|
|
4087
4105
|
placeholder: "Enter your email",
|
|
4088
|
-
value:
|
|
4106
|
+
value: O.email,
|
|
4089
4107
|
onChange: H,
|
|
4090
4108
|
style: l
|
|
4091
4109
|
}
|
|
@@ -4117,7 +4135,7 @@ const Ns = [
|
|
|
4117
4135
|
),
|
|
4118
4136
|
/* @__PURE__ */ r.jsxs("div", { style: { position: "relative" }, children: [
|
|
4119
4137
|
/* @__PURE__ */ r.jsx(
|
|
4120
|
-
|
|
4138
|
+
ar,
|
|
4121
4139
|
{
|
|
4122
4140
|
size: 20,
|
|
4123
4141
|
style: {
|
|
@@ -4136,7 +4154,7 @@ const Ns = [
|
|
|
4136
4154
|
type: "text",
|
|
4137
4155
|
name: "otp",
|
|
4138
4156
|
placeholder: "Enter OTP",
|
|
4139
|
-
value:
|
|
4157
|
+
value: O.otp,
|
|
4140
4158
|
onChange: H,
|
|
4141
4159
|
style: l
|
|
4142
4160
|
}
|
|
@@ -4187,7 +4205,7 @@ const Ns = [
|
|
|
4187
4205
|
type: "password",
|
|
4188
4206
|
name: "newPassword",
|
|
4189
4207
|
placeholder: "Enter new password",
|
|
4190
|
-
value:
|
|
4208
|
+
value: O.newPassword,
|
|
4191
4209
|
onChange: H,
|
|
4192
4210
|
style: l
|
|
4193
4211
|
}
|
|
@@ -4201,17 +4219,17 @@ const Ns = [
|
|
|
4201
4219
|
"button",
|
|
4202
4220
|
{
|
|
4203
4221
|
type: "submit",
|
|
4204
|
-
disabled:
|
|
4222
|
+
disabled: I,
|
|
4205
4223
|
style: {
|
|
4206
4224
|
padding: "12px",
|
|
4207
|
-
background:
|
|
4225
|
+
background: i,
|
|
4208
4226
|
color: "#fff",
|
|
4209
4227
|
border: "none",
|
|
4210
4228
|
fontSize: "14px",
|
|
4211
4229
|
borderRadius: "10px",
|
|
4212
4230
|
fontWeight: 600
|
|
4213
4231
|
},
|
|
4214
|
-
children:
|
|
4232
|
+
children: I ? "Please wait..." : E === 1 ? "Send Reset OTP" : "Reset Password"
|
|
4215
4233
|
}
|
|
4216
4234
|
),
|
|
4217
4235
|
/* @__PURE__ */ r.jsx(
|
|
@@ -4246,9 +4264,9 @@ const Ns = [
|
|
|
4246
4264
|
display: "flex",
|
|
4247
4265
|
alignItems: "center",
|
|
4248
4266
|
gap: "10px",
|
|
4249
|
-
backgroundColor: g.type === "success" ? `${
|
|
4250
|
-
border: g.type === "success" ? `1px solid ${
|
|
4251
|
-
color: g.type === "success" ?
|
|
4267
|
+
backgroundColor: g.type === "success" ? `${a}15` : "rgba(239,68,68,0.1)",
|
|
4268
|
+
border: g.type === "success" ? `1px solid ${a}30` : "1px solid rgba(239,68,68,0.3)",
|
|
4269
|
+
color: g.type === "success" ? a : "#ef4444"
|
|
4252
4270
|
},
|
|
4253
4271
|
children: [
|
|
4254
4272
|
g.type === "success" ? /* @__PURE__ */ r.jsx(ue, { size: 20 }) : /* @__PURE__ */ r.jsx(se, { size: 20 }),
|
|
@@ -4269,7 +4287,7 @@ const Ns = [
|
|
|
4269
4287
|
children: [
|
|
4270
4288
|
"Secure authentication powered by",
|
|
4271
4289
|
" ",
|
|
4272
|
-
/* @__PURE__ */ r.jsx("span", { style: { color:
|
|
4290
|
+
/* @__PURE__ */ r.jsx("span", { style: { color: a, fontWeight: 600 }, children: "Neuctra Authix" })
|
|
4273
4291
|
]
|
|
4274
4292
|
}
|
|
4275
4293
|
)
|
|
@@ -4278,53 +4296,53 @@ const Ns = [
|
|
|
4278
4296
|
)
|
|
4279
4297
|
}
|
|
4280
4298
|
);
|
|
4281
|
-
},
|
|
4299
|
+
}, pa = ({
|
|
4282
4300
|
children: t,
|
|
4283
4301
|
fallback: e = null
|
|
4284
4302
|
}) => {
|
|
4285
|
-
const n = pe(), [s,
|
|
4303
|
+
const n = pe(), [s, a] = P("loading");
|
|
4286
4304
|
ee(() => {
|
|
4287
4305
|
(async () => {
|
|
4288
4306
|
if (!(document.cookie.split(";").map((d) => d.trim()).find((d) => d.startsWith("a_s_b="))?.split("=")[1] === "true")) {
|
|
4289
|
-
|
|
4307
|
+
a("unauthenticated");
|
|
4290
4308
|
return;
|
|
4291
4309
|
}
|
|
4292
4310
|
try {
|
|
4293
|
-
(await n.checkUserSession())?.user?.id ?
|
|
4311
|
+
(await n.checkUserSession())?.user?.id ? a("authenticated") : (document.cookie = "a_s_b=false; path=/; max-age=0; SameSite=Lax", a("unauthenticated"));
|
|
4294
4312
|
} catch (d) {
|
|
4295
|
-
console.error("Session validation failed:", d), document.cookie = "a_s_b=false; path=/; max-age=0; SameSite=Lax",
|
|
4313
|
+
console.error("Session validation failed:", d), document.cookie = "a_s_b=false; path=/; max-age=0; SameSite=Lax", a("unauthenticated");
|
|
4296
4314
|
}
|
|
4297
4315
|
})();
|
|
4298
4316
|
}, [n]);
|
|
4299
|
-
const
|
|
4300
|
-
return s === "loading" ? null : s === "unauthenticated" ?
|
|
4301
|
-
},
|
|
4317
|
+
const i = (o) => typeof o == "function" ? o() : o;
|
|
4318
|
+
return s === "loading" ? null : s === "unauthenticated" ? i(e) ?? null : /* @__PURE__ */ r.jsx(r.Fragment, { children: t });
|
|
4319
|
+
}, fa = ({
|
|
4302
4320
|
children: t,
|
|
4303
4321
|
fallback: e = null
|
|
4304
4322
|
}) => {
|
|
4305
|
-
const n = pe(), [s,
|
|
4323
|
+
const n = pe(), [s, a] = P("loading");
|
|
4306
4324
|
ee(() => {
|
|
4307
4325
|
(async () => {
|
|
4308
4326
|
if (!(document.cookie.split(";").map((d) => d.trim()).find((d) => d.startsWith("a_s_b="))?.split("=")[1] === "true")) {
|
|
4309
|
-
|
|
4327
|
+
a("unauthenticated");
|
|
4310
4328
|
return;
|
|
4311
4329
|
}
|
|
4312
4330
|
try {
|
|
4313
|
-
(await n.checkUserSession())?.user?.id ?
|
|
4331
|
+
(await n.checkUserSession())?.user?.id ? a("authenticated") : (document.cookie = "a_s_b=false; path=/; max-age=0; SameSite=Lax", a("unauthenticated"));
|
|
4314
4332
|
} catch (d) {
|
|
4315
|
-
console.error("Session validation failed:", d), document.cookie = "a_s_b=false; path=/; max-age=0; SameSite=Lax",
|
|
4333
|
+
console.error("Session validation failed:", d), document.cookie = "a_s_b=false; path=/; max-age=0; SameSite=Lax", a("unauthenticated");
|
|
4316
4334
|
}
|
|
4317
4335
|
})();
|
|
4318
4336
|
}, [n]);
|
|
4319
|
-
const
|
|
4320
|
-
return s === "loading" ? null : s === "authenticated" ?
|
|
4321
|
-
},
|
|
4337
|
+
const i = (o) => typeof o == "function" ? o() : o;
|
|
4338
|
+
return s === "loading" ? null : s === "authenticated" ? i(e) ?? null : /* @__PURE__ */ r.jsx(r.Fragment, { children: t });
|
|
4339
|
+
}, Fs = ({
|
|
4322
4340
|
isOpen: t,
|
|
4323
4341
|
onClose: e,
|
|
4324
4342
|
onSuccess: n,
|
|
4325
4343
|
onError: s,
|
|
4326
|
-
userId:
|
|
4327
|
-
colors:
|
|
4344
|
+
userId: a,
|
|
4345
|
+
colors: i
|
|
4328
4346
|
}) => {
|
|
4329
4347
|
const o = pe(), [c, u] = P(!1), [x, d] = P(""), [y, k] = P("warning"), [E, p] = P(!1);
|
|
4330
4348
|
if (ee(() => {
|
|
@@ -4338,7 +4356,7 @@ const Ns = [
|
|
|
4338
4356
|
u(!0), k("processing");
|
|
4339
4357
|
try {
|
|
4340
4358
|
const g = await o.deleteUser({
|
|
4341
|
-
userId:
|
|
4359
|
+
userId: a
|
|
4342
4360
|
});
|
|
4343
4361
|
g.success ? (n(g.message || "Account deleted successfully"), k("success"), setTimeout(() => {
|
|
4344
4362
|
localStorage.removeItem("userInfo"), localStorage.removeItem("userToken"), window.location.href = "/";
|
|
@@ -4348,7 +4366,7 @@ const Ns = [
|
|
|
4348
4366
|
} finally {
|
|
4349
4367
|
u(!1);
|
|
4350
4368
|
}
|
|
4351
|
-
}, h = x.toLowerCase() === "delete my account",
|
|
4369
|
+
}, h = x.toLowerCase() === "delete my account", I = (g) => {
|
|
4352
4370
|
g.target === g.currentTarget && y !== "processing" && y !== "success" && e();
|
|
4353
4371
|
}, C = () => {
|
|
4354
4372
|
switch (y) {
|
|
@@ -4396,7 +4414,7 @@ const Ns = [
|
|
|
4396
4414
|
"h3",
|
|
4397
4415
|
{
|
|
4398
4416
|
style: {
|
|
4399
|
-
color:
|
|
4417
|
+
color: i.textPrimary,
|
|
4400
4418
|
margin: 0,
|
|
4401
4419
|
fontSize: "20px",
|
|
4402
4420
|
fontWeight: 700,
|
|
@@ -4416,7 +4434,7 @@ const Ns = [
|
|
|
4416
4434
|
style: {
|
|
4417
4435
|
background: "transparent",
|
|
4418
4436
|
border: "none",
|
|
4419
|
-
color:
|
|
4437
|
+
color: i.textTertiary,
|
|
4420
4438
|
cursor: "pointer",
|
|
4421
4439
|
padding: "8px",
|
|
4422
4440
|
borderRadius: "8px",
|
|
@@ -4429,12 +4447,12 @@ const Ns = [
|
|
|
4429
4447
|
transition: "all 0.2s ease"
|
|
4430
4448
|
},
|
|
4431
4449
|
onMouseOver: (g) => {
|
|
4432
|
-
g.currentTarget.style.backgroundColor =
|
|
4450
|
+
g.currentTarget.style.backgroundColor = i.border, g.currentTarget.style.color = i.textPrimary;
|
|
4433
4451
|
},
|
|
4434
4452
|
onMouseOut: (g) => {
|
|
4435
|
-
g.currentTarget.style.backgroundColor = "transparent", g.currentTarget.style.color =
|
|
4453
|
+
g.currentTarget.style.backgroundColor = "transparent", g.currentTarget.style.color = i.textTertiary;
|
|
4436
4454
|
},
|
|
4437
|
-
children: /* @__PURE__ */ r.jsx(
|
|
4455
|
+
children: /* @__PURE__ */ r.jsx(Oe, { size: 20 })
|
|
4438
4456
|
}
|
|
4439
4457
|
)
|
|
4440
4458
|
]
|
|
@@ -4447,8 +4465,8 @@ const Ns = [
|
|
|
4447
4465
|
display: "flex",
|
|
4448
4466
|
gap: "16px",
|
|
4449
4467
|
padding: "20px",
|
|
4450
|
-
background: `${
|
|
4451
|
-
border: `1px solid ${
|
|
4468
|
+
background: `${i.error}15`,
|
|
4469
|
+
border: `1px solid ${i.error}30`,
|
|
4452
4470
|
borderRadius: "12px",
|
|
4453
4471
|
marginBottom: "20px"
|
|
4454
4472
|
},
|
|
@@ -4457,12 +4475,12 @@ const Ns = [
|
|
|
4457
4475
|
"div",
|
|
4458
4476
|
{
|
|
4459
4477
|
style: {
|
|
4460
|
-
color:
|
|
4478
|
+
color: i.error,
|
|
4461
4479
|
flexShrink: 0,
|
|
4462
4480
|
display: "flex",
|
|
4463
4481
|
alignItems: "flex-start"
|
|
4464
4482
|
},
|
|
4465
|
-
children: /* @__PURE__ */ r.jsx(
|
|
4483
|
+
children: /* @__PURE__ */ r.jsx(Ot, { size: 24 })
|
|
4466
4484
|
}
|
|
4467
4485
|
),
|
|
4468
4486
|
/* @__PURE__ */ r.jsxs("div", { style: { flex: 1 }, children: [
|
|
@@ -4470,7 +4488,7 @@ const Ns = [
|
|
|
4470
4488
|
"h4",
|
|
4471
4489
|
{
|
|
4472
4490
|
style: {
|
|
4473
|
-
color:
|
|
4491
|
+
color: i.textPrimary,
|
|
4474
4492
|
margin: "0 0 12px 0",
|
|
4475
4493
|
fontSize: "16px",
|
|
4476
4494
|
fontWeight: 600
|
|
@@ -4507,10 +4525,10 @@ const Ns = [
|
|
|
4507
4525
|
alignItems: "center",
|
|
4508
4526
|
gap: "10px",
|
|
4509
4527
|
fontSize: "14px",
|
|
4510
|
-
color:
|
|
4528
|
+
color: i.textSecondary
|
|
4511
4529
|
},
|
|
4512
4530
|
children: [
|
|
4513
|
-
/* @__PURE__ */ r.jsx("div", { style: { color:
|
|
4531
|
+
/* @__PURE__ */ r.jsx("div", { style: { color: i.error, flexShrink: 0 }, children: g.icon }),
|
|
4514
4532
|
/* @__PURE__ */ r.jsx("span", { children: g.text })
|
|
4515
4533
|
]
|
|
4516
4534
|
},
|
|
@@ -4540,9 +4558,9 @@ const Ns = [
|
|
|
4540
4558
|
style: {
|
|
4541
4559
|
padding: "10px 24px",
|
|
4542
4560
|
borderRadius: "10px",
|
|
4543
|
-
border: `1.5px solid ${
|
|
4561
|
+
border: `1.5px solid ${i.border}`,
|
|
4544
4562
|
background: "transparent",
|
|
4545
|
-
color:
|
|
4563
|
+
color: i.textPrimary,
|
|
4546
4564
|
fontSize: "14px",
|
|
4547
4565
|
fontWeight: 500,
|
|
4548
4566
|
cursor: "pointer",
|
|
@@ -4551,7 +4569,7 @@ const Ns = [
|
|
|
4551
4569
|
transition: "all 0.2s ease"
|
|
4552
4570
|
},
|
|
4553
4571
|
onMouseOver: (g) => {
|
|
4554
|
-
g.currentTarget.style.backgroundColor =
|
|
4572
|
+
g.currentTarget.style.backgroundColor = i.border, g.currentTarget.style.transform = "translateY(-1px)";
|
|
4555
4573
|
},
|
|
4556
4574
|
onMouseOut: (g) => {
|
|
4557
4575
|
g.currentTarget.style.backgroundColor = "transparent", g.currentTarget.style.transform = "translateY(0)";
|
|
@@ -4623,14 +4641,14 @@ const Ns = [
|
|
|
4623
4641
|
color: "white",
|
|
4624
4642
|
flexShrink: 0
|
|
4625
4643
|
},
|
|
4626
|
-
children: /* @__PURE__ */ r.jsx(
|
|
4644
|
+
children: /* @__PURE__ */ r.jsx(Ot, { size: 24 })
|
|
4627
4645
|
}
|
|
4628
4646
|
),
|
|
4629
4647
|
/* @__PURE__ */ r.jsx("div", { style: { flex: 1 }, children: /* @__PURE__ */ r.jsx(
|
|
4630
4648
|
"h3",
|
|
4631
4649
|
{
|
|
4632
4650
|
style: {
|
|
4633
|
-
color:
|
|
4651
|
+
color: i.textPrimary,
|
|
4634
4652
|
margin: 0,
|
|
4635
4653
|
fontSize: "20px",
|
|
4636
4654
|
fontWeight: 700,
|
|
@@ -4647,7 +4665,7 @@ const Ns = [
|
|
|
4647
4665
|
"p",
|
|
4648
4666
|
{
|
|
4649
4667
|
style: {
|
|
4650
|
-
color:
|
|
4668
|
+
color: i.textSecondary,
|
|
4651
4669
|
marginBottom: "16px",
|
|
4652
4670
|
fontSize: "14px",
|
|
4653
4671
|
lineHeight: "1.5"
|
|
@@ -4655,7 +4673,7 @@ const Ns = [
|
|
|
4655
4673
|
children: [
|
|
4656
4674
|
"Type",
|
|
4657
4675
|
" ",
|
|
4658
|
-
/* @__PURE__ */ r.jsx("strong", { style: { color:
|
|
4676
|
+
/* @__PURE__ */ r.jsx("strong", { style: { color: i.textPrimary }, children: '"delete my account"' }),
|
|
4659
4677
|
" ",
|
|
4660
4678
|
"to confirm:"
|
|
4661
4679
|
]
|
|
@@ -4672,16 +4690,16 @@ const Ns = [
|
|
|
4672
4690
|
width: "100%",
|
|
4673
4691
|
padding: "14px 16px",
|
|
4674
4692
|
borderRadius: "10px",
|
|
4675
|
-
border: `2px solid ${h ?
|
|
4693
|
+
border: `2px solid ${h ? i.success : i.error}`,
|
|
4676
4694
|
backgroundColor: "transparent",
|
|
4677
|
-
color:
|
|
4695
|
+
color: i.textPrimary,
|
|
4678
4696
|
fontSize: "15px",
|
|
4679
4697
|
outline: "none",
|
|
4680
4698
|
transition: "all 0.2s ease",
|
|
4681
4699
|
boxSizing: "border-box"
|
|
4682
4700
|
},
|
|
4683
4701
|
onFocus: (g) => {
|
|
4684
|
-
g.target.style.boxShadow = `0 0 0 3px ${
|
|
4702
|
+
g.target.style.boxShadow = `0 0 0 3px ${i.accent}20`;
|
|
4685
4703
|
},
|
|
4686
4704
|
onBlur: (g) => {
|
|
4687
4705
|
g.target.style.boxShadow = "none";
|
|
@@ -4697,7 +4715,7 @@ const Ns = [
|
|
|
4697
4715
|
alignItems: "center",
|
|
4698
4716
|
gap: "8px",
|
|
4699
4717
|
marginTop: "10px",
|
|
4700
|
-
color:
|
|
4718
|
+
color: i.success,
|
|
4701
4719
|
fontSize: "14px",
|
|
4702
4720
|
fontWeight: 500
|
|
4703
4721
|
},
|
|
@@ -4728,9 +4746,9 @@ const Ns = [
|
|
|
4728
4746
|
style: {
|
|
4729
4747
|
padding: "10px 24px",
|
|
4730
4748
|
borderRadius: "10px",
|
|
4731
|
-
border: `1.5px solid ${
|
|
4749
|
+
border: `1.5px solid ${i.border}`,
|
|
4732
4750
|
background: "transparent",
|
|
4733
|
-
color:
|
|
4751
|
+
color: i.textPrimary,
|
|
4734
4752
|
fontSize: "14px",
|
|
4735
4753
|
fontWeight: 500,
|
|
4736
4754
|
cursor: "pointer",
|
|
@@ -4739,7 +4757,7 @@ const Ns = [
|
|
|
4739
4757
|
transition: "all 0.2s ease"
|
|
4740
4758
|
},
|
|
4741
4759
|
onMouseOver: (g) => {
|
|
4742
|
-
g.currentTarget.style.backgroundColor =
|
|
4760
|
+
g.currentTarget.style.backgroundColor = i.border, g.currentTarget.style.transform = "translateY(-1px)";
|
|
4743
4761
|
},
|
|
4744
4762
|
onMouseOut: (g) => {
|
|
4745
4763
|
g.currentTarget.style.backgroundColor = "transparent", g.currentTarget.style.transform = "translateY(0)";
|
|
@@ -4814,7 +4832,7 @@ const Ns = [
|
|
|
4814
4832
|
flexShrink: 0
|
|
4815
4833
|
},
|
|
4816
4834
|
children: /* @__PURE__ */ r.jsx(
|
|
4817
|
-
|
|
4835
|
+
ae,
|
|
4818
4836
|
{
|
|
4819
4837
|
size: 20,
|
|
4820
4838
|
style: {
|
|
@@ -4829,7 +4847,7 @@ const Ns = [
|
|
|
4829
4847
|
"h3",
|
|
4830
4848
|
{
|
|
4831
4849
|
style: {
|
|
4832
|
-
color:
|
|
4850
|
+
color: i.textPrimary,
|
|
4833
4851
|
margin: 0,
|
|
4834
4852
|
fontSize: "20px",
|
|
4835
4853
|
fontWeight: 700,
|
|
@@ -4842,7 +4860,7 @@ const Ns = [
|
|
|
4842
4860
|
"p",
|
|
4843
4861
|
{
|
|
4844
4862
|
style: {
|
|
4845
|
-
color:
|
|
4863
|
+
color: i.textTertiary,
|
|
4846
4864
|
margin: "4px 0 0 0",
|
|
4847
4865
|
fontSize: "14px",
|
|
4848
4866
|
lineHeight: "1.4"
|
|
@@ -4876,7 +4894,7 @@ const Ns = [
|
|
|
4876
4894
|
padding: "12px",
|
|
4877
4895
|
borderRadius: "8px",
|
|
4878
4896
|
transition: "all 0.2s ease",
|
|
4879
|
-
backgroundColor: g.active ? `${
|
|
4897
|
+
backgroundColor: g.active ? `${i.accent}10` : "transparent"
|
|
4880
4898
|
},
|
|
4881
4899
|
children: [
|
|
4882
4900
|
/* @__PURE__ */ r.jsx(
|
|
@@ -4886,9 +4904,9 @@ const Ns = [
|
|
|
4886
4904
|
width: "8px",
|
|
4887
4905
|
height: "8px",
|
|
4888
4906
|
borderRadius: "50%",
|
|
4889
|
-
backgroundColor: g.active ?
|
|
4907
|
+
backgroundColor: g.active ? i.accent : i.textTertiary,
|
|
4890
4908
|
transition: "all 0.3s ease",
|
|
4891
|
-
boxShadow: g.active ? `0 0 0 4px ${
|
|
4909
|
+
boxShadow: g.active ? `0 0 0 4px ${i.accent}20` : "none"
|
|
4892
4910
|
}
|
|
4893
4911
|
}
|
|
4894
4912
|
),
|
|
@@ -4897,7 +4915,7 @@ const Ns = [
|
|
|
4897
4915
|
{
|
|
4898
4916
|
style: {
|
|
4899
4917
|
fontSize: "14px",
|
|
4900
|
-
color: g.active ?
|
|
4918
|
+
color: g.active ? i.textPrimary : i.textSecondary,
|
|
4901
4919
|
fontWeight: g.active ? 500 : 400
|
|
4902
4920
|
},
|
|
4903
4921
|
children: g.text
|
|
@@ -4917,17 +4935,17 @@ const Ns = [
|
|
|
4917
4935
|
alignItems: "center",
|
|
4918
4936
|
gap: "10px",
|
|
4919
4937
|
padding: "16px",
|
|
4920
|
-
background: `${
|
|
4938
|
+
background: `${i.accent}10`,
|
|
4921
4939
|
borderRadius: "10px",
|
|
4922
4940
|
fontSize: "14px",
|
|
4923
|
-
color:
|
|
4941
|
+
color: i.textSecondary
|
|
4924
4942
|
},
|
|
4925
4943
|
children: [
|
|
4926
4944
|
/* @__PURE__ */ r.jsx(
|
|
4927
|
-
|
|
4945
|
+
ir,
|
|
4928
4946
|
{
|
|
4929
4947
|
size: 18,
|
|
4930
|
-
style: { color:
|
|
4948
|
+
style: { color: i.accent, flexShrink: 0 }
|
|
4931
4949
|
}
|
|
4932
4950
|
),
|
|
4933
4951
|
/* @__PURE__ */ r.jsx("span", { children: "You will be redirected to the login page shortly" })
|
|
@@ -4969,7 +4987,7 @@ const Ns = [
|
|
|
4969
4987
|
"h3",
|
|
4970
4988
|
{
|
|
4971
4989
|
style: {
|
|
4972
|
-
color:
|
|
4990
|
+
color: i.textPrimary,
|
|
4973
4991
|
margin: 0,
|
|
4974
4992
|
fontSize: "20px",
|
|
4975
4993
|
fontWeight: 700,
|
|
@@ -4982,7 +5000,7 @@ const Ns = [
|
|
|
4982
5000
|
"p",
|
|
4983
5001
|
{
|
|
4984
5002
|
style: {
|
|
4985
|
-
color:
|
|
5003
|
+
color: i.textTertiary,
|
|
4986
5004
|
margin: "4px 0 0 0",
|
|
4987
5005
|
fontSize: "14px",
|
|
4988
5006
|
lineHeight: "1.4"
|
|
@@ -5000,8 +5018,8 @@ const Ns = [
|
|
|
5000
5018
|
style: {
|
|
5001
5019
|
textAlign: "center",
|
|
5002
5020
|
padding: "20px",
|
|
5003
|
-
background: `${
|
|
5004
|
-
border: `1px solid ${
|
|
5021
|
+
background: `${i.success}10`,
|
|
5022
|
+
border: `1px solid ${i.success}20`,
|
|
5005
5023
|
borderRadius: "12px",
|
|
5006
5024
|
marginBottom: "24px"
|
|
5007
5025
|
},
|
|
@@ -5011,7 +5029,7 @@ const Ns = [
|
|
|
5011
5029
|
{
|
|
5012
5030
|
size: 48,
|
|
5013
5031
|
style: {
|
|
5014
|
-
color:
|
|
5032
|
+
color: i.success,
|
|
5015
5033
|
marginBottom: "12px",
|
|
5016
5034
|
display: "block",
|
|
5017
5035
|
margin: "0 auto 12px auto"
|
|
@@ -5022,7 +5040,7 @@ const Ns = [
|
|
|
5022
5040
|
"p",
|
|
5023
5041
|
{
|
|
5024
5042
|
style: {
|
|
5025
|
-
color:
|
|
5043
|
+
color: i.textPrimary,
|
|
5026
5044
|
fontSize: "16px",
|
|
5027
5045
|
fontWeight: 600,
|
|
5028
5046
|
margin: "0 0 8px 0"
|
|
@@ -5034,7 +5052,7 @@ const Ns = [
|
|
|
5034
5052
|
"p",
|
|
5035
5053
|
{
|
|
5036
5054
|
style: {
|
|
5037
|
-
color:
|
|
5055
|
+
color: i.textSecondary,
|
|
5038
5056
|
fontSize: "14px",
|
|
5039
5057
|
margin: 0,
|
|
5040
5058
|
lineHeight: "1.5"
|
|
@@ -5053,20 +5071,20 @@ const Ns = [
|
|
|
5053
5071
|
alignItems: "center",
|
|
5054
5072
|
gap: "10px",
|
|
5055
5073
|
padding: "16px",
|
|
5056
|
-
background: `${
|
|
5074
|
+
background: `${i.accent}10`,
|
|
5057
5075
|
borderRadius: "10px",
|
|
5058
5076
|
fontSize: "14px",
|
|
5059
|
-
color:
|
|
5077
|
+
color: i.textSecondary,
|
|
5060
5078
|
justifyContent: "center"
|
|
5061
5079
|
},
|
|
5062
5080
|
children: [
|
|
5063
5081
|
/* @__PURE__ */ r.jsx(
|
|
5064
|
-
|
|
5082
|
+
ae,
|
|
5065
5083
|
{
|
|
5066
5084
|
size: 16,
|
|
5067
5085
|
style: {
|
|
5068
5086
|
animation: "spin 1s linear infinite",
|
|
5069
|
-
color:
|
|
5087
|
+
color: i.accent
|
|
5070
5088
|
}
|
|
5071
5089
|
}
|
|
5072
5090
|
),
|
|
@@ -5092,14 +5110,14 @@ const Ns = [
|
|
|
5092
5110
|
zIndex: 1e4,
|
|
5093
5111
|
animation: "fadeIn 0.3s ease-out"
|
|
5094
5112
|
},
|
|
5095
|
-
onClick:
|
|
5113
|
+
onClick: I,
|
|
5096
5114
|
children: [
|
|
5097
5115
|
/* @__PURE__ */ r.jsx(
|
|
5098
5116
|
"div",
|
|
5099
5117
|
{
|
|
5100
5118
|
style: {
|
|
5101
|
-
backgroundColor:
|
|
5102
|
-
border: `1px solid ${
|
|
5119
|
+
backgroundColor: i.surface,
|
|
5120
|
+
border: `1px solid ${i.border}`,
|
|
5103
5121
|
borderRadius: "20px",
|
|
5104
5122
|
width: "100%",
|
|
5105
5123
|
maxWidth: "480px",
|
|
@@ -5169,13 +5187,13 @@ const Ns = [
|
|
|
5169
5187
|
]
|
|
5170
5188
|
}
|
|
5171
5189
|
);
|
|
5172
|
-
},
|
|
5190
|
+
}, Ls = ({
|
|
5173
5191
|
isOpen: t,
|
|
5174
5192
|
onClose: e,
|
|
5175
5193
|
onUpdate: n,
|
|
5176
5194
|
colors: s
|
|
5177
5195
|
}) => {
|
|
5178
|
-
const [
|
|
5196
|
+
const [a, i] = P(""), [o, c] = P(!1), [u, x] = P(!1), [d, y] = P({ isValid: !1, message: "", type: null });
|
|
5179
5197
|
if (ee(() => {
|
|
5180
5198
|
if (typeof window > "u") return;
|
|
5181
5199
|
const p = () => {
|
|
@@ -5183,12 +5201,12 @@ const Ns = [
|
|
|
5183
5201
|
};
|
|
5184
5202
|
return p(), window.addEventListener("resize", p), () => window.removeEventListener("resize", p);
|
|
5185
5203
|
}, []), ee(() => {
|
|
5186
|
-
if (!
|
|
5204
|
+
if (!a.trim()) {
|
|
5187
5205
|
y({ isValid: !1, message: "", type: null });
|
|
5188
5206
|
return;
|
|
5189
5207
|
}
|
|
5190
5208
|
try {
|
|
5191
|
-
const p = new URL(
|
|
5209
|
+
const p = new URL(a), w = /\.(jpg|jpeg|png|gif|webp|svg)$/i.test(p.pathname);
|
|
5192
5210
|
y(w ? {
|
|
5193
5211
|
isValid: !0,
|
|
5194
5212
|
message: "Valid image URL",
|
|
@@ -5205,12 +5223,12 @@ const Ns = [
|
|
|
5205
5223
|
type: "error"
|
|
5206
5224
|
});
|
|
5207
5225
|
}
|
|
5208
|
-
}, [
|
|
5226
|
+
}, [a]), !t) return null;
|
|
5209
5227
|
const k = async () => {
|
|
5210
|
-
if (!(!
|
|
5228
|
+
if (!(!a || !d.isValid)) {
|
|
5211
5229
|
c(!0);
|
|
5212
5230
|
try {
|
|
5213
|
-
await n(
|
|
5231
|
+
await n(a) && (i(""), e());
|
|
5214
5232
|
} finally {
|
|
5215
5233
|
c(!1);
|
|
5216
5234
|
}
|
|
@@ -5329,7 +5347,7 @@ const Ns = [
|
|
|
5329
5347
|
onMouseOut: (p) => {
|
|
5330
5348
|
p.currentTarget.style.backgroundColor = "transparent", p.currentTarget.style.color = s.textTertiary;
|
|
5331
5349
|
},
|
|
5332
|
-
children: /* @__PURE__ */ r.jsx(
|
|
5350
|
+
children: /* @__PURE__ */ r.jsx(Oe, { size: 20 })
|
|
5333
5351
|
}
|
|
5334
5352
|
)
|
|
5335
5353
|
]
|
|
@@ -5371,8 +5389,8 @@ const Ns = [
|
|
|
5371
5389
|
type: "url",
|
|
5372
5390
|
id: "avatar-url",
|
|
5373
5391
|
placeholder: "https://example.com/your-avatar.jpg",
|
|
5374
|
-
value:
|
|
5375
|
-
onChange: (p) =>
|
|
5392
|
+
value: a,
|
|
5393
|
+
onChange: (p) => i(p.target.value),
|
|
5376
5394
|
style: {
|
|
5377
5395
|
width: "100%",
|
|
5378
5396
|
padding: "14px 16px",
|
|
@@ -5429,7 +5447,7 @@ const Ns = [
|
|
|
5429
5447
|
}
|
|
5430
5448
|
)
|
|
5431
5449
|
] }),
|
|
5432
|
-
|
|
5450
|
+
a && d.type === "success" && /* @__PURE__ */ r.jsxs(
|
|
5433
5451
|
"div",
|
|
5434
5452
|
{
|
|
5435
5453
|
style: {
|
|
@@ -5455,7 +5473,7 @@ const Ns = [
|
|
|
5455
5473
|
/* @__PURE__ */ r.jsx(
|
|
5456
5474
|
"img",
|
|
5457
5475
|
{
|
|
5458
|
-
src:
|
|
5476
|
+
src: a,
|
|
5459
5477
|
alt: "Avatar preview",
|
|
5460
5478
|
style: {
|
|
5461
5479
|
width: "80px",
|
|
@@ -5548,7 +5566,7 @@ const Ns = [
|
|
|
5548
5566
|
},
|
|
5549
5567
|
children: o ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
5550
5568
|
/* @__PURE__ */ r.jsx(
|
|
5551
|
-
|
|
5569
|
+
ae,
|
|
5552
5570
|
{
|
|
5553
5571
|
size: 16,
|
|
5554
5572
|
style: {
|
|
@@ -5626,8 +5644,8 @@ const Ns = [
|
|
|
5626
5644
|
onClose: e,
|
|
5627
5645
|
onSuccess: n,
|
|
5628
5646
|
onError: s,
|
|
5629
|
-
userId:
|
|
5630
|
-
colors:
|
|
5647
|
+
userId: a,
|
|
5648
|
+
colors: i
|
|
5631
5649
|
}) => {
|
|
5632
5650
|
const o = pe(), [c, u] = P({
|
|
5633
5651
|
currentPassword: "",
|
|
@@ -5645,9 +5663,9 @@ const Ns = [
|
|
|
5645
5663
|
};
|
|
5646
5664
|
return b(), window.addEventListener("resize", b), () => window.removeEventListener("resize", b);
|
|
5647
5665
|
}, []), !t) return null;
|
|
5648
|
-
const
|
|
5666
|
+
const I = (b) => {
|
|
5649
5667
|
const { name: j, value: q } = b.target;
|
|
5650
|
-
u((
|
|
5668
|
+
u((O) => ({ ...O, [j]: q })), x[j] && d((O) => ({ ...O, [j]: "" }));
|
|
5651
5669
|
}, C = (b) => {
|
|
5652
5670
|
p((j) => ({ ...j, [b]: !j[b] }));
|
|
5653
5671
|
}, g = () => {
|
|
@@ -5660,7 +5678,7 @@ const Ns = [
|
|
|
5660
5678
|
const { data: j } = await o.changePassword({
|
|
5661
5679
|
currentPassword: c.currentPassword,
|
|
5662
5680
|
newPassword: c.newPassword,
|
|
5663
|
-
userId:
|
|
5681
|
+
userId: a
|
|
5664
5682
|
});
|
|
5665
5683
|
j.success ? (n(j.message || "Password updated successfully"), u({
|
|
5666
5684
|
currentPassword: "",
|
|
@@ -5708,8 +5726,8 @@ const Ns = [
|
|
|
5708
5726
|
"div",
|
|
5709
5727
|
{
|
|
5710
5728
|
style: {
|
|
5711
|
-
backgroundColor:
|
|
5712
|
-
border: `1px solid ${
|
|
5729
|
+
backgroundColor: i.surface,
|
|
5730
|
+
border: `1px solid ${i.border}`,
|
|
5713
5731
|
borderRadius: "16px",
|
|
5714
5732
|
maxWidth: "440px",
|
|
5715
5733
|
width: "100%",
|
|
@@ -5748,11 +5766,11 @@ const Ns = [
|
|
|
5748
5766
|
width: "40px",
|
|
5749
5767
|
height: "40px",
|
|
5750
5768
|
borderRadius: "10px",
|
|
5751
|
-
background: `linear-gradient(135deg, ${
|
|
5769
|
+
background: `linear-gradient(135deg, ${i.accent}20, ${i.accent}40)`,
|
|
5752
5770
|
display: "flex",
|
|
5753
5771
|
alignItems: "center",
|
|
5754
5772
|
justifyContent: "center",
|
|
5755
|
-
color:
|
|
5773
|
+
color: i.accent,
|
|
5756
5774
|
flexShrink: 0
|
|
5757
5775
|
},
|
|
5758
5776
|
children: /* @__PURE__ */ r.jsx(ye, { size: 20 })
|
|
@@ -5762,7 +5780,7 @@ const Ns = [
|
|
|
5762
5780
|
"h3",
|
|
5763
5781
|
{
|
|
5764
5782
|
style: {
|
|
5765
|
-
color:
|
|
5783
|
+
color: i.textPrimary,
|
|
5766
5784
|
margin: 0,
|
|
5767
5785
|
fontSize: "18px",
|
|
5768
5786
|
fontWeight: 600,
|
|
@@ -5782,7 +5800,7 @@ const Ns = [
|
|
|
5782
5800
|
style: {
|
|
5783
5801
|
background: "transparent",
|
|
5784
5802
|
border: "none",
|
|
5785
|
-
color:
|
|
5803
|
+
color: i.textTertiary,
|
|
5786
5804
|
cursor: "pointer",
|
|
5787
5805
|
padding: "8px",
|
|
5788
5806
|
borderRadius: "8px",
|
|
@@ -5794,12 +5812,12 @@ const Ns = [
|
|
|
5794
5812
|
justifyContent: "center"
|
|
5795
5813
|
},
|
|
5796
5814
|
onMouseOver: (b) => {
|
|
5797
|
-
b.currentTarget.style.backgroundColor =
|
|
5815
|
+
b.currentTarget.style.backgroundColor = i.border, b.currentTarget.style.color = i.textPrimary;
|
|
5798
5816
|
},
|
|
5799
5817
|
onMouseOut: (b) => {
|
|
5800
|
-
b.currentTarget.style.backgroundColor = "transparent", b.currentTarget.style.color =
|
|
5818
|
+
b.currentTarget.style.backgroundColor = "transparent", b.currentTarget.style.color = i.textTertiary;
|
|
5801
5819
|
},
|
|
5802
|
-
children: /* @__PURE__ */ r.jsx(
|
|
5820
|
+
children: /* @__PURE__ */ r.jsx(Oe, { size: 20 })
|
|
5803
5821
|
}
|
|
5804
5822
|
)
|
|
5805
5823
|
]
|
|
@@ -5821,7 +5839,7 @@ const Ns = [
|
|
|
5821
5839
|
style: {
|
|
5822
5840
|
display: "block",
|
|
5823
5841
|
marginBottom: "8px",
|
|
5824
|
-
color:
|
|
5842
|
+
color: i.textPrimary,
|
|
5825
5843
|
fontSize: "14px",
|
|
5826
5844
|
fontWeight: 500,
|
|
5827
5845
|
lineHeight: "1.4"
|
|
@@ -5838,7 +5856,7 @@ const Ns = [
|
|
|
5838
5856
|
left: "14px",
|
|
5839
5857
|
top: "50%",
|
|
5840
5858
|
transform: "translateY(-50%)",
|
|
5841
|
-
color:
|
|
5859
|
+
color: i.textTertiary,
|
|
5842
5860
|
zIndex: 2
|
|
5843
5861
|
},
|
|
5844
5862
|
children: q
|
|
@@ -5852,24 +5870,24 @@ const Ns = [
|
|
|
5852
5870
|
name: b,
|
|
5853
5871
|
placeholder: `Enter ${j.toLowerCase()}`,
|
|
5854
5872
|
value: c[b],
|
|
5855
|
-
onChange:
|
|
5873
|
+
onChange: I,
|
|
5856
5874
|
style: {
|
|
5857
5875
|
width: "100%",
|
|
5858
5876
|
padding: "14px 48px 14px 44px",
|
|
5859
5877
|
borderRadius: "10px",
|
|
5860
|
-
border: `1.5px solid ${x[b] ?
|
|
5878
|
+
border: `1.5px solid ${x[b] ? i.error : i.border}`,
|
|
5861
5879
|
backgroundColor: "transparent",
|
|
5862
|
-
color:
|
|
5880
|
+
color: i.textPrimary,
|
|
5863
5881
|
fontSize: "15px",
|
|
5864
5882
|
outline: "none",
|
|
5865
5883
|
transition: "all 0.2s ease",
|
|
5866
5884
|
boxSizing: "border-box"
|
|
5867
5885
|
},
|
|
5868
|
-
onFocus: (
|
|
5869
|
-
|
|
5886
|
+
onFocus: (O) => {
|
|
5887
|
+
O.target.style.borderColor = i.accent, O.target.style.boxShadow = `0 0 0 3px ${i.accent}20`;
|
|
5870
5888
|
},
|
|
5871
|
-
onBlur: (
|
|
5872
|
-
|
|
5889
|
+
onBlur: (O) => {
|
|
5890
|
+
O.target.style.borderColor = x[b] ? i.error : i.border, O.target.style.boxShadow = "none";
|
|
5873
5891
|
}
|
|
5874
5892
|
}
|
|
5875
5893
|
),
|
|
@@ -5886,7 +5904,7 @@ const Ns = [
|
|
|
5886
5904
|
background: "transparent",
|
|
5887
5905
|
border: "none",
|
|
5888
5906
|
cursor: "pointer",
|
|
5889
|
-
color:
|
|
5907
|
+
color: i.textTertiary,
|
|
5890
5908
|
padding: "4px",
|
|
5891
5909
|
borderRadius: "4px",
|
|
5892
5910
|
width: "32px",
|
|
@@ -5895,13 +5913,13 @@ const Ns = [
|
|
|
5895
5913
|
alignItems: "center",
|
|
5896
5914
|
justifyContent: "center"
|
|
5897
5915
|
},
|
|
5898
|
-
onMouseOver: (
|
|
5899
|
-
|
|
5916
|
+
onMouseOver: (O) => {
|
|
5917
|
+
O.currentTarget.style.backgroundColor = i.border, O.currentTarget.style.color = i.textPrimary;
|
|
5900
5918
|
},
|
|
5901
|
-
onMouseOut: (
|
|
5902
|
-
|
|
5919
|
+
onMouseOut: (O) => {
|
|
5920
|
+
O.currentTarget.style.backgroundColor = "transparent", O.currentTarget.style.color = i.textTertiary;
|
|
5903
5921
|
},
|
|
5904
|
-
children: E[b] ? /* @__PURE__ */ r.jsx(
|
|
5922
|
+
children: E[b] ? /* @__PURE__ */ r.jsx(at, { size: 18 }) : /* @__PURE__ */ r.jsx(it, { size: 18 })
|
|
5905
5923
|
}
|
|
5906
5924
|
)
|
|
5907
5925
|
] }),
|
|
@@ -5910,7 +5928,7 @@ const Ns = [
|
|
|
5910
5928
|
{
|
|
5911
5929
|
style: {
|
|
5912
5930
|
fontSize: "13px",
|
|
5913
|
-
color:
|
|
5931
|
+
color: i.error,
|
|
5914
5932
|
marginTop: "6px",
|
|
5915
5933
|
display: "flex",
|
|
5916
5934
|
alignItems: "center",
|
|
@@ -5946,9 +5964,9 @@ const Ns = [
|
|
|
5946
5964
|
style: {
|
|
5947
5965
|
padding: "14px 24px",
|
|
5948
5966
|
borderRadius: "10px",
|
|
5949
|
-
border: `1.5px solid ${
|
|
5967
|
+
border: `1.5px solid ${i.border}`,
|
|
5950
5968
|
background: "transparent",
|
|
5951
|
-
color:
|
|
5969
|
+
color: i.textPrimary,
|
|
5952
5970
|
fontSize: "14px",
|
|
5953
5971
|
fontWeight: 500,
|
|
5954
5972
|
cursor: y ? "not-allowed" : "pointer",
|
|
@@ -5958,7 +5976,7 @@ const Ns = [
|
|
|
5958
5976
|
transition: "all 0.2s ease"
|
|
5959
5977
|
},
|
|
5960
5978
|
onMouseOver: (b) => {
|
|
5961
|
-
y || (b.currentTarget.style.backgroundColor =
|
|
5979
|
+
y || (b.currentTarget.style.backgroundColor = i.border, b.currentTarget.style.transform = "translateY(-1px)");
|
|
5962
5980
|
},
|
|
5963
5981
|
onMouseOut: (b) => {
|
|
5964
5982
|
y || (b.currentTarget.style.backgroundColor = "transparent", b.currentTarget.style.transform = "translateY(0)");
|
|
@@ -5975,7 +5993,7 @@ const Ns = [
|
|
|
5975
5993
|
padding: "14px 24px",
|
|
5976
5994
|
borderRadius: "10px",
|
|
5977
5995
|
border: "none",
|
|
5978
|
-
background: `linear-gradient(135deg, ${
|
|
5996
|
+
background: `linear-gradient(135deg, ${i.accent}, ${i.accent}E6)`,
|
|
5979
5997
|
color: "#fff",
|
|
5980
5998
|
fontSize: "14px",
|
|
5981
5999
|
fontWeight: 600,
|
|
@@ -5988,17 +6006,17 @@ const Ns = [
|
|
|
5988
6006
|
justifyContent: "center",
|
|
5989
6007
|
gap: "8px",
|
|
5990
6008
|
transition: "all 0.2s ease",
|
|
5991
|
-
boxShadow: y ? "none" : `0 4px 12px ${
|
|
6009
|
+
boxShadow: y ? "none" : `0 4px 12px ${i.accent}40`
|
|
5992
6010
|
},
|
|
5993
6011
|
onMouseOver: (b) => {
|
|
5994
|
-
y || (b.currentTarget.style.transform = "translateY(-1px)", b.currentTarget.style.boxShadow = `0 6px 20px ${
|
|
6012
|
+
y || (b.currentTarget.style.transform = "translateY(-1px)", b.currentTarget.style.boxShadow = `0 6px 20px ${i.accent}60`);
|
|
5995
6013
|
},
|
|
5996
6014
|
onMouseOut: (b) => {
|
|
5997
|
-
y || (b.currentTarget.style.transform = "translateY(0)", b.currentTarget.style.boxShadow = `0 4px 12px ${
|
|
6015
|
+
y || (b.currentTarget.style.transform = "translateY(0)", b.currentTarget.style.boxShadow = `0 4px 12px ${i.accent}40`);
|
|
5998
6016
|
},
|
|
5999
6017
|
children: y ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
6000
6018
|
/* @__PURE__ */ r.jsx(
|
|
6001
|
-
|
|
6019
|
+
ae,
|
|
6002
6020
|
{
|
|
6003
6021
|
size: 16,
|
|
6004
6022
|
style: {
|
|
@@ -6029,12 +6047,12 @@ const Ns = [
|
|
|
6029
6047
|
}
|
|
6030
6048
|
|
|
6031
6049
|
.change-password-modal::-webkit-scrollbar-thumb {
|
|
6032
|
-
background: ${
|
|
6050
|
+
background: ${i.border};
|
|
6033
6051
|
border-radius: 3px;
|
|
6034
6052
|
}
|
|
6035
6053
|
|
|
6036
6054
|
.change-password-modal::-webkit-scrollbar-thumb:hover {
|
|
6037
|
-
background: ${
|
|
6055
|
+
background: ${i.textTertiary};
|
|
6038
6056
|
}
|
|
6039
6057
|
|
|
6040
6058
|
/* Mobile responsiveness */
|
|
@@ -6063,8 +6081,8 @@ const Ns = [
|
|
|
6063
6081
|
onClose: e,
|
|
6064
6082
|
onVerify: n,
|
|
6065
6083
|
onSendOTP: s,
|
|
6066
|
-
verifyFormData:
|
|
6067
|
-
setVerifyFormData:
|
|
6084
|
+
verifyFormData: a,
|
|
6085
|
+
setVerifyFormData: i,
|
|
6068
6086
|
otpSent: o,
|
|
6069
6087
|
verifying: c,
|
|
6070
6088
|
user: u,
|
|
@@ -6073,7 +6091,7 @@ const Ns = [
|
|
|
6073
6091
|
}) => {
|
|
6074
6092
|
if (!t) return null;
|
|
6075
6093
|
const y = () => {
|
|
6076
|
-
e(),
|
|
6094
|
+
e(), i({ email: u?.email || "", otp: "" });
|
|
6077
6095
|
};
|
|
6078
6096
|
return /* @__PURE__ */ r.jsxs(
|
|
6079
6097
|
"div",
|
|
@@ -6101,7 +6119,7 @@ const Ns = [
|
|
|
6101
6119
|
className: "close-btn",
|
|
6102
6120
|
style: { color: x.textTertiary },
|
|
6103
6121
|
"aria-label": "Close verification modal",
|
|
6104
|
-
children: /* @__PURE__ */ r.jsx(
|
|
6122
|
+
children: /* @__PURE__ */ r.jsx(Oe, { size: 20, "aria-hidden": "true" })
|
|
6105
6123
|
}
|
|
6106
6124
|
)
|
|
6107
6125
|
] }),
|
|
@@ -6121,8 +6139,8 @@ const Ns = [
|
|
|
6121
6139
|
"input",
|
|
6122
6140
|
{
|
|
6123
6141
|
type: "email",
|
|
6124
|
-
value:
|
|
6125
|
-
onChange: (k) =>
|
|
6142
|
+
value: a.email,
|
|
6143
|
+
onChange: (k) => i((E) => ({
|
|
6126
6144
|
...E,
|
|
6127
6145
|
email: k.target.value
|
|
6128
6146
|
})),
|
|
@@ -6143,7 +6161,7 @@ const Ns = [
|
|
|
6143
6161
|
/* @__PURE__ */ r.jsx("label", { style: { color: x.textSecondary }, children: "OTP" }),
|
|
6144
6162
|
/* @__PURE__ */ r.jsxs("div", { className: "input-container", children: [
|
|
6145
6163
|
/* @__PURE__ */ r.jsx(
|
|
6146
|
-
|
|
6164
|
+
ar,
|
|
6147
6165
|
{
|
|
6148
6166
|
size: 18,
|
|
6149
6167
|
style: { color: x.textTertiary },
|
|
@@ -6154,8 +6172,8 @@ const Ns = [
|
|
|
6154
6172
|
"input",
|
|
6155
6173
|
{
|
|
6156
6174
|
type: "text",
|
|
6157
|
-
value:
|
|
6158
|
-
onChange: (k) =>
|
|
6175
|
+
value: a.otp,
|
|
6176
|
+
onChange: (k) => i((E) => ({
|
|
6159
6177
|
...E,
|
|
6160
6178
|
otp: k.target.value
|
|
6161
6179
|
})),
|
|
@@ -6184,7 +6202,7 @@ const Ns = [
|
|
|
6184
6202
|
},
|
|
6185
6203
|
"aria-label": c ? "Verifying email" : "Verify email",
|
|
6186
6204
|
children: [
|
|
6187
|
-
c ? /* @__PURE__ */ r.jsx(
|
|
6205
|
+
c ? /* @__PURE__ */ r.jsx(ae, { size: 16, className: "spinner", "aria-hidden": "true" }) : /* @__PURE__ */ r.jsx(ue, { size: 16, "aria-hidden": "true" }),
|
|
6188
6206
|
c ? "Verifying..." : "Verify Email"
|
|
6189
6207
|
]
|
|
6190
6208
|
}
|
|
@@ -6201,7 +6219,7 @@ const Ns = [
|
|
|
6201
6219
|
},
|
|
6202
6220
|
"aria-label": c ? "Sending OTP" : "Send OTP",
|
|
6203
6221
|
children: [
|
|
6204
|
-
c ? /* @__PURE__ */ r.jsx(
|
|
6222
|
+
c ? /* @__PURE__ */ r.jsx(ae, { size: 16, className: "spinner", "aria-hidden": "true" }) : /* @__PURE__ */ r.jsx(ct, { size: 16, "aria-hidden": "true" }),
|
|
6205
6223
|
c ? "Sending..." : "Send OTP"
|
|
6206
6224
|
]
|
|
6207
6225
|
}
|
|
@@ -6361,17 +6379,17 @@ const Ns = [
|
|
|
6361
6379
|
]
|
|
6362
6380
|
}
|
|
6363
6381
|
);
|
|
6364
|
-
},
|
|
6382
|
+
}, xa = ({
|
|
6365
6383
|
darkMode: t = !0,
|
|
6366
6384
|
homeUrl: e,
|
|
6367
6385
|
onLogout: n,
|
|
6368
6386
|
onVerify: s,
|
|
6369
|
-
primaryColor:
|
|
6387
|
+
primaryColor: a = "#00C212"
|
|
6370
6388
|
}) => {
|
|
6371
|
-
const
|
|
6389
|
+
const i = pe(), [o, c] = P(null), [u, x] = P(), [d, y] = P(!0), [k, E] = P(!1), [p, w] = P(!1), [h, I] = P(!1), [C, g] = P(!1), [A, N] = P(!1), [b, j] = P(!1), [q, O] = P(!1), [X, W] = P(!1), [T, G] = P(null), [R, z] = P(!1), [M, K] = P({
|
|
6372
6390
|
email: "",
|
|
6373
6391
|
otp: ""
|
|
6374
|
-
}), [H,
|
|
6392
|
+
}), [H, F] = P(!1), [Y, l] = P(!1);
|
|
6375
6393
|
ee(() => {
|
|
6376
6394
|
if (typeof window < "u") {
|
|
6377
6395
|
const v = () => c(window.innerWidth);
|
|
@@ -6383,7 +6401,7 @@ const Ns = [
|
|
|
6383
6401
|
}, S = () => {
|
|
6384
6402
|
W(!0);
|
|
6385
6403
|
const v = setTimeout(() => {
|
|
6386
|
-
|
|
6404
|
+
O(!1), W(!1);
|
|
6387
6405
|
}, 150);
|
|
6388
6406
|
return () => clearTimeout(v);
|
|
6389
6407
|
};
|
|
@@ -6407,11 +6425,11 @@ const Ns = [
|
|
|
6407
6425
|
}
|
|
6408
6426
|
try {
|
|
6409
6427
|
l(!0);
|
|
6410
|
-
const v = await
|
|
6428
|
+
const v = await i.requestEmailVerificationOTP({
|
|
6411
6429
|
userId: u.id,
|
|
6412
6430
|
email: M.email
|
|
6413
6431
|
}), U = v?.data?.success ?? v?.success, V = v?.data?.message ?? v?.message;
|
|
6414
|
-
U ? (m("success", V || "OTP sent to email!"),
|
|
6432
|
+
U ? (m("success", V || "OTP sent to email!"), F(!0)) : m("error", V || "Failed to send OTP");
|
|
6415
6433
|
} catch (v) {
|
|
6416
6434
|
const U = v?.response?.data?.message || v?.message || "Server error";
|
|
6417
6435
|
m("error", U);
|
|
@@ -6429,14 +6447,14 @@ const Ns = [
|
|
|
6429
6447
|
}
|
|
6430
6448
|
try {
|
|
6431
6449
|
l(!0);
|
|
6432
|
-
const U = await
|
|
6450
|
+
const U = await i.verifyEmail({
|
|
6433
6451
|
email: M.email,
|
|
6434
6452
|
otp: M.otp
|
|
6435
6453
|
}), V = U?.data?.success ?? U?.success, Z = U?.data?.message ?? U?.message;
|
|
6436
6454
|
if (V) {
|
|
6437
6455
|
m("success", Z || "Email verified!");
|
|
6438
6456
|
const de = { ...u, isVerified: !0 };
|
|
6439
|
-
x(de), typeof s == "function" && s(de), K({ email: de.email, otp: "" }),
|
|
6457
|
+
x(de), typeof s == "function" && s(de), K({ email: de.email, otp: "" }), F(!1), j?.(!1);
|
|
6440
6458
|
} else
|
|
6441
6459
|
m("error", Z || "Verification failed");
|
|
6442
6460
|
} catch (U) {
|
|
@@ -6448,7 +6466,7 @@ const Ns = [
|
|
|
6448
6466
|
}, oe = async (v) => {
|
|
6449
6467
|
if (!u) return !1;
|
|
6450
6468
|
try {
|
|
6451
|
-
const U = await
|
|
6469
|
+
const U = await i.updateUser({
|
|
6452
6470
|
userId: u.id,
|
|
6453
6471
|
avatarUrl: v
|
|
6454
6472
|
});
|
|
@@ -6470,7 +6488,7 @@ const Ns = [
|
|
|
6470
6488
|
if (u) {
|
|
6471
6489
|
w(!0);
|
|
6472
6490
|
try {
|
|
6473
|
-
const v = u.email, U = await
|
|
6491
|
+
const v = u.email, U = await i.updateUser({
|
|
6474
6492
|
userId: u.id,
|
|
6475
6493
|
...u
|
|
6476
6494
|
});
|
|
@@ -6496,7 +6514,7 @@ const Ns = [
|
|
|
6496
6514
|
}
|
|
6497
6515
|
}, le = async (v) => {
|
|
6498
6516
|
try {
|
|
6499
|
-
const U = await
|
|
6517
|
+
const U = await i.checkIfUserExists(v);
|
|
6500
6518
|
U?.success === !0 && U?.exists === !1 && (console.warn("❌ User does not exist on server. Clearing session..."), localStorage.removeItem("userInfo"), x(null));
|
|
6501
6519
|
} catch (U) {
|
|
6502
6520
|
console.error("⚠️ User validation request failed:", U);
|
|
@@ -6506,9 +6524,9 @@ const Ns = [
|
|
|
6506
6524
|
(async () => {
|
|
6507
6525
|
try {
|
|
6508
6526
|
y(!0);
|
|
6509
|
-
const U = await
|
|
6527
|
+
const U = await i.checkUserSession();
|
|
6510
6528
|
if (U.user?.id) {
|
|
6511
|
-
const V = U.user.id, Z = await
|
|
6529
|
+
const V = U.user.id, Z = await i.getUserProfile({ userId: V });
|
|
6512
6530
|
if (Z.user) {
|
|
6513
6531
|
const de = Z.user;
|
|
6514
6532
|
x(de), le(V);
|
|
@@ -6536,8 +6554,8 @@ const Ns = [
|
|
|
6536
6554
|
textPrimary: "#ffffff",
|
|
6537
6555
|
textSecondary: "#d4d4d8",
|
|
6538
6556
|
textTertiary: "#a1a1aa",
|
|
6539
|
-
accent:
|
|
6540
|
-
accentHover: ge(
|
|
6557
|
+
accent: a,
|
|
6558
|
+
accentHover: ge(a, -15),
|
|
6541
6559
|
success: "#10b981",
|
|
6542
6560
|
error: "#ef4444",
|
|
6543
6561
|
border: "#27272a",
|
|
@@ -6550,8 +6568,8 @@ const Ns = [
|
|
|
6550
6568
|
textPrimary: "#18181b",
|
|
6551
6569
|
textSecondary: "#52525b",
|
|
6552
6570
|
textTertiary: "#71717a",
|
|
6553
|
-
accent:
|
|
6554
|
-
accentHover: ge(
|
|
6571
|
+
accent: a,
|
|
6572
|
+
accentHover: ge(a, -15),
|
|
6555
6573
|
success: "#10b981",
|
|
6556
6574
|
error: "#ef4444",
|
|
6557
6575
|
border: "#e4e4e7",
|
|
@@ -6582,7 +6600,7 @@ const Ns = [
|
|
|
6582
6600
|
},
|
|
6583
6601
|
children: [
|
|
6584
6602
|
/* @__PURE__ */ r.jsx(
|
|
6585
|
-
|
|
6603
|
+
ae,
|
|
6586
6604
|
{
|
|
6587
6605
|
size: 40,
|
|
6588
6606
|
color: _.accent,
|
|
@@ -6815,7 +6833,7 @@ const Ns = [
|
|
|
6815
6833
|
/* @__PURE__ */ r.jsx(
|
|
6816
6834
|
"button",
|
|
6817
6835
|
{
|
|
6818
|
-
onClick: () =>
|
|
6836
|
+
onClick: () => I(!0),
|
|
6819
6837
|
style: {
|
|
6820
6838
|
position: "absolute",
|
|
6821
6839
|
bottom: "8px",
|
|
@@ -6920,7 +6938,7 @@ const Ns = [
|
|
|
6920
6938
|
flex: o && window.innerWidth < 1024 ? "1" : "auto"
|
|
6921
6939
|
},
|
|
6922
6940
|
children: [
|
|
6923
|
-
/* @__PURE__ */ r.jsx(
|
|
6941
|
+
/* @__PURE__ */ r.jsx(Oe, { size: 16, "aria-hidden": "true" }),
|
|
6924
6942
|
"Cancel"
|
|
6925
6943
|
]
|
|
6926
6944
|
}
|
|
@@ -6951,7 +6969,7 @@ const Ns = [
|
|
|
6951
6969
|
},
|
|
6952
6970
|
children: [
|
|
6953
6971
|
p ? /* @__PURE__ */ r.jsx(
|
|
6954
|
-
|
|
6972
|
+
ae,
|
|
6955
6973
|
{
|
|
6956
6974
|
size: 16,
|
|
6957
6975
|
style: { animation: "spin 1s linear infinite" },
|
|
@@ -7017,7 +7035,7 @@ const Ns = [
|
|
|
7017
7035
|
},
|
|
7018
7036
|
children: [
|
|
7019
7037
|
R ? /* @__PURE__ */ r.jsx(
|
|
7020
|
-
|
|
7038
|
+
ae,
|
|
7021
7039
|
{
|
|
7022
7040
|
size: 14,
|
|
7023
7041
|
style: { animation: "spin 1s linear infinite" },
|
|
@@ -7051,9 +7069,9 @@ const Ns = [
|
|
|
7051
7069
|
width: "100%",
|
|
7052
7070
|
boxSizing: "border-box"
|
|
7053
7071
|
},
|
|
7054
|
-
onClick: () =>
|
|
7072
|
+
onClick: () => O(!q),
|
|
7055
7073
|
children: [
|
|
7056
|
-
/* @__PURE__ */ r.jsx(
|
|
7074
|
+
/* @__PURE__ */ r.jsx(as, { size: 16, "aria-hidden": "true" }),
|
|
7057
7075
|
"More Actions"
|
|
7058
7076
|
]
|
|
7059
7077
|
}
|
|
@@ -7268,7 +7286,7 @@ const Ns = [
|
|
|
7268
7286
|
style: {
|
|
7269
7287
|
padding: "12px",
|
|
7270
7288
|
borderRadius: "8px",
|
|
7271
|
-
border: `1px solid ${
|
|
7289
|
+
border: `1px solid ${a}`,
|
|
7272
7290
|
backgroundColor: "transparent",
|
|
7273
7291
|
color: _.textPrimary,
|
|
7274
7292
|
fontSize: "12px",
|
|
@@ -7332,7 +7350,7 @@ const Ns = [
|
|
|
7332
7350
|
gap: "8px"
|
|
7333
7351
|
},
|
|
7334
7352
|
children: [
|
|
7335
|
-
/* @__PURE__ */ r.jsx(
|
|
7353
|
+
/* @__PURE__ */ r.jsx(ir, { size: 20, "aria-hidden": "true" }),
|
|
7336
7354
|
"Security Status"
|
|
7337
7355
|
]
|
|
7338
7356
|
}
|
|
@@ -7440,11 +7458,11 @@ const Ns = [
|
|
|
7440
7458
|
}
|
|
7441
7459
|
),
|
|
7442
7460
|
/* @__PURE__ */ r.jsx(
|
|
7443
|
-
|
|
7461
|
+
Ls,
|
|
7444
7462
|
{
|
|
7445
7463
|
isOpen: h,
|
|
7446
7464
|
onClose: () => {
|
|
7447
|
-
|
|
7465
|
+
I(!1);
|
|
7448
7466
|
},
|
|
7449
7467
|
onUpdate: oe,
|
|
7450
7468
|
colors: _
|
|
@@ -7462,7 +7480,7 @@ const Ns = [
|
|
|
7462
7480
|
}
|
|
7463
7481
|
),
|
|
7464
7482
|
/* @__PURE__ */ r.jsx(
|
|
7465
|
-
|
|
7483
|
+
Fs,
|
|
7466
7484
|
{
|
|
7467
7485
|
userId: u.id,
|
|
7468
7486
|
isOpen: A,
|
|
@@ -7477,7 +7495,7 @@ const Ns = [
|
|
|
7477
7495
|
{
|
|
7478
7496
|
isOpen: b,
|
|
7479
7497
|
onClose: () => {
|
|
7480
|
-
j(!1),
|
|
7498
|
+
j(!1), F(!1), K({ email: u?.email || "", otp: "" });
|
|
7481
7499
|
},
|
|
7482
7500
|
onVerify: ne,
|
|
7483
7501
|
onSendOTP: D,
|
|
@@ -7582,13 +7600,13 @@ const Ns = [
|
|
|
7582
7600
|
]
|
|
7583
7601
|
}
|
|
7584
7602
|
);
|
|
7585
|
-
},
|
|
7603
|
+
}, ha = ({
|
|
7586
7604
|
darkMode: t = !0,
|
|
7587
7605
|
primaryColor: e = "#3b82f6",
|
|
7588
7606
|
onLogout: n,
|
|
7589
7607
|
varient: s = "classic",
|
|
7590
|
-
propUser:
|
|
7591
|
-
className:
|
|
7608
|
+
propUser: a,
|
|
7609
|
+
className: i = "",
|
|
7592
7610
|
// New URL props with defaults
|
|
7593
7611
|
profileUrl: o,
|
|
7594
7612
|
settingsUrl: c,
|
|
@@ -7602,7 +7620,7 @@ const Ns = [
|
|
|
7602
7620
|
viewProfileLabel: E = "View Profile",
|
|
7603
7621
|
logoutLabel: p = "Sign Out"
|
|
7604
7622
|
}) => {
|
|
7605
|
-
const w = pe(), [h,
|
|
7623
|
+
const w = pe(), [h, I] = P(!1), [C, g] = P(null), [A, N] = P(!0), [b, j] = P(null), q = dt(null), O = dt(null), [X, W] = P(!1), [T, G] = P(!1);
|
|
7606
7624
|
ee(() => {
|
|
7607
7625
|
if (typeof window > "u") return;
|
|
7608
7626
|
const l = () => {
|
|
@@ -7613,10 +7631,10 @@ const Ns = [
|
|
|
7613
7631
|
let l = !0;
|
|
7614
7632
|
return (async () => {
|
|
7615
7633
|
try {
|
|
7616
|
-
if (N(!0), j(null),
|
|
7617
|
-
if (!
|
|
7634
|
+
if (N(!0), j(null), a) {
|
|
7635
|
+
if (!a.id || !a.name || !a.email)
|
|
7618
7636
|
throw new Error("Invalid user data provided");
|
|
7619
|
-
l && g(
|
|
7637
|
+
l && g(a);
|
|
7620
7638
|
return;
|
|
7621
7639
|
}
|
|
7622
7640
|
const S = await w.checkUserSession();
|
|
@@ -7640,11 +7658,11 @@ const Ns = [
|
|
|
7640
7658
|
})(), () => {
|
|
7641
7659
|
l = !1;
|
|
7642
7660
|
};
|
|
7643
|
-
}, [
|
|
7661
|
+
}, [a, w]), ee(() => {
|
|
7644
7662
|
if (typeof window > "u") return;
|
|
7645
7663
|
const l = () => {
|
|
7646
|
-
if (!h || !
|
|
7647
|
-
const m =
|
|
7664
|
+
if (!h || !O.current) return;
|
|
7665
|
+
const m = O.current.getBoundingClientRect(), S = window.innerWidth, D = window.innerHeight, ne = 280, oe = S - m.right, B = m.left;
|
|
7648
7666
|
D - m.bottom;
|
|
7649
7667
|
const le = oe >= ne || oe > B;
|
|
7650
7668
|
W(le);
|
|
@@ -7654,11 +7672,11 @@ const Ns = [
|
|
|
7654
7672
|
if (typeof window > "u" || typeof document > "u")
|
|
7655
7673
|
return;
|
|
7656
7674
|
const l = (D) => {
|
|
7657
|
-
q.current && !q.current.contains(D.target) && !
|
|
7675
|
+
q.current && !q.current.contains(D.target) && !O.current?.contains(D.target) && I(!1);
|
|
7658
7676
|
}, m = (D) => {
|
|
7659
|
-
D.key === "Escape" &&
|
|
7677
|
+
D.key === "Escape" && I(!1);
|
|
7660
7678
|
}, S = () => {
|
|
7661
|
-
h &&
|
|
7679
|
+
h && I(!1);
|
|
7662
7680
|
};
|
|
7663
7681
|
return h && (document.addEventListener("mousedown", l), document.addEventListener("keydown", m), window.addEventListener("scroll", S)), () => {
|
|
7664
7682
|
document.removeEventListener("mousedown", l), document.removeEventListener("keydown", m), window.removeEventListener("scroll", S);
|
|
@@ -7883,10 +7901,10 @@ const Ns = [
|
|
|
7883
7901
|
}, M = async () => {
|
|
7884
7902
|
j(null), N(!0);
|
|
7885
7903
|
try {
|
|
7886
|
-
if (
|
|
7887
|
-
if (!
|
|
7904
|
+
if (a) {
|
|
7905
|
+
if (!a.id || !a.name || !a.email)
|
|
7888
7906
|
throw new Error("Invalid user data provided");
|
|
7889
|
-
g(
|
|
7907
|
+
g(a);
|
|
7890
7908
|
return;
|
|
7891
7909
|
}
|
|
7892
7910
|
const l = await w.checkUserSession();
|
|
@@ -7908,7 +7926,7 @@ const Ns = [
|
|
|
7908
7926
|
}
|
|
7909
7927
|
}, K = (l, m) => {
|
|
7910
7928
|
(l.key === "Enter" || l.key === " ") && (l.preventDefault(), m());
|
|
7911
|
-
}, H = () => o || C?.profileUrl,
|
|
7929
|
+
}, H = () => o || C?.profileUrl, F = () => {
|
|
7912
7930
|
const l = H();
|
|
7913
7931
|
l && window.open(l, "_self", "noopener,noreferrer");
|
|
7914
7932
|
}, Y = () => {
|
|
@@ -7919,16 +7937,16 @@ const Ns = [
|
|
|
7919
7937
|
{
|
|
7920
7938
|
style: z.wrapper,
|
|
7921
7939
|
ref: q,
|
|
7922
|
-
className:
|
|
7940
|
+
className: i,
|
|
7923
7941
|
role: "menu",
|
|
7924
7942
|
"aria-label": "User menu",
|
|
7925
7943
|
children: [
|
|
7926
7944
|
s === "classic" ? /* @__PURE__ */ r.jsx(
|
|
7927
7945
|
"div",
|
|
7928
7946
|
{
|
|
7929
|
-
ref:
|
|
7930
|
-
onClick: () =>
|
|
7931
|
-
onKeyDown: (l) => K(l, () =>
|
|
7947
|
+
ref: O,
|
|
7948
|
+
onClick: () => I((l) => !l),
|
|
7949
|
+
onKeyDown: (l) => K(l, () => I((m) => !m)),
|
|
7932
7950
|
tabIndex: 0,
|
|
7933
7951
|
role: "button",
|
|
7934
7952
|
"aria-haspopup": "true",
|
|
@@ -7977,10 +7995,10 @@ const Ns = [
|
|
|
7977
7995
|
) : /* @__PURE__ */ r.jsxs(
|
|
7978
7996
|
"div",
|
|
7979
7997
|
{
|
|
7980
|
-
ref:
|
|
7998
|
+
ref: O,
|
|
7981
7999
|
style: z.avatarButton,
|
|
7982
|
-
onClick: () =>
|
|
7983
|
-
onKeyDown: (l) => K(l, () =>
|
|
8000
|
+
onClick: () => I((l) => !l),
|
|
8001
|
+
onKeyDown: (l) => K(l, () => I((m) => !m)),
|
|
7984
8002
|
tabIndex: 0,
|
|
7985
8003
|
role: "button",
|
|
7986
8004
|
"aria-haspopup": "true",
|
|
@@ -8065,14 +8083,14 @@ const Ns = [
|
|
|
8065
8083
|
"button",
|
|
8066
8084
|
{
|
|
8067
8085
|
style: z.menuItem,
|
|
8068
|
-
onClick:
|
|
8086
|
+
onClick: F,
|
|
8069
8087
|
onMouseOver: (l) => {
|
|
8070
8088
|
l.currentTarget.style.backgroundColor = R.surfaceHover;
|
|
8071
8089
|
},
|
|
8072
8090
|
onMouseOut: (l) => {
|
|
8073
8091
|
l.currentTarget.style.backgroundColor = "transparent";
|
|
8074
8092
|
},
|
|
8075
|
-
onKeyDown: (l) => K(l,
|
|
8093
|
+
onKeyDown: (l) => K(l, F),
|
|
8076
8094
|
role: "menuitem",
|
|
8077
8095
|
tabIndex: 0,
|
|
8078
8096
|
children: [
|
|
@@ -8096,7 +8114,7 @@ const Ns = [
|
|
|
8096
8114
|
role: "menuitem",
|
|
8097
8115
|
tabIndex: 0,
|
|
8098
8116
|
children: [
|
|
8099
|
-
/* @__PURE__ */ r.jsx(
|
|
8117
|
+
/* @__PURE__ */ r.jsx(Os, { style: z.icon, "aria-hidden": "true" }),
|
|
8100
8118
|
/* @__PURE__ */ r.jsx("span", { style: z.menuItemText, children: k })
|
|
8101
8119
|
]
|
|
8102
8120
|
}
|
|
@@ -8178,13 +8196,13 @@ const Ns = [
|
|
|
8178
8196
|
]
|
|
8179
8197
|
}
|
|
8180
8198
|
);
|
|
8181
|
-
},
|
|
8199
|
+
}, ma = ({
|
|
8182
8200
|
user: t,
|
|
8183
8201
|
darkMode: e = !0,
|
|
8184
8202
|
primaryColor: n = "#00C212",
|
|
8185
8203
|
onVerify: s
|
|
8186
8204
|
}) => {
|
|
8187
|
-
const
|
|
8205
|
+
const a = pe();
|
|
8188
8206
|
if (!t)
|
|
8189
8207
|
return /* @__PURE__ */ r.jsxs(
|
|
8190
8208
|
"div",
|
|
@@ -8208,7 +8226,7 @@ const Ns = [
|
|
|
8208
8226
|
]
|
|
8209
8227
|
}
|
|
8210
8228
|
);
|
|
8211
|
-
const [
|
|
8229
|
+
const [i, o] = P(!1), [c, u] = P({
|
|
8212
8230
|
email: t?.email || "",
|
|
8213
8231
|
otp: ""
|
|
8214
8232
|
}), [x, d] = P(!1), [y, k] = P(!1), [E, p] = P(null);
|
|
@@ -8219,8 +8237,8 @@ const Ns = [
|
|
|
8219
8237
|
}
|
|
8220
8238
|
}, []);
|
|
8221
8239
|
const w = (b, j) => {
|
|
8222
|
-
let q = parseInt(b.replace("#", ""), 16),
|
|
8223
|
-
return
|
|
8240
|
+
let q = parseInt(b.replace("#", ""), 16), O = (q >> 16) + j, X = (q >> 8 & 255) + j, W = (q & 255) + j;
|
|
8241
|
+
return O = Math.min(255, Math.max(0, O)), X = Math.min(255, Math.max(0, X)), W = Math.min(255, Math.max(0, W)), `#${(W | X << 8 | O << 16).toString(16).padStart(6, "0")}`;
|
|
8224
8242
|
}, h = e ? {
|
|
8225
8243
|
surface: "#000000",
|
|
8226
8244
|
textPrimary: "#ffffff",
|
|
@@ -8245,53 +8263,53 @@ const Ns = [
|
|
|
8245
8263
|
ee(() => {
|
|
8246
8264
|
t?.email && u((b) => ({ ...b, email: t.email }));
|
|
8247
8265
|
}, [t?.email]);
|
|
8248
|
-
const
|
|
8266
|
+
const I = (b, j) => {
|
|
8249
8267
|
p({ type: b, message: j }), setTimeout(() => p(null), 3e3);
|
|
8250
8268
|
}, C = async () => {
|
|
8251
8269
|
if (!c.email || !/\S+@\S+\.\S+/.test(c.email)) {
|
|
8252
|
-
|
|
8270
|
+
I("error", "Please enter a valid email");
|
|
8253
8271
|
return;
|
|
8254
8272
|
}
|
|
8255
8273
|
if (!t?.id) {
|
|
8256
|
-
|
|
8274
|
+
I("error", "User ID missing");
|
|
8257
8275
|
return;
|
|
8258
8276
|
}
|
|
8259
8277
|
try {
|
|
8260
8278
|
k(!0);
|
|
8261
|
-
const b = await
|
|
8279
|
+
const b = await a.requestEmailVerificationOTP({
|
|
8262
8280
|
userId: t.id,
|
|
8263
8281
|
email: c.email
|
|
8264
8282
|
});
|
|
8265
8283
|
if (console.log("Send OTP response:", b), b.success || b.data?.success) {
|
|
8266
8284
|
const j = b.message || b.data?.message || "OTP sent!";
|
|
8267
|
-
|
|
8285
|
+
I("success", j), d(!0);
|
|
8268
8286
|
} else {
|
|
8269
8287
|
const j = b.message || b.data?.message || "Failed to send OTP";
|
|
8270
|
-
|
|
8288
|
+
I("error", j);
|
|
8271
8289
|
}
|
|
8272
8290
|
} catch (b) {
|
|
8273
|
-
console.error("Send OTP error:", b),
|
|
8291
|
+
console.error("Send OTP error:", b), I("error", b.message || "Server error");
|
|
8274
8292
|
} finally {
|
|
8275
8293
|
k(!1);
|
|
8276
8294
|
}
|
|
8277
8295
|
}, g = async (b) => {
|
|
8278
8296
|
if (b.preventDefault(), !c.email || !c.otp) {
|
|
8279
|
-
|
|
8297
|
+
I("error", "Please fill in all fields");
|
|
8280
8298
|
return;
|
|
8281
8299
|
}
|
|
8282
8300
|
try {
|
|
8283
8301
|
k(!0);
|
|
8284
|
-
const j = await
|
|
8302
|
+
const j = await a.verifyEmail({
|
|
8285
8303
|
email: c.email,
|
|
8286
8304
|
otp: c.otp
|
|
8287
8305
|
});
|
|
8288
8306
|
if (j.success) {
|
|
8289
8307
|
const q = { ...t, isVerified: !0 };
|
|
8290
|
-
s?.(q),
|
|
8308
|
+
s?.(q), I("success", j.message || "Email verified!"), d(!1), u({ email: t.email, otp: "" });
|
|
8291
8309
|
} else
|
|
8292
|
-
|
|
8310
|
+
I("error", j.message || "Verification failed");
|
|
8293
8311
|
} catch (j) {
|
|
8294
|
-
|
|
8312
|
+
I("error", j.message || "Server error");
|
|
8295
8313
|
} finally {
|
|
8296
8314
|
k(!1);
|
|
8297
8315
|
}
|
|
@@ -8326,7 +8344,7 @@ const Ns = [
|
|
|
8326
8344
|
onSubmit: g,
|
|
8327
8345
|
style: {
|
|
8328
8346
|
width: "100%",
|
|
8329
|
-
maxWidth:
|
|
8347
|
+
maxWidth: i ? "340px" : "400px",
|
|
8330
8348
|
display: "flex",
|
|
8331
8349
|
flexDirection: "column",
|
|
8332
8350
|
gap: 20,
|
|
@@ -8509,7 +8527,7 @@ const Ns = [
|
|
|
8509
8527
|
fontSize: 14
|
|
8510
8528
|
},
|
|
8511
8529
|
children: [
|
|
8512
|
-
y ? /* @__PURE__ */ r.jsx(
|
|
8530
|
+
y ? /* @__PURE__ */ r.jsx(ae, { size: 16, className: "spinner" }) : /* @__PURE__ */ r.jsx(ue, { size: 16 }),
|
|
8513
8531
|
y ? "Verifying..." : "Verify Email"
|
|
8514
8532
|
]
|
|
8515
8533
|
}
|
|
@@ -8526,7 +8544,7 @@ const Ns = [
|
|
|
8526
8544
|
fontSize: 14
|
|
8527
8545
|
},
|
|
8528
8546
|
children: [
|
|
8529
|
-
y ? /* @__PURE__ */ r.jsx(
|
|
8547
|
+
y ? /* @__PURE__ */ r.jsx(ae, { size: 16, className: "spinner" }) : /* @__PURE__ */ r.jsx(ct, { size: 16 }),
|
|
8530
8548
|
y ? "Sending..." : "Send OTP"
|
|
8531
8549
|
]
|
|
8532
8550
|
}
|
|
@@ -8536,13 +8554,13 @@ const Ns = [
|
|
|
8536
8554
|
);
|
|
8537
8555
|
};
|
|
8538
8556
|
export {
|
|
8539
|
-
|
|
8540
|
-
|
|
8541
|
-
|
|
8542
|
-
|
|
8543
|
-
|
|
8544
|
-
|
|
8545
|
-
|
|
8546
|
-
|
|
8547
|
-
|
|
8557
|
+
ca as AuthixProvider,
|
|
8558
|
+
la as NeuctraAuthix,
|
|
8559
|
+
ma as ReactEmailVerification,
|
|
8560
|
+
pa as ReactSignedIn,
|
|
8561
|
+
fa as ReactSignedOut,
|
|
8562
|
+
ha as ReactUserButton,
|
|
8563
|
+
ua as ReactUserLogin,
|
|
8564
|
+
xa as ReactUserProfile,
|
|
8565
|
+
da as ReactUserSignUp
|
|
8548
8566
|
};
|