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