icms-api 0.1.1 → 0.1.3
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/icms-api.cjs.js +2 -2
- package/dist/icms-api.cjs.js.map +1 -1
- package/dist/icms-api.client.cjs.js +2 -0
- package/dist/icms-api.client.cjs.js.map +1 -0
- package/dist/icms-api.client.es.js +170 -0
- package/dist/icms-api.client.es.js.map +1 -0
- package/dist/icms-api.es.js +793 -653
- package/dist/icms-api.es.js.map +1 -1
- package/dist/icms-api.umd.js +2 -2
- package/dist/icms-api.umd.js.map +1 -1
- package/dist/types/client-entry.d.ts +3 -0
- package/dist/types/client.d.ts +98 -2
- package/dist/types/index.d.ts +0 -1
- package/dist/types/server.d.ts +136 -2
- package/dist/types/types/cms-activity.d.ts +22 -0
- package/dist/types/types/cms-mall.d.ts +14 -0
- package/dist/types/types/cms-message.d.ts +32 -0
- package/dist/types/types/cms-photo.d.ts +16 -0
- package/dist/types/types/cms-video.d.ts +18 -0
- package/dist/types/types/cms.d.ts +5 -0
- package/dist/types/types/site.d.ts +10 -0
- package/package.json +9 -3
package/dist/icms-api.es.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import Xt from "pino";
|
|
2
|
+
import Wt from "pino-pretty";
|
|
3
|
+
import zt from "js-md5";
|
|
4
4
|
import ne from "crypto-js";
|
|
5
5
|
import "h3";
|
|
6
|
-
var
|
|
6
|
+
var Zt = {
|
|
7
7
|
TYPE_MGT: 0,
|
|
8
8
|
TYPE_C: 1,
|
|
9
9
|
TYPE_B: 2
|
|
10
|
-
},
|
|
10
|
+
}, er = Wt({
|
|
11
11
|
colorize: !0,
|
|
12
12
|
destination: process.stdout,
|
|
13
13
|
translateTime: "SYS:yyyy-mm-dd HH:MM:ss",
|
|
14
14
|
ignore: "pid,hostname",
|
|
15
15
|
messageFormat: "{msg}",
|
|
16
16
|
singleLine: !0
|
|
17
|
-
}),
|
|
17
|
+
}), U = Xt({
|
|
18
18
|
name: process.env.APP_NAME ?? "iBoot",
|
|
19
19
|
level: process.env.APP_ENV === "production" ? "info" : "debug",
|
|
20
20
|
nestedKey: "payload"
|
|
21
|
-
},
|
|
21
|
+
}, er), tr = {}, Mt = (e) => {
|
|
22
22
|
let t = e || 32, n = "";
|
|
23
23
|
for (let e = 0; e < t; e++) n += "ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678".charAt(Math.floor(Math.random() * 48));
|
|
24
24
|
return n;
|
|
25
25
|
};
|
|
26
|
-
function
|
|
26
|
+
function rr() {
|
|
27
27
|
try {
|
|
28
|
-
let e =
|
|
28
|
+
let e = tr.networkInterfaces();
|
|
29
29
|
for (let t of Object.keys(e)) {
|
|
30
30
|
let n = e[t];
|
|
31
31
|
if (n) {
|
|
@@ -34,12 +34,248 @@ function tr() {
|
|
|
34
34
|
}
|
|
35
35
|
return crypto.randomUUID().replace(/-/g, "").toUpperCase();
|
|
36
36
|
} catch {
|
|
37
|
-
return
|
|
37
|
+
return Mt(10);
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
var
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
var k = {
|
|
41
|
+
IBOOT_DEVICE_ID: "dvid",
|
|
42
|
+
IBOOT_LANG: "lang",
|
|
43
|
+
IBOOT_WEBSITE_ID: "wid",
|
|
44
|
+
IBOOT_WEBSITE_NO: "wno",
|
|
45
|
+
IBOOT_TOKEN: "token",
|
|
46
|
+
IBOOT_USER: "user"
|
|
47
|
+
}, Y = "Content-Type", M = {
|
|
48
|
+
applicationJson: "application/json",
|
|
49
|
+
multipartFormData: "multipart/form-data",
|
|
50
|
+
applicationXwwwFormUrlencoded: "application/x-www-form-urlencoded"
|
|
51
|
+
}, nr = "zh-CN", K = {
|
|
52
|
+
DEVICE_ID: "Device-Id",
|
|
53
|
+
LANG: "Lang",
|
|
54
|
+
WEBSITE_ID: "Website-Id",
|
|
55
|
+
WEBSITE_NO: "Website-No"
|
|
56
|
+
}, Ee = {
|
|
57
|
+
maxAge: -1,
|
|
58
|
+
httpOnly: !0,
|
|
59
|
+
path: "/"
|
|
60
|
+
}, ut = () => ({
|
|
61
|
+
path: "/",
|
|
62
|
+
secure: process.env.APP_ENV === "production",
|
|
63
|
+
httpOnly: !0,
|
|
64
|
+
sameSite: "strict"
|
|
65
|
+
}), ir = (e) => {
|
|
66
|
+
if (e.get) {
|
|
67
|
+
let t = e.get(K.DEVICE_ID), n = e.get(K.LANG), r = e.get(K.WEBSITE_ID), i = e.get(K.WEBSITE_NO), a = {};
|
|
68
|
+
return t && t.length > 0 && (a.deviceId = t), n && n.length > 0 && (a.lang = n), r && r.length > 0 && (a.websiteId = r), i && i.length > 0 && (a.websiteNo = i), a;
|
|
69
|
+
}
|
|
70
|
+
throw Error("The get method of IStorage has not been implemented.");
|
|
71
|
+
}, or = (e) => {
|
|
72
|
+
if (e.get) {
|
|
73
|
+
let t = e.get(k.IBOOT_DEVICE_ID), n = e.get(k.IBOOT_LANG), r = e.get(k.IBOOT_WEBSITE_ID), i = e.get(k.IBOOT_WEBSITE_NO), a = {};
|
|
74
|
+
return t && t.length > 0 && (a.deviceId = t), n && n.length > 0 && (a.lang = n), r && r.length > 0 && (a.websiteId = r), i && i.length > 0 && (a.websiteNo = i), a;
|
|
75
|
+
}
|
|
76
|
+
throw Error("The get method of ICookies has not been implemented.");
|
|
77
|
+
}, Gr = (e, t) => {
|
|
78
|
+
if (e.set) t.deviceId && e.set(k.IBOOT_DEVICE_ID, t.deviceId), t.lang && e.set(k.IBOOT_LANG, t.lang), t.websiteId && e.set(k.IBOOT_WEBSITE_ID, t.websiteId), t.websiteNo && e.set(k.IBOOT_WEBSITE_NO, t.websiteNo);
|
|
79
|
+
else throw Error("The set method of ICookies has not been implemented.");
|
|
80
|
+
}, sr = (e) => {
|
|
81
|
+
if (e.get) {
|
|
82
|
+
let t = e[k.IBOOT_USER];
|
|
83
|
+
if (t && t.length > 0) {
|
|
84
|
+
let n = JSON.parse(t), r = n.username, i = n.userType.toString(), a = e[k.IBOOT_TOKEN];
|
|
85
|
+
if (a) return {
|
|
86
|
+
username: r,
|
|
87
|
+
utype: i,
|
|
88
|
+
token: a
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}, ar = (e, t) => {
|
|
93
|
+
let { id: n, name: r, username: i, nickname: a, headImg: o, token: s, lastLoginTime: c, deviceId: l, userType: d, mustChangePwd: f } = e, p = {
|
|
94
|
+
id: n,
|
|
95
|
+
name: r,
|
|
96
|
+
username: i,
|
|
97
|
+
nickname: a || r,
|
|
98
|
+
headImg: o,
|
|
99
|
+
lastLoginTime: c,
|
|
100
|
+
deviceId: l,
|
|
101
|
+
userType: d,
|
|
102
|
+
accountType: 0,
|
|
103
|
+
needToReview: !1,
|
|
104
|
+
socketOnline: !1,
|
|
105
|
+
mustChangePwd: f
|
|
106
|
+
};
|
|
107
|
+
t.cookies[k.IBOOT_TOKEN] = {
|
|
108
|
+
value: s,
|
|
109
|
+
options: ut()
|
|
110
|
+
}, t.cookies[k.IBOOT_USER] = {
|
|
111
|
+
value: JSON.stringify(p),
|
|
112
|
+
options: ut()
|
|
113
|
+
};
|
|
114
|
+
}, ur = (e) => {
|
|
115
|
+
if (!e.set) throw Error("cookies set function is undefined");
|
|
116
|
+
if (e.set(k.IBOOT_TOKEN, "", Ee), e.set(k.IBOOT_USER, "", Ee), !e.delete) throw Error("cookies delete function is undefined");
|
|
117
|
+
e.delete(k.IBOOT_TOKEN, Ee), e.delete(k.IBOOT_USER, Ee);
|
|
118
|
+
}, cr = class {
|
|
119
|
+
baseUrl;
|
|
120
|
+
helloMethod;
|
|
121
|
+
apiKey;
|
|
122
|
+
userType;
|
|
123
|
+
userFrom;
|
|
124
|
+
deviceId;
|
|
125
|
+
version = "1";
|
|
126
|
+
lang;
|
|
127
|
+
websiteId;
|
|
128
|
+
websiteNo;
|
|
129
|
+
constructor(e) {
|
|
130
|
+
process.env.APP_ENV === "production" || U.warn("This is currently a development environment!"), this.baseUrl = process.env.APP_BASEURL, this.apiKey = process.env.APP_APIKEY, this.userFrom = process.env.APP_USERFROM ?? "1", this.helloMethod = e.helloURL ?? "", this.userType = e.userType ?? Zt.TYPE_MGT, this.deviceId = e.deviceId ?? rr(), this.lang = e.lang ?? nr, this.websiteId = e.websiteId, this.websiteNo = e.websiteNo;
|
|
131
|
+
}
|
|
132
|
+
encrypt(e) {
|
|
133
|
+
let t = ne.enc.Utf8.parse(this.apiKey);
|
|
134
|
+
return ne.AES.encrypt(e, t).toString();
|
|
135
|
+
}
|
|
136
|
+
decrypt(e) {
|
|
137
|
+
let t = ne.enc.Utf8.parse(this.apiKey);
|
|
138
|
+
return ne.AES.decrypt(e, t, { mode: ne.mode.ECB }).toString(ne.enc.Utf8);
|
|
139
|
+
}
|
|
140
|
+
setHttpOptsToCookies = (e) => {
|
|
141
|
+
this.deviceId && this.deviceId.length > 0 && (e[k.IBOOT_DEVICE_ID] = this.deviceId), this.websiteId && this.websiteId.length > 0 && (e[k.IBOOT_WEBSITE_ID] = this.websiteId), this.websiteNo && this.websiteNo.length > 0 && (e[k.IBOOT_WEBSITE_NO] = this.websiteNo), this.lang && this.lang.length > 0 && (e[k.IBOOT_LANG] = this.lang);
|
|
142
|
+
};
|
|
143
|
+
async sign(e) {
|
|
144
|
+
let t = "&key=" + await this.helloIboot(), r = [];
|
|
145
|
+
for (let t of e.keys()) r.push(t);
|
|
146
|
+
r.sort((e, t) => {
|
|
147
|
+
let n = e.match(/(\d+)/), r = t.match(/(\d+)/);
|
|
148
|
+
return n && r && e.replace(/\d+/, "") === t.replace(/\d+/, "") ? parseInt(n[1]) - parseInt(r[1]) : e.toLowerCase().localeCompare(t.toLowerCase(), void 0, {
|
|
149
|
+
numeric: !0,
|
|
150
|
+
sensitivity: "base"
|
|
151
|
+
});
|
|
152
|
+
});
|
|
153
|
+
let i = [];
|
|
154
|
+
r.forEach((t) => {
|
|
155
|
+
let n = e.get(t);
|
|
156
|
+
n && i.push(t + "=" + n);
|
|
157
|
+
});
|
|
158
|
+
let a = i.join("&"), s = zt.md5((a + t).toLocaleUpperCase()), c = {
|
|
159
|
+
params: a,
|
|
160
|
+
md5: s
|
|
161
|
+
};
|
|
162
|
+
return U.debug(c, "API_SIGN"), s;
|
|
163
|
+
}
|
|
164
|
+
assemblyParameter(e, t) {
|
|
165
|
+
let n = e ?? new URLSearchParams(), r = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
166
|
+
return n.set("timezone", r), n.set("timestamp", Date.now().toString()), n.set("echostr", Mt(10)), n.set("version", this.version), n.set("deviceId", this.deviceId), n.set("webid", this.websiteId ?? ""), n.set("apiKey", this.apiKey), t && t.length > 0 && n.set("username", t), new URLSearchParams([...n].filter(([, e]) => e !== ""));
|
|
167
|
+
}
|
|
168
|
+
async assemblyHeader({ urlParams: e, token: t }) {
|
|
169
|
+
let n = {
|
|
170
|
+
"Res-Type": "json",
|
|
171
|
+
"Device-Id": this.deviceId,
|
|
172
|
+
"User-Type": t?.utype.toString() ?? this.userType.toString(),
|
|
173
|
+
"User-From": this.userFrom,
|
|
174
|
+
"Api-Key": this.apiKey
|
|
175
|
+
};
|
|
176
|
+
return n[Y] = M.applicationXwwwFormUrlencoded, this.lang && this.lang.length > 0 && (n.Lang = this.lang), this.websiteId && this.websiteId.length > 0 && (n["Web-Id"] = this.websiteId), this.websiteNo && this.websiteNo.length > 0 && (n["Web-No"] = this.websiteNo), t && (t.token && t.token.length > 0 && t.username && t.username.length > 0 && (n.Authorization = t.token, n.Username = t.username), t.xcsrf && (n[t.xcsrf.csrfHeader] = t.xcsrf.csrfToken)), n.Sign = await this.sign(e), n;
|
|
177
|
+
}
|
|
178
|
+
async helloIboot() {
|
|
179
|
+
if (this.helloMethod.length <= 0) return this.apiKey;
|
|
180
|
+
let e = this.getApiUrl(this.helloMethod), t = {
|
|
181
|
+
"Res-Type": "json",
|
|
182
|
+
"Api-Key": this.apiKey
|
|
183
|
+
};
|
|
184
|
+
t[Y] = M.applicationXwwwFormUrlencoded;
|
|
185
|
+
let n = {
|
|
186
|
+
url: e,
|
|
187
|
+
headers: t
|
|
188
|
+
};
|
|
189
|
+
U.debug(n, "HELLO");
|
|
190
|
+
let r = await fetch(e, {
|
|
191
|
+
method: "GET",
|
|
192
|
+
headers: t,
|
|
193
|
+
credentials: "include",
|
|
194
|
+
cache: "force-cache"
|
|
195
|
+
});
|
|
196
|
+
if (r.ok) {
|
|
197
|
+
let e = await r.json();
|
|
198
|
+
return U.debug(e.data, "HELLO RESULT"), e.data;
|
|
199
|
+
}
|
|
200
|
+
throw Error("hello iBoot error!");
|
|
201
|
+
}
|
|
202
|
+
getApiUrl(e) {
|
|
203
|
+
return `${this.baseUrl}/${e}`;
|
|
204
|
+
}
|
|
205
|
+
async csrf() {
|
|
206
|
+
let e = await this.get({ url: "guest/csrf" });
|
|
207
|
+
if (e.success) {
|
|
208
|
+
let t = e.data;
|
|
209
|
+
if (t) return t.csrfToken.toString();
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
async get({ url: e, data: t, token: n, cache: r = "default" }) {
|
|
213
|
+
let i = this.assemblyParameter(t ? new URLSearchParams(t) : void 0), a = await this.assemblyHeader({
|
|
214
|
+
urlParams: i,
|
|
215
|
+
token: n
|
|
216
|
+
}), s = `${this.getApiUrl(e)}?${i.toString()}`, c = {
|
|
217
|
+
url: s,
|
|
218
|
+
headers: a
|
|
219
|
+
};
|
|
220
|
+
U.info(c, "GET");
|
|
221
|
+
let l = await fetch(s, {
|
|
222
|
+
method: "GET",
|
|
223
|
+
headers: a,
|
|
224
|
+
credentials: "include",
|
|
225
|
+
cache: r
|
|
226
|
+
});
|
|
227
|
+
if (l.ok) {
|
|
228
|
+
let e = Object.fromEntries(l.headers.entries()), t = {
|
|
229
|
+
...await l.json(),
|
|
230
|
+
headers: e
|
|
231
|
+
};
|
|
232
|
+
return U.debug(t, "GET_RESULT"), t;
|
|
233
|
+
}
|
|
234
|
+
let u = {
|
|
235
|
+
code: l.status,
|
|
236
|
+
success: !1,
|
|
237
|
+
msg: l.statusText
|
|
238
|
+
};
|
|
239
|
+
return U.error(u), u;
|
|
240
|
+
}
|
|
241
|
+
async post({ url: e, data: t, token: n, cache: r = "default" }) {
|
|
242
|
+
let i = t ? { ...t } : {}, a = i.buffer ?? void 0, s = i.boundary ?? void 0;
|
|
243
|
+
a && delete i.buffer, s && delete i.boundary;
|
|
244
|
+
let c = this.assemblyParameter(new URLSearchParams(i)), l = await this.assemblyHeader({
|
|
245
|
+
urlParams: c,
|
|
246
|
+
token: n
|
|
247
|
+
});
|
|
248
|
+
a && s && (l[Y] = `multipart/form-data; boundary=${s}`);
|
|
249
|
+
let u = this.getApiUrl(e), f = {
|
|
250
|
+
url: u,
|
|
251
|
+
headers: l,
|
|
252
|
+
params: c
|
|
253
|
+
};
|
|
254
|
+
U.info(f, "POST");
|
|
255
|
+
let p = a ? `${u}?${c}` : u, m = await fetch(p, {
|
|
256
|
+
method: "POST",
|
|
257
|
+
headers: l,
|
|
258
|
+
body: a || c,
|
|
259
|
+
credentials: "include",
|
|
260
|
+
cache: r
|
|
261
|
+
});
|
|
262
|
+
if (m.ok) {
|
|
263
|
+
let e = Object.fromEntries(m.headers.entries()), t = {
|
|
264
|
+
...await m.json(),
|
|
265
|
+
headers: e
|
|
266
|
+
};
|
|
267
|
+
return U.debug(t, "POST_RESULT"), t;
|
|
268
|
+
}
|
|
269
|
+
let h = {
|
|
270
|
+
code: m.status,
|
|
271
|
+
success: !1,
|
|
272
|
+
msg: m.statusText
|
|
273
|
+
};
|
|
274
|
+
return U.error(h), h;
|
|
275
|
+
}
|
|
276
|
+
}, ve = { exports: {} }, Te = {}, Ie = {}, Ae = {}, lt;
|
|
277
|
+
function hr() {
|
|
278
|
+
return lt || (lt = 1, (function(e) {
|
|
43
279
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "detectDomainLocale", {
|
|
44
280
|
enumerable: !0,
|
|
45
281
|
get: function() {
|
|
@@ -55,11 +291,11 @@ function rr() {
|
|
|
55
291
|
}
|
|
56
292
|
}
|
|
57
293
|
}
|
|
58
|
-
})(
|
|
294
|
+
})(Ae)), Ae;
|
|
59
295
|
}
|
|
60
|
-
var
|
|
61
|
-
function
|
|
62
|
-
return
|
|
296
|
+
var Oe = {}, xe = {}, dt;
|
|
297
|
+
function fr() {
|
|
298
|
+
return dt || (dt = 1, (function(e) {
|
|
63
299
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "removeTrailingSlash", {
|
|
64
300
|
enumerable: !0,
|
|
65
301
|
get: function() {
|
|
@@ -69,11 +305,11 @@ function nr() {
|
|
|
69
305
|
function t(e) {
|
|
70
306
|
return e.replace(/\/$/, "") || "/";
|
|
71
307
|
}
|
|
72
|
-
})(
|
|
308
|
+
})(xe)), xe;
|
|
73
309
|
}
|
|
74
|
-
var
|
|
75
|
-
function
|
|
76
|
-
return
|
|
310
|
+
var Ne = {}, Ce = {}, ht;
|
|
311
|
+
function tt() {
|
|
312
|
+
return ht || (ht = 1, (function(e) {
|
|
77
313
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "parsePath", {
|
|
78
314
|
enumerable: !0,
|
|
79
315
|
get: function() {
|
|
@@ -92,95 +328,95 @@ function et() {
|
|
|
92
328
|
hash: ""
|
|
93
329
|
};
|
|
94
330
|
}
|
|
95
|
-
})(
|
|
331
|
+
})(Ce)), Ce;
|
|
96
332
|
}
|
|
97
|
-
var
|
|
98
|
-
function
|
|
99
|
-
return
|
|
333
|
+
var ft;
|
|
334
|
+
function qt() {
|
|
335
|
+
return ft || (ft = 1, (function(e) {
|
|
100
336
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "addPathPrefix", {
|
|
101
337
|
enumerable: !0,
|
|
102
338
|
get: function() {
|
|
103
339
|
return n;
|
|
104
340
|
}
|
|
105
341
|
});
|
|
106
|
-
let t =
|
|
342
|
+
let t = tt();
|
|
107
343
|
function n(e, n) {
|
|
108
344
|
if (!e.startsWith("/") || !n) return e;
|
|
109
345
|
let { pathname: r, query: i, hash: a } = (0, t.parsePath)(e);
|
|
110
346
|
return "" + n + r + i + a;
|
|
111
347
|
}
|
|
112
|
-
})(
|
|
348
|
+
})(Ne)), Ne;
|
|
113
349
|
}
|
|
114
|
-
var
|
|
115
|
-
function
|
|
116
|
-
return
|
|
350
|
+
var Le = {}, pt;
|
|
351
|
+
function pr() {
|
|
352
|
+
return pt || (pt = 1, (function(e) {
|
|
117
353
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "addPathSuffix", {
|
|
118
354
|
enumerable: !0,
|
|
119
355
|
get: function() {
|
|
120
356
|
return n;
|
|
121
357
|
}
|
|
122
358
|
});
|
|
123
|
-
let t =
|
|
359
|
+
let t = tt();
|
|
124
360
|
function n(e, n) {
|
|
125
361
|
if (!e.startsWith("/") || !n) return e;
|
|
126
362
|
let { pathname: r, query: i, hash: a } = (0, t.parsePath)(e);
|
|
127
363
|
return "" + r + n + i + a;
|
|
128
364
|
}
|
|
129
|
-
})(
|
|
365
|
+
})(Le)), Le;
|
|
130
366
|
}
|
|
131
|
-
var
|
|
132
|
-
function
|
|
133
|
-
return
|
|
367
|
+
var ke = {}, Ue = {}, mt;
|
|
368
|
+
function rt() {
|
|
369
|
+
return mt || (mt = 1, (function(e) {
|
|
134
370
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "pathHasPrefix", {
|
|
135
371
|
enumerable: !0,
|
|
136
372
|
get: function() {
|
|
137
373
|
return n;
|
|
138
374
|
}
|
|
139
375
|
});
|
|
140
|
-
let t =
|
|
376
|
+
let t = tt();
|
|
141
377
|
function n(e, n) {
|
|
142
378
|
if (typeof e != "string") return !1;
|
|
143
379
|
let { pathname: r } = (0, t.parsePath)(e);
|
|
144
380
|
return r === n || r.startsWith(n + "/");
|
|
145
381
|
}
|
|
146
|
-
})(
|
|
382
|
+
})(Ue)), Ue;
|
|
147
383
|
}
|
|
148
|
-
var
|
|
149
|
-
function
|
|
150
|
-
return
|
|
384
|
+
var _t;
|
|
385
|
+
function mr() {
|
|
386
|
+
return _t || (_t = 1, (function(e) {
|
|
151
387
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "addLocale", {
|
|
152
388
|
enumerable: !0,
|
|
153
389
|
get: function() {
|
|
154
390
|
return r;
|
|
155
391
|
}
|
|
156
392
|
});
|
|
157
|
-
let t =
|
|
393
|
+
let t = qt(), n = rt();
|
|
158
394
|
function r(e, r, i, a) {
|
|
159
395
|
if (!r || r === i) return e;
|
|
160
396
|
let o = e.toLowerCase();
|
|
161
397
|
return !a && ((0, n.pathHasPrefix)(o, "/api") || (0, n.pathHasPrefix)(o, "/" + r.toLowerCase())) ? e : (0, t.addPathPrefix)(e, "/" + r);
|
|
162
398
|
}
|
|
163
|
-
})(
|
|
399
|
+
})(ke)), ke;
|
|
164
400
|
}
|
|
165
|
-
var
|
|
166
|
-
function
|
|
167
|
-
return
|
|
401
|
+
var bt;
|
|
402
|
+
function _r() {
|
|
403
|
+
return bt || (bt = 1, (function(e) {
|
|
168
404
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "formatNextPathnameInfo", {
|
|
169
405
|
enumerable: !0,
|
|
170
406
|
get: function() {
|
|
171
407
|
return a;
|
|
172
408
|
}
|
|
173
409
|
});
|
|
174
|
-
let t =
|
|
410
|
+
let t = fr(), n = qt(), r = pr(), i = mr();
|
|
175
411
|
function a(e) {
|
|
176
412
|
let a = (0, i.addLocale)(e.pathname, e.locale, e.buildId ? void 0 : e.defaultLocale, e.ignorePrefix);
|
|
177
413
|
return (e.buildId || !e.trailingSlash) && (a = (0, t.removeTrailingSlash)(a)), e.buildId && (a = (0, r.addPathSuffix)((0, n.addPathPrefix)(a, "/_next/data/" + e.buildId), e.pathname === "/" ? "index.json" : ".json")), a = (0, n.addPathPrefix)(a, e.basePath), !e.buildId && e.trailingSlash ? a.endsWith("/") ? a : (0, r.addPathSuffix)(a, "/") : (0, t.removeTrailingSlash)(a);
|
|
178
414
|
}
|
|
179
|
-
})(
|
|
415
|
+
})(Oe)), Oe;
|
|
180
416
|
}
|
|
181
|
-
var
|
|
182
|
-
function
|
|
183
|
-
return
|
|
417
|
+
var De = {}, gt;
|
|
418
|
+
function br() {
|
|
419
|
+
return gt || (gt = 1, (function(e) {
|
|
184
420
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "getHostname", {
|
|
185
421
|
enumerable: !0,
|
|
186
422
|
get: function() {
|
|
@@ -194,11 +430,11 @@ function ar() {
|
|
|
194
430
|
else return;
|
|
195
431
|
return n.toLowerCase();
|
|
196
432
|
}
|
|
197
|
-
})(
|
|
433
|
+
})(De)), De;
|
|
198
434
|
}
|
|
199
|
-
var
|
|
200
|
-
function
|
|
201
|
-
return
|
|
435
|
+
var Me = {}, je = {}, wt;
|
|
436
|
+
function gr() {
|
|
437
|
+
return wt || (wt = 1, (function(e) {
|
|
202
438
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "normalizeLocalePath", {
|
|
203
439
|
enumerable: !0,
|
|
204
440
|
get: function() {
|
|
@@ -212,35 +448,35 @@ function ur() {
|
|
|
212
448
|
detectedLocale: n
|
|
213
449
|
};
|
|
214
450
|
}
|
|
215
|
-
})(
|
|
451
|
+
})(je)), je;
|
|
216
452
|
}
|
|
217
|
-
var
|
|
218
|
-
function
|
|
219
|
-
return
|
|
453
|
+
var qe = {}, Et;
|
|
454
|
+
function wr() {
|
|
455
|
+
return Et || (Et = 1, (function(e) {
|
|
220
456
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "removePathPrefix", {
|
|
221
457
|
enumerable: !0,
|
|
222
458
|
get: function() {
|
|
223
459
|
return n;
|
|
224
460
|
}
|
|
225
461
|
});
|
|
226
|
-
let t =
|
|
462
|
+
let t = rt();
|
|
227
463
|
function n(e, n) {
|
|
228
464
|
if (!(0, t.pathHasPrefix)(e, n)) return e;
|
|
229
465
|
let r = e.slice(n.length);
|
|
230
466
|
return r.startsWith("/") ? r : "/" + r;
|
|
231
467
|
}
|
|
232
|
-
})(
|
|
468
|
+
})(qe)), qe;
|
|
233
469
|
}
|
|
234
|
-
var
|
|
235
|
-
function
|
|
236
|
-
return
|
|
470
|
+
var vt;
|
|
471
|
+
function Er() {
|
|
472
|
+
return vt || (vt = 1, (function(e) {
|
|
237
473
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "getNextPathnameInfo", {
|
|
238
474
|
enumerable: !0,
|
|
239
475
|
get: function() {
|
|
240
476
|
return i;
|
|
241
477
|
}
|
|
242
478
|
});
|
|
243
|
-
let t =
|
|
479
|
+
let t = gr(), n = wr(), r = rt();
|
|
244
480
|
function i(e, i) {
|
|
245
481
|
let { basePath: a, i18n: o, trailingSlash: s } = i.nextConfig ?? {}, c = {
|
|
246
482
|
pathname: e,
|
|
@@ -258,18 +494,18 @@ function lr() {
|
|
|
258
494
|
}
|
|
259
495
|
return c;
|
|
260
496
|
}
|
|
261
|
-
})(
|
|
497
|
+
})(Me)), Me;
|
|
262
498
|
}
|
|
263
|
-
var
|
|
264
|
-
function
|
|
265
|
-
return
|
|
499
|
+
var Rt;
|
|
500
|
+
function Ht() {
|
|
501
|
+
return Rt || (Rt = 1, (function(e) {
|
|
266
502
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "NextURL", {
|
|
267
503
|
enumerable: !0,
|
|
268
504
|
get: function() {
|
|
269
505
|
return c;
|
|
270
506
|
}
|
|
271
507
|
});
|
|
272
|
-
let t =
|
|
508
|
+
let t = hr(), n = _r(), r = br(), i = Er(), a = /(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/;
|
|
273
509
|
function o(e, t) {
|
|
274
510
|
return new URL(String(e).replace(a, "localhost"), t && String(t).replace(a, "localhost"));
|
|
275
511
|
}
|
|
@@ -426,11 +662,11 @@ function jt() {
|
|
|
426
662
|
return new c(String(this), this[s].options);
|
|
427
663
|
}
|
|
428
664
|
}
|
|
429
|
-
})(
|
|
665
|
+
})(Ie)), Ie;
|
|
430
666
|
}
|
|
431
|
-
var
|
|
432
|
-
function
|
|
433
|
-
return
|
|
667
|
+
var He = {}, Fe = {}, Pt;
|
|
668
|
+
function vr() {
|
|
669
|
+
return Pt || (Pt = 1, (function(e) {
|
|
434
670
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
435
671
|
function t(e, t) {
|
|
436
672
|
for (var n in t) Object.defineProperty(e, n, {
|
|
@@ -443,7 +679,7 @@ function dr() {
|
|
|
443
679
|
return c;
|
|
444
680
|
},
|
|
445
681
|
APP_DIR_ALIAS: function() {
|
|
446
|
-
return
|
|
682
|
+
return fn;
|
|
447
683
|
},
|
|
448
684
|
CACHE_ONE_YEAR: function() {
|
|
449
685
|
return b;
|
|
@@ -452,16 +688,16 @@ function dr() {
|
|
|
452
688
|
return T;
|
|
453
689
|
},
|
|
454
690
|
ESLINT_DEFAULT_DIRS: function() {
|
|
455
|
-
return
|
|
691
|
+
return _n;
|
|
456
692
|
},
|
|
457
693
|
GSP_NO_RETURNED_VALUE: function() {
|
|
458
|
-
return
|
|
694
|
+
return R;
|
|
459
695
|
},
|
|
460
696
|
GSSP_COMPONENT_MEMBER_ERROR: function() {
|
|
461
|
-
return
|
|
697
|
+
return B;
|
|
462
698
|
},
|
|
463
699
|
GSSP_NO_RETURNED_VALUE: function() {
|
|
464
|
-
return
|
|
700
|
+
return hn;
|
|
465
701
|
},
|
|
466
702
|
INSTRUMENTATION_HOOK_FILENAME: function() {
|
|
467
703
|
return C;
|
|
@@ -512,7 +748,7 @@ function dr() {
|
|
|
512
748
|
return n;
|
|
513
749
|
},
|
|
514
750
|
NON_STANDARD_NODE_ENV: function() {
|
|
515
|
-
return
|
|
751
|
+
return V;
|
|
516
752
|
},
|
|
517
753
|
PAGES_DIR_ALIAS: function() {
|
|
518
754
|
return w;
|
|
@@ -533,16 +769,16 @@ function dr() {
|
|
|
533
769
|
return j;
|
|
534
770
|
},
|
|
535
771
|
RSC_ACTION_ENCRYPTION_ALIAS: function() {
|
|
536
|
-
return
|
|
772
|
+
return pn;
|
|
537
773
|
},
|
|
538
774
|
RSC_ACTION_PROXY_ALIAS: function() {
|
|
539
775
|
return A;
|
|
540
776
|
},
|
|
541
777
|
RSC_ACTION_VALIDATE_ALIAS: function() {
|
|
542
|
-
return
|
|
778
|
+
return O;
|
|
543
779
|
},
|
|
544
780
|
RSC_MOD_REF_PROXY_ALIAS: function() {
|
|
545
|
-
return
|
|
781
|
+
return D;
|
|
546
782
|
},
|
|
547
783
|
RSC_PREFETCH_SUFFIX: function() {
|
|
548
784
|
return o;
|
|
@@ -551,7 +787,7 @@ function dr() {
|
|
|
551
787
|
return s;
|
|
552
788
|
},
|
|
553
789
|
SERVER_PROPS_EXPORT_ERROR: function() {
|
|
554
|
-
return
|
|
790
|
+
return L;
|
|
555
791
|
},
|
|
556
792
|
SERVER_PROPS_GET_INIT_PROPS_CONFLICT: function() {
|
|
557
793
|
return F;
|
|
@@ -560,38 +796,38 @@ function dr() {
|
|
|
560
796
|
return I;
|
|
561
797
|
},
|
|
562
798
|
SERVER_RUNTIME: function() {
|
|
563
|
-
return
|
|
799
|
+
return vn;
|
|
564
800
|
},
|
|
565
801
|
SSG_FALLBACK_EXPORT_ERROR: function() {
|
|
566
|
-
return
|
|
802
|
+
return gn;
|
|
567
803
|
},
|
|
568
804
|
SSG_GET_INITIAL_PROPS_CONFLICT: function() {
|
|
569
805
|
return P;
|
|
570
806
|
},
|
|
571
807
|
STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR: function() {
|
|
572
|
-
return
|
|
808
|
+
return mn;
|
|
573
809
|
},
|
|
574
810
|
UNSTABLE_REVALIDATE_RENAME_ERROR: function() {
|
|
575
|
-
return
|
|
811
|
+
return z;
|
|
576
812
|
},
|
|
577
813
|
WEBPACK_LAYERS: function() {
|
|
578
|
-
return
|
|
814
|
+
return W;
|
|
579
815
|
},
|
|
580
816
|
WEBPACK_RESOURCE_QUERIES: function() {
|
|
581
|
-
return
|
|
817
|
+
return G;
|
|
582
818
|
}
|
|
583
819
|
});
|
|
584
|
-
let n = "nxtP", r = "nxtI", i = "x-prerender-revalidate", a = "x-prerender-revalidate-if-generated", o = ".prefetch.rsc", s = ".rsc", c = ".action", l = ".json", u = ".meta", d = ".body", f = "x-next-cache-tags", p = "x-next-cache-soft-tags", m = "x-next-revalidated-tags", h = "x-next-revalidate-tag-token", g = 128, _ = 256, v = 1024, y = "_N_T_", b = 31536e3, x = "middleware", S = `(?:src/)?${x}`, C = "instrumentation", w = "private-next-pages", T = "private-dot-next", E = "private-next-root-dir",
|
|
820
|
+
let n = "nxtP", r = "nxtI", i = "x-prerender-revalidate", a = "x-prerender-revalidate-if-generated", o = ".prefetch.rsc", s = ".rsc", c = ".action", l = ".json", u = ".meta", d = ".body", f = "x-next-cache-tags", p = "x-next-cache-soft-tags", m = "x-next-revalidated-tags", h = "x-next-revalidate-tag-token", g = 128, _ = 256, v = 1024, y = "_N_T_", b = 31536e3, x = "middleware", S = `(?:src/)?${x}`, C = "instrumentation", w = "private-next-pages", T = "private-dot-next", E = "private-next-root-dir", fn = "private-next-app-dir", D = "private-next-rsc-mod-ref-proxy", O = "private-next-rsc-action-validate", A = "private-next-rsc-server-reference", pn = "private-next-rsc-action-encryption", j = "private-next-rsc-action-client-wrapper", N = "You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict", P = "You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps", F = "You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.", I = "You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps", mn = "can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props", L = "pages with `getServerSideProps` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export", R = "Your `getStaticProps` function did not return an object. Did you forget to add a `return`?", hn = "Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?", z = "The `unstable_revalidate` property is available for general use.\nPlease use `revalidate` instead.", B = "can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member", V = "You are using a non-standard \"NODE_ENV\" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env", gn = "Pages with `fallback` enabled in `getStaticPaths` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export", _n = [
|
|
585
821
|
"app",
|
|
586
822
|
"pages",
|
|
587
823
|
"components",
|
|
588
824
|
"lib",
|
|
589
825
|
"src"
|
|
590
|
-
],
|
|
826
|
+
], vn = {
|
|
591
827
|
edge: "edge",
|
|
592
828
|
experimentalEdge: "experimental-edge",
|
|
593
829
|
nodejs: "nodejs"
|
|
594
|
-
},
|
|
830
|
+
}, H = {
|
|
595
831
|
shared: "shared",
|
|
596
832
|
reactServerComponents: "rsc",
|
|
597
833
|
serverSideRendering: "ssr",
|
|
@@ -603,40 +839,40 @@ function dr() {
|
|
|
603
839
|
appPagesBrowser: "app-pages-browser",
|
|
604
840
|
appMetadataRoute: "app-metadata-route",
|
|
605
841
|
appRouteHandler: "app-route-handler"
|
|
606
|
-
},
|
|
607
|
-
...
|
|
842
|
+
}, W = {
|
|
843
|
+
...H,
|
|
608
844
|
GROUP: {
|
|
609
845
|
serverOnly: [
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
846
|
+
H.reactServerComponents,
|
|
847
|
+
H.actionBrowser,
|
|
848
|
+
H.appMetadataRoute,
|
|
849
|
+
H.appRouteHandler,
|
|
850
|
+
H.instrument
|
|
615
851
|
],
|
|
616
|
-
clientOnly: [
|
|
617
|
-
nonClientServerTarget: [
|
|
852
|
+
clientOnly: [H.serverSideRendering, H.appPagesBrowser],
|
|
853
|
+
nonClientServerTarget: [H.middleware, H.api],
|
|
618
854
|
app: [
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
855
|
+
H.reactServerComponents,
|
|
856
|
+
H.actionBrowser,
|
|
857
|
+
H.appMetadataRoute,
|
|
858
|
+
H.appRouteHandler,
|
|
859
|
+
H.serverSideRendering,
|
|
860
|
+
H.appPagesBrowser,
|
|
861
|
+
H.shared,
|
|
862
|
+
H.instrument
|
|
627
863
|
]
|
|
628
864
|
}
|
|
629
|
-
},
|
|
865
|
+
}, G = {
|
|
630
866
|
edgeSSREntry: "__next_edge_ssr_entry__",
|
|
631
867
|
metadata: "__next_metadata__",
|
|
632
868
|
metadataRoute: "__next_metadata_route__",
|
|
633
869
|
metadataImageMeta: "__next_metadata_image_meta__"
|
|
634
870
|
};
|
|
635
|
-
})(
|
|
871
|
+
})(Fe)), Fe;
|
|
636
872
|
}
|
|
637
|
-
var
|
|
638
|
-
function
|
|
639
|
-
return
|
|
873
|
+
var yt;
|
|
874
|
+
function Ft() {
|
|
875
|
+
return yt || (yt = 1, (function(e) {
|
|
640
876
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
641
877
|
function t(e, t) {
|
|
642
878
|
for (var n in t) Object.defineProperty(e, n, {
|
|
@@ -661,7 +897,7 @@ function qt() {
|
|
|
661
897
|
return o;
|
|
662
898
|
}
|
|
663
899
|
});
|
|
664
|
-
let n =
|
|
900
|
+
let n = vr();
|
|
665
901
|
function r(e) {
|
|
666
902
|
let t = new Headers();
|
|
667
903
|
for (let [n, r] of Object.entries(e)) {
|
|
@@ -704,11 +940,11 @@ function qt() {
|
|
|
704
940
|
let r = [n.NEXT_QUERY_PARAM_PREFIX, n.NEXT_INTERCEPTION_MARKER_PREFIX];
|
|
705
941
|
for (let n of r) e !== n && e.startsWith(n) && t(e.substring(n.length));
|
|
706
942
|
}
|
|
707
|
-
})(
|
|
943
|
+
})(He)), He;
|
|
708
944
|
}
|
|
709
|
-
var
|
|
710
|
-
function
|
|
711
|
-
return
|
|
945
|
+
var Be = {}, St;
|
|
946
|
+
function Rr() {
|
|
947
|
+
return St || (St = 1, (function(e) {
|
|
712
948
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
713
949
|
function t(e, t) {
|
|
714
950
|
for (var n in t) Object.defineProperty(e, n, {
|
|
@@ -749,12 +985,12 @@ function hr() {
|
|
|
749
985
|
super("The request.ua has been removed in favour of `userAgent` function.\n Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent\n ");
|
|
750
986
|
}
|
|
751
987
|
}
|
|
752
|
-
})(
|
|
988
|
+
})(Be)), Be;
|
|
753
989
|
}
|
|
754
|
-
var
|
|
755
|
-
function
|
|
756
|
-
if (
|
|
757
|
-
|
|
990
|
+
var Ge = {}, Xe, Tt;
|
|
991
|
+
function Pr() {
|
|
992
|
+
if (Tt) return Xe;
|
|
993
|
+
Tt = 1;
|
|
758
994
|
var e = Object.defineProperty, t = Object.getOwnPropertyDescriptor, n = Object.getOwnPropertyNames, r = Object.prototype.hasOwnProperty, i = (t, n) => {
|
|
759
995
|
for (var r in n) e(t, r, {
|
|
760
996
|
get: n[r],
|
|
@@ -773,7 +1009,7 @@ function fr() {
|
|
|
773
1009
|
parseCookie: () => l,
|
|
774
1010
|
parseSetCookie: () => u,
|
|
775
1011
|
stringifyCookie: () => c
|
|
776
|
-
}),
|
|
1012
|
+
}), Xe = o(s);
|
|
777
1013
|
function c(e) {
|
|
778
1014
|
let t = [
|
|
779
1015
|
"path" in e && e.path && `Path=${e.path}`,
|
|
@@ -980,11 +1216,11 @@ function fr() {
|
|
|
980
1216
|
}) {
|
|
981
1217
|
return typeof e.expires == "number" && (e.expires = new Date(e.expires)), e.maxAge && (e.expires = new Date(Date.now() + e.maxAge * 1e3)), (e.path === null || e.path === void 0) && (e.path = "/"), e;
|
|
982
1218
|
}
|
|
983
|
-
return
|
|
1219
|
+
return Xe;
|
|
984
1220
|
}
|
|
985
|
-
var
|
|
986
|
-
function
|
|
987
|
-
return
|
|
1221
|
+
var It;
|
|
1222
|
+
function Ze() {
|
|
1223
|
+
return It || (It = 1, (function(e) {
|
|
988
1224
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
989
1225
|
function t(e, t) {
|
|
990
1226
|
for (var n in t) Object.defineProperty(e, n, {
|
|
@@ -1003,12 +1239,12 @@ function $e() {
|
|
|
1003
1239
|
return n.stringifyCookie;
|
|
1004
1240
|
}
|
|
1005
1241
|
});
|
|
1006
|
-
let n =
|
|
1007
|
-
})(
|
|
1242
|
+
let n = Pr();
|
|
1243
|
+
})(Ge)), Ge;
|
|
1008
1244
|
}
|
|
1009
|
-
var
|
|
1010
|
-
function
|
|
1011
|
-
return
|
|
1245
|
+
var At;
|
|
1246
|
+
function yr() {
|
|
1247
|
+
return At || (At = 1, (function(e) {
|
|
1012
1248
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
1013
1249
|
function t(e, t) {
|
|
1014
1250
|
for (var n in t) Object.defineProperty(e, n, {
|
|
@@ -1024,7 +1260,7 @@ function pr() {
|
|
|
1024
1260
|
return s;
|
|
1025
1261
|
}
|
|
1026
1262
|
});
|
|
1027
|
-
let n =
|
|
1263
|
+
let n = Ht(), r = Ft(), i = Rr(), a = Ze(), o = /* @__PURE__ */ Symbol("internal request");
|
|
1028
1264
|
class s extends Request {
|
|
1029
1265
|
constructor(e, t = {}) {
|
|
1030
1266
|
let i = typeof e != "string" && "url" in e ? e.url : String(e);
|
|
@@ -1087,9 +1323,9 @@ function pr() {
|
|
|
1087
1323
|
}
|
|
1088
1324
|
})(Te)), Te;
|
|
1089
1325
|
}
|
|
1090
|
-
var
|
|
1091
|
-
function
|
|
1092
|
-
return
|
|
1326
|
+
var We = {}, ze = {}, Ot;
|
|
1327
|
+
function Sr() {
|
|
1328
|
+
return Ot || (Ot = 1, (function(e) {
|
|
1093
1329
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "ReflectAdapter", {
|
|
1094
1330
|
enumerable: !0,
|
|
1095
1331
|
get: function() {
|
|
@@ -1111,18 +1347,18 @@ function mr() {
|
|
|
1111
1347
|
return Reflect.deleteProperty(e, t);
|
|
1112
1348
|
}
|
|
1113
1349
|
}
|
|
1114
|
-
})(
|
|
1350
|
+
})(ze)), ze;
|
|
1115
1351
|
}
|
|
1116
|
-
var
|
|
1117
|
-
function
|
|
1118
|
-
return
|
|
1352
|
+
var xt;
|
|
1353
|
+
function Tr() {
|
|
1354
|
+
return xt || (xt = 1, (function(e) {
|
|
1119
1355
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "NextResponse", {
|
|
1120
1356
|
enumerable: !0,
|
|
1121
1357
|
get: function() {
|
|
1122
1358
|
return l;
|
|
1123
1359
|
}
|
|
1124
1360
|
});
|
|
1125
|
-
let t =
|
|
1361
|
+
let t = Ze(), n = Ht(), r = Ft(), i = Sr(), a = Ze(), o = /* @__PURE__ */ Symbol("internal response"), s = /* @__PURE__ */ new Set([
|
|
1126
1362
|
301,
|
|
1127
1363
|
302,
|
|
1128
1364
|
303,
|
|
@@ -1205,11 +1441,11 @@ function _r() {
|
|
|
1205
1441
|
});
|
|
1206
1442
|
}
|
|
1207
1443
|
}
|
|
1208
|
-
})(
|
|
1444
|
+
})(We)), We;
|
|
1209
1445
|
}
|
|
1210
|
-
var
|
|
1211
|
-
function
|
|
1212
|
-
return
|
|
1446
|
+
var Ve = {}, Nt;
|
|
1447
|
+
function Ir() {
|
|
1448
|
+
return Nt || (Nt = 1, (function(e) {
|
|
1213
1449
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "ImageResponse", {
|
|
1214
1450
|
enumerable: !0,
|
|
1215
1451
|
get: function() {
|
|
@@ -1219,27 +1455,27 @@ function br() {
|
|
|
1219
1455
|
function t() {
|
|
1220
1456
|
throw Error("ImageResponse moved from \"next/server\" to \"next/og\" since Next.js 14, please import from \"next/og\" instead");
|
|
1221
1457
|
}
|
|
1222
|
-
})(
|
|
1458
|
+
})(Ve)), Ve;
|
|
1223
1459
|
}
|
|
1224
|
-
var
|
|
1225
|
-
function
|
|
1226
|
-
return
|
|
1460
|
+
var Ke = {}, Ye = { exports: {} }, Ct;
|
|
1461
|
+
function Ar() {
|
|
1462
|
+
return Ct || (Ct = 1, (() => {
|
|
1227
1463
|
var e = { 226: function(e, t) {
|
|
1228
1464
|
(function(n, r) {
|
|
1229
|
-
var i = "1.0.35", a = "", o = "?", s = "function", c = "undefined", l = "object", u = "string", d = "major", f = "model", p = "name", m = "type", h = "vendor", g = "version", _ = "architecture", v = "console", y = "mobile", b = "tablet", x = "smarttv", S = "wearable", C = "embedded", w = 350, T = "Amazon", E = "Apple",
|
|
1465
|
+
var i = "1.0.35", a = "", o = "?", s = "function", c = "undefined", l = "object", u = "string", d = "major", f = "model", p = "name", m = "type", h = "vendor", g = "version", _ = "architecture", v = "console", y = "mobile", b = "tablet", x = "smarttv", S = "wearable", C = "embedded", w = 350, T = "Amazon", E = "Apple", fn = "ASUS", D = "BlackBerry", O = "Browser", A = "Chrome", pn = "Edge", j = "Firefox", N = "Google", P = "Huawei", F = "LG", I = "Microsoft", mn = "Motorola", L = "Opera", R = "Samsung", hn = "Sharp", z = "Sony", B = "Xiaomi", V = "Zebra", gn = "Facebook", _n = "Chromium OS", vn = "Mac OS", H = function(e, t) {
|
|
1230
1466
|
var n = {};
|
|
1231
1467
|
for (var r in e) t[r] && t[r].length % 2 == 0 ? n[r] = t[r].concat(e[r]) : n[r] = e[r];
|
|
1232
1468
|
return n;
|
|
1233
|
-
},
|
|
1469
|
+
}, W = function(e) {
|
|
1234
1470
|
for (var t = {}, n = 0; n < e.length; n++) t[e[n].toUpperCase()] = e[n];
|
|
1235
1471
|
return t;
|
|
1236
|
-
},
|
|
1237
|
-
return typeof e === u ?
|
|
1238
|
-
},
|
|
1472
|
+
}, G = function(e, t) {
|
|
1473
|
+
return typeof e === u ? q(t).indexOf(q(e)) !== -1 : !1;
|
|
1474
|
+
}, q = function(e) {
|
|
1239
1475
|
return e.toLowerCase();
|
|
1240
|
-
},
|
|
1476
|
+
}, yn = function(e) {
|
|
1241
1477
|
return typeof e === u ? e.replace(/[^\d\.]/g, a).split(".")[0] : r;
|
|
1242
|
-
},
|
|
1478
|
+
}, J = function(e, t) {
|
|
1243
1479
|
if (typeof e === u) return e = e.replace(/^\s\s*/, a), typeof t === c ? e : e.substring(0, w);
|
|
1244
1480
|
}, X = function(e, t) {
|
|
1245
1481
|
for (var n = 0, i, a, o, c, u, d; n < t.length && !u;) {
|
|
@@ -1247,12 +1483,12 @@ function gr() {
|
|
|
1247
1483
|
for (i = a = 0; i < f.length && !u && f[i];) if (u = f[i++].exec(e), u) for (o = 0; o < p.length; o++) d = u[++a], c = p[o], typeof c === l && c.length > 0 ? c.length === 2 ? typeof c[1] == s ? this[c[0]] = c[1].call(this, d) : this[c[0]] = c[1] : c.length === 3 ? typeof c[1] === s && !(c[1].exec && c[1].test) ? this[c[0]] = d ? c[1].call(this, d, c[2]) : r : this[c[0]] = d ? d.replace(c[1], c[2]) : r : c.length === 4 && (this[c[0]] = d ? c[3].call(this, d.replace(c[1], c[2])) : r) : this[c] = d || r;
|
|
1248
1484
|
n += 2;
|
|
1249
1485
|
}
|
|
1250
|
-
},
|
|
1486
|
+
}, bn = function(e, t) {
|
|
1251
1487
|
for (var n in t) if (typeof t[n] === l && t[n].length > 0) {
|
|
1252
|
-
for (var i = 0; i < t[n].length; i++) if (
|
|
1253
|
-
} else if (
|
|
1488
|
+
for (var i = 0; i < t[n].length; i++) if (G(t[n][i], e)) return n === o ? r : n;
|
|
1489
|
+
} else if (G(t[n], e)) return n === o ? r : n;
|
|
1254
1490
|
return e;
|
|
1255
|
-
},
|
|
1491
|
+
}, xn = {
|
|
1256
1492
|
"1.0": "/8",
|
|
1257
1493
|
1.2: "/1",
|
|
1258
1494
|
1.3: "/3",
|
|
@@ -1261,7 +1497,7 @@ function gr() {
|
|
|
1261
1497
|
"2.0.3": "/417",
|
|
1262
1498
|
"2.0.4": "/419",
|
|
1263
1499
|
"?": "/"
|
|
1264
|
-
},
|
|
1500
|
+
}, Sn = {
|
|
1265
1501
|
ME: "4.90",
|
|
1266
1502
|
"NT 3.11": "NT3.51",
|
|
1267
1503
|
"NT 4.0": "NT4.0",
|
|
@@ -1273,7 +1509,7 @@ function gr() {
|
|
|
1273
1509
|
8.1: "NT 6.3",
|
|
1274
1510
|
10: ["NT 6.4", "NT 10.0"],
|
|
1275
1511
|
RT: "ARM"
|
|
1276
|
-
},
|
|
1512
|
+
}, Cn = {
|
|
1277
1513
|
browser: [
|
|
1278
1514
|
[/\b(?:crmo|crios)\/([\w\.]+)/i],
|
|
1279
1515
|
[g, [p, "Chrome"]],
|
|
@@ -1286,9 +1522,9 @@ function gr() {
|
|
|
1286
1522
|
],
|
|
1287
1523
|
[p, g],
|
|
1288
1524
|
[/opios[\/ ]+([\w\.]+)/i],
|
|
1289
|
-
[g, [p,
|
|
1525
|
+
[g, [p, L + " Mini"]],
|
|
1290
1526
|
[/\bopr\/([\w\.]+)/i],
|
|
1291
|
-
[g, [p,
|
|
1527
|
+
[g, [p, L]],
|
|
1292
1528
|
[
|
|
1293
1529
|
/(kindle)\/([\w\.]+)/i,
|
|
1294
1530
|
/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,
|
|
@@ -1301,7 +1537,7 @@ function gr() {
|
|
|
1301
1537
|
],
|
|
1302
1538
|
[p, g],
|
|
1303
1539
|
[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],
|
|
1304
|
-
[g, [p, "UC" +
|
|
1540
|
+
[g, [p, "UC" + O]],
|
|
1305
1541
|
[/microm.+\bqbcore\/([\w\.]+)/i, /\bqbcore\/([\w\.]+).+microm/i],
|
|
1306
1542
|
[g, [p, "WeChat(Win) Desktop"]],
|
|
1307
1543
|
[/micromessenger\/([\w\.]+)/i],
|
|
@@ -1316,29 +1552,29 @@ function gr() {
|
|
|
1316
1552
|
[[
|
|
1317
1553
|
p,
|
|
1318
1554
|
/(.+)/,
|
|
1319
|
-
"$1 Secure " +
|
|
1555
|
+
"$1 Secure " + O
|
|
1320
1556
|
], g],
|
|
1321
1557
|
[/\bfocus\/([\w\.]+)/i],
|
|
1322
1558
|
[g, [p, j + " Focus"]],
|
|
1323
1559
|
[/\bopt\/([\w\.]+)/i],
|
|
1324
|
-
[g, [p,
|
|
1560
|
+
[g, [p, L + " Touch"]],
|
|
1325
1561
|
[/coc_coc\w+\/([\w\.]+)/i],
|
|
1326
1562
|
[g, [p, "Coc Coc"]],
|
|
1327
1563
|
[/dolfin\/([\w\.]+)/i],
|
|
1328
1564
|
[g, [p, "Dolphin"]],
|
|
1329
1565
|
[/coast\/([\w\.]+)/i],
|
|
1330
|
-
[g, [p,
|
|
1566
|
+
[g, [p, L + " Coast"]],
|
|
1331
1567
|
[/miuibrowser\/([\w\.]+)/i],
|
|
1332
|
-
[g, [p, "MIUI " +
|
|
1568
|
+
[g, [p, "MIUI " + O]],
|
|
1333
1569
|
[/fxios\/([-\w\.]+)/i],
|
|
1334
1570
|
[g, [p, j]],
|
|
1335
1571
|
[/\bqihu|(qi?ho?o?|360)browser/i],
|
|
1336
|
-
[[p, "360 " +
|
|
1572
|
+
[[p, "360 " + O]],
|
|
1337
1573
|
[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],
|
|
1338
1574
|
[[
|
|
1339
1575
|
p,
|
|
1340
1576
|
/(.+)/,
|
|
1341
|
-
"$1 " +
|
|
1577
|
+
"$1 " + O
|
|
1342
1578
|
], g],
|
|
1343
1579
|
[/(comodo_dragon)\/([\w\.]+)/i],
|
|
1344
1580
|
[[
|
|
@@ -1359,7 +1595,7 @@ function gr() {
|
|
|
1359
1595
|
],
|
|
1360
1596
|
[p],
|
|
1361
1597
|
[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],
|
|
1362
|
-
[[p,
|
|
1598
|
+
[[p, gn], g],
|
|
1363
1599
|
[
|
|
1364
1600
|
/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,
|
|
1365
1601
|
/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,
|
|
@@ -1377,7 +1613,7 @@ function gr() {
|
|
|
1377
1613
|
[/ wv\).+(chrome)\/([\w\.]+)/i],
|
|
1378
1614
|
[[p, A + " WebView"], g],
|
|
1379
1615
|
[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],
|
|
1380
|
-
[g, [p, "Android " +
|
|
1616
|
+
[g, [p, "Android " + O]],
|
|
1381
1617
|
[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],
|
|
1382
1618
|
[p, g],
|
|
1383
1619
|
[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],
|
|
@@ -1387,8 +1623,8 @@ function gr() {
|
|
|
1387
1623
|
[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],
|
|
1388
1624
|
[p, [
|
|
1389
1625
|
g,
|
|
1390
|
-
|
|
1391
|
-
|
|
1626
|
+
bn,
|
|
1627
|
+
xn
|
|
1392
1628
|
]],
|
|
1393
1629
|
[/(webkit|khtml)\/([\w\.]+)/i],
|
|
1394
1630
|
[p, g],
|
|
@@ -1419,7 +1655,7 @@ function gr() {
|
|
|
1419
1655
|
[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],
|
|
1420
1656
|
[[_, "amd64"]],
|
|
1421
1657
|
[/(ia32(?=;))/i],
|
|
1422
|
-
[[_,
|
|
1658
|
+
[[_, q]],
|
|
1423
1659
|
[/((?:i[346]|x)86)[;\)]/i],
|
|
1424
1660
|
[[_, "ia32"]],
|
|
1425
1661
|
[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],
|
|
@@ -1433,18 +1669,18 @@ function gr() {
|
|
|
1433
1669
|
_,
|
|
1434
1670
|
/ower/,
|
|
1435
1671
|
a,
|
|
1436
|
-
|
|
1672
|
+
q
|
|
1437
1673
|
]],
|
|
1438
1674
|
[/(sun4\w)[;\)]/i],
|
|
1439
1675
|
[[_, "sparc"]],
|
|
1440
1676
|
[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],
|
|
1441
|
-
[[_,
|
|
1677
|
+
[[_, q]]
|
|
1442
1678
|
],
|
|
1443
1679
|
device: [
|
|
1444
1680
|
[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],
|
|
1445
1681
|
[
|
|
1446
1682
|
f,
|
|
1447
|
-
[h,
|
|
1683
|
+
[h, R],
|
|
1448
1684
|
[m, b]
|
|
1449
1685
|
],
|
|
1450
1686
|
[
|
|
@@ -1454,7 +1690,7 @@ function gr() {
|
|
|
1454
1690
|
],
|
|
1455
1691
|
[
|
|
1456
1692
|
f,
|
|
1457
|
-
[h,
|
|
1693
|
+
[h, R],
|
|
1458
1694
|
[m, y]
|
|
1459
1695
|
],
|
|
1460
1696
|
[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],
|
|
@@ -1478,7 +1714,7 @@ function gr() {
|
|
|
1478
1714
|
[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],
|
|
1479
1715
|
[
|
|
1480
1716
|
f,
|
|
1481
|
-
[h,
|
|
1717
|
+
[h, hn],
|
|
1482
1718
|
[m, y]
|
|
1483
1719
|
],
|
|
1484
1720
|
[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],
|
|
@@ -1506,7 +1742,7 @@ function gr() {
|
|
|
1506
1742
|
/_/g,
|
|
1507
1743
|
" "
|
|
1508
1744
|
],
|
|
1509
|
-
[h,
|
|
1745
|
+
[h, B],
|
|
1510
1746
|
[m, y]
|
|
1511
1747
|
],
|
|
1512
1748
|
[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],
|
|
@@ -1516,7 +1752,7 @@ function gr() {
|
|
|
1516
1752
|
/_/g,
|
|
1517
1753
|
" "
|
|
1518
1754
|
],
|
|
1519
|
-
[h,
|
|
1755
|
+
[h, B],
|
|
1520
1756
|
[m, b]
|
|
1521
1757
|
],
|
|
1522
1758
|
[/; (\w+) bui.+ oppo/i, /\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],
|
|
@@ -1544,13 +1780,13 @@ function gr() {
|
|
|
1544
1780
|
],
|
|
1545
1781
|
[
|
|
1546
1782
|
f,
|
|
1547
|
-
[h,
|
|
1783
|
+
[h, mn],
|
|
1548
1784
|
[m, y]
|
|
1549
1785
|
],
|
|
1550
1786
|
[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],
|
|
1551
1787
|
[
|
|
1552
1788
|
f,
|
|
1553
|
-
[h,
|
|
1789
|
+
[h, mn],
|
|
1554
1790
|
[m, b]
|
|
1555
1791
|
],
|
|
1556
1792
|
[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],
|
|
@@ -1600,13 +1836,13 @@ function gr() {
|
|
|
1600
1836
|
[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],
|
|
1601
1837
|
[
|
|
1602
1838
|
f,
|
|
1603
|
-
[h,
|
|
1839
|
+
[h, z],
|
|
1604
1840
|
[m, y]
|
|
1605
1841
|
],
|
|
1606
1842
|
[/sony tablet [ps]/i, /\b(?:sony)?sgp\w+(?: bui|\))/i],
|
|
1607
1843
|
[
|
|
1608
1844
|
[f, "Xperia Tablet"],
|
|
1609
|
-
[h,
|
|
1845
|
+
[h, z],
|
|
1610
1846
|
[m, b]
|
|
1611
1847
|
],
|
|
1612
1848
|
[/ (kb2005|in20[12]5|be20[12][59])\b/i, /(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],
|
|
@@ -1644,19 +1880,19 @@ function gr() {
|
|
|
1644
1880
|
[/\b((?:bb[a-f]|st[hv])100-\d)/i, /\(bb10; (\w+)/i],
|
|
1645
1881
|
[
|
|
1646
1882
|
f,
|
|
1647
|
-
[h,
|
|
1883
|
+
[h, D],
|
|
1648
1884
|
[m, y]
|
|
1649
1885
|
],
|
|
1650
1886
|
[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],
|
|
1651
1887
|
[
|
|
1652
1888
|
f,
|
|
1653
|
-
[h,
|
|
1889
|
+
[h, fn],
|
|
1654
1890
|
[m, b]
|
|
1655
1891
|
],
|
|
1656
1892
|
[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],
|
|
1657
1893
|
[
|
|
1658
1894
|
f,
|
|
1659
|
-
[h,
|
|
1895
|
+
[h, fn],
|
|
1660
1896
|
[m, y]
|
|
1661
1897
|
],
|
|
1662
1898
|
[/(nexus 9)/i],
|
|
@@ -1885,13 +2121,13 @@ function gr() {
|
|
|
1885
2121
|
[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],
|
|
1886
2122
|
[
|
|
1887
2123
|
f,
|
|
1888
|
-
[h,
|
|
2124
|
+
[h, V],
|
|
1889
2125
|
[m, b]
|
|
1890
2126
|
],
|
|
1891
2127
|
[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],
|
|
1892
2128
|
[
|
|
1893
2129
|
f,
|
|
1894
|
-
[h,
|
|
2130
|
+
[h, V],
|
|
1895
2131
|
[m, y]
|
|
1896
2132
|
],
|
|
1897
2133
|
[/smart-tv.+(samsung)/i],
|
|
@@ -1903,7 +2139,7 @@ function gr() {
|
|
|
1903
2139
|
/^/,
|
|
1904
2140
|
"SmartTV"
|
|
1905
2141
|
],
|
|
1906
|
-
[h,
|
|
2142
|
+
[h, R],
|
|
1907
2143
|
[m, x]
|
|
1908
2144
|
],
|
|
1909
2145
|
[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],
|
|
@@ -1929,19 +2165,19 @@ function gr() {
|
|
|
1929
2165
|
[/\(dtv[\);].+(aquos)/i, /(aquos-tv[\w ]+)\)/i],
|
|
1930
2166
|
[
|
|
1931
2167
|
f,
|
|
1932
|
-
[h,
|
|
2168
|
+
[h, hn],
|
|
1933
2169
|
[m, x]
|
|
1934
2170
|
],
|
|
1935
2171
|
[/(bravia[\w ]+)( bui|\))/i],
|
|
1936
2172
|
[
|
|
1937
2173
|
f,
|
|
1938
|
-
[h,
|
|
2174
|
+
[h, z],
|
|
1939
2175
|
[m, x]
|
|
1940
2176
|
],
|
|
1941
2177
|
[/(mitv-\w{5}) bui/i],
|
|
1942
2178
|
[
|
|
1943
2179
|
f,
|
|
1944
|
-
[h,
|
|
2180
|
+
[h, B],
|
|
1945
2181
|
[m, x]
|
|
1946
2182
|
],
|
|
1947
2183
|
[/Hbbtv.*(technisat) (.*);/i],
|
|
@@ -1952,8 +2188,8 @@ function gr() {
|
|
|
1952
2188
|
],
|
|
1953
2189
|
[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i, /hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],
|
|
1954
2190
|
[
|
|
1955
|
-
[h,
|
|
1956
|
-
[f,
|
|
2191
|
+
[h, J],
|
|
2192
|
+
[f, J],
|
|
1957
2193
|
[m, x]
|
|
1958
2194
|
],
|
|
1959
2195
|
[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],
|
|
@@ -1973,7 +2209,7 @@ function gr() {
|
|
|
1973
2209
|
[/(playstation [345portablevi]+)/i],
|
|
1974
2210
|
[
|
|
1975
2211
|
f,
|
|
1976
|
-
[h,
|
|
2212
|
+
[h, z],
|
|
1977
2213
|
[m, v]
|
|
1978
2214
|
],
|
|
1979
2215
|
[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],
|
|
@@ -2003,13 +2239,13 @@ function gr() {
|
|
|
2003
2239
|
[/droid.+; (wt63?0{2,3})\)/i],
|
|
2004
2240
|
[
|
|
2005
2241
|
f,
|
|
2006
|
-
[h,
|
|
2242
|
+
[h, V],
|
|
2007
2243
|
[m, S]
|
|
2008
2244
|
],
|
|
2009
2245
|
[/(quest( 2| pro)?)/i],
|
|
2010
2246
|
[
|
|
2011
2247
|
f,
|
|
2012
|
-
[h,
|
|
2248
|
+
[h, gn],
|
|
2013
2249
|
[m, S]
|
|
2014
2250
|
],
|
|
2015
2251
|
[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],
|
|
@@ -2033,7 +2269,7 @@ function gr() {
|
|
|
2033
2269
|
],
|
|
2034
2270
|
engine: [
|
|
2035
2271
|
[/windows.+ edge\/([\w\.]+)/i],
|
|
2036
|
-
[g, [p,
|
|
2272
|
+
[g, [p, pn + "HTML"]],
|
|
2037
2273
|
[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],
|
|
2038
2274
|
[g, [p, "Blink"]],
|
|
2039
2275
|
[
|
|
@@ -2058,14 +2294,14 @@ function gr() {
|
|
|
2058
2294
|
],
|
|
2059
2295
|
[p, [
|
|
2060
2296
|
g,
|
|
2061
|
-
|
|
2062
|
-
|
|
2297
|
+
bn,
|
|
2298
|
+
Sn
|
|
2063
2299
|
]],
|
|
2064
2300
|
[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],
|
|
2065
2301
|
[[p, "Windows"], [
|
|
2066
2302
|
g,
|
|
2067
|
-
|
|
2068
|
-
|
|
2303
|
+
bn,
|
|
2304
|
+
Sn
|
|
2069
2305
|
]],
|
|
2070
2306
|
[
|
|
2071
2307
|
/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,
|
|
@@ -2078,7 +2314,7 @@ function gr() {
|
|
|
2078
2314
|
"."
|
|
2079
2315
|
], [p, "iOS"]],
|
|
2080
2316
|
[/(mac os x) ?([\w\. ]*)/i, /(macintosh|mac_powerpc\b)(?!.+haiku)/i],
|
|
2081
|
-
[[p,
|
|
2317
|
+
[[p, vn], [
|
|
2082
2318
|
g,
|
|
2083
2319
|
/_/g,
|
|
2084
2320
|
"."
|
|
@@ -2093,7 +2329,7 @@ function gr() {
|
|
|
2093
2329
|
],
|
|
2094
2330
|
[p, g],
|
|
2095
2331
|
[/\(bb(10);/i],
|
|
2096
|
-
[g, [p,
|
|
2332
|
+
[g, [p, D]],
|
|
2097
2333
|
[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],
|
|
2098
2334
|
[g, [p, "Symbian"]],
|
|
2099
2335
|
[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],
|
|
@@ -2105,7 +2341,7 @@ function gr() {
|
|
|
2105
2341
|
[/crkey\/([\d\.]+)/i],
|
|
2106
2342
|
[g, [p, A + "cast"]],
|
|
2107
2343
|
[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],
|
|
2108
|
-
[[p,
|
|
2344
|
+
[[p, _n], g],
|
|
2109
2345
|
[
|
|
2110
2346
|
/panasonic;(viera)/i,
|
|
2111
2347
|
/(netrange)mmh/i,
|
|
@@ -2134,10 +2370,10 @@ function gr() {
|
|
|
2134
2370
|
]
|
|
2135
2371
|
}, Z = function(e, t) {
|
|
2136
2372
|
if (typeof e === l && (t = e, e = r), !(this instanceof Z)) return new Z(e, t).getResult();
|
|
2137
|
-
var i = typeof n !== c && n.navigator ? n.navigator : r, o = e || (i && i.userAgent ? i.userAgent : a), v = i && i.userAgentData ? i.userAgentData : r, x = t ?
|
|
2373
|
+
var i = typeof n !== c && n.navigator ? n.navigator : r, o = e || (i && i.userAgent ? i.userAgent : a), v = i && i.userAgentData ? i.userAgentData : r, x = t ? H(Cn, t) : Cn, S = i && i.userAgent == o;
|
|
2138
2374
|
return this.getBrowser = function() {
|
|
2139
2375
|
var e = {};
|
|
2140
|
-
return e[p] = r, e[g] = r, X.call(e, o, x.browser), e[d] =
|
|
2376
|
+
return e[p] = r, e[g] = r, X.call(e, o, x.browser), e[d] = yn(e[g]), S && i && i.brave && typeof i.brave.isBrave == s && (e[p] = "Brave"), e;
|
|
2141
2377
|
}, this.getCPU = function() {
|
|
2142
2378
|
var e = {};
|
|
2143
2379
|
return e[_] = r, X.call(e, o, x.cpu), e;
|
|
@@ -2149,7 +2385,7 @@ function gr() {
|
|
|
2149
2385
|
return e[p] = r, e[g] = r, X.call(e, o, x.engine), e;
|
|
2150
2386
|
}, this.getOS = function() {
|
|
2151
2387
|
var e = {};
|
|
2152
|
-
return e[p] = r, e[g] = r, X.call(e, o, x.os), S && !e[p] && v && v.platform != "Unknown" && (e[p] = v.platform.replace(/chrome os/i,
|
|
2388
|
+
return e[p] = r, e[g] = r, X.call(e, o, x.os), S && !e[p] && v && v.platform != "Unknown" && (e[p] = v.platform.replace(/chrome os/i, _n).replace(/macos/i, vn)), e;
|
|
2153
2389
|
}, this.getResult = function() {
|
|
2154
2390
|
return {
|
|
2155
2391
|
ua: this.getUA(),
|
|
@@ -2162,14 +2398,14 @@ function gr() {
|
|
|
2162
2398
|
}, this.getUA = function() {
|
|
2163
2399
|
return o;
|
|
2164
2400
|
}, this.setUA = function(e) {
|
|
2165
|
-
return o = typeof e === u && e.length > w ?
|
|
2401
|
+
return o = typeof e === u && e.length > w ? J(e, w) : e, this;
|
|
2166
2402
|
}, this.setUA(o), this;
|
|
2167
2403
|
};
|
|
2168
|
-
Z.VERSION = i, Z.BROWSER =
|
|
2404
|
+
Z.VERSION = i, Z.BROWSER = W([
|
|
2169
2405
|
p,
|
|
2170
2406
|
g,
|
|
2171
2407
|
d
|
|
2172
|
-
]), Z.CPU =
|
|
2408
|
+
]), Z.CPU = W([_]), Z.DEVICE = W([
|
|
2173
2409
|
f,
|
|
2174
2410
|
h,
|
|
2175
2411
|
m,
|
|
@@ -2179,7 +2415,7 @@ function gr() {
|
|
|
2179
2415
|
b,
|
|
2180
2416
|
S,
|
|
2181
2417
|
C
|
|
2182
|
-
]), Z.ENGINE = Z.OS =
|
|
2418
|
+
]), Z.ENGINE = Z.OS = W([p, g]), typeof t === c ? typeof n !== c && (n.UAParser = Z) : (e.exports && (t = e.exports = Z), t.UAParser = Z);
|
|
2183
2419
|
var Q = typeof n !== c && (n.jQuery || n.Zepto);
|
|
2184
2420
|
if (Q && !Q.ua) {
|
|
2185
2421
|
var $ = new Z();
|
|
@@ -2204,12 +2440,12 @@ function gr() {
|
|
|
2204
2440
|
}
|
|
2205
2441
|
return a.exports;
|
|
2206
2442
|
}
|
|
2207
|
-
typeof n < "u" && (n.ab = {}.dirname + "/"),
|
|
2208
|
-
})()),
|
|
2443
|
+
typeof n < "u" && (n.ab = {}.dirname + "/"), Ye.exports = n(226);
|
|
2444
|
+
})()), Ye.exports;
|
|
2209
2445
|
}
|
|
2210
|
-
var
|
|
2211
|
-
function
|
|
2212
|
-
return
|
|
2446
|
+
var Lt;
|
|
2447
|
+
function kt() {
|
|
2448
|
+
return Lt || (Lt = 1, (function(e) {
|
|
2213
2449
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
2214
2450
|
function t(e, t) {
|
|
2215
2451
|
for (var n in t) Object.defineProperty(e, n, {
|
|
@@ -2228,7 +2464,7 @@ function Nt() {
|
|
|
2228
2464
|
return a;
|
|
2229
2465
|
}
|
|
2230
2466
|
});
|
|
2231
|
-
let n = /* @__PURE__ */ r(
|
|
2467
|
+
let n = /* @__PURE__ */ r(Ar());
|
|
2232
2468
|
function r(e) {
|
|
2233
2469
|
return e && e.__esModule ? e : { default: e };
|
|
2234
2470
|
}
|
|
@@ -2244,11 +2480,11 @@ function Nt() {
|
|
|
2244
2480
|
function o({ headers: e }) {
|
|
2245
2481
|
return a(e.get("user-agent") || void 0);
|
|
2246
2482
|
}
|
|
2247
|
-
})(
|
|
2483
|
+
})(Ke)), Ke;
|
|
2248
2484
|
}
|
|
2249
|
-
var
|
|
2250
|
-
function
|
|
2251
|
-
return
|
|
2485
|
+
var Je = {}, Ut;
|
|
2486
|
+
function Or() {
|
|
2487
|
+
return Ut || (Ut = 1, (function(e) {
|
|
2252
2488
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "URLPattern", {
|
|
2253
2489
|
enumerable: !0,
|
|
2254
2490
|
get: function() {
|
|
@@ -2256,429 +2492,152 @@ function wr() {
|
|
|
2256
2492
|
}
|
|
2257
2493
|
});
|
|
2258
2494
|
let t = typeof URLPattern > "u" ? void 0 : URLPattern;
|
|
2259
|
-
})(
|
|
2495
|
+
})(Je)), Je;
|
|
2260
2496
|
}
|
|
2261
|
-
var
|
|
2262
|
-
function
|
|
2263
|
-
return
|
|
2497
|
+
var Dt;
|
|
2498
|
+
function xr() {
|
|
2499
|
+
return Dt || (Dt = 1, (function(e, t) {
|
|
2264
2500
|
let n = {
|
|
2265
|
-
NextRequest:
|
|
2266
|
-
NextResponse:
|
|
2267
|
-
ImageResponse:
|
|
2268
|
-
userAgentFromString:
|
|
2269
|
-
userAgent:
|
|
2270
|
-
URLPattern:
|
|
2501
|
+
NextRequest: yr().NextRequest,
|
|
2502
|
+
NextResponse: Tr().NextResponse,
|
|
2503
|
+
ImageResponse: Ir().ImageResponse,
|
|
2504
|
+
userAgentFromString: kt().userAgentFromString,
|
|
2505
|
+
userAgent: kt().userAgent,
|
|
2506
|
+
URLPattern: Or().URLPattern
|
|
2271
2507
|
};
|
|
2272
2508
|
e.exports = n, t.NextRequest = n.NextRequest, t.NextResponse = n.NextResponse, t.ImageResponse = n.ImageResponse, t.userAgentFromString = n.userAgentFromString, t.userAgent = n.userAgent, t.URLPattern = n.URLPattern;
|
|
2273
|
-
})(
|
|
2509
|
+
})(ve, ve.exports)), ve.exports;
|
|
2274
2510
|
}
|
|
2275
|
-
|
|
2276
|
-
var
|
|
2511
|
+
xr();
|
|
2512
|
+
var et = /* @__PURE__ */ ((e) => (e[e.login = 0] = "login", e[e.logout = 1] = "logout", e))(et || {}), $e = {
|
|
2277
2513
|
login: "login",
|
|
2278
2514
|
logout: "logout",
|
|
2279
2515
|
unknown: ""
|
|
2280
|
-
},
|
|
2281
|
-
applicationJson: "application/json",
|
|
2282
|
-
multipartFormData: "multipart/form-data",
|
|
2283
|
-
applicationXwwwFormUrlencoded: "application/x-www-form-urlencoded"
|
|
2284
|
-
}, Gr = class {
|
|
2516
|
+
}, Jr = class {
|
|
2285
2517
|
config;
|
|
2286
2518
|
http;
|
|
2287
2519
|
adapter;
|
|
2288
2520
|
constructor({ config: e, adapter: t, storage: n }) {
|
|
2289
2521
|
this.config = e;
|
|
2290
|
-
let r =
|
|
2291
|
-
(!i || !a || !o || !s) && (r =
|
|
2522
|
+
let r = ir(n.headers), i = r.deviceId && r.deviceId.length > 0, a = r.websiteId && r.websiteId.length > 0, o = r.websiteNo && r.websiteNo.length > 0, s = r.lang && r.lang.length > 0;
|
|
2523
|
+
(!i || !a || !o || !s) && (r = or(n.cookies)), this.http = new cr({
|
|
2292
2524
|
...r,
|
|
2293
2525
|
userType: e.userType,
|
|
2294
|
-
helloURL: e.helloURL
|
|
2295
|
-
}), this.adapter = t;
|
|
2296
|
-
}
|
|
2297
|
-
async handleRequest(e) {
|
|
2298
|
-
try {
|
|
2299
|
-
let t = await this.adapter.parseRequest(e), n = await this.processRequest(t);
|
|
2300
|
-
return this.adapter.createResponse(n);
|
|
2301
|
-
} catch (e) {
|
|
2302
|
-
L.error({ error: e?.toString() || "Internal server error" }, "ROUTE ERROR");
|
|
2303
|
-
let t = this.createErrorResponse(500, e?.toString() || "Internal server error");
|
|
2304
|
-
return this.adapter.createResponse(t);
|
|
2305
|
-
}
|
|
2306
|
-
}
|
|
2307
|
-
async processRequest(e) {
|
|
2308
|
-
let t = e.url.searchParams, n = t.get("m") ?? "unknown", r = {
|
|
2309
|
-
...Je,
|
|
2310
|
-
...this.config.APIMAP
|
|
2311
|
-
}[n], i = e.cookies;
|
|
2312
|
-
if (this.http.setHttpOptsToCookies(i), !r || r.length === 0) return this.createErrorResponse(404, "API not found", i);
|
|
2313
|
-
let a;
|
|
2314
|
-
if ((r.startsWith("admin/") || r.startsWith("api/")) && (a = Ir(i), L.debug(a, "token"), !a || a.username.length === 0 || a.token.length === 0)) return this.createErrorResponse(409, "Authentication required", i);
|
|
2315
|
-
L.debug({ "content-type": e.contentType }, "Content-Type"), L.debug({
|
|
2316
|
-
hostUrl: r,
|
|
2317
|
-
token: a ? { ...a } : ""
|
|
2318
|
-
}, "processRequest");
|
|
2319
|
-
let s = e.method;
|
|
2320
|
-
if (s === "GET") {
|
|
2321
|
-
let n = { ...t };
|
|
2322
|
-
n.delete("m");
|
|
2323
|
-
let i = await this.http.get({
|
|
2324
|
-
url: r,
|
|
2325
|
-
data: n,
|
|
2326
|
-
token: a
|
|
2327
|
-
});
|
|
2328
|
-
return this.createResponse({
|
|
2329
|
-
url: r,
|
|
2330
|
-
result: i,
|
|
2331
|
-
config: this.config,
|
|
2332
|
-
req: e
|
|
2333
|
-
});
|
|
2334
|
-
} else if (s === "POST") {
|
|
2335
|
-
let t, n = e.contentType;
|
|
2336
|
-
if (n.includes(M.applicationJson) || n.includes(M.applicationXwwwFormUrlencoded)) e.body && (t = { ...e.body });
|
|
2337
|
-
else if (n.includes(M.multipartFormData)) {
|
|
2338
|
-
let r = n.match(/boundary=([^\s;]+)/);
|
|
2339
|
-
if (!r || !e.requestFormData) return this.createErrorResponse(411, "Missing boundary in form data", i);
|
|
2340
|
-
let a = e.requestFormData.buffer;
|
|
2341
|
-
t = {
|
|
2342
|
-
boundary: r[1],
|
|
2343
|
-
buffer: Buffer.from(a)
|
|
2344
|
-
};
|
|
2345
|
-
let o = e.requestFormData.formData;
|
|
2346
|
-
if (o) for (let [e, n] of Object.entries(o)) e !== "file" && (t[e] = n);
|
|
2347
|
-
} else return this.createErrorResponse(410, "Unsupported content type", i);
|
|
2348
|
-
let o = await this.http.post({
|
|
2349
|
-
url: r,
|
|
2350
|
-
data: t,
|
|
2351
|
-
token: a
|
|
2352
|
-
});
|
|
2353
|
-
return this.createResponse({
|
|
2354
|
-
url: r,
|
|
2355
|
-
result: o,
|
|
2356
|
-
config: this.config,
|
|
2357
|
-
req: e
|
|
2358
|
-
});
|
|
2359
|
-
}
|
|
2360
|
-
return this.createErrorResponse(405, "Method not allowed, only supported GET or POST", i);
|
|
2361
|
-
}
|
|
2362
|
-
createResponse({ url: e, result: t, config: n, req: r }) {
|
|
2363
|
-
let i = {};
|
|
2364
|
-
i[Y] = M.applicationJson;
|
|
2365
|
-
let a = {
|
|
2366
|
-
status: t.success ? 200 : t.code,
|
|
2367
|
-
headers: i,
|
|
2368
|
-
cookies: this.setCookies(r.cookies),
|
|
2369
|
-
body: t,
|
|
2370
|
-
context: r.context
|
|
2371
|
-
};
|
|
2372
|
-
if (t.success) {
|
|
2373
|
-
switch (e) {
|
|
2374
|
-
case Je[Qe[0]]:
|
|
2375
|
-
let e = t.data;
|
|
2376
|
-
Ar(e, a);
|
|
2377
|
-
break;
|
|
2378
|
-
case Je[Qe[1]]:
|
|
2379
|
-
a.cleanCookies = (e) => Or(e);
|
|
2380
|
-
break;
|
|
2381
|
-
}
|
|
2382
|
-
n.onHandlerSuccess && n.onHandlerSuccess({
|
|
2383
|
-
url: e,
|
|
2384
|
-
data: t.data,
|
|
2385
|
-
req: r,
|
|
2386
|
-
res: a
|
|
2387
|
-
});
|
|
2388
|
-
}
|
|
2389
|
-
return a;
|
|
2390
|
-
}
|
|
2391
|
-
createErrorResponse(e, t, n) {
|
|
2392
|
-
let r = {};
|
|
2393
|
-
return r[Y] = M.applicationJson, {
|
|
2394
|
-
status: e,
|
|
2395
|
-
headers: r,
|
|
2396
|
-
cookies: n ? this.setCookies(n) : {},
|
|
2397
|
-
body: {
|
|
2398
|
-
code: e,
|
|
2399
|
-
success: !1,
|
|
2400
|
-
msg: t
|
|
2401
|
-
}
|
|
2402
|
-
};
|
|
2403
|
-
}
|
|
2404
|
-
setCookies(e) {
|
|
2405
|
-
let t = {};
|
|
2406
|
-
return Object.entries(e).forEach(([e, n]) => {
|
|
2407
|
-
t[e] = { value: n };
|
|
2408
|
-
}), t;
|
|
2409
|
-
}
|
|
2410
|
-
}, Rr = "zh-CN", Ze = "Post request error!", U = {
|
|
2411
|
-
IBOOT_DEVICE_ID: "dvid",
|
|
2412
|
-
IBOOT_LANG: "lang",
|
|
2413
|
-
IBOOT_WEBSITE_ID: "wid",
|
|
2414
|
-
IBOOT_WEBSITE_NO: "wno",
|
|
2415
|
-
IBOOT_TOKEN: "token",
|
|
2416
|
-
IBOOT_USER: "user"
|
|
2417
|
-
}, K = {
|
|
2418
|
-
DEVICE_ID: "Device-Id",
|
|
2419
|
-
LANG: "Lang",
|
|
2420
|
-
WEBSITE_ID: "Website-Id",
|
|
2421
|
-
WEBSITE_NO: "Website-No"
|
|
2422
|
-
}, Ht = async (e, t) => {
|
|
2423
|
-
let n = t?.data ?? {}, r = t?.headers, i, a = t?.headers, s = new Headers(a);
|
|
2424
|
-
if (n instanceof FormData ? i = n : (i = JSON.stringify(n), s.set("Content-Type", M.applicationJson)), r) for (let e in r) {
|
|
2425
|
-
let t = r[e];
|
|
2426
|
-
t && s.set(e, t);
|
|
2427
|
-
}
|
|
2428
|
-
L.info({
|
|
2429
|
-
url: e,
|
|
2430
|
-
headers: s
|
|
2431
|
-
}, "POST");
|
|
2432
|
-
let c = await fetch(e, {
|
|
2433
|
-
method: "POST",
|
|
2434
|
-
headers: s,
|
|
2435
|
-
body: i
|
|
2436
|
-
});
|
|
2437
|
-
if (c.ok) {
|
|
2438
|
-
let e = Object.fromEntries(c.headers.entries()), t = {
|
|
2439
|
-
...await c.json(),
|
|
2440
|
-
headers: e
|
|
2441
|
-
};
|
|
2442
|
-
return L.debug(t, "POST_RESULT"), t;
|
|
2443
|
-
}
|
|
2444
|
-
let l = {
|
|
2445
|
-
code: c.status,
|
|
2446
|
-
success: !1,
|
|
2447
|
-
msg: c.statusText
|
|
2448
|
-
};
|
|
2449
|
-
return L.error(l), l;
|
|
2450
|
-
}, Wr = async (e, t) => {
|
|
2451
|
-
let n = await Ht(e, t);
|
|
2452
|
-
if (n.success) return n.data;
|
|
2453
|
-
if (t?.showError) {
|
|
2454
|
-
t.showError(n.msg ?? Ze);
|
|
2455
|
-
return;
|
|
2456
|
-
}
|
|
2457
|
-
throw Error(n.msg ?? Ze);
|
|
2458
|
-
}, Tr = (e) => {
|
|
2459
|
-
if (e.get) {
|
|
2460
|
-
let t = e.get(K.DEVICE_ID), n = e.get(K.LANG), r = e.get(K.WEBSITE_ID), i = e.get(K.WEBSITE_NO), a = {};
|
|
2461
|
-
return t && t.length > 0 && (a.deviceId = t), n && n.length > 0 && (a.lang = n), r && r.length > 0 && (a.websiteId = r), i && i.length > 0 && (a.websiteNo = i), a;
|
|
2462
|
-
}
|
|
2463
|
-
throw Error("The get method of IStorage has not been implemented.");
|
|
2464
|
-
}, Sr = (e) => {
|
|
2465
|
-
if (e.get) {
|
|
2466
|
-
let t = e.get(U.IBOOT_DEVICE_ID), n = e.get(U.IBOOT_LANG), r = e.get(U.IBOOT_WEBSITE_ID), i = e.get(U.IBOOT_WEBSITE_NO), a = {};
|
|
2467
|
-
return t && t.length > 0 && (a.deviceId = t), n && n.length > 0 && (a.lang = n), r && r.length > 0 && (a.websiteId = r), i && i.length > 0 && (a.websiteNo = i), a;
|
|
2468
|
-
}
|
|
2469
|
-
throw Error("The get method of ICookies has not been implemented.");
|
|
2470
|
-
}, Kr = (e, t) => {
|
|
2471
|
-
if (e.set) t.deviceId && e.set(U.IBOOT_DEVICE_ID, t.deviceId), t.lang && e.set(U.IBOOT_LANG, t.lang), t.websiteId && e.set(U.IBOOT_WEBSITE_ID, t.websiteId), t.websiteNo && e.set(U.IBOOT_WEBSITE_NO, t.websiteNo);
|
|
2472
|
-
else throw Error("The set method of ICookies has not been implemented.");
|
|
2473
|
-
}, Yr = (e) => {
|
|
2474
|
-
if (e.get) {
|
|
2475
|
-
let t = e.get(U.IBOOT_USER);
|
|
2476
|
-
if (t && t.length > 0) return JSON.parse(t);
|
|
2477
|
-
}
|
|
2478
|
-
}, Ir = (e) => {
|
|
2479
|
-
if (e.get) {
|
|
2480
|
-
let t = e[U.IBOOT_USER];
|
|
2481
|
-
if (t && t.length > 0) {
|
|
2482
|
-
let n = JSON.parse(t), r = n.username, i = n.userType.toString(), a = e[U.IBOOT_TOKEN];
|
|
2483
|
-
if (a) return {
|
|
2484
|
-
username: r,
|
|
2485
|
-
utype: i,
|
|
2486
|
-
token: a
|
|
2487
|
-
};
|
|
2488
|
-
}
|
|
2489
|
-
}
|
|
2490
|
-
}, Ut = () => ({
|
|
2491
|
-
path: "/",
|
|
2492
|
-
secure: process.env.APP_ENV === "production",
|
|
2493
|
-
httpOnly: !0,
|
|
2494
|
-
sameSite: "strict"
|
|
2495
|
-
}), Ee = {
|
|
2496
|
-
maxAge: -1,
|
|
2497
|
-
httpOnly: !0,
|
|
2498
|
-
path: "/"
|
|
2499
|
-
}, Ar = (e, t) => {
|
|
2500
|
-
let { id: n, name: r, username: i, nickname: a, headImg: o, token: s, lastLoginTime: c, deviceId: l, userType: u, mustChangePwd: d } = e, f = {
|
|
2501
|
-
id: n,
|
|
2502
|
-
name: r,
|
|
2503
|
-
username: i,
|
|
2504
|
-
nickname: a || r,
|
|
2505
|
-
headImg: o,
|
|
2506
|
-
lastLoginTime: c,
|
|
2507
|
-
deviceId: l,
|
|
2508
|
-
userType: u,
|
|
2509
|
-
accountType: 0,
|
|
2510
|
-
needToReview: !1,
|
|
2511
|
-
socketOnline: !1,
|
|
2512
|
-
mustChangePwd: d
|
|
2513
|
-
};
|
|
2514
|
-
t.cookies[U.IBOOT_TOKEN] = {
|
|
2515
|
-
value: s,
|
|
2516
|
-
options: Ut()
|
|
2517
|
-
}, t.cookies[U.IBOOT_USER] = {
|
|
2518
|
-
value: JSON.stringify(f),
|
|
2519
|
-
options: Ut()
|
|
2520
|
-
};
|
|
2521
|
-
}, Or = (e) => {
|
|
2522
|
-
if (!e.set) throw Error("cookies set function is undefined");
|
|
2523
|
-
if (e.set(U.IBOOT_TOKEN, "", Ee), e.set(U.IBOOT_USER, "", Ee), !e.delete) throw Error("cookies delete function is undefined");
|
|
2524
|
-
e.delete(U.IBOOT_TOKEN, Ee), e.delete(U.IBOOT_USER, Ee);
|
|
2525
|
-
}, xr = class {
|
|
2526
|
-
baseUrl;
|
|
2527
|
-
helloMethod;
|
|
2528
|
-
apiKey;
|
|
2529
|
-
userType;
|
|
2530
|
-
userFrom;
|
|
2531
|
-
deviceId;
|
|
2532
|
-
version = "1";
|
|
2533
|
-
lang;
|
|
2534
|
-
websiteId;
|
|
2535
|
-
websiteNo;
|
|
2536
|
-
constructor(e) {
|
|
2537
|
-
process.env.APP_ENV === "production" || L.warn("This is currently a development environment!"), this.baseUrl = process.env.APP_BASEURL, this.apiKey = process.env.APP_APIKEY, this.userFrom = process.env.APP_USERFROM ?? "1", this.helloMethod = e.helloURL ?? "", this.userType = e.userType ?? Qt.TYPE_MGT, this.deviceId = e.deviceId ?? tr(), this.lang = e.lang ?? Rr, this.websiteId = e.websiteId, this.websiteNo = e.websiteNo;
|
|
2538
|
-
}
|
|
2539
|
-
encrypt(e) {
|
|
2540
|
-
let t = ne.enc.Utf8.parse(this.apiKey);
|
|
2541
|
-
return ne.AES.encrypt(e, t).toString();
|
|
2542
|
-
}
|
|
2543
|
-
decrypt(e) {
|
|
2544
|
-
let t = ne.enc.Utf8.parse(this.apiKey);
|
|
2545
|
-
return ne.AES.decrypt(e, t, { mode: ne.mode.ECB }).toString(ne.enc.Utf8);
|
|
2546
|
-
}
|
|
2547
|
-
setHttpOptsToCookies = (e) => {
|
|
2548
|
-
this.deviceId && this.deviceId.length > 0 && (e[U.IBOOT_DEVICE_ID] = this.deviceId), this.websiteId && this.websiteId.length > 0 && (e[U.IBOOT_WEBSITE_ID] = this.websiteId), this.websiteNo && this.websiteNo.length > 0 && (e[U.IBOOT_WEBSITE_NO] = this.websiteNo), this.lang && this.lang.length > 0 && (e[U.IBOOT_LANG] = this.lang);
|
|
2549
|
-
};
|
|
2550
|
-
async sign(e) {
|
|
2551
|
-
let t = "&key=" + await this.helloIboot(), r = [];
|
|
2552
|
-
for (let t of e.keys()) r.push(t);
|
|
2553
|
-
r.sort((e, t) => {
|
|
2554
|
-
let n = e.match(/(\d+)/), r = t.match(/(\d+)/);
|
|
2555
|
-
return n && r && e.replace(/\d+/, "") === t.replace(/\d+/, "") ? parseInt(n[1]) - parseInt(r[1]) : e.toLowerCase().localeCompare(t.toLowerCase(), void 0, {
|
|
2556
|
-
numeric: !0,
|
|
2557
|
-
sensitivity: "base"
|
|
2558
|
-
});
|
|
2559
|
-
});
|
|
2560
|
-
let i = [];
|
|
2561
|
-
r.forEach((t) => {
|
|
2562
|
-
let n = e.get(t);
|
|
2563
|
-
n && i.push(t + "=" + n);
|
|
2564
|
-
});
|
|
2565
|
-
let a = i.join("&"), s = Wt.md5((a + t).toLocaleUpperCase()), c = {
|
|
2566
|
-
params: a,
|
|
2567
|
-
md5: s
|
|
2568
|
-
};
|
|
2569
|
-
return L.debug(c, "API_SIGN"), s;
|
|
2570
|
-
}
|
|
2571
|
-
assemblyParameter(e, t) {
|
|
2572
|
-
let n = e ?? new URLSearchParams(), r = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
2573
|
-
return n.set("timezone", r), n.set("timestamp", Date.now().toString()), n.set("echostr", Dt(10)), n.set("version", this.version), n.set("deviceId", this.deviceId), n.set("webid", this.websiteId ?? ""), n.set("apiKey", this.apiKey), t && t.length > 0 && n.set("username", t), new URLSearchParams([...n].filter(([, e]) => e !== ""));
|
|
2574
|
-
}
|
|
2575
|
-
async assemblyHeader({ urlParams: e, token: t }) {
|
|
2576
|
-
let n = {
|
|
2577
|
-
"Res-Type": "json",
|
|
2578
|
-
"Device-Id": this.deviceId,
|
|
2579
|
-
"User-Type": t?.utype.toString() ?? this.userType.toString(),
|
|
2580
|
-
"User-From": this.userFrom,
|
|
2581
|
-
"Api-Key": this.apiKey
|
|
2582
|
-
};
|
|
2583
|
-
return n[Y] = M.applicationXwwwFormUrlencoded, this.lang && this.lang.length > 0 && (n.Lang = this.lang), this.websiteId && this.websiteId.length > 0 && (n["Web-Id"] = this.websiteId), this.websiteNo && this.websiteNo.length > 0 && (n["Web-No"] = this.websiteNo), t && (t.token && t.token.length > 0 && t.username && t.username.length > 0 && (n.Authorization = t.token, n.Username = t.username), t.xcsrf && (n[t.xcsrf.csrfHeader] = t.xcsrf.csrfToken)), n.Sign = await this.sign(e), n;
|
|
2584
|
-
}
|
|
2585
|
-
async helloIboot() {
|
|
2586
|
-
if (this.helloMethod.length <= 0) return this.apiKey;
|
|
2587
|
-
let e = this.getApiUrl(this.helloMethod), t = {
|
|
2588
|
-
"Res-Type": "json",
|
|
2589
|
-
"Api-Key": this.apiKey
|
|
2590
|
-
};
|
|
2591
|
-
t[Y] = M.applicationXwwwFormUrlencoded;
|
|
2592
|
-
let n = {
|
|
2593
|
-
url: e,
|
|
2594
|
-
headers: t
|
|
2595
|
-
};
|
|
2596
|
-
L.debug(n, "HELLO");
|
|
2597
|
-
let r = await fetch(e, {
|
|
2598
|
-
method: "GET",
|
|
2599
|
-
headers: t,
|
|
2600
|
-
credentials: "include",
|
|
2601
|
-
cache: "force-cache"
|
|
2602
|
-
});
|
|
2603
|
-
if (r.ok) {
|
|
2604
|
-
let e = await r.json();
|
|
2605
|
-
return L.debug(e.data, "HELLO RESULT"), e.data;
|
|
2606
|
-
}
|
|
2607
|
-
throw Error("hello iBoot error!");
|
|
2608
|
-
}
|
|
2609
|
-
getApiUrl(e) {
|
|
2610
|
-
return `${this.baseUrl}/${e}`;
|
|
2526
|
+
helloURL: e.helloURL
|
|
2527
|
+
}), this.adapter = t;
|
|
2611
2528
|
}
|
|
2612
|
-
async
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2529
|
+
async handleRequest(e) {
|
|
2530
|
+
try {
|
|
2531
|
+
let t = await this.adapter.parseRequest(e), n = await this.processRequest(t);
|
|
2532
|
+
return this.adapter.createResponse(n);
|
|
2533
|
+
} catch (e) {
|
|
2534
|
+
U.error({ error: e?.toString() || "Internal server error" }, "ROUTE ERROR");
|
|
2535
|
+
let t = this.createErrorResponse(500, e?.toString() || "Internal server error");
|
|
2536
|
+
return this.adapter.createResponse(t);
|
|
2617
2537
|
}
|
|
2618
2538
|
}
|
|
2619
|
-
async
|
|
2620
|
-
let
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
}
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
let
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2539
|
+
async processRequest(e) {
|
|
2540
|
+
let t = e.url.searchParams, n = t.get("m") ?? "unknown", r = {
|
|
2541
|
+
...$e,
|
|
2542
|
+
...this.config.APIMAP
|
|
2543
|
+
}[n], i = e.cookies;
|
|
2544
|
+
if (this.http.setHttpOptsToCookies(i), !r || r.length === 0) return this.createErrorResponse(404, "API not found", i);
|
|
2545
|
+
let a;
|
|
2546
|
+
if ((r.startsWith("admin/") || r.startsWith("api/")) && (a = sr(i), U.debug(a, "token"), !a || a.username.length === 0 || a.token.length === 0)) return this.createErrorResponse(409, "Authentication required", i);
|
|
2547
|
+
U.debug({ "content-type": e.contentType }, "Content-Type"), U.debug({
|
|
2548
|
+
hostUrl: r,
|
|
2549
|
+
token: a ? { ...a } : ""
|
|
2550
|
+
}, "processRequest");
|
|
2551
|
+
let s = e.method;
|
|
2552
|
+
if (s === "GET") {
|
|
2553
|
+
let n = { ...t };
|
|
2554
|
+
n.delete("m");
|
|
2555
|
+
let i = await this.http.get({
|
|
2556
|
+
url: r,
|
|
2557
|
+
data: n,
|
|
2558
|
+
token: a
|
|
2559
|
+
});
|
|
2560
|
+
return this.createResponse({
|
|
2561
|
+
url: r,
|
|
2562
|
+
result: i,
|
|
2563
|
+
config: this.config,
|
|
2564
|
+
req: e
|
|
2565
|
+
});
|
|
2566
|
+
} else if (s === "POST") {
|
|
2567
|
+
let t, n = e.contentType;
|
|
2568
|
+
if (n.includes(M.applicationJson) || n.includes(M.applicationXwwwFormUrlencoded)) e.body && (t = { ...e.body });
|
|
2569
|
+
else if (n.includes(M.multipartFormData)) {
|
|
2570
|
+
let r = n.match(/boundary=([^\s;]+)/);
|
|
2571
|
+
if (!r || !e.requestFormData) return this.createErrorResponse(411, "Missing boundary in form data", i);
|
|
2572
|
+
let a = e.requestFormData.buffer;
|
|
2573
|
+
t = {
|
|
2574
|
+
boundary: r[1],
|
|
2575
|
+
buffer: Buffer.from(a)
|
|
2576
|
+
};
|
|
2577
|
+
let o = e.requestFormData.formData;
|
|
2578
|
+
if (o) for (let [e, n] of Object.entries(o)) e !== "file" && (t[e] = n);
|
|
2579
|
+
} else return this.createErrorResponse(410, "Unsupported content type", i);
|
|
2580
|
+
let o = await this.http.post({
|
|
2581
|
+
url: r,
|
|
2582
|
+
data: t,
|
|
2583
|
+
token: a
|
|
2584
|
+
});
|
|
2585
|
+
return this.createResponse({
|
|
2586
|
+
url: r,
|
|
2587
|
+
result: o,
|
|
2588
|
+
config: this.config,
|
|
2589
|
+
req: e
|
|
2590
|
+
});
|
|
2640
2591
|
}
|
|
2641
|
-
|
|
2642
|
-
code: l.status,
|
|
2643
|
-
success: !1,
|
|
2644
|
-
msg: l.statusText
|
|
2645
|
-
};
|
|
2646
|
-
return L.error(u), u;
|
|
2592
|
+
return this.createErrorResponse(405, "Method not allowed, only supported GET or POST", i);
|
|
2647
2593
|
}
|
|
2648
|
-
|
|
2649
|
-
let i =
|
|
2650
|
-
|
|
2651
|
-
let
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
url: u,
|
|
2658
|
-
headers: l,
|
|
2659
|
-
params: c
|
|
2594
|
+
createResponse({ url: e, result: t, config: n, req: r }) {
|
|
2595
|
+
let i = {};
|
|
2596
|
+
i[Y] = M.applicationJson;
|
|
2597
|
+
let a = {
|
|
2598
|
+
status: t.success ? 200 : t.code,
|
|
2599
|
+
headers: i,
|
|
2600
|
+
cookies: this.setCookies(r.cookies),
|
|
2601
|
+
body: t,
|
|
2602
|
+
context: r.context
|
|
2660
2603
|
};
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2604
|
+
if (t.success) {
|
|
2605
|
+
switch (e) {
|
|
2606
|
+
case $e[et[0]]:
|
|
2607
|
+
let e = t.data;
|
|
2608
|
+
ar(e, a);
|
|
2609
|
+
break;
|
|
2610
|
+
case $e[et[1]]:
|
|
2611
|
+
a.cleanCookies = (e) => ur(e);
|
|
2612
|
+
break;
|
|
2613
|
+
}
|
|
2614
|
+
n.onHandlerSuccess && n.onHandlerSuccess({
|
|
2615
|
+
url: e,
|
|
2616
|
+
data: t.data,
|
|
2617
|
+
req: r,
|
|
2618
|
+
res: a
|
|
2619
|
+
});
|
|
2675
2620
|
}
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2621
|
+
return a;
|
|
2622
|
+
}
|
|
2623
|
+
createErrorResponse(e, t, n) {
|
|
2624
|
+
let r = {};
|
|
2625
|
+
return r[Y] = M.applicationJson, {
|
|
2626
|
+
status: e,
|
|
2627
|
+
headers: r,
|
|
2628
|
+
cookies: n ? this.setCookies(n) : {},
|
|
2629
|
+
body: {
|
|
2630
|
+
code: e,
|
|
2631
|
+
success: !1,
|
|
2632
|
+
msg: t
|
|
2633
|
+
}
|
|
2680
2634
|
};
|
|
2681
|
-
|
|
2635
|
+
}
|
|
2636
|
+
setCookies(e) {
|
|
2637
|
+
let t = {};
|
|
2638
|
+
return Object.entries(e).forEach(([e, n]) => {
|
|
2639
|
+
t[e] = { value: n };
|
|
2640
|
+
}), t;
|
|
2682
2641
|
}
|
|
2683
2642
|
}, baseUrl = {
|
|
2684
2643
|
site: "guest/site/",
|
|
@@ -2696,9 +2655,9 @@ const helloURL = `${baseUrl.site}helloIBoot`;
|
|
|
2696
2655
|
var ICMSServer = class {
|
|
2697
2656
|
http;
|
|
2698
2657
|
constructor(e) {
|
|
2699
|
-
this.http = new
|
|
2700
|
-
...
|
|
2701
|
-
userType:
|
|
2658
|
+
this.http = new cr({
|
|
2659
|
+
...or(e),
|
|
2660
|
+
userType: Zt.TYPE_C,
|
|
2702
2661
|
helloURL
|
|
2703
2662
|
});
|
|
2704
2663
|
}
|
|
@@ -2708,7 +2667,7 @@ var ICMSServer = class {
|
|
|
2708
2667
|
let t = n.headers;
|
|
2709
2668
|
if (t) {
|
|
2710
2669
|
let n = t["device-id"], r = t.lang, i = t["web-id"], a = t["web-no"], o = {};
|
|
2711
|
-
n && n.length > 0 && (o.deviceId = n), r && r.length > 0 && (o.lang = r), i && i.length > 0 && (o.websiteId = i), a && a.length > 0 && (o.websiteNo = a),
|
|
2670
|
+
n && n.length > 0 && (o.deviceId = n), r && r.length > 0 && (o.lang = r), i && i.length > 0 && (o.websiteId = i), a && a.length > 0 && (o.websiteNo = a), Gr(e, o);
|
|
2712
2671
|
}
|
|
2713
2672
|
}
|
|
2714
2673
|
}
|
|
@@ -2850,6 +2809,120 @@ var ICMSServer = class {
|
|
|
2850
2809
|
if (n.success) return n.data ?? [];
|
|
2851
2810
|
throw Error(n.msg);
|
|
2852
2811
|
}
|
|
2812
|
+
async loadPhotoDetail(e) {
|
|
2813
|
+
let t = baseUrl.site + "getPhoto", n = await this.http.get({
|
|
2814
|
+
url: t,
|
|
2815
|
+
data: { photoId: e }
|
|
2816
|
+
});
|
|
2817
|
+
if (n.success) return n.data;
|
|
2818
|
+
throw Error(n.msg);
|
|
2819
|
+
}
|
|
2820
|
+
async loadPhotoPageInfo(e) {
|
|
2821
|
+
let t = baseUrl.site + "searchPhotoForPage", n = await this.http.get({
|
|
2822
|
+
url: t,
|
|
2823
|
+
data: { ...e }
|
|
2824
|
+
});
|
|
2825
|
+
if (n.success) return n.data ?? buildEmptyPageInfo({
|
|
2826
|
+
pageNo: e.pageNo,
|
|
2827
|
+
pageSize: e.pageSize
|
|
2828
|
+
});
|
|
2829
|
+
throw Error(n.msg);
|
|
2830
|
+
}
|
|
2831
|
+
async loadPhotoPageInfoByGroup(e) {
|
|
2832
|
+
let t = baseUrl.site + "searchPhotoForPageByGroup", n = await this.http.get({
|
|
2833
|
+
url: t,
|
|
2834
|
+
data: { ...e }
|
|
2835
|
+
});
|
|
2836
|
+
if (n.success) return n.data ?? buildEmptyPageInfo({
|
|
2837
|
+
pageNo: e.pageNo,
|
|
2838
|
+
pageSize: e.pageSize
|
|
2839
|
+
});
|
|
2840
|
+
throw Error(n.msg);
|
|
2841
|
+
}
|
|
2842
|
+
async loadPhotoListByGroupId(e) {
|
|
2843
|
+
let t = baseUrl.site + "searchPhotoByGroup", n = await this.http.get({
|
|
2844
|
+
url: t,
|
|
2845
|
+
data: { ...e }
|
|
2846
|
+
});
|
|
2847
|
+
if (n.success) return n.data ?? [];
|
|
2848
|
+
throw Error(n.msg);
|
|
2849
|
+
}
|
|
2850
|
+
async loadVideoDetail(e) {
|
|
2851
|
+
let t = baseUrl.site + "getVideo", n = await this.http.get({
|
|
2852
|
+
url: t,
|
|
2853
|
+
data: { videoId: e }
|
|
2854
|
+
});
|
|
2855
|
+
if (n.success) return n.data;
|
|
2856
|
+
throw Error(n.msg);
|
|
2857
|
+
}
|
|
2858
|
+
async loadVideoPageInfo(e) {
|
|
2859
|
+
let t = baseUrl.site + "searchVideoForPage", n = await this.http.get({
|
|
2860
|
+
url: t,
|
|
2861
|
+
data: { ...e }
|
|
2862
|
+
});
|
|
2863
|
+
if (n.success) return n.data ?? buildEmptyPageInfo({
|
|
2864
|
+
pageNo: e.pageNo,
|
|
2865
|
+
pageSize: e.pageSize
|
|
2866
|
+
});
|
|
2867
|
+
throw Error(n.msg);
|
|
2868
|
+
}
|
|
2869
|
+
async loadVideoPageInfoByGroup(e) {
|
|
2870
|
+
let t = baseUrl.site + "searchVideoForPageByGroup", n = await this.http.get({
|
|
2871
|
+
url: t,
|
|
2872
|
+
data: { ...e }
|
|
2873
|
+
});
|
|
2874
|
+
if (n.success) return n.data ?? buildEmptyPageInfo({
|
|
2875
|
+
pageNo: e.pageNo,
|
|
2876
|
+
pageSize: e.pageSize
|
|
2877
|
+
});
|
|
2878
|
+
throw Error(n.msg);
|
|
2879
|
+
}
|
|
2880
|
+
async loadVideoListByGroupId(e) {
|
|
2881
|
+
let t = baseUrl.site + "searchVideoByGroup", n = await this.http.get({
|
|
2882
|
+
url: t,
|
|
2883
|
+
data: { ...e }
|
|
2884
|
+
});
|
|
2885
|
+
if (n.success) return n.data ?? [];
|
|
2886
|
+
throw Error(n.msg);
|
|
2887
|
+
}
|
|
2888
|
+
async loadActivityDetail(e) {
|
|
2889
|
+
let t = baseUrl.site + "getActivity", n = await this.http.get({
|
|
2890
|
+
url: t,
|
|
2891
|
+
data: { activityId: e }
|
|
2892
|
+
});
|
|
2893
|
+
if (n.success) return n.data;
|
|
2894
|
+
throw Error(n.msg);
|
|
2895
|
+
}
|
|
2896
|
+
async loadActivityPageInfo(e) {
|
|
2897
|
+
let t = baseUrl.site + "searchActivityForPage", n = await this.http.get({
|
|
2898
|
+
url: t,
|
|
2899
|
+
data: { ...e }
|
|
2900
|
+
});
|
|
2901
|
+
if (n.success) return n.data ?? buildEmptyPageInfo({
|
|
2902
|
+
pageNo: e.pageNo,
|
|
2903
|
+
pageSize: e.pageSize
|
|
2904
|
+
});
|
|
2905
|
+
throw Error(n.msg);
|
|
2906
|
+
}
|
|
2907
|
+
async loadActivityPageInfoByGroup(e) {
|
|
2908
|
+
let t = baseUrl.site + "searchActivityForPageByGroup", n = await this.http.get({
|
|
2909
|
+
url: t,
|
|
2910
|
+
data: { ...e }
|
|
2911
|
+
});
|
|
2912
|
+
if (n.success) return n.data ?? buildEmptyPageInfo({
|
|
2913
|
+
pageNo: e.pageNo,
|
|
2914
|
+
pageSize: e.pageSize
|
|
2915
|
+
});
|
|
2916
|
+
throw Error(n.msg);
|
|
2917
|
+
}
|
|
2918
|
+
async loadActivityListByGroupId(e) {
|
|
2919
|
+
let t = baseUrl.site + "searchActivityByGroup", n = await this.http.get({
|
|
2920
|
+
url: t,
|
|
2921
|
+
data: { ...e }
|
|
2922
|
+
});
|
|
2923
|
+
if (n.success) return n.data ?? [];
|
|
2924
|
+
throw Error(n.msg);
|
|
2925
|
+
}
|
|
2853
2926
|
async loadReviewList(e) {
|
|
2854
2927
|
let t = baseUrl.site + "getReviewList", n = await this.http.get({
|
|
2855
2928
|
url: t,
|
|
@@ -2861,33 +2934,100 @@ var ICMSServer = class {
|
|
|
2861
2934
|
if (n.success) return n.data ?? [];
|
|
2862
2935
|
throw Error(n.msg);
|
|
2863
2936
|
}
|
|
2864
|
-
|
|
2865
|
-
|
|
2937
|
+
async submitComment(e) {
|
|
2938
|
+
let t = baseUrl.site + "comment";
|
|
2939
|
+
return (await this.http.post({
|
|
2940
|
+
url: t,
|
|
2941
|
+
data: e
|
|
2942
|
+
})).success;
|
|
2943
|
+
}
|
|
2944
|
+
async subscribe(e) {
|
|
2945
|
+
let t = baseUrl.site + "userSubscribe";
|
|
2946
|
+
return (await this.http.post({
|
|
2947
|
+
url: t,
|
|
2948
|
+
data: e
|
|
2949
|
+
})).success;
|
|
2950
|
+
}
|
|
2951
|
+
async submitContactUs(e) {
|
|
2952
|
+
let t = baseUrl.site + "contactUs";
|
|
2953
|
+
return (await this.http.post({
|
|
2954
|
+
url: t,
|
|
2955
|
+
data: e
|
|
2956
|
+
})).success;
|
|
2957
|
+
}
|
|
2958
|
+
async loadLinkGroups() {
|
|
2959
|
+
let e = baseUrl.site + "getLinkGroupList", t = await this.http.get({ url: e });
|
|
2960
|
+
if (t.success) return t.data ?? [];
|
|
2961
|
+
throw Error(t.msg);
|
|
2962
|
+
}
|
|
2963
|
+
async loadFriendLinks(e) {
|
|
2964
|
+
let t = baseUrl.site + "getFriendLinks", n = await this.http.get({
|
|
2965
|
+
url: t,
|
|
2966
|
+
data: e ? { count: String(e) } : void 0
|
|
2967
|
+
});
|
|
2968
|
+
if (n.success) return n.data ?? [];
|
|
2969
|
+
throw Error(n.msg);
|
|
2970
|
+
}
|
|
2971
|
+
async submitLink(e) {
|
|
2972
|
+
let t = baseUrl.site + "addLink";
|
|
2973
|
+
return (await this.http.post({
|
|
2974
|
+
url: t,
|
|
2975
|
+
data: e
|
|
2976
|
+
})).success;
|
|
2977
|
+
}
|
|
2978
|
+
async getSpecDescription(e) {
|
|
2979
|
+
let t = baseUrl.shop + "getSpecDescription", n = await this.http.get({
|
|
2980
|
+
url: t,
|
|
2981
|
+
data: { code: e }
|
|
2982
|
+
});
|
|
2983
|
+
if (n.success) return n.data;
|
|
2984
|
+
throw Error(n.msg);
|
|
2985
|
+
}
|
|
2986
|
+
}, APIMAP = {
|
|
2987
|
+
loadI18nList: "guest/site/i18nList",
|
|
2988
|
+
loadWebsite: "guest/site/currentWebSite",
|
|
2989
|
+
loadChannels: "guest/site/getChannelListByNo",
|
|
2990
|
+
loadChannelById: "guest/site/getChannelById",
|
|
2991
|
+
loadChannelByNo: "guest/site/getChannelByNo",
|
|
2992
|
+
loadChannelByUri: "guest/site/getChannelByUrl",
|
|
2993
|
+
loadProductDetail: "guest/site/getProduct",
|
|
2994
|
+
loadProductPageInfo: "guest/site/searchProductForPage",
|
|
2995
|
+
loadProductPageInfoByGroup: "guest/site/searchProductForPageByGroup",
|
|
2996
|
+
loadProductListByGroupId: "guest/site/searchProductByGroup",
|
|
2997
|
+
loadNewsDetail: "guest/site/getNewsDetail",
|
|
2998
|
+
loadNewsPageInfo: "guest/site/searchNewsForPage",
|
|
2999
|
+
loadNewsPageInfoByGroupId: "guest/site/searchNewsForPageByGroup",
|
|
3000
|
+
loadNewsListByGroupId: "guest/site/searchNewsByGroup",
|
|
3001
|
+
loadPhotoDetail: "guest/site/getPhoto",
|
|
3002
|
+
loadPhotoPageInfo: "guest/site/searchPhotoForPage",
|
|
3003
|
+
loadPhotoPageInfoByGroup: "guest/site/searchPhotoForPageByGroup",
|
|
3004
|
+
loadPhotoListByGroupId: "guest/site/searchPhotoByGroup",
|
|
3005
|
+
loadVideoDetail: "guest/site/getVideo",
|
|
3006
|
+
loadVideoPageInfo: "guest/site/searchVideoForPage",
|
|
3007
|
+
loadVideoPageInfoByGroup: "guest/site/searchVideoForPageByGroup",
|
|
3008
|
+
loadVideoListByGroupId: "guest/site/searchVideoByGroup",
|
|
3009
|
+
loadActivityDetail: "guest/site/getActivity",
|
|
3010
|
+
loadActivityPageInfo: "guest/site/searchActivityForPage",
|
|
3011
|
+
loadActivityPageInfoByGroup: "guest/site/searchActivityForPageByGroup",
|
|
3012
|
+
loadActivityListByGroupId: "guest/site/searchActivityByGroup",
|
|
3013
|
+
loadReviewList: "guest/site/getReviewList",
|
|
3014
|
+
submitComment: "guest/site/comment",
|
|
3015
|
+
subscribe: "guest/site/userSubscribe",
|
|
3016
|
+
submitContactUs: "guest/site/contactUs",
|
|
3017
|
+
loadLinkGroups: "guest/site/getLinkGroupList",
|
|
3018
|
+
loadFriendLinks: "guest/site/getFriendLinks",
|
|
3019
|
+
submitLink: "guest/site/addLink",
|
|
3020
|
+
getSpecDescription: "guest/site/shop/getSpecDescription"
|
|
3021
|
+
};
|
|
3022
|
+
const icmsRouter = async ({ request: e, routeAdapter: t, storage: n }) => await new Jr({
|
|
2866
3023
|
config: {
|
|
2867
|
-
userType:
|
|
3024
|
+
userType: Zt.TYPE_C,
|
|
2868
3025
|
APIMAP,
|
|
2869
3026
|
helloURL
|
|
2870
3027
|
},
|
|
2871
3028
|
adapter: t,
|
|
2872
3029
|
storage: n
|
|
2873
3030
|
}).handleRequest(e);
|
|
2874
|
-
|
|
2875
|
-
cookies = null;
|
|
2876
|
-
constructor() {}
|
|
2877
|
-
async submitComment() {}
|
|
2878
|
-
setICookies(e) {
|
|
2879
|
-
return this.cookies = e, this;
|
|
2880
|
-
}
|
|
2881
|
-
async login({ username: e, password: t }) {
|
|
2882
|
-
if (await Wr("login", { data: {
|
|
2883
|
-
username: e,
|
|
2884
|
-
password: t
|
|
2885
|
-
} }), this.cookies) return Yr(this.cookies);
|
|
2886
|
-
}
|
|
2887
|
-
async logout() {
|
|
2888
|
-
await Wr("logout");
|
|
2889
|
-
}
|
|
2890
|
-
};
|
|
2891
|
-
export { ICMSClient, ICMSServer, helloURL, icmsRouter };
|
|
3031
|
+
export { ICMSServer, helloURL, icmsRouter };
|
|
2892
3032
|
|
|
2893
3033
|
//# sourceMappingURL=icms-api.es.js.map
|