@neuctra/authix 1.1.41 → 1.1.43
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 +133 -131
- package/dist/neuctra-authix.umd.js +1 -1
- package/dist/sdk/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -33,7 +33,7 @@ const hr = Me("string"), re = Me("function"), Ft = Me("number"), Te = (t) => 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
|
+
}, kr = oe("URLSearchParams"), [Er, Cr, Tr, Ir] = ["ReadableStream", "Request", "Response", "Headers"].map(oe), Rr = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
37
37
|
function Ie(t, e, { allOwnKeys: r = !1 } = {}) {
|
|
38
38
|
if (t === null || typeof t > "u")
|
|
39
39
|
return;
|
|
@@ -189,7 +189,7 @@ const Yr = (t) => {
|
|
|
189
189
|
isObject: Te,
|
|
190
190
|
isPlainObject: ze,
|
|
191
191
|
isEmptyObject: mr,
|
|
192
|
-
isReadableStream:
|
|
192
|
+
isReadableStream: Er,
|
|
193
193
|
isRequest: Cr,
|
|
194
194
|
isResponse: Tr,
|
|
195
195
|
isHeaders: Ir,
|
|
@@ -200,7 +200,7 @@ const Yr = (t) => {
|
|
|
200
200
|
isRegExp: qr,
|
|
201
201
|
isFunction: re,
|
|
202
202
|
isStream: vr,
|
|
203
|
-
isURLSearchParams:
|
|
203
|
+
isURLSearchParams: kr,
|
|
204
204
|
isTypedArray: Nr,
|
|
205
205
|
isFileList: jr,
|
|
206
206
|
forEach: Ie,
|
|
@@ -894,10 +894,10 @@ 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)), kn = 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, En = ee.hasStandardBrowserEnv ? (
|
|
901
901
|
// Standard browser envs support document.cookie
|
|
902
902
|
{
|
|
903
903
|
write(t, e, r, s, a, i) {
|
|
@@ -1015,8 +1015,8 @@ const tr = (t) => {
|
|
|
1015
1015
|
});
|
|
1016
1016
|
}
|
|
1017
1017
|
}
|
|
1018
|
-
if (ee.hasStandardBrowserEnv && (s && p.isFunction(s) && (s = s(e)), s || s !== !1 &&
|
|
1019
|
-
const h = a && i &&
|
|
1018
|
+
if (ee.hasStandardBrowserEnv && (s && p.isFunction(s) && (s = s(e)), s || s !== !1 && kn(e.url))) {
|
|
1019
|
+
const h = a && i && En.read(i);
|
|
1020
1020
|
h && o.set(a, h);
|
|
1021
1021
|
}
|
|
1022
1022
|
return e;
|
|
@@ -1158,11 +1158,11 @@ const tr = (t) => {
|
|
|
1158
1158
|
}, {
|
|
1159
1159
|
highWaterMark: 2
|
|
1160
1160
|
});
|
|
1161
|
-
},
|
|
1161
|
+
}, kt = 64 * 1024, { isFunction: Oe } = p, $n = (({ Request: t, Response: e }) => ({
|
|
1162
1162
|
Request: t,
|
|
1163
1163
|
Response: e
|
|
1164
1164
|
}))(p.global), {
|
|
1165
|
-
ReadableStream:
|
|
1165
|
+
ReadableStream: Et,
|
|
1166
1166
|
TextEncoder: Ct
|
|
1167
1167
|
} = p.global, Tt = (t, ...e) => {
|
|
1168
1168
|
try {
|
|
@@ -1177,10 +1177,10 @@ const tr = (t) => {
|
|
|
1177
1177
|
const { fetch: e, Request: r, Response: s } = t, a = e ? Oe(e) : typeof fetch == "function", i = Oe(r), o = Oe(s);
|
|
1178
1178
|
if (!a)
|
|
1179
1179
|
return !1;
|
|
1180
|
-
const l = a && Oe(
|
|
1180
|
+
const l = a && Oe(Et), h = a && (typeof Ct == "function" ? /* @__PURE__ */ ((c) => (j) => c.encode(j))(new Ct()) : async (c) => new Uint8Array(await new r(c).arrayBuffer())), d = i && l && Tt(() => {
|
|
1181
1181
|
let c = !1;
|
|
1182
1182
|
const j = new r(ee.origin, {
|
|
1183
|
-
body: new
|
|
1183
|
+
body: new Et(),
|
|
1184
1184
|
method: "POST",
|
|
1185
1185
|
get duplex() {
|
|
1186
1186
|
return c = !0, "half";
|
|
@@ -1245,11 +1245,11 @@ const tr = (t) => {
|
|
|
1245
1245
|
duplex: "half"
|
|
1246
1246
|
}), S;
|
|
1247
1247
|
if (p.isFormData($) && (S = f.headers.get("content-type")) && v.setContentType(S), f.body) {
|
|
1248
|
-
const [x,
|
|
1248
|
+
const [x, k] = wt(
|
|
1249
1249
|
J,
|
|
1250
1250
|
Ue(jt(g))
|
|
1251
1251
|
);
|
|
1252
|
-
$ = St(f.body,
|
|
1252
|
+
$ = St(f.body, kt, x, k);
|
|
1253
1253
|
}
|
|
1254
1254
|
}
|
|
1255
1255
|
p.isString(D) || (D = D ? "include" : "omit");
|
|
@@ -1270,13 +1270,13 @@ const tr = (t) => {
|
|
|
1270
1270
|
["status", "statusText", "headers"].forEach((_) => {
|
|
1271
1271
|
f[_] = K[_];
|
|
1272
1272
|
});
|
|
1273
|
-
const S = p.toFiniteNumber(K.headers.get("content-length")), [x,
|
|
1273
|
+
const S = p.toFiniteNumber(K.headers.get("content-length")), [x, k] = q && wt(
|
|
1274
1274
|
S,
|
|
1275
1275
|
Ue(jt(q), !0)
|
|
1276
1276
|
) || [];
|
|
1277
1277
|
K = new s(
|
|
1278
|
-
St(K.body,
|
|
1279
|
-
|
|
1278
|
+
St(K.body, kt, x, () => {
|
|
1279
|
+
k && k(), T && T();
|
|
1280
1280
|
}),
|
|
1281
1281
|
f
|
|
1282
1282
|
);
|
|
@@ -2126,9 +2126,11 @@ class ca {
|
|
|
2126
2126
|
throw new Error("searchAppDataByKeys: params object is required");
|
|
2127
2127
|
return (await this.request(
|
|
2128
2128
|
"POST",
|
|
2129
|
-
|
|
2129
|
+
// ✅ FIX: POST (body-based search)
|
|
2130
|
+
`/app/${encodeURIComponent(r)}/data/search/bykeys`,
|
|
2131
|
+
// ✅ FIX: correct route
|
|
2130
2132
|
e
|
|
2131
|
-
// ✅ BODY
|
|
2133
|
+
// ✅ BODY
|
|
2132
2134
|
))?.data || [];
|
|
2133
2135
|
}
|
|
2134
2136
|
/**
|
|
@@ -2178,7 +2180,7 @@ class ca {
|
|
|
2178
2180
|
))?.data;
|
|
2179
2181
|
}
|
|
2180
2182
|
}
|
|
2181
|
-
var Ae = { exports: {} },
|
|
2183
|
+
var Ae = { exports: {} }, ke = {};
|
|
2182
2184
|
/**
|
|
2183
2185
|
* @license React
|
|
2184
2186
|
* react-jsx-runtime.production.js
|
|
@@ -2190,7 +2192,7 @@ var Ae = { exports: {} }, Ee = {};
|
|
|
2190
2192
|
*/
|
|
2191
2193
|
var Ot;
|
|
2192
2194
|
function Mn() {
|
|
2193
|
-
if (Ot) return
|
|
2195
|
+
if (Ot) return ke;
|
|
2194
2196
|
Ot = 1;
|
|
2195
2197
|
var t = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
|
|
2196
2198
|
function r(s, a, i) {
|
|
@@ -2208,9 +2210,9 @@ function Mn() {
|
|
|
2208
2210
|
props: i
|
|
2209
2211
|
};
|
|
2210
2212
|
}
|
|
2211
|
-
return
|
|
2213
|
+
return ke.Fragment = e, ke.jsx = r, ke.jsxs = r, ke;
|
|
2212
2214
|
}
|
|
2213
|
-
var
|
|
2215
|
+
var Ee = {};
|
|
2214
2216
|
/**
|
|
2215
2217
|
* @license React
|
|
2216
2218
|
* react-jsx-runtime.development.js
|
|
@@ -2278,11 +2280,11 @@ function Bn() {
|
|
|
2278
2280
|
}
|
|
2279
2281
|
if (S) {
|
|
2280
2282
|
S = console;
|
|
2281
|
-
var x = S.error,
|
|
2283
|
+
var x = S.error, k = typeof Symbol == "function" && Symbol.toStringTag && f[Symbol.toStringTag] || f.constructor.name || "Object";
|
|
2282
2284
|
return x.call(
|
|
2283
2285
|
S,
|
|
2284
2286
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
2285
|
-
|
|
2287
|
+
k
|
|
2286
2288
|
), e(f);
|
|
2287
2289
|
}
|
|
2288
2290
|
}
|
|
@@ -2329,14 +2331,14 @@ function Bn() {
|
|
|
2329
2331
|
"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."
|
|
2330
2332
|
)), f = this.props.ref, f !== void 0 ? f : null;
|
|
2331
2333
|
}
|
|
2332
|
-
function d(f, S, x,
|
|
2334
|
+
function d(f, S, x, k, _, N) {
|
|
2333
2335
|
var Y = x.ref;
|
|
2334
2336
|
return f = {
|
|
2335
2337
|
$$typeof: c,
|
|
2336
2338
|
type: f,
|
|
2337
2339
|
key: S,
|
|
2338
2340
|
props: x,
|
|
2339
|
-
_owner:
|
|
2341
|
+
_owner: k
|
|
2340
2342
|
}, (Y !== void 0 ? Y : null) !== null ? Object.defineProperty(f, "ref", {
|
|
2341
2343
|
enumerable: !1,
|
|
2342
2344
|
get: h
|
|
@@ -2362,13 +2364,13 @@ function Bn() {
|
|
|
2362
2364
|
value: N
|
|
2363
2365
|
}), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
|
|
2364
2366
|
}
|
|
2365
|
-
function u(f, S, x,
|
|
2367
|
+
function u(f, S, x, k, _, N) {
|
|
2366
2368
|
var Y = S.children;
|
|
2367
2369
|
if (Y !== void 0)
|
|
2368
|
-
if (
|
|
2370
|
+
if (k)
|
|
2369
2371
|
if (T(Y)) {
|
|
2370
|
-
for (
|
|
2371
|
-
b(Y[
|
|
2372
|
+
for (k = 0; k < Y.length; k++)
|
|
2373
|
+
b(Y[k]);
|
|
2372
2374
|
Object.freeze && Object.freeze(Y);
|
|
2373
2375
|
} else
|
|
2374
2376
|
console.error(
|
|
@@ -2380,18 +2382,18 @@ function Bn() {
|
|
|
2380
2382
|
var se = Object.keys(S).filter(function(ve) {
|
|
2381
2383
|
return ve !== "key";
|
|
2382
2384
|
});
|
|
2383
|
-
|
|
2385
|
+
k = 0 < se.length ? "{key: someKey, " + se.join(": ..., ") + ": ...}" : "{key: someKey}", G[Y + k] || (se = 0 < se.length ? "{" + se.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
2384
2386
|
`A props object containing a "key" prop is being spread into JSX:
|
|
2385
2387
|
let props = %s;
|
|
2386
2388
|
<%s {...props} />
|
|
2387
2389
|
React keys must be passed directly to JSX without using spread:
|
|
2388
2390
|
let props = %s;
|
|
2389
2391
|
<%s key={someKey} {...props} />`,
|
|
2390
|
-
|
|
2392
|
+
k,
|
|
2391
2393
|
Y,
|
|
2392
2394
|
se,
|
|
2393
2395
|
Y
|
|
2394
|
-
), G[Y +
|
|
2396
|
+
), G[Y + k] = !0);
|
|
2395
2397
|
}
|
|
2396
2398
|
if (Y = null, x !== void 0 && (r(x), Y = "" + x), o(S) && (r(S.key), Y = "" + S.key), "key" in S) {
|
|
2397
2399
|
x = {};
|
|
@@ -2428,28 +2430,28 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2428
2430
|
w,
|
|
2429
2431
|
i
|
|
2430
2432
|
)(), Q = J(s(i)), G = {};
|
|
2431
|
-
|
|
2432
|
-
var
|
|
2433
|
+
Ee.Fragment = m, Ee.jsx = function(f, S, x) {
|
|
2434
|
+
var k = 1e4 > V.recentlyCreatedOwnerStacks++;
|
|
2433
2435
|
return u(
|
|
2434
2436
|
f,
|
|
2435
2437
|
S,
|
|
2436
2438
|
x,
|
|
2437
2439
|
!1,
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
+
k ? Error("react-stack-top-frame") : K,
|
|
2441
|
+
k ? J(s(f)) : Q
|
|
2440
2442
|
);
|
|
2441
|
-
},
|
|
2442
|
-
var
|
|
2443
|
+
}, Ee.jsxs = function(f, S, x) {
|
|
2444
|
+
var k = 1e4 > V.recentlyCreatedOwnerStacks++;
|
|
2443
2445
|
return u(
|
|
2444
2446
|
f,
|
|
2445
2447
|
S,
|
|
2446
2448
|
x,
|
|
2447
2449
|
!0,
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
+
k ? Error("react-stack-top-frame") : K,
|
|
2451
|
+
k ? J(s(f)) : Q
|
|
2450
2452
|
);
|
|
2451
2453
|
};
|
|
2452
|
-
})()),
|
|
2454
|
+
})()), Ee;
|
|
2453
2455
|
}
|
|
2454
2456
|
var zt;
|
|
2455
2457
|
function Wn() {
|
|
@@ -2858,7 +2860,7 @@ const vs = [
|
|
|
2858
2860
|
* This source code is licensed under the ISC license.
|
|
2859
2861
|
* See the LICENSE file in the root directory of this source tree.
|
|
2860
2862
|
*/
|
|
2861
|
-
const
|
|
2863
|
+
const ks = [
|
|
2862
2864
|
["path", { d: "M13 21h8", key: "1jsn5i" }],
|
|
2863
2865
|
[
|
|
2864
2866
|
"path",
|
|
@@ -2867,7 +2869,7 @@ const Es = [
|
|
|
2867
2869
|
key: "1a8usu"
|
|
2868
2870
|
}
|
|
2869
2871
|
]
|
|
2870
|
-
],
|
|
2872
|
+
], Es = W("pen-line", ks);
|
|
2871
2873
|
/**
|
|
2872
2874
|
* @license lucide-react v0.544.0 - ISC
|
|
2873
2875
|
*
|
|
@@ -3049,8 +3051,8 @@ const Ls = [
|
|
|
3049
3051
|
}
|
|
3050
3052
|
}, []);
|
|
3051
3053
|
const K = (S) => {
|
|
3052
|
-
const { name: x, value:
|
|
3053
|
-
z((_) => ({ ..._, [x]:
|
|
3054
|
+
const { name: x, value: k } = S.target;
|
|
3055
|
+
z((_) => ({ ..._, [x]: k })), B[x] && F((_) => ({ ..._, [x]: void 0 }));
|
|
3054
3056
|
}, Q = () => {
|
|
3055
3057
|
const S = {};
|
|
3056
3058
|
return I.name.trim() || (S.name = "Name is required"), I.email.trim() ? /\S+@\S+\.\S+/.test(I.email) || (S.email = "Invalid email address") : S.email = "Email is required", I.password ? I.password.length < 6 && (S.password = "Password must be at least 6 characters") : S.password = "Password is required", F(S), Object.keys(S).length === 0;
|
|
@@ -3061,11 +3063,11 @@ const Ls = [
|
|
|
3061
3063
|
const x = {
|
|
3062
3064
|
...I,
|
|
3063
3065
|
appId: m
|
|
3064
|
-
},
|
|
3065
|
-
D({ type: "success", text: "Account created successfully!" }), y && y(
|
|
3066
|
+
}, k = await Hn(x, { baseUrl: c, apiKey: j });
|
|
3067
|
+
D({ type: "success", text: "Account created successfully!" }), y && y(k);
|
|
3066
3068
|
} catch (x) {
|
|
3067
|
-
const
|
|
3068
|
-
D({ type: "error", text:
|
|
3069
|
+
const k = x.message || "Signup failed. Please try again.";
|
|
3070
|
+
D({ type: "error", text: k }), w && w(x);
|
|
3069
3071
|
} finally {
|
|
3070
3072
|
R(!1);
|
|
3071
3073
|
}
|
|
@@ -3739,7 +3741,7 @@ const Ls = [
|
|
|
3739
3741
|
} finally {
|
|
3740
3742
|
q(!1);
|
|
3741
3743
|
}
|
|
3742
|
-
},
|
|
3744
|
+
}, k = {
|
|
3743
3745
|
width: "100%",
|
|
3744
3746
|
padding: T ? "10px 14px 10px 44px" : "10px 16px 10px 44px",
|
|
3745
3747
|
backgroundColor: K,
|
|
@@ -3876,7 +3878,7 @@ const Ls = [
|
|
|
3876
3878
|
placeholder: "Enter your email",
|
|
3877
3879
|
value: v,
|
|
3878
3880
|
onChange: (_) => D(_.target.value),
|
|
3879
|
-
style:
|
|
3881
|
+
style: k
|
|
3880
3882
|
}
|
|
3881
3883
|
)
|
|
3882
3884
|
] })
|
|
@@ -3922,7 +3924,7 @@ const Ls = [
|
|
|
3922
3924
|
placeholder: "Enter your password",
|
|
3923
3925
|
value: B,
|
|
3924
3926
|
onChange: (_) => F(_.target.value),
|
|
3925
|
-
style:
|
|
3927
|
+
style: k
|
|
3926
3928
|
}
|
|
3927
3929
|
),
|
|
3928
3930
|
/* @__PURE__ */ n.jsx(
|
|
@@ -4053,7 +4055,7 @@ const Ls = [
|
|
|
4053
4055
|
placeholder: "Enter your email",
|
|
4054
4056
|
value: V.email,
|
|
4055
4057
|
onChange: f,
|
|
4056
|
-
style:
|
|
4058
|
+
style: k
|
|
4057
4059
|
}
|
|
4058
4060
|
)
|
|
4059
4061
|
] })
|
|
@@ -4104,7 +4106,7 @@ const Ls = [
|
|
|
4104
4106
|
placeholder: "Enter OTP",
|
|
4105
4107
|
value: V.otp,
|
|
4106
4108
|
onChange: f,
|
|
4107
|
-
style:
|
|
4109
|
+
style: k
|
|
4108
4110
|
}
|
|
4109
4111
|
)
|
|
4110
4112
|
] })
|
|
@@ -4155,7 +4157,7 @@ const Ls = [
|
|
|
4155
4157
|
placeholder: "Enter new password",
|
|
4156
4158
|
value: V.newPassword,
|
|
4157
4159
|
onChange: f,
|
|
4158
|
-
style:
|
|
4160
|
+
style: k
|
|
4159
4161
|
}
|
|
4160
4162
|
)
|
|
4161
4163
|
] })
|
|
@@ -6377,29 +6379,29 @@ const Ls = [
|
|
|
6377
6379
|
email: "",
|
|
6378
6380
|
otp: "",
|
|
6379
6381
|
appId: d
|
|
6380
|
-
}), [S, x] = O(!1), [
|
|
6382
|
+
}), [S, x] = O(!1), [k, _] = O(!1);
|
|
6381
6383
|
te(() => {
|
|
6382
6384
|
if (typeof window < "u") {
|
|
6383
|
-
const
|
|
6384
|
-
return
|
|
6385
|
+
const E = () => b(window.innerWidth);
|
|
6386
|
+
return E(), window.addEventListener("resize", E), () => window.removeEventListener("resize", E);
|
|
6385
6387
|
}
|
|
6386
6388
|
}, []);
|
|
6387
|
-
const N = (
|
|
6388
|
-
P({ type:
|
|
6389
|
+
const N = (E, H) => {
|
|
6390
|
+
P({ type: E, message: H }), setTimeout(() => P(null), 3e3);
|
|
6389
6391
|
}, Y = () => {
|
|
6390
6392
|
J(!0);
|
|
6391
|
-
const
|
|
6393
|
+
const E = setTimeout(() => {
|
|
6392
6394
|
Z(!1), J(!1);
|
|
6393
6395
|
}, 150);
|
|
6394
|
-
return () => clearTimeout(
|
|
6396
|
+
return () => clearTimeout(E);
|
|
6395
6397
|
};
|
|
6396
6398
|
te(() => {
|
|
6397
|
-
const
|
|
6399
|
+
const E = (H) => {
|
|
6398
6400
|
const X = document.querySelector(".dropdown-container");
|
|
6399
6401
|
X && !X.contains(H.target) && Y();
|
|
6400
6402
|
};
|
|
6401
|
-
return V && document.addEventListener("mousedown",
|
|
6402
|
-
document.removeEventListener("mousedown",
|
|
6403
|
+
return V && document.addEventListener("mousedown", E), () => {
|
|
6404
|
+
document.removeEventListener("mousedown", E);
|
|
6403
6405
|
};
|
|
6404
6406
|
}, [V]);
|
|
6405
6407
|
const se = async () => {
|
|
@@ -6409,21 +6411,21 @@ const Ls = [
|
|
|
6409
6411
|
}
|
|
6410
6412
|
try {
|
|
6411
6413
|
_(!0);
|
|
6412
|
-
const
|
|
6414
|
+
const E = await M.post(
|
|
6413
6415
|
`${l}/users/send-verify-otp/${y?.id}`,
|
|
6414
6416
|
{ email: G.email },
|
|
6415
6417
|
{
|
|
6416
6418
|
headers: { "x-api-key": h, "x-app-id": d }
|
|
6417
6419
|
}
|
|
6418
6420
|
);
|
|
6419
|
-
|
|
6420
|
-
} catch (
|
|
6421
|
-
N("error",
|
|
6421
|
+
E.data.success ? (N("success", E.data.message || "OTP sent to email!"), x(!0)) : N("error", E.data.message || "Failed to send OTP");
|
|
6422
|
+
} catch (E) {
|
|
6423
|
+
N("error", E.response?.data?.message || "Server error");
|
|
6422
6424
|
} finally {
|
|
6423
6425
|
_(!1);
|
|
6424
6426
|
}
|
|
6425
|
-
}, ue = async (
|
|
6426
|
-
if (
|
|
6427
|
+
}, ue = async (E) => {
|
|
6428
|
+
if (E.preventDefault(), !G.email || !G.otp) {
|
|
6427
6429
|
N("error", "Please fill in all fields");
|
|
6428
6430
|
return;
|
|
6429
6431
|
}
|
|
@@ -6452,10 +6454,10 @@ const Ls = [
|
|
|
6452
6454
|
} finally {
|
|
6453
6455
|
_(!1);
|
|
6454
6456
|
}
|
|
6455
|
-
}, ve = async (
|
|
6457
|
+
}, ve = async (E) => {
|
|
6456
6458
|
if (!y) return !1;
|
|
6457
6459
|
try {
|
|
6458
|
-
const H = { ...y, avatarUrl:
|
|
6460
|
+
const H = { ...y, avatarUrl: E }, { data: X } = await M.put(
|
|
6459
6461
|
`${l}/users/update/${y.id}`,
|
|
6460
6462
|
H,
|
|
6461
6463
|
{ headers: { "x-api-key": h } }
|
|
@@ -6471,25 +6473,25 @@ const Ls = [
|
|
|
6471
6473
|
if (y) {
|
|
6472
6474
|
z(!0);
|
|
6473
6475
|
try {
|
|
6474
|
-
const { data:
|
|
6476
|
+
const { data: E } = await M.put(
|
|
6475
6477
|
`${l}/users/update/${y.id}`,
|
|
6476
6478
|
y,
|
|
6477
6479
|
{ headers: { "x-api-key": h } }
|
|
6478
6480
|
);
|
|
6479
|
-
|
|
6481
|
+
E.success ? (w(E.user), $(!1), localStorage.setItem(
|
|
6480
6482
|
"userInfo",
|
|
6481
|
-
JSON.stringify({ ...
|
|
6482
|
-
), N("success", "Profile updated successfully")) : N("error",
|
|
6483
|
-
} catch (
|
|
6484
|
-
console.error(
|
|
6483
|
+
JSON.stringify({ ...E.user, token: t })
|
|
6484
|
+
), N("success", "Profile updated successfully")) : N("error", E.message);
|
|
6485
|
+
} catch (E) {
|
|
6486
|
+
console.error(E), N("error", "Update failed");
|
|
6485
6487
|
} finally {
|
|
6486
6488
|
z(!1);
|
|
6487
6489
|
}
|
|
6488
6490
|
}
|
|
6489
|
-
}, pt = async (
|
|
6491
|
+
}, pt = async (E) => {
|
|
6490
6492
|
try {
|
|
6491
6493
|
const { data: H } = await M.get(
|
|
6492
|
-
`${l}/users/check-user/${
|
|
6494
|
+
`${l}/users/check-user/${E}?appId=${d}`,
|
|
6493
6495
|
{ headers: { "x-api-key": h } }
|
|
6494
6496
|
);
|
|
6495
6497
|
H?.success === !0 && H?.exists === !1 && (console.warn("❌ User does not exist on server. Clearing session..."), localStorage.removeItem("userInfo"), w(null));
|
|
@@ -6511,10 +6513,10 @@ const Ls = [
|
|
|
6511
6513
|
}
|
|
6512
6514
|
})();
|
|
6513
6515
|
}, [e]), te(() => {
|
|
6514
|
-
y?.email && f((
|
|
6516
|
+
y?.email && f((E) => ({ ...E, email: y.email }));
|
|
6515
6517
|
}, [y?.email]);
|
|
6516
|
-
const ft = (
|
|
6517
|
-
let X = parseInt(
|
|
6518
|
+
const ft = (E, H) => {
|
|
6519
|
+
let X = parseInt(E.replace("#", ""), 16), pe = (X >> 16) + H, He = (X >> 8 & 255) + H, Ve = (X & 255) + H;
|
|
6518
6520
|
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")}`;
|
|
6519
6521
|
}, U = r ? {
|
|
6520
6522
|
background: "#000000",
|
|
@@ -6974,7 +6976,7 @@ const Ls = [
|
|
|
6974
6976
|
flex: u && window.innerWidth < 1024 ? "1" : "auto"
|
|
6975
6977
|
},
|
|
6976
6978
|
children: [
|
|
6977
|
-
/* @__PURE__ */ n.jsx(
|
|
6979
|
+
/* @__PURE__ */ n.jsx(Es, { size: 16, "aria-hidden": "true" }),
|
|
6978
6980
|
"Edit Profile"
|
|
6979
6981
|
]
|
|
6980
6982
|
}
|
|
@@ -7086,8 +7088,8 @@ const Ls = [
|
|
|
7086
7088
|
gap: "8px",
|
|
7087
7089
|
textAlign: "left"
|
|
7088
7090
|
},
|
|
7089
|
-
onMouseEnter: (
|
|
7090
|
-
onMouseLeave: (
|
|
7091
|
+
onMouseEnter: (E) => E.currentTarget.style.backgroundColor = U.surfaceLight,
|
|
7092
|
+
onMouseLeave: (E) => E.currentTarget.style.backgroundColor = "transparent",
|
|
7091
7093
|
children: [
|
|
7092
7094
|
/* @__PURE__ */ n.jsx(dt, { size: 14, "aria-hidden": "true" }),
|
|
7093
7095
|
"Change Password"
|
|
@@ -7115,10 +7117,10 @@ const Ls = [
|
|
|
7115
7117
|
gap: "8px",
|
|
7116
7118
|
textAlign: "left"
|
|
7117
7119
|
},
|
|
7118
|
-
onMouseEnter: (
|
|
7119
|
-
|
|
7120
|
+
onMouseEnter: (E) => {
|
|
7121
|
+
E.currentTarget.style.backgroundColor = r ? "rgba(239, 68, 68, 0.1)" : "rgba(239, 68, 68, 0.05)";
|
|
7120
7122
|
},
|
|
7121
|
-
onMouseLeave: (
|
|
7123
|
+
onMouseLeave: (E) => E.currentTarget.style.backgroundColor = "transparent",
|
|
7122
7124
|
children: [
|
|
7123
7125
|
/* @__PURE__ */ n.jsx(ct, { size: 14, "aria-hidden": "true" }),
|
|
7124
7126
|
"Logout"
|
|
@@ -7146,10 +7148,10 @@ const Ls = [
|
|
|
7146
7148
|
gap: "8px",
|
|
7147
7149
|
textAlign: "left"
|
|
7148
7150
|
},
|
|
7149
|
-
onMouseEnter: (
|
|
7150
|
-
|
|
7151
|
+
onMouseEnter: (E) => {
|
|
7152
|
+
E.currentTarget.style.backgroundColor = r ? "rgba(239, 68, 68, 0.1)" : "rgba(239, 68, 68, 0.05)";
|
|
7151
7153
|
},
|
|
7152
|
-
onMouseLeave: (
|
|
7154
|
+
onMouseLeave: (E) => E.currentTarget.style.backgroundColor = "transparent",
|
|
7153
7155
|
children: [
|
|
7154
7156
|
/* @__PURE__ */ n.jsx(Ne, { size: 14, "aria-hidden": "true" }),
|
|
7155
7157
|
"Delete Account"
|
|
@@ -7216,8 +7218,8 @@ const Ls = [
|
|
|
7216
7218
|
gap: "20px"
|
|
7217
7219
|
}
|
|
7218
7220
|
},
|
|
7219
|
-
children: pr.map((
|
|
7220
|
-
const H =
|
|
7221
|
+
children: pr.map((E) => {
|
|
7222
|
+
const H = E.icon;
|
|
7221
7223
|
return /* @__PURE__ */ n.jsxs(
|
|
7222
7224
|
"div",
|
|
7223
7225
|
{
|
|
@@ -7240,16 +7242,16 @@ const Ls = [
|
|
|
7240
7242
|
},
|
|
7241
7243
|
children: [
|
|
7242
7244
|
/* @__PURE__ */ n.jsx(H, { size: 16, "aria-hidden": "true" }),
|
|
7243
|
-
|
|
7245
|
+
E.label
|
|
7244
7246
|
]
|
|
7245
7247
|
}
|
|
7246
7248
|
),
|
|
7247
7249
|
m ? /* @__PURE__ */ n.jsx(
|
|
7248
7250
|
"input",
|
|
7249
7251
|
{
|
|
7250
|
-
type:
|
|
7251
|
-
name:
|
|
7252
|
-
value: y[
|
|
7252
|
+
type: E.type,
|
|
7253
|
+
name: E.name,
|
|
7254
|
+
value: y[E.name],
|
|
7253
7255
|
onChange: (X) => w(
|
|
7254
7256
|
(pe) => pe && { ...pe, [X.target.name]: X.target.value }
|
|
7255
7257
|
),
|
|
@@ -7266,8 +7268,8 @@ const Ls = [
|
|
|
7266
7268
|
width: "100%",
|
|
7267
7269
|
boxSizing: "border-box"
|
|
7268
7270
|
},
|
|
7269
|
-
placeholder: `Enter ${
|
|
7270
|
-
"aria-label":
|
|
7271
|
+
placeholder: `Enter ${E.label.toLowerCase()}`,
|
|
7272
|
+
"aria-label": E.label
|
|
7271
7273
|
}
|
|
7272
7274
|
) : /* @__PURE__ */ n.jsx(
|
|
7273
7275
|
"div",
|
|
@@ -7284,12 +7286,12 @@ const Ls = [
|
|
|
7284
7286
|
color: U.textPrimary,
|
|
7285
7287
|
backgroundColor: r ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.05)"
|
|
7286
7288
|
},
|
|
7287
|
-
children:
|
|
7289
|
+
children: E.value
|
|
7288
7290
|
}
|
|
7289
7291
|
)
|
|
7290
7292
|
]
|
|
7291
7293
|
},
|
|
7292
|
-
|
|
7294
|
+
E.name
|
|
7293
7295
|
);
|
|
7294
7296
|
})
|
|
7295
7297
|
}
|
|
@@ -7447,8 +7449,8 @@ const Ls = [
|
|
|
7447
7449
|
userId: y.id,
|
|
7448
7450
|
isOpen: g,
|
|
7449
7451
|
onClose: () => R(!1),
|
|
7450
|
-
onSuccess: (
|
|
7451
|
-
onError: (
|
|
7452
|
+
onSuccess: (E) => N("success", E),
|
|
7453
|
+
onError: (E) => N("error", E),
|
|
7452
7454
|
colors: U
|
|
7453
7455
|
}
|
|
7454
7456
|
),
|
|
@@ -7462,8 +7464,8 @@ const Ls = [
|
|
|
7462
7464
|
token: t,
|
|
7463
7465
|
isOpen: v,
|
|
7464
7466
|
onClose: () => D(!1),
|
|
7465
|
-
onSuccess: (
|
|
7466
|
-
onError: (
|
|
7467
|
+
onSuccess: (E) => N("success", E),
|
|
7468
|
+
onError: (E) => N("error", E),
|
|
7467
7469
|
colors: U
|
|
7468
7470
|
}
|
|
7469
7471
|
),
|
|
@@ -7479,7 +7481,7 @@ const Ls = [
|
|
|
7479
7481
|
verifyFormData: G,
|
|
7480
7482
|
setVerifyFormData: f,
|
|
7481
7483
|
otpSent: S,
|
|
7482
|
-
verifying:
|
|
7484
|
+
verifying: k,
|
|
7483
7485
|
user: y,
|
|
7484
7486
|
colors: U,
|
|
7485
7487
|
darkMode: r
|
|
@@ -7612,10 +7614,10 @@ const Ls = [
|
|
|
7612
7614
|
throw new Error("Invalid user data provided");
|
|
7613
7615
|
q(a);
|
|
7614
7616
|
} else if (typeof window < "u") {
|
|
7615
|
-
const
|
|
7616
|
-
if (
|
|
7617
|
+
const k = localStorage.getItem("userInfo");
|
|
7618
|
+
if (k)
|
|
7617
7619
|
try {
|
|
7618
|
-
const _ = JSON.parse(
|
|
7620
|
+
const _ = JSON.parse(k);
|
|
7619
7621
|
if (!_.id || !_.name || !_.email)
|
|
7620
7622
|
throw new Error("Invalid stored user data");
|
|
7621
7623
|
q(_);
|
|
@@ -7623,8 +7625,8 @@ const Ls = [
|
|
|
7623
7625
|
console.error("Failed to parse stored user data:", _), localStorage.removeItem("userInfo"), D("Invalid user data");
|
|
7624
7626
|
}
|
|
7625
7627
|
}
|
|
7626
|
-
} catch (
|
|
7627
|
-
console.error("User initialization failed:",
|
|
7628
|
+
} catch (k) {
|
|
7629
|
+
console.error("User initialization failed:", k), D(k.message || "Failed to load user");
|
|
7628
7630
|
} finally {
|
|
7629
7631
|
R(!1);
|
|
7630
7632
|
}
|
|
@@ -7633,8 +7635,8 @@ const Ls = [
|
|
|
7633
7635
|
if (typeof window > "u") return;
|
|
7634
7636
|
const x = () => {
|
|
7635
7637
|
if (!I || !F.current) return;
|
|
7636
|
-
const
|
|
7637
|
-
N -
|
|
7638
|
+
const k = F.current.getBoundingClientRect(), _ = window.innerWidth, N = window.innerHeight, Y = 280, se = _ - k.right, ue = k.left;
|
|
7639
|
+
N - k.bottom;
|
|
7638
7640
|
const ve = se >= Y || se > ue;
|
|
7639
7641
|
Z(ve);
|
|
7640
7642
|
};
|
|
@@ -7644,13 +7646,13 @@ const Ls = [
|
|
|
7644
7646
|
return;
|
|
7645
7647
|
const x = (N) => {
|
|
7646
7648
|
B.current && !B.current.contains(N.target) && !F.current?.contains(N.target) && z(!1);
|
|
7647
|
-
},
|
|
7649
|
+
}, k = (N) => {
|
|
7648
7650
|
N.key === "Escape" && z(!1);
|
|
7649
7651
|
}, _ = () => {
|
|
7650
7652
|
I && z(!1);
|
|
7651
7653
|
};
|
|
7652
|
-
return I && (document.addEventListener("mousedown", x), document.addEventListener("keydown",
|
|
7653
|
-
document.removeEventListener("mousedown", x), document.removeEventListener("keydown",
|
|
7654
|
+
return I && (document.addEventListener("mousedown", x), document.addEventListener("keydown", k), window.addEventListener("scroll", _)), () => {
|
|
7655
|
+
document.removeEventListener("mousedown", x), document.removeEventListener("keydown", k), window.removeEventListener("scroll", _);
|
|
7654
7656
|
};
|
|
7655
7657
|
}, [I]);
|
|
7656
7658
|
const A = t ? {
|
|
@@ -7874,16 +7876,16 @@ const Ls = [
|
|
|
7874
7876
|
try {
|
|
7875
7877
|
const x = localStorage.getItem("userInfo");
|
|
7876
7878
|
if (x) {
|
|
7877
|
-
const
|
|
7878
|
-
q(
|
|
7879
|
+
const k = JSON.parse(x);
|
|
7880
|
+
q(k);
|
|
7879
7881
|
} else a && q(a);
|
|
7880
7882
|
} catch (x) {
|
|
7881
7883
|
console.error("Retry failed:", x), D("Invalid user data"), localStorage.removeItem("userInfo"), q(null);
|
|
7882
7884
|
} finally {
|
|
7883
7885
|
R(!1);
|
|
7884
7886
|
}
|
|
7885
|
-
}, Q = (x,
|
|
7886
|
-
(x.key === "Enter" || x.key === " ") && (x.preventDefault(),
|
|
7887
|
+
}, Q = (x, k) => {
|
|
7888
|
+
(x.key === "Enter" || x.key === " ") && (x.preventDefault(), k());
|
|
7887
7889
|
}, G = () => o || C?.profileUrl, f = () => {
|
|
7888
7890
|
const x = G();
|
|
7889
7891
|
x && window.open(x, "_self", "noopener,noreferrer");
|
|
@@ -7904,7 +7906,7 @@ const Ls = [
|
|
|
7904
7906
|
{
|
|
7905
7907
|
ref: F,
|
|
7906
7908
|
onClick: () => z((x) => !x),
|
|
7907
|
-
onKeyDown: (x) => Q(x, () => z((
|
|
7909
|
+
onKeyDown: (x) => Q(x, () => z((k) => !k)),
|
|
7908
7910
|
tabIndex: 0,
|
|
7909
7911
|
role: "button",
|
|
7910
7912
|
"aria-haspopup": "true",
|
|
@@ -7925,8 +7927,8 @@ const Ls = [
|
|
|
7925
7927
|
},
|
|
7926
7928
|
loading: "lazy",
|
|
7927
7929
|
onError: (x) => {
|
|
7928
|
-
const
|
|
7929
|
-
|
|
7930
|
+
const k = x.target;
|
|
7931
|
+
k.onerror = null, k.src = `https://api.dicebear.com/9.x/initials/svg?seed=${encodeURIComponent(
|
|
7930
7932
|
C?.name || "User"
|
|
7931
7933
|
)}`;
|
|
7932
7934
|
}
|
|
@@ -7956,7 +7958,7 @@ const Ls = [
|
|
|
7956
7958
|
ref: F,
|
|
7957
7959
|
style: P.avatarButton,
|
|
7958
7960
|
onClick: () => z((x) => !x),
|
|
7959
|
-
onKeyDown: (x) => Q(x, () => z((
|
|
7961
|
+
onKeyDown: (x) => Q(x, () => z((k) => !k)),
|
|
7960
7962
|
tabIndex: 0,
|
|
7961
7963
|
role: "button",
|
|
7962
7964
|
"aria-haspopup": "true",
|
|
@@ -7980,8 +7982,8 @@ const Ls = [
|
|
|
7980
7982
|
style: P.avatarImage,
|
|
7981
7983
|
loading: "lazy",
|
|
7982
7984
|
onError: (x) => {
|
|
7983
|
-
const
|
|
7984
|
-
|
|
7985
|
+
const k = x.target;
|
|
7986
|
+
k.src = "https://api.dicebear.com/9.x/glass/svg?seed=Kingston";
|
|
7985
7987
|
}
|
|
7986
7988
|
}
|
|
7987
7989
|
) : /* @__PURE__ */ n.jsx(
|
|
@@ -8018,8 +8020,8 @@ const Ls = [
|
|
|
8018
8020
|
style: P.dropdownAvatar,
|
|
8019
8021
|
loading: "lazy",
|
|
8020
8022
|
onError: (x) => {
|
|
8021
|
-
const
|
|
8022
|
-
|
|
8023
|
+
const k = x.target;
|
|
8024
|
+
k.src = `https://api.dicebear.com/9.x/initials/svg?seed=${C.name}`;
|
|
8023
8025
|
}
|
|
8024
8026
|
}
|
|
8025
8027
|
) : /* @__PURE__ */ n.jsx(
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){const s=new this(e);return r.forEach(a=>s.set(a)),s}static accessor(e){const s=(this[Pt]=this[Pt]={accessors:{}}).accessors,a=this.prototype;function i(o){const l=Ce(o);s[l]||(dn(a,o),s[l]=!0)}return p.isArray(e)?e.forEach(i):i(e),this}};ne.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),p.reduceDescriptors(ne.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(s){this[r]=s}}}),p.freezeMethods(ne);function Xe(t,e){const r=this||ke,s=e||r,a=ne.from(s.headers);let i=s.data;return p.forEach(t,function(l){i=l.call(r,i,a.normalize(),e?e.status:void 0)}),a.normalize(),i}function Ot(t){return!!(t&&t.__CANCEL__)}function be(t,e,r){D.call(this,t??"canceled",D.ERR_CANCELED,e,r),this.name="CanceledError"}p.inherits(be,D,{__CANCEL__:!0});function Rt(t,e,r){const s=r.config.validateStatus;!r.status||!s||s(r.status)?t(r):e(new D("Request failed with status code "+r.status,[D.ERR_BAD_REQUEST,D.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function cn(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function un(t,e){t=t||10;const r=new Array(t),s=new Array(t);let a=0,i=0,o;return e=e!==void 0?e:1e3,function(h){const d=Date.now(),u=s[i];o||(o=d),r[a]=h,s[a]=d;let b=i,y=0;for(;b!==a;)y+=r[b++],b=b%t;if(a=(a+1)%t,a===i&&(i=(i+1)%t),d-o<e)return;const S=u&&d-u;return S?Math.round(y*1e3/S):void 0}}function pn(t,e){let r=0,s=1e3/e,a,i;const o=(d,u=Date.now())=>{r=u,a=null,i&&(clearTimeout(i),i=null),t(...d)};return[(...d)=>{const u=Date.now(),b=u-r;b>=s?o(d,u):(a=d,i||(i=setTimeout(()=>{i=null,o(a)},s-b)))},()=>a&&o(a)]}const Ue=(t,e,r=3)=>{let s=0;const a=un(50,250);return pn(i=>{const o=i.loaded,l=i.lengthComputable?i.total:void 0,h=o-s,d=a(h),u=o<=l;s=o;const b={loaded:o,total:l,progress:l?o/l:void 0,bytes:h,rate:d||void 0,estimated:d&&l&&u?(l-o)/d:void 0,event:i,lengthComputable:l!=null,[e?"download":"upload"]:!0};t(b)},r)},At=(t,e)=>{const r=t!=null;return[s=>e[0]({lengthComputable:r,total:t,loaded:s}),e[1]]},zt=t=>(...e)=>p.asap(()=>t(...e)),fn=ee.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,ee.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(ee.origin),ee.navigator&&/(msie|trident)/i.test(ee.navigator.userAgent)):()=>!0,xn=ee.hasStandardBrowserEnv?{write(t,e,r,s,a,i){const o=[t+"="+encodeURIComponent(e)];p.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),p.isString(s)&&o.push("path="+s),p.isString(a)&&o.push("domain="+a),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function hn(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function gn(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function _t(t,e,r){let s=!hn(e);return t&&(s||r==!1)?gn(t,e):e}const $t=t=>t instanceof ne?{...t}:t;function fe(t,e){e=e||{};const r={};function s(d,u,b,y){return p.isPlainObject(d)&&p.isPlainObject(u)?p.merge.call({caseless:y},d,u):p.isPlainObject(u)?p.merge({},u):p.isArray(u)?u.slice():u}function a(d,u,b,y){if(p.isUndefined(u)){if(!p.isUndefined(d))return s(void 0,d,b,y)}else return s(d,u,b,y)}function i(d,u){if(!p.isUndefined(u))return s(void 0,u)}function o(d,u){if(p.isUndefined(u)){if(!p.isUndefined(d))return s(void 0,d)}else return s(void 0,u)}function l(d,u,b){if(b in e)return s(d,u);if(b in t)return s(void 0,d)}const h={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:l,headers:(d,u,b)=>a($t(d),$t(u),b,!0)};return p.forEach(Object.keys({...t,...e}),function(u){const b=h[u]||a,y=b(t[u],e[u],u);p.isUndefined(y)&&b!==l||(r[u]=y)}),r}const Nt=t=>{const e=fe({},t);let{data:r,withXSRFToken:s,xsrfHeaderName:a,xsrfCookieName:i,headers:o,auth:l}=e;if(e.headers=o=ne.from(o),e.url=kt(_t(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),l&&o.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),p.isFormData(r)){if(ee.hasStandardBrowserEnv||ee.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(p.isFunction(r.getHeaders)){const h=r.getHeaders(),d=["content-type","content-length"];Object.entries(h).forEach(([u,b])=>{d.includes(u.toLowerCase())&&o.set(u,b)})}}if(ee.hasStandardBrowserEnv&&(s&&p.isFunction(s)&&(s=s(e)),s||s!==!1&&fn(e.url))){const h=a&&i&&xn.read(i);h&&o.set(a,h)}return e},mn=typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(r,s){const a=Nt(t);let i=a.data;const o=ne.from(a.headers).normalize();let{responseType:l,onUploadProgress:h,onDownloadProgress:d}=a,u,b,y,S,c;function j(){S&&S(),c&&c(),a.cancelToken&&a.cancelToken.unsubscribe(u),a.signal&&a.signal.removeEventListener("abort",u)}let m=new XMLHttpRequest;m.open(a.method.toUpperCase(),a.url,!0),m.timeout=a.timeout;function _(){if(!m)return;const z=ne.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),q={data:!l||l==="text"||l==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:z,config:t,request:m};Rt(function(O){r(O),j()},function(O){s(O),j()},q),m=null}"onloadend"in m?m.onloadend=_:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(_)},m.onabort=function(){m&&(s(new D("Request aborted",D.ECONNABORTED,t,m)),m=null)},m.onerror=function(T){const q=T&&T.message?T.message:"Network Error",g=new D(q,D.ERR_NETWORK,t,m);g.event=T||null,s(g),m=null},m.ontimeout=function(){let T=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const q=a.transitional||Tt;a.timeoutErrorMessage&&(T=a.timeoutErrorMessage),s(new D(T,q.clarifyTimeoutError?D.ETIMEDOUT:D.ECONNABORTED,t,m)),m=null},i===void 0&&o.setContentType(null),"setRequestHeader"in m&&p.forEach(o.toJSON(),function(T,q){m.setRequestHeader(q,T)}),p.isUndefined(a.withCredentials)||(m.withCredentials=!!a.withCredentials),l&&l!=="json"&&(m.responseType=a.responseType),d&&([y,c]=Ue(d,!0),m.addEventListener("progress",y)),h&&m.upload&&([b,S]=Ue(h),m.upload.addEventListener("progress",b),m.upload.addEventListener("loadend",S)),(a.cancelToken||a.signal)&&(u=z=>{m&&(s(!z||z.type?new be(null,t,m):z),m.abort(),m=null)},a.cancelToken&&a.cancelToken.subscribe(u),a.signal&&(a.signal.aborted?u():a.signal.addEventListener("abort",u)));const P=cn(a.url);if(P&&ee.protocols.indexOf(P)===-1){s(new D("Unsupported protocol "+P+":",D.ERR_BAD_REQUEST,t));return}m.send(i||null)})},yn=(t,e)=>{const{length:r}=t=t?t.filter(Boolean):[];if(e||r){let s=new AbortController,a;const i=function(d){if(!a){a=!0,l();const u=d instanceof Error?d:this.reason;s.abort(u instanceof D?u:new be(u instanceof Error?u.message:u))}};let o=e&&setTimeout(()=>{o=null,i(new D(`timeout ${e} of ms exceeded`,D.ETIMEDOUT))},e);const l=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(d=>{d.unsubscribe?d.unsubscribe(i):d.removeEventListener("abort",i)}),t=null)};t.forEach(d=>d.addEventListener("abort",i));const{signal:h}=s;return h.unsubscribe=()=>p.asap(l),h}},bn=function*(t,e){let r=t.byteLength;if(r<e){yield t;return}let s=0,a;for(;s<r;)a=s+e,yield t.slice(s,a),s=a},wn=async function*(t,e){for await(const r of Sn(t))yield*bn(r,e)},Sn=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:r,value:s}=await e.read();if(r)break;yield s}}finally{await e.cancel()}},Ut=(t,e,r,s)=>{const a=wn(t,e);let i=0,o,l=h=>{o||(o=!0,s&&s(h))};return new ReadableStream({async pull(h){try{const{done:d,value:u}=await a.next();if(d){l(),h.close();return}let b=u.byteLength;if(r){let y=i+=b;r(y)}h.enqueue(new Uint8Array(u))}catch(d){throw l(d),d}},cancel(h){return l(h),a.return()}},{highWaterMark:2})},Dt=64*1024,{isFunction:De}=p,jn=(({Request:t,Response:e})=>({Request:t,Response:e}))(p.global),{ReadableStream:Lt,TextEncoder:Ft}=p.global,qt=(t,...e)=>{try{return!!t(...e)}catch{return!1}},vn=t=>{t=p.merge.call({skipUndefined:!0},jn,t);const{fetch:e,Request:r,Response:s}=t,a=e?De(e):typeof fetch=="function",i=De(r),o=De(s);if(!a)return!1;const l=a&&De(Lt),h=a&&(typeof Ft=="function"?(c=>j=>c.encode(j))(new Ft):async c=>new Uint8Array(await new r(c).arrayBuffer())),d=i&&l&&qt(()=>{let c=!1;const j=new r(ee.origin,{body:new Lt,method:"POST",get duplex(){return c=!0,"half"}}).headers.has("Content-Type");return c&&!j}),u=o&&l&&qt(()=>p.isReadableStream(new s("").body)),b={stream:u&&(c=>c.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(c=>{!b[c]&&(b[c]=(j,m)=>{let _=j&&j[c];if(_)return _.call(j);throw new D(`Response type '${c}' is not supported`,D.ERR_NOT_SUPPORT,m)})});const y=async c=>{if(c==null)return 0;if(p.isBlob(c))return c.size;if(p.isSpecCompliantForm(c))return(await new r(ee.origin,{method:"POST",body:c}).arrayBuffer()).byteLength;if(p.isArrayBufferView(c)||p.isArrayBuffer(c))return c.byteLength;if(p.isURLSearchParams(c)&&(c=c+""),p.isString(c))return(await h(c)).byteLength},S=async(c,j)=>{const m=p.toFiniteNumber(c.getContentLength());return m??y(j)};return async c=>{let{url:j,method:m,data:_,signal:P,cancelToken:z,timeout:T,onDownloadProgress:q,onUploadProgress:g,responseType:O,headers:v,withCredentials:U="same-origin",fetchOptions:B}=Nt(c),F=e||fetch;O=O?(O+"").toLowerCase():"text";let V=yn([P,z&&z.toAbortSignal()],T),Z=null;const I=V&&V.unsubscribe&&(()=>{V.unsubscribe()});let J;try{if(g&&d&&m!=="get"&&m!=="head"&&(J=await S(v,_))!==0){let f=new r(j,{method:"POST",body:_,duplex:"half"}),E;if(p.isFormData(_)&&(E=f.headers.get("content-type"))&&v.setContentType(E),f.body){const[x,k]=At(J,Ue(zt(g)));_=Ut(f.body,Dt,x,k)}}p.isString(U)||(U=U?"include":"omit");const A=i&&"credentials"in r.prototype,R={...B,signal:V,method:m.toUpperCase(),headers:v.normalize().toJSON(),body:_,duplex:"half",credentials:A?U:void 0};Z=i&&new r(j,R);let K=await(i?F(Z,B):F(j,R));const te=u&&(O==="stream"||O==="response");if(u&&(q||te&&I)){const f={};["status","statusText","headers"].forEach($=>{f[$]=K[$]});const E=p.toFiniteNumber(K.headers.get("content-length")),[x,k]=q&&At(E,Ue(zt(q),!0))||[];K=new s(Ut(K.body,Dt,x,()=>{k&&k(),I&&I()}),f)}O=O||"text";let G=await b[p.findKey(b,O)||"text"](K,c);return!te&&I&&I(),await new Promise((f,E)=>{Rt(f,E,{data:G,headers:ne.from(K.headers),status:K.status,statusText:K.statusText,config:c,request:Z})})}catch(A){throw I&&I(),A&&A.name==="TypeError"&&/Load failed|fetch/i.test(A.message)?Object.assign(new D("Network Error",D.ERR_NETWORK,c,Z),{cause:A.cause||A}):D.from(A,A&&A.code,c,Z)}}},En=new Map,Mt=t=>{let e=t?t.env:{};const{fetch:r,Request:s,Response:a}=e,i=[s,a,r];let o=i.length,l=o,h,d,u=En;for(;l--;)h=i[l],d=u.get(h),d===void 0&&u.set(h,d=l?new Map:vn(e)),u=d;return d};Mt();const Ze={http:Hr,xhr:mn,fetch:{get:Mt}};p.forEach(Ze,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Bt=t=>`- ${t}`,kn=t=>p.isFunction(t)||t===null||t===!1,Wt={getAdapter:(t,e)=>{t=p.isArray(t)?t:[t];const{length:r}=t;let s,a;const i={};for(let o=0;o<r;o++){s=t[o];let l;if(a=s,!kn(s)&&(a=Ze[(l=String(s)).toLowerCase()],a===void 0))throw new D(`Unknown adapter '${l}'`);if(a&&(p.isFunction(a)||(a=a.get(e))))break;i[l||"#"+o]=a}if(!a){const o=Object.entries(i).map(([h,d])=>`adapter ${h} `+(d===!1?"is not supported by the environment":"is not available in the build"));let l=r?o.length>1?`since :
|
|
4
4
|
`+o.map(Bt).join(`
|
|
5
5
|
`):" "+Bt(o[0]):"as no adapter specified";throw new D("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return a},adapters:Ze};function Qe(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new be(null,t)}function Ht(t){return Qe(t),t.headers=ne.from(t.headers),t.data=Xe.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Wt.getAdapter(t.adapter||ke.adapter,t)(t).then(function(s){return Qe(t),s.data=Xe.call(t,t.transformResponse,s),s.headers=ne.from(s.headers),s},function(s){return Ot(s)||(Qe(t),s&&s.response&&(s.response.data=Xe.call(t,t.transformResponse,s.response),s.response.headers=ne.from(s.response.headers))),Promise.reject(s)})}const Vt="1.12.2",Le={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Le[t]=function(s){return typeof s===t||"a"+(e<1?"n ":" ")+t}});const Yt={};Le.transitional=function(e,r,s){function a(i,o){return"[Axios v"+Vt+"] Transitional option '"+i+"'"+o+(s?". "+s:"")}return(i,o,l)=>{if(e===!1)throw new D(a(o," has been removed"+(r?" in "+r:"")),D.ERR_DEPRECATED);return r&&!Yt[o]&&(Yt[o]=!0,console.warn(a(o," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(i,o,l):!0}},Le.spelling=function(e){return(r,s)=>(console.warn(`${s} is likely a misspelling of ${e}`),!0)};function Cn(t,e,r){if(typeof t!="object")throw new D("options must be an object",D.ERR_BAD_OPTION_VALUE);const s=Object.keys(t);let a=s.length;for(;a-- >0;){const i=s[a],o=e[i];if(o){const l=t[i],h=l===void 0||o(l,i,t);if(h!==!0)throw new D("option "+i+" must be "+h,D.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new D("Unknown option "+i,D.ERR_BAD_OPTION)}}const Fe={assertOptions:Cn,validators:Le},ie=Fe.validators;let xe=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Ct,response:new Ct}}async request(e,r){try{return await this._request(e,r)}catch(s){if(s instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const i=a.stack?a.stack.replace(/^.+\n/,""):"";try{s.stack?i&&!String(s.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(s.stack+=`
|
|
6
|
-
`+i):s.stack=i}catch{}}throw s}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=fe(this.defaults,r);const{transitional:s,paramsSerializer:a,headers:i}=r;s!==void 0&&Fe.assertOptions(s,{silentJSONParsing:ie.transitional(ie.boolean),forcedJSONParsing:ie.transitional(ie.boolean),clarifyTimeoutError:ie.transitional(ie.boolean)},!1),a!=null&&(p.isFunction(a)?r.paramsSerializer={serialize:a}:Fe.assertOptions(a,{encode:ie.function,serialize:ie.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Fe.assertOptions(r,{baseUrl:ie.spelling("baseURL"),withXsrfToken:ie.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=i&&p.merge(i.common,i[r.method]);i&&p.forEach(["delete","get","head","post","put","patch","common"],c=>{delete i[c]}),r.headers=ne.concat(o,i);const l=[];let h=!0;this.interceptors.request.forEach(function(j){typeof j.runWhen=="function"&&j.runWhen(r)===!1||(h=h&&j.synchronous,l.unshift(j.fulfilled,j.rejected))});const d=[];this.interceptors.response.forEach(function(j){d.push(j.fulfilled,j.rejected)});let u,b=0,y;if(!h){const c=[Ht.bind(this),void 0];for(c.unshift(...l),c.push(...d),y=c.length,u=Promise.resolve(r);b<y;)u=u.then(c[b++],c[b++]);return u}y=l.length;let S=r;for(;b<y;){const c=l[b++],j=l[b++];try{S=c(S)}catch(m){j.call(this,m);break}}try{u=Ht.call(this,S)}catch(c){return Promise.reject(c)}for(b=0,y=d.length;b<y;)u=u.then(d[b++],d[b++]);return u}getUri(e){e=fe(this.defaults,e);const r=_t(e.baseURL,e.url,e.allowAbsoluteUrls);return kt(r,e.params,e.paramsSerializer)}};p.forEach(["delete","get","head","options"],function(e){xe.prototype[e]=function(r,s){return this.request(fe(s||{},{method:e,url:r,data:(s||{}).data}))}}),p.forEach(["post","put","patch"],function(e){function r(s){return function(i,o,l){return this.request(fe(l||{},{method:e,headers:s?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}xe.prototype[e]=r(),xe.prototype[e+"Form"]=r(!0)});let Tn=class or{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const s=this;this.promise.then(a=>{if(!s._listeners)return;let i=s._listeners.length;for(;i-- >0;)s._listeners[i](a);s._listeners=null}),this.promise.then=a=>{let i;const o=new Promise(l=>{s.subscribe(l),i=l}).then(a);return o.cancel=function(){s.unsubscribe(i)},o},e(function(i,o,l){s.reason||(s.reason=new be(i,o,l),r(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const e=new AbortController,r=s=>{e.abort(s)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new or(function(a){e=a}),cancel:e}}};function In(t){return function(r){return t.apply(null,r)}}function Pn(t){return p.isObject(t)&&t.isAxiosError===!0}const et={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(et).forEach(([t,e])=>{et[e]=t});function Kt(t){const e=new xe(t),r=ct(xe.prototype.request,e);return p.extend(r,xe.prototype,e,{allOwnKeys:!0}),p.extend(r,e,null,{allOwnKeys:!0}),r.create=function(a){return Kt(fe(t,a))},r}const M=Kt(ke);M.Axios=xe,M.CanceledError=be,M.CancelToken=Tn,M.isCancel=Ot,M.VERSION=Vt,M.toFormData=$e,M.AxiosError=D,M.Cancel=M.CanceledError,M.all=function(e){return Promise.all(e)},M.spread=In,M.isAxiosError=Pn,M.mergeConfig=fe,M.AxiosHeaders=ne,M.formToJSON=t=>It(p.isHTMLForm(t)?new FormData(t):t),M.getAdapter=Wt.getAdapter,M.HttpStatusCode=et,M.default=M;const{Axios:bs,AxiosError:ws,CanceledError:Ss,isCancel:js,CancelToken:vs,VERSION:Es,all:ks,Cancel:Cs,isAxiosError:Ts,spread:Is,toFormData:Ps,AxiosHeaders:Os,HttpStatusCode:Rs,formToJSON:As,getAdapter:zs,mergeConfig:_s}=M;class On{baseUrl;apiKey;appId;client;constructor(e){if(!e||!e.baseUrl)throw new Error("NeuctraAuthixClient: 'baseUrl' is required in config");this.baseUrl=e.baseUrl.replace(/\/$/,""),this.apiKey=e.apiKey||null,this.appId=e.appId||null,this.client=M.create({baseURL:this.baseUrl,headers:{"Content-Type":"application/json",...this.apiKey?{"x-api-key":this.apiKey}:{}},timeout:1e4})}async request(e,r,s,a={}){if(!e)throw new Error("HTTP method is required");if(!r)throw new Error("Request path is required");try{const i={...this.appId?{appId:this.appId}:{},...s||{}};return(await this.client.request({url:r,method:e,data:i,headers:a})).data}catch(i){if(console.error("❌ [Request Error]:",i),i.isAxiosError){const o=i.response?.status||0,l=i.response?.data?.message||i.message||"Unknown Axios error occurred";throw new Error(`Request failed (${o}): ${l}`)}throw new Error(`Unexpected error: ${i.message||"Unknown failure"}`)}}async signup(e){const{name:r,email:s,password:a}=e;if(!r||!s||!a)throw new Error("signup: 'name', 'email', and 'password' are required");return this.request("POST","/users/signup",e)}async login(e){const{email:r,password:s,appId:a}=e;if(!r||!s)throw new Error("login: 'email' and 'password' are required");return this.request("POST","/users/login",{email:r,password:s,appId:a||this.appId})}async updateUser(e){const{userId:r,appId:s}=e;if(!r)throw new Error("updateUser: 'userId' is required");return this.request("PUT",`/users/update/${r}`,{...e,appId:s||this.appId})}async changePassword(e){const{userId:r,currentPassword:s,newPassword:a,appId:i}=e;if(!r)throw new Error("changePassword: 'userId' is required");if(!s||!a)throw new Error("changePassword: both 'currentPassword' and 'newPassword' are required");return this.request("PUT",`/users/change-password/${r}`,{currentPassword:s,newPassword:a,appId:i||this.appId})}async deleteUser(e){const{userId:r,appId:s}=e;if(!r)throw new Error("deleteUser: 'userId' is required");return this.request("DELETE",`/users/delete/${r}`,{appId:s||this.appId})}async getProfile(e){const{token:r}=e;if(!r)throw new Error("getProfile: 'token' is required");return this.request("GET","/users/profile",{},{Authorization:`Bearer ${r}`})}async sendVerifyOTP(e){const{token:r,appId:s}=e;if(!r)throw new Error("sendVerifyOTP: 'token' is required");return this.request("POST","/users/send-verify-otp",{appId:s||this.appId},{Authorization:`Bearer ${r}`})}async verifyEmail(e){const{token:r,otp:s,appId:a}=e;if(!r)throw new Error("verifyEmail: 'token' is required");if(!s)throw new Error("verifyEmail: 'otp' is required");return this.request("POST","/users/verify-email",{otp:s,appId:a||this.appId},{Authorization:`Bearer ${r}`})}async forgotPassword(e){const{email:r,appId:s}=e;if(!r)throw new Error("forgotPassword: 'email' is required");return this.request("POST","/users/forgot-password",{email:r,appId:s||this.appId})}async resetPassword(e){const{email:r,otp:s,newPassword:a,appId:i}=e;if(!r||!s||!a)throw new Error("resetPassword: 'email', 'otp' and 'newPassword' are required");return this.request("POST","/users/reset-password",{email:r,otp:s,newPassword:a,appId:i||this.appId})}async checkUser(e){if(!e)throw new Error("checkUser: 'userId' is required");if(!this.appId)throw new Error("checkUser: SDK 'appId' is missing in config");return this.request("GET",`/users/check-user/${e}?appId=${this.appId}`)}async searchAllUsersData(e){if(!this.appId)throw new Error("searchAllUsersData: appId missing");const r=new URLSearchParams(e).toString();return this.request("GET",`/users/${this.appId}/data/search?${r}`)}async searchUserData(e){const{userId:r,...s}=e;if(!r)throw new Error("userId required");const a=new URLSearchParams(s).toString();return this.request("GET",`/users/${r}/data/search?${a}`)}async searchUserDataByKeys(e){const{userId:r,...s}=e;if(!r)throw new Error("searchUserDataByKeys: 'userId' is required");const a=new URLSearchParams(Object.entries(s).reduce((i,[o,l])=>(l!=null&&(i[o]=String(l)),i),{})).toString();return this.request("GET",`/users/${r}/data/searchbyref?${a}`)}async searchAllUsersDataByKeys(e){const r=this.appId;if(!r)throw new Error("searchAllUsersDataByKeys: 'appId' is required on SDK initialization");const s=new URLSearchParams(Object.entries(e).reduce((a,[i,o])=>(o!=null&&(a[i]=String(o)),a),{})).toString();return this.request("GET",`/users/${encodeURIComponent(r)}/data/searchbyref/all?${s}`)}async getAllUsersData(){if(!this.appId)throw new Error("getAllUsersData: SDK 'appId' is missing in config");return this.request("GET",`/users/all-data/${this.appId}/data`)}async getUserData(e){const{userId:r}=e;if(!r)throw new Error("getUserData: 'userId' is required");return this.request("GET",`/users/${r}/data`)}async getSingleUserData(e){const{userId:r,dataId:s}=e;if(!r||!s)throw new Error("getSingleUserData: 'userId' and 'dataId' are required");return this.request("GET",`/users/${r}/data/${s}`)}async addUserData(e){const{userId:r,dataCategory:s,data:a}=e;if(!r)throw new Error("addUserData: 'userId' is required");if(!s)throw new Error("addUserData: 'dataCategory' is required");if(!a)throw new Error("addUserData: 'data' is required");return this.request("POST",`/users/${r}/data`,{dataCategory:s,...a})}async updateUserData(e){const{userId:r,dataId:s,data:a}=e;if(!r||!s)throw new Error("updateUserData: 'userId' and 'dataId' are required");if(!a)throw new Error("updateUserData: 'data' is required");return this.request("PUT",`/users/${r}/data/${s}`,a)}async deleteUserData(e){const{userId:r,dataId:s}=e;if(!r||!s)throw new Error("deleteUserData: 'userId' and 'dataId' are required");return this.request("DELETE",`/users/${r}/data/${s}`)}async getAppData(e){const r=this.appId;if(!r)throw new Error("getAppData: 'appId' is required");const s=e?`?category=${encodeURIComponent(e)}`:"";return(await this.request("GET",`/app/${r}/data${s}`))?.data||[]}async getSingleAppData(e){const r=this.appId;if(!r)throw new Error("getSingleAppData: 'appId' is required");if(!e.dataId)throw new Error("getSingleAppData: 'dataId' is required");return(await this.request("GET",`/app/${r}/data/${e.dataId}`))?.data}async searchAppDataByKeys(e){const r=this.appId;if(!r)throw new Error("searchAppDataByKeys: 'appId' is required");if(!e||typeof e!="object")throw new Error("searchAppDataByKeys: params object is required");return(await this.request("POST",`/app/${encodeURIComponent(r)}/data/searchByKeys`,e))?.data||[]}async addAppData(e){const r=this.appId;if(!r)throw new Error("addAppData: 'appId' is required");const{dataCategory:s,data:a}=e;if(!s)throw new Error("addAppData: 'dataCategory' is required");if(!a||typeof a!="object")throw new Error("addAppData: 'data' is required");return(await this.request("POST",`/app/${r}/data/${encodeURIComponent(s)}`,{item:a}))?.data}async updateAppData(e){const r=this.appId;if(!r)throw new Error("updateAppData: 'appId' is required");if(!e.dataId)throw new Error("updateAppData: 'dataId' is required");if(!e.data)throw new Error("updateAppData: 'data' is required");return(await this.request("PATCH",`/app/${r}/data/${e.dataId}`,e.data))?.data}async deleteAppData(e){const r=this.appId;if(!r)throw new Error("deleteAppData: 'appId' is required");if(!e.dataId)throw new Error("deleteAppData: 'dataId' is required");return(await this.request("DELETE",`/app/${r}/data/${e.dataId}`))?.data}}var qe={exports:{}},Te={};/**
|
|
6
|
+
`+i):s.stack=i}catch{}}throw s}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=fe(this.defaults,r);const{transitional:s,paramsSerializer:a,headers:i}=r;s!==void 0&&Fe.assertOptions(s,{silentJSONParsing:ie.transitional(ie.boolean),forcedJSONParsing:ie.transitional(ie.boolean),clarifyTimeoutError:ie.transitional(ie.boolean)},!1),a!=null&&(p.isFunction(a)?r.paramsSerializer={serialize:a}:Fe.assertOptions(a,{encode:ie.function,serialize:ie.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Fe.assertOptions(r,{baseUrl:ie.spelling("baseURL"),withXsrfToken:ie.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=i&&p.merge(i.common,i[r.method]);i&&p.forEach(["delete","get","head","post","put","patch","common"],c=>{delete i[c]}),r.headers=ne.concat(o,i);const l=[];let h=!0;this.interceptors.request.forEach(function(j){typeof j.runWhen=="function"&&j.runWhen(r)===!1||(h=h&&j.synchronous,l.unshift(j.fulfilled,j.rejected))});const d=[];this.interceptors.response.forEach(function(j){d.push(j.fulfilled,j.rejected)});let u,b=0,y;if(!h){const c=[Ht.bind(this),void 0];for(c.unshift(...l),c.push(...d),y=c.length,u=Promise.resolve(r);b<y;)u=u.then(c[b++],c[b++]);return u}y=l.length;let S=r;for(;b<y;){const c=l[b++],j=l[b++];try{S=c(S)}catch(m){j.call(this,m);break}}try{u=Ht.call(this,S)}catch(c){return Promise.reject(c)}for(b=0,y=d.length;b<y;)u=u.then(d[b++],d[b++]);return u}getUri(e){e=fe(this.defaults,e);const r=_t(e.baseURL,e.url,e.allowAbsoluteUrls);return kt(r,e.params,e.paramsSerializer)}};p.forEach(["delete","get","head","options"],function(e){xe.prototype[e]=function(r,s){return this.request(fe(s||{},{method:e,url:r,data:(s||{}).data}))}}),p.forEach(["post","put","patch"],function(e){function r(s){return function(i,o,l){return this.request(fe(l||{},{method:e,headers:s?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}xe.prototype[e]=r(),xe.prototype[e+"Form"]=r(!0)});let Tn=class or{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const s=this;this.promise.then(a=>{if(!s._listeners)return;let i=s._listeners.length;for(;i-- >0;)s._listeners[i](a);s._listeners=null}),this.promise.then=a=>{let i;const o=new Promise(l=>{s.subscribe(l),i=l}).then(a);return o.cancel=function(){s.unsubscribe(i)},o},e(function(i,o,l){s.reason||(s.reason=new be(i,o,l),r(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const e=new AbortController,r=s=>{e.abort(s)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new or(function(a){e=a}),cancel:e}}};function In(t){return function(r){return t.apply(null,r)}}function Pn(t){return p.isObject(t)&&t.isAxiosError===!0}const et={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(et).forEach(([t,e])=>{et[e]=t});function Kt(t){const e=new xe(t),r=ct(xe.prototype.request,e);return p.extend(r,xe.prototype,e,{allOwnKeys:!0}),p.extend(r,e,null,{allOwnKeys:!0}),r.create=function(a){return Kt(fe(t,a))},r}const M=Kt(ke);M.Axios=xe,M.CanceledError=be,M.CancelToken=Tn,M.isCancel=Ot,M.VERSION=Vt,M.toFormData=$e,M.AxiosError=D,M.Cancel=M.CanceledError,M.all=function(e){return Promise.all(e)},M.spread=In,M.isAxiosError=Pn,M.mergeConfig=fe,M.AxiosHeaders=ne,M.formToJSON=t=>It(p.isHTMLForm(t)?new FormData(t):t),M.getAdapter=Wt.getAdapter,M.HttpStatusCode=et,M.default=M;const{Axios:bs,AxiosError:ws,CanceledError:Ss,isCancel:js,CancelToken:vs,VERSION:Es,all:ks,Cancel:Cs,isAxiosError:Ts,spread:Is,toFormData:Ps,AxiosHeaders:Os,HttpStatusCode:Rs,formToJSON:As,getAdapter:zs,mergeConfig:_s}=M;class On{baseUrl;apiKey;appId;client;constructor(e){if(!e||!e.baseUrl)throw new Error("NeuctraAuthixClient: 'baseUrl' is required in config");this.baseUrl=e.baseUrl.replace(/\/$/,""),this.apiKey=e.apiKey||null,this.appId=e.appId||null,this.client=M.create({baseURL:this.baseUrl,headers:{"Content-Type":"application/json",...this.apiKey?{"x-api-key":this.apiKey}:{}},timeout:1e4})}async request(e,r,s,a={}){if(!e)throw new Error("HTTP method is required");if(!r)throw new Error("Request path is required");try{const i={...this.appId?{appId:this.appId}:{},...s||{}};return(await this.client.request({url:r,method:e,data:i,headers:a})).data}catch(i){if(console.error("❌ [Request Error]:",i),i.isAxiosError){const o=i.response?.status||0,l=i.response?.data?.message||i.message||"Unknown Axios error occurred";throw new Error(`Request failed (${o}): ${l}`)}throw new Error(`Unexpected error: ${i.message||"Unknown failure"}`)}}async signup(e){const{name:r,email:s,password:a}=e;if(!r||!s||!a)throw new Error("signup: 'name', 'email', and 'password' are required");return this.request("POST","/users/signup",e)}async login(e){const{email:r,password:s,appId:a}=e;if(!r||!s)throw new Error("login: 'email' and 'password' are required");return this.request("POST","/users/login",{email:r,password:s,appId:a||this.appId})}async updateUser(e){const{userId:r,appId:s}=e;if(!r)throw new Error("updateUser: 'userId' is required");return this.request("PUT",`/users/update/${r}`,{...e,appId:s||this.appId})}async changePassword(e){const{userId:r,currentPassword:s,newPassword:a,appId:i}=e;if(!r)throw new Error("changePassword: 'userId' is required");if(!s||!a)throw new Error("changePassword: both 'currentPassword' and 'newPassword' are required");return this.request("PUT",`/users/change-password/${r}`,{currentPassword:s,newPassword:a,appId:i||this.appId})}async deleteUser(e){const{userId:r,appId:s}=e;if(!r)throw new Error("deleteUser: 'userId' is required");return this.request("DELETE",`/users/delete/${r}`,{appId:s||this.appId})}async getProfile(e){const{token:r}=e;if(!r)throw new Error("getProfile: 'token' is required");return this.request("GET","/users/profile",{},{Authorization:`Bearer ${r}`})}async sendVerifyOTP(e){const{token:r,appId:s}=e;if(!r)throw new Error("sendVerifyOTP: 'token' is required");return this.request("POST","/users/send-verify-otp",{appId:s||this.appId},{Authorization:`Bearer ${r}`})}async verifyEmail(e){const{token:r,otp:s,appId:a}=e;if(!r)throw new Error("verifyEmail: 'token' is required");if(!s)throw new Error("verifyEmail: 'otp' is required");return this.request("POST","/users/verify-email",{otp:s,appId:a||this.appId},{Authorization:`Bearer ${r}`})}async forgotPassword(e){const{email:r,appId:s}=e;if(!r)throw new Error("forgotPassword: 'email' is required");return this.request("POST","/users/forgot-password",{email:r,appId:s||this.appId})}async resetPassword(e){const{email:r,otp:s,newPassword:a,appId:i}=e;if(!r||!s||!a)throw new Error("resetPassword: 'email', 'otp' and 'newPassword' are required");return this.request("POST","/users/reset-password",{email:r,otp:s,newPassword:a,appId:i||this.appId})}async checkUser(e){if(!e)throw new Error("checkUser: 'userId' is required");if(!this.appId)throw new Error("checkUser: SDK 'appId' is missing in config");return this.request("GET",`/users/check-user/${e}?appId=${this.appId}`)}async searchAllUsersData(e){if(!this.appId)throw new Error("searchAllUsersData: appId missing");const r=new URLSearchParams(e).toString();return this.request("GET",`/users/${this.appId}/data/search?${r}`)}async searchUserData(e){const{userId:r,...s}=e;if(!r)throw new Error("userId required");const a=new URLSearchParams(s).toString();return this.request("GET",`/users/${r}/data/search?${a}`)}async searchUserDataByKeys(e){const{userId:r,...s}=e;if(!r)throw new Error("searchUserDataByKeys: 'userId' is required");const a=new URLSearchParams(Object.entries(s).reduce((i,[o,l])=>(l!=null&&(i[o]=String(l)),i),{})).toString();return this.request("GET",`/users/${r}/data/searchbyref?${a}`)}async searchAllUsersDataByKeys(e){const r=this.appId;if(!r)throw new Error("searchAllUsersDataByKeys: 'appId' is required on SDK initialization");const s=new URLSearchParams(Object.entries(e).reduce((a,[i,o])=>(o!=null&&(a[i]=String(o)),a),{})).toString();return this.request("GET",`/users/${encodeURIComponent(r)}/data/searchbyref/all?${s}`)}async getAllUsersData(){if(!this.appId)throw new Error("getAllUsersData: SDK 'appId' is missing in config");return this.request("GET",`/users/all-data/${this.appId}/data`)}async getUserData(e){const{userId:r}=e;if(!r)throw new Error("getUserData: 'userId' is required");return this.request("GET",`/users/${r}/data`)}async getSingleUserData(e){const{userId:r,dataId:s}=e;if(!r||!s)throw new Error("getSingleUserData: 'userId' and 'dataId' are required");return this.request("GET",`/users/${r}/data/${s}`)}async addUserData(e){const{userId:r,dataCategory:s,data:a}=e;if(!r)throw new Error("addUserData: 'userId' is required");if(!s)throw new Error("addUserData: 'dataCategory' is required");if(!a)throw new Error("addUserData: 'data' is required");return this.request("POST",`/users/${r}/data`,{dataCategory:s,...a})}async updateUserData(e){const{userId:r,dataId:s,data:a}=e;if(!r||!s)throw new Error("updateUserData: 'userId' and 'dataId' are required");if(!a)throw new Error("updateUserData: 'data' is required");return this.request("PUT",`/users/${r}/data/${s}`,a)}async deleteUserData(e){const{userId:r,dataId:s}=e;if(!r||!s)throw new Error("deleteUserData: 'userId' and 'dataId' are required");return this.request("DELETE",`/users/${r}/data/${s}`)}async getAppData(e){const r=this.appId;if(!r)throw new Error("getAppData: 'appId' is required");const s=e?`?category=${encodeURIComponent(e)}`:"";return(await this.request("GET",`/app/${r}/data${s}`))?.data||[]}async getSingleAppData(e){const r=this.appId;if(!r)throw new Error("getSingleAppData: 'appId' is required");if(!e.dataId)throw new Error("getSingleAppData: 'dataId' is required");return(await this.request("GET",`/app/${r}/data/${e.dataId}`))?.data}async searchAppDataByKeys(e){const r=this.appId;if(!r)throw new Error("searchAppDataByKeys: 'appId' is required");if(!e||typeof e!="object")throw new Error("searchAppDataByKeys: params object is required");return(await this.request("POST",`/app/${encodeURIComponent(r)}/data/search/bykeys`,e))?.data||[]}async addAppData(e){const r=this.appId;if(!r)throw new Error("addAppData: 'appId' is required");const{dataCategory:s,data:a}=e;if(!s)throw new Error("addAppData: 'dataCategory' is required");if(!a||typeof a!="object")throw new Error("addAppData: 'data' is required");return(await this.request("POST",`/app/${r}/data/${encodeURIComponent(s)}`,{item:a}))?.data}async updateAppData(e){const r=this.appId;if(!r)throw new Error("updateAppData: 'appId' is required");if(!e.dataId)throw new Error("updateAppData: 'dataId' is required");if(!e.data)throw new Error("updateAppData: 'data' is required");return(await this.request("PATCH",`/app/${r}/data/${e.dataId}`,e.data))?.data}async deleteAppData(e){const r=this.appId;if(!r)throw new Error("deleteAppData: 'appId' is required");if(!e.dataId)throw new Error("deleteAppData: 'dataId' is required");return(await this.request("DELETE",`/app/${r}/data/${e.dataId}`))?.data}}var qe={exports:{}},Te={};/**
|
|
7
7
|
* @license React
|
|
8
8
|
* react-jsx-runtime.production.js
|
|
9
9
|
*
|
package/dist/sdk/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,UAAU,mBAAmB;IAC3B,4CAA4C;IAC5C,OAAO,EAAE,MAAM,CAAC;IAChB,iCAAiC;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,UAAU,YAAY;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,CAAC,EAAE,O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