@neuctra/authix 1.1.26 → 1.1.28
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 +711 -697
- package/dist/neuctra-authix.umd.js +16 -16
- package/dist/react/SignedIn.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -7,11 +7,11 @@ function Ut(t, e) {
|
|
|
7
7
|
const { toString: fr } = Object.prototype, { getPrototypeOf: st } = Object, { iterator: Fe, toStringTag: Dt } = Symbol, Me = /* @__PURE__ */ ((t) => (e) => {
|
|
8
8
|
const r = fr.call(e);
|
|
9
9
|
return t[r] || (t[r] = r.slice(8, -1).toLowerCase());
|
|
10
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
10
|
+
})(/* @__PURE__ */ Object.create(null)), oe = (t) => (t = t.toLowerCase(), (e) => Me(e) === t), We = (t) => (e) => typeof e === t, { isArray: we } = Array, ye = We("undefined");
|
|
11
11
|
function Ce(t) {
|
|
12
12
|
return t !== null && !ye(t) && t.constructor !== null && !ye(t.constructor) && re(t.constructor.isBuffer) && t.constructor.isBuffer(t);
|
|
13
13
|
}
|
|
14
|
-
const Lt =
|
|
14
|
+
const Lt = oe("ArrayBuffer");
|
|
15
15
|
function xr(t) {
|
|
16
16
|
let e;
|
|
17
17
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && Lt(t.buffer), e;
|
|
@@ -29,24 +29,24 @@ const hr = We("string"), re = We("function"), Ft = We("number"), Te = (t) => t !
|
|
|
29
29
|
} catch {
|
|
30
30
|
return !1;
|
|
31
31
|
}
|
|
32
|
-
}, yr =
|
|
32
|
+
}, yr = oe("Date"), br = oe("File"), wr = oe("Blob"), jr = oe("FileList"), vr = (t) => Te(t) && re(t.pipe), Sr = (t) => {
|
|
33
33
|
let e;
|
|
34
34
|
return t && (typeof FormData == "function" && t instanceof FormData || re(t.append) && ((e = Me(t)) === "formdata" || // detect form-data instance
|
|
35
35
|
e === "object" && re(t.toString) && t.toString() === "[object FormData]"));
|
|
36
|
-
}, kr =
|
|
36
|
+
}, kr = oe("URLSearchParams"), [Er, Cr, Tr, Rr] = ["ReadableStream", "Request", "Response", "Headers"].map(oe), Ir = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
37
37
|
function Re(t, e, { allOwnKeys: r = !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]), we(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 (Ce(t))
|
|
46
46
|
return;
|
|
47
|
-
const i = r ? Object.getOwnPropertyNames(t) : Object.keys(t),
|
|
47
|
+
const i = r ? Object.getOwnPropertyNames(t) : Object.keys(t), o = i.length;
|
|
48
48
|
let l;
|
|
49
|
-
for (s = 0; s <
|
|
49
|
+
for (s = 0; s < o; s++)
|
|
50
50
|
l = i[s], e.call(null, t[l], l, t);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
@@ -55,35 +55,35 @@ function Mt(t, e) {
|
|
|
55
55
|
return null;
|
|
56
56
|
e = e.toLowerCase();
|
|
57
57
|
const r = Object.keys(t);
|
|
58
|
-
let s = r.length,
|
|
58
|
+
let s = r.length, a;
|
|
59
59
|
for (; s-- > 0; )
|
|
60
|
-
if (
|
|
61
|
-
return
|
|
60
|
+
if (a = r[s], e === a.toLowerCase())
|
|
61
|
+
return a;
|
|
62
62
|
return null;
|
|
63
63
|
}
|
|
64
|
-
const
|
|
64
|
+
const xe = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Wt = (t) => !ye(t) && t !== xe;
|
|
65
65
|
function Ze() {
|
|
66
|
-
const { caseless: t, skipUndefined: e } = Wt(this) && this || {}, r = {}, s = (
|
|
67
|
-
const
|
|
68
|
-
Ae(r[
|
|
66
|
+
const { caseless: t, skipUndefined: e } = Wt(this) && this || {}, r = {}, s = (a, i) => {
|
|
67
|
+
const o = t && Mt(r, i) || i;
|
|
68
|
+
Ae(r[o]) && Ae(a) ? r[o] = Ze(r[o], a) : Ae(a) ? r[o] = Ze({}, a) : we(a) ? r[o] = a.slice() : (!e || !ye(a)) && (r[o] = a);
|
|
69
69
|
};
|
|
70
|
-
for (let
|
|
71
|
-
arguments[
|
|
70
|
+
for (let a = 0, i = arguments.length; a < i; a++)
|
|
71
|
+
arguments[a] && Re(arguments[a], s);
|
|
72
72
|
return r;
|
|
73
73
|
}
|
|
74
|
-
const Pr = (t, e, r, { allOwnKeys: s } = {}) => (Re(e, (
|
|
75
|
-
r && re(
|
|
74
|
+
const Pr = (t, e, r, { allOwnKeys: s } = {}) => (Re(e, (a, i) => {
|
|
75
|
+
r && re(a) ? t[i] = Ut(a, r) : t[i] = a;
|
|
76
76
|
}, { allOwnKeys: s }), t), Or = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), zr = (t, e, r, s) => {
|
|
77
77
|
t.prototype = Object.create(e.prototype, s), t.prototype.constructor = t, Object.defineProperty(t, "super", {
|
|
78
78
|
value: e.prototype
|
|
79
79
|
}), r && Object.assign(t.prototype, r);
|
|
80
80
|
}, Ar = (t, e, r, s) => {
|
|
81
|
-
let
|
|
81
|
+
let a, i, o;
|
|
82
82
|
const l = {};
|
|
83
83
|
if (e = e || {}, t == null) return e;
|
|
84
84
|
do {
|
|
85
|
-
for (
|
|
86
|
-
|
|
85
|
+
for (a = Object.getOwnPropertyNames(t), i = a.length; i-- > 0; )
|
|
86
|
+
o = a[i], (!s || s(o, t, e)) && !l[o] && (e[o] = t[o], l[o] = !0);
|
|
87
87
|
t = r !== !1 && st(t);
|
|
88
88
|
} while (t && (!r || r(t, e)) && t !== Object.prototype);
|
|
89
89
|
return e;
|
|
@@ -102,9 +102,9 @@ const Pr = (t, e, r, { allOwnKeys: s } = {}) => (Re(e, (o, i) => {
|
|
|
102
102
|
return r;
|
|
103
103
|
}, Nr = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && st(Uint8Array)), Ur = (t, e) => {
|
|
104
104
|
const s = (t && t[Fe]).call(t);
|
|
105
|
-
let
|
|
106
|
-
for (; (
|
|
107
|
-
const i =
|
|
105
|
+
let a;
|
|
106
|
+
for (; (a = s.next()) && !a.done; ) {
|
|
107
|
+
const i = a.value;
|
|
108
108
|
e.call(t, i[0], i[1]);
|
|
109
109
|
}
|
|
110
110
|
}, Dr = (t, e) => {
|
|
@@ -113,16 +113,16 @@ const Pr = (t, e, r, { allOwnKeys: s } = {}) => (Re(e, (o, i) => {
|
|
|
113
113
|
for (; (r = t.exec(e)) !== null; )
|
|
114
114
|
s.push(r);
|
|
115
115
|
return s;
|
|
116
|
-
}, Lr =
|
|
116
|
+
}, Lr = oe("HTMLFormElement"), Fr = (t) => t.toLowerCase().replace(
|
|
117
117
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
118
|
-
function(r, s,
|
|
119
|
-
return s.toUpperCase() +
|
|
118
|
+
function(r, s, a) {
|
|
119
|
+
return s.toUpperCase() + a;
|
|
120
120
|
}
|
|
121
|
-
), ht = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype), Mr =
|
|
121
|
+
), ht = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype), Mr = oe("RegExp"), qt = (t, e) => {
|
|
122
122
|
const r = Object.getOwnPropertyDescriptors(t), s = {};
|
|
123
|
-
Re(r, (
|
|
124
|
-
let
|
|
125
|
-
(
|
|
123
|
+
Re(r, (a, i) => {
|
|
124
|
+
let o;
|
|
125
|
+
(o = e(a, i, t)) !== !1 && (s[i] = o || a);
|
|
126
126
|
}), Object.defineProperties(t, s);
|
|
127
127
|
}, Wr = (t) => {
|
|
128
128
|
qt(t, (e, r) => {
|
|
@@ -140,8 +140,8 @@ const Pr = (t, e, r, { allOwnKeys: s } = {}) => (Re(e, (o, i) => {
|
|
|
140
140
|
}
|
|
141
141
|
});
|
|
142
142
|
}, qr = (t, e) => {
|
|
143
|
-
const r = {}, s = (
|
|
144
|
-
|
|
143
|
+
const r = {}, s = (a) => {
|
|
144
|
+
a.forEach((i) => {
|
|
145
145
|
r[i] = !0;
|
|
146
146
|
});
|
|
147
147
|
};
|
|
@@ -152,32 +152,32 @@ function Vr(t) {
|
|
|
152
152
|
return !!(t && re(t.append) && t[Dt] === "FormData" && t[Fe]);
|
|
153
153
|
}
|
|
154
154
|
const Yr = (t) => {
|
|
155
|
-
const e = new Array(10), r = (s,
|
|
155
|
+
const e = new Array(10), r = (s, a) => {
|
|
156
156
|
if (Te(s)) {
|
|
157
157
|
if (e.indexOf(s) >= 0)
|
|
158
158
|
return;
|
|
159
159
|
if (Ce(s))
|
|
160
160
|
return s;
|
|
161
161
|
if (!("toJSON" in s)) {
|
|
162
|
-
e[
|
|
162
|
+
e[a] = s;
|
|
163
163
|
const i = we(s) ? [] : {};
|
|
164
|
-
return Re(s, (
|
|
165
|
-
const h = r(
|
|
164
|
+
return Re(s, (o, l) => {
|
|
165
|
+
const h = r(o, a + 1);
|
|
166
166
|
!ye(h) && (i[l] = h);
|
|
167
|
-
}), e[
|
|
167
|
+
}), e[a] = void 0, i;
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
return s;
|
|
171
171
|
};
|
|
172
172
|
return r(t, 0);
|
|
173
|
-
}, Kr =
|
|
174
|
-
|
|
175
|
-
}, !1), (
|
|
176
|
-
s.push(
|
|
173
|
+
}, Kr = oe("AsyncFunction"), Jr = (t) => t && (Te(t) || re(t)) && re(t.then) && re(t.catch), Bt = ((t, e) => t ? setImmediate : e ? ((r, s) => (xe.addEventListener("message", ({ source: a, data: i }) => {
|
|
174
|
+
a === xe && i === r && s.length && s.shift()();
|
|
175
|
+
}, !1), (a) => {
|
|
176
|
+
s.push(a), xe.postMessage(r, "*");
|
|
177
177
|
}))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(
|
|
178
178
|
typeof setImmediate == "function",
|
|
179
|
-
re(
|
|
180
|
-
), Xr = typeof queueMicrotask < "u" ? queueMicrotask.bind(
|
|
179
|
+
re(xe.postMessage)
|
|
180
|
+
), Xr = typeof queueMicrotask < "u" ? queueMicrotask.bind(xe) : typeof process < "u" && process.nextTick || Bt, Gr = (t) => t != null && re(t[Fe]), p = {
|
|
181
181
|
isArray: we,
|
|
182
182
|
isArrayBuffer: Lt,
|
|
183
183
|
isBuffer: Ce,
|
|
@@ -211,7 +211,7 @@ const Yr = (t) => {
|
|
|
211
211
|
inherits: zr,
|
|
212
212
|
toFlatObject: Ar,
|
|
213
213
|
kindOf: Me,
|
|
214
|
-
kindOfTest:
|
|
214
|
+
kindOfTest: oe,
|
|
215
215
|
endsWith: _r,
|
|
216
216
|
toArray: $r,
|
|
217
217
|
forEachEntry: Ur,
|
|
@@ -227,7 +227,7 @@ const Yr = (t) => {
|
|
|
227
227
|
noop: Br,
|
|
228
228
|
toFiniteNumber: Hr,
|
|
229
229
|
findKey: Mt,
|
|
230
|
-
global:
|
|
230
|
+
global: xe,
|
|
231
231
|
isContextDefined: Wt,
|
|
232
232
|
isSpecCompliantForm: Vr,
|
|
233
233
|
toJSONObject: Yr,
|
|
@@ -237,8 +237,8 @@ const Yr = (t) => {
|
|
|
237
237
|
asap: Xr,
|
|
238
238
|
isIterable: Gr
|
|
239
239
|
};
|
|
240
|
-
function L(t, e, r, 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), r && (this.config = r), s && (this.request = s),
|
|
240
|
+
function L(t, e, r, 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), r && (this.config = r), s && (this.request = s), a && (this.response = a, this.status = a.status ? a.status : null);
|
|
242
242
|
}
|
|
243
243
|
p.inherits(L, Error, {
|
|
244
244
|
toJSON: function() {
|
|
@@ -281,13 +281,13 @@ const Ht = L.prototype, Vt = {};
|
|
|
281
281
|
});
|
|
282
282
|
Object.defineProperties(L, Vt);
|
|
283
283
|
Object.defineProperty(Ht, "isAxiosError", { value: !0 });
|
|
284
|
-
L.from = (t, e, r, s,
|
|
285
|
-
const
|
|
286
|
-
p.toFlatObject(t,
|
|
287
|
-
return
|
|
284
|
+
L.from = (t, e, r, s, a, i) => {
|
|
285
|
+
const o = Object.create(Ht);
|
|
286
|
+
p.toFlatObject(t, o, function(d) {
|
|
287
|
+
return d !== Error.prototype;
|
|
288
288
|
}, (c) => c !== "isAxiosError");
|
|
289
289
|
const l = t && t.message ? t.message : "Error", h = e == null && t ? t.code : e;
|
|
290
|
-
return L.call(
|
|
290
|
+
return L.call(o, l, h, r, s, a), t && o.cause == null && Object.defineProperty(o, "cause", { value: t, configurable: !0 }), o.name = t && t.name || "Error", i && Object.assign(o, i), o;
|
|
291
291
|
};
|
|
292
292
|
const Zr = null;
|
|
293
293
|
function Qe(t) {
|
|
@@ -297,8 +297,8 @@ function Yt(t) {
|
|
|
297
297
|
return p.endsWith(t, "[]") ? t.slice(0, -2) : t;
|
|
298
298
|
}
|
|
299
299
|
function gt(t, e, r) {
|
|
300
|
-
return t ? t.concat(e).map(function(
|
|
301
|
-
return
|
|
300
|
+
return t ? t.concat(e).map(function(a, i) {
|
|
301
|
+
return a = Yt(a), !r && i ? "[" + a + "]" : a;
|
|
302
302
|
}).join(r ? "." : "") : e;
|
|
303
303
|
}
|
|
304
304
|
function Qr(t) {
|
|
@@ -317,46 +317,46 @@ function qe(t, e, r) {
|
|
|
317
317
|
}, !1, function(j, m) {
|
|
318
318
|
return !p.isUndefined(m[j]);
|
|
319
319
|
});
|
|
320
|
-
const s = r.metaTokens,
|
|
321
|
-
if (!p.isFunction(
|
|
320
|
+
const s = r.metaTokens, a = r.visitor || d, i = r.dots, o = r.indexes, h = (r.Blob || typeof Blob < "u" && Blob) && p.isSpecCompliantForm(e);
|
|
321
|
+
if (!p.isFunction(a))
|
|
322
322
|
throw new TypeError("visitor must be a function");
|
|
323
|
-
function c(
|
|
324
|
-
if (
|
|
325
|
-
if (p.isDate(
|
|
326
|
-
return
|
|
327
|
-
if (p.isBoolean(
|
|
328
|
-
return
|
|
329
|
-
if (!h && p.isBlob(
|
|
323
|
+
function c(u) {
|
|
324
|
+
if (u === null) return "";
|
|
325
|
+
if (p.isDate(u))
|
|
326
|
+
return u.toISOString();
|
|
327
|
+
if (p.isBoolean(u))
|
|
328
|
+
return u.toString();
|
|
329
|
+
if (!h && p.isBlob(u))
|
|
330
330
|
throw new L("Blob is not supported. Use a Buffer instead.");
|
|
331
|
-
return p.isArrayBuffer(
|
|
331
|
+
return p.isArrayBuffer(u) || p.isTypedArray(u) ? h && typeof Blob == "function" ? new Blob([u]) : Buffer.from(u) : u;
|
|
332
332
|
}
|
|
333
|
-
function u
|
|
334
|
-
let _ =
|
|
335
|
-
if (
|
|
333
|
+
function d(u, j, m) {
|
|
334
|
+
let _ = u;
|
|
335
|
+
if (u && !m && typeof u == "object") {
|
|
336
336
|
if (p.endsWith(j, "{}"))
|
|
337
|
-
j = s ? j : j.slice(0, -2),
|
|
338
|
-
else if (p.isArray(
|
|
337
|
+
j = s ? j : j.slice(0, -2), u = JSON.stringify(u);
|
|
338
|
+
else if (p.isArray(u) && Qr(u) || (p.isFileList(u) || p.endsWith(j, "[]")) && (_ = p.toArray(u)))
|
|
339
339
|
return j = Yt(j), _.forEach(function(A, C) {
|
|
340
340
|
!(p.isUndefined(A) || A === null) && e.append(
|
|
341
341
|
// eslint-disable-next-line no-nested-ternary
|
|
342
|
-
|
|
342
|
+
o === !0 ? gt([j], C, i) : o === null ? j : j + "[]",
|
|
343
343
|
c(A)
|
|
344
344
|
);
|
|
345
345
|
}), !1;
|
|
346
346
|
}
|
|
347
|
-
return Qe(
|
|
347
|
+
return Qe(u) ? !0 : (e.append(gt(m, j, i), c(u)), !1);
|
|
348
348
|
}
|
|
349
349
|
const b = [], y = Object.assign(en, {
|
|
350
|
-
defaultVisitor:
|
|
350
|
+
defaultVisitor: d,
|
|
351
351
|
convertValue: c,
|
|
352
352
|
isVisitable: Qe
|
|
353
353
|
});
|
|
354
|
-
function w(
|
|
355
|
-
if (!p.isUndefined(
|
|
356
|
-
if (b.indexOf(
|
|
354
|
+
function w(u, j) {
|
|
355
|
+
if (!p.isUndefined(u)) {
|
|
356
|
+
if (b.indexOf(u) !== -1)
|
|
357
357
|
throw Error("Circular reference detected in " + j.join("."));
|
|
358
|
-
b.push(
|
|
359
|
-
(!(p.isUndefined(_) || _ === null) &&
|
|
358
|
+
b.push(u), p.forEach(u, function(_, R) {
|
|
359
|
+
(!(p.isUndefined(_) || _ === null) && a.call(
|
|
360
360
|
e,
|
|
361
361
|
_,
|
|
362
362
|
p.isString(R) ? R.trim() : R,
|
|
@@ -384,10 +384,10 @@ function mt(t) {
|
|
|
384
384
|
return e[s];
|
|
385
385
|
});
|
|
386
386
|
}
|
|
387
|
-
function
|
|
387
|
+
function at(t, e) {
|
|
388
388
|
this._pairs = [], t && qe(t, this, e);
|
|
389
389
|
}
|
|
390
|
-
const Kt =
|
|
390
|
+
const Kt = at.prototype;
|
|
391
391
|
Kt.append = function(e, r) {
|
|
392
392
|
this._pairs.push([e, r]);
|
|
393
393
|
};
|
|
@@ -395,8 +395,8 @@ Kt.toString = function(e) {
|
|
|
395
395
|
const r = e ? function(s) {
|
|
396
396
|
return e.call(this, s, mt);
|
|
397
397
|
} : mt;
|
|
398
|
-
return this._pairs.map(function(
|
|
399
|
-
return r(
|
|
398
|
+
return this._pairs.map(function(a) {
|
|
399
|
+
return r(a[0]) + "=" + r(a[1]);
|
|
400
400
|
}, "").join("&");
|
|
401
401
|
};
|
|
402
402
|
function tn(t) {
|
|
@@ -409,11 +409,11 @@ function Jt(t, e, r) {
|
|
|
409
409
|
p.isFunction(r) && (r = {
|
|
410
410
|
serialize: r
|
|
411
411
|
});
|
|
412
|
-
const
|
|
412
|
+
const a = r && r.serialize;
|
|
413
413
|
let i;
|
|
414
|
-
if (
|
|
415
|
-
const
|
|
416
|
-
|
|
414
|
+
if (a ? i = a(e, r) : i = p.isURLSearchParams(e) ? e.toString() : new at(e, r).toString(s), i) {
|
|
415
|
+
const o = t.indexOf("#");
|
|
416
|
+
o !== -1 && (t = t.slice(0, o)), t += (t.indexOf("?") === -1 ? "?" : "&") + i;
|
|
417
417
|
}
|
|
418
418
|
return t;
|
|
419
419
|
}
|
|
@@ -475,7 +475,7 @@ const Xt = {
|
|
|
475
475
|
silentJSONParsing: !0,
|
|
476
476
|
forcedJSONParsing: !0,
|
|
477
477
|
clarifyTimeoutError: !1
|
|
478
|
-
}, rn = typeof URLSearchParams < "u" ? URLSearchParams :
|
|
478
|
+
}, rn = typeof URLSearchParams < "u" ? URLSearchParams : at, nn = typeof FormData < "u" ? FormData : null, sn = typeof Blob < "u" ? Blob : null, an = {
|
|
479
479
|
isBrowser: !0,
|
|
480
480
|
classes: {
|
|
481
481
|
URLSearchParams: rn,
|
|
@@ -483,21 +483,21 @@ const Xt = {
|
|
|
483
483
|
Blob: sn
|
|
484
484
|
},
|
|
485
485
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
486
|
-
},
|
|
487
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", cn =
|
|
486
|
+
}, ot = typeof window < "u" && typeof document < "u", et = typeof navigator == "object" && navigator || void 0, on = ot && (!et || ["ReactNative", "NativeScript", "NS"].indexOf(et.product) < 0), ln = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
487
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", cn = ot && window.location.href || "http://localhost", dn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
488
488
|
__proto__: null,
|
|
489
|
-
hasBrowserEnv:
|
|
490
|
-
hasStandardBrowserEnv:
|
|
489
|
+
hasBrowserEnv: ot,
|
|
490
|
+
hasStandardBrowserEnv: on,
|
|
491
491
|
hasStandardBrowserWebWorkerEnv: ln,
|
|
492
492
|
navigator: et,
|
|
493
493
|
origin: cn
|
|
494
494
|
}, Symbol.toStringTag, { value: "Module" })), ee = {
|
|
495
495
|
...dn,
|
|
496
|
-
...
|
|
496
|
+
...an
|
|
497
497
|
};
|
|
498
498
|
function un(t, e) {
|
|
499
499
|
return qe(t, new ee.classes.URLSearchParams(), {
|
|
500
|
-
visitor: function(r, s,
|
|
500
|
+
visitor: function(r, s, a, i) {
|
|
501
501
|
return ee.isNode && p.isBuffer(r) ? (this.append(s, r.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
502
502
|
},
|
|
503
503
|
...e
|
|
@@ -509,23 +509,23 @@ function pn(t) {
|
|
|
509
509
|
function fn(t) {
|
|
510
510
|
const e = {}, r = Object.keys(t);
|
|
511
511
|
let s;
|
|
512
|
-
const
|
|
512
|
+
const a = r.length;
|
|
513
513
|
let i;
|
|
514
|
-
for (s = 0; s <
|
|
514
|
+
for (s = 0; s < a; s++)
|
|
515
515
|
i = r[s], e[i] = t[i];
|
|
516
516
|
return e;
|
|
517
517
|
}
|
|
518
518
|
function Gt(t) {
|
|
519
|
-
function e(r, s,
|
|
520
|
-
let
|
|
521
|
-
if (
|
|
522
|
-
const l = Number.isFinite(+
|
|
523
|
-
return
|
|
519
|
+
function e(r, s, a, i) {
|
|
520
|
+
let o = r[i++];
|
|
521
|
+
if (o === "__proto__") return !0;
|
|
522
|
+
const l = Number.isFinite(+o), h = i >= r.length;
|
|
523
|
+
return o = !o && p.isArray(a) ? a.length : o, h ? (p.hasOwnProp(a, o) ? a[o] = [a[o], s] : a[o] = s, !l) : ((!a[o] || !p.isObject(a[o])) && (a[o] = []), e(r, s, a[o], i) && p.isArray(a[o]) && (a[o] = fn(a[o])), !l);
|
|
524
524
|
}
|
|
525
525
|
if (p.isFormData(t) && p.isFunction(t.entries)) {
|
|
526
526
|
const r = {};
|
|
527
|
-
return p.forEachEntry(t, (s,
|
|
528
|
-
e(pn(s),
|
|
527
|
+
return p.forEachEntry(t, (s, a) => {
|
|
528
|
+
e(pn(s), a, r, 0);
|
|
529
529
|
}), r;
|
|
530
530
|
}
|
|
531
531
|
return null;
|
|
@@ -544,9 +544,9 @@ const Ie = {
|
|
|
544
544
|
transitional: Xt,
|
|
545
545
|
adapter: ["xhr", "http", "fetch"],
|
|
546
546
|
transformRequest: [function(e, r) {
|
|
547
|
-
const s = r.getContentType() || "",
|
|
547
|
+
const s = r.getContentType() || "", a = s.indexOf("application/json") > -1, i = p.isObject(e);
|
|
548
548
|
if (i && p.isHTMLForm(e) && (e = new FormData(e)), p.isFormData(e))
|
|
549
|
-
return
|
|
549
|
+
return a ? JSON.stringify(Gt(e)) : e;
|
|
550
550
|
if (p.isArrayBuffer(e) || p.isBuffer(e) || p.isStream(e) || p.isFile(e) || p.isBlob(e) || p.isReadableStream(e))
|
|
551
551
|
return e;
|
|
552
552
|
if (p.isArrayBufferView(e))
|
|
@@ -566,18 +566,18 @@ const Ie = {
|
|
|
566
566
|
);
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
return i ||
|
|
569
|
+
return i || a ? (r.setContentType("application/json", !1), xn(e)) : e;
|
|
570
570
|
}],
|
|
571
571
|
transformResponse: [function(e) {
|
|
572
|
-
const r = this.transitional || Ie.transitional, s = r && r.forcedJSONParsing,
|
|
572
|
+
const r = this.transitional || Ie.transitional, s = r && r.forcedJSONParsing, a = this.responseType === "json";
|
|
573
573
|
if (p.isResponse(e) || p.isReadableStream(e))
|
|
574
574
|
return e;
|
|
575
|
-
if (e && p.isString(e) && (s && !this.responseType ||
|
|
576
|
-
const
|
|
575
|
+
if (e && p.isString(e) && (s && !this.responseType || a)) {
|
|
576
|
+
const o = !(r && r.silentJSONParsing) && a;
|
|
577
577
|
try {
|
|
578
578
|
return JSON.parse(e, this.parseReviver);
|
|
579
579
|
} catch (l) {
|
|
580
|
-
if (
|
|
580
|
+
if (o)
|
|
581
581
|
throw l.name === "SyntaxError" ? L.from(l, L.ERR_BAD_RESPONSE, this, null, this.response) : l;
|
|
582
582
|
}
|
|
583
583
|
}
|
|
@@ -629,10 +629,10 @@ const hn = p.toObjectSet([
|
|
|
629
629
|
"user-agent"
|
|
630
630
|
]), gn = (t) => {
|
|
631
631
|
const e = {};
|
|
632
|
-
let r, s,
|
|
632
|
+
let r, s, a;
|
|
633
633
|
return t && t.split(`
|
|
634
|
-
`).forEach(function(
|
|
635
|
-
|
|
634
|
+
`).forEach(function(o) {
|
|
635
|
+
a = o.indexOf(":"), r = o.substring(0, a).trim().toLowerCase(), s = o.substring(a + 1).trim(), !(!r || e[r] && hn[r]) && (r === "set-cookie" ? e[r] ? e[r].push(s) : e[r] = [s] : e[r] = e[r] ? e[r] + ", " + s : s);
|
|
636
636
|
}), e;
|
|
637
637
|
}, bt = Symbol("internals");
|
|
638
638
|
function Se(t) {
|
|
@@ -649,10 +649,10 @@ function mn(t) {
|
|
|
649
649
|
return e;
|
|
650
650
|
}
|
|
651
651
|
const yn = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
|
|
652
|
-
function Ye(t, e, r, s,
|
|
652
|
+
function Ye(t, e, r, s, a) {
|
|
653
653
|
if (p.isFunction(s))
|
|
654
654
|
return s.call(this, e, r);
|
|
655
|
-
if (
|
|
655
|
+
if (a && (e = r), !!p.isString(e)) {
|
|
656
656
|
if (p.isString(s))
|
|
657
657
|
return e.indexOf(s) !== -1;
|
|
658
658
|
if (p.isRegExp(s))
|
|
@@ -666,8 +666,8 @@ function wn(t, e) {
|
|
|
666
666
|
const r = p.toCamelCase(" " + e);
|
|
667
667
|
["get", "set", "has"].forEach((s) => {
|
|
668
668
|
Object.defineProperty(t, s + r, {
|
|
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,27 +678,27 @@ let ne = class {
|
|
|
678
678
|
e && this.set(e);
|
|
679
679
|
}
|
|
680
680
|
set(e, r, s) {
|
|
681
|
-
const
|
|
681
|
+
const a = this;
|
|
682
682
|
function i(l, h, c) {
|
|
683
|
-
const
|
|
684
|
-
if (!
|
|
683
|
+
const d = Se(h);
|
|
684
|
+
if (!d)
|
|
685
685
|
throw new Error("header name must be a non-empty string");
|
|
686
|
-
const b = p.findKey(
|
|
687
|
-
(!b ||
|
|
686
|
+
const b = p.findKey(a, d);
|
|
687
|
+
(!b || a[b] === void 0 || c === !0 || c === void 0 && a[b] !== !1) && (a[b || h] = _e(l));
|
|
688
688
|
}
|
|
689
|
-
const
|
|
689
|
+
const o = (l, h) => p.forEach(l, (c, d) => i(c, d, h));
|
|
690
690
|
if (p.isPlainObject(e) || e instanceof this.constructor)
|
|
691
|
-
|
|
691
|
+
o(e, r);
|
|
692
692
|
else if (p.isString(e) && (e = e.trim()) && !yn(e))
|
|
693
|
-
|
|
693
|
+
o(gn(e), r);
|
|
694
694
|
else if (p.isObject(e) && p.isIterable(e)) {
|
|
695
695
|
let l = {}, h, c;
|
|
696
|
-
for (const
|
|
697
|
-
if (!p.isArray(
|
|
696
|
+
for (const d of e) {
|
|
697
|
+
if (!p.isArray(d))
|
|
698
698
|
throw TypeError("Object iterator must return a key-value pair");
|
|
699
|
-
l[c =
|
|
699
|
+
l[c = d[0]] = (h = l[c]) ? p.isArray(h) ? [...h, d[1]] : [h, d[1]] : d[1];
|
|
700
700
|
}
|
|
701
|
-
|
|
701
|
+
o(l, r);
|
|
702
702
|
} else
|
|
703
703
|
e != null && i(r, e, s);
|
|
704
704
|
return this;
|
|
@@ -707,15 +707,15 @@ let ne = class {
|
|
|
707
707
|
if (e = Se(e), e) {
|
|
708
708
|
const s = p.findKey(this, e);
|
|
709
709
|
if (s) {
|
|
710
|
-
const
|
|
710
|
+
const a = this[s];
|
|
711
711
|
if (!r)
|
|
712
|
-
return
|
|
712
|
+
return a;
|
|
713
713
|
if (r === !0)
|
|
714
|
-
return mn(
|
|
714
|
+
return mn(a);
|
|
715
715
|
if (p.isFunction(r))
|
|
716
|
-
return r.call(this,
|
|
716
|
+
return r.call(this, a, s);
|
|
717
717
|
if (p.isRegExp(r))
|
|
718
|
-
return r.exec(
|
|
718
|
+
return r.exec(a);
|
|
719
719
|
throw new TypeError("parser must be boolean|regexp|function");
|
|
720
720
|
}
|
|
721
721
|
}
|
|
@@ -729,34 +729,34 @@ let ne = class {
|
|
|
729
729
|
}
|
|
730
730
|
delete(e, r) {
|
|
731
731
|
const s = this;
|
|
732
|
-
let
|
|
733
|
-
function i(
|
|
734
|
-
if (
|
|
735
|
-
const l = p.findKey(s,
|
|
736
|
-
l && (!r || Ye(s, s[l], l, r)) && (delete s[l],
|
|
732
|
+
let a = !1;
|
|
733
|
+
function i(o) {
|
|
734
|
+
if (o = Se(o), o) {
|
|
735
|
+
const l = p.findKey(s, o);
|
|
736
|
+
l && (!r || Ye(s, s[l], l, r)) && (delete s[l], a = !0);
|
|
737
737
|
}
|
|
738
738
|
}
|
|
739
|
-
return p.isArray(e) ? e.forEach(i) : i(e),
|
|
739
|
+
return p.isArray(e) ? e.forEach(i) : i(e), a;
|
|
740
740
|
}
|
|
741
741
|
clear(e) {
|
|
742
742
|
const r = Object.keys(this);
|
|
743
|
-
let s = r.length,
|
|
743
|
+
let s = r.length, a = !1;
|
|
744
744
|
for (; s--; ) {
|
|
745
745
|
const i = r[s];
|
|
746
|
-
(!e || Ye(this, this[i], i, e, !0)) && (delete this[i],
|
|
746
|
+
(!e || Ye(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 r = this, s = {};
|
|
752
|
-
return p.forEach(this, (
|
|
753
|
-
const
|
|
754
|
-
if (
|
|
755
|
-
r[
|
|
752
|
+
return p.forEach(this, (a, i) => {
|
|
753
|
+
const o = p.findKey(s, i);
|
|
754
|
+
if (o) {
|
|
755
|
+
r[o] = _e(a), delete r[i];
|
|
756
756
|
return;
|
|
757
757
|
}
|
|
758
758
|
const l = e ? bn(i) : String(i).trim();
|
|
759
|
-
l !== i && delete r[i], r[l] = _e(
|
|
759
|
+
l !== i && delete r[i], r[l] = _e(a), s[l] = !0;
|
|
760
760
|
}), this;
|
|
761
761
|
}
|
|
762
762
|
concat(...e) {
|
|
@@ -764,8 +764,8 @@ let ne = class {
|
|
|
764
764
|
}
|
|
765
765
|
toJSON(e) {
|
|
766
766
|
const r = /* @__PURE__ */ Object.create(null);
|
|
767
|
-
return p.forEach(this, (s,
|
|
768
|
-
s != null && s !== !1 && (r[
|
|
767
|
+
return p.forEach(this, (s, a) => {
|
|
768
|
+
s != null && s !== !1 && (r[a] = e && p.isArray(s) ? s.join(", ") : s);
|
|
769
769
|
}), r;
|
|
770
770
|
}
|
|
771
771
|
[Symbol.iterator]() {
|
|
@@ -786,15 +786,15 @@ let ne = class {
|
|
|
786
786
|
}
|
|
787
787
|
static concat(e, ...r) {
|
|
788
788
|
const s = new this(e);
|
|
789
|
-
return r.forEach((
|
|
789
|
+
return r.forEach((a) => s.set(a)), s;
|
|
790
790
|
}
|
|
791
791
|
static accessor(e) {
|
|
792
792
|
const s = (this[bt] = this[bt] = {
|
|
793
793
|
accessors: {}
|
|
794
|
-
}).accessors,
|
|
795
|
-
function i(
|
|
796
|
-
const l = Se(
|
|
797
|
-
s[l] || (wn(
|
|
794
|
+
}).accessors, a = this.prototype;
|
|
795
|
+
function i(o) {
|
|
796
|
+
const l = Se(o);
|
|
797
|
+
s[l] || (wn(a, o), s[l] = !0);
|
|
798
798
|
}
|
|
799
799
|
return p.isArray(e) ? e.forEach(i) : i(e), this;
|
|
800
800
|
}
|
|
@@ -811,11 +811,11 @@ p.reduceDescriptors(ne.prototype, ({ value: t }, e) => {
|
|
|
811
811
|
});
|
|
812
812
|
p.freezeMethods(ne);
|
|
813
813
|
function Ke(t, e) {
|
|
814
|
-
const r = this || Ie, s = e || r,
|
|
814
|
+
const r = this || Ie, s = e || r, a = ne.from(s.headers);
|
|
815
815
|
let i = s.data;
|
|
816
816
|
return p.forEach(t, function(l) {
|
|
817
|
-
i = l.call(r, i,
|
|
818
|
-
}),
|
|
817
|
+
i = l.call(r, i, a.normalize(), e ? e.status : void 0);
|
|
818
|
+
}), a.normalize(), i;
|
|
819
819
|
}
|
|
820
820
|
function Zt(t) {
|
|
821
821
|
return !!(t && t.__CANCEL__);
|
|
@@ -843,44 +843,44 @@ function jn(t) {
|
|
|
843
843
|
function vn(t, e) {
|
|
844
844
|
t = t || 10;
|
|
845
845
|
const r = 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(h) {
|
|
848
|
-
const c = Date.now(),
|
|
849
|
-
|
|
848
|
+
const c = Date.now(), d = s[i];
|
|
849
|
+
o || (o = c), r[a] = h, s[a] = c;
|
|
850
850
|
let b = i, y = 0;
|
|
851
|
-
for (; b !==
|
|
851
|
+
for (; b !== a; )
|
|
852
852
|
y += r[b++], b = b % t;
|
|
853
|
-
if (
|
|
853
|
+
if (a = (a + 1) % t, a === i && (i = (i + 1) % t), c - o < e)
|
|
854
854
|
return;
|
|
855
|
-
const w =
|
|
855
|
+
const w = d && c - d;
|
|
856
856
|
return w ? Math.round(y * 1e3 / w) : void 0;
|
|
857
857
|
};
|
|
858
858
|
}
|
|
859
859
|
function Sn(t, e) {
|
|
860
|
-
let r = 0, s = 1e3 / e,
|
|
861
|
-
const
|
|
862
|
-
r =
|
|
860
|
+
let r = 0, s = 1e3 / e, a, i;
|
|
861
|
+
const o = (c, d = Date.now()) => {
|
|
862
|
+
r = d, a = null, i && (clearTimeout(i), i = null), t(...c);
|
|
863
863
|
};
|
|
864
864
|
return [(...c) => {
|
|
865
|
-
const
|
|
866
|
-
b >= s ?
|
|
867
|
-
i = null, a
|
|
865
|
+
const d = Date.now(), b = d - r;
|
|
866
|
+
b >= s ? o(c, d) : (a = c, i || (i = setTimeout(() => {
|
|
867
|
+
i = null, o(a);
|
|
868
868
|
}, s - b)));
|
|
869
|
-
}, () =>
|
|
869
|
+
}, () => a && o(a)];
|
|
870
870
|
}
|
|
871
871
|
const De = (t, e, r = 3) => {
|
|
872
872
|
let s = 0;
|
|
873
|
-
const
|
|
873
|
+
const a = vn(50, 250);
|
|
874
874
|
return Sn((i) => {
|
|
875
|
-
const
|
|
876
|
-
s =
|
|
875
|
+
const o = i.loaded, l = i.lengthComputable ? i.total : void 0, h = o - s, c = a(h), d = o <= l;
|
|
876
|
+
s = o;
|
|
877
877
|
const b = {
|
|
878
|
-
loaded:
|
|
878
|
+
loaded: o,
|
|
879
879
|
total: l,
|
|
880
|
-
progress: l ?
|
|
880
|
+
progress: l ? o / l : void 0,
|
|
881
881
|
bytes: h,
|
|
882
882
|
rate: c || void 0,
|
|
883
|
-
estimated: c && l &&
|
|
883
|
+
estimated: c && l && d ? (l - o) / c : void 0,
|
|
884
884
|
event: i,
|
|
885
885
|
lengthComputable: l != null,
|
|
886
886
|
[e ? "download" : "upload"]: !0
|
|
@@ -900,9 +900,9 @@ const De = (t, e, r = 3) => {
|
|
|
900
900
|
) : () => !0, En = ee.hasStandardBrowserEnv ? (
|
|
901
901
|
// Standard browser envs support document.cookie
|
|
902
902
|
{
|
|
903
|
-
write(t, e, r, s,
|
|
904
|
-
const
|
|
905
|
-
p.isNumber(r) &&
|
|
903
|
+
write(t, e, r, s, a, i) {
|
|
904
|
+
const o = [t + "=" + encodeURIComponent(e)];
|
|
905
|
+
p.isNumber(r) && o.push("expires=" + new Date(r).toGMTString()), p.isString(s) && o.push("path=" + s), p.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 + ")=([^;]*)"));
|
|
@@ -935,31 +935,31 @@ function er(t, e, r) {
|
|
|
935
935
|
return t && (s || r == !1) ? Tn(t, e) : e;
|
|
936
936
|
}
|
|
937
937
|
const vt = (t) => t instanceof ne ? { ...t } : t;
|
|
938
|
-
function
|
|
938
|
+
function ge(t, e) {
|
|
939
939
|
e = e || {};
|
|
940
940
|
const r = {};
|
|
941
|
-
function s(c,
|
|
942
|
-
return p.isPlainObject(c) && p.isPlainObject(
|
|
941
|
+
function s(c, d, b, y) {
|
|
942
|
+
return p.isPlainObject(c) && p.isPlainObject(d) ? p.merge.call({ caseless: y }, c, d) : p.isPlainObject(d) ? p.merge({}, d) : p.isArray(d) ? d.slice() : d;
|
|
943
943
|
}
|
|
944
|
-
function
|
|
945
|
-
if (p.isUndefined(
|
|
944
|
+
function a(c, d, b, y) {
|
|
945
|
+
if (p.isUndefined(d)) {
|
|
946
946
|
if (!p.isUndefined(c))
|
|
947
947
|
return s(void 0, c, b, y);
|
|
948
|
-
} else return s(c,
|
|
948
|
+
} else return s(c, d, b, y);
|
|
949
949
|
}
|
|
950
|
-
function i(c,
|
|
951
|
-
if (!p.isUndefined(
|
|
952
|
-
return s(void 0,
|
|
950
|
+
function i(c, d) {
|
|
951
|
+
if (!p.isUndefined(d))
|
|
952
|
+
return s(void 0, d);
|
|
953
953
|
}
|
|
954
|
-
function
|
|
955
|
-
if (p.isUndefined(
|
|
954
|
+
function o(c, d) {
|
|
955
|
+
if (p.isUndefined(d)) {
|
|
956
956
|
if (!p.isUndefined(c))
|
|
957
957
|
return s(void 0, c);
|
|
958
|
-
} else return s(void 0,
|
|
958
|
+
} else return s(void 0, d);
|
|
959
959
|
}
|
|
960
|
-
function l(c,
|
|
960
|
+
function l(c, d, b) {
|
|
961
961
|
if (b in e)
|
|
962
|
-
return s(c,
|
|
962
|
+
return s(c, d);
|
|
963
963
|
if (b in t)
|
|
964
964
|
return s(void 0, c);
|
|
965
965
|
}
|
|
@@ -967,70 +967,70 @@ function he(t, e) {
|
|
|
967
967
|
url: i,
|
|
968
968
|
method: i,
|
|
969
969
|
data: i,
|
|
970
|
-
baseURL:
|
|
971
|
-
transformRequest:
|
|
972
|
-
transformResponse:
|
|
973
|
-
paramsSerializer:
|
|
974
|
-
timeout:
|
|
975
|
-
timeoutMessage:
|
|
976
|
-
withCredentials:
|
|
977
|
-
withXSRFToken:
|
|
978
|
-
adapter:
|
|
979
|
-
responseType:
|
|
980
|
-
xsrfCookieName:
|
|
981
|
-
xsrfHeaderName:
|
|
982
|
-
onUploadProgress:
|
|
983
|
-
onDownloadProgress:
|
|
984
|
-
decompress:
|
|
985
|
-
maxContentLength:
|
|
986
|
-
maxBodyLength:
|
|
987
|
-
beforeRedirect:
|
|
988
|
-
transport:
|
|
989
|
-
httpAgent:
|
|
990
|
-
httpsAgent:
|
|
991
|
-
cancelToken:
|
|
992
|
-
socketPath:
|
|
993
|
-
responseEncoding:
|
|
970
|
+
baseURL: o,
|
|
971
|
+
transformRequest: o,
|
|
972
|
+
transformResponse: o,
|
|
973
|
+
paramsSerializer: o,
|
|
974
|
+
timeout: o,
|
|
975
|
+
timeoutMessage: o,
|
|
976
|
+
withCredentials: o,
|
|
977
|
+
withXSRFToken: o,
|
|
978
|
+
adapter: o,
|
|
979
|
+
responseType: o,
|
|
980
|
+
xsrfCookieName: o,
|
|
981
|
+
xsrfHeaderName: o,
|
|
982
|
+
onUploadProgress: o,
|
|
983
|
+
onDownloadProgress: o,
|
|
984
|
+
decompress: o,
|
|
985
|
+
maxContentLength: o,
|
|
986
|
+
maxBodyLength: o,
|
|
987
|
+
beforeRedirect: o,
|
|
988
|
+
transport: o,
|
|
989
|
+
httpAgent: o,
|
|
990
|
+
httpsAgent: o,
|
|
991
|
+
cancelToken: o,
|
|
992
|
+
socketPath: o,
|
|
993
|
+
responseEncoding: o,
|
|
994
994
|
validateStatus: l,
|
|
995
|
-
headers: (c,
|
|
995
|
+
headers: (c, d, b) => a(vt(c), vt(d), b, !0)
|
|
996
996
|
};
|
|
997
|
-
return p.forEach(Object.keys({ ...t, ...e }), function(
|
|
998
|
-
const b = h[
|
|
999
|
-
p.isUndefined(y) && b !== l || (r[
|
|
997
|
+
return p.forEach(Object.keys({ ...t, ...e }), function(d) {
|
|
998
|
+
const b = h[d] || a, y = b(t[d], e[d], d);
|
|
999
|
+
p.isUndefined(y) && b !== l || (r[d] = y);
|
|
1000
1000
|
}), r;
|
|
1001
1001
|
}
|
|
1002
1002
|
const tr = (t) => {
|
|
1003
|
-
const e =
|
|
1004
|
-
let { data: r, withXSRFToken: s, xsrfHeaderName:
|
|
1005
|
-
if (e.headers =
|
|
1003
|
+
const e = ge({}, t);
|
|
1004
|
+
let { data: r, withXSRFToken: s, xsrfHeaderName: a, xsrfCookieName: i, headers: o, auth: l } = e;
|
|
1005
|
+
if (e.headers = o = ne.from(o), e.url = Jt(er(e.baseURL, e.url, e.allowAbsoluteUrls), t.params, t.paramsSerializer), l && o.set(
|
|
1006
1006
|
"Authorization",
|
|
1007
1007
|
"Basic " + btoa((l.username || "") + ":" + (l.password ? unescape(encodeURIComponent(l.password)) : ""))
|
|
1008
1008
|
), p.isFormData(r)) {
|
|
1009
1009
|
if (ee.hasStandardBrowserEnv || ee.hasStandardBrowserWebWorkerEnv)
|
|
1010
|
-
|
|
1010
|
+
o.setContentType(void 0);
|
|
1011
1011
|
else if (p.isFunction(r.getHeaders)) {
|
|
1012
1012
|
const h = r.getHeaders(), c = ["content-type", "content-length"];
|
|
1013
|
-
Object.entries(h).forEach(([
|
|
1014
|
-
c.includes(
|
|
1013
|
+
Object.entries(h).forEach(([d, b]) => {
|
|
1014
|
+
c.includes(d.toLowerCase()) && o.set(d, b);
|
|
1015
1015
|
});
|
|
1016
1016
|
}
|
|
1017
1017
|
}
|
|
1018
1018
|
if (ee.hasStandardBrowserEnv && (s && p.isFunction(s) && (s = s(e)), s || s !== !1 && kn(e.url))) {
|
|
1019
|
-
const h =
|
|
1020
|
-
h &&
|
|
1019
|
+
const h = a && i && En.read(i);
|
|
1020
|
+
h && o.set(a, h);
|
|
1021
1021
|
}
|
|
1022
1022
|
return e;
|
|
1023
1023
|
}, Rn = typeof XMLHttpRequest < "u", In = Rn && function(t) {
|
|
1024
1024
|
return new Promise(function(r, s) {
|
|
1025
|
-
const
|
|
1026
|
-
let i =
|
|
1027
|
-
const
|
|
1028
|
-
let { responseType: l, onUploadProgress: h, onDownloadProgress: c } =
|
|
1025
|
+
const a = tr(t);
|
|
1026
|
+
let i = a.data;
|
|
1027
|
+
const o = ne.from(a.headers).normalize();
|
|
1028
|
+
let { responseType: l, onUploadProgress: h, onDownloadProgress: c } = a, d, b, y, w, u;
|
|
1029
1029
|
function j() {
|
|
1030
|
-
w && w(),
|
|
1030
|
+
w && w(), u && u(), a.cancelToken && a.cancelToken.unsubscribe(d), a.signal && a.signal.removeEventListener("abort", d);
|
|
1031
1031
|
}
|
|
1032
1032
|
let m = new XMLHttpRequest();
|
|
1033
|
-
m.open(
|
|
1033
|
+
m.open(a.method.toUpperCase(), a.url, !0), m.timeout = a.timeout;
|
|
1034
1034
|
function _() {
|
|
1035
1035
|
if (!m)
|
|
1036
1036
|
return;
|
|
@@ -1058,20 +1058,20 @@ const tr = (t) => {
|
|
|
1058
1058
|
const M = C && C.message ? C.message : "Network Error", g = new L(M, L.ERR_NETWORK, t, m);
|
|
1059
1059
|
g.event = C || null, s(g), m = null;
|
|
1060
1060
|
}, m.ontimeout = function() {
|
|
1061
|
-
let C =
|
|
1062
|
-
const M =
|
|
1063
|
-
|
|
1061
|
+
let C = a.timeout ? "timeout of " + a.timeout + "ms exceeded" : "timeout exceeded";
|
|
1062
|
+
const M = a.transitional || Xt;
|
|
1063
|
+
a.timeoutErrorMessage && (C = a.timeoutErrorMessage), s(new L(
|
|
1064
1064
|
C,
|
|
1065
1065
|
M.clarifyTimeoutError ? L.ETIMEDOUT : L.ECONNABORTED,
|
|
1066
1066
|
t,
|
|
1067
1067
|
m
|
|
1068
1068
|
)), m = null;
|
|
1069
|
-
}, i === void 0 &&
|
|
1069
|
+
}, i === void 0 && o.setContentType(null), "setRequestHeader" in m && p.forEach(o.toJSON(), function(C, M) {
|
|
1070
1070
|
m.setRequestHeader(M, C);
|
|
1071
|
-
}), p.isUndefined(
|
|
1071
|
+
}), p.isUndefined(a.withCredentials) || (m.withCredentials = !!a.withCredentials), l && l !== "json" && (m.responseType = a.responseType), c && ([y, u] = De(c, !0), m.addEventListener("progress", y)), h && m.upload && ([b, w] = De(h), m.upload.addEventListener("progress", b), m.upload.addEventListener("loadend", w)), (a.cancelToken || a.signal) && (d = (A) => {
|
|
1072
1072
|
m && (s(!A || A.type ? new je(null, t, m) : A), m.abort(), m = null);
|
|
1073
|
-
},
|
|
1074
|
-
const R = jn(
|
|
1073
|
+
}, a.cancelToken && a.cancelToken.subscribe(d), a.signal && (a.signal.aborted ? d() : a.signal.addEventListener("abort", d)));
|
|
1074
|
+
const R = jn(a.url);
|
|
1075
1075
|
if (R && ee.protocols.indexOf(R) === -1) {
|
|
1076
1076
|
s(new L("Unsupported protocol " + R + ":", L.ERR_BAD_REQUEST, t));
|
|
1077
1077
|
return;
|
|
@@ -1081,19 +1081,19 @@ const tr = (t) => {
|
|
|
1081
1081
|
}, Pn = (t, e) => {
|
|
1082
1082
|
const { length: r } = t = t ? t.filter(Boolean) : [];
|
|
1083
1083
|
if (e || r) {
|
|
1084
|
-
let s = new AbortController(),
|
|
1084
|
+
let s = new AbortController(), a;
|
|
1085
1085
|
const i = function(c) {
|
|
1086
|
-
if (!
|
|
1087
|
-
|
|
1088
|
-
const
|
|
1089
|
-
s.abort(
|
|
1086
|
+
if (!a) {
|
|
1087
|
+
a = !0, l();
|
|
1088
|
+
const d = c instanceof Error ? c : this.reason;
|
|
1089
|
+
s.abort(d instanceof L ? d : new je(d instanceof Error ? d.message : d));
|
|
1090
1090
|
}
|
|
1091
1091
|
};
|
|
1092
|
-
let
|
|
1093
|
-
|
|
1092
|
+
let o = e && setTimeout(() => {
|
|
1093
|
+
o = null, i(new L(`timeout ${e} of ms exceeded`, L.ETIMEDOUT));
|
|
1094
1094
|
}, e);
|
|
1095
1095
|
const l = () => {
|
|
1096
|
-
t && (
|
|
1096
|
+
t && (o && clearTimeout(o), o = null, t.forEach((c) => {
|
|
1097
1097
|
c.unsubscribe ? c.unsubscribe(i) : c.removeEventListener("abort", i);
|
|
1098
1098
|
}), t = null);
|
|
1099
1099
|
};
|
|
@@ -1107,9 +1107,9 @@ const tr = (t) => {
|
|
|
1107
1107
|
yield t;
|
|
1108
1108
|
return;
|
|
1109
1109
|
}
|
|
1110
|
-
let s = 0,
|
|
1110
|
+
let s = 0, a;
|
|
1111
1111
|
for (; s < r; )
|
|
1112
|
-
|
|
1112
|
+
a = s + e, yield t.slice(s, a), s = a;
|
|
1113
1113
|
}, zn = async function* (t, e) {
|
|
1114
1114
|
for await (const r of An(t))
|
|
1115
1115
|
yield* On(r, e);
|
|
@@ -1130,30 +1130,30 @@ const tr = (t) => {
|
|
|
1130
1130
|
await e.cancel();
|
|
1131
1131
|
}
|
|
1132
1132
|
}, St = (t, e, r, s) => {
|
|
1133
|
-
const
|
|
1134
|
-
let i = 0,
|
|
1135
|
-
|
|
1133
|
+
const a = zn(t, e);
|
|
1134
|
+
let i = 0, o, l = (h) => {
|
|
1135
|
+
o || (o = !0, s && s(h));
|
|
1136
1136
|
};
|
|
1137
1137
|
return new ReadableStream({
|
|
1138
1138
|
async pull(h) {
|
|
1139
1139
|
try {
|
|
1140
|
-
const { done: c, value:
|
|
1140
|
+
const { done: c, value: d } = await a.next();
|
|
1141
1141
|
if (c) {
|
|
1142
1142
|
l(), h.close();
|
|
1143
1143
|
return;
|
|
1144
1144
|
}
|
|
1145
|
-
let b =
|
|
1145
|
+
let b = d.byteLength;
|
|
1146
1146
|
if (r) {
|
|
1147
1147
|
let y = i += b;
|
|
1148
1148
|
r(y);
|
|
1149
1149
|
}
|
|
1150
|
-
h.enqueue(new Uint8Array(
|
|
1150
|
+
h.enqueue(new Uint8Array(d));
|
|
1151
1151
|
} catch (c) {
|
|
1152
1152
|
throw l(c), c;
|
|
1153
1153
|
}
|
|
1154
1154
|
},
|
|
1155
1155
|
cancel(h) {
|
|
1156
|
-
return l(h),
|
|
1156
|
+
return l(h), a.return();
|
|
1157
1157
|
}
|
|
1158
1158
|
}, {
|
|
1159
1159
|
highWaterMark: 2
|
|
@@ -1174,49 +1174,49 @@ const tr = (t) => {
|
|
|
1174
1174
|
t = p.merge.call({
|
|
1175
1175
|
skipUndefined: !0
|
|
1176
1176
|
}, _n, t);
|
|
1177
|
-
const { fetch: e, Request: r, Response: s } = t,
|
|
1178
|
-
if (!
|
|
1177
|
+
const { fetch: e, Request: r, Response: s } = t, a = e ? Oe(e) : typeof fetch == "function", i = Oe(r), o = Oe(s);
|
|
1178
|
+
if (!a)
|
|
1179
1179
|
return !1;
|
|
1180
|
-
const l =
|
|
1181
|
-
let
|
|
1180
|
+
const l = a && Oe(Et), h = a && (typeof Ct == "function" ? /* @__PURE__ */ ((u) => (j) => u.encode(j))(new Ct()) : async (u) => new Uint8Array(await new r(u).arrayBuffer())), c = i && l && Tt(() => {
|
|
1181
|
+
let u = !1;
|
|
1182
1182
|
const j = new r(ee.origin, {
|
|
1183
1183
|
body: new Et(),
|
|
1184
1184
|
method: "POST",
|
|
1185
1185
|
get duplex() {
|
|
1186
|
-
return
|
|
1186
|
+
return u = !0, "half";
|
|
1187
1187
|
}
|
|
1188
1188
|
}).headers.has("Content-Type");
|
|
1189
|
-
return
|
|
1190
|
-
}),
|
|
1191
|
-
stream:
|
|
1189
|
+
return u && !j;
|
|
1190
|
+
}), d = o && l && Tt(() => p.isReadableStream(new s("").body)), b = {
|
|
1191
|
+
stream: d && ((u) => u.body)
|
|
1192
1192
|
};
|
|
1193
|
-
|
|
1194
|
-
!b[
|
|
1195
|
-
let _ = j && j[
|
|
1193
|
+
a && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((u) => {
|
|
1194
|
+
!b[u] && (b[u] = (j, m) => {
|
|
1195
|
+
let _ = j && j[u];
|
|
1196
1196
|
if (_)
|
|
1197
1197
|
return _.call(j);
|
|
1198
|
-
throw new L(`Response type '${
|
|
1198
|
+
throw new L(`Response type '${u}' is not supported`, L.ERR_NOT_SUPPORT, m);
|
|
1199
1199
|
});
|
|
1200
1200
|
});
|
|
1201
|
-
const y = async (
|
|
1202
|
-
if (
|
|
1201
|
+
const y = async (u) => {
|
|
1202
|
+
if (u == null)
|
|
1203
1203
|
return 0;
|
|
1204
|
-
if (p.isBlob(
|
|
1205
|
-
return
|
|
1206
|
-
if (p.isSpecCompliantForm(
|
|
1204
|
+
if (p.isBlob(u))
|
|
1205
|
+
return u.size;
|
|
1206
|
+
if (p.isSpecCompliantForm(u))
|
|
1207
1207
|
return (await new r(ee.origin, {
|
|
1208
1208
|
method: "POST",
|
|
1209
|
-
body:
|
|
1209
|
+
body: u
|
|
1210
1210
|
}).arrayBuffer()).byteLength;
|
|
1211
|
-
if (p.isArrayBufferView(
|
|
1212
|
-
return
|
|
1213
|
-
if (p.isURLSearchParams(
|
|
1214
|
-
return (await h(
|
|
1215
|
-
}, w = async (
|
|
1216
|
-
const m = p.toFiniteNumber(
|
|
1211
|
+
if (p.isArrayBufferView(u) || p.isArrayBuffer(u))
|
|
1212
|
+
return u.byteLength;
|
|
1213
|
+
if (p.isURLSearchParams(u) && (u = u + ""), p.isString(u))
|
|
1214
|
+
return (await h(u)).byteLength;
|
|
1215
|
+
}, w = async (u, j) => {
|
|
1216
|
+
const m = p.toFiniteNumber(u.getContentLength());
|
|
1217
1217
|
return m ?? y(j);
|
|
1218
1218
|
};
|
|
1219
|
-
return async (
|
|
1219
|
+
return async (u) => {
|
|
1220
1220
|
let {
|
|
1221
1221
|
url: j,
|
|
1222
1222
|
method: m,
|
|
@@ -1230,7 +1230,7 @@ const tr = (t) => {
|
|
|
1230
1230
|
headers: v,
|
|
1231
1231
|
withCredentials: U = "same-origin",
|
|
1232
1232
|
fetchOptions: q
|
|
1233
|
-
} = tr(
|
|
1233
|
+
} = tr(u), F = e || fetch;
|
|
1234
1234
|
I = I ? (I + "").toLowerCase() : "text";
|
|
1235
1235
|
let V = Pn([R, A && A.toAbortSignal()], C), Z = null;
|
|
1236
1236
|
const T = V && V.unsubscribe && (() => {
|
|
@@ -1264,8 +1264,8 @@ const tr = (t) => {
|
|
|
1264
1264
|
};
|
|
1265
1265
|
Z = i && new r(j, P);
|
|
1266
1266
|
let K = await (i ? F(Z, q) : F(j, P));
|
|
1267
|
-
const Q =
|
|
1268
|
-
if (
|
|
1267
|
+
const Q = d && (I === "stream" || I === "response");
|
|
1268
|
+
if (d && (M || Q && T)) {
|
|
1269
1269
|
const f = {};
|
|
1270
1270
|
["status", "statusText", "headers"].forEach(($) => {
|
|
1271
1271
|
f[$] = K[$];
|
|
@@ -1282,36 +1282,36 @@ const tr = (t) => {
|
|
|
1282
1282
|
);
|
|
1283
1283
|
}
|
|
1284
1284
|
I = I || "text";
|
|
1285
|
-
let X = await b[p.findKey(b, I) || "text"](K,
|
|
1285
|
+
let X = await b[p.findKey(b, I) || "text"](K, u);
|
|
1286
1286
|
return !Q && T && T(), await new Promise((f, S) => {
|
|
1287
1287
|
Qt(f, S, {
|
|
1288
1288
|
data: X,
|
|
1289
1289
|
headers: ne.from(K.headers),
|
|
1290
1290
|
status: K.status,
|
|
1291
1291
|
statusText: K.statusText,
|
|
1292
|
-
config:
|
|
1292
|
+
config: u,
|
|
1293
1293
|
request: Z
|
|
1294
1294
|
});
|
|
1295
1295
|
});
|
|
1296
1296
|
} catch (z) {
|
|
1297
1297
|
throw T && T(), z && z.name === "TypeError" && /Load failed|fetch/i.test(z.message) ? Object.assign(
|
|
1298
|
-
new L("Network Error", L.ERR_NETWORK,
|
|
1298
|
+
new L("Network Error", L.ERR_NETWORK, u, Z),
|
|
1299
1299
|
{
|
|
1300
1300
|
cause: z.cause || z
|
|
1301
1301
|
}
|
|
1302
|
-
) : L.from(z, z && z.code,
|
|
1302
|
+
) : L.from(z, z && z.code, u, Z);
|
|
1303
1303
|
}
|
|
1304
1304
|
};
|
|
1305
1305
|
}, Nn = /* @__PURE__ */ new Map(), rr = (t) => {
|
|
1306
1306
|
let e = t ? t.env : {};
|
|
1307
|
-
const { fetch: r, Request: s, Response:
|
|
1307
|
+
const { fetch: r, Request: s, Response: a } = e, i = [
|
|
1308
1308
|
s,
|
|
1309
|
-
|
|
1309
|
+
a,
|
|
1310
1310
|
r
|
|
1311
1311
|
];
|
|
1312
|
-
let
|
|
1312
|
+
let o = i.length, l = o, h, c, d = Nn;
|
|
1313
1313
|
for (; l--; )
|
|
1314
|
-
h = i[l], c =
|
|
1314
|
+
h = i[l], c = d.get(h), c === void 0 && d.set(h, c = l ? /* @__PURE__ */ new Map() : $n(e)), d = c;
|
|
1315
1315
|
return c;
|
|
1316
1316
|
};
|
|
1317
1317
|
rr();
|
|
@@ -1335,30 +1335,30 @@ const Rt = (t) => `- ${t}`, Un = (t) => p.isFunction(t) || t === null || t === !
|
|
|
1335
1335
|
getAdapter: (t, e) => {
|
|
1336
1336
|
t = p.isArray(t) ? t : [t];
|
|
1337
1337
|
const { length: r } = t;
|
|
1338
|
-
let s,
|
|
1338
|
+
let s, a;
|
|
1339
1339
|
const i = {};
|
|
1340
|
-
for (let
|
|
1341
|
-
s = t[
|
|
1340
|
+
for (let o = 0; o < r; o++) {
|
|
1341
|
+
s = t[o];
|
|
1342
1342
|
let l;
|
|
1343
|
-
if (
|
|
1343
|
+
if (a = s, !Un(s) && (a = tt[(l = String(s)).toLowerCase()], a === void 0))
|
|
1344
1344
|
throw new L(`Unknown adapter '${l}'`);
|
|
1345
|
-
if (
|
|
1345
|
+
if (a && (p.isFunction(a) || (a = a.get(e))))
|
|
1346
1346
|
break;
|
|
1347
|
-
i[l || "#" +
|
|
1347
|
+
i[l || "#" + o] = a;
|
|
1348
1348
|
}
|
|
1349
|
-
if (!
|
|
1350
|
-
const
|
|
1349
|
+
if (!a) {
|
|
1350
|
+
const o = Object.entries(i).map(
|
|
1351
1351
|
([h, c]) => `adapter ${h} ` + (c === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1352
1352
|
);
|
|
1353
|
-
let l = r ?
|
|
1354
|
-
` +
|
|
1355
|
-
`) : " " + Rt(
|
|
1353
|
+
let l = r ? o.length > 1 ? `since :
|
|
1354
|
+
` + o.map(Rt).join(`
|
|
1355
|
+
`) : " " + Rt(o[0]) : "as no adapter specified";
|
|
1356
1356
|
throw new L(
|
|
1357
1357
|
"There is no suitable adapter to dispatch the request " + l,
|
|
1358
1358
|
"ERR_NOT_SUPPORT"
|
|
1359
1359
|
);
|
|
1360
1360
|
}
|
|
1361
|
-
return
|
|
1361
|
+
return a;
|
|
1362
1362
|
},
|
|
1363
1363
|
adapters: tt
|
|
1364
1364
|
};
|
|
@@ -1392,21 +1392,21 @@ const sr = "1.12.2", Be = {};
|
|
|
1392
1392
|
});
|
|
1393
1393
|
const Pt = {};
|
|
1394
1394
|
Be.transitional = function(e, r, s) {
|
|
1395
|
-
function
|
|
1396
|
-
return "[Axios v" + sr + "] Transitional option '" + i + "'" +
|
|
1395
|
+
function a(i, o) {
|
|
1396
|
+
return "[Axios v" + sr + "] Transitional option '" + i + "'" + o + (s ? ". " + s : "");
|
|
1397
1397
|
}
|
|
1398
|
-
return (i,
|
|
1398
|
+
return (i, o, l) => {
|
|
1399
1399
|
if (e === !1)
|
|
1400
1400
|
throw new L(
|
|
1401
|
-
o
|
|
1401
|
+
a(o, " has been removed" + (r ? " in " + r : "")),
|
|
1402
1402
|
L.ERR_DEPRECATED
|
|
1403
1403
|
);
|
|
1404
|
-
return r && !Pt[
|
|
1405
|
-
|
|
1406
|
-
|
|
1404
|
+
return r && !Pt[o] && (Pt[o] = !0, console.warn(
|
|
1405
|
+
a(
|
|
1406
|
+
o,
|
|
1407
1407
|
" has been deprecated since v" + r + " and will be removed in the near future"
|
|
1408
1408
|
)
|
|
1409
|
-
)), e ? e(i,
|
|
1409
|
+
)), e ? e(i, o, l) : !0;
|
|
1410
1410
|
};
|
|
1411
1411
|
};
|
|
1412
1412
|
Be.spelling = function(e) {
|
|
@@ -1416,11 +1416,11 @@ function Dn(t, e, r) {
|
|
|
1416
1416
|
if (typeof t != "object")
|
|
1417
1417
|
throw new L("options must be an object", L.ERR_BAD_OPTION_VALUE);
|
|
1418
1418
|
const s = Object.keys(t);
|
|
1419
|
-
let
|
|
1420
|
-
for (;
|
|
1421
|
-
const i = s[
|
|
1422
|
-
if (
|
|
1423
|
-
const l = t[i], h = l === void 0 ||
|
|
1419
|
+
let a = s.length;
|
|
1420
|
+
for (; a-- > 0; ) {
|
|
1421
|
+
const i = s[a], o = e[i];
|
|
1422
|
+
if (o) {
|
|
1423
|
+
const l = t[i], h = l === void 0 || o(l, i, t);
|
|
1424
1424
|
if (h !== !0)
|
|
1425
1425
|
throw new L("option " + i + " must be " + h, L.ERR_BAD_OPTION_VALUE);
|
|
1426
1426
|
continue;
|
|
@@ -1433,7 +1433,7 @@ const $e = {
|
|
|
1433
1433
|
assertOptions: Dn,
|
|
1434
1434
|
validators: Be
|
|
1435
1435
|
}, ie = $e.validators;
|
|
1436
|
-
let
|
|
1436
|
+
let he = class {
|
|
1437
1437
|
constructor(e) {
|
|
1438
1438
|
this.defaults = e || {}, this.interceptors = {
|
|
1439
1439
|
request: new yt(),
|
|
@@ -1453,9 +1453,9 @@ let xe = class {
|
|
|
1453
1453
|
return await this._request(e, r);
|
|
1454
1454
|
} catch (s) {
|
|
1455
1455
|
if (s instanceof Error) {
|
|
1456
|
-
let
|
|
1457
|
-
Error.captureStackTrace ? Error.captureStackTrace(
|
|
1458
|
-
const i =
|
|
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
1460
|
s.stack ? i && !String(s.stack).endsWith(i.replace(/^.+\n.+\n/, "")) && (s.stack += `
|
|
1461
1461
|
` + i) : s.stack = i;
|
|
@@ -1466,31 +1466,31 @@ let xe = class {
|
|
|
1466
1466
|
}
|
|
1467
1467
|
}
|
|
1468
1468
|
_request(e, r) {
|
|
1469
|
-
typeof e == "string" ? (r = r || {}, r.url = e) : r = e || {}, r =
|
|
1470
|
-
const { transitional: s, paramsSerializer:
|
|
1469
|
+
typeof e == "string" ? (r = r || {}, r.url = e) : r = e || {}, r = ge(this.defaults, r);
|
|
1470
|
+
const { transitional: s, paramsSerializer: a, headers: i } = r;
|
|
1471
1471
|
s !== void 0 && $e.assertOptions(s, {
|
|
1472
1472
|
silentJSONParsing: ie.transitional(ie.boolean),
|
|
1473
1473
|
forcedJSONParsing: ie.transitional(ie.boolean),
|
|
1474
1474
|
clarifyTimeoutError: ie.transitional(ie.boolean)
|
|
1475
|
-
}, !1),
|
|
1476
|
-
serialize:
|
|
1477
|
-
} : $e.assertOptions(
|
|
1475
|
+
}, !1), a != null && (p.isFunction(a) ? r.paramsSerializer = {
|
|
1476
|
+
serialize: a
|
|
1477
|
+
} : $e.assertOptions(a, {
|
|
1478
1478
|
encode: ie.function,
|
|
1479
1479
|
serialize: ie.function
|
|
1480
1480
|
}, !0)), r.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? r.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : r.allowAbsoluteUrls = !0), $e.assertOptions(r, {
|
|
1481
1481
|
baseUrl: ie.spelling("baseURL"),
|
|
1482
1482
|
withXsrfToken: ie.spelling("withXSRFToken")
|
|
1483
1483
|
}, !0), r.method = (r.method || this.defaults.method || "get").toLowerCase();
|
|
1484
|
-
let
|
|
1484
|
+
let o = i && p.merge(
|
|
1485
1485
|
i.common,
|
|
1486
1486
|
i[r.method]
|
|
1487
1487
|
);
|
|
1488
1488
|
i && p.forEach(
|
|
1489
1489
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1490
|
-
(
|
|
1491
|
-
delete i[
|
|
1490
|
+
(u) => {
|
|
1491
|
+
delete i[u];
|
|
1492
1492
|
}
|
|
1493
|
-
), r.headers = ne.concat(
|
|
1493
|
+
), r.headers = ne.concat(o, i);
|
|
1494
1494
|
const l = [];
|
|
1495
1495
|
let h = !0;
|
|
1496
1496
|
this.interceptors.request.forEach(function(j) {
|
|
@@ -1500,42 +1500,42 @@ let xe = class {
|
|
|
1500
1500
|
this.interceptors.response.forEach(function(j) {
|
|
1501
1501
|
c.push(j.fulfilled, j.rejected);
|
|
1502
1502
|
});
|
|
1503
|
-
let
|
|
1503
|
+
let d, b = 0, y;
|
|
1504
1504
|
if (!h) {
|
|
1505
|
-
const
|
|
1506
|
-
for (
|
|
1507
|
-
|
|
1508
|
-
return
|
|
1505
|
+
const u = [It.bind(this), void 0];
|
|
1506
|
+
for (u.unshift(...l), u.push(...c), y = u.length, d = Promise.resolve(r); b < y; )
|
|
1507
|
+
d = d.then(u[b++], u[b++]);
|
|
1508
|
+
return d;
|
|
1509
1509
|
}
|
|
1510
1510
|
y = l.length;
|
|
1511
1511
|
let w = r;
|
|
1512
1512
|
for (; b < y; ) {
|
|
1513
|
-
const
|
|
1513
|
+
const u = l[b++], j = l[b++];
|
|
1514
1514
|
try {
|
|
1515
|
-
w =
|
|
1515
|
+
w = u(w);
|
|
1516
1516
|
} catch (m) {
|
|
1517
1517
|
j.call(this, m);
|
|
1518
1518
|
break;
|
|
1519
1519
|
}
|
|
1520
1520
|
}
|
|
1521
1521
|
try {
|
|
1522
|
-
|
|
1523
|
-
} catch (
|
|
1524
|
-
return Promise.reject(
|
|
1522
|
+
d = It.call(this, w);
|
|
1523
|
+
} catch (u) {
|
|
1524
|
+
return Promise.reject(u);
|
|
1525
1525
|
}
|
|
1526
1526
|
for (b = 0, y = c.length; b < y; )
|
|
1527
|
-
|
|
1528
|
-
return
|
|
1527
|
+
d = d.then(c[b++], c[b++]);
|
|
1528
|
+
return d;
|
|
1529
1529
|
}
|
|
1530
1530
|
getUri(e) {
|
|
1531
|
-
e =
|
|
1531
|
+
e = ge(this.defaults, e);
|
|
1532
1532
|
const r = er(e.baseURL, e.url, e.allowAbsoluteUrls);
|
|
1533
1533
|
return Jt(r, e.params, e.paramsSerializer);
|
|
1534
1534
|
}
|
|
1535
1535
|
};
|
|
1536
1536
|
p.forEach(["delete", "get", "head", "options"], function(e) {
|
|
1537
|
-
|
|
1538
|
-
return this.request(
|
|
1537
|
+
he.prototype[e] = function(r, s) {
|
|
1538
|
+
return this.request(ge(s || {}, {
|
|
1539
1539
|
method: e,
|
|
1540
1540
|
url: r,
|
|
1541
1541
|
data: (s || {}).data
|
|
@@ -1544,20 +1544,20 @@ p.forEach(["delete", "get", "head", "options"], function(e) {
|
|
|
1544
1544
|
});
|
|
1545
1545
|
p.forEach(["post", "put", "patch"], function(e) {
|
|
1546
1546
|
function r(s) {
|
|
1547
|
-
return function(i,
|
|
1548
|
-
return this.request(
|
|
1547
|
+
return function(i, o, l) {
|
|
1548
|
+
return this.request(ge(l || {}, {
|
|
1549
1549
|
method: e,
|
|
1550
1550
|
headers: s ? {
|
|
1551
1551
|
"Content-Type": "multipart/form-data"
|
|
1552
1552
|
} : {},
|
|
1553
1553
|
url: i,
|
|
1554
|
-
data:
|
|
1554
|
+
data: o
|
|
1555
1555
|
}));
|
|
1556
1556
|
};
|
|
1557
1557
|
}
|
|
1558
|
-
|
|
1558
|
+
he.prototype[e] = r(), he.prototype[e + "Form"] = r(!0);
|
|
1559
1559
|
});
|
|
1560
|
-
let Ln = class
|
|
1560
|
+
let Ln = class ar {
|
|
1561
1561
|
constructor(e) {
|
|
1562
1562
|
if (typeof e != "function")
|
|
1563
1563
|
throw new TypeError("executor must be a function.");
|
|
@@ -1566,22 +1566,22 @@ let Ln = class or {
|
|
|
1566
1566
|
r = i;
|
|
1567
1567
|
});
|
|
1568
1568
|
const s = this;
|
|
1569
|
-
this.promise.then((
|
|
1569
|
+
this.promise.then((a) => {
|
|
1570
1570
|
if (!s._listeners) return;
|
|
1571
1571
|
let i = s._listeners.length;
|
|
1572
1572
|
for (; i-- > 0; )
|
|
1573
|
-
s._listeners[i](
|
|
1573
|
+
s._listeners[i](a);
|
|
1574
1574
|
s._listeners = null;
|
|
1575
|
-
}), this.promise.then = (
|
|
1575
|
+
}), this.promise.then = (a) => {
|
|
1576
1576
|
let i;
|
|
1577
|
-
const
|
|
1577
|
+
const o = new Promise((l) => {
|
|
1578
1578
|
s.subscribe(l), i = l;
|
|
1579
|
-
}).then(
|
|
1580
|
-
return
|
|
1579
|
+
}).then(a);
|
|
1580
|
+
return o.cancel = function() {
|
|
1581
1581
|
s.unsubscribe(i);
|
|
1582
|
-
},
|
|
1583
|
-
}, e(function(i,
|
|
1584
|
-
s.reason || (s.reason = new je(i,
|
|
1582
|
+
}, o;
|
|
1583
|
+
}, e(function(i, o, l) {
|
|
1584
|
+
s.reason || (s.reason = new je(i, o, l), r(s.reason));
|
|
1585
1585
|
});
|
|
1586
1586
|
}
|
|
1587
1587
|
/**
|
|
@@ -1623,8 +1623,8 @@ let Ln = class or {
|
|
|
1623
1623
|
static source() {
|
|
1624
1624
|
let e;
|
|
1625
1625
|
return {
|
|
1626
|
-
token: new
|
|
1627
|
-
e =
|
|
1626
|
+
token: new ar(function(a) {
|
|
1627
|
+
e = a;
|
|
1628
1628
|
}),
|
|
1629
1629
|
cancel: e
|
|
1630
1630
|
};
|
|
@@ -1706,14 +1706,14 @@ const rt = {
|
|
|
1706
1706
|
Object.entries(rt).forEach(([t, e]) => {
|
|
1707
1707
|
rt[e] = t;
|
|
1708
1708
|
});
|
|
1709
|
-
function
|
|
1710
|
-
const e = new
|
|
1711
|
-
return p.extend(r,
|
|
1712
|
-
return
|
|
1709
|
+
function or(t) {
|
|
1710
|
+
const e = new he(t), r = Ut(he.prototype.request, e);
|
|
1711
|
+
return p.extend(r, he.prototype, e, { allOwnKeys: !0 }), p.extend(r, e, null, { allOwnKeys: !0 }), r.create = function(a) {
|
|
1712
|
+
return or(ge(t, a));
|
|
1713
1713
|
}, r;
|
|
1714
1714
|
}
|
|
1715
|
-
const W =
|
|
1716
|
-
W.Axios =
|
|
1715
|
+
const W = or(Ie);
|
|
1716
|
+
W.Axios = he;
|
|
1717
1717
|
W.CanceledError = je;
|
|
1718
1718
|
W.CancelToken = Ln;
|
|
1719
1719
|
W.isCancel = Zt;
|
|
@@ -1726,7 +1726,7 @@ W.all = function(e) {
|
|
|
1726
1726
|
};
|
|
1727
1727
|
W.spread = Fn;
|
|
1728
1728
|
W.isAxiosError = Mn;
|
|
1729
|
-
W.mergeConfig =
|
|
1729
|
+
W.mergeConfig = ge;
|
|
1730
1730
|
W.AxiosHeaders = ne;
|
|
1731
1731
|
W.formToJSON = (t) => Gt(p.isHTMLForm(t) ? new FormData(t) : t);
|
|
1732
1732
|
W.getAdapter = nr.getAdapter;
|
|
@@ -1739,18 +1739,18 @@ const {
|
|
|
1739
1739
|
isCancel: Gs,
|
|
1740
1740
|
CancelToken: Zs,
|
|
1741
1741
|
VERSION: Qs,
|
|
1742
|
-
all:
|
|
1743
|
-
Cancel:
|
|
1744
|
-
isAxiosError:
|
|
1745
|
-
spread:
|
|
1746
|
-
toFormData:
|
|
1747
|
-
AxiosHeaders:
|
|
1748
|
-
HttpStatusCode:
|
|
1749
|
-
formToJSON:
|
|
1750
|
-
getAdapter:
|
|
1751
|
-
mergeConfig:
|
|
1742
|
+
all: ea,
|
|
1743
|
+
Cancel: ta,
|
|
1744
|
+
isAxiosError: ra,
|
|
1745
|
+
spread: na,
|
|
1746
|
+
toFormData: sa,
|
|
1747
|
+
AxiosHeaders: aa,
|
|
1748
|
+
HttpStatusCode: oa,
|
|
1749
|
+
formToJSON: ia,
|
|
1750
|
+
getAdapter: la,
|
|
1751
|
+
mergeConfig: ca
|
|
1752
1752
|
} = W;
|
|
1753
|
-
class
|
|
1753
|
+
class da {
|
|
1754
1754
|
baseUrl;
|
|
1755
1755
|
apiKey;
|
|
1756
1756
|
appId;
|
|
@@ -1779,7 +1779,7 @@ class uo {
|
|
|
1779
1779
|
* @param data Optional request body
|
|
1780
1780
|
* @param extraHeaders Optional custom headers
|
|
1781
1781
|
*/
|
|
1782
|
-
async request(e, r, s,
|
|
1782
|
+
async request(e, r, s, a = {}) {
|
|
1783
1783
|
if (!e) throw new Error("HTTP method is required");
|
|
1784
1784
|
if (!r) throw new Error("Request path is required");
|
|
1785
1785
|
try {
|
|
@@ -1791,12 +1791,12 @@ class uo {
|
|
|
1791
1791
|
url: r,
|
|
1792
1792
|
method: e,
|
|
1793
1793
|
data: i,
|
|
1794
|
-
headers:
|
|
1794
|
+
headers: a
|
|
1795
1795
|
})).data;
|
|
1796
1796
|
} catch (i) {
|
|
1797
1797
|
if (console.error("❌ [Request Error]:", i), i.isAxiosError) {
|
|
1798
|
-
const
|
|
1799
|
-
throw new Error(`Request failed (${
|
|
1798
|
+
const o = i.response?.status || 0, l = i.response?.data?.message || i.message || "Unknown Axios error occurred";
|
|
1799
|
+
throw new Error(`Request failed (${o}): ${l}`);
|
|
1800
1800
|
}
|
|
1801
1801
|
throw new Error(`Unexpected error: ${i.message || "Unknown failure"}`);
|
|
1802
1802
|
}
|
|
@@ -1807,8 +1807,8 @@ class uo {
|
|
|
1807
1807
|
* @param params user details
|
|
1808
1808
|
*/
|
|
1809
1809
|
async signup(e) {
|
|
1810
|
-
const { name: r, email: s, password:
|
|
1811
|
-
if (!r || !s || !
|
|
1810
|
+
const { name: r, email: s, password: a } = e;
|
|
1811
|
+
if (!r || !s || !a)
|
|
1812
1812
|
throw new Error("signup: 'name', 'email', and 'password' are required");
|
|
1813
1813
|
return this.request("POST", "/users/signup", e);
|
|
1814
1814
|
}
|
|
@@ -1817,13 +1817,13 @@ class uo {
|
|
|
1817
1817
|
* @param params login details
|
|
1818
1818
|
*/
|
|
1819
1819
|
async login(e) {
|
|
1820
|
-
const { email: r, password: s, appId:
|
|
1820
|
+
const { email: r, password: s, appId: a } = e;
|
|
1821
1821
|
if (!r || !s)
|
|
1822
1822
|
throw new Error("login: 'email' and 'password' are required");
|
|
1823
1823
|
return this.request("POST", "/users/login", {
|
|
1824
1824
|
email: r,
|
|
1825
1825
|
password: s,
|
|
1826
|
-
appId:
|
|
1826
|
+
appId: a || this.appId
|
|
1827
1827
|
});
|
|
1828
1828
|
}
|
|
1829
1829
|
/**
|
|
@@ -1843,15 +1843,15 @@ class uo {
|
|
|
1843
1843
|
* @param params requires userId, currentPassword, newPassword
|
|
1844
1844
|
*/
|
|
1845
1845
|
async changePassword(e) {
|
|
1846
|
-
const { userId: r, currentPassword: s, newPassword:
|
|
1846
|
+
const { userId: r, currentPassword: s, newPassword: a, appId: i } = e;
|
|
1847
1847
|
if (!r) throw new Error("changePassword: 'userId' is required");
|
|
1848
|
-
if (!s || !
|
|
1848
|
+
if (!s || !a)
|
|
1849
1849
|
throw new Error(
|
|
1850
1850
|
"changePassword: both 'currentPassword' and 'newPassword' are required"
|
|
1851
1851
|
);
|
|
1852
1852
|
return this.request("PUT", `/users/change-password/${r}`, {
|
|
1853
1853
|
currentPassword: s,
|
|
1854
|
-
newPassword:
|
|
1854
|
+
newPassword: a,
|
|
1855
1855
|
appId: i || this.appId
|
|
1856
1856
|
});
|
|
1857
1857
|
}
|
|
@@ -1900,13 +1900,13 @@ class uo {
|
|
|
1900
1900
|
* @param params requires token + otp
|
|
1901
1901
|
*/
|
|
1902
1902
|
async verifyEmail(e) {
|
|
1903
|
-
const { token: r, otp: s, appId:
|
|
1903
|
+
const { token: r, otp: s, appId: a } = e;
|
|
1904
1904
|
if (!r) throw new Error("verifyEmail: 'token' is required");
|
|
1905
1905
|
if (!s) throw new Error("verifyEmail: 'otp' is required");
|
|
1906
1906
|
return this.request(
|
|
1907
1907
|
"POST",
|
|
1908
1908
|
"/users/verify-email",
|
|
1909
|
-
{ otp: s, appId:
|
|
1909
|
+
{ otp: s, appId: a || this.appId },
|
|
1910
1910
|
{ Authorization: `Bearer ${r}` }
|
|
1911
1911
|
);
|
|
1912
1912
|
}
|
|
@@ -1927,15 +1927,15 @@ class uo {
|
|
|
1927
1927
|
* @param params requires email, otp, newPassword
|
|
1928
1928
|
*/
|
|
1929
1929
|
async resetPassword(e) {
|
|
1930
|
-
const { email: r, otp: s, newPassword:
|
|
1931
|
-
if (!r || !s || !
|
|
1930
|
+
const { email: r, otp: s, newPassword: a, appId: i } = e;
|
|
1931
|
+
if (!r || !s || !a)
|
|
1932
1932
|
throw new Error(
|
|
1933
1933
|
"resetPassword: 'email', 'otp' and 'newPassword' are required"
|
|
1934
1934
|
);
|
|
1935
1935
|
return this.request("POST", "/users/reset-password", {
|
|
1936
1936
|
email: r,
|
|
1937
1937
|
otp: s,
|
|
1938
|
-
newPassword:
|
|
1938
|
+
newPassword: a,
|
|
1939
1939
|
appId: i || this.appId
|
|
1940
1940
|
});
|
|
1941
1941
|
}
|
|
@@ -1948,8 +1948,8 @@ class uo {
|
|
|
1948
1948
|
async searchUserData(e) {
|
|
1949
1949
|
const { userId: r, ...s } = e;
|
|
1950
1950
|
if (!r) throw new Error("userId required");
|
|
1951
|
-
const
|
|
1952
|
-
return this.request("GET", `/users/${r}/data/search?${
|
|
1951
|
+
const a = new URLSearchParams(s).toString();
|
|
1952
|
+
return this.request("GET", `/users/${r}/data/search?${a}`);
|
|
1953
1953
|
}
|
|
1954
1954
|
/**
|
|
1955
1955
|
* Fetch ALL users' merged data for a specific app
|
|
@@ -1984,14 +1984,14 @@ class uo {
|
|
|
1984
1984
|
* @param params requires userId and data object
|
|
1985
1985
|
*/
|
|
1986
1986
|
async addUserData(e) {
|
|
1987
|
-
const { userId: r, dataCategory: s, data:
|
|
1987
|
+
const { userId: r, dataCategory: s, data: a } = e;
|
|
1988
1988
|
if (!r) throw new Error("addUserData: 'userId' is required");
|
|
1989
1989
|
if (!s)
|
|
1990
1990
|
throw new Error("addUserData: 'dataCategory' is required");
|
|
1991
|
-
if (!
|
|
1991
|
+
if (!a) throw new Error("addUserData: 'data' is required");
|
|
1992
1992
|
return this.request("POST", `/users/${r}/data`, {
|
|
1993
1993
|
dataCategory: s,
|
|
1994
|
-
...
|
|
1994
|
+
...a
|
|
1995
1995
|
});
|
|
1996
1996
|
}
|
|
1997
1997
|
/**
|
|
@@ -1999,11 +1999,11 @@ class uo {
|
|
|
1999
1999
|
* @param params requires userId, dataId, and updated fields
|
|
2000
2000
|
*/
|
|
2001
2001
|
async updateUserData(e) {
|
|
2002
|
-
const { userId: r, dataId: s, data:
|
|
2002
|
+
const { userId: r, dataId: s, data: a } = e;
|
|
2003
2003
|
if (!r || !s)
|
|
2004
2004
|
throw new Error("updateUserData: 'userId' and 'dataId' are required");
|
|
2005
|
-
if (!
|
|
2006
|
-
return this.request("PUT", `/users/${r}/data/${s}`,
|
|
2005
|
+
if (!a) throw new Error("updateUserData: 'data' is required");
|
|
2006
|
+
return this.request("PUT", `/users/${r}/data/${s}`, a);
|
|
2007
2007
|
}
|
|
2008
2008
|
/**
|
|
2009
2009
|
* Delete a data object by its id
|
|
@@ -2031,18 +2031,18 @@ function Wn() {
|
|
|
2031
2031
|
if (Ot) return ke;
|
|
2032
2032
|
Ot = 1;
|
|
2033
2033
|
var t = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
|
|
2034
|
-
function r(s,
|
|
2035
|
-
var
|
|
2036
|
-
if (i !== void 0 && (
|
|
2034
|
+
function r(s, a, i) {
|
|
2035
|
+
var o = null;
|
|
2036
|
+
if (i !== void 0 && (o = "" + i), a.key !== void 0 && (o = "" + a.key), "key" in a) {
|
|
2037
2037
|
i = {};
|
|
2038
|
-
for (var l in
|
|
2039
|
-
l !== "key" && (i[l] =
|
|
2040
|
-
} else i =
|
|
2041
|
-
return
|
|
2038
|
+
for (var l in a)
|
|
2039
|
+
l !== "key" && (i[l] = a[l]);
|
|
2040
|
+
} else i = a;
|
|
2041
|
+
return a = i.ref, {
|
|
2042
2042
|
$$typeof: t,
|
|
2043
2043
|
type: s,
|
|
2044
|
-
key:
|
|
2045
|
-
ref:
|
|
2044
|
+
key: o,
|
|
2045
|
+
ref: a !== void 0 ? a : null,
|
|
2046
2046
|
props: i
|
|
2047
2047
|
};
|
|
2048
2048
|
}
|
|
@@ -2135,14 +2135,14 @@ function qn() {
|
|
|
2135
2135
|
return "<...>";
|
|
2136
2136
|
}
|
|
2137
2137
|
}
|
|
2138
|
-
function
|
|
2138
|
+
function a() {
|
|
2139
2139
|
var f = V.A;
|
|
2140
2140
|
return f === null ? null : f.getOwner();
|
|
2141
2141
|
}
|
|
2142
2142
|
function i() {
|
|
2143
2143
|
return Error("react-stack-top-frame");
|
|
2144
2144
|
}
|
|
2145
|
-
function
|
|
2145
|
+
function o(f) {
|
|
2146
2146
|
if (Z.call(f, "key")) {
|
|
2147
2147
|
var S = Object.getOwnPropertyDescriptor(f, "key").get;
|
|
2148
2148
|
if (S && S.isReactWarning) return !1;
|
|
@@ -2170,7 +2170,7 @@ function qn() {
|
|
|
2170
2170
|
function c(f, S, x, k, $, N) {
|
|
2171
2171
|
var Y = x.ref;
|
|
2172
2172
|
return f = {
|
|
2173
|
-
$$typeof:
|
|
2173
|
+
$$typeof: u,
|
|
2174
2174
|
type: f,
|
|
2175
2175
|
key: S,
|
|
2176
2176
|
props: x,
|
|
@@ -2200,7 +2200,7 @@ function qn() {
|
|
|
2200
2200
|
value: N
|
|
2201
2201
|
}), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
|
|
2202
2202
|
}
|
|
2203
|
-
function
|
|
2203
|
+
function d(f, S, x, k, $, N) {
|
|
2204
2204
|
var Y = S.children;
|
|
2205
2205
|
if (Y !== void 0)
|
|
2206
2206
|
if (k)
|
|
@@ -2231,10 +2231,10 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2231
2231
|
Y
|
|
2232
2232
|
), X[Y + k] = !0);
|
|
2233
2233
|
}
|
|
2234
|
-
if (Y = null, x !== void 0 && (r(x), Y = "" + x),
|
|
2234
|
+
if (Y = null, x !== void 0 && (r(x), Y = "" + x), o(S) && (r(S.key), Y = "" + S.key), "key" in S) {
|
|
2235
2235
|
x = {};
|
|
2236
|
-
for (var
|
|
2237
|
-
|
|
2236
|
+
for (var pe in S)
|
|
2237
|
+
pe !== "key" && (x[pe] = S[pe]);
|
|
2238
2238
|
} else x = S;
|
|
2239
2239
|
return Y && l(
|
|
2240
2240
|
x,
|
|
@@ -2243,7 +2243,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2243
2243
|
f,
|
|
2244
2244
|
Y,
|
|
2245
2245
|
x,
|
|
2246
|
-
|
|
2246
|
+
a(),
|
|
2247
2247
|
$,
|
|
2248
2248
|
N
|
|
2249
2249
|
);
|
|
@@ -2252,9 +2252,9 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2252
2252
|
y(f) ? f._store && (f._store.validated = 1) : typeof f == "object" && f !== null && f.$$typeof === U && (f._payload.status === "fulfilled" ? y(f._payload.value) && f._payload.value._store && (f._payload.value._store.validated = 1) : f._store && (f._store.validated = 1));
|
|
2253
2253
|
}
|
|
2254
2254
|
function y(f) {
|
|
2255
|
-
return typeof f == "object" && f !== null && f.$$typeof ===
|
|
2255
|
+
return typeof f == "object" && f !== null && f.$$typeof === u;
|
|
2256
2256
|
}
|
|
2257
|
-
var w = Le,
|
|
2257
|
+
var w = Le, u = Symbol.for("react.transitional.element"), j = Symbol.for("react.portal"), m = Symbol.for("react.fragment"), _ = Symbol.for("react.strict_mode"), R = Symbol.for("react.profiler"), A = Symbol.for("react.consumer"), C = Symbol.for("react.context"), M = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), I = Symbol.for("react.suspense_list"), v = Symbol.for("react.memo"), U = Symbol.for("react.lazy"), q = Symbol.for("react.activity"), F = Symbol.for("react.client.reference"), V = w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Z = Object.prototype.hasOwnProperty, T = Array.isArray, J = console.createTask ? console.createTask : function() {
|
|
2258
2258
|
return null;
|
|
2259
2259
|
};
|
|
2260
2260
|
w = {
|
|
@@ -2268,7 +2268,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2268
2268
|
)(), Q = J(s(i)), X = {};
|
|
2269
2269
|
Ee.Fragment = m, Ee.jsx = function(f, S, x) {
|
|
2270
2270
|
var k = 1e4 > V.recentlyCreatedOwnerStacks++;
|
|
2271
|
-
return
|
|
2271
|
+
return d(
|
|
2272
2272
|
f,
|
|
2273
2273
|
S,
|
|
2274
2274
|
x,
|
|
@@ -2278,7 +2278,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2278
2278
|
);
|
|
2279
2279
|
}, Ee.jsxs = function(f, S, x) {
|
|
2280
2280
|
var k = 1e4 > V.recentlyCreatedOwnerStacks++;
|
|
2281
|
-
return
|
|
2281
|
+
return d(
|
|
2282
2282
|
f,
|
|
2283
2283
|
S,
|
|
2284
2284
|
x,
|
|
@@ -2295,10 +2295,10 @@ function Bn() {
|
|
|
2295
2295
|
}
|
|
2296
2296
|
var n = Bn();
|
|
2297
2297
|
const Hn = async (t, e) => {
|
|
2298
|
-
const { name: r, email: s, password:
|
|
2298
|
+
const { name: r, email: s, password: a, appId: i, phone: o, address: l, avatarUrl: h, isActive: c = !0, role: d = "user" } = t, { baseUrl: b, apiKey: y } = e;
|
|
2299
2299
|
if (!y)
|
|
2300
2300
|
throw new Error("API key is required for signup");
|
|
2301
|
-
if (!r || !s || !
|
|
2301
|
+
if (!r || !s || !a || !i)
|
|
2302
2302
|
throw new Error("Name, email, password, and appId are required");
|
|
2303
2303
|
try {
|
|
2304
2304
|
const w = await W.post(
|
|
@@ -2306,13 +2306,13 @@ const Hn = async (t, e) => {
|
|
|
2306
2306
|
{
|
|
2307
2307
|
name: r,
|
|
2308
2308
|
email: s,
|
|
2309
|
-
password:
|
|
2309
|
+
password: a,
|
|
2310
2310
|
appId: i,
|
|
2311
|
-
phone:
|
|
2311
|
+
phone: o,
|
|
2312
2312
|
address: l,
|
|
2313
2313
|
avatarUrl: h,
|
|
2314
2314
|
isActive: c,
|
|
2315
|
-
role:
|
|
2315
|
+
role: d
|
|
2316
2316
|
},
|
|
2317
2317
|
{
|
|
2318
2318
|
headers: {
|
|
@@ -2323,15 +2323,15 @@ const Hn = async (t, e) => {
|
|
|
2323
2323
|
);
|
|
2324
2324
|
return w.data?.user && localStorage.setItem("userInfo", JSON.stringify(w.data.user)), w.data.user;
|
|
2325
2325
|
} catch (w) {
|
|
2326
|
-
const
|
|
2327
|
-
if (console.error("Signup API Error:",
|
|
2328
|
-
if (
|
|
2326
|
+
const u = w.response?.data?.message || w.message || "Signup failed";
|
|
2327
|
+
if (console.error("Signup API Error:", u), w.response?.status === 400) {
|
|
2328
|
+
if (u.includes("already exists"))
|
|
2329
2329
|
throw {
|
|
2330
2330
|
success: !1,
|
|
2331
2331
|
message: "User with this email already exists for this app",
|
|
2332
2332
|
status: 400
|
|
2333
2333
|
};
|
|
2334
|
-
if (
|
|
2334
|
+
if (u.includes("inactive"))
|
|
2335
2335
|
throw {
|
|
2336
2336
|
success: !1,
|
|
2337
2337
|
message: "Cannot signup under an inactive app",
|
|
@@ -2344,7 +2344,7 @@ const Hn = async (t, e) => {
|
|
|
2344
2344
|
status: 404
|
|
2345
2345
|
} : {
|
|
2346
2346
|
success: !1,
|
|
2347
|
-
message:
|
|
2347
|
+
message: u,
|
|
2348
2348
|
status: w.response?.status || 500
|
|
2349
2349
|
};
|
|
2350
2350
|
}
|
|
@@ -2395,9 +2395,9 @@ const Xn = Nt(
|
|
|
2395
2395
|
size: e = 24,
|
|
2396
2396
|
strokeWidth: r = 2,
|
|
2397
2397
|
absoluteStrokeWidth: s,
|
|
2398
|
-
className:
|
|
2398
|
+
className: a = "",
|
|
2399
2399
|
children: i,
|
|
2400
|
-
iconNode:
|
|
2400
|
+
iconNode: o,
|
|
2401
2401
|
...l
|
|
2402
2402
|
}, h) => Ge(
|
|
2403
2403
|
"svg",
|
|
@@ -2408,12 +2408,12 @@ const Xn = Nt(
|
|
|
2408
2408
|
height: e,
|
|
2409
2409
|
stroke: t,
|
|
2410
2410
|
strokeWidth: s ? Number(r) * 24 / Number(e) : r,
|
|
2411
|
-
className: ir("lucide",
|
|
2411
|
+
className: ir("lucide", a),
|
|
2412
2412
|
...!i && !Kn(l) && { "aria-hidden": "true" },
|
|
2413
2413
|
...l
|
|
2414
2414
|
},
|
|
2415
2415
|
[
|
|
2416
|
-
...
|
|
2416
|
+
...o.map(([c, d]) => Ge(c, d)),
|
|
2417
2417
|
...Array.isArray(i) ? i : [i]
|
|
2418
2418
|
]
|
|
2419
2419
|
)
|
|
@@ -2426,7 +2426,7 @@ const Xn = Nt(
|
|
|
2426
2426
|
*/
|
|
2427
2427
|
const B = (t, e) => {
|
|
2428
2428
|
const r = Nt(
|
|
2429
|
-
({ className: s, ...
|
|
2429
|
+
({ className: s, ...a }, i) => Ge(Xn, {
|
|
2430
2430
|
ref: i,
|
|
2431
2431
|
iconNode: e,
|
|
2432
2432
|
className: ir(
|
|
@@ -2434,7 +2434,7 @@ const B = (t, e) => {
|
|
|
2434
2434
|
`lucide-${t}`,
|
|
2435
2435
|
s
|
|
2436
2436
|
),
|
|
2437
|
-
...
|
|
2437
|
+
...a
|
|
2438
2438
|
})
|
|
2439
2439
|
);
|
|
2440
2440
|
return r.displayName = _t(t), r;
|
|
@@ -2510,11 +2510,11 @@ const ns = [
|
|
|
2510
2510
|
* This source code is licensed under the ISC license.
|
|
2511
2511
|
* See the LICENSE file in the root directory of this source tree.
|
|
2512
2512
|
*/
|
|
2513
|
-
const
|
|
2513
|
+
const as = [
|
|
2514
2514
|
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
|
|
2515
2515
|
["circle", { cx: "12", cy: "5", r: "1", key: "gxeob9" }],
|
|
2516
2516
|
["circle", { cx: "12", cy: "19", r: "1", key: "lyex9k" }]
|
|
2517
|
-
],
|
|
2517
|
+
], os = B("ellipsis-vertical", as);
|
|
2518
2518
|
/**
|
|
2519
2519
|
* @license lucide-react v0.544.0 - ISC
|
|
2520
2520
|
*
|
|
@@ -2626,7 +2626,7 @@ const xs = [
|
|
|
2626
2626
|
* This source code is licensed under the ISC license.
|
|
2627
2627
|
* See the LICENSE file in the root directory of this source tree.
|
|
2628
2628
|
*/
|
|
2629
|
-
const gs = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]],
|
|
2629
|
+
const gs = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], ae = B("loader-circle", gs);
|
|
2630
2630
|
/**
|
|
2631
2631
|
* @license lucide-react v0.544.0 - ISC
|
|
2632
2632
|
*
|
|
@@ -2850,30 +2850,30 @@ const Ls = [
|
|
|
2850
2850
|
baseUrl: "",
|
|
2851
2851
|
apiKey: "",
|
|
2852
2852
|
appId: ""
|
|
2853
|
-
},
|
|
2853
|
+
}, ua = (t) => {
|
|
2854
2854
|
if (!t.baseUrl || !t.apiKey || !t.appId)
|
|
2855
2855
|
throw new Error("baseUrl, apiKey, and appId are required");
|
|
2856
2856
|
Ue.baseUrl = t.baseUrl, Ue.apiKey = t.apiKey, Ue.appId = t.appId;
|
|
2857
|
-
},
|
|
2857
|
+
}, ue = () => Ue, pa = ({
|
|
2858
2858
|
logoUrl: t,
|
|
2859
2859
|
logoLinkUrl: e,
|
|
2860
2860
|
title: r = "Create Your Account",
|
|
2861
2861
|
subtitle: s = "Join our platform today",
|
|
2862
|
-
footerText:
|
|
2862
|
+
footerText: a = "Secure authentication powered by Neuctra Authix",
|
|
2863
2863
|
primaryColor: i = "#00C214",
|
|
2864
|
-
gradient:
|
|
2864
|
+
gradient: o = "linear-gradient(135deg, #22c55e, #00C214)",
|
|
2865
2865
|
darkMode: l = !0,
|
|
2866
2866
|
// Only avatar is optional
|
|
2867
2867
|
showAvatar: h = !1,
|
|
2868
2868
|
roles: c = [],
|
|
2869
2869
|
// 🔥 FIXED
|
|
2870
|
-
showRoleSelector:
|
|
2870
|
+
showRoleSelector: d = !1,
|
|
2871
2871
|
// 🔥 FIXED
|
|
2872
2872
|
loginUrl: b,
|
|
2873
2873
|
onSuccess: y,
|
|
2874
2874
|
onError: w
|
|
2875
2875
|
}) => {
|
|
2876
|
-
const { baseUrl:
|
|
2876
|
+
const { baseUrl: u, apiKey: j, appId: m } = ue(), _ = {
|
|
2877
2877
|
name: "",
|
|
2878
2878
|
email: "",
|
|
2879
2879
|
password: "",
|
|
@@ -2899,7 +2899,7 @@ const Ls = [
|
|
|
2899
2899
|
const x = {
|
|
2900
2900
|
...R,
|
|
2901
2901
|
appId: m
|
|
2902
|
-
}, k = await Hn(x, { baseUrl:
|
|
2902
|
+
}, k = await Hn(x, { baseUrl: u, apiKey: j });
|
|
2903
2903
|
U({ type: "success", text: "Account created successfully!" }), y && y(k);
|
|
2904
2904
|
} catch (x) {
|
|
2905
2905
|
const k = x.message || "Signup failed. Please try again.";
|
|
@@ -3036,7 +3036,7 @@ const Ls = [
|
|
|
3036
3036
|
onSubmit: X,
|
|
3037
3037
|
style: { display: "flex", flexDirection: "column", gap: "14px" },
|
|
3038
3038
|
children: [
|
|
3039
|
-
|
|
3039
|
+
d && c && c.length === 2 && /* @__PURE__ */ n.jsxs(
|
|
3040
3040
|
"div",
|
|
3041
3041
|
{
|
|
3042
3042
|
style: { display: "flex", flexDirection: "column", gap: "4px" },
|
|
@@ -3415,7 +3415,7 @@ const Ls = [
|
|
|
3415
3415
|
disabled: g,
|
|
3416
3416
|
style: {
|
|
3417
3417
|
padding: "12px",
|
|
3418
|
-
background:
|
|
3418
|
+
background: o,
|
|
3419
3419
|
color: "#fff",
|
|
3420
3420
|
border: "none",
|
|
3421
3421
|
borderRadius: "10px",
|
|
@@ -3473,17 +3473,17 @@ const Ls = [
|
|
|
3473
3473
|
}
|
|
3474
3474
|
);
|
|
3475
3475
|
}, Fs = async (t, e) => {
|
|
3476
|
-
const { email: r, password: s, appId:
|
|
3477
|
-
if (!
|
|
3476
|
+
const { email: r, password: s, appId: a } = t, { baseUrl: i, apiKey: o } = e;
|
|
3477
|
+
if (!o)
|
|
3478
3478
|
throw new Error("API key is required for login");
|
|
3479
3479
|
try {
|
|
3480
3480
|
const l = await W.post(
|
|
3481
3481
|
`${i}/users/login`,
|
|
3482
|
-
{ email: r, password: s, appId:
|
|
3482
|
+
{ email: r, password: s, appId: a },
|
|
3483
3483
|
{
|
|
3484
3484
|
headers: {
|
|
3485
3485
|
"Content-Type": "application/json",
|
|
3486
|
-
"x-api-key":
|
|
3486
|
+
"x-api-key": o
|
|
3487
3487
|
}
|
|
3488
3488
|
}
|
|
3489
3489
|
);
|
|
@@ -3496,20 +3496,20 @@ const Ls = [
|
|
|
3496
3496
|
status: l.response?.status || 500
|
|
3497
3497
|
};
|
|
3498
3498
|
}
|
|
3499
|
-
},
|
|
3499
|
+
}, fa = ({
|
|
3500
3500
|
logoUrl: t,
|
|
3501
3501
|
logoLinkUrl: e,
|
|
3502
3502
|
title: r = "Sign In to Your Account",
|
|
3503
3503
|
subtitle: s = "Welcome back! Please enter your details",
|
|
3504
|
-
footerText:
|
|
3504
|
+
footerText: a = "Secure authentication powered by Neuctra Authix",
|
|
3505
3505
|
primaryColor: i = "#00C214",
|
|
3506
|
-
gradient:
|
|
3506
|
+
gradient: o = "linear-gradient(135deg, #22c55e, #00C214)",
|
|
3507
3507
|
darkMode: l = !0,
|
|
3508
3508
|
signupUrl: h,
|
|
3509
3509
|
onSuccess: c,
|
|
3510
|
-
onError:
|
|
3510
|
+
onError: d
|
|
3511
3511
|
}) => {
|
|
3512
|
-
const { baseUrl: b, apiKey: y, appId: w } =
|
|
3512
|
+
const { baseUrl: b, apiKey: y, appId: w } = ue(), [u, j] = O("login"), [m, _] = O(1), [R, A] = O(!1), [C, M] = O(!1), [g, I] = O(null), [v, U] = O(""), [q, F] = O(""), [V, Z] = O({
|
|
3513
3513
|
email: "",
|
|
3514
3514
|
otp: "",
|
|
3515
3515
|
newPassword: "",
|
|
@@ -3531,7 +3531,7 @@ const Ls = [
|
|
|
3531
3531
|
I({ type: "success", text: `Welcome ${N.name}` }), c?.(N);
|
|
3532
3532
|
} catch (N) {
|
|
3533
3533
|
const Y = N.message || "Login failed";
|
|
3534
|
-
I({ type: "error", text: Y }),
|
|
3534
|
+
I({ type: "error", text: Y }), d?.(N);
|
|
3535
3535
|
} finally {
|
|
3536
3536
|
M(!1);
|
|
3537
3537
|
}
|
|
@@ -3653,7 +3653,7 @@ const Ls = [
|
|
|
3653
3653
|
color: z,
|
|
3654
3654
|
margin: 0
|
|
3655
3655
|
},
|
|
3656
|
-
children:
|
|
3656
|
+
children: u === "login" ? r : m === 1 ? "Forgot Password" : "Reset Password"
|
|
3657
3657
|
}
|
|
3658
3658
|
),
|
|
3659
3659
|
/* @__PURE__ */ n.jsx(
|
|
@@ -3663,13 +3663,13 @@ const Ls = [
|
|
|
3663
3663
|
fontSize: "14px",
|
|
3664
3664
|
color: P
|
|
3665
3665
|
},
|
|
3666
|
-
children:
|
|
3666
|
+
children: u === "login" ? s : "Follow the steps to reset your password"
|
|
3667
3667
|
}
|
|
3668
3668
|
)
|
|
3669
3669
|
]
|
|
3670
3670
|
}
|
|
3671
3671
|
),
|
|
3672
|
-
|
|
3672
|
+
u === "login" && /* @__PURE__ */ n.jsxs(
|
|
3673
3673
|
"form",
|
|
3674
3674
|
{
|
|
3675
3675
|
onSubmit: X,
|
|
@@ -3832,7 +3832,7 @@ const Ls = [
|
|
|
3832
3832
|
disabled: C,
|
|
3833
3833
|
style: {
|
|
3834
3834
|
padding: "12px",
|
|
3835
|
-
background:
|
|
3835
|
+
background: o,
|
|
3836
3836
|
color: "#fff",
|
|
3837
3837
|
border: "none",
|
|
3838
3838
|
borderRadius: "10px",
|
|
@@ -3845,7 +3845,7 @@ const Ls = [
|
|
|
3845
3845
|
]
|
|
3846
3846
|
}
|
|
3847
3847
|
),
|
|
3848
|
-
|
|
3848
|
+
u === "forgot" && /* @__PURE__ */ n.jsxs(
|
|
3849
3849
|
"form",
|
|
3850
3850
|
{
|
|
3851
3851
|
onSubmit: m === 1 ? S : x,
|
|
@@ -4008,7 +4008,7 @@ const Ls = [
|
|
|
4008
4008
|
disabled: C,
|
|
4009
4009
|
style: {
|
|
4010
4010
|
padding: "12px",
|
|
4011
|
-
background:
|
|
4011
|
+
background: o,
|
|
4012
4012
|
color: "#fff",
|
|
4013
4013
|
border: "none",
|
|
4014
4014
|
fontSize: "14px",
|
|
@@ -4082,38 +4082,52 @@ const Ls = [
|
|
|
4082
4082
|
)
|
|
4083
4083
|
}
|
|
4084
4084
|
);
|
|
4085
|
-
},
|
|
4085
|
+
}, xa = ({
|
|
4086
4086
|
children: t,
|
|
4087
4087
|
fallback: e = null,
|
|
4088
4088
|
className: r,
|
|
4089
4089
|
width: s,
|
|
4090
|
-
height:
|
|
4090
|
+
height: a
|
|
4091
4091
|
}) => {
|
|
4092
|
-
const
|
|
4093
|
-
if (typeof window > "u") return !1;
|
|
4094
|
-
try {
|
|
4095
|
-
const l = localStorage.getItem("userInfo");
|
|
4096
|
-
return !!(l && l !== "undefined" && l !== "null");
|
|
4097
|
-
} catch {
|
|
4098
|
-
return !1;
|
|
4099
|
-
}
|
|
4100
|
-
});
|
|
4092
|
+
const { appId: i } = ue(), [o, l] = O(!1), [h, c] = O(!0);
|
|
4101
4093
|
return te(() => {
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
}
|
|
4110
|
-
|
|
4094
|
+
let d = !1;
|
|
4095
|
+
const b = async () => {
|
|
4096
|
+
try {
|
|
4097
|
+
const w = localStorage.getItem("userInfo");
|
|
4098
|
+
if (!w || w === "undefined" || w === "null") {
|
|
4099
|
+
l(!1);
|
|
4100
|
+
return;
|
|
4101
|
+
}
|
|
4102
|
+
const u = JSON.parse(w);
|
|
4103
|
+
if (!u?.id) {
|
|
4104
|
+
l(!1);
|
|
4105
|
+
return;
|
|
4111
4106
|
}
|
|
4107
|
+
const j = await fetch(
|
|
4108
|
+
`https://server.authix.neuctra.com/api/users/check-user/${u.id}?appId=${i}`,
|
|
4109
|
+
{
|
|
4110
|
+
credentials: "include"
|
|
4111
|
+
}
|
|
4112
|
+
);
|
|
4113
|
+
if (!j.ok) {
|
|
4114
|
+
l(!1);
|
|
4115
|
+
return;
|
|
4116
|
+
}
|
|
4117
|
+
const m = await j.json();
|
|
4118
|
+
d || l(!!m?.exists);
|
|
4119
|
+
} catch {
|
|
4120
|
+
d || l(!1);
|
|
4121
|
+
} finally {
|
|
4122
|
+
d || c(!1);
|
|
4123
|
+
}
|
|
4112
4124
|
};
|
|
4113
|
-
|
|
4114
|
-
|
|
4125
|
+
b();
|
|
4126
|
+
const y = () => b();
|
|
4127
|
+
return window.addEventListener("storage", y), () => {
|
|
4128
|
+
d = !0, window.removeEventListener("storage", y);
|
|
4115
4129
|
};
|
|
4116
|
-
}, []),
|
|
4130
|
+
}, [i]), h ? null : o ? /* @__PURE__ */ n.jsx(
|
|
4117
4131
|
"div",
|
|
4118
4132
|
{
|
|
4119
4133
|
className: r,
|
|
@@ -4121,19 +4135,19 @@ const Ls = [
|
|
|
4121
4135
|
display: "flex",
|
|
4122
4136
|
alignItems: "center",
|
|
4123
4137
|
width: s,
|
|
4124
|
-
height:
|
|
4138
|
+
height: a
|
|
4125
4139
|
},
|
|
4126
4140
|
children: t
|
|
4127
4141
|
}
|
|
4128
4142
|
) : typeof e == "function" ? e() : e;
|
|
4129
|
-
},
|
|
4143
|
+
}, ha = ({
|
|
4130
4144
|
children: t,
|
|
4131
4145
|
fallback: e = null,
|
|
4132
4146
|
className: r,
|
|
4133
4147
|
width: s,
|
|
4134
|
-
height:
|
|
4148
|
+
height: a
|
|
4135
4149
|
}) => {
|
|
4136
|
-
const [i,
|
|
4150
|
+
const [i, o] = O(() => {
|
|
4137
4151
|
if (typeof window > "u") return !0;
|
|
4138
4152
|
try {
|
|
4139
4153
|
const l = localStorage.getItem("userInfo");
|
|
@@ -4146,11 +4160,11 @@ const Ls = [
|
|
|
4146
4160
|
const l = () => {
|
|
4147
4161
|
try {
|
|
4148
4162
|
const h = localStorage.getItem("userInfo");
|
|
4149
|
-
|
|
4163
|
+
o(
|
|
4150
4164
|
!h || h === "undefined" || h === "null"
|
|
4151
4165
|
);
|
|
4152
4166
|
} catch {
|
|
4153
|
-
|
|
4167
|
+
o(!0);
|
|
4154
4168
|
}
|
|
4155
4169
|
};
|
|
4156
4170
|
return l(), window.addEventListener("storage", l), () => window.removeEventListener("storage", l);
|
|
@@ -4162,7 +4176,7 @@ const Ls = [
|
|
|
4162
4176
|
display: "flex",
|
|
4163
4177
|
alignItems: "center",
|
|
4164
4178
|
width: s,
|
|
4165
|
-
height:
|
|
4179
|
+
height: a
|
|
4166
4180
|
},
|
|
4167
4181
|
children: t
|
|
4168
4182
|
}
|
|
@@ -4172,11 +4186,11 @@ const Ls = [
|
|
|
4172
4186
|
onClose: e,
|
|
4173
4187
|
onSuccess: r,
|
|
4174
4188
|
onError: s,
|
|
4175
|
-
userId:
|
|
4189
|
+
userId: a,
|
|
4176
4190
|
token: i,
|
|
4177
|
-
colors:
|
|
4191
|
+
colors: o
|
|
4178
4192
|
}) => {
|
|
4179
|
-
const { baseUrl: l, apiKey: h, appId: c } =
|
|
4193
|
+
const { baseUrl: l, apiKey: h, appId: c } = ue(), [d, b] = O(!1), [y, w] = O(""), [u, j] = O("warning"), [m, _] = O(!1);
|
|
4180
4194
|
if (te(() => {
|
|
4181
4195
|
if (typeof window > "u") return;
|
|
4182
4196
|
const g = () => {
|
|
@@ -4187,7 +4201,7 @@ const Ls = [
|
|
|
4187
4201
|
const R = async () => {
|
|
4188
4202
|
b(!0), j("processing");
|
|
4189
4203
|
try {
|
|
4190
|
-
const { data: g } = await W.delete(`${l}/users/delete/${
|
|
4204
|
+
const { data: g } = await W.delete(`${l}/users/delete/${a}`, {
|
|
4191
4205
|
data: { appId: c },
|
|
4192
4206
|
headers: {
|
|
4193
4207
|
"x-api-key": h
|
|
@@ -4202,9 +4216,9 @@ const Ls = [
|
|
|
4202
4216
|
b(!1);
|
|
4203
4217
|
}
|
|
4204
4218
|
}, A = y.toLowerCase() === "delete my account", C = (g) => {
|
|
4205
|
-
g.target === g.currentTarget &&
|
|
4219
|
+
g.target === g.currentTarget && u !== "processing" && u !== "success" && e();
|
|
4206
4220
|
}, M = () => {
|
|
4207
|
-
switch (
|
|
4221
|
+
switch (u) {
|
|
4208
4222
|
case "warning":
|
|
4209
4223
|
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
4210
4224
|
/* @__PURE__ */ n.jsxs(
|
|
@@ -4249,7 +4263,7 @@ const Ls = [
|
|
|
4249
4263
|
"h3",
|
|
4250
4264
|
{
|
|
4251
4265
|
style: {
|
|
4252
|
-
color:
|
|
4266
|
+
color: o.textPrimary,
|
|
4253
4267
|
margin: 0,
|
|
4254
4268
|
fontSize: "20px",
|
|
4255
4269
|
fontWeight: 700,
|
|
@@ -4269,7 +4283,7 @@ const Ls = [
|
|
|
4269
4283
|
style: {
|
|
4270
4284
|
background: "transparent",
|
|
4271
4285
|
border: "none",
|
|
4272
|
-
color:
|
|
4286
|
+
color: o.textTertiary,
|
|
4273
4287
|
cursor: "pointer",
|
|
4274
4288
|
padding: "8px",
|
|
4275
4289
|
borderRadius: "8px",
|
|
@@ -4282,10 +4296,10 @@ const Ls = [
|
|
|
4282
4296
|
transition: "all 0.2s ease"
|
|
4283
4297
|
},
|
|
4284
4298
|
onMouseOver: (g) => {
|
|
4285
|
-
g.currentTarget.style.backgroundColor =
|
|
4299
|
+
g.currentTarget.style.backgroundColor = o.border, g.currentTarget.style.color = o.textPrimary;
|
|
4286
4300
|
},
|
|
4287
4301
|
onMouseOut: (g) => {
|
|
4288
|
-
g.currentTarget.style.backgroundColor = "transparent", g.currentTarget.style.color =
|
|
4302
|
+
g.currentTarget.style.backgroundColor = "transparent", g.currentTarget.style.color = o.textTertiary;
|
|
4289
4303
|
},
|
|
4290
4304
|
children: /* @__PURE__ */ n.jsx(Pe, { size: 20 })
|
|
4291
4305
|
}
|
|
@@ -4300,8 +4314,8 @@ const Ls = [
|
|
|
4300
4314
|
display: "flex",
|
|
4301
4315
|
gap: "16px",
|
|
4302
4316
|
padding: "20px",
|
|
4303
|
-
background: `${
|
|
4304
|
-
border: `1px solid ${
|
|
4317
|
+
background: `${o.error}15`,
|
|
4318
|
+
border: `1px solid ${o.error}30`,
|
|
4305
4319
|
borderRadius: "12px",
|
|
4306
4320
|
marginBottom: "20px"
|
|
4307
4321
|
},
|
|
@@ -4310,7 +4324,7 @@ const Ls = [
|
|
|
4310
4324
|
"div",
|
|
4311
4325
|
{
|
|
4312
4326
|
style: {
|
|
4313
|
-
color:
|
|
4327
|
+
color: o.error,
|
|
4314
4328
|
flexShrink: 0,
|
|
4315
4329
|
display: "flex",
|
|
4316
4330
|
alignItems: "flex-start"
|
|
@@ -4323,7 +4337,7 @@ const Ls = [
|
|
|
4323
4337
|
"h4",
|
|
4324
4338
|
{
|
|
4325
4339
|
style: {
|
|
4326
|
-
color:
|
|
4340
|
+
color: o.textPrimary,
|
|
4327
4341
|
margin: "0 0 12px 0",
|
|
4328
4342
|
fontSize: "16px",
|
|
4329
4343
|
fontWeight: 600
|
|
@@ -4360,10 +4374,10 @@ const Ls = [
|
|
|
4360
4374
|
alignItems: "center",
|
|
4361
4375
|
gap: "10px",
|
|
4362
4376
|
fontSize: "14px",
|
|
4363
|
-
color:
|
|
4377
|
+
color: o.textSecondary
|
|
4364
4378
|
},
|
|
4365
4379
|
children: [
|
|
4366
|
-
/* @__PURE__ */ n.jsx("div", { style: { color:
|
|
4380
|
+
/* @__PURE__ */ n.jsx("div", { style: { color: o.error, flexShrink: 0 }, children: g.icon }),
|
|
4367
4381
|
/* @__PURE__ */ n.jsx("span", { children: g.text })
|
|
4368
4382
|
]
|
|
4369
4383
|
},
|
|
@@ -4393,9 +4407,9 @@ const Ls = [
|
|
|
4393
4407
|
style: {
|
|
4394
4408
|
padding: "10px 24px",
|
|
4395
4409
|
borderRadius: "10px",
|
|
4396
|
-
border: `1.5px solid ${
|
|
4410
|
+
border: `1.5px solid ${o.border}`,
|
|
4397
4411
|
background: "transparent",
|
|
4398
|
-
color:
|
|
4412
|
+
color: o.textPrimary,
|
|
4399
4413
|
fontSize: "14px",
|
|
4400
4414
|
fontWeight: 500,
|
|
4401
4415
|
cursor: "pointer",
|
|
@@ -4404,7 +4418,7 @@ const Ls = [
|
|
|
4404
4418
|
transition: "all 0.2s ease"
|
|
4405
4419
|
},
|
|
4406
4420
|
onMouseOver: (g) => {
|
|
4407
|
-
g.currentTarget.style.backgroundColor =
|
|
4421
|
+
g.currentTarget.style.backgroundColor = o.border, g.currentTarget.style.transform = "translateY(-1px)";
|
|
4408
4422
|
},
|
|
4409
4423
|
onMouseOut: (g) => {
|
|
4410
4424
|
g.currentTarget.style.backgroundColor = "transparent", g.currentTarget.style.transform = "translateY(0)";
|
|
@@ -4483,7 +4497,7 @@ const Ls = [
|
|
|
4483
4497
|
"h3",
|
|
4484
4498
|
{
|
|
4485
4499
|
style: {
|
|
4486
|
-
color:
|
|
4500
|
+
color: o.textPrimary,
|
|
4487
4501
|
margin: 0,
|
|
4488
4502
|
fontSize: "20px",
|
|
4489
4503
|
fontWeight: 700,
|
|
@@ -4500,7 +4514,7 @@ const Ls = [
|
|
|
4500
4514
|
"p",
|
|
4501
4515
|
{
|
|
4502
4516
|
style: {
|
|
4503
|
-
color:
|
|
4517
|
+
color: o.textSecondary,
|
|
4504
4518
|
marginBottom: "16px",
|
|
4505
4519
|
fontSize: "14px",
|
|
4506
4520
|
lineHeight: "1.5"
|
|
@@ -4508,7 +4522,7 @@ const Ls = [
|
|
|
4508
4522
|
children: [
|
|
4509
4523
|
"Type",
|
|
4510
4524
|
" ",
|
|
4511
|
-
/* @__PURE__ */ n.jsx("strong", { style: { color:
|
|
4525
|
+
/* @__PURE__ */ n.jsx("strong", { style: { color: o.textPrimary }, children: '"delete my account"' }),
|
|
4512
4526
|
" ",
|
|
4513
4527
|
"to confirm:"
|
|
4514
4528
|
]
|
|
@@ -4525,16 +4539,16 @@ const Ls = [
|
|
|
4525
4539
|
width: "100%",
|
|
4526
4540
|
padding: "14px 16px",
|
|
4527
4541
|
borderRadius: "10px",
|
|
4528
|
-
border: `2px solid ${A ?
|
|
4542
|
+
border: `2px solid ${A ? o.success : o.error}`,
|
|
4529
4543
|
backgroundColor: "transparent",
|
|
4530
|
-
color:
|
|
4544
|
+
color: o.textPrimary,
|
|
4531
4545
|
fontSize: "15px",
|
|
4532
4546
|
outline: "none",
|
|
4533
4547
|
transition: "all 0.2s ease",
|
|
4534
4548
|
boxSizing: "border-box"
|
|
4535
4549
|
},
|
|
4536
4550
|
onFocus: (g) => {
|
|
4537
|
-
g.target.style.boxShadow = `0 0 0 3px ${
|
|
4551
|
+
g.target.style.boxShadow = `0 0 0 3px ${o.accent}20`;
|
|
4538
4552
|
},
|
|
4539
4553
|
onBlur: (g) => {
|
|
4540
4554
|
g.target.style.boxShadow = "none";
|
|
@@ -4550,7 +4564,7 @@ const Ls = [
|
|
|
4550
4564
|
alignItems: "center",
|
|
4551
4565
|
gap: "8px",
|
|
4552
4566
|
marginTop: "10px",
|
|
4553
|
-
color:
|
|
4567
|
+
color: o.success,
|
|
4554
4568
|
fontSize: "14px",
|
|
4555
4569
|
fontWeight: 500
|
|
4556
4570
|
},
|
|
@@ -4581,9 +4595,9 @@ const Ls = [
|
|
|
4581
4595
|
style: {
|
|
4582
4596
|
padding: "10px 24px",
|
|
4583
4597
|
borderRadius: "10px",
|
|
4584
|
-
border: `1.5px solid ${
|
|
4598
|
+
border: `1.5px solid ${o.border}`,
|
|
4585
4599
|
background: "transparent",
|
|
4586
|
-
color:
|
|
4600
|
+
color: o.textPrimary,
|
|
4587
4601
|
fontSize: "14px",
|
|
4588
4602
|
fontWeight: 500,
|
|
4589
4603
|
cursor: "pointer",
|
|
@@ -4592,7 +4606,7 @@ const Ls = [
|
|
|
4592
4606
|
transition: "all 0.2s ease"
|
|
4593
4607
|
},
|
|
4594
4608
|
onMouseOver: (g) => {
|
|
4595
|
-
g.currentTarget.style.backgroundColor =
|
|
4609
|
+
g.currentTarget.style.backgroundColor = o.border, g.currentTarget.style.transform = "translateY(-1px)";
|
|
4596
4610
|
},
|
|
4597
4611
|
onMouseOut: (g) => {
|
|
4598
4612
|
g.currentTarget.style.backgroundColor = "transparent", g.currentTarget.style.transform = "translateY(0)";
|
|
@@ -4604,7 +4618,7 @@ const Ls = [
|
|
|
4604
4618
|
"button",
|
|
4605
4619
|
{
|
|
4606
4620
|
onClick: R,
|
|
4607
|
-
disabled: !A ||
|
|
4621
|
+
disabled: !A || d,
|
|
4608
4622
|
style: {
|
|
4609
4623
|
padding: "10px 24px",
|
|
4610
4624
|
borderRadius: "10px",
|
|
@@ -4613,22 +4627,22 @@ const Ls = [
|
|
|
4613
4627
|
color: "white",
|
|
4614
4628
|
fontSize: "14px",
|
|
4615
4629
|
fontWeight: 600,
|
|
4616
|
-
cursor: !A ||
|
|
4630
|
+
cursor: !A || d ? "not-allowed" : "pointer",
|
|
4617
4631
|
flex: m ? "none" : 1,
|
|
4618
4632
|
minWidth: m ? "100%" : "140px",
|
|
4619
|
-
opacity: !A ||
|
|
4633
|
+
opacity: !A || d ? 0.6 : 1,
|
|
4620
4634
|
display: "flex",
|
|
4621
4635
|
alignItems: "center",
|
|
4622
4636
|
justifyContent: "center",
|
|
4623
4637
|
gap: "8px",
|
|
4624
4638
|
transition: "all 0.2s ease",
|
|
4625
|
-
boxShadow: !A ||
|
|
4639
|
+
boxShadow: !A || d ? "none" : "0 4px 12px rgba(239, 68, 68, 0.4)"
|
|
4626
4640
|
},
|
|
4627
4641
|
onMouseOver: (g) => {
|
|
4628
|
-
A && !
|
|
4642
|
+
A && !d && (g.currentTarget.style.transform = "translateY(-1px)", g.currentTarget.style.boxShadow = "0 6px 20px rgba(239, 68, 68, 0.5)");
|
|
4629
4643
|
},
|
|
4630
4644
|
onMouseOut: (g) => {
|
|
4631
|
-
A && !
|
|
4645
|
+
A && !d && (g.currentTarget.style.transform = "translateY(0)", g.currentTarget.style.boxShadow = "0 4px 12px rgba(239, 68, 68, 0.4)");
|
|
4632
4646
|
},
|
|
4633
4647
|
children: [
|
|
4634
4648
|
/* @__PURE__ */ n.jsx(Ne, { size: 16 }),
|
|
@@ -4667,7 +4681,7 @@ const Ls = [
|
|
|
4667
4681
|
flexShrink: 0
|
|
4668
4682
|
},
|
|
4669
4683
|
children: /* @__PURE__ */ n.jsx(
|
|
4670
|
-
|
|
4684
|
+
ae,
|
|
4671
4685
|
{
|
|
4672
4686
|
size: 20,
|
|
4673
4687
|
style: {
|
|
@@ -4682,7 +4696,7 @@ const Ls = [
|
|
|
4682
4696
|
"h3",
|
|
4683
4697
|
{
|
|
4684
4698
|
style: {
|
|
4685
|
-
color:
|
|
4699
|
+
color: o.textPrimary,
|
|
4686
4700
|
margin: 0,
|
|
4687
4701
|
fontSize: "20px",
|
|
4688
4702
|
fontWeight: 700,
|
|
@@ -4695,7 +4709,7 @@ const Ls = [
|
|
|
4695
4709
|
"p",
|
|
4696
4710
|
{
|
|
4697
4711
|
style: {
|
|
4698
|
-
color:
|
|
4712
|
+
color: o.textTertiary,
|
|
4699
4713
|
margin: "4px 0 0 0",
|
|
4700
4714
|
fontSize: "14px",
|
|
4701
4715
|
lineHeight: "1.4"
|
|
@@ -4729,7 +4743,7 @@ const Ls = [
|
|
|
4729
4743
|
padding: "12px",
|
|
4730
4744
|
borderRadius: "8px",
|
|
4731
4745
|
transition: "all 0.2s ease",
|
|
4732
|
-
backgroundColor: g.active ? `${
|
|
4746
|
+
backgroundColor: g.active ? `${o.accent}10` : "transparent"
|
|
4733
4747
|
},
|
|
4734
4748
|
children: [
|
|
4735
4749
|
/* @__PURE__ */ n.jsx(
|
|
@@ -4739,9 +4753,9 @@ const Ls = [
|
|
|
4739
4753
|
width: "8px",
|
|
4740
4754
|
height: "8px",
|
|
4741
4755
|
borderRadius: "50%",
|
|
4742
|
-
backgroundColor: g.active ?
|
|
4756
|
+
backgroundColor: g.active ? o.accent : o.textTertiary,
|
|
4743
4757
|
transition: "all 0.3s ease",
|
|
4744
|
-
boxShadow: g.active ? `0 0 0 4px ${
|
|
4758
|
+
boxShadow: g.active ? `0 0 0 4px ${o.accent}20` : "none"
|
|
4745
4759
|
}
|
|
4746
4760
|
}
|
|
4747
4761
|
),
|
|
@@ -4750,7 +4764,7 @@ const Ls = [
|
|
|
4750
4764
|
{
|
|
4751
4765
|
style: {
|
|
4752
4766
|
fontSize: "14px",
|
|
4753
|
-
color: g.active ?
|
|
4767
|
+
color: g.active ? o.textPrimary : o.textSecondary,
|
|
4754
4768
|
fontWeight: g.active ? 500 : 400
|
|
4755
4769
|
},
|
|
4756
4770
|
children: g.text
|
|
@@ -4770,17 +4784,17 @@ const Ls = [
|
|
|
4770
4784
|
alignItems: "center",
|
|
4771
4785
|
gap: "10px",
|
|
4772
4786
|
padding: "16px",
|
|
4773
|
-
background: `${
|
|
4787
|
+
background: `${o.accent}10`,
|
|
4774
4788
|
borderRadius: "10px",
|
|
4775
4789
|
fontSize: "14px",
|
|
4776
|
-
color:
|
|
4790
|
+
color: o.textSecondary
|
|
4777
4791
|
},
|
|
4778
4792
|
children: [
|
|
4779
4793
|
/* @__PURE__ */ n.jsx(
|
|
4780
4794
|
dr,
|
|
4781
4795
|
{
|
|
4782
4796
|
size: 18,
|
|
4783
|
-
style: { color:
|
|
4797
|
+
style: { color: o.accent, flexShrink: 0 }
|
|
4784
4798
|
}
|
|
4785
4799
|
),
|
|
4786
4800
|
/* @__PURE__ */ n.jsx("span", { children: "You will be redirected to the login page shortly" })
|
|
@@ -4822,7 +4836,7 @@ const Ls = [
|
|
|
4822
4836
|
"h3",
|
|
4823
4837
|
{
|
|
4824
4838
|
style: {
|
|
4825
|
-
color:
|
|
4839
|
+
color: o.textPrimary,
|
|
4826
4840
|
margin: 0,
|
|
4827
4841
|
fontSize: "20px",
|
|
4828
4842
|
fontWeight: 700,
|
|
@@ -4835,7 +4849,7 @@ const Ls = [
|
|
|
4835
4849
|
"p",
|
|
4836
4850
|
{
|
|
4837
4851
|
style: {
|
|
4838
|
-
color:
|
|
4852
|
+
color: o.textTertiary,
|
|
4839
4853
|
margin: "4px 0 0 0",
|
|
4840
4854
|
fontSize: "14px",
|
|
4841
4855
|
lineHeight: "1.4"
|
|
@@ -4853,8 +4867,8 @@ const Ls = [
|
|
|
4853
4867
|
style: {
|
|
4854
4868
|
textAlign: "center",
|
|
4855
4869
|
padding: "20px",
|
|
4856
|
-
background: `${
|
|
4857
|
-
border: `1px solid ${
|
|
4870
|
+
background: `${o.success}10`,
|
|
4871
|
+
border: `1px solid ${o.success}20`,
|
|
4858
4872
|
borderRadius: "12px",
|
|
4859
4873
|
marginBottom: "24px"
|
|
4860
4874
|
},
|
|
@@ -4864,7 +4878,7 @@ const Ls = [
|
|
|
4864
4878
|
{
|
|
4865
4879
|
size: 48,
|
|
4866
4880
|
style: {
|
|
4867
|
-
color:
|
|
4881
|
+
color: o.success,
|
|
4868
4882
|
marginBottom: "12px",
|
|
4869
4883
|
display: "block",
|
|
4870
4884
|
margin: "0 auto 12px auto"
|
|
@@ -4875,7 +4889,7 @@ const Ls = [
|
|
|
4875
4889
|
"p",
|
|
4876
4890
|
{
|
|
4877
4891
|
style: {
|
|
4878
|
-
color:
|
|
4892
|
+
color: o.textPrimary,
|
|
4879
4893
|
fontSize: "16px",
|
|
4880
4894
|
fontWeight: 600,
|
|
4881
4895
|
margin: "0 0 8px 0"
|
|
@@ -4887,7 +4901,7 @@ const Ls = [
|
|
|
4887
4901
|
"p",
|
|
4888
4902
|
{
|
|
4889
4903
|
style: {
|
|
4890
|
-
color:
|
|
4904
|
+
color: o.textSecondary,
|
|
4891
4905
|
fontSize: "14px",
|
|
4892
4906
|
margin: 0,
|
|
4893
4907
|
lineHeight: "1.5"
|
|
@@ -4906,20 +4920,20 @@ const Ls = [
|
|
|
4906
4920
|
alignItems: "center",
|
|
4907
4921
|
gap: "10px",
|
|
4908
4922
|
padding: "16px",
|
|
4909
|
-
background: `${
|
|
4923
|
+
background: `${o.accent}10`,
|
|
4910
4924
|
borderRadius: "10px",
|
|
4911
4925
|
fontSize: "14px",
|
|
4912
|
-
color:
|
|
4926
|
+
color: o.textSecondary,
|
|
4913
4927
|
justifyContent: "center"
|
|
4914
4928
|
},
|
|
4915
4929
|
children: [
|
|
4916
4930
|
/* @__PURE__ */ n.jsx(
|
|
4917
|
-
|
|
4931
|
+
ae,
|
|
4918
4932
|
{
|
|
4919
4933
|
size: 16,
|
|
4920
4934
|
style: {
|
|
4921
4935
|
animation: "spin 1s linear infinite",
|
|
4922
|
-
color:
|
|
4936
|
+
color: o.accent
|
|
4923
4937
|
}
|
|
4924
4938
|
}
|
|
4925
4939
|
),
|
|
@@ -4951,8 +4965,8 @@ const Ls = [
|
|
|
4951
4965
|
"div",
|
|
4952
4966
|
{
|
|
4953
4967
|
style: {
|
|
4954
|
-
backgroundColor:
|
|
4955
|
-
border: `1px solid ${
|
|
4968
|
+
backgroundColor: o.surface,
|
|
4969
|
+
border: `1px solid ${o.border}`,
|
|
4956
4970
|
borderRadius: "20px",
|
|
4957
4971
|
width: "100%",
|
|
4958
4972
|
maxWidth: "480px",
|
|
@@ -5028,20 +5042,20 @@ const Ls = [
|
|
|
5028
5042
|
onUpdate: r,
|
|
5029
5043
|
colors: s
|
|
5030
5044
|
}) => {
|
|
5031
|
-
const [
|
|
5045
|
+
const [a, i] = O(""), [o, l] = O(!1), [h, c] = O(!1), [d, b] = O({ isValid: !1, message: "", type: null });
|
|
5032
5046
|
if (te(() => {
|
|
5033
5047
|
if (typeof window > "u") return;
|
|
5034
|
-
const
|
|
5048
|
+
const u = () => {
|
|
5035
5049
|
c(window.innerWidth < 640);
|
|
5036
5050
|
};
|
|
5037
|
-
return
|
|
5051
|
+
return u(), window.addEventListener("resize", u), () => window.removeEventListener("resize", u);
|
|
5038
5052
|
}, []), te(() => {
|
|
5039
|
-
if (!
|
|
5053
|
+
if (!a.trim()) {
|
|
5040
5054
|
b({ isValid: !1, message: "", type: null });
|
|
5041
5055
|
return;
|
|
5042
5056
|
}
|
|
5043
5057
|
try {
|
|
5044
|
-
const
|
|
5058
|
+
const u = new URL(a), j = /\.(jpg|jpeg|png|gif|webp|svg)$/i.test(u.pathname);
|
|
5045
5059
|
b(j ? {
|
|
5046
5060
|
isValid: !0,
|
|
5047
5061
|
message: "Valid image URL",
|
|
@@ -5058,18 +5072,18 @@ const Ls = [
|
|
|
5058
5072
|
type: "error"
|
|
5059
5073
|
});
|
|
5060
5074
|
}
|
|
5061
|
-
}, [
|
|
5075
|
+
}, [a]), !t) return null;
|
|
5062
5076
|
const y = async () => {
|
|
5063
|
-
if (!(!
|
|
5077
|
+
if (!(!a || !d.isValid)) {
|
|
5064
5078
|
l(!0);
|
|
5065
5079
|
try {
|
|
5066
|
-
await r(
|
|
5080
|
+
await r(a) && (i(""), e());
|
|
5067
5081
|
} finally {
|
|
5068
5082
|
l(!1);
|
|
5069
5083
|
}
|
|
5070
5084
|
}
|
|
5071
|
-
}, w = (
|
|
5072
|
-
|
|
5085
|
+
}, w = (u) => {
|
|
5086
|
+
u.target === u.currentTarget && e();
|
|
5073
5087
|
};
|
|
5074
5088
|
return /* @__PURE__ */ n.jsxs(
|
|
5075
5089
|
"div",
|
|
@@ -5176,11 +5190,11 @@ const Ls = [
|
|
|
5176
5190
|
flexShrink: 0,
|
|
5177
5191
|
transition: "all 0.2s ease"
|
|
5178
5192
|
},
|
|
5179
|
-
onMouseOver: (
|
|
5180
|
-
|
|
5193
|
+
onMouseOver: (u) => {
|
|
5194
|
+
u.currentTarget.style.backgroundColor = s.border, u.currentTarget.style.color = s.textPrimary;
|
|
5181
5195
|
},
|
|
5182
|
-
onMouseOut: (
|
|
5183
|
-
|
|
5196
|
+
onMouseOut: (u) => {
|
|
5197
|
+
u.currentTarget.style.backgroundColor = "transparent", u.currentTarget.style.color = s.textTertiary;
|
|
5184
5198
|
},
|
|
5185
5199
|
children: /* @__PURE__ */ n.jsx(Pe, { size: 20 })
|
|
5186
5200
|
}
|
|
@@ -5224,14 +5238,14 @@ const Ls = [
|
|
|
5224
5238
|
type: "url",
|
|
5225
5239
|
id: "avatar-url",
|
|
5226
5240
|
placeholder: "https://example.com/your-avatar.jpg",
|
|
5227
|
-
value:
|
|
5228
|
-
onChange: (
|
|
5241
|
+
value: a,
|
|
5242
|
+
onChange: (u) => i(u.target.value),
|
|
5229
5243
|
style: {
|
|
5230
5244
|
width: "100%",
|
|
5231
5245
|
padding: "14px 16px",
|
|
5232
5246
|
paddingLeft: "44px",
|
|
5233
5247
|
borderRadius: "12px",
|
|
5234
|
-
border: `1.5px solid ${
|
|
5248
|
+
border: `1.5px solid ${d.type === "error" ? s.error : d.type === "success" ? s.success : s.border}`,
|
|
5235
5249
|
backgroundColor: "transparent",
|
|
5236
5250
|
color: s.textPrimary,
|
|
5237
5251
|
fontSize: "15px",
|
|
@@ -5239,13 +5253,13 @@ const Ls = [
|
|
|
5239
5253
|
transition: "all 0.2s ease",
|
|
5240
5254
|
boxSizing: "border-box"
|
|
5241
5255
|
},
|
|
5242
|
-
onFocus: (
|
|
5243
|
-
|
|
5256
|
+
onFocus: (u) => {
|
|
5257
|
+
u.target.style.borderColor = s.accent, u.target.style.boxShadow = `0 0 0 3px ${s.accent}20`;
|
|
5244
5258
|
},
|
|
5245
|
-
onBlur: (
|
|
5246
|
-
|
|
5259
|
+
onBlur: (u) => {
|
|
5260
|
+
u.target.style.borderColor = d.type === "error" ? s.error : d.type === "success" ? s.success : s.border, u.target.style.boxShadow = "none";
|
|
5247
5261
|
},
|
|
5248
|
-
disabled:
|
|
5262
|
+
disabled: o
|
|
5249
5263
|
}
|
|
5250
5264
|
),
|
|
5251
5265
|
/* @__PURE__ */ n.jsx(
|
|
@@ -5262,7 +5276,7 @@ const Ls = [
|
|
|
5262
5276
|
}
|
|
5263
5277
|
)
|
|
5264
5278
|
] }),
|
|
5265
|
-
|
|
5279
|
+
d.message && /* @__PURE__ */ n.jsxs(
|
|
5266
5280
|
"div",
|
|
5267
5281
|
{
|
|
5268
5282
|
style: {
|
|
@@ -5271,18 +5285,18 @@ const Ls = [
|
|
|
5271
5285
|
gap: "6px",
|
|
5272
5286
|
marginTop: "8px",
|
|
5273
5287
|
fontSize: "13px",
|
|
5274
|
-
color:
|
|
5288
|
+
color: d.type === "success" ? s.success : d.type === "error" ? s.error : s.textTertiary
|
|
5275
5289
|
},
|
|
5276
5290
|
children: [
|
|
5277
|
-
|
|
5278
|
-
|
|
5279
|
-
|
|
5280
|
-
|
|
5291
|
+
d.type === "success" && /* @__PURE__ */ n.jsx(ce, { size: 14 }),
|
|
5292
|
+
d.type === "error" && /* @__PURE__ */ n.jsx(le, { size: 14 }),
|
|
5293
|
+
d.type === "warning" && /* @__PURE__ */ n.jsx(le, { size: 14 }),
|
|
5294
|
+
d.message
|
|
5281
5295
|
]
|
|
5282
5296
|
}
|
|
5283
5297
|
)
|
|
5284
5298
|
] }),
|
|
5285
|
-
|
|
5299
|
+
a && d.type === "success" && /* @__PURE__ */ n.jsxs(
|
|
5286
5300
|
"div",
|
|
5287
5301
|
{
|
|
5288
5302
|
style: {
|
|
@@ -5308,7 +5322,7 @@ const Ls = [
|
|
|
5308
5322
|
/* @__PURE__ */ n.jsx(
|
|
5309
5323
|
"img",
|
|
5310
5324
|
{
|
|
5311
|
-
src:
|
|
5325
|
+
src: a,
|
|
5312
5326
|
alt: "Avatar preview",
|
|
5313
5327
|
style: {
|
|
5314
5328
|
width: "80px",
|
|
@@ -5318,8 +5332,8 @@ const Ls = [
|
|
|
5318
5332
|
border: `2px solid ${s.success}40`,
|
|
5319
5333
|
margin: "0 auto"
|
|
5320
5334
|
},
|
|
5321
|
-
onError: (
|
|
5322
|
-
|
|
5335
|
+
onError: (u) => {
|
|
5336
|
+
u.currentTarget.style.display = "none";
|
|
5323
5337
|
}
|
|
5324
5338
|
}
|
|
5325
5339
|
)
|
|
@@ -5345,7 +5359,7 @@ const Ls = [
|
|
|
5345
5359
|
"button",
|
|
5346
5360
|
{
|
|
5347
5361
|
onClick: e,
|
|
5348
|
-
disabled:
|
|
5362
|
+
disabled: o,
|
|
5349
5363
|
style: {
|
|
5350
5364
|
padding: "10px 24px",
|
|
5351
5365
|
borderRadius: "10px",
|
|
@@ -5354,17 +5368,17 @@ const Ls = [
|
|
|
5354
5368
|
color: s.textPrimary,
|
|
5355
5369
|
fontSize: "14px",
|
|
5356
5370
|
fontWeight: 500,
|
|
5357
|
-
cursor:
|
|
5371
|
+
cursor: o ? "not-allowed" : "pointer",
|
|
5358
5372
|
flex: h ? "none" : 1,
|
|
5359
5373
|
minWidth: h ? "100%" : "120px",
|
|
5360
|
-
opacity:
|
|
5374
|
+
opacity: o ? 0.6 : 1,
|
|
5361
5375
|
transition: "all 0.2s ease"
|
|
5362
5376
|
},
|
|
5363
|
-
onMouseOver: (
|
|
5364
|
-
|
|
5377
|
+
onMouseOver: (u) => {
|
|
5378
|
+
o || (u.currentTarget.style.backgroundColor = s.border, u.currentTarget.style.transform = "translateY(-1px)");
|
|
5365
5379
|
},
|
|
5366
|
-
onMouseOut: (
|
|
5367
|
-
|
|
5380
|
+
onMouseOut: (u) => {
|
|
5381
|
+
o || (u.currentTarget.style.backgroundColor = "transparent", u.currentTarget.style.transform = "translateY(0)");
|
|
5368
5382
|
},
|
|
5369
5383
|
children: "Cancel"
|
|
5370
5384
|
}
|
|
@@ -5373,7 +5387,7 @@ const Ls = [
|
|
|
5373
5387
|
"button",
|
|
5374
5388
|
{
|
|
5375
5389
|
onClick: y,
|
|
5376
|
-
disabled:
|
|
5390
|
+
disabled: o || !d.isValid,
|
|
5377
5391
|
style: {
|
|
5378
5392
|
padding: "10px 24px",
|
|
5379
5393
|
borderRadius: "10px",
|
|
@@ -5382,26 +5396,26 @@ const Ls = [
|
|
|
5382
5396
|
color: "#fff",
|
|
5383
5397
|
fontSize: "14px",
|
|
5384
5398
|
fontWeight: 600,
|
|
5385
|
-
cursor:
|
|
5399
|
+
cursor: o || !d.isValid ? "not-allowed" : "pointer",
|
|
5386
5400
|
flex: h ? "none" : 1,
|
|
5387
5401
|
minWidth: h ? "100%" : "140px",
|
|
5388
|
-
opacity:
|
|
5402
|
+
opacity: o || !d.isValid ? 0.6 : 1,
|
|
5389
5403
|
display: "flex",
|
|
5390
5404
|
alignItems: "center",
|
|
5391
5405
|
justifyContent: "center",
|
|
5392
5406
|
gap: "8px",
|
|
5393
5407
|
transition: "all 0.2s ease",
|
|
5394
|
-
boxShadow:
|
|
5408
|
+
boxShadow: o || !d.isValid ? "none" : `0 4px 12px ${s.accent}40`
|
|
5395
5409
|
},
|
|
5396
|
-
onMouseOver: (
|
|
5397
|
-
!
|
|
5410
|
+
onMouseOver: (u) => {
|
|
5411
|
+
!o && d.isValid && (u.currentTarget.style.transform = "translateY(-1px)", u.currentTarget.style.boxShadow = `0 6px 20px ${s.accent}60`);
|
|
5398
5412
|
},
|
|
5399
|
-
onMouseOut: (
|
|
5400
|
-
!
|
|
5413
|
+
onMouseOut: (u) => {
|
|
5414
|
+
!o && d.isValid && (u.currentTarget.style.transform = "translateY(0)", u.currentTarget.style.boxShadow = `0 4px 12px ${s.accent}40`);
|
|
5401
5415
|
},
|
|
5402
|
-
children:
|
|
5416
|
+
children: o ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
5403
5417
|
/* @__PURE__ */ n.jsx(
|
|
5404
|
-
|
|
5418
|
+
ae,
|
|
5405
5419
|
{
|
|
5406
5420
|
size: 16,
|
|
5407
5421
|
style: {
|
|
@@ -5479,14 +5493,14 @@ const Ls = [
|
|
|
5479
5493
|
onClose: e,
|
|
5480
5494
|
onSuccess: r,
|
|
5481
5495
|
onError: s,
|
|
5482
|
-
userId:
|
|
5496
|
+
userId: a,
|
|
5483
5497
|
colors: i
|
|
5484
5498
|
}) => {
|
|
5485
|
-
const { baseUrl:
|
|
5499
|
+
const { baseUrl: o, apiKey: l, appId: h } = ue(), [c, d] = O({
|
|
5486
5500
|
currentPassword: "",
|
|
5487
5501
|
newPassword: "",
|
|
5488
5502
|
confirmPassword: ""
|
|
5489
|
-
}), [b, y] = O({}), [w,
|
|
5503
|
+
}), [b, y] = O({}), [w, u] = O(!1), [j, m] = O({
|
|
5490
5504
|
currentPassword: !1,
|
|
5491
5505
|
newPassword: !1,
|
|
5492
5506
|
confirmPassword: !1
|
|
@@ -5500,7 +5514,7 @@ const Ls = [
|
|
|
5500
5514
|
}, []), !t) return null;
|
|
5501
5515
|
const A = (v) => {
|
|
5502
5516
|
const { name: U, value: q } = v.target;
|
|
5503
|
-
|
|
5517
|
+
d((F) => ({ ...F, [U]: q })), b[U] && y((F) => ({ ...F, [U]: "" }));
|
|
5504
5518
|
}, C = (v) => {
|
|
5505
5519
|
m((U) => ({ ...U, [v]: !U[v] }));
|
|
5506
5520
|
}, M = () => {
|
|
@@ -5508,10 +5522,10 @@ const Ls = [
|
|
|
5508
5522
|
return c.currentPassword || (v.currentPassword = "Current password is required"), c.newPassword ? c.newPassword.length < 6 && (v.newPassword = "Password must be at least 6 characters") : v.newPassword = "New password is required", c.newPassword !== c.confirmPassword && (v.confirmPassword = "Passwords do not match"), y(v), Object.keys(v).length === 0;
|
|
5509
5523
|
}, g = async (v) => {
|
|
5510
5524
|
if (v.preventDefault(), !!M()) {
|
|
5511
|
-
|
|
5525
|
+
u(!0);
|
|
5512
5526
|
try {
|
|
5513
5527
|
const { data: U } = await W.put(
|
|
5514
|
-
`${
|
|
5528
|
+
`${o}/users/change-password/${a}`,
|
|
5515
5529
|
{
|
|
5516
5530
|
appId: h,
|
|
5517
5531
|
currentPassword: c.currentPassword,
|
|
@@ -5523,7 +5537,7 @@ const Ls = [
|
|
|
5523
5537
|
}
|
|
5524
5538
|
}
|
|
5525
5539
|
);
|
|
5526
|
-
U.success ? (r(U.message || "Password updated successfully"),
|
|
5540
|
+
U.success ? (r(U.message || "Password updated successfully"), d({
|
|
5527
5541
|
currentPassword: "",
|
|
5528
5542
|
newPassword: "",
|
|
5529
5543
|
confirmPassword: ""
|
|
@@ -5531,7 +5545,7 @@ const Ls = [
|
|
|
5531
5545
|
} catch (U) {
|
|
5532
5546
|
s(U.response?.data?.message || "Something went wrong");
|
|
5533
5547
|
} finally {
|
|
5534
|
-
|
|
5548
|
+
u(!1);
|
|
5535
5549
|
}
|
|
5536
5550
|
}
|
|
5537
5551
|
}, I = [
|
|
@@ -5859,7 +5873,7 @@ const Ls = [
|
|
|
5859
5873
|
},
|
|
5860
5874
|
children: w ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
5861
5875
|
/* @__PURE__ */ n.jsx(
|
|
5862
|
-
|
|
5876
|
+
ae,
|
|
5863
5877
|
{
|
|
5864
5878
|
size: 16,
|
|
5865
5879
|
style: {
|
|
@@ -5924,24 +5938,24 @@ const Ls = [
|
|
|
5924
5938
|
onClose: e,
|
|
5925
5939
|
onVerify: r,
|
|
5926
5940
|
onSendOTP: s,
|
|
5927
|
-
verifyFormData:
|
|
5941
|
+
verifyFormData: a,
|
|
5928
5942
|
setVerifyFormData: i,
|
|
5929
|
-
otpSent:
|
|
5943
|
+
otpSent: o,
|
|
5930
5944
|
verifying: l,
|
|
5931
5945
|
user: h,
|
|
5932
5946
|
colors: c,
|
|
5933
|
-
darkMode:
|
|
5947
|
+
darkMode: d
|
|
5934
5948
|
}) => {
|
|
5935
5949
|
if (!t) return null;
|
|
5936
5950
|
const b = () => {
|
|
5937
|
-
e(), i({ email: h?.email || "", otp: "", appId:
|
|
5951
|
+
e(), i({ email: h?.email || "", otp: "", appId: a.appId });
|
|
5938
5952
|
};
|
|
5939
5953
|
return /* @__PURE__ */ n.jsxs(
|
|
5940
5954
|
"div",
|
|
5941
5955
|
{
|
|
5942
5956
|
className: "modal-overlay",
|
|
5943
5957
|
style: {
|
|
5944
|
-
backgroundColor:
|
|
5958
|
+
backgroundColor: d ? "rgba(0, 0, 0, 0.8)" : "rgba(0, 0, 0, 0.5)"
|
|
5945
5959
|
},
|
|
5946
5960
|
children: [
|
|
5947
5961
|
/* @__PURE__ */ n.jsxs(
|
|
@@ -5975,7 +5989,7 @@ const Ls = [
|
|
|
5975
5989
|
"input",
|
|
5976
5990
|
{
|
|
5977
5991
|
type: "email",
|
|
5978
|
-
value:
|
|
5992
|
+
value: a.email,
|
|
5979
5993
|
onChange: (y) => i((w) => ({ ...w, email: y.target.value })),
|
|
5980
5994
|
placeholder: "Enter your email",
|
|
5981
5995
|
style: {
|
|
@@ -5990,7 +6004,7 @@ const Ls = [
|
|
|
5990
6004
|
)
|
|
5991
6005
|
] })
|
|
5992
6006
|
] }),
|
|
5993
|
-
|
|
6007
|
+
o && /* @__PURE__ */ n.jsxs("div", { className: "form-group", children: [
|
|
5994
6008
|
/* @__PURE__ */ n.jsx("label", { style: { color: c.textSecondary }, children: "OTP" }),
|
|
5995
6009
|
/* @__PURE__ */ n.jsxs("div", { className: "input-container", children: [
|
|
5996
6010
|
/* @__PURE__ */ n.jsx(cr, { size: 18, style: { color: c.textTertiary }, "aria-hidden": "true" }),
|
|
@@ -5998,7 +6012,7 @@ const Ls = [
|
|
|
5998
6012
|
"input",
|
|
5999
6013
|
{
|
|
6000
6014
|
type: "text",
|
|
6001
|
-
value:
|
|
6015
|
+
value: a.otp,
|
|
6002
6016
|
onChange: (y) => i((w) => ({ ...w, otp: y.target.value })),
|
|
6003
6017
|
placeholder: "Enter OTP",
|
|
6004
6018
|
style: {
|
|
@@ -6013,7 +6027,7 @@ const Ls = [
|
|
|
6013
6027
|
)
|
|
6014
6028
|
] })
|
|
6015
6029
|
] }),
|
|
6016
|
-
/* @__PURE__ */ n.jsx("div", { className: "modal-actions", children:
|
|
6030
|
+
/* @__PURE__ */ n.jsx("div", { className: "modal-actions", children: o ? /* @__PURE__ */ n.jsxs(
|
|
6017
6031
|
"button",
|
|
6018
6032
|
{
|
|
6019
6033
|
type: "submit",
|
|
@@ -6025,7 +6039,7 @@ const Ls = [
|
|
|
6025
6039
|
},
|
|
6026
6040
|
"aria-label": l ? "Verifying email" : "Verify email",
|
|
6027
6041
|
children: [
|
|
6028
|
-
l ? /* @__PURE__ */ n.jsx(
|
|
6042
|
+
l ? /* @__PURE__ */ n.jsx(ae, { size: 16, className: "spinner", "aria-hidden": "true" }) : /* @__PURE__ */ n.jsx(ce, { size: 16, "aria-hidden": "true" }),
|
|
6029
6043
|
l ? "Verifying..." : "Verify Email"
|
|
6030
6044
|
]
|
|
6031
6045
|
}
|
|
@@ -6042,7 +6056,7 @@ const Ls = [
|
|
|
6042
6056
|
},
|
|
6043
6057
|
"aria-label": l ? "Sending OTP" : "Send OTP",
|
|
6044
6058
|
children: [
|
|
6045
|
-
l ? /* @__PURE__ */ n.jsx(
|
|
6059
|
+
l ? /* @__PURE__ */ n.jsx(ae, { size: 16, className: "spinner", "aria-hidden": "true" }) : /* @__PURE__ */ n.jsx(ut, { size: 16, "aria-hidden": "true" }),
|
|
6046
6060
|
l ? "Sending..." : "Send OTP"
|
|
6047
6061
|
]
|
|
6048
6062
|
}
|
|
@@ -6100,7 +6114,7 @@ const Ls = [
|
|
|
6100
6114
|
}
|
|
6101
6115
|
|
|
6102
6116
|
.close-btn:hover {
|
|
6103
|
-
background-color: ${
|
|
6117
|
+
background-color: ${d ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)"};
|
|
6104
6118
|
}
|
|
6105
6119
|
|
|
6106
6120
|
.verify-form {
|
|
@@ -6202,16 +6216,16 @@ const Ls = [
|
|
|
6202
6216
|
]
|
|
6203
6217
|
}
|
|
6204
6218
|
);
|
|
6205
|
-
},
|
|
6219
|
+
}, ga = ({
|
|
6206
6220
|
token: t,
|
|
6207
6221
|
user: e = null,
|
|
6208
6222
|
darkMode: r = !0,
|
|
6209
6223
|
homeUrl: s,
|
|
6210
|
-
onLogout:
|
|
6224
|
+
onLogout: a,
|
|
6211
6225
|
onVerify: i,
|
|
6212
|
-
primaryColor:
|
|
6226
|
+
primaryColor: o = "#00C212"
|
|
6213
6227
|
}) => {
|
|
6214
|
-
const { baseUrl: l, apiKey: h, appId: c } =
|
|
6228
|
+
const { baseUrl: l, apiKey: h, appId: c } = ue(), [d, b] = O(null), [y, w] = O(e), [u, j] = O(!0), [m, _] = O(!1), [R, A] = O(!1), [C, M] = O(!1), [g, I] = O(!1), [v, U] = O(!1), [q, F] = O(!1), [V, Z] = O(!1), [T, J] = O(!1), [z, P] = O(null), [K, Q] = O(!1), [X, f] = O({
|
|
6215
6229
|
email: "",
|
|
6216
6230
|
otp: "",
|
|
6217
6231
|
appId: c
|
|
@@ -6260,7 +6274,7 @@ const Ls = [
|
|
|
6260
6274
|
} finally {
|
|
6261
6275
|
$(!1);
|
|
6262
6276
|
}
|
|
6263
|
-
},
|
|
6277
|
+
}, pe = async (E) => {
|
|
6264
6278
|
if (E.preventDefault(), !X.email || !X.otp) {
|
|
6265
6279
|
N("error", "Please fill in all fields");
|
|
6266
6280
|
return;
|
|
@@ -6352,8 +6366,8 @@ const Ls = [
|
|
|
6352
6366
|
y?.email && f((E) => ({ ...E, email: y.email }));
|
|
6353
6367
|
}, [y?.email]);
|
|
6354
6368
|
const ft = (E, H) => {
|
|
6355
|
-
let G = parseInt(E.replace("#", ""), 16),
|
|
6356
|
-
return
|
|
6369
|
+
let G = parseInt(E.replace("#", ""), 16), fe = (G >> 16) + H, He = (G >> 8 & 255) + H, Ve = (G & 255) + H;
|
|
6370
|
+
return fe = Math.min(255, Math.max(0, fe)), He = Math.min(255, Math.max(0, He)), Ve = Math.min(255, Math.max(0, Ve)), `#${(Ve | He << 8 | fe << 16).toString(16).padStart(6, "0")}`;
|
|
6357
6371
|
}, D = r ? {
|
|
6358
6372
|
background: "#000000",
|
|
6359
6373
|
surface: "#09090b",
|
|
@@ -6362,8 +6376,8 @@ const Ls = [
|
|
|
6362
6376
|
textPrimary: "#ffffff",
|
|
6363
6377
|
textSecondary: "#d4d4d8",
|
|
6364
6378
|
textTertiary: "#a1a1aa",
|
|
6365
|
-
accent:
|
|
6366
|
-
accentHover: ft(
|
|
6379
|
+
accent: o,
|
|
6380
|
+
accentHover: ft(o, -15),
|
|
6367
6381
|
success: "#10b981",
|
|
6368
6382
|
error: "#ef4444",
|
|
6369
6383
|
border: "#27272a",
|
|
@@ -6376,14 +6390,14 @@ const Ls = [
|
|
|
6376
6390
|
textPrimary: "#18181b",
|
|
6377
6391
|
textSecondary: "#52525b",
|
|
6378
6392
|
textTertiary: "#71717a",
|
|
6379
|
-
accent:
|
|
6380
|
-
accentHover: ft(
|
|
6393
|
+
accent: o,
|
|
6394
|
+
accentHover: ft(o, -15),
|
|
6381
6395
|
success: "#10b981",
|
|
6382
6396
|
error: "#ef4444",
|
|
6383
6397
|
border: "#e4e4e7",
|
|
6384
6398
|
warning: "#d97706"
|
|
6385
6399
|
};
|
|
6386
|
-
if (
|
|
6400
|
+
if (u)
|
|
6387
6401
|
return /* @__PURE__ */ n.jsx(
|
|
6388
6402
|
"div",
|
|
6389
6403
|
{
|
|
@@ -6408,7 +6422,7 @@ const Ls = [
|
|
|
6408
6422
|
},
|
|
6409
6423
|
children: [
|
|
6410
6424
|
/* @__PURE__ */ n.jsx(
|
|
6411
|
-
|
|
6425
|
+
ae,
|
|
6412
6426
|
{
|
|
6413
6427
|
size: 40,
|
|
6414
6428
|
color: D.accent,
|
|
@@ -6551,14 +6565,14 @@ const Ls = [
|
|
|
6551
6565
|
display: "grid",
|
|
6552
6566
|
gap: "24px",
|
|
6553
6567
|
gridTemplateColumns: "1fr",
|
|
6554
|
-
...
|
|
6568
|
+
...d && window.innerWidth >= 1024 && {
|
|
6555
6569
|
gridTemplateColumns: "1fr 2fr",
|
|
6556
6570
|
gap: "10px"
|
|
6557
6571
|
},
|
|
6558
|
-
...
|
|
6572
|
+
...d && window.innerWidth >= 768 && d && window.innerWidth < 1024 && {
|
|
6559
6573
|
gap: "10px"
|
|
6560
6574
|
},
|
|
6561
|
-
...
|
|
6575
|
+
...d && window.innerWidth >= 600 && d && window.innerWidth < 768 && {
|
|
6562
6576
|
gap: "28px"
|
|
6563
6577
|
}
|
|
6564
6578
|
},
|
|
@@ -6743,7 +6757,7 @@ const Ls = [
|
|
|
6743
6757
|
gap: "8px",
|
|
6744
6758
|
textDecoration: "none",
|
|
6745
6759
|
minHeight: "36px",
|
|
6746
|
-
flex:
|
|
6760
|
+
flex: d && window.innerWidth < 1024 ? "1" : "auto"
|
|
6747
6761
|
},
|
|
6748
6762
|
children: [
|
|
6749
6763
|
/* @__PURE__ */ n.jsx(Pe, { size: 16, "aria-hidden": "true" }),
|
|
@@ -6773,11 +6787,11 @@ const Ls = [
|
|
|
6773
6787
|
gap: "8px",
|
|
6774
6788
|
textDecoration: "none",
|
|
6775
6789
|
minHeight: "36px",
|
|
6776
|
-
flex:
|
|
6790
|
+
flex: d && window.innerWidth < 1024 ? "1" : "auto"
|
|
6777
6791
|
},
|
|
6778
6792
|
children: [
|
|
6779
6793
|
R ? /* @__PURE__ */ n.jsx(
|
|
6780
|
-
|
|
6794
|
+
ae,
|
|
6781
6795
|
{
|
|
6782
6796
|
size: 16,
|
|
6783
6797
|
style: { animation: "spin 1s linear infinite" },
|
|
@@ -6809,7 +6823,7 @@ const Ls = [
|
|
|
6809
6823
|
gap: "8px",
|
|
6810
6824
|
textDecoration: "none",
|
|
6811
6825
|
minHeight: "36px",
|
|
6812
|
-
flex:
|
|
6826
|
+
flex: d && window.innerWidth < 1024 ? "1" : "auto"
|
|
6813
6827
|
},
|
|
6814
6828
|
children: [
|
|
6815
6829
|
/* @__PURE__ */ n.jsx(Es, { size: 16, "aria-hidden": "true" }),
|
|
@@ -6839,11 +6853,11 @@ const Ls = [
|
|
|
6839
6853
|
gap: "8px",
|
|
6840
6854
|
minHeight: "36px",
|
|
6841
6855
|
opacity: K ? 0.7 : 1,
|
|
6842
|
-
flex:
|
|
6856
|
+
flex: d && window.innerWidth < 1024 ? "1" : "auto"
|
|
6843
6857
|
},
|
|
6844
6858
|
children: [
|
|
6845
6859
|
K ? /* @__PURE__ */ n.jsx(
|
|
6846
|
-
|
|
6860
|
+
ae,
|
|
6847
6861
|
{
|
|
6848
6862
|
size: 14,
|
|
6849
6863
|
style: { animation: "spin 1s linear infinite" },
|
|
@@ -6879,7 +6893,7 @@ const Ls = [
|
|
|
6879
6893
|
},
|
|
6880
6894
|
onClick: () => Z(!V),
|
|
6881
6895
|
children: [
|
|
6882
|
-
/* @__PURE__ */ n.jsx(
|
|
6896
|
+
/* @__PURE__ */ n.jsx(os, { size: 16, "aria-hidden": "true" }),
|
|
6883
6897
|
"More Actions"
|
|
6884
6898
|
]
|
|
6885
6899
|
}
|
|
@@ -6932,11 +6946,11 @@ const Ls = [
|
|
|
6932
6946
|
]
|
|
6933
6947
|
}
|
|
6934
6948
|
),
|
|
6935
|
-
|
|
6949
|
+
a && /* @__PURE__ */ n.jsxs(
|
|
6936
6950
|
"button",
|
|
6937
6951
|
{
|
|
6938
6952
|
onClick: () => {
|
|
6939
|
-
|
|
6953
|
+
a(), Y();
|
|
6940
6954
|
},
|
|
6941
6955
|
style: {
|
|
6942
6956
|
width: "100%",
|
|
@@ -7049,7 +7063,7 @@ const Ls = [
|
|
|
7049
7063
|
display: "grid",
|
|
7050
7064
|
gap: "20px",
|
|
7051
7065
|
gridTemplateColumns: "1fr",
|
|
7052
|
-
...
|
|
7066
|
+
...d && window.innerWidth >= 600 && {
|
|
7053
7067
|
gridTemplateColumns: "1fr 1fr",
|
|
7054
7068
|
gap: "20px"
|
|
7055
7069
|
}
|
|
@@ -7089,12 +7103,12 @@ const Ls = [
|
|
|
7089
7103
|
name: E.name,
|
|
7090
7104
|
value: y[E.name],
|
|
7091
7105
|
onChange: (G) => w(
|
|
7092
|
-
(
|
|
7106
|
+
(fe) => fe && { ...fe, [G.target.name]: G.target.value }
|
|
7093
7107
|
),
|
|
7094
7108
|
style: {
|
|
7095
7109
|
padding: "12px",
|
|
7096
7110
|
borderRadius: "8px",
|
|
7097
|
-
border: `1px solid ${
|
|
7111
|
+
border: `1px solid ${o}`,
|
|
7098
7112
|
backgroundColor: "transparent",
|
|
7099
7113
|
color: D.textPrimary,
|
|
7100
7114
|
fontSize: "12px",
|
|
@@ -7312,7 +7326,7 @@ const Ls = [
|
|
|
7312
7326
|
onClose: () => {
|
|
7313
7327
|
F(!1), x(!1), f({ email: y?.email || "", otp: "", appId: c });
|
|
7314
7328
|
},
|
|
7315
|
-
onVerify:
|
|
7329
|
+
onVerify: pe,
|
|
7316
7330
|
onSendOTP: se,
|
|
7317
7331
|
verifyFormData: X,
|
|
7318
7332
|
setVerifyFormData: f,
|
|
@@ -7415,27 +7429,27 @@ const Ls = [
|
|
|
7415
7429
|
]
|
|
7416
7430
|
}
|
|
7417
7431
|
);
|
|
7418
|
-
},
|
|
7432
|
+
}, ma = ({
|
|
7419
7433
|
darkMode: t = !0,
|
|
7420
7434
|
primaryColor: e = "#3b82f6",
|
|
7421
7435
|
onLogout: r,
|
|
7422
7436
|
varient: s = "classic",
|
|
7423
|
-
propUser:
|
|
7437
|
+
propUser: a,
|
|
7424
7438
|
className: i = "",
|
|
7425
7439
|
// New URL props with defaults
|
|
7426
|
-
profileUrl:
|
|
7440
|
+
profileUrl: o,
|
|
7427
7441
|
settingsUrl: l,
|
|
7428
7442
|
// Menu item visibility with defaults
|
|
7429
7443
|
showProfileMenuItem: h = !0,
|
|
7430
7444
|
showSettingsMenuItem: c = !0,
|
|
7431
|
-
showViewProfileMenuItem:
|
|
7445
|
+
showViewProfileMenuItem: d = !0,
|
|
7432
7446
|
// Custom labels with defaults
|
|
7433
7447
|
profileLabel: b = "My Profile",
|
|
7434
7448
|
settingsLabel: y = "Settings",
|
|
7435
7449
|
viewProfileLabel: w = "View Profile",
|
|
7436
|
-
logoutLabel:
|
|
7450
|
+
logoutLabel: u = "Sign Out"
|
|
7437
7451
|
}) => {
|
|
7438
|
-
const { baseUrl: j, apiKey: m, appId: _ } =
|
|
7452
|
+
const { baseUrl: j, apiKey: m, appId: _ } = ue(), [R, A] = O(!1), [C, M] = O(null), [g, I] = O(!0), [v, U] = O(null), q = xt(null), F = xt(null), [V, Z] = O(!1), [T, J] = O(!1);
|
|
7439
7453
|
te(() => {
|
|
7440
7454
|
if (typeof window > "u") return;
|
|
7441
7455
|
const x = () => {
|
|
@@ -7445,10 +7459,10 @@ const Ls = [
|
|
|
7445
7459
|
}, []), te(() => {
|
|
7446
7460
|
(async () => {
|
|
7447
7461
|
try {
|
|
7448
|
-
if (I(!0), U(null),
|
|
7449
|
-
if (!
|
|
7462
|
+
if (I(!0), U(null), a) {
|
|
7463
|
+
if (!a.id || !a.name || !a.email)
|
|
7450
7464
|
throw new Error("Invalid user data provided");
|
|
7451
|
-
M(
|
|
7465
|
+
M(a);
|
|
7452
7466
|
} else if (typeof window < "u") {
|
|
7453
7467
|
const k = localStorage.getItem("userInfo");
|
|
7454
7468
|
if (k)
|
|
@@ -7467,13 +7481,13 @@ const Ls = [
|
|
|
7467
7481
|
I(!1);
|
|
7468
7482
|
}
|
|
7469
7483
|
})();
|
|
7470
|
-
}, [
|
|
7484
|
+
}, [a]), te(() => {
|
|
7471
7485
|
if (typeof window > "u") return;
|
|
7472
7486
|
const x = () => {
|
|
7473
7487
|
if (!R || !F.current) return;
|
|
7474
|
-
const k = F.current.getBoundingClientRect(), $ = window.innerWidth, N = window.innerHeight, Y = 280, se = $ - k.right,
|
|
7488
|
+
const k = F.current.getBoundingClientRect(), $ = window.innerWidth, N = window.innerHeight, Y = 280, se = $ - k.right, pe = k.left;
|
|
7475
7489
|
N - k.bottom;
|
|
7476
|
-
const ve = se >= Y || se >
|
|
7490
|
+
const ve = se >= Y || se > pe;
|
|
7477
7491
|
Z(ve);
|
|
7478
7492
|
};
|
|
7479
7493
|
return x(), window.addEventListener("resize", x), () => window.removeEventListener("resize", x);
|
|
@@ -7714,7 +7728,7 @@ const Ls = [
|
|
|
7714
7728
|
if (x) {
|
|
7715
7729
|
const k = JSON.parse(x);
|
|
7716
7730
|
M(k);
|
|
7717
|
-
} else
|
|
7731
|
+
} else a && M(a);
|
|
7718
7732
|
} catch (x) {
|
|
7719
7733
|
console.error("Retry failed:", x), U("Invalid user data"), localStorage.removeItem("userInfo"), M(null);
|
|
7720
7734
|
} finally {
|
|
@@ -7722,7 +7736,7 @@ const Ls = [
|
|
|
7722
7736
|
}
|
|
7723
7737
|
}, Q = (x, k) => {
|
|
7724
7738
|
(x.key === "Enter" || x.key === " ") && (x.preventDefault(), k());
|
|
7725
|
-
}, X = () =>
|
|
7739
|
+
}, X = () => o || C?.profileUrl, f = () => {
|
|
7726
7740
|
const x = X();
|
|
7727
7741
|
x && window.open(x, "_self", "noopener,noreferrer");
|
|
7728
7742
|
}, S = () => {
|
|
@@ -7754,8 +7768,8 @@ const Ls = [
|
|
|
7754
7768
|
src: C.avatarUrl,
|
|
7755
7769
|
alt: `${C?.name || "User"}'s avatar`,
|
|
7756
7770
|
style: {
|
|
7757
|
-
width: T ? "34px" : "
|
|
7758
|
-
height: T ? "34px" : "
|
|
7771
|
+
width: T ? "34px" : "36px",
|
|
7772
|
+
height: T ? "34px" : "36px",
|
|
7759
7773
|
borderRadius: "50%",
|
|
7760
7774
|
objectFit: "cover",
|
|
7761
7775
|
border: `2px solid ${z.borderLight}`,
|
|
@@ -7915,7 +7929,7 @@ const Ls = [
|
|
|
7915
7929
|
]
|
|
7916
7930
|
}
|
|
7917
7931
|
),
|
|
7918
|
-
|
|
7932
|
+
d && C.profileUrl && /* @__PURE__ */ n.jsxs(
|
|
7919
7933
|
"a",
|
|
7920
7934
|
{
|
|
7921
7935
|
href: C.profileUrl,
|
|
@@ -7959,7 +7973,7 @@ const Ls = [
|
|
|
7959
7973
|
"aria-hidden": "true"
|
|
7960
7974
|
}
|
|
7961
7975
|
),
|
|
7962
|
-
/* @__PURE__ */ n.jsx("span", { style: P.menuItemText, children:
|
|
7976
|
+
/* @__PURE__ */ n.jsx("span", { style: P.menuItemText, children: u })
|
|
7963
7977
|
]
|
|
7964
7978
|
}
|
|
7965
7979
|
) })
|
|
@@ -7992,17 +8006,17 @@ const Ls = [
|
|
|
7992
8006
|
]
|
|
7993
8007
|
}
|
|
7994
8008
|
);
|
|
7995
|
-
},
|
|
8009
|
+
}, ya = ({
|
|
7996
8010
|
user: t,
|
|
7997
8011
|
darkMode: e = !0,
|
|
7998
8012
|
primaryColor: r = "#00C212",
|
|
7999
8013
|
onVerify: s
|
|
8000
8014
|
}) => {
|
|
8001
|
-
const { appId:
|
|
8015
|
+
const { appId: a, baseUrl: i, apiKey: o } = ue(), [l, h] = O({
|
|
8002
8016
|
email: t?.email || "",
|
|
8003
8017
|
otp: "",
|
|
8004
|
-
appId:
|
|
8005
|
-
}), [c,
|
|
8018
|
+
appId: a
|
|
8019
|
+
}), [c, d] = O(!1), [b, y] = O(!1), [w, u] = O(null), j = (g, I) => {
|
|
8006
8020
|
let v = parseInt(g.replace("#", ""), 16), U = (v >> 16) + I, q = (v >> 8 & 255) + I, F = (v & 255) + I;
|
|
8007
8021
|
return U = Math.min(255, Math.max(0, U)), q = Math.min(255, Math.max(0, q)), F = Math.min(255, Math.max(0, F)), `#${(F | q << 8 | U << 16).toString(16).padStart(6, "0")}`;
|
|
8008
8022
|
}, m = e ? {
|
|
@@ -8032,7 +8046,7 @@ const Ls = [
|
|
|
8032
8046
|
t?.email && h((g) => ({ ...g, email: t.email }));
|
|
8033
8047
|
}, [t?.email]);
|
|
8034
8048
|
const _ = (g, I) => {
|
|
8035
|
-
|
|
8049
|
+
u({ type: g, message: I }), setTimeout(() => u(null), 3e3);
|
|
8036
8050
|
}, R = async () => {
|
|
8037
8051
|
if (!l.email || !/\S+@\S+\.\S+/.test(l.email)) {
|
|
8038
8052
|
_("error", "Please enter a valid email");
|
|
@@ -8043,9 +8057,9 @@ const Ls = [
|
|
|
8043
8057
|
const g = await W.post(
|
|
8044
8058
|
`${i}/users/send-verify-otp/${t?.id}`,
|
|
8045
8059
|
{ email: l.email },
|
|
8046
|
-
{ headers: { "x-api-key":
|
|
8060
|
+
{ headers: { "x-api-key": o, "x-app-id": a } }
|
|
8047
8061
|
);
|
|
8048
|
-
g.data.success ? (_("success", g.data.message || "OTP sent!"),
|
|
8062
|
+
g.data.success ? (_("success", g.data.message || "OTP sent!"), d(!0)) : _("error", g.data.message || "Failed to send OTP");
|
|
8049
8063
|
} catch (g) {
|
|
8050
8064
|
_("error", g.response?.data?.message || "Server error");
|
|
8051
8065
|
} finally {
|
|
@@ -8061,7 +8075,7 @@ const Ls = [
|
|
|
8061
8075
|
const I = await W.post(`${i}/users/verify-email`, l);
|
|
8062
8076
|
if (I.data.success && t) {
|
|
8063
8077
|
const v = { ...t, isVerified: !0 };
|
|
8064
|
-
s?.(v), _("success", I.data.message || "Email verified!"),
|
|
8078
|
+
s?.(v), _("success", I.data.message || "Email verified!"), d(!1), h({ email: t.email, otp: "", appId: a });
|
|
8065
8079
|
} else
|
|
8066
8080
|
_("error", I.data.message || "Verification failed");
|
|
8067
8081
|
} catch (I) {
|
|
@@ -8192,7 +8206,7 @@ const Ls = [
|
|
|
8192
8206
|
] })
|
|
8193
8207
|
] }),
|
|
8194
8208
|
/* @__PURE__ */ n.jsx("div", { style: { display: "flex", gap: 12 }, children: c ? /* @__PURE__ */ n.jsxs("button", { type: "submit", disabled: b, style: M(b), children: [
|
|
8195
|
-
b ? /* @__PURE__ */ n.jsx(
|
|
8209
|
+
b ? /* @__PURE__ */ n.jsx(ae, { size: 16, className: "spinner" }) : /* @__PURE__ */ n.jsx(ce, { size: 16 }),
|
|
8196
8210
|
b ? "Verifying..." : "Verify Email"
|
|
8197
8211
|
] }) : /* @__PURE__ */ n.jsxs(
|
|
8198
8212
|
"button",
|
|
@@ -8202,7 +8216,7 @@ const Ls = [
|
|
|
8202
8216
|
disabled: b,
|
|
8203
8217
|
style: M(b),
|
|
8204
8218
|
children: [
|
|
8205
|
-
b ? /* @__PURE__ */ n.jsx(
|
|
8219
|
+
b ? /* @__PURE__ */ n.jsx(ae, { size: 16, className: "spinner" }) : /* @__PURE__ */ n.jsx(ut, { size: 16 }),
|
|
8206
8220
|
b ? "Sending..." : "Send OTP"
|
|
8207
8221
|
]
|
|
8208
8222
|
}
|
|
@@ -8212,14 +8226,14 @@ const Ls = [
|
|
|
8212
8226
|
);
|
|
8213
8227
|
};
|
|
8214
8228
|
export {
|
|
8215
|
-
|
|
8216
|
-
|
|
8217
|
-
|
|
8218
|
-
|
|
8219
|
-
|
|
8220
|
-
|
|
8221
|
-
|
|
8222
|
-
|
|
8223
|
-
|
|
8224
|
-
|
|
8229
|
+
da as NeuctraAuthix,
|
|
8230
|
+
ya as ReactEmailVerification,
|
|
8231
|
+
xa as ReactSignedIn,
|
|
8232
|
+
ha as ReactSignedOut,
|
|
8233
|
+
ma as ReactUserButton,
|
|
8234
|
+
fa as ReactUserLogin,
|
|
8235
|
+
ga as ReactUserProfile,
|
|
8236
|
+
pa as ReactUserSignUp,
|
|
8237
|
+
ue as getSdkConfig,
|
|
8238
|
+
ua as setSdkConfig
|
|
8225
8239
|
};
|