60p82u21t54k 1.1.3 → 1.1.5
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/60p82u21t54k.cjs.js +1 -1
- package/dist/60p82u21t54k.es.js +190 -194
- package/dist/60p82u21t54k.umd.js +1 -1
- package/dist/api/autoRegister/autoRegisterApi.d.ts.map +1 -1
- package/dist/api/general/api.d.ts +2 -4
- package/dist/api/general/api.d.ts.map +1 -1
- package/dist/api/general/type.d.ts +0 -11
- package/dist/api/general/type.d.ts.map +1 -1
- package/dist/api/getMaintenanceMode/getMaintenanceModeApi.d.ts.map +1 -1
- package/dist/api/jackpotData/jackpotDataApi.d.ts.map +1 -1
- package/dist/api/loadMatch/loadMatchApi.d.ts.map +1 -1
- package/dist/api/login/loginApi.d.ts.map +1 -1
- package/dist/api/logout/logoutApi.d.ts.map +1 -1
- package/dist/api/rename/renameApi.d.ts.map +1 -1
- package/dist/api/setLocale/setLocaleApi.d.ts.map +1 -1
- package/dist/api/socialLogin/socialLoginApi.d.ts.map +1 -1
- package/dist/api/telegramLogin/telegramLoginApi.d.ts.map +1 -1
- package/dist/util/axiosConfig.d.ts +2 -0
- package/dist/util/axiosConfig.d.ts.map +1 -1
- package/package.json +5 -2
- package/dist/api/general/api_axios_backup.d.ts +0 -1
- package/dist/api/general/api_axios_backup.d.ts.map +0 -1
package/dist/60p82u21t54k.es.js
CHANGED
|
@@ -38,6 +38,83 @@ var __async = (__this, __arguments, generator) => {
|
|
|
38
38
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
39
39
|
});
|
|
40
40
|
};
|
|
41
|
+
import axios from "axios";
|
|
42
|
+
class DefaultApiModelRegistry {
|
|
43
|
+
constructor() {
|
|
44
|
+
__publicField(this, "models", /* @__PURE__ */ new Map());
|
|
45
|
+
}
|
|
46
|
+
register(apiName, transformer, requestModifier, responseModifier) {
|
|
47
|
+
this.models.set(apiName, {
|
|
48
|
+
transformer: { transform: transformer },
|
|
49
|
+
requestModifier: { modifyRequest: requestModifier },
|
|
50
|
+
responseModifier: { modifyResponse: responseModifier }
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
getTransformer(apiName) {
|
|
54
|
+
var _a;
|
|
55
|
+
return ((_a = this.models.get(apiName)) == null ? void 0 : _a.transformer) || null;
|
|
56
|
+
}
|
|
57
|
+
getRequestModifier(apiName) {
|
|
58
|
+
var _a;
|
|
59
|
+
return ((_a = this.models.get(apiName)) == null ? void 0 : _a.requestModifier) || null;
|
|
60
|
+
}
|
|
61
|
+
getResponseModifier(apiName) {
|
|
62
|
+
var _a;
|
|
63
|
+
return ((_a = this.models.get(apiName)) == null ? void 0 : _a.responseModifier) || null;
|
|
64
|
+
}
|
|
65
|
+
hasModel(apiName) {
|
|
66
|
+
return this.models.has(apiName);
|
|
67
|
+
}
|
|
68
|
+
// Get all registered API names
|
|
69
|
+
getRegisteredApis() {
|
|
70
|
+
return Array.from(this.models.keys());
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
const apiModelRegistry = new DefaultApiModelRegistry();
|
|
74
|
+
const processApiTransformation = (apiName, rawResponse) => {
|
|
75
|
+
const transformer = apiModelRegistry.getTransformer(apiName);
|
|
76
|
+
if (transformer) {
|
|
77
|
+
return transformer.transform(rawResponse);
|
|
78
|
+
}
|
|
79
|
+
return rawResponse;
|
|
80
|
+
};
|
|
81
|
+
const processRequestModifications = (requests) => {
|
|
82
|
+
let modifiedRequests = [...requests];
|
|
83
|
+
for (const request of requests) {
|
|
84
|
+
const modifier = apiModelRegistry.getRequestModifier(request.name);
|
|
85
|
+
if (modifier) {
|
|
86
|
+
modifiedRequests = modifier.modifyRequest(modifiedRequests);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return modifiedRequests;
|
|
90
|
+
};
|
|
91
|
+
const processResponseModifications = (result) => {
|
|
92
|
+
let modifiedResult = __spreadValues({}, result);
|
|
93
|
+
for (const apiName of Object.keys(result)) {
|
|
94
|
+
const modifier = apiModelRegistry.getResponseModifier(apiName);
|
|
95
|
+
if (modifier) {
|
|
96
|
+
modifiedResult = modifier.modifyResponse(modifiedResult);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return modifiedResult;
|
|
100
|
+
};
|
|
101
|
+
const getAnnouncementResponse = (raw) => {
|
|
102
|
+
var _a;
|
|
103
|
+
return (_a = raw == null ? void 0 : raw.map((item) => {
|
|
104
|
+
var _a2;
|
|
105
|
+
return {
|
|
106
|
+
alert: item.announcement_alert === "1",
|
|
107
|
+
content: (_a2 = item.announcement_simplified) != null ? _a2 : "",
|
|
108
|
+
lastUpdatedTime: item.announcement_lastupdated
|
|
109
|
+
};
|
|
110
|
+
})) != null ? _a : [];
|
|
111
|
+
};
|
|
112
|
+
const modifyAnnouncementRequest = (requests) => {
|
|
113
|
+
return requests;
|
|
114
|
+
};
|
|
115
|
+
const modifyAnnouncementResponse = (result) => {
|
|
116
|
+
return result;
|
|
117
|
+
};
|
|
41
118
|
let currentConfig = {
|
|
42
119
|
prefix: "188",
|
|
43
120
|
timezone: -4,
|
|
@@ -3960,6 +4037,9 @@ function fromZonedTime(date, timeZone, options) {
|
|
|
3960
4037
|
const offsetMilliseconds = tzParseTimezone(timeZone, new Date(utc));
|
|
3961
4038
|
return new Date(utc + offsetMilliseconds);
|
|
3962
4039
|
}
|
|
4040
|
+
const stringToBytes = (str) => {
|
|
4041
|
+
return new TextEncoder().encode(str);
|
|
4042
|
+
};
|
|
3963
4043
|
const base64Decode = (encodedData) => {
|
|
3964
4044
|
try {
|
|
3965
4045
|
return atob(encodedData);
|
|
@@ -4230,82 +4310,6 @@ const getImgPath = (initPath, gameId, versioning) => {
|
|
|
4230
4310
|
}
|
|
4231
4311
|
return path;
|
|
4232
4312
|
};
|
|
4233
|
-
class DefaultApiModelRegistry {
|
|
4234
|
-
constructor() {
|
|
4235
|
-
__publicField(this, "models", /* @__PURE__ */ new Map());
|
|
4236
|
-
}
|
|
4237
|
-
register(apiName, transformer, requestModifier, responseModifier) {
|
|
4238
|
-
this.models.set(apiName, {
|
|
4239
|
-
transformer: { transform: transformer },
|
|
4240
|
-
requestModifier: { modifyRequest: requestModifier },
|
|
4241
|
-
responseModifier: { modifyResponse: responseModifier }
|
|
4242
|
-
});
|
|
4243
|
-
}
|
|
4244
|
-
getTransformer(apiName) {
|
|
4245
|
-
var _a;
|
|
4246
|
-
return ((_a = this.models.get(apiName)) == null ? void 0 : _a.transformer) || null;
|
|
4247
|
-
}
|
|
4248
|
-
getRequestModifier(apiName) {
|
|
4249
|
-
var _a;
|
|
4250
|
-
return ((_a = this.models.get(apiName)) == null ? void 0 : _a.requestModifier) || null;
|
|
4251
|
-
}
|
|
4252
|
-
getResponseModifier(apiName) {
|
|
4253
|
-
var _a;
|
|
4254
|
-
return ((_a = this.models.get(apiName)) == null ? void 0 : _a.responseModifier) || null;
|
|
4255
|
-
}
|
|
4256
|
-
hasModel(apiName) {
|
|
4257
|
-
return this.models.has(apiName);
|
|
4258
|
-
}
|
|
4259
|
-
// Get all registered API names
|
|
4260
|
-
getRegisteredApis() {
|
|
4261
|
-
return Array.from(this.models.keys());
|
|
4262
|
-
}
|
|
4263
|
-
}
|
|
4264
|
-
const apiModelRegistry = new DefaultApiModelRegistry();
|
|
4265
|
-
const processApiTransformation = (apiName, rawResponse) => {
|
|
4266
|
-
const transformer = apiModelRegistry.getTransformer(apiName);
|
|
4267
|
-
if (transformer) {
|
|
4268
|
-
return transformer.transform(rawResponse);
|
|
4269
|
-
}
|
|
4270
|
-
return rawResponse;
|
|
4271
|
-
};
|
|
4272
|
-
const processRequestModifications = (requests) => {
|
|
4273
|
-
let modifiedRequests = [...requests];
|
|
4274
|
-
for (const request of requests) {
|
|
4275
|
-
const modifier = apiModelRegistry.getRequestModifier(request.name);
|
|
4276
|
-
if (modifier) {
|
|
4277
|
-
modifiedRequests = modifier.modifyRequest(modifiedRequests);
|
|
4278
|
-
}
|
|
4279
|
-
}
|
|
4280
|
-
return modifiedRequests;
|
|
4281
|
-
};
|
|
4282
|
-
const processResponseModifications = (result) => {
|
|
4283
|
-
let modifiedResult = __spreadValues({}, result);
|
|
4284
|
-
for (const apiName of Object.keys(result)) {
|
|
4285
|
-
const modifier = apiModelRegistry.getResponseModifier(apiName);
|
|
4286
|
-
if (modifier) {
|
|
4287
|
-
modifiedResult = modifier.modifyResponse(modifiedResult);
|
|
4288
|
-
}
|
|
4289
|
-
}
|
|
4290
|
-
return modifiedResult;
|
|
4291
|
-
};
|
|
4292
|
-
const getAnnouncementResponse = (raw) => {
|
|
4293
|
-
var _a;
|
|
4294
|
-
return (_a = raw == null ? void 0 : raw.map((item) => {
|
|
4295
|
-
var _a2;
|
|
4296
|
-
return {
|
|
4297
|
-
alert: item.announcement_alert === "1",
|
|
4298
|
-
content: (_a2 = item.announcement_simplified) != null ? _a2 : "",
|
|
4299
|
-
lastUpdatedTime: item.announcement_lastupdated
|
|
4300
|
-
};
|
|
4301
|
-
})) != null ? _a : [];
|
|
4302
|
-
};
|
|
4303
|
-
const modifyAnnouncementRequest = (requests) => {
|
|
4304
|
-
return requests;
|
|
4305
|
-
};
|
|
4306
|
-
const modifyAnnouncementResponse = (result) => {
|
|
4307
|
-
return result;
|
|
4308
|
-
};
|
|
4309
4313
|
const getGameListResponse = (raw) => {
|
|
4310
4314
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
4311
4315
|
return {
|
|
@@ -10297,49 +10301,110 @@ const registerAllApiModels = () => {
|
|
|
10297
10301
|
}
|
|
10298
10302
|
};
|
|
10299
10303
|
registerAllApiModels();
|
|
10300
|
-
const
|
|
10301
|
-
|
|
10302
|
-
|
|
10303
|
-
|
|
10304
|
-
|
|
10305
|
-
|
|
10306
|
-
|
|
10307
|
-
|
|
10304
|
+
const axiosInstance = axios.create({
|
|
10305
|
+
baseURL: "",
|
|
10306
|
+
timeout: 29e3,
|
|
10307
|
+
// Request timeout
|
|
10308
|
+
headers: {
|
|
10309
|
+
"Content-Type": "application/json"
|
|
10310
|
+
}
|
|
10311
|
+
// params: { apiKey: 'your-api-key' }, // Default query parameters that will be sent with each request.
|
|
10312
|
+
// auth: { username: 'user', password: 'pass' }, // Basic authentication credentials.
|
|
10313
|
+
// responseEncoding: 'utf8', // Indicates the encoding to use for the response.
|
|
10314
|
+
// responseType: 'json', // Specifies the type of data the server will respond with.
|
|
10315
|
+
// xsrfCookieName: 'XSRF-TOKEN', // The name of the cookie to use as a value for the xsrf token.
|
|
10316
|
+
// xsrfHeaderName: 'X-XSRF-TOKEN', // The name of the HTTP header that carries the xsrf token value.
|
|
10317
|
+
// maxContentLength: 2000, // The maximum size of the HTTP response content in bytes allowed.
|
|
10318
|
+
// maxBodyLength: 2000, // The maximum size of the request body in bytes allowed.
|
|
10319
|
+
// // Allows changes to the request data before it is sent to the server.
|
|
10320
|
+
// transformRequest: [
|
|
10321
|
+
// (data, headers) => {
|
|
10322
|
+
// console.log(headers)
|
|
10323
|
+
// console.log(data)
|
|
10324
|
+
// // Modify data and headers here
|
|
10325
|
+
// return data
|
|
10326
|
+
// },
|
|
10327
|
+
// ],
|
|
10328
|
+
// // Allows changes to the response data before it is passed to then or catch.
|
|
10329
|
+
// transformResponse: [
|
|
10330
|
+
// (data) => {
|
|
10331
|
+
// // Modify data here
|
|
10332
|
+
// return data
|
|
10333
|
+
// },
|
|
10334
|
+
// ],
|
|
10335
|
+
// // Custom function to validate the response status code.
|
|
10336
|
+
// validateStatus: (status) => {
|
|
10337
|
+
// return status >= 200 && status < 300 // default
|
|
10338
|
+
// },
|
|
10339
|
+
// withCredentials: true, // Indicates whether or not cross-site Access-Control requests should be made using credentials.
|
|
10340
|
+
// // Defines the proxy server settings.
|
|
10341
|
+
// proxy: {
|
|
10342
|
+
// host: '127.0.0.1',
|
|
10343
|
+
// port: 9000,
|
|
10344
|
+
// auth: {
|
|
10345
|
+
// username: 'proxyuser',
|
|
10346
|
+
// password: 'proxypass',
|
|
10347
|
+
// },
|
|
10348
|
+
// },
|
|
10349
|
+
});
|
|
10350
|
+
axiosInstance.interceptors.request.use(
|
|
10351
|
+
(config2) => {
|
|
10352
|
+
const token = localStorage.getItem("token");
|
|
10353
|
+
if (token) {
|
|
10354
|
+
config2.headers.Authorization = `Bearer ${token}`;
|
|
10355
|
+
}
|
|
10356
|
+
return config2;
|
|
10357
|
+
},
|
|
10358
|
+
(error) => {
|
|
10359
|
+
console.error("Error request:", error.response);
|
|
10360
|
+
return Promise.reject(error);
|
|
10361
|
+
}
|
|
10362
|
+
);
|
|
10363
|
+
axiosInstance.interceptors.response.use(
|
|
10364
|
+
(response) => {
|
|
10365
|
+
return response;
|
|
10366
|
+
},
|
|
10367
|
+
(error) => {
|
|
10368
|
+
const errorResponse = {
|
|
10369
|
+
status: null,
|
|
10370
|
+
message: "An error occurred"
|
|
10371
|
+
};
|
|
10372
|
+
if (error.response) {
|
|
10373
|
+
errorResponse.status = error.response.status;
|
|
10374
|
+
errorResponse.message = error.response.data.message || error.response.statusText;
|
|
10375
|
+
console.error("Error response:", JSON.stringify(errorResponse));
|
|
10376
|
+
if (error.response.status === 401) {
|
|
10377
|
+
console.error("Unauthorized access - redirecting to login.");
|
|
10378
|
+
} else if (error.response.status === 404) {
|
|
10379
|
+
console.error("Resource not found.");
|
|
10380
|
+
} else if (error.response.status >= 500) {
|
|
10381
|
+
console.error("Server error. Please try again later.");
|
|
10382
|
+
}
|
|
10383
|
+
} else if (error.request) {
|
|
10384
|
+
console.error("No response received:", error.request);
|
|
10385
|
+
} else {
|
|
10386
|
+
console.error("Error setting up request:", error.message);
|
|
10387
|
+
}
|
|
10308
10388
|
return Promise.reject(errorResponse);
|
|
10309
10389
|
}
|
|
10310
|
-
|
|
10311
|
-
|
|
10312
|
-
data,
|
|
10313
|
-
status: response.status,
|
|
10314
|
-
msg: response.statusText,
|
|
10315
|
-
headers: response.headers,
|
|
10316
|
-
ok: response.ok
|
|
10317
|
-
};
|
|
10318
|
-
});
|
|
10319
|
-
const post = (requests, requestPath = `/graph/jwt`) => __async(void 0, null, function* () {
|
|
10390
|
+
);
|
|
10391
|
+
const post = (requests) => __async(void 0, null, function* () {
|
|
10320
10392
|
const modifiedRequests = processRequestModifications(requests);
|
|
10321
10393
|
const requestData = modifiedRequests.map((item) => ({
|
|
10322
10394
|
name: item.name,
|
|
10323
10395
|
query: btoa(item.query)
|
|
10324
10396
|
}));
|
|
10325
10397
|
const payload = { requests: requestData };
|
|
10326
|
-
const response = yield
|
|
10327
|
-
|
|
10328
|
-
|
|
10329
|
-
|
|
10330
|
-
credentials: "include"
|
|
10331
|
-
});
|
|
10332
|
-
if (!response.ok) {
|
|
10333
|
-
const errorResponse = yield getErrorMessage(response);
|
|
10334
|
-
return Promise.reject(errorResponse);
|
|
10335
|
-
}
|
|
10336
|
-
const responseJSON = yield safeJson(response);
|
|
10398
|
+
const response = yield axiosInstance.post(
|
|
10399
|
+
`/graph/jwt`,
|
|
10400
|
+
stringToBytes(JSON.stringify(payload))
|
|
10401
|
+
);
|
|
10337
10402
|
const result = {
|
|
10338
10403
|
status: 200,
|
|
10339
10404
|
message: "",
|
|
10340
10405
|
result: {}
|
|
10341
10406
|
};
|
|
10342
|
-
for (const res of
|
|
10407
|
+
for (const res of response.data.responses) {
|
|
10343
10408
|
if (res.error != null && res.error.code != 200) {
|
|
10344
10409
|
result.status = res.error.code;
|
|
10345
10410
|
result.message = res.error.message;
|
|
@@ -10359,79 +10424,8 @@ const post = (requests, requestPath = `/graph/jwt`) => __async(void 0, null, fun
|
|
|
10359
10424
|
result.result = processResponseModifications(result.result);
|
|
10360
10425
|
return result;
|
|
10361
10426
|
});
|
|
10362
|
-
const customPost = (requestPath, request) => __async(void 0, null, function* () {
|
|
10363
|
-
const response = yield fetchWithTimeout(requestPath, {
|
|
10364
|
-
method: "POST",
|
|
10365
|
-
headers: authHeaders(),
|
|
10366
|
-
body: JSON.stringify(request),
|
|
10367
|
-
credentials: "include"
|
|
10368
|
-
});
|
|
10369
|
-
if (!response.ok) {
|
|
10370
|
-
const errorResponse = yield getErrorMessage(response);
|
|
10371
|
-
return Promise.reject(errorResponse);
|
|
10372
|
-
}
|
|
10373
|
-
const data = yield safeJson(response);
|
|
10374
|
-
const responses = Array.isArray(data == null ? void 0 : data.responses) ? data.responses.filter((res) => res == null ? void 0 : res.attributes) : [];
|
|
10375
|
-
if (responses.length === 0) {
|
|
10376
|
-
return true;
|
|
10377
|
-
}
|
|
10378
|
-
const firstResponse = responses[0];
|
|
10379
|
-
const decodedData = base64Decode(firstResponse.attributes);
|
|
10380
|
-
return JSON.parse(decodedData);
|
|
10381
|
-
});
|
|
10382
|
-
const fetchWithTimeout = (url, options, timeout = 29e3) => __async(void 0, null, function* () {
|
|
10383
|
-
const controller = new AbortController();
|
|
10384
|
-
const id = setTimeout(() => controller.abort(), timeout);
|
|
10385
|
-
try {
|
|
10386
|
-
const response = yield fetch(url, __spreadProps(__spreadValues({}, options), {
|
|
10387
|
-
signal: controller.signal
|
|
10388
|
-
}));
|
|
10389
|
-
return response;
|
|
10390
|
-
} finally {
|
|
10391
|
-
clearTimeout(id);
|
|
10392
|
-
}
|
|
10393
|
-
});
|
|
10394
|
-
const authHeaders = () => {
|
|
10395
|
-
const csrfToken = getCookie("XSRF-TOKEN");
|
|
10396
|
-
return {
|
|
10397
|
-
"Content-Type": "application/json",
|
|
10398
|
-
"X-XSRF-TOKEN": csrfToken
|
|
10399
|
-
};
|
|
10400
|
-
};
|
|
10401
|
-
const getCookie = (name) => {
|
|
10402
|
-
const match2 = document.cookie.match(new RegExp("(^| )" + name + "=([^;]+)"));
|
|
10403
|
-
return match2 ? decodeURIComponent(match2[2]) : "";
|
|
10404
|
-
};
|
|
10405
|
-
const safeJson = (response) => __async(void 0, null, function* () {
|
|
10406
|
-
try {
|
|
10407
|
-
if (response.status === 204 || response.headers.get("content-length") === "0") {
|
|
10408
|
-
return null;
|
|
10409
|
-
}
|
|
10410
|
-
return yield response.json();
|
|
10411
|
-
} catch (e) {
|
|
10412
|
-
return null;
|
|
10413
|
-
}
|
|
10414
|
-
});
|
|
10415
|
-
const getErrorMessage = (response) => __async(void 0, null, function* () {
|
|
10416
|
-
const errorBody = yield safeJson(response);
|
|
10417
|
-
const errorResponse = {
|
|
10418
|
-
status: response.status,
|
|
10419
|
-
message: (errorBody == null ? void 0 : errorBody.message) || response.statusText || "An error occurred"
|
|
10420
|
-
};
|
|
10421
|
-
console.error("Error response:", JSON.stringify(errorResponse));
|
|
10422
|
-
if (response.status === 401) {
|
|
10423
|
-
console.error("Unauthorized access - redirecting to login.");
|
|
10424
|
-
} else if (response.status === 404) {
|
|
10425
|
-
console.error("Resource not found.");
|
|
10426
|
-
} else if (response.status >= 500) {
|
|
10427
|
-
console.error("Server error. Please try again later.");
|
|
10428
|
-
}
|
|
10429
|
-
return errorResponse;
|
|
10430
|
-
});
|
|
10431
10427
|
const api = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
10432
10428
|
__proto__: null,
|
|
10433
|
-
customPost,
|
|
10434
|
-
get,
|
|
10435
10429
|
post
|
|
10436
10430
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
10437
10431
|
var ImageCategory = /* @__PURE__ */ ((ImageCategory2) => {
|
|
@@ -10460,7 +10454,7 @@ const autoRegisterApi = () => __async(void 0, null, function* () {
|
|
|
10460
10454
|
message: ""
|
|
10461
10455
|
}, DefaultAutoRegisterData);
|
|
10462
10456
|
try {
|
|
10463
|
-
const request = yield get("/graph/autoregister");
|
|
10457
|
+
const request = yield axiosInstance.get("/graph/autoregister");
|
|
10464
10458
|
const output = request.data;
|
|
10465
10459
|
result.data = {
|
|
10466
10460
|
status: output.status == 1,
|
|
@@ -10498,7 +10492,7 @@ const getMaintenanceModeApi = () => __async(void 0, null, function* () {
|
|
|
10498
10492
|
message: ""
|
|
10499
10493
|
}, DefaultGetMaintenanceModeData);
|
|
10500
10494
|
try {
|
|
10501
|
-
const request = yield get("/graph/getMaintenanceMode");
|
|
10495
|
+
const request = yield axiosInstance.get("/graph/getMaintenanceMode");
|
|
10502
10496
|
const output = request.data;
|
|
10503
10497
|
result.data = {
|
|
10504
10498
|
status: output.status == 1,
|
|
@@ -10532,7 +10526,7 @@ const jackpotDataApi = () => __async(void 0, null, function* () {
|
|
|
10532
10526
|
message: ""
|
|
10533
10527
|
}, DefaultjackpotData);
|
|
10534
10528
|
try {
|
|
10535
|
-
const request = yield get("/api/jackpotData");
|
|
10529
|
+
const request = yield axiosInstance.get("/api/jackpotData");
|
|
10536
10530
|
const output = request.data;
|
|
10537
10531
|
result.data = {
|
|
10538
10532
|
startTimestamp: output.startTimestamp,
|
|
@@ -10550,7 +10544,7 @@ const jackpotDataApi = () => __async(void 0, null, function* () {
|
|
|
10550
10544
|
return result;
|
|
10551
10545
|
});
|
|
10552
10546
|
const loadMatchApi = (gameId, stage, sportId, tagId, matchId) => __async(void 0, null, function* () {
|
|
10553
|
-
var _a, _b;
|
|
10547
|
+
var _a, _b, _c, _d;
|
|
10554
10548
|
let result = {
|
|
10555
10549
|
status: 200,
|
|
10556
10550
|
message: "",
|
|
@@ -10560,7 +10554,7 @@ const loadMatchApi = (gameId, stage, sportId, tagId, matchId) => __async(void 0,
|
|
|
10560
10554
|
}
|
|
10561
10555
|
};
|
|
10562
10556
|
try {
|
|
10563
|
-
const request = yield
|
|
10557
|
+
const request = yield axiosInstance.post(`/loadgame/${gameId}`, {
|
|
10564
10558
|
wanturl: 1,
|
|
10565
10559
|
extra: {
|
|
10566
10560
|
Stage: stage,
|
|
@@ -10571,11 +10565,11 @@ const loadMatchApi = (gameId, stage, sportId, tagId, matchId) => __async(void 0,
|
|
|
10571
10565
|
});
|
|
10572
10566
|
const output = request.data;
|
|
10573
10567
|
result = {
|
|
10574
|
-
status: 200,
|
|
10575
|
-
message: "",
|
|
10568
|
+
status: (_a = output.code) != null ? _a : 200,
|
|
10569
|
+
message: (_b = output.message) != null ? _b : "",
|
|
10576
10570
|
data: {
|
|
10577
|
-
message: (
|
|
10578
|
-
urlLink: (
|
|
10571
|
+
message: (_c = output.msg) != null ? _c : "",
|
|
10572
|
+
urlLink: (_d = output.data) != null ? _d : ""
|
|
10579
10573
|
}
|
|
10580
10574
|
};
|
|
10581
10575
|
} catch (error) {
|
|
@@ -10604,7 +10598,7 @@ const loginApi = (username, password, type = "") => __async(void 0, null, functi
|
|
|
10604
10598
|
if (type !== "") {
|
|
10605
10599
|
payload.type = type;
|
|
10606
10600
|
}
|
|
10607
|
-
yield
|
|
10601
|
+
yield axiosInstance.post("/graph/auth/sesh", payload);
|
|
10608
10602
|
result = {
|
|
10609
10603
|
status: 200,
|
|
10610
10604
|
message: ""
|
|
@@ -10624,7 +10618,7 @@ const logoutApi = () => __async(void 0, null, function* () {
|
|
|
10624
10618
|
message: ""
|
|
10625
10619
|
};
|
|
10626
10620
|
try {
|
|
10627
|
-
yield
|
|
10621
|
+
yield axiosInstance.post("/graph/auth/sesh/logout");
|
|
10628
10622
|
} catch (error) {
|
|
10629
10623
|
const extendedError = error;
|
|
10630
10624
|
result = {
|
|
@@ -10640,14 +10634,14 @@ const rename = (fullname) => __async(void 0, null, function* () {
|
|
|
10640
10634
|
message: ""
|
|
10641
10635
|
};
|
|
10642
10636
|
try {
|
|
10643
|
-
const request = yield
|
|
10637
|
+
const request = yield axiosInstance.post("/graph/rename", {
|
|
10644
10638
|
fullname
|
|
10645
10639
|
});
|
|
10646
10640
|
if (false) ;
|
|
10647
10641
|
const response = request.data;
|
|
10648
10642
|
result = {
|
|
10649
10643
|
status: response.status == 1 ? 200 : 509,
|
|
10650
|
-
message: response.msg ?
|
|
10644
|
+
message: response.msg ? request.data.msg : ""
|
|
10651
10645
|
};
|
|
10652
10646
|
} catch (error) {
|
|
10653
10647
|
const extendedError = error;
|
|
@@ -10671,11 +10665,13 @@ const setLocaleApi = (localeCode, udid) => __async(void 0, null, function* () {
|
|
|
10671
10665
|
message: ""
|
|
10672
10666
|
}, DefaultSetLocaleData);
|
|
10673
10667
|
try {
|
|
10674
|
-
const request = yield
|
|
10668
|
+
const request = yield axiosInstance.post("/graph/setlocale", {
|
|
10675
10669
|
language: localeCode,
|
|
10676
10670
|
udid: udid != null ? udid : ""
|
|
10677
10671
|
});
|
|
10678
|
-
const output =
|
|
10672
|
+
const output = JSON.parse(
|
|
10673
|
+
atob(request.data.responses[0].attributes)
|
|
10674
|
+
);
|
|
10679
10675
|
result.data = {
|
|
10680
10676
|
status: output.status == 1,
|
|
10681
10677
|
message: (_a = output.message) != null ? _a : ""
|
|
@@ -10695,7 +10691,7 @@ const telegramLoginApi = (data) => __async(void 0, null, function* () {
|
|
|
10695
10691
|
message: ""
|
|
10696
10692
|
};
|
|
10697
10693
|
try {
|
|
10698
|
-
yield
|
|
10694
|
+
yield axiosInstance.post("/loginVia/telegram", data);
|
|
10699
10695
|
result = {
|
|
10700
10696
|
status: 200,
|
|
10701
10697
|
message: ""
|
|
@@ -10727,7 +10723,7 @@ const socialLoginApi = (loginToken, loginEmail, loginMethod) => __async(void 0,
|
|
|
10727
10723
|
email: loginEmail,
|
|
10728
10724
|
social_type: loginMethod
|
|
10729
10725
|
};
|
|
10730
|
-
const request = yield
|
|
10726
|
+
const request = yield axiosInstance.post("/graph/socialLogin", payload);
|
|
10731
10727
|
const output = request.data;
|
|
10732
10728
|
result.data = {
|
|
10733
10729
|
status: output.status == 1,
|