60p82u21t54k 0.0.16 → 0.0.17
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.es.js +159 -153
- package/dist/60p82u21t54k.umd.js +1 -1
- package/dist/api/api.d.ts.map +1 -1
- package/dist/api/type.d.ts +4 -1
- package/dist/api/type.d.ts.map +1 -1
- package/dist/main.d.ts +1 -0
- package/dist/model/userProfile/getUserProfileResponse.d.ts +5 -0
- package/dist/model/userProfile/getUserProfileResponse.d.ts.map +1 -0
- package/dist/model/userProfile/rawType.d.ts +18 -0
- package/dist/model/userProfile/rawType.d.ts.map +1 -0
- package/dist/model/userProfile/type.d.ts +9 -0
- package/dist/model/userProfile/type.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/60p82u21t54k.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
const b =
|
|
1
|
+
import A from "axios";
|
|
2
|
+
const b = A.create({
|
|
3
3
|
baseURL: "/graph",
|
|
4
4
|
timeout: 5e3,
|
|
5
5
|
// Request timeout
|
|
@@ -59,58 +59,58 @@ b.interceptors.response.use(
|
|
|
59
59
|
return e.response ? (t.status = e.response.status, t.message = e.response.data.message || e.response.statusText, console.error("Error response:", JSON.stringify(t)), e.response.status === 401 ? console.error("Unauthorized access - redirecting to login.") : e.response.status === 404 ? console.error("Resource not found.") : e.response.status >= 500 && console.error("Server error. Please try again later.")) : e.request ? console.error("No response received:", e.request) : console.error("Error setting up request:", e.message), Promise.reject(t);
|
|
60
60
|
}
|
|
61
61
|
);
|
|
62
|
-
const
|
|
62
|
+
const R = (e) => new TextEncoder().encode(e), T = (e) => {
|
|
63
63
|
try {
|
|
64
64
|
return atob(e);
|
|
65
65
|
} catch (t) {
|
|
66
66
|
return console.error("Failed to decode Base64:", t), "";
|
|
67
67
|
}
|
|
68
68
|
};
|
|
69
|
-
var
|
|
69
|
+
var y = /* @__PURE__ */ ((e) => (e.announcement = "announcement", e.gameList = "gameList", e.fishGameList = "fishGameList", e.cmsList = "cmsList", e.paymentsProvider = "paymentsProvider", e.getUserProfile = "getUserProfile", e))(y || {});
|
|
70
70
|
const F = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
71
71
|
__proto__: null,
|
|
72
|
-
Api:
|
|
72
|
+
Api: y
|
|
73
73
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
74
|
-
var
|
|
74
|
+
var f = /* @__PURE__ */ ((e) => (e.default = "default", e.pay = "pay", e.auto = "auto", e.fix = "fix", e.manual = "manual", e.unknown = "unknown", e))(f || {});
|
|
75
75
|
const G = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
76
76
|
__proto__: null,
|
|
77
|
-
PaymentType:
|
|
78
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
79
|
-
const
|
|
77
|
+
PaymentType: f
|
|
78
|
+
}, Symbol.toStringTag, { value: "Module" })), O = (e) => e.mdPaymentChannels.map((t) => {
|
|
79
|
+
const s = [];
|
|
80
80
|
switch (t.name) {
|
|
81
|
-
case
|
|
82
|
-
|
|
81
|
+
case f.default:
|
|
82
|
+
s.push(k(t.paymentmethod.manual, e));
|
|
83
83
|
break;
|
|
84
|
-
case
|
|
85
|
-
|
|
84
|
+
case f.pay:
|
|
85
|
+
s.push(v(t.paymentmethod.onlinebanking, e));
|
|
86
86
|
break;
|
|
87
87
|
default:
|
|
88
|
-
if (t.paymentmethod.auto.bank.length > 0 &&
|
|
89
|
-
|
|
88
|
+
if (t.paymentmethod.auto.bank.length > 0 && s.push(
|
|
89
|
+
D(t.bankid ?? 0, t.paymentmethod.auto, e)
|
|
90
90
|
), t.paymentmethod.manual.bank.length > 0) {
|
|
91
91
|
let a = !1;
|
|
92
92
|
for (let n = 0; n < t.paymentmethod.manual.bank.length; n++) {
|
|
93
|
-
const
|
|
94
|
-
if (
|
|
93
|
+
const o = t.paymentmethod.manual.bank[n];
|
|
94
|
+
if (o.list && o.list.length > 0) {
|
|
95
95
|
a = !0;
|
|
96
96
|
break;
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
|
-
a &&
|
|
99
|
+
a && s.push(k(t.paymentmethod.manual, e));
|
|
100
100
|
}
|
|
101
|
-
t.paymentmethod.fixamount.bank.length > 0 &&
|
|
102
|
-
|
|
101
|
+
t.paymentmethod.fixamount.bank.length > 0 && s.push(
|
|
102
|
+
B(t.bankid ?? 0, t.paymentmethod.fixamount)
|
|
103
103
|
);
|
|
104
104
|
}
|
|
105
105
|
return {
|
|
106
106
|
name: t.label,
|
|
107
107
|
imageUrl: `/image/game/native/deposit/sidemenu/${t.name}.png?${e.systemtime}`,
|
|
108
|
-
paymentList:
|
|
108
|
+
paymentList: s
|
|
109
109
|
};
|
|
110
110
|
}), M = {
|
|
111
111
|
id: 0,
|
|
112
112
|
name: "",
|
|
113
|
-
type:
|
|
113
|
+
type: f.unknown,
|
|
114
114
|
promo: [],
|
|
115
115
|
bank: [],
|
|
116
116
|
requiredField: {
|
|
@@ -127,48 +127,48 @@ const G = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
127
127
|
name: "excludePromo",
|
|
128
128
|
value: "0",
|
|
129
129
|
disabled: !0
|
|
130
|
-
},
|
|
130
|
+
}, s = e.map((a, n) => ({
|
|
131
131
|
id: n + 1,
|
|
132
132
|
name: a.promodesc,
|
|
133
133
|
value: a.promoindex.toString(),
|
|
134
134
|
disabled: !1
|
|
135
135
|
}));
|
|
136
|
-
return [t, ...
|
|
137
|
-
}, x = (e, t,
|
|
138
|
-
let n,
|
|
139
|
-
|
|
136
|
+
return [t, ...s];
|
|
137
|
+
}, x = (e, t, s, a) => {
|
|
138
|
+
let n, o;
|
|
139
|
+
s > 0 ? n = e > 0 ? Math.max(s, e) : s : n = Math.max(e, 0), a > 0 ? o = t > 0 ? Math.min(a, t) : a : o = Math.max(t, 0);
|
|
140
140
|
const u = Math.round(n);
|
|
141
141
|
let i = 1e3;
|
|
142
|
-
|
|
142
|
+
o < i && (i = Math.round(o));
|
|
143
143
|
const m = i - u;
|
|
144
|
-
let
|
|
144
|
+
let r = "", d = "";
|
|
145
145
|
if (m > 0) {
|
|
146
146
|
let c = Math.round((i - u) * 0.25).toString().split(""), p = [];
|
|
147
|
-
for (const
|
|
148
|
-
|
|
149
|
-
for (let
|
|
150
|
-
|
|
147
|
+
for (const l of c)
|
|
148
|
+
l !== "" && p.push(l);
|
|
149
|
+
for (let l = 0; l < p.length; l++)
|
|
150
|
+
l === 0 ? r += (parseInt(p[l]) + 1).toString() : r += "0";
|
|
151
151
|
c = Math.round((i - u) * 0.5).toString().split(""), p = [];
|
|
152
|
-
for (const
|
|
153
|
-
|
|
154
|
-
for (let
|
|
155
|
-
|
|
152
|
+
for (const l of c)
|
|
153
|
+
l !== "" && p.push(l);
|
|
154
|
+
for (let l = 0; l < p.length; l++)
|
|
155
|
+
l === 0 ? d += (parseInt(p[l]) + 1).toString() : d += "0";
|
|
156
156
|
} else
|
|
157
|
-
|
|
157
|
+
r = i.toString(), d = i.toString();
|
|
158
158
|
return { amountList: [
|
|
159
159
|
u.toString(),
|
|
160
|
-
|
|
160
|
+
r,
|
|
161
161
|
d,
|
|
162
162
|
i.toString()
|
|
163
|
-
], minAmount: u, maxAmount:
|
|
163
|
+
], minAmount: u, maxAmount: o };
|
|
164
164
|
}, k = (e, t) => t ? {
|
|
165
165
|
id: 0,
|
|
166
166
|
name: "manualMethod",
|
|
167
|
-
type:
|
|
167
|
+
type: f.manual,
|
|
168
168
|
promo: S(e.promo),
|
|
169
169
|
bank: e.bank.map((n) => {
|
|
170
|
-
const
|
|
171
|
-
Number(
|
|
170
|
+
const o = n.list && n.list.length > 0 ? n.list[0].mintransaction ?? "0.00" : "0.00", u = n.list && n.list.length > 0 ? n.list[0].maxtransaction ?? "0.00" : "0.00", { amountList: i, minAmount: m, maxAmount: r } = x(
|
|
171
|
+
Number(o),
|
|
172
172
|
Number(u),
|
|
173
173
|
t.mdBankLevelDetail.deposit_min,
|
|
174
174
|
t.mdBankLevelDetail.deposit_max
|
|
@@ -182,106 +182,102 @@ const G = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
182
182
|
qrcode: n.list && n.list.length > 0 ? n.list[0].bankaccountdesc : "",
|
|
183
183
|
amountList: i,
|
|
184
184
|
min: m,
|
|
185
|
-
max:
|
|
185
|
+
max: r
|
|
186
186
|
};
|
|
187
187
|
}),
|
|
188
188
|
requiredField: {
|
|
189
189
|
...t.mdManualDepositRequireField,
|
|
190
190
|
uploadReceipt: t.mdUploadReceipt
|
|
191
191
|
}
|
|
192
|
-
} : M,
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
192
|
+
} : M, v = (e, t) => t ? {
|
|
193
|
+
id: 0,
|
|
194
|
+
name: "onlineBankingMethod",
|
|
195
|
+
type: f.pay,
|
|
196
|
+
promo: S(e.promo),
|
|
197
|
+
bank: e.banklist.map((n) => {
|
|
198
|
+
let o = "0.00", u = "0.00";
|
|
199
|
+
const i = n.bankindex ?? 0;
|
|
200
|
+
for (let c = 0; c < t.mdGatewayMinMax.length; c++)
|
|
201
|
+
t.mdGatewayMinMax[c].bankindex == i.toString() && (o = t.mdGatewayMinMax[c].min, u = t.mdGatewayMinMax[c].max);
|
|
202
|
+
const { amountList: m, minAmount: r, maxAmount: d } = x(
|
|
203
|
+
Number(o),
|
|
204
|
+
Number(u),
|
|
205
|
+
t.mdBankLevelDetail.onlinepayment_min,
|
|
206
|
+
t.mdBankLevelDetail.onlinepayment_max
|
|
207
|
+
), h = {
|
|
208
|
+
id: 0,
|
|
209
|
+
name: "autoChannel",
|
|
210
|
+
amountList: m,
|
|
211
|
+
min: r,
|
|
212
|
+
max: d
|
|
213
|
+
}, _ = n.pg.map((c) => {
|
|
214
|
+
const p = c.mintransaction ?? "0.00", L = c.maxtransaction ?? "0.00", { amountList: P, minAmount: l, maxAmount: N } = x(
|
|
215
|
+
Number(p),
|
|
216
|
+
Number(L),
|
|
207
217
|
t.mdBankLevelDetail.onlinepayment_min,
|
|
208
218
|
t.mdBankLevelDetail.onlinepayment_max
|
|
209
|
-
)
|
|
210
|
-
id: 0,
|
|
211
|
-
name: "autoChannel",
|
|
212
|
-
amountList: m,
|
|
213
|
-
min: l,
|
|
214
|
-
max: d
|
|
215
|
-
}, _ = n.pg.map((c) => {
|
|
216
|
-
const p = c.mintransaction ?? "0.00", L = c.maxtransaction ?? "0.00", { amountList: A, minAmount: r, maxAmount: R } = x(
|
|
217
|
-
Number(p),
|
|
218
|
-
Number(L),
|
|
219
|
-
t.mdBankLevelDetail.onlinepayment_min,
|
|
220
|
-
t.mdBankLevelDetail.onlinepayment_max
|
|
221
|
-
);
|
|
222
|
-
return {
|
|
223
|
-
id: c.pgindex,
|
|
224
|
-
name: c.bankaccountname,
|
|
225
|
-
amountList: A,
|
|
226
|
-
min: r,
|
|
227
|
-
max: R
|
|
228
|
-
};
|
|
229
|
-
});
|
|
219
|
+
);
|
|
230
220
|
return {
|
|
231
|
-
id:
|
|
232
|
-
name:
|
|
233
|
-
amountList:
|
|
234
|
-
min:
|
|
235
|
-
max:
|
|
236
|
-
gateway: [y, ..._]
|
|
221
|
+
id: c.pgindex,
|
|
222
|
+
name: c.bankaccountname,
|
|
223
|
+
amountList: P,
|
|
224
|
+
min: l,
|
|
225
|
+
max: N
|
|
237
226
|
};
|
|
238
|
-
})
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
227
|
+
});
|
|
228
|
+
return {
|
|
229
|
+
id: n.bankindex ?? 0,
|
|
230
|
+
name: n.banknameenglish ?? "",
|
|
231
|
+
amountList: [],
|
|
232
|
+
min: 0,
|
|
233
|
+
max: 0,
|
|
234
|
+
gateway: [h, ..._]
|
|
235
|
+
};
|
|
236
|
+
}),
|
|
237
|
+
requiredField: {
|
|
238
|
+
deposit_bank: !1,
|
|
239
|
+
deposit_datetime: !1,
|
|
240
|
+
deposit_detail: !1,
|
|
241
|
+
deposit_method: !1,
|
|
242
|
+
depositor: !1,
|
|
243
|
+
uploadReceipt: !1
|
|
244
|
+
}
|
|
245
|
+
} : M, D = (e, t, s) => {
|
|
246
|
+
if (!s) return M;
|
|
247
|
+
const a = f.auto;
|
|
252
248
|
let n = [];
|
|
253
|
-
const
|
|
254
|
-
if (t.bank.length > 0 &&
|
|
249
|
+
const o = s.mdGatewayMinMax;
|
|
250
|
+
if (t.bank.length > 0 && s.mdPGSelection == "1")
|
|
255
251
|
n = t.bank.map((i) => {
|
|
256
|
-
const { amountList: m, minAmount:
|
|
252
|
+
const { amountList: m, minAmount: r, maxAmount: d } = x(
|
|
257
253
|
i.minTransaction ?? 0,
|
|
258
254
|
i.maxTransaction ?? 0,
|
|
259
|
-
|
|
260
|
-
|
|
255
|
+
s.mdBankLevelDetail.onlinepayment_min,
|
|
256
|
+
s.mdBankLevelDetail.onlinepayment_max
|
|
261
257
|
);
|
|
262
258
|
return {
|
|
263
259
|
id: i.pgindex,
|
|
264
260
|
name: i.bankaccountname || "",
|
|
265
261
|
amountList: m,
|
|
266
|
-
min:
|
|
262
|
+
min: r,
|
|
267
263
|
max: d
|
|
268
264
|
};
|
|
269
265
|
});
|
|
270
266
|
else {
|
|
271
267
|
let i = "0.00", m = "0.00";
|
|
272
|
-
for (let
|
|
273
|
-
|
|
274
|
-
const { amountList:
|
|
268
|
+
for (let g = 0; g < o.length; g++)
|
|
269
|
+
o[g].bankindex === e.toString() && (i = o[g].min, m = o[g].max);
|
|
270
|
+
const { amountList: r, minAmount: d, maxAmount: h } = x(
|
|
275
271
|
Number(i),
|
|
276
272
|
Number(m),
|
|
277
|
-
|
|
278
|
-
|
|
273
|
+
s.mdBankLevelDetail.onlinepayment_min,
|
|
274
|
+
s.mdBankLevelDetail.onlinepayment_max
|
|
279
275
|
), _ = {
|
|
280
276
|
id: 0,
|
|
281
277
|
name: "autoChannel",
|
|
282
|
-
amountList:
|
|
278
|
+
amountList: r,
|
|
283
279
|
min: d,
|
|
284
|
-
max:
|
|
280
|
+
max: h
|
|
285
281
|
};
|
|
286
282
|
n.push(_);
|
|
287
283
|
}
|
|
@@ -300,21 +296,21 @@ const G = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
300
296
|
uploadReceipt: !1
|
|
301
297
|
}
|
|
302
298
|
};
|
|
303
|
-
},
|
|
304
|
-
const
|
|
299
|
+
}, B = (e, t) => {
|
|
300
|
+
const s = f.fix;
|
|
305
301
|
return {
|
|
306
302
|
id: e,
|
|
307
303
|
name: "fixAmountMethod",
|
|
308
|
-
type:
|
|
304
|
+
type: s,
|
|
309
305
|
promo: S(t.promo),
|
|
310
306
|
bank: t.bank.map((n) => {
|
|
311
|
-
const
|
|
307
|
+
const o = n.amtlist.map(Number).sort((i, m) => i - m);
|
|
312
308
|
return {
|
|
313
309
|
id: n.pgindex,
|
|
314
310
|
name: n.name,
|
|
315
311
|
amountList: n.amtlist,
|
|
316
|
-
min:
|
|
317
|
-
max:
|
|
312
|
+
min: o.length > 0 ? o[0] : 0,
|
|
313
|
+
max: o.length > 0 ? o[o.length - 1] : 0
|
|
318
314
|
};
|
|
319
315
|
}),
|
|
320
316
|
requiredField: {
|
|
@@ -328,7 +324,7 @@ const G = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
328
324
|
};
|
|
329
325
|
}, $ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
330
326
|
__proto__: null,
|
|
331
|
-
getPaymentsProviderResponse:
|
|
327
|
+
getPaymentsProviderResponse: O
|
|
332
328
|
}, Symbol.toStringTag, { value: "Module" })), j = (e) => e.map((t) => ({
|
|
333
329
|
alert: t.announcement_alert == "1",
|
|
334
330
|
update_time: t.announcement_lastupdated,
|
|
@@ -336,8 +332,15 @@ const G = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
336
332
|
})), J = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
337
333
|
__proto__: null,
|
|
338
334
|
getAnnouncementResponse: j
|
|
339
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
340
|
-
|
|
335
|
+
}, Symbol.toStringTag, { value: "Module" })), U = (e) => ({
|
|
336
|
+
username: e.username,
|
|
337
|
+
birthday: e.mdUserDetail.dob,
|
|
338
|
+
email: e.mdUserDetail.email,
|
|
339
|
+
fullName: e.mdUserDetail.firstname,
|
|
340
|
+
phoneNumber: e.mdUserDetail.mobileno,
|
|
341
|
+
profilePicUrl: e.mdUserDetail.profile_pic
|
|
342
|
+
}), q = async (e) => {
|
|
343
|
+
var t, s;
|
|
341
344
|
try {
|
|
342
345
|
const a = {
|
|
343
346
|
requests: e
|
|
@@ -345,34 +348,37 @@ const G = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
345
348
|
console.log(a);
|
|
346
349
|
const n = await b.post(
|
|
347
350
|
"/jwt",
|
|
348
|
-
|
|
349
|
-
),
|
|
351
|
+
R(JSON.stringify(a))
|
|
352
|
+
), o = {
|
|
350
353
|
status: 200,
|
|
351
354
|
message: "",
|
|
352
355
|
result: {}
|
|
353
356
|
};
|
|
354
357
|
for (const u of n.data.responses) {
|
|
355
|
-
const i =
|
|
356
|
-
if (!
|
|
357
|
-
return
|
|
358
|
+
const i = T(u.attributes), m = u.name, r = i ? JSON.parse(i) : null;
|
|
359
|
+
if (!r)
|
|
360
|
+
return o.result[m] = null, o;
|
|
358
361
|
switch (m) {
|
|
359
|
-
case
|
|
360
|
-
|
|
362
|
+
case y.announcement:
|
|
363
|
+
o.result[m] = j(r);
|
|
361
364
|
break;
|
|
362
|
-
case
|
|
363
|
-
|
|
365
|
+
case y.cmsList:
|
|
366
|
+
o.result[m] = r;
|
|
364
367
|
break;
|
|
365
|
-
case
|
|
366
|
-
|
|
368
|
+
case y.paymentsProvider: {
|
|
369
|
+
o.result[m] = O(r);
|
|
367
370
|
break;
|
|
368
371
|
}
|
|
372
|
+
case y.getUserProfile:
|
|
373
|
+
o.result[m] = U(r);
|
|
374
|
+
break;
|
|
369
375
|
}
|
|
370
376
|
}
|
|
371
|
-
return
|
|
377
|
+
return o;
|
|
372
378
|
} catch (a) {
|
|
373
|
-
return
|
|
379
|
+
return A.isAxiosError(a) ? (console.error(a), {
|
|
374
380
|
status: ((t = a.response) == null ? void 0 : t.status) || 500,
|
|
375
|
-
message: JSON.stringify((
|
|
381
|
+
message: JSON.stringify((s = a.response) == null ? void 0 : s.data),
|
|
376
382
|
result: {}
|
|
377
383
|
}) : (console.error(a), {
|
|
378
384
|
status: a.status || 500,
|
|
@@ -382,10 +388,10 @@ const G = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
382
388
|
}
|
|
383
389
|
}, I = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
384
390
|
__proto__: null,
|
|
385
|
-
post:
|
|
386
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
391
|
+
post: q
|
|
392
|
+
}, Symbol.toStringTag, { value: "Module" })), C = async (e, t) => {
|
|
387
393
|
try {
|
|
388
|
-
const
|
|
394
|
+
const s = {
|
|
389
395
|
status: 200,
|
|
390
396
|
message: ""
|
|
391
397
|
};
|
|
@@ -395,32 +401,32 @@ const G = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
395
401
|
usr: e,
|
|
396
402
|
pwd: t
|
|
397
403
|
})
|
|
398
|
-
),
|
|
399
|
-
} catch (
|
|
400
|
-
return console.error(`login: ${JSON.stringify(
|
|
401
|
-
status:
|
|
402
|
-
message:
|
|
404
|
+
), s;
|
|
405
|
+
} catch (s) {
|
|
406
|
+
return console.error(`login: ${JSON.stringify(s)}`), {
|
|
407
|
+
status: s.status || 500,
|
|
408
|
+
message: s.message
|
|
403
409
|
};
|
|
404
410
|
}
|
|
405
|
-
},
|
|
411
|
+
}, H = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
406
412
|
__proto__: null,
|
|
407
|
-
login:
|
|
408
|
-
}, Symbol.toStringTag, { value: "Module" })), H = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
409
|
-
__proto__: null
|
|
413
|
+
login: C
|
|
410
414
|
}, Symbol.toStringTag, { value: "Module" })), K = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
411
415
|
__proto__: null
|
|
412
|
-
}, Symbol.toStringTag, { value: "Module" })), Q = {
|
|
416
|
+
}, Symbol.toStringTag, { value: "Module" })), Q = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
417
|
+
__proto__: null
|
|
418
|
+
}, Symbol.toStringTag, { value: "Module" })), V = {
|
|
413
419
|
install() {
|
|
414
420
|
}
|
|
415
421
|
};
|
|
416
422
|
export {
|
|
417
|
-
|
|
418
|
-
|
|
423
|
+
V as Repository,
|
|
424
|
+
Q as announcementType,
|
|
419
425
|
I as api,
|
|
420
426
|
F as apiType,
|
|
421
427
|
J as getAnnouncementResponse,
|
|
422
428
|
$ as getPaymentsProviderResponse,
|
|
423
|
-
|
|
424
|
-
|
|
429
|
+
H as loginApi,
|
|
430
|
+
K as loginType,
|
|
425
431
|
G as paymentsProviderType
|
|
426
432
|
};
|
package/dist/60p82u21t54k.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(u,h){typeof exports=="object"&&typeof module<"u"?h(exports,require("axios")):typeof define=="function"&&define.amd?define(["exports","axios"],h):(u=typeof globalThis<"u"?globalThis:u||self,h(u["60p82u21t54k"]={},u.axios))})(this,function(u,h){"use strict";const S=h.create({baseURL:"/graph",timeout:5e3,headers:{"Content-Type":"application/json"}});S.interceptors.request.use(e=>e,e=>(console.error("Error request:",e.response),Promise.reject(e))),S.interceptors.response.use(e=>e,e=>{const t={status:null,message:"An error occurred"};return e.response?(t.status=e.response.status,t.message=e.response.data.message||e.response.statusText,console.error("Error response:",JSON.stringify(t)),e.response.status===401?console.error("Unauthorized access - redirecting to login."):e.response.status===404?console.error("Resource not found."):e.response.status>=500&&console.error("Server error. Please try again later.")):e.request?console.error("No response received:",e.request):console.error("Error setting up request:",e.message),Promise.reject(t)});const
|
|
1
|
+
(function(u,h){typeof exports=="object"&&typeof module<"u"?h(exports,require("axios")):typeof define=="function"&&define.amd?define(["exports","axios"],h):(u=typeof globalThis<"u"?globalThis:u||self,h(u["60p82u21t54k"]={},u.axios))})(this,function(u,h){"use strict";const S=h.create({baseURL:"/graph",timeout:5e3,headers:{"Content-Type":"application/json"}});S.interceptors.request.use(e=>e,e=>(console.error("Error request:",e.response),Promise.reject(e))),S.interceptors.response.use(e=>e,e=>{const t={status:null,message:"An error occurred"};return e.response?(t.status=e.response.status,t.message=e.response.data.message||e.response.statusText,console.error("Error response:",JSON.stringify(t)),e.response.status===401?console.error("Unauthorized access - redirecting to login."):e.response.status===404?console.error("Resource not found."):e.response.status>=500&&console.error("Server error. Please try again later.")):e.request?console.error("No response received:",e.request):console.error("Error setting up request:",e.message),Promise.reject(t)});const N=e=>new TextEncoder().encode(e),R=e=>{try{return atob(e)}catch(t){return console.error("Failed to decode Base64:",t),""}};var _=(e=>(e.announcement="announcement",e.gameList="gameList",e.fishGameList="fishGameList",e.cmsList="cmsList",e.paymentsProvider="paymentsProvider",e.getUserProfile="getUserProfile",e))(_||{});const v=Object.freeze(Object.defineProperty({__proto__:null,Api:_},Symbol.toStringTag,{value:"Module"}));var f=(e=>(e.default="default",e.pay="pay",e.auto="auto",e.fix="fix",e.manual="manual",e.unknown="unknown",e))(f||{});const D=Object.freeze(Object.defineProperty({__proto__:null,PaymentType:f},Symbol.toStringTag,{value:"Module"})),k=e=>e.mdPaymentChannels.map(t=>{const o=[];switch(t.name){case f.default:o.push(A(t.paymentmethod.manual,e));break;case f.pay:o.push(B(t.paymentmethod.onlinebanking,e));break;default:if(t.paymentmethod.auto.bank.length>0&&o.push(q(t.bankid??0,t.paymentmethod.auto,e)),t.paymentmethod.manual.bank.length>0){let a=!1;for(let n=0;n<t.paymentmethod.manual.bank.length;n++){const s=t.paymentmethod.manual.bank[n];if(s.list&&s.list.length>0){a=!0;break}}a&&o.push(A(t.paymentmethod.manual,e))}t.paymentmethod.fixamount.bank.length>0&&o.push(U(t.bankid??0,t.paymentmethod.fixamount))}return{name:t.label,imageUrl:`/image/game/native/deposit/sidemenu/${t.name}.png?${e.systemtime}`,paymentList:o}}),P={id:0,name:"",type:f.unknown,promo:[],bank:[],requiredField:{deposit_bank:!1,deposit_datetime:!1,deposit_detail:!1,deposit_method:!1,depositor:!1,uploadReceipt:!1}},M=e=>{const t={id:0,name:"excludePromo",value:"0",disabled:!0},o=e.map((a,n)=>({id:n+1,name:a.promodesc,value:a.promoindex.toString(),disabled:!1}));return[t,...o]},x=(e,t,o,a)=>{let n,s;o>0?n=e>0?Math.max(o,e):o:n=Math.max(e,0),a>0?s=t>0?Math.min(a,t):a:s=Math.max(t,0);const c=Math.round(n);let i=1e3;s<i&&(i=Math.round(s));const m=i-c;let l="",p="";if(m>0){let d=Math.round((i-c)*.25).toString().split(""),g=[];for(const r of d)r!==""&&g.push(r);for(let r=0;r<g.length;r++)r===0?l+=(parseInt(g[r])+1).toString():l+="0";d=Math.round((i-c)*.5).toString().split(""),g=[];for(const r of d)r!==""&&g.push(r);for(let r=0;r<g.length;r++)r===0?p+=(parseInt(g[r])+1).toString():p+="0"}else l=i.toString(),p=i.toString();return{amountList:[c.toString(),l,p,i.toString()],minAmount:c,maxAmount:s}},A=(e,t)=>t?{id:0,name:"manualMethod",type:f.manual,promo:M(e.promo),bank:e.bank.map(n=>{const s=n.list&&n.list.length>0?n.list[0].mintransaction??"0.00":"0.00",c=n.list&&n.list.length>0?n.list[0].maxtransaction??"0.00":"0.00",{amountList:i,minAmount:m,maxAmount:l}=x(Number(s),Number(c),t.mdBankLevelDetail.deposit_min,t.mdBankLevelDetail.deposit_max);return t.mdManualDepositRequireField.depositor=!0,{id:n.bankindex??0,bankAccountId:n.list&&n.list.length>0?n.list[0].bankaccountindex??0:0,name:n.list&&n.list.length>0?n.list[0].label??"":"",accountName:n.list&&n.list.length>0?n.list[0].bankaccountname??"":"",accountNo:n.list&&n.list.length>0?n.list[0].bankaccountno??"":"",qrcode:n.list&&n.list.length>0?n.list[0].bankaccountdesc:"",amountList:i,min:m,max:l}}),requiredField:{...t.mdManualDepositRequireField,uploadReceipt:t.mdUploadReceipt}}:P,B=(e,t)=>t?{id:0,name:"onlineBankingMethod",type:f.pay,promo:M(e.promo),bank:e.banklist.map(n=>{let s="0.00",c="0.00";const i=n.bankindex??0;for(let d=0;d<t.mdGatewayMinMax.length;d++)t.mdGatewayMinMax[d].bankindex==i.toString()&&(s=t.mdGatewayMinMax[d].min,c=t.mdGatewayMinMax[d].max);const{amountList:m,minAmount:l,maxAmount:p}=x(Number(s),Number(c),t.mdBankLevelDetail.onlinepayment_min,t.mdBankLevelDetail.onlinepayment_max),b={id:0,name:"autoChannel",amountList:m,min:l,max:p},L=n.pg.map(d=>{const g=d.mintransaction??"0.00",j=d.maxtransaction??"0.00",{amountList:T,minAmount:r,maxAmount:H}=x(Number(g),Number(j),t.mdBankLevelDetail.onlinepayment_min,t.mdBankLevelDetail.onlinepayment_max);return{id:d.pgindex,name:d.bankaccountname,amountList:T,min:r,max:H}});return{id:n.bankindex??0,name:n.banknameenglish??"",amountList:[],min:0,max:0,gateway:[b,...L]}}),requiredField:{deposit_bank:!1,deposit_datetime:!1,deposit_detail:!1,deposit_method:!1,depositor:!1,uploadReceipt:!1}}:P,q=(e,t,o)=>{if(!o)return P;const a=f.auto;let n=[];const s=o.mdGatewayMinMax;if(t.bank.length>0&&o.mdPGSelection=="1")n=t.bank.map(i=>{const{amountList:m,minAmount:l,maxAmount:p}=x(i.minTransaction??0,i.maxTransaction??0,o.mdBankLevelDetail.onlinepayment_min,o.mdBankLevelDetail.onlinepayment_max);return{id:i.pgindex,name:i.bankaccountname||"",amountList:m,min:l,max:p}});else{let i="0.00",m="0.00";for(let y=0;y<s.length;y++)s[y].bankindex===e.toString()&&(i=s[y].min,m=s[y].max);const{amountList:l,minAmount:p,maxAmount:b}=x(Number(i),Number(m),o.mdBankLevelDetail.onlinepayment_min,o.mdBankLevelDetail.onlinepayment_max),L={id:0,name:"autoChannel",amountList:l,min:p,max:b};n.push(L)}return{id:e,name:"autoMethod",type:a,promo:M(t.promo),bank:n,requiredField:{deposit_bank:!1,deposit_datetime:!1,deposit_detail:!1,deposit_method:!1,depositor:!1,uploadReceipt:!1}}},U=(e,t)=>{const o=f.fix;return{id:e,name:"fixAmountMethod",type:o,promo:M(t.promo),bank:t.bank.map(n=>{const s=n.amtlist.map(Number).sort((i,m)=>i-m);return{id:n.pgindex,name:n.name,amountList:n.amtlist,min:s.length>0?s[0]:0,max:s.length>0?s[s.length-1]:0}}),requiredField:{deposit_bank:!1,deposit_datetime:!1,deposit_detail:!1,deposit_method:!1,depositor:!1,uploadReceipt:!1}}},C=Object.freeze(Object.defineProperty({__proto__:null,getPaymentsProviderResponse:k},Symbol.toStringTag,{value:"Module"})),O=e=>e.map(t=>({alert:t.announcement_alert=="1",update_time:t.announcement_lastupdated,content:t.announcement_simplified})),z=Object.freeze(Object.defineProperty({__proto__:null,getAnnouncementResponse:O},Symbol.toStringTag,{value:"Module"})),E=e=>({username:e.username,birthday:e.mdUserDetail.dob,email:e.mdUserDetail.email,fullName:e.mdUserDetail.firstname,phoneNumber:e.mdUserDetail.mobileno,profilePicUrl:e.mdUserDetail.profile_pic}),F=Object.freeze(Object.defineProperty({__proto__:null,post:async e=>{var t,o;try{const a={requests:e};console.log(a);const n=await S.post("/jwt",N(JSON.stringify(a))),s={status:200,message:"",result:{}};for(const c of n.data.responses){const i=R(c.attributes),m=c.name,l=i?JSON.parse(i):null;if(!l)return s.result[m]=null,s;switch(m){case _.announcement:s.result[m]=O(l);break;case _.cmsList:s.result[m]=l;break;case _.paymentsProvider:{s.result[m]=k(l);break}case _.getUserProfile:s.result[m]=E(l);break}}return s}catch(a){return h.isAxiosError(a)?(console.error(a),{status:((t=a.response)==null?void 0:t.status)||500,message:JSON.stringify((o=a.response)==null?void 0:o.data),result:{}}):(console.error(a),{status:a.status||500,message:a.message,result:{}})}}},Symbol.toStringTag,{value:"Module"})),G=Object.freeze(Object.defineProperty({__proto__:null,login:async(e,t)=>{try{const o={status:200,message:""};return await S.post("/auth/sesh",JSON.stringify({usr:e,pwd:t})),o}catch(o){return console.error(`login: ${JSON.stringify(o)}`),{status:o.status||500,message:o.message}}}},Symbol.toStringTag,{value:"Module"})),$=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),J=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),I={install(){}};u.Repository=I,u.announcementType=J,u.api=F,u.apiType=v,u.getAnnouncementResponse=z,u.getPaymentsProviderResponse=C,u.loginApi=G,u.loginType=$,u.paymentsProviderType=D,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})});
|
package/dist/api/api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/api/api.ts"],"names":[],"mappings":"AAEA,OAAO,EAAO,cAAc,EAAiB,cAAc,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/api/api.ts"],"names":[],"mappings":"AAEA,OAAO,EAAO,cAAc,EAAiB,cAAc,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAMnF,eAAO,MAAM,IAAI,GAAU,CAAC,SAAS,MAAM,cAAc,YAC7C,cAAc,CAAC,CAAC,CAAC,EAAE,KAC5B,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CA8DnB,CAAA"}
|
package/dist/api/type.d.ts
CHANGED
|
@@ -3,13 +3,15 @@ import { CmsListResponse } from '../model/cms/type';
|
|
|
3
3
|
import { PaymentsProviderResponse } from '../model/deposit/type';
|
|
4
4
|
import { FishGameListResponse } from '../model/fishGameList/type';
|
|
5
5
|
import { GameListResponse } from '../model/gameList/type';
|
|
6
|
+
import { GetUserProfileResponse } from '../model/userProfile/type';
|
|
6
7
|
|
|
7
8
|
export declare enum Api {
|
|
8
9
|
announcement = "announcement",
|
|
9
10
|
gameList = "gameList",
|
|
10
11
|
fishGameList = "fishGameList",
|
|
11
12
|
cmsList = "cmsList",
|
|
12
|
-
paymentsProvider = "paymentsProvider"
|
|
13
|
+
paymentsProvider = "paymentsProvider",
|
|
14
|
+
getUserProfile = "getUserProfile"
|
|
13
15
|
}
|
|
14
16
|
export type ApiResponseMap = {
|
|
15
17
|
[Api.announcement]: AnnouncementResponse;
|
|
@@ -17,6 +19,7 @@ export type ApiResponseMap = {
|
|
|
17
19
|
[Api.fishGameList]: FishGameListResponse;
|
|
18
20
|
[Api.cmsList]: CmsListResponse;
|
|
19
21
|
[Api.paymentsProvider]: PaymentsProviderResponse;
|
|
22
|
+
[Api.getUserProfile]: GetUserProfileResponse;
|
|
20
23
|
};
|
|
21
24
|
export type ApiResponse<T extends keyof ApiResponseMap> = ApiResponseMap[T];
|
|
22
25
|
export type RequestPayload<T extends keyof ApiResponseMap> = {
|
package/dist/api/type.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../src/api/type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAA;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../src/api/type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAA;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AAEjE,oBAAY,GAAG;IACb,YAAY,iBAAiB;IAC7B,QAAQ,aAAa;IACrB,YAAY,iBAAiB;IAC7B,OAAO,YAAY;IACnB,gBAAgB,qBAAqB;IACrC,cAAc,mBAAmB;CAClC;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,oBAAoB,CAAA;IACxC,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,gBAAgB,CAAA;IAChC,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,oBAAoB,CAAA;IACxC,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,eAAe,CAAA;IAC9B,CAAC,GAAG,CAAC,gBAAgB,CAAC,EAAE,wBAAwB,CAAA;IAChD,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE,sBAAsB,CAAA;CAC7C,CAAA;AAED,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,MAAM,cAAc,IAAI,cAAc,CAAC,CAAC,CAAC,CAAA;AAE3E,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,MAAM,cAAc,IAAI;IAC3D,IAAI,EAAE,CAAC,CAAA;IACP,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,MAAM,MAAM,MAAM,CAAC,CAAC,SAAS,MAAM,cAAc,IAAI;IACnD,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,MAAM,cAAc,IAAI;KACrD,CAAC,IAAI,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,GAAG,IAAI;CACnC,CAAA;AAED,MAAM,WAAW,aAAc,SAAQ,KAAK;IAC1C,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB"}
|
package/dist/main.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getUserProfileResponse.d.ts","sourceRoot":"","sources":["../../../src/model/userProfile/getUserProfileResponse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAA;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,QAAQ,CAAA;AAE/C,eAAO,MAAM,sBAAsB,QAC5B,yBAAyB,KAC7B,sBASF,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type RawGetUserProfileResponse = {
|
|
2
|
+
mdUserDetail: {
|
|
3
|
+
dob: string;
|
|
4
|
+
email: string;
|
|
5
|
+
firstname: string;
|
|
6
|
+
isVerify: string;
|
|
7
|
+
mobileno: string;
|
|
8
|
+
profile_pic: string;
|
|
9
|
+
qq: string;
|
|
10
|
+
unlock_app_function: string;
|
|
11
|
+
viber: string | null;
|
|
12
|
+
wechat: string;
|
|
13
|
+
whatsapp: string;
|
|
14
|
+
};
|
|
15
|
+
note: string;
|
|
16
|
+
username: string;
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=rawType.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rawType.d.ts","sourceRoot":"","sources":["../../../src/model/userProfile/rawType.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,yBAAyB,GAAG;IACtC,YAAY,EAAE;QACZ,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,MAAM,CAAA;QACb,SAAS,EAAE,MAAM,CAAA;QACjB,QAAQ,EAAE,MAAM,CAAA;QAChB,QAAQ,EAAE,MAAM,CAAA;QAChB,WAAW,EAAE,MAAM,CAAA;QACnB,EAAE,EAAE,MAAM,CAAA;QACV,mBAAmB,EAAE,MAAM,CAAA;QAC3B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;QACpB,MAAM,EAAE,MAAM,CAAA;QACd,QAAQ,EAAE,MAAM,CAAA;KACjB,CAAA;IACD,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../src/model/userProfile/type.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,MAAM,CAAA;IACnB,aAAa,EAAE,MAAM,CAAA;CACtB,CAAA"}
|