@neuctra/authix 1.1.55 → 1.1.57
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 +993 -1006
- package/dist/neuctra-authix.umd.js +31 -31
- package/dist/react/Provider/AuthixProvider.d.ts +3 -3
- package/dist/react/Provider/AuthixProvider.d.ts.map +1 -1
- package/dist/react/SignedIn.d.ts +1 -10
- package/dist/react/SignedIn.d.ts.map +1 -1
- package/dist/react/SignedOut.d.ts +1 -9
- package/dist/react/SignedOut.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import Le, { forwardRef as Nt, createElement as Xe, useState as P,
|
|
1
|
+
import Le, { forwardRef as Nt, createElement as Xe, useState as P, createContext as hr, useContext as gr, useEffect as te, useRef as xt } from "react";
|
|
2
2
|
function Dt(t, e) {
|
|
3
3
|
return function() {
|
|
4
4
|
return t.apply(e, arguments);
|
|
5
5
|
};
|
|
6
6
|
}
|
|
7
|
-
const { toString:
|
|
8
|
-
const r =
|
|
7
|
+
const { toString: mr } = Object.prototype, { getPrototypeOf: st } = Object, { iterator: Fe, toStringTag: Ut } = Symbol, qe = /* @__PURE__ */ ((t) => (e) => {
|
|
8
|
+
const r = mr.call(e);
|
|
9
9
|
return t[r] || (t[r] = r.slice(8, -1).toLowerCase());
|
|
10
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
10
|
+
})(/* @__PURE__ */ Object.create(null)), ie = (t) => (t = t.toLowerCase(), (e) => qe(e) === t), Me = (t) => (e) => typeof e === t, { isArray: we } = Array, ye = Me("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 =
|
|
15
|
-
function
|
|
14
|
+
const Lt = ie("ArrayBuffer");
|
|
15
|
+
function yr(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;
|
|
18
18
|
}
|
|
19
|
-
const
|
|
19
|
+
const br = Me("string"), re = Me("function"), Ft = Me("number"), Te = (t) => t !== null && typeof t == "object", wr = (t) => t === !0 || t === !1, ze = (t) => {
|
|
20
20
|
if (qe(t) !== "object")
|
|
21
21
|
return !1;
|
|
22
22
|
const e = st(t);
|
|
23
23
|
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(Ut in t) && !(Fe in t);
|
|
24
|
-
},
|
|
24
|
+
}, jr = (t) => {
|
|
25
25
|
if (!Te(t) || Ce(t))
|
|
26
26
|
return !1;
|
|
27
27
|
try {
|
|
@@ -29,11 +29,11 @@ const gr = Me("string"), re = Me("function"), Ft = Me("number"), Te = (t) => t !
|
|
|
29
29
|
} catch {
|
|
30
30
|
return !1;
|
|
31
31
|
}
|
|
32
|
-
},
|
|
32
|
+
}, vr = ie("Date"), Sr = ie("File"), kr = ie("Blob"), Er = ie("FileList"), Cr = (t) => Te(t) && re(t.pipe), Tr = (t) => {
|
|
33
33
|
let e;
|
|
34
34
|
return t && (typeof FormData == "function" && t instanceof FormData || re(t.append) && ((e = qe(t)) === "formdata" || // detect form-data instance
|
|
35
35
|
e === "object" && re(t.toString) && t.toString() === "[object FormData]"));
|
|
36
|
-
},
|
|
36
|
+
}, Rr = ie("URLSearchParams"), [Ir, Pr, Or, Ar] = ["ReadableStream", "Request", "Response", "Headers"].map(ie), zr = (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;
|
|
@@ -44,10 +44,10 @@ function Re(t, e, { allOwnKeys: r = !1 } = {}) {
|
|
|
44
44
|
else {
|
|
45
45
|
if (Ce(t))
|
|
46
46
|
return;
|
|
47
|
-
const
|
|
47
|
+
const o = r ? Object.getOwnPropertyNames(t) : Object.keys(t), i = o.length;
|
|
48
48
|
let l;
|
|
49
|
-
for (s = 0; s <
|
|
50
|
-
l =
|
|
49
|
+
for (s = 0; s < i; s++)
|
|
50
|
+
l = o[s], e.call(null, t[l], l, t);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
function qt(t, e) {
|
|
@@ -63,35 +63,35 @@ function qt(t, e) {
|
|
|
63
63
|
}
|
|
64
64
|
const fe = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Mt = (t) => !ye(t) && t !== fe;
|
|
65
65
|
function Ze() {
|
|
66
|
-
const { caseless: t, skipUndefined: e } = Mt(this) && this || {}, r = {}, s = (a,
|
|
67
|
-
const
|
|
68
|
-
ze(r[
|
|
66
|
+
const { caseless: t, skipUndefined: e } = Mt(this) && this || {}, r = {}, s = (a, o) => {
|
|
67
|
+
const i = t && qt(r, o) || o;
|
|
68
|
+
ze(r[i]) && ze(a) ? r[i] = Ze(r[i], a) : ze(a) ? r[i] = Ze({}, a) : we(a) ? r[i] = a.slice() : (!e || !ye(a)) && (r[i] = a);
|
|
69
69
|
};
|
|
70
|
-
for (let a = 0,
|
|
70
|
+
for (let a = 0, o = arguments.length; a < o; a++)
|
|
71
71
|
arguments[a] && Re(arguments[a], s);
|
|
72
72
|
return r;
|
|
73
73
|
}
|
|
74
|
-
const
|
|
75
|
-
r && re(a) ? t[
|
|
76
|
-
}, { allOwnKeys: s }), t),
|
|
74
|
+
const $r = (t, e, r, { allOwnKeys: s } = {}) => (Re(e, (a, o) => {
|
|
75
|
+
r && re(a) ? t[o] = Dt(a, r) : t[o] = a;
|
|
76
|
+
}, { allOwnKeys: s }), t), _r = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), Nr = (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
|
-
},
|
|
81
|
-
let a,
|
|
80
|
+
}, Dr = (t, e, r, s) => {
|
|
81
|
+
let a, o, i;
|
|
82
82
|
const l = {};
|
|
83
83
|
if (e = e || {}, t == null) return e;
|
|
84
84
|
do {
|
|
85
|
-
for (a = Object.getOwnPropertyNames(t),
|
|
86
|
-
|
|
85
|
+
for (a = Object.getOwnPropertyNames(t), o = a.length; o-- > 0; )
|
|
86
|
+
i = a[o], (!s || s(i, t, e)) && !l[i] && (e[i] = t[i], l[i] = !0);
|
|
87
87
|
t = r !== !1 && st(t);
|
|
88
88
|
} while (t && (!r || r(t, e)) && t !== Object.prototype);
|
|
89
89
|
return e;
|
|
90
|
-
},
|
|
90
|
+
}, Ur = (t, e, r) => {
|
|
91
91
|
t = String(t), (r === void 0 || r > t.length) && (r = t.length), r -= e.length;
|
|
92
92
|
const s = t.indexOf(e, r);
|
|
93
93
|
return s !== -1 && s === r;
|
|
94
|
-
},
|
|
94
|
+
}, Lr = (t) => {
|
|
95
95
|
if (!t) return null;
|
|
96
96
|
if (we(t)) return t;
|
|
97
97
|
let e = t.length;
|
|
@@ -100,31 +100,31 @@ const Or = (t, e, r, { allOwnKeys: s } = {}) => (Re(e, (a, i) => {
|
|
|
100
100
|
for (; e-- > 0; )
|
|
101
101
|
r[e] = t[e];
|
|
102
102
|
return r;
|
|
103
|
-
},
|
|
103
|
+
}, Fr = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && st(Uint8Array)), qr = (t, e) => {
|
|
104
104
|
const s = (t && t[Fe]).call(t);
|
|
105
105
|
let a;
|
|
106
106
|
for (; (a = s.next()) && !a.done; ) {
|
|
107
|
-
const
|
|
108
|
-
e.call(t,
|
|
107
|
+
const o = a.value;
|
|
108
|
+
e.call(t, o[0], o[1]);
|
|
109
109
|
}
|
|
110
|
-
},
|
|
110
|
+
}, Mr = (t, e) => {
|
|
111
111
|
let r;
|
|
112
112
|
const s = [];
|
|
113
113
|
for (; (r = t.exec(e)) !== null; )
|
|
114
114
|
s.push(r);
|
|
115
115
|
return s;
|
|
116
|
-
},
|
|
116
|
+
}, Wr = ie("HTMLFormElement"), Br = (t) => t.toLowerCase().replace(
|
|
117
117
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
118
118
|
function(r, s, a) {
|
|
119
119
|
return s.toUpperCase() + a;
|
|
120
120
|
}
|
|
121
|
-
), ht = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype),
|
|
121
|
+
), ht = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype), Hr = ie("RegExp"), Wt = (t, e) => {
|
|
122
122
|
const r = Object.getOwnPropertyDescriptors(t), s = {};
|
|
123
|
-
Re(r, (a,
|
|
124
|
-
let
|
|
125
|
-
(
|
|
123
|
+
Re(r, (a, o) => {
|
|
124
|
+
let i;
|
|
125
|
+
(i = e(a, o, t)) !== !1 && (s[o] = i || a);
|
|
126
126
|
}), Object.defineProperties(t, s);
|
|
127
|
-
},
|
|
127
|
+
}, Vr = (t) => {
|
|
128
128
|
Wt(t, (e, r) => {
|
|
129
129
|
if (re(t) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
|
|
130
130
|
return !1;
|
|
@@ -139,19 +139,19 @@ const Or = (t, e, r, { allOwnKeys: s } = {}) => (Re(e, (a, i) => {
|
|
|
139
139
|
});
|
|
140
140
|
}
|
|
141
141
|
});
|
|
142
|
-
},
|
|
142
|
+
}, Yr = (t, e) => {
|
|
143
143
|
const r = {}, s = (a) => {
|
|
144
|
-
a.forEach((
|
|
145
|
-
r[
|
|
144
|
+
a.forEach((o) => {
|
|
145
|
+
r[o] = !0;
|
|
146
146
|
});
|
|
147
147
|
};
|
|
148
148
|
return we(t) ? s(t) : s(String(t).split(e)), r;
|
|
149
|
-
},
|
|
150
|
-
},
|
|
151
|
-
function
|
|
149
|
+
}, Kr = () => {
|
|
150
|
+
}, Jr = (t, e) => t != null && Number.isFinite(t = +t) ? t : e;
|
|
151
|
+
function Gr(t) {
|
|
152
152
|
return !!(t && re(t.append) && t[Ut] === "FormData" && t[Fe]);
|
|
153
153
|
}
|
|
154
|
-
const
|
|
154
|
+
const Xr = (t) => {
|
|
155
155
|
const e = new Array(10), r = (s, a) => {
|
|
156
156
|
if (Te(s)) {
|
|
157
157
|
if (e.indexOf(s) >= 0)
|
|
@@ -160,82 +160,82 @@ const Kr = (t) => {
|
|
|
160
160
|
return s;
|
|
161
161
|
if (!("toJSON" in s)) {
|
|
162
162
|
e[a] = s;
|
|
163
|
-
const
|
|
164
|
-
return Re(s, (
|
|
165
|
-
const h = r(
|
|
166
|
-
!ye(h) && (
|
|
167
|
-
}), e[a] = void 0,
|
|
163
|
+
const o = we(s) ? [] : {};
|
|
164
|
+
return Re(s, (i, l) => {
|
|
165
|
+
const h = r(i, a + 1);
|
|
166
|
+
!ye(h) && (o[l] = h);
|
|
167
|
+
}), e[a] = void 0, o;
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
return s;
|
|
171
171
|
};
|
|
172
172
|
return r(t, 0);
|
|
173
|
-
},
|
|
174
|
-
a === fe &&
|
|
173
|
+
}, Zr = ie("AsyncFunction"), Qr = (t) => t && (Te(t) || re(t)) && re(t.then) && re(t.catch), Bt = ((t, e) => t ? setImmediate : e ? ((r, s) => (fe.addEventListener("message", ({ source: a, data: o }) => {
|
|
174
|
+
a === fe && o === r && s.length && s.shift()();
|
|
175
175
|
}, !1), (a) => {
|
|
176
176
|
s.push(a), fe.postMessage(r, "*");
|
|
177
177
|
}))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(
|
|
178
178
|
typeof setImmediate == "function",
|
|
179
179
|
re(fe.postMessage)
|
|
180
|
-
),
|
|
180
|
+
), en = typeof queueMicrotask < "u" ? queueMicrotask.bind(fe) : typeof process < "u" && process.nextTick || Bt, tn = (t) => t != null && re(t[Fe]), p = {
|
|
181
181
|
isArray: we,
|
|
182
182
|
isArrayBuffer: Lt,
|
|
183
183
|
isBuffer: Ce,
|
|
184
|
-
isFormData:
|
|
185
|
-
isArrayBufferView:
|
|
186
|
-
isString:
|
|
184
|
+
isFormData: Tr,
|
|
185
|
+
isArrayBufferView: yr,
|
|
186
|
+
isString: br,
|
|
187
187
|
isNumber: Ft,
|
|
188
|
-
isBoolean:
|
|
188
|
+
isBoolean: wr,
|
|
189
189
|
isObject: Te,
|
|
190
190
|
isPlainObject: ze,
|
|
191
|
-
isEmptyObject:
|
|
192
|
-
isReadableStream:
|
|
193
|
-
isRequest:
|
|
194
|
-
isResponse:
|
|
195
|
-
isHeaders:
|
|
191
|
+
isEmptyObject: jr,
|
|
192
|
+
isReadableStream: Ir,
|
|
193
|
+
isRequest: Pr,
|
|
194
|
+
isResponse: Or,
|
|
195
|
+
isHeaders: Ar,
|
|
196
196
|
isUndefined: ye,
|
|
197
|
-
isDate:
|
|
198
|
-
isFile:
|
|
199
|
-
isBlob:
|
|
200
|
-
isRegExp:
|
|
197
|
+
isDate: vr,
|
|
198
|
+
isFile: Sr,
|
|
199
|
+
isBlob: kr,
|
|
200
|
+
isRegExp: Hr,
|
|
201
201
|
isFunction: re,
|
|
202
|
-
isStream:
|
|
203
|
-
isURLSearchParams:
|
|
204
|
-
isTypedArray:
|
|
205
|
-
isFileList:
|
|
202
|
+
isStream: Cr,
|
|
203
|
+
isURLSearchParams: Rr,
|
|
204
|
+
isTypedArray: Fr,
|
|
205
|
+
isFileList: Er,
|
|
206
206
|
forEach: Re,
|
|
207
207
|
merge: Ze,
|
|
208
|
-
extend:
|
|
209
|
-
trim:
|
|
210
|
-
stripBOM:
|
|
211
|
-
inherits:
|
|
212
|
-
toFlatObject:
|
|
208
|
+
extend: $r,
|
|
209
|
+
trim: zr,
|
|
210
|
+
stripBOM: _r,
|
|
211
|
+
inherits: Nr,
|
|
212
|
+
toFlatObject: Dr,
|
|
213
213
|
kindOf: qe,
|
|
214
|
-
kindOfTest:
|
|
215
|
-
endsWith:
|
|
216
|
-
toArray:
|
|
217
|
-
forEachEntry:
|
|
218
|
-
matchAll:
|
|
219
|
-
isHTMLForm:
|
|
214
|
+
kindOfTest: ie,
|
|
215
|
+
endsWith: Ur,
|
|
216
|
+
toArray: Lr,
|
|
217
|
+
forEachEntry: qr,
|
|
218
|
+
matchAll: Mr,
|
|
219
|
+
isHTMLForm: Wr,
|
|
220
220
|
hasOwnProperty: ht,
|
|
221
221
|
hasOwnProp: ht,
|
|
222
222
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
223
223
|
reduceDescriptors: Wt,
|
|
224
|
-
freezeMethods:
|
|
225
|
-
toObjectSet:
|
|
226
|
-
toCamelCase:
|
|
227
|
-
noop:
|
|
228
|
-
toFiniteNumber:
|
|
224
|
+
freezeMethods: Vr,
|
|
225
|
+
toObjectSet: Yr,
|
|
226
|
+
toCamelCase: Br,
|
|
227
|
+
noop: Kr,
|
|
228
|
+
toFiniteNumber: Jr,
|
|
229
229
|
findKey: qt,
|
|
230
230
|
global: fe,
|
|
231
231
|
isContextDefined: Mt,
|
|
232
|
-
isSpecCompliantForm:
|
|
233
|
-
toJSONObject:
|
|
234
|
-
isAsyncFn:
|
|
235
|
-
isThenable:
|
|
232
|
+
isSpecCompliantForm: Gr,
|
|
233
|
+
toJSONObject: Xr,
|
|
234
|
+
isAsyncFn: Zr,
|
|
235
|
+
isThenable: Qr,
|
|
236
236
|
setImmediate: Bt,
|
|
237
|
-
asap:
|
|
238
|
-
isIterable:
|
|
237
|
+
asap: en,
|
|
238
|
+
isIterable: tn
|
|
239
239
|
};
|
|
240
240
|
function L(t, e, r, s, a) {
|
|
241
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);
|
|
@@ -281,15 +281,15 @@ 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, a,
|
|
285
|
-
const
|
|
286
|
-
p.toFlatObject(t,
|
|
287
|
-
return
|
|
288
|
-
}, (
|
|
284
|
+
L.from = (t, e, r, s, a, o) => {
|
|
285
|
+
const i = Object.create(Ht);
|
|
286
|
+
p.toFlatObject(t, i, function(d) {
|
|
287
|
+
return d !== Error.prototype;
|
|
288
|
+
}, (c) => c !== "isAxiosError");
|
|
289
289
|
const l = t && t.message ? t.message : "Error", h = e == null && t ? t.code : e;
|
|
290
|
-
return L.call(
|
|
290
|
+
return L.call(i, l, h, r, s, a), t && i.cause == null && Object.defineProperty(i, "cause", { value: t, configurable: !0 }), i.name = t && t.name || "Error", o && Object.assign(i, o), i;
|
|
291
291
|
};
|
|
292
|
-
const
|
|
292
|
+
const rn = null;
|
|
293
293
|
function Qe(t) {
|
|
294
294
|
return p.isPlainObject(t) || p.isArray(t);
|
|
295
295
|
}
|
|
@@ -297,14 +297,14 @@ 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(a,
|
|
301
|
-
return a = Yt(a), !r &&
|
|
300
|
+
return t ? t.concat(e).map(function(a, o) {
|
|
301
|
+
return a = Yt(a), !r && o ? "[" + a + "]" : a;
|
|
302
302
|
}).join(r ? "." : "") : e;
|
|
303
303
|
}
|
|
304
|
-
function
|
|
304
|
+
function nn(t) {
|
|
305
305
|
return p.isArray(t) && !t.some(Qe);
|
|
306
306
|
}
|
|
307
|
-
const
|
|
307
|
+
const sn = p.toFlatObject(p, {}, null, function(e) {
|
|
308
308
|
return /^is[A-Z]/.test(e);
|
|
309
309
|
});
|
|
310
310
|
function We(t, e, r) {
|
|
@@ -317,10 +317,10 @@ function We(t, e, r) {
|
|
|
317
317
|
}, !1, function(j, m) {
|
|
318
318
|
return !p.isUndefined(m[j]);
|
|
319
319
|
});
|
|
320
|
-
const s = r.metaTokens, a = r.visitor ||
|
|
320
|
+
const s = r.metaTokens, a = r.visitor || d, o = r.dots, i = r.indexes, h = (r.Blob || typeof Blob < "u" && Blob) && p.isSpecCompliantForm(e);
|
|
321
321
|
if (!p.isFunction(a))
|
|
322
322
|
throw new TypeError("visitor must be a function");
|
|
323
|
-
function
|
|
323
|
+
function c(u) {
|
|
324
324
|
if (u === null) return "";
|
|
325
325
|
if (p.isDate(u))
|
|
326
326
|
return u.toISOString();
|
|
@@ -330,40 +330,40 @@ function We(t, e, r) {
|
|
|
330
330
|
throw new L("Blob is not supported. Use a Buffer instead.");
|
|
331
331
|
return p.isArrayBuffer(u) || p.isTypedArray(u) ? h && typeof Blob == "function" ? new Blob([u]) : Buffer.from(u) : u;
|
|
332
332
|
}
|
|
333
|
-
function
|
|
333
|
+
function d(u, j, m) {
|
|
334
334
|
let $ = u;
|
|
335
335
|
if (u && !m && typeof u == "object") {
|
|
336
336
|
if (p.endsWith(j, "{}"))
|
|
337
337
|
j = s ? j : j.slice(0, -2), u = JSON.stringify(u);
|
|
338
|
-
else if (p.isArray(u) &&
|
|
338
|
+
else if (p.isArray(u) && nn(u) || (p.isFileList(u) || p.endsWith(j, "[]")) && ($ = p.toArray(u)))
|
|
339
339
|
return j = Yt(j), $.forEach(function(z, C) {
|
|
340
340
|
!(p.isUndefined(z) || z === null) && e.append(
|
|
341
341
|
// eslint-disable-next-line no-nested-ternary
|
|
342
|
-
|
|
343
|
-
|
|
342
|
+
i === !0 ? gt([j], C, o) : i === null ? j : j + "[]",
|
|
343
|
+
c(z)
|
|
344
344
|
);
|
|
345
345
|
}), !1;
|
|
346
346
|
}
|
|
347
|
-
return Qe(u) ? !0 : (e.append(gt(m, j,
|
|
347
|
+
return Qe(u) ? !0 : (e.append(gt(m, j, o), c(u)), !1);
|
|
348
348
|
}
|
|
349
|
-
const
|
|
350
|
-
defaultVisitor:
|
|
351
|
-
convertValue:
|
|
349
|
+
const b = [], y = Object.assign(sn, {
|
|
350
|
+
defaultVisitor: d,
|
|
351
|
+
convertValue: c,
|
|
352
352
|
isVisitable: Qe
|
|
353
353
|
});
|
|
354
354
|
function w(u, j) {
|
|
355
355
|
if (!p.isUndefined(u)) {
|
|
356
|
-
if (
|
|
356
|
+
if (b.indexOf(u) !== -1)
|
|
357
357
|
throw Error("Circular reference detected in " + j.join("."));
|
|
358
|
-
|
|
358
|
+
b.push(u), p.forEach(u, function($, R) {
|
|
359
359
|
(!(p.isUndefined($) || $ === null) && a.call(
|
|
360
360
|
e,
|
|
361
361
|
$,
|
|
362
362
|
p.isString(R) ? R.trim() : R,
|
|
363
363
|
j,
|
|
364
|
-
|
|
364
|
+
y
|
|
365
365
|
)) === !0 && w($, j ? j.concat(R) : [R]);
|
|
366
|
-
}),
|
|
366
|
+
}), b.pop();
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
369
|
if (!p.isObject(t))
|
|
@@ -399,21 +399,21 @@ Kt.toString = function(e) {
|
|
|
399
399
|
return r(a[0]) + "=" + r(a[1]);
|
|
400
400
|
}, "").join("&");
|
|
401
401
|
};
|
|
402
|
-
function
|
|
402
|
+
function an(t) {
|
|
403
403
|
return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
404
404
|
}
|
|
405
405
|
function Jt(t, e, r) {
|
|
406
406
|
if (!e)
|
|
407
407
|
return t;
|
|
408
|
-
const s = r && r.encode ||
|
|
408
|
+
const s = r && r.encode || an;
|
|
409
409
|
p.isFunction(r) && (r = {
|
|
410
410
|
serialize: r
|
|
411
411
|
});
|
|
412
412
|
const a = r && r.serialize;
|
|
413
|
-
let
|
|
414
|
-
if (a ?
|
|
415
|
-
const
|
|
416
|
-
|
|
413
|
+
let o;
|
|
414
|
+
if (a ? o = a(e, r) : o = p.isURLSearchParams(e) ? e.toString() : new at(e, r).toString(s), o) {
|
|
415
|
+
const i = t.indexOf("#");
|
|
416
|
+
i !== -1 && (t = t.slice(0, i)), t += (t.indexOf("?") === -1 ? "?" : "&") + o;
|
|
417
417
|
}
|
|
418
418
|
return t;
|
|
419
419
|
}
|
|
@@ -475,62 +475,62 @@ const Gt = {
|
|
|
475
475
|
silentJSONParsing: !0,
|
|
476
476
|
forcedJSONParsing: !0,
|
|
477
477
|
clarifyTimeoutError: !1
|
|
478
|
-
},
|
|
478
|
+
}, on = typeof URLSearchParams < "u" ? URLSearchParams : at, ln = typeof FormData < "u" ? FormData : null, cn = typeof Blob < "u" ? Blob : null, dn = {
|
|
479
479
|
isBrowser: !0,
|
|
480
480
|
classes: {
|
|
481
|
-
URLSearchParams:
|
|
482
|
-
FormData:
|
|
483
|
-
Blob:
|
|
481
|
+
URLSearchParams: on,
|
|
482
|
+
FormData: ln,
|
|
483
|
+
Blob: cn
|
|
484
484
|
},
|
|
485
485
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
486
|
-
},
|
|
487
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
486
|
+
}, it = typeof window < "u" && typeof document < "u", et = typeof navigator == "object" && navigator || void 0, un = it && (!et || ["ReactNative", "NativeScript", "NS"].indexOf(et.product) < 0), pn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
487
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", fn = it && window.location.href || "http://localhost", xn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
488
488
|
__proto__: null,
|
|
489
|
-
hasBrowserEnv:
|
|
490
|
-
hasStandardBrowserEnv:
|
|
491
|
-
hasStandardBrowserWebWorkerEnv:
|
|
489
|
+
hasBrowserEnv: it,
|
|
490
|
+
hasStandardBrowserEnv: un,
|
|
491
|
+
hasStandardBrowserWebWorkerEnv: pn,
|
|
492
492
|
navigator: et,
|
|
493
|
-
origin:
|
|
493
|
+
origin: fn
|
|
494
494
|
}, Symbol.toStringTag, { value: "Module" })), ee = {
|
|
495
|
-
...
|
|
496
|
-
...
|
|
495
|
+
...xn,
|
|
496
|
+
...dn
|
|
497
497
|
};
|
|
498
|
-
function
|
|
498
|
+
function hn(t, e) {
|
|
499
499
|
return We(t, new ee.classes.URLSearchParams(), {
|
|
500
|
-
visitor: function(r, s, a,
|
|
501
|
-
return ee.isNode && p.isBuffer(r) ? (this.append(s, r.toString("base64")), !1) :
|
|
500
|
+
visitor: function(r, s, a, o) {
|
|
501
|
+
return ee.isNode && p.isBuffer(r) ? (this.append(s, r.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
502
502
|
},
|
|
503
503
|
...e
|
|
504
504
|
});
|
|
505
505
|
}
|
|
506
|
-
function
|
|
506
|
+
function gn(t) {
|
|
507
507
|
return p.matchAll(/\w+|\[(\w*)]/g, t).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
|
|
508
508
|
}
|
|
509
|
-
function
|
|
509
|
+
function mn(t) {
|
|
510
510
|
const e = {}, r = Object.keys(t);
|
|
511
511
|
let s;
|
|
512
512
|
const a = r.length;
|
|
513
|
-
let
|
|
513
|
+
let o;
|
|
514
514
|
for (s = 0; s < a; s++)
|
|
515
|
-
|
|
515
|
+
o = r[s], e[o] = t[o];
|
|
516
516
|
return e;
|
|
517
517
|
}
|
|
518
518
|
function Xt(t) {
|
|
519
|
-
function e(r, s, a,
|
|
520
|
-
let
|
|
521
|
-
if (
|
|
522
|
-
const l = Number.isFinite(+
|
|
523
|
-
return
|
|
519
|
+
function e(r, s, a, o) {
|
|
520
|
+
let i = r[o++];
|
|
521
|
+
if (i === "__proto__") return !0;
|
|
522
|
+
const l = Number.isFinite(+i), h = o >= r.length;
|
|
523
|
+
return i = !i && p.isArray(a) ? a.length : i, h ? (p.hasOwnProp(a, i) ? a[i] = [a[i], s] : a[i] = s, !l) : ((!a[i] || !p.isObject(a[i])) && (a[i] = []), e(r, s, a[i], o) && p.isArray(a[i]) && (a[i] = mn(a[i])), !l);
|
|
524
524
|
}
|
|
525
525
|
if (p.isFormData(t) && p.isFunction(t.entries)) {
|
|
526
526
|
const r = {};
|
|
527
527
|
return p.forEachEntry(t, (s, a) => {
|
|
528
|
-
e(
|
|
528
|
+
e(gn(s), a, r, 0);
|
|
529
529
|
}), r;
|
|
530
530
|
}
|
|
531
531
|
return null;
|
|
532
532
|
}
|
|
533
|
-
function
|
|
533
|
+
function yn(t, e, r) {
|
|
534
534
|
if (p.isString(t))
|
|
535
535
|
try {
|
|
536
536
|
return (e || JSON.parse)(t), p.trim(t);
|
|
@@ -544,8 +544,8 @@ const Ie = {
|
|
|
544
544
|
transitional: Gt,
|
|
545
545
|
adapter: ["xhr", "http", "fetch"],
|
|
546
546
|
transformRequest: [function(e, r) {
|
|
547
|
-
const s = r.getContentType() || "", a = s.indexOf("application/json") > -1,
|
|
548
|
-
if (
|
|
547
|
+
const s = r.getContentType() || "", a = s.indexOf("application/json") > -1, o = p.isObject(e);
|
|
548
|
+
if (o && p.isHTMLForm(e) && (e = new FormData(e)), p.isFormData(e))
|
|
549
549
|
return a ? JSON.stringify(Xt(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;
|
|
@@ -554,9 +554,9 @@ const Ie = {
|
|
|
554
554
|
if (p.isURLSearchParams(e))
|
|
555
555
|
return r.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
|
|
556
556
|
let l;
|
|
557
|
-
if (
|
|
557
|
+
if (o) {
|
|
558
558
|
if (s.indexOf("application/x-www-form-urlencoded") > -1)
|
|
559
|
-
return
|
|
559
|
+
return hn(e, this.formSerializer).toString();
|
|
560
560
|
if ((l = p.isFileList(e)) || s.indexOf("multipart/form-data") > -1) {
|
|
561
561
|
const h = this.env && this.env.FormData;
|
|
562
562
|
return We(
|
|
@@ -566,18 +566,18 @@ const Ie = {
|
|
|
566
566
|
);
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
return
|
|
569
|
+
return o || a ? (r.setContentType("application/json", !1), yn(e)) : e;
|
|
570
570
|
}],
|
|
571
571
|
transformResponse: [function(e) {
|
|
572
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
575
|
if (e && p.isString(e) && (s && !this.responseType || a)) {
|
|
576
|
-
const
|
|
576
|
+
const i = !(r && r.silentJSONParsing) && a;
|
|
577
577
|
try {
|
|
578
578
|
return JSON.parse(e, this.parseReviver);
|
|
579
579
|
} catch (l) {
|
|
580
|
-
if (
|
|
580
|
+
if (i)
|
|
581
581
|
throw l.name === "SyntaxError" ? L.from(l, L.ERR_BAD_RESPONSE, this, null, this.response) : l;
|
|
582
582
|
}
|
|
583
583
|
}
|
|
@@ -609,7 +609,7 @@ const Ie = {
|
|
|
609
609
|
p.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => {
|
|
610
610
|
Ie.headers[t] = {};
|
|
611
611
|
});
|
|
612
|
-
const
|
|
612
|
+
const bn = p.toObjectSet([
|
|
613
613
|
"age",
|
|
614
614
|
"authorization",
|
|
615
615
|
"content-length",
|
|
@@ -627,12 +627,12 @@ const gn = p.toObjectSet([
|
|
|
627
627
|
"referer",
|
|
628
628
|
"retry-after",
|
|
629
629
|
"user-agent"
|
|
630
|
-
]),
|
|
630
|
+
]), wn = (t) => {
|
|
631
631
|
const e = {};
|
|
632
632
|
let r, s, a;
|
|
633
633
|
return t && t.split(`
|
|
634
|
-
`).forEach(function(
|
|
635
|
-
a =
|
|
634
|
+
`).forEach(function(i) {
|
|
635
|
+
a = i.indexOf(":"), r = i.substring(0, a).trim().toLowerCase(), s = i.substring(a + 1).trim(), !(!r || e[r] && bn[r]) && (r === "set-cookie" ? e[r] ? e[r].push(s) : e[r] = [s] : e[r] = e[r] ? e[r] + ", " + s : s);
|
|
636
636
|
}), e;
|
|
637
637
|
}, bt = Symbol("internals");
|
|
638
638
|
function Se(t) {
|
|
@@ -641,14 +641,14 @@ function Se(t) {
|
|
|
641
641
|
function $e(t) {
|
|
642
642
|
return t === !1 || t == null ? t : p.isArray(t) ? t.map($e) : String(t);
|
|
643
643
|
}
|
|
644
|
-
function
|
|
644
|
+
function jn(t) {
|
|
645
645
|
const e = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
646
646
|
let s;
|
|
647
647
|
for (; s = r.exec(t); )
|
|
648
648
|
e[s[1]] = s[2];
|
|
649
649
|
return e;
|
|
650
650
|
}
|
|
651
|
-
const
|
|
651
|
+
const vn = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
|
|
652
652
|
function Ye(t, e, r, s, a) {
|
|
653
653
|
if (p.isFunction(s))
|
|
654
654
|
return s.call(this, e, r);
|
|
@@ -659,15 +659,15 @@ function Ye(t, e, r, s, a) {
|
|
|
659
659
|
return s.test(e);
|
|
660
660
|
}
|
|
661
661
|
}
|
|
662
|
-
function
|
|
662
|
+
function Sn(t) {
|
|
663
663
|
return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, r, s) => r.toUpperCase() + s);
|
|
664
664
|
}
|
|
665
|
-
function
|
|
665
|
+
function kn(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(a,
|
|
670
|
-
return this[s].call(this, e, a,
|
|
669
|
+
value: function(a, o, i) {
|
|
670
|
+
return this[s].call(this, e, a, o, i);
|
|
671
671
|
},
|
|
672
672
|
configurable: !0
|
|
673
673
|
});
|
|
@@ -679,28 +679,28 @@ let ne = class {
|
|
|
679
679
|
}
|
|
680
680
|
set(e, r, s) {
|
|
681
681
|
const a = this;
|
|
682
|
-
function
|
|
683
|
-
const
|
|
684
|
-
if (!
|
|
682
|
+
function o(l, h, c) {
|
|
683
|
+
const d = Se(h);
|
|
684
|
+
if (!d)
|
|
685
685
|
throw new Error("header name must be a non-empty string");
|
|
686
|
-
const
|
|
687
|
-
(!
|
|
686
|
+
const b = p.findKey(a, d);
|
|
687
|
+
(!b || a[b] === void 0 || c === !0 || c === void 0 && a[b] !== !1) && (a[b || h] = $e(l));
|
|
688
688
|
}
|
|
689
|
-
const
|
|
689
|
+
const i = (l, h) => p.forEach(l, (c, d) => o(c, d, h));
|
|
690
690
|
if (p.isPlainObject(e) || e instanceof this.constructor)
|
|
691
|
-
|
|
692
|
-
else if (p.isString(e) && (e = e.trim()) && !
|
|
693
|
-
|
|
691
|
+
i(e, r);
|
|
692
|
+
else if (p.isString(e) && (e = e.trim()) && !vn(e))
|
|
693
|
+
i(wn(e), r);
|
|
694
694
|
else if (p.isObject(e) && p.isIterable(e)) {
|
|
695
|
-
let l = {}, h,
|
|
696
|
-
for (const
|
|
697
|
-
if (!p.isArray(
|
|
695
|
+
let l = {}, h, c;
|
|
696
|
+
for (const d of e) {
|
|
697
|
+
if (!p.isArray(d))
|
|
698
698
|
throw TypeError("Object iterator must return a key-value pair");
|
|
699
|
-
l[
|
|
699
|
+
l[c = d[0]] = (h = l[c]) ? p.isArray(h) ? [...h, d[1]] : [h, d[1]] : d[1];
|
|
700
700
|
}
|
|
701
|
-
|
|
701
|
+
i(l, r);
|
|
702
702
|
} else
|
|
703
|
-
e != null &&
|
|
703
|
+
e != null && o(r, e, s);
|
|
704
704
|
return this;
|
|
705
705
|
}
|
|
706
706
|
get(e, r) {
|
|
@@ -711,7 +711,7 @@ let ne = class {
|
|
|
711
711
|
if (!r)
|
|
712
712
|
return a;
|
|
713
713
|
if (r === !0)
|
|
714
|
-
return
|
|
714
|
+
return jn(a);
|
|
715
715
|
if (p.isFunction(r))
|
|
716
716
|
return r.call(this, a, s);
|
|
717
717
|
if (p.isRegExp(r))
|
|
@@ -730,33 +730,33 @@ let ne = class {
|
|
|
730
730
|
delete(e, r) {
|
|
731
731
|
const s = this;
|
|
732
732
|
let a = !1;
|
|
733
|
-
function i
|
|
734
|
-
if (
|
|
735
|
-
const l = p.findKey(s,
|
|
733
|
+
function o(i) {
|
|
734
|
+
if (i = Se(i), i) {
|
|
735
|
+
const l = p.findKey(s, i);
|
|
736
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(
|
|
739
|
+
return p.isArray(e) ? e.forEach(o) : o(e), a;
|
|
740
740
|
}
|
|
741
741
|
clear(e) {
|
|
742
742
|
const r = Object.keys(this);
|
|
743
743
|
let s = r.length, a = !1;
|
|
744
744
|
for (; s--; ) {
|
|
745
|
-
const
|
|
746
|
-
(!e || Ye(this, this[
|
|
745
|
+
const o = r[s];
|
|
746
|
+
(!e || Ye(this, this[o], o, e, !0)) && (delete this[o], a = !0);
|
|
747
747
|
}
|
|
748
748
|
return a;
|
|
749
749
|
}
|
|
750
750
|
normalize(e) {
|
|
751
751
|
const r = this, s = {};
|
|
752
|
-
return p.forEach(this, (a,
|
|
753
|
-
const
|
|
754
|
-
if (
|
|
755
|
-
r[
|
|
752
|
+
return p.forEach(this, (a, o) => {
|
|
753
|
+
const i = p.findKey(s, o);
|
|
754
|
+
if (i) {
|
|
755
|
+
r[i] = $e(a), delete r[o];
|
|
756
756
|
return;
|
|
757
757
|
}
|
|
758
|
-
const l = e ?
|
|
759
|
-
l !==
|
|
758
|
+
const l = e ? Sn(o) : String(o).trim();
|
|
759
|
+
l !== o && delete r[o], r[l] = $e(a), s[l] = !0;
|
|
760
760
|
}), this;
|
|
761
761
|
}
|
|
762
762
|
concat(...e) {
|
|
@@ -792,11 +792,11 @@ let ne = class {
|
|
|
792
792
|
const s = (this[bt] = this[bt] = {
|
|
793
793
|
accessors: {}
|
|
794
794
|
}).accessors, a = this.prototype;
|
|
795
|
-
function i
|
|
796
|
-
const l = Se(
|
|
797
|
-
s[l] || (
|
|
795
|
+
function o(i) {
|
|
796
|
+
const l = Se(i);
|
|
797
|
+
s[l] || (kn(a, i), s[l] = !0);
|
|
798
798
|
}
|
|
799
|
-
return p.isArray(e) ? e.forEach(
|
|
799
|
+
return p.isArray(e) ? e.forEach(o) : o(e), this;
|
|
800
800
|
}
|
|
801
801
|
};
|
|
802
802
|
ne.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
@@ -812,10 +812,10 @@ p.reduceDescriptors(ne.prototype, ({ value: t }, e) => {
|
|
|
812
812
|
p.freezeMethods(ne);
|
|
813
813
|
function Ke(t, e) {
|
|
814
814
|
const r = this || Ie, s = e || r, a = ne.from(s.headers);
|
|
815
|
-
let
|
|
815
|
+
let o = s.data;
|
|
816
816
|
return p.forEach(t, function(l) {
|
|
817
|
-
|
|
818
|
-
}), a.normalize(),
|
|
817
|
+
o = l.call(r, o, a.normalize(), e ? e.status : void 0);
|
|
818
|
+
}), a.normalize(), o;
|
|
819
819
|
}
|
|
820
820
|
function Zt(t) {
|
|
821
821
|
return !!(t && t.__CANCEL__);
|
|
@@ -836,56 +836,56 @@ function Qt(t, e, r) {
|
|
|
836
836
|
r
|
|
837
837
|
));
|
|
838
838
|
}
|
|
839
|
-
function
|
|
839
|
+
function En(t) {
|
|
840
840
|
const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(t);
|
|
841
841
|
return e && e[1] || "";
|
|
842
842
|
}
|
|
843
|
-
function
|
|
843
|
+
function Cn(t, e) {
|
|
844
844
|
t = t || 10;
|
|
845
845
|
const r = new Array(t), s = new Array(t);
|
|
846
|
-
let a = 0,
|
|
846
|
+
let a = 0, o = 0, i;
|
|
847
847
|
return e = e !== void 0 ? e : 1e3, function(h) {
|
|
848
|
-
const
|
|
849
|
-
|
|
850
|
-
let
|
|
851
|
-
for (;
|
|
852
|
-
|
|
853
|
-
if (a = (a + 1) % t, a ===
|
|
848
|
+
const c = Date.now(), d = s[o];
|
|
849
|
+
i || (i = c), r[a] = h, s[a] = c;
|
|
850
|
+
let b = o, y = 0;
|
|
851
|
+
for (; b !== a; )
|
|
852
|
+
y += r[b++], b = b % t;
|
|
853
|
+
if (a = (a + 1) % t, a === o && (o = (o + 1) % t), c - i < e)
|
|
854
854
|
return;
|
|
855
|
-
const w =
|
|
856
|
-
return w ? Math.round(
|
|
855
|
+
const w = d && c - d;
|
|
856
|
+
return w ? Math.round(y * 1e3 / w) : void 0;
|
|
857
857
|
};
|
|
858
858
|
}
|
|
859
|
-
function
|
|
860
|
-
let r = 0, s = 1e3 / e, a,
|
|
861
|
-
const
|
|
862
|
-
r =
|
|
859
|
+
function Tn(t, e) {
|
|
860
|
+
let r = 0, s = 1e3 / e, a, o;
|
|
861
|
+
const i = (c, d = Date.now()) => {
|
|
862
|
+
r = d, a = null, o && (clearTimeout(o), o = null), t(...c);
|
|
863
863
|
};
|
|
864
|
-
return [(...
|
|
865
|
-
const
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
}, s -
|
|
869
|
-
}, () => a &&
|
|
864
|
+
return [(...c) => {
|
|
865
|
+
const d = Date.now(), b = d - r;
|
|
866
|
+
b >= s ? i(c, d) : (a = c, o || (o = setTimeout(() => {
|
|
867
|
+
o = null, i(a);
|
|
868
|
+
}, s - b)));
|
|
869
|
+
}, () => a && i(a)];
|
|
870
870
|
}
|
|
871
871
|
const Ue = (t, e, r = 3) => {
|
|
872
872
|
let s = 0;
|
|
873
|
-
const a =
|
|
874
|
-
return
|
|
875
|
-
const
|
|
876
|
-
s =
|
|
877
|
-
const
|
|
878
|
-
loaded:
|
|
873
|
+
const a = Cn(50, 250);
|
|
874
|
+
return Tn((o) => {
|
|
875
|
+
const i = o.loaded, l = o.lengthComputable ? o.total : void 0, h = i - s, c = a(h), d = i <= l;
|
|
876
|
+
s = i;
|
|
877
|
+
const b = {
|
|
878
|
+
loaded: i,
|
|
879
879
|
total: l,
|
|
880
|
-
progress: l ?
|
|
880
|
+
progress: l ? i / l : void 0,
|
|
881
881
|
bytes: h,
|
|
882
|
-
rate:
|
|
883
|
-
estimated:
|
|
884
|
-
event:
|
|
882
|
+
rate: c || void 0,
|
|
883
|
+
estimated: c && l && d ? (l - i) / c : void 0,
|
|
884
|
+
event: o,
|
|
885
885
|
lengthComputable: l != null,
|
|
886
886
|
[e ? "download" : "upload"]: !0
|
|
887
887
|
};
|
|
888
|
-
t(
|
|
888
|
+
t(b);
|
|
889
889
|
}, r);
|
|
890
890
|
}, wt = (t, e) => {
|
|
891
891
|
const r = t != null;
|
|
@@ -894,15 +894,15 @@ const Ue = (t, e, r = 3) => {
|
|
|
894
894
|
total: t,
|
|
895
895
|
loaded: s
|
|
896
896
|
}), e[1]];
|
|
897
|
-
}, jt = (t) => (...e) => p.asap(() => t(...e)),
|
|
897
|
+
}, jt = (t) => (...e) => p.asap(() => t(...e)), Rn = ee.hasStandardBrowserEnv ? /* @__PURE__ */ ((t, e) => (r) => (r = new URL(r, ee.origin), t.protocol === r.protocol && t.host === r.host && (e || t.port === r.port)))(
|
|
898
898
|
new URL(ee.origin),
|
|
899
899
|
ee.navigator && /(msie|trident)/i.test(ee.navigator.userAgent)
|
|
900
|
-
) : () => !0,
|
|
900
|
+
) : () => !0, In = ee.hasStandardBrowserEnv ? (
|
|
901
901
|
// Standard browser envs support document.cookie
|
|
902
902
|
{
|
|
903
|
-
write(t, e, r, s, a,
|
|
904
|
-
const
|
|
905
|
-
p.isNumber(r) &&
|
|
903
|
+
write(t, e, r, s, a, o) {
|
|
904
|
+
const i = [t + "=" + encodeURIComponent(e)];
|
|
905
|
+
p.isNumber(r) && i.push("expires=" + new Date(r).toGMTString()), p.isString(s) && i.push("path=" + s), p.isString(a) && i.push("domain=" + a), o === !0 && i.push("secure"), document.cookie = i.join("; ");
|
|
906
906
|
},
|
|
907
907
|
read(t) {
|
|
908
908
|
const e = document.cookie.match(new RegExp("(^|;\\s*)(" + t + ")=([^;]*)"));
|
|
@@ -924,110 +924,110 @@ const Ue = (t, e, r = 3) => {
|
|
|
924
924
|
}
|
|
925
925
|
}
|
|
926
926
|
);
|
|
927
|
-
function
|
|
927
|
+
function Pn(t) {
|
|
928
928
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
|
|
929
929
|
}
|
|
930
|
-
function
|
|
930
|
+
function On(t, e) {
|
|
931
931
|
return e ? t.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : t;
|
|
932
932
|
}
|
|
933
933
|
function er(t, e, r) {
|
|
934
|
-
let s = !
|
|
935
|
-
return t && (s || r == !1) ?
|
|
934
|
+
let s = !Pn(e);
|
|
935
|
+
return t && (s || r == !1) ? On(t, e) : e;
|
|
936
936
|
}
|
|
937
937
|
const vt = (t) => t instanceof ne ? { ...t } : t;
|
|
938
938
|
function he(t, e) {
|
|
939
939
|
e = e || {};
|
|
940
940
|
const r = {};
|
|
941
|
-
function s(d,
|
|
942
|
-
return p.isPlainObject(
|
|
941
|
+
function s(c, d, b, y) {
|
|
942
|
+
return p.isPlainObject(c) && p.isPlainObject(d) ? p.merge.call({ caseless: y }, c, d) : p.isPlainObject(d) ? p.merge({}, d) : p.isArray(d) ? d.slice() : d;
|
|
943
943
|
}
|
|
944
|
-
function a(d,
|
|
945
|
-
if (p.isUndefined(
|
|
946
|
-
if (!p.isUndefined(
|
|
947
|
-
return s(void 0,
|
|
948
|
-
} else return s(d,
|
|
944
|
+
function a(c, d, b, y) {
|
|
945
|
+
if (p.isUndefined(d)) {
|
|
946
|
+
if (!p.isUndefined(c))
|
|
947
|
+
return s(void 0, c, b, y);
|
|
948
|
+
} else return s(c, d, b, y);
|
|
949
949
|
}
|
|
950
|
-
function
|
|
951
|
-
if (!p.isUndefined(
|
|
952
|
-
return s(void 0,
|
|
950
|
+
function o(c, d) {
|
|
951
|
+
if (!p.isUndefined(d))
|
|
952
|
+
return s(void 0, d);
|
|
953
953
|
}
|
|
954
|
-
function
|
|
955
|
-
if (p.isUndefined(
|
|
956
|
-
if (!p.isUndefined(
|
|
957
|
-
return s(void 0,
|
|
958
|
-
} else return s(void 0,
|
|
954
|
+
function i(c, d) {
|
|
955
|
+
if (p.isUndefined(d)) {
|
|
956
|
+
if (!p.isUndefined(c))
|
|
957
|
+
return s(void 0, c);
|
|
958
|
+
} else return s(void 0, d);
|
|
959
959
|
}
|
|
960
|
-
function l(
|
|
961
|
-
if (
|
|
962
|
-
return s(
|
|
963
|
-
if (
|
|
964
|
-
return s(void 0,
|
|
960
|
+
function l(c, d, b) {
|
|
961
|
+
if (b in e)
|
|
962
|
+
return s(c, d);
|
|
963
|
+
if (b in t)
|
|
964
|
+
return s(void 0, c);
|
|
965
965
|
}
|
|
966
966
|
const h = {
|
|
967
|
-
url:
|
|
968
|
-
method:
|
|
969
|
-
data:
|
|
970
|
-
baseURL:
|
|
971
|
-
transformRequest:
|
|
972
|
-
transformResponse:
|
|
973
|
-
paramsSerializer:
|
|
974
|
-
timeout:
|
|
975
|
-
timeoutMessage:
|
|
976
|
-
withCredentials:
|
|
977
|
-
withXSRFToken:
|
|
978
|
-
adapter:
|
|
979
|
-
responseType:
|
|
980
|
-
xsrfCookieName:
|
|
981
|
-
xsrfHeaderName:
|
|
982
|
-
onUploadProgress:
|
|
983
|
-
onDownloadProgress:
|
|
984
|
-
decompress:
|
|
985
|
-
maxContentLength:
|
|
986
|
-
maxBodyLength:
|
|
987
|
-
beforeRedirect:
|
|
988
|
-
transport:
|
|
989
|
-
httpAgent:
|
|
990
|
-
httpsAgent:
|
|
991
|
-
cancelToken:
|
|
992
|
-
socketPath:
|
|
993
|
-
responseEncoding:
|
|
967
|
+
url: o,
|
|
968
|
+
method: o,
|
|
969
|
+
data: o,
|
|
970
|
+
baseURL: i,
|
|
971
|
+
transformRequest: i,
|
|
972
|
+
transformResponse: i,
|
|
973
|
+
paramsSerializer: i,
|
|
974
|
+
timeout: i,
|
|
975
|
+
timeoutMessage: i,
|
|
976
|
+
withCredentials: i,
|
|
977
|
+
withXSRFToken: i,
|
|
978
|
+
adapter: i,
|
|
979
|
+
responseType: i,
|
|
980
|
+
xsrfCookieName: i,
|
|
981
|
+
xsrfHeaderName: i,
|
|
982
|
+
onUploadProgress: i,
|
|
983
|
+
onDownloadProgress: i,
|
|
984
|
+
decompress: i,
|
|
985
|
+
maxContentLength: i,
|
|
986
|
+
maxBodyLength: i,
|
|
987
|
+
beforeRedirect: i,
|
|
988
|
+
transport: i,
|
|
989
|
+
httpAgent: i,
|
|
990
|
+
httpsAgent: i,
|
|
991
|
+
cancelToken: i,
|
|
992
|
+
socketPath: i,
|
|
993
|
+
responseEncoding: i,
|
|
994
994
|
validateStatus: l,
|
|
995
|
-
headers: (
|
|
995
|
+
headers: (c, d, b) => a(vt(c), vt(d), b, !0)
|
|
996
996
|
};
|
|
997
|
-
return p.forEach(Object.keys({ ...t, ...e }), function(
|
|
998
|
-
const
|
|
999
|
-
p.isUndefined(
|
|
997
|
+
return p.forEach(Object.keys({ ...t, ...e }), function(d) {
|
|
998
|
+
const b = h[d] || a, y = b(t[d], e[d], d);
|
|
999
|
+
p.isUndefined(y) && b !== l || (r[d] = y);
|
|
1000
1000
|
}), r;
|
|
1001
1001
|
}
|
|
1002
1002
|
const tr = (t) => {
|
|
1003
1003
|
const e = he({}, t);
|
|
1004
|
-
let { data: r, withXSRFToken: s, xsrfHeaderName: a, xsrfCookieName:
|
|
1005
|
-
if (e.headers =
|
|
1004
|
+
let { data: r, withXSRFToken: s, xsrfHeaderName: a, xsrfCookieName: o, headers: i, auth: l } = e;
|
|
1005
|
+
if (e.headers = i = ne.from(i), e.url = Jt(er(e.baseURL, e.url, e.allowAbsoluteUrls), t.params, t.paramsSerializer), l && i.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
|
+
i.setContentType(void 0);
|
|
1011
1011
|
else if (p.isFunction(r.getHeaders)) {
|
|
1012
|
-
const h = r.getHeaders(),
|
|
1013
|
-
Object.entries(h).forEach(([
|
|
1014
|
-
|
|
1012
|
+
const h = r.getHeaders(), c = ["content-type", "content-length"];
|
|
1013
|
+
Object.entries(h).forEach(([d, b]) => {
|
|
1014
|
+
c.includes(d.toLowerCase()) && i.set(d, b);
|
|
1015
1015
|
});
|
|
1016
1016
|
}
|
|
1017
1017
|
}
|
|
1018
|
-
if (ee.hasStandardBrowserEnv && (s && p.isFunction(s) && (s = s(e)), s || s !== !1 &&
|
|
1019
|
-
const h = a &&
|
|
1020
|
-
h &&
|
|
1018
|
+
if (ee.hasStandardBrowserEnv && (s && p.isFunction(s) && (s = s(e)), s || s !== !1 && Rn(e.url))) {
|
|
1019
|
+
const h = a && o && In.read(o);
|
|
1020
|
+
h && i.set(a, h);
|
|
1021
1021
|
}
|
|
1022
1022
|
return e;
|
|
1023
|
-
},
|
|
1023
|
+
}, An = typeof XMLHttpRequest < "u", zn = An && function(t) {
|
|
1024
1024
|
return new Promise(function(r, s) {
|
|
1025
1025
|
const a = tr(t);
|
|
1026
|
-
let
|
|
1027
|
-
const
|
|
1028
|
-
let { responseType: l, onUploadProgress: h, onDownloadProgress:
|
|
1026
|
+
let o = a.data;
|
|
1027
|
+
const i = 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(), u && u(), a.cancelToken && a.cancelToken.unsubscribe(
|
|
1030
|
+
w && w(), u && u(), a.cancelToken && a.cancelToken.unsubscribe(d), a.signal && a.signal.removeEventListener("abort", d);
|
|
1031
1031
|
}
|
|
1032
1032
|
let m = new XMLHttpRequest();
|
|
1033
1033
|
m.open(a.method.toUpperCase(), a.url, !0), m.timeout = a.timeout;
|
|
@@ -1066,42 +1066,42 @@ const tr = (t) => {
|
|
|
1066
1066
|
t,
|
|
1067
1067
|
m
|
|
1068
1068
|
)), m = null;
|
|
1069
|
-
},
|
|
1069
|
+
}, o === void 0 && i.setContentType(null), "setRequestHeader" in m && p.forEach(i.toJSON(), function(C, q) {
|
|
1070
1070
|
m.setRequestHeader(q, C);
|
|
1071
|
-
}), p.isUndefined(a.withCredentials) || (m.withCredentials = !!a.withCredentials), l && l !== "json" && (m.responseType = a.responseType),
|
|
1071
|
+
}), p.isUndefined(a.withCredentials) || (m.withCredentials = !!a.withCredentials), l && l !== "json" && (m.responseType = a.responseType), c && ([y, u] = Ue(c, !0), m.addEventListener("progress", y)), h && m.upload && ([b, w] = Ue(h), m.upload.addEventListener("progress", b), m.upload.addEventListener("loadend", w)), (a.cancelToken || a.signal) && (d = (z) => {
|
|
1072
1072
|
m && (s(!z || z.type ? new je(null, t, m) : z), m.abort(), m = null);
|
|
1073
|
-
}, a.cancelToken && a.cancelToken.subscribe(
|
|
1074
|
-
const R =
|
|
1073
|
+
}, a.cancelToken && a.cancelToken.subscribe(d), a.signal && (a.signal.aborted ? d() : a.signal.addEventListener("abort", d)));
|
|
1074
|
+
const R = En(a.url);
|
|
1075
1075
|
if (R && ee.protocols.indexOf(R) === -1) {
|
|
1076
1076
|
s(new L("Unsupported protocol " + R + ":", L.ERR_BAD_REQUEST, t));
|
|
1077
1077
|
return;
|
|
1078
1078
|
}
|
|
1079
|
-
m.send(
|
|
1079
|
+
m.send(o || null);
|
|
1080
1080
|
});
|
|
1081
|
-
},
|
|
1081
|
+
}, $n = (t, e) => {
|
|
1082
1082
|
const { length: r } = t = t ? t.filter(Boolean) : [];
|
|
1083
1083
|
if (e || r) {
|
|
1084
1084
|
let s = new AbortController(), a;
|
|
1085
|
-
const
|
|
1085
|
+
const o = function(c) {
|
|
1086
1086
|
if (!a) {
|
|
1087
1087
|
a = !0, l();
|
|
1088
|
-
const
|
|
1089
|
-
s.abort(
|
|
1088
|
+
const d = c instanceof Error ? c : this.reason;
|
|
1089
|
+
s.abort(d instanceof L ? d : new je(d instanceof Error ? d.message : d));
|
|
1090
1090
|
}
|
|
1091
1091
|
};
|
|
1092
|
-
let
|
|
1093
|
-
|
|
1092
|
+
let i = e && setTimeout(() => {
|
|
1093
|
+
i = null, o(new L(`timeout ${e} of ms exceeded`, L.ETIMEDOUT));
|
|
1094
1094
|
}, e);
|
|
1095
1095
|
const l = () => {
|
|
1096
|
-
t && (
|
|
1097
|
-
|
|
1096
|
+
t && (i && clearTimeout(i), i = null, t.forEach((c) => {
|
|
1097
|
+
c.unsubscribe ? c.unsubscribe(o) : c.removeEventListener("abort", o);
|
|
1098
1098
|
}), t = null);
|
|
1099
1099
|
};
|
|
1100
|
-
t.forEach((
|
|
1100
|
+
t.forEach((c) => c.addEventListener("abort", o));
|
|
1101
1101
|
const { signal: h } = s;
|
|
1102
1102
|
return h.unsubscribe = () => p.asap(l), h;
|
|
1103
1103
|
}
|
|
1104
|
-
},
|
|
1104
|
+
}, _n = function* (t, e) {
|
|
1105
1105
|
let r = t.byteLength;
|
|
1106
1106
|
if (r < e) {
|
|
1107
1107
|
yield t;
|
|
@@ -1110,10 +1110,10 @@ const tr = (t) => {
|
|
|
1110
1110
|
let s = 0, a;
|
|
1111
1111
|
for (; s < r; )
|
|
1112
1112
|
a = s + e, yield t.slice(s, a), s = a;
|
|
1113
|
-
},
|
|
1114
|
-
for await (const r of
|
|
1115
|
-
yield*
|
|
1116
|
-
},
|
|
1113
|
+
}, Nn = async function* (t, e) {
|
|
1114
|
+
for await (const r of Dn(t))
|
|
1115
|
+
yield* _n(r, e);
|
|
1116
|
+
}, Dn = async function* (t) {
|
|
1117
1117
|
if (t[Symbol.asyncIterator]) {
|
|
1118
1118
|
yield* t;
|
|
1119
1119
|
return;
|
|
@@ -1130,26 +1130,26 @@ const tr = (t) => {
|
|
|
1130
1130
|
await e.cancel();
|
|
1131
1131
|
}
|
|
1132
1132
|
}, St = (t, e, r, s) => {
|
|
1133
|
-
const a =
|
|
1134
|
-
let
|
|
1135
|
-
|
|
1133
|
+
const a = Nn(t, e);
|
|
1134
|
+
let o = 0, i, l = (h) => {
|
|
1135
|
+
i || (i = !0, s && s(h));
|
|
1136
1136
|
};
|
|
1137
1137
|
return new ReadableStream({
|
|
1138
1138
|
async pull(h) {
|
|
1139
1139
|
try {
|
|
1140
|
-
const { done:
|
|
1141
|
-
if (
|
|
1140
|
+
const { done: c, value: d } = await a.next();
|
|
1141
|
+
if (c) {
|
|
1142
1142
|
l(), h.close();
|
|
1143
1143
|
return;
|
|
1144
1144
|
}
|
|
1145
|
-
let
|
|
1145
|
+
let b = d.byteLength;
|
|
1146
1146
|
if (r) {
|
|
1147
|
-
let
|
|
1148
|
-
r(
|
|
1147
|
+
let y = o += b;
|
|
1148
|
+
r(y);
|
|
1149
1149
|
}
|
|
1150
|
-
h.enqueue(new Uint8Array(
|
|
1151
|
-
} catch (
|
|
1152
|
-
throw l(
|
|
1150
|
+
h.enqueue(new Uint8Array(d));
|
|
1151
|
+
} catch (c) {
|
|
1152
|
+
throw l(c), c;
|
|
1153
1153
|
}
|
|
1154
1154
|
},
|
|
1155
1155
|
cancel(h) {
|
|
@@ -1158,7 +1158,7 @@ const tr = (t) => {
|
|
|
1158
1158
|
}, {
|
|
1159
1159
|
highWaterMark: 2
|
|
1160
1160
|
});
|
|
1161
|
-
}, kt = 64 * 1024, { isFunction: Oe } = p,
|
|
1161
|
+
}, kt = 64 * 1024, { isFunction: Oe } = p, Un = (({ Request: t, Response: e }) => ({
|
|
1162
1162
|
Request: t,
|
|
1163
1163
|
Response: e
|
|
1164
1164
|
}))(p.global), {
|
|
@@ -1170,14 +1170,14 @@ const tr = (t) => {
|
|
|
1170
1170
|
} catch {
|
|
1171
1171
|
return !1;
|
|
1172
1172
|
}
|
|
1173
|
-
},
|
|
1173
|
+
}, Ln = (t) => {
|
|
1174
1174
|
t = p.merge.call({
|
|
1175
1175
|
skipUndefined: !0
|
|
1176
|
-
},
|
|
1177
|
-
const { fetch: e, Request: r, Response: s } = t, a = e ? Oe(e) : typeof fetch == "function",
|
|
1176
|
+
}, Un, t);
|
|
1177
|
+
const { fetch: e, Request: r, Response: s } = t, a = e ? Oe(e) : typeof fetch == "function", o = Oe(r), i = Oe(s);
|
|
1178
1178
|
if (!a)
|
|
1179
1179
|
return !1;
|
|
1180
|
-
const l = a && Oe(Et), h = a && (typeof Ct == "function" ? /* @__PURE__ */ ((u) => (j) => u.encode(j))(new Ct()) : async (u) => new Uint8Array(await new r(u).arrayBuffer())),
|
|
1180
|
+
const l = a && Oe(Et), h = a && (typeof Ct == "function" ? /* @__PURE__ */ ((u) => (j) => u.encode(j))(new Ct()) : async (u) => new Uint8Array(await new r(u).arrayBuffer())), c = o && l && Tt(() => {
|
|
1181
1181
|
let u = !1;
|
|
1182
1182
|
const j = new r(ee.origin, {
|
|
1183
1183
|
body: new Et(),
|
|
@@ -1187,18 +1187,18 @@ const tr = (t) => {
|
|
|
1187
1187
|
}
|
|
1188
1188
|
}).headers.has("Content-Type");
|
|
1189
1189
|
return u && !j;
|
|
1190
|
-
}),
|
|
1191
|
-
stream:
|
|
1190
|
+
}), d = i && l && Tt(() => p.isReadableStream(new s("").body)), b = {
|
|
1191
|
+
stream: d && ((u) => u.body)
|
|
1192
1192
|
};
|
|
1193
1193
|
a && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((u) => {
|
|
1194
|
-
!
|
|
1194
|
+
!b[u] && (b[u] = (j, m) => {
|
|
1195
1195
|
let $ = j && j[u];
|
|
1196
1196
|
if ($)
|
|
1197
1197
|
return $.call(j);
|
|
1198
1198
|
throw new L(`Response type '${u}' is not supported`, L.ERR_NOT_SUPPORT, m);
|
|
1199
1199
|
});
|
|
1200
1200
|
});
|
|
1201
|
-
const
|
|
1201
|
+
const y = async (u) => {
|
|
1202
1202
|
if (u == null)
|
|
1203
1203
|
return 0;
|
|
1204
1204
|
if (p.isBlob(u))
|
|
@@ -1214,7 +1214,7 @@ const tr = (t) => {
|
|
|
1214
1214
|
return (await h(u)).byteLength;
|
|
1215
1215
|
}, w = async (u, j) => {
|
|
1216
1216
|
const m = p.toFiniteNumber(u.getContentLength());
|
|
1217
|
-
return m ??
|
|
1217
|
+
return m ?? y(j);
|
|
1218
1218
|
};
|
|
1219
1219
|
return async (u) => {
|
|
1220
1220
|
let {
|
|
@@ -1232,13 +1232,13 @@ const tr = (t) => {
|
|
|
1232
1232
|
fetchOptions: W
|
|
1233
1233
|
} = tr(u), F = e || fetch;
|
|
1234
1234
|
I = I ? (I + "").toLowerCase() : "text";
|
|
1235
|
-
let V =
|
|
1235
|
+
let V = $n([R, z && z.toAbortSignal()], C), Z = null;
|
|
1236
1236
|
const T = V && V.unsubscribe && (() => {
|
|
1237
1237
|
V.unsubscribe();
|
|
1238
1238
|
});
|
|
1239
1239
|
let J;
|
|
1240
1240
|
try {
|
|
1241
|
-
if (g &&
|
|
1241
|
+
if (g && c && m !== "get" && m !== "head" && (J = await w(v, $)) !== 0) {
|
|
1242
1242
|
let f = new r(j, {
|
|
1243
1243
|
method: "POST",
|
|
1244
1244
|
body: $,
|
|
@@ -1253,7 +1253,7 @@ const tr = (t) => {
|
|
|
1253
1253
|
}
|
|
1254
1254
|
}
|
|
1255
1255
|
p.isString(D) || (D = D ? "include" : "omit");
|
|
1256
|
-
const A =
|
|
1256
|
+
const A = o && "credentials" in r.prototype, O = {
|
|
1257
1257
|
...W,
|
|
1258
1258
|
signal: V,
|
|
1259
1259
|
method: m.toUpperCase(),
|
|
@@ -1262,10 +1262,10 @@ const tr = (t) => {
|
|
|
1262
1262
|
duplex: "half",
|
|
1263
1263
|
credentials: A ? D : void 0
|
|
1264
1264
|
};
|
|
1265
|
-
Z =
|
|
1266
|
-
let K = await (
|
|
1267
|
-
const Q =
|
|
1268
|
-
if (
|
|
1265
|
+
Z = o && new r(j, O);
|
|
1266
|
+
let K = await (o ? F(Z, W) : F(j, O));
|
|
1267
|
+
const Q = d && (I === "stream" || I === "response");
|
|
1268
|
+
if (d && (q || Q && T)) {
|
|
1269
1269
|
const f = {};
|
|
1270
1270
|
["status", "statusText", "headers"].forEach((_) => {
|
|
1271
1271
|
f[_] = K[_];
|
|
@@ -1282,7 +1282,7 @@ const tr = (t) => {
|
|
|
1282
1282
|
);
|
|
1283
1283
|
}
|
|
1284
1284
|
I = I || "text";
|
|
1285
|
-
let G = await
|
|
1285
|
+
let G = await b[p.findKey(b, I) || "text"](K, u);
|
|
1286
1286
|
return !Q && T && T(), await new Promise((f, S) => {
|
|
1287
1287
|
Qt(f, S, {
|
|
1288
1288
|
data: G,
|
|
@@ -1302,22 +1302,22 @@ const tr = (t) => {
|
|
|
1302
1302
|
) : L.from(A, A && A.code, u, Z);
|
|
1303
1303
|
}
|
|
1304
1304
|
};
|
|
1305
|
-
},
|
|
1305
|
+
}, Fn = /* @__PURE__ */ new Map(), rr = (t) => {
|
|
1306
1306
|
let e = t ? t.env : {};
|
|
1307
|
-
const { fetch: r, Request: s, Response: a } = e,
|
|
1307
|
+
const { fetch: r, Request: s, Response: a } = e, o = [
|
|
1308
1308
|
s,
|
|
1309
1309
|
a,
|
|
1310
1310
|
r
|
|
1311
1311
|
];
|
|
1312
|
-
let
|
|
1312
|
+
let i = o.length, l = i, h, c, d = Fn;
|
|
1313
1313
|
for (; l--; )
|
|
1314
|
-
h =
|
|
1315
|
-
return
|
|
1314
|
+
h = o[l], c = d.get(h), c === void 0 && d.set(h, c = l ? /* @__PURE__ */ new Map() : Ln(e)), d = c;
|
|
1315
|
+
return c;
|
|
1316
1316
|
};
|
|
1317
1317
|
rr();
|
|
1318
1318
|
const tt = {
|
|
1319
|
-
http:
|
|
1320
|
-
xhr:
|
|
1319
|
+
http: rn,
|
|
1320
|
+
xhr: zn,
|
|
1321
1321
|
fetch: {
|
|
1322
1322
|
get: rr
|
|
1323
1323
|
}
|
|
@@ -1331,28 +1331,28 @@ p.forEach(tt, (t, e) => {
|
|
|
1331
1331
|
Object.defineProperty(t, "adapterName", { value: e });
|
|
1332
1332
|
}
|
|
1333
1333
|
});
|
|
1334
|
-
const Rt = (t) => `- ${t}`,
|
|
1334
|
+
const Rt = (t) => `- ${t}`, qn = (t) => p.isFunction(t) || t === null || t === !1, nr = {
|
|
1335
1335
|
getAdapter: (t, e) => {
|
|
1336
1336
|
t = p.isArray(t) ? t : [t];
|
|
1337
1337
|
const { length: r } = t;
|
|
1338
1338
|
let s, a;
|
|
1339
|
-
const
|
|
1340
|
-
for (let
|
|
1341
|
-
s = t[
|
|
1339
|
+
const o = {};
|
|
1340
|
+
for (let i = 0; i < r; i++) {
|
|
1341
|
+
s = t[i];
|
|
1342
1342
|
let l;
|
|
1343
|
-
if (a = s, !
|
|
1343
|
+
if (a = s, !qn(s) && (a = tt[(l = String(s)).toLowerCase()], a === void 0))
|
|
1344
1344
|
throw new L(`Unknown adapter '${l}'`);
|
|
1345
1345
|
if (a && (p.isFunction(a) || (a = a.get(e))))
|
|
1346
1346
|
break;
|
|
1347
|
-
|
|
1347
|
+
o[l || "#" + i] = a;
|
|
1348
1348
|
}
|
|
1349
1349
|
if (!a) {
|
|
1350
|
-
const
|
|
1351
|
-
([h,
|
|
1350
|
+
const i = Object.entries(o).map(
|
|
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 ? i.length > 1 ? `since :
|
|
1354
|
+
` + i.map(Rt).join(`
|
|
1355
|
+
`) : " " + Rt(i[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"
|
|
@@ -1392,47 +1392,47 @@ const sr = "1.12.2", Be = {};
|
|
|
1392
1392
|
});
|
|
1393
1393
|
const Pt = {};
|
|
1394
1394
|
Be.transitional = function(e, r, s) {
|
|
1395
|
-
function a(
|
|
1396
|
-
return "[Axios v" + sr + "] Transitional option '" +
|
|
1395
|
+
function a(o, i) {
|
|
1396
|
+
return "[Axios v" + sr + "] Transitional option '" + o + "'" + i + (s ? ". " + s : "");
|
|
1397
1397
|
}
|
|
1398
|
-
return (
|
|
1398
|
+
return (o, i, l) => {
|
|
1399
1399
|
if (e === !1)
|
|
1400
1400
|
throw new L(
|
|
1401
|
-
a(
|
|
1401
|
+
a(i, " has been removed" + (r ? " in " + r : "")),
|
|
1402
1402
|
L.ERR_DEPRECATED
|
|
1403
1403
|
);
|
|
1404
|
-
return r && !Pt[
|
|
1404
|
+
return r && !Pt[i] && (Pt[i] = !0, console.warn(
|
|
1405
1405
|
a(
|
|
1406
|
-
|
|
1406
|
+
i,
|
|
1407
1407
|
" has been deprecated since v" + r + " and will be removed in the near future"
|
|
1408
1408
|
)
|
|
1409
|
-
)), e ? e(
|
|
1409
|
+
)), e ? e(o, i, l) : !0;
|
|
1410
1410
|
};
|
|
1411
1411
|
};
|
|
1412
1412
|
Be.spelling = function(e) {
|
|
1413
1413
|
return (r, s) => (console.warn(`${s} is likely a misspelling of ${e}`), !0);
|
|
1414
1414
|
};
|
|
1415
|
-
function
|
|
1415
|
+
function Mn(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
1419
|
let a = s.length;
|
|
1420
1420
|
for (; a-- > 0; ) {
|
|
1421
|
-
const
|
|
1422
|
-
if (
|
|
1423
|
-
const l = t[
|
|
1421
|
+
const o = s[a], i = e[o];
|
|
1422
|
+
if (i) {
|
|
1423
|
+
const l = t[o], h = l === void 0 || i(l, o, t);
|
|
1424
1424
|
if (h !== !0)
|
|
1425
|
-
throw new L("option " +
|
|
1425
|
+
throw new L("option " + o + " must be " + h, L.ERR_BAD_OPTION_VALUE);
|
|
1426
1426
|
continue;
|
|
1427
1427
|
}
|
|
1428
1428
|
if (r !== !0)
|
|
1429
|
-
throw new L("Unknown option " +
|
|
1429
|
+
throw new L("Unknown option " + o, L.ERR_BAD_OPTION);
|
|
1430
1430
|
}
|
|
1431
1431
|
}
|
|
1432
1432
|
const _e = {
|
|
1433
|
-
assertOptions:
|
|
1433
|
+
assertOptions: Mn,
|
|
1434
1434
|
validators: Be
|
|
1435
|
-
},
|
|
1435
|
+
}, oe = _e.validators;
|
|
1436
1436
|
let xe = class {
|
|
1437
1437
|
constructor(e) {
|
|
1438
1438
|
this.defaults = e || {}, this.interceptors = {
|
|
@@ -1455,10 +1455,10 @@ let xe = class {
|
|
|
1455
1455
|
if (s instanceof Error) {
|
|
1456
1456
|
let a = {};
|
|
1457
1457
|
Error.captureStackTrace ? Error.captureStackTrace(a) : a = new Error();
|
|
1458
|
-
const
|
|
1458
|
+
const o = a.stack ? a.stack.replace(/^.+\n/, "") : "";
|
|
1459
1459
|
try {
|
|
1460
|
-
s.stack ?
|
|
1461
|
-
` +
|
|
1460
|
+
s.stack ? o && !String(s.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (s.stack += `
|
|
1461
|
+
` + o) : s.stack = o;
|
|
1462
1462
|
} catch {
|
|
1463
1463
|
}
|
|
1464
1464
|
}
|
|
@@ -1467,50 +1467,50 @@ let xe = class {
|
|
|
1467
1467
|
}
|
|
1468
1468
|
_request(e, r) {
|
|
1469
1469
|
typeof e == "string" ? (r = r || {}, r.url = e) : r = e || {}, r = he(this.defaults, r);
|
|
1470
|
-
const { transitional: s, paramsSerializer: a, headers:
|
|
1470
|
+
const { transitional: s, paramsSerializer: a, headers: o } = r;
|
|
1471
1471
|
s !== void 0 && _e.assertOptions(s, {
|
|
1472
|
-
silentJSONParsing:
|
|
1473
|
-
forcedJSONParsing:
|
|
1474
|
-
clarifyTimeoutError:
|
|
1472
|
+
silentJSONParsing: oe.transitional(oe.boolean),
|
|
1473
|
+
forcedJSONParsing: oe.transitional(oe.boolean),
|
|
1474
|
+
clarifyTimeoutError: oe.transitional(oe.boolean)
|
|
1475
1475
|
}, !1), a != null && (p.isFunction(a) ? r.paramsSerializer = {
|
|
1476
1476
|
serialize: a
|
|
1477
1477
|
} : _e.assertOptions(a, {
|
|
1478
|
-
encode:
|
|
1479
|
-
serialize:
|
|
1478
|
+
encode: oe.function,
|
|
1479
|
+
serialize: oe.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
|
-
baseUrl:
|
|
1482
|
-
withXsrfToken:
|
|
1481
|
+
baseUrl: oe.spelling("baseURL"),
|
|
1482
|
+
withXsrfToken: oe.spelling("withXSRFToken")
|
|
1483
1483
|
}, !0), r.method = (r.method || this.defaults.method || "get").toLowerCase();
|
|
1484
|
-
let
|
|
1485
|
-
|
|
1486
|
-
|
|
1484
|
+
let i = o && p.merge(
|
|
1485
|
+
o.common,
|
|
1486
|
+
o[r.method]
|
|
1487
1487
|
);
|
|
1488
|
-
|
|
1488
|
+
o && p.forEach(
|
|
1489
1489
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1490
1490
|
(u) => {
|
|
1491
|
-
delete
|
|
1491
|
+
delete o[u];
|
|
1492
1492
|
}
|
|
1493
|
-
), r.headers = ne.concat(
|
|
1493
|
+
), r.headers = ne.concat(i, o);
|
|
1494
1494
|
const l = [];
|
|
1495
1495
|
let h = !0;
|
|
1496
1496
|
this.interceptors.request.forEach(function(j) {
|
|
1497
1497
|
typeof j.runWhen == "function" && j.runWhen(r) === !1 || (h = h && j.synchronous, l.unshift(j.fulfilled, j.rejected));
|
|
1498
1498
|
});
|
|
1499
|
-
const
|
|
1499
|
+
const c = [];
|
|
1500
1500
|
this.interceptors.response.forEach(function(j) {
|
|
1501
|
-
|
|
1501
|
+
c.push(j.fulfilled, j.rejected);
|
|
1502
1502
|
});
|
|
1503
|
-
let
|
|
1503
|
+
let d, b = 0, y;
|
|
1504
1504
|
if (!h) {
|
|
1505
1505
|
const u = [It.bind(this), void 0];
|
|
1506
|
-
for (u.unshift(...l), u.push(...
|
|
1507
|
-
|
|
1508
|
-
return
|
|
1506
|
+
for (u.unshift(...l), u.push(...c), y = u.length, d = Promise.resolve(r); b < y; )
|
|
1507
|
+
d = d.then(u[b++], u[b++]);
|
|
1508
|
+
return d;
|
|
1509
1509
|
}
|
|
1510
|
-
|
|
1510
|
+
y = l.length;
|
|
1511
1511
|
let w = r;
|
|
1512
|
-
for (;
|
|
1513
|
-
const u = l[
|
|
1512
|
+
for (; b < y; ) {
|
|
1513
|
+
const u = l[b++], j = l[b++];
|
|
1514
1514
|
try {
|
|
1515
1515
|
w = u(w);
|
|
1516
1516
|
} catch (m) {
|
|
@@ -1519,13 +1519,13 @@ let xe = class {
|
|
|
1519
1519
|
}
|
|
1520
1520
|
}
|
|
1521
1521
|
try {
|
|
1522
|
-
|
|
1522
|
+
d = It.call(this, w);
|
|
1523
1523
|
} catch (u) {
|
|
1524
1524
|
return Promise.reject(u);
|
|
1525
1525
|
}
|
|
1526
|
-
for (
|
|
1527
|
-
|
|
1528
|
-
return
|
|
1526
|
+
for (b = 0, y = c.length; b < y; )
|
|
1527
|
+
d = d.then(c[b++], c[b++]);
|
|
1528
|
+
return d;
|
|
1529
1529
|
}
|
|
1530
1530
|
getUri(e) {
|
|
1531
1531
|
e = he(this.defaults, e);
|
|
@@ -1544,44 +1544,44 @@ 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(
|
|
1547
|
+
return function(o, i, l) {
|
|
1548
1548
|
return this.request(he(l || {}, {
|
|
1549
1549
|
method: e,
|
|
1550
1550
|
headers: s ? {
|
|
1551
1551
|
"Content-Type": "multipart/form-data"
|
|
1552
1552
|
} : {},
|
|
1553
|
-
url:
|
|
1554
|
-
data:
|
|
1553
|
+
url: o,
|
|
1554
|
+
data: i
|
|
1555
1555
|
}));
|
|
1556
1556
|
};
|
|
1557
1557
|
}
|
|
1558
1558
|
xe.prototype[e] = r(), xe.prototype[e + "Form"] = r(!0);
|
|
1559
1559
|
});
|
|
1560
|
-
let
|
|
1560
|
+
let Wn = class ar {
|
|
1561
1561
|
constructor(e) {
|
|
1562
1562
|
if (typeof e != "function")
|
|
1563
1563
|
throw new TypeError("executor must be a function.");
|
|
1564
1564
|
let r;
|
|
1565
|
-
this.promise = new Promise(function(
|
|
1566
|
-
r =
|
|
1565
|
+
this.promise = new Promise(function(o) {
|
|
1566
|
+
r = o;
|
|
1567
1567
|
});
|
|
1568
1568
|
const s = this;
|
|
1569
1569
|
this.promise.then((a) => {
|
|
1570
1570
|
if (!s._listeners) return;
|
|
1571
|
-
let
|
|
1572
|
-
for (;
|
|
1573
|
-
s._listeners[
|
|
1571
|
+
let o = s._listeners.length;
|
|
1572
|
+
for (; o-- > 0; )
|
|
1573
|
+
s._listeners[o](a);
|
|
1574
1574
|
s._listeners = null;
|
|
1575
1575
|
}), this.promise.then = (a) => {
|
|
1576
|
-
let
|
|
1577
|
-
const
|
|
1578
|
-
s.subscribe(l),
|
|
1576
|
+
let o;
|
|
1577
|
+
const i = new Promise((l) => {
|
|
1578
|
+
s.subscribe(l), o = l;
|
|
1579
1579
|
}).then(a);
|
|
1580
|
-
return
|
|
1581
|
-
s.unsubscribe(
|
|
1582
|
-
},
|
|
1583
|
-
}, e(function(
|
|
1584
|
-
s.reason || (s.reason = new je(
|
|
1580
|
+
return i.cancel = function() {
|
|
1581
|
+
s.unsubscribe(o);
|
|
1582
|
+
}, i;
|
|
1583
|
+
}, e(function(o, i, l) {
|
|
1584
|
+
s.reason || (s.reason = new je(o, i, l), r(s.reason));
|
|
1585
1585
|
});
|
|
1586
1586
|
}
|
|
1587
1587
|
/**
|
|
@@ -1630,12 +1630,12 @@ let Fn = class ar {
|
|
|
1630
1630
|
};
|
|
1631
1631
|
}
|
|
1632
1632
|
};
|
|
1633
|
-
function
|
|
1633
|
+
function Bn(t) {
|
|
1634
1634
|
return function(r) {
|
|
1635
1635
|
return t.apply(null, r);
|
|
1636
1636
|
};
|
|
1637
1637
|
}
|
|
1638
|
-
function
|
|
1638
|
+
function Hn(t) {
|
|
1639
1639
|
return p.isObject(t) && t.isAxiosError === !0;
|
|
1640
1640
|
}
|
|
1641
1641
|
const rt = {
|
|
@@ -1706,16 +1706,16 @@ const rt = {
|
|
|
1706
1706
|
Object.entries(rt).forEach(([t, e]) => {
|
|
1707
1707
|
rt[e] = t;
|
|
1708
1708
|
});
|
|
1709
|
-
function
|
|
1709
|
+
function ir(t) {
|
|
1710
1710
|
const e = new xe(t), r = Dt(xe.prototype.request, e);
|
|
1711
1711
|
return p.extend(r, xe.prototype, e, { allOwnKeys: !0 }), p.extend(r, e, null, { allOwnKeys: !0 }), r.create = function(a) {
|
|
1712
|
-
return
|
|
1712
|
+
return ir(he(t, a));
|
|
1713
1713
|
}, r;
|
|
1714
1714
|
}
|
|
1715
|
-
const M =
|
|
1715
|
+
const M = ir(Ie);
|
|
1716
1716
|
M.Axios = xe;
|
|
1717
1717
|
M.CanceledError = je;
|
|
1718
|
-
M.CancelToken =
|
|
1718
|
+
M.CancelToken = Wn;
|
|
1719
1719
|
M.isCancel = Zt;
|
|
1720
1720
|
M.VERSION = sr;
|
|
1721
1721
|
M.toFormData = We;
|
|
@@ -1724,8 +1724,8 @@ M.Cancel = M.CanceledError;
|
|
|
1724
1724
|
M.all = function(e) {
|
|
1725
1725
|
return Promise.all(e);
|
|
1726
1726
|
};
|
|
1727
|
-
M.spread =
|
|
1728
|
-
M.isAxiosError =
|
|
1727
|
+
M.spread = Bn;
|
|
1728
|
+
M.isAxiosError = Hn;
|
|
1729
1729
|
M.mergeConfig = he;
|
|
1730
1730
|
M.AxiosHeaders = ne;
|
|
1731
1731
|
M.formToJSON = (t) => Xt(p.isHTMLForm(t) ? new FormData(t) : t);
|
|
@@ -1733,24 +1733,24 @@ M.getAdapter = nr.getAdapter;
|
|
|
1733
1733
|
M.HttpStatusCode = rt;
|
|
1734
1734
|
M.default = M;
|
|
1735
1735
|
const {
|
|
1736
|
-
Axios:
|
|
1737
|
-
AxiosError:
|
|
1738
|
-
CanceledError:
|
|
1739
|
-
isCancel:
|
|
1740
|
-
CancelToken:
|
|
1741
|
-
VERSION:
|
|
1742
|
-
all:
|
|
1743
|
-
Cancel:
|
|
1744
|
-
isAxiosError:
|
|
1745
|
-
spread:
|
|
1746
|
-
toFormData:
|
|
1747
|
-
AxiosHeaders:
|
|
1748
|
-
HttpStatusCode:
|
|
1749
|
-
formToJSON:
|
|
1750
|
-
getAdapter:
|
|
1751
|
-
mergeConfig:
|
|
1736
|
+
Axios: Zs,
|
|
1737
|
+
AxiosError: Qs,
|
|
1738
|
+
CanceledError: ea,
|
|
1739
|
+
isCancel: ta,
|
|
1740
|
+
CancelToken: ra,
|
|
1741
|
+
VERSION: na,
|
|
1742
|
+
all: sa,
|
|
1743
|
+
Cancel: aa,
|
|
1744
|
+
isAxiosError: ia,
|
|
1745
|
+
spread: oa,
|
|
1746
|
+
toFormData: la,
|
|
1747
|
+
AxiosHeaders: ca,
|
|
1748
|
+
HttpStatusCode: da,
|
|
1749
|
+
formToJSON: ua,
|
|
1750
|
+
getAdapter: pa,
|
|
1751
|
+
mergeConfig: fa
|
|
1752
1752
|
} = M;
|
|
1753
|
-
class
|
|
1753
|
+
class xa {
|
|
1754
1754
|
baseUrl;
|
|
1755
1755
|
apiKey;
|
|
1756
1756
|
appId;
|
|
@@ -1785,22 +1785,22 @@ class pa {
|
|
|
1785
1785
|
if (!e) throw new Error("HTTP method is required");
|
|
1786
1786
|
if (!r) throw new Error("Request path is required");
|
|
1787
1787
|
try {
|
|
1788
|
-
const
|
|
1788
|
+
const o = {
|
|
1789
1789
|
...this.appId ? { appId: this.appId } : {},
|
|
1790
1790
|
...s || {}
|
|
1791
1791
|
};
|
|
1792
1792
|
return (await this.client.request({
|
|
1793
1793
|
url: r,
|
|
1794
1794
|
method: e,
|
|
1795
|
-
data:
|
|
1795
|
+
data: o,
|
|
1796
1796
|
headers: a
|
|
1797
1797
|
})).data;
|
|
1798
|
-
} catch (
|
|
1799
|
-
if (console.error("❌ [Request Error]:",
|
|
1800
|
-
const
|
|
1801
|
-
throw new Error(`Request failed (${
|
|
1798
|
+
} catch (o) {
|
|
1799
|
+
if (console.error("❌ [Request Error]:", o), o.isAxiosError) {
|
|
1800
|
+
const i = o.response?.status || 0, l = o.response?.data?.message || o.message || "Unknown Axios error occurred";
|
|
1801
|
+
throw new Error(`Request failed (${i}): ${l}`);
|
|
1802
1802
|
}
|
|
1803
|
-
throw new Error(`Unexpected error: ${
|
|
1803
|
+
throw new Error(`Unexpected error: ${o.message || "Unknown failure"}`);
|
|
1804
1804
|
}
|
|
1805
1805
|
}
|
|
1806
1806
|
// ================= USERS =================
|
|
@@ -1858,7 +1858,7 @@ class pa {
|
|
|
1858
1858
|
* @param params requires userId, currentPassword, newPassword
|
|
1859
1859
|
*/
|
|
1860
1860
|
async changePassword(e) {
|
|
1861
|
-
const { userId: r, currentPassword: s, newPassword: a, appId:
|
|
1861
|
+
const { userId: r, currentPassword: s, newPassword: a, appId: o } = e;
|
|
1862
1862
|
if (!r) throw new Error("changePassword: 'userId' is required");
|
|
1863
1863
|
if (!s || !a)
|
|
1864
1864
|
throw new Error(
|
|
@@ -1867,7 +1867,7 @@ class pa {
|
|
|
1867
1867
|
return this.request("PUT", `/users/change-password/${r}`, {
|
|
1868
1868
|
currentPassword: s,
|
|
1869
1869
|
newPassword: a,
|
|
1870
|
-
appId:
|
|
1870
|
+
appId: o || this.appId
|
|
1871
1871
|
});
|
|
1872
1872
|
}
|
|
1873
1873
|
/**
|
|
@@ -1942,7 +1942,7 @@ class pa {
|
|
|
1942
1942
|
* @param params requires email, otp, newPassword
|
|
1943
1943
|
*/
|
|
1944
1944
|
async resetPassword(e) {
|
|
1945
|
-
const { email: r, otp: s, newPassword: a, appId:
|
|
1945
|
+
const { email: r, otp: s, newPassword: a, appId: o } = e;
|
|
1946
1946
|
if (!r || !s || !a)
|
|
1947
1947
|
throw new Error(
|
|
1948
1948
|
"resetPassword: 'email', 'otp' and 'newPassword' are required"
|
|
@@ -1951,7 +1951,7 @@ class pa {
|
|
|
1951
1951
|
email: r,
|
|
1952
1952
|
otp: s,
|
|
1953
1953
|
newPassword: a,
|
|
1954
|
-
appId:
|
|
1954
|
+
appId: o || this.appId
|
|
1955
1955
|
});
|
|
1956
1956
|
}
|
|
1957
1957
|
/**
|
|
@@ -1998,7 +1998,7 @@ class pa {
|
|
|
1998
1998
|
throw new Error("searchUserDataByKeys: 'userId' is required");
|
|
1999
1999
|
const a = new URLSearchParams(
|
|
2000
2000
|
Object.entries(s).reduce(
|
|
2001
|
-
(
|
|
2001
|
+
(o, [i, l]) => (l != null && (o[i] = String(l)), o),
|
|
2002
2002
|
{}
|
|
2003
2003
|
)
|
|
2004
2004
|
).toString();
|
|
@@ -2023,7 +2023,7 @@ class pa {
|
|
|
2023
2023
|
);
|
|
2024
2024
|
const s = new URLSearchParams(
|
|
2025
2025
|
Object.entries(e).reduce(
|
|
2026
|
-
(a, [
|
|
2026
|
+
(a, [o, i]) => (i != null && (a[o] = String(i)), a),
|
|
2027
2027
|
{}
|
|
2028
2028
|
)
|
|
2029
2029
|
).toString();
|
|
@@ -2206,23 +2206,23 @@ var Ae = { exports: {} }, ke = {};
|
|
|
2206
2206
|
* LICENSE file in the root directory of this source tree.
|
|
2207
2207
|
*/
|
|
2208
2208
|
var Ot;
|
|
2209
|
-
function
|
|
2209
|
+
function Vn() {
|
|
2210
2210
|
if (Ot) return ke;
|
|
2211
2211
|
Ot = 1;
|
|
2212
2212
|
var t = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
|
|
2213
|
-
function r(s, a,
|
|
2214
|
-
var
|
|
2215
|
-
if (
|
|
2216
|
-
|
|
2213
|
+
function r(s, a, o) {
|
|
2214
|
+
var i = null;
|
|
2215
|
+
if (o !== void 0 && (i = "" + o), a.key !== void 0 && (i = "" + a.key), "key" in a) {
|
|
2216
|
+
o = {};
|
|
2217
2217
|
for (var l in a)
|
|
2218
|
-
l !== "key" && (
|
|
2219
|
-
} else
|
|
2220
|
-
return a =
|
|
2218
|
+
l !== "key" && (o[l] = a[l]);
|
|
2219
|
+
} else o = a;
|
|
2220
|
+
return a = o.ref, {
|
|
2221
2221
|
$$typeof: t,
|
|
2222
2222
|
type: s,
|
|
2223
|
-
key:
|
|
2223
|
+
key: i,
|
|
2224
2224
|
ref: a !== void 0 ? a : null,
|
|
2225
|
-
props:
|
|
2225
|
+
props: o
|
|
2226
2226
|
};
|
|
2227
2227
|
}
|
|
2228
2228
|
return ke.Fragment = e, ke.jsx = r, ke.jsxs = r, ke;
|
|
@@ -2238,7 +2238,7 @@ var Ee = {};
|
|
|
2238
2238
|
* LICENSE file in the root directory of this source tree.
|
|
2239
2239
|
*/
|
|
2240
2240
|
var At;
|
|
2241
|
-
function
|
|
2241
|
+
function Yn() {
|
|
2242
2242
|
return At || (At = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
2243
2243
|
function t(f) {
|
|
2244
2244
|
if (f == null) return null;
|
|
@@ -2318,10 +2318,10 @@ function Bn() {
|
|
|
2318
2318
|
var f = V.A;
|
|
2319
2319
|
return f === null ? null : f.getOwner();
|
|
2320
2320
|
}
|
|
2321
|
-
function
|
|
2321
|
+
function o() {
|
|
2322
2322
|
return Error("react-stack-top-frame");
|
|
2323
2323
|
}
|
|
2324
|
-
function
|
|
2324
|
+
function i(f) {
|
|
2325
2325
|
if (Z.call(f, "key")) {
|
|
2326
2326
|
var S = Object.getOwnPropertyDescriptor(f, "key").get;
|
|
2327
2327
|
if (S && S.isReactWarning) return !1;
|
|
@@ -2346,7 +2346,7 @@ function Bn() {
|
|
|
2346
2346
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
2347
2347
|
)), f = this.props.ref, f !== void 0 ? f : null;
|
|
2348
2348
|
}
|
|
2349
|
-
function
|
|
2349
|
+
function c(f, S, x, k, _, N) {
|
|
2350
2350
|
var Y = x.ref;
|
|
2351
2351
|
return f = {
|
|
2352
2352
|
$$typeof: u,
|
|
@@ -2379,19 +2379,19 @@ function Bn() {
|
|
|
2379
2379
|
value: N
|
|
2380
2380
|
}), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
|
|
2381
2381
|
}
|
|
2382
|
-
function
|
|
2382
|
+
function d(f, S, x, k, _, N) {
|
|
2383
2383
|
var Y = S.children;
|
|
2384
2384
|
if (Y !== void 0)
|
|
2385
2385
|
if (k)
|
|
2386
2386
|
if (T(Y)) {
|
|
2387
2387
|
for (k = 0; k < Y.length; k++)
|
|
2388
|
-
|
|
2388
|
+
b(Y[k]);
|
|
2389
2389
|
Object.freeze && Object.freeze(Y);
|
|
2390
2390
|
} else
|
|
2391
2391
|
console.error(
|
|
2392
2392
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
2393
2393
|
);
|
|
2394
|
-
else
|
|
2394
|
+
else b(Y);
|
|
2395
2395
|
if (Z.call(S, "key")) {
|
|
2396
2396
|
Y = t(f);
|
|
2397
2397
|
var se = Object.keys(S).filter(function(ve) {
|
|
@@ -2410,7 +2410,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2410
2410
|
Y
|
|
2411
2411
|
), G[Y + k] = !0);
|
|
2412
2412
|
}
|
|
2413
|
-
if (Y = null, x !== void 0 && (r(x), Y = "" + x),
|
|
2413
|
+
if (Y = null, x !== void 0 && (r(x), Y = "" + x), i(S) && (r(S.key), Y = "" + S.key), "key" in S) {
|
|
2414
2414
|
x = {};
|
|
2415
2415
|
for (var ue in S)
|
|
2416
2416
|
ue !== "key" && (x[ue] = S[ue]);
|
|
@@ -2418,7 +2418,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2418
2418
|
return Y && l(
|
|
2419
2419
|
x,
|
|
2420
2420
|
typeof f == "function" ? f.displayName || f.name || "Unknown" : f
|
|
2421
|
-
),
|
|
2421
|
+
), c(
|
|
2422
2422
|
f,
|
|
2423
2423
|
Y,
|
|
2424
2424
|
x,
|
|
@@ -2427,10 +2427,10 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2427
2427
|
N
|
|
2428
2428
|
);
|
|
2429
2429
|
}
|
|
2430
|
-
function y(f) {
|
|
2431
|
-
b(f) ? f._store && (f._store.validated = 1) : typeof f == "object" && f !== null && f.$$typeof === D && (f._payload.status === "fulfilled" ? b(f._payload.value) && f._payload.value._store && (f._payload.value._store.validated = 1) : f._store && (f._store.validated = 1));
|
|
2432
|
-
}
|
|
2433
2430
|
function b(f) {
|
|
2431
|
+
y(f) ? f._store && (f._store.validated = 1) : typeof f == "object" && f !== null && f.$$typeof === D && (f._payload.status === "fulfilled" ? y(f._payload.value) && f._payload.value._store && (f._payload.value._store.validated = 1) : f._store && (f._store.validated = 1));
|
|
2432
|
+
}
|
|
2433
|
+
function y(f) {
|
|
2434
2434
|
return typeof f == "object" && f !== null && f.$$typeof === u;
|
|
2435
2435
|
}
|
|
2436
2436
|
var w = Le, u = Symbol.for("react.transitional.element"), j = Symbol.for("react.portal"), m = Symbol.for("react.fragment"), $ = Symbol.for("react.strict_mode"), R = Symbol.for("react.profiler"), z = Symbol.for("react.consumer"), C = Symbol.for("react.context"), q = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), I = Symbol.for("react.suspense_list"), v = Symbol.for("react.memo"), D = Symbol.for("react.lazy"), W = Symbol.for("react.activity"), F = Symbol.for("react.client.reference"), V = w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Z = Object.prototype.hasOwnProperty, T = Array.isArray, J = console.createTask ? console.createTask : function() {
|
|
@@ -2443,11 +2443,11 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2443
2443
|
};
|
|
2444
2444
|
var A, O = {}, K = w.react_stack_bottom_frame.bind(
|
|
2445
2445
|
w,
|
|
2446
|
-
|
|
2447
|
-
)(), Q = J(s(
|
|
2446
|
+
o
|
|
2447
|
+
)(), Q = J(s(o)), G = {};
|
|
2448
2448
|
Ee.Fragment = m, Ee.jsx = function(f, S, x) {
|
|
2449
2449
|
var k = 1e4 > V.recentlyCreatedOwnerStacks++;
|
|
2450
|
-
return
|
|
2450
|
+
return d(
|
|
2451
2451
|
f,
|
|
2452
2452
|
S,
|
|
2453
2453
|
x,
|
|
@@ -2457,7 +2457,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2457
2457
|
);
|
|
2458
2458
|
}, Ee.jsxs = function(f, S, x) {
|
|
2459
2459
|
var k = 1e4 > V.recentlyCreatedOwnerStacks++;
|
|
2460
|
-
return
|
|
2460
|
+
return d(
|
|
2461
2461
|
f,
|
|
2462
2462
|
S,
|
|
2463
2463
|
x,
|
|
@@ -2469,34 +2469,34 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2469
2469
|
})()), Ee;
|
|
2470
2470
|
}
|
|
2471
2471
|
var zt;
|
|
2472
|
-
function
|
|
2473
|
-
return zt || (zt = 1, process.env.NODE_ENV === "production" ? Ae.exports =
|
|
2472
|
+
function Kn() {
|
|
2473
|
+
return zt || (zt = 1, process.env.NODE_ENV === "production" ? Ae.exports = Vn() : Ae.exports = Yn()), Ae.exports;
|
|
2474
2474
|
}
|
|
2475
|
-
var n =
|
|
2476
|
-
const
|
|
2477
|
-
const { name: r, email: s, password: a, appId:
|
|
2478
|
-
if (!
|
|
2475
|
+
var n = Kn();
|
|
2476
|
+
const Jn = async (t, e) => {
|
|
2477
|
+
const { name: r, email: s, password: a, appId: o, phone: i, address: l, avatarUrl: h, isActive: c = !0, role: d = "user" } = t, { baseUrl: b, apiKey: y } = e;
|
|
2478
|
+
if (!y)
|
|
2479
2479
|
throw new Error("API key is required for signup");
|
|
2480
|
-
if (!r || !s || !a || !
|
|
2480
|
+
if (!r || !s || !a || !o)
|
|
2481
2481
|
throw new Error("Name, email, password, and appId are required");
|
|
2482
2482
|
try {
|
|
2483
2483
|
const w = await M.post(
|
|
2484
|
-
`${
|
|
2484
|
+
`${b}/users/signup`,
|
|
2485
2485
|
{
|
|
2486
2486
|
name: r,
|
|
2487
2487
|
email: s,
|
|
2488
2488
|
password: a,
|
|
2489
|
-
appId:
|
|
2490
|
-
phone:
|
|
2489
|
+
appId: o,
|
|
2490
|
+
phone: i,
|
|
2491
2491
|
address: l,
|
|
2492
2492
|
avatarUrl: h,
|
|
2493
|
-
isActive:
|
|
2494
|
-
role:
|
|
2493
|
+
isActive: c,
|
|
2494
|
+
role: d
|
|
2495
2495
|
},
|
|
2496
2496
|
{
|
|
2497
2497
|
headers: {
|
|
2498
2498
|
"Content-Type": "application/json",
|
|
2499
|
-
"x-api-key":
|
|
2499
|
+
"x-api-key": y
|
|
2500
2500
|
}
|
|
2501
2501
|
}
|
|
2502
2502
|
);
|
|
@@ -2534,13 +2534,13 @@ const Vn = async (t, e) => {
|
|
|
2534
2534
|
* This source code is licensed under the ISC license.
|
|
2535
2535
|
* See the LICENSE file in the root directory of this source tree.
|
|
2536
2536
|
*/
|
|
2537
|
-
const
|
|
2537
|
+
const Gn = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Xn = (t) => t.replace(
|
|
2538
2538
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
2539
2539
|
(e, r, s) => s ? s.toUpperCase() : r.toLowerCase()
|
|
2540
2540
|
), $t = (t) => {
|
|
2541
|
-
const e =
|
|
2541
|
+
const e = Xn(t);
|
|
2542
2542
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
2543
|
-
},
|
|
2543
|
+
}, or = (...t) => t.filter((e, r, s) => !!e && e.trim() !== "" && s.indexOf(e) === r).join(" ").trim(), Zn = (t) => {
|
|
2544
2544
|
for (const e in t)
|
|
2545
2545
|
if (e.startsWith("aria-") || e === "role" || e === "title")
|
|
2546
2546
|
return !0;
|
|
@@ -2551,7 +2551,7 @@ const Yn = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Kn = (
|
|
|
2551
2551
|
* This source code is licensed under the ISC license.
|
|
2552
2552
|
* See the LICENSE file in the root directory of this source tree.
|
|
2553
2553
|
*/
|
|
2554
|
-
var
|
|
2554
|
+
var Qn = {
|
|
2555
2555
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2556
2556
|
width: 24,
|
|
2557
2557
|
height: 24,
|
|
@@ -2568,32 +2568,32 @@ var Gn = {
|
|
|
2568
2568
|
* This source code is licensed under the ISC license.
|
|
2569
2569
|
* See the LICENSE file in the root directory of this source tree.
|
|
2570
2570
|
*/
|
|
2571
|
-
const
|
|
2571
|
+
const es = Nt(
|
|
2572
2572
|
({
|
|
2573
2573
|
color: t = "currentColor",
|
|
2574
2574
|
size: e = 24,
|
|
2575
2575
|
strokeWidth: r = 2,
|
|
2576
2576
|
absoluteStrokeWidth: s,
|
|
2577
2577
|
className: a = "",
|
|
2578
|
-
children:
|
|
2579
|
-
iconNode:
|
|
2578
|
+
children: o,
|
|
2579
|
+
iconNode: i,
|
|
2580
2580
|
...l
|
|
2581
2581
|
}, h) => Xe(
|
|
2582
2582
|
"svg",
|
|
2583
2583
|
{
|
|
2584
2584
|
ref: h,
|
|
2585
|
-
...
|
|
2585
|
+
...Qn,
|
|
2586
2586
|
width: e,
|
|
2587
2587
|
height: e,
|
|
2588
2588
|
stroke: t,
|
|
2589
2589
|
strokeWidth: s ? Number(r) * 24 / Number(e) : r,
|
|
2590
|
-
className:
|
|
2591
|
-
...!
|
|
2590
|
+
className: or("lucide", a),
|
|
2591
|
+
...!o && !Zn(l) && { "aria-hidden": "true" },
|
|
2592
2592
|
...l
|
|
2593
2593
|
},
|
|
2594
2594
|
[
|
|
2595
|
-
...
|
|
2596
|
-
...Array.isArray(
|
|
2595
|
+
...i.map(([c, d]) => Xe(c, d)),
|
|
2596
|
+
...Array.isArray(o) ? o : [o]
|
|
2597
2597
|
]
|
|
2598
2598
|
)
|
|
2599
2599
|
);
|
|
@@ -2605,11 +2605,11 @@ const Xn = Nt(
|
|
|
2605
2605
|
*/
|
|
2606
2606
|
const B = (t, e) => {
|
|
2607
2607
|
const r = Nt(
|
|
2608
|
-
({ className: s, ...a },
|
|
2609
|
-
ref:
|
|
2608
|
+
({ className: s, ...a }, o) => Xe(es, {
|
|
2609
|
+
ref: o,
|
|
2610
2610
|
iconNode: e,
|
|
2611
|
-
className:
|
|
2612
|
-
`lucide-${
|
|
2611
|
+
className: or(
|
|
2612
|
+
`lucide-${Gn($t(t))}`,
|
|
2613
2613
|
`lucide-${t}`,
|
|
2614
2614
|
s
|
|
2615
2615
|
),
|
|
@@ -2624,7 +2624,7 @@ const B = (t, e) => {
|
|
|
2624
2624
|
* This source code is licensed under the ISC license.
|
|
2625
2625
|
* See the LICENSE file in the root directory of this source tree.
|
|
2626
2626
|
*/
|
|
2627
|
-
const
|
|
2627
|
+
const ts = [
|
|
2628
2628
|
[
|
|
2629
2629
|
"path",
|
|
2630
2630
|
{
|
|
@@ -2633,74 +2633,74 @@ const Zn = [
|
|
|
2633
2633
|
}
|
|
2634
2634
|
],
|
|
2635
2635
|
["circle", { cx: "12", cy: "13", r: "3", key: "1vg3eu" }]
|
|
2636
|
-
], nt = B("camera",
|
|
2636
|
+
], nt = B("camera", ts);
|
|
2637
2637
|
/**
|
|
2638
2638
|
* @license lucide-react v0.544.0 - ISC
|
|
2639
2639
|
*
|
|
2640
2640
|
* This source code is licensed under the ISC license.
|
|
2641
2641
|
* See the LICENSE file in the root directory of this source tree.
|
|
2642
2642
|
*/
|
|
2643
|
-
const
|
|
2643
|
+
const rs = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], ns = B("chevron-down", rs);
|
|
2644
2644
|
/**
|
|
2645
2645
|
* @license lucide-react v0.544.0 - ISC
|
|
2646
2646
|
*
|
|
2647
2647
|
* This source code is licensed under the ISC license.
|
|
2648
2648
|
* See the LICENSE file in the root directory of this source tree.
|
|
2649
2649
|
*/
|
|
2650
|
-
const
|
|
2650
|
+
const ss = [
|
|
2651
2651
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
2652
2652
|
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
2653
2653
|
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
2654
|
-
], le = B("circle-alert",
|
|
2654
|
+
], le = B("circle-alert", ss);
|
|
2655
2655
|
/**
|
|
2656
2656
|
* @license lucide-react v0.544.0 - ISC
|
|
2657
2657
|
*
|
|
2658
2658
|
* This source code is licensed under the ISC license.
|
|
2659
2659
|
* See the LICENSE file in the root directory of this source tree.
|
|
2660
2660
|
*/
|
|
2661
|
-
const
|
|
2661
|
+
const as = [
|
|
2662
2662
|
["path", { d: "M21.801 10A10 10 0 1 1 17 3.335", key: "yps3ct" }],
|
|
2663
2663
|
["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
|
|
2664
|
-
],
|
|
2664
|
+
], ce = B("circle-check-big", as);
|
|
2665
2665
|
/**
|
|
2666
2666
|
* @license lucide-react v0.544.0 - ISC
|
|
2667
2667
|
*
|
|
2668
2668
|
* This source code is licensed under the ISC license.
|
|
2669
2669
|
* See the LICENSE file in the root directory of this source tree.
|
|
2670
2670
|
*/
|
|
2671
|
-
const
|
|
2671
|
+
const is = [
|
|
2672
2672
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
2673
2673
|
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
2674
|
-
], Ge = B("circle-check",
|
|
2674
|
+
], Ge = B("circle-check", is);
|
|
2675
2675
|
/**
|
|
2676
2676
|
* @license lucide-react v0.544.0 - ISC
|
|
2677
2677
|
*
|
|
2678
2678
|
* This source code is licensed under the ISC license.
|
|
2679
2679
|
* See the LICENSE file in the root directory of this source tree.
|
|
2680
2680
|
*/
|
|
2681
|
-
const
|
|
2681
|
+
const os = [
|
|
2682
2682
|
["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3", key: "msslwz" }],
|
|
2683
2683
|
["path", { d: "M3 5V19A9 3 0 0 0 21 19V5", key: "1wlel7" }],
|
|
2684
2684
|
["path", { d: "M3 12A9 3 0 0 0 21 12", key: "mv7ke4" }]
|
|
2685
|
-
],
|
|
2685
|
+
], ls = B("database", os);
|
|
2686
2686
|
/**
|
|
2687
2687
|
* @license lucide-react v0.544.0 - ISC
|
|
2688
2688
|
*
|
|
2689
2689
|
* This source code is licensed under the ISC license.
|
|
2690
2690
|
* See the LICENSE file in the root directory of this source tree.
|
|
2691
2691
|
*/
|
|
2692
|
-
const
|
|
2692
|
+
const cs = [
|
|
2693
2693
|
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
|
|
2694
2694
|
["circle", { cx: "12", cy: "5", r: "1", key: "gxeob9" }],
|
|
2695
2695
|
["circle", { cx: "12", cy: "19", r: "1", key: "lyex9k" }]
|
|
2696
|
-
],
|
|
2696
|
+
], ds = B("ellipsis-vertical", cs);
|
|
2697
2697
|
/**
|
|
2698
2698
|
* @license lucide-react v0.544.0 - ISC
|
|
2699
2699
|
*
|
|
2700
2700
|
* This source code is licensed under the ISC license.
|
|
2701
2701
|
* See the LICENSE file in the root directory of this source tree.
|
|
2702
2702
|
*/
|
|
2703
|
-
const
|
|
2703
|
+
const us = [
|
|
2704
2704
|
[
|
|
2705
2705
|
"path",
|
|
2706
2706
|
{
|
|
@@ -2717,14 +2717,14 @@ const ls = [
|
|
|
2717
2717
|
}
|
|
2718
2718
|
],
|
|
2719
2719
|
["path", { d: "m2 2 20 20", key: "1ooewy" }]
|
|
2720
|
-
],
|
|
2720
|
+
], ot = B("eye-off", us);
|
|
2721
2721
|
/**
|
|
2722
2722
|
* @license lucide-react v0.544.0 - ISC
|
|
2723
2723
|
*
|
|
2724
2724
|
* This source code is licensed under the ISC license.
|
|
2725
2725
|
* See the LICENSE file in the root directory of this source tree.
|
|
2726
2726
|
*/
|
|
2727
|
-
const
|
|
2727
|
+
const ps = [
|
|
2728
2728
|
[
|
|
2729
2729
|
"path",
|
|
2730
2730
|
{
|
|
@@ -2733,14 +2733,14 @@ const ds = [
|
|
|
2733
2733
|
}
|
|
2734
2734
|
],
|
|
2735
2735
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
2736
|
-
], lt = B("eye",
|
|
2736
|
+
], lt = B("eye", ps);
|
|
2737
2737
|
/**
|
|
2738
2738
|
* @license lucide-react v0.544.0 - ISC
|
|
2739
2739
|
*
|
|
2740
2740
|
* This source code is licensed under the ISC license.
|
|
2741
2741
|
* See the LICENSE file in the root directory of this source tree.
|
|
2742
2742
|
*/
|
|
2743
|
-
const
|
|
2743
|
+
const fs = [
|
|
2744
2744
|
["path", { d: "M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8", key: "5wwlr5" }],
|
|
2745
2745
|
[
|
|
2746
2746
|
"path",
|
|
@@ -2749,25 +2749,25 @@ const cs = [
|
|
|
2749
2749
|
key: "r6nss1"
|
|
2750
2750
|
}
|
|
2751
2751
|
]
|
|
2752
|
-
],
|
|
2752
|
+
], xs = B("house", fs);
|
|
2753
2753
|
/**
|
|
2754
2754
|
* @license lucide-react v0.544.0 - ISC
|
|
2755
2755
|
*
|
|
2756
2756
|
* This source code is licensed under the ISC license.
|
|
2757
2757
|
* See the LICENSE file in the root directory of this source tree.
|
|
2758
2758
|
*/
|
|
2759
|
-
const
|
|
2759
|
+
const hs = [
|
|
2760
2760
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
|
|
2761
2761
|
["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
|
|
2762
2762
|
["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
|
|
2763
|
-
], lr = B("image",
|
|
2763
|
+
], lr = B("image", hs);
|
|
2764
2764
|
/**
|
|
2765
2765
|
* @license lucide-react v0.544.0 - ISC
|
|
2766
2766
|
*
|
|
2767
2767
|
* This source code is licensed under the ISC license.
|
|
2768
2768
|
* See the LICENSE file in the root directory of this source tree.
|
|
2769
2769
|
*/
|
|
2770
|
-
const
|
|
2770
|
+
const gs = [
|
|
2771
2771
|
[
|
|
2772
2772
|
"path",
|
|
2773
2773
|
{
|
|
@@ -2776,43 +2776,43 @@ const fs = [
|
|
|
2776
2776
|
}
|
|
2777
2777
|
],
|
|
2778
2778
|
["circle", { cx: "16.5", cy: "7.5", r: ".5", fill: "currentColor", key: "w0ekpg" }]
|
|
2779
|
-
],
|
|
2779
|
+
], cr = B("key-round", gs);
|
|
2780
2780
|
/**
|
|
2781
2781
|
* @license lucide-react v0.544.0 - ISC
|
|
2782
2782
|
*
|
|
2783
2783
|
* This source code is licensed under the ISC license.
|
|
2784
2784
|
* See the LICENSE file in the root directory of this source tree.
|
|
2785
2785
|
*/
|
|
2786
|
-
const
|
|
2786
|
+
const ms = [
|
|
2787
2787
|
["path", { d: "m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4", key: "g0fldk" }],
|
|
2788
2788
|
["path", { d: "m21 2-9.6 9.6", key: "1j0ho8" }],
|
|
2789
2789
|
["circle", { cx: "7.5", cy: "15.5", r: "5.5", key: "yqb3hr" }]
|
|
2790
|
-
],
|
|
2790
|
+
], ct = B("key", ms);
|
|
2791
2791
|
/**
|
|
2792
2792
|
* @license lucide-react v0.544.0 - ISC
|
|
2793
2793
|
*
|
|
2794
2794
|
* This source code is licensed under the ISC license.
|
|
2795
2795
|
* See the LICENSE file in the root directory of this source tree.
|
|
2796
2796
|
*/
|
|
2797
|
-
const
|
|
2797
|
+
const ys = [
|
|
2798
2798
|
["path", { d: "M9 17H7A5 5 0 0 1 7 7h2", key: "8i5ue5" }],
|
|
2799
2799
|
["path", { d: "M15 7h2a5 5 0 1 1 0 10h-2", key: "1b9ql8" }],
|
|
2800
2800
|
["line", { x1: "8", x2: "16", y1: "12", y2: "12", key: "1jonct" }]
|
|
2801
|
-
],
|
|
2801
|
+
], bs = B("link-2", ys);
|
|
2802
2802
|
/**
|
|
2803
2803
|
* @license lucide-react v0.544.0 - ISC
|
|
2804
2804
|
*
|
|
2805
2805
|
* This source code is licensed under the ISC license.
|
|
2806
2806
|
* See the LICENSE file in the root directory of this source tree.
|
|
2807
2807
|
*/
|
|
2808
|
-
const
|
|
2808
|
+
const ws = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], ae = B("loader-circle", ws);
|
|
2809
2809
|
/**
|
|
2810
2810
|
* @license lucide-react v0.544.0 - ISC
|
|
2811
2811
|
*
|
|
2812
2812
|
* This source code is licensed under the ISC license.
|
|
2813
2813
|
* See the LICENSE file in the root directory of this source tree.
|
|
2814
2814
|
*/
|
|
2815
|
-
const
|
|
2815
|
+
const js = [
|
|
2816
2816
|
["path", { d: "M12 2v4", key: "3427ic" }],
|
|
2817
2817
|
["path", { d: "m16.2 7.8 2.9-2.9", key: "r700ao" }],
|
|
2818
2818
|
["path", { d: "M18 12h4", key: "wj9ykh" }],
|
|
@@ -2821,45 +2821,45 @@ const ys = [
|
|
|
2821
2821
|
["path", { d: "m4.9 19.1 2.9-2.9", key: "bwix9q" }],
|
|
2822
2822
|
["path", { d: "M2 12h4", key: "j09sii" }],
|
|
2823
2823
|
["path", { d: "m4.9 4.9 2.9 2.9", key: "giyufr" }]
|
|
2824
|
-
],
|
|
2824
|
+
], vs = B("loader", js);
|
|
2825
2825
|
/**
|
|
2826
2826
|
* @license lucide-react v0.544.0 - ISC
|
|
2827
2827
|
*
|
|
2828
2828
|
* This source code is licensed under the ISC license.
|
|
2829
2829
|
* See the LICENSE file in the root directory of this source tree.
|
|
2830
2830
|
*/
|
|
2831
|
-
const
|
|
2831
|
+
const Ss = [
|
|
2832
2832
|
["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
|
|
2833
2833
|
["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }]
|
|
2834
|
-
], me = B("lock",
|
|
2834
|
+
], me = B("lock", Ss);
|
|
2835
2835
|
/**
|
|
2836
2836
|
* @license lucide-react v0.544.0 - ISC
|
|
2837
2837
|
*
|
|
2838
2838
|
* This source code is licensed under the ISC license.
|
|
2839
2839
|
* See the LICENSE file in the root directory of this source tree.
|
|
2840
2840
|
*/
|
|
2841
|
-
const
|
|
2841
|
+
const ks = [
|
|
2842
2842
|
["path", { d: "m16 17 5-5-5-5", key: "1bji2h" }],
|
|
2843
2843
|
["path", { d: "M21 12H9", key: "dn1m92" }],
|
|
2844
2844
|
["path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4", key: "1uf3rs" }]
|
|
2845
|
-
],
|
|
2845
|
+
], dt = B("log-out", ks);
|
|
2846
2846
|
/**
|
|
2847
2847
|
* @license lucide-react v0.544.0 - ISC
|
|
2848
2848
|
*
|
|
2849
2849
|
* This source code is licensed under the ISC license.
|
|
2850
2850
|
* See the LICENSE file in the root directory of this source tree.
|
|
2851
2851
|
*/
|
|
2852
|
-
const
|
|
2852
|
+
const Es = [
|
|
2853
2853
|
["path", { d: "m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7", key: "132q7q" }],
|
|
2854
2854
|
["rect", { x: "2", y: "4", width: "20", height: "16", rx: "2", key: "izxlao" }]
|
|
2855
|
-
],
|
|
2855
|
+
], de = B("mail", Es);
|
|
2856
2856
|
/**
|
|
2857
2857
|
* @license lucide-react v0.544.0 - ISC
|
|
2858
2858
|
*
|
|
2859
2859
|
* This source code is licensed under the ISC license.
|
|
2860
2860
|
* See the LICENSE file in the root directory of this source tree.
|
|
2861
2861
|
*/
|
|
2862
|
-
const
|
|
2862
|
+
const Cs = [
|
|
2863
2863
|
[
|
|
2864
2864
|
"path",
|
|
2865
2865
|
{
|
|
@@ -2868,14 +2868,14 @@ const Ss = [
|
|
|
2868
2868
|
}
|
|
2869
2869
|
],
|
|
2870
2870
|
["circle", { cx: "12", cy: "10", r: "3", key: "ilqhr7" }]
|
|
2871
|
-
],
|
|
2871
|
+
], Ts = B("map-pin", Cs);
|
|
2872
2872
|
/**
|
|
2873
2873
|
* @license lucide-react v0.544.0 - ISC
|
|
2874
2874
|
*
|
|
2875
2875
|
* This source code is licensed under the ISC license.
|
|
2876
2876
|
* See the LICENSE file in the root directory of this source tree.
|
|
2877
2877
|
*/
|
|
2878
|
-
const
|
|
2878
|
+
const Rs = [
|
|
2879
2879
|
["path", { d: "M13 21h8", key: "1jsn5i" }],
|
|
2880
2880
|
[
|
|
2881
2881
|
"path",
|
|
@@ -2884,14 +2884,14 @@ const Es = [
|
|
|
2884
2884
|
key: "1a8usu"
|
|
2885
2885
|
}
|
|
2886
2886
|
]
|
|
2887
|
-
],
|
|
2887
|
+
], Is = B("pen-line", Rs);
|
|
2888
2888
|
/**
|
|
2889
2889
|
* @license lucide-react v0.544.0 - ISC
|
|
2890
2890
|
*
|
|
2891
2891
|
* This source code is licensed under the ISC license.
|
|
2892
2892
|
* See the LICENSE file in the root directory of this source tree.
|
|
2893
2893
|
*/
|
|
2894
|
-
const
|
|
2894
|
+
const Ps = [
|
|
2895
2895
|
[
|
|
2896
2896
|
"path",
|
|
2897
2897
|
{
|
|
@@ -2899,14 +2899,14 @@ const Ts = [
|
|
|
2899
2899
|
key: "9njp5v"
|
|
2900
2900
|
}
|
|
2901
2901
|
]
|
|
2902
|
-
],
|
|
2902
|
+
], Os = B("phone", Ps);
|
|
2903
2903
|
/**
|
|
2904
2904
|
* @license lucide-react v0.544.0 - ISC
|
|
2905
2905
|
*
|
|
2906
2906
|
* This source code is licensed under the ISC license.
|
|
2907
2907
|
* See the LICENSE file in the root directory of this source tree.
|
|
2908
2908
|
*/
|
|
2909
|
-
const
|
|
2909
|
+
const As = [
|
|
2910
2910
|
[
|
|
2911
2911
|
"path",
|
|
2912
2912
|
{
|
|
@@ -2916,14 +2916,14 @@ const Is = [
|
|
|
2916
2916
|
],
|
|
2917
2917
|
["path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7", key: "1ydtos" }],
|
|
2918
2918
|
["path", { d: "M7 3v4a1 1 0 0 0 1 1h7", key: "t51u73" }]
|
|
2919
|
-
],
|
|
2919
|
+
], zs = B("save", As);
|
|
2920
2920
|
/**
|
|
2921
2921
|
* @license lucide-react v0.544.0 - ISC
|
|
2922
2922
|
*
|
|
2923
2923
|
* This source code is licensed under the ISC license.
|
|
2924
2924
|
* See the LICENSE file in the root directory of this source tree.
|
|
2925
2925
|
*/
|
|
2926
|
-
const
|
|
2926
|
+
const $s = [
|
|
2927
2927
|
[
|
|
2928
2928
|
"path",
|
|
2929
2929
|
{
|
|
@@ -2932,14 +2932,14 @@ const Os = [
|
|
|
2932
2932
|
}
|
|
2933
2933
|
],
|
|
2934
2934
|
["path", { d: "m21.854 2.147-10.94 10.939", key: "12cjpa" }]
|
|
2935
|
-
], ut = B("send",
|
|
2935
|
+
], ut = B("send", $s);
|
|
2936
2936
|
/**
|
|
2937
2937
|
* @license lucide-react v0.544.0 - ISC
|
|
2938
2938
|
*
|
|
2939
2939
|
* This source code is licensed under the ISC license.
|
|
2940
2940
|
* See the LICENSE file in the root directory of this source tree.
|
|
2941
2941
|
*/
|
|
2942
|
-
const
|
|
2942
|
+
const _s = [
|
|
2943
2943
|
[
|
|
2944
2944
|
"path",
|
|
2945
2945
|
{
|
|
@@ -2948,14 +2948,14 @@ const As = [
|
|
|
2948
2948
|
}
|
|
2949
2949
|
],
|
|
2950
2950
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
2951
|
-
],
|
|
2951
|
+
], Ns = B("settings", _s);
|
|
2952
2952
|
/**
|
|
2953
2953
|
* @license lucide-react v0.544.0 - ISC
|
|
2954
2954
|
*
|
|
2955
2955
|
* This source code is licensed under the ISC license.
|
|
2956
2956
|
* See the LICENSE file in the root directory of this source tree.
|
|
2957
2957
|
*/
|
|
2958
|
-
const
|
|
2958
|
+
const Ds = [
|
|
2959
2959
|
[
|
|
2960
2960
|
"path",
|
|
2961
2961
|
{
|
|
@@ -2963,27 +2963,27 @@ const $s = [
|
|
|
2963
2963
|
key: "oel41y"
|
|
2964
2964
|
}
|
|
2965
2965
|
]
|
|
2966
|
-
],
|
|
2966
|
+
], dr = B("shield", Ds);
|
|
2967
2967
|
/**
|
|
2968
2968
|
* @license lucide-react v0.544.0 - ISC
|
|
2969
2969
|
*
|
|
2970
2970
|
* This source code is licensed under the ISC license.
|
|
2971
2971
|
* See the LICENSE file in the root directory of this source tree.
|
|
2972
2972
|
*/
|
|
2973
|
-
const
|
|
2973
|
+
const Us = [
|
|
2974
2974
|
["path", { d: "M10 11v6", key: "nco0om" }],
|
|
2975
2975
|
["path", { d: "M14 11v6", key: "outv1u" }],
|
|
2976
2976
|
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
|
|
2977
2977
|
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
2978
2978
|
["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
|
|
2979
|
-
], Ne = B("trash-2",
|
|
2979
|
+
], Ne = B("trash-2", Us);
|
|
2980
2980
|
/**
|
|
2981
2981
|
* @license lucide-react v0.544.0 - ISC
|
|
2982
2982
|
*
|
|
2983
2983
|
* This source code is licensed under the ISC license.
|
|
2984
2984
|
* See the LICENSE file in the root directory of this source tree.
|
|
2985
2985
|
*/
|
|
2986
|
-
const
|
|
2986
|
+
const Ls = [
|
|
2987
2987
|
[
|
|
2988
2988
|
"path",
|
|
2989
2989
|
{
|
|
@@ -2993,70 +2993,70 @@ const Ns = [
|
|
|
2993
2993
|
],
|
|
2994
2994
|
["path", { d: "M12 9v4", key: "juzpu7" }],
|
|
2995
2995
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
2996
|
-
], _t = B("triangle-alert",
|
|
2996
|
+
], _t = B("triangle-alert", Ls);
|
|
2997
2997
|
/**
|
|
2998
2998
|
* @license lucide-react v0.544.0 - ISC
|
|
2999
2999
|
*
|
|
3000
3000
|
* This source code is licensed under the ISC license.
|
|
3001
3001
|
* See the LICENSE file in the root directory of this source tree.
|
|
3002
3002
|
*/
|
|
3003
|
-
const
|
|
3003
|
+
const Fs = [
|
|
3004
3004
|
["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
|
|
3005
3005
|
["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }],
|
|
3006
3006
|
["line", { x1: "17", x2: "22", y1: "8", y2: "13", key: "3nzzx3" }],
|
|
3007
3007
|
["line", { x1: "22", x2: "17", y1: "8", y2: "13", key: "1swrse" }]
|
|
3008
|
-
],
|
|
3008
|
+
], qs = B("user-x", Fs);
|
|
3009
3009
|
/**
|
|
3010
3010
|
* @license lucide-react v0.544.0 - ISC
|
|
3011
3011
|
*
|
|
3012
3012
|
* This source code is licensed under the ISC license.
|
|
3013
3013
|
* See the LICENSE file in the root directory of this source tree.
|
|
3014
3014
|
*/
|
|
3015
|
-
const
|
|
3015
|
+
const Ms = [
|
|
3016
3016
|
["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
|
|
3017
3017
|
["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
|
|
3018
|
-
], be = B("user",
|
|
3018
|
+
], be = B("user", Ms);
|
|
3019
3019
|
/**
|
|
3020
3020
|
* @license lucide-react v0.544.0 - ISC
|
|
3021
3021
|
*
|
|
3022
3022
|
* This source code is licensed under the ISC license.
|
|
3023
3023
|
* See the LICENSE file in the root directory of this source tree.
|
|
3024
3024
|
*/
|
|
3025
|
-
const
|
|
3025
|
+
const Ws = [
|
|
3026
3026
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
3027
3027
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
3028
|
-
], Pe = B("x",
|
|
3028
|
+
], Pe = B("x", Ws), De = {
|
|
3029
3029
|
baseUrl: "",
|
|
3030
3030
|
apiKey: "",
|
|
3031
3031
|
appId: ""
|
|
3032
|
-
},
|
|
3032
|
+
}, ha = (t) => {
|
|
3033
3033
|
if (!t.baseUrl || !t.apiKey || !t.appId)
|
|
3034
3034
|
throw new Error("baseUrl, apiKey, and appId are required");
|
|
3035
3035
|
De.baseUrl = t.baseUrl, De.apiKey = t.apiKey, De.appId = t.appId;
|
|
3036
|
-
}, ge = () => De,
|
|
3036
|
+
}, ge = () => De, ga = ({
|
|
3037
3037
|
logoUrl: t,
|
|
3038
3038
|
logoLinkUrl: e,
|
|
3039
3039
|
title: r = "Create Your Account",
|
|
3040
3040
|
subtitle: s = "Join our platform today",
|
|
3041
3041
|
footerText: a = "Secure authentication powered by Neuctra Authix",
|
|
3042
|
-
primaryColor:
|
|
3043
|
-
gradient:
|
|
3042
|
+
primaryColor: o = "#00C214",
|
|
3043
|
+
gradient: i = "linear-gradient(135deg, #22c55e, #00C214)",
|
|
3044
3044
|
darkMode: l = !0,
|
|
3045
3045
|
// Only avatar is optional
|
|
3046
3046
|
showAvatar: h = !1,
|
|
3047
|
-
roles:
|
|
3047
|
+
roles: c = [],
|
|
3048
3048
|
// 🔥 FIXED
|
|
3049
|
-
showRoleSelector:
|
|
3049
|
+
showRoleSelector: d = !1,
|
|
3050
3050
|
// 🔥 FIXED
|
|
3051
|
-
loginUrl:
|
|
3052
|
-
onSuccess:
|
|
3051
|
+
loginUrl: b,
|
|
3052
|
+
onSuccess: y,
|
|
3053
3053
|
onError: w
|
|
3054
3054
|
}) => {
|
|
3055
3055
|
const { baseUrl: u, apiKey: j, appId: m } = ge(), $ = {
|
|
3056
3056
|
name: "",
|
|
3057
3057
|
email: "",
|
|
3058
3058
|
password: "",
|
|
3059
|
-
role:
|
|
3059
|
+
role: c.length ? c[0] : "user",
|
|
3060
3060
|
...h && { avatarUrl: "" }
|
|
3061
3061
|
}, [R, z] = P($), [C, q] = P(!1), [g, I] = P(!1), [v, D] = P(null), [W, F] = P({}), [V, Z] = P(!1), T = l ? "#ffffff" : "#111827", J = l ? "#a1a1aa" : "#6b7280", A = l ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.02)", O = l ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)";
|
|
3062
3062
|
Le.useEffect(() => {
|
|
@@ -3078,8 +3078,8 @@ const Fs = [
|
|
|
3078
3078
|
const x = {
|
|
3079
3079
|
...R,
|
|
3080
3080
|
appId: m
|
|
3081
|
-
}, k = await
|
|
3082
|
-
D({ type: "success", text: "Account created successfully!" }),
|
|
3081
|
+
}, k = await Jn(x, { baseUrl: u, apiKey: j });
|
|
3082
|
+
D({ type: "success", text: "Account created successfully!" }), y && y(k);
|
|
3083
3083
|
} catch (x) {
|
|
3084
3084
|
const k = x.message || "Signup failed. Please try again.";
|
|
3085
3085
|
D({ type: "error", text: k }), w && w(x);
|
|
@@ -3152,7 +3152,7 @@ const Fs = [
|
|
|
3152
3152
|
be,
|
|
3153
3153
|
{
|
|
3154
3154
|
size: 40,
|
|
3155
|
-
color:
|
|
3155
|
+
color: o,
|
|
3156
3156
|
style: { marginBottom: "10px" }
|
|
3157
3157
|
}
|
|
3158
3158
|
),
|
|
@@ -3199,7 +3199,7 @@ const Fs = [
|
|
|
3199
3199
|
height: "60px",
|
|
3200
3200
|
borderRadius: "50%",
|
|
3201
3201
|
objectFit: "cover",
|
|
3202
|
-
border: `2px solid ${
|
|
3202
|
+
border: `2px solid ${o}30`
|
|
3203
3203
|
},
|
|
3204
3204
|
onError: (S) => {
|
|
3205
3205
|
const x = S.target;
|
|
@@ -3215,7 +3215,7 @@ const Fs = [
|
|
|
3215
3215
|
onSubmit: G,
|
|
3216
3216
|
style: { display: "flex", flexDirection: "column", gap: "14px" },
|
|
3217
3217
|
children: [
|
|
3218
|
-
|
|
3218
|
+
d && c && c.length === 2 && /* @__PURE__ */ n.jsxs(
|
|
3219
3219
|
"div",
|
|
3220
3220
|
{
|
|
3221
3221
|
style: { display: "flex", flexDirection: "column", gap: "4px" },
|
|
@@ -3260,7 +3260,7 @@ const Fs = [
|
|
|
3260
3260
|
// subtle shadow
|
|
3261
3261
|
borderRadius: "10px",
|
|
3262
3262
|
transition: "transform 0.3s ease, background-color 0.3s ease",
|
|
3263
|
-
transform: R.role ===
|
|
3263
|
+
transform: R.role === c[1] ? "translateX(100%)" : "translateX(0)",
|
|
3264
3264
|
zIndex: 0
|
|
3265
3265
|
}
|
|
3266
3266
|
}
|
|
@@ -3269,43 +3269,43 @@ const Fs = [
|
|
|
3269
3269
|
"button",
|
|
3270
3270
|
{
|
|
3271
3271
|
type: "button",
|
|
3272
|
-
onClick: () => z((S) => ({ ...S, role:
|
|
3272
|
+
onClick: () => z((S) => ({ ...S, role: c[0] })),
|
|
3273
3273
|
style: {
|
|
3274
3274
|
flex: 1,
|
|
3275
3275
|
zIndex: 10,
|
|
3276
3276
|
border: "none",
|
|
3277
3277
|
background: "transparent",
|
|
3278
|
-
color: R.role ===
|
|
3278
|
+
color: R.role === c[0] ? o : l ? "#9ca3af" : "#6b7280",
|
|
3279
3279
|
// theme-aware inactive color
|
|
3280
|
-
fontWeight: R.role ===
|
|
3280
|
+
fontWeight: R.role === c[0] ? 600 : 500,
|
|
3281
3281
|
fontSize: "14px",
|
|
3282
3282
|
display: "flex",
|
|
3283
3283
|
alignItems: "center",
|
|
3284
3284
|
justifyContent: "center",
|
|
3285
3285
|
transition: "color 0.2s ease"
|
|
3286
3286
|
},
|
|
3287
|
-
children:
|
|
3287
|
+
children: c[0].charAt(0).toUpperCase() + c[0].slice(1)
|
|
3288
3288
|
}
|
|
3289
3289
|
),
|
|
3290
3290
|
/* @__PURE__ */ n.jsx(
|
|
3291
3291
|
"button",
|
|
3292
3292
|
{
|
|
3293
3293
|
type: "button",
|
|
3294
|
-
onClick: () => z((S) => ({ ...S, role:
|
|
3294
|
+
onClick: () => z((S) => ({ ...S, role: c[1] })),
|
|
3295
3295
|
style: {
|
|
3296
3296
|
flex: 1,
|
|
3297
3297
|
zIndex: 10,
|
|
3298
3298
|
border: "none",
|
|
3299
3299
|
background: "transparent",
|
|
3300
|
-
color: R.role ===
|
|
3301
|
-
fontWeight: R.role ===
|
|
3300
|
+
color: R.role === c[1] ? o : l ? "#9ca3af" : "#6b7280",
|
|
3301
|
+
fontWeight: R.role === c[1] ? 600 : 500,
|
|
3302
3302
|
fontSize: "14px",
|
|
3303
3303
|
display: "flex",
|
|
3304
3304
|
alignItems: "center",
|
|
3305
3305
|
justifyContent: "center",
|
|
3306
3306
|
transition: "color 0.2s ease"
|
|
3307
3307
|
},
|
|
3308
|
-
children:
|
|
3308
|
+
children: c[1].charAt(0).toUpperCase() + c[1].slice(1)
|
|
3309
3309
|
}
|
|
3310
3310
|
)
|
|
3311
3311
|
]
|
|
@@ -3384,7 +3384,7 @@ const Fs = [
|
|
|
3384
3384
|
),
|
|
3385
3385
|
/* @__PURE__ */ n.jsxs("div", { style: { position: "relative" }, children: [
|
|
3386
3386
|
/* @__PURE__ */ n.jsx(
|
|
3387
|
-
|
|
3387
|
+
de,
|
|
3388
3388
|
{
|
|
3389
3389
|
size: 20,
|
|
3390
3390
|
style: {
|
|
@@ -3482,7 +3482,7 @@ const Fs = [
|
|
|
3482
3482
|
cursor: "pointer",
|
|
3483
3483
|
padding: "4px"
|
|
3484
3484
|
},
|
|
3485
|
-
children: C ? /* @__PURE__ */ n.jsx(
|
|
3485
|
+
children: C ? /* @__PURE__ */ n.jsx(ot, { size: 20 }) : /* @__PURE__ */ n.jsx(lt, { size: 20 })
|
|
3486
3486
|
}
|
|
3487
3487
|
)
|
|
3488
3488
|
] }),
|
|
@@ -3545,7 +3545,7 @@ const Fs = [
|
|
|
3545
3545
|
]
|
|
3546
3546
|
}
|
|
3547
3547
|
),
|
|
3548
|
-
|
|
3548
|
+
b && /* @__PURE__ */ n.jsx(
|
|
3549
3549
|
"div",
|
|
3550
3550
|
{
|
|
3551
3551
|
style: {
|
|
@@ -3556,9 +3556,9 @@ const Fs = [
|
|
|
3556
3556
|
children: /* @__PURE__ */ n.jsx(
|
|
3557
3557
|
"a",
|
|
3558
3558
|
{
|
|
3559
|
-
href:
|
|
3559
|
+
href: b,
|
|
3560
3560
|
style: {
|
|
3561
|
-
color:
|
|
3561
|
+
color: o,
|
|
3562
3562
|
textDecoration: "none",
|
|
3563
3563
|
fontWeight: 500
|
|
3564
3564
|
},
|
|
@@ -3577,12 +3577,12 @@ const Fs = [
|
|
|
3577
3577
|
display: "flex",
|
|
3578
3578
|
alignItems: "start",
|
|
3579
3579
|
gap: "10px",
|
|
3580
|
-
backgroundColor: v.type === "success" ? `${
|
|
3581
|
-
border: v.type === "success" ? `1px solid ${
|
|
3582
|
-
color: v.type === "success" ?
|
|
3580
|
+
backgroundColor: v.type === "success" ? `${o}15` : "rgba(239,68,68,0.1)",
|
|
3581
|
+
border: v.type === "success" ? `1px solid ${o}30` : "1px solid rgba(239,68,68,0.3)",
|
|
3582
|
+
color: v.type === "success" ? o : "#ef4444"
|
|
3583
3583
|
},
|
|
3584
3584
|
children: [
|
|
3585
|
-
v.type === "success" ? /* @__PURE__ */ n.jsx(
|
|
3585
|
+
v.type === "success" ? /* @__PURE__ */ n.jsx(ce, { size: 20 }) : /* @__PURE__ */ n.jsx(le, { size: 20 }),
|
|
3586
3586
|
/* @__PURE__ */ n.jsx("span", { children: v.text })
|
|
3587
3587
|
]
|
|
3588
3588
|
}
|
|
@@ -3594,7 +3594,7 @@ const Fs = [
|
|
|
3594
3594
|
disabled: g,
|
|
3595
3595
|
style: {
|
|
3596
3596
|
padding: "12px",
|
|
3597
|
-
background:
|
|
3597
|
+
background: i,
|
|
3598
3598
|
color: "#fff",
|
|
3599
3599
|
border: "none",
|
|
3600
3600
|
borderRadius: "10px",
|
|
@@ -3609,7 +3609,7 @@ const Fs = [
|
|
|
3609
3609
|
},
|
|
3610
3610
|
children: g ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
3611
3611
|
/* @__PURE__ */ n.jsx(
|
|
3612
|
-
|
|
3612
|
+
vs,
|
|
3613
3613
|
{
|
|
3614
3614
|
size: 18,
|
|
3615
3615
|
style: { animation: "spin 1s linear infinite" }
|
|
@@ -3635,7 +3635,7 @@ const Fs = [
|
|
|
3635
3635
|
children: [
|
|
3636
3636
|
"Secure authentication powered by",
|
|
3637
3637
|
" ",
|
|
3638
|
-
/* @__PURE__ */ n.jsx("span", { style: { color:
|
|
3638
|
+
/* @__PURE__ */ n.jsx("span", { style: { color: o, fontWeight: 600 }, children: "Neuctra Authix" })
|
|
3639
3639
|
]
|
|
3640
3640
|
}
|
|
3641
3641
|
)
|
|
@@ -3651,13 +3651,13 @@ const Fs = [
|
|
|
3651
3651
|
]
|
|
3652
3652
|
}
|
|
3653
3653
|
);
|
|
3654
|
-
},
|
|
3655
|
-
const { email: r, password: s, appId: a } = t, { baseUrl:
|
|
3656
|
-
if (!
|
|
3654
|
+
}, Bs = async (t, e) => {
|
|
3655
|
+
const { email: r, password: s, appId: a } = t, { baseUrl: o, apiKey: i } = e;
|
|
3656
|
+
if (!i)
|
|
3657
3657
|
throw new Error("API key is required for login");
|
|
3658
3658
|
try {
|
|
3659
3659
|
const l = await M.post(
|
|
3660
|
-
`${
|
|
3660
|
+
`${o}/users/login`,
|
|
3661
3661
|
{
|
|
3662
3662
|
email: r,
|
|
3663
3663
|
password: s,
|
|
@@ -3666,7 +3666,7 @@ const Fs = [
|
|
|
3666
3666
|
{
|
|
3667
3667
|
headers: {
|
|
3668
3668
|
"Content-Type": "application/json",
|
|
3669
|
-
"x-api-key":
|
|
3669
|
+
"x-api-key": i
|
|
3670
3670
|
},
|
|
3671
3671
|
withCredentials: !0
|
|
3672
3672
|
}
|
|
@@ -3680,20 +3680,20 @@ const Fs = [
|
|
|
3680
3680
|
status: l.response?.status || 500
|
|
3681
3681
|
};
|
|
3682
3682
|
}
|
|
3683
|
-
},
|
|
3683
|
+
}, ma = ({
|
|
3684
3684
|
logoUrl: t,
|
|
3685
3685
|
logoLinkUrl: e,
|
|
3686
3686
|
title: r = "Sign In to Your Account",
|
|
3687
3687
|
subtitle: s = "Welcome back! Please enter your details",
|
|
3688
3688
|
footerText: a = "Secure authentication powered by Neuctra Authix",
|
|
3689
|
-
primaryColor:
|
|
3690
|
-
gradient:
|
|
3689
|
+
primaryColor: o = "#00C214",
|
|
3690
|
+
gradient: i = "linear-gradient(135deg, #22c55e, #00C214)",
|
|
3691
3691
|
darkMode: l = !0,
|
|
3692
3692
|
signupUrl: h,
|
|
3693
|
-
onSuccess:
|
|
3694
|
-
onError:
|
|
3693
|
+
onSuccess: c,
|
|
3694
|
+
onError: d
|
|
3695
3695
|
}) => {
|
|
3696
|
-
const { baseUrl:
|
|
3696
|
+
const { baseUrl: b, apiKey: y, appId: w } = ge(), [u, j] = P("login"), [m, $] = P(1), [R, z] = P(!1), [C, q] = P(!1), [g, I] = P(null), [v, D] = P(""), [W, F] = P(""), [V, Z] = P({
|
|
3697
3697
|
email: "",
|
|
3698
3698
|
otp: "",
|
|
3699
3699
|
newPassword: "",
|
|
@@ -3708,14 +3708,14 @@ const Fs = [
|
|
|
3708
3708
|
const G = async (_) => {
|
|
3709
3709
|
_.preventDefault(), q(!0), I(null);
|
|
3710
3710
|
try {
|
|
3711
|
-
const N = await
|
|
3711
|
+
const N = await Bs(
|
|
3712
3712
|
{ email: v, password: W, appId: w },
|
|
3713
|
-
{ baseUrl:
|
|
3713
|
+
{ baseUrl: b, apiKey: y }
|
|
3714
3714
|
);
|
|
3715
|
-
I({ type: "success", text: `Welcome ${N.name}` }),
|
|
3715
|
+
I({ type: "success", text: `Welcome ${N.name}` }), c?.(N);
|
|
3716
3716
|
} catch (N) {
|
|
3717
3717
|
const Y = N.message || "Login failed";
|
|
3718
|
-
I({ type: "error", text: Y }),
|
|
3718
|
+
I({ type: "error", text: Y }), d?.(N);
|
|
3719
3719
|
} finally {
|
|
3720
3720
|
q(!1);
|
|
3721
3721
|
}
|
|
@@ -3725,12 +3725,12 @@ const Fs = [
|
|
|
3725
3725
|
_.preventDefault(), q(!0), I(null);
|
|
3726
3726
|
try {
|
|
3727
3727
|
const N = await M.post(
|
|
3728
|
-
`${
|
|
3728
|
+
`${b}/users/forgot-password`,
|
|
3729
3729
|
{
|
|
3730
3730
|
email: V.email,
|
|
3731
3731
|
appId: w
|
|
3732
3732
|
},
|
|
3733
|
-
{ headers: { "x-api-key":
|
|
3733
|
+
{ headers: { "x-api-key": y } }
|
|
3734
3734
|
);
|
|
3735
3735
|
N.data.success ? ($(2), I({ type: "success", text: "OTP sent to your email" })) : I({
|
|
3736
3736
|
type: "error",
|
|
@@ -3748,9 +3748,9 @@ const Fs = [
|
|
|
3748
3748
|
_.preventDefault(), q(!0), I(null);
|
|
3749
3749
|
try {
|
|
3750
3750
|
const N = await M.post(
|
|
3751
|
-
`${
|
|
3751
|
+
`${b}/users/reset-password`,
|
|
3752
3752
|
V,
|
|
3753
|
-
{ headers: { "x-api-key":
|
|
3753
|
+
{ headers: { "x-api-key": y } }
|
|
3754
3754
|
);
|
|
3755
3755
|
N.data.success ? (I({ type: "success", text: "Password reset successfully!" }), $(1), Z({ email: "", otp: "", newPassword: "", appId: w }), j("login")) : I({ type: "error", text: N.data.message || "Reset failed" });
|
|
3756
3756
|
} catch (N) {
|
|
@@ -3824,7 +3824,7 @@ const Fs = [
|
|
|
3824
3824
|
be,
|
|
3825
3825
|
{
|
|
3826
3826
|
size: 40,
|
|
3827
|
-
color:
|
|
3827
|
+
color: o,
|
|
3828
3828
|
style: { marginBottom: "10px" }
|
|
3829
3829
|
}
|
|
3830
3830
|
),
|
|
@@ -3878,7 +3878,7 @@ const Fs = [
|
|
|
3878
3878
|
),
|
|
3879
3879
|
/* @__PURE__ */ n.jsxs("div", { style: { position: "relative" }, children: [
|
|
3880
3880
|
/* @__PURE__ */ n.jsx(
|
|
3881
|
-
|
|
3881
|
+
de,
|
|
3882
3882
|
{
|
|
3883
3883
|
size: 20,
|
|
3884
3884
|
style: {
|
|
@@ -3963,7 +3963,7 @@ const Fs = [
|
|
|
3963
3963
|
color: O,
|
|
3964
3964
|
cursor: "pointer"
|
|
3965
3965
|
},
|
|
3966
|
-
children: R ? /* @__PURE__ */ n.jsx(
|
|
3966
|
+
children: R ? /* @__PURE__ */ n.jsx(ot, { size: 20 }) : /* @__PURE__ */ n.jsx(lt, { size: 20 })
|
|
3967
3967
|
}
|
|
3968
3968
|
)
|
|
3969
3969
|
] })
|
|
@@ -3984,7 +3984,7 @@ const Fs = [
|
|
|
3984
3984
|
{
|
|
3985
3985
|
href: h,
|
|
3986
3986
|
style: {
|
|
3987
|
-
color:
|
|
3987
|
+
color: o,
|
|
3988
3988
|
textDecoration: "none",
|
|
3989
3989
|
fontWeight: 500
|
|
3990
3990
|
},
|
|
@@ -3999,7 +3999,7 @@ const Fs = [
|
|
|
3999
3999
|
style: {
|
|
4000
4000
|
background: "none",
|
|
4001
4001
|
border: "none",
|
|
4002
|
-
color:
|
|
4002
|
+
color: o,
|
|
4003
4003
|
fontWeight: 500,
|
|
4004
4004
|
cursor: "pointer"
|
|
4005
4005
|
},
|
|
@@ -4016,7 +4016,7 @@ const Fs = [
|
|
|
4016
4016
|
disabled: C,
|
|
4017
4017
|
style: {
|
|
4018
4018
|
padding: "12px",
|
|
4019
|
-
background:
|
|
4019
|
+
background: i,
|
|
4020
4020
|
color: "#fff",
|
|
4021
4021
|
border: "none",
|
|
4022
4022
|
borderRadius: "10px",
|
|
@@ -4054,7 +4054,7 @@ const Fs = [
|
|
|
4054
4054
|
),
|
|
4055
4055
|
/* @__PURE__ */ n.jsxs("div", { style: { position: "relative" }, children: [
|
|
4056
4056
|
/* @__PURE__ */ n.jsx(
|
|
4057
|
-
|
|
4057
|
+
de,
|
|
4058
4058
|
{
|
|
4059
4059
|
size: 20,
|
|
4060
4060
|
style: {
|
|
@@ -4105,7 +4105,7 @@ const Fs = [
|
|
|
4105
4105
|
),
|
|
4106
4106
|
/* @__PURE__ */ n.jsxs("div", { style: { position: "relative" }, children: [
|
|
4107
4107
|
/* @__PURE__ */ n.jsx(
|
|
4108
|
-
|
|
4108
|
+
cr,
|
|
4109
4109
|
{
|
|
4110
4110
|
size: 20,
|
|
4111
4111
|
style: {
|
|
@@ -4192,7 +4192,7 @@ const Fs = [
|
|
|
4192
4192
|
disabled: C,
|
|
4193
4193
|
style: {
|
|
4194
4194
|
padding: "12px",
|
|
4195
|
-
background:
|
|
4195
|
+
background: i,
|
|
4196
4196
|
color: "#fff",
|
|
4197
4197
|
border: "none",
|
|
4198
4198
|
fontSize: "14px",
|
|
@@ -4234,12 +4234,12 @@ const Fs = [
|
|
|
4234
4234
|
display: "flex",
|
|
4235
4235
|
alignItems: "center",
|
|
4236
4236
|
gap: "10px",
|
|
4237
|
-
backgroundColor: g.type === "success" ? `${
|
|
4238
|
-
border: g.type === "success" ? `1px solid ${
|
|
4239
|
-
color: g.type === "success" ?
|
|
4237
|
+
backgroundColor: g.type === "success" ? `${o}15` : "rgba(239,68,68,0.1)",
|
|
4238
|
+
border: g.type === "success" ? `1px solid ${o}30` : "1px solid rgba(239,68,68,0.3)",
|
|
4239
|
+
color: g.type === "success" ? o : "#ef4444"
|
|
4240
4240
|
},
|
|
4241
4241
|
children: [
|
|
4242
|
-
g.type === "success" ? /* @__PURE__ */ n.jsx(
|
|
4242
|
+
g.type === "success" ? /* @__PURE__ */ n.jsx(ce, { size: 20 }) : /* @__PURE__ */ n.jsx(le, { size: 20 }),
|
|
4243
4243
|
/* @__PURE__ */ n.jsx("span", { children: g.text })
|
|
4244
4244
|
]
|
|
4245
4245
|
}
|
|
@@ -4257,7 +4257,7 @@ const Fs = [
|
|
|
4257
4257
|
children: [
|
|
4258
4258
|
"Secure authentication powered by",
|
|
4259
4259
|
" ",
|
|
4260
|
-
/* @__PURE__ */ n.jsx("span", { style: { color:
|
|
4260
|
+
/* @__PURE__ */ n.jsx("span", { style: { color: o, fontWeight: 600 }, children: "Neuctra Authix" })
|
|
4261
4261
|
]
|
|
4262
4262
|
}
|
|
4263
4263
|
)
|
|
@@ -4266,86 +4266,76 @@ const Fs = [
|
|
|
4266
4266
|
)
|
|
4267
4267
|
}
|
|
4268
4268
|
);
|
|
4269
|
-
},
|
|
4269
|
+
}, ur = hr(null), ya = ({
|
|
4270
4270
|
authix: t,
|
|
4271
|
-
children: e
|
|
4272
|
-
|
|
4271
|
+
children: e
|
|
4272
|
+
}) => /* @__PURE__ */ n.jsx(ur.Provider, { value: t, children: e }), pr = () => {
|
|
4273
|
+
const t = gr(ur);
|
|
4274
|
+
if (!t)
|
|
4275
|
+
throw new Error("useAuthix must be used inside <AuthixProvider />");
|
|
4276
|
+
return t;
|
|
4277
|
+
}, ba = ({
|
|
4278
|
+
children: t,
|
|
4279
|
+
fallback: e = null,
|
|
4280
|
+
loading: r = null,
|
|
4273
4281
|
className: s = "",
|
|
4274
4282
|
width: a,
|
|
4275
|
-
height:
|
|
4283
|
+
height: o
|
|
4276
4284
|
}) => {
|
|
4277
|
-
const [
|
|
4285
|
+
const i = pr(), [l, h] = P(!1), [c, d] = P(null);
|
|
4278
4286
|
return te(() => {
|
|
4279
|
-
|
|
4280
|
-
const c = async () => {
|
|
4287
|
+
h(!0), (async () => {
|
|
4281
4288
|
try {
|
|
4282
|
-
const
|
|
4283
|
-
d(!!
|
|
4289
|
+
const y = await i.getSession();
|
|
4290
|
+
d(!!y?.authenticated);
|
|
4284
4291
|
} catch {
|
|
4285
4292
|
d(!1);
|
|
4286
4293
|
}
|
|
4287
|
-
};
|
|
4288
|
-
|
|
4289
|
-
const y = () => c();
|
|
4290
|
-
return window.addEventListener("storage", y), () => window.removeEventListener("storage", y);
|
|
4291
|
-
}, [t]), !o || h === null ? null : h ? /* @__PURE__ */ n.jsx(
|
|
4294
|
+
})();
|
|
4295
|
+
}, [i]), l ? c === null ? typeof r == "function" ? r() : r : c ? /* @__PURE__ */ n.jsx(
|
|
4292
4296
|
"div",
|
|
4293
4297
|
{
|
|
4294
4298
|
className: s,
|
|
4295
|
-
style: {
|
|
4296
|
-
|
|
4297
|
-
alignItems: "center",
|
|
4298
|
-
width: a,
|
|
4299
|
-
height: i
|
|
4300
|
-
},
|
|
4301
|
-
children: e
|
|
4299
|
+
style: { display: "flex", alignItems: "center", width: a, height: o },
|
|
4300
|
+
children: t
|
|
4302
4301
|
}
|
|
4303
|
-
) : typeof
|
|
4304
|
-
},
|
|
4305
|
-
|
|
4306
|
-
|
|
4307
|
-
|
|
4302
|
+
) : typeof e == "function" ? e() : e : null;
|
|
4303
|
+
}, wa = ({
|
|
4304
|
+
children: t,
|
|
4305
|
+
fallback: e = null,
|
|
4306
|
+
loading: r = null,
|
|
4308
4307
|
className: s = "",
|
|
4309
4308
|
width: a,
|
|
4310
|
-
height:
|
|
4309
|
+
height: o
|
|
4311
4310
|
}) => {
|
|
4312
|
-
const [
|
|
4311
|
+
const i = pr(), [l, h] = P(!1), [c, d] = P(null);
|
|
4313
4312
|
return te(() => {
|
|
4314
|
-
|
|
4315
|
-
const c = async () => {
|
|
4313
|
+
h(!0), (async () => {
|
|
4316
4314
|
try {
|
|
4317
|
-
const
|
|
4318
|
-
d(!
|
|
4315
|
+
const y = await i.getSession();
|
|
4316
|
+
d(!y?.authenticated);
|
|
4319
4317
|
} catch {
|
|
4320
4318
|
d(!0);
|
|
4321
4319
|
}
|
|
4322
|
-
};
|
|
4323
|
-
|
|
4324
|
-
const y = () => c();
|
|
4325
|
-
return window.addEventListener("storage", y), () => window.removeEventListener("storage", y);
|
|
4326
|
-
}, [t]), !o || h === null ? null : h ? /* @__PURE__ */ n.jsx(
|
|
4320
|
+
})();
|
|
4321
|
+
}, [i]), l ? c === null ? typeof r == "function" ? r() : r : c ? /* @__PURE__ */ n.jsx(
|
|
4327
4322
|
"div",
|
|
4328
4323
|
{
|
|
4329
4324
|
className: s,
|
|
4330
|
-
style: {
|
|
4331
|
-
|
|
4332
|
-
alignItems: "center",
|
|
4333
|
-
width: a,
|
|
4334
|
-
height: i
|
|
4335
|
-
},
|
|
4336
|
-
children: e
|
|
4325
|
+
style: { display: "flex", alignItems: "center", width: a, height: o },
|
|
4326
|
+
children: t
|
|
4337
4327
|
}
|
|
4338
|
-
) : typeof
|
|
4339
|
-
},
|
|
4328
|
+
) : typeof e == "function" ? e() : e : null;
|
|
4329
|
+
}, Hs = ({
|
|
4340
4330
|
isOpen: t,
|
|
4341
4331
|
onClose: e,
|
|
4342
4332
|
onSuccess: r,
|
|
4343
4333
|
onError: s,
|
|
4344
4334
|
userId: a,
|
|
4345
|
-
token:
|
|
4346
|
-
colors:
|
|
4335
|
+
token: o,
|
|
4336
|
+
colors: i
|
|
4347
4337
|
}) => {
|
|
4348
|
-
const { baseUrl: l, apiKey: h, appId:
|
|
4338
|
+
const { baseUrl: l, apiKey: h, appId: c } = ge(), [d, b] = P(!1), [y, w] = P(""), [u, j] = P("warning"), [m, $] = P(!1);
|
|
4349
4339
|
if (te(() => {
|
|
4350
4340
|
if (typeof window > "u") return;
|
|
4351
4341
|
const g = () => {
|
|
@@ -4354,10 +4344,10 @@ const Fs = [
|
|
|
4354
4344
|
return g(), window.addEventListener("resize", g), () => window.removeEventListener("resize", g);
|
|
4355
4345
|
}, []), !t) return null;
|
|
4356
4346
|
const R = async () => {
|
|
4357
|
-
|
|
4347
|
+
b(!0), j("processing");
|
|
4358
4348
|
try {
|
|
4359
4349
|
const { data: g } = await M.delete(`${l}/users/delete/${a}`, {
|
|
4360
|
-
data: { appId:
|
|
4350
|
+
data: { appId: c },
|
|
4361
4351
|
headers: {
|
|
4362
4352
|
"x-api-key": h
|
|
4363
4353
|
}
|
|
@@ -4368,9 +4358,9 @@ const Fs = [
|
|
|
4368
4358
|
} catch (g) {
|
|
4369
4359
|
s(g.response?.data?.message || "Something went wrong"), j("warning");
|
|
4370
4360
|
} finally {
|
|
4371
|
-
|
|
4361
|
+
b(!1);
|
|
4372
4362
|
}
|
|
4373
|
-
}, z =
|
|
4363
|
+
}, z = y.toLowerCase() === "delete my account", C = (g) => {
|
|
4374
4364
|
g.target === g.currentTarget && u !== "processing" && u !== "success" && e();
|
|
4375
4365
|
}, q = () => {
|
|
4376
4366
|
switch (u) {
|
|
@@ -4418,7 +4408,7 @@ const Fs = [
|
|
|
4418
4408
|
"h3",
|
|
4419
4409
|
{
|
|
4420
4410
|
style: {
|
|
4421
|
-
color:
|
|
4411
|
+
color: i.textPrimary,
|
|
4422
4412
|
margin: 0,
|
|
4423
4413
|
fontSize: "20px",
|
|
4424
4414
|
fontWeight: 700,
|
|
@@ -4438,7 +4428,7 @@ const Fs = [
|
|
|
4438
4428
|
style: {
|
|
4439
4429
|
background: "transparent",
|
|
4440
4430
|
border: "none",
|
|
4441
|
-
color:
|
|
4431
|
+
color: i.textTertiary,
|
|
4442
4432
|
cursor: "pointer",
|
|
4443
4433
|
padding: "8px",
|
|
4444
4434
|
borderRadius: "8px",
|
|
@@ -4451,10 +4441,10 @@ const Fs = [
|
|
|
4451
4441
|
transition: "all 0.2s ease"
|
|
4452
4442
|
},
|
|
4453
4443
|
onMouseOver: (g) => {
|
|
4454
|
-
g.currentTarget.style.backgroundColor =
|
|
4444
|
+
g.currentTarget.style.backgroundColor = i.border, g.currentTarget.style.color = i.textPrimary;
|
|
4455
4445
|
},
|
|
4456
4446
|
onMouseOut: (g) => {
|
|
4457
|
-
g.currentTarget.style.backgroundColor = "transparent", g.currentTarget.style.color =
|
|
4447
|
+
g.currentTarget.style.backgroundColor = "transparent", g.currentTarget.style.color = i.textTertiary;
|
|
4458
4448
|
},
|
|
4459
4449
|
children: /* @__PURE__ */ n.jsx(Pe, { size: 20 })
|
|
4460
4450
|
}
|
|
@@ -4469,8 +4459,8 @@ const Fs = [
|
|
|
4469
4459
|
display: "flex",
|
|
4470
4460
|
gap: "16px",
|
|
4471
4461
|
padding: "20px",
|
|
4472
|
-
background: `${
|
|
4473
|
-
border: `1px solid ${
|
|
4462
|
+
background: `${i.error}15`,
|
|
4463
|
+
border: `1px solid ${i.error}30`,
|
|
4474
4464
|
borderRadius: "12px",
|
|
4475
4465
|
marginBottom: "20px"
|
|
4476
4466
|
},
|
|
@@ -4479,7 +4469,7 @@ const Fs = [
|
|
|
4479
4469
|
"div",
|
|
4480
4470
|
{
|
|
4481
4471
|
style: {
|
|
4482
|
-
color:
|
|
4472
|
+
color: i.error,
|
|
4483
4473
|
flexShrink: 0,
|
|
4484
4474
|
display: "flex",
|
|
4485
4475
|
alignItems: "flex-start"
|
|
@@ -4492,7 +4482,7 @@ const Fs = [
|
|
|
4492
4482
|
"h4",
|
|
4493
4483
|
{
|
|
4494
4484
|
style: {
|
|
4495
|
-
color:
|
|
4485
|
+
color: i.textPrimary,
|
|
4496
4486
|
margin: "0 0 12px 0",
|
|
4497
4487
|
fontSize: "16px",
|
|
4498
4488
|
fontWeight: 600
|
|
@@ -4510,15 +4500,15 @@ const Fs = [
|
|
|
4510
4500
|
},
|
|
4511
4501
|
children: [
|
|
4512
4502
|
{
|
|
4513
|
-
icon: /* @__PURE__ */ n.jsx(
|
|
4503
|
+
icon: /* @__PURE__ */ n.jsx(ls, { size: 16 }),
|
|
4514
4504
|
text: "All your data will be permanently deleted"
|
|
4515
4505
|
},
|
|
4516
4506
|
{
|
|
4517
|
-
icon: /* @__PURE__ */ n.jsx(
|
|
4507
|
+
icon: /* @__PURE__ */ n.jsx(qs, { size: 16 }),
|
|
4518
4508
|
text: "This action cannot be reversed"
|
|
4519
4509
|
},
|
|
4520
4510
|
{
|
|
4521
|
-
icon: /* @__PURE__ */ n.jsx(
|
|
4511
|
+
icon: /* @__PURE__ */ n.jsx(dt, { size: 16 }),
|
|
4522
4512
|
text: "You will lose access to all services"
|
|
4523
4513
|
}
|
|
4524
4514
|
].map((g, I) => /* @__PURE__ */ n.jsxs(
|
|
@@ -4529,10 +4519,10 @@ const Fs = [
|
|
|
4529
4519
|
alignItems: "center",
|
|
4530
4520
|
gap: "10px",
|
|
4531
4521
|
fontSize: "14px",
|
|
4532
|
-
color:
|
|
4522
|
+
color: i.textSecondary
|
|
4533
4523
|
},
|
|
4534
4524
|
children: [
|
|
4535
|
-
/* @__PURE__ */ n.jsx("div", { style: { color:
|
|
4525
|
+
/* @__PURE__ */ n.jsx("div", { style: { color: i.error, flexShrink: 0 }, children: g.icon }),
|
|
4536
4526
|
/* @__PURE__ */ n.jsx("span", { children: g.text })
|
|
4537
4527
|
]
|
|
4538
4528
|
},
|
|
@@ -4562,9 +4552,9 @@ const Fs = [
|
|
|
4562
4552
|
style: {
|
|
4563
4553
|
padding: "10px 24px",
|
|
4564
4554
|
borderRadius: "10px",
|
|
4565
|
-
border: `1.5px solid ${
|
|
4555
|
+
border: `1.5px solid ${i.border}`,
|
|
4566
4556
|
background: "transparent",
|
|
4567
|
-
color:
|
|
4557
|
+
color: i.textPrimary,
|
|
4568
4558
|
fontSize: "14px",
|
|
4569
4559
|
fontWeight: 500,
|
|
4570
4560
|
cursor: "pointer",
|
|
@@ -4573,7 +4563,7 @@ const Fs = [
|
|
|
4573
4563
|
transition: "all 0.2s ease"
|
|
4574
4564
|
},
|
|
4575
4565
|
onMouseOver: (g) => {
|
|
4576
|
-
g.currentTarget.style.backgroundColor =
|
|
4566
|
+
g.currentTarget.style.backgroundColor = i.border, g.currentTarget.style.transform = "translateY(-1px)";
|
|
4577
4567
|
},
|
|
4578
4568
|
onMouseOut: (g) => {
|
|
4579
4569
|
g.currentTarget.style.backgroundColor = "transparent", g.currentTarget.style.transform = "translateY(0)";
|
|
@@ -4652,7 +4642,7 @@ const Fs = [
|
|
|
4652
4642
|
"h3",
|
|
4653
4643
|
{
|
|
4654
4644
|
style: {
|
|
4655
|
-
color:
|
|
4645
|
+
color: i.textPrimary,
|
|
4656
4646
|
margin: 0,
|
|
4657
4647
|
fontSize: "20px",
|
|
4658
4648
|
fontWeight: 700,
|
|
@@ -4669,7 +4659,7 @@ const Fs = [
|
|
|
4669
4659
|
"p",
|
|
4670
4660
|
{
|
|
4671
4661
|
style: {
|
|
4672
|
-
color:
|
|
4662
|
+
color: i.textSecondary,
|
|
4673
4663
|
marginBottom: "16px",
|
|
4674
4664
|
fontSize: "14px",
|
|
4675
4665
|
lineHeight: "1.5"
|
|
@@ -4677,7 +4667,7 @@ const Fs = [
|
|
|
4677
4667
|
children: [
|
|
4678
4668
|
"Type",
|
|
4679
4669
|
" ",
|
|
4680
|
-
/* @__PURE__ */ n.jsx("strong", { style: { color:
|
|
4670
|
+
/* @__PURE__ */ n.jsx("strong", { style: { color: i.textPrimary }, children: '"delete my account"' }),
|
|
4681
4671
|
" ",
|
|
4682
4672
|
"to confirm:"
|
|
4683
4673
|
]
|
|
@@ -4687,23 +4677,23 @@ const Fs = [
|
|
|
4687
4677
|
"input",
|
|
4688
4678
|
{
|
|
4689
4679
|
type: "text",
|
|
4690
|
-
value:
|
|
4680
|
+
value: y,
|
|
4691
4681
|
onChange: (g) => w(g.target.value),
|
|
4692
4682
|
placeholder: "delete my account",
|
|
4693
4683
|
style: {
|
|
4694
4684
|
width: "100%",
|
|
4695
4685
|
padding: "14px 16px",
|
|
4696
4686
|
borderRadius: "10px",
|
|
4697
|
-
border: `2px solid ${z ?
|
|
4687
|
+
border: `2px solid ${z ? i.success : i.error}`,
|
|
4698
4688
|
backgroundColor: "transparent",
|
|
4699
|
-
color:
|
|
4689
|
+
color: i.textPrimary,
|
|
4700
4690
|
fontSize: "15px",
|
|
4701
4691
|
outline: "none",
|
|
4702
4692
|
transition: "all 0.2s ease",
|
|
4703
4693
|
boxSizing: "border-box"
|
|
4704
4694
|
},
|
|
4705
4695
|
onFocus: (g) => {
|
|
4706
|
-
g.target.style.boxShadow = `0 0 0 3px ${
|
|
4696
|
+
g.target.style.boxShadow = `0 0 0 3px ${i.accent}20`;
|
|
4707
4697
|
},
|
|
4708
4698
|
onBlur: (g) => {
|
|
4709
4699
|
g.target.style.boxShadow = "none";
|
|
@@ -4719,7 +4709,7 @@ const Fs = [
|
|
|
4719
4709
|
alignItems: "center",
|
|
4720
4710
|
gap: "8px",
|
|
4721
4711
|
marginTop: "10px",
|
|
4722
|
-
color:
|
|
4712
|
+
color: i.success,
|
|
4723
4713
|
fontSize: "14px",
|
|
4724
4714
|
fontWeight: 500
|
|
4725
4715
|
},
|
|
@@ -4750,9 +4740,9 @@ const Fs = [
|
|
|
4750
4740
|
style: {
|
|
4751
4741
|
padding: "10px 24px",
|
|
4752
4742
|
borderRadius: "10px",
|
|
4753
|
-
border: `1.5px solid ${
|
|
4743
|
+
border: `1.5px solid ${i.border}`,
|
|
4754
4744
|
background: "transparent",
|
|
4755
|
-
color:
|
|
4745
|
+
color: i.textPrimary,
|
|
4756
4746
|
fontSize: "14px",
|
|
4757
4747
|
fontWeight: 500,
|
|
4758
4748
|
cursor: "pointer",
|
|
@@ -4761,7 +4751,7 @@ const Fs = [
|
|
|
4761
4751
|
transition: "all 0.2s ease"
|
|
4762
4752
|
},
|
|
4763
4753
|
onMouseOver: (g) => {
|
|
4764
|
-
g.currentTarget.style.backgroundColor =
|
|
4754
|
+
g.currentTarget.style.backgroundColor = i.border, g.currentTarget.style.transform = "translateY(-1px)";
|
|
4765
4755
|
},
|
|
4766
4756
|
onMouseOut: (g) => {
|
|
4767
4757
|
g.currentTarget.style.backgroundColor = "transparent", g.currentTarget.style.transform = "translateY(0)";
|
|
@@ -4773,7 +4763,7 @@ const Fs = [
|
|
|
4773
4763
|
"button",
|
|
4774
4764
|
{
|
|
4775
4765
|
onClick: R,
|
|
4776
|
-
disabled: !z ||
|
|
4766
|
+
disabled: !z || d,
|
|
4777
4767
|
style: {
|
|
4778
4768
|
padding: "10px 24px",
|
|
4779
4769
|
borderRadius: "10px",
|
|
@@ -4782,22 +4772,22 @@ const Fs = [
|
|
|
4782
4772
|
color: "white",
|
|
4783
4773
|
fontSize: "14px",
|
|
4784
4774
|
fontWeight: 600,
|
|
4785
|
-
cursor: !z ||
|
|
4775
|
+
cursor: !z || d ? "not-allowed" : "pointer",
|
|
4786
4776
|
flex: m ? "none" : 1,
|
|
4787
4777
|
minWidth: m ? "100%" : "140px",
|
|
4788
|
-
opacity: !z ||
|
|
4778
|
+
opacity: !z || d ? 0.6 : 1,
|
|
4789
4779
|
display: "flex",
|
|
4790
4780
|
alignItems: "center",
|
|
4791
4781
|
justifyContent: "center",
|
|
4792
4782
|
gap: "8px",
|
|
4793
4783
|
transition: "all 0.2s ease",
|
|
4794
|
-
boxShadow: !z ||
|
|
4784
|
+
boxShadow: !z || d ? "none" : "0 4px 12px rgba(239, 68, 68, 0.4)"
|
|
4795
4785
|
},
|
|
4796
4786
|
onMouseOver: (g) => {
|
|
4797
|
-
z && !
|
|
4787
|
+
z && !d && (g.currentTarget.style.transform = "translateY(-1px)", g.currentTarget.style.boxShadow = "0 6px 20px rgba(239, 68, 68, 0.5)");
|
|
4798
4788
|
},
|
|
4799
4789
|
onMouseOut: (g) => {
|
|
4800
|
-
z && !
|
|
4790
|
+
z && !d && (g.currentTarget.style.transform = "translateY(0)", g.currentTarget.style.boxShadow = "0 4px 12px rgba(239, 68, 68, 0.4)");
|
|
4801
4791
|
},
|
|
4802
4792
|
children: [
|
|
4803
4793
|
/* @__PURE__ */ n.jsx(Ne, { size: 16 }),
|
|
@@ -4851,7 +4841,7 @@ const Fs = [
|
|
|
4851
4841
|
"h3",
|
|
4852
4842
|
{
|
|
4853
4843
|
style: {
|
|
4854
|
-
color:
|
|
4844
|
+
color: i.textPrimary,
|
|
4855
4845
|
margin: 0,
|
|
4856
4846
|
fontSize: "20px",
|
|
4857
4847
|
fontWeight: 700,
|
|
@@ -4864,7 +4854,7 @@ const Fs = [
|
|
|
4864
4854
|
"p",
|
|
4865
4855
|
{
|
|
4866
4856
|
style: {
|
|
4867
|
-
color:
|
|
4857
|
+
color: i.textTertiary,
|
|
4868
4858
|
margin: "4px 0 0 0",
|
|
4869
4859
|
fontSize: "14px",
|
|
4870
4860
|
lineHeight: "1.4"
|
|
@@ -4898,7 +4888,7 @@ const Fs = [
|
|
|
4898
4888
|
padding: "12px",
|
|
4899
4889
|
borderRadius: "8px",
|
|
4900
4890
|
transition: "all 0.2s ease",
|
|
4901
|
-
backgroundColor: g.active ? `${
|
|
4891
|
+
backgroundColor: g.active ? `${i.accent}10` : "transparent"
|
|
4902
4892
|
},
|
|
4903
4893
|
children: [
|
|
4904
4894
|
/* @__PURE__ */ n.jsx(
|
|
@@ -4908,9 +4898,9 @@ const Fs = [
|
|
|
4908
4898
|
width: "8px",
|
|
4909
4899
|
height: "8px",
|
|
4910
4900
|
borderRadius: "50%",
|
|
4911
|
-
backgroundColor: g.active ?
|
|
4901
|
+
backgroundColor: g.active ? i.accent : i.textTertiary,
|
|
4912
4902
|
transition: "all 0.3s ease",
|
|
4913
|
-
boxShadow: g.active ? `0 0 0 4px ${
|
|
4903
|
+
boxShadow: g.active ? `0 0 0 4px ${i.accent}20` : "none"
|
|
4914
4904
|
}
|
|
4915
4905
|
}
|
|
4916
4906
|
),
|
|
@@ -4919,7 +4909,7 @@ const Fs = [
|
|
|
4919
4909
|
{
|
|
4920
4910
|
style: {
|
|
4921
4911
|
fontSize: "14px",
|
|
4922
|
-
color: g.active ?
|
|
4912
|
+
color: g.active ? i.textPrimary : i.textSecondary,
|
|
4923
4913
|
fontWeight: g.active ? 500 : 400
|
|
4924
4914
|
},
|
|
4925
4915
|
children: g.text
|
|
@@ -4939,17 +4929,17 @@ const Fs = [
|
|
|
4939
4929
|
alignItems: "center",
|
|
4940
4930
|
gap: "10px",
|
|
4941
4931
|
padding: "16px",
|
|
4942
|
-
background: `${
|
|
4932
|
+
background: `${i.accent}10`,
|
|
4943
4933
|
borderRadius: "10px",
|
|
4944
4934
|
fontSize: "14px",
|
|
4945
|
-
color:
|
|
4935
|
+
color: i.textSecondary
|
|
4946
4936
|
},
|
|
4947
4937
|
children: [
|
|
4948
4938
|
/* @__PURE__ */ n.jsx(
|
|
4949
|
-
|
|
4939
|
+
dr,
|
|
4950
4940
|
{
|
|
4951
4941
|
size: 18,
|
|
4952
|
-
style: { color:
|
|
4942
|
+
style: { color: i.accent, flexShrink: 0 }
|
|
4953
4943
|
}
|
|
4954
4944
|
),
|
|
4955
4945
|
/* @__PURE__ */ n.jsx("span", { children: "You will be redirected to the login page shortly" })
|
|
@@ -4991,7 +4981,7 @@ const Fs = [
|
|
|
4991
4981
|
"h3",
|
|
4992
4982
|
{
|
|
4993
4983
|
style: {
|
|
4994
|
-
color:
|
|
4984
|
+
color: i.textPrimary,
|
|
4995
4985
|
margin: 0,
|
|
4996
4986
|
fontSize: "20px",
|
|
4997
4987
|
fontWeight: 700,
|
|
@@ -5004,7 +4994,7 @@ const Fs = [
|
|
|
5004
4994
|
"p",
|
|
5005
4995
|
{
|
|
5006
4996
|
style: {
|
|
5007
|
-
color:
|
|
4997
|
+
color: i.textTertiary,
|
|
5008
4998
|
margin: "4px 0 0 0",
|
|
5009
4999
|
fontSize: "14px",
|
|
5010
5000
|
lineHeight: "1.4"
|
|
@@ -5022,8 +5012,8 @@ const Fs = [
|
|
|
5022
5012
|
style: {
|
|
5023
5013
|
textAlign: "center",
|
|
5024
5014
|
padding: "20px",
|
|
5025
|
-
background: `${
|
|
5026
|
-
border: `1px solid ${
|
|
5015
|
+
background: `${i.success}10`,
|
|
5016
|
+
border: `1px solid ${i.success}20`,
|
|
5027
5017
|
borderRadius: "12px",
|
|
5028
5018
|
marginBottom: "24px"
|
|
5029
5019
|
},
|
|
@@ -5033,7 +5023,7 @@ const Fs = [
|
|
|
5033
5023
|
{
|
|
5034
5024
|
size: 48,
|
|
5035
5025
|
style: {
|
|
5036
|
-
color:
|
|
5026
|
+
color: i.success,
|
|
5037
5027
|
marginBottom: "12px",
|
|
5038
5028
|
display: "block",
|
|
5039
5029
|
margin: "0 auto 12px auto"
|
|
@@ -5044,7 +5034,7 @@ const Fs = [
|
|
|
5044
5034
|
"p",
|
|
5045
5035
|
{
|
|
5046
5036
|
style: {
|
|
5047
|
-
color:
|
|
5037
|
+
color: i.textPrimary,
|
|
5048
5038
|
fontSize: "16px",
|
|
5049
5039
|
fontWeight: 600,
|
|
5050
5040
|
margin: "0 0 8px 0"
|
|
@@ -5056,7 +5046,7 @@ const Fs = [
|
|
|
5056
5046
|
"p",
|
|
5057
5047
|
{
|
|
5058
5048
|
style: {
|
|
5059
|
-
color:
|
|
5049
|
+
color: i.textSecondary,
|
|
5060
5050
|
fontSize: "14px",
|
|
5061
5051
|
margin: 0,
|
|
5062
5052
|
lineHeight: "1.5"
|
|
@@ -5075,10 +5065,10 @@ const Fs = [
|
|
|
5075
5065
|
alignItems: "center",
|
|
5076
5066
|
gap: "10px",
|
|
5077
5067
|
padding: "16px",
|
|
5078
|
-
background: `${
|
|
5068
|
+
background: `${i.accent}10`,
|
|
5079
5069
|
borderRadius: "10px",
|
|
5080
5070
|
fontSize: "14px",
|
|
5081
|
-
color:
|
|
5071
|
+
color: i.textSecondary,
|
|
5082
5072
|
justifyContent: "center"
|
|
5083
5073
|
},
|
|
5084
5074
|
children: [
|
|
@@ -5088,7 +5078,7 @@ const Fs = [
|
|
|
5088
5078
|
size: 16,
|
|
5089
5079
|
style: {
|
|
5090
5080
|
animation: "spin 1s linear infinite",
|
|
5091
|
-
color:
|
|
5081
|
+
color: i.accent
|
|
5092
5082
|
}
|
|
5093
5083
|
}
|
|
5094
5084
|
),
|
|
@@ -5120,8 +5110,8 @@ const Fs = [
|
|
|
5120
5110
|
"div",
|
|
5121
5111
|
{
|
|
5122
5112
|
style: {
|
|
5123
|
-
backgroundColor:
|
|
5124
|
-
border: `1px solid ${
|
|
5113
|
+
backgroundColor: i.surface,
|
|
5114
|
+
border: `1px solid ${i.border}`,
|
|
5125
5115
|
borderRadius: "20px",
|
|
5126
5116
|
width: "100%",
|
|
5127
5117
|
maxWidth: "480px",
|
|
@@ -5191,27 +5181,27 @@ const Fs = [
|
|
|
5191
5181
|
]
|
|
5192
5182
|
}
|
|
5193
5183
|
);
|
|
5194
|
-
},
|
|
5184
|
+
}, Vs = ({
|
|
5195
5185
|
isOpen: t,
|
|
5196
5186
|
onClose: e,
|
|
5197
5187
|
onUpdate: r,
|
|
5198
5188
|
colors: s
|
|
5199
5189
|
}) => {
|
|
5200
|
-
const [a,
|
|
5190
|
+
const [a, o] = P(""), [i, l] = P(!1), [h, c] = P(!1), [d, b] = P({ isValid: !1, message: "", type: null });
|
|
5201
5191
|
if (te(() => {
|
|
5202
5192
|
if (typeof window > "u") return;
|
|
5203
5193
|
const u = () => {
|
|
5204
|
-
|
|
5194
|
+
c(window.innerWidth < 640);
|
|
5205
5195
|
};
|
|
5206
5196
|
return u(), window.addEventListener("resize", u), () => window.removeEventListener("resize", u);
|
|
5207
5197
|
}, []), te(() => {
|
|
5208
5198
|
if (!a.trim()) {
|
|
5209
|
-
|
|
5199
|
+
b({ isValid: !1, message: "", type: null });
|
|
5210
5200
|
return;
|
|
5211
5201
|
}
|
|
5212
5202
|
try {
|
|
5213
5203
|
const u = new URL(a), j = /\.(jpg|jpeg|png|gif|webp|svg)$/i.test(u.pathname);
|
|
5214
|
-
|
|
5204
|
+
b(j ? {
|
|
5215
5205
|
isValid: !0,
|
|
5216
5206
|
message: "Valid image URL",
|
|
5217
5207
|
type: "success"
|
|
@@ -5221,18 +5211,18 @@ const Fs = [
|
|
|
5221
5211
|
type: "warning"
|
|
5222
5212
|
});
|
|
5223
5213
|
} catch {
|
|
5224
|
-
|
|
5214
|
+
b({
|
|
5225
5215
|
isValid: !1,
|
|
5226
5216
|
message: "Please enter a valid URL",
|
|
5227
5217
|
type: "error"
|
|
5228
5218
|
});
|
|
5229
5219
|
}
|
|
5230
5220
|
}, [a]), !t) return null;
|
|
5231
|
-
const
|
|
5232
|
-
if (!(!a || !
|
|
5221
|
+
const y = async () => {
|
|
5222
|
+
if (!(!a || !d.isValid)) {
|
|
5233
5223
|
l(!0);
|
|
5234
5224
|
try {
|
|
5235
|
-
await r(a) && (
|
|
5225
|
+
await r(a) && (o(""), e());
|
|
5236
5226
|
} finally {
|
|
5237
5227
|
l(!1);
|
|
5238
5228
|
}
|
|
@@ -5381,7 +5371,7 @@ const Fs = [
|
|
|
5381
5371
|
gap: "6px"
|
|
5382
5372
|
},
|
|
5383
5373
|
children: [
|
|
5384
|
-
/* @__PURE__ */ n.jsx(
|
|
5374
|
+
/* @__PURE__ */ n.jsx(bs, { size: 16 }),
|
|
5385
5375
|
"Avatar URL"
|
|
5386
5376
|
]
|
|
5387
5377
|
}
|
|
@@ -5394,13 +5384,13 @@ const Fs = [
|
|
|
5394
5384
|
id: "avatar-url",
|
|
5395
5385
|
placeholder: "https://example.com/your-avatar.jpg",
|
|
5396
5386
|
value: a,
|
|
5397
|
-
onChange: (u) =>
|
|
5387
|
+
onChange: (u) => o(u.target.value),
|
|
5398
5388
|
style: {
|
|
5399
5389
|
width: "100%",
|
|
5400
5390
|
padding: "14px 16px",
|
|
5401
5391
|
paddingLeft: "44px",
|
|
5402
5392
|
borderRadius: "12px",
|
|
5403
|
-
border: `1.5px solid ${
|
|
5393
|
+
border: `1.5px solid ${d.type === "error" ? s.error : d.type === "success" ? s.success : s.border}`,
|
|
5404
5394
|
backgroundColor: "transparent",
|
|
5405
5395
|
color: s.textPrimary,
|
|
5406
5396
|
fontSize: "15px",
|
|
@@ -5412,9 +5402,9 @@ const Fs = [
|
|
|
5412
5402
|
u.target.style.borderColor = s.accent, u.target.style.boxShadow = `0 0 0 3px ${s.accent}20`;
|
|
5413
5403
|
},
|
|
5414
5404
|
onBlur: (u) => {
|
|
5415
|
-
u.target.style.borderColor =
|
|
5405
|
+
u.target.style.borderColor = d.type === "error" ? s.error : d.type === "success" ? s.success : s.border, u.target.style.boxShadow = "none";
|
|
5416
5406
|
},
|
|
5417
|
-
disabled:
|
|
5407
|
+
disabled: i
|
|
5418
5408
|
}
|
|
5419
5409
|
),
|
|
5420
5410
|
/* @__PURE__ */ n.jsx(
|
|
@@ -5431,7 +5421,7 @@ const Fs = [
|
|
|
5431
5421
|
}
|
|
5432
5422
|
)
|
|
5433
5423
|
] }),
|
|
5434
|
-
|
|
5424
|
+
d.message && /* @__PURE__ */ n.jsxs(
|
|
5435
5425
|
"div",
|
|
5436
5426
|
{
|
|
5437
5427
|
style: {
|
|
@@ -5440,18 +5430,18 @@ const Fs = [
|
|
|
5440
5430
|
gap: "6px",
|
|
5441
5431
|
marginTop: "8px",
|
|
5442
5432
|
fontSize: "13px",
|
|
5443
|
-
color:
|
|
5433
|
+
color: d.type === "success" ? s.success : d.type === "error" ? s.error : s.textTertiary
|
|
5444
5434
|
},
|
|
5445
5435
|
children: [
|
|
5446
|
-
|
|
5447
|
-
|
|
5448
|
-
|
|
5449
|
-
|
|
5436
|
+
d.type === "success" && /* @__PURE__ */ n.jsx(ce, { size: 14 }),
|
|
5437
|
+
d.type === "error" && /* @__PURE__ */ n.jsx(le, { size: 14 }),
|
|
5438
|
+
d.type === "warning" && /* @__PURE__ */ n.jsx(le, { size: 14 }),
|
|
5439
|
+
d.message
|
|
5450
5440
|
]
|
|
5451
5441
|
}
|
|
5452
5442
|
)
|
|
5453
5443
|
] }),
|
|
5454
|
-
a &&
|
|
5444
|
+
a && d.type === "success" && /* @__PURE__ */ n.jsxs(
|
|
5455
5445
|
"div",
|
|
5456
5446
|
{
|
|
5457
5447
|
style: {
|
|
@@ -5514,7 +5504,7 @@ const Fs = [
|
|
|
5514
5504
|
"button",
|
|
5515
5505
|
{
|
|
5516
5506
|
onClick: e,
|
|
5517
|
-
disabled:
|
|
5507
|
+
disabled: i,
|
|
5518
5508
|
style: {
|
|
5519
5509
|
padding: "10px 24px",
|
|
5520
5510
|
borderRadius: "10px",
|
|
@@ -5523,17 +5513,17 @@ const Fs = [
|
|
|
5523
5513
|
color: s.textPrimary,
|
|
5524
5514
|
fontSize: "14px",
|
|
5525
5515
|
fontWeight: 500,
|
|
5526
|
-
cursor:
|
|
5516
|
+
cursor: i ? "not-allowed" : "pointer",
|
|
5527
5517
|
flex: h ? "none" : 1,
|
|
5528
5518
|
minWidth: h ? "100%" : "120px",
|
|
5529
|
-
opacity:
|
|
5519
|
+
opacity: i ? 0.6 : 1,
|
|
5530
5520
|
transition: "all 0.2s ease"
|
|
5531
5521
|
},
|
|
5532
5522
|
onMouseOver: (u) => {
|
|
5533
|
-
|
|
5523
|
+
i || (u.currentTarget.style.backgroundColor = s.border, u.currentTarget.style.transform = "translateY(-1px)");
|
|
5534
5524
|
},
|
|
5535
5525
|
onMouseOut: (u) => {
|
|
5536
|
-
|
|
5526
|
+
i || (u.currentTarget.style.backgroundColor = "transparent", u.currentTarget.style.transform = "translateY(0)");
|
|
5537
5527
|
},
|
|
5538
5528
|
children: "Cancel"
|
|
5539
5529
|
}
|
|
@@ -5541,8 +5531,8 @@ const Fs = [
|
|
|
5541
5531
|
/* @__PURE__ */ n.jsx(
|
|
5542
5532
|
"button",
|
|
5543
5533
|
{
|
|
5544
|
-
onClick:
|
|
5545
|
-
disabled:
|
|
5534
|
+
onClick: y,
|
|
5535
|
+
disabled: i || !d.isValid,
|
|
5546
5536
|
style: {
|
|
5547
5537
|
padding: "10px 24px",
|
|
5548
5538
|
borderRadius: "10px",
|
|
@@ -5551,24 +5541,24 @@ const Fs = [
|
|
|
5551
5541
|
color: "#fff",
|
|
5552
5542
|
fontSize: "14px",
|
|
5553
5543
|
fontWeight: 600,
|
|
5554
|
-
cursor:
|
|
5544
|
+
cursor: i || !d.isValid ? "not-allowed" : "pointer",
|
|
5555
5545
|
flex: h ? "none" : 1,
|
|
5556
5546
|
minWidth: h ? "100%" : "140px",
|
|
5557
|
-
opacity:
|
|
5547
|
+
opacity: i || !d.isValid ? 0.6 : 1,
|
|
5558
5548
|
display: "flex",
|
|
5559
5549
|
alignItems: "center",
|
|
5560
5550
|
justifyContent: "center",
|
|
5561
5551
|
gap: "8px",
|
|
5562
5552
|
transition: "all 0.2s ease",
|
|
5563
|
-
boxShadow:
|
|
5553
|
+
boxShadow: i || !d.isValid ? "none" : `0 4px 12px ${s.accent}40`
|
|
5564
5554
|
},
|
|
5565
5555
|
onMouseOver: (u) => {
|
|
5566
|
-
!
|
|
5556
|
+
!i && d.isValid && (u.currentTarget.style.transform = "translateY(-1px)", u.currentTarget.style.boxShadow = `0 6px 20px ${s.accent}60`);
|
|
5567
5557
|
},
|
|
5568
5558
|
onMouseOut: (u) => {
|
|
5569
|
-
!
|
|
5559
|
+
!i && d.isValid && (u.currentTarget.style.transform = "translateY(0)", u.currentTarget.style.boxShadow = `0 4px 12px ${s.accent}40`);
|
|
5570
5560
|
},
|
|
5571
|
-
children:
|
|
5561
|
+
children: i ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
5572
5562
|
/* @__PURE__ */ n.jsx(
|
|
5573
5563
|
ae,
|
|
5574
5564
|
{
|
|
@@ -5643,19 +5633,19 @@ const Fs = [
|
|
|
5643
5633
|
]
|
|
5644
5634
|
}
|
|
5645
5635
|
);
|
|
5646
|
-
},
|
|
5636
|
+
}, Ys = ({
|
|
5647
5637
|
isOpen: t,
|
|
5648
5638
|
onClose: e,
|
|
5649
5639
|
onSuccess: r,
|
|
5650
5640
|
onError: s,
|
|
5651
5641
|
userId: a,
|
|
5652
|
-
colors:
|
|
5642
|
+
colors: o
|
|
5653
5643
|
}) => {
|
|
5654
|
-
const { baseUrl:
|
|
5644
|
+
const { baseUrl: i, apiKey: l, appId: h } = ge(), [c, d] = P({
|
|
5655
5645
|
currentPassword: "",
|
|
5656
5646
|
newPassword: "",
|
|
5657
5647
|
confirmPassword: ""
|
|
5658
|
-
}), [
|
|
5648
|
+
}), [b, y] = P({}), [w, u] = P(!1), [j, m] = P({
|
|
5659
5649
|
currentPassword: !1,
|
|
5660
5650
|
newPassword: !1,
|
|
5661
5651
|
confirmPassword: !1
|
|
@@ -5669,22 +5659,22 @@ const Fs = [
|
|
|
5669
5659
|
}, []), !t) return null;
|
|
5670
5660
|
const z = (v) => {
|
|
5671
5661
|
const { name: D, value: W } = v.target;
|
|
5672
|
-
|
|
5662
|
+
d((F) => ({ ...F, [D]: W })), b[D] && y((F) => ({ ...F, [D]: "" }));
|
|
5673
5663
|
}, C = (v) => {
|
|
5674
5664
|
m((D) => ({ ...D, [v]: !D[v] }));
|
|
5675
5665
|
}, q = () => {
|
|
5676
5666
|
const v = {};
|
|
5677
|
-
return
|
|
5667
|
+
return c.currentPassword || (v.currentPassword = "Current password is required"), c.newPassword ? c.newPassword.length < 6 && (v.newPassword = "Password must be at least 6 characters") : v.newPassword = "New password is required", c.newPassword !== c.confirmPassword && (v.confirmPassword = "Passwords do not match"), y(v), Object.keys(v).length === 0;
|
|
5678
5668
|
}, g = async (v) => {
|
|
5679
5669
|
if (v.preventDefault(), !!q()) {
|
|
5680
5670
|
u(!0);
|
|
5681
5671
|
try {
|
|
5682
5672
|
const { data: D } = await M.put(
|
|
5683
|
-
`${
|
|
5673
|
+
`${i}/users/change-password/${a}`,
|
|
5684
5674
|
{
|
|
5685
5675
|
appId: h,
|
|
5686
|
-
currentPassword:
|
|
5687
|
-
newPassword:
|
|
5676
|
+
currentPassword: c.currentPassword,
|
|
5677
|
+
newPassword: c.newPassword
|
|
5688
5678
|
},
|
|
5689
5679
|
{
|
|
5690
5680
|
headers: {
|
|
@@ -5692,7 +5682,7 @@ const Fs = [
|
|
|
5692
5682
|
}
|
|
5693
5683
|
}
|
|
5694
5684
|
);
|
|
5695
|
-
D.success ? (r(D.message || "Password updated successfully"),
|
|
5685
|
+
D.success ? (r(D.message || "Password updated successfully"), d({
|
|
5696
5686
|
currentPassword: "",
|
|
5697
5687
|
newPassword: "",
|
|
5698
5688
|
confirmPassword: ""
|
|
@@ -5707,7 +5697,7 @@ const Fs = [
|
|
|
5707
5697
|
{
|
|
5708
5698
|
field: "currentPassword",
|
|
5709
5699
|
label: "Current Password",
|
|
5710
|
-
icon: /* @__PURE__ */ n.jsx(
|
|
5700
|
+
icon: /* @__PURE__ */ n.jsx(ct, { size: 18 })
|
|
5711
5701
|
},
|
|
5712
5702
|
{
|
|
5713
5703
|
field: "newPassword",
|
|
@@ -5738,8 +5728,8 @@ const Fs = [
|
|
|
5738
5728
|
"div",
|
|
5739
5729
|
{
|
|
5740
5730
|
style: {
|
|
5741
|
-
backgroundColor:
|
|
5742
|
-
border: `1px solid ${
|
|
5731
|
+
backgroundColor: o.surface,
|
|
5732
|
+
border: `1px solid ${o.border}`,
|
|
5743
5733
|
borderRadius: "16px",
|
|
5744
5734
|
maxWidth: "440px",
|
|
5745
5735
|
width: "100%",
|
|
@@ -5778,11 +5768,11 @@ const Fs = [
|
|
|
5778
5768
|
width: "40px",
|
|
5779
5769
|
height: "40px",
|
|
5780
5770
|
borderRadius: "10px",
|
|
5781
|
-
background: `linear-gradient(135deg, ${
|
|
5771
|
+
background: `linear-gradient(135deg, ${o.accent}20, ${o.accent}40)`,
|
|
5782
5772
|
display: "flex",
|
|
5783
5773
|
alignItems: "center",
|
|
5784
5774
|
justifyContent: "center",
|
|
5785
|
-
color:
|
|
5775
|
+
color: o.accent,
|
|
5786
5776
|
flexShrink: 0
|
|
5787
5777
|
},
|
|
5788
5778
|
children: /* @__PURE__ */ n.jsx(me, { size: 20 })
|
|
@@ -5792,7 +5782,7 @@ const Fs = [
|
|
|
5792
5782
|
"h3",
|
|
5793
5783
|
{
|
|
5794
5784
|
style: {
|
|
5795
|
-
color:
|
|
5785
|
+
color: o.textPrimary,
|
|
5796
5786
|
margin: 0,
|
|
5797
5787
|
fontSize: "18px",
|
|
5798
5788
|
fontWeight: 600,
|
|
@@ -5812,7 +5802,7 @@ const Fs = [
|
|
|
5812
5802
|
style: {
|
|
5813
5803
|
background: "transparent",
|
|
5814
5804
|
border: "none",
|
|
5815
|
-
color:
|
|
5805
|
+
color: o.textTertiary,
|
|
5816
5806
|
cursor: "pointer",
|
|
5817
5807
|
padding: "8px",
|
|
5818
5808
|
borderRadius: "8px",
|
|
@@ -5824,10 +5814,10 @@ const Fs = [
|
|
|
5824
5814
|
justifyContent: "center"
|
|
5825
5815
|
},
|
|
5826
5816
|
onMouseOver: (v) => {
|
|
5827
|
-
v.currentTarget.style.backgroundColor =
|
|
5817
|
+
v.currentTarget.style.backgroundColor = o.border, v.currentTarget.style.color = o.textPrimary;
|
|
5828
5818
|
},
|
|
5829
5819
|
onMouseOut: (v) => {
|
|
5830
|
-
v.currentTarget.style.backgroundColor = "transparent", v.currentTarget.style.color =
|
|
5820
|
+
v.currentTarget.style.backgroundColor = "transparent", v.currentTarget.style.color = o.textTertiary;
|
|
5831
5821
|
},
|
|
5832
5822
|
children: /* @__PURE__ */ n.jsx(Pe, { size: 20 })
|
|
5833
5823
|
}
|
|
@@ -5851,7 +5841,7 @@ const Fs = [
|
|
|
5851
5841
|
style: {
|
|
5852
5842
|
display: "block",
|
|
5853
5843
|
marginBottom: "8px",
|
|
5854
|
-
color:
|
|
5844
|
+
color: o.textPrimary,
|
|
5855
5845
|
fontSize: "14px",
|
|
5856
5846
|
fontWeight: 500,
|
|
5857
5847
|
lineHeight: "1.4"
|
|
@@ -5868,7 +5858,7 @@ const Fs = [
|
|
|
5868
5858
|
left: "14px",
|
|
5869
5859
|
top: "50%",
|
|
5870
5860
|
transform: "translateY(-50%)",
|
|
5871
|
-
color:
|
|
5861
|
+
color: o.textTertiary,
|
|
5872
5862
|
zIndex: 2
|
|
5873
5863
|
},
|
|
5874
5864
|
children: W
|
|
@@ -5881,25 +5871,25 @@ const Fs = [
|
|
|
5881
5871
|
id: v,
|
|
5882
5872
|
name: v,
|
|
5883
5873
|
placeholder: `Enter ${D.toLowerCase()}`,
|
|
5884
|
-
value:
|
|
5874
|
+
value: c[v],
|
|
5885
5875
|
onChange: z,
|
|
5886
5876
|
style: {
|
|
5887
5877
|
width: "100%",
|
|
5888
5878
|
padding: "14px 48px 14px 44px",
|
|
5889
5879
|
borderRadius: "10px",
|
|
5890
|
-
border: `1.5px solid ${
|
|
5880
|
+
border: `1.5px solid ${b[v] ? o.error : o.border}`,
|
|
5891
5881
|
backgroundColor: "transparent",
|
|
5892
|
-
color:
|
|
5882
|
+
color: o.textPrimary,
|
|
5893
5883
|
fontSize: "15px",
|
|
5894
5884
|
outline: "none",
|
|
5895
5885
|
transition: "all 0.2s ease",
|
|
5896
5886
|
boxSizing: "border-box"
|
|
5897
5887
|
},
|
|
5898
5888
|
onFocus: (F) => {
|
|
5899
|
-
F.target.style.borderColor =
|
|
5889
|
+
F.target.style.borderColor = o.accent, F.target.style.boxShadow = `0 0 0 3px ${o.accent}20`;
|
|
5900
5890
|
},
|
|
5901
5891
|
onBlur: (F) => {
|
|
5902
|
-
F.target.style.borderColor =
|
|
5892
|
+
F.target.style.borderColor = b[v] ? o.error : o.border, F.target.style.boxShadow = "none";
|
|
5903
5893
|
}
|
|
5904
5894
|
}
|
|
5905
5895
|
),
|
|
@@ -5916,7 +5906,7 @@ const Fs = [
|
|
|
5916
5906
|
background: "transparent",
|
|
5917
5907
|
border: "none",
|
|
5918
5908
|
cursor: "pointer",
|
|
5919
|
-
color:
|
|
5909
|
+
color: o.textTertiary,
|
|
5920
5910
|
padding: "4px",
|
|
5921
5911
|
borderRadius: "4px",
|
|
5922
5912
|
width: "32px",
|
|
@@ -5926,21 +5916,21 @@ const Fs = [
|
|
|
5926
5916
|
justifyContent: "center"
|
|
5927
5917
|
},
|
|
5928
5918
|
onMouseOver: (F) => {
|
|
5929
|
-
F.currentTarget.style.backgroundColor =
|
|
5919
|
+
F.currentTarget.style.backgroundColor = o.border, F.currentTarget.style.color = o.textPrimary;
|
|
5930
5920
|
},
|
|
5931
5921
|
onMouseOut: (F) => {
|
|
5932
|
-
F.currentTarget.style.backgroundColor = "transparent", F.currentTarget.style.color =
|
|
5922
|
+
F.currentTarget.style.backgroundColor = "transparent", F.currentTarget.style.color = o.textTertiary;
|
|
5933
5923
|
},
|
|
5934
|
-
children: j[v] ? /* @__PURE__ */ n.jsx(
|
|
5924
|
+
children: j[v] ? /* @__PURE__ */ n.jsx(ot, { size: 18 }) : /* @__PURE__ */ n.jsx(lt, { size: 18 })
|
|
5935
5925
|
}
|
|
5936
5926
|
)
|
|
5937
5927
|
] }),
|
|
5938
|
-
|
|
5928
|
+
b[v] && /* @__PURE__ */ n.jsxs(
|
|
5939
5929
|
"div",
|
|
5940
5930
|
{
|
|
5941
5931
|
style: {
|
|
5942
5932
|
fontSize: "13px",
|
|
5943
|
-
color:
|
|
5933
|
+
color: o.error,
|
|
5944
5934
|
marginTop: "6px",
|
|
5945
5935
|
display: "flex",
|
|
5946
5936
|
alignItems: "center",
|
|
@@ -5948,7 +5938,7 @@ const Fs = [
|
|
|
5948
5938
|
},
|
|
5949
5939
|
children: [
|
|
5950
5940
|
/* @__PURE__ */ n.jsx("span", { style: { fontSize: "16px" }, children: "⚠" }),
|
|
5951
|
-
|
|
5941
|
+
b[v]
|
|
5952
5942
|
]
|
|
5953
5943
|
}
|
|
5954
5944
|
)
|
|
@@ -5976,9 +5966,9 @@ const Fs = [
|
|
|
5976
5966
|
style: {
|
|
5977
5967
|
padding: "14px 24px",
|
|
5978
5968
|
borderRadius: "10px",
|
|
5979
|
-
border: `1.5px solid ${
|
|
5969
|
+
border: `1.5px solid ${o.border}`,
|
|
5980
5970
|
background: "transparent",
|
|
5981
|
-
color:
|
|
5971
|
+
color: o.textPrimary,
|
|
5982
5972
|
fontSize: "14px",
|
|
5983
5973
|
fontWeight: 500,
|
|
5984
5974
|
cursor: w ? "not-allowed" : "pointer",
|
|
@@ -5988,7 +5978,7 @@ const Fs = [
|
|
|
5988
5978
|
transition: "all 0.2s ease"
|
|
5989
5979
|
},
|
|
5990
5980
|
onMouseOver: (v) => {
|
|
5991
|
-
w || (v.currentTarget.style.backgroundColor =
|
|
5981
|
+
w || (v.currentTarget.style.backgroundColor = o.border, v.currentTarget.style.transform = "translateY(-1px)");
|
|
5992
5982
|
},
|
|
5993
5983
|
onMouseOut: (v) => {
|
|
5994
5984
|
w || (v.currentTarget.style.backgroundColor = "transparent", v.currentTarget.style.transform = "translateY(0)");
|
|
@@ -6005,7 +5995,7 @@ const Fs = [
|
|
|
6005
5995
|
padding: "14px 24px",
|
|
6006
5996
|
borderRadius: "10px",
|
|
6007
5997
|
border: "none",
|
|
6008
|
-
background: `linear-gradient(135deg, ${
|
|
5998
|
+
background: `linear-gradient(135deg, ${o.accent}, ${o.accent}E6)`,
|
|
6009
5999
|
color: "#fff",
|
|
6010
6000
|
fontSize: "14px",
|
|
6011
6001
|
fontWeight: 600,
|
|
@@ -6018,13 +6008,13 @@ const Fs = [
|
|
|
6018
6008
|
justifyContent: "center",
|
|
6019
6009
|
gap: "8px",
|
|
6020
6010
|
transition: "all 0.2s ease",
|
|
6021
|
-
boxShadow: w ? "none" : `0 4px 12px ${
|
|
6011
|
+
boxShadow: w ? "none" : `0 4px 12px ${o.accent}40`
|
|
6022
6012
|
},
|
|
6023
6013
|
onMouseOver: (v) => {
|
|
6024
|
-
w || (v.currentTarget.style.transform = "translateY(-1px)", v.currentTarget.style.boxShadow = `0 6px 20px ${
|
|
6014
|
+
w || (v.currentTarget.style.transform = "translateY(-1px)", v.currentTarget.style.boxShadow = `0 6px 20px ${o.accent}60`);
|
|
6025
6015
|
},
|
|
6026
6016
|
onMouseOut: (v) => {
|
|
6027
|
-
w || (v.currentTarget.style.transform = "translateY(0)", v.currentTarget.style.boxShadow = `0 4px 12px ${
|
|
6017
|
+
w || (v.currentTarget.style.transform = "translateY(0)", v.currentTarget.style.boxShadow = `0 4px 12px ${o.accent}40`);
|
|
6028
6018
|
},
|
|
6029
6019
|
children: w ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
6030
6020
|
/* @__PURE__ */ n.jsx(
|
|
@@ -6059,12 +6049,12 @@ const Fs = [
|
|
|
6059
6049
|
}
|
|
6060
6050
|
|
|
6061
6051
|
.change-password-modal::-webkit-scrollbar-thumb {
|
|
6062
|
-
background: ${
|
|
6052
|
+
background: ${o.border};
|
|
6063
6053
|
border-radius: 3px;
|
|
6064
6054
|
}
|
|
6065
6055
|
|
|
6066
6056
|
.change-password-modal::-webkit-scrollbar-thumb:hover {
|
|
6067
|
-
background: ${
|
|
6057
|
+
background: ${o.textTertiary};
|
|
6068
6058
|
}
|
|
6069
6059
|
|
|
6070
6060
|
/* Mobile responsiveness */
|
|
@@ -6088,29 +6078,29 @@ const Fs = [
|
|
|
6088
6078
|
)
|
|
6089
6079
|
}
|
|
6090
6080
|
);
|
|
6091
|
-
},
|
|
6081
|
+
}, Ks = ({
|
|
6092
6082
|
isOpen: t,
|
|
6093
6083
|
onClose: e,
|
|
6094
6084
|
onVerify: r,
|
|
6095
6085
|
onSendOTP: s,
|
|
6096
6086
|
verifyFormData: a,
|
|
6097
|
-
setVerifyFormData:
|
|
6098
|
-
otpSent:
|
|
6087
|
+
setVerifyFormData: o,
|
|
6088
|
+
otpSent: i,
|
|
6099
6089
|
verifying: l,
|
|
6100
6090
|
user: h,
|
|
6101
|
-
colors:
|
|
6102
|
-
darkMode:
|
|
6091
|
+
colors: c,
|
|
6092
|
+
darkMode: d
|
|
6103
6093
|
}) => {
|
|
6104
6094
|
if (!t) return null;
|
|
6105
|
-
const
|
|
6106
|
-
e(),
|
|
6095
|
+
const b = () => {
|
|
6096
|
+
e(), o({ email: h?.email || "", otp: "", appId: a.appId });
|
|
6107
6097
|
};
|
|
6108
6098
|
return /* @__PURE__ */ n.jsxs(
|
|
6109
6099
|
"div",
|
|
6110
6100
|
{
|
|
6111
6101
|
className: "modal-overlay",
|
|
6112
6102
|
style: {
|
|
6113
|
-
backgroundColor:
|
|
6103
|
+
backgroundColor: d ? "rgba(0, 0, 0, 0.8)" : "rgba(0, 0, 0, 0.5)"
|
|
6114
6104
|
},
|
|
6115
6105
|
children: [
|
|
6116
6106
|
/* @__PURE__ */ n.jsxs(
|
|
@@ -6118,18 +6108,18 @@ const Fs = [
|
|
|
6118
6108
|
{
|
|
6119
6109
|
className: "verify-email-modal",
|
|
6120
6110
|
style: {
|
|
6121
|
-
backgroundColor:
|
|
6122
|
-
border: `1px solid ${
|
|
6111
|
+
backgroundColor: c.surface,
|
|
6112
|
+
border: `1px solid ${c.border}`
|
|
6123
6113
|
},
|
|
6124
6114
|
children: [
|
|
6125
6115
|
/* @__PURE__ */ n.jsxs("div", { className: "modal-header", children: [
|
|
6126
|
-
/* @__PURE__ */ n.jsx("h3", { style: { color:
|
|
6116
|
+
/* @__PURE__ */ n.jsx("h3", { style: { color: c.textPrimary }, children: "Verify Your Email" }),
|
|
6127
6117
|
/* @__PURE__ */ n.jsx(
|
|
6128
6118
|
"button",
|
|
6129
6119
|
{
|
|
6130
|
-
onClick:
|
|
6120
|
+
onClick: b,
|
|
6131
6121
|
className: "close-btn",
|
|
6132
|
-
style: { color:
|
|
6122
|
+
style: { color: c.textTertiary },
|
|
6133
6123
|
"aria-label": "Close verification modal",
|
|
6134
6124
|
children: /* @__PURE__ */ n.jsx(Pe, { size: 20, "aria-hidden": "true" })
|
|
6135
6125
|
}
|
|
@@ -6137,20 +6127,20 @@ const Fs = [
|
|
|
6137
6127
|
] }),
|
|
6138
6128
|
/* @__PURE__ */ n.jsxs("form", { className: "verify-form", onSubmit: r, children: [
|
|
6139
6129
|
/* @__PURE__ */ n.jsxs("div", { className: "form-group", children: [
|
|
6140
|
-
/* @__PURE__ */ n.jsx("label", { style: { color:
|
|
6130
|
+
/* @__PURE__ */ n.jsx("label", { style: { color: c.textSecondary }, children: "Email" }),
|
|
6141
6131
|
/* @__PURE__ */ n.jsxs("div", { className: "input-container", children: [
|
|
6142
|
-
/* @__PURE__ */ n.jsx(
|
|
6132
|
+
/* @__PURE__ */ n.jsx(de, { size: 18, style: { color: c.textTertiary }, "aria-hidden": "true" }),
|
|
6143
6133
|
/* @__PURE__ */ n.jsx(
|
|
6144
6134
|
"input",
|
|
6145
6135
|
{
|
|
6146
6136
|
type: "email",
|
|
6147
6137
|
value: a.email,
|
|
6148
|
-
onChange: (
|
|
6138
|
+
onChange: (y) => o((w) => ({ ...w, email: y.target.value })),
|
|
6149
6139
|
placeholder: "Enter your email",
|
|
6150
6140
|
style: {
|
|
6151
|
-
backgroundColor:
|
|
6152
|
-
color:
|
|
6153
|
-
borderColor:
|
|
6141
|
+
backgroundColor: c.surfaceLight,
|
|
6142
|
+
color: c.textPrimary,
|
|
6143
|
+
borderColor: c.border
|
|
6154
6144
|
},
|
|
6155
6145
|
required: !0,
|
|
6156
6146
|
"aria-required": "true",
|
|
@@ -6159,21 +6149,21 @@ const Fs = [
|
|
|
6159
6149
|
)
|
|
6160
6150
|
] })
|
|
6161
6151
|
] }),
|
|
6162
|
-
|
|
6163
|
-
/* @__PURE__ */ n.jsx("label", { style: { color:
|
|
6152
|
+
i && /* @__PURE__ */ n.jsxs("div", { className: "form-group", children: [
|
|
6153
|
+
/* @__PURE__ */ n.jsx("label", { style: { color: c.textSecondary }, children: "OTP" }),
|
|
6164
6154
|
/* @__PURE__ */ n.jsxs("div", { className: "input-container", children: [
|
|
6165
|
-
/* @__PURE__ */ n.jsx(
|
|
6155
|
+
/* @__PURE__ */ n.jsx(cr, { size: 18, style: { color: c.textTertiary }, "aria-hidden": "true" }),
|
|
6166
6156
|
/* @__PURE__ */ n.jsx(
|
|
6167
6157
|
"input",
|
|
6168
6158
|
{
|
|
6169
6159
|
type: "text",
|
|
6170
6160
|
value: a.otp,
|
|
6171
|
-
onChange: (
|
|
6161
|
+
onChange: (y) => o((w) => ({ ...w, otp: y.target.value })),
|
|
6172
6162
|
placeholder: "Enter OTP",
|
|
6173
6163
|
style: {
|
|
6174
|
-
backgroundColor:
|
|
6175
|
-
color:
|
|
6176
|
-
borderColor:
|
|
6164
|
+
backgroundColor: c.surfaceLight,
|
|
6165
|
+
color: c.textPrimary,
|
|
6166
|
+
borderColor: c.border
|
|
6177
6167
|
},
|
|
6178
6168
|
required: !0,
|
|
6179
6169
|
"aria-required": "true",
|
|
@@ -6182,19 +6172,19 @@ const Fs = [
|
|
|
6182
6172
|
)
|
|
6183
6173
|
] })
|
|
6184
6174
|
] }),
|
|
6185
|
-
/* @__PURE__ */ n.jsx("div", { className: "modal-actions", children:
|
|
6175
|
+
/* @__PURE__ */ n.jsx("div", { className: "modal-actions", children: i ? /* @__PURE__ */ n.jsxs(
|
|
6186
6176
|
"button",
|
|
6187
6177
|
{
|
|
6188
6178
|
type: "submit",
|
|
6189
6179
|
disabled: l,
|
|
6190
6180
|
className: "btn-primary",
|
|
6191
6181
|
style: {
|
|
6192
|
-
background: `linear-gradient(to right, ${
|
|
6182
|
+
background: `linear-gradient(to right, ${c.accent}, ${c.accentHover})`,
|
|
6193
6183
|
opacity: l ? 0.7 : 1
|
|
6194
6184
|
},
|
|
6195
6185
|
"aria-label": l ? "Verifying email" : "Verify email",
|
|
6196
6186
|
children: [
|
|
6197
|
-
l ? /* @__PURE__ */ n.jsx(ae, { size: 16, className: "spinner", "aria-hidden": "true" }) : /* @__PURE__ */ n.jsx(
|
|
6187
|
+
l ? /* @__PURE__ */ n.jsx(ae, { size: 16, className: "spinner", "aria-hidden": "true" }) : /* @__PURE__ */ n.jsx(ce, { size: 16, "aria-hidden": "true" }),
|
|
6198
6188
|
l ? "Verifying..." : "Verify Email"
|
|
6199
6189
|
]
|
|
6200
6190
|
}
|
|
@@ -6206,7 +6196,7 @@ const Fs = [
|
|
|
6206
6196
|
disabled: l,
|
|
6207
6197
|
className: "btn-primary",
|
|
6208
6198
|
style: {
|
|
6209
|
-
background: `linear-gradient(to right, ${
|
|
6199
|
+
background: `linear-gradient(to right, ${c.accent}, ${c.accentHover})`,
|
|
6210
6200
|
opacity: l ? 0.7 : 1
|
|
6211
6201
|
},
|
|
6212
6202
|
"aria-label": l ? "Sending OTP" : "Send OTP",
|
|
@@ -6269,7 +6259,7 @@ const Fs = [
|
|
|
6269
6259
|
}
|
|
6270
6260
|
|
|
6271
6261
|
.close-btn:hover {
|
|
6272
|
-
background-color: ${
|
|
6262
|
+
background-color: ${d ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)"};
|
|
6273
6263
|
}
|
|
6274
6264
|
|
|
6275
6265
|
.verify-form {
|
|
@@ -6313,8 +6303,8 @@ const Fs = [
|
|
|
6313
6303
|
}
|
|
6314
6304
|
|
|
6315
6305
|
.input-container input:focus {
|
|
6316
|
-
border-color: ${
|
|
6317
|
-
box-shadow: 0 0 0 3px ${
|
|
6306
|
+
border-color: ${c.accent};
|
|
6307
|
+
box-shadow: 0 0 0 3px ${c.accent}20;
|
|
6318
6308
|
}
|
|
6319
6309
|
|
|
6320
6310
|
.modal-actions {
|
|
@@ -6371,23 +6361,23 @@ const Fs = [
|
|
|
6371
6361
|
]
|
|
6372
6362
|
}
|
|
6373
6363
|
);
|
|
6374
|
-
},
|
|
6364
|
+
}, ja = ({
|
|
6375
6365
|
token: t,
|
|
6376
6366
|
user: e = null,
|
|
6377
6367
|
darkMode: r = !0,
|
|
6378
6368
|
homeUrl: s,
|
|
6379
6369
|
onLogout: a,
|
|
6380
|
-
onVerify:
|
|
6381
|
-
primaryColor:
|
|
6370
|
+
onVerify: o,
|
|
6371
|
+
primaryColor: i = "#00C212"
|
|
6382
6372
|
}) => {
|
|
6383
|
-
const { baseUrl: l, apiKey: h, appId:
|
|
6373
|
+
const { baseUrl: l, apiKey: h, appId: c } = ge(), [d, b] = P(null), [y, w] = P(e), [u, j] = P(!0), [m, $] = P(!1), [R, z] = P(!1), [C, q] = P(!1), [g, I] = P(!1), [v, D] = P(!1), [W, F] = P(!1), [V, Z] = P(!1), [T, J] = P(!1), [A, O] = P(null), [K, Q] = P(!1), [G, f] = P({
|
|
6384
6374
|
email: "",
|
|
6385
6375
|
otp: "",
|
|
6386
|
-
appId:
|
|
6376
|
+
appId: c
|
|
6387
6377
|
}), [S, x] = P(!1), [k, _] = P(!1);
|
|
6388
6378
|
te(() => {
|
|
6389
6379
|
if (typeof window < "u") {
|
|
6390
|
-
const E = () =>
|
|
6380
|
+
const E = () => b(window.innerWidth);
|
|
6391
6381
|
return E(), window.addEventListener("resize", E), () => window.removeEventListener("resize", E);
|
|
6392
6382
|
}
|
|
6393
6383
|
}, []);
|
|
@@ -6417,10 +6407,10 @@ const Fs = [
|
|
|
6417
6407
|
try {
|
|
6418
6408
|
_(!0);
|
|
6419
6409
|
const E = await M.post(
|
|
6420
|
-
`${l}/users/send-verify-otp/${
|
|
6410
|
+
`${l}/users/send-verify-otp/${y?.id}`,
|
|
6421
6411
|
{ email: G.email },
|
|
6422
6412
|
{
|
|
6423
|
-
headers: { "x-api-key": h, "x-app-id":
|
|
6413
|
+
headers: { "x-api-key": h, "x-app-id": c }
|
|
6424
6414
|
}
|
|
6425
6415
|
);
|
|
6426
6416
|
E.data.success ? (N("success", E.data.message || "OTP sent to email!"), x(!0)) : N("error", E.data.message || "Failed to send OTP");
|
|
@@ -6441,14 +6431,14 @@ const Fs = [
|
|
|
6441
6431
|
G
|
|
6442
6432
|
);
|
|
6443
6433
|
if (H.data.success) {
|
|
6444
|
-
if (N("success", H.data.message || "Email verified!"),
|
|
6445
|
-
const X = { ...
|
|
6434
|
+
if (N("success", H.data.message || "Email verified!"), y) {
|
|
6435
|
+
const X = { ...y, isVerified: !0 };
|
|
6446
6436
|
w(X), localStorage.setItem(
|
|
6447
6437
|
"userInfo",
|
|
6448
6438
|
JSON.stringify({ ...X, token: t })
|
|
6449
|
-
), typeof
|
|
6439
|
+
), typeof o == "function" && o(X);
|
|
6450
6440
|
}
|
|
6451
|
-
f({ email: "", otp: "", appId:
|
|
6441
|
+
f({ email: "", otp: "", appId: c }), x(!1), F(!1);
|
|
6452
6442
|
} else
|
|
6453
6443
|
N("error", H.data.message || "Verification failed");
|
|
6454
6444
|
} catch (H) {
|
|
@@ -6460,10 +6450,10 @@ const Fs = [
|
|
|
6460
6450
|
_(!1);
|
|
6461
6451
|
}
|
|
6462
6452
|
}, ve = async (E) => {
|
|
6463
|
-
if (!
|
|
6453
|
+
if (!y) return !1;
|
|
6464
6454
|
try {
|
|
6465
|
-
const H = { ...
|
|
6466
|
-
`${l}/users/update/${
|
|
6455
|
+
const H = { ...y, avatarUrl: E }, { data: X } = await M.put(
|
|
6456
|
+
`${l}/users/update/${y.id}`,
|
|
6467
6457
|
H,
|
|
6468
6458
|
{ headers: { "x-api-key": h } }
|
|
6469
6459
|
);
|
|
@@ -6474,13 +6464,13 @@ const Fs = [
|
|
|
6474
6464
|
} catch (H) {
|
|
6475
6465
|
return console.error("Avatar update error:", H), N("error", "Failed to update avatar"), !1;
|
|
6476
6466
|
}
|
|
6477
|
-
},
|
|
6478
|
-
if (
|
|
6467
|
+
}, fr = async () => {
|
|
6468
|
+
if (y) {
|
|
6479
6469
|
z(!0);
|
|
6480
6470
|
try {
|
|
6481
6471
|
const { data: E } = await M.put(
|
|
6482
|
-
`${l}/users/update/${
|
|
6483
|
-
|
|
6472
|
+
`${l}/users/update/${y.id}`,
|
|
6473
|
+
y,
|
|
6484
6474
|
{ headers: { "x-api-key": h } }
|
|
6485
6475
|
);
|
|
6486
6476
|
E.success ? (w(E.user), $(!1), localStorage.setItem(
|
|
@@ -6496,7 +6486,7 @@ const Fs = [
|
|
|
6496
6486
|
}, pt = async (E) => {
|
|
6497
6487
|
try {
|
|
6498
6488
|
const { data: H } = await M.get(
|
|
6499
|
-
`${l}/users/check-user/${E}?appId=${
|
|
6489
|
+
`${l}/users/check-user/${E}?appId=${c}`,
|
|
6500
6490
|
{ headers: { "x-api-key": h } }
|
|
6501
6491
|
);
|
|
6502
6492
|
H?.success === !0 && H?.exists === !1 && (console.warn("❌ User does not exist on server. Clearing session..."), localStorage.removeItem("userInfo"), w(null));
|
|
@@ -6518,8 +6508,8 @@ const Fs = [
|
|
|
6518
6508
|
}
|
|
6519
6509
|
})();
|
|
6520
6510
|
}, [e]), te(() => {
|
|
6521
|
-
|
|
6522
|
-
}, [
|
|
6511
|
+
y?.email && f((E) => ({ ...E, email: y.email }));
|
|
6512
|
+
}, [y?.email]);
|
|
6523
6513
|
const ft = (E, H) => {
|
|
6524
6514
|
let X = parseInt(E.replace("#", ""), 16), pe = (X >> 16) + H, He = (X >> 8 & 255) + H, Ve = (X & 255) + H;
|
|
6525
6515
|
return pe = Math.min(255, Math.max(0, pe)), He = Math.min(255, Math.max(0, He)), Ve = Math.min(255, Math.max(0, Ve)), `#${(Ve | He << 8 | pe << 16).toString(16).padStart(6, "0")}`;
|
|
@@ -6531,8 +6521,8 @@ const Fs = [
|
|
|
6531
6521
|
textPrimary: "#ffffff",
|
|
6532
6522
|
textSecondary: "#d4d4d8",
|
|
6533
6523
|
textTertiary: "#a1a1aa",
|
|
6534
|
-
accent:
|
|
6535
|
-
accentHover: ft(
|
|
6524
|
+
accent: i,
|
|
6525
|
+
accentHover: ft(i, -15),
|
|
6536
6526
|
success: "#10b981",
|
|
6537
6527
|
error: "#ef4444",
|
|
6538
6528
|
border: "#27272a",
|
|
@@ -6545,8 +6535,8 @@ const Fs = [
|
|
|
6545
6535
|
textPrimary: "#18181b",
|
|
6546
6536
|
textSecondary: "#52525b",
|
|
6547
6537
|
textTertiary: "#71717a",
|
|
6548
|
-
accent:
|
|
6549
|
-
accentHover: ft(
|
|
6538
|
+
accent: i,
|
|
6539
|
+
accentHover: ft(i, -15),
|
|
6550
6540
|
success: "#10b981",
|
|
6551
6541
|
error: "#ef4444",
|
|
6552
6542
|
border: "#e4e4e7",
|
|
@@ -6591,7 +6581,7 @@ const Fs = [
|
|
|
6591
6581
|
)
|
|
6592
6582
|
}
|
|
6593
6583
|
);
|
|
6594
|
-
if (!
|
|
6584
|
+
if (!y)
|
|
6595
6585
|
return /* @__PURE__ */ n.jsx(
|
|
6596
6586
|
"div",
|
|
6597
6587
|
{
|
|
@@ -6622,34 +6612,34 @@ const Fs = [
|
|
|
6622
6612
|
)
|
|
6623
6613
|
}
|
|
6624
6614
|
);
|
|
6625
|
-
const
|
|
6615
|
+
const xr = [
|
|
6626
6616
|
{
|
|
6627
6617
|
label: "Full Name",
|
|
6628
|
-
value:
|
|
6618
|
+
value: y.name,
|
|
6629
6619
|
name: "name",
|
|
6630
6620
|
type: "text",
|
|
6631
6621
|
icon: be
|
|
6632
6622
|
},
|
|
6633
6623
|
{
|
|
6634
6624
|
label: "Email Address",
|
|
6635
|
-
value:
|
|
6625
|
+
value: y.email,
|
|
6636
6626
|
name: "email",
|
|
6637
6627
|
type: "email",
|
|
6638
|
-
icon:
|
|
6628
|
+
icon: de
|
|
6639
6629
|
},
|
|
6640
6630
|
{
|
|
6641
6631
|
label: "Phone Number",
|
|
6642
|
-
value:
|
|
6632
|
+
value: y.phone || "Not set",
|
|
6643
6633
|
name: "phone",
|
|
6644
6634
|
type: "tel",
|
|
6645
|
-
icon:
|
|
6635
|
+
icon: Os
|
|
6646
6636
|
},
|
|
6647
6637
|
{
|
|
6648
6638
|
label: "Address",
|
|
6649
|
-
value:
|
|
6639
|
+
value: y.address || "Not provided",
|
|
6650
6640
|
name: "address",
|
|
6651
6641
|
type: "text",
|
|
6652
|
-
icon:
|
|
6642
|
+
icon: Ts
|
|
6653
6643
|
}
|
|
6654
6644
|
];
|
|
6655
6645
|
return /* @__PURE__ */ n.jsxs(
|
|
@@ -6699,7 +6689,7 @@ const Fs = [
|
|
|
6699
6689
|
role: "alert",
|
|
6700
6690
|
"aria-live": "polite",
|
|
6701
6691
|
children: [
|
|
6702
|
-
A.type === "success" ? /* @__PURE__ */ n.jsx(
|
|
6692
|
+
A.type === "success" ? /* @__PURE__ */ n.jsx(ce, { size: 20, "aria-hidden": "true" }) : /* @__PURE__ */ n.jsx(le, { size: 20, "aria-hidden": "true" }),
|
|
6703
6693
|
A.message
|
|
6704
6694
|
]
|
|
6705
6695
|
}
|
|
@@ -6720,14 +6710,14 @@ const Fs = [
|
|
|
6720
6710
|
display: "grid",
|
|
6721
6711
|
gap: "24px",
|
|
6722
6712
|
gridTemplateColumns: "1fr",
|
|
6723
|
-
...
|
|
6713
|
+
...d && window.innerWidth >= 1024 && {
|
|
6724
6714
|
gridTemplateColumns: "1fr 2fr",
|
|
6725
6715
|
gap: "10px"
|
|
6726
6716
|
},
|
|
6727
|
-
...
|
|
6717
|
+
...d && window.innerWidth >= 768 && d && window.innerWidth < 1024 && {
|
|
6728
6718
|
gap: "10px"
|
|
6729
6719
|
},
|
|
6730
|
-
...
|
|
6720
|
+
...d && window.innerWidth >= 600 && d && window.innerWidth < 768 && {
|
|
6731
6721
|
gap: "28px"
|
|
6732
6722
|
}
|
|
6733
6723
|
},
|
|
@@ -6768,7 +6758,7 @@ const Fs = [
|
|
|
6768
6758
|
rel: "noopener noreferrer",
|
|
6769
6759
|
style: { position: "absolute", top: "18px", left: "18px" },
|
|
6770
6760
|
children: /* @__PURE__ */ n.jsx(
|
|
6771
|
-
|
|
6761
|
+
xs,
|
|
6772
6762
|
{
|
|
6773
6763
|
size: 20,
|
|
6774
6764
|
style: {
|
|
@@ -6790,10 +6780,10 @@ const Fs = [
|
|
|
6790
6780
|
/* @__PURE__ */ n.jsx(
|
|
6791
6781
|
"img",
|
|
6792
6782
|
{
|
|
6793
|
-
src:
|
|
6794
|
-
|
|
6783
|
+
src: y.avatarUrl || `https://api.dicebear.com/9.x/initials/svg?seed=${encodeURIComponent(
|
|
6784
|
+
y.name
|
|
6795
6785
|
)}`,
|
|
6796
|
-
alt: `Profile avatar of ${
|
|
6786
|
+
alt: `Profile avatar of ${y.name}`,
|
|
6797
6787
|
style: {
|
|
6798
6788
|
width: "128px",
|
|
6799
6789
|
height: "128px",
|
|
@@ -6844,7 +6834,7 @@ const Fs = [
|
|
|
6844
6834
|
margin: "0 0 4px 0",
|
|
6845
6835
|
color: U.textPrimary
|
|
6846
6836
|
},
|
|
6847
|
-
children:
|
|
6837
|
+
children: y.name
|
|
6848
6838
|
}
|
|
6849
6839
|
),
|
|
6850
6840
|
/* @__PURE__ */ n.jsx(
|
|
@@ -6854,16 +6844,16 @@ const Fs = [
|
|
|
6854
6844
|
color: U.textTertiary,
|
|
6855
6845
|
margin: "0 0 8px 0"
|
|
6856
6846
|
},
|
|
6857
|
-
children:
|
|
6847
|
+
children: y.email
|
|
6858
6848
|
}
|
|
6859
6849
|
),
|
|
6860
6850
|
/* @__PURE__ */ n.jsxs(
|
|
6861
6851
|
"div",
|
|
6862
6852
|
{
|
|
6863
6853
|
style: {
|
|
6864
|
-
backgroundColor:
|
|
6865
|
-
color:
|
|
6866
|
-
border: `1px solid ${
|
|
6854
|
+
backgroundColor: y.isVerified ? r ? "rgba(16, 185, 129, 0.1)" : "rgba(16, 185, 129, 0.05)" : r ? "rgba(245, 158, 11, 0.1)" : "rgba(245, 158, 11, 0.05)",
|
|
6855
|
+
color: y.isVerified ? U.success : U.warning,
|
|
6856
|
+
border: `1px solid ${y.isVerified ? r ? "rgba(16, 185, 129, 0.3)" : "rgba(16, 185, 129, 0.2)" : r ? "rgba(245, 158, 11, 0.3)" : "rgba(245, 158, 11, 0.2)"}`,
|
|
6867
6857
|
padding: "6px 12px",
|
|
6868
6858
|
borderRadius: "20px",
|
|
6869
6859
|
fontSize: "12px",
|
|
@@ -6874,8 +6864,8 @@ const Fs = [
|
|
|
6874
6864
|
marginTop: "8px"
|
|
6875
6865
|
},
|
|
6876
6866
|
children: [
|
|
6877
|
-
|
|
6878
|
-
|
|
6867
|
+
y.isVerified ? /* @__PURE__ */ n.jsx(ce, { size: 16, "aria-hidden": "true" }) : /* @__PURE__ */ n.jsx(le, { size: 16, "aria-hidden": "true" }),
|
|
6868
|
+
y.isVerified ? "Email Verified" : "Not Verified"
|
|
6879
6869
|
]
|
|
6880
6870
|
}
|
|
6881
6871
|
)
|
|
@@ -6912,7 +6902,7 @@ const Fs = [
|
|
|
6912
6902
|
gap: "8px",
|
|
6913
6903
|
textDecoration: "none",
|
|
6914
6904
|
minHeight: "36px",
|
|
6915
|
-
flex:
|
|
6905
|
+
flex: d && window.innerWidth < 1024 ? "1" : "auto"
|
|
6916
6906
|
},
|
|
6917
6907
|
children: [
|
|
6918
6908
|
/* @__PURE__ */ n.jsx(Pe, { size: 16, "aria-hidden": "true" }),
|
|
@@ -6923,7 +6913,7 @@ const Fs = [
|
|
|
6923
6913
|
/* @__PURE__ */ n.jsxs(
|
|
6924
6914
|
"button",
|
|
6925
6915
|
{
|
|
6926
|
-
onClick:
|
|
6916
|
+
onClick: fr,
|
|
6927
6917
|
disabled: R,
|
|
6928
6918
|
style: {
|
|
6929
6919
|
background: `linear-gradient(to right, ${U.accent}, ${U.accentHover})`,
|
|
@@ -6942,7 +6932,7 @@ const Fs = [
|
|
|
6942
6932
|
gap: "8px",
|
|
6943
6933
|
textDecoration: "none",
|
|
6944
6934
|
minHeight: "36px",
|
|
6945
|
-
flex:
|
|
6935
|
+
flex: d && window.innerWidth < 1024 ? "1" : "auto"
|
|
6946
6936
|
},
|
|
6947
6937
|
children: [
|
|
6948
6938
|
R ? /* @__PURE__ */ n.jsx(
|
|
@@ -6952,7 +6942,7 @@ const Fs = [
|
|
|
6952
6942
|
style: { animation: "spin 1s linear infinite" },
|
|
6953
6943
|
"aria-hidden": "true"
|
|
6954
6944
|
}
|
|
6955
|
-
) : /* @__PURE__ */ n.jsx(
|
|
6945
|
+
) : /* @__PURE__ */ n.jsx(zs, { size: 16, "aria-hidden": "true" }),
|
|
6956
6946
|
R ? "Saving..." : "Save Changes"
|
|
6957
6947
|
]
|
|
6958
6948
|
}
|
|
@@ -6978,15 +6968,15 @@ const Fs = [
|
|
|
6978
6968
|
gap: "8px",
|
|
6979
6969
|
textDecoration: "none",
|
|
6980
6970
|
minHeight: "36px",
|
|
6981
|
-
flex:
|
|
6971
|
+
flex: d && window.innerWidth < 1024 ? "1" : "auto"
|
|
6982
6972
|
},
|
|
6983
6973
|
children: [
|
|
6984
|
-
/* @__PURE__ */ n.jsx(
|
|
6974
|
+
/* @__PURE__ */ n.jsx(Is, { size: 16, "aria-hidden": "true" }),
|
|
6985
6975
|
"Edit Profile"
|
|
6986
6976
|
]
|
|
6987
6977
|
}
|
|
6988
6978
|
),
|
|
6989
|
-
!
|
|
6979
|
+
!y.isVerified && /* @__PURE__ */ n.jsxs(
|
|
6990
6980
|
"button",
|
|
6991
6981
|
{
|
|
6992
6982
|
onClick: () => F(!0),
|
|
@@ -7008,7 +6998,7 @@ const Fs = [
|
|
|
7008
6998
|
gap: "8px",
|
|
7009
6999
|
minHeight: "36px",
|
|
7010
7000
|
opacity: K ? 0.7 : 1,
|
|
7011
|
-
flex:
|
|
7001
|
+
flex: d && window.innerWidth < 1024 ? "1" : "auto"
|
|
7012
7002
|
},
|
|
7013
7003
|
children: [
|
|
7014
7004
|
K ? /* @__PURE__ */ n.jsx(
|
|
@@ -7048,7 +7038,7 @@ const Fs = [
|
|
|
7048
7038
|
},
|
|
7049
7039
|
onClick: () => Z(!V),
|
|
7050
7040
|
children: [
|
|
7051
|
-
/* @__PURE__ */ n.jsx(
|
|
7041
|
+
/* @__PURE__ */ n.jsx(ds, { size: 16, "aria-hidden": "true" }),
|
|
7052
7042
|
"More Actions"
|
|
7053
7043
|
]
|
|
7054
7044
|
}
|
|
@@ -7096,7 +7086,7 @@ const Fs = [
|
|
|
7096
7086
|
onMouseEnter: (E) => E.currentTarget.style.backgroundColor = U.surfaceLight,
|
|
7097
7087
|
onMouseLeave: (E) => E.currentTarget.style.backgroundColor = "transparent",
|
|
7098
7088
|
children: [
|
|
7099
|
-
/* @__PURE__ */ n.jsx(
|
|
7089
|
+
/* @__PURE__ */ n.jsx(ct, { size: 14, "aria-hidden": "true" }),
|
|
7100
7090
|
"Change Password"
|
|
7101
7091
|
]
|
|
7102
7092
|
}
|
|
@@ -7127,7 +7117,7 @@ const Fs = [
|
|
|
7127
7117
|
},
|
|
7128
7118
|
onMouseLeave: (E) => E.currentTarget.style.backgroundColor = "transparent",
|
|
7129
7119
|
children: [
|
|
7130
|
-
/* @__PURE__ */ n.jsx(
|
|
7120
|
+
/* @__PURE__ */ n.jsx(dt, { size: 14, "aria-hidden": "true" }),
|
|
7131
7121
|
"Logout"
|
|
7132
7122
|
]
|
|
7133
7123
|
}
|
|
@@ -7218,12 +7208,12 @@ const Fs = [
|
|
|
7218
7208
|
display: "grid",
|
|
7219
7209
|
gap: "20px",
|
|
7220
7210
|
gridTemplateColumns: "1fr",
|
|
7221
|
-
...
|
|
7211
|
+
...d && window.innerWidth >= 600 && {
|
|
7222
7212
|
gridTemplateColumns: "1fr 1fr",
|
|
7223
7213
|
gap: "20px"
|
|
7224
7214
|
}
|
|
7225
7215
|
},
|
|
7226
|
-
children:
|
|
7216
|
+
children: xr.map((E) => {
|
|
7227
7217
|
const H = E.icon;
|
|
7228
7218
|
return /* @__PURE__ */ n.jsxs(
|
|
7229
7219
|
"div",
|
|
@@ -7256,14 +7246,14 @@ const Fs = [
|
|
|
7256
7246
|
{
|
|
7257
7247
|
type: E.type,
|
|
7258
7248
|
name: E.name,
|
|
7259
|
-
value:
|
|
7249
|
+
value: y[E.name],
|
|
7260
7250
|
onChange: (X) => w(
|
|
7261
7251
|
(pe) => pe && { ...pe, [X.target.name]: X.target.value }
|
|
7262
7252
|
),
|
|
7263
7253
|
style: {
|
|
7264
7254
|
padding: "12px",
|
|
7265
7255
|
borderRadius: "8px",
|
|
7266
|
-
border: `1px solid ${
|
|
7256
|
+
border: `1px solid ${i}`,
|
|
7267
7257
|
backgroundColor: "transparent",
|
|
7268
7258
|
color: U.textPrimary,
|
|
7269
7259
|
fontSize: "12px",
|
|
@@ -7327,7 +7317,7 @@ const Fs = [
|
|
|
7327
7317
|
gap: "8px"
|
|
7328
7318
|
},
|
|
7329
7319
|
children: [
|
|
7330
|
-
/* @__PURE__ */ n.jsx(
|
|
7320
|
+
/* @__PURE__ */ n.jsx(dr, { size: 20, "aria-hidden": "true" }),
|
|
7331
7321
|
"Security Status"
|
|
7332
7322
|
]
|
|
7333
7323
|
}
|
|
@@ -7361,7 +7351,7 @@ const Fs = [
|
|
|
7361
7351
|
color: U.textSecondary
|
|
7362
7352
|
},
|
|
7363
7353
|
children: [
|
|
7364
|
-
/* @__PURE__ */ n.jsx(
|
|
7354
|
+
/* @__PURE__ */ n.jsx(de, { size: 16, "aria-hidden": "true" }),
|
|
7365
7355
|
/* @__PURE__ */ n.jsx("span", { children: "Email Verification" })
|
|
7366
7356
|
]
|
|
7367
7357
|
}
|
|
@@ -7377,7 +7367,7 @@ const Fs = [
|
|
|
7377
7367
|
display: "flex",
|
|
7378
7368
|
alignItems: "center",
|
|
7379
7369
|
gap: "6px",
|
|
7380
|
-
...
|
|
7370
|
+
...y.isVerified ? {
|
|
7381
7371
|
backgroundColor: r ? "rgba(16, 185, 129, 0.1)" : "rgba(16, 185, 129, 0.05)",
|
|
7382
7372
|
color: U.success,
|
|
7383
7373
|
border: `1px solid ${r ? "rgba(16, 185, 129, 0.3)" : "rgba(16, 185, 129, 0.2)"}`
|
|
@@ -7387,8 +7377,8 @@ const Fs = [
|
|
|
7387
7377
|
border: `1px solid ${r ? "rgba(245, 158, 11, 0.3)" : "rgba(245, 158, 11, 0.2)"}`
|
|
7388
7378
|
}
|
|
7389
7379
|
},
|
|
7390
|
-
children:
|
|
7391
|
-
/* @__PURE__ */ n.jsx(
|
|
7380
|
+
children: y.isVerified ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
7381
|
+
/* @__PURE__ */ n.jsx(ce, { size: 16, "aria-hidden": "true" }),
|
|
7392
7382
|
"Verified"
|
|
7393
7383
|
] }) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
7394
7384
|
/* @__PURE__ */ n.jsx(le, { size: 16, "aria-hidden": "true" }),
|
|
@@ -7399,7 +7389,7 @@ const Fs = [
|
|
|
7399
7389
|
]
|
|
7400
7390
|
}
|
|
7401
7391
|
),
|
|
7402
|
-
!
|
|
7392
|
+
!y.isVerified && /* @__PURE__ */ n.jsx(
|
|
7403
7393
|
"div",
|
|
7404
7394
|
{
|
|
7405
7395
|
style: {
|
|
@@ -7435,7 +7425,7 @@ const Fs = [
|
|
|
7435
7425
|
}
|
|
7436
7426
|
),
|
|
7437
7427
|
/* @__PURE__ */ n.jsx(
|
|
7438
|
-
|
|
7428
|
+
Vs,
|
|
7439
7429
|
{
|
|
7440
7430
|
isOpen: C,
|
|
7441
7431
|
onClose: () => {
|
|
@@ -7446,12 +7436,12 @@ const Fs = [
|
|
|
7446
7436
|
}
|
|
7447
7437
|
),
|
|
7448
7438
|
/* @__PURE__ */ n.jsx(
|
|
7449
|
-
|
|
7439
|
+
Ys,
|
|
7450
7440
|
{
|
|
7451
7441
|
baseUrl: l,
|
|
7452
7442
|
apiKey: h,
|
|
7453
|
-
appId:
|
|
7454
|
-
userId:
|
|
7443
|
+
appId: c,
|
|
7444
|
+
userId: y.id,
|
|
7455
7445
|
isOpen: g,
|
|
7456
7446
|
onClose: () => I(!1),
|
|
7457
7447
|
onSuccess: (E) => N("success", E),
|
|
@@ -7460,12 +7450,12 @@ const Fs = [
|
|
|
7460
7450
|
}
|
|
7461
7451
|
),
|
|
7462
7452
|
/* @__PURE__ */ n.jsx(
|
|
7463
|
-
|
|
7453
|
+
Hs,
|
|
7464
7454
|
{
|
|
7465
7455
|
baseUrl: l,
|
|
7466
7456
|
apiKey: h,
|
|
7467
|
-
appId:
|
|
7468
|
-
userId:
|
|
7457
|
+
appId: c,
|
|
7458
|
+
userId: y.id,
|
|
7469
7459
|
token: t,
|
|
7470
7460
|
isOpen: v,
|
|
7471
7461
|
onClose: () => D(!1),
|
|
@@ -7475,11 +7465,11 @@ const Fs = [
|
|
|
7475
7465
|
}
|
|
7476
7466
|
),
|
|
7477
7467
|
/* @__PURE__ */ n.jsx(
|
|
7478
|
-
|
|
7468
|
+
Ks,
|
|
7479
7469
|
{
|
|
7480
7470
|
isOpen: W,
|
|
7481
7471
|
onClose: () => {
|
|
7482
|
-
F(!1), x(!1), f({ email:
|
|
7472
|
+
F(!1), x(!1), f({ email: y?.email || "", otp: "", appId: c });
|
|
7483
7473
|
},
|
|
7484
7474
|
onVerify: ue,
|
|
7485
7475
|
onSendOTP: se,
|
|
@@ -7487,7 +7477,7 @@ const Fs = [
|
|
|
7487
7477
|
setVerifyFormData: f,
|
|
7488
7478
|
otpSent: S,
|
|
7489
7479
|
verifying: k,
|
|
7490
|
-
user:
|
|
7480
|
+
user: y,
|
|
7491
7481
|
colors: U,
|
|
7492
7482
|
darkMode: r
|
|
7493
7483
|
}
|
|
@@ -7584,23 +7574,23 @@ const Fs = [
|
|
|
7584
7574
|
]
|
|
7585
7575
|
}
|
|
7586
7576
|
);
|
|
7587
|
-
},
|
|
7577
|
+
}, va = ({
|
|
7588
7578
|
darkMode: t = !0,
|
|
7589
7579
|
primaryColor: e = "#3b82f6",
|
|
7590
7580
|
onLogout: r,
|
|
7591
7581
|
varient: s = "classic",
|
|
7592
7582
|
propUser: a,
|
|
7593
|
-
className:
|
|
7583
|
+
className: o = "",
|
|
7594
7584
|
// New URL props with defaults
|
|
7595
|
-
profileUrl:
|
|
7585
|
+
profileUrl: i,
|
|
7596
7586
|
settingsUrl: l,
|
|
7597
7587
|
// Menu item visibility with defaults
|
|
7598
7588
|
showProfileMenuItem: h = !0,
|
|
7599
|
-
showSettingsMenuItem:
|
|
7600
|
-
showViewProfileMenuItem:
|
|
7589
|
+
showSettingsMenuItem: c = !0,
|
|
7590
|
+
showViewProfileMenuItem: d = !0,
|
|
7601
7591
|
// Custom labels with defaults
|
|
7602
|
-
profileLabel:
|
|
7603
|
-
settingsLabel:
|
|
7592
|
+
profileLabel: b = "My Profile",
|
|
7593
|
+
settingsLabel: y = "Settings",
|
|
7604
7594
|
viewProfileLabel: w = "View Profile",
|
|
7605
7595
|
logoutLabel: u = "Sign Out"
|
|
7606
7596
|
}) => {
|
|
@@ -7891,7 +7881,7 @@ const Fs = [
|
|
|
7891
7881
|
}
|
|
7892
7882
|
}, Q = (x, k) => {
|
|
7893
7883
|
(x.key === "Enter" || x.key === " ") && (x.preventDefault(), k());
|
|
7894
|
-
}, G = () =>
|
|
7884
|
+
}, G = () => i || C?.profileUrl, f = () => {
|
|
7895
7885
|
const x = G();
|
|
7896
7886
|
x && window.open(x, "_self", "noopener,noreferrer");
|
|
7897
7887
|
}, S = () => {
|
|
@@ -7902,7 +7892,7 @@ const Fs = [
|
|
|
7902
7892
|
{
|
|
7903
7893
|
style: O.wrapper,
|
|
7904
7894
|
ref: W,
|
|
7905
|
-
className:
|
|
7895
|
+
className: o,
|
|
7906
7896
|
role: "menu",
|
|
7907
7897
|
"aria-label": "User menu",
|
|
7908
7898
|
children: [
|
|
@@ -8005,7 +7995,7 @@ const Fs = [
|
|
|
8005
7995
|
C?.email && /* @__PURE__ */ n.jsx("div", { style: O.userEmail, title: C.email, children: C.email })
|
|
8006
7996
|
] }),
|
|
8007
7997
|
/* @__PURE__ */ n.jsx(
|
|
8008
|
-
|
|
7998
|
+
ns,
|
|
8009
7999
|
{
|
|
8010
8000
|
size: T ? 14 : 16,
|
|
8011
8001
|
style: O.chevron,
|
|
@@ -8060,11 +8050,11 @@ const Fs = [
|
|
|
8060
8050
|
tabIndex: 0,
|
|
8061
8051
|
children: [
|
|
8062
8052
|
/* @__PURE__ */ n.jsx(be, { style: O.icon, "aria-hidden": "true" }),
|
|
8063
|
-
/* @__PURE__ */ n.jsx("span", { style: O.menuItemText, children:
|
|
8053
|
+
/* @__PURE__ */ n.jsx("span", { style: O.menuItemText, children: b })
|
|
8064
8054
|
]
|
|
8065
8055
|
}
|
|
8066
8056
|
),
|
|
8067
|
-
|
|
8057
|
+
c && l && /* @__PURE__ */ n.jsxs(
|
|
8068
8058
|
"button",
|
|
8069
8059
|
{
|
|
8070
8060
|
style: O.menuItem,
|
|
@@ -8079,12 +8069,12 @@ const Fs = [
|
|
|
8079
8069
|
role: "menuitem",
|
|
8080
8070
|
tabIndex: 0,
|
|
8081
8071
|
children: [
|
|
8082
|
-
/* @__PURE__ */ n.jsx(
|
|
8083
|
-
/* @__PURE__ */ n.jsx("span", { style: O.menuItemText, children:
|
|
8072
|
+
/* @__PURE__ */ n.jsx(Ns, { style: O.icon, "aria-hidden": "true" }),
|
|
8073
|
+
/* @__PURE__ */ n.jsx("span", { style: O.menuItemText, children: y })
|
|
8084
8074
|
]
|
|
8085
8075
|
}
|
|
8086
8076
|
),
|
|
8087
|
-
|
|
8077
|
+
d && C.profileUrl && /* @__PURE__ */ n.jsxs(
|
|
8088
8078
|
"a",
|
|
8089
8079
|
{
|
|
8090
8080
|
href: C.profileUrl,
|
|
@@ -8100,7 +8090,7 @@ const Fs = [
|
|
|
8100
8090
|
role: "menuitem",
|
|
8101
8091
|
tabIndex: 0,
|
|
8102
8092
|
children: [
|
|
8103
|
-
/* @__PURE__ */ n.jsx(
|
|
8093
|
+
/* @__PURE__ */ n.jsx(de, { style: O.icon, "aria-hidden": "true" }),
|
|
8104
8094
|
/* @__PURE__ */ n.jsx("span", { style: O.menuItemText, children: w })
|
|
8105
8095
|
]
|
|
8106
8096
|
}
|
|
@@ -8122,7 +8112,7 @@ const Fs = [
|
|
|
8122
8112
|
tabIndex: 0,
|
|
8123
8113
|
children: [
|
|
8124
8114
|
/* @__PURE__ */ n.jsx(
|
|
8125
|
-
|
|
8115
|
+
dt,
|
|
8126
8116
|
{
|
|
8127
8117
|
style: { ...O.icon, color: A.error },
|
|
8128
8118
|
"aria-hidden": "true"
|
|
@@ -8161,17 +8151,17 @@ const Fs = [
|
|
|
8161
8151
|
]
|
|
8162
8152
|
}
|
|
8163
8153
|
);
|
|
8164
|
-
},
|
|
8154
|
+
}, Sa = ({
|
|
8165
8155
|
user: t,
|
|
8166
8156
|
darkMode: e = !0,
|
|
8167
8157
|
primaryColor: r = "#00C212",
|
|
8168
8158
|
onVerify: s
|
|
8169
8159
|
}) => {
|
|
8170
|
-
const { appId: a, baseUrl:
|
|
8160
|
+
const { appId: a, baseUrl: o, apiKey: i } = ge(), [l, h] = P({
|
|
8171
8161
|
email: t?.email || "",
|
|
8172
8162
|
otp: "",
|
|
8173
8163
|
appId: a
|
|
8174
|
-
}), [
|
|
8164
|
+
}), [c, d] = P(!1), [b, y] = P(!1), [w, u] = P(null), j = (g, I) => {
|
|
8175
8165
|
let v = parseInt(g.replace("#", ""), 16), D = (v >> 16) + I, W = (v >> 8 & 255) + I, F = (v & 255) + I;
|
|
8176
8166
|
return D = Math.min(255, Math.max(0, D)), W = Math.min(255, Math.max(0, W)), F = Math.min(255, Math.max(0, F)), `#${(F | W << 8 | D << 16).toString(16).padStart(6, "0")}`;
|
|
8177
8167
|
}, m = e ? {
|
|
@@ -8208,17 +8198,17 @@ const Fs = [
|
|
|
8208
8198
|
return;
|
|
8209
8199
|
}
|
|
8210
8200
|
try {
|
|
8211
|
-
|
|
8201
|
+
y(!0);
|
|
8212
8202
|
const g = await M.post(
|
|
8213
|
-
`${
|
|
8203
|
+
`${o}/users/send-verify-otp/${t?.id}`,
|
|
8214
8204
|
{ email: l.email },
|
|
8215
|
-
{ headers: { "x-api-key":
|
|
8205
|
+
{ headers: { "x-api-key": i, "x-app-id": a } }
|
|
8216
8206
|
);
|
|
8217
|
-
g.data.success ? ($("success", g.data.message || "OTP sent!"),
|
|
8207
|
+
g.data.success ? ($("success", g.data.message || "OTP sent!"), d(!0)) : $("error", g.data.message || "Failed to send OTP");
|
|
8218
8208
|
} catch (g) {
|
|
8219
8209
|
$("error", g.response?.data?.message || "Server error");
|
|
8220
8210
|
} finally {
|
|
8221
|
-
|
|
8211
|
+
y(!1);
|
|
8222
8212
|
}
|
|
8223
8213
|
}, z = async (g) => {
|
|
8224
8214
|
if (g.preventDefault(), !l.email || !l.otp) {
|
|
@@ -8226,17 +8216,17 @@ const Fs = [
|
|
|
8226
8216
|
return;
|
|
8227
8217
|
}
|
|
8228
8218
|
try {
|
|
8229
|
-
|
|
8230
|
-
const I = await M.post(`${
|
|
8219
|
+
y(!0);
|
|
8220
|
+
const I = await M.post(`${o}/users/verify-email`, l);
|
|
8231
8221
|
if (I.data.success && t) {
|
|
8232
8222
|
const v = { ...t, isVerified: !0 };
|
|
8233
|
-
s?.(v), $("success", I.data.message || "Email verified!"),
|
|
8223
|
+
s?.(v), $("success", I.data.message || "Email verified!"), d(!1), h({ email: t.email, otp: "", appId: a });
|
|
8234
8224
|
} else
|
|
8235
8225
|
$("error", I.data.message || "Verification failed");
|
|
8236
8226
|
} catch (I) {
|
|
8237
8227
|
$("error", I.response?.data?.message || "Server error");
|
|
8238
8228
|
} finally {
|
|
8239
|
-
|
|
8229
|
+
y(!1);
|
|
8240
8230
|
}
|
|
8241
8231
|
}, C = {
|
|
8242
8232
|
width: "100%",
|
|
@@ -8295,7 +8285,7 @@ const Fs = [
|
|
|
8295
8285
|
gap: 8
|
|
8296
8286
|
},
|
|
8297
8287
|
children: [
|
|
8298
|
-
w.type === "success" ? /* @__PURE__ */ n.jsx(
|
|
8288
|
+
w.type === "success" ? /* @__PURE__ */ n.jsx(ce, { size: 16 }) : /* @__PURE__ */ n.jsx(le, { size: 16 }),
|
|
8299
8289
|
w.message
|
|
8300
8290
|
]
|
|
8301
8291
|
}
|
|
@@ -8304,7 +8294,7 @@ const Fs = [
|
|
|
8304
8294
|
/* @__PURE__ */ n.jsx("label", { style: { color: m.textSecondary }, children: "Email" }),
|
|
8305
8295
|
/* @__PURE__ */ n.jsxs("div", { style: { position: "relative" }, children: [
|
|
8306
8296
|
/* @__PURE__ */ n.jsx(
|
|
8307
|
-
|
|
8297
|
+
de,
|
|
8308
8298
|
{
|
|
8309
8299
|
size: 18,
|
|
8310
8300
|
style: {
|
|
@@ -8330,11 +8320,11 @@ const Fs = [
|
|
|
8330
8320
|
)
|
|
8331
8321
|
] })
|
|
8332
8322
|
] }),
|
|
8333
|
-
|
|
8323
|
+
c && /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
|
|
8334
8324
|
/* @__PURE__ */ n.jsx("label", { style: { color: m.textSecondary }, children: "OTP" }),
|
|
8335
8325
|
/* @__PURE__ */ n.jsxs("div", { style: { position: "relative" }, children: [
|
|
8336
8326
|
/* @__PURE__ */ n.jsx(
|
|
8337
|
-
|
|
8327
|
+
ct,
|
|
8338
8328
|
{
|
|
8339
8329
|
size: 18,
|
|
8340
8330
|
style: {
|
|
@@ -8360,39 +8350,36 @@ const Fs = [
|
|
|
8360
8350
|
)
|
|
8361
8351
|
] })
|
|
8362
8352
|
] }),
|
|
8363
|
-
/* @__PURE__ */ n.jsx("div", { style: { display: "flex", gap: 12 }, children:
|
|
8364
|
-
|
|
8365
|
-
|
|
8353
|
+
/* @__PURE__ */ n.jsx("div", { style: { display: "flex", gap: 12 }, children: c ? /* @__PURE__ */ n.jsxs("button", { type: "submit", disabled: b, style: q(b), children: [
|
|
8354
|
+
b ? /* @__PURE__ */ n.jsx(ae, { size: 16, className: "spinner" }) : /* @__PURE__ */ n.jsx(ce, { size: 16 }),
|
|
8355
|
+
b ? "Verifying..." : "Verify Email"
|
|
8366
8356
|
] }) : /* @__PURE__ */ n.jsxs(
|
|
8367
8357
|
"button",
|
|
8368
8358
|
{
|
|
8369
8359
|
type: "button",
|
|
8370
8360
|
onClick: R,
|
|
8371
|
-
disabled:
|
|
8372
|
-
style: q(
|
|
8361
|
+
disabled: b,
|
|
8362
|
+
style: q(b),
|
|
8373
8363
|
children: [
|
|
8374
|
-
|
|
8375
|
-
|
|
8364
|
+
b ? /* @__PURE__ */ n.jsx(ae, { size: 16, className: "spinner" }) : /* @__PURE__ */ n.jsx(ut, { size: 16 }),
|
|
8365
|
+
b ? "Sending..." : "Send OTP"
|
|
8376
8366
|
]
|
|
8377
8367
|
}
|
|
8378
8368
|
) })
|
|
8379
8369
|
]
|
|
8380
8370
|
}
|
|
8381
8371
|
);
|
|
8382
|
-
}
|
|
8383
|
-
authix: t,
|
|
8384
|
-
children: e
|
|
8385
|
-
}) => /* @__PURE__ */ n.jsx(Vs.Provider, { value: t, children: e });
|
|
8372
|
+
};
|
|
8386
8373
|
export {
|
|
8387
|
-
|
|
8388
|
-
|
|
8389
|
-
|
|
8390
|
-
|
|
8391
|
-
|
|
8392
|
-
|
|
8393
|
-
|
|
8394
|
-
|
|
8395
|
-
|
|
8374
|
+
ya as AuthixProvider,
|
|
8375
|
+
xa as NeuctraAuthix,
|
|
8376
|
+
Sa as ReactEmailVerification,
|
|
8377
|
+
ba as ReactSignedIn,
|
|
8378
|
+
wa as ReactSignedOut,
|
|
8379
|
+
va as ReactUserButton,
|
|
8380
|
+
ma as ReactUserLogin,
|
|
8381
|
+
ja as ReactUserProfile,
|
|
8382
|
+
ga as ReactUserSignUp,
|
|
8396
8383
|
ge as getSdkConfig,
|
|
8397
|
-
|
|
8384
|
+
ha as setSdkConfig
|
|
8398
8385
|
};
|