@docoi/mys-sdk 1.1.0 → 1.2.1
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/README.md +2 -1
- package/dist/api/basic.d.ts +164 -1
- package/dist/api/biz.d.ts +21 -23
- package/dist/api/router/index.d.ts +43 -1
- package/dist/api/router/routes.d.ts +40 -0
- package/dist/constants/code.d.ts +2 -0
- package/dist/index.mjs +900 -731
- package/dist/types/enums.d.ts +9 -1
- package/dist/types/params.d.ts +136 -6
- package/dist/types/results.d.ts +65 -5
- package/dist/types/router.d.ts +96 -7
- package/dist/utils/data.d.ts +12 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,64 +1,75 @@
|
|
|
1
|
-
import
|
|
2
|
-
const
|
|
3
|
-
function
|
|
1
|
+
import Xe from "@docoi/jsbridge-sdk";
|
|
2
|
+
const Ae = 0, oe = -1, Qe = 1001, Ze = 1002, Ir = 2002, Sr = 3001, Er = 3002, Cr = 4002, Y = 5001, et = 5002, qe = 9002, kr = 9101, Ar = 9102;
|
|
3
|
+
function l(e) {
|
|
4
4
|
return typeof e == "string";
|
|
5
5
|
}
|
|
6
|
-
function
|
|
6
|
+
function _e(e) {
|
|
7
7
|
return typeof e == "number";
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function S(e) {
|
|
10
10
|
return typeof e == "object" && e !== null;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
if (!
|
|
14
|
-
const
|
|
15
|
-
return
|
|
12
|
+
function E(e) {
|
|
13
|
+
if (!S(e) || Object.prototype.toString.call(e) !== "[object Object]") return !1;
|
|
14
|
+
const t = Object.getPrototypeOf(e);
|
|
15
|
+
return t === null || Object.getPrototypeOf(t) === null;
|
|
16
16
|
}
|
|
17
|
-
function
|
|
18
|
-
return
|
|
17
|
+
function tt(e) {
|
|
18
|
+
return l(e) && /^\d+(\.\d+){1,3}$/.test(e);
|
|
19
19
|
}
|
|
20
|
-
const
|
|
21
|
-
function
|
|
22
|
-
return
|
|
20
|
+
const nt = /^data:image\/[\w.+-]+;base64,[A-Za-z0-9+/]/i, rt = /^[A-Za-z0-9+/]+={0,2}$/;
|
|
21
|
+
function it(e) {
|
|
22
|
+
return l(e) && (nt.test(e) || rt.test(e));
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function ue(e, t = null) {
|
|
25
25
|
try {
|
|
26
26
|
return JSON.parse(e);
|
|
27
|
-
} catch (
|
|
28
|
-
return
|
|
27
|
+
} catch (n) {
|
|
28
|
+
return t;
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function ye(e) {
|
|
32
32
|
try {
|
|
33
33
|
return decodeURIComponent(e);
|
|
34
|
-
} catch (
|
|
34
|
+
} catch (t) {
|
|
35
35
|
return e;
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
function
|
|
39
|
-
if (
|
|
38
|
+
function w(e) {
|
|
39
|
+
if (l(e)) return e;
|
|
40
40
|
if (e instanceof Error) return e.message || "system error";
|
|
41
|
-
if (
|
|
42
|
-
if (
|
|
43
|
-
if (
|
|
44
|
-
if (
|
|
41
|
+
if (S(e)) {
|
|
42
|
+
if (l(e.errMsg)) return e.errMsg;
|
|
43
|
+
if (l(e.msg)) return e.msg;
|
|
44
|
+
if (l(e.message)) return e.message;
|
|
45
45
|
}
|
|
46
46
|
return "system error";
|
|
47
47
|
}
|
|
48
|
-
|
|
48
|
+
function R(e) {
|
|
49
|
+
if (!l(e)) return e;
|
|
50
|
+
const t = ue(e);
|
|
51
|
+
return E(t) ? t : e;
|
|
52
|
+
}
|
|
53
|
+
class B extends Error {
|
|
49
54
|
}
|
|
50
|
-
function
|
|
51
|
-
if (typeof e == "bigint") throw new
|
|
52
|
-
if (e instanceof Map || e instanceof Set) throw new
|
|
55
|
+
function Re(e, t) {
|
|
56
|
+
if (typeof e == "bigint") throw new B(`${t} 是 BigInt,不能传给 Native`);
|
|
57
|
+
if (e instanceof Map || e instanceof Set) throw new B(`${t} 是 ${e.constructor.name},不能传给 Native`);
|
|
53
58
|
if (typeof ArrayBuffer != "undefined" && (e instanceof ArrayBuffer || ArrayBuffer.isView(e)))
|
|
54
|
-
throw new
|
|
55
|
-
if (typeof Blob != "undefined" && e instanceof Blob) throw new
|
|
59
|
+
throw new B(`${t} 是二进制数据,不能传给 Native`);
|
|
60
|
+
if (typeof Blob != "undefined" && e instanceof Blob) throw new B(`${t} 是 Blob,不能传给 Native`);
|
|
56
61
|
}
|
|
57
|
-
function
|
|
58
|
-
|
|
59
|
-
return n === void 0 ? void 0 : JSON.parse(n);
|
|
62
|
+
function Oe(e, t) {
|
|
63
|
+
return e && Re(t, e), t;
|
|
60
64
|
}
|
|
61
|
-
|
|
65
|
+
function W(e) {
|
|
66
|
+
const t = JSON.stringify(e, Oe);
|
|
67
|
+
return t === void 0 ? void 0 : JSON.parse(t);
|
|
68
|
+
}
|
|
69
|
+
function ot(e) {
|
|
70
|
+
return Re(e, "value"), JSON.stringify(e, Oe);
|
|
71
|
+
}
|
|
72
|
+
const C = {
|
|
62
73
|
/** iOS 调用通道 */
|
|
63
74
|
iosInvoke: "jsbridge",
|
|
64
75
|
/** iOS 上 H5 异步回调的回传通道 */
|
|
@@ -69,434 +80,441 @@ const E = {
|
|
|
69
80
|
globalInvoke: "JSBridgeInvoke",
|
|
70
81
|
/** 回调 ID 前缀,1.0.0 为 cb_ */
|
|
71
82
|
callbackIdPrefix: "cb"
|
|
72
|
-
},
|
|
73
|
-
class
|
|
74
|
-
constructor(
|
|
75
|
-
super(
|
|
83
|
+
}, ut = "[jsbridge]";
|
|
84
|
+
class G extends Error {
|
|
85
|
+
constructor(t, n) {
|
|
86
|
+
super(n), this.kind = t;
|
|
76
87
|
}
|
|
77
88
|
}
|
|
78
|
-
const
|
|
79
|
-
let
|
|
80
|
-
function g(e, ...
|
|
81
|
-
!
|
|
89
|
+
const X = { error: 1, warn: 2, info: 3, debug: 4 };
|
|
90
|
+
let Te = !1, Be = "info", Ne = !0;
|
|
91
|
+
function g(e, ...t) {
|
|
92
|
+
!Te || !Ne || X[e] > X[Be] || console[e](`${ut} [${e.toUpperCase()}]`, ...t);
|
|
82
93
|
}
|
|
83
|
-
let
|
|
84
|
-
const
|
|
85
|
-
function
|
|
86
|
-
var
|
|
87
|
-
const
|
|
88
|
-
return typeof (
|
|
94
|
+
let st = 1;
|
|
95
|
+
const V = /* @__PURE__ */ new Map(), Q = /* @__PURE__ */ new Map(), N = /* @__PURE__ */ new Map(), he = /* @__PURE__ */ new Map();
|
|
96
|
+
function De(e) {
|
|
97
|
+
var n, r;
|
|
98
|
+
const t = (r = (n = window.webkit) == null ? void 0 : n.messageHandlers) == null ? void 0 : r[e];
|
|
99
|
+
return typeof (t == null ? void 0 : t.postMessage) == "function" ? t : void 0;
|
|
89
100
|
}
|
|
90
|
-
function
|
|
101
|
+
function Me() {
|
|
91
102
|
return window.JSBridgeNative;
|
|
92
103
|
}
|
|
93
|
-
function
|
|
94
|
-
const
|
|
95
|
-
if (
|
|
96
|
-
|
|
104
|
+
function ct(e) {
|
|
105
|
+
const t = De(C.iosInvoke);
|
|
106
|
+
if (t) {
|
|
107
|
+
t.postMessage(e);
|
|
97
108
|
return;
|
|
98
109
|
}
|
|
99
|
-
const
|
|
100
|
-
if (
|
|
101
|
-
|
|
110
|
+
const n = Me();
|
|
111
|
+
if (n && typeof n.call == "function") {
|
|
112
|
+
n.call(JSON.stringify(e));
|
|
102
113
|
return;
|
|
103
114
|
}
|
|
104
|
-
throw new
|
|
105
|
-
}
|
|
106
|
-
function en() {
|
|
107
|
-
return `${E.callbackIdPrefix}_${Date.now()}_${Qe++}`;
|
|
115
|
+
throw new G("communication", "当前环境不支持调用原生方法");
|
|
108
116
|
}
|
|
109
|
-
function
|
|
110
|
-
return
|
|
117
|
+
function dt() {
|
|
118
|
+
return `${C.callbackIdPrefix}_${Date.now()}_${st++}`;
|
|
111
119
|
}
|
|
112
|
-
function
|
|
113
|
-
return
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
120
|
+
function lt(e) {
|
|
121
|
+
return S(e) && !!e.error;
|
|
122
|
+
}
|
|
123
|
+
function be(e, t) {
|
|
124
|
+
return new Promise((n, r) => {
|
|
125
|
+
const i = dt();
|
|
126
|
+
V.set(i, (o) => {
|
|
127
|
+
const c = R(o);
|
|
128
|
+
if (lt(c)) {
|
|
129
|
+
r(new G("native", w(c.error)));
|
|
118
130
|
return;
|
|
119
131
|
}
|
|
120
|
-
|
|
121
|
-
}), g("debug", `调用原生方法: ${e}`,
|
|
132
|
+
n(c);
|
|
133
|
+
}), g("debug", `调用原生方法: ${e}`, t);
|
|
122
134
|
try {
|
|
123
|
-
|
|
135
|
+
ct({ method: e, params: t, callbackId: i });
|
|
124
136
|
} catch (o) {
|
|
125
|
-
|
|
137
|
+
V.delete(i), r(new G("communication", w(o)));
|
|
126
138
|
}
|
|
127
139
|
});
|
|
128
140
|
}
|
|
129
|
-
function
|
|
130
|
-
const
|
|
131
|
-
return
|
|
141
|
+
function ft(e, t) {
|
|
142
|
+
const n = he.get(e), r = n ? n.then(t, t) : t();
|
|
143
|
+
return he.set(e, r.then(we, we)), r;
|
|
132
144
|
}
|
|
133
|
-
function
|
|
145
|
+
function we() {
|
|
134
146
|
}
|
|
135
|
-
function
|
|
136
|
-
return
|
|
147
|
+
function at(e, t, n) {
|
|
148
|
+
return Z(), (n == null ? void 0 : n.queue) === "serial" ? ft(e, () => be(e, t)) : be(e, t);
|
|
137
149
|
}
|
|
138
|
-
function
|
|
150
|
+
function gt(e, t) {
|
|
139
151
|
if (!e) {
|
|
140
152
|
g("warn", "无效的回调ID");
|
|
141
153
|
return;
|
|
142
154
|
}
|
|
143
|
-
g("debug", `接收到回调: ${e}`,
|
|
144
|
-
const
|
|
145
|
-
if (!
|
|
155
|
+
g("debug", `接收到回调: ${e}`, t);
|
|
156
|
+
const n = V.get(e);
|
|
157
|
+
if (!n) {
|
|
146
158
|
g("warn", `未找到回调: ${e}`);
|
|
147
159
|
return;
|
|
148
160
|
}
|
|
149
161
|
try {
|
|
150
|
-
t
|
|
162
|
+
n(t);
|
|
151
163
|
} catch (r) {
|
|
152
164
|
g("error", `回调执行错误: ${e}`, r);
|
|
153
165
|
} finally {
|
|
154
|
-
|
|
166
|
+
V.delete(e);
|
|
155
167
|
}
|
|
156
168
|
}
|
|
157
|
-
function
|
|
158
|
-
g("debug", `接收到事件: ${e}`,
|
|
159
|
-
const
|
|
160
|
-
if (
|
|
161
|
-
for (const r of [...
|
|
169
|
+
function yt(e, t) {
|
|
170
|
+
g("debug", `接收到事件: ${e}`, t);
|
|
171
|
+
const n = N.get(e);
|
|
172
|
+
if (n != null && n.length)
|
|
173
|
+
for (const r of [...n])
|
|
162
174
|
try {
|
|
163
|
-
r(
|
|
175
|
+
r(t);
|
|
164
176
|
} catch (i) {
|
|
165
177
|
g("warn", `事件处理器执行错误: ${e}`, i);
|
|
166
178
|
}
|
|
167
179
|
}
|
|
168
|
-
function
|
|
180
|
+
function ht(e) {
|
|
169
181
|
return JSON.stringify({ success: !0, data: e });
|
|
170
182
|
}
|
|
171
|
-
function
|
|
183
|
+
function ve(e) {
|
|
172
184
|
return JSON.stringify({ success: !1, error: e });
|
|
173
185
|
}
|
|
174
|
-
function
|
|
175
|
-
g("debug", `调用原生回调: ${e}`,
|
|
176
|
-
const
|
|
177
|
-
if (
|
|
178
|
-
|
|
186
|
+
function pe(e, t) {
|
|
187
|
+
g("debug", `调用原生回调: ${e}`, t);
|
|
188
|
+
const n = De(C.iosCallback);
|
|
189
|
+
if (n) {
|
|
190
|
+
n.postMessage({ callbackId: e, data: t });
|
|
179
191
|
return;
|
|
180
192
|
}
|
|
181
|
-
const r =
|
|
182
|
-
r && typeof r.callback == "function" && r.callback(e, JSON.stringify(
|
|
193
|
+
const r = Me();
|
|
194
|
+
r && typeof r.callback == "function" && r.callback(e, JSON.stringify(t));
|
|
183
195
|
}
|
|
184
|
-
function
|
|
185
|
-
g("debug", `接收到原生调用: ${e}`,
|
|
186
|
-
const r =
|
|
196
|
+
function bt(e, t, n) {
|
|
197
|
+
g("debug", `接收到原生调用: ${e}`, t);
|
|
198
|
+
const r = Q.get(e);
|
|
187
199
|
if (!r) {
|
|
188
200
|
const i = `方法 ${e} 未注册`;
|
|
189
|
-
return g("error", i),
|
|
201
|
+
return g("error", i), ve({ code: -1, message: i });
|
|
190
202
|
}
|
|
191
203
|
try {
|
|
192
|
-
const i = r(
|
|
193
|
-
return i && typeof i.then == "function" ?
|
|
194
|
-
(o) =>
|
|
195
|
-
(o) =>
|
|
204
|
+
const i = r(t);
|
|
205
|
+
return i && typeof i.then == "function" ? n ? (i.then(
|
|
206
|
+
(o) => pe(n, { success: !0, data: o }),
|
|
207
|
+
(o) => pe(n, {
|
|
196
208
|
success: !1,
|
|
197
|
-
error: { message:
|
|
209
|
+
error: { message: w(o) }
|
|
198
210
|
})
|
|
199
|
-
), null) : (g("warn", `异步方法 ${e} 没有 callbackId,结果无法回传`), null) :
|
|
211
|
+
), null) : (g("warn", `异步方法 ${e} 没有 callbackId,结果无法回传`), null) : ht(i);
|
|
200
212
|
} catch (i) {
|
|
201
|
-
const o =
|
|
202
|
-
return g("error", `方法执行错误: ${e}`, o),
|
|
213
|
+
const o = w(i);
|
|
214
|
+
return g("error", `方法执行错误: ${e}`, o), ve({ message: o });
|
|
203
215
|
}
|
|
204
216
|
}
|
|
205
|
-
function
|
|
217
|
+
function wt() {
|
|
206
218
|
if (typeof window == "undefined") return;
|
|
207
219
|
const e = window;
|
|
208
|
-
typeof e[
|
|
220
|
+
typeof e[C.globalEvent] != "function" && (e[C.globalEvent] = () => {
|
|
209
221
|
});
|
|
210
222
|
}
|
|
211
|
-
let
|
|
212
|
-
function
|
|
213
|
-
if (
|
|
214
|
-
|
|
223
|
+
let Pe = !1;
|
|
224
|
+
function Z() {
|
|
225
|
+
if (Pe) return;
|
|
226
|
+
Pe = !0;
|
|
215
227
|
const e = window;
|
|
216
|
-
e[
|
|
217
|
-
}
|
|
218
|
-
const
|
|
219
|
-
callAsync:
|
|
220
|
-
on(e,
|
|
221
|
-
|
|
222
|
-
const
|
|
223
|
-
if (!
|
|
224
|
-
|
|
228
|
+
e[C.globalCallback] = (t, n) => gt(t, n), e[C.globalEvent] = (t, n) => yt(t, n), e[C.globalInvoke] = (t, n, r) => bt(t, n, r), g("info", "初始化完成");
|
|
229
|
+
}
|
|
230
|
+
const O = {
|
|
231
|
+
callAsync: at,
|
|
232
|
+
on(e, t) {
|
|
233
|
+
Z();
|
|
234
|
+
const n = N.get(e);
|
|
235
|
+
if (!n) {
|
|
236
|
+
N.set(e, [t]);
|
|
225
237
|
return;
|
|
226
238
|
}
|
|
227
|
-
|
|
239
|
+
n.includes(t) || n.push(t);
|
|
228
240
|
},
|
|
229
|
-
off(e,
|
|
230
|
-
const
|
|
231
|
-
if (!
|
|
232
|
-
const r =
|
|
233
|
-
r !== -1 && (
|
|
241
|
+
off(e, t) {
|
|
242
|
+
const n = N.get(e);
|
|
243
|
+
if (!n) return;
|
|
244
|
+
const r = n.indexOf(t);
|
|
245
|
+
r !== -1 && (n.splice(r, 1), n.length || N.delete(e));
|
|
234
246
|
},
|
|
235
|
-
register(e,
|
|
236
|
-
|
|
247
|
+
register(e, t) {
|
|
248
|
+
Z(), Q.set(e, t);
|
|
237
249
|
},
|
|
238
250
|
unregister(e) {
|
|
239
|
-
|
|
251
|
+
Q.delete(e);
|
|
240
252
|
},
|
|
241
|
-
setDebug(e,
|
|
242
|
-
|
|
253
|
+
setDebug(e, t) {
|
|
254
|
+
Te = e, t != null && t.logLevel && t.logLevel in X && (Be = t.logLevel), typeof (t == null ? void 0 : t.useConsole) == "boolean" && (Ne = t.useConsole);
|
|
243
255
|
}
|
|
244
256
|
};
|
|
245
|
-
let
|
|
246
|
-
function
|
|
247
|
-
return
|
|
257
|
+
let k;
|
|
258
|
+
function me(e) {
|
|
259
|
+
return E(e) && tt(e.app_version);
|
|
248
260
|
}
|
|
249
|
-
function
|
|
250
|
-
const
|
|
251
|
-
return
|
|
261
|
+
function vt(e) {
|
|
262
|
+
const t = /#webBaseInfo(.*?[^\\])#/.exec(e);
|
|
263
|
+
return t != null && t[1] ? ue(t[1]) : null;
|
|
252
264
|
}
|
|
253
|
-
function
|
|
254
|
-
if (
|
|
265
|
+
function M() {
|
|
266
|
+
if (k !== void 0) return k;
|
|
255
267
|
if (typeof window == "undefined") return null;
|
|
256
|
-
const e = window,
|
|
257
|
-
if (
|
|
258
|
-
return
|
|
268
|
+
const e = window, t = e._appBaseInfo;
|
|
269
|
+
if (t !== void 0)
|
|
270
|
+
return k = me(t) ? t : null, k;
|
|
259
271
|
if (typeof navigator == "undefined") return null;
|
|
260
|
-
const
|
|
261
|
-
return
|
|
272
|
+
const n = navigator.userAgent.replace(/ +/g, "").replace(/[\r\n]/g, ""), r = vt(n);
|
|
273
|
+
return k = me(r) ? r : null, e._appBaseInfo = k, k;
|
|
262
274
|
}
|
|
263
|
-
function
|
|
264
|
-
return !!
|
|
275
|
+
function Le() {
|
|
276
|
+
return !!M();
|
|
265
277
|
}
|
|
266
|
-
function
|
|
267
|
-
return !!e &&
|
|
278
|
+
function $e(e) {
|
|
279
|
+
return !!e && pt(e) === -1;
|
|
268
280
|
}
|
|
269
|
-
function
|
|
281
|
+
function je() {
|
|
270
282
|
return typeof window == "undefined" ? 1 : window.devicePixelRatio || 1;
|
|
271
283
|
}
|
|
272
|
-
function
|
|
273
|
-
if (!e && !
|
|
284
|
+
function pt(e, t = ((n) => (n = M()) == null ? void 0 : n.app_version)() || "") {
|
|
285
|
+
if (!e && !t) return 0;
|
|
274
286
|
if (!e) return 1;
|
|
275
|
-
if (!
|
|
276
|
-
const r = (d) => d.split(".").map((
|
|
277
|
-
const
|
|
278
|
-
return Number.isFinite(
|
|
279
|
-
}), i = r(e), o = r(
|
|
280
|
-
for (let d = 0; d <
|
|
281
|
-
const
|
|
282
|
-
if (
|
|
283
|
-
if (
|
|
287
|
+
if (!t) return -1;
|
|
288
|
+
const r = (d) => d.split(".").map((f) => {
|
|
289
|
+
const h = Number(f);
|
|
290
|
+
return Number.isFinite(h) ? h : 0;
|
|
291
|
+
}), i = r(e), o = r(t), c = Math.max(i.length, o.length);
|
|
292
|
+
for (let d = 0; d < c; d++) {
|
|
293
|
+
const f = d < i.length ? i[d] : 0, h = d < o.length ? o[d] : 0;
|
|
294
|
+
if (f > h) return -1;
|
|
295
|
+
if (f < h) return 1;
|
|
284
296
|
}
|
|
285
297
|
return 0;
|
|
286
298
|
}
|
|
287
|
-
const
|
|
288
|
-
function
|
|
299
|
+
const Ie = "docoi-web-community-frame";
|
|
300
|
+
function xe() {
|
|
289
301
|
if (typeof navigator == "undefined") return "unknown";
|
|
290
302
|
const e = navigator.userAgent;
|
|
291
303
|
return /\(i[^;]+;( U;)? CPU.+Mac OS X/.test(e) ? "ios" : e.includes("Android") || e.includes("Linux") ? "android" : "unknown";
|
|
292
304
|
}
|
|
293
|
-
function
|
|
305
|
+
function Pt() {
|
|
294
306
|
if (typeof window == "undefined") return !1;
|
|
295
307
|
try {
|
|
296
|
-
return window.self !== window.top && window.name ===
|
|
308
|
+
return window.self !== window.top && window.name === Ie;
|
|
297
309
|
} catch (e) {
|
|
298
|
-
return window.name ===
|
|
310
|
+
return window.name === Ie;
|
|
299
311
|
}
|
|
300
312
|
}
|
|
301
|
-
function
|
|
302
|
-
var
|
|
313
|
+
function Se() {
|
|
314
|
+
var t, n;
|
|
303
315
|
const e = typeof window == "undefined" ? void 0 : window;
|
|
304
316
|
return {
|
|
305
|
-
...
|
|
306
|
-
pixelRatio:
|
|
307
|
-
screenWidth: (
|
|
308
|
-
screenHeight: (
|
|
317
|
+
...M(),
|
|
318
|
+
pixelRatio: je(),
|
|
319
|
+
screenWidth: (t = e == null ? void 0 : e.screen) == null ? void 0 : t.width,
|
|
320
|
+
screenHeight: (n = e == null ? void 0 : e.screen) == null ? void 0 : n.height,
|
|
309
321
|
windowWidth: e == null ? void 0 : e.innerWidth,
|
|
310
322
|
windowHeight: e == null ? void 0 : e.innerHeight
|
|
311
323
|
};
|
|
312
324
|
}
|
|
313
|
-
const
|
|
325
|
+
const q = Xe.init({
|
|
314
326
|
debug: !1
|
|
315
327
|
});
|
|
316
|
-
|
|
317
|
-
const
|
|
318
|
-
|
|
328
|
+
wt();
|
|
329
|
+
const mt = (e, t) => {
|
|
330
|
+
O.setDebug(e, t), q.setDebug(e, t);
|
|
319
331
|
};
|
|
320
332
|
let A;
|
|
321
|
-
const
|
|
333
|
+
const qr = (e) => {
|
|
322
334
|
A = e;
|
|
323
335
|
};
|
|
324
|
-
function
|
|
336
|
+
function ee(e) {
|
|
325
337
|
try {
|
|
326
338
|
A == null || A(e);
|
|
327
|
-
} catch (
|
|
339
|
+
} catch (t) {
|
|
328
340
|
}
|
|
329
341
|
}
|
|
330
|
-
function
|
|
331
|
-
return
|
|
332
|
-
}
|
|
333
|
-
const
|
|
334
|
-
function
|
|
335
|
-
const { since: r, once: i, transform: o } =
|
|
336
|
-
|
|
337
|
-
const
|
|
338
|
-
let d =
|
|
339
|
-
d || (d = /* @__PURE__ */ new Map(),
|
|
340
|
-
const
|
|
341
|
-
i &&
|
|
342
|
+
function p(e) {
|
|
343
|
+
return Le() && $e(e);
|
|
344
|
+
}
|
|
345
|
+
const te = /* @__PURE__ */ new Map();
|
|
346
|
+
function y(e, t, n = {}) {
|
|
347
|
+
const { since: r, once: i, transform: o } = n;
|
|
348
|
+
m(e, t);
|
|
349
|
+
const c = p(r) ? O : q;
|
|
350
|
+
let d = te.get(e);
|
|
351
|
+
d || (d = /* @__PURE__ */ new Map(), te.set(e, d));
|
|
352
|
+
const f = (h) => {
|
|
353
|
+
i && m(e, t);
|
|
354
|
+
const P = R(h);
|
|
355
|
+
t(o ? o(P) : P);
|
|
342
356
|
};
|
|
343
|
-
return d.set(
|
|
344
|
-
}
|
|
345
|
-
function
|
|
346
|
-
const
|
|
347
|
-
if (
|
|
348
|
-
for (const r of
|
|
349
|
-
const i =
|
|
350
|
-
i && (i.target.off(e, i.handler),
|
|
357
|
+
return d.set(t, { handler: f, target: c }), c.on(e, f), () => m(e, t);
|
|
358
|
+
}
|
|
359
|
+
function m(e, t) {
|
|
360
|
+
const n = te.get(e);
|
|
361
|
+
if (n)
|
|
362
|
+
for (const r of t ? [t] : [...n.keys()]) {
|
|
363
|
+
const i = n.get(r);
|
|
364
|
+
i && (i.target.off(e, i.handler), n.delete(r));
|
|
351
365
|
}
|
|
352
366
|
}
|
|
353
|
-
function
|
|
354
|
-
const r =
|
|
355
|
-
return r ?
|
|
367
|
+
function Ue(e, t, n) {
|
|
368
|
+
const r = p(n);
|
|
369
|
+
return r ? O.register(e, async (i) => W(await t(R(i)))) : He(e, t), () => (r ? O : q).unregister(e);
|
|
356
370
|
}
|
|
357
|
-
function
|
|
358
|
-
(
|
|
371
|
+
function It(e, t) {
|
|
372
|
+
(p(t) ? O : q).unregister(e);
|
|
359
373
|
}
|
|
360
|
-
function
|
|
361
|
-
return
|
|
374
|
+
function He(e, t) {
|
|
375
|
+
return q.register(e, async (n) => {
|
|
362
376
|
try {
|
|
363
|
-
const r = await n
|
|
364
|
-
return
|
|
377
|
+
const r = await t(R(n));
|
|
378
|
+
return W(z(r));
|
|
365
379
|
} catch (r) {
|
|
366
|
-
const i =
|
|
380
|
+
const i = kt(e, r);
|
|
367
381
|
try {
|
|
368
|
-
return
|
|
382
|
+
return W(i);
|
|
369
383
|
} catch (o) {
|
|
370
384
|
return { code: i.code, msg: i.msg, result: {} };
|
|
371
385
|
}
|
|
372
386
|
}
|
|
373
|
-
}), () =>
|
|
387
|
+
}), () => q.unregister(e);
|
|
374
388
|
}
|
|
375
|
-
function
|
|
376
|
-
return { code:
|
|
389
|
+
function z(e) {
|
|
390
|
+
return { code: Ae, msg: "ok", result: e != null ? e : {} };
|
|
377
391
|
}
|
|
378
|
-
function
|
|
379
|
-
|
|
392
|
+
function St(e) {
|
|
393
|
+
if (!E(e)) return;
|
|
394
|
+
const t = l(e.code) && /^-?\d+$/.test(e.code) ? Number(e.code) : e.code;
|
|
395
|
+
if (_e(t))
|
|
396
|
+
return { code: t, msg: l(e.msg) ? e.msg : "", result: e.result };
|
|
380
397
|
}
|
|
381
|
-
function
|
|
382
|
-
const r =
|
|
383
|
-
if (!
|
|
384
|
-
|
|
385
|
-
|
|
398
|
+
function Et(e, t, n) {
|
|
399
|
+
const r = R(t), i = St(r);
|
|
400
|
+
if (!i) throw I(e, oe, w(r));
|
|
401
|
+
const { code: o, msg: c, result: d } = i;
|
|
402
|
+
if (o !== Ae) throw I(e, o, c || `code ${o}`);
|
|
403
|
+
return z(ne(e, n, R(d)));
|
|
386
404
|
}
|
|
387
|
-
function
|
|
405
|
+
function ne(e, t, n) {
|
|
388
406
|
try {
|
|
389
|
-
return
|
|
407
|
+
return t ? t(n) : n;
|
|
390
408
|
} catch (r) {
|
|
391
|
-
throw
|
|
409
|
+
throw se(r) ? r : I(e, qe, w(r));
|
|
392
410
|
}
|
|
393
411
|
}
|
|
394
|
-
function
|
|
395
|
-
return
|
|
412
|
+
function se(e) {
|
|
413
|
+
return S(e) && l(e.errMsg) && _e(e.errCode);
|
|
396
414
|
}
|
|
397
|
-
function
|
|
398
|
-
return { errMsg: `${e}:fail ${
|
|
415
|
+
function I(e, t, n) {
|
|
416
|
+
return { errMsg: `${e}:fail ${n}`, errCode: t };
|
|
399
417
|
}
|
|
400
|
-
function
|
|
401
|
-
return
|
|
418
|
+
function Ct(e, t) {
|
|
419
|
+
return t instanceof G ? I(e, t.kind === "native" ? Qe : Y, t.message) : I(e, Y, w(t));
|
|
402
420
|
}
|
|
403
|
-
function
|
|
421
|
+
function kt(e, t) {
|
|
404
422
|
return {
|
|
405
|
-
code:
|
|
406
|
-
msg: `${e}:fail ${
|
|
407
|
-
result:
|
|
423
|
+
code: oe,
|
|
424
|
+
msg: `${e}:fail ${w(t)}`,
|
|
425
|
+
result: S(t) && "result" in t ? t.result : t
|
|
408
426
|
};
|
|
409
427
|
}
|
|
410
|
-
function
|
|
428
|
+
function J(e, t) {
|
|
411
429
|
try {
|
|
412
|
-
e == null || e(
|
|
413
|
-
} catch (
|
|
414
|
-
console.error("[mys-sdk] 回调执行错误",
|
|
430
|
+
e == null || e(t);
|
|
431
|
+
} catch (n) {
|
|
432
|
+
console.error("[mys-sdk] 回调执行错误", n);
|
|
415
433
|
}
|
|
416
434
|
}
|
|
417
|
-
function
|
|
418
|
-
return
|
|
435
|
+
function ce(e, t) {
|
|
436
|
+
return J(t == null ? void 0 : t.fail, e), J(t == null ? void 0 : t.complete, e), Promise.reject(e);
|
|
419
437
|
}
|
|
420
|
-
function
|
|
421
|
-
return
|
|
438
|
+
function Fe(e, t, n) {
|
|
439
|
+
return t.then(
|
|
422
440
|
(r) => {
|
|
423
441
|
const i = r;
|
|
424
|
-
return
|
|
442
|
+
return J(n == null ? void 0 : n.success, i), J(n == null ? void 0 : n.complete, i), i;
|
|
425
443
|
},
|
|
426
|
-
(r) =>
|
|
444
|
+
(r) => ce(se(r) ? r : I(e, Y, w(r)), n)
|
|
427
445
|
);
|
|
428
446
|
}
|
|
429
|
-
function
|
|
430
|
-
return
|
|
447
|
+
function s(e, t, n) {
|
|
448
|
+
return ce(I(e, Ze, `parameter error: ${t}`), n);
|
|
431
449
|
}
|
|
432
|
-
function
|
|
433
|
-
return
|
|
450
|
+
function de(e, t, n) {
|
|
451
|
+
return ce(I(e, et, `unsupported: ${t}`), n);
|
|
434
452
|
}
|
|
435
|
-
function
|
|
453
|
+
function re(e, t, n, r) {
|
|
436
454
|
var o;
|
|
437
|
-
A &&
|
|
455
|
+
A && ee({ fnName: e, channel: "local", appVersion: (o = M()) == null ? void 0 : o.app_version, method: e, data: t });
|
|
438
456
|
let i;
|
|
439
457
|
try {
|
|
440
|
-
i = Promise.resolve(
|
|
441
|
-
} catch (
|
|
442
|
-
i = Promise.reject(
|
|
458
|
+
i = Promise.resolve(z(n()));
|
|
459
|
+
} catch (c) {
|
|
460
|
+
i = Promise.reject(se(c) ? c : I(e, oe, w(c)));
|
|
443
461
|
}
|
|
444
|
-
return
|
|
462
|
+
return Fe(e, i, r);
|
|
445
463
|
}
|
|
446
|
-
function u(e,
|
|
447
|
-
var
|
|
448
|
-
const { since: i, legacyOnly: o, jsbridge:
|
|
449
|
-
let
|
|
464
|
+
function u(e, t = {}, n, r = {}) {
|
|
465
|
+
var ge;
|
|
466
|
+
const { since: i, legacyOnly: o, jsbridge: c, transformResult: d, ...f } = r, h = o || p(i);
|
|
467
|
+
let P;
|
|
450
468
|
try {
|
|
451
|
-
const
|
|
452
|
-
|
|
453
|
-
} catch (
|
|
454
|
-
const
|
|
455
|
-
return
|
|
469
|
+
const a = W(t);
|
|
470
|
+
P = E(a) ? a : {};
|
|
471
|
+
} catch (a) {
|
|
472
|
+
const T = a instanceof B || a instanceof TypeError ? a.message : "参数无法序列化";
|
|
473
|
+
return s(e, T, n);
|
|
456
474
|
}
|
|
457
|
-
const
|
|
458
|
-
let
|
|
475
|
+
const ae = (ge = M()) == null ? void 0 : ge.app_version;
|
|
476
|
+
let L;
|
|
459
477
|
try {
|
|
460
|
-
if (
|
|
461
|
-
const
|
|
462
|
-
A &&
|
|
463
|
-
(
|
|
464
|
-
(
|
|
478
|
+
if (h) {
|
|
479
|
+
const a = ne(e, c == null ? void 0 : c.data, P);
|
|
480
|
+
A && ee({ fnName: e, channel: "jsbridge", appVersion: ae, since: i, method: e, data: a }), L = O.callAsync(e, a, f).then(
|
|
481
|
+
(T) => z(ne(e, c == null ? void 0 : c.result, T)),
|
|
482
|
+
(T) => Promise.reject(Ct(e, T))
|
|
465
483
|
);
|
|
466
484
|
} else
|
|
467
|
-
A &&
|
|
468
|
-
} catch (
|
|
469
|
-
|
|
485
|
+
A && ee({ fnName: e, channel: "mysJSBridge", appVersion: ae, since: i, method: e, data: P }), L = q.callAsync(e, P, f).then((a) => Et(e, a, d));
|
|
486
|
+
} catch (a) {
|
|
487
|
+
L = Promise.reject(a);
|
|
470
488
|
}
|
|
471
|
-
return
|
|
489
|
+
return Fe(e, L, n);
|
|
472
490
|
}
|
|
473
|
-
const
|
|
474
|
-
var
|
|
475
|
-
function
|
|
476
|
-
var
|
|
491
|
+
const _r = u;
|
|
492
|
+
var We = /* @__PURE__ */ ((e) => (e[e.Short = 0] = "Short", e[e.Long = 1] = "Long", e))(We || {}), F = /* @__PURE__ */ ((e) => (e[e.RecentContacts = 1] = "RecentContacts", e[e.External = 2] = "External", e[e.Channel = 3] = "Channel", e))(F || {});
|
|
493
|
+
function At(e) {
|
|
494
|
+
var t;
|
|
477
495
|
return e.text ? u(
|
|
478
496
|
"showToast",
|
|
479
497
|
{
|
|
480
498
|
text: e.text,
|
|
481
|
-
duration: (
|
|
499
|
+
duration: (t = e.duration) != null ? t : We.Short
|
|
482
500
|
},
|
|
483
501
|
e,
|
|
484
502
|
{
|
|
485
503
|
since: "4.4.0",
|
|
486
504
|
// 旧通道 jsbridge 的 showToast 只有 text,没有 duration
|
|
487
|
-
jsbridge: { data: ({ text:
|
|
505
|
+
jsbridge: { data: ({ text: n }) => ({ text: n }) }
|
|
488
506
|
}
|
|
489
|
-
) :
|
|
507
|
+
) : s("showToast", "text is required", e);
|
|
490
508
|
}
|
|
491
|
-
function
|
|
492
|
-
var
|
|
509
|
+
function qt(e = {}) {
|
|
510
|
+
var t, n;
|
|
493
511
|
return u(
|
|
494
512
|
"triggerVibrate",
|
|
495
513
|
{
|
|
496
514
|
duration: e.duration,
|
|
497
|
-
intensity: (
|
|
515
|
+
intensity: (t = e.intensity) != null ? t : 1,
|
|
498
516
|
steps: e.steps,
|
|
499
|
-
repeat: (
|
|
517
|
+
repeat: (n = e.repeat) != null ? n : !1
|
|
500
518
|
},
|
|
501
519
|
e,
|
|
502
520
|
{
|
|
@@ -505,60 +523,60 @@ function vn(e = {}) {
|
|
|
505
523
|
}
|
|
506
524
|
);
|
|
507
525
|
}
|
|
508
|
-
function
|
|
526
|
+
function _t(e) {
|
|
509
527
|
return u("stopVibrate", {}, e, { since: "4.4.0", queue: "serial" });
|
|
510
528
|
}
|
|
511
|
-
function
|
|
529
|
+
function Rt(e) {
|
|
512
530
|
return u("hideKeyboard", {}, e);
|
|
513
531
|
}
|
|
514
|
-
function
|
|
515
|
-
|
|
532
|
+
function Ot(e, t) {
|
|
533
|
+
y("keyboardHeightChange", e, {
|
|
516
534
|
since: "4.4.0",
|
|
517
|
-
once:
|
|
518
|
-
transform: (
|
|
535
|
+
once: t == null ? void 0 : t.once,
|
|
536
|
+
transform: (n) => n ? n / je() : 0
|
|
519
537
|
});
|
|
520
538
|
}
|
|
521
|
-
function
|
|
522
|
-
|
|
539
|
+
function Tt(e) {
|
|
540
|
+
m("keyboardHeightChange", e);
|
|
523
541
|
}
|
|
524
|
-
function
|
|
525
|
-
|
|
542
|
+
function Bt(e, t) {
|
|
543
|
+
y("onCommentPanelChange", e, { since: "4.4.0", once: t == null ? void 0 : t.once });
|
|
526
544
|
}
|
|
527
|
-
function
|
|
528
|
-
|
|
545
|
+
function Nt(e) {
|
|
546
|
+
m("onCommentPanelChange", e);
|
|
529
547
|
}
|
|
530
|
-
function
|
|
548
|
+
function Ge(e, t) {
|
|
531
549
|
var i, o;
|
|
532
|
-
if (!((i =
|
|
533
|
-
return
|
|
534
|
-
const
|
|
535
|
-
if (!Number.isInteger(
|
|
536
|
-
return
|
|
550
|
+
if (!((i = t.urls) != null && i.length))
|
|
551
|
+
return s(e, "urls is required", t);
|
|
552
|
+
const n = (o = t.current) != null ? o : 0;
|
|
553
|
+
if (!Number.isInteger(n) || n < 0 || n >= t.urls.length)
|
|
554
|
+
return s(e, "current is out of range", t);
|
|
537
555
|
const r = e === "previewImage";
|
|
538
|
-
return
|
|
556
|
+
return p("4.3.0") ? u(
|
|
539
557
|
"playMedia",
|
|
540
558
|
{
|
|
541
559
|
type: r ? 1 : 2,
|
|
542
|
-
url:
|
|
543
|
-
urls: r ?
|
|
560
|
+
url: t.urls[n],
|
|
561
|
+
urls: r ? t.urls : void 0
|
|
544
562
|
},
|
|
545
|
-
|
|
563
|
+
t,
|
|
546
564
|
{ legacyOnly: !0 }
|
|
547
|
-
) : u("previewMedia", { type: r ? "image" : "video", urls:
|
|
565
|
+
) : u("previewMedia", { type: r ? "image" : "video", urls: t.urls, current: n }, t);
|
|
548
566
|
}
|
|
549
|
-
function
|
|
550
|
-
return
|
|
567
|
+
function Dt(e) {
|
|
568
|
+
return Ge("previewImage", e);
|
|
551
569
|
}
|
|
552
|
-
function
|
|
553
|
-
return
|
|
570
|
+
function Mt(e) {
|
|
571
|
+
return Ge("previewVideo", e);
|
|
554
572
|
}
|
|
555
|
-
function
|
|
556
|
-
var
|
|
557
|
-
return e.count !== void 0 && (!Number.isInteger(e.count) || e.count <= 0) ?
|
|
573
|
+
function Lt(e = {}) {
|
|
574
|
+
var t, n, r, i, o;
|
|
575
|
+
return e.count !== void 0 && (!Number.isInteger(e.count) || e.count <= 0) ? s("chooseMedia", "可选择照片数量范围为1-9张", e) : u(
|
|
558
576
|
"chooseMedia",
|
|
559
577
|
{
|
|
560
|
-
count: (
|
|
561
|
-
mediaType: (
|
|
578
|
+
count: (t = e.count) != null ? t : 9,
|
|
579
|
+
mediaType: (n = e.mediaType) != null ? n : "image",
|
|
562
580
|
compressed: (r = e.compressed) != null ? r : !0,
|
|
563
581
|
maxDuration: (i = e.maxDuration) != null ? i : 60,
|
|
564
582
|
camera: (o = e.camera) != null ? o : "back"
|
|
@@ -567,223 +585,323 @@ function _n(e = {}) {
|
|
|
567
585
|
{ queue: "serial" }
|
|
568
586
|
);
|
|
569
587
|
}
|
|
570
|
-
let
|
|
571
|
-
function
|
|
572
|
-
var
|
|
588
|
+
let K = !1;
|
|
589
|
+
function $t(e) {
|
|
590
|
+
var n;
|
|
573
591
|
if (!Array.isArray(e.files) || e.files.length === 0)
|
|
574
|
-
return
|
|
592
|
+
return s("uploadFiles", "files is required", e);
|
|
575
593
|
if (e.files.some((r) => !r))
|
|
576
|
-
return
|
|
577
|
-
if (
|
|
578
|
-
return
|
|
579
|
-
|
|
580
|
-
const
|
|
594
|
+
return s("uploadFiles", "files[] is required", e);
|
|
595
|
+
if (K)
|
|
596
|
+
return s("uploadFiles", "another uploadFiles request is in progress", e);
|
|
597
|
+
K = !0;
|
|
598
|
+
const t = e.onProgress ? y("uploadFilesProgress", e.onProgress) : void 0;
|
|
581
599
|
return u(
|
|
582
600
|
"uploadFiles",
|
|
583
601
|
{
|
|
584
602
|
files: e.files,
|
|
585
|
-
cosDirPath: (
|
|
603
|
+
cosDirPath: (n = e.cosDirPath) != null ? n : "multipleSource/common/"
|
|
586
604
|
},
|
|
587
605
|
e,
|
|
588
606
|
{ queue: "serial" }
|
|
589
607
|
).finally(() => {
|
|
590
|
-
|
|
608
|
+
K = !1, t == null || t();
|
|
591
609
|
});
|
|
592
610
|
}
|
|
593
|
-
function
|
|
594
|
-
const
|
|
595
|
-
if (
|
|
596
|
-
throw { errMsg: `saveImageToPhotosAlbum:fail ${
|
|
611
|
+
function jt(e) {
|
|
612
|
+
const t = E(e) ? e : {};
|
|
613
|
+
if (t.status === "success" || t.result === "success") return;
|
|
614
|
+
throw { errMsg: `saveImageToPhotosAlbum:fail ${l(t.reason) && t.reason ? t.reason : "unknown reason"}`, errCode: qe, errDetail: e };
|
|
597
615
|
}
|
|
598
|
-
function
|
|
599
|
-
return
|
|
616
|
+
function xt(e) {
|
|
617
|
+
return it(e == null ? void 0 : e.filePath) ? u("saveMediaToPhotosAlbum", { type: "image", file: e.filePath }, e, {
|
|
600
618
|
legacyOnly: !0,
|
|
601
|
-
jsbridge: { result:
|
|
602
|
-
}) :
|
|
619
|
+
jsbridge: { result: jt }
|
|
620
|
+
}) : s("saveImageToPhotosAlbum", "filePath must be base64 data (data URL or plain base64)", e);
|
|
621
|
+
}
|
|
622
|
+
const Ee = ["qrCode", "barCode"];
|
|
623
|
+
function Ut(e = {}) {
|
|
624
|
+
const { scanType: t, onlyFromCamera: n } = e;
|
|
625
|
+
return t !== void 0 && (!Array.isArray(t) || t.length === 0 || t.some((r) => !Ee.includes(r))) ? s("scanCode", "scanType must be a non-empty array of qrCode or barCode", e) : n !== void 0 && typeof n != "boolean" ? s("scanCode", "onlyFromCamera must be a boolean", e) : u(
|
|
626
|
+
"scanCode",
|
|
627
|
+
{ scanType: t != null ? t : [...Ee], onlyFromCamera: n != null ? n : !1 },
|
|
628
|
+
e,
|
|
629
|
+
{
|
|
630
|
+
// 扫码页是独占界面,连续点击不应拉起两个
|
|
631
|
+
queue: "serial",
|
|
632
|
+
// 取消时 Native 可能不带 result 或只带 cancelled,补齐成约定结构
|
|
633
|
+
transformResult: (r) => {
|
|
634
|
+
const i = E(r) ? r : {}, o = i.cancelled === !0;
|
|
635
|
+
return {
|
|
636
|
+
result: o || !l(i.result) ? "" : i.result,
|
|
637
|
+
scanType: o ? void 0 : i.scanType,
|
|
638
|
+
cancelled: o
|
|
639
|
+
};
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
);
|
|
603
643
|
}
|
|
604
|
-
let
|
|
605
|
-
function
|
|
606
|
-
|
|
607
|
-
const { onEnd:
|
|
644
|
+
let v;
|
|
645
|
+
function Ht(e) {
|
|
646
|
+
v == null || v.release();
|
|
647
|
+
const { onEnd: t, onProgress: n } = e != null ? e : {};
|
|
608
648
|
let r, i;
|
|
609
649
|
const o = {
|
|
610
650
|
stopProgress: () => r == null ? void 0 : r(),
|
|
611
651
|
release: () => {
|
|
612
|
-
r == null || r(), i == null || i(),
|
|
652
|
+
r == null || r(), i == null || i(), v === o && (v = void 0);
|
|
613
653
|
}
|
|
614
654
|
};
|
|
615
|
-
return r =
|
|
616
|
-
o.release(),
|
|
617
|
-
}),
|
|
618
|
-
}
|
|
619
|
-
function
|
|
620
|
-
const
|
|
621
|
-
if (
|
|
622
|
-
return
|
|
623
|
-
const { release:
|
|
624
|
-
return u("startRecordAudio", { maxDuration:
|
|
625
|
-
throw
|
|
655
|
+
return r = n ? y("onRecordAudioProgress", n) : void 0, i = y("onRecordAudioEnd", (c) => {
|
|
656
|
+
o.release(), t == null || t({ ...c, duration: c.duration / 1e3, size: c.size / 1024 });
|
|
657
|
+
}), v = o, o;
|
|
658
|
+
}
|
|
659
|
+
function Ft(e) {
|
|
660
|
+
const t = e == null ? void 0 : e.maxDuration;
|
|
661
|
+
if (t !== void 0 && (!Number.isFinite(t) || t <= 0))
|
|
662
|
+
return s("startRecordAudio", "maxDuration must be a number greater than 0", e);
|
|
663
|
+
const { release: n } = Ht(e);
|
|
664
|
+
return u("startRecordAudio", { maxDuration: t }, e, { queue: "serial" }).catch((r) => {
|
|
665
|
+
throw n(), r;
|
|
626
666
|
});
|
|
627
667
|
}
|
|
628
|
-
function
|
|
629
|
-
const
|
|
668
|
+
function Wt(e) {
|
|
669
|
+
const t = v;
|
|
630
670
|
return u("stopRecordAudio", {}, e).then(
|
|
631
|
-
(
|
|
632
|
-
(
|
|
633
|
-
throw
|
|
671
|
+
(n) => (t == null || t.stopProgress(), n),
|
|
672
|
+
(n) => {
|
|
673
|
+
throw t == null || t.release(), n;
|
|
634
674
|
}
|
|
635
675
|
);
|
|
636
676
|
}
|
|
637
|
-
function
|
|
638
|
-
return
|
|
677
|
+
function Gt(e) {
|
|
678
|
+
return v == null || v.release(), u("cancelRecordAudio", {}, e);
|
|
639
679
|
}
|
|
640
|
-
function
|
|
641
|
-
return
|
|
642
|
-
transformResult: (
|
|
680
|
+
function Vt(e) {
|
|
681
|
+
return p("4.4.0") ? re("getSystemInfo", {}, Se, e) : u("getSystemInfo", {}, e, {
|
|
682
|
+
transformResult: (t) => ({ ...Se(), ...E(t) ? t : {} })
|
|
643
683
|
});
|
|
644
684
|
}
|
|
645
|
-
function
|
|
646
|
-
return e.data === void 0 ?
|
|
685
|
+
function Jt(e) {
|
|
686
|
+
return e.data === void 0 ? s("setClipboardData", "data is required", e) : u("setClipboardData", { data: e.data }, e);
|
|
647
687
|
}
|
|
648
|
-
function
|
|
688
|
+
function zt(e) {
|
|
649
689
|
return u("getClipboardData", {}, e);
|
|
650
690
|
}
|
|
651
|
-
function
|
|
652
|
-
return { permission: "notification", result:
|
|
691
|
+
function Kt(e) {
|
|
692
|
+
return { permission: "notification", result: E(e) && e.isOpen === !0 ? "granted" : "denied" };
|
|
653
693
|
}
|
|
654
|
-
function
|
|
655
|
-
return e.permission ?
|
|
694
|
+
function Yt(e) {
|
|
695
|
+
return e.permission ? p("4.4.0") ? e.permission !== "notification" ? de("checkPermission", `permission ${e.permission} requires app >= 4.4.0`, e) : u("isNotificationEnabled", {}, e, {
|
|
656
696
|
legacyOnly: !0,
|
|
657
|
-
jsbridge: { result:
|
|
658
|
-
}) : u("checkPermission", { permission: e.permission }, e) :
|
|
697
|
+
jsbridge: { result: Kt }
|
|
698
|
+
}) : u("checkPermission", { permission: e.permission }, e) : s("checkPermission", "permission is required", e);
|
|
659
699
|
}
|
|
660
|
-
function
|
|
661
|
-
return e.permission ?
|
|
700
|
+
function Xt(e) {
|
|
701
|
+
return e.permission ? p("4.4.0") ? e.permission !== "notification" ? de("openPhoneSetting", `permission ${e.permission} requires app >= 4.4.0`, e) : u("gotoSetPhoneNotify", {}, e, { legacyOnly: !0 }) : u("openPhoneSetting", { permission: e.permission }, e, { queue: "serial" }) : s("openPhoneSetting", "permission is required", e);
|
|
702
|
+
}
|
|
703
|
+
const ie = "web_";
|
|
704
|
+
function le(e) {
|
|
705
|
+
return e.startsWith(ie) ? e : `${ie}${e}`;
|
|
706
|
+
}
|
|
707
|
+
const Ce = Symbol("invalid json");
|
|
708
|
+
function Qt(e) {
|
|
709
|
+
if (!l(e == null ? void 0 : e.key) || !e.key)
|
|
710
|
+
return s("setStorage", "key is required", e);
|
|
711
|
+
let t;
|
|
712
|
+
try {
|
|
713
|
+
t = ot(e.value);
|
|
714
|
+
} catch (n) {
|
|
715
|
+
return s("setStorage", w(n), e);
|
|
716
|
+
}
|
|
717
|
+
return t === void 0 ? s("setStorage", "value cannot be serialized to JSON", e) : u("setStorage", { key: le(e.key), value: t }, e);
|
|
718
|
+
}
|
|
719
|
+
function Zt(e) {
|
|
720
|
+
return !l(e == null ? void 0 : e.key) || !e.key ? s("getStorage", "key is required", e) : u("getStorage", { key: le(e.key) }, e, {
|
|
721
|
+
// Native 约定 result 为 { data: string | null },data 是 setStorage 存入的 JSON 文本;抛错由钩子归一成失败
|
|
722
|
+
transformResult: (t) => {
|
|
723
|
+
const n = E(t) ? t.data : void 0;
|
|
724
|
+
if (n == null) return { data: null };
|
|
725
|
+
if (!l(n)) throw new Error("stored data is not a string");
|
|
726
|
+
const r = ue(n, Ce);
|
|
727
|
+
if (r === Ce) throw new Error("stored data is not valid JSON");
|
|
728
|
+
return { data: r };
|
|
729
|
+
}
|
|
730
|
+
});
|
|
662
731
|
}
|
|
663
|
-
function
|
|
732
|
+
function en(e) {
|
|
733
|
+
return !l(e == null ? void 0 : e.key) || !e.key ? s("removeStorage", "key is required", e) : u("removeStorage", { key: le(e.key) }, e);
|
|
734
|
+
}
|
|
735
|
+
function tn(e) {
|
|
736
|
+
return u("clearStorage", { prefix: ie }, e);
|
|
737
|
+
}
|
|
738
|
+
function nn(e = {}) {
|
|
664
739
|
return u("openApp", { url: e.url, packageNames: e.packageNames }, e, { since: "4.4.0", queue: "serial" });
|
|
665
740
|
}
|
|
666
|
-
function
|
|
667
|
-
return typeof (e == null ? void 0 : e.enable) != "boolean" ?
|
|
741
|
+
function rn(e) {
|
|
742
|
+
return typeof (e == null ? void 0 : e.enable) != "boolean" ? s("swipeBack", "enable must be a boolean", e) : u("swipeBack", { enable: e.enable }, e);
|
|
668
743
|
}
|
|
669
|
-
function
|
|
670
|
-
|
|
744
|
+
function on(e = {}) {
|
|
745
|
+
var t;
|
|
746
|
+
return e.enabled !== void 0 && typeof e.enabled != "boolean" ? s("setPullDownRefresh", "enabled must be a boolean", e) : u("setPullDownRefresh", { enabled: (t = e.enabled) != null ? t : !0 }, e);
|
|
671
747
|
}
|
|
672
|
-
function
|
|
748
|
+
function un(e) {
|
|
749
|
+
return u("startPullDownRefresh", {}, e);
|
|
750
|
+
}
|
|
751
|
+
function sn(e) {
|
|
752
|
+
return u("stopPullDownRefresh", {}, e);
|
|
753
|
+
}
|
|
754
|
+
function cn(e, t) {
|
|
755
|
+
y("pullDownRefresh", e, { once: t == null ? void 0 : t.once });
|
|
756
|
+
}
|
|
757
|
+
function dn(e) {
|
|
758
|
+
m("pullDownRefresh", e);
|
|
759
|
+
}
|
|
760
|
+
function ln(e) {
|
|
761
|
+
return l(e == null ? void 0 : e.title) ? u("setNavigationBarTitle", { title: e.title }, e) : s("setNavigationBarTitle", "title must be a string", e);
|
|
762
|
+
}
|
|
763
|
+
const fn = /^#[0-9a-fA-F]{6}$/;
|
|
764
|
+
function an(e) {
|
|
765
|
+
return !l(e == null ? void 0 : e.backgroundColor) || !fn.test(e.backgroundColor) ? s("setNavigationBarColor", "backgroundColor must be #RRGGBB", e) : e.frontColor !== "white" && e.frontColor !== "black" ? s("setNavigationBarColor", "frontColor must be white or black", e) : u("setNavigationBarColor", { backgroundColor: e.backgroundColor, frontColor: e.frontColor }, e);
|
|
766
|
+
}
|
|
767
|
+
function gn(e) {
|
|
768
|
+
return u("showNavigationBar", {}, e);
|
|
769
|
+
}
|
|
770
|
+
function yn(e) {
|
|
771
|
+
return u("hideNavigationBar", {}, e);
|
|
772
|
+
}
|
|
773
|
+
function hn(e) {
|
|
774
|
+
return (e == null ? void 0 : e.style) !== "light" && (e == null ? void 0 : e.style) !== "dark" ? s("setStatusBarStyle", "style must be light or dark", e) : u("setStatusBarStyle", { style: e.style }, e);
|
|
775
|
+
}
|
|
776
|
+
function bn(e) {
|
|
777
|
+
return e.nameType === void 0 ? s("showPageName", "nameType is required", e) : u("showPageName", { nameType: e.nameType }, e, { since: "4.4.0" });
|
|
778
|
+
}
|
|
779
|
+
function wn(e) {
|
|
673
780
|
return u("H5Loaded", {}, e, { since: "4.4.0" });
|
|
674
781
|
}
|
|
675
|
-
function
|
|
782
|
+
function vn(e) {
|
|
676
783
|
return u("getBeforeInfo", {}, e, { since: "4.4.0" });
|
|
677
784
|
}
|
|
678
|
-
function
|
|
785
|
+
function pn(e = {}) {
|
|
679
786
|
return u("setH5BeforeInfo", e, e, { since: "4.4.0" });
|
|
680
787
|
}
|
|
681
|
-
function
|
|
682
|
-
|
|
788
|
+
function Pn(e, t) {
|
|
789
|
+
y("h5PageShow", e, { since: "4.4.0", once: t == null ? void 0 : t.once });
|
|
683
790
|
}
|
|
684
|
-
function
|
|
685
|
-
|
|
791
|
+
function mn(e) {
|
|
792
|
+
m("h5PageShow", e);
|
|
686
793
|
}
|
|
687
|
-
function
|
|
688
|
-
|
|
794
|
+
function In(e, t) {
|
|
795
|
+
y("h5PageVisible", e, { since: "4.4.0", once: t == null ? void 0 : t.once });
|
|
689
796
|
}
|
|
690
|
-
function
|
|
691
|
-
|
|
797
|
+
function Sn(e) {
|
|
798
|
+
m("h5PageVisible", e);
|
|
692
799
|
}
|
|
693
|
-
function
|
|
694
|
-
|
|
800
|
+
function En(e, t) {
|
|
801
|
+
y("h5PageInvisible", e, { since: "4.4.0", once: t == null ? void 0 : t.once });
|
|
695
802
|
}
|
|
696
|
-
function
|
|
697
|
-
|
|
803
|
+
function Cn(e) {
|
|
804
|
+
m("h5PageInvisible", e);
|
|
698
805
|
}
|
|
699
|
-
const
|
|
806
|
+
const kn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
700
807
|
__proto__: null,
|
|
701
|
-
cancelRecordAudio:
|
|
702
|
-
checkPermission:
|
|
703
|
-
chooseMedia:
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
808
|
+
cancelRecordAudio: Gt,
|
|
809
|
+
checkPermission: Yt,
|
|
810
|
+
chooseMedia: Lt,
|
|
811
|
+
clearStorage: tn,
|
|
812
|
+
getBeforeInfo: vn,
|
|
813
|
+
getClipboardData: zt,
|
|
814
|
+
getStorage: Zt,
|
|
815
|
+
getSystemInfo: Vt,
|
|
816
|
+
h5Loaded: wn,
|
|
817
|
+
hideKeyboard: Rt,
|
|
818
|
+
hideNavigationBar: yn,
|
|
819
|
+
offCommentPanelChange: Nt,
|
|
820
|
+
offKeyboardHeightChange: Tt,
|
|
821
|
+
offPageInvisible: Cn,
|
|
822
|
+
offPageShow: mn,
|
|
823
|
+
offPageVisible: Sn,
|
|
824
|
+
offPullDownRefresh: dn,
|
|
825
|
+
onCommentPanelChange: Bt,
|
|
826
|
+
onKeyboardHeightChange: Ot,
|
|
827
|
+
onPageInvisible: En,
|
|
828
|
+
onPageShow: Pn,
|
|
829
|
+
onPageVisible: In,
|
|
830
|
+
onPullDownRefresh: cn,
|
|
831
|
+
openApp: nn,
|
|
832
|
+
openPhoneSetting: Xt,
|
|
833
|
+
previewImage: Dt,
|
|
834
|
+
previewVideo: Mt,
|
|
835
|
+
removeStorage: en,
|
|
836
|
+
saveImageToPhotosAlbum: xt,
|
|
837
|
+
scanCode: Ut,
|
|
838
|
+
setBeforeInfo: pn,
|
|
839
|
+
setClipboardData: Jt,
|
|
840
|
+
setNavigationBarColor: an,
|
|
841
|
+
setNavigationBarTitle: ln,
|
|
842
|
+
setPullDownRefresh: on,
|
|
843
|
+
setStatusBarStyle: hn,
|
|
844
|
+
setStorage: Qt,
|
|
845
|
+
showNavigationBar: gn,
|
|
846
|
+
showPageName: bn,
|
|
847
|
+
showToast: At,
|
|
848
|
+
startPullDownRefresh: un,
|
|
849
|
+
startRecordAudio: Ft,
|
|
850
|
+
stopPullDownRefresh: sn,
|
|
851
|
+
stopRecordAudio: Wt,
|
|
852
|
+
stopVibrate: _t,
|
|
853
|
+
swipeBack: rn,
|
|
854
|
+
triggerVibrate: qt,
|
|
855
|
+
uploadFiles: $t
|
|
734
856
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
735
|
-
function
|
|
857
|
+
function An(e) {
|
|
736
858
|
return u("login", {}, e, { since: "4.4.0", queue: "serial" });
|
|
737
859
|
}
|
|
738
|
-
function
|
|
739
|
-
return u("getToken", {}, e, {
|
|
740
|
-
since: "4.4.0",
|
|
741
|
-
// 旧通道可能直接返回 token 字符串,统一成对象
|
|
742
|
-
jsbridge: { result: (n) => f(n) ? { token: n } : n }
|
|
743
|
-
});
|
|
860
|
+
function qn(e) {
|
|
861
|
+
return u("getToken", {}, e, { since: "4.4.0" });
|
|
744
862
|
}
|
|
745
|
-
function
|
|
863
|
+
function _n(e) {
|
|
746
864
|
return u("getCurrentCircleInfo", {}, e, { since: "4.4.0" });
|
|
747
865
|
}
|
|
748
|
-
function
|
|
866
|
+
function Rn(e) {
|
|
749
867
|
var r;
|
|
750
868
|
if (!e.title)
|
|
751
|
-
return
|
|
869
|
+
return s("shareWebCard", "title is required", e);
|
|
752
870
|
if (!e.daokeUrl)
|
|
753
|
-
return
|
|
754
|
-
const { activityDetail:
|
|
871
|
+
return s("shareWebCard", "daokeUrl is required", e);
|
|
872
|
+
const { activityDetail: t } = e, n = On(e);
|
|
755
873
|
return u(
|
|
756
874
|
"shareWebCard",
|
|
757
875
|
{
|
|
758
876
|
...e,
|
|
759
|
-
shareTypes: (r = e.shareTypes) != null ? r : [
|
|
760
|
-
activityDetail:
|
|
877
|
+
shareTypes: (r = e.shareTypes) != null ? r : [F.RecentContacts, F.External, F.Channel],
|
|
878
|
+
activityDetail: S(t) ? JSON.stringify(t) : t
|
|
761
879
|
},
|
|
762
880
|
e,
|
|
763
881
|
{ since: "4.4.0", queue: "serial" }
|
|
764
882
|
).catch((i) => {
|
|
765
|
-
throw
|
|
883
|
+
throw n(), i;
|
|
766
884
|
});
|
|
767
885
|
}
|
|
768
|
-
let
|
|
769
|
-
function
|
|
770
|
-
|
|
771
|
-
const { onShared:
|
|
772
|
-
let o,
|
|
886
|
+
let $;
|
|
887
|
+
function On(e) {
|
|
888
|
+
$ == null || $();
|
|
889
|
+
const { onShared: t, getSharePictureUrl: n, isSharePic: r } = e, i = r ? n : void 0;
|
|
890
|
+
let o, c;
|
|
773
891
|
const d = () => {
|
|
774
|
-
o == null || o(),
|
|
892
|
+
o == null || o(), c == null || c();
|
|
775
893
|
};
|
|
776
|
-
return (
|
|
777
|
-
d(),
|
|
778
|
-
}, { since: "4.4.0" })), i && (
|
|
894
|
+
return (t || i) && (o = y("onShared", (f) => {
|
|
895
|
+
d(), t == null || t(f);
|
|
896
|
+
}, { since: "4.4.0" })), i && (c = Ue("getSharePictureUrl", i, "4.4.0")), $ = d, d;
|
|
779
897
|
}
|
|
780
|
-
function
|
|
781
|
-
return !e.url || !/^https?:\/\//i.test(e.url) ?
|
|
898
|
+
function Tn(e) {
|
|
899
|
+
return !e.url || !/^https?:\/\//i.test(e.url) ? s("shareImage", "url must be a valid http(s) url", e) : u("shareImage", { url: e.url }, e, { queue: "serial" });
|
|
782
900
|
}
|
|
783
|
-
function
|
|
901
|
+
function Bn(e) {
|
|
784
902
|
return u("openAddCustomEmoji", {}, e, { since: "4.4.0", queue: "serial" });
|
|
785
903
|
}
|
|
786
|
-
function
|
|
904
|
+
function Nn(e) {
|
|
787
905
|
return e.serverId ? e.dynamicId ? u(
|
|
788
906
|
"openCommentPanel",
|
|
789
907
|
{
|
|
@@ -794,114 +912,139 @@ function dt(e) {
|
|
|
794
912
|
},
|
|
795
913
|
e,
|
|
796
914
|
{ since: "4.4.0", queue: "serial" }
|
|
797
|
-
) :
|
|
915
|
+
) : s("openCommentPanel", "dynamicId is required", e) : s("openCommentPanel", "serverId is required", e);
|
|
798
916
|
}
|
|
799
|
-
function
|
|
917
|
+
function Dn(e) {
|
|
800
918
|
return u("showLongVipDesDialog", {}, e, { since: "4.4.0", queue: "serial" });
|
|
801
919
|
}
|
|
802
|
-
function
|
|
803
|
-
return e.index === void 0 ?
|
|
920
|
+
function Mn(e) {
|
|
921
|
+
return e.index === void 0 ? s("voteAction", "index is required", e) : u("voteAction", e, e, { since: "4.4.0", queue: "serial" });
|
|
804
922
|
}
|
|
805
|
-
function
|
|
806
|
-
return Array.isArray(e.selectedUserIds) ?
|
|
923
|
+
function Ln(e) {
|
|
924
|
+
return Array.isArray(e.selectedUserIds) ? p("4.4.0") ? $n(e) : u("openFriendsList", { selectedUserIds: e.selectedUserIds }, e, {
|
|
807
925
|
queue: "serial",
|
|
808
|
-
transformResult:
|
|
809
|
-
}) :
|
|
926
|
+
transformResult: Ve
|
|
927
|
+
}) : s("openFriendsList", "selectedUserIds is required", e);
|
|
810
928
|
}
|
|
811
|
-
function
|
|
812
|
-
const
|
|
813
|
-
return { selectedList: Array.isArray(
|
|
929
|
+
function Ve(e) {
|
|
930
|
+
const t = S(e) ? e.selectedList : void 0;
|
|
931
|
+
return { selectedList: Array.isArray(t) ? t : [] };
|
|
814
932
|
}
|
|
815
|
-
function
|
|
816
|
-
let
|
|
817
|
-
const
|
|
818
|
-
|
|
933
|
+
function $n(e) {
|
|
934
|
+
let t;
|
|
935
|
+
const n = y("submitFriendsList", (r) => {
|
|
936
|
+
t = r;
|
|
819
937
|
}, { since: "4.4.0" });
|
|
820
938
|
return u("openFriendsList", { selectedUserIds: e.selectedUserIds }, e, {
|
|
821
939
|
legacyOnly: !0,
|
|
822
|
-
jsbridge: { result: () =>
|
|
823
|
-
}).finally(() =>
|
|
940
|
+
jsbridge: { result: () => Ve(t) }
|
|
941
|
+
}).finally(() => n());
|
|
824
942
|
}
|
|
825
|
-
function
|
|
826
|
-
return e.gameName ? e.serverId ? u("pointsMallBindGame", e, e, { since: "4.4.0", queue: "serial" }) :
|
|
943
|
+
function jn(e) {
|
|
944
|
+
return e.gameName ? e.serverId ? u("pointsMallBindGame", e, e, { since: "4.4.0", queue: "serial" }) : s("toBindGameRole", "serverId is required", e) : s("toBindGameRole", "gameName is required", e);
|
|
827
945
|
}
|
|
828
|
-
function
|
|
946
|
+
function xn(e) {
|
|
829
947
|
return u("bindGameRoleSuccess", {}, e, { since: "4.4.0" });
|
|
830
948
|
}
|
|
831
|
-
function
|
|
832
|
-
return e.type === void 0 ?
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
}
|
|
837
|
-
|
|
838
|
-
|
|
949
|
+
function Un(e) {
|
|
950
|
+
return e.type === void 0 ? s("showAd", "type is required", e) : (Hn(e), u("showAdVideo", { type: e.type, params: e.params }, e, {
|
|
951
|
+
since: "4.4.0",
|
|
952
|
+
queue: "serial"
|
|
953
|
+
}));
|
|
954
|
+
}
|
|
955
|
+
const j = /* @__PURE__ */ new Map();
|
|
956
|
+
function Hn(e) {
|
|
957
|
+
var c, d;
|
|
958
|
+
const { onFinished: t } = e;
|
|
959
|
+
if (!t) return;
|
|
960
|
+
const n = (c = e.params) == null ? void 0 : c.module, r = n === void 0 ? void 0 : String(n);
|
|
961
|
+
(d = j.get(r)) == null || d();
|
|
962
|
+
let i;
|
|
963
|
+
const o = () => {
|
|
964
|
+
i == null || i(), j.get(r) === o && j.delete(r);
|
|
965
|
+
};
|
|
966
|
+
i = y("onAdFinished", (f) => {
|
|
967
|
+
r !== void 0 && String(f == null ? void 0 : f.module) !== r || (o(), t(f));
|
|
968
|
+
}, { since: "4.4.0" }), j.set(r, o);
|
|
839
969
|
}
|
|
840
|
-
function
|
|
841
|
-
return e.type ? u("updateData", { type: e.type, params: e.params }, e, { since: "4.4.0" }) :
|
|
970
|
+
function Fn(e) {
|
|
971
|
+
return e.type ? u("updateData", { type: e.type, params: e.params }, e, { since: "4.4.0" }) : s("updateData", "type is required", e);
|
|
842
972
|
}
|
|
843
|
-
function
|
|
844
|
-
|
|
973
|
+
function Wn(e) {
|
|
974
|
+
if (!e.user_id)
|
|
975
|
+
return s("openGiftBag", "user_id is required", e);
|
|
976
|
+
if (!e.server_id)
|
|
977
|
+
return s("openGiftBag", "server_id is required", e);
|
|
978
|
+
const t = Gn(e);
|
|
979
|
+
return u(
|
|
845
980
|
"openGiftBag",
|
|
846
981
|
{ user_id: e.user_id, openBag: e.openBag, server_id: e.server_id },
|
|
847
982
|
e,
|
|
848
983
|
{ since: "4.4.0", queue: "serial" }
|
|
849
|
-
)
|
|
984
|
+
).catch((n) => {
|
|
985
|
+
throw t(), n;
|
|
986
|
+
});
|
|
850
987
|
}
|
|
851
|
-
|
|
852
|
-
|
|
988
|
+
let x;
|
|
989
|
+
function Gn(e) {
|
|
990
|
+
x == null || x();
|
|
991
|
+
const { onSent: t } = e;
|
|
992
|
+
let n;
|
|
993
|
+
const r = () => n == null ? void 0 : n();
|
|
994
|
+
return t && (n = y("openGiftBag", (i) => t(i), { since: "4.4.0" })), x = r, r;
|
|
853
995
|
}
|
|
854
|
-
function
|
|
855
|
-
|
|
996
|
+
function Vn(e) {
|
|
997
|
+
Ue("getMemberActivate", e, "4.4.0");
|
|
856
998
|
}
|
|
857
|
-
|
|
999
|
+
function Jn() {
|
|
1000
|
+
It("getMemberActivate", "4.4.0");
|
|
1001
|
+
}
|
|
1002
|
+
const zn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
858
1003
|
__proto__: null,
|
|
859
|
-
bindGameRoleSuccess:
|
|
860
|
-
getCurrentCircleInfo:
|
|
861
|
-
getToken:
|
|
862
|
-
login:
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
if (window.location.href = e, !n) return;
|
|
881
|
-
let t = !1;
|
|
1004
|
+
bindGameRoleSuccess: xn,
|
|
1005
|
+
getCurrentCircleInfo: _n,
|
|
1006
|
+
getToken: qn,
|
|
1007
|
+
login: An,
|
|
1008
|
+
offMemberActivate: Jn,
|
|
1009
|
+
onMemberActivate: Vn,
|
|
1010
|
+
openAddCustomEmoji: Bn,
|
|
1011
|
+
openCommentPanel: Nn,
|
|
1012
|
+
openFriendsList: Ln,
|
|
1013
|
+
openGiftBag: Wn,
|
|
1014
|
+
shareImage: Tn,
|
|
1015
|
+
shareWebCard: Rn,
|
|
1016
|
+
showAd: Un,
|
|
1017
|
+
showLongVipDesDialog: Dn,
|
|
1018
|
+
toBindGameRole: jn,
|
|
1019
|
+
updateData: Fn,
|
|
1020
|
+
voteAction: Mn
|
|
1021
|
+
}, Symbol.toStringTag, { value: "Module" })), Kn = "community-open-app", Yn = "https://app.docoi.cc/open-app", Xn = /quark|qqbrowser|ucbrowser/, Qn = 2e3;
|
|
1022
|
+
function Zn(e, t) {
|
|
1023
|
+
if (window.location.href = e, !t) return;
|
|
1024
|
+
let n = !1;
|
|
882
1025
|
const r = () => {
|
|
883
|
-
|
|
1026
|
+
n || (n = !0, window.removeEventListener("pagehide", r), document.removeEventListener("visibilitychange", i));
|
|
884
1027
|
}, i = () => {
|
|
885
1028
|
document.hidden && r();
|
|
886
1029
|
};
|
|
887
1030
|
window.addEventListener("pagehide", r), document.addEventListener("visibilitychange", i), setTimeout(() => {
|
|
888
|
-
|
|
889
|
-
},
|
|
1031
|
+
n || (r(), t());
|
|
1032
|
+
}, Qn);
|
|
890
1033
|
}
|
|
891
|
-
function
|
|
892
|
-
if (
|
|
893
|
-
window.parent.postMessage({ type:
|
|
1034
|
+
function er(e, t) {
|
|
1035
|
+
if (Pt()) {
|
|
1036
|
+
window.parent.postMessage({ type: Kn, params: e.query }, "*");
|
|
894
1037
|
return;
|
|
895
1038
|
}
|
|
896
|
-
const
|
|
897
|
-
if (
|
|
1039
|
+
const n = navigator.userAgent.toLowerCase(), r = n.includes("micromessenger") || n.includes("qq/");
|
|
1040
|
+
if (xe() === "ios" && !r && !Xn.test(n)) {
|
|
898
1041
|
const i = e.url.includes("?") ? e.url.slice(e.url.indexOf("?")) : "";
|
|
899
|
-
window.location.href = `${
|
|
1042
|
+
window.location.href = `${Yn}${i}`;
|
|
900
1043
|
return;
|
|
901
1044
|
}
|
|
902
|
-
|
|
1045
|
+
Zn(e.url, t);
|
|
903
1046
|
}
|
|
904
|
-
const
|
|
1047
|
+
const ke = "daoke://", Je = {
|
|
905
1048
|
joinCirclePage: {
|
|
906
1049
|
type: 1,
|
|
907
1050
|
name: "查询圈子并加入",
|
|
@@ -925,6 +1068,7 @@ const me = "daoke://", $e = {
|
|
|
925
1068
|
fields: {
|
|
926
1069
|
serverId: { key: "cid", required: !0 },
|
|
927
1070
|
action: { key: "actionType", enum: { publish: "1" } },
|
|
1071
|
+
publishType: { key: "publishType" },
|
|
928
1072
|
relationType: {
|
|
929
1073
|
key: "relationType",
|
|
930
1074
|
enum: { apprentice: "1", graduate: "2", intimacyShare: "3", takeApprentice: "4" }
|
|
@@ -1035,8 +1179,18 @@ const me = "daoke://", $e = {
|
|
|
1035
1179
|
serverId: { key: "serverId" }
|
|
1036
1180
|
}
|
|
1037
1181
|
},
|
|
1038
|
-
addCustomEmojiPage: { type: 34, name: "添加自定义表情", since: "4.4.0", fields: {} }
|
|
1039
|
-
|
|
1182
|
+
addCustomEmojiPage: { type: 34, name: "添加自定义表情", since: "4.4.0", fields: {} },
|
|
1183
|
+
dynamicPublishPage: {
|
|
1184
|
+
type: 35,
|
|
1185
|
+
name: "动态发布",
|
|
1186
|
+
since: "4.4.0",
|
|
1187
|
+
fields: {
|
|
1188
|
+
serverId: { key: "serverId", required: !0 },
|
|
1189
|
+
channelId: { key: "channelId" },
|
|
1190
|
+
publishType: { key: "publishType" }
|
|
1191
|
+
}
|
|
1192
|
+
}
|
|
1193
|
+
}, tr = {
|
|
1040
1194
|
type: 18,
|
|
1041
1195
|
name: "底部 tab",
|
|
1042
1196
|
since: "3.7.0",
|
|
@@ -1046,7 +1200,7 @@ const me = "daoke://", $e = {
|
|
|
1046
1200
|
subTab: { key: "subTab", enum: { friends: "1_0", square: "1_1", comic: "1_2" } },
|
|
1047
1201
|
fromMbtiShare: { key: "form_mbti_share", bool: !0 }
|
|
1048
1202
|
}
|
|
1049
|
-
},
|
|
1203
|
+
}, nr = {
|
|
1050
1204
|
type: 5,
|
|
1051
1205
|
name: "Webview",
|
|
1052
1206
|
fields: {
|
|
@@ -1054,272 +1208,287 @@ const me = "daoke://", $e = {
|
|
|
1054
1208
|
type: { key: "h5Type", required: !0, enum: { normal: "1", mini: "2", dynamic: "3", immersive: "4" } },
|
|
1055
1209
|
isUpdateApp: { key: "isUpdateApp", bool: !0 }
|
|
1056
1210
|
}
|
|
1057
|
-
},
|
|
1211
|
+
}, rr = {
|
|
1058
1212
|
type: 23,
|
|
1059
1213
|
name: "纯透明 H5",
|
|
1060
1214
|
since: "3.8.0",
|
|
1061
1215
|
fields: { url: { key: "url", required: !0 } }
|
|
1062
|
-
},
|
|
1063
|
-
|
|
1064
|
-
tab:
|
|
1065
|
-
webview:
|
|
1066
|
-
transparentWebview:
|
|
1067
|
-
},
|
|
1068
|
-
Object.keys(
|
|
1216
|
+
}, _ = {
|
|
1217
|
+
...Je,
|
|
1218
|
+
tab: tr,
|
|
1219
|
+
webview: nr,
|
|
1220
|
+
transparentWebview: rr
|
|
1221
|
+
}, ir = Object.fromEntries(
|
|
1222
|
+
Object.keys(_).map((e) => [String(_[e].type), e])
|
|
1069
1223
|
);
|
|
1070
|
-
function
|
|
1071
|
-
const
|
|
1072
|
-
return
|
|
1224
|
+
function or(e) {
|
|
1225
|
+
const t = ir[e];
|
|
1226
|
+
return t ? { key: t, route: _[t] } : void 0;
|
|
1073
1227
|
}
|
|
1074
|
-
const
|
|
1075
|
-
class
|
|
1228
|
+
const ze = "daoke://page";
|
|
1229
|
+
class b extends Error {
|
|
1076
1230
|
}
|
|
1077
|
-
function
|
|
1078
|
-
const
|
|
1231
|
+
function U(e, t = {}) {
|
|
1232
|
+
const n = { type: String(e.type) };
|
|
1079
1233
|
for (const [r, i] of Object.entries(e.fields)) {
|
|
1080
|
-
const o =
|
|
1234
|
+
const o = t[r];
|
|
1081
1235
|
if (o == null || o === "") {
|
|
1082
|
-
if (i.required) throw new
|
|
1236
|
+
if (i.required) throw new b(`${r} is required`);
|
|
1083
1237
|
continue;
|
|
1084
1238
|
}
|
|
1085
1239
|
if (i.enum) {
|
|
1086
|
-
const
|
|
1087
|
-
if (
|
|
1088
|
-
|
|
1240
|
+
const c = i.enum[String(o)];
|
|
1241
|
+
if (c === void 0) throw new b(`${r} must be one of ${Object.keys(i.enum).join(" / ")}`);
|
|
1242
|
+
n[i.key] = c;
|
|
1089
1243
|
} else if (i.bool)
|
|
1090
|
-
|
|
1244
|
+
n[i.key] = o ? "true" : "false";
|
|
1091
1245
|
else {
|
|
1092
|
-
if (
|
|
1093
|
-
throw new
|
|
1094
|
-
|
|
1246
|
+
if (S(o))
|
|
1247
|
+
throw new b(`${r} must be a string or number`);
|
|
1248
|
+
n[i.key] = String(o);
|
|
1095
1249
|
}
|
|
1096
1250
|
}
|
|
1097
|
-
return
|
|
1098
|
-
}
|
|
1099
|
-
function
|
|
1100
|
-
const
|
|
1101
|
-
return { url: `${
|
|
1102
|
-
}
|
|
1103
|
-
function
|
|
1104
|
-
if (!
|
|
1105
|
-
const
|
|
1106
|
-
if (
|
|
1107
|
-
const
|
|
1108
|
-
for (const r of e.slice(
|
|
1251
|
+
return n;
|
|
1252
|
+
}
|
|
1253
|
+
function H(e) {
|
|
1254
|
+
const t = Object.entries(e).map(([n, r]) => `${encodeURIComponent(n)}=${encodeURIComponent(r)}`).join("&");
|
|
1255
|
+
return { url: `${ze}?${t}`, query: e };
|
|
1256
|
+
}
|
|
1257
|
+
function Ke(e) {
|
|
1258
|
+
if (!l(e) || !e.startsWith(ze)) return null;
|
|
1259
|
+
const t = e.indexOf("?");
|
|
1260
|
+
if (t < 0) return null;
|
|
1261
|
+
const n = {};
|
|
1262
|
+
for (const r of e.slice(t + 1).split("&")) {
|
|
1109
1263
|
if (!r) continue;
|
|
1110
|
-
const i = r.indexOf("="), o =
|
|
1111
|
-
o && !(o in
|
|
1264
|
+
const i = r.indexOf("="), o = ye(i < 0 ? r : r.slice(0, i));
|
|
1265
|
+
o && !(o in n) && (n[o] = i < 0 ? "" : ye(r.slice(i + 1)));
|
|
1112
1266
|
}
|
|
1113
|
-
return
|
|
1267
|
+
return n.type && /^\d+$/.test(n.type) ? n : null;
|
|
1114
1268
|
}
|
|
1115
|
-
function
|
|
1269
|
+
function ur(e) {
|
|
1116
1270
|
return "type" in e && !("url" in e);
|
|
1117
1271
|
}
|
|
1118
|
-
function
|
|
1119
|
-
if (!
|
|
1272
|
+
function sr(e) {
|
|
1273
|
+
if (!S(e == null ? void 0 : e.params)) throw new b("params is required");
|
|
1120
1274
|
switch (e.api) {
|
|
1121
1275
|
case "switchTab":
|
|
1122
|
-
return
|
|
1276
|
+
return H(U(_.tab, { ...e.params.params, tab: e.params.tab }));
|
|
1123
1277
|
case "openWebview": {
|
|
1124
|
-
const { url:
|
|
1125
|
-
if (!
|
|
1126
|
-
if (
|
|
1127
|
-
if (!
|
|
1128
|
-
if (r && Object.keys(r).length) throw new
|
|
1129
|
-
return
|
|
1278
|
+
const { url: t, type: n = "normal", params: r } = e.params;
|
|
1279
|
+
if (!t || !l(t)) throw new b("url is required");
|
|
1280
|
+
if (n !== "transparent") return H(U(_.webview, { ...r, url: t, type: n }));
|
|
1281
|
+
if (!t.startsWith("https://")) throw new b("transparent webview url must be https");
|
|
1282
|
+
if (r && Object.keys(r).length) throw new b("transparent webview does not support params");
|
|
1283
|
+
return H(U(_.transparentWebview, { url: t }));
|
|
1130
1284
|
}
|
|
1131
1285
|
case "navigateTo": {
|
|
1132
|
-
if (
|
|
1133
|
-
const
|
|
1134
|
-
if (!
|
|
1135
|
-
return
|
|
1286
|
+
if (ur(e.params)) {
|
|
1287
|
+
const n = Je[e.params.type];
|
|
1288
|
+
if (!n) throw new b(`unknown page type: ${String(e.params.type)}`);
|
|
1289
|
+
return H(U(n, e.params.params));
|
|
1136
1290
|
}
|
|
1137
|
-
const
|
|
1138
|
-
if (!
|
|
1139
|
-
return { url: e.params.url, query:
|
|
1291
|
+
const t = Ke(e.params.url);
|
|
1292
|
+
if (!t) throw new b("url or type is required, url must be a daoke://page?type= link");
|
|
1293
|
+
return { url: e.params.url, query: t };
|
|
1140
1294
|
}
|
|
1141
1295
|
default:
|
|
1142
|
-
throw new
|
|
1296
|
+
throw new b("unknown navigation api");
|
|
1143
1297
|
}
|
|
1144
1298
|
}
|
|
1145
|
-
const
|
|
1299
|
+
const D = "4.4.0", cr = 11, dr = {
|
|
1300
|
+
dynamicPublishPage: { page: 7, params: (e) => ({ server_id: e.serverId, channel_id: e.channelId }) },
|
|
1146
1301
|
profileEditPage: { page: 10 },
|
|
1147
1302
|
douyinMallPage: { page: 14 },
|
|
1148
1303
|
likeListPage: { page: 15, params: (e) => ({ dynamicId: e.dynamicId, publishType: e.publishType }) },
|
|
1149
1304
|
adPage: { page: 16, params: (e) => ({ url: e.url }) }
|
|
1150
|
-
},
|
|
1305
|
+
}, lr = {
|
|
1151
1306
|
bindGamePage: { method: "pointsMallBindGame", data: (e) => ({ gameName: e.gameName, serverId: e.serverId }) },
|
|
1152
1307
|
addCustomEmojiPage: { method: "openAddCustomEmoji", data: () => ({}) }
|
|
1153
1308
|
};
|
|
1154
|
-
function
|
|
1309
|
+
function fr(e, t) {
|
|
1155
1310
|
var r, i, o;
|
|
1156
|
-
const
|
|
1157
|
-
if (
|
|
1158
|
-
const
|
|
1159
|
-
if (
|
|
1160
|
-
const d =
|
|
1311
|
+
const n = or((r = t.type) != null ? r : "");
|
|
1312
|
+
if (n && $e(n.route.since)) {
|
|
1313
|
+
const c = lr[n.key];
|
|
1314
|
+
if (c) return { via: "legacyMethod", method: c.method, data: c.data(t) };
|
|
1315
|
+
const d = dr[n.key];
|
|
1161
1316
|
if (!d) {
|
|
1162
|
-
const { name:
|
|
1163
|
-
return { via: "unsupported", reason: `${
|
|
1317
|
+
const { name: f, type: h, since: P } = n.route;
|
|
1318
|
+
return { via: "unsupported", reason: `${f}(type ${h})需要 App ${P}+` };
|
|
1164
1319
|
}
|
|
1165
|
-
return { via: "redirectPage", page: d.page, params: (o = (i = d.params) == null ? void 0 : i.call(d,
|
|
1320
|
+
return { via: "redirectPage", page: d.page, params: (o = (i = d.params) == null ? void 0 : i.call(d, t)) != null ? o : {} };
|
|
1166
1321
|
}
|
|
1167
|
-
return
|
|
1322
|
+
return xe() === "ios" ? { via: "redirectPage", page: cr, params: { url: e } } : { via: "locationHref" };
|
|
1168
1323
|
}
|
|
1169
|
-
function
|
|
1170
|
-
return
|
|
1324
|
+
function ar(e, t) {
|
|
1325
|
+
return Le() ? p(D) ? fr(e.url, e.query) : { via: "openScheme", extra: t } : { via: "launchOutsideApp" };
|
|
1171
1326
|
}
|
|
1172
|
-
function
|
|
1173
|
-
switch (
|
|
1327
|
+
function gr(e, t, n, r) {
|
|
1328
|
+
switch (t.via) {
|
|
1174
1329
|
case "launchOutsideApp":
|
|
1175
|
-
return
|
|
1330
|
+
return re(e, { url: n.url }, () => er(n, r == null ? void 0 : r.onLaunchFail), r);
|
|
1176
1331
|
case "openScheme":
|
|
1177
|
-
return u("openScheme", { url:
|
|
1332
|
+
return u("openScheme", { url: n.url, ...t.extra }, r, { queue: "serial" });
|
|
1178
1333
|
case "redirectPage":
|
|
1179
|
-
return u("redirectPage", { page:
|
|
1180
|
-
since:
|
|
1334
|
+
return u("redirectPage", { page: t.page, params: t.params }, r, {
|
|
1335
|
+
since: D,
|
|
1181
1336
|
queue: "serial"
|
|
1182
1337
|
});
|
|
1183
1338
|
case "legacyMethod":
|
|
1184
|
-
return u(
|
|
1339
|
+
return u(t.method, t.data, r, { since: D, queue: "serial" });
|
|
1185
1340
|
case "locationHref":
|
|
1186
|
-
return
|
|
1187
|
-
window.location.href =
|
|
1341
|
+
return re(e, { url: n.url }, () => {
|
|
1342
|
+
window.location.href = n.url;
|
|
1188
1343
|
}, r);
|
|
1189
1344
|
case "unsupported":
|
|
1190
|
-
return
|
|
1345
|
+
return de(e, t.reason, r);
|
|
1191
1346
|
}
|
|
1192
1347
|
}
|
|
1193
|
-
function
|
|
1194
|
-
const i =
|
|
1195
|
-
return
|
|
1348
|
+
function Ye(e, t, n, r = {}) {
|
|
1349
|
+
const i = ar(t, r);
|
|
1350
|
+
return gr(e, i, t, n);
|
|
1196
1351
|
}
|
|
1197
|
-
function
|
|
1198
|
-
let
|
|
1352
|
+
function fe(e, t) {
|
|
1353
|
+
let n;
|
|
1199
1354
|
try {
|
|
1200
|
-
|
|
1355
|
+
n = sr(e);
|
|
1201
1356
|
} catch (r) {
|
|
1202
|
-
return
|
|
1357
|
+
return s(e.api, r instanceof b ? r.message : String(r), t);
|
|
1203
1358
|
}
|
|
1204
|
-
return
|
|
1359
|
+
return Ye(e.api, n, t);
|
|
1205
1360
|
}
|
|
1206
|
-
function
|
|
1207
|
-
return
|
|
1361
|
+
function yr(e) {
|
|
1362
|
+
return fe({ api: "switchTab", params: e }, e);
|
|
1208
1363
|
}
|
|
1209
|
-
function
|
|
1210
|
-
return
|
|
1364
|
+
function hr(e) {
|
|
1365
|
+
return fe({ api: "navigateTo", params: e }, e);
|
|
1211
1366
|
}
|
|
1212
|
-
function
|
|
1213
|
-
return
|
|
1367
|
+
function br(e) {
|
|
1368
|
+
return fe({ api: "openWebview", params: e }, e);
|
|
1214
1369
|
}
|
|
1215
|
-
function
|
|
1370
|
+
function wr(e) {
|
|
1216
1371
|
var r;
|
|
1217
|
-
const { url:
|
|
1218
|
-
return !
|
|
1372
|
+
const { url: t, params: n } = e != null ? e : {};
|
|
1373
|
+
return !l(t) || !t.startsWith(ke) ? s("openScheme", `url must start with ${ke}`, e) : Ye("openScheme", { url: t, query: (r = Ke(t)) != null ? r : {} }, e, n ? { params: n } : {});
|
|
1219
1374
|
}
|
|
1220
|
-
function
|
|
1375
|
+
function vr(e) {
|
|
1221
1376
|
return e != null && e.url ? u("openInExternalBrowser", { url: e.url }, e, {
|
|
1222
|
-
since:
|
|
1377
|
+
since: D,
|
|
1223
1378
|
queue: "serial"
|
|
1224
|
-
}) :
|
|
1379
|
+
}) : s("openInExternalBrowser", "url is required", e);
|
|
1225
1380
|
}
|
|
1226
|
-
function
|
|
1227
|
-
return u("closeWebView", {}, e, { since:
|
|
1381
|
+
function pr(e) {
|
|
1382
|
+
return u("closeWebView", {}, e, { since: D, queue: "serial" });
|
|
1228
1383
|
}
|
|
1229
|
-
const
|
|
1384
|
+
const Pr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1230
1385
|
__proto__: null,
|
|
1231
|
-
closeWebView:
|
|
1232
|
-
navigateTo:
|
|
1233
|
-
openInExternalBrowser:
|
|
1234
|
-
openScheme:
|
|
1235
|
-
openWebview:
|
|
1236
|
-
switchTab:
|
|
1237
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1238
|
-
...
|
|
1239
|
-
...
|
|
1240
|
-
...
|
|
1241
|
-
setDebug:
|
|
1242
|
-
registerNativeHandler:
|
|
1386
|
+
closeWebView: pr,
|
|
1387
|
+
navigateTo: hr,
|
|
1388
|
+
openInExternalBrowser: vr,
|
|
1389
|
+
openScheme: wr,
|
|
1390
|
+
openWebview: br,
|
|
1391
|
+
switchTab: yr
|
|
1392
|
+
}, Symbol.toStringTag, { value: "Module" })), Rr = {
|
|
1393
|
+
...kn,
|
|
1394
|
+
...Pr,
|
|
1395
|
+
...zn,
|
|
1396
|
+
setDebug: mt,
|
|
1397
|
+
registerNativeHandler: He
|
|
1243
1398
|
};
|
|
1244
1399
|
export {
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1400
|
+
Y as BRIDGE_ERROR,
|
|
1401
|
+
qe as CUSTOM,
|
|
1402
|
+
et as ENV_UNSUPPORTED,
|
|
1403
|
+
Qe as METHOD_NOT_FOUND,
|
|
1404
|
+
Cr as NETWORK_ERROR,
|
|
1405
|
+
Ir as NOT_LOGGED_IN,
|
|
1406
|
+
Ze as PARAMS_ERROR,
|
|
1407
|
+
Er as PERMISSION_DENIED,
|
|
1408
|
+
kr as RECORD_BUSY,
|
|
1409
|
+
Ar as RECORD_FAILED,
|
|
1410
|
+
Ae as SUCCESS,
|
|
1411
|
+
oe as SYSTEM_EXCEPTION,
|
|
1412
|
+
F as ShareType,
|
|
1413
|
+
We as ToastDuration,
|
|
1414
|
+
Sr as UNAUTHORIZED,
|
|
1415
|
+
xn as bindGameRoleSuccess,
|
|
1416
|
+
Gt as cancelRecordAudio,
|
|
1417
|
+
Yt as checkPermission,
|
|
1418
|
+
Lt as chooseMedia,
|
|
1419
|
+
tn as clearStorage,
|
|
1420
|
+
pr as closeWebView,
|
|
1421
|
+
pt as compareVersions,
|
|
1422
|
+
Rr as default,
|
|
1423
|
+
M as getAppBaseInfo,
|
|
1424
|
+
vn as getBeforeInfo,
|
|
1425
|
+
zt as getClipboardData,
|
|
1426
|
+
_n as getCurrentCircleInfo,
|
|
1427
|
+
Zt as getStorage,
|
|
1428
|
+
Vt as getSystemInfo,
|
|
1429
|
+
qn as getToken,
|
|
1430
|
+
wn as h5Loaded,
|
|
1431
|
+
Rt as hideKeyboard,
|
|
1432
|
+
yn as hideNavigationBar,
|
|
1433
|
+
_r as invokeDebug,
|
|
1434
|
+
Le as isInApp,
|
|
1435
|
+
An as login,
|
|
1436
|
+
hr as navigateTo,
|
|
1437
|
+
Nt as offCommentPanelChange,
|
|
1438
|
+
Tt as offKeyboardHeightChange,
|
|
1439
|
+
Jn as offMemberActivate,
|
|
1440
|
+
Cn as offPageInvisible,
|
|
1441
|
+
mn as offPageShow,
|
|
1442
|
+
Sn as offPageVisible,
|
|
1443
|
+
dn as offPullDownRefresh,
|
|
1444
|
+
Bt as onCommentPanelChange,
|
|
1445
|
+
Ot as onKeyboardHeightChange,
|
|
1446
|
+
Vn as onMemberActivate,
|
|
1447
|
+
En as onPageInvisible,
|
|
1448
|
+
Pn as onPageShow,
|
|
1449
|
+
In as onPageVisible,
|
|
1450
|
+
cn as onPullDownRefresh,
|
|
1451
|
+
qr as onRoute,
|
|
1452
|
+
Bn as openAddCustomEmoji,
|
|
1453
|
+
nn as openApp,
|
|
1454
|
+
Nn as openCommentPanel,
|
|
1455
|
+
Ln as openFriendsList,
|
|
1456
|
+
Wn as openGiftBag,
|
|
1457
|
+
vr as openInExternalBrowser,
|
|
1458
|
+
Xt as openPhoneSetting,
|
|
1459
|
+
wr as openScheme,
|
|
1460
|
+
br as openWebview,
|
|
1461
|
+
Dt as previewImage,
|
|
1462
|
+
Mt as previewVideo,
|
|
1463
|
+
He as registerNativeHandler,
|
|
1464
|
+
en as removeStorage,
|
|
1465
|
+
xt as saveImageToPhotosAlbum,
|
|
1466
|
+
Ut as scanCode,
|
|
1467
|
+
pn as setBeforeInfo,
|
|
1468
|
+
Jt as setClipboardData,
|
|
1469
|
+
mt as setDebug,
|
|
1470
|
+
an as setNavigationBarColor,
|
|
1471
|
+
ln as setNavigationBarTitle,
|
|
1472
|
+
on as setPullDownRefresh,
|
|
1473
|
+
hn as setStatusBarStyle,
|
|
1474
|
+
Qt as setStorage,
|
|
1475
|
+
Tn as shareImage,
|
|
1476
|
+
Rn as shareWebCard,
|
|
1477
|
+
Un as showAd,
|
|
1478
|
+
Dn as showLongVipDesDialog,
|
|
1479
|
+
gn as showNavigationBar,
|
|
1480
|
+
bn as showPageName,
|
|
1481
|
+
At as showToast,
|
|
1482
|
+
un as startPullDownRefresh,
|
|
1483
|
+
Ft as startRecordAudio,
|
|
1484
|
+
sn as stopPullDownRefresh,
|
|
1485
|
+
Wt as stopRecordAudio,
|
|
1486
|
+
_t as stopVibrate,
|
|
1487
|
+
rn as swipeBack,
|
|
1488
|
+
yr as switchTab,
|
|
1489
|
+
jn as toBindGameRole,
|
|
1490
|
+
qt as triggerVibrate,
|
|
1491
|
+
Fn as updateData,
|
|
1492
|
+
$t as uploadFiles,
|
|
1493
|
+
Mn as voteAction
|
|
1325
1494
|
};
|