superapp-miniapp-invoke-native 1.11.4 → 1.12.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 +92 -0
- package/lib/main.js +438 -372
- package/lib/main.umd.cjs +1 -1
- package/package.json +1 -1
package/lib/main.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
/* global globalThis, AndroidInitialContext */
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
3
|
+
var Br = Object.defineProperty, Hr = Object.defineProperties;
|
|
4
|
+
var Ur = Object.getOwnPropertyDescriptors;
|
|
5
|
+
var Ke = Object.getOwnPropertySymbols;
|
|
6
|
+
var Fr = Object.prototype.hasOwnProperty, Wr = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var Ae = (t, e, r) => e in t ? Br(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, k = (t, e) => {
|
|
8
8
|
for (var r in e || (e = {}))
|
|
9
|
-
|
|
10
|
-
if (
|
|
11
|
-
for (var r of
|
|
12
|
-
|
|
9
|
+
Fr.call(e, r) && Ae(t, r, e[r]);
|
|
10
|
+
if (Ke)
|
|
11
|
+
for (var r of Ke(e))
|
|
12
|
+
Wr.call(e, r) && Ae(t, r, e[r]);
|
|
13
13
|
return t;
|
|
14
|
-
},
|
|
15
|
-
var P = (t, e, r) => (
|
|
14
|
+
}, b = (t, e) => Hr(t, Ur(e));
|
|
15
|
+
var P = (t, e, r) => (Ae(t, typeof e != "symbol" ? e + "" : e, r), r);
|
|
16
16
|
var o = (t, e, r) => new Promise((n, a) => {
|
|
17
17
|
var i = (l) => {
|
|
18
18
|
try {
|
|
@@ -30,7 +30,7 @@ var o = (t, e, r) => new Promise((n, a) => {
|
|
|
30
30
|
s((r = r.apply(t, e)).next());
|
|
31
31
|
});
|
|
32
32
|
/*! Capacitor: https://capacitorjs.com/ - MIT License */
|
|
33
|
-
const
|
|
33
|
+
const xr = (t) => t.CapacitorPlatforms = ((e) => {
|
|
34
34
|
const r = /* @__PURE__ */ new Map();
|
|
35
35
|
r.set("web", { name: "web" });
|
|
36
36
|
const n = e.CapacitorPlatforms || { currentPlatform: { name: "web" }, platforms: r };
|
|
@@ -39,92 +39,92 @@ const Hr = (t) => t.CapacitorPlatforms = ((e) => {
|
|
|
39
39
|
}, n.setPlatform = (a) => {
|
|
40
40
|
n.platforms.has(a) && (n.currentPlatform = n.platforms.get(a));
|
|
41
41
|
}, n;
|
|
42
|
-
})(t),
|
|
42
|
+
})(t), ze = xr(typeof globalThis != "undefined" ? globalThis : typeof self != "undefined" ? self : typeof window != "undefined" ? window : typeof global != "undefined" ? global : {});
|
|
43
43
|
var j;
|
|
44
|
-
|
|
44
|
+
ze.addPlatform, ze.setPlatform, function(t) {
|
|
45
45
|
t.Unimplemented = "UNIMPLEMENTED", t.Unavailable = "UNAVAILABLE";
|
|
46
46
|
}(j || (j = {}));
|
|
47
|
-
class
|
|
47
|
+
class ve extends Error {
|
|
48
48
|
constructor(e, r, n) {
|
|
49
49
|
super(e), this.message = e, this.code = r, this.data = n;
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
const
|
|
52
|
+
const Dr = (t) => {
|
|
53
53
|
var e, r, n, a, i;
|
|
54
54
|
const c = t.CapacitorCustomPlatform || null, s = t.Capacitor || {}, l = s.Plugins = s.Plugins || {}, u = t.CapacitorPlatforms, _ = ((e = u == null ? void 0 : u.currentPlatform) === null || e === void 0 ? void 0 : e.getPlatform) || (() => c !== null ? c.name : ((h) => {
|
|
55
55
|
var m, N;
|
|
56
56
|
return h != null && h.androidBridge ? "android" : !((N = (m = h == null ? void 0 : h.webkit) === null || m === void 0 ? void 0 : m.messageHandlers) === null || N === void 0) && N.bridge ? "ios" : "web";
|
|
57
57
|
})(t)), p = ((r = u == null ? void 0 : u.currentPlatform) === null || r === void 0 ? void 0 : r.isNativePlatform) || (() => _() !== "web"), f = ((n = u == null ? void 0 : u.currentPlatform) === null || n === void 0 ? void 0 : n.isPluginAvailable) || ((h) => {
|
|
58
58
|
const m = I.get(h);
|
|
59
|
-
return !!(m != null && m.platforms.has(_())) || !!
|
|
60
|
-
}),
|
|
59
|
+
return !!(m != null && m.platforms.has(_())) || !!v(h);
|
|
60
|
+
}), v = ((a = u == null ? void 0 : u.currentPlatform) === null || a === void 0 ? void 0 : a.getPluginHeader) || ((h) => {
|
|
61
61
|
var m;
|
|
62
62
|
return (m = s.PluginHeaders) === null || m === void 0 ? void 0 : m.find((N) => N.name === h);
|
|
63
|
-
}), I = /* @__PURE__ */ new Map(),
|
|
63
|
+
}), I = /* @__PURE__ */ new Map(), O = ((i = u == null ? void 0 : u.currentPlatform) === null || i === void 0 ? void 0 : i.registerPlugin) || ((h, m = {}) => {
|
|
64
64
|
const N = I.get(h);
|
|
65
65
|
if (N)
|
|
66
66
|
return console.warn(`Capacitor plugin "${h}" already registered. Cannot register plugins twice.`), N.proxy;
|
|
67
|
-
const
|
|
68
|
-
let
|
|
69
|
-
const
|
|
70
|
-
let
|
|
71
|
-
const D = (...
|
|
67
|
+
const C = _(), $ = v(h);
|
|
68
|
+
let T;
|
|
69
|
+
const fe = (E) => {
|
|
70
|
+
let L;
|
|
71
|
+
const D = (...Z) => {
|
|
72
72
|
const q = (() => o(void 0, null, function* () {
|
|
73
|
-
return !
|
|
73
|
+
return !T && C in m ? T = T = typeof m[C] == "function" ? yield m[C]() : m[C] : c !== null && !T && "web" in m && (T = T = typeof m.web == "function" ? yield m.web() : m.web), T;
|
|
74
74
|
}))().then((K) => {
|
|
75
|
-
const
|
|
76
|
-
var
|
|
75
|
+
const $e = ((A, z) => {
|
|
76
|
+
var Oe, Ce;
|
|
77
77
|
if (!$) {
|
|
78
78
|
if (A)
|
|
79
79
|
return (Ce = A[z]) === null || Ce === void 0 ? void 0 : Ce.bind(A);
|
|
80
|
-
throw new
|
|
80
|
+
throw new ve(`"${h}" plugin is not implemented on ${C}`, j.Unimplemented);
|
|
81
81
|
}
|
|
82
82
|
{
|
|
83
|
-
const
|
|
84
|
-
if (
|
|
85
|
-
return
|
|
83
|
+
const qe = $ == null ? void 0 : $.methods.find((G) => z === G.name);
|
|
84
|
+
if (qe)
|
|
85
|
+
return qe.rtype === "promise" ? (G) => s.nativePromise(h, z.toString(), G) : (G, Vr) => s.nativeCallback(h, z.toString(), G, Vr);
|
|
86
86
|
if (A)
|
|
87
|
-
return (
|
|
87
|
+
return (Oe = A[z]) === null || Oe === void 0 ? void 0 : Oe.bind(A);
|
|
88
88
|
}
|
|
89
|
-
})(K,
|
|
90
|
-
if (
|
|
91
|
-
const A =
|
|
92
|
-
return
|
|
89
|
+
})(K, E);
|
|
90
|
+
if ($e) {
|
|
91
|
+
const A = $e(...Z);
|
|
92
|
+
return L = A == null ? void 0 : A.remove, A;
|
|
93
93
|
}
|
|
94
|
-
throw new
|
|
94
|
+
throw new ve(`"${h}.${E}()" is not implemented on ${C}`, j.Unimplemented);
|
|
95
95
|
});
|
|
96
|
-
return
|
|
97
|
-
return
|
|
96
|
+
return E === "addListener" && (q.remove = () => o(void 0, null, function* () {
|
|
97
|
+
return L();
|
|
98
98
|
})), q;
|
|
99
99
|
};
|
|
100
|
-
return D.toString = () => `${
|
|
101
|
-
},
|
|
102
|
-
const D =
|
|
100
|
+
return D.toString = () => `${E.toString()}() { [capacitor code] }`, Object.defineProperty(D, "name", { value: E, writable: !1, configurable: !1 }), D;
|
|
101
|
+
}, De = fe("addListener"), je = fe("removeListener"), Tr = (E, L) => {
|
|
102
|
+
const D = De({ eventName: E }, L), Z = () => o(void 0, null, function* () {
|
|
103
103
|
const K = yield D;
|
|
104
|
-
|
|
105
|
-
}), q = new Promise((K) => D.then(() => K({ remove:
|
|
104
|
+
je({ eventName: E, callbackId: K }, L);
|
|
105
|
+
}), q = new Promise((K) => D.then(() => K({ remove: Z })));
|
|
106
106
|
return q.remove = () => o(void 0, null, function* () {
|
|
107
|
-
console.warn("Using addListener() without 'await' is deprecated."), yield
|
|
107
|
+
console.warn("Using addListener() without 'await' is deprecated."), yield Z();
|
|
108
108
|
}), q;
|
|
109
|
-
},
|
|
110
|
-
switch (
|
|
109
|
+
}, Ie = new Proxy({}, { get(E, L) {
|
|
110
|
+
switch (L) {
|
|
111
111
|
case "$$typeof":
|
|
112
112
|
return;
|
|
113
113
|
case "toJSON":
|
|
114
114
|
return () => ({});
|
|
115
115
|
case "addListener":
|
|
116
|
-
return $ ?
|
|
116
|
+
return $ ? Tr : De;
|
|
117
117
|
case "removeListener":
|
|
118
|
-
return
|
|
118
|
+
return je;
|
|
119
119
|
default:
|
|
120
|
-
return
|
|
120
|
+
return fe(L);
|
|
121
121
|
}
|
|
122
122
|
} });
|
|
123
|
-
return l[h] =
|
|
123
|
+
return l[h] = Ie, I.set(h, { name: h, proxy: Ie, platforms: /* @__PURE__ */ new Set([...Object.keys(m), ...$ ? [C] : []]) }), Ie;
|
|
124
124
|
});
|
|
125
|
-
return s.convertFileSrc || (s.convertFileSrc = (h) => h), s.getPlatform = _, s.handleError = (h) => t.console.error(h), s.isNativePlatform = p, s.isPluginAvailable = f, s.pluginMethodNoop = (h, m, N) => Promise.reject(`${N} does not have an implementation of "${m}".`), s.registerPlugin =
|
|
126
|
-
},
|
|
127
|
-
|
|
125
|
+
return s.convertFileSrc || (s.convertFileSrc = (h) => h), s.getPlatform = _, s.handleError = (h) => t.console.error(h), s.isNativePlatform = p, s.isPluginAvailable = f, s.pluginMethodNoop = (h, m, N) => Promise.reject(`${N} does not have an implementation of "${m}".`), s.registerPlugin = O, s.Exception = ve, s.DEBUG = !!s.DEBUG, s.isLoggingEnabled = !!s.isLoggingEnabled, s.platform = s.getPlatform(), s.isNative = s.isNativePlatform(), s;
|
|
126
|
+
}, jr = (t) => t.Capacitor = Dr(t), w = jr(typeof globalThis != "undefined" ? globalThis : typeof self != "undefined" ? self : typeof window != "undefined" ? window : typeof global != "undefined" ? global : {}), Fe = w.registerPlugin;
|
|
127
|
+
w.Plugins;
|
|
128
128
|
class y {
|
|
129
129
|
constructor(e) {
|
|
130
130
|
this.listeners = {}, this.windowListeners = {}, e && (console.warn(`Capacitor WebPlugin "${e.name}" config object was deprecated in v3 and will be removed in v4.`), this.config = e);
|
|
@@ -161,10 +161,10 @@ class y {
|
|
|
161
161
|
} };
|
|
162
162
|
}
|
|
163
163
|
unimplemented(e = "not implemented") {
|
|
164
|
-
return new
|
|
164
|
+
return new w.Exception(e, j.Unimplemented);
|
|
165
165
|
}
|
|
166
166
|
unavailable(e = "not available") {
|
|
167
|
-
return new
|
|
167
|
+
return new w.Exception(e, j.Unavailable);
|
|
168
168
|
}
|
|
169
169
|
removeListener(e, r) {
|
|
170
170
|
return o(this, null, function* () {
|
|
@@ -182,8 +182,8 @@ class y {
|
|
|
182
182
|
e && (window.removeEventListener(e.windowEventName, e.handler), e.registered = !1);
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
|
-
const
|
|
186
|
-
class
|
|
185
|
+
const Ge = (t) => encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape), Je = (t) => t.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
186
|
+
class $r extends y {
|
|
187
187
|
getCookies() {
|
|
188
188
|
return o(this, null, function* () {
|
|
189
189
|
const e = document.cookie, r = {};
|
|
@@ -191,14 +191,14 @@ class Wr extends y {
|
|
|
191
191
|
if (n.length <= 0)
|
|
192
192
|
return;
|
|
193
193
|
let [a, i] = n.replace(/=/, "CAP_COOKIE").split("CAP_COOKIE");
|
|
194
|
-
a =
|
|
194
|
+
a = Je(a).trim(), i = Je(i).trim(), r[a] = i;
|
|
195
195
|
}), r;
|
|
196
196
|
});
|
|
197
197
|
}
|
|
198
198
|
setCookie(e) {
|
|
199
199
|
return o(this, null, function* () {
|
|
200
200
|
try {
|
|
201
|
-
const r =
|
|
201
|
+
const r = Ge(e.key), n = Ge(e.value), a = `; expires=${(e.expires || "").replace("expires=", "")}`, i = (e.path || "/").replace("path=", ""), c = e.url != null && e.url.length > 0 ? `domain=${e.url}` : "";
|
|
202
202
|
document.cookie = `${r}=${n || ""}${a}; path=${i}; ${c};`;
|
|
203
203
|
} catch (r) {
|
|
204
204
|
return Promise.reject(r);
|
|
@@ -235,8 +235,8 @@ class Wr extends y {
|
|
|
235
235
|
});
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
|
-
Fe("CapacitorCookies", { web: () => new
|
|
239
|
-
const
|
|
238
|
+
Fe("CapacitorCookies", { web: () => new $r() });
|
|
239
|
+
const qr = (t, e = {}) => {
|
|
240
240
|
const r = Object.assign({ method: t.method || "GET", headers: t.headers }, e), n = ((a = {}) => {
|
|
241
241
|
const i = Object.keys(a);
|
|
242
242
|
return Object.keys(a).map((c) => c.toLocaleLowerCase()).reduce((c, s, l) => (c[s] = a[i[l]], c), {});
|
|
@@ -264,27 +264,27 @@ const xr = (t, e = {}) => {
|
|
|
264
264
|
(n.includes("application/json") || typeof t.data == "object") && (r.body = JSON.stringify(t.data));
|
|
265
265
|
return r;
|
|
266
266
|
};
|
|
267
|
-
class
|
|
267
|
+
class Kr extends y {
|
|
268
268
|
request(e) {
|
|
269
269
|
return o(this, null, function* () {
|
|
270
|
-
const r =
|
|
271
|
-
const [
|
|
270
|
+
const r = qr(e, e.webFetchExtra), n = ((p, f = !0) => p ? Object.entries(p).reduce((v, I) => {
|
|
271
|
+
const [O, h] = I;
|
|
272
272
|
let m, N;
|
|
273
|
-
return Array.isArray(h) ? (N = "", h.forEach((
|
|
274
|
-
m = f ? encodeURIComponent(
|
|
275
|
-
}), N.slice(0, -1)) : (m = f ? encodeURIComponent(h) : h, N = `${
|
|
273
|
+
return Array.isArray(h) ? (N = "", h.forEach((C) => {
|
|
274
|
+
m = f ? encodeURIComponent(C) : C, N += `${O}=${m}&`;
|
|
275
|
+
}), N.slice(0, -1)) : (m = f ? encodeURIComponent(h) : h, N = `${O}=${m}`), `${v}&${N}`;
|
|
276
276
|
}, "").substr(1) : null)(e.params, e.shouldEncodeUrlParams), a = n ? `${e.url}?${n}` : e.url, i = yield fetch(a, r), c = i.headers.get("content-type") || "";
|
|
277
277
|
let s, l, { responseType: u = "text" } = i.ok ? e : {};
|
|
278
278
|
switch (c.includes("application/json") && (u = "json"), u) {
|
|
279
279
|
case "arraybuffer":
|
|
280
280
|
case "blob":
|
|
281
281
|
l = yield i.blob(), s = yield ((p) => o(this, null, function* () {
|
|
282
|
-
return new Promise((f,
|
|
282
|
+
return new Promise((f, v) => {
|
|
283
283
|
const I = new FileReader();
|
|
284
284
|
I.onload = () => {
|
|
285
|
-
const
|
|
286
|
-
f(
|
|
287
|
-
}, I.onerror = (
|
|
285
|
+
const O = I.result;
|
|
286
|
+
f(O.indexOf(",") >= 0 ? O.split(",")[1] : O);
|
|
287
|
+
}, I.onerror = (O) => v(O), I.readAsDataURL(p);
|
|
288
288
|
});
|
|
289
289
|
}))(l);
|
|
290
290
|
break;
|
|
@@ -326,25 +326,25 @@ class Dr extends y {
|
|
|
326
326
|
});
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
|
-
function
|
|
330
|
-
return
|
|
329
|
+
function Ee() {
|
|
330
|
+
return w.getPlatform() === "android" ? JSON.parse(AndroidInitialContext.initialContext()) : window.portalInitialContext;
|
|
331
331
|
}
|
|
332
|
-
Fe("CapacitorHttp", { web: () => new
|
|
332
|
+
Fe("CapacitorHttp", { web: () => new Kr() }), /*! Ionic Portals: https://ionic.io/portals - Commercial License */
|
|
333
333
|
Fe("Portals", { web: () => Promise.resolve().then(function() {
|
|
334
|
-
return
|
|
334
|
+
return zr;
|
|
335
335
|
}).then((t) => new t.PortalsWeb()) });
|
|
336
|
-
const
|
|
336
|
+
const zr = Object.freeze({ __proto__: null, PortalsWeb: class extends y {
|
|
337
337
|
publishNative(t) {
|
|
338
338
|
return o(this, null, function* () {
|
|
339
339
|
});
|
|
340
340
|
}
|
|
341
|
-
} }),
|
|
341
|
+
} }), re = (t) => {
|
|
342
342
|
var e, r, n;
|
|
343
343
|
try {
|
|
344
344
|
if (typeof window == "undefined")
|
|
345
345
|
return;
|
|
346
|
-
if (
|
|
347
|
-
const a = (n = (r =
|
|
346
|
+
if (Ee && ((e = Ee()) != null && e.value)) {
|
|
347
|
+
const a = (n = (r = Ee()) == null ? void 0 : r.value) != null ? n : null;
|
|
348
348
|
if (!a)
|
|
349
349
|
return void console.error("native initialContext is undefine");
|
|
350
350
|
if (!t)
|
|
@@ -355,7 +355,7 @@ const jr = Object.freeze({ __proto__: null, PortalsWeb: class extends y {
|
|
|
355
355
|
throw console.error("getInitialContextHandle error", a), a;
|
|
356
356
|
}
|
|
357
357
|
};
|
|
358
|
-
class
|
|
358
|
+
class Gr {
|
|
359
359
|
isNative() {
|
|
360
360
|
try {
|
|
361
361
|
return (() => {
|
|
@@ -364,7 +364,7 @@ class $r {
|
|
|
364
364
|
return window.rawWindow.__mini_app_hook__.isNative();
|
|
365
365
|
{
|
|
366
366
|
let e = !1;
|
|
367
|
-
return
|
|
367
|
+
return re((r) => {
|
|
368
368
|
e = !!(r != null && r.isNative);
|
|
369
369
|
}), e;
|
|
370
370
|
}
|
|
@@ -384,7 +384,7 @@ class $r {
|
|
|
384
384
|
return e.callBack(r);
|
|
385
385
|
} else
|
|
386
386
|
(({ callBack: r }) => {
|
|
387
|
-
|
|
387
|
+
re((n) => {
|
|
388
388
|
var a;
|
|
389
389
|
try {
|
|
390
390
|
if (!(n != null && n.params))
|
|
@@ -410,7 +410,7 @@ class $r {
|
|
|
410
410
|
return this.isNative() ? window.__MICRO_APP_ENVIRONMENT__ ? (r = window.rawWindow.__mini_app_hook__.getNativeInfo(e)) != null ? r : {} : (() => {
|
|
411
411
|
try {
|
|
412
412
|
let n = null;
|
|
413
|
-
return
|
|
413
|
+
return re((a) => {
|
|
414
414
|
n = a != null ? a : null;
|
|
415
415
|
}), n;
|
|
416
416
|
} catch (n) {
|
|
@@ -437,27 +437,27 @@ const M = () => {
|
|
|
437
437
|
} catch (t) {
|
|
438
438
|
throw console.error("isWinHandle error", t), t;
|
|
439
439
|
}
|
|
440
|
-
},
|
|
441
|
-
|
|
442
|
-
const
|
|
440
|
+
}, R = "CommunicatePlugin", g = w.registerPlugin(R, { web: () => Promise.resolve().then(() => Mt).then((t) => new t.PluginsWeb()) }), te = M();
|
|
441
|
+
te.removeAddListenerFab = () => null;
|
|
442
|
+
const Jr = (t, e) => {
|
|
443
443
|
var r, n;
|
|
444
444
|
try {
|
|
445
|
-
|
|
445
|
+
te.removeAddListenerFab && te.removeAddListenerFab();
|
|
446
446
|
const a = [];
|
|
447
447
|
if ((r = g.showFABMenu) == null || r.call(g, { fabMenu: a, position: null }), !t || !((n = Object.keys(t)) != null && n.length))
|
|
448
448
|
return;
|
|
449
449
|
Object.keys(t).forEach((i) => {
|
|
450
|
-
var c, s, l, u, _, p, f,
|
|
451
|
-
a.push({ disable: (s = (c = t == null ? void 0 : t[i]) == null ? void 0 : c.disable) != null ? s : !1, icon: (u = (l = t == null ? void 0 : t[i]) == null ? void 0 : l.icon) != null ? u : "", id: (p = (_ = t == null ? void 0 : t[i]) == null ? void 0 : _.id) != null ? p : "", name: (
|
|
450
|
+
var c, s, l, u, _, p, f, v;
|
|
451
|
+
a.push({ disable: (s = (c = t == null ? void 0 : t[i]) == null ? void 0 : c.disable) != null ? s : !1, icon: (u = (l = t == null ? void 0 : t[i]) == null ? void 0 : l.icon) != null ? u : "", id: (p = (_ = t == null ? void 0 : t[i]) == null ? void 0 : _.id) != null ? p : "", name: (v = (f = t == null ? void 0 : t[i]) == null ? void 0 : f.title) != null ? v : "" });
|
|
452
452
|
}), queueMicrotask(() => {
|
|
453
453
|
var i;
|
|
454
454
|
(i = g.showFABMenu) == null || i.call(g, { fabMenu: a, position: e != null ? e : null });
|
|
455
455
|
}), setTimeout(() => {
|
|
456
456
|
((i) => o(void 0, null, function* () {
|
|
457
|
-
i && (
|
|
457
|
+
i && (te.removeAddListenerFab = yield ((c) => o(void 0, null, function* () {
|
|
458
458
|
try {
|
|
459
|
-
if (
|
|
460
|
-
const s = yield
|
|
459
|
+
if (w.addListener) {
|
|
460
|
+
const s = yield w.addListener(R, "nativeSendFab", (l) => c && c(l));
|
|
461
461
|
return s != null && s.remove ? s.remove : () => null;
|
|
462
462
|
}
|
|
463
463
|
} catch (s) {
|
|
@@ -475,14 +475,14 @@ const qr = (t, e) => {
|
|
|
475
475
|
} catch (a) {
|
|
476
476
|
throw console.error("fabBtnHandle error", a), a;
|
|
477
477
|
}
|
|
478
|
-
},
|
|
479
|
-
|
|
480
|
-
const
|
|
478
|
+
}, V = M();
|
|
479
|
+
V.addListenerBackRemoveHandle = () => null;
|
|
480
|
+
const Qe = (t = () => null) => o(void 0, null, function* () {
|
|
481
481
|
try {
|
|
482
|
-
|
|
482
|
+
V != null && V.addListenerBackRemoveHandle && typeof V.addListenerBackRemoveHandle == "function" && V.addListenerBackRemoveHandle(), V.addListenerBackRemoveHandle = yield ((e) => o(void 0, null, function* () {
|
|
483
483
|
try {
|
|
484
|
-
if (
|
|
485
|
-
const r = yield
|
|
484
|
+
if (w.addListener) {
|
|
485
|
+
const r = yield w.addListener(R, "nativeSendBack", (n) => e && e(n));
|
|
486
486
|
return r != null && r.remove ? r.remove : () => null;
|
|
487
487
|
}
|
|
488
488
|
} catch (r) {
|
|
@@ -492,16 +492,16 @@ const ze = (t = () => null) => o(void 0, null, function* () {
|
|
|
492
492
|
} catch (e) {
|
|
493
493
|
throw console.error("initBackBtnFn error", e), e;
|
|
494
494
|
}
|
|
495
|
-
}),
|
|
496
|
-
|
|
497
|
-
const
|
|
495
|
+
}), ne = M();
|
|
496
|
+
ne.addListenerHomeHandle = () => null;
|
|
497
|
+
const Qr = (t) => {
|
|
498
498
|
try {
|
|
499
|
-
|
|
499
|
+
ne.addListenerHomeHandle && ne.addListenerHomeHandle(), setTimeout(() => {
|
|
500
500
|
((e) => o(void 0, null, function* () {
|
|
501
|
-
e && (
|
|
501
|
+
e && (ne.addListenerHomeHandle = yield ((r) => o(void 0, null, function* () {
|
|
502
502
|
try {
|
|
503
|
-
if (
|
|
504
|
-
const n = yield
|
|
503
|
+
if (w.addListener) {
|
|
504
|
+
const n = yield w.addListener(R, "nativeSendHome", (a) => r && r(a));
|
|
505
505
|
return n != null && n.remove ? n.remove : () => null;
|
|
506
506
|
}
|
|
507
507
|
} catch (n) {
|
|
@@ -513,14 +513,14 @@ const Kr = (t) => {
|
|
|
513
513
|
} catch (e) {
|
|
514
514
|
throw console.error("homeFn error", e), e;
|
|
515
515
|
}
|
|
516
|
-
},
|
|
517
|
-
|
|
518
|
-
const
|
|
516
|
+
}, B = M();
|
|
517
|
+
B.addListenerTouchRemoveHandle = () => null;
|
|
518
|
+
const Ye = (t = () => null) => o(void 0, null, function* () {
|
|
519
519
|
try {
|
|
520
|
-
|
|
520
|
+
B != null && B.addListenerTouchRemoveHandle && typeof B.addListenerTouchRemoveHandle == "function" && B.addListenerTouchRemoveHandle(), B.addListenerTouchRemoveHandle = yield ((e) => o(void 0, null, function* () {
|
|
521
521
|
try {
|
|
522
|
-
if (
|
|
523
|
-
const r = yield
|
|
522
|
+
if (w.addListener) {
|
|
523
|
+
const r = yield w.addListener(R, "nativeTouchListener", (n) => e && e(n));
|
|
524
524
|
return r != null && r.remove ? r.remove : () => null;
|
|
525
525
|
}
|
|
526
526
|
} catch (r) {
|
|
@@ -532,14 +532,14 @@ const Ge = (t = () => null) => o(void 0, null, function* () {
|
|
|
532
532
|
}
|
|
533
533
|
}), H = M();
|
|
534
534
|
H.addListenerSendDeepLinkRemoveHandle = () => null;
|
|
535
|
-
const
|
|
535
|
+
const Ze = (t = () => null) => o(void 0, null, function* () {
|
|
536
536
|
try {
|
|
537
537
|
H != null && H.addListenerSendDeepLinkRemoveHandle && typeof H.addListenerSendDeepLinkRemoveHandle == "function" && H.addListenerSendDeepLinkRemoveHandle(), H.addListenerSendDeepLinkRemoveHandle = yield ((e) => o(void 0, null, function* () {
|
|
538
538
|
try {
|
|
539
539
|
if (window.__MICRO_APP_ENVIRONMENT__)
|
|
540
540
|
return e && window.rawWindow.__mini_app_hook__.getDeeplinkParams(e), { remove: () => null };
|
|
541
|
-
if (
|
|
542
|
-
const r = yield
|
|
541
|
+
if (w.addListener) {
|
|
542
|
+
const r = yield w.addListener(R, "nativeSendDeeplinkCallbackListener", (n) => e && e(n));
|
|
543
543
|
return r != null && r.remove ? r.remove : () => null;
|
|
544
544
|
}
|
|
545
545
|
} catch (r) {
|
|
@@ -549,14 +549,14 @@ const Je = (t = () => null) => o(void 0, null, function* () {
|
|
|
549
549
|
} catch (e) {
|
|
550
550
|
throw console.error("initTouchFn error", e), e;
|
|
551
551
|
}
|
|
552
|
-
}),
|
|
553
|
-
|
|
554
|
-
const
|
|
552
|
+
}), U = M();
|
|
553
|
+
U.addListenerSwitchLanguageRemoveHandle = () => null;
|
|
554
|
+
const Xe = (t = () => null) => o(void 0, null, function* () {
|
|
555
555
|
try {
|
|
556
|
-
|
|
556
|
+
U != null && U.addListenerSwitchLanguageRemoveHandle && typeof U.addListenerSwitchLanguageRemoveHandle == "function" && U.addListenerSwitchLanguageRemoveHandle(), U.addListenerSwitchLanguageRemoveHandle = yield ((e) => o(void 0, null, function* () {
|
|
557
557
|
try {
|
|
558
|
-
if (
|
|
559
|
-
const r = yield
|
|
558
|
+
if (w.addListener) {
|
|
559
|
+
const r = yield w.addListener(R, "nativeSendSwitchLanguage", (n) => e && e(n));
|
|
560
560
|
return r != null && r.remove ? r.remove : () => null;
|
|
561
561
|
}
|
|
562
562
|
if (window.__MICRO_APP_ENVIRONMENT__)
|
|
@@ -570,14 +570,14 @@ const Qe = (t = () => null) => o(void 0, null, function* () {
|
|
|
570
570
|
} catch (e) {
|
|
571
571
|
throw console.error("initSwitchLanguageFn error", e), e;
|
|
572
572
|
}
|
|
573
|
-
}),
|
|
574
|
-
|
|
575
|
-
const
|
|
573
|
+
}), F = M();
|
|
574
|
+
F.addListenerSetupMiniAppRemoveHandle = () => null;
|
|
575
|
+
const er = (t = () => null) => o(void 0, null, function* () {
|
|
576
576
|
try {
|
|
577
|
-
|
|
577
|
+
F != null && F.addListenerSetupMiniAppRemoveHandle && typeof F.addListenerSetupMiniAppRemoveHandle == "function" && F.addListenerSetupMiniAppRemoveHandle(), F.addListenerSetupMiniAppRemoveHandle = yield ((e) => o(void 0, null, function* () {
|
|
578
578
|
try {
|
|
579
|
-
if (
|
|
580
|
-
const r = yield
|
|
579
|
+
if (w.addListener) {
|
|
580
|
+
const r = yield w.addListener(R, "nativeSetupMiniApp", (n) => e && e(n));
|
|
581
581
|
return r != null && r.remove ? r.remove : () => null;
|
|
582
582
|
}
|
|
583
583
|
} catch (r) {
|
|
@@ -589,12 +589,12 @@ const Ye = (t = () => null) => o(void 0, null, function* () {
|
|
|
589
589
|
}
|
|
590
590
|
}), W = M();
|
|
591
591
|
W.addListenerSwitchStoreRemoveHandle = () => null;
|
|
592
|
-
const
|
|
592
|
+
const rr = (t = () => null) => o(void 0, null, function* () {
|
|
593
593
|
try {
|
|
594
594
|
W != null && W.addListenerSwitchStoreRemoveHandle && typeof W.addListenerSwitchStoreRemoveHandle == "function" && W.addListenerSwitchStoreRemoveHandle(), W.addListenerSwitchStoreRemoveHandle = yield ((e) => o(void 0, null, function* () {
|
|
595
595
|
try {
|
|
596
|
-
if (
|
|
597
|
-
const r = yield
|
|
596
|
+
if (w.addListener) {
|
|
597
|
+
const r = yield w.addListener(R, "nativeSendSwitchStore", (n) => e && e(n));
|
|
598
598
|
return r != null && r.remove ? r.remove : () => null;
|
|
599
599
|
}
|
|
600
600
|
if (window.__MICRO_APP_ENVIRONMENT__)
|
|
@@ -609,7 +609,7 @@ const Ze = (t = () => null) => o(void 0, null, function* () {
|
|
|
609
609
|
throw console.error("initSwitchStoreFn error", e), e;
|
|
610
610
|
}
|
|
611
611
|
});
|
|
612
|
-
class
|
|
612
|
+
class Yr {
|
|
613
613
|
constructor() {
|
|
614
614
|
this.homeBtnSwitch({ isClick: !0 });
|
|
615
615
|
}
|
|
@@ -629,9 +629,9 @@ class zr {
|
|
|
629
629
|
try {
|
|
630
630
|
const { mounted: n, beforeUnmount: a, callBack: i } = r;
|
|
631
631
|
n(() => {
|
|
632
|
-
|
|
632
|
+
Qe(i);
|
|
633
633
|
}), a(() => {
|
|
634
|
-
|
|
634
|
+
Qe();
|
|
635
635
|
});
|
|
636
636
|
} catch (n) {
|
|
637
637
|
throw console.error("backBtnHandle error", n), n;
|
|
@@ -643,14 +643,14 @@ class zr {
|
|
|
643
643
|
}
|
|
644
644
|
setHomeBtn(e) {
|
|
645
645
|
try {
|
|
646
|
-
window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.setHomeBtn = e :
|
|
646
|
+
window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.setHomeBtn = e : Qr(e);
|
|
647
647
|
} catch (r) {
|
|
648
648
|
throw console.error("setHomeBtn error", r), r;
|
|
649
649
|
}
|
|
650
650
|
}
|
|
651
651
|
setFabBtn(e, r) {
|
|
652
652
|
try {
|
|
653
|
-
window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.setFabBtn(e, r) :
|
|
653
|
+
window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.setFabBtn(e, r) : Jr(e, r);
|
|
654
654
|
} catch (n) {
|
|
655
655
|
throw console.error("setFabBtn error", n), n;
|
|
656
656
|
}
|
|
@@ -661,9 +661,9 @@ class zr {
|
|
|
661
661
|
try {
|
|
662
662
|
const { mounted: n, beforeUnmount: a, callBack: i } = r;
|
|
663
663
|
n(() => {
|
|
664
|
-
|
|
664
|
+
Ye(i);
|
|
665
665
|
}), a(() => {
|
|
666
|
-
|
|
666
|
+
Ye();
|
|
667
667
|
});
|
|
668
668
|
} catch (n) {
|
|
669
669
|
throw console.error("touchListenerHandle error", n), n;
|
|
@@ -760,9 +760,9 @@ class zr {
|
|
|
760
760
|
try {
|
|
761
761
|
const { mounted: n, beforeUnmount: a, callBack: i } = r;
|
|
762
762
|
n(() => {
|
|
763
|
-
|
|
763
|
+
Ze(i);
|
|
764
764
|
}), a(() => {
|
|
765
|
-
|
|
765
|
+
Ze();
|
|
766
766
|
});
|
|
767
767
|
} catch (n) {
|
|
768
768
|
throw console.error("sendDeepLinkListenerHandle error", n), n;
|
|
@@ -778,9 +778,9 @@ class zr {
|
|
|
778
778
|
try {
|
|
779
779
|
const { mounted: n, beforeUnmount: a, callBack: i } = r;
|
|
780
780
|
n(() => {
|
|
781
|
-
|
|
781
|
+
Xe(i);
|
|
782
782
|
}), a(() => {
|
|
783
|
-
|
|
783
|
+
Xe();
|
|
784
784
|
});
|
|
785
785
|
} catch (n) {
|
|
786
786
|
throw console.error("sendSwitchLanguageHandle error", n), n;
|
|
@@ -796,9 +796,9 @@ class zr {
|
|
|
796
796
|
try {
|
|
797
797
|
const { mounted: n, beforeUnmount: a, callBack: i } = r;
|
|
798
798
|
n(() => {
|
|
799
|
-
|
|
799
|
+
er(i);
|
|
800
800
|
}), a(() => {
|
|
801
|
-
|
|
801
|
+
er();
|
|
802
802
|
});
|
|
803
803
|
} catch (n) {
|
|
804
804
|
throw console.error("setupMiniAppHandle error", n), n;
|
|
@@ -814,9 +814,9 @@ class zr {
|
|
|
814
814
|
try {
|
|
815
815
|
const { mounted: n, beforeUnmount: a, callBack: i } = r;
|
|
816
816
|
n(() => {
|
|
817
|
-
|
|
817
|
+
rr(i);
|
|
818
818
|
}), a(() => {
|
|
819
|
-
|
|
819
|
+
rr();
|
|
820
820
|
});
|
|
821
821
|
} catch (n) {
|
|
822
822
|
throw console.error("sendSwitchStoreHandle error", n), n;
|
|
@@ -863,10 +863,10 @@ class zr {
|
|
|
863
863
|
});
|
|
864
864
|
}
|
|
865
865
|
}
|
|
866
|
-
let
|
|
867
|
-
var
|
|
868
|
-
window.__MICRO_APP_ENVIRONMENT__ && (
|
|
869
|
-
const
|
|
866
|
+
let oe = null;
|
|
867
|
+
var dr;
|
|
868
|
+
window.__MICRO_APP_ENVIRONMENT__ && (oe = (dr = window.rawWindow.__mini_app_status_hook__) != null ? dr : {});
|
|
869
|
+
const Re = w.registerPlugin("CameraScanPlugin", { web: new class extends y {
|
|
870
870
|
pickCameraScan(t) {
|
|
871
871
|
return o(this, null, function* () {
|
|
872
872
|
return new Promise((e) => {
|
|
@@ -882,7 +882,7 @@ const Le = d.registerPlugin("CameraScanPlugin", { web: new class extends y {
|
|
|
882
882
|
try {
|
|
883
883
|
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
|
|
884
884
|
var e, r;
|
|
885
|
-
t((yield (r = (e =
|
|
885
|
+
t((yield (r = (e = oe == null ? void 0 : oe.cameraScan) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
|
|
886
886
|
})) : new Promise((t) => {
|
|
887
887
|
t(null);
|
|
888
888
|
});
|
|
@@ -892,11 +892,11 @@ const Le = d.registerPlugin("CameraScanPlugin", { web: new class extends y {
|
|
|
892
892
|
}
|
|
893
893
|
}() });
|
|
894
894
|
window.removeAddListenerCameraScan = () => null;
|
|
895
|
-
class
|
|
895
|
+
class Zr {
|
|
896
896
|
pickCameraScan(e) {
|
|
897
897
|
return o(this, null, function* () {
|
|
898
898
|
try {
|
|
899
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.pickCameraScan(e) : yield
|
|
899
|
+
return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.pickCameraScan(e) : yield Re.pickCameraScan(e);
|
|
900
900
|
} catch (r) {
|
|
901
901
|
throw console.error("pickCameraScan error", r), r;
|
|
902
902
|
}
|
|
@@ -905,7 +905,7 @@ class Gr {
|
|
|
905
905
|
setCameraScanState(e) {
|
|
906
906
|
return o(this, null, function* () {
|
|
907
907
|
try {
|
|
908
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.setCameraScanState(e) : yield
|
|
908
|
+
return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.setCameraScanState(e) : yield Re.setCameraScanState(e);
|
|
909
909
|
} catch (r) {
|
|
910
910
|
throw console.error("setCameraScanState error", r), r;
|
|
911
911
|
}
|
|
@@ -914,17 +914,17 @@ class Gr {
|
|
|
914
914
|
getStatus() {
|
|
915
915
|
return o(this, null, function* () {
|
|
916
916
|
try {
|
|
917
|
-
return yield
|
|
917
|
+
return yield Re.getStatus();
|
|
918
918
|
} catch (e) {
|
|
919
919
|
throw console.error("cameraScanPlugin getStatus error", e), e;
|
|
920
920
|
}
|
|
921
921
|
});
|
|
922
922
|
}
|
|
923
923
|
}
|
|
924
|
-
let
|
|
925
|
-
var
|
|
926
|
-
window.__MICRO_APP_ENVIRONMENT__ && (
|
|
927
|
-
const
|
|
924
|
+
let ae = null;
|
|
925
|
+
var ur;
|
|
926
|
+
window.__MICRO_APP_ENVIRONMENT__ && (ae = (ur = window.rawWindow.__mini_app_status_hook__) != null ? ur : {});
|
|
927
|
+
const Le = w.registerPlugin("CameraScanMultiplePlugin", { web: new class extends y {
|
|
928
928
|
pickCameraScanMultiple() {
|
|
929
929
|
return o(this, null, function* () {
|
|
930
930
|
});
|
|
@@ -937,7 +937,7 @@ const Ee = d.registerPlugin("CameraScanMultiplePlugin", { web: new class extends
|
|
|
937
937
|
try {
|
|
938
938
|
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
|
|
939
939
|
var e, r;
|
|
940
|
-
t((yield (r = (e =
|
|
940
|
+
t((yield (r = (e = ae == null ? void 0 : ae.cameraScanMultiple) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
|
|
941
941
|
})) : new Promise((t) => {
|
|
942
942
|
t(null);
|
|
943
943
|
});
|
|
@@ -946,11 +946,11 @@ const Ee = d.registerPlugin("CameraScanMultiplePlugin", { web: new class extends
|
|
|
946
946
|
}
|
|
947
947
|
}
|
|
948
948
|
}() });
|
|
949
|
-
class
|
|
949
|
+
class Xr {
|
|
950
950
|
pickCameraScanMultiple(e) {
|
|
951
951
|
return o(this, null, function* () {
|
|
952
952
|
try {
|
|
953
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.pickCameraScanMultiple(e) : yield
|
|
953
|
+
return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.pickCameraScanMultiple(e) : yield Le.pickCameraScanMultiple(e);
|
|
954
954
|
} catch (r) {
|
|
955
955
|
throw console.error("pickCameraScanMultiple error", r), r;
|
|
956
956
|
}
|
|
@@ -959,7 +959,7 @@ class Jr {
|
|
|
959
959
|
setCameraScanMultipleState(e) {
|
|
960
960
|
return o(this, null, function* () {
|
|
961
961
|
try {
|
|
962
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.setCameraScanMultipleState(e) : yield
|
|
962
|
+
return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.setCameraScanMultipleState(e) : yield Le.setCameraScanMultipleState(e);
|
|
963
963
|
} catch (r) {
|
|
964
964
|
throw console.error("setCameraScanMultipleState error", r), r;
|
|
965
965
|
}
|
|
@@ -968,17 +968,17 @@ class Jr {
|
|
|
968
968
|
getStatus() {
|
|
969
969
|
return o(this, null, function* () {
|
|
970
970
|
try {
|
|
971
|
-
return yield
|
|
971
|
+
return yield Le.getStatus();
|
|
972
972
|
} catch (e) {
|
|
973
973
|
throw console.error("cameraScanMultiplePlugin getStatus error", e), e;
|
|
974
974
|
}
|
|
975
975
|
});
|
|
976
976
|
}
|
|
977
977
|
}
|
|
978
|
-
let
|
|
979
|
-
var
|
|
980
|
-
window.__MICRO_APP_ENVIRONMENT__ && (
|
|
981
|
-
const
|
|
978
|
+
let ie = null;
|
|
979
|
+
var _r;
|
|
980
|
+
window.__MICRO_APP_ENVIRONMENT__ && (ie = (_r = window.rawWindow.__mini_app_status_hook__) != null ? _r : {});
|
|
981
|
+
const ke = w.registerPlugin("CameraScanMultipleNoCountPlugin", { web: new class extends y {
|
|
982
982
|
pickCameraScanMultipleNoCount() {
|
|
983
983
|
return o(this, null, function* () {
|
|
984
984
|
});
|
|
@@ -991,7 +991,7 @@ const Re = d.registerPlugin("CameraScanMultipleNoCountPlugin", { web: new class
|
|
|
991
991
|
try {
|
|
992
992
|
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
|
|
993
993
|
var e, r;
|
|
994
|
-
t((yield (r = (e =
|
|
994
|
+
t((yield (r = (e = ie == null ? void 0 : ie.cameraScanMultipleNoCount) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
|
|
995
995
|
})) : new Promise((t) => {
|
|
996
996
|
t(null);
|
|
997
997
|
});
|
|
@@ -1000,11 +1000,11 @@ const Re = d.registerPlugin("CameraScanMultipleNoCountPlugin", { web: new class
|
|
|
1000
1000
|
}
|
|
1001
1001
|
}
|
|
1002
1002
|
}() });
|
|
1003
|
-
class
|
|
1003
|
+
class et {
|
|
1004
1004
|
pickCameraScanMultipleNoCount(e) {
|
|
1005
1005
|
return o(this, null, function* () {
|
|
1006
1006
|
try {
|
|
1007
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.pickCameraScanMultipleNoCount(e) : yield
|
|
1007
|
+
return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.pickCameraScanMultipleNoCount(e) : yield ke.pickCameraScanMultipleNoCount(e);
|
|
1008
1008
|
} catch (r) {
|
|
1009
1009
|
throw console.error("pickCameraScanMultipleNoCount error", r), r;
|
|
1010
1010
|
}
|
|
@@ -1013,7 +1013,7 @@ class Qr {
|
|
|
1013
1013
|
setCameraScanMultipleNoCountState(e) {
|
|
1014
1014
|
return o(this, null, function* () {
|
|
1015
1015
|
try {
|
|
1016
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.setCameraScanMultipleNoCountState(e) : yield
|
|
1016
|
+
return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.setCameraScanMultipleNoCountState(e) : yield ke.setCameraScanMultipleNoCountState(e);
|
|
1017
1017
|
} catch (r) {
|
|
1018
1018
|
throw console.error("setCameraScanMultipleNoCountState error", r), r;
|
|
1019
1019
|
}
|
|
@@ -1022,17 +1022,17 @@ class Qr {
|
|
|
1022
1022
|
getStatus() {
|
|
1023
1023
|
return o(this, null, function* () {
|
|
1024
1024
|
try {
|
|
1025
|
-
return yield
|
|
1025
|
+
return yield ke.getStatus();
|
|
1026
1026
|
} catch (e) {
|
|
1027
1027
|
throw console.error("cameraScanMultipleNoCountPlugin getStatus error", e), e;
|
|
1028
1028
|
}
|
|
1029
1029
|
});
|
|
1030
1030
|
}
|
|
1031
1031
|
}
|
|
1032
|
-
let
|
|
1033
|
-
var
|
|
1034
|
-
window.__MICRO_APP_ENVIRONMENT__ && (
|
|
1035
|
-
const
|
|
1032
|
+
let se = null;
|
|
1033
|
+
var hr;
|
|
1034
|
+
window.__MICRO_APP_ENVIRONMENT__ && (se = (hr = window.rawWindow.__mini_app_status_hook__) != null ? hr : {});
|
|
1035
|
+
const be = w.registerPlugin("CameraScanSingleOrDualPlugin", { web: new class extends y {
|
|
1036
1036
|
pickCameraScanSingleOrDual() {
|
|
1037
1037
|
return o(this, null, function* () {
|
|
1038
1038
|
});
|
|
@@ -1045,7 +1045,7 @@ const ke = d.registerPlugin("CameraScanSingleOrDualPlugin", { web: new class ext
|
|
|
1045
1045
|
try {
|
|
1046
1046
|
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
|
|
1047
1047
|
var e, r;
|
|
1048
|
-
t((yield (r = (e =
|
|
1048
|
+
t((yield (r = (e = se == null ? void 0 : se.cameraScanSingleOrDual) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
|
|
1049
1049
|
})) : new Promise((t) => {
|
|
1050
1050
|
t(null);
|
|
1051
1051
|
});
|
|
@@ -1054,11 +1054,11 @@ const ke = d.registerPlugin("CameraScanSingleOrDualPlugin", { web: new class ext
|
|
|
1054
1054
|
}
|
|
1055
1055
|
}
|
|
1056
1056
|
}() });
|
|
1057
|
-
class
|
|
1057
|
+
class rt {
|
|
1058
1058
|
pickCameraScanSingleOrDual(e) {
|
|
1059
1059
|
return o(this, null, function* () {
|
|
1060
1060
|
try {
|
|
1061
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.pickCameraScanSingleOrDual(e) : yield
|
|
1061
|
+
return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.pickCameraScanSingleOrDual(e) : yield be.pickCameraScanSingleOrDual(e);
|
|
1062
1062
|
} catch (r) {
|
|
1063
1063
|
throw console.error("pickCameraScanSingleOrDual error", r), r;
|
|
1064
1064
|
}
|
|
@@ -1067,7 +1067,7 @@ class Yr {
|
|
|
1067
1067
|
setCameraScanSingleOrDualState(e) {
|
|
1068
1068
|
return o(this, null, function* () {
|
|
1069
1069
|
try {
|
|
1070
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? yield window.rawWindow.__mini_app_hook__.setCameraScanSingleOrDualState(e) : yield
|
|
1070
|
+
return window.__MICRO_APP_ENVIRONMENT__ ? yield window.rawWindow.__mini_app_hook__.setCameraScanSingleOrDualState(e) : yield be.setCameraScanSingleOrDualState(e);
|
|
1071
1071
|
} catch (r) {
|
|
1072
1072
|
throw console.error("setCameraScanSingleOrDualState error", r), r;
|
|
1073
1073
|
}
|
|
@@ -1076,18 +1076,18 @@ class Yr {
|
|
|
1076
1076
|
getStatus() {
|
|
1077
1077
|
return o(this, null, function* () {
|
|
1078
1078
|
try {
|
|
1079
|
-
return yield
|
|
1079
|
+
return yield be.getStatus();
|
|
1080
1080
|
} catch (e) {
|
|
1081
1081
|
throw console.error("cameraScanSingleOrDualPlugin getStatus error", e), e;
|
|
1082
1082
|
}
|
|
1083
1083
|
});
|
|
1084
1084
|
}
|
|
1085
1085
|
}
|
|
1086
|
-
const
|
|
1087
|
-
let
|
|
1088
|
-
var
|
|
1089
|
-
window.__MICRO_APP_ENVIRONMENT__ && (
|
|
1090
|
-
const
|
|
1086
|
+
const vr = "LaserScanPlugin";
|
|
1087
|
+
let ce = null;
|
|
1088
|
+
var pr;
|
|
1089
|
+
window.__MICRO_APP_ENVIRONMENT__ && (ce = (pr = window.rawWindow.__mini_app_status_hook__) != null ? pr : {});
|
|
1090
|
+
const X = w.registerPlugin(vr, { web: new class extends y {
|
|
1091
1091
|
pickLaserScan() {
|
|
1092
1092
|
return o(this, null, function* () {
|
|
1093
1093
|
});
|
|
@@ -1104,7 +1104,7 @@ const Z = d.registerPlugin(Ir, { web: new class extends y {
|
|
|
1104
1104
|
try {
|
|
1105
1105
|
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
|
|
1106
1106
|
var e, r;
|
|
1107
|
-
t((yield (r = (e =
|
|
1107
|
+
t((yield (r = (e = ce == null ? void 0 : ce.laserScan) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
|
|
1108
1108
|
})) : new Promise((t) => {
|
|
1109
1109
|
t(null);
|
|
1110
1110
|
});
|
|
@@ -1112,16 +1112,16 @@ const Z = d.registerPlugin(Ir, { web: new class extends y {
|
|
|
1112
1112
|
throw console.error("laserScan getStatus error", t), t;
|
|
1113
1113
|
}
|
|
1114
1114
|
}
|
|
1115
|
-
}() }),
|
|
1116
|
-
|
|
1117
|
-
const
|
|
1115
|
+
}() }), le = M();
|
|
1116
|
+
le.removeAddListenerLaserScan = () => null;
|
|
1117
|
+
const tr = (t = () => null) => {
|
|
1118
1118
|
try {
|
|
1119
|
-
|
|
1119
|
+
le.removeAddListenerLaserScan && le.removeAddListenerLaserScan();
|
|
1120
1120
|
const e = (r) => o(void 0, null, function* () {
|
|
1121
|
-
r && (
|
|
1121
|
+
r && (le.removeAddListenerLaserScan = yield ((n) => o(void 0, null, function* () {
|
|
1122
1122
|
try {
|
|
1123
|
-
if (
|
|
1124
|
-
const a = yield
|
|
1123
|
+
if (w.addListener) {
|
|
1124
|
+
const a = yield w.addListener(vr, "nativeSendLaser", (i) => n && n(i));
|
|
1125
1125
|
return a != null && a.remove ? a.remove : () => null;
|
|
1126
1126
|
}
|
|
1127
1127
|
} catch (a) {
|
|
@@ -1136,14 +1136,14 @@ const Xe = (t = () => null) => {
|
|
|
1136
1136
|
throw console.error("laserScanFn error", e), e;
|
|
1137
1137
|
}
|
|
1138
1138
|
};
|
|
1139
|
-
class
|
|
1139
|
+
class tt {
|
|
1140
1140
|
constructor() {
|
|
1141
1141
|
this.pickLaserScan();
|
|
1142
1142
|
}
|
|
1143
1143
|
pickLaserScan() {
|
|
1144
1144
|
return o(this, null, function* () {
|
|
1145
1145
|
try {
|
|
1146
|
-
return yield
|
|
1146
|
+
return yield X.pickLaserScan({ isContinue: !1 });
|
|
1147
1147
|
} catch (e) {
|
|
1148
1148
|
throw console.error("pickLaserScan error", e), e;
|
|
1149
1149
|
}
|
|
@@ -1152,7 +1152,7 @@ class Zr {
|
|
|
1152
1152
|
unPickLaserScan() {
|
|
1153
1153
|
return o(this, null, function* () {
|
|
1154
1154
|
try {
|
|
1155
|
-
return yield
|
|
1155
|
+
return yield X.unPickLaserScan();
|
|
1156
1156
|
} catch (e) {
|
|
1157
1157
|
throw console.error("unPickLaserScan error", e), e;
|
|
1158
1158
|
}
|
|
@@ -1160,7 +1160,7 @@ class Zr {
|
|
|
1160
1160
|
}
|
|
1161
1161
|
setLaserState(e) {
|
|
1162
1162
|
try {
|
|
1163
|
-
|
|
1163
|
+
X.setLaserState(e);
|
|
1164
1164
|
} catch (r) {
|
|
1165
1165
|
throw console.error("setLaserState error", r), r;
|
|
1166
1166
|
}
|
|
@@ -1170,9 +1170,9 @@ class Zr {
|
|
|
1170
1170
|
try {
|
|
1171
1171
|
const { mounted: n, beforeUnmount: a, callBack: i } = r;
|
|
1172
1172
|
n(() => {
|
|
1173
|
-
|
|
1173
|
+
tr(i);
|
|
1174
1174
|
}), a(() => {
|
|
1175
|
-
|
|
1175
|
+
tr();
|
|
1176
1176
|
});
|
|
1177
1177
|
} catch (n) {
|
|
1178
1178
|
throw console.error("laserScanApiParams error", n), n;
|
|
@@ -1182,18 +1182,18 @@ class Zr {
|
|
|
1182
1182
|
getStatus() {
|
|
1183
1183
|
return o(this, null, function* () {
|
|
1184
1184
|
try {
|
|
1185
|
-
return yield
|
|
1185
|
+
return yield X.getStatus();
|
|
1186
1186
|
} catch (e) {
|
|
1187
1187
|
throw console.error("getStatus error", e), e;
|
|
1188
1188
|
}
|
|
1189
1189
|
});
|
|
1190
1190
|
}
|
|
1191
1191
|
}
|
|
1192
|
-
const
|
|
1193
|
-
let
|
|
1194
|
-
var
|
|
1195
|
-
window.__MICRO_APP_ENVIRONMENT__ && (
|
|
1196
|
-
const
|
|
1192
|
+
const Er = "CountAssistPlugin";
|
|
1193
|
+
let we = null;
|
|
1194
|
+
var mr;
|
|
1195
|
+
window.__MICRO_APP_ENVIRONMENT__ && (we = (mr = window.rawWindow.__mini_app_status_hook__) != null ? mr : {});
|
|
1196
|
+
const ee = w.registerPlugin(Er, { web: new class extends y {
|
|
1197
1197
|
setCountAssistState(t) {
|
|
1198
1198
|
return o(this, null, function* () {
|
|
1199
1199
|
try {
|
|
@@ -1231,7 +1231,7 @@ const X = d.registerPlugin(Cr, { web: new class extends y {
|
|
|
1231
1231
|
try {
|
|
1232
1232
|
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
|
|
1233
1233
|
var e, r;
|
|
1234
|
-
t((yield (r = (e =
|
|
1234
|
+
t((yield (r = (e = we == null ? void 0 : we.countAssist) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
|
|
1235
1235
|
})) : new Promise((t) => {
|
|
1236
1236
|
t(null);
|
|
1237
1237
|
});
|
|
@@ -1241,12 +1241,12 @@ const X = d.registerPlugin(Cr, { web: new class extends y {
|
|
|
1241
1241
|
}
|
|
1242
1242
|
}() }), x = M();
|
|
1243
1243
|
x.addListenerCountAssistRemoveHandle = () => null;
|
|
1244
|
-
const
|
|
1244
|
+
const nr = (t = () => null) => o(void 0, null, function* () {
|
|
1245
1245
|
try {
|
|
1246
1246
|
x != null && x.addListenerCountAssistRemoveHandle && typeof x.addListenerCountAssistRemoveHandle == "function" && x.addListenerCountAssistRemoveHandle(), x.addListenerCountAssistRemoveHandle = yield ((e) => o(void 0, null, function* () {
|
|
1247
1247
|
try {
|
|
1248
|
-
if (
|
|
1249
|
-
const r = yield
|
|
1248
|
+
if (w.addListener) {
|
|
1249
|
+
const r = yield w.addListener(Er, "nativeSendCountAssist", (n) => e && e(n));
|
|
1250
1250
|
return r != null && r.remove ? r.remove : () => null;
|
|
1251
1251
|
}
|
|
1252
1252
|
} catch (r) {
|
|
@@ -1257,17 +1257,17 @@ const er = (t = () => null) => o(void 0, null, function* () {
|
|
|
1257
1257
|
throw console.error("initCountAssistFn error", e), e;
|
|
1258
1258
|
}
|
|
1259
1259
|
});
|
|
1260
|
-
class
|
|
1260
|
+
class nt {
|
|
1261
1261
|
setCountAssistState(e) {
|
|
1262
1262
|
return o(this, null, function* () {
|
|
1263
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? yield window.rawWindow.__mini_app_hook__.setCountAssistState(e) : yield
|
|
1263
|
+
return window.__MICRO_APP_ENVIRONMENT__ ? yield window.rawWindow.__mini_app_hook__.setCountAssistState(e) : yield ee.setCountAssistState(e);
|
|
1264
1264
|
});
|
|
1265
1265
|
}
|
|
1266
1266
|
getCountAssistState(e) {
|
|
1267
1267
|
return ((r) => {
|
|
1268
1268
|
try {
|
|
1269
1269
|
let n = r != null ? r : !1;
|
|
1270
|
-
return
|
|
1270
|
+
return re((a) => {
|
|
1271
1271
|
n = !!(a != null && a.countAssistState);
|
|
1272
1272
|
}), n;
|
|
1273
1273
|
} catch (n) {
|
|
@@ -1280,9 +1280,9 @@ class Xr {
|
|
|
1280
1280
|
try {
|
|
1281
1281
|
const { mounted: n, beforeUnmount: a, callBack: i } = r;
|
|
1282
1282
|
n(() => {
|
|
1283
|
-
|
|
1283
|
+
nr(i);
|
|
1284
1284
|
}), a(() => {
|
|
1285
|
-
|
|
1285
|
+
nr();
|
|
1286
1286
|
});
|
|
1287
1287
|
} catch (n) {
|
|
1288
1288
|
throw console.error("setCountAssistBtnHandle error", n), n;
|
|
@@ -1291,28 +1291,28 @@ class Xr {
|
|
|
1291
1291
|
}
|
|
1292
1292
|
toggleCountAssist(e) {
|
|
1293
1293
|
return o(this, null, function* () {
|
|
1294
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? yield window.rawWindow.__mini_app_hook__.toggleCountAssist(e) : yield
|
|
1294
|
+
return window.__MICRO_APP_ENVIRONMENT__ ? yield window.rawWindow.__mini_app_hook__.toggleCountAssist(e) : yield ee.toggleCountAssist(e);
|
|
1295
1295
|
});
|
|
1296
1296
|
}
|
|
1297
1297
|
getCountAssistToggleState() {
|
|
1298
1298
|
return o(this, null, function* () {
|
|
1299
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? yield window.rawWindow.__mini_app_hook__.getCountAssistToggleState() : yield
|
|
1299
|
+
return window.__MICRO_APP_ENVIRONMENT__ ? yield window.rawWindow.__mini_app_hook__.getCountAssistToggleState() : yield ee.getCountAssistToggleState();
|
|
1300
1300
|
});
|
|
1301
1301
|
}
|
|
1302
1302
|
getStatus() {
|
|
1303
1303
|
return o(this, null, function* () {
|
|
1304
1304
|
try {
|
|
1305
|
-
return yield
|
|
1305
|
+
return yield ee.getStatus();
|
|
1306
1306
|
} catch (e) {
|
|
1307
1307
|
throw console.error("countAssistPlugin getStatus error", e), e;
|
|
1308
1308
|
}
|
|
1309
1309
|
});
|
|
1310
1310
|
}
|
|
1311
1311
|
}
|
|
1312
|
-
let
|
|
1313
|
-
var
|
|
1314
|
-
window.__MICRO_APP_ENVIRONMENT__ && (
|
|
1315
|
-
const
|
|
1312
|
+
let de = null;
|
|
1313
|
+
var gr;
|
|
1314
|
+
window.__MICRO_APP_ENVIRONMENT__ && (de = (gr = window.rawWindow.__mini_app_status_hook__) != null ? gr : {});
|
|
1315
|
+
const Te = w.registerPlugin("ClickStreamPlugin", { web: new class extends y {
|
|
1316
1316
|
init() {
|
|
1317
1317
|
return o(this, null, function* () {
|
|
1318
1318
|
return new Promise((t) => {
|
|
@@ -1336,7 +1336,7 @@ const be = d.registerPlugin("ClickStreamPlugin", { web: new class extends y {
|
|
|
1336
1336
|
try {
|
|
1337
1337
|
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
|
|
1338
1338
|
var e, r;
|
|
1339
|
-
t((yield (r = (e =
|
|
1339
|
+
t((yield (r = (e = de == null ? void 0 : de.clickStream) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
|
|
1340
1340
|
})) : new Promise((t) => {
|
|
1341
1341
|
t(null);
|
|
1342
1342
|
});
|
|
@@ -1345,14 +1345,14 @@ const be = d.registerPlugin("ClickStreamPlugin", { web: new class extends y {
|
|
|
1345
1345
|
}
|
|
1346
1346
|
}
|
|
1347
1347
|
}() });
|
|
1348
|
-
class
|
|
1348
|
+
class ot {
|
|
1349
1349
|
constructor() {
|
|
1350
1350
|
this.init();
|
|
1351
1351
|
}
|
|
1352
1352
|
init() {
|
|
1353
1353
|
return o(this, null, function* () {
|
|
1354
1354
|
try {
|
|
1355
|
-
return yield
|
|
1355
|
+
return yield Te.init();
|
|
1356
1356
|
} catch (e) {
|
|
1357
1357
|
throw console.error("clickStreamPlugin, init error", e), e;
|
|
1358
1358
|
}
|
|
@@ -1361,7 +1361,7 @@ class et {
|
|
|
1361
1361
|
trace(e) {
|
|
1362
1362
|
return o(this, null, function* () {
|
|
1363
1363
|
try {
|
|
1364
|
-
return yield
|
|
1364
|
+
return yield Te.trace(e);
|
|
1365
1365
|
} catch (r) {
|
|
1366
1366
|
throw console.error("clickStreamPlugin, trace error", r), r;
|
|
1367
1367
|
}
|
|
@@ -1370,19 +1370,19 @@ class et {
|
|
|
1370
1370
|
getStatus() {
|
|
1371
1371
|
return o(this, null, function* () {
|
|
1372
1372
|
try {
|
|
1373
|
-
return yield
|
|
1373
|
+
return yield Te.getStatus();
|
|
1374
1374
|
} catch (e) {
|
|
1375
1375
|
throw console.error("clickStreamPlugin getStatus error", e), e;
|
|
1376
1376
|
}
|
|
1377
1377
|
});
|
|
1378
1378
|
}
|
|
1379
1379
|
}
|
|
1380
|
-
const
|
|
1381
|
-
let
|
|
1382
|
-
var
|
|
1383
|
-
window.__MICRO_APP_ENVIRONMENT__ && (
|
|
1380
|
+
const Rr = "MiniAppLifecyclePlugin";
|
|
1381
|
+
let ue = null;
|
|
1382
|
+
var Pr;
|
|
1383
|
+
window.__MICRO_APP_ENVIRONMENT__ && (ue = (Pr = window.rawWindow.__mini_app_status_hook__) != null ? Pr : {});
|
|
1384
1384
|
var J = ((t) => (t.MINI_APP_BEFORE_UNMOUNT_PERMISSION = "mini_app_before_unmount_permission", t.MINI_APP_BEFORE_UNMOUNT_COMPLETION = "mini_app_before_unmount_completion", t))(J || {});
|
|
1385
|
-
const
|
|
1385
|
+
const Ve = w.registerPlugin(Rr, { web: new class extends y {
|
|
1386
1386
|
setNativeUsagePermission() {
|
|
1387
1387
|
return o(this, null, function* () {
|
|
1388
1388
|
});
|
|
@@ -1395,7 +1395,7 @@ const Te = d.registerPlugin(vr, { web: new class extends y {
|
|
|
1395
1395
|
try {
|
|
1396
1396
|
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
|
|
1397
1397
|
var e, r;
|
|
1398
|
-
t((yield (r = (e =
|
|
1398
|
+
t((yield (r = (e = ue == null ? void 0 : ue.lifecycle) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
|
|
1399
1399
|
})) : new Promise((t) => {
|
|
1400
1400
|
t(null);
|
|
1401
1401
|
});
|
|
@@ -1403,16 +1403,16 @@ const Te = d.registerPlugin(vr, { web: new class extends y {
|
|
|
1403
1403
|
throw console.error("lifecycle getStatus error", t), t;
|
|
1404
1404
|
}
|
|
1405
1405
|
}
|
|
1406
|
-
}() }),
|
|
1407
|
-
|
|
1408
|
-
const
|
|
1406
|
+
}() }), _e = M();
|
|
1407
|
+
_e.removeAddListenerLifecycleMiniAppBeforeUnmount = () => null;
|
|
1408
|
+
const or = (t = () => null) => {
|
|
1409
1409
|
try {
|
|
1410
|
-
|
|
1410
|
+
_e.removeAddListenerLifecycleMiniAppBeforeUnmount && _e.removeAddListenerLifecycleMiniAppBeforeUnmount();
|
|
1411
1411
|
const e = (r) => o(void 0, null, function* () {
|
|
1412
|
-
r && (
|
|
1412
|
+
r && (_e.removeAddListenerLifecycleMiniAppBeforeUnmount = yield ((n) => o(void 0, null, function* () {
|
|
1413
1413
|
try {
|
|
1414
|
-
if (
|
|
1415
|
-
const a = yield
|
|
1414
|
+
if (w.addListener) {
|
|
1415
|
+
const a = yield w.addListener(Rr, "miniAppBeforeUnmount", (i) => n && n(i));
|
|
1416
1416
|
return a != null && a.remove ? a.remove : () => null;
|
|
1417
1417
|
}
|
|
1418
1418
|
} catch (a) {
|
|
@@ -1427,13 +1427,13 @@ const rr = (t = () => null) => {
|
|
|
1427
1427
|
throw console.error("laserScanFn error", e), e;
|
|
1428
1428
|
}
|
|
1429
1429
|
};
|
|
1430
|
-
class
|
|
1430
|
+
class at {
|
|
1431
1431
|
constructor() {
|
|
1432
1432
|
}
|
|
1433
1433
|
setNativeUsagePermission(e) {
|
|
1434
1434
|
return o(this, null, function* () {
|
|
1435
1435
|
try {
|
|
1436
|
-
return yield
|
|
1436
|
+
return yield Ve.setNativeUsagePermission(e);
|
|
1437
1437
|
} catch (r) {
|
|
1438
1438
|
throw console.error("lifecyclePlugin.setNativeUsagePermission error", r), r;
|
|
1439
1439
|
}
|
|
@@ -1442,7 +1442,7 @@ class rt {
|
|
|
1442
1442
|
authorizeWebCallback(e) {
|
|
1443
1443
|
return o(this, null, function* () {
|
|
1444
1444
|
try {
|
|
1445
|
-
return yield
|
|
1445
|
+
return yield Ve.authorizeWebCallback(e);
|
|
1446
1446
|
} catch (r) {
|
|
1447
1447
|
throw console.error("lifecyclePlugin.authorizeWebCallback error", r), r;
|
|
1448
1448
|
}
|
|
@@ -1453,7 +1453,7 @@ class rt {
|
|
|
1453
1453
|
try {
|
|
1454
1454
|
const { mounted: a, beforeUnmount: i, callBack: c } = r;
|
|
1455
1455
|
a(() => {
|
|
1456
|
-
|
|
1456
|
+
or((s) => o(this, null, function* () {
|
|
1457
1457
|
var l;
|
|
1458
1458
|
if (c && c instanceof Function)
|
|
1459
1459
|
try {
|
|
@@ -1467,7 +1467,7 @@ class rt {
|
|
|
1467
1467
|
console.error("miniAppBeforeUnmount error callBack is not a function or promise");
|
|
1468
1468
|
}));
|
|
1469
1469
|
}), i(() => o(this, null, function* () {
|
|
1470
|
-
|
|
1470
|
+
or(), n.setNativeUsagePermission({ action: J.MINI_APP_BEFORE_UNMOUNT_PERMISSION, value: !1 });
|
|
1471
1471
|
}));
|
|
1472
1472
|
} catch (a) {
|
|
1473
1473
|
throw console.error("miniAppBeforeUnmount error", a), a;
|
|
@@ -1477,17 +1477,17 @@ class rt {
|
|
|
1477
1477
|
getStatus() {
|
|
1478
1478
|
return o(this, null, function* () {
|
|
1479
1479
|
try {
|
|
1480
|
-
return yield
|
|
1480
|
+
return yield Ve.getStatus();
|
|
1481
1481
|
} catch (e) {
|
|
1482
1482
|
throw console.error("getStatus error", e), e;
|
|
1483
1483
|
}
|
|
1484
1484
|
});
|
|
1485
1485
|
}
|
|
1486
1486
|
}
|
|
1487
|
-
let
|
|
1488
|
-
var
|
|
1489
|
-
window.__MICRO_APP_ENVIRONMENT__ && (
|
|
1490
|
-
const Be =
|
|
1487
|
+
let he = null;
|
|
1488
|
+
var yr;
|
|
1489
|
+
window.__MICRO_APP_ENVIRONMENT__ && (he = (yr = window.rawWindow.__mini_app_status_hook__) != null ? yr : {});
|
|
1490
|
+
const Be = w.registerPlugin("DeviceInteractionPlugin", { web: new class extends y {
|
|
1491
1491
|
callVibrate() {
|
|
1492
1492
|
return o(this, null, function* () {
|
|
1493
1493
|
});
|
|
@@ -1500,7 +1500,7 @@ const Be = d.registerPlugin("DeviceInteractionPlugin", { web: new class extends
|
|
|
1500
1500
|
try {
|
|
1501
1501
|
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
|
|
1502
1502
|
var e, r;
|
|
1503
|
-
t((yield (r = (e =
|
|
1503
|
+
t((yield (r = (e = he == null ? void 0 : he.deviceInteraction) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
|
|
1504
1504
|
})) : new Promise((t) => {
|
|
1505
1505
|
t(null);
|
|
1506
1506
|
});
|
|
@@ -1509,7 +1509,7 @@ const Be = d.registerPlugin("DeviceInteractionPlugin", { web: new class extends
|
|
|
1509
1509
|
}
|
|
1510
1510
|
}
|
|
1511
1511
|
}() });
|
|
1512
|
-
class
|
|
1512
|
+
class it {
|
|
1513
1513
|
callVibrate() {
|
|
1514
1514
|
return o(this, null, function* () {
|
|
1515
1515
|
try {
|
|
@@ -1538,11 +1538,11 @@ class tt {
|
|
|
1538
1538
|
});
|
|
1539
1539
|
}
|
|
1540
1540
|
}
|
|
1541
|
-
const
|
|
1542
|
-
let
|
|
1543
|
-
var
|
|
1544
|
-
window.__MICRO_APP_ENVIRONMENT__ && (
|
|
1545
|
-
const
|
|
1541
|
+
const Lr = "PollingPlugin";
|
|
1542
|
+
let pe = null;
|
|
1543
|
+
var Sr;
|
|
1544
|
+
window.__MICRO_APP_ENVIRONMENT__ && (pe = (Sr = window.rawWindow.__mini_app_status_hook__) != null ? Sr : {});
|
|
1545
|
+
const He = w.registerPlugin(Lr, { web: new class extends y {
|
|
1546
1546
|
create() {
|
|
1547
1547
|
return o(this, null, function* () {
|
|
1548
1548
|
});
|
|
@@ -1555,7 +1555,7 @@ const Ve = d.registerPlugin(Ar, { web: new class extends y {
|
|
|
1555
1555
|
try {
|
|
1556
1556
|
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
|
|
1557
1557
|
var e, r;
|
|
1558
|
-
t((yield (r = (e =
|
|
1558
|
+
t((yield (r = (e = pe == null ? void 0 : pe.polling) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
|
|
1559
1559
|
})) : new Promise((t) => {
|
|
1560
1560
|
t(null);
|
|
1561
1561
|
});
|
|
@@ -1563,17 +1563,17 @@ const Ve = d.registerPlugin(Ar, { web: new class extends y {
|
|
|
1563
1563
|
throw console.error("polling getStatus error", t), t;
|
|
1564
1564
|
}
|
|
1565
1565
|
}
|
|
1566
|
-
}() }),
|
|
1567
|
-
|
|
1568
|
-
const
|
|
1566
|
+
}() }), me = M();
|
|
1567
|
+
me.removeAddListenerPolling = () => null;
|
|
1568
|
+
const st = (t, e) => {
|
|
1569
1569
|
try {
|
|
1570
|
-
|
|
1570
|
+
me.removeAddListenerPolling && me.removeAddListenerPolling();
|
|
1571
1571
|
const r = e.pollingId;
|
|
1572
1572
|
((n) => o(void 0, null, function* () {
|
|
1573
|
-
return n && (
|
|
1573
|
+
return n && (me.removeAddListenerPolling = yield ((a) => o(void 0, null, function* () {
|
|
1574
1574
|
try {
|
|
1575
|
-
if (
|
|
1576
|
-
const i = yield
|
|
1575
|
+
if (w.addListener) {
|
|
1576
|
+
const i = yield w.addListener(Lr, "nativeSendPolling", (c) => a && a(c));
|
|
1577
1577
|
return i != null && i.remove ? i.remove : () => null;
|
|
1578
1578
|
}
|
|
1579
1579
|
} catch (i) {
|
|
@@ -1589,7 +1589,7 @@ const nt = (t, e) => {
|
|
|
1589
1589
|
throw console.error("pollingFn error", r), r;
|
|
1590
1590
|
}
|
|
1591
1591
|
};
|
|
1592
|
-
class
|
|
1592
|
+
class ct {
|
|
1593
1593
|
constructor() {
|
|
1594
1594
|
P(this, "pollingList");
|
|
1595
1595
|
this.pollingList = [];
|
|
@@ -1608,10 +1608,10 @@ class ot {
|
|
|
1608
1608
|
try {
|
|
1609
1609
|
(r = e == null ? void 0 : e.pollingParams) != null && r.pollingId && this.pollingList.push({ pollingId: (n = e == null ? void 0 : e.pollingParams) == null ? void 0 : n.pollingId, callBack: e == null ? void 0 : e.callBack }), this.pollingList = this.pollingList.filter((c, s, l) => s === l.findIndex((u) => u.pollingId === c.pollingId));
|
|
1610
1610
|
const i = ((a = e == null ? void 0 : e.pollingParams) == null ? void 0 : a.delay) / 1e3;
|
|
1611
|
-
return
|
|
1611
|
+
return He.create(b(k({}, e == null ? void 0 : e.pollingParams), { delay: i })), ((c, s) => {
|
|
1612
1612
|
try {
|
|
1613
1613
|
const { mounted: l, pollingParams: u } = c;
|
|
1614
|
-
l(() =>
|
|
1614
|
+
l(() => st(s, u));
|
|
1615
1615
|
} catch (l) {
|
|
1616
1616
|
throw console.error("createPolling error", l), l;
|
|
1617
1617
|
}
|
|
@@ -1631,7 +1631,7 @@ class ot {
|
|
|
1631
1631
|
} else
|
|
1632
1632
|
try {
|
|
1633
1633
|
const i = this.pollingList.map((c) => c.pollingId).indexOf(e.pollingId);
|
|
1634
|
-
return (a = this.pollingList) != null && a.length && (Number(i) || Number(i) >= 0) && this.pollingList.splice(Number(i), 1),
|
|
1634
|
+
return (a = this.pollingList) != null && a.length && (Number(i) || Number(i) >= 0) && this.pollingList.splice(Number(i), 1), He.destroy(e);
|
|
1635
1635
|
} catch (i) {
|
|
1636
1636
|
throw console.error("pollingPlugin destroy error", i), i;
|
|
1637
1637
|
}
|
|
@@ -1639,17 +1639,17 @@ class ot {
|
|
|
1639
1639
|
getStatus() {
|
|
1640
1640
|
return o(this, null, function* () {
|
|
1641
1641
|
try {
|
|
1642
|
-
return yield
|
|
1642
|
+
return yield He.getStatus();
|
|
1643
1643
|
} catch (e) {
|
|
1644
1644
|
throw console.error("getStatus error", e), e;
|
|
1645
1645
|
}
|
|
1646
1646
|
});
|
|
1647
1647
|
}
|
|
1648
1648
|
}
|
|
1649
|
-
let
|
|
1650
|
-
var
|
|
1651
|
-
window.__MICRO_APP_ENVIRONMENT__ && (
|
|
1652
|
-
const
|
|
1649
|
+
let ge = null;
|
|
1650
|
+
var Nr;
|
|
1651
|
+
window.__MICRO_APP_ENVIRONMENT__ && (ge = (Nr = window.rawWindow.__mini_app_status_hook__) != null ? Nr : {});
|
|
1652
|
+
const ar = w.registerPlugin("PaymentPlugin", { web: new class extends y {
|
|
1653
1653
|
process(t) {
|
|
1654
1654
|
return o(this, null, function* () {
|
|
1655
1655
|
try {
|
|
@@ -1665,7 +1665,7 @@ const tr = d.registerPlugin("PaymentPlugin", { web: new class extends y {
|
|
|
1665
1665
|
try {
|
|
1666
1666
|
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
|
|
1667
1667
|
var e, r;
|
|
1668
|
-
t((yield (r = (e =
|
|
1668
|
+
t((yield (r = (e = ge == null ? void 0 : ge.payment) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
|
|
1669
1669
|
})) : new Promise((t) => {
|
|
1670
1670
|
t(null);
|
|
1671
1671
|
});
|
|
@@ -1674,11 +1674,11 @@ const tr = d.registerPlugin("PaymentPlugin", { web: new class extends y {
|
|
|
1674
1674
|
}
|
|
1675
1675
|
}
|
|
1676
1676
|
}() });
|
|
1677
|
-
class
|
|
1677
|
+
class lt {
|
|
1678
1678
|
process(e) {
|
|
1679
1679
|
return o(this, null, function* () {
|
|
1680
1680
|
try {
|
|
1681
|
-
return yield
|
|
1681
|
+
return yield ar.process(e);
|
|
1682
1682
|
} catch (r) {
|
|
1683
1683
|
throw console.error("paymentPlugins.process error", r), r;
|
|
1684
1684
|
}
|
|
@@ -1687,17 +1687,17 @@ class at {
|
|
|
1687
1687
|
getStatus() {
|
|
1688
1688
|
return o(this, null, function* () {
|
|
1689
1689
|
try {
|
|
1690
|
-
return yield
|
|
1690
|
+
return yield ar.getStatus();
|
|
1691
1691
|
} catch (e) {
|
|
1692
1692
|
throw console.error("getStatus error", e), e;
|
|
1693
1693
|
}
|
|
1694
1694
|
});
|
|
1695
1695
|
}
|
|
1696
1696
|
}
|
|
1697
|
-
let
|
|
1698
|
-
var
|
|
1699
|
-
window.__MICRO_APP_ENVIRONMENT__ && (
|
|
1700
|
-
const
|
|
1697
|
+
let Pe = null;
|
|
1698
|
+
var Mr;
|
|
1699
|
+
window.__MICRO_APP_ENVIRONMENT__ && (Pe = (Mr = window.rawWindow.__mini_app_status_hook__) != null ? Mr : {});
|
|
1700
|
+
const Ue = w.registerPlugin("CameraForTakePhotoPlugin", { web: new class extends y {
|
|
1701
1701
|
pickCameraForTakePhoto() {
|
|
1702
1702
|
return o(this, null, function* () {
|
|
1703
1703
|
});
|
|
@@ -1710,7 +1710,7 @@ const He = d.registerPlugin("CameraForTakePhotoPlugin", { web: new class extends
|
|
|
1710
1710
|
try {
|
|
1711
1711
|
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
|
|
1712
1712
|
var e, r;
|
|
1713
|
-
t((yield (r = (e =
|
|
1713
|
+
t((yield (r = (e = Pe == null ? void 0 : Pe.cameraForTakePhoto) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
|
|
1714
1714
|
})) : new Promise((t) => {
|
|
1715
1715
|
t(null);
|
|
1716
1716
|
});
|
|
@@ -1719,11 +1719,11 @@ const He = d.registerPlugin("CameraForTakePhotoPlugin", { web: new class extends
|
|
|
1719
1719
|
}
|
|
1720
1720
|
}
|
|
1721
1721
|
}() });
|
|
1722
|
-
class
|
|
1722
|
+
class wt {
|
|
1723
1723
|
pickCameraForTakePhoto() {
|
|
1724
1724
|
return o(this, null, function* () {
|
|
1725
1725
|
try {
|
|
1726
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.pickCameraForTakePhoto() : yield
|
|
1726
|
+
return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.pickCameraForTakePhoto() : yield Ue.pickCameraForTakePhoto();
|
|
1727
1727
|
} catch (e) {
|
|
1728
1728
|
throw console.error("pickCameraForTakePhoto error", e), e;
|
|
1729
1729
|
}
|
|
@@ -1732,7 +1732,7 @@ class it {
|
|
|
1732
1732
|
setCameraForTakePhotoState(e) {
|
|
1733
1733
|
return o(this, null, function* () {
|
|
1734
1734
|
try {
|
|
1735
|
-
return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.setCameraForTakePhotoState(e) : yield
|
|
1735
|
+
return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.setCameraForTakePhotoState(e) : yield Ue.setCameraForTakePhotoState(e);
|
|
1736
1736
|
} catch (r) {
|
|
1737
1737
|
throw console.error("setCameraForTakePhotoState error", r), r;
|
|
1738
1738
|
}
|
|
@@ -1741,17 +1741,17 @@ class it {
|
|
|
1741
1741
|
getStatus() {
|
|
1742
1742
|
return o(this, null, function* () {
|
|
1743
1743
|
try {
|
|
1744
|
-
return yield
|
|
1744
|
+
return yield Ue.getStatus();
|
|
1745
1745
|
} catch (e) {
|
|
1746
1746
|
throw console.error("cameraForTakePhotoPlugin getStatus error", e), e;
|
|
1747
1747
|
}
|
|
1748
1748
|
});
|
|
1749
1749
|
}
|
|
1750
1750
|
}
|
|
1751
|
-
let
|
|
1752
|
-
var
|
|
1753
|
-
window.__MICRO_APP_ENVIRONMENT__ && (
|
|
1754
|
-
const
|
|
1751
|
+
let ye = null;
|
|
1752
|
+
var fr;
|
|
1753
|
+
window.__MICRO_APP_ENVIRONMENT__ && (ye = (fr = window.rawWindow.__mini_app_status_hook__) != null ? fr : {});
|
|
1754
|
+
const ir = w.registerPlugin("HttpPlugin", { web: new class extends y {
|
|
1755
1755
|
request(t) {
|
|
1756
1756
|
return o(this, null, function* () {
|
|
1757
1757
|
return new Promise((e) => {
|
|
@@ -1763,7 +1763,7 @@ const nr = d.registerPlugin("HttpPlugin", { web: new class extends y {
|
|
|
1763
1763
|
try {
|
|
1764
1764
|
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
|
|
1765
1765
|
var e, r;
|
|
1766
|
-
t((yield (r = (e =
|
|
1766
|
+
t((yield (r = (e = ye == null ? void 0 : ye.http) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
|
|
1767
1767
|
})) : new Promise((t) => {
|
|
1768
1768
|
t(null);
|
|
1769
1769
|
});
|
|
@@ -1772,7 +1772,7 @@ const nr = d.registerPlugin("HttpPlugin", { web: new class extends y {
|
|
|
1772
1772
|
}
|
|
1773
1773
|
}
|
|
1774
1774
|
}() });
|
|
1775
|
-
class
|
|
1775
|
+
class dt {
|
|
1776
1776
|
request(e) {
|
|
1777
1777
|
return o(this, null, function* () {
|
|
1778
1778
|
try {
|
|
@@ -1780,7 +1780,7 @@ class st {
|
|
|
1780
1780
|
return window.rawWindow.__mini_app_hook__.requestHttp(e);
|
|
1781
1781
|
{
|
|
1782
1782
|
let r = {};
|
|
1783
|
-
return e.url && (r.url = e.url), e.method && (r.method = e.method), e.headers && (r.headers = e.headers), e.params && (r.urlParams = e.params), e.data && (typeof e.data == "string" ? r.bodyData = e.data : r.bodyParams = e.data), e.upload && (r.upload = e.upload), yield
|
|
1783
|
+
return e.url && (r.url = e.url), e.method && (r.method = e.method), e.headers && (r.headers = e.headers), e.params && (r.urlParams = e.params), e.data && (typeof e.data == "string" ? r.bodyData = e.data : r.bodyParams = e.data), e.upload && (r.upload = e.upload), yield ir.request(r);
|
|
1784
1784
|
}
|
|
1785
1785
|
} catch (r) {
|
|
1786
1786
|
throw console.error("HttpPlugin, trace error", r), r;
|
|
@@ -1790,7 +1790,7 @@ class st {
|
|
|
1790
1790
|
getStatus() {
|
|
1791
1791
|
return o(this, null, function* () {
|
|
1792
1792
|
try {
|
|
1793
|
-
return yield
|
|
1793
|
+
return yield ir.getStatus();
|
|
1794
1794
|
} catch (e) {
|
|
1795
1795
|
throw console.error("HttpPlugin getStatus error", e), e;
|
|
1796
1796
|
}
|
|
@@ -1800,12 +1800,12 @@ class st {
|
|
|
1800
1800
|
const S = [];
|
|
1801
1801
|
for (let t = 0; t < 256; ++t)
|
|
1802
1802
|
S.push((t + 256).toString(16).slice(1));
|
|
1803
|
-
const
|
|
1804
|
-
function
|
|
1803
|
+
const ut = new Uint8Array(16);
|
|
1804
|
+
function _t(t, e, r) {
|
|
1805
1805
|
return e || t || !crypto.randomUUID ? function(n, a, i) {
|
|
1806
1806
|
var s, l, u;
|
|
1807
1807
|
n = n || {};
|
|
1808
|
-
const c = (u = (l = n.random) != null ? l : (s = n.rng) == null ? void 0 : s.call(n)) != null ? u : crypto.getRandomValues(
|
|
1808
|
+
const c = (u = (l = n.random) != null ? l : (s = n.rng) == null ? void 0 : s.call(n)) != null ? u : crypto.getRandomValues(ut);
|
|
1809
1809
|
if (c.length < 16)
|
|
1810
1810
|
throw new Error("Random bytes length must be >= 16");
|
|
1811
1811
|
if (c[6] = 15 & c[6] | 64, c[8] = 63 & c[8] | 128, a) {
|
|
@@ -1820,18 +1820,18 @@ function lt(t, e, r) {
|
|
|
1820
1820
|
}(c);
|
|
1821
1821
|
}(t, e, r) : crypto.randomUUID();
|
|
1822
1822
|
}
|
|
1823
|
-
const
|
|
1824
|
-
let
|
|
1825
|
-
var
|
|
1826
|
-
window.__MICRO_APP_ENVIRONMENT__ && (
|
|
1827
|
-
const
|
|
1823
|
+
const kr = "PrintPlugin";
|
|
1824
|
+
let Se = null;
|
|
1825
|
+
var Ir;
|
|
1826
|
+
window.__MICRO_APP_ENVIRONMENT__ && (Se = (Ir = window.rawWindow.__mini_app_status_hook__) != null ? Ir : {});
|
|
1827
|
+
const sr = w.registerPlugin(kr, { web: new class extends y {
|
|
1828
1828
|
print() {
|
|
1829
1829
|
}
|
|
1830
1830
|
getStatus() {
|
|
1831
1831
|
try {
|
|
1832
1832
|
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
|
|
1833
1833
|
var e, r;
|
|
1834
|
-
t((yield (r = (e =
|
|
1834
|
+
t((yield (r = (e = Se == null ? void 0 : Se.print) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
|
|
1835
1835
|
})) : new Promise((t) => {
|
|
1836
1836
|
t(null);
|
|
1837
1837
|
});
|
|
@@ -1841,15 +1841,15 @@ const or = d.registerPlugin(Or, { web: new class extends y {
|
|
|
1841
1841
|
}
|
|
1842
1842
|
}() }), Q = M();
|
|
1843
1843
|
Q.removeAddListenerPrintList = {};
|
|
1844
|
-
const
|
|
1844
|
+
const ht = (t, e) => {
|
|
1845
1845
|
try {
|
|
1846
1846
|
const r = e.printId;
|
|
1847
|
-
Q.removeAddListenerPrintList =
|
|
1847
|
+
Q.removeAddListenerPrintList = b(k({}, Q.removeAddListenerPrintList), { printId: () => {
|
|
1848
1848
|
} }), ((n) => o(void 0, null, function* () {
|
|
1849
1849
|
return n && (Q.removeAddListenerPrintList[r] = yield ((a) => o(void 0, null, function* () {
|
|
1850
1850
|
try {
|
|
1851
|
-
if (
|
|
1852
|
-
const i = yield
|
|
1851
|
+
if (w.addListener) {
|
|
1852
|
+
const i = yield w.addListener(kr, "nativeSendPrint", (c) => a && a(c));
|
|
1853
1853
|
return i != null && i.remove ? i.remove : () => null;
|
|
1854
1854
|
}
|
|
1855
1855
|
} catch (i) {
|
|
@@ -1866,27 +1866,27 @@ const wt = (t, e) => {
|
|
|
1866
1866
|
throw console.error("printFn error", r), r;
|
|
1867
1867
|
}
|
|
1868
1868
|
};
|
|
1869
|
-
class
|
|
1869
|
+
class pt {
|
|
1870
1870
|
constructor() {
|
|
1871
1871
|
P(this, "printList");
|
|
1872
1872
|
this.printList = [];
|
|
1873
1873
|
}
|
|
1874
1874
|
print(e) {
|
|
1875
1875
|
var n, a, i, c;
|
|
1876
|
-
const r = ((a = (n = e == null ? void 0 : e.printParams) == null ? void 0 : n.functionId) != null ? a : "") +
|
|
1876
|
+
const r = ((a = (n = e == null ? void 0 : e.printParams) == null ? void 0 : n.functionId) != null ? a : "") + _t().replace(/-/g, "");
|
|
1877
1877
|
if (this.printList.push({ printId: r, callBack: e == null ? void 0 : e.callBack }), this.printList = this.printList.filter((s, l, u) => l === u.findIndex((_) => _.printId === s.printId)), window.__MICRO_APP_ENVIRONMENT__) {
|
|
1878
1878
|
const { printParams: s, callBack: l } = e;
|
|
1879
|
-
return (c = (i = window.rawWindow.__mini_app_hook__) == null ? void 0 : i.print) == null || c.call(i,
|
|
1879
|
+
return (c = (i = window.rawWindow.__mini_app_hook__) == null ? void 0 : i.print) == null || c.call(i, b(k({}, s), { printId: r }), l), { id: r };
|
|
1880
1880
|
}
|
|
1881
1881
|
try {
|
|
1882
|
-
return
|
|
1882
|
+
return sr.print(b(k({}, e == null ? void 0 : e.printParams), { printId: r })), ((s, l) => {
|
|
1883
1883
|
try {
|
|
1884
1884
|
const { printParams: u } = s;
|
|
1885
|
-
|
|
1885
|
+
ht(l, u);
|
|
1886
1886
|
} catch (u) {
|
|
1887
1887
|
throw console.error("createPrint error", u), u;
|
|
1888
1888
|
}
|
|
1889
|
-
})(
|
|
1889
|
+
})(b(k({}, e), { printParams: b(k({}, e.printParams), { printId: r }) }), this), { id: r };
|
|
1890
1890
|
} catch (s) {
|
|
1891
1891
|
throw console.error("printPlugin create error", s), s;
|
|
1892
1892
|
}
|
|
@@ -1894,18 +1894,18 @@ class dt {
|
|
|
1894
1894
|
getStatus() {
|
|
1895
1895
|
return o(this, null, function* () {
|
|
1896
1896
|
try {
|
|
1897
|
-
return yield
|
|
1897
|
+
return yield sr.getStatus();
|
|
1898
1898
|
} catch (e) {
|
|
1899
1899
|
throw console.error("getStatus error", e), e;
|
|
1900
1900
|
}
|
|
1901
1901
|
});
|
|
1902
1902
|
}
|
|
1903
1903
|
}
|
|
1904
|
-
const
|
|
1905
|
-
let
|
|
1906
|
-
var
|
|
1907
|
-
|
|
1908
|
-
const
|
|
1904
|
+
const br = typeof window != "undefined";
|
|
1905
|
+
let Ne = null;
|
|
1906
|
+
var Or;
|
|
1907
|
+
br && window.__MICRO_APP_ENVIRONMENT__ && (Ne = (Or = window.rawWindow.__mini_app_status_hook__) != null ? Or : {});
|
|
1908
|
+
const mt = (t) => {
|
|
1909
1909
|
var e, r;
|
|
1910
1910
|
if (!t)
|
|
1911
1911
|
return "";
|
|
@@ -1915,20 +1915,20 @@ const ut = (t) => {
|
|
|
1915
1915
|
} catch (n) {
|
|
1916
1916
|
return "";
|
|
1917
1917
|
}
|
|
1918
|
-
},
|
|
1918
|
+
}, cr = w.registerPlugin("DownloadFilePlugin", { web: new class extends y {
|
|
1919
1919
|
downloadFile(t) {
|
|
1920
1920
|
return o(this, null, function* () {
|
|
1921
1921
|
return ((e, r, n = "") => ({ success: e, message: r, fileName: n }))(!1, "DownloadFilePlugin should be handled by shell", ((e) => {
|
|
1922
1922
|
var n;
|
|
1923
|
-
return ((n = e == null ? void 0 : e.fileName) == null ? void 0 : n.trim()) || `${
|
|
1923
|
+
return ((n = e == null ? void 0 : e.fileName) == null ? void 0 : n.trim()) || `${mt(e == null ? void 0 : e.url)}_${Date.now()}`;
|
|
1924
1924
|
})(t));
|
|
1925
1925
|
});
|
|
1926
1926
|
}
|
|
1927
1927
|
getStatus() {
|
|
1928
1928
|
try {
|
|
1929
|
-
return
|
|
1929
|
+
return br && window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
|
|
1930
1930
|
var e, r;
|
|
1931
|
-
t((yield (r = (e =
|
|
1931
|
+
t((yield (r = (e = Ne == null ? void 0 : Ne.downloadFile) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
|
|
1932
1932
|
})) : new Promise((t) => {
|
|
1933
1933
|
t(null);
|
|
1934
1934
|
});
|
|
@@ -1936,7 +1936,7 @@ const ut = (t) => {
|
|
|
1936
1936
|
throw console.error("downloadFile getStatus error", t), t;
|
|
1937
1937
|
}
|
|
1938
1938
|
}
|
|
1939
|
-
}() }),
|
|
1939
|
+
}() }), gt = typeof window != "undefined", Pt = (t) => {
|
|
1940
1940
|
var r;
|
|
1941
1941
|
const e = (r = t == null ? void 0 : t.fileName) == null ? void 0 : r.trim();
|
|
1942
1942
|
return e || `${((n) => {
|
|
@@ -1950,68 +1950,133 @@ const ut = (t) => {
|
|
|
1950
1950
|
return "";
|
|
1951
1951
|
}
|
|
1952
1952
|
})(t == null ? void 0 : t.url)}_${Date.now()}`;
|
|
1953
|
-
},
|
|
1954
|
-
class
|
|
1953
|
+
}, lr = (t, e) => ({ success: !1, message: e, fileName: Pt(t) });
|
|
1954
|
+
class yt {
|
|
1955
1955
|
downloadFile(e) {
|
|
1956
1956
|
return o(this, null, function* () {
|
|
1957
1957
|
try {
|
|
1958
|
-
if (
|
|
1958
|
+
if (gt && window.__MICRO_APP_ENVIRONMENT__) {
|
|
1959
1959
|
const r = window.rawWindow.__mini_app_hook__.downloadFile;
|
|
1960
|
-
return r ? yield r(e) :
|
|
1960
|
+
return r ? yield r(e) : lr(e, "DownloadFilePlugin is not available");
|
|
1961
1961
|
}
|
|
1962
|
-
return yield
|
|
1962
|
+
return yield cr.downloadFile(e);
|
|
1963
1963
|
} catch (r) {
|
|
1964
|
-
return console.error("downloadFile error", r),
|
|
1964
|
+
return console.error("downloadFile error", r), lr(e, r instanceof Error ? r.message : "download failed");
|
|
1965
1965
|
}
|
|
1966
1966
|
});
|
|
1967
1967
|
}
|
|
1968
1968
|
getStatus() {
|
|
1969
1969
|
return o(this, null, function* () {
|
|
1970
1970
|
try {
|
|
1971
|
-
return yield
|
|
1971
|
+
return yield cr.getStatus();
|
|
1972
1972
|
} catch (e) {
|
|
1973
1973
|
throw console.error("downloadFile getStatus error", e), e;
|
|
1974
1974
|
}
|
|
1975
1975
|
});
|
|
1976
1976
|
}
|
|
1977
1977
|
}
|
|
1978
|
-
|
|
1978
|
+
const xe = "1.0";
|
|
1979
|
+
function Y() {
|
|
1980
|
+
return { recordTrace: !1, recordSpan: !1, protocolVersion: xe, maxSpansPerTrace: 0, maxDepth: 0, maxAttributesPerSpan: 0, maxEventsPerSpan: 0, maxPayloadBytes: 0 };
|
|
1981
|
+
}
|
|
1982
|
+
function We() {
|
|
1983
|
+
return { accepted: !1, code: "UNSUPPORTED", protocolVersion: xe };
|
|
1984
|
+
}
|
|
1985
|
+
const wr = w.registerPlugin("OtelPlugin", { web: new class extends y {
|
|
1986
|
+
recordTrace(t) {
|
|
1987
|
+
return o(this, null, function* () {
|
|
1988
|
+
var r, n;
|
|
1989
|
+
if (!window.__MICRO_APP_ENVIRONMENT__)
|
|
1990
|
+
return We();
|
|
1991
|
+
const e = (n = (r = window.rawWindow) == null ? void 0 : r.__mini_app_hook__) == null ? void 0 : n.recordOtelTrace;
|
|
1992
|
+
if (typeof e != "function")
|
|
1993
|
+
return We();
|
|
1994
|
+
try {
|
|
1995
|
+
return yield e(b(k({}, t), { miniappKey: window.__MICRO_APP_NAME__ }));
|
|
1996
|
+
} catch (a) {
|
|
1997
|
+
return console.warn("[OtelPlugin] Web Shell recordOtelTrace failed", a), { accepted: !1, code: "INTERNAL_ERROR", protocolVersion: xe };
|
|
1998
|
+
}
|
|
1999
|
+
});
|
|
2000
|
+
}
|
|
2001
|
+
getStatus() {
|
|
2002
|
+
return o(this, null, function* () {
|
|
2003
|
+
var e, r, n;
|
|
2004
|
+
if (!window.__MICRO_APP_ENVIRONMENT__)
|
|
2005
|
+
return Y();
|
|
2006
|
+
const t = (n = (r = (e = window.rawWindow) == null ? void 0 : e.__mini_app_status_hook__) == null ? void 0 : r.otel) == null ? void 0 : n.getStatus;
|
|
2007
|
+
if (typeof t != "function")
|
|
2008
|
+
return Y();
|
|
2009
|
+
try {
|
|
2010
|
+
return (yield t()) || Y();
|
|
2011
|
+
} catch (a) {
|
|
2012
|
+
return console.warn("[OtelPlugin] Web Shell getStatus failed", a), Y();
|
|
2013
|
+
}
|
|
2014
|
+
});
|
|
2015
|
+
}
|
|
2016
|
+
}() });
|
|
2017
|
+
class St {
|
|
2018
|
+
recordTrace(e) {
|
|
2019
|
+
return o(this, null, function* () {
|
|
2020
|
+
try {
|
|
2021
|
+
return yield wr.recordTrace(e);
|
|
2022
|
+
} catch (r) {
|
|
2023
|
+
return console.warn("[OtelPlugin] recordTrace is unavailable", r), We();
|
|
2024
|
+
}
|
|
2025
|
+
});
|
|
2026
|
+
}
|
|
2027
|
+
recordSpan(e) {
|
|
2028
|
+
return o(this, null, function* () {
|
|
2029
|
+
return this.recordTrace({ span: e });
|
|
2030
|
+
});
|
|
2031
|
+
}
|
|
2032
|
+
getStatus() {
|
|
2033
|
+
return o(this, null, function* () {
|
|
2034
|
+
try {
|
|
2035
|
+
return yield wr.getStatus();
|
|
2036
|
+
} catch (e) {
|
|
2037
|
+
return console.warn("[OtelPlugin] getStatus is unavailable", e), Y();
|
|
2038
|
+
}
|
|
2039
|
+
});
|
|
2040
|
+
}
|
|
2041
|
+
}
|
|
2042
|
+
class Nt {
|
|
1979
2043
|
constructor() {
|
|
1980
|
-
P(this, "initialContextPlugins", new
|
|
1981
|
-
P(this, "communicatePlugins", new
|
|
1982
|
-
P(this, "cameraScanPlugins", new
|
|
1983
|
-
P(this, "cameraScanMultiplePlugins", new
|
|
1984
|
-
P(this, "cameraScanMultipleNoCountPlugins", new
|
|
1985
|
-
P(this, "cameraScanSingleOrDualPlugins", new
|
|
1986
|
-
P(this, "laserScanPlugins", new
|
|
1987
|
-
P(this, "countAssistPlugins", new
|
|
1988
|
-
P(this, "clickStreamPlugins", new
|
|
1989
|
-
P(this, "lifecyclePlugins", new
|
|
1990
|
-
P(this, "deviceInteractionPlugins", new
|
|
1991
|
-
P(this, "pollingPlugins", new
|
|
1992
|
-
P(this, "paymentPlugins", new
|
|
1993
|
-
P(this, "cameraForTakePhotoPlugin", new
|
|
1994
|
-
P(this, "httpPlugin", new
|
|
1995
|
-
P(this, "printPlugins", new
|
|
1996
|
-
P(this, "downloadFilePlugin", new
|
|
2044
|
+
P(this, "initialContextPlugins", new Gr());
|
|
2045
|
+
P(this, "communicatePlugins", new Yr());
|
|
2046
|
+
P(this, "cameraScanPlugins", new Zr());
|
|
2047
|
+
P(this, "cameraScanMultiplePlugins", new Xr());
|
|
2048
|
+
P(this, "cameraScanMultipleNoCountPlugins", new et());
|
|
2049
|
+
P(this, "cameraScanSingleOrDualPlugins", new rt());
|
|
2050
|
+
P(this, "laserScanPlugins", new tt());
|
|
2051
|
+
P(this, "countAssistPlugins", new nt());
|
|
2052
|
+
P(this, "clickStreamPlugins", new ot());
|
|
2053
|
+
P(this, "lifecyclePlugins", new at());
|
|
2054
|
+
P(this, "deviceInteractionPlugins", new it());
|
|
2055
|
+
P(this, "pollingPlugins", new ct());
|
|
2056
|
+
P(this, "paymentPlugins", new lt());
|
|
2057
|
+
P(this, "cameraForTakePhotoPlugin", new wt());
|
|
2058
|
+
P(this, "httpPlugin", new dt());
|
|
2059
|
+
P(this, "printPlugins", new pt());
|
|
2060
|
+
P(this, "downloadFilePlugin", new yt());
|
|
2061
|
+
P(this, "otelPlugins", new St());
|
|
1997
2062
|
}
|
|
1998
2063
|
}
|
|
1999
|
-
const
|
|
2000
|
-
let
|
|
2001
|
-
var
|
|
2002
|
-
window.__MICRO_APP_ENVIRONMENT__ && (
|
|
2003
|
-
const
|
|
2064
|
+
const It = new Nt();
|
|
2065
|
+
let d = null, Me = null;
|
|
2066
|
+
var Cr, Ar;
|
|
2067
|
+
window.__MICRO_APP_ENVIRONMENT__ && (d = (Cr = window.rawWindow.__mini_app_hook__) != null ? Cr : {}, Me = (Ar = window.rawWindow.__mini_app_status_hook__) != null ? Ar : {});
|
|
2068
|
+
const Mt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: class extends y {
|
|
2004
2069
|
homeIsClick(t) {
|
|
2005
2070
|
return o(this, null, function* () {
|
|
2006
2071
|
var e;
|
|
2007
|
-
window.__MICRO_APP_ENVIRONMENT__ && (console.log("window.microApp.forceDispatch homeIsClick", t), (e =
|
|
2072
|
+
window.__MICRO_APP_ENVIRONMENT__ && (console.log("window.microApp.forceDispatch homeIsClick", t), (e = d.disabledMenu) == null || e.call(d, t));
|
|
2008
2073
|
});
|
|
2009
2074
|
}
|
|
2010
2075
|
openMiniApp(t) {
|
|
2011
2076
|
return o(this, null, function* () {
|
|
2012
2077
|
var e;
|
|
2013
2078
|
try {
|
|
2014
|
-
return window.__MICRO_APP_ENVIRONMENT__ && ((e =
|
|
2079
|
+
return window.__MICRO_APP_ENVIRONMENT__ && ((e = d.openMiniApp) == null || e.call(d, t)), new Promise((r) => {
|
|
2015
2080
|
r(t);
|
|
2016
2081
|
});
|
|
2017
2082
|
} catch (r) {
|
|
@@ -2023,7 +2088,7 @@ const gt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
|
|
|
2023
2088
|
return o(this, null, function* () {
|
|
2024
2089
|
var e;
|
|
2025
2090
|
try {
|
|
2026
|
-
return window.__MICRO_APP_ENVIRONMENT__ && (console.log("window.microApp.forceDispatch showTitle", t), (e =
|
|
2091
|
+
return window.__MICRO_APP_ENVIRONMENT__ && (console.log("window.microApp.forceDispatch showTitle", t), (e = d.showTitle) == null || e.call(d, t)), new Promise((r) => {
|
|
2027
2092
|
r(t);
|
|
2028
2093
|
});
|
|
2029
2094
|
} catch (r) {
|
|
@@ -2035,7 +2100,7 @@ const gt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
|
|
|
2035
2100
|
return o(this, null, function* () {
|
|
2036
2101
|
var e;
|
|
2037
2102
|
try {
|
|
2038
|
-
return window.__MICRO_APP_ENVIRONMENT__ && ((e =
|
|
2103
|
+
return window.__MICRO_APP_ENVIRONMENT__ && ((e = d.showFABMenu) == null || e.call(d, t)), new Promise((r) => {
|
|
2039
2104
|
r(t);
|
|
2040
2105
|
});
|
|
2041
2106
|
} catch (r) {
|
|
@@ -2047,7 +2112,7 @@ const gt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
|
|
|
2047
2112
|
return o(this, null, function* () {
|
|
2048
2113
|
var e;
|
|
2049
2114
|
try {
|
|
2050
|
-
return window.__MICRO_APP_ENVIRONMENT__ && ((e =
|
|
2115
|
+
return window.__MICRO_APP_ENVIRONMENT__ && ((e = d.disableFAB) == null || e.call(d, t)), new Promise((r) => {
|
|
2051
2116
|
r(t);
|
|
2052
2117
|
});
|
|
2053
2118
|
} catch (r) {
|
|
@@ -2059,7 +2124,7 @@ const gt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
|
|
|
2059
2124
|
return o(this, null, function* () {
|
|
2060
2125
|
var e;
|
|
2061
2126
|
try {
|
|
2062
|
-
return window.__MICRO_APP_ENVIRONMENT__ && ((e =
|
|
2127
|
+
return window.__MICRO_APP_ENVIRONMENT__ && ((e = d.disableBack) == null || e.call(d, t)), new Promise((r) => {
|
|
2063
2128
|
r(t);
|
|
2064
2129
|
});
|
|
2065
2130
|
} catch (r) {
|
|
@@ -2071,7 +2136,7 @@ const gt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
|
|
|
2071
2136
|
return o(this, null, function* () {
|
|
2072
2137
|
var e;
|
|
2073
2138
|
try {
|
|
2074
|
-
return window.__MICRO_APP_ENVIRONMENT__ && ((e =
|
|
2139
|
+
return window.__MICRO_APP_ENVIRONMENT__ && ((e = d.showSubMask) == null || e.call(d, t)), new Promise((r) => {
|
|
2075
2140
|
r(t);
|
|
2076
2141
|
});
|
|
2077
2142
|
} catch (r) {
|
|
@@ -2083,7 +2148,7 @@ const gt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
|
|
|
2083
2148
|
return o(this, null, function* () {
|
|
2084
2149
|
var e;
|
|
2085
2150
|
try {
|
|
2086
|
-
return window.__MICRO_APP_ENVIRONMENT__ && ((e =
|
|
2151
|
+
return window.__MICRO_APP_ENVIRONMENT__ && ((e = d.setMiniAppVersion) == null || e.call(d, t)), new Promise((r) => {
|
|
2087
2152
|
r(t);
|
|
2088
2153
|
});
|
|
2089
2154
|
} catch (r) {
|
|
@@ -2094,13 +2159,13 @@ const gt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
|
|
|
2094
2159
|
showDialog() {
|
|
2095
2160
|
return o(this, null, function* () {
|
|
2096
2161
|
var t;
|
|
2097
|
-
window.__MICRO_APP_ENVIRONMENT__ && ((t =
|
|
2162
|
+
window.__MICRO_APP_ENVIRONMENT__ && ((t = d.showDialog) == null || t.call(d));
|
|
2098
2163
|
});
|
|
2099
2164
|
}
|
|
2100
2165
|
cancelDialog() {
|
|
2101
2166
|
return o(this, null, function* () {
|
|
2102
2167
|
var t;
|
|
2103
|
-
window.__MICRO_APP_ENVIRONMENT__ && ((t =
|
|
2168
|
+
window.__MICRO_APP_ENVIRONMENT__ && ((t = d.cancelDialog) == null || t.call(d));
|
|
2104
2169
|
});
|
|
2105
2170
|
}
|
|
2106
2171
|
getMiniAppKong(t) {
|
|
@@ -2108,7 +2173,7 @@ const gt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
|
|
|
2108
2173
|
var e, r;
|
|
2109
2174
|
try {
|
|
2110
2175
|
if (window.__MICRO_APP_ENVIRONMENT__) {
|
|
2111
|
-
const n = (r = (e =
|
|
2176
|
+
const n = (r = (e = d.getMiniAppKong) == null ? void 0 : e.call(d, t)) != null ? r : {};
|
|
2112
2177
|
return new Promise((a) => {
|
|
2113
2178
|
a(n);
|
|
2114
2179
|
});
|
|
@@ -2124,14 +2189,14 @@ const gt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
|
|
|
2124
2189
|
closeMiniApp() {
|
|
2125
2190
|
return o(this, null, function* () {
|
|
2126
2191
|
var t;
|
|
2127
|
-
window.__MICRO_APP_ENVIRONMENT__ && ((t =
|
|
2192
|
+
window.__MICRO_APP_ENVIRONMENT__ && ((t = d.closeMiniApp) == null || t.call(d));
|
|
2128
2193
|
});
|
|
2129
2194
|
}
|
|
2130
2195
|
getStatus() {
|
|
2131
2196
|
try {
|
|
2132
2197
|
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
|
|
2133
2198
|
var e, r;
|
|
2134
|
-
t((yield (r = (e =
|
|
2199
|
+
t((yield (r = (e = Me == null ? void 0 : Me.communicate) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
|
|
2135
2200
|
})) : new Promise((t) => {
|
|
2136
2201
|
t(null);
|
|
2137
2202
|
});
|
|
@@ -2143,7 +2208,7 @@ const gt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
|
|
|
2143
2208
|
try {
|
|
2144
2209
|
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((e) => o(this, null, function* () {
|
|
2145
2210
|
var r;
|
|
2146
|
-
e((yield (r =
|
|
2211
|
+
e((yield (r = d == null ? void 0 : d.dispatchToShell) == null ? void 0 : r.call(d, t)) || {});
|
|
2147
2212
|
})) : new Promise((e) => {
|
|
2148
2213
|
e(t);
|
|
2149
2214
|
});
|
|
@@ -2155,7 +2220,7 @@ const gt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
|
|
|
2155
2220
|
try {
|
|
2156
2221
|
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((e) => o(this, null, function* () {
|
|
2157
2222
|
var r;
|
|
2158
|
-
e((yield (r =
|
|
2223
|
+
e((yield (r = d == null ? void 0 : d.getMiniAppInfo) == null ? void 0 : r.call(d, t)) || {});
|
|
2159
2224
|
})) : new Promise((e) => {
|
|
2160
2225
|
e({});
|
|
2161
2226
|
});
|
|
@@ -2165,6 +2230,7 @@ const gt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
|
|
|
2165
2230
|
}
|
|
2166
2231
|
} }, Symbol.toStringTag, { value: "Module" }));
|
|
2167
2232
|
export {
|
|
2168
|
-
|
|
2169
|
-
|
|
2233
|
+
Nt as NativeApi,
|
|
2234
|
+
xe as OTEL_PLUGIN_PROTOCOL_VERSION,
|
|
2235
|
+
It as default
|
|
2170
2236
|
};
|