superapp-miniapp-invoke-native 1.11.2 → 1.11.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/lib/main.d.ts +0 -2
- package/lib/main.js +645 -704
- package/lib/main.umd.cjs +1 -1
- package/package.json +1 -1
package/lib/main.js
CHANGED
|
@@ -1,130 +1,130 @@
|
|
|
1
1
|
/* eslint-disable no-restricted-globals, no-unused-expressions */
|
|
2
2
|
/* global globalThis, AndroidInitialContext */
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var ve = (t, e, r) => e in t ?
|
|
3
|
+
var kr = Object.defineProperty, br = Object.defineProperties;
|
|
4
|
+
var Tr = Object.getOwnPropertyDescriptors;
|
|
5
|
+
var je = Object.getOwnPropertySymbols;
|
|
6
|
+
var Br = Object.prototype.hasOwnProperty, Vr = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var ve = (t, e, r) => e in t ? kr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, b = (t, e) => {
|
|
8
8
|
for (var r in e || (e = {}))
|
|
9
|
-
|
|
10
|
-
if (
|
|
11
|
-
for (var r of
|
|
12
|
-
|
|
9
|
+
Br.call(e, r) && ve(t, r, e[r]);
|
|
10
|
+
if (je)
|
|
11
|
+
for (var r of je(e))
|
|
12
|
+
Vr.call(e, r) && ve(t, r, e[r]);
|
|
13
13
|
return t;
|
|
14
|
-
}, T = (t, e) =>
|
|
14
|
+
}, T = (t, e) => br(t, Tr(e));
|
|
15
15
|
var P = (t, e, r) => (ve(t, typeof e != "symbol" ? e + "" : e, r), r);
|
|
16
|
-
var
|
|
17
|
-
var i = (
|
|
16
|
+
var o = (t, e, r) => new Promise((n, a) => {
|
|
17
|
+
var i = (d) => {
|
|
18
18
|
try {
|
|
19
|
-
s(r.next(
|
|
20
|
-
} catch (
|
|
21
|
-
|
|
19
|
+
s(r.next(d));
|
|
20
|
+
} catch (u) {
|
|
21
|
+
a(u);
|
|
22
22
|
}
|
|
23
|
-
}, c = (
|
|
23
|
+
}, c = (d) => {
|
|
24
24
|
try {
|
|
25
|
-
s(r.throw(
|
|
26
|
-
} catch (
|
|
27
|
-
|
|
25
|
+
s(r.throw(d));
|
|
26
|
+
} catch (u) {
|
|
27
|
+
a(u);
|
|
28
28
|
}
|
|
29
|
-
}, s = (
|
|
29
|
+
}, s = (d) => d.done ? n(d.value) : Promise.resolve(d.value).then(i, c);
|
|
30
30
|
s((r = r.apply(t, e)).next());
|
|
31
31
|
});
|
|
32
32
|
/*! Capacitor: https://capacitorjs.com/ - MIT License */
|
|
33
|
-
const
|
|
33
|
+
const Hr = (t) => t.CapacitorPlatforms = ((e) => {
|
|
34
34
|
const r = /* @__PURE__ */ new Map();
|
|
35
35
|
r.set("web", { name: "web" });
|
|
36
36
|
const n = e.CapacitorPlatforms || { currentPlatform: { name: "web" }, platforms: r };
|
|
37
|
-
return n.addPlatform = (
|
|
38
|
-
n.platforms.set(
|
|
39
|
-
}, n.setPlatform = (
|
|
40
|
-
n.platforms.has(
|
|
37
|
+
return n.addPlatform = (a, i) => {
|
|
38
|
+
n.platforms.set(a, i);
|
|
39
|
+
}, n.setPlatform = (a) => {
|
|
40
|
+
n.platforms.has(a) && (n.currentPlatform = n.platforms.get(a));
|
|
41
41
|
}, n;
|
|
42
|
-
})(t),
|
|
43
|
-
var
|
|
44
|
-
|
|
42
|
+
})(t), $e = Hr(typeof globalThis != "undefined" ? globalThis : typeof self != "undefined" ? self : typeof window != "undefined" ? window : typeof global != "undefined" ? global : {});
|
|
43
|
+
var j;
|
|
44
|
+
$e.addPlatform, $e.setPlatform, function(t) {
|
|
45
45
|
t.Unimplemented = "UNIMPLEMENTED", t.Unavailable = "UNAVAILABLE";
|
|
46
|
-
}(
|
|
47
|
-
class
|
|
46
|
+
}(j || (j = {}));
|
|
47
|
+
class Ae extends Error {
|
|
48
48
|
constructor(e, r, n) {
|
|
49
49
|
super(e), this.message = e, this.code = r, this.data = n;
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
const
|
|
53
|
-
var e, r, n,
|
|
54
|
-
const c = t.CapacitorCustomPlatform || null, s = t.Capacitor || {},
|
|
52
|
+
const Fr = (t) => {
|
|
53
|
+
var e, r, n, a, i;
|
|
54
|
+
const c = t.CapacitorCustomPlatform || null, s = t.Capacitor || {}, d = s.Plugins = s.Plugins || {}, u = t.CapacitorPlatforms, _ = ((e = u == null ? void 0 : u.currentPlatform) === null || e === void 0 ? void 0 : e.getPlatform) || (() => c !== null ? c.name : ((h) => {
|
|
55
55
|
var m, N;
|
|
56
|
-
return
|
|
57
|
-
})(t)),
|
|
58
|
-
const m = I.get(
|
|
59
|
-
return !!(m != null && m.platforms.has(
|
|
60
|
-
}),
|
|
56
|
+
return h != null && h.androidBridge ? "android" : !((N = (m = h == null ? void 0 : h.webkit) === null || m === void 0 ? void 0 : m.messageHandlers) === null || N === void 0) && N.bridge ? "ios" : "web";
|
|
57
|
+
})(t)), p = ((r = u == null ? void 0 : u.currentPlatform) === null || r === void 0 ? void 0 : r.isNativePlatform) || (() => _() !== "web"), f = ((n = u == null ? void 0 : u.currentPlatform) === null || n === void 0 ? void 0 : n.isPluginAvailable) || ((h) => {
|
|
58
|
+
const m = I.get(h);
|
|
59
|
+
return !!(m != null && m.platforms.has(_())) || !!O(h);
|
|
60
|
+
}), O = ((a = u == null ? void 0 : u.currentPlatform) === null || a === void 0 ? void 0 : a.getPluginHeader) || ((h) => {
|
|
61
61
|
var m;
|
|
62
|
-
return (m = s.PluginHeaders) === null || m === void 0 ? void 0 : m.find((N) => N.name ===
|
|
63
|
-
}), I = /* @__PURE__ */ new Map(),
|
|
64
|
-
const N = I.get(
|
|
62
|
+
return (m = s.PluginHeaders) === null || m === void 0 ? void 0 : m.find((N) => N.name === h);
|
|
63
|
+
}), I = /* @__PURE__ */ new Map(), C = ((i = u == null ? void 0 : u.currentPlatform) === null || i === void 0 ? void 0 : i.registerPlugin) || ((h, m = {}) => {
|
|
64
|
+
const N = I.get(h);
|
|
65
65
|
if (N)
|
|
66
|
-
return console.warn(`Capacitor plugin "${
|
|
67
|
-
const v =
|
|
66
|
+
return console.warn(`Capacitor plugin "${h}" already registered. Cannot register plugins twice.`), N.proxy;
|
|
67
|
+
const v = _(), $ = O(h);
|
|
68
68
|
let k;
|
|
69
|
-
const Me = (
|
|
69
|
+
const Me = (L) => {
|
|
70
70
|
let R;
|
|
71
71
|
const x = (...Y) => {
|
|
72
|
-
const
|
|
72
|
+
const q = (() => o(void 0, null, function* () {
|
|
73
73
|
return !k && v in m ? k = k = typeof m[v] == "function" ? yield m[v]() : m[v] : c !== null && !k && "web" in m && (k = k = typeof m.web == "function" ? yield m.web() : m.web), k;
|
|
74
74
|
}))().then((K) => {
|
|
75
|
-
const
|
|
76
|
-
var
|
|
77
|
-
if (
|
|
78
|
-
if (
|
|
79
|
-
return (
|
|
80
|
-
throw new
|
|
75
|
+
const De = ((A, z) => {
|
|
76
|
+
var Ie, Ce;
|
|
77
|
+
if (!$) {
|
|
78
|
+
if (A)
|
|
79
|
+
return (Ce = A[z]) === null || Ce === void 0 ? void 0 : Ce.bind(A);
|
|
80
|
+
throw new Ae(`"${h}" plugin is not implemented on ${v}`, j.Unimplemented);
|
|
81
81
|
}
|
|
82
82
|
{
|
|
83
|
-
const
|
|
84
|
-
if (
|
|
85
|
-
return
|
|
86
|
-
if (
|
|
87
|
-
return (
|
|
83
|
+
const xe = $ == null ? void 0 : $.methods.find((G) => z === G.name);
|
|
84
|
+
if (xe)
|
|
85
|
+
return xe.rtype === "promise" ? (G) => s.nativePromise(h, z.toString(), G) : (G, Rr) => s.nativeCallback(h, z.toString(), G, Rr);
|
|
86
|
+
if (A)
|
|
87
|
+
return (Ie = A[z]) === null || Ie === void 0 ? void 0 : Ie.bind(A);
|
|
88
88
|
}
|
|
89
|
-
})(K,
|
|
90
|
-
if (
|
|
91
|
-
const
|
|
92
|
-
return R =
|
|
89
|
+
})(K, L);
|
|
90
|
+
if (De) {
|
|
91
|
+
const A = De(...Y);
|
|
92
|
+
return R = A == null ? void 0 : A.remove, A;
|
|
93
93
|
}
|
|
94
|
-
throw new
|
|
94
|
+
throw new Ae(`"${h}.${L}()" is not implemented on ${v}`, j.Unimplemented);
|
|
95
95
|
});
|
|
96
|
-
return
|
|
96
|
+
return L === "addListener" && (q.remove = () => o(void 0, null, function* () {
|
|
97
97
|
return R();
|
|
98
|
-
})),
|
|
98
|
+
})), q;
|
|
99
99
|
};
|
|
100
|
-
return x.toString = () => `${
|
|
101
|
-
},
|
|
102
|
-
const x =
|
|
100
|
+
return x.toString = () => `${L.toString()}() { [capacitor code] }`, Object.defineProperty(x, "name", { value: L, writable: !1, configurable: !1 }), x;
|
|
101
|
+
}, Ue = Me("addListener"), We = Me("removeListener"), Er = (L, R) => {
|
|
102
|
+
const x = Ue({ eventName: L }, R), Y = () => o(void 0, null, function* () {
|
|
103
103
|
const K = yield x;
|
|
104
|
-
|
|
105
|
-
}),
|
|
106
|
-
return
|
|
104
|
+
We({ eventName: L, callbackId: K }, R);
|
|
105
|
+
}), q = new Promise((K) => x.then(() => K({ remove: Y })));
|
|
106
|
+
return q.remove = () => o(void 0, null, function* () {
|
|
107
107
|
console.warn("Using addListener() without 'await' is deprecated."), yield Y();
|
|
108
|
-
}),
|
|
109
|
-
},
|
|
108
|
+
}), q;
|
|
109
|
+
}, fe = new Proxy({}, { get(L, R) {
|
|
110
110
|
switch (R) {
|
|
111
111
|
case "$$typeof":
|
|
112
112
|
return;
|
|
113
113
|
case "toJSON":
|
|
114
114
|
return () => ({});
|
|
115
115
|
case "addListener":
|
|
116
|
-
return
|
|
116
|
+
return $ ? Er : Ue;
|
|
117
117
|
case "removeListener":
|
|
118
|
-
return
|
|
118
|
+
return We;
|
|
119
119
|
default:
|
|
120
120
|
return Me(R);
|
|
121
121
|
}
|
|
122
122
|
} });
|
|
123
|
-
return
|
|
123
|
+
return d[h] = fe, I.set(h, { name: h, proxy: fe, platforms: /* @__PURE__ */ new Set([...Object.keys(m), ...$ ? [v] : []]) }), fe;
|
|
124
124
|
});
|
|
125
|
-
return s.convertFileSrc || (s.convertFileSrc = (
|
|
126
|
-
},
|
|
127
|
-
|
|
125
|
+
return s.convertFileSrc || (s.convertFileSrc = (h) => h), s.getPlatform = _, s.handleError = (h) => t.console.error(h), s.isNativePlatform = p, s.isPluginAvailable = f, s.pluginMethodNoop = (h, m, N) => Promise.reject(`${N} does not have an implementation of "${m}".`), s.registerPlugin = C, s.Exception = Ae, s.DEBUG = !!s.DEBUG, s.isLoggingEnabled = !!s.isLoggingEnabled, s.platform = s.getPlatform(), s.isNative = s.isNativePlatform(), s;
|
|
126
|
+
}, Ur = (t) => t.Capacitor = Fr(t), w = Ur(typeof globalThis != "undefined" ? globalThis : typeof self != "undefined" ? self : typeof window != "undefined" ? window : typeof global != "undefined" ? global : {}), Fe = w.registerPlugin;
|
|
127
|
+
w.Plugins;
|
|
128
128
|
class y {
|
|
129
129
|
constructor(e) {
|
|
130
130
|
this.listeners = {}, this.windowListeners = {}, e && (console.warn(`Capacitor WebPlugin "${e.name}" config object was deprecated in v3 and will be removed in v4.`), this.config = e);
|
|
@@ -133,15 +133,15 @@ class y {
|
|
|
133
133
|
this.listeners[e] || (this.listeners[e] = []), this.listeners[e].push(r);
|
|
134
134
|
const n = this.windowListeners[e];
|
|
135
135
|
n && !n.registered && this.addWindowListener(n);
|
|
136
|
-
const
|
|
136
|
+
const a = () => o(this, null, function* () {
|
|
137
137
|
return this.removeListener(e, r);
|
|
138
|
-
}), i = Promise.resolve({ remove:
|
|
139
|
-
return Object.defineProperty(i, "remove", { value: () =>
|
|
140
|
-
console.warn("Using addListener() without 'await' is deprecated."), yield
|
|
138
|
+
}), i = Promise.resolve({ remove: a });
|
|
139
|
+
return Object.defineProperty(i, "remove", { value: () => o(this, null, function* () {
|
|
140
|
+
console.warn("Using addListener() without 'await' is deprecated."), yield a();
|
|
141
141
|
}) }), i;
|
|
142
142
|
}
|
|
143
143
|
removeAllListeners() {
|
|
144
|
-
return
|
|
144
|
+
return o(this, null, function* () {
|
|
145
145
|
this.listeners = {};
|
|
146
146
|
for (const e in this.windowListeners)
|
|
147
147
|
this.removeWindowListener(this.windowListeners[e]);
|
|
@@ -150,7 +150,7 @@ class y {
|
|
|
150
150
|
}
|
|
151
151
|
notifyListeners(e, r) {
|
|
152
152
|
const n = this.listeners[e];
|
|
153
|
-
n && n.forEach((
|
|
153
|
+
n && n.forEach((a) => a(r));
|
|
154
154
|
}
|
|
155
155
|
hasListeners(e) {
|
|
156
156
|
return !!this.listeners[e].length;
|
|
@@ -161,18 +161,18 @@ class y {
|
|
|
161
161
|
} };
|
|
162
162
|
}
|
|
163
163
|
unimplemented(e = "not implemented") {
|
|
164
|
-
return new
|
|
164
|
+
return new w.Exception(e, j.Unimplemented);
|
|
165
165
|
}
|
|
166
166
|
unavailable(e = "not available") {
|
|
167
|
-
return new
|
|
167
|
+
return new w.Exception(e, j.Unavailable);
|
|
168
168
|
}
|
|
169
169
|
removeListener(e, r) {
|
|
170
|
-
return
|
|
170
|
+
return o(this, null, function* () {
|
|
171
171
|
const n = this.listeners[e];
|
|
172
172
|
if (!n)
|
|
173
173
|
return;
|
|
174
|
-
const
|
|
175
|
-
this.listeners[e].splice(
|
|
174
|
+
const a = n.indexOf(r);
|
|
175
|
+
this.listeners[e].splice(a, 1), this.listeners[e].length || this.removeWindowListener(this.windowListeners[e]);
|
|
176
176
|
});
|
|
177
177
|
}
|
|
178
178
|
addWindowListener(e) {
|
|
@@ -182,31 +182,31 @@ class y {
|
|
|
182
182
|
e && (window.removeEventListener(e.windowEventName, e.handler), e.registered = !1);
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
|
-
const
|
|
186
|
-
class
|
|
185
|
+
const qe = (t) => encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape), Ke = (t) => t.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
186
|
+
class Wr extends y {
|
|
187
187
|
getCookies() {
|
|
188
|
-
return
|
|
188
|
+
return o(this, null, function* () {
|
|
189
189
|
const e = document.cookie, r = {};
|
|
190
190
|
return e.split(";").forEach((n) => {
|
|
191
191
|
if (n.length <= 0)
|
|
192
192
|
return;
|
|
193
|
-
let [
|
|
194
|
-
|
|
193
|
+
let [a, i] = n.replace(/=/, "CAP_COOKIE").split("CAP_COOKIE");
|
|
194
|
+
a = Ke(a).trim(), i = Ke(i).trim(), r[a] = i;
|
|
195
195
|
}), r;
|
|
196
196
|
});
|
|
197
197
|
}
|
|
198
198
|
setCookie(e) {
|
|
199
|
-
return
|
|
199
|
+
return o(this, null, function* () {
|
|
200
200
|
try {
|
|
201
|
-
const r =
|
|
202
|
-
document.cookie = `${r}=${n || ""}${
|
|
201
|
+
const r = qe(e.key), n = qe(e.value), a = `; expires=${(e.expires || "").replace("expires=", "")}`, i = (e.path || "/").replace("path=", ""), c = e.url != null && e.url.length > 0 ? `domain=${e.url}` : "";
|
|
202
|
+
document.cookie = `${r}=${n || ""}${a}; path=${i}; ${c};`;
|
|
203
203
|
} catch (r) {
|
|
204
204
|
return Promise.reject(r);
|
|
205
205
|
}
|
|
206
206
|
});
|
|
207
207
|
}
|
|
208
208
|
deleteCookie(e) {
|
|
209
|
-
return
|
|
209
|
+
return o(this, null, function* () {
|
|
210
210
|
try {
|
|
211
211
|
document.cookie = `${e.key}=; Max-Age=0`;
|
|
212
212
|
} catch (r) {
|
|
@@ -215,7 +215,7 @@ class $r extends y {
|
|
|
215
215
|
});
|
|
216
216
|
}
|
|
217
217
|
clearCookies() {
|
|
218
|
-
return
|
|
218
|
+
return o(this, null, function* () {
|
|
219
219
|
try {
|
|
220
220
|
const e = document.cookie.split(";") || [];
|
|
221
221
|
for (const r of e)
|
|
@@ -226,7 +226,7 @@ class $r extends y {
|
|
|
226
226
|
});
|
|
227
227
|
}
|
|
228
228
|
clearAllCookies() {
|
|
229
|
-
return
|
|
229
|
+
return o(this, null, function* () {
|
|
230
230
|
try {
|
|
231
231
|
yield this.clearCookies();
|
|
232
232
|
} catch (e) {
|
|
@@ -235,58 +235,58 @@ class $r extends y {
|
|
|
235
235
|
});
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
|
-
|
|
239
|
-
const
|
|
240
|
-
const r = Object.assign({ method: t.method || "GET", headers: t.headers }, e), n = ((
|
|
241
|
-
const i = Object.keys(
|
|
242
|
-
return Object.keys(
|
|
238
|
+
Fe("CapacitorCookies", { web: () => new Wr() });
|
|
239
|
+
const Dr = (t, e = {}) => {
|
|
240
|
+
const r = Object.assign({ method: t.method || "GET", headers: t.headers }, e), n = ((a = {}) => {
|
|
241
|
+
const i = Object.keys(a);
|
|
242
|
+
return Object.keys(a).map((c) => c.toLocaleLowerCase()).reduce((c, s, d) => (c[s] = a[i[d]], c), {});
|
|
243
243
|
})(t.headers)["content-type"] || "";
|
|
244
244
|
if (typeof t.data == "string")
|
|
245
245
|
r.body = t.data;
|
|
246
246
|
else if (n.includes("application/x-www-form-urlencoded")) {
|
|
247
|
-
const
|
|
247
|
+
const a = new URLSearchParams();
|
|
248
248
|
for (const [i, c] of Object.entries(t.data || {}))
|
|
249
|
-
|
|
250
|
-
r.body =
|
|
249
|
+
a.set(i, c);
|
|
250
|
+
r.body = a.toString();
|
|
251
251
|
} else if (n.includes("multipart/form-data")) {
|
|
252
|
-
const
|
|
252
|
+
const a = new FormData();
|
|
253
253
|
if (t.data instanceof FormData)
|
|
254
254
|
t.data.forEach((c, s) => {
|
|
255
|
-
|
|
255
|
+
a.append(s, c);
|
|
256
256
|
});
|
|
257
257
|
else
|
|
258
258
|
for (const c of Object.keys(t.data))
|
|
259
|
-
|
|
260
|
-
r.body =
|
|
259
|
+
a.append(c, t.data[c]);
|
|
260
|
+
r.body = a;
|
|
261
261
|
const i = new Headers(r.headers);
|
|
262
262
|
i.delete("content-type"), r.headers = i;
|
|
263
263
|
} else
|
|
264
264
|
(n.includes("application/json") || typeof t.data == "object") && (r.body = JSON.stringify(t.data));
|
|
265
265
|
return r;
|
|
266
266
|
};
|
|
267
|
-
class
|
|
267
|
+
class xr extends y {
|
|
268
268
|
request(e) {
|
|
269
|
-
return
|
|
270
|
-
const r =
|
|
271
|
-
const [
|
|
269
|
+
return o(this, null, function* () {
|
|
270
|
+
const r = Dr(e, e.webFetchExtra), n = ((p, f = !0) => p ? Object.entries(p).reduce((O, I) => {
|
|
271
|
+
const [C, h] = I;
|
|
272
272
|
let m, N;
|
|
273
|
-
return Array.isArray(
|
|
274
|
-
m = f ? encodeURIComponent(v) : v, N += `${
|
|
275
|
-
}), N.slice(0, -1)) : (m = f ? encodeURIComponent(
|
|
276
|
-
}, "").substr(1) : null)(e.params, e.shouldEncodeUrlParams),
|
|
277
|
-
let s,
|
|
278
|
-
switch (c.includes("application/json") && (
|
|
273
|
+
return Array.isArray(h) ? (N = "", h.forEach((v) => {
|
|
274
|
+
m = f ? encodeURIComponent(v) : v, N += `${C}=${m}&`;
|
|
275
|
+
}), N.slice(0, -1)) : (m = f ? encodeURIComponent(h) : h, N = `${C}=${m}`), `${O}&${N}`;
|
|
276
|
+
}, "").substr(1) : null)(e.params, e.shouldEncodeUrlParams), a = n ? `${e.url}?${n}` : e.url, i = yield fetch(a, r), c = i.headers.get("content-type") || "";
|
|
277
|
+
let s, d, { responseType: u = "text" } = i.ok ? e : {};
|
|
278
|
+
switch (c.includes("application/json") && (u = "json"), u) {
|
|
279
279
|
case "arraybuffer":
|
|
280
280
|
case "blob":
|
|
281
|
-
|
|
282
|
-
return new Promise((f,
|
|
281
|
+
d = yield i.blob(), s = yield ((p) => o(this, null, function* () {
|
|
282
|
+
return new Promise((f, O) => {
|
|
283
283
|
const I = new FileReader();
|
|
284
284
|
I.onload = () => {
|
|
285
|
-
const
|
|
286
|
-
f(
|
|
287
|
-
}, I.onerror = (
|
|
285
|
+
const C = I.result;
|
|
286
|
+
f(C.indexOf(",") >= 0 ? C.split(",")[1] : C);
|
|
287
|
+
}, I.onerror = (C) => O(C), I.readAsDataURL(p);
|
|
288
288
|
});
|
|
289
|
-
}))(
|
|
289
|
+
}))(d);
|
|
290
290
|
break;
|
|
291
291
|
case "json":
|
|
292
292
|
s = yield i.json();
|
|
@@ -294,68 +294,68 @@ class zr extends y {
|
|
|
294
294
|
default:
|
|
295
295
|
s = yield i.text();
|
|
296
296
|
}
|
|
297
|
-
const
|
|
298
|
-
return i.headers.forEach((
|
|
299
|
-
|
|
300
|
-
}), { data: s, headers:
|
|
297
|
+
const _ = {};
|
|
298
|
+
return i.headers.forEach((p, f) => {
|
|
299
|
+
_[f] = p;
|
|
300
|
+
}), { data: s, headers: _, status: i.status, url: i.url };
|
|
301
301
|
});
|
|
302
302
|
}
|
|
303
303
|
get(e) {
|
|
304
|
-
return
|
|
304
|
+
return o(this, null, function* () {
|
|
305
305
|
return this.request(Object.assign(Object.assign({}, e), { method: "GET" }));
|
|
306
306
|
});
|
|
307
307
|
}
|
|
308
308
|
post(e) {
|
|
309
|
-
return
|
|
309
|
+
return o(this, null, function* () {
|
|
310
310
|
return this.request(Object.assign(Object.assign({}, e), { method: "POST" }));
|
|
311
311
|
});
|
|
312
312
|
}
|
|
313
313
|
put(e) {
|
|
314
|
-
return
|
|
314
|
+
return o(this, null, function* () {
|
|
315
315
|
return this.request(Object.assign(Object.assign({}, e), { method: "PUT" }));
|
|
316
316
|
});
|
|
317
317
|
}
|
|
318
318
|
patch(e) {
|
|
319
|
-
return
|
|
319
|
+
return o(this, null, function* () {
|
|
320
320
|
return this.request(Object.assign(Object.assign({}, e), { method: "PATCH" }));
|
|
321
321
|
});
|
|
322
322
|
}
|
|
323
323
|
delete(e) {
|
|
324
|
-
return
|
|
324
|
+
return o(this, null, function* () {
|
|
325
325
|
return this.request(Object.assign(Object.assign({}, e), { method: "DELETE" }));
|
|
326
326
|
});
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
|
-
function
|
|
330
|
-
return
|
|
329
|
+
function Oe() {
|
|
330
|
+
return w.getPlatform() === "android" ? JSON.parse(AndroidInitialContext.initialContext()) : window.portalInitialContext;
|
|
331
331
|
}
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
return
|
|
332
|
+
Fe("CapacitorHttp", { web: () => new xr() }), /*! Ionic Portals: https://ionic.io/portals - Commercial License */
|
|
333
|
+
Fe("Portals", { web: () => Promise.resolve().then(function() {
|
|
334
|
+
return jr;
|
|
335
335
|
}).then((t) => new t.PortalsWeb()) });
|
|
336
|
-
const
|
|
336
|
+
const jr = Object.freeze({ __proto__: null, PortalsWeb: class extends y {
|
|
337
337
|
publishNative(t) {
|
|
338
|
-
return
|
|
338
|
+
return o(this, null, function* () {
|
|
339
339
|
});
|
|
340
340
|
}
|
|
341
|
-
} }),
|
|
341
|
+
} }), ee = (t) => {
|
|
342
342
|
var e, r, n;
|
|
343
343
|
try {
|
|
344
344
|
if (typeof window == "undefined")
|
|
345
345
|
return;
|
|
346
|
-
if (
|
|
347
|
-
const
|
|
348
|
-
if (!
|
|
346
|
+
if (Oe && ((e = Oe()) != null && e.value)) {
|
|
347
|
+
const a = (n = (r = Oe()) == null ? void 0 : r.value) != null ? n : null;
|
|
348
|
+
if (!a)
|
|
349
349
|
return void console.error("native initialContext is undefine");
|
|
350
350
|
if (!t)
|
|
351
351
|
return void console.error("initialContext call back is undefine");
|
|
352
|
-
t(
|
|
352
|
+
t(a);
|
|
353
353
|
}
|
|
354
|
-
} catch (
|
|
355
|
-
throw console.error("getInitialContextHandle error",
|
|
354
|
+
} catch (a) {
|
|
355
|
+
throw console.error("getInitialContextHandle error", a), a;
|
|
356
356
|
}
|
|
357
357
|
};
|
|
358
|
-
class
|
|
358
|
+
class $r {
|
|
359
359
|
isNative() {
|
|
360
360
|
try {
|
|
361
361
|
return (() => {
|
|
@@ -364,7 +364,7 @@ class Gr {
|
|
|
364
364
|
return window.rawWindow.__mini_app_hook__.isNative();
|
|
365
365
|
{
|
|
366
366
|
let e = !1;
|
|
367
|
-
return
|
|
367
|
+
return ee((r) => {
|
|
368
368
|
e = !!(r != null && r.isNative);
|
|
369
369
|
}), e;
|
|
370
370
|
}
|
|
@@ -384,12 +384,12 @@ class Gr {
|
|
|
384
384
|
return e.callBack(r);
|
|
385
385
|
} else
|
|
386
386
|
(({ callBack: r }) => {
|
|
387
|
-
|
|
388
|
-
var
|
|
387
|
+
ee((n) => {
|
|
388
|
+
var a;
|
|
389
389
|
try {
|
|
390
390
|
if (!(n != null && n.params))
|
|
391
391
|
return void console.info("initial context native params is undefine");
|
|
392
|
-
const i = (
|
|
392
|
+
const i = (a = n == null ? void 0 : n.params) != null ? a : null;
|
|
393
393
|
if (!i)
|
|
394
394
|
return;
|
|
395
395
|
if (!r)
|
|
@@ -410,15 +410,15 @@ class Gr {
|
|
|
410
410
|
return this.isNative() ? window.__MICRO_APP_ENVIRONMENT__ ? (r = window.rawWindow.__mini_app_hook__.getNativeInfo(e)) != null ? r : {} : (() => {
|
|
411
411
|
try {
|
|
412
412
|
let n = null;
|
|
413
|
-
return
|
|
414
|
-
n =
|
|
413
|
+
return ee((a) => {
|
|
414
|
+
n = a != null ? a : null;
|
|
415
415
|
}), n;
|
|
416
416
|
} catch (n) {
|
|
417
417
|
throw console.error("getNativeInfoHandle error", n), n;
|
|
418
418
|
}
|
|
419
419
|
})() : ((n) => {
|
|
420
|
-
var
|
|
421
|
-
return (
|
|
420
|
+
var a;
|
|
421
|
+
return (a = n == null ? void 0 : n.mockData) != null ? a : null;
|
|
422
422
|
})(e);
|
|
423
423
|
} catch (n) {
|
|
424
424
|
throw console.error("getNativeInfo error", n), n;
|
|
@@ -430,34 +430,34 @@ class Gr {
|
|
|
430
430
|
});
|
|
431
431
|
}
|
|
432
432
|
}
|
|
433
|
-
const
|
|
433
|
+
const M = () => {
|
|
434
434
|
try {
|
|
435
435
|
let t = {};
|
|
436
436
|
return typeof window != "undefined" && (t = window), t;
|
|
437
437
|
} catch (t) {
|
|
438
438
|
throw console.error("isWinHandle error", t), t;
|
|
439
439
|
}
|
|
440
|
-
}, E = "CommunicatePlugin", g =
|
|
441
|
-
|
|
442
|
-
const
|
|
440
|
+
}, E = "CommunicatePlugin", g = w.registerPlugin(E, { web: () => Promise.resolve().then(() => mt).then((t) => new t.PluginsWeb()) }), re = M();
|
|
441
|
+
re.removeAddListenerFab = () => null;
|
|
442
|
+
const qr = (t, e) => {
|
|
443
443
|
var r, n;
|
|
444
444
|
try {
|
|
445
|
-
|
|
446
|
-
const
|
|
447
|
-
if ((r = g.showFABMenu) == null || r.call(g, { fabMenu:
|
|
445
|
+
re.removeAddListenerFab && re.removeAddListenerFab();
|
|
446
|
+
const a = [];
|
|
447
|
+
if ((r = g.showFABMenu) == null || r.call(g, { fabMenu: a, position: null }), !t || !((n = Object.keys(t)) != null && n.length))
|
|
448
448
|
return;
|
|
449
449
|
Object.keys(t).forEach((i) => {
|
|
450
|
-
var c, s,
|
|
451
|
-
|
|
450
|
+
var c, s, d, u, _, p, f, O;
|
|
451
|
+
a.push({ disable: (s = (c = t == null ? void 0 : t[i]) == null ? void 0 : c.disable) != null ? s : !1, icon: (u = (d = t == null ? void 0 : t[i]) == null ? void 0 : d.icon) != null ? u : "", id: (p = (_ = t == null ? void 0 : t[i]) == null ? void 0 : _.id) != null ? p : "", name: (O = (f = t == null ? void 0 : t[i]) == null ? void 0 : f.title) != null ? O : "" });
|
|
452
452
|
}), queueMicrotask(() => {
|
|
453
453
|
var i;
|
|
454
|
-
(i = g.showFABMenu) == null || i.call(g, { fabMenu:
|
|
454
|
+
(i = g.showFABMenu) == null || i.call(g, { fabMenu: a, position: e != null ? e : null });
|
|
455
455
|
}), setTimeout(() => {
|
|
456
|
-
((i) =>
|
|
457
|
-
i && (
|
|
456
|
+
((i) => o(void 0, null, function* () {
|
|
457
|
+
i && (re.removeAddListenerFab = yield ((c) => o(void 0, null, function* () {
|
|
458
458
|
try {
|
|
459
|
-
if (
|
|
460
|
-
const s = yield
|
|
459
|
+
if (w.addListener) {
|
|
460
|
+
const s = yield w.addListener(E, "nativeSendFab", (d) => c && c(d));
|
|
461
461
|
return s != null && s.remove ? s.remove : () => null;
|
|
462
462
|
}
|
|
463
463
|
} catch (s) {
|
|
@@ -467,22 +467,22 @@ const Jr = (t, e) => {
|
|
|
467
467
|
}))((i) => {
|
|
468
468
|
let c;
|
|
469
469
|
i != null && i.disable || i != null && i.id && (Object.keys(t).forEach((s) => {
|
|
470
|
-
var
|
|
471
|
-
(
|
|
470
|
+
var d, u, _;
|
|
471
|
+
(d = t == null ? void 0 : t[s]) != null && d.id && i.id === t[s].id && (c = (_ = (u = t[s]) == null ? void 0 : u.fn) != null ? _ : () => null);
|
|
472
472
|
}), typeof c == "function" && c());
|
|
473
473
|
});
|
|
474
474
|
});
|
|
475
|
-
} catch (
|
|
476
|
-
throw console.error("fabBtnHandle error",
|
|
475
|
+
} catch (a) {
|
|
476
|
+
throw console.error("fabBtnHandle error", a), a;
|
|
477
477
|
}
|
|
478
|
-
}, B =
|
|
478
|
+
}, B = M();
|
|
479
479
|
B.addListenerBackRemoveHandle = () => null;
|
|
480
|
-
const
|
|
480
|
+
const ze = (t = () => null) => o(void 0, null, function* () {
|
|
481
481
|
try {
|
|
482
|
-
B != null && B.addListenerBackRemoveHandle && typeof B.addListenerBackRemoveHandle == "function" && B.addListenerBackRemoveHandle(), B.addListenerBackRemoveHandle = yield ((e) =>
|
|
482
|
+
B != null && B.addListenerBackRemoveHandle && typeof B.addListenerBackRemoveHandle == "function" && B.addListenerBackRemoveHandle(), B.addListenerBackRemoveHandle = yield ((e) => o(void 0, null, function* () {
|
|
483
483
|
try {
|
|
484
|
-
if (
|
|
485
|
-
const r = yield
|
|
484
|
+
if (w.addListener) {
|
|
485
|
+
const r = yield w.addListener(E, "nativeSendBack", (n) => e && e(n));
|
|
486
486
|
return r != null && r.remove ? r.remove : () => null;
|
|
487
487
|
}
|
|
488
488
|
} catch (r) {
|
|
@@ -492,16 +492,16 @@ const Je = (t = () => null) => a(void 0, null, function* () {
|
|
|
492
492
|
} catch (e) {
|
|
493
493
|
throw console.error("initBackBtnFn error", e), e;
|
|
494
494
|
}
|
|
495
|
-
}),
|
|
496
|
-
|
|
497
|
-
const
|
|
495
|
+
}), te = M();
|
|
496
|
+
te.addListenerHomeHandle = () => null;
|
|
497
|
+
const Kr = (t) => {
|
|
498
498
|
try {
|
|
499
|
-
|
|
500
|
-
((e) =>
|
|
501
|
-
e && (
|
|
499
|
+
te.addListenerHomeHandle && te.addListenerHomeHandle(), setTimeout(() => {
|
|
500
|
+
((e) => o(void 0, null, function* () {
|
|
501
|
+
e && (te.addListenerHomeHandle = yield ((r) => o(void 0, null, function* () {
|
|
502
502
|
try {
|
|
503
|
-
if (
|
|
504
|
-
const n = yield
|
|
503
|
+
if (w.addListener) {
|
|
504
|
+
const n = yield w.addListener(E, "nativeSendHome", (a) => r && r(a));
|
|
505
505
|
return n != null && n.remove ? n.remove : () => null;
|
|
506
506
|
}
|
|
507
507
|
} catch (n) {
|
|
@@ -513,14 +513,14 @@ const Zr = (t) => {
|
|
|
513
513
|
} catch (e) {
|
|
514
514
|
throw console.error("homeFn error", e), e;
|
|
515
515
|
}
|
|
516
|
-
}, V =
|
|
516
|
+
}, V = M();
|
|
517
517
|
V.addListenerTouchRemoveHandle = () => null;
|
|
518
|
-
const
|
|
518
|
+
const Ge = (t = () => null) => o(void 0, null, function* () {
|
|
519
519
|
try {
|
|
520
|
-
V != null && V.addListenerTouchRemoveHandle && typeof V.addListenerTouchRemoveHandle == "function" && V.addListenerTouchRemoveHandle(), V.addListenerTouchRemoveHandle = yield ((e) =>
|
|
520
|
+
V != null && V.addListenerTouchRemoveHandle && typeof V.addListenerTouchRemoveHandle == "function" && V.addListenerTouchRemoveHandle(), V.addListenerTouchRemoveHandle = yield ((e) => o(void 0, null, function* () {
|
|
521
521
|
try {
|
|
522
|
-
if (
|
|
523
|
-
const r = yield
|
|
522
|
+
if (w.addListener) {
|
|
523
|
+
const r = yield w.addListener(E, "nativeTouchListener", (n) => e && e(n));
|
|
524
524
|
return r != null && r.remove ? r.remove : () => null;
|
|
525
525
|
}
|
|
526
526
|
} catch (r) {
|
|
@@ -530,16 +530,16 @@ const Ze = (t = () => null) => a(void 0, null, function* () {
|
|
|
530
530
|
} catch (e) {
|
|
531
531
|
throw console.error("initTouchFn error", e), e;
|
|
532
532
|
}
|
|
533
|
-
}), H =
|
|
533
|
+
}), H = M();
|
|
534
534
|
H.addListenerSendDeepLinkRemoveHandle = () => null;
|
|
535
|
-
const
|
|
535
|
+
const Je = (t = () => null) => o(void 0, null, function* () {
|
|
536
536
|
try {
|
|
537
|
-
H != null && H.addListenerSendDeepLinkRemoveHandle && typeof H.addListenerSendDeepLinkRemoveHandle == "function" && H.addListenerSendDeepLinkRemoveHandle(), H.addListenerSendDeepLinkRemoveHandle = yield ((e) =>
|
|
537
|
+
H != null && H.addListenerSendDeepLinkRemoveHandle && typeof H.addListenerSendDeepLinkRemoveHandle == "function" && H.addListenerSendDeepLinkRemoveHandle(), H.addListenerSendDeepLinkRemoveHandle = yield ((e) => o(void 0, null, function* () {
|
|
538
538
|
try {
|
|
539
539
|
if (window.__MICRO_APP_ENVIRONMENT__)
|
|
540
540
|
return e && window.rawWindow.__mini_app_hook__.getDeeplinkParams(e), { remove: () => null };
|
|
541
|
-
if (
|
|
542
|
-
const r = yield
|
|
541
|
+
if (w.addListener) {
|
|
542
|
+
const r = yield w.addListener(E, "nativeSendDeeplinkCallbackListener", (n) => e && e(n));
|
|
543
543
|
return r != null && r.remove ? r.remove : () => null;
|
|
544
544
|
}
|
|
545
545
|
} catch (r) {
|
|
@@ -549,14 +549,14 @@ const Xe = (t = () => null) => a(void 0, null, function* () {
|
|
|
549
549
|
} catch (e) {
|
|
550
550
|
throw console.error("initTouchFn error", e), e;
|
|
551
551
|
}
|
|
552
|
-
}), F =
|
|
552
|
+
}), F = M();
|
|
553
553
|
F.addListenerSwitchLanguageRemoveHandle = () => null;
|
|
554
|
-
const
|
|
554
|
+
const Qe = (t = () => null) => o(void 0, null, function* () {
|
|
555
555
|
try {
|
|
556
|
-
F != null && F.addListenerSwitchLanguageRemoveHandle && typeof F.addListenerSwitchLanguageRemoveHandle == "function" && F.addListenerSwitchLanguageRemoveHandle(), F.addListenerSwitchLanguageRemoveHandle = yield ((e) =>
|
|
556
|
+
F != null && F.addListenerSwitchLanguageRemoveHandle && typeof F.addListenerSwitchLanguageRemoveHandle == "function" && F.addListenerSwitchLanguageRemoveHandle(), F.addListenerSwitchLanguageRemoveHandle = yield ((e) => o(void 0, null, function* () {
|
|
557
557
|
try {
|
|
558
|
-
if (
|
|
559
|
-
const r = yield
|
|
558
|
+
if (w.addListener) {
|
|
559
|
+
const r = yield w.addListener(E, "nativeSendSwitchLanguage", (n) => e && e(n));
|
|
560
560
|
return r != null && r.remove ? r.remove : () => null;
|
|
561
561
|
}
|
|
562
562
|
if (window.__MICRO_APP_ENVIRONMENT__)
|
|
@@ -570,14 +570,14 @@ const Ye = (t = () => null) => a(void 0, null, function* () {
|
|
|
570
570
|
} catch (e) {
|
|
571
571
|
throw console.error("initSwitchLanguageFn error", e), e;
|
|
572
572
|
}
|
|
573
|
-
}), U =
|
|
573
|
+
}), U = M();
|
|
574
574
|
U.addListenerSetupMiniAppRemoveHandle = () => null;
|
|
575
|
-
const
|
|
575
|
+
const Ye = (t = () => null) => o(void 0, null, function* () {
|
|
576
576
|
try {
|
|
577
|
-
U != null && U.addListenerSetupMiniAppRemoveHandle && typeof U.addListenerSetupMiniAppRemoveHandle == "function" && U.addListenerSetupMiniAppRemoveHandle(), U.addListenerSetupMiniAppRemoveHandle = yield ((e) =>
|
|
577
|
+
U != null && U.addListenerSetupMiniAppRemoveHandle && typeof U.addListenerSetupMiniAppRemoveHandle == "function" && U.addListenerSetupMiniAppRemoveHandle(), U.addListenerSetupMiniAppRemoveHandle = yield ((e) => o(void 0, null, function* () {
|
|
578
578
|
try {
|
|
579
|
-
if (
|
|
580
|
-
const r = yield
|
|
579
|
+
if (w.addListener) {
|
|
580
|
+
const r = yield w.addListener(E, "nativeSetupMiniApp", (n) => e && e(n));
|
|
581
581
|
return r != null && r.remove ? r.remove : () => null;
|
|
582
582
|
}
|
|
583
583
|
} catch (r) {
|
|
@@ -587,14 +587,14 @@ const Qe = (t = () => null) => a(void 0, null, function* () {
|
|
|
587
587
|
} catch (e) {
|
|
588
588
|
throw console.error("initSetupMiniAppFn error", e), e;
|
|
589
589
|
}
|
|
590
|
-
}), W =
|
|
590
|
+
}), W = M();
|
|
591
591
|
W.addListenerSwitchStoreRemoveHandle = () => null;
|
|
592
|
-
const
|
|
592
|
+
const Ze = (t = () => null) => o(void 0, null, function* () {
|
|
593
593
|
try {
|
|
594
|
-
W != null && W.addListenerSwitchStoreRemoveHandle && typeof W.addListenerSwitchStoreRemoveHandle == "function" && W.addListenerSwitchStoreRemoveHandle(), W.addListenerSwitchStoreRemoveHandle = yield ((e) =>
|
|
594
|
+
W != null && W.addListenerSwitchStoreRemoveHandle && typeof W.addListenerSwitchStoreRemoveHandle == "function" && W.addListenerSwitchStoreRemoveHandle(), W.addListenerSwitchStoreRemoveHandle = yield ((e) => o(void 0, null, function* () {
|
|
595
595
|
try {
|
|
596
|
-
if (
|
|
597
|
-
const r = yield
|
|
596
|
+
if (w.addListener) {
|
|
597
|
+
const r = yield w.addListener(E, "nativeSendSwitchStore", (n) => e && e(n));
|
|
598
598
|
return r != null && r.remove ? r.remove : () => null;
|
|
599
599
|
}
|
|
600
600
|
if (window.__MICRO_APP_ENVIRONMENT__)
|
|
@@ -609,12 +609,12 @@ const er = (t = () => null) => a(void 0, null, function* () {
|
|
|
609
609
|
throw console.error("initSwitchStoreFn error", e), e;
|
|
610
610
|
}
|
|
611
611
|
});
|
|
612
|
-
class
|
|
612
|
+
class zr {
|
|
613
613
|
constructor() {
|
|
614
614
|
this.homeBtnSwitch({ isClick: !0 });
|
|
615
615
|
}
|
|
616
616
|
homeBtnSwitch(e) {
|
|
617
|
-
return
|
|
617
|
+
return o(this, null, function* () {
|
|
618
618
|
var r;
|
|
619
619
|
try {
|
|
620
620
|
return yield (r = g.homeIsClick) == null ? void 0 : r.call(g, e);
|
|
@@ -627,11 +627,11 @@ class Xr {
|
|
|
627
627
|
try {
|
|
628
628
|
((r) => {
|
|
629
629
|
try {
|
|
630
|
-
const { mounted: n, beforeUnmount:
|
|
630
|
+
const { mounted: n, beforeUnmount: a, callBack: i } = r;
|
|
631
631
|
n(() => {
|
|
632
|
-
|
|
633
|
-
}),
|
|
634
|
-
|
|
632
|
+
ze(i);
|
|
633
|
+
}), a(() => {
|
|
634
|
+
ze();
|
|
635
635
|
});
|
|
636
636
|
} catch (n) {
|
|
637
637
|
throw console.error("backBtnHandle error", n), n;
|
|
@@ -643,14 +643,14 @@ class Xr {
|
|
|
643
643
|
}
|
|
644
644
|
setHomeBtn(e) {
|
|
645
645
|
try {
|
|
646
|
-
window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.setHomeBtn = e :
|
|
646
|
+
window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.setHomeBtn = e : Kr(e);
|
|
647
647
|
} catch (r) {
|
|
648
648
|
throw console.error("setHomeBtn error", r), r;
|
|
649
649
|
}
|
|
650
650
|
}
|
|
651
651
|
setFabBtn(e, r) {
|
|
652
652
|
try {
|
|
653
|
-
window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.setFabBtn(e, r) :
|
|
653
|
+
window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.setFabBtn(e, r) : qr(e, r);
|
|
654
654
|
} catch (n) {
|
|
655
655
|
throw console.error("setFabBtn error", n), n;
|
|
656
656
|
}
|
|
@@ -659,11 +659,11 @@ class Xr {
|
|
|
659
659
|
try {
|
|
660
660
|
((r) => {
|
|
661
661
|
try {
|
|
662
|
-
const { mounted: n, beforeUnmount:
|
|
662
|
+
const { mounted: n, beforeUnmount: a, callBack: i } = r;
|
|
663
663
|
n(() => {
|
|
664
|
-
|
|
665
|
-
}),
|
|
666
|
-
|
|
664
|
+
Ge(i);
|
|
665
|
+
}), a(() => {
|
|
666
|
+
Ge();
|
|
667
667
|
});
|
|
668
668
|
} catch (n) {
|
|
669
669
|
throw console.error("touchListenerHandle error", n), n;
|
|
@@ -674,7 +674,7 @@ class Xr {
|
|
|
674
674
|
}
|
|
675
675
|
}
|
|
676
676
|
disableFAB(e) {
|
|
677
|
-
return
|
|
677
|
+
return o(this, null, function* () {
|
|
678
678
|
try {
|
|
679
679
|
return yield g.disableFAB(e);
|
|
680
680
|
} catch (r) {
|
|
@@ -683,7 +683,7 @@ class Xr {
|
|
|
683
683
|
});
|
|
684
684
|
}
|
|
685
685
|
disableBack(e) {
|
|
686
|
-
return
|
|
686
|
+
return o(this, null, function* () {
|
|
687
687
|
try {
|
|
688
688
|
return yield g.disableBack(e);
|
|
689
689
|
} catch (r) {
|
|
@@ -692,7 +692,7 @@ class Xr {
|
|
|
692
692
|
});
|
|
693
693
|
}
|
|
694
694
|
openMiniApp(e) {
|
|
695
|
-
return
|
|
695
|
+
return o(this, null, function* () {
|
|
696
696
|
try {
|
|
697
697
|
return yield g.openMiniApp(e);
|
|
698
698
|
} catch (r) {
|
|
@@ -701,7 +701,7 @@ class Xr {
|
|
|
701
701
|
});
|
|
702
702
|
}
|
|
703
703
|
showTitle(e) {
|
|
704
|
-
return
|
|
704
|
+
return o(this, null, function* () {
|
|
705
705
|
try {
|
|
706
706
|
return yield g.showTitle(e);
|
|
707
707
|
} catch (r) {
|
|
@@ -710,7 +710,7 @@ class Xr {
|
|
|
710
710
|
});
|
|
711
711
|
}
|
|
712
712
|
showSubMask(e) {
|
|
713
|
-
return
|
|
713
|
+
return o(this, null, function* () {
|
|
714
714
|
try {
|
|
715
715
|
return yield g.showSubMask(e);
|
|
716
716
|
} catch (r) {
|
|
@@ -719,7 +719,7 @@ class Xr {
|
|
|
719
719
|
});
|
|
720
720
|
}
|
|
721
721
|
setMiniAppVersion(e) {
|
|
722
|
-
return
|
|
722
|
+
return o(this, null, function* () {
|
|
723
723
|
try {
|
|
724
724
|
return yield g.setMiniAppVersion(e);
|
|
725
725
|
} catch (r) {
|
|
@@ -728,7 +728,7 @@ class Xr {
|
|
|
728
728
|
});
|
|
729
729
|
}
|
|
730
730
|
showNativeLoading() {
|
|
731
|
-
return
|
|
731
|
+
return o(this, null, function* () {
|
|
732
732
|
try {
|
|
733
733
|
return yield g.showDialog();
|
|
734
734
|
} catch (e) {
|
|
@@ -737,7 +737,7 @@ class Xr {
|
|
|
737
737
|
});
|
|
738
738
|
}
|
|
739
739
|
cancelNativeLoading() {
|
|
740
|
-
return
|
|
740
|
+
return o(this, null, function* () {
|
|
741
741
|
try {
|
|
742
742
|
return yield g.cancelDialog();
|
|
743
743
|
} catch (e) {
|
|
@@ -746,7 +746,7 @@ class Xr {
|
|
|
746
746
|
});
|
|
747
747
|
}
|
|
748
748
|
getMiniAppKong(e) {
|
|
749
|
-
return
|
|
749
|
+
return o(this, null, function* () {
|
|
750
750
|
try {
|
|
751
751
|
return yield g.getMiniAppKong(e);
|
|
752
752
|
} catch (r) {
|
|
@@ -758,11 +758,11 @@ class Xr {
|
|
|
758
758
|
try {
|
|
759
759
|
((r) => {
|
|
760
760
|
try {
|
|
761
|
-
const { mounted: n, beforeUnmount:
|
|
761
|
+
const { mounted: n, beforeUnmount: a, callBack: i } = r;
|
|
762
762
|
n(() => {
|
|
763
|
-
|
|
764
|
-
}),
|
|
765
|
-
|
|
763
|
+
Je(i);
|
|
764
|
+
}), a(() => {
|
|
765
|
+
Je();
|
|
766
766
|
});
|
|
767
767
|
} catch (n) {
|
|
768
768
|
throw console.error("sendDeepLinkListenerHandle error", n), n;
|
|
@@ -776,11 +776,11 @@ class Xr {
|
|
|
776
776
|
try {
|
|
777
777
|
((r) => {
|
|
778
778
|
try {
|
|
779
|
-
const { mounted: n, beforeUnmount:
|
|
779
|
+
const { mounted: n, beforeUnmount: a, callBack: i } = r;
|
|
780
780
|
n(() => {
|
|
781
|
-
|
|
782
|
-
}),
|
|
783
|
-
|
|
781
|
+
Qe(i);
|
|
782
|
+
}), a(() => {
|
|
783
|
+
Qe();
|
|
784
784
|
});
|
|
785
785
|
} catch (n) {
|
|
786
786
|
throw console.error("sendSwitchLanguageHandle error", n), n;
|
|
@@ -794,11 +794,11 @@ class Xr {
|
|
|
794
794
|
try {
|
|
795
795
|
((r) => {
|
|
796
796
|
try {
|
|
797
|
-
const { mounted: n, beforeUnmount:
|
|
797
|
+
const { mounted: n, beforeUnmount: a, callBack: i } = r;
|
|
798
798
|
n(() => {
|
|
799
|
-
|
|
800
|
-
}),
|
|
801
|
-
|
|
799
|
+
Ye(i);
|
|
800
|
+
}), a(() => {
|
|
801
|
+
Ye();
|
|
802
802
|
});
|
|
803
803
|
} catch (n) {
|
|
804
804
|
throw console.error("setupMiniAppHandle error", n), n;
|
|
@@ -812,11 +812,11 @@ class Xr {
|
|
|
812
812
|
try {
|
|
813
813
|
((r) => {
|
|
814
814
|
try {
|
|
815
|
-
const { mounted: n, beforeUnmount:
|
|
815
|
+
const { mounted: n, beforeUnmount: a, callBack: i } = r;
|
|
816
816
|
n(() => {
|
|
817
|
-
|
|
818
|
-
}),
|
|
819
|
-
|
|
817
|
+
Ze(i);
|
|
818
|
+
}), a(() => {
|
|
819
|
+
Ze();
|
|
820
820
|
});
|
|
821
821
|
} catch (n) {
|
|
822
822
|
throw console.error("sendSwitchStoreHandle error", n), n;
|
|
@@ -827,7 +827,7 @@ class Xr {
|
|
|
827
827
|
}
|
|
828
828
|
}
|
|
829
829
|
closeMiniApp() {
|
|
830
|
-
return
|
|
830
|
+
return o(this, null, function* () {
|
|
831
831
|
try {
|
|
832
832
|
return yield g.closeMiniApp();
|
|
833
833
|
} catch (e) {
|
|
@@ -836,7 +836,7 @@ class Xr {
|
|
|
836
836
|
});
|
|
837
837
|
}
|
|
838
838
|
getStatus() {
|
|
839
|
-
return
|
|
839
|
+
return o(this, null, function* () {
|
|
840
840
|
try {
|
|
841
841
|
return yield g.getStatus();
|
|
842
842
|
} catch (e) {
|
|
@@ -845,7 +845,7 @@ class Xr {
|
|
|
845
845
|
});
|
|
846
846
|
}
|
|
847
847
|
dispatchToShell(e) {
|
|
848
|
-
return
|
|
848
|
+
return o(this, null, function* () {
|
|
849
849
|
try {
|
|
850
850
|
return yield g.dispatchToShell(e);
|
|
851
851
|
} catch (r) {
|
|
@@ -854,7 +854,7 @@ class Xr {
|
|
|
854
854
|
});
|
|
855
855
|
}
|
|
856
856
|
getMiniAppInfo(e) {
|
|
857
|
-
return
|
|
857
|
+
return o(this, null, function* () {
|
|
858
858
|
try {
|
|
859
859
|
return yield g.getMiniAppInfo(e);
|
|
860
860
|
} catch (r) {
|
|
@@ -863,26 +863,26 @@ class Xr {
|
|
|
863
863
|
});
|
|
864
864
|
}
|
|
865
865
|
}
|
|
866
|
-
let
|
|
867
|
-
var
|
|
868
|
-
window.__MICRO_APP_ENVIRONMENT__ && (
|
|
869
|
-
const
|
|
866
|
+
let ne = null;
|
|
867
|
+
var sr;
|
|
868
|
+
window.__MICRO_APP_ENVIRONMENT__ && (ne = (sr = window.rawWindow.__mini_app_status_hook__) != null ? sr : {});
|
|
869
|
+
const Le = w.registerPlugin("CameraScanPlugin", { web: new class extends y {
|
|
870
870
|
pickCameraScan(t) {
|
|
871
|
-
return
|
|
871
|
+
return o(this, null, function* () {
|
|
872
872
|
return new Promise((e) => {
|
|
873
873
|
e(t);
|
|
874
874
|
});
|
|
875
875
|
});
|
|
876
876
|
}
|
|
877
877
|
setCameraScanState() {
|
|
878
|
-
return
|
|
878
|
+
return o(this, null, function* () {
|
|
879
879
|
});
|
|
880
880
|
}
|
|
881
881
|
getStatus() {
|
|
882
882
|
try {
|
|
883
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) =>
|
|
883
|
+
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
|
|
884
884
|
var e, r;
|
|
885
|
-
t((yield (r = (e =
|
|
885
|
+
t((yield (r = (e = ne == null ? void 0 : ne.cameraScan) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
|
|
886
886
|
})) : new Promise((t) => {
|
|
887
887
|
t(null);
|
|
888
888
|
});
|
|
@@ -892,52 +892,52 @@ const Ee = _.registerPlugin("CameraScanPlugin", { web: new class extends y {
|
|
|
892
892
|
}
|
|
893
893
|
}() });
|
|
894
894
|
window.removeAddListenerCameraScan = () => null;
|
|
895
|
-
class
|
|
895
|
+
class Gr {
|
|
896
896
|
pickCameraScan(e) {
|
|
897
|
-
return
|
|
897
|
+
return o(this, null, function* () {
|
|
898
898
|
try {
|
|
899
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.pickCameraScan(e) : yield
|
|
899
|
+
return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.pickCameraScan(e) : yield Le.pickCameraScan(e);
|
|
900
900
|
} catch (r) {
|
|
901
901
|
throw console.error("pickCameraScan error", r), r;
|
|
902
902
|
}
|
|
903
903
|
});
|
|
904
904
|
}
|
|
905
905
|
setCameraScanState(e) {
|
|
906
|
-
return
|
|
906
|
+
return o(this, null, function* () {
|
|
907
907
|
try {
|
|
908
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.setCameraScanState(e) : yield
|
|
908
|
+
return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.setCameraScanState(e) : yield Le.setCameraScanState(e);
|
|
909
909
|
} catch (r) {
|
|
910
910
|
throw console.error("setCameraScanState error", r), r;
|
|
911
911
|
}
|
|
912
912
|
});
|
|
913
913
|
}
|
|
914
914
|
getStatus() {
|
|
915
|
-
return
|
|
915
|
+
return o(this, null, function* () {
|
|
916
916
|
try {
|
|
917
|
-
return yield
|
|
917
|
+
return yield Le.getStatus();
|
|
918
918
|
} catch (e) {
|
|
919
919
|
throw console.error("cameraScanPlugin getStatus error", e), e;
|
|
920
920
|
}
|
|
921
921
|
});
|
|
922
922
|
}
|
|
923
923
|
}
|
|
924
|
-
let
|
|
925
|
-
var
|
|
926
|
-
window.__MICRO_APP_ENVIRONMENT__ && (
|
|
927
|
-
const
|
|
924
|
+
let oe = null;
|
|
925
|
+
var cr;
|
|
926
|
+
window.__MICRO_APP_ENVIRONMENT__ && (oe = (cr = window.rawWindow.__mini_app_status_hook__) != null ? cr : {});
|
|
927
|
+
const Ee = w.registerPlugin("CameraScanMultiplePlugin", { web: new class extends y {
|
|
928
928
|
pickCameraScanMultiple() {
|
|
929
|
-
return
|
|
929
|
+
return o(this, null, function* () {
|
|
930
930
|
});
|
|
931
931
|
}
|
|
932
932
|
setCameraScanMultipleState() {
|
|
933
|
-
return
|
|
933
|
+
return o(this, null, function* () {
|
|
934
934
|
});
|
|
935
935
|
}
|
|
936
936
|
getStatus() {
|
|
937
937
|
try {
|
|
938
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) =>
|
|
938
|
+
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
|
|
939
939
|
var e, r;
|
|
940
|
-
t((yield (r = (e =
|
|
940
|
+
t((yield (r = (e = oe == null ? void 0 : oe.cameraScanMultiple) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
|
|
941
941
|
})) : new Promise((t) => {
|
|
942
942
|
t(null);
|
|
943
943
|
});
|
|
@@ -946,52 +946,52 @@ const Re = _.registerPlugin("CameraScanMultiplePlugin", { web: new class extends
|
|
|
946
946
|
}
|
|
947
947
|
}
|
|
948
948
|
}() });
|
|
949
|
-
class
|
|
949
|
+
class Jr {
|
|
950
950
|
pickCameraScanMultiple(e) {
|
|
951
|
-
return
|
|
951
|
+
return o(this, null, function* () {
|
|
952
952
|
try {
|
|
953
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.pickCameraScanMultiple(e) : yield
|
|
953
|
+
return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.pickCameraScanMultiple(e) : yield Ee.pickCameraScanMultiple(e);
|
|
954
954
|
} catch (r) {
|
|
955
955
|
throw console.error("pickCameraScanMultiple error", r), r;
|
|
956
956
|
}
|
|
957
957
|
});
|
|
958
958
|
}
|
|
959
959
|
setCameraScanMultipleState(e) {
|
|
960
|
-
return
|
|
960
|
+
return o(this, null, function* () {
|
|
961
961
|
try {
|
|
962
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.setCameraScanMultipleState(e) : yield
|
|
962
|
+
return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.setCameraScanMultipleState(e) : yield Ee.setCameraScanMultipleState(e);
|
|
963
963
|
} catch (r) {
|
|
964
964
|
throw console.error("setCameraScanMultipleState error", r), r;
|
|
965
965
|
}
|
|
966
966
|
});
|
|
967
967
|
}
|
|
968
968
|
getStatus() {
|
|
969
|
-
return
|
|
969
|
+
return o(this, null, function* () {
|
|
970
970
|
try {
|
|
971
|
-
return yield
|
|
971
|
+
return yield Ee.getStatus();
|
|
972
972
|
} catch (e) {
|
|
973
973
|
throw console.error("cameraScanMultiplePlugin getStatus error", e), e;
|
|
974
974
|
}
|
|
975
975
|
});
|
|
976
976
|
}
|
|
977
977
|
}
|
|
978
|
-
let
|
|
979
|
-
var
|
|
980
|
-
window.__MICRO_APP_ENVIRONMENT__ && (
|
|
981
|
-
const
|
|
978
|
+
let ae = null;
|
|
979
|
+
var lr;
|
|
980
|
+
window.__MICRO_APP_ENVIRONMENT__ && (ae = (lr = window.rawWindow.__mini_app_status_hook__) != null ? lr : {});
|
|
981
|
+
const Re = w.registerPlugin("CameraScanMultipleNoCountPlugin", { web: new class extends y {
|
|
982
982
|
pickCameraScanMultipleNoCount() {
|
|
983
|
-
return
|
|
983
|
+
return o(this, null, function* () {
|
|
984
984
|
});
|
|
985
985
|
}
|
|
986
986
|
setCameraScanMultipleNoCountState() {
|
|
987
|
-
return
|
|
987
|
+
return o(this, null, function* () {
|
|
988
988
|
});
|
|
989
989
|
}
|
|
990
990
|
getStatus() {
|
|
991
991
|
try {
|
|
992
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) =>
|
|
992
|
+
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
|
|
993
993
|
var e, r;
|
|
994
|
-
t((yield (r = (e =
|
|
994
|
+
t((yield (r = (e = ae == null ? void 0 : ae.cameraScanMultipleNoCount) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
|
|
995
995
|
})) : new Promise((t) => {
|
|
996
996
|
t(null);
|
|
997
997
|
});
|
|
@@ -1000,52 +1000,52 @@ const ke = _.registerPlugin("CameraScanMultipleNoCountPlugin", { web: new class
|
|
|
1000
1000
|
}
|
|
1001
1001
|
}
|
|
1002
1002
|
}() });
|
|
1003
|
-
class
|
|
1003
|
+
class Qr {
|
|
1004
1004
|
pickCameraScanMultipleNoCount(e) {
|
|
1005
|
-
return
|
|
1005
|
+
return o(this, null, function* () {
|
|
1006
1006
|
try {
|
|
1007
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.pickCameraScanMultipleNoCount(e) : yield
|
|
1007
|
+
return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.pickCameraScanMultipleNoCount(e) : yield Re.pickCameraScanMultipleNoCount(e);
|
|
1008
1008
|
} catch (r) {
|
|
1009
1009
|
throw console.error("pickCameraScanMultipleNoCount error", r), r;
|
|
1010
1010
|
}
|
|
1011
1011
|
});
|
|
1012
1012
|
}
|
|
1013
1013
|
setCameraScanMultipleNoCountState(e) {
|
|
1014
|
-
return
|
|
1014
|
+
return o(this, null, function* () {
|
|
1015
1015
|
try {
|
|
1016
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.setCameraScanMultipleNoCountState(e) : yield
|
|
1016
|
+
return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.setCameraScanMultipleNoCountState(e) : yield Re.setCameraScanMultipleNoCountState(e);
|
|
1017
1017
|
} catch (r) {
|
|
1018
1018
|
throw console.error("setCameraScanMultipleNoCountState error", r), r;
|
|
1019
1019
|
}
|
|
1020
1020
|
});
|
|
1021
1021
|
}
|
|
1022
1022
|
getStatus() {
|
|
1023
|
-
return
|
|
1023
|
+
return o(this, null, function* () {
|
|
1024
1024
|
try {
|
|
1025
|
-
return yield
|
|
1025
|
+
return yield Re.getStatus();
|
|
1026
1026
|
} catch (e) {
|
|
1027
1027
|
throw console.error("cameraScanMultipleNoCountPlugin getStatus error", e), e;
|
|
1028
1028
|
}
|
|
1029
1029
|
});
|
|
1030
1030
|
}
|
|
1031
1031
|
}
|
|
1032
|
-
let
|
|
1033
|
-
var
|
|
1034
|
-
window.__MICRO_APP_ENVIRONMENT__ && (
|
|
1035
|
-
const
|
|
1032
|
+
let ie = null;
|
|
1033
|
+
var wr;
|
|
1034
|
+
window.__MICRO_APP_ENVIRONMENT__ && (ie = (wr = window.rawWindow.__mini_app_status_hook__) != null ? wr : {});
|
|
1035
|
+
const ke = w.registerPlugin("CameraScanSingleOrDualPlugin", { web: new class extends y {
|
|
1036
1036
|
pickCameraScanSingleOrDual() {
|
|
1037
|
-
return
|
|
1037
|
+
return o(this, null, function* () {
|
|
1038
1038
|
});
|
|
1039
1039
|
}
|
|
1040
1040
|
setCameraScanSingleOrDualState() {
|
|
1041
|
-
return
|
|
1041
|
+
return o(this, null, function* () {
|
|
1042
1042
|
});
|
|
1043
1043
|
}
|
|
1044
1044
|
getStatus() {
|
|
1045
1045
|
try {
|
|
1046
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) =>
|
|
1046
|
+
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
|
|
1047
1047
|
var e, r;
|
|
1048
|
-
t((yield (r = (e =
|
|
1048
|
+
t((yield (r = (e = ie == null ? void 0 : ie.cameraScanSingleOrDual) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
|
|
1049
1049
|
})) : new Promise((t) => {
|
|
1050
1050
|
t(null);
|
|
1051
1051
|
});
|
|
@@ -1054,57 +1054,57 @@ const be = _.registerPlugin("CameraScanSingleOrDualPlugin", { web: new class ext
|
|
|
1054
1054
|
}
|
|
1055
1055
|
}
|
|
1056
1056
|
}() });
|
|
1057
|
-
class
|
|
1057
|
+
class Yr {
|
|
1058
1058
|
pickCameraScanSingleOrDual(e) {
|
|
1059
|
-
return
|
|
1059
|
+
return o(this, null, function* () {
|
|
1060
1060
|
try {
|
|
1061
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.pickCameraScanSingleOrDual(e) : yield
|
|
1061
|
+
return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.pickCameraScanSingleOrDual(e) : yield ke.pickCameraScanSingleOrDual(e);
|
|
1062
1062
|
} catch (r) {
|
|
1063
1063
|
throw console.error("pickCameraScanSingleOrDual error", r), r;
|
|
1064
1064
|
}
|
|
1065
1065
|
});
|
|
1066
1066
|
}
|
|
1067
1067
|
setCameraScanSingleOrDualState(e) {
|
|
1068
|
-
return
|
|
1068
|
+
return o(this, null, function* () {
|
|
1069
1069
|
try {
|
|
1070
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? yield window.rawWindow.__mini_app_hook__.setCameraScanSingleOrDualState(e) : yield
|
|
1070
|
+
return window.__MICRO_APP_ENVIRONMENT__ ? yield window.rawWindow.__mini_app_hook__.setCameraScanSingleOrDualState(e) : yield ke.setCameraScanSingleOrDualState(e);
|
|
1071
1071
|
} catch (r) {
|
|
1072
1072
|
throw console.error("setCameraScanSingleOrDualState error", r), r;
|
|
1073
1073
|
}
|
|
1074
1074
|
});
|
|
1075
1075
|
}
|
|
1076
1076
|
getStatus() {
|
|
1077
|
-
return
|
|
1077
|
+
return o(this, null, function* () {
|
|
1078
1078
|
try {
|
|
1079
|
-
return yield
|
|
1079
|
+
return yield ke.getStatus();
|
|
1080
1080
|
} catch (e) {
|
|
1081
1081
|
throw console.error("cameraScanSingleOrDualPlugin getStatus error", e), e;
|
|
1082
1082
|
}
|
|
1083
1083
|
});
|
|
1084
1084
|
}
|
|
1085
1085
|
}
|
|
1086
|
-
const
|
|
1087
|
-
let
|
|
1088
|
-
var
|
|
1089
|
-
window.__MICRO_APP_ENVIRONMENT__ && (
|
|
1090
|
-
const
|
|
1086
|
+
const Ir = "LaserScanPlugin";
|
|
1087
|
+
let se = null;
|
|
1088
|
+
var dr;
|
|
1089
|
+
window.__MICRO_APP_ENVIRONMENT__ && (se = (dr = window.rawWindow.__mini_app_status_hook__) != null ? dr : {});
|
|
1090
|
+
const Z = w.registerPlugin(Ir, { web: new class extends y {
|
|
1091
1091
|
pickLaserScan() {
|
|
1092
|
-
return
|
|
1092
|
+
return o(this, null, function* () {
|
|
1093
1093
|
});
|
|
1094
1094
|
}
|
|
1095
1095
|
unPickLaserScan() {
|
|
1096
|
-
return
|
|
1096
|
+
return o(this, null, function* () {
|
|
1097
1097
|
});
|
|
1098
1098
|
}
|
|
1099
1099
|
setLaserState() {
|
|
1100
|
-
return
|
|
1100
|
+
return o(this, null, function* () {
|
|
1101
1101
|
});
|
|
1102
1102
|
}
|
|
1103
1103
|
getStatus() {
|
|
1104
1104
|
try {
|
|
1105
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) =>
|
|
1105
|
+
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
|
|
1106
1106
|
var e, r;
|
|
1107
|
-
t((yield (r = (e =
|
|
1107
|
+
t((yield (r = (e = se == null ? void 0 : se.laserScan) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
|
|
1108
1108
|
})) : new Promise((t) => {
|
|
1109
1109
|
t(null);
|
|
1110
1110
|
});
|
|
@@ -1112,20 +1112,20 @@ const Q = _.registerPlugin(Ar, { web: new class extends y {
|
|
|
1112
1112
|
throw console.error("laserScan getStatus error", t), t;
|
|
1113
1113
|
}
|
|
1114
1114
|
}
|
|
1115
|
-
}() }),
|
|
1116
|
-
|
|
1117
|
-
const
|
|
1115
|
+
}() }), ce = M();
|
|
1116
|
+
ce.removeAddListenerLaserScan = () => null;
|
|
1117
|
+
const Xe = (t = () => null) => {
|
|
1118
1118
|
try {
|
|
1119
|
-
|
|
1120
|
-
const e = (r) =>
|
|
1121
|
-
r && (
|
|
1119
|
+
ce.removeAddListenerLaserScan && ce.removeAddListenerLaserScan();
|
|
1120
|
+
const e = (r) => o(void 0, null, function* () {
|
|
1121
|
+
r && (ce.removeAddListenerLaserScan = yield ((n) => o(void 0, null, function* () {
|
|
1122
1122
|
try {
|
|
1123
|
-
if (
|
|
1124
|
-
const
|
|
1125
|
-
return
|
|
1123
|
+
if (w.addListener) {
|
|
1124
|
+
const a = yield w.addListener(Ir, "nativeSendLaser", (i) => n && n(i));
|
|
1125
|
+
return a != null && a.remove ? a.remove : () => null;
|
|
1126
1126
|
}
|
|
1127
|
-
} catch (
|
|
1128
|
-
throw console.error("addListenerLaserHandle error",
|
|
1127
|
+
} catch (a) {
|
|
1128
|
+
throw console.error("addListenerLaserHandle error", a), a;
|
|
1129
1129
|
}
|
|
1130
1130
|
}))(r));
|
|
1131
1131
|
});
|
|
@@ -1136,23 +1136,23 @@ const rr = (t = () => null) => {
|
|
|
1136
1136
|
throw console.error("laserScanFn error", e), e;
|
|
1137
1137
|
}
|
|
1138
1138
|
};
|
|
1139
|
-
class
|
|
1139
|
+
class Zr {
|
|
1140
1140
|
constructor() {
|
|
1141
1141
|
this.pickLaserScan();
|
|
1142
1142
|
}
|
|
1143
1143
|
pickLaserScan() {
|
|
1144
|
-
return
|
|
1144
|
+
return o(this, null, function* () {
|
|
1145
1145
|
try {
|
|
1146
|
-
return yield
|
|
1146
|
+
return yield Z.pickLaserScan({ isContinue: !1 });
|
|
1147
1147
|
} catch (e) {
|
|
1148
1148
|
throw console.error("pickLaserScan error", e), e;
|
|
1149
1149
|
}
|
|
1150
1150
|
});
|
|
1151
1151
|
}
|
|
1152
1152
|
unPickLaserScan() {
|
|
1153
|
-
return
|
|
1153
|
+
return o(this, null, function* () {
|
|
1154
1154
|
try {
|
|
1155
|
-
return yield
|
|
1155
|
+
return yield Z.unPickLaserScan();
|
|
1156
1156
|
} catch (e) {
|
|
1157
1157
|
throw console.error("unPickLaserScan error", e), e;
|
|
1158
1158
|
}
|
|
@@ -1160,7 +1160,7 @@ class tt {
|
|
|
1160
1160
|
}
|
|
1161
1161
|
setLaserState(e) {
|
|
1162
1162
|
try {
|
|
1163
|
-
|
|
1163
|
+
Z.setLaserState(e);
|
|
1164
1164
|
} catch (r) {
|
|
1165
1165
|
throw console.error("setLaserState error", r), r;
|
|
1166
1166
|
}
|
|
@@ -1168,11 +1168,11 @@ class tt {
|
|
|
1168
1168
|
setLaserScan(e) {
|
|
1169
1169
|
((r) => {
|
|
1170
1170
|
try {
|
|
1171
|
-
const { mounted: n, beforeUnmount:
|
|
1171
|
+
const { mounted: n, beforeUnmount: a, callBack: i } = r;
|
|
1172
1172
|
n(() => {
|
|
1173
|
-
|
|
1174
|
-
}),
|
|
1175
|
-
|
|
1173
|
+
Xe(i);
|
|
1174
|
+
}), a(() => {
|
|
1175
|
+
Xe();
|
|
1176
1176
|
});
|
|
1177
1177
|
} catch (n) {
|
|
1178
1178
|
throw console.error("laserScanApiParams error", n), n;
|
|
@@ -1180,22 +1180,22 @@ class tt {
|
|
|
1180
1180
|
})(e);
|
|
1181
1181
|
}
|
|
1182
1182
|
getStatus() {
|
|
1183
|
-
return
|
|
1183
|
+
return o(this, null, function* () {
|
|
1184
1184
|
try {
|
|
1185
|
-
return yield
|
|
1185
|
+
return yield Z.getStatus();
|
|
1186
1186
|
} catch (e) {
|
|
1187
1187
|
throw console.error("getStatus error", e), e;
|
|
1188
1188
|
}
|
|
1189
1189
|
});
|
|
1190
1190
|
}
|
|
1191
1191
|
}
|
|
1192
|
-
const
|
|
1193
|
-
let
|
|
1194
|
-
var
|
|
1195
|
-
window.__MICRO_APP_ENVIRONMENT__ && (
|
|
1196
|
-
const
|
|
1192
|
+
const Cr = "CountAssistPlugin";
|
|
1193
|
+
let le = null;
|
|
1194
|
+
var ur;
|
|
1195
|
+
window.__MICRO_APP_ENVIRONMENT__ && (le = (ur = window.rawWindow.__mini_app_status_hook__) != null ? ur : {});
|
|
1196
|
+
const X = w.registerPlugin(Cr, { web: new class extends y {
|
|
1197
1197
|
setCountAssistState(t) {
|
|
1198
|
-
return
|
|
1198
|
+
return o(this, null, function* () {
|
|
1199
1199
|
try {
|
|
1200
1200
|
return new Promise((e) => {
|
|
1201
1201
|
e(t);
|
|
@@ -1206,7 +1206,7 @@ const ee = _.registerPlugin(Er, { web: new class extends y {
|
|
|
1206
1206
|
});
|
|
1207
1207
|
}
|
|
1208
1208
|
toggleCountAssist(t) {
|
|
1209
|
-
return
|
|
1209
|
+
return o(this, null, function* () {
|
|
1210
1210
|
try {
|
|
1211
1211
|
return new Promise((e) => {
|
|
1212
1212
|
e(t);
|
|
@@ -1217,7 +1217,7 @@ const ee = _.registerPlugin(Er, { web: new class extends y {
|
|
|
1217
1217
|
});
|
|
1218
1218
|
}
|
|
1219
1219
|
getCountAssistToggleState() {
|
|
1220
|
-
return
|
|
1220
|
+
return o(this, null, function* () {
|
|
1221
1221
|
try {
|
|
1222
1222
|
return new Promise((t) => {
|
|
1223
1223
|
t(void 0);
|
|
@@ -1229,9 +1229,9 @@ const ee = _.registerPlugin(Er, { web: new class extends y {
|
|
|
1229
1229
|
}
|
|
1230
1230
|
getStatus() {
|
|
1231
1231
|
try {
|
|
1232
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) =>
|
|
1232
|
+
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
|
|
1233
1233
|
var e, r;
|
|
1234
|
-
t((yield (r = (e =
|
|
1234
|
+
t((yield (r = (e = le == null ? void 0 : le.countAssist) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
|
|
1235
1235
|
})) : new Promise((t) => {
|
|
1236
1236
|
t(null);
|
|
1237
1237
|
});
|
|
@@ -1239,14 +1239,14 @@ const ee = _.registerPlugin(Er, { web: new class extends y {
|
|
|
1239
1239
|
throw console.error("countAssist getStatus error", t), t;
|
|
1240
1240
|
}
|
|
1241
1241
|
}
|
|
1242
|
-
}() }), D =
|
|
1242
|
+
}() }), D = M();
|
|
1243
1243
|
D.addListenerCountAssistRemoveHandle = () => null;
|
|
1244
|
-
const
|
|
1244
|
+
const er = (t = () => null) => o(void 0, null, function* () {
|
|
1245
1245
|
try {
|
|
1246
|
-
D != null && D.addListenerCountAssistRemoveHandle && typeof D.addListenerCountAssistRemoveHandle == "function" && D.addListenerCountAssistRemoveHandle(), D.addListenerCountAssistRemoveHandle = yield ((e) =>
|
|
1246
|
+
D != null && D.addListenerCountAssistRemoveHandle && typeof D.addListenerCountAssistRemoveHandle == "function" && D.addListenerCountAssistRemoveHandle(), D.addListenerCountAssistRemoveHandle = yield ((e) => o(void 0, null, function* () {
|
|
1247
1247
|
try {
|
|
1248
|
-
if (
|
|
1249
|
-
const r = yield
|
|
1248
|
+
if (w.addListener) {
|
|
1249
|
+
const r = yield w.addListener(Cr, "nativeSendCountAssist", (n) => e && e(n));
|
|
1250
1250
|
return r != null && r.remove ? r.remove : () => null;
|
|
1251
1251
|
}
|
|
1252
1252
|
} catch (r) {
|
|
@@ -1257,18 +1257,18 @@ const tr = (t = () => null) => a(void 0, null, function* () {
|
|
|
1257
1257
|
throw console.error("initCountAssistFn error", e), e;
|
|
1258
1258
|
}
|
|
1259
1259
|
});
|
|
1260
|
-
class
|
|
1260
|
+
class Xr {
|
|
1261
1261
|
setCountAssistState(e) {
|
|
1262
|
-
return
|
|
1263
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? yield window.rawWindow.__mini_app_hook__.setCountAssistState(e) : yield
|
|
1262
|
+
return o(this, null, function* () {
|
|
1263
|
+
return window.__MICRO_APP_ENVIRONMENT__ ? yield window.rawWindow.__mini_app_hook__.setCountAssistState(e) : yield X.setCountAssistState(e);
|
|
1264
1264
|
});
|
|
1265
1265
|
}
|
|
1266
1266
|
getCountAssistState(e) {
|
|
1267
1267
|
return ((r) => {
|
|
1268
1268
|
try {
|
|
1269
1269
|
let n = r != null ? r : !1;
|
|
1270
|
-
return
|
|
1271
|
-
n = !!(
|
|
1270
|
+
return ee((a) => {
|
|
1271
|
+
n = !!(a != null && a.countAssistState);
|
|
1272
1272
|
}), n;
|
|
1273
1273
|
} catch (n) {
|
|
1274
1274
|
throw console.error("getCountAssistStateHandle error", n), n;
|
|
@@ -1278,11 +1278,11 @@ class nt {
|
|
|
1278
1278
|
setCountAssistBtn(e) {
|
|
1279
1279
|
((r) => {
|
|
1280
1280
|
try {
|
|
1281
|
-
const { mounted: n, beforeUnmount:
|
|
1281
|
+
const { mounted: n, beforeUnmount: a, callBack: i } = r;
|
|
1282
1282
|
n(() => {
|
|
1283
|
-
|
|
1284
|
-
}),
|
|
1285
|
-
|
|
1283
|
+
er(i);
|
|
1284
|
+
}), a(() => {
|
|
1285
|
+
er();
|
|
1286
1286
|
});
|
|
1287
1287
|
} catch (n) {
|
|
1288
1288
|
throw console.error("setCountAssistBtnHandle error", n), n;
|
|
@@ -1290,38 +1290,38 @@ class nt {
|
|
|
1290
1290
|
})(e);
|
|
1291
1291
|
}
|
|
1292
1292
|
toggleCountAssist(e) {
|
|
1293
|
-
return
|
|
1294
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? yield window.rawWindow.__mini_app_hook__.toggleCountAssist(e) : yield
|
|
1293
|
+
return o(this, null, function* () {
|
|
1294
|
+
return window.__MICRO_APP_ENVIRONMENT__ ? yield window.rawWindow.__mini_app_hook__.toggleCountAssist(e) : yield X.toggleCountAssist(e);
|
|
1295
1295
|
});
|
|
1296
1296
|
}
|
|
1297
1297
|
getCountAssistToggleState() {
|
|
1298
|
-
return
|
|
1299
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? yield window.rawWindow.__mini_app_hook__.getCountAssistToggleState() : yield
|
|
1298
|
+
return o(this, null, function* () {
|
|
1299
|
+
return window.__MICRO_APP_ENVIRONMENT__ ? yield window.rawWindow.__mini_app_hook__.getCountAssistToggleState() : yield X.getCountAssistToggleState();
|
|
1300
1300
|
});
|
|
1301
1301
|
}
|
|
1302
1302
|
getStatus() {
|
|
1303
|
-
return
|
|
1303
|
+
return o(this, null, function* () {
|
|
1304
1304
|
try {
|
|
1305
|
-
return yield
|
|
1305
|
+
return yield X.getStatus();
|
|
1306
1306
|
} catch (e) {
|
|
1307
1307
|
throw console.error("countAssistPlugin getStatus error", e), e;
|
|
1308
1308
|
}
|
|
1309
1309
|
});
|
|
1310
1310
|
}
|
|
1311
1311
|
}
|
|
1312
|
-
let
|
|
1313
|
-
var
|
|
1314
|
-
window.__MICRO_APP_ENVIRONMENT__ && (
|
|
1315
|
-
const
|
|
1312
|
+
let we = null;
|
|
1313
|
+
var _r;
|
|
1314
|
+
window.__MICRO_APP_ENVIRONMENT__ && (we = (_r = window.rawWindow.__mini_app_status_hook__) != null ? _r : {});
|
|
1315
|
+
const be = w.registerPlugin("ClickStreamPlugin", { web: new class extends y {
|
|
1316
1316
|
init() {
|
|
1317
|
-
return
|
|
1317
|
+
return o(this, null, function* () {
|
|
1318
1318
|
return new Promise((t) => {
|
|
1319
1319
|
t(null);
|
|
1320
1320
|
});
|
|
1321
1321
|
});
|
|
1322
1322
|
}
|
|
1323
1323
|
trace(t) {
|
|
1324
|
-
return
|
|
1324
|
+
return o(this, null, function* () {
|
|
1325
1325
|
var e, r;
|
|
1326
1326
|
try {
|
|
1327
1327
|
return window.__MICRO_APP_ENVIRONMENT__ && ((r = (e = window.rawWindow.__mini_app_hook__).clickStream) == null || r.call(e, t.data)), new Promise((n) => {
|
|
@@ -1334,9 +1334,9 @@ const Te = _.registerPlugin("ClickStreamPlugin", { web: new class extends y {
|
|
|
1334
1334
|
}
|
|
1335
1335
|
getStatus() {
|
|
1336
1336
|
try {
|
|
1337
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) =>
|
|
1337
|
+
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
|
|
1338
1338
|
var e, r;
|
|
1339
|
-
t((yield (r = (e =
|
|
1339
|
+
t((yield (r = (e = we == null ? void 0 : we.clickStream) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
|
|
1340
1340
|
})) : new Promise((t) => {
|
|
1341
1341
|
t(null);
|
|
1342
1342
|
});
|
|
@@ -1345,57 +1345,57 @@ const Te = _.registerPlugin("ClickStreamPlugin", { web: new class extends y {
|
|
|
1345
1345
|
}
|
|
1346
1346
|
}
|
|
1347
1347
|
}() });
|
|
1348
|
-
class
|
|
1348
|
+
class et {
|
|
1349
1349
|
constructor() {
|
|
1350
1350
|
this.init();
|
|
1351
1351
|
}
|
|
1352
1352
|
init() {
|
|
1353
|
-
return
|
|
1353
|
+
return o(this, null, function* () {
|
|
1354
1354
|
try {
|
|
1355
|
-
return yield
|
|
1355
|
+
return yield be.init();
|
|
1356
1356
|
} catch (e) {
|
|
1357
1357
|
throw console.error("clickStreamPlugin, init error", e), e;
|
|
1358
1358
|
}
|
|
1359
1359
|
});
|
|
1360
1360
|
}
|
|
1361
1361
|
trace(e) {
|
|
1362
|
-
return
|
|
1362
|
+
return o(this, null, function* () {
|
|
1363
1363
|
try {
|
|
1364
|
-
return yield
|
|
1364
|
+
return yield be.trace(e);
|
|
1365
1365
|
} catch (r) {
|
|
1366
1366
|
throw console.error("clickStreamPlugin, trace error", r), r;
|
|
1367
1367
|
}
|
|
1368
1368
|
});
|
|
1369
1369
|
}
|
|
1370
1370
|
getStatus() {
|
|
1371
|
-
return
|
|
1371
|
+
return o(this, null, function* () {
|
|
1372
1372
|
try {
|
|
1373
|
-
return yield
|
|
1373
|
+
return yield be.getStatus();
|
|
1374
1374
|
} catch (e) {
|
|
1375
1375
|
throw console.error("clickStreamPlugin getStatus error", e), e;
|
|
1376
1376
|
}
|
|
1377
1377
|
});
|
|
1378
1378
|
}
|
|
1379
1379
|
}
|
|
1380
|
-
const
|
|
1381
|
-
let
|
|
1382
|
-
var
|
|
1383
|
-
window.__MICRO_APP_ENVIRONMENT__ && (
|
|
1384
|
-
var
|
|
1385
|
-
const
|
|
1380
|
+
const vr = "MiniAppLifecyclePlugin";
|
|
1381
|
+
let de = null;
|
|
1382
|
+
var hr;
|
|
1383
|
+
window.__MICRO_APP_ENVIRONMENT__ && (de = (hr = window.rawWindow.__mini_app_status_hook__) != null ? hr : {});
|
|
1384
|
+
var J = ((t) => (t.MINI_APP_BEFORE_UNMOUNT_PERMISSION = "mini_app_before_unmount_permission", t.MINI_APP_BEFORE_UNMOUNT_COMPLETION = "mini_app_before_unmount_completion", t))(J || {});
|
|
1385
|
+
const Te = w.registerPlugin(vr, { web: new class extends y {
|
|
1386
1386
|
setNativeUsagePermission() {
|
|
1387
|
-
return
|
|
1387
|
+
return o(this, null, function* () {
|
|
1388
1388
|
});
|
|
1389
1389
|
}
|
|
1390
1390
|
authorizeWebCallback() {
|
|
1391
|
-
return
|
|
1391
|
+
return o(this, null, function* () {
|
|
1392
1392
|
});
|
|
1393
1393
|
}
|
|
1394
1394
|
getStatus() {
|
|
1395
1395
|
try {
|
|
1396
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) =>
|
|
1396
|
+
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
|
|
1397
1397
|
var e, r;
|
|
1398
|
-
t((yield (r = (e =
|
|
1398
|
+
t((yield (r = (e = de == null ? void 0 : de.lifecycle) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
|
|
1399
1399
|
})) : new Promise((t) => {
|
|
1400
1400
|
t(null);
|
|
1401
1401
|
});
|
|
@@ -1403,104 +1403,104 @@ const Be = _.registerPlugin(Rr, { web: new class extends y {
|
|
|
1403
1403
|
throw console.error("lifecycle getStatus error", t), t;
|
|
1404
1404
|
}
|
|
1405
1405
|
}
|
|
1406
|
-
}() }),
|
|
1407
|
-
|
|
1408
|
-
const
|
|
1406
|
+
}() }), ue = M();
|
|
1407
|
+
ue.removeAddListenerLifecycleMiniAppBeforeUnmount = () => null;
|
|
1408
|
+
const rr = (t = () => null) => {
|
|
1409
1409
|
try {
|
|
1410
|
-
|
|
1411
|
-
const e = (r) =>
|
|
1412
|
-
r && (
|
|
1410
|
+
ue.removeAddListenerLifecycleMiniAppBeforeUnmount && ue.removeAddListenerLifecycleMiniAppBeforeUnmount();
|
|
1411
|
+
const e = (r) => o(void 0, null, function* () {
|
|
1412
|
+
r && (ue.removeAddListenerLifecycleMiniAppBeforeUnmount = yield ((n) => o(void 0, null, function* () {
|
|
1413
1413
|
try {
|
|
1414
|
-
if (
|
|
1415
|
-
const
|
|
1416
|
-
return
|
|
1414
|
+
if (w.addListener) {
|
|
1415
|
+
const a = yield w.addListener(vr, "miniAppBeforeUnmount", (i) => n && n(i));
|
|
1416
|
+
return a != null && a.remove ? a.remove : () => null;
|
|
1417
1417
|
}
|
|
1418
|
-
} catch (
|
|
1419
|
-
throw console.error("miniAppBeforeUnmountHandle error",
|
|
1418
|
+
} catch (a) {
|
|
1419
|
+
throw console.error("miniAppBeforeUnmountHandle error", a), a;
|
|
1420
1420
|
}
|
|
1421
1421
|
}))(r));
|
|
1422
1422
|
});
|
|
1423
|
-
setTimeout(() =>
|
|
1423
|
+
setTimeout(() => o(void 0, null, function* () {
|
|
1424
1424
|
yield e(t);
|
|
1425
1425
|
}));
|
|
1426
1426
|
} catch (e) {
|
|
1427
1427
|
throw console.error("laserScanFn error", e), e;
|
|
1428
1428
|
}
|
|
1429
1429
|
};
|
|
1430
|
-
class
|
|
1430
|
+
class rt {
|
|
1431
1431
|
constructor() {
|
|
1432
1432
|
}
|
|
1433
1433
|
setNativeUsagePermission(e) {
|
|
1434
|
-
return
|
|
1434
|
+
return o(this, null, function* () {
|
|
1435
1435
|
try {
|
|
1436
|
-
return yield
|
|
1436
|
+
return yield Te.setNativeUsagePermission(e);
|
|
1437
1437
|
} catch (r) {
|
|
1438
1438
|
throw console.error("lifecyclePlugin.setNativeUsagePermission error", r), r;
|
|
1439
1439
|
}
|
|
1440
1440
|
});
|
|
1441
1441
|
}
|
|
1442
1442
|
authorizeWebCallback(e) {
|
|
1443
|
-
return
|
|
1443
|
+
return o(this, null, function* () {
|
|
1444
1444
|
try {
|
|
1445
|
-
return yield
|
|
1445
|
+
return yield Te.authorizeWebCallback(e);
|
|
1446
1446
|
} catch (r) {
|
|
1447
1447
|
throw console.error("lifecyclePlugin.authorizeWebCallback error", r), r;
|
|
1448
1448
|
}
|
|
1449
1449
|
});
|
|
1450
1450
|
}
|
|
1451
1451
|
miniAppBeforeUnmount(e) {
|
|
1452
|
-
this.setNativeUsagePermission({ action:
|
|
1452
|
+
this.setNativeUsagePermission({ action: J.MINI_APP_BEFORE_UNMOUNT_PERMISSION, value: !0 }), ((r, n) => {
|
|
1453
1453
|
try {
|
|
1454
|
-
const { mounted:
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
var
|
|
1454
|
+
const { mounted: a, beforeUnmount: i, callBack: c } = r;
|
|
1455
|
+
a(() => {
|
|
1456
|
+
rr((s) => o(this, null, function* () {
|
|
1457
|
+
var d;
|
|
1458
1458
|
if (c && c instanceof Function)
|
|
1459
1459
|
try {
|
|
1460
|
-
(
|
|
1461
|
-
yield n.setNativeUsagePermission({ action:
|
|
1460
|
+
(d = c(s)) == null || d.then(() => o(this, null, function* () {
|
|
1461
|
+
yield n.setNativeUsagePermission({ action: J.MINI_APP_BEFORE_UNMOUNT_PERMISSION, value: !1 }), yield n.authorizeWebCallback({ action: J.MINI_APP_BEFORE_UNMOUNT_COMPLETION });
|
|
1462
1462
|
}));
|
|
1463
|
-
} catch (
|
|
1463
|
+
} catch (u) {
|
|
1464
1464
|
console.error("miniAppBeforeUnmount error callBack is not a function or promise");
|
|
1465
1465
|
}
|
|
1466
1466
|
else
|
|
1467
1467
|
console.error("miniAppBeforeUnmount error callBack is not a function or promise");
|
|
1468
1468
|
}));
|
|
1469
|
-
}), i(() =>
|
|
1470
|
-
|
|
1469
|
+
}), i(() => o(this, null, function* () {
|
|
1470
|
+
rr(), n.setNativeUsagePermission({ action: J.MINI_APP_BEFORE_UNMOUNT_PERMISSION, value: !1 });
|
|
1471
1471
|
}));
|
|
1472
|
-
} catch (
|
|
1473
|
-
throw console.error("miniAppBeforeUnmount error",
|
|
1472
|
+
} catch (a) {
|
|
1473
|
+
throw console.error("miniAppBeforeUnmount error", a), a;
|
|
1474
1474
|
}
|
|
1475
1475
|
})(e, this);
|
|
1476
1476
|
}
|
|
1477
1477
|
getStatus() {
|
|
1478
|
-
return
|
|
1478
|
+
return o(this, null, function* () {
|
|
1479
1479
|
try {
|
|
1480
|
-
return yield
|
|
1480
|
+
return yield Te.getStatus();
|
|
1481
1481
|
} catch (e) {
|
|
1482
1482
|
throw console.error("getStatus error", e), e;
|
|
1483
1483
|
}
|
|
1484
1484
|
});
|
|
1485
1485
|
}
|
|
1486
1486
|
}
|
|
1487
|
-
let
|
|
1488
|
-
var
|
|
1489
|
-
window.__MICRO_APP_ENVIRONMENT__ && (
|
|
1490
|
-
const
|
|
1487
|
+
let _e = null;
|
|
1488
|
+
var pr;
|
|
1489
|
+
window.__MICRO_APP_ENVIRONMENT__ && (_e = (pr = window.rawWindow.__mini_app_status_hook__) != null ? pr : {});
|
|
1490
|
+
const Be = w.registerPlugin("DeviceInteractionPlugin", { web: new class extends y {
|
|
1491
1491
|
callVibrate() {
|
|
1492
|
-
return
|
|
1492
|
+
return o(this, null, function* () {
|
|
1493
1493
|
});
|
|
1494
1494
|
}
|
|
1495
1495
|
callErrorBeep() {
|
|
1496
|
-
return
|
|
1496
|
+
return o(this, null, function* () {
|
|
1497
1497
|
});
|
|
1498
1498
|
}
|
|
1499
1499
|
getStatus() {
|
|
1500
1500
|
try {
|
|
1501
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) =>
|
|
1501
|
+
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
|
|
1502
1502
|
var e, r;
|
|
1503
|
-
t((yield (r = (e =
|
|
1503
|
+
t((yield (r = (e = _e == null ? void 0 : _e.deviceInteraction) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
|
|
1504
1504
|
})) : new Promise((t) => {
|
|
1505
1505
|
t(null);
|
|
1506
1506
|
});
|
|
@@ -1509,53 +1509,53 @@ const Ve = _.registerPlugin("DeviceInteractionPlugin", { web: new class extends
|
|
|
1509
1509
|
}
|
|
1510
1510
|
}
|
|
1511
1511
|
}() });
|
|
1512
|
-
class
|
|
1512
|
+
class tt {
|
|
1513
1513
|
callVibrate() {
|
|
1514
|
-
return
|
|
1514
|
+
return o(this, null, function* () {
|
|
1515
1515
|
try {
|
|
1516
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? yield window.rawWindow.__mini_app_hook__.callVibrate() : yield
|
|
1516
|
+
return window.__MICRO_APP_ENVIRONMENT__ ? yield window.rawWindow.__mini_app_hook__.callVibrate() : yield Be.callVibrate();
|
|
1517
1517
|
} catch (e) {
|
|
1518
1518
|
throw console.error("callVibrate error", e), e;
|
|
1519
1519
|
}
|
|
1520
1520
|
});
|
|
1521
1521
|
}
|
|
1522
1522
|
callErrorBeep() {
|
|
1523
|
-
return
|
|
1523
|
+
return o(this, null, function* () {
|
|
1524
1524
|
try {
|
|
1525
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? yield window.rawWindow.__mini_app_hook__.callErrorBeep() : yield
|
|
1525
|
+
return window.__MICRO_APP_ENVIRONMENT__ ? yield window.rawWindow.__mini_app_hook__.callErrorBeep() : yield Be.callErrorBeep();
|
|
1526
1526
|
} catch (e) {
|
|
1527
1527
|
throw console.error("callErrorBeep error", e), e;
|
|
1528
1528
|
}
|
|
1529
1529
|
});
|
|
1530
1530
|
}
|
|
1531
1531
|
getStatus() {
|
|
1532
|
-
return
|
|
1532
|
+
return o(this, null, function* () {
|
|
1533
1533
|
try {
|
|
1534
|
-
return yield
|
|
1534
|
+
return yield Be.getStatus();
|
|
1535
1535
|
} catch (e) {
|
|
1536
1536
|
throw console.error("deviceInteractionPlugin getStatus error", e), e;
|
|
1537
1537
|
}
|
|
1538
1538
|
});
|
|
1539
1539
|
}
|
|
1540
1540
|
}
|
|
1541
|
-
const
|
|
1542
|
-
let
|
|
1543
|
-
var
|
|
1544
|
-
window.__MICRO_APP_ENVIRONMENT__ && (
|
|
1545
|
-
const
|
|
1541
|
+
const Ar = "PollingPlugin";
|
|
1542
|
+
let he = null;
|
|
1543
|
+
var mr;
|
|
1544
|
+
window.__MICRO_APP_ENVIRONMENT__ && (he = (mr = window.rawWindow.__mini_app_status_hook__) != null ? mr : {});
|
|
1545
|
+
const Ve = w.registerPlugin(Ar, { web: new class extends y {
|
|
1546
1546
|
create() {
|
|
1547
|
-
return
|
|
1547
|
+
return o(this, null, function* () {
|
|
1548
1548
|
});
|
|
1549
1549
|
}
|
|
1550
1550
|
destroy() {
|
|
1551
|
-
return
|
|
1551
|
+
return o(this, null, function* () {
|
|
1552
1552
|
});
|
|
1553
1553
|
}
|
|
1554
1554
|
getStatus() {
|
|
1555
1555
|
try {
|
|
1556
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) =>
|
|
1556
|
+
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
|
|
1557
1557
|
var e, r;
|
|
1558
|
-
t((yield (r = (e =
|
|
1558
|
+
t((yield (r = (e = he == null ? void 0 : he.polling) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
|
|
1559
1559
|
})) : new Promise((t) => {
|
|
1560
1560
|
t(null);
|
|
1561
1561
|
});
|
|
@@ -1563,17 +1563,17 @@ const He = _.registerPlugin(kr, { web: new class extends y {
|
|
|
1563
1563
|
throw console.error("polling getStatus error", t), t;
|
|
1564
1564
|
}
|
|
1565
1565
|
}
|
|
1566
|
-
}() }),
|
|
1567
|
-
|
|
1568
|
-
const
|
|
1566
|
+
}() }), pe = M();
|
|
1567
|
+
pe.removeAddListenerPolling = () => null;
|
|
1568
|
+
const nt = (t, e) => {
|
|
1569
1569
|
try {
|
|
1570
|
-
|
|
1570
|
+
pe.removeAddListenerPolling && pe.removeAddListenerPolling();
|
|
1571
1571
|
const r = e.pollingId;
|
|
1572
|
-
((n) =>
|
|
1573
|
-
return n && (
|
|
1572
|
+
((n) => o(void 0, null, function* () {
|
|
1573
|
+
return n && (pe.removeAddListenerPolling = yield ((a) => o(void 0, null, function* () {
|
|
1574
1574
|
try {
|
|
1575
|
-
if (
|
|
1576
|
-
const i = yield
|
|
1575
|
+
if (w.addListener) {
|
|
1576
|
+
const i = yield w.addListener(Ar, "nativeSendPolling", (c) => a && a(c));
|
|
1577
1577
|
return i != null && i.remove ? i.remove : () => null;
|
|
1578
1578
|
}
|
|
1579
1579
|
} catch (i) {
|
|
@@ -1581,39 +1581,39 @@ const st = (t, e) => {
|
|
|
1581
1581
|
}
|
|
1582
1582
|
}))(n));
|
|
1583
1583
|
}))((n) => {
|
|
1584
|
-
(n == null ? void 0 : n.pollingId) === r && (n != null && n.pollingId) && t.pollingList.forEach((
|
|
1585
|
-
|
|
1584
|
+
(n == null ? void 0 : n.pollingId) === r && (n != null && n.pollingId) && t.pollingList.forEach((a) => {
|
|
1585
|
+
a != null && a.pollingId && (n == null ? void 0 : n.pollingId) === (a == null ? void 0 : a.pollingId) && typeof (a == null ? void 0 : a.callBack) == "function" && a.callBack(n);
|
|
1586
1586
|
});
|
|
1587
1587
|
});
|
|
1588
1588
|
} catch (r) {
|
|
1589
1589
|
throw console.error("pollingFn error", r), r;
|
|
1590
1590
|
}
|
|
1591
1591
|
};
|
|
1592
|
-
class
|
|
1592
|
+
class ot {
|
|
1593
1593
|
constructor() {
|
|
1594
1594
|
P(this, "pollingList");
|
|
1595
1595
|
this.pollingList = [];
|
|
1596
1596
|
}
|
|
1597
1597
|
create(e) {
|
|
1598
|
-
var r, n,
|
|
1598
|
+
var r, n, a;
|
|
1599
1599
|
if (window.__MICRO_APP_ENVIRONMENT__) {
|
|
1600
1600
|
const { mounted: i, pollingParams: c, callBack: s } = e;
|
|
1601
1601
|
return i(() => {
|
|
1602
|
-
var
|
|
1603
|
-
(
|
|
1602
|
+
var d, u;
|
|
1603
|
+
(u = (d = window.rawWindow.__mini_app_hook__) == null ? void 0 : d.addPolling) == null || u.call(d, c, s);
|
|
1604
1604
|
}), () => {
|
|
1605
1605
|
this.destroy({ pollingId: c.pollingId });
|
|
1606
1606
|
};
|
|
1607
1607
|
}
|
|
1608
1608
|
try {
|
|
1609
|
-
(r = e == null ? void 0 : e.pollingParams) != null && r.pollingId && this.pollingList.push({ pollingId: (n = e == null ? void 0 : e.pollingParams) == null ? void 0 : n.pollingId, callBack: e == null ? void 0 : e.callBack }), this.pollingList = this.pollingList.filter((c, s,
|
|
1610
|
-
const i = ((
|
|
1611
|
-
return
|
|
1609
|
+
(r = e == null ? void 0 : e.pollingParams) != null && r.pollingId && this.pollingList.push({ pollingId: (n = e == null ? void 0 : e.pollingParams) == null ? void 0 : n.pollingId, callBack: e == null ? void 0 : e.callBack }), this.pollingList = this.pollingList.filter((c, s, d) => s === d.findIndex((u) => u.pollingId === c.pollingId));
|
|
1610
|
+
const i = ((a = e == null ? void 0 : e.pollingParams) == null ? void 0 : a.delay) / 1e3;
|
|
1611
|
+
return Ve.create(T(b({}, e == null ? void 0 : e.pollingParams), { delay: i })), ((c, s) => {
|
|
1612
1612
|
try {
|
|
1613
|
-
const { mounted:
|
|
1614
|
-
|
|
1615
|
-
} catch (
|
|
1616
|
-
throw console.error("createPolling error",
|
|
1613
|
+
const { mounted: d, pollingParams: u } = c;
|
|
1614
|
+
d(() => nt(s, u));
|
|
1615
|
+
} catch (d) {
|
|
1616
|
+
throw console.error("createPolling error", d), d;
|
|
1617
1617
|
}
|
|
1618
1618
|
})(e, this), () => {
|
|
1619
1619
|
var c, s;
|
|
@@ -1624,34 +1624,34 @@ class ct {
|
|
|
1624
1624
|
}
|
|
1625
1625
|
}
|
|
1626
1626
|
destroy(e) {
|
|
1627
|
-
var r, n,
|
|
1627
|
+
var r, n, a;
|
|
1628
1628
|
if (window.__MICRO_APP_ENVIRONMENT__) {
|
|
1629
1629
|
const { pollingId: i } = e;
|
|
1630
1630
|
(n = (r = window.rawWindow.__mini_app_hook__) == null ? void 0 : r.deletePolling) == null || n.call(r, i);
|
|
1631
1631
|
} else
|
|
1632
1632
|
try {
|
|
1633
1633
|
const i = this.pollingList.map((c) => c.pollingId).indexOf(e.pollingId);
|
|
1634
|
-
return (
|
|
1634
|
+
return (a = this.pollingList) != null && a.length && (Number(i) || Number(i) >= 0) && this.pollingList.splice(Number(i), 1), Ve.destroy(e);
|
|
1635
1635
|
} catch (i) {
|
|
1636
1636
|
throw console.error("pollingPlugin destroy error", i), i;
|
|
1637
1637
|
}
|
|
1638
1638
|
}
|
|
1639
1639
|
getStatus() {
|
|
1640
|
-
return
|
|
1640
|
+
return o(this, null, function* () {
|
|
1641
1641
|
try {
|
|
1642
|
-
return yield
|
|
1642
|
+
return yield Ve.getStatus();
|
|
1643
1643
|
} catch (e) {
|
|
1644
1644
|
throw console.error("getStatus error", e), e;
|
|
1645
1645
|
}
|
|
1646
1646
|
});
|
|
1647
1647
|
}
|
|
1648
1648
|
}
|
|
1649
|
-
let
|
|
1650
|
-
var
|
|
1651
|
-
window.__MICRO_APP_ENVIRONMENT__ && (
|
|
1652
|
-
const
|
|
1649
|
+
let me = null;
|
|
1650
|
+
var gr;
|
|
1651
|
+
window.__MICRO_APP_ENVIRONMENT__ && (me = (gr = window.rawWindow.__mini_app_status_hook__) != null ? gr : {});
|
|
1652
|
+
const tr = w.registerPlugin("PaymentPlugin", { web: new class extends y {
|
|
1653
1653
|
process(t) {
|
|
1654
|
-
return
|
|
1654
|
+
return o(this, null, function* () {
|
|
1655
1655
|
try {
|
|
1656
1656
|
return new Promise((e) => {
|
|
1657
1657
|
e(t);
|
|
@@ -1663,9 +1663,9 @@ const or = _.registerPlugin("PaymentPlugin", { web: new class extends y {
|
|
|
1663
1663
|
}
|
|
1664
1664
|
getStatus() {
|
|
1665
1665
|
try {
|
|
1666
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) =>
|
|
1666
|
+
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
|
|
1667
1667
|
var e, r;
|
|
1668
|
-
t((yield (r = (e =
|
|
1668
|
+
t((yield (r = (e = me == null ? void 0 : me.payment) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
|
|
1669
1669
|
})) : new Promise((t) => {
|
|
1670
1670
|
t(null);
|
|
1671
1671
|
});
|
|
@@ -1674,43 +1674,43 @@ const or = _.registerPlugin("PaymentPlugin", { web: new class extends y {
|
|
|
1674
1674
|
}
|
|
1675
1675
|
}
|
|
1676
1676
|
}() });
|
|
1677
|
-
class
|
|
1677
|
+
class at {
|
|
1678
1678
|
process(e) {
|
|
1679
|
-
return
|
|
1679
|
+
return o(this, null, function* () {
|
|
1680
1680
|
try {
|
|
1681
|
-
return yield
|
|
1681
|
+
return yield tr.process(e);
|
|
1682
1682
|
} catch (r) {
|
|
1683
1683
|
throw console.error("paymentPlugins.process error", r), r;
|
|
1684
1684
|
}
|
|
1685
1685
|
});
|
|
1686
1686
|
}
|
|
1687
1687
|
getStatus() {
|
|
1688
|
-
return
|
|
1688
|
+
return o(this, null, function* () {
|
|
1689
1689
|
try {
|
|
1690
|
-
return yield
|
|
1690
|
+
return yield tr.getStatus();
|
|
1691
1691
|
} catch (e) {
|
|
1692
1692
|
throw console.error("getStatus error", e), e;
|
|
1693
1693
|
}
|
|
1694
1694
|
});
|
|
1695
1695
|
}
|
|
1696
1696
|
}
|
|
1697
|
-
let
|
|
1698
|
-
var
|
|
1699
|
-
window.__MICRO_APP_ENVIRONMENT__ && (
|
|
1700
|
-
const
|
|
1697
|
+
let ge = null;
|
|
1698
|
+
var Pr;
|
|
1699
|
+
window.__MICRO_APP_ENVIRONMENT__ && (ge = (Pr = window.rawWindow.__mini_app_status_hook__) != null ? Pr : {});
|
|
1700
|
+
const He = w.registerPlugin("CameraForTakePhotoPlugin", { web: new class extends y {
|
|
1701
1701
|
pickCameraForTakePhoto() {
|
|
1702
|
-
return
|
|
1702
|
+
return o(this, null, function* () {
|
|
1703
1703
|
});
|
|
1704
1704
|
}
|
|
1705
1705
|
setCameraForTakePhotoState() {
|
|
1706
|
-
return
|
|
1706
|
+
return o(this, null, function* () {
|
|
1707
1707
|
});
|
|
1708
1708
|
}
|
|
1709
1709
|
getStatus() {
|
|
1710
1710
|
try {
|
|
1711
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) =>
|
|
1711
|
+
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
|
|
1712
1712
|
var e, r;
|
|
1713
|
-
t((yield (r = (e =
|
|
1713
|
+
t((yield (r = (e = ge == null ? void 0 : ge.cameraForTakePhoto) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
|
|
1714
1714
|
})) : new Promise((t) => {
|
|
1715
1715
|
t(null);
|
|
1716
1716
|
});
|
|
@@ -1719,41 +1719,41 @@ const Fe = _.registerPlugin("CameraForTakePhotoPlugin", { web: new class extends
|
|
|
1719
1719
|
}
|
|
1720
1720
|
}
|
|
1721
1721
|
}() });
|
|
1722
|
-
class
|
|
1722
|
+
class it {
|
|
1723
1723
|
pickCameraForTakePhoto() {
|
|
1724
|
-
return
|
|
1724
|
+
return o(this, null, function* () {
|
|
1725
1725
|
try {
|
|
1726
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.pickCameraForTakePhoto() : yield
|
|
1726
|
+
return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.pickCameraForTakePhoto() : yield He.pickCameraForTakePhoto();
|
|
1727
1727
|
} catch (e) {
|
|
1728
1728
|
throw console.error("pickCameraForTakePhoto error", e), e;
|
|
1729
1729
|
}
|
|
1730
1730
|
});
|
|
1731
1731
|
}
|
|
1732
1732
|
setCameraForTakePhotoState(e) {
|
|
1733
|
-
return
|
|
1733
|
+
return o(this, null, function* () {
|
|
1734
1734
|
try {
|
|
1735
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.setCameraForTakePhotoState(e) : yield
|
|
1735
|
+
return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.setCameraForTakePhotoState(e) : yield He.setCameraForTakePhotoState(e);
|
|
1736
1736
|
} catch (r) {
|
|
1737
1737
|
throw console.error("setCameraForTakePhotoState error", r), r;
|
|
1738
1738
|
}
|
|
1739
1739
|
});
|
|
1740
1740
|
}
|
|
1741
1741
|
getStatus() {
|
|
1742
|
-
return
|
|
1742
|
+
return o(this, null, function* () {
|
|
1743
1743
|
try {
|
|
1744
|
-
return yield
|
|
1744
|
+
return yield He.getStatus();
|
|
1745
1745
|
} catch (e) {
|
|
1746
1746
|
throw console.error("cameraForTakePhotoPlugin getStatus error", e), e;
|
|
1747
1747
|
}
|
|
1748
1748
|
});
|
|
1749
1749
|
}
|
|
1750
1750
|
}
|
|
1751
|
-
let
|
|
1752
|
-
var
|
|
1753
|
-
window.__MICRO_APP_ENVIRONMENT__ && (
|
|
1754
|
-
const
|
|
1751
|
+
let Pe = null;
|
|
1752
|
+
var yr;
|
|
1753
|
+
window.__MICRO_APP_ENVIRONMENT__ && (Pe = (yr = window.rawWindow.__mini_app_status_hook__) != null ? yr : {});
|
|
1754
|
+
const nr = w.registerPlugin("HttpPlugin", { web: new class extends y {
|
|
1755
1755
|
request(t) {
|
|
1756
|
-
return
|
|
1756
|
+
return o(this, null, function* () {
|
|
1757
1757
|
return new Promise((e) => {
|
|
1758
1758
|
e(t);
|
|
1759
1759
|
});
|
|
@@ -1761,9 +1761,9 @@ const ar = _.registerPlugin("HttpPlugin", { web: new class extends y {
|
|
|
1761
1761
|
}
|
|
1762
1762
|
getStatus() {
|
|
1763
1763
|
try {
|
|
1764
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) =>
|
|
1764
|
+
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
|
|
1765
1765
|
var e, r;
|
|
1766
|
-
t((yield (r = (e =
|
|
1766
|
+
t((yield (r = (e = Pe == null ? void 0 : Pe.http) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
|
|
1767
1767
|
})) : new Promise((t) => {
|
|
1768
1768
|
t(null);
|
|
1769
1769
|
});
|
|
@@ -1772,15 +1772,15 @@ const ar = _.registerPlugin("HttpPlugin", { web: new class extends y {
|
|
|
1772
1772
|
}
|
|
1773
1773
|
}
|
|
1774
1774
|
}() });
|
|
1775
|
-
class
|
|
1775
|
+
class st {
|
|
1776
1776
|
request(e) {
|
|
1777
|
-
return
|
|
1777
|
+
return o(this, null, function* () {
|
|
1778
1778
|
try {
|
|
1779
1779
|
if (window.__MICRO_APP_ENVIRONMENT__)
|
|
1780
1780
|
return window.rawWindow.__mini_app_hook__.requestHttp(e);
|
|
1781
1781
|
{
|
|
1782
1782
|
let r = {};
|
|
1783
|
-
return e.url && (r.url = e.url), e.method && (r.method = e.method), e.headers && (r.headers = e.headers), e.params && (r.urlParams = e.params), e.data && (typeof e.data == "string" ? r.bodyData = e.data : r.bodyParams = e.data), e.upload && (r.upload = e.upload), yield
|
|
1783
|
+
return e.url && (r.url = e.url), e.method && (r.method = e.method), e.headers && (r.headers = e.headers), e.params && (r.urlParams = e.params), e.data && (typeof e.data == "string" ? r.bodyData = e.data : r.bodyParams = e.data), e.upload && (r.upload = e.upload), yield nr.request(r);
|
|
1784
1784
|
}
|
|
1785
1785
|
} catch (r) {
|
|
1786
1786
|
throw console.error("HttpPlugin, trace error", r), r;
|
|
@@ -1788,9 +1788,9 @@ class dt {
|
|
|
1788
1788
|
});
|
|
1789
1789
|
}
|
|
1790
1790
|
getStatus() {
|
|
1791
|
-
return
|
|
1791
|
+
return o(this, null, function* () {
|
|
1792
1792
|
try {
|
|
1793
|
-
return yield
|
|
1793
|
+
return yield nr.getStatus();
|
|
1794
1794
|
} catch (e) {
|
|
1795
1795
|
throw console.error("HttpPlugin getStatus error", e), e;
|
|
1796
1796
|
}
|
|
@@ -1800,38 +1800,38 @@ class dt {
|
|
|
1800
1800
|
const S = [];
|
|
1801
1801
|
for (let t = 0; t < 256; ++t)
|
|
1802
1802
|
S.push((t + 256).toString(16).slice(1));
|
|
1803
|
-
const
|
|
1804
|
-
function
|
|
1805
|
-
return e || t || !crypto.randomUUID ? function(n,
|
|
1806
|
-
var s,
|
|
1803
|
+
const ct = new Uint8Array(16);
|
|
1804
|
+
function lt(t, e, r) {
|
|
1805
|
+
return e || t || !crypto.randomUUID ? function(n, a, i) {
|
|
1806
|
+
var s, d, u;
|
|
1807
1807
|
n = n || {};
|
|
1808
|
-
const c = (
|
|
1808
|
+
const c = (u = (d = n.random) != null ? d : (s = n.rng) == null ? void 0 : s.call(n)) != null ? u : crypto.getRandomValues(ct);
|
|
1809
1809
|
if (c.length < 16)
|
|
1810
1810
|
throw new Error("Random bytes length must be >= 16");
|
|
1811
|
-
if (c[6] = 15 & c[6] | 64, c[8] = 63 & c[8] | 128,
|
|
1812
|
-
if ((i = i || 0) < 0 || i + 16 >
|
|
1811
|
+
if (c[6] = 15 & c[6] | 64, c[8] = 63 & c[8] | 128, a) {
|
|
1812
|
+
if ((i = i || 0) < 0 || i + 16 > a.length)
|
|
1813
1813
|
throw new RangeError(`UUID byte range ${i}:${i + 15} is out of buffer bounds`);
|
|
1814
|
-
for (let
|
|
1815
|
-
|
|
1816
|
-
return
|
|
1814
|
+
for (let _ = 0; _ < 16; ++_)
|
|
1815
|
+
a[i + _] = c[_];
|
|
1816
|
+
return a;
|
|
1817
1817
|
}
|
|
1818
|
-
return function(
|
|
1819
|
-
return (S[
|
|
1818
|
+
return function(_, p = 0) {
|
|
1819
|
+
return (S[_[p + 0]] + S[_[p + 1]] + S[_[p + 2]] + S[_[p + 3]] + "-" + S[_[p + 4]] + S[_[p + 5]] + "-" + S[_[p + 6]] + S[_[p + 7]] + "-" + S[_[p + 8]] + S[_[p + 9]] + "-" + S[_[p + 10]] + S[_[p + 11]] + S[_[p + 12]] + S[_[p + 13]] + S[_[p + 14]] + S[_[p + 15]]).toLowerCase();
|
|
1820
1820
|
}(c);
|
|
1821
1821
|
}(t, e, r) : crypto.randomUUID();
|
|
1822
1822
|
}
|
|
1823
|
-
const
|
|
1824
|
-
let
|
|
1825
|
-
var
|
|
1826
|
-
window.__MICRO_APP_ENVIRONMENT__ && (
|
|
1827
|
-
const
|
|
1823
|
+
const Or = "PrintPlugin";
|
|
1824
|
+
let ye = null;
|
|
1825
|
+
var Sr;
|
|
1826
|
+
window.__MICRO_APP_ENVIRONMENT__ && (ye = (Sr = window.rawWindow.__mini_app_status_hook__) != null ? Sr : {});
|
|
1827
|
+
const or = w.registerPlugin(Or, { web: new class extends y {
|
|
1828
1828
|
print() {
|
|
1829
1829
|
}
|
|
1830
1830
|
getStatus() {
|
|
1831
1831
|
try {
|
|
1832
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) =>
|
|
1832
|
+
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
|
|
1833
1833
|
var e, r;
|
|
1834
|
-
t((yield (r = (e =
|
|
1834
|
+
t((yield (r = (e = ye == null ? void 0 : ye.print) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
|
|
1835
1835
|
})) : new Promise((t) => {
|
|
1836
1836
|
t(null);
|
|
1837
1837
|
});
|
|
@@ -1839,17 +1839,17 @@ const ir = _.registerPlugin(br, { web: new class extends y {
|
|
|
1839
1839
|
throw console.error("print getStatus error", t), t;
|
|
1840
1840
|
}
|
|
1841
1841
|
}
|
|
1842
|
-
}() }),
|
|
1843
|
-
|
|
1844
|
-
const
|
|
1842
|
+
}() }), Q = M();
|
|
1843
|
+
Q.removeAddListenerPrintList = {};
|
|
1844
|
+
const wt = (t, e) => {
|
|
1845
1845
|
try {
|
|
1846
1846
|
const r = e.printId;
|
|
1847
|
-
|
|
1848
|
-
} }), ((n) =>
|
|
1849
|
-
return n && (
|
|
1847
|
+
Q.removeAddListenerPrintList = T(b({}, Q.removeAddListenerPrintList), { printId: () => {
|
|
1848
|
+
} }), ((n) => o(void 0, null, function* () {
|
|
1849
|
+
return n && (Q.removeAddListenerPrintList[r] = yield ((a) => o(void 0, null, function* () {
|
|
1850
1850
|
try {
|
|
1851
|
-
if (
|
|
1852
|
-
const i = yield
|
|
1851
|
+
if (w.addListener) {
|
|
1852
|
+
const i = yield w.addListener(Or, "nativeSendPrint", (c) => a && a(c));
|
|
1853
1853
|
return i != null && i.remove ? i.remove : () => null;
|
|
1854
1854
|
}
|
|
1855
1855
|
} catch (i) {
|
|
@@ -1857,34 +1857,34 @@ const ht = (t, e) => {
|
|
|
1857
1857
|
}
|
|
1858
1858
|
}))(n));
|
|
1859
1859
|
}))((n) => {
|
|
1860
|
-
(n == null ? void 0 : n.printId) === r && (n != null && n.printId) && t.printList.forEach((
|
|
1860
|
+
(n == null ? void 0 : n.printId) === r && (n != null && n.printId) && t.printList.forEach((a) => {
|
|
1861
1861
|
var i, c, s;
|
|
1862
|
-
|
|
1862
|
+
a != null && a.printId && (n == null ? void 0 : n.printId) === (a == null ? void 0 : a.printId) && (typeof (a == null ? void 0 : a.callBack) == "function" && a.callBack(n), (s = a.state == 5 || a.state == 6) != null || (c = (i = Q.removeAddListenerPrintList) == null ? void 0 : i[a == null ? void 0 : a.printId]) == null || c.call(i));
|
|
1863
1863
|
});
|
|
1864
1864
|
});
|
|
1865
1865
|
} catch (r) {
|
|
1866
1866
|
throw console.error("printFn error", r), r;
|
|
1867
1867
|
}
|
|
1868
1868
|
};
|
|
1869
|
-
class
|
|
1869
|
+
class dt {
|
|
1870
1870
|
constructor() {
|
|
1871
1871
|
P(this, "printList");
|
|
1872
1872
|
this.printList = [];
|
|
1873
1873
|
}
|
|
1874
1874
|
print(e) {
|
|
1875
|
-
var n,
|
|
1876
|
-
const r = ((
|
|
1877
|
-
if (this.printList.push({ printId: r, callBack: e == null ? void 0 : e.callBack }), this.printList = this.printList.filter((s,
|
|
1878
|
-
const { printParams: s, callBack:
|
|
1879
|
-
return (c = (i = window.rawWindow.__mini_app_hook__) == null ? void 0 : i.print) == null || c.call(i, T(b({}, s), { printId: r }),
|
|
1875
|
+
var n, a, i, c;
|
|
1876
|
+
const r = ((a = (n = e == null ? void 0 : e.printParams) == null ? void 0 : n.functionId) != null ? a : "") + lt().replace(/-/g, "");
|
|
1877
|
+
if (this.printList.push({ printId: r, callBack: e == null ? void 0 : e.callBack }), this.printList = this.printList.filter((s, d, u) => d === u.findIndex((_) => _.printId === s.printId)), window.__MICRO_APP_ENVIRONMENT__) {
|
|
1878
|
+
const { printParams: s, callBack: d } = e;
|
|
1879
|
+
return (c = (i = window.rawWindow.__mini_app_hook__) == null ? void 0 : i.print) == null || c.call(i, T(b({}, s), { printId: r }), d), { id: r };
|
|
1880
1880
|
}
|
|
1881
1881
|
try {
|
|
1882
|
-
return
|
|
1882
|
+
return or.print(T(b({}, e == null ? void 0 : e.printParams), { printId: r })), ((s, d) => {
|
|
1883
1883
|
try {
|
|
1884
|
-
const { printParams:
|
|
1885
|
-
|
|
1886
|
-
} catch (
|
|
1887
|
-
throw console.error("createPrint error",
|
|
1884
|
+
const { printParams: u } = s;
|
|
1885
|
+
wt(d, u);
|
|
1886
|
+
} catch (u) {
|
|
1887
|
+
throw console.error("createPrint error", u), u;
|
|
1888
1888
|
}
|
|
1889
1889
|
})(T(b({}, e), { printParams: T(b({}, e.printParams), { printId: r }) }), this), { id: r };
|
|
1890
1890
|
} catch (s) {
|
|
@@ -1892,74 +1892,33 @@ class pt {
|
|
|
1892
1892
|
}
|
|
1893
1893
|
}
|
|
1894
1894
|
getStatus() {
|
|
1895
|
-
return
|
|
1895
|
+
return o(this, null, function* () {
|
|
1896
1896
|
try {
|
|
1897
|
-
return yield
|
|
1897
|
+
return yield or.getStatus();
|
|
1898
1898
|
} catch (e) {
|
|
1899
1899
|
throw console.error("getStatus error", e), e;
|
|
1900
1900
|
}
|
|
1901
1901
|
});
|
|
1902
1902
|
}
|
|
1903
1903
|
}
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
return (e = t == null ? void 0 : t.trim().replace(/^\.+/, "").toLowerCase()) != null ? e : "";
|
|
1910
|
-
}, sr = (t, e) => {
|
|
1911
|
-
const r = We(e);
|
|
1912
|
-
return !r || t.toLowerCase().endsWith(`.${r}`) ? t : `${t}.${r}`;
|
|
1913
|
-
}, cr = (t) => {
|
|
1914
|
-
var s, l;
|
|
1915
|
-
const e = ((d) => {
|
|
1916
|
-
var I;
|
|
1917
|
-
const w = (I = d == null ? void 0 : d.trim()) != null ? I : "", h = w.lastIndexOf(".");
|
|
1918
|
-
if (h <= 0 || h === w.length - 1)
|
|
1919
|
-
return { name: w, type: "", fileName: w };
|
|
1920
|
-
const f = w.slice(0, h), M = We(w.slice(h + 1));
|
|
1921
|
-
return { name: f, type: M, fileName: M ? sr(f, M) : w };
|
|
1922
|
-
})(((d) => {
|
|
1923
|
-
var w;
|
|
1924
|
-
if (!d)
|
|
1925
|
-
return "";
|
|
1926
|
-
try {
|
|
1927
|
-
const h = decodeURIComponent(d).match(/[^/?#&=]+\.[a-zA-Z0-9]+(?=$|[?&#])/g);
|
|
1928
|
-
return (w = h == null ? void 0 : h.pop()) != null ? w : "";
|
|
1929
|
-
} catch (h) {
|
|
1930
|
-
return "";
|
|
1931
|
-
}
|
|
1932
|
-
})(t == null ? void 0 : t.url)), r = We(t == null ? void 0 : t.type), n = (l = (s = t == null ? void 0 : t.fileName) == null ? void 0 : s.trim()) != null ? l : "", o = e.type || r, i = n || e.name || `path_${Date.now()}`, c = !r || !n;
|
|
1933
|
-
return { type: o, fileName: i, downloadFileName: o ? sr(i, o) : i, hasUrlFile: !!e.type, requiresUrlFile: c };
|
|
1934
|
-
}, lr = _.registerPlugin("DownloadFilePlugin", { web: new class extends y {
|
|
1904
|
+
const Lr = typeof window != "undefined";
|
|
1905
|
+
let Se = null;
|
|
1906
|
+
var Nr;
|
|
1907
|
+
Lr && window.__MICRO_APP_ENVIRONMENT__ && (Se = (Nr = window.rawWindow.__mini_app_status_hook__) != null ? Nr : {});
|
|
1908
|
+
const ar = w.registerPlugin("DownloadFilePlugin", { web: new class extends y {
|
|
1935
1909
|
downloadFile(t) {
|
|
1936
|
-
return
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
return j(!1, "Missing file name or type in url", r, n);
|
|
1942
|
-
if (!r)
|
|
1943
|
-
return j(!1, "Missing required parameter: type", r, n);
|
|
1944
|
-
if (!s)
|
|
1945
|
-
return j(!1, "Missing required parameter: url", r, n);
|
|
1946
|
-
const l = yield fetch(s, t == null ? void 0 : t.fetchOptions);
|
|
1947
|
-
if (!l.ok)
|
|
1948
|
-
return j(!1, `HTTP error! status: ${l.status}`, r, n);
|
|
1949
|
-
const d = yield l.blob(), w = window.URL.createObjectURL(d), h = document.createElement("a");
|
|
1950
|
-
return h.href = w, h.download = o, document.body.appendChild(h), h.click(), h.remove(), window.setTimeout(() => window.URL.revokeObjectURL(w), 0), j(!0, "download success", r, n);
|
|
1951
|
-
} catch (r) {
|
|
1952
|
-
console.error("downloadFile error", r);
|
|
1953
|
-
const { type: n, fileName: o } = cr(t);
|
|
1954
|
-
return j(!1, r instanceof Error ? r.message : "download failed", n, o);
|
|
1955
|
-
}
|
|
1910
|
+
return o(this, null, function* () {
|
|
1911
|
+
return ((e, r, n = "") => ({ success: e, message: r, fileName: n }))(!1, "DownloadFilePlugin should be handled by shell", ((e) => {
|
|
1912
|
+
var r;
|
|
1913
|
+
return ((r = e == null ? void 0 : e.fileName) == null ? void 0 : r.trim()) || `path_${Date.now()}`;
|
|
1914
|
+
})(t));
|
|
1956
1915
|
});
|
|
1957
1916
|
}
|
|
1958
1917
|
getStatus() {
|
|
1959
1918
|
try {
|
|
1960
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) =>
|
|
1919
|
+
return Lr && window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
|
|
1961
1920
|
var e, r;
|
|
1962
|
-
t((yield (r = (e =
|
|
1921
|
+
t((yield (r = (e = Se == null ? void 0 : Se.downloadFile) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
|
|
1963
1922
|
})) : new Promise((t) => {
|
|
1964
1923
|
t(null);
|
|
1965
1924
|
});
|
|
@@ -1967,89 +1926,71 @@ const j = (t, e, r = "", n = "") => ({ success: t, message: e, type: r, fileName
|
|
|
1967
1926
|
throw console.error("downloadFile getStatus error", t), t;
|
|
1968
1927
|
}
|
|
1969
1928
|
}
|
|
1970
|
-
}() }),
|
|
1929
|
+
}() }), ut = typeof window != "undefined", _t = (t) => {
|
|
1971
1930
|
var e;
|
|
1972
|
-
return (e = t == null ? void 0 : t.
|
|
1973
|
-
},
|
|
1974
|
-
|
|
1975
|
-
const r = ((o) => {
|
|
1976
|
-
var s;
|
|
1977
|
-
const i = (s = o == null ? void 0 : o.trim()) != null ? s : "", c = i.lastIndexOf(".");
|
|
1978
|
-
return c <= 0 || c === i.length - 1 ? { name: i, type: "" } : { name: i.slice(0, c), type: wr(i.slice(c + 1)) };
|
|
1979
|
-
})(((o) => {
|
|
1980
|
-
var i;
|
|
1981
|
-
if (!o)
|
|
1982
|
-
return "";
|
|
1983
|
-
try {
|
|
1984
|
-
const c = decodeURIComponent(o).match(/[^/?#&=]+\.[a-zA-Z0-9]+(?=$|[?&#])/g);
|
|
1985
|
-
return (i = c == null ? void 0 : c.pop()) != null ? i : "";
|
|
1986
|
-
} catch (c) {
|
|
1987
|
-
return "";
|
|
1988
|
-
}
|
|
1989
|
-
})(t == null ? void 0 : t.url));
|
|
1990
|
-
return { success: !1, message: e, type: r.type || wr(t == null ? void 0 : t.type), fileName: ((n = t == null ? void 0 : t.fileName) == null ? void 0 : n.trim()) || r.name || `path_${Date.now()}` };
|
|
1991
|
-
};
|
|
1992
|
-
class mt {
|
|
1931
|
+
return ((e = t == null ? void 0 : t.fileName) == null ? void 0 : e.trim()) || `path_${Date.now()}`;
|
|
1932
|
+
}, ir = (t, e) => ({ success: !1, message: e, fileName: _t(t) });
|
|
1933
|
+
class ht {
|
|
1993
1934
|
downloadFile(e) {
|
|
1994
|
-
return
|
|
1935
|
+
return o(this, null, function* () {
|
|
1995
1936
|
try {
|
|
1996
|
-
if (window.__MICRO_APP_ENVIRONMENT__) {
|
|
1937
|
+
if (ut && window.__MICRO_APP_ENVIRONMENT__) {
|
|
1997
1938
|
const r = window.rawWindow.__mini_app_hook__.downloadFile;
|
|
1998
|
-
return r ? yield r(e) :
|
|
1939
|
+
return r ? yield r(e) : ir(e, "DownloadFilePlugin is not available");
|
|
1999
1940
|
}
|
|
2000
|
-
return yield
|
|
1941
|
+
return yield ar.downloadFile(e);
|
|
2001
1942
|
} catch (r) {
|
|
2002
|
-
return console.error("downloadFile error", r),
|
|
1943
|
+
return console.error("downloadFile error", r), ir(e, r instanceof Error ? r.message : "download failed");
|
|
2003
1944
|
}
|
|
2004
1945
|
});
|
|
2005
1946
|
}
|
|
2006
1947
|
getStatus() {
|
|
2007
|
-
return
|
|
1948
|
+
return o(this, null, function* () {
|
|
2008
1949
|
try {
|
|
2009
|
-
return yield
|
|
1950
|
+
return yield ar.getStatus();
|
|
2010
1951
|
} catch (e) {
|
|
2011
1952
|
throw console.error("downloadFile getStatus error", e), e;
|
|
2012
1953
|
}
|
|
2013
1954
|
});
|
|
2014
1955
|
}
|
|
2015
1956
|
}
|
|
2016
|
-
class
|
|
1957
|
+
class pt {
|
|
2017
1958
|
constructor() {
|
|
2018
|
-
P(this, "initialContextPlugins", new
|
|
2019
|
-
P(this, "communicatePlugins", new
|
|
2020
|
-
P(this, "cameraScanPlugins", new
|
|
2021
|
-
P(this, "cameraScanMultiplePlugins", new
|
|
2022
|
-
P(this, "cameraScanMultipleNoCountPlugins", new
|
|
2023
|
-
P(this, "cameraScanSingleOrDualPlugins", new
|
|
2024
|
-
P(this, "laserScanPlugins", new
|
|
2025
|
-
P(this, "countAssistPlugins", new
|
|
2026
|
-
P(this, "clickStreamPlugins", new
|
|
2027
|
-
P(this, "lifecyclePlugins", new
|
|
2028
|
-
P(this, "deviceInteractionPlugins", new
|
|
2029
|
-
P(this, "pollingPlugins", new
|
|
2030
|
-
P(this, "paymentPlugins", new
|
|
2031
|
-
P(this, "cameraForTakePhotoPlugin", new
|
|
2032
|
-
P(this, "httpPlugin", new
|
|
2033
|
-
P(this, "printPlugins", new
|
|
2034
|
-
P(this, "downloadFilePlugin", new
|
|
1959
|
+
P(this, "initialContextPlugins", new $r());
|
|
1960
|
+
P(this, "communicatePlugins", new zr());
|
|
1961
|
+
P(this, "cameraScanPlugins", new Gr());
|
|
1962
|
+
P(this, "cameraScanMultiplePlugins", new Jr());
|
|
1963
|
+
P(this, "cameraScanMultipleNoCountPlugins", new Qr());
|
|
1964
|
+
P(this, "cameraScanSingleOrDualPlugins", new Yr());
|
|
1965
|
+
P(this, "laserScanPlugins", new Zr());
|
|
1966
|
+
P(this, "countAssistPlugins", new Xr());
|
|
1967
|
+
P(this, "clickStreamPlugins", new et());
|
|
1968
|
+
P(this, "lifecyclePlugins", new rt());
|
|
1969
|
+
P(this, "deviceInteractionPlugins", new tt());
|
|
1970
|
+
P(this, "pollingPlugins", new ot());
|
|
1971
|
+
P(this, "paymentPlugins", new at());
|
|
1972
|
+
P(this, "cameraForTakePhotoPlugin", new it());
|
|
1973
|
+
P(this, "httpPlugin", new st());
|
|
1974
|
+
P(this, "printPlugins", new dt());
|
|
1975
|
+
P(this, "downloadFilePlugin", new ht());
|
|
2035
1976
|
}
|
|
2036
1977
|
}
|
|
2037
|
-
const
|
|
2038
|
-
let
|
|
2039
|
-
var
|
|
2040
|
-
window.__MICRO_APP_ENVIRONMENT__ && (
|
|
2041
|
-
const
|
|
1978
|
+
const Pt = new pt();
|
|
1979
|
+
let l = null, Ne = null;
|
|
1980
|
+
var Mr, fr;
|
|
1981
|
+
window.__MICRO_APP_ENVIRONMENT__ && (l = (Mr = window.rawWindow.__mini_app_hook__) != null ? Mr : {}, Ne = (fr = window.rawWindow.__mini_app_status_hook__) != null ? fr : {});
|
|
1982
|
+
const mt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: class extends y {
|
|
2042
1983
|
homeIsClick(t) {
|
|
2043
|
-
return
|
|
1984
|
+
return o(this, null, function* () {
|
|
2044
1985
|
var e;
|
|
2045
|
-
window.__MICRO_APP_ENVIRONMENT__ && (console.log("window.microApp.forceDispatch homeIsClick", t), (e =
|
|
1986
|
+
window.__MICRO_APP_ENVIRONMENT__ && (console.log("window.microApp.forceDispatch homeIsClick", t), (e = l.disabledMenu) == null || e.call(l, t));
|
|
2046
1987
|
});
|
|
2047
1988
|
}
|
|
2048
1989
|
openMiniApp(t) {
|
|
2049
|
-
return
|
|
1990
|
+
return o(this, null, function* () {
|
|
2050
1991
|
var e;
|
|
2051
1992
|
try {
|
|
2052
|
-
return window.__MICRO_APP_ENVIRONMENT__ && ((e =
|
|
1993
|
+
return window.__MICRO_APP_ENVIRONMENT__ && ((e = l.openMiniApp) == null || e.call(l, t)), new Promise((r) => {
|
|
2053
1994
|
r(t);
|
|
2054
1995
|
});
|
|
2055
1996
|
} catch (r) {
|
|
@@ -2058,10 +1999,10 @@ const Pt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
|
|
|
2058
1999
|
});
|
|
2059
2000
|
}
|
|
2060
2001
|
showTitle(t) {
|
|
2061
|
-
return
|
|
2002
|
+
return o(this, null, function* () {
|
|
2062
2003
|
var e;
|
|
2063
2004
|
try {
|
|
2064
|
-
return window.__MICRO_APP_ENVIRONMENT__ && (console.log("window.microApp.forceDispatch showTitle", t), (e =
|
|
2005
|
+
return window.__MICRO_APP_ENVIRONMENT__ && (console.log("window.microApp.forceDispatch showTitle", t), (e = l.showTitle) == null || e.call(l, t)), new Promise((r) => {
|
|
2065
2006
|
r(t);
|
|
2066
2007
|
});
|
|
2067
2008
|
} catch (r) {
|
|
@@ -2070,10 +2011,10 @@ const Pt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
|
|
|
2070
2011
|
});
|
|
2071
2012
|
}
|
|
2072
2013
|
showFABMenu(t) {
|
|
2073
|
-
return
|
|
2014
|
+
return o(this, null, function* () {
|
|
2074
2015
|
var e;
|
|
2075
2016
|
try {
|
|
2076
|
-
return window.__MICRO_APP_ENVIRONMENT__ && ((e =
|
|
2017
|
+
return window.__MICRO_APP_ENVIRONMENT__ && ((e = l.showFABMenu) == null || e.call(l, t)), new Promise((r) => {
|
|
2077
2018
|
r(t);
|
|
2078
2019
|
});
|
|
2079
2020
|
} catch (r) {
|
|
@@ -2082,10 +2023,10 @@ const Pt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
|
|
|
2082
2023
|
});
|
|
2083
2024
|
}
|
|
2084
2025
|
disableFAB(t) {
|
|
2085
|
-
return
|
|
2026
|
+
return o(this, null, function* () {
|
|
2086
2027
|
var e;
|
|
2087
2028
|
try {
|
|
2088
|
-
return window.__MICRO_APP_ENVIRONMENT__ && ((e =
|
|
2029
|
+
return window.__MICRO_APP_ENVIRONMENT__ && ((e = l.disableFAB) == null || e.call(l, t)), new Promise((r) => {
|
|
2089
2030
|
r(t);
|
|
2090
2031
|
});
|
|
2091
2032
|
} catch (r) {
|
|
@@ -2094,10 +2035,10 @@ const Pt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
|
|
|
2094
2035
|
});
|
|
2095
2036
|
}
|
|
2096
2037
|
disableBack(t) {
|
|
2097
|
-
return
|
|
2038
|
+
return o(this, null, function* () {
|
|
2098
2039
|
var e;
|
|
2099
2040
|
try {
|
|
2100
|
-
return window.__MICRO_APP_ENVIRONMENT__ && ((e =
|
|
2041
|
+
return window.__MICRO_APP_ENVIRONMENT__ && ((e = l.disableBack) == null || e.call(l, t)), new Promise((r) => {
|
|
2101
2042
|
r(t);
|
|
2102
2043
|
});
|
|
2103
2044
|
} catch (r) {
|
|
@@ -2106,10 +2047,10 @@ const Pt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
|
|
|
2106
2047
|
});
|
|
2107
2048
|
}
|
|
2108
2049
|
showSubMask(t) {
|
|
2109
|
-
return
|
|
2050
|
+
return o(this, null, function* () {
|
|
2110
2051
|
var e;
|
|
2111
2052
|
try {
|
|
2112
|
-
return window.__MICRO_APP_ENVIRONMENT__ && ((e =
|
|
2053
|
+
return window.__MICRO_APP_ENVIRONMENT__ && ((e = l.showSubMask) == null || e.call(l, t)), new Promise((r) => {
|
|
2113
2054
|
r(t);
|
|
2114
2055
|
});
|
|
2115
2056
|
} catch (r) {
|
|
@@ -2118,10 +2059,10 @@ const Pt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
|
|
|
2118
2059
|
});
|
|
2119
2060
|
}
|
|
2120
2061
|
setMiniAppVersion(t) {
|
|
2121
|
-
return
|
|
2062
|
+
return o(this, null, function* () {
|
|
2122
2063
|
var e;
|
|
2123
2064
|
try {
|
|
2124
|
-
return window.__MICRO_APP_ENVIRONMENT__ && ((e =
|
|
2065
|
+
return window.__MICRO_APP_ENVIRONMENT__ && ((e = l.setMiniAppVersion) == null || e.call(l, t)), new Promise((r) => {
|
|
2125
2066
|
r(t);
|
|
2126
2067
|
});
|
|
2127
2068
|
} catch (r) {
|
|
@@ -2130,25 +2071,25 @@ const Pt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
|
|
|
2130
2071
|
});
|
|
2131
2072
|
}
|
|
2132
2073
|
showDialog() {
|
|
2133
|
-
return
|
|
2074
|
+
return o(this, null, function* () {
|
|
2134
2075
|
var t;
|
|
2135
|
-
window.__MICRO_APP_ENVIRONMENT__ && ((t =
|
|
2076
|
+
window.__MICRO_APP_ENVIRONMENT__ && ((t = l.showDialog) == null || t.call(l));
|
|
2136
2077
|
});
|
|
2137
2078
|
}
|
|
2138
2079
|
cancelDialog() {
|
|
2139
|
-
return
|
|
2080
|
+
return o(this, null, function* () {
|
|
2140
2081
|
var t;
|
|
2141
|
-
window.__MICRO_APP_ENVIRONMENT__ && ((t =
|
|
2082
|
+
window.__MICRO_APP_ENVIRONMENT__ && ((t = l.cancelDialog) == null || t.call(l));
|
|
2142
2083
|
});
|
|
2143
2084
|
}
|
|
2144
2085
|
getMiniAppKong(t) {
|
|
2145
|
-
return
|
|
2086
|
+
return o(this, null, function* () {
|
|
2146
2087
|
var e, r;
|
|
2147
2088
|
try {
|
|
2148
2089
|
if (window.__MICRO_APP_ENVIRONMENT__) {
|
|
2149
|
-
const n = (r = (e =
|
|
2150
|
-
return new Promise((
|
|
2151
|
-
|
|
2090
|
+
const n = (r = (e = l.getMiniAppKong) == null ? void 0 : e.call(l, t)) != null ? r : {};
|
|
2091
|
+
return new Promise((a) => {
|
|
2092
|
+
a(n);
|
|
2152
2093
|
});
|
|
2153
2094
|
}
|
|
2154
2095
|
return new Promise((n) => {
|
|
@@ -2160,16 +2101,16 @@ const Pt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
|
|
|
2160
2101
|
});
|
|
2161
2102
|
}
|
|
2162
2103
|
closeMiniApp() {
|
|
2163
|
-
return
|
|
2104
|
+
return o(this, null, function* () {
|
|
2164
2105
|
var t;
|
|
2165
|
-
window.__MICRO_APP_ENVIRONMENT__ && ((t =
|
|
2106
|
+
window.__MICRO_APP_ENVIRONMENT__ && ((t = l.closeMiniApp) == null || t.call(l));
|
|
2166
2107
|
});
|
|
2167
2108
|
}
|
|
2168
2109
|
getStatus() {
|
|
2169
2110
|
try {
|
|
2170
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) =>
|
|
2111
|
+
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
|
|
2171
2112
|
var e, r;
|
|
2172
|
-
t((yield (r = (e =
|
|
2113
|
+
t((yield (r = (e = Ne == null ? void 0 : Ne.communicate) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
|
|
2173
2114
|
})) : new Promise((t) => {
|
|
2174
2115
|
t(null);
|
|
2175
2116
|
});
|
|
@@ -2179,9 +2120,9 @@ const Pt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
|
|
|
2179
2120
|
}
|
|
2180
2121
|
dispatchToShell(t) {
|
|
2181
2122
|
try {
|
|
2182
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((e) =>
|
|
2123
|
+
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((e) => o(this, null, function* () {
|
|
2183
2124
|
var r;
|
|
2184
|
-
e((yield (r =
|
|
2125
|
+
e((yield (r = l == null ? void 0 : l.dispatchToShell) == null ? void 0 : r.call(l, t)) || {});
|
|
2185
2126
|
})) : new Promise((e) => {
|
|
2186
2127
|
e(t);
|
|
2187
2128
|
});
|
|
@@ -2191,9 +2132,9 @@ const Pt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
|
|
|
2191
2132
|
}
|
|
2192
2133
|
getMiniAppInfo(t) {
|
|
2193
2134
|
try {
|
|
2194
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((e) =>
|
|
2135
|
+
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((e) => o(this, null, function* () {
|
|
2195
2136
|
var r;
|
|
2196
|
-
e((yield (r =
|
|
2137
|
+
e((yield (r = l == null ? void 0 : l.getMiniAppInfo) == null ? void 0 : r.call(l, t)) || {});
|
|
2197
2138
|
})) : new Promise((e) => {
|
|
2198
2139
|
e({});
|
|
2199
2140
|
});
|
|
@@ -2203,6 +2144,6 @@ const Pt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
|
|
|
2203
2144
|
}
|
|
2204
2145
|
} }, Symbol.toStringTag, { value: "Module" }));
|
|
2205
2146
|
export {
|
|
2206
|
-
|
|
2207
|
-
|
|
2147
|
+
pt as NativeApi,
|
|
2148
|
+
Pt as default
|
|
2208
2149
|
};
|