superapp-miniapp-invoke-native 1.11.0 → 1.11.2

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.js CHANGED
@@ -1,34 +1,36 @@
1
- var Fr = Object.defineProperty, Ur = Object.defineProperties;
2
- var Wr = Object.getOwnPropertyDescriptors;
3
- var Ke = Object.getOwnPropertySymbols;
4
- var Dr = Object.prototype.hasOwnProperty, xr = Object.prototype.propertyIsEnumerable;
5
- var Le = (t, e, r) => e in t ? Fr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, b = (t, e) => {
1
+ /* eslint-disable no-restricted-globals, no-unused-expressions */
2
+ /* global globalThis, AndroidInitialContext */
3
+ var Vr = Object.defineProperty, Hr = Object.defineProperties;
4
+ var Fr = Object.getOwnPropertyDescriptors;
5
+ var qe = Object.getOwnPropertySymbols;
6
+ var Ur = Object.prototype.hasOwnProperty, Wr = Object.prototype.propertyIsEnumerable;
7
+ var ve = (t, e, r) => e in t ? Vr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, b = (t, e) => {
6
8
  for (var r in e || (e = {}))
7
- Dr.call(e, r) && Le(t, r, e[r]);
8
- if (Ke)
9
- for (var r of Ke(e))
10
- xr.call(e, r) && Le(t, r, e[r]);
9
+ Ur.call(e, r) && ve(t, r, e[r]);
10
+ if (qe)
11
+ for (var r of qe(e))
12
+ Wr.call(e, r) && ve(t, r, e[r]);
11
13
  return t;
12
- }, T = (t, e) => Ur(t, Wr(e));
13
- var P = (t, e, r) => (Le(t, typeof e != "symbol" ? e + "" : e, r), r);
14
+ }, T = (t, e) => Hr(t, Fr(e));
15
+ var P = (t, e, r) => (ve(t, typeof e != "symbol" ? e + "" : e, r), r);
14
16
  var a = (t, e, r) => new Promise((n, o) => {
15
17
  var i = (l) => {
16
18
  try {
17
19
  s(r.next(l));
18
- } catch (u) {
19
- o(u);
20
+ } catch (d) {
21
+ o(d);
20
22
  }
21
23
  }, c = (l) => {
22
24
  try {
23
25
  s(r.throw(l));
24
- } catch (u) {
25
- o(u);
26
+ } catch (d) {
27
+ o(d);
26
28
  }
27
29
  }, s = (l) => l.done ? n(l.value) : Promise.resolve(l.value).then(i, c);
28
30
  s((r = r.apply(t, e)).next());
29
31
  });
30
32
  /*! Capacitor: https://capacitorjs.com/ - MIT License */
31
- const $r = (t) => t.CapacitorPlatforms = ((e) => {
33
+ const Dr = (t) => t.CapacitorPlatforms = ((e) => {
32
34
  const r = /* @__PURE__ */ new Map();
33
35
  r.set("web", { name: "web" });
34
36
  const n = e.CapacitorPlatforms || { currentPlatform: { name: "web" }, platforms: r };
@@ -37,73 +39,73 @@ const $r = (t) => t.CapacitorPlatforms = ((e) => {
37
39
  }, n.setPlatform = (o) => {
38
40
  n.platforms.has(o) && (n.currentPlatform = n.platforms.get(o));
39
41
  }, n;
40
- })(t), ze = $r(typeof globalThis != "undefined" ? globalThis : typeof self != "undefined" ? self : typeof window != "undefined" ? window : typeof global != "undefined" ? global : {});
42
+ })(t), ze = Dr(typeof globalThis != "undefined" ? globalThis : typeof self != "undefined" ? self : typeof window != "undefined" ? window : typeof global != "undefined" ? global : {});
41
43
  var $;
42
44
  ze.addPlatform, ze.setPlatform, function(t) {
43
45
  t.Unimplemented = "UNIMPLEMENTED", t.Unavailable = "UNAVAILABLE";
44
46
  }($ || ($ = {}));
45
- class ve extends Error {
47
+ class Le extends Error {
46
48
  constructor(e, r, n) {
47
49
  super(e), this.message = e, this.code = r, this.data = n;
48
50
  }
49
51
  }
50
- const jr = (t) => {
52
+ const xr = (t) => {
51
53
  var e, r, n, o, i;
52
- 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 : ((p) => {
54
+ const c = t.CapacitorCustomPlatform || null, s = t.Capacitor || {}, l = s.Plugins = s.Plugins || {}, d = t.CapacitorPlatforms, w = ((e = d == null ? void 0 : d.currentPlatform) === null || e === void 0 ? void 0 : e.getPlatform) || (() => c !== null ? c.name : ((p) => {
53
55
  var m, N;
54
56
  return p != null && p.androidBridge ? "android" : !((N = (m = p == null ? void 0 : p.webkit) === null || m === void 0 ? void 0 : m.messageHandlers) === null || N === void 0) && N.bridge ? "ios" : "web";
55
- })(t)), h = ((r = u == null ? void 0 : u.currentPlatform) === null || r === void 0 ? void 0 : r.isNativePlatform) || (() => _() !== "web"), M = ((n = u == null ? void 0 : u.currentPlatform) === null || n === void 0 ? void 0 : n.isPluginAvailable) || ((p) => {
57
+ })(t)), h = ((r = d == null ? void 0 : d.currentPlatform) === null || r === void 0 ? void 0 : r.isNativePlatform) || (() => w() !== "web"), f = ((n = d == null ? void 0 : d.currentPlatform) === null || n === void 0 ? void 0 : n.isPluginAvailable) || ((p) => {
56
58
  const m = I.get(p);
57
- return !!(m != null && m.platforms.has(_())) || !!v(p);
58
- }), v = ((o = u == null ? void 0 : u.currentPlatform) === null || o === void 0 ? void 0 : o.getPluginHeader) || ((p) => {
59
+ return !!(m != null && m.platforms.has(w())) || !!M(p);
60
+ }), M = ((o = d == null ? void 0 : d.currentPlatform) === null || o === void 0 ? void 0 : o.getPluginHeader) || ((p) => {
59
61
  var m;
60
62
  return (m = s.PluginHeaders) === null || m === void 0 ? void 0 : m.find((N) => N.name === p);
61
- }), I = /* @__PURE__ */ new Map(), C = ((i = u == null ? void 0 : u.currentPlatform) === null || i === void 0 ? void 0 : i.registerPlugin) || ((p, m = {}) => {
63
+ }), I = /* @__PURE__ */ new Map(), O = ((i = d == null ? void 0 : d.currentPlatform) === null || i === void 0 ? void 0 : i.registerPlugin) || ((p, m = {}) => {
62
64
  const N = I.get(p);
63
65
  if (N)
64
66
  return console.warn(`Capacitor plugin "${p}" already registered. Cannot register plugins twice.`), N.proxy;
65
- const O = _(), j = v(p);
67
+ const v = w(), q = M(p);
66
68
  let k;
67
69
  const Me = (A) => {
68
70
  let R;
69
- const x = (...Z) => {
70
- const q = (() => a(void 0, null, function* () {
71
- return !k && O in m ? k = k = typeof m[O] == "function" ? yield m[O]() : m[O] : c !== null && !k && "web" in m && (k = k = typeof m.web == "function" ? yield m.web() : m.web), k;
71
+ const x = (...Y) => {
72
+ const z = (() => a(void 0, null, function* () {
73
+ return !k && v in m ? k = k = typeof m[v] == "function" ? yield m[v]() : m[v] : c !== null && !k && "web" in m && (k = k = typeof m.web == "function" ? yield m.web() : m.web), k;
72
74
  }))().then((K) => {
73
- const je = ((L, z) => {
75
+ const je = ((L, G) => {
74
76
  var Ce, Oe;
75
- if (!j) {
77
+ if (!q) {
76
78
  if (L)
77
- return (Oe = L[z]) === null || Oe === void 0 ? void 0 : Oe.bind(L);
78
- throw new ve(`"${p}" plugin is not implemented on ${O}`, $.Unimplemented);
79
+ return (Oe = L[G]) === null || Oe === void 0 ? void 0 : Oe.bind(L);
80
+ throw new Le(`"${p}" plugin is not implemented on ${v}`, $.Unimplemented);
79
81
  }
80
82
  {
81
- const qe = j == null ? void 0 : j.methods.find((G) => z === G.name);
82
- if (qe)
83
- return qe.rtype === "promise" ? (G) => s.nativePromise(p, z.toString(), G) : (G, Hr) => s.nativeCallback(p, z.toString(), G, Hr);
83
+ const $e = q == null ? void 0 : q.methods.find((J) => G === J.name);
84
+ if ($e)
85
+ return $e.rtype === "promise" ? (J) => s.nativePromise(p, G.toString(), J) : (J, Br) => s.nativeCallback(p, G.toString(), J, Br);
84
86
  if (L)
85
- return (Ce = L[z]) === null || Ce === void 0 ? void 0 : Ce.bind(L);
87
+ return (Ce = L[G]) === null || Ce === void 0 ? void 0 : Ce.bind(L);
86
88
  }
87
89
  })(K, A);
88
90
  if (je) {
89
- const L = je(...Z);
91
+ const L = je(...Y);
90
92
  return R = L == null ? void 0 : L.remove, L;
91
93
  }
92
- throw new ve(`"${p}.${A}()" is not implemented on ${O}`, $.Unimplemented);
94
+ throw new Le(`"${p}.${A}()" is not implemented on ${v}`, $.Unimplemented);
93
95
  });
94
- return A === "addListener" && (q.remove = () => a(void 0, null, function* () {
96
+ return A === "addListener" && (z.remove = () => a(void 0, null, function* () {
95
97
  return R();
96
- })), q;
98
+ })), z;
97
99
  };
98
100
  return x.toString = () => `${A.toString()}() { [capacitor code] }`, Object.defineProperty(x, "name", { value: A, writable: !1, configurable: !1 }), x;
99
- }, xe = Me("addListener"), $e = Me("removeListener"), Vr = (A, R) => {
100
- const x = xe({ eventName: A }, R), Z = () => a(void 0, null, function* () {
101
+ }, De = Me("addListener"), xe = Me("removeListener"), Tr = (A, R) => {
102
+ const x = De({ eventName: A }, R), Y = () => a(void 0, null, function* () {
101
103
  const K = yield x;
102
- $e({ eventName: A, 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;
104
+ xe({ eventName: A, callbackId: K }, R);
105
+ }), z = new Promise((K) => x.then(() => K({ remove: Y })));
106
+ return z.remove = () => a(void 0, null, function* () {
107
+ console.warn("Using addListener() without 'await' is deprecated."), yield Y();
108
+ }), z;
107
109
  }, Ie = new Proxy({}, { get(A, R) {
108
110
  switch (R) {
109
111
  case "$$typeof":
@@ -111,18 +113,18 @@ const jr = (t) => {
111
113
  case "toJSON":
112
114
  return () => ({});
113
115
  case "addListener":
114
- return j ? Vr : xe;
116
+ return q ? Tr : De;
115
117
  case "removeListener":
116
- return $e;
118
+ return xe;
117
119
  default:
118
120
  return Me(R);
119
121
  }
120
122
  } });
121
- return l[p] = Ie, I.set(p, { name: p, proxy: Ie, platforms: /* @__PURE__ */ new Set([...Object.keys(m), ...j ? [O] : []]) }), Ie;
123
+ return l[p] = Ie, I.set(p, { name: p, proxy: Ie, platforms: /* @__PURE__ */ new Set([...Object.keys(m), ...q ? [v] : []]) }), Ie;
122
124
  });
123
- return s.convertFileSrc || (s.convertFileSrc = (p) => p), s.getPlatform = _, s.handleError = (p) => t.console.error(p), s.isNativePlatform = h, s.isPluginAvailable = M, s.pluginMethodNoop = (p, 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
- }, qr = (t) => t.Capacitor = jr(t), d = qr(typeof globalThis != "undefined" ? globalThis : typeof self != "undefined" ? self : typeof window != "undefined" ? window : typeof global != "undefined" ? global : {}), Ue = d.registerPlugin;
125
- d.Plugins;
125
+ return s.convertFileSrc || (s.convertFileSrc = (p) => p), s.getPlatform = w, s.handleError = (p) => t.console.error(p), s.isNativePlatform = h, s.isPluginAvailable = f, s.pluginMethodNoop = (p, m, N) => Promise.reject(`${N} does not have an implementation of "${m}".`), s.registerPlugin = O, s.Exception = Le, s.DEBUG = !!s.DEBUG, s.isLoggingEnabled = !!s.isLoggingEnabled, s.platform = s.getPlatform(), s.isNative = s.isNativePlatform(), s;
126
+ }, jr = (t) => t.Capacitor = xr(t), _ = jr(typeof globalThis != "undefined" ? globalThis : typeof self != "undefined" ? self : typeof window != "undefined" ? window : typeof global != "undefined" ? global : {}), Ue = _.registerPlugin;
127
+ _.Plugins;
126
128
  class y {
127
129
  constructor(e) {
128
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);
@@ -159,10 +161,10 @@ class y {
159
161
  } };
160
162
  }
161
163
  unimplemented(e = "not implemented") {
162
- return new d.Exception(e, $.Unimplemented);
164
+ return new _.Exception(e, $.Unimplemented);
163
165
  }
164
166
  unavailable(e = "not available") {
165
- return new d.Exception(e, $.Unavailable);
167
+ return new _.Exception(e, $.Unavailable);
166
168
  }
167
169
  removeListener(e, r) {
168
170
  return a(this, null, function* () {
@@ -180,8 +182,8 @@ class y {
180
182
  e && (window.removeEventListener(e.windowEventName, e.handler), e.registered = !1);
181
183
  }
182
184
  }
183
- 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);
184
- class Kr extends y {
185
+ const Ke = (t) => encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape), Ge = (t) => t.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
186
+ class $r extends y {
185
187
  getCookies() {
186
188
  return a(this, null, function* () {
187
189
  const e = document.cookie, r = {};
@@ -189,14 +191,14 @@ class Kr extends y {
189
191
  if (n.length <= 0)
190
192
  return;
191
193
  let [o, i] = n.replace(/=/, "CAP_COOKIE").split("CAP_COOKIE");
192
- o = Je(o).trim(), i = Je(i).trim(), r[o] = i;
194
+ o = Ge(o).trim(), i = Ge(i).trim(), r[o] = i;
193
195
  }), r;
194
196
  });
195
197
  }
196
198
  setCookie(e) {
197
199
  return a(this, null, function* () {
198
200
  try {
199
- const r = Ge(e.key), n = Ge(e.value), o = `; expires=${(e.expires || "").replace("expires=", "")}`, i = (e.path || "/").replace("path=", ""), c = e.url != null && e.url.length > 0 ? `domain=${e.url}` : "";
201
+ const r = Ke(e.key), n = Ke(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
202
  document.cookie = `${r}=${n || ""}${o}; path=${i}; ${c};`;
201
203
  } catch (r) {
202
204
  return Promise.reject(r);
@@ -233,8 +235,8 @@ class Kr extends y {
233
235
  });
234
236
  }
235
237
  }
236
- Ue("CapacitorCookies", { web: () => new Kr() });
237
- const zr = (t, e = {}) => {
238
+ Ue("CapacitorCookies", { web: () => new $r() });
239
+ const qr = (t, e = {}) => {
238
240
  const r = Object.assign({ method: t.method || "GET", headers: t.headers }, e), n = ((o = {}) => {
239
241
  const i = Object.keys(o);
240
242
  return Object.keys(o).map((c) => c.toLocaleLowerCase()).reduce((c, s, l) => (c[s] = o[i[l]], c), {});
@@ -262,27 +264,27 @@ const zr = (t, e = {}) => {
262
264
  (n.includes("application/json") || typeof t.data == "object") && (r.body = JSON.stringify(t.data));
263
265
  return r;
264
266
  };
265
- class Gr extends y {
267
+ class zr extends y {
266
268
  request(e) {
267
269
  return a(this, null, function* () {
268
- const r = zr(e, e.webFetchExtra), n = ((h, M = !0) => h ? Object.entries(h).reduce((v, I) => {
269
- const [C, p] = I;
270
+ const r = qr(e, e.webFetchExtra), n = ((h, f = !0) => h ? Object.entries(h).reduce((M, I) => {
271
+ const [O, p] = I;
270
272
  let m, N;
271
- return Array.isArray(p) ? (N = "", p.forEach((O) => {
272
- m = M ? encodeURIComponent(O) : O, N += `${C}=${m}&`;
273
- }), N.slice(0, -1)) : (m = M ? encodeURIComponent(p) : p, N = `${C}=${m}`), `${v}&${N}`;
273
+ return Array.isArray(p) ? (N = "", p.forEach((v) => {
274
+ m = f ? encodeURIComponent(v) : v, N += `${O}=${m}&`;
275
+ }), N.slice(0, -1)) : (m = f ? encodeURIComponent(p) : p, N = `${O}=${m}`), `${M}&${N}`;
274
276
  }, "").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, l, { responseType: u = "text" } = i.ok ? e : {};
276
- switch (c.includes("application/json") && (u = "json"), u) {
277
+ let s, l, { responseType: d = "text" } = i.ok ? e : {};
278
+ switch (c.includes("application/json") && (d = "json"), d) {
277
279
  case "arraybuffer":
278
280
  case "blob":
279
281
  l = yield i.blob(), s = yield ((h) => a(this, null, function* () {
280
- return new Promise((M, v) => {
282
+ return new Promise((f, M) => {
281
283
  const I = new FileReader();
282
284
  I.onload = () => {
283
- const C = I.result;
284
- M(C.indexOf(",") >= 0 ? C.split(",")[1] : C);
285
- }, I.onerror = (C) => v(C), I.readAsDataURL(h);
285
+ const O = I.result;
286
+ f(O.indexOf(",") >= 0 ? O.split(",")[1] : O);
287
+ }, I.onerror = (O) => M(O), I.readAsDataURL(h);
286
288
  });
287
289
  }))(l);
288
290
  break;
@@ -292,10 +294,10 @@ class Gr extends y {
292
294
  default:
293
295
  s = yield i.text();
294
296
  }
295
- const _ = {};
296
- return i.headers.forEach((h, M) => {
297
- _[M] = h;
298
- }), { data: s, headers: _, status: i.status, url: i.url };
297
+ const w = {};
298
+ return i.headers.forEach((h, f) => {
299
+ w[f] = h;
300
+ }), { data: s, headers: w, status: i.status, url: i.url };
299
301
  });
300
302
  }
301
303
  get(e) {
@@ -325,13 +327,13 @@ class Gr extends y {
325
327
  }
326
328
  }
327
329
  function Ae() {
328
- return d.getPlatform() === "android" ? JSON.parse(AndroidInitialContext.initialContext()) : window.portalInitialContext;
330
+ return _.getPlatform() === "android" ? JSON.parse(AndroidInitialContext.initialContext()) : window.portalInitialContext;
329
331
  }
330
- Ue("CapacitorHttp", { web: () => new Gr() }), /*! Ionic Portals: https://ionic.io/portals - Commercial License */
332
+ Ue("CapacitorHttp", { web: () => new zr() }), /*! Ionic Portals: https://ionic.io/portals - Commercial License */
331
333
  Ue("Portals", { web: () => Promise.resolve().then(function() {
332
- return Jr;
334
+ return Kr;
333
335
  }).then((t) => new t.PortalsWeb()) });
334
- const Jr = Object.freeze({ __proto__: null, PortalsWeb: class extends y {
336
+ const Kr = Object.freeze({ __proto__: null, PortalsWeb: class extends y {
335
337
  publishNative(t) {
336
338
  return a(this, null, function* () {
337
339
  });
@@ -353,7 +355,7 @@ const Jr = Object.freeze({ __proto__: null, PortalsWeb: class extends y {
353
355
  throw console.error("getInitialContextHandle error", o), o;
354
356
  }
355
357
  };
356
- class Qr {
358
+ class Gr {
357
359
  isNative() {
358
360
  try {
359
361
  return (() => {
@@ -428,16 +430,16 @@ class Qr {
428
430
  });
429
431
  }
430
432
  }
431
- const f = () => {
433
+ const C = () => {
432
434
  try {
433
435
  let t = {};
434
436
  return typeof window != "undefined" && (t = window), t;
435
437
  } catch (t) {
436
438
  throw console.error("isWinHandle error", t), t;
437
439
  }
438
- }, E = "CommunicatePlugin", g = d.registerPlugin(E, { web: () => Promise.resolve().then(() => Nt).then((t) => new t.PluginsWeb()) }), te = f();
440
+ }, E = "CommunicatePlugin", g = _.registerPlugin(E, { web: () => Promise.resolve().then(() => Pt).then((t) => new t.PluginsWeb()) }), te = C();
439
441
  te.removeAddListenerFab = () => null;
440
- const Yr = (t, e) => {
442
+ const Jr = (t, e) => {
441
443
  var r, n;
442
444
  try {
443
445
  te.removeAddListenerFab && te.removeAddListenerFab();
@@ -445,8 +447,8 @@ const Yr = (t, e) => {
445
447
  if ((r = g.showFABMenu) == null || r.call(g, { fabMenu: o, position: null }), !t || !((n = Object.keys(t)) != null && n.length))
446
448
  return;
447
449
  Object.keys(t).forEach((i) => {
448
- var c, s, l, u, _, h, M, v;
449
- o.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: (h = (_ = t == null ? void 0 : t[i]) == null ? void 0 : _.id) != null ? h : "", name: (v = (M = t == null ? void 0 : t[i]) == null ? void 0 : M.title) != null ? v : "" });
450
+ var c, s, l, d, w, h, f, M;
451
+ o.push({ disable: (s = (c = t == null ? void 0 : t[i]) == null ? void 0 : c.disable) != null ? s : !1, icon: (d = (l = t == null ? void 0 : t[i]) == null ? void 0 : l.icon) != null ? d : "", id: (h = (w = t == null ? void 0 : t[i]) == null ? void 0 : w.id) != null ? h : "", name: (M = (f = t == null ? void 0 : t[i]) == null ? void 0 : f.title) != null ? M : "" });
450
452
  }), queueMicrotask(() => {
451
453
  var i;
452
454
  (i = g.showFABMenu) == null || i.call(g, { fabMenu: o, position: e != null ? e : null });
@@ -454,8 +456,8 @@ const Yr = (t, e) => {
454
456
  ((i) => a(void 0, null, function* () {
455
457
  i && (te.removeAddListenerFab = yield ((c) => a(void 0, null, function* () {
456
458
  try {
457
- if (d.addListener) {
458
- const s = yield d.addListener(E, "nativeSendFab", (l) => c && c(l));
459
+ if (_.addListener) {
460
+ const s = yield _.addListener(E, "nativeSendFab", (l) => c && c(l));
459
461
  return s != null && s.remove ? s.remove : () => null;
460
462
  }
461
463
  } catch (s) {
@@ -465,22 +467,22 @@ const Yr = (t, e) => {
465
467
  }))((i) => {
466
468
  let c;
467
469
  i != null && i.disable || i != null && i.id && (Object.keys(t).forEach((s) => {
468
- var l, u, _;
469
- (l = t == null ? void 0 : t[s]) != null && l.id && i.id === t[s].id && (c = (_ = (u = t[s]) == null ? void 0 : u.fn) != null ? _ : () => null);
470
+ var l, d, w;
471
+ (l = t == null ? void 0 : t[s]) != null && l.id && i.id === t[s].id && (c = (w = (d = t[s]) == null ? void 0 : d.fn) != null ? w : () => null);
470
472
  }), typeof c == "function" && c());
471
473
  });
472
474
  });
473
475
  } catch (o) {
474
476
  throw console.error("fabBtnHandle error", o), o;
475
477
  }
476
- }, B = f();
478
+ }, B = C();
477
479
  B.addListenerBackRemoveHandle = () => null;
478
- const Qe = (t = () => null) => a(void 0, null, function* () {
480
+ const Je = (t = () => null) => a(void 0, null, function* () {
479
481
  try {
480
482
  B != null && B.addListenerBackRemoveHandle && typeof B.addListenerBackRemoveHandle == "function" && B.addListenerBackRemoveHandle(), B.addListenerBackRemoveHandle = yield ((e) => a(void 0, null, function* () {
481
483
  try {
482
- if (d.addListener) {
483
- const r = yield d.addListener(E, "nativeSendBack", (n) => e && e(n));
484
+ if (_.addListener) {
485
+ const r = yield _.addListener(E, "nativeSendBack", (n) => e && e(n));
484
486
  return r != null && r.remove ? r.remove : () => null;
485
487
  }
486
488
  } catch (r) {
@@ -490,7 +492,7 @@ const Qe = (t = () => null) => a(void 0, null, function* () {
490
492
  } catch (e) {
491
493
  throw console.error("initBackBtnFn error", e), e;
492
494
  }
493
- }), ne = f();
495
+ }), ne = C();
494
496
  ne.addListenerHomeHandle = () => null;
495
497
  const Zr = (t) => {
496
498
  try {
@@ -498,8 +500,8 @@ const Zr = (t) => {
498
500
  ((e) => a(void 0, null, function* () {
499
501
  e && (ne.addListenerHomeHandle = yield ((r) => a(void 0, null, function* () {
500
502
  try {
501
- if (d.addListener) {
502
- const n = yield d.addListener(E, "nativeSendHome", (o) => r && r(o));
503
+ if (_.addListener) {
504
+ const n = yield _.addListener(E, "nativeSendHome", (o) => r && r(o));
503
505
  return n != null && n.remove ? n.remove : () => null;
504
506
  }
505
507
  } catch (n) {
@@ -511,14 +513,14 @@ const Zr = (t) => {
511
513
  } catch (e) {
512
514
  throw console.error("homeFn error", e), e;
513
515
  }
514
- }, V = f();
516
+ }, V = C();
515
517
  V.addListenerTouchRemoveHandle = () => null;
516
- const Ye = (t = () => null) => a(void 0, null, function* () {
518
+ const Ze = (t = () => null) => a(void 0, null, function* () {
517
519
  try {
518
520
  V != null && V.addListenerTouchRemoveHandle && typeof V.addListenerTouchRemoveHandle == "function" && V.addListenerTouchRemoveHandle(), V.addListenerTouchRemoveHandle = yield ((e) => a(void 0, null, function* () {
519
521
  try {
520
- if (d.addListener) {
521
- const r = yield d.addListener(E, "nativeTouchListener", (n) => e && e(n));
522
+ if (_.addListener) {
523
+ const r = yield _.addListener(E, "nativeTouchListener", (n) => e && e(n));
522
524
  return r != null && r.remove ? r.remove : () => null;
523
525
  }
524
526
  } catch (r) {
@@ -528,16 +530,16 @@ const Ye = (t = () => null) => a(void 0, null, function* () {
528
530
  } catch (e) {
529
531
  throw console.error("initTouchFn error", e), e;
530
532
  }
531
- }), H = f();
533
+ }), H = C();
532
534
  H.addListenerSendDeepLinkRemoveHandle = () => null;
533
- const Ze = (t = () => null) => a(void 0, null, function* () {
535
+ const Xe = (t = () => null) => a(void 0, null, function* () {
534
536
  try {
535
537
  H != null && H.addListenerSendDeepLinkRemoveHandle && typeof H.addListenerSendDeepLinkRemoveHandle == "function" && H.addListenerSendDeepLinkRemoveHandle(), H.addListenerSendDeepLinkRemoveHandle = yield ((e) => a(void 0, null, function* () {
536
538
  try {
537
539
  if (window.__MICRO_APP_ENVIRONMENT__)
538
540
  return e && window.rawWindow.__mini_app_hook__.getDeeplinkParams(e), { remove: () => null };
539
- if (d.addListener) {
540
- const r = yield d.addListener(E, "nativeSendDeeplinkCallbackListener", (n) => e && e(n));
541
+ if (_.addListener) {
542
+ const r = yield _.addListener(E, "nativeSendDeeplinkCallbackListener", (n) => e && e(n));
541
543
  return r != null && r.remove ? r.remove : () => null;
542
544
  }
543
545
  } catch (r) {
@@ -547,14 +549,14 @@ const Ze = (t = () => null) => a(void 0, null, function* () {
547
549
  } catch (e) {
548
550
  throw console.error("initTouchFn error", e), e;
549
551
  }
550
- }), F = f();
552
+ }), F = C();
551
553
  F.addListenerSwitchLanguageRemoveHandle = () => null;
552
- const Xe = (t = () => null) => a(void 0, null, function* () {
554
+ const Ye = (t = () => null) => a(void 0, null, function* () {
553
555
  try {
554
556
  F != null && F.addListenerSwitchLanguageRemoveHandle && typeof F.addListenerSwitchLanguageRemoveHandle == "function" && F.addListenerSwitchLanguageRemoveHandle(), F.addListenerSwitchLanguageRemoveHandle = yield ((e) => a(void 0, null, function* () {
555
557
  try {
556
- if (d.addListener) {
557
- const r = yield d.addListener(E, "nativeSendSwitchLanguage", (n) => e && e(n));
558
+ if (_.addListener) {
559
+ const r = yield _.addListener(E, "nativeSendSwitchLanguage", (n) => e && e(n));
558
560
  return r != null && r.remove ? r.remove : () => null;
559
561
  }
560
562
  if (window.__MICRO_APP_ENVIRONMENT__)
@@ -568,14 +570,14 @@ const Xe = (t = () => null) => a(void 0, null, function* () {
568
570
  } catch (e) {
569
571
  throw console.error("initSwitchLanguageFn error", e), e;
570
572
  }
571
- }), U = f();
573
+ }), U = C();
572
574
  U.addListenerSetupMiniAppRemoveHandle = () => null;
573
- const er = (t = () => null) => a(void 0, null, function* () {
575
+ const Qe = (t = () => null) => a(void 0, null, function* () {
574
576
  try {
575
577
  U != null && U.addListenerSetupMiniAppRemoveHandle && typeof U.addListenerSetupMiniAppRemoveHandle == "function" && U.addListenerSetupMiniAppRemoveHandle(), U.addListenerSetupMiniAppRemoveHandle = yield ((e) => a(void 0, null, function* () {
576
578
  try {
577
- if (d.addListener) {
578
- const r = yield d.addListener(E, "nativeSetupMiniApp", (n) => e && e(n));
579
+ if (_.addListener) {
580
+ const r = yield _.addListener(E, "nativeSetupMiniApp", (n) => e && e(n));
579
581
  return r != null && r.remove ? r.remove : () => null;
580
582
  }
581
583
  } catch (r) {
@@ -585,14 +587,14 @@ const er = (t = () => null) => a(void 0, null, function* () {
585
587
  } catch (e) {
586
588
  throw console.error("initSetupMiniAppFn error", e), e;
587
589
  }
588
- }), W = f();
590
+ }), W = C();
589
591
  W.addListenerSwitchStoreRemoveHandle = () => null;
590
- const rr = (t = () => null) => a(void 0, null, function* () {
592
+ const er = (t = () => null) => a(void 0, null, function* () {
591
593
  try {
592
594
  W != null && W.addListenerSwitchStoreRemoveHandle && typeof W.addListenerSwitchStoreRemoveHandle == "function" && W.addListenerSwitchStoreRemoveHandle(), W.addListenerSwitchStoreRemoveHandle = yield ((e) => a(void 0, null, function* () {
593
595
  try {
594
- if (d.addListener) {
595
- const r = yield d.addListener(E, "nativeSendSwitchStore", (n) => e && e(n));
596
+ if (_.addListener) {
597
+ const r = yield _.addListener(E, "nativeSendSwitchStore", (n) => e && e(n));
596
598
  return r != null && r.remove ? r.remove : () => null;
597
599
  }
598
600
  if (window.__MICRO_APP_ENVIRONMENT__)
@@ -627,9 +629,9 @@ class Xr {
627
629
  try {
628
630
  const { mounted: n, beforeUnmount: o, callBack: i } = r;
629
631
  n(() => {
630
- Qe(i);
632
+ Je(i);
631
633
  }), o(() => {
632
- Qe();
634
+ Je();
633
635
  });
634
636
  } catch (n) {
635
637
  throw console.error("backBtnHandle error", n), n;
@@ -648,7 +650,7 @@ class Xr {
648
650
  }
649
651
  setFabBtn(e, r) {
650
652
  try {
651
- window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.setFabBtn(e, r) : Yr(e, r);
653
+ window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.setFabBtn(e, r) : Jr(e, r);
652
654
  } catch (n) {
653
655
  throw console.error("setFabBtn error", n), n;
654
656
  }
@@ -659,9 +661,9 @@ class Xr {
659
661
  try {
660
662
  const { mounted: n, beforeUnmount: o, callBack: i } = r;
661
663
  n(() => {
662
- Ye(i);
664
+ Ze(i);
663
665
  }), o(() => {
664
- Ye();
666
+ Ze();
665
667
  });
666
668
  } catch (n) {
667
669
  throw console.error("touchListenerHandle error", n), n;
@@ -758,9 +760,9 @@ class Xr {
758
760
  try {
759
761
  const { mounted: n, beforeUnmount: o, callBack: i } = r;
760
762
  n(() => {
761
- Ze(i);
763
+ Xe(i);
762
764
  }), o(() => {
763
- Ze();
765
+ Xe();
764
766
  });
765
767
  } catch (n) {
766
768
  throw console.error("sendDeepLinkListenerHandle error", n), n;
@@ -776,9 +778,9 @@ class Xr {
776
778
  try {
777
779
  const { mounted: n, beforeUnmount: o, callBack: i } = r;
778
780
  n(() => {
779
- Xe(i);
781
+ Ye(i);
780
782
  }), o(() => {
781
- Xe();
783
+ Ye();
782
784
  });
783
785
  } catch (n) {
784
786
  throw console.error("sendSwitchLanguageHandle error", n), n;
@@ -794,9 +796,9 @@ class Xr {
794
796
  try {
795
797
  const { mounted: n, beforeUnmount: o, callBack: i } = r;
796
798
  n(() => {
797
- er(i);
799
+ Qe(i);
798
800
  }), o(() => {
799
- er();
801
+ Qe();
800
802
  });
801
803
  } catch (n) {
802
804
  throw console.error("setupMiniAppHandle error", n), n;
@@ -812,9 +814,9 @@ class Xr {
812
814
  try {
813
815
  const { mounted: n, beforeUnmount: o, callBack: i } = r;
814
816
  n(() => {
815
- rr(i);
817
+ er(i);
816
818
  }), o(() => {
817
- rr();
819
+ er();
818
820
  });
819
821
  } catch (n) {
820
822
  throw console.error("sendSwitchStoreHandle error", n), n;
@@ -862,9 +864,9 @@ class Xr {
862
864
  }
863
865
  }
864
866
  let oe = null;
865
- var _r;
866
- window.__MICRO_APP_ENVIRONMENT__ && (oe = (_r = window.rawWindow.__mini_app_status_hook__) != null ? _r : {});
867
- const Ee = d.registerPlugin("CameraScanPlugin", { web: new class extends y {
867
+ var ur;
868
+ window.__MICRO_APP_ENVIRONMENT__ && (oe = (ur = window.rawWindow.__mini_app_status_hook__) != null ? ur : {});
869
+ const Ee = _.registerPlugin("CameraScanPlugin", { web: new class extends y {
868
870
  pickCameraScan(t) {
869
871
  return a(this, null, function* () {
870
872
  return new Promise((e) => {
@@ -890,7 +892,7 @@ const Ee = d.registerPlugin("CameraScanPlugin", { web: new class extends y {
890
892
  }
891
893
  }() });
892
894
  window.removeAddListenerCameraScan = () => null;
893
- class et {
895
+ class Yr {
894
896
  pickCameraScan(e) {
895
897
  return a(this, null, function* () {
896
898
  try {
@@ -920,9 +922,9 @@ class et {
920
922
  }
921
923
  }
922
924
  let ae = null;
923
- var pr;
924
- window.__MICRO_APP_ENVIRONMENT__ && (ae = (pr = window.rawWindow.__mini_app_status_hook__) != null ? pr : {});
925
- const Re = d.registerPlugin("CameraScanMultiplePlugin", { web: new class extends y {
925
+ var _r;
926
+ window.__MICRO_APP_ENVIRONMENT__ && (ae = (_r = window.rawWindow.__mini_app_status_hook__) != null ? _r : {});
927
+ const Re = _.registerPlugin("CameraScanMultiplePlugin", { web: new class extends y {
926
928
  pickCameraScanMultiple() {
927
929
  return a(this, null, function* () {
928
930
  });
@@ -944,7 +946,7 @@ const Re = d.registerPlugin("CameraScanMultiplePlugin", { web: new class extends
944
946
  }
945
947
  }
946
948
  }() });
947
- class rt {
949
+ class Qr {
948
950
  pickCameraScanMultiple(e) {
949
951
  return a(this, null, function* () {
950
952
  try {
@@ -976,7 +978,7 @@ class rt {
976
978
  let ie = null;
977
979
  var hr;
978
980
  window.__MICRO_APP_ENVIRONMENT__ && (ie = (hr = window.rawWindow.__mini_app_status_hook__) != null ? hr : {});
979
- const ke = d.registerPlugin("CameraScanMultipleNoCountPlugin", { web: new class extends y {
981
+ const ke = _.registerPlugin("CameraScanMultipleNoCountPlugin", { web: new class extends y {
980
982
  pickCameraScanMultipleNoCount() {
981
983
  return a(this, null, function* () {
982
984
  });
@@ -998,7 +1000,7 @@ const ke = d.registerPlugin("CameraScanMultipleNoCountPlugin", { web: new class
998
1000
  }
999
1001
  }
1000
1002
  }() });
1001
- class tt {
1003
+ class et {
1002
1004
  pickCameraScanMultipleNoCount(e) {
1003
1005
  return a(this, null, function* () {
1004
1006
  try {
@@ -1028,9 +1030,9 @@ class tt {
1028
1030
  }
1029
1031
  }
1030
1032
  let se = null;
1031
- var mr;
1032
- window.__MICRO_APP_ENVIRONMENT__ && (se = (mr = window.rawWindow.__mini_app_status_hook__) != null ? mr : {});
1033
- const be = d.registerPlugin("CameraScanSingleOrDualPlugin", { web: new class extends y {
1033
+ var pr;
1034
+ window.__MICRO_APP_ENVIRONMENT__ && (se = (pr = window.rawWindow.__mini_app_status_hook__) != null ? pr : {});
1035
+ const be = _.registerPlugin("CameraScanSingleOrDualPlugin", { web: new class extends y {
1034
1036
  pickCameraScanSingleOrDual() {
1035
1037
  return a(this, null, function* () {
1036
1038
  });
@@ -1052,7 +1054,7 @@ const be = d.registerPlugin("CameraScanSingleOrDualPlugin", { web: new class ext
1052
1054
  }
1053
1055
  }
1054
1056
  }() });
1055
- class nt {
1057
+ class rt {
1056
1058
  pickCameraScanSingleOrDual(e) {
1057
1059
  return a(this, null, function* () {
1058
1060
  try {
@@ -1081,11 +1083,11 @@ class nt {
1081
1083
  });
1082
1084
  }
1083
1085
  }
1084
- const Er = "LaserScanPlugin";
1086
+ const Ar = "LaserScanPlugin";
1085
1087
  let ce = null;
1086
- var gr;
1087
- window.__MICRO_APP_ENVIRONMENT__ && (ce = (gr = window.rawWindow.__mini_app_status_hook__) != null ? gr : {});
1088
- const X = d.registerPlugin(Er, { web: new class extends y {
1088
+ var mr;
1089
+ window.__MICRO_APP_ENVIRONMENT__ && (ce = (mr = window.rawWindow.__mini_app_status_hook__) != null ? mr : {});
1090
+ const Q = _.registerPlugin(Ar, { web: new class extends y {
1089
1091
  pickLaserScan() {
1090
1092
  return a(this, null, function* () {
1091
1093
  });
@@ -1110,16 +1112,16 @@ const X = d.registerPlugin(Er, { web: new class extends y {
1110
1112
  throw console.error("laserScan getStatus error", t), t;
1111
1113
  }
1112
1114
  }
1113
- }() }), le = f();
1115
+ }() }), le = C();
1114
1116
  le.removeAddListenerLaserScan = () => null;
1115
- const tr = (t = () => null) => {
1117
+ const rr = (t = () => null) => {
1116
1118
  try {
1117
1119
  le.removeAddListenerLaserScan && le.removeAddListenerLaserScan();
1118
1120
  const e = (r) => a(void 0, null, function* () {
1119
1121
  r && (le.removeAddListenerLaserScan = yield ((n) => a(void 0, null, function* () {
1120
1122
  try {
1121
- if (d.addListener) {
1122
- const o = yield d.addListener(Er, "nativeSendLaser", (i) => n && n(i));
1123
+ if (_.addListener) {
1124
+ const o = yield _.addListener(Ar, "nativeSendLaser", (i) => n && n(i));
1123
1125
  return o != null && o.remove ? o.remove : () => null;
1124
1126
  }
1125
1127
  } catch (o) {
@@ -1134,14 +1136,14 @@ const tr = (t = () => null) => {
1134
1136
  throw console.error("laserScanFn error", e), e;
1135
1137
  }
1136
1138
  };
1137
- class ot {
1139
+ class tt {
1138
1140
  constructor() {
1139
1141
  this.pickLaserScan();
1140
1142
  }
1141
1143
  pickLaserScan() {
1142
1144
  return a(this, null, function* () {
1143
1145
  try {
1144
- return yield X.pickLaserScan({ isContinue: !1 });
1146
+ return yield Q.pickLaserScan({ isContinue: !1 });
1145
1147
  } catch (e) {
1146
1148
  throw console.error("pickLaserScan error", e), e;
1147
1149
  }
@@ -1150,7 +1152,7 @@ class ot {
1150
1152
  unPickLaserScan() {
1151
1153
  return a(this, null, function* () {
1152
1154
  try {
1153
- return yield X.unPickLaserScan();
1155
+ return yield Q.unPickLaserScan();
1154
1156
  } catch (e) {
1155
1157
  throw console.error("unPickLaserScan error", e), e;
1156
1158
  }
@@ -1158,7 +1160,7 @@ class ot {
1158
1160
  }
1159
1161
  setLaserState(e) {
1160
1162
  try {
1161
- X.setLaserState(e);
1163
+ Q.setLaserState(e);
1162
1164
  } catch (r) {
1163
1165
  throw console.error("setLaserState error", r), r;
1164
1166
  }
@@ -1168,9 +1170,9 @@ class ot {
1168
1170
  try {
1169
1171
  const { mounted: n, beforeUnmount: o, callBack: i } = r;
1170
1172
  n(() => {
1171
- tr(i);
1173
+ rr(i);
1172
1174
  }), o(() => {
1173
- tr();
1175
+ rr();
1174
1176
  });
1175
1177
  } catch (n) {
1176
1178
  throw console.error("laserScanApiParams error", n), n;
@@ -1180,18 +1182,18 @@ class ot {
1180
1182
  getStatus() {
1181
1183
  return a(this, null, function* () {
1182
1184
  try {
1183
- return yield X.getStatus();
1185
+ return yield Q.getStatus();
1184
1186
  } catch (e) {
1185
1187
  throw console.error("getStatus error", e), e;
1186
1188
  }
1187
1189
  });
1188
1190
  }
1189
1191
  }
1190
- const Rr = "CountAssistPlugin";
1192
+ const Er = "CountAssistPlugin";
1191
1193
  let we = null;
1192
- var Pr;
1193
- window.__MICRO_APP_ENVIRONMENT__ && (we = (Pr = window.rawWindow.__mini_app_status_hook__) != null ? Pr : {});
1194
- const ee = d.registerPlugin(Rr, { web: new class extends y {
1194
+ var gr;
1195
+ window.__MICRO_APP_ENVIRONMENT__ && (we = (gr = window.rawWindow.__mini_app_status_hook__) != null ? gr : {});
1196
+ const ee = _.registerPlugin(Er, { web: new class extends y {
1195
1197
  setCountAssistState(t) {
1196
1198
  return a(this, null, function* () {
1197
1199
  try {
@@ -1237,14 +1239,14 @@ const ee = d.registerPlugin(Rr, { web: new class extends y {
1237
1239
  throw console.error("countAssist getStatus error", t), t;
1238
1240
  }
1239
1241
  }
1240
- }() }), D = f();
1242
+ }() }), D = C();
1241
1243
  D.addListenerCountAssistRemoveHandle = () => null;
1242
- const nr = (t = () => null) => a(void 0, null, function* () {
1244
+ const tr = (t = () => null) => a(void 0, null, function* () {
1243
1245
  try {
1244
1246
  D != null && D.addListenerCountAssistRemoveHandle && typeof D.addListenerCountAssistRemoveHandle == "function" && D.addListenerCountAssistRemoveHandle(), D.addListenerCountAssistRemoveHandle = yield ((e) => a(void 0, null, function* () {
1245
1247
  try {
1246
- if (d.addListener) {
1247
- const r = yield d.addListener(Rr, "nativeSendCountAssist", (n) => e && e(n));
1248
+ if (_.addListener) {
1249
+ const r = yield _.addListener(Er, "nativeSendCountAssist", (n) => e && e(n));
1248
1250
  return r != null && r.remove ? r.remove : () => null;
1249
1251
  }
1250
1252
  } catch (r) {
@@ -1255,7 +1257,7 @@ const nr = (t = () => null) => a(void 0, null, function* () {
1255
1257
  throw console.error("initCountAssistFn error", e), e;
1256
1258
  }
1257
1259
  });
1258
- class at {
1260
+ class nt {
1259
1261
  setCountAssistState(e) {
1260
1262
  return a(this, null, function* () {
1261
1263
  return window.__MICRO_APP_ENVIRONMENT__ ? yield window.rawWindow.__mini_app_hook__.setCountAssistState(e) : yield ee.setCountAssistState(e);
@@ -1278,9 +1280,9 @@ class at {
1278
1280
  try {
1279
1281
  const { mounted: n, beforeUnmount: o, callBack: i } = r;
1280
1282
  n(() => {
1281
- nr(i);
1283
+ tr(i);
1282
1284
  }), o(() => {
1283
- nr();
1285
+ tr();
1284
1286
  });
1285
1287
  } catch (n) {
1286
1288
  throw console.error("setCountAssistBtnHandle error", n), n;
@@ -1308,9 +1310,9 @@ class at {
1308
1310
  }
1309
1311
  }
1310
1312
  let de = null;
1311
- var yr;
1312
- window.__MICRO_APP_ENVIRONMENT__ && (de = (yr = window.rawWindow.__mini_app_status_hook__) != null ? yr : {});
1313
- const Te = d.registerPlugin("ClickStreamPlugin", { web: new class extends y {
1313
+ var Pr;
1314
+ window.__MICRO_APP_ENVIRONMENT__ && (de = (Pr = window.rawWindow.__mini_app_status_hook__) != null ? Pr : {});
1315
+ const Te = _.registerPlugin("ClickStreamPlugin", { web: new class extends y {
1314
1316
  init() {
1315
1317
  return a(this, null, function* () {
1316
1318
  return new Promise((t) => {
@@ -1343,7 +1345,7 @@ const Te = d.registerPlugin("ClickStreamPlugin", { web: new class extends y {
1343
1345
  }
1344
1346
  }
1345
1347
  }() });
1346
- class it {
1348
+ class ot {
1347
1349
  constructor() {
1348
1350
  this.init();
1349
1351
  }
@@ -1375,12 +1377,12 @@ class it {
1375
1377
  });
1376
1378
  }
1377
1379
  }
1378
- const kr = "MiniAppLifecyclePlugin";
1380
+ const Rr = "MiniAppLifecyclePlugin";
1379
1381
  let ue = null;
1380
- var Sr;
1381
- window.__MICRO_APP_ENVIRONMENT__ && (ue = (Sr = window.rawWindow.__mini_app_status_hook__) != null ? Sr : {});
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 = d.registerPlugin(kr, { web: new class extends y {
1382
+ var yr;
1383
+ window.__MICRO_APP_ENVIRONMENT__ && (ue = (yr = window.rawWindow.__mini_app_status_hook__) != null ? yr : {});
1384
+ var Z = ((t) => (t.MINI_APP_BEFORE_UNMOUNT_PERMISSION = "mini_app_before_unmount_permission", t.MINI_APP_BEFORE_UNMOUNT_COMPLETION = "mini_app_before_unmount_completion", t))(Z || {});
1385
+ const Be = _.registerPlugin(Rr, { web: new class extends y {
1384
1386
  setNativeUsagePermission() {
1385
1387
  return a(this, null, function* () {
1386
1388
  });
@@ -1401,16 +1403,16 @@ const Be = d.registerPlugin(kr, { web: new class extends y {
1401
1403
  throw console.error("lifecycle getStatus error", t), t;
1402
1404
  }
1403
1405
  }
1404
- }() }), _e = f();
1406
+ }() }), _e = C();
1405
1407
  _e.removeAddListenerLifecycleMiniAppBeforeUnmount = () => null;
1406
- const or = (t = () => null) => {
1408
+ const nr = (t = () => null) => {
1407
1409
  try {
1408
1410
  _e.removeAddListenerLifecycleMiniAppBeforeUnmount && _e.removeAddListenerLifecycleMiniAppBeforeUnmount();
1409
1411
  const e = (r) => a(void 0, null, function* () {
1410
1412
  r && (_e.removeAddListenerLifecycleMiniAppBeforeUnmount = yield ((n) => a(void 0, null, function* () {
1411
1413
  try {
1412
- if (d.addListener) {
1413
- const o = yield d.addListener(kr, "miniAppBeforeUnmount", (i) => n && n(i));
1414
+ if (_.addListener) {
1415
+ const o = yield _.addListener(Rr, "miniAppBeforeUnmount", (i) => n && n(i));
1414
1416
  return o != null && o.remove ? o.remove : () => null;
1415
1417
  }
1416
1418
  } catch (o) {
@@ -1425,7 +1427,7 @@ const or = (t = () => null) => {
1425
1427
  throw console.error("laserScanFn error", e), e;
1426
1428
  }
1427
1429
  };
1428
- class st {
1430
+ class at {
1429
1431
  constructor() {
1430
1432
  }
1431
1433
  setNativeUsagePermission(e) {
@@ -1447,25 +1449,25 @@ class st {
1447
1449
  });
1448
1450
  }
1449
1451
  miniAppBeforeUnmount(e) {
1450
- this.setNativeUsagePermission({ action: Q.MINI_APP_BEFORE_UNMOUNT_PERMISSION, value: !0 }), ((r, n) => {
1452
+ this.setNativeUsagePermission({ action: Z.MINI_APP_BEFORE_UNMOUNT_PERMISSION, value: !0 }), ((r, n) => {
1451
1453
  try {
1452
1454
  const { mounted: o, beforeUnmount: i, callBack: c } = r;
1453
1455
  o(() => {
1454
- or((s) => a(this, null, function* () {
1456
+ nr((s) => a(this, null, function* () {
1455
1457
  var l;
1456
1458
  if (c && c instanceof Function)
1457
1459
  try {
1458
1460
  (l = c(s)) == null || l.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 });
1461
+ yield n.setNativeUsagePermission({ action: Z.MINI_APP_BEFORE_UNMOUNT_PERMISSION, value: !1 }), yield n.authorizeWebCallback({ action: Z.MINI_APP_BEFORE_UNMOUNT_COMPLETION });
1460
1462
  }));
1461
- } catch (u) {
1463
+ } catch (d) {
1462
1464
  console.error("miniAppBeforeUnmount error callBack is not a function or promise");
1463
1465
  }
1464
1466
  else
1465
1467
  console.error("miniAppBeforeUnmount error callBack is not a function or promise");
1466
1468
  }));
1467
1469
  }), i(() => a(this, null, function* () {
1468
- or(), n.setNativeUsagePermission({ action: Q.MINI_APP_BEFORE_UNMOUNT_PERMISSION, value: !1 });
1470
+ nr(), n.setNativeUsagePermission({ action: Z.MINI_APP_BEFORE_UNMOUNT_PERMISSION, value: !1 });
1469
1471
  }));
1470
1472
  } catch (o) {
1471
1473
  throw console.error("miniAppBeforeUnmount error", o), o;
@@ -1482,10 +1484,10 @@ class st {
1482
1484
  });
1483
1485
  }
1484
1486
  }
1485
- let pe = null;
1486
- var Nr;
1487
- window.__MICRO_APP_ENVIRONMENT__ && (pe = (Nr = window.rawWindow.__mini_app_status_hook__) != null ? Nr : {});
1488
- const Ve = d.registerPlugin("DeviceInteractionPlugin", { web: new class extends y {
1487
+ let he = null;
1488
+ var Sr;
1489
+ window.__MICRO_APP_ENVIRONMENT__ && (he = (Sr = window.rawWindow.__mini_app_status_hook__) != null ? Sr : {});
1490
+ const Ve = _.registerPlugin("DeviceInteractionPlugin", { web: new class extends y {
1489
1491
  callVibrate() {
1490
1492
  return a(this, null, function* () {
1491
1493
  });
@@ -1498,7 +1500,7 @@ const Ve = d.registerPlugin("DeviceInteractionPlugin", { web: new class extends
1498
1500
  try {
1499
1501
  return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => a(this, null, function* () {
1500
1502
  var e, r;
1501
- t((yield (r = (e = pe == null ? void 0 : pe.deviceInteraction) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
1503
+ t((yield (r = (e = he == null ? void 0 : he.deviceInteraction) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
1502
1504
  })) : new Promise((t) => {
1503
1505
  t(null);
1504
1506
  });
@@ -1507,7 +1509,7 @@ const Ve = d.registerPlugin("DeviceInteractionPlugin", { web: new class extends
1507
1509
  }
1508
1510
  }
1509
1511
  }() });
1510
- class ct {
1512
+ class it {
1511
1513
  callVibrate() {
1512
1514
  return a(this, null, function* () {
1513
1515
  try {
@@ -1536,11 +1538,11 @@ class ct {
1536
1538
  });
1537
1539
  }
1538
1540
  }
1539
- const br = "PollingPlugin";
1540
- let he = null;
1541
- var fr;
1542
- window.__MICRO_APP_ENVIRONMENT__ && (he = (fr = window.rawWindow.__mini_app_status_hook__) != null ? fr : {});
1543
- const He = d.registerPlugin(br, { web: new class extends y {
1541
+ const kr = "PollingPlugin";
1542
+ let pe = null;
1543
+ var Nr;
1544
+ window.__MICRO_APP_ENVIRONMENT__ && (pe = (Nr = window.rawWindow.__mini_app_status_hook__) != null ? Nr : {});
1545
+ const He = _.registerPlugin(kr, { web: new class extends y {
1544
1546
  create() {
1545
1547
  return a(this, null, function* () {
1546
1548
  });
@@ -1553,7 +1555,7 @@ const He = d.registerPlugin(br, { web: new class extends y {
1553
1555
  try {
1554
1556
  return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => a(this, null, function* () {
1555
1557
  var e, r;
1556
- t((yield (r = (e = he == null ? void 0 : he.polling) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
1558
+ t((yield (r = (e = pe == null ? void 0 : pe.polling) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
1557
1559
  })) : new Promise((t) => {
1558
1560
  t(null);
1559
1561
  });
@@ -1561,17 +1563,17 @@ const He = d.registerPlugin(br, { web: new class extends y {
1561
1563
  throw console.error("polling getStatus error", t), t;
1562
1564
  }
1563
1565
  }
1564
- }() }), me = f();
1566
+ }() }), me = C();
1565
1567
  me.removeAddListenerPolling = () => null;
1566
- const lt = (t, e) => {
1568
+ const st = (t, e) => {
1567
1569
  try {
1568
1570
  me.removeAddListenerPolling && me.removeAddListenerPolling();
1569
1571
  const r = e.pollingId;
1570
1572
  ((n) => a(void 0, null, function* () {
1571
1573
  return n && (me.removeAddListenerPolling = yield ((o) => a(void 0, null, function* () {
1572
1574
  try {
1573
- if (d.addListener) {
1574
- const i = yield d.addListener(br, "nativeSendPolling", (c) => o && o(c));
1575
+ if (_.addListener) {
1576
+ const i = yield _.addListener(kr, "nativeSendPolling", (c) => o && o(c));
1575
1577
  return i != null && i.remove ? i.remove : () => null;
1576
1578
  }
1577
1579
  } catch (i) {
@@ -1587,7 +1589,7 @@ const lt = (t, e) => {
1587
1589
  throw console.error("pollingFn error", r), r;
1588
1590
  }
1589
1591
  };
1590
- class wt {
1592
+ class ct {
1591
1593
  constructor() {
1592
1594
  P(this, "pollingList");
1593
1595
  this.pollingList = [];
@@ -1597,19 +1599,19 @@ class wt {
1597
1599
  if (window.__MICRO_APP_ENVIRONMENT__) {
1598
1600
  const { mounted: i, pollingParams: c, callBack: s } = e;
1599
1601
  return i(() => {
1600
- var l, u;
1601
- (u = (l = window.rawWindow.__mini_app_hook__) == null ? void 0 : l.addPolling) == null || u.call(l, c, s);
1602
+ var l, d;
1603
+ (d = (l = window.rawWindow.__mini_app_hook__) == null ? void 0 : l.addPolling) == null || d.call(l, c, s);
1602
1604
  }), () => {
1603
1605
  this.destroy({ pollingId: c.pollingId });
1604
1606
  };
1605
1607
  }
1606
1608
  try {
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, l) => s === l.findIndex((u) => u.pollingId === c.pollingId));
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((d) => d.pollingId === c.pollingId));
1608
1610
  const i = ((o = e == null ? void 0 : e.pollingParams) == null ? void 0 : o.delay) / 1e3;
1609
1611
  return He.create(T(b({}, e == null ? void 0 : e.pollingParams), { delay: i })), ((c, s) => {
1610
1612
  try {
1611
- const { mounted: l, pollingParams: u } = c;
1612
- l(() => lt(s, u));
1613
+ const { mounted: l, pollingParams: d } = c;
1614
+ l(() => st(s, d));
1613
1615
  } catch (l) {
1614
1616
  throw console.error("createPolling error", l), l;
1615
1617
  }
@@ -1645,9 +1647,9 @@ class wt {
1645
1647
  }
1646
1648
  }
1647
1649
  let ge = null;
1648
- var Mr;
1649
- window.__MICRO_APP_ENVIRONMENT__ && (ge = (Mr = window.rawWindow.__mini_app_status_hook__) != null ? Mr : {});
1650
- const ar = d.registerPlugin("PaymentPlugin", { web: new class extends y {
1650
+ var fr;
1651
+ window.__MICRO_APP_ENVIRONMENT__ && (ge = (fr = window.rawWindow.__mini_app_status_hook__) != null ? fr : {});
1652
+ const or = _.registerPlugin("PaymentPlugin", { web: new class extends y {
1651
1653
  process(t) {
1652
1654
  return a(this, null, function* () {
1653
1655
  try {
@@ -1672,11 +1674,11 @@ const ar = d.registerPlugin("PaymentPlugin", { web: new class extends y {
1672
1674
  }
1673
1675
  }
1674
1676
  }() });
1675
- class dt {
1677
+ class lt {
1676
1678
  process(e) {
1677
1679
  return a(this, null, function* () {
1678
1680
  try {
1679
- return yield ar.process(e);
1681
+ return yield or.process(e);
1680
1682
  } catch (r) {
1681
1683
  throw console.error("paymentPlugins.process error", r), r;
1682
1684
  }
@@ -1685,7 +1687,7 @@ class dt {
1685
1687
  getStatus() {
1686
1688
  return a(this, null, function* () {
1687
1689
  try {
1688
- return yield ar.getStatus();
1690
+ return yield or.getStatus();
1689
1691
  } catch (e) {
1690
1692
  throw console.error("getStatus error", e), e;
1691
1693
  }
@@ -1693,9 +1695,9 @@ class dt {
1693
1695
  }
1694
1696
  }
1695
1697
  let Pe = null;
1696
- var Ir;
1697
- window.__MICRO_APP_ENVIRONMENT__ && (Pe = (Ir = window.rawWindow.__mini_app_status_hook__) != null ? Ir : {});
1698
- const Fe = d.registerPlugin("CameraForTakePhotoPlugin", { web: new class extends y {
1698
+ var Mr;
1699
+ window.__MICRO_APP_ENVIRONMENT__ && (Pe = (Mr = window.rawWindow.__mini_app_status_hook__) != null ? Mr : {});
1700
+ const Fe = _.registerPlugin("CameraForTakePhotoPlugin", { web: new class extends y {
1699
1701
  pickCameraForTakePhoto() {
1700
1702
  return a(this, null, function* () {
1701
1703
  });
@@ -1717,7 +1719,7 @@ const Fe = d.registerPlugin("CameraForTakePhotoPlugin", { web: new class extends
1717
1719
  }
1718
1720
  }
1719
1721
  }() });
1720
- class ut {
1722
+ class wt {
1721
1723
  pickCameraForTakePhoto() {
1722
1724
  return a(this, null, function* () {
1723
1725
  try {
@@ -1747,9 +1749,9 @@ class ut {
1747
1749
  }
1748
1750
  }
1749
1751
  let ye = null;
1750
- var Cr;
1751
- window.__MICRO_APP_ENVIRONMENT__ && (ye = (Cr = window.rawWindow.__mini_app_status_hook__) != null ? Cr : {});
1752
- const ir = d.registerPlugin("HttpPlugin", { web: new class extends y {
1752
+ var Ir;
1753
+ window.__MICRO_APP_ENVIRONMENT__ && (ye = (Ir = window.rawWindow.__mini_app_status_hook__) != null ? Ir : {});
1754
+ const ar = _.registerPlugin("HttpPlugin", { web: new class extends y {
1753
1755
  request(t) {
1754
1756
  return a(this, null, function* () {
1755
1757
  return new Promise((e) => {
@@ -1770,7 +1772,7 @@ const ir = d.registerPlugin("HttpPlugin", { web: new class extends y {
1770
1772
  }
1771
1773
  }
1772
1774
  }() });
1773
- class _t {
1775
+ class dt {
1774
1776
  request(e) {
1775
1777
  return a(this, null, function* () {
1776
1778
  try {
@@ -1778,7 +1780,7 @@ class _t {
1778
1780
  return window.rawWindow.__mini_app_hook__.requestHttp(e);
1779
1781
  {
1780
1782
  let r = {};
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 ir.request(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 ar.request(r);
1782
1784
  }
1783
1785
  } catch (r) {
1784
1786
  throw console.error("HttpPlugin, trace error", r), r;
@@ -1788,7 +1790,7 @@ class _t {
1788
1790
  getStatus() {
1789
1791
  return a(this, null, function* () {
1790
1792
  try {
1791
- return yield ir.getStatus();
1793
+ return yield ar.getStatus();
1792
1794
  } catch (e) {
1793
1795
  throw console.error("HttpPlugin getStatus error", e), e;
1794
1796
  }
@@ -1798,31 +1800,31 @@ class _t {
1798
1800
  const S = [];
1799
1801
  for (let t = 0; t < 256; ++t)
1800
1802
  S.push((t + 256).toString(16).slice(1));
1801
- const pt = new Uint8Array(16);
1802
- function ht(t, e, r) {
1803
+ const ut = new Uint8Array(16);
1804
+ function _t(t, e, r) {
1803
1805
  return e || t || !crypto.randomUUID ? function(n, o, i) {
1804
- var s, l, u;
1806
+ var s, l, d;
1805
1807
  n = n || {};
1806
- const c = (u = (l = n.random) != null ? l : (s = n.rng) == null ? void 0 : s.call(n)) != null ? u : crypto.getRandomValues(pt);
1808
+ const c = (d = (l = n.random) != null ? l : (s = n.rng) == null ? void 0 : s.call(n)) != null ? d : crypto.getRandomValues(ut);
1807
1809
  if (c.length < 16)
1808
1810
  throw new Error("Random bytes length must be >= 16");
1809
1811
  if (c[6] = 15 & c[6] | 64, c[8] = 63 & c[8] | 128, o) {
1810
1812
  if ((i = i || 0) < 0 || i + 16 > o.length)
1811
1813
  throw new RangeError(`UUID byte range ${i}:${i + 15} is out of buffer bounds`);
1812
- for (let _ = 0; _ < 16; ++_)
1813
- o[i + _] = c[_];
1814
+ for (let w = 0; w < 16; ++w)
1815
+ o[i + w] = c[w];
1814
1816
  return o;
1815
1817
  }
1816
- return function(_, h = 0) {
1817
- return (S[_[h + 0]] + S[_[h + 1]] + S[_[h + 2]] + S[_[h + 3]] + "-" + S[_[h + 4]] + S[_[h + 5]] + "-" + S[_[h + 6]] + S[_[h + 7]] + "-" + S[_[h + 8]] + S[_[h + 9]] + "-" + S[_[h + 10]] + S[_[h + 11]] + S[_[h + 12]] + S[_[h + 13]] + S[_[h + 14]] + S[_[h + 15]]).toLowerCase();
1818
+ return function(w, h = 0) {
1819
+ return (S[w[h + 0]] + S[w[h + 1]] + S[w[h + 2]] + S[w[h + 3]] + "-" + S[w[h + 4]] + S[w[h + 5]] + "-" + S[w[h + 6]] + S[w[h + 7]] + "-" + S[w[h + 8]] + S[w[h + 9]] + "-" + S[w[h + 10]] + S[w[h + 11]] + S[w[h + 12]] + S[w[h + 13]] + S[w[h + 14]] + S[w[h + 15]]).toLowerCase();
1818
1820
  }(c);
1819
1821
  }(t, e, r) : crypto.randomUUID();
1820
1822
  }
1821
- const Tr = "PrintPlugin";
1823
+ const br = "PrintPlugin";
1822
1824
  let Se = null;
1823
- var Or;
1824
- window.__MICRO_APP_ENVIRONMENT__ && (Se = (Or = window.rawWindow.__mini_app_status_hook__) != null ? Or : {});
1825
- const sr = d.registerPlugin(Tr, { web: new class extends y {
1825
+ var Cr;
1826
+ window.__MICRO_APP_ENVIRONMENT__ && (Se = (Cr = window.rawWindow.__mini_app_status_hook__) != null ? Cr : {});
1827
+ const ir = _.registerPlugin(br, { web: new class extends y {
1826
1828
  print() {
1827
1829
  }
1828
1830
  getStatus() {
@@ -1837,17 +1839,17 @@ const sr = d.registerPlugin(Tr, { web: new class extends y {
1837
1839
  throw console.error("print getStatus error", t), t;
1838
1840
  }
1839
1841
  }
1840
- }() }), Y = f();
1841
- Y.removeAddListenerPrintList = {};
1842
- const mt = (t, e) => {
1842
+ }() }), X = C();
1843
+ X.removeAddListenerPrintList = {};
1844
+ const ht = (t, e) => {
1843
1845
  try {
1844
1846
  const r = e.printId;
1845
- Y.removeAddListenerPrintList = T(b({}, Y.removeAddListenerPrintList), { printId: () => {
1847
+ X.removeAddListenerPrintList = T(b({}, X.removeAddListenerPrintList), { printId: () => {
1846
1848
  } }), ((n) => a(void 0, null, function* () {
1847
- return n && (Y.removeAddListenerPrintList[r] = yield ((o) => a(void 0, null, function* () {
1849
+ return n && (X.removeAddListenerPrintList[r] = yield ((o) => a(void 0, null, function* () {
1848
1850
  try {
1849
- if (d.addListener) {
1850
- const i = yield d.addListener(Tr, "nativeSendPrint", (c) => o && o(c));
1851
+ if (_.addListener) {
1852
+ const i = yield _.addListener(br, "nativeSendPrint", (c) => o && o(c));
1851
1853
  return i != null && i.remove ? i.remove : () => null;
1852
1854
  }
1853
1855
  } catch (i) {
@@ -1857,32 +1859,32 @@ const mt = (t, e) => {
1857
1859
  }))((n) => {
1858
1860
  (n == null ? void 0 : n.printId) === r && (n != null && n.printId) && t.printList.forEach((o) => {
1859
1861
  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));
1862
+ 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 = X.removeAddListenerPrintList) == null ? void 0 : i[o == null ? void 0 : o.printId]) == null || c.call(i));
1861
1863
  });
1862
1864
  });
1863
1865
  } catch (r) {
1864
1866
  throw console.error("printFn error", r), r;
1865
1867
  }
1866
1868
  };
1867
- class gt {
1869
+ class pt {
1868
1870
  constructor() {
1869
1871
  P(this, "printList");
1870
1872
  this.printList = [];
1871
1873
  }
1872
1874
  print(e) {
1873
1875
  var n, o, i, c;
1874
- const r = ((o = (n = e == null ? void 0 : e.printParams) == null ? void 0 : n.functionId) != null ? o : "") + ht().replace(/-/g, "");
1875
- 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__) {
1876
+ const r = ((o = (n = e == null ? void 0 : e.printParams) == null ? void 0 : n.functionId) != null ? o : "") + _t().replace(/-/g, "");
1877
+ if (this.printList.push({ printId: r, callBack: e == null ? void 0 : e.callBack }), this.printList = this.printList.filter((s, l, d) => l === d.findIndex((w) => w.printId === s.printId)), window.__MICRO_APP_ENVIRONMENT__) {
1876
1878
  const { printParams: s, callBack: l } = e;
1877
1879
  return (c = (i = window.rawWindow.__mini_app_hook__) == null ? void 0 : i.print) == null || c.call(i, T(b({}, s), { printId: r }), l), { id: r };
1878
1880
  }
1879
1881
  try {
1880
- return sr.print(T(b({}, e == null ? void 0 : e.printParams), { printId: r })), ((s, l) => {
1882
+ return ir.print(T(b({}, e == null ? void 0 : e.printParams), { printId: r })), ((s, l) => {
1881
1883
  try {
1882
- const { printParams: u } = s;
1883
- mt(l, u);
1884
- } catch (u) {
1885
- throw console.error("createPrint error", u), u;
1884
+ const { printParams: d } = s;
1885
+ ht(l, d);
1886
+ } catch (d) {
1887
+ throw console.error("createPrint error", d), d;
1886
1888
  }
1887
1889
  })(T(b({}, e), { printParams: T(b({}, e.printParams), { printId: r }) }), this), { id: r };
1888
1890
  } catch (s) {
@@ -1892,7 +1894,7 @@ class gt {
1892
1894
  getStatus() {
1893
1895
  return a(this, null, function* () {
1894
1896
  try {
1895
- return yield sr.getStatus();
1897
+ return yield ir.getStatus();
1896
1898
  } catch (e) {
1897
1899
  throw console.error("getStatus error", e), e;
1898
1900
  }
@@ -1900,56 +1902,56 @@ class gt {
1900
1902
  }
1901
1903
  }
1902
1904
  let Ne = null;
1903
- var Lr;
1904
- window.__MICRO_APP_ENVIRONMENT__ && (Ne = (Lr = window.rawWindow.__mini_app_status_hook__) != null ? Lr : {});
1905
- const J = (t, e, r = "", n = "") => ({ success: t, message: e, type: r, fileName: n }), We = (t) => {
1905
+ var Or;
1906
+ window.__MICRO_APP_ENVIRONMENT__ && (Ne = (Or = window.rawWindow.__mini_app_status_hook__) != null ? Or : {});
1907
+ const j = (t, e, r = "", n = "") => ({ success: t, message: e, type: r, fileName: n }), We = (t) => {
1906
1908
  var e;
1907
1909
  return (e = t == null ? void 0 : t.trim().replace(/^\.+/, "").toLowerCase()) != null ? e : "";
1908
- }, Br = (t, e) => {
1909
- const r = ((n) => {
1910
- var c, s, l;
1911
- const o = We(n);
1912
- return o ? o.includes("/") ? (l = (s = ((c = o.split("/").pop()) != null ? c : "").split("+").pop()) == null ? void 0 : s.split(".").pop()) != null ? l : "" : o : "";
1913
- })(e);
1910
+ }, sr = (t, e) => {
1911
+ const r = We(e);
1914
1912
  return !r || t.toLowerCase().endsWith(`.${r}`) ? t : `${t}.${r}`;
1915
1913
  }, cr = (t) => {
1916
- var i;
1917
- const e = (i = t == null ? void 0 : t.trim()) != null ? i : "", r = e.lastIndexOf(".");
1918
- if (r <= 0 || r === e.length - 1)
1919
- return { name: e, type: "", fileName: e };
1920
- const n = e.slice(0, r), o = We(e.slice(r + 1));
1921
- return { name: n, type: o, fileName: o ? Br(n, o) : e };
1922
- }, lr = (t) => {
1923
- const e = cr(t == null ? void 0 : t.fileName), r = cr(((i) => {
1924
- if (!i)
1914
+ var s, l;
1915
+ const e = ((d) => {
1916
+ var I;
1917
+ const w = (I = d == null ? void 0 : d.trim()) != null ? I : "", h = w.lastIndexOf(".");
1918
+ if (h <= 0 || h === w.length - 1)
1919
+ return { name: w, type: "", fileName: w };
1920
+ const f = w.slice(0, h), M = We(w.slice(h + 1));
1921
+ return { name: f, type: M, fileName: M ? sr(f, M) : w };
1922
+ })(((d) => {
1923
+ var w;
1924
+ if (!d)
1925
1925
  return "";
1926
1926
  try {
1927
- const c = new URL(i, window.location.href).pathname.split("/").filter(Boolean).pop();
1928
- return c ? decodeURIComponent(c) : "";
1929
- } catch (c) {
1927
+ const h = decodeURIComponent(d).match(/[^/?#&=]+\.[a-zA-Z0-9]+(?=$|[?&#])/g);
1928
+ return (w = h == null ? void 0 : h.pop()) != null ? w : "";
1929
+ } catch (h) {
1930
1930
  return "";
1931
1931
  }
1932
- })(t == null ? void 0 : t.url)), n = We(t == null ? void 0 : t.type) || e.type || r.type, o = e.name || r.name || `path_${Date.now()}`;
1933
- return { type: n, fileName: n ? Br(o, n) : o };
1934
- }, wr = d.registerPlugin("DownloadFilePlugin", { web: new class extends y {
1932
+ })(t == null ? void 0 : t.url)), r = We(t == null ? void 0 : t.type), n = (l = (s = t == null ? void 0 : t.fileName) == null ? void 0 : s.trim()) != null ? l : "", o = e.type || r, i = n || e.name || `path_${Date.now()}`, c = !r || !n;
1933
+ return { type: o, fileName: i, downloadFileName: o ? sr(i, o) : i, hasUrlFile: !!e.type, requiresUrlFile: c };
1934
+ }, lr = _.registerPlugin("DownloadFilePlugin", { web: new class extends y {
1935
1935
  downloadFile(t) {
1936
1936
  return a(this, null, function* () {
1937
1937
  var e;
1938
1938
  try {
1939
- const { type: r, fileName: n } = lr(t), o = (e = t == null ? void 0 : t.url) == null ? void 0 : e.trim();
1939
+ const { type: r, fileName: n, downloadFileName: o, hasUrlFile: i, requiresUrlFile: c } = cr(t), s = (e = t == null ? void 0 : t.url) == null ? void 0 : e.trim();
1940
+ if (c && !i)
1941
+ return j(!1, "Missing file name or type in url", r, n);
1940
1942
  if (!r)
1941
- return J(!1, "Missing required parameter: type", r, n);
1942
- if (!o)
1943
- return J(!1, "Missing required parameter: url", r, n);
1944
- const i = yield fetch(o, t == null ? void 0 : t.fetchOptions);
1945
- if (!i.ok)
1946
- return J(!1, `HTTP error! status: ${i.status}`, r, n);
1947
- const c = yield i.blob(), s = window.URL.createObjectURL(c), l = document.createElement("a");
1948
- return l.href = s, l.download = n, document.body.appendChild(l), l.click(), l.remove(), window.setTimeout(() => window.URL.revokeObjectURL(s), 0), J(!0, "download success", r, n);
1943
+ return j(!1, "Missing required parameter: type", r, n);
1944
+ if (!s)
1945
+ return j(!1, "Missing required parameter: url", r, n);
1946
+ const l = yield fetch(s, t == null ? void 0 : t.fetchOptions);
1947
+ if (!l.ok)
1948
+ return j(!1, `HTTP error! status: ${l.status}`, r, n);
1949
+ const d = yield l.blob(), w = window.URL.createObjectURL(d), h = document.createElement("a");
1950
+ return h.href = w, h.download = o, document.body.appendChild(h), h.click(), h.remove(), window.setTimeout(() => window.URL.revokeObjectURL(w), 0), j(!0, "download success", r, n);
1949
1951
  } catch (r) {
1950
1952
  console.error("downloadFile error", r);
1951
- const { type: n, fileName: o } = lr(t);
1952
- return J(!1, r instanceof Error ? r.message : "download failed", n, o);
1953
+ const { type: n, fileName: o } = cr(t);
1954
+ return j(!1, r instanceof Error ? r.message : "download failed", n, o);
1953
1955
  }
1954
1956
  });
1955
1957
  }
@@ -1965,94 +1967,89 @@ const J = (t, e, r = "", n = "") => ({ success: t, message: e, type: r, fileName
1965
1967
  throw console.error("downloadFile getStatus error", t), t;
1966
1968
  }
1967
1969
  }
1968
- }() }), De = (t) => {
1970
+ }() }), wr = (t) => {
1969
1971
  var e;
1970
1972
  return (e = t == null ? void 0 : t.trim().replace(/^\.+/, "").toLowerCase()) != null ? e : "";
1971
- }, Pt = (t, e) => {
1972
- const r = ((n) => {
1973
- var c, s, l;
1974
- const o = De(n);
1975
- return o ? o.includes("/") ? (l = (s = ((c = o.split("/").pop()) != null ? c : "").split("+").pop()) == null ? void 0 : s.split(".").pop()) != null ? l : "" : o : "";
1976
- })(e);
1977
- return !r || t.toLowerCase().endsWith(`.${r}`) ? t : `${t}.${r}`;
1978
- }, dr = (t) => {
1973
+ }, dr = (t, e) => {
1979
1974
  var n;
1980
- const e = (n = t == null ? void 0 : t.trim()) != null ? n : "", r = e.lastIndexOf(".");
1981
- return r <= 0 || r === e.length - 1 ? { name: e, type: "" } : { name: e.slice(0, r), type: De(e.slice(r + 1)) };
1982
- }, ur = (t, e) => {
1983
- const r = dr(t == null ? void 0 : t.fileName), n = dr(((c) => {
1984
- if (!c)
1975
+ const r = ((o) => {
1976
+ var s;
1977
+ const i = (s = o == null ? void 0 : o.trim()) != null ? s : "", c = i.lastIndexOf(".");
1978
+ return c <= 0 || c === i.length - 1 ? { name: i, type: "" } : { name: i.slice(0, c), type: wr(i.slice(c + 1)) };
1979
+ })(((o) => {
1980
+ var i;
1981
+ if (!o)
1985
1982
  return "";
1986
1983
  try {
1987
- const s = new URL(c, window.location.href).pathname.split("/").filter(Boolean).pop();
1988
- return s ? decodeURIComponent(s) : "";
1989
- } catch (s) {
1984
+ const c = decodeURIComponent(o).match(/[^/?#&=]+\.[a-zA-Z0-9]+(?=$|[?&#])/g);
1985
+ return (i = c == null ? void 0 : c.pop()) != null ? i : "";
1986
+ } catch (c) {
1990
1987
  return "";
1991
1988
  }
1992
- })(t == null ? void 0 : t.url)), o = De(t == null ? void 0 : t.type) || r.type || n.type, i = r.name || n.name || `path_${Date.now()}`;
1993
- return { success: !1, message: e, type: o, fileName: o ? Pt(i, o) : i };
1989
+ })(t == null ? void 0 : t.url));
1990
+ return { success: !1, message: e, type: r.type || wr(t == null ? void 0 : t.type), fileName: ((n = t == null ? void 0 : t.fileName) == null ? void 0 : n.trim()) || r.name || `path_${Date.now()}` };
1994
1991
  };
1995
- class yt {
1992
+ class mt {
1996
1993
  downloadFile(e) {
1997
1994
  return a(this, null, function* () {
1998
1995
  try {
1999
1996
  if (window.__MICRO_APP_ENVIRONMENT__) {
2000
1997
  const r = window.rawWindow.__mini_app_hook__.downloadFile;
2001
- return r ? yield r(e) : ur(e, "DownloadFilePlugin is not available");
1998
+ return r ? yield r(e) : dr(e, "DownloadFilePlugin is not available");
2002
1999
  }
2003
- return yield wr.downloadFile(e);
2000
+ return yield lr.downloadFile(e);
2004
2001
  } catch (r) {
2005
- return console.error("downloadFile error", r), ur(e, r instanceof Error ? r.message : "download failed");
2002
+ return console.error("downloadFile error", r), dr(e, r instanceof Error ? r.message : "download failed");
2006
2003
  }
2007
2004
  });
2008
2005
  }
2009
2006
  getStatus() {
2010
2007
  return a(this, null, function* () {
2011
2008
  try {
2012
- return yield wr.getStatus();
2009
+ return yield lr.getStatus();
2013
2010
  } catch (e) {
2014
2011
  throw console.error("downloadFile getStatus error", e), e;
2015
2012
  }
2016
2013
  });
2017
2014
  }
2018
2015
  }
2019
- class St {
2016
+ class gt {
2020
2017
  constructor() {
2021
- P(this, "initialContextPlugins", new Qr());
2018
+ P(this, "initialContextPlugins", new Gr());
2022
2019
  P(this, "communicatePlugins", new Xr());
2023
- P(this, "cameraScanPlugins", new et());
2024
- P(this, "cameraScanMultiplePlugins", new rt());
2025
- P(this, "cameraScanMultipleNoCountPlugins", new tt());
2026
- P(this, "cameraScanSingleOrDualPlugins", new nt());
2027
- P(this, "laserScanPlugins", new ot());
2028
- P(this, "countAssistPlugins", new at());
2029
- P(this, "clickStreamPlugins", new it());
2030
- P(this, "lifecyclePlugins", new st());
2031
- P(this, "deviceInteractionPlugins", new ct());
2032
- P(this, "pollingPlugins", new wt());
2033
- P(this, "paymentPlugins", new dt());
2034
- P(this, "cameraForTakePhotoPlugin", new ut());
2035
- P(this, "httpPlugin", new _t());
2036
- P(this, "printPlugins", new gt());
2037
- P(this, "downloadFilePlugin", new yt());
2020
+ P(this, "cameraScanPlugins", new Yr());
2021
+ P(this, "cameraScanMultiplePlugins", new Qr());
2022
+ P(this, "cameraScanMultipleNoCountPlugins", new et());
2023
+ P(this, "cameraScanSingleOrDualPlugins", new rt());
2024
+ P(this, "laserScanPlugins", new tt());
2025
+ P(this, "countAssistPlugins", new nt());
2026
+ P(this, "clickStreamPlugins", new ot());
2027
+ P(this, "lifecyclePlugins", new at());
2028
+ P(this, "deviceInteractionPlugins", new it());
2029
+ P(this, "pollingPlugins", new ct());
2030
+ P(this, "paymentPlugins", new lt());
2031
+ P(this, "cameraForTakePhotoPlugin", new wt());
2032
+ P(this, "httpPlugin", new dt());
2033
+ P(this, "printPlugins", new pt());
2034
+ P(this, "downloadFilePlugin", new mt());
2038
2035
  }
2039
2036
  }
2040
- const Mt = new St();
2041
- let w = null, fe = null;
2042
- var vr, Ar;
2043
- window.__MICRO_APP_ENVIRONMENT__ && (w = (vr = window.rawWindow.__mini_app_hook__) != null ? vr : {}, fe = (Ar = window.rawWindow.__mini_app_status_hook__) != null ? Ar : {});
2044
- const Nt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: class extends y {
2037
+ const St = new gt();
2038
+ let u = null, fe = null;
2039
+ var vr, Lr;
2040
+ window.__MICRO_APP_ENVIRONMENT__ && (u = (vr = window.rawWindow.__mini_app_hook__) != null ? vr : {}, fe = (Lr = window.rawWindow.__mini_app_status_hook__) != null ? Lr : {});
2041
+ const Pt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: class extends y {
2045
2042
  homeIsClick(t) {
2046
2043
  return a(this, null, function* () {
2047
2044
  var e;
2048
- window.__MICRO_APP_ENVIRONMENT__ && (console.log("window.microApp.forceDispatch homeIsClick", t), (e = w.disabledMenu) == null || e.call(w, t));
2045
+ window.__MICRO_APP_ENVIRONMENT__ && (console.log("window.microApp.forceDispatch homeIsClick", t), (e = u.disabledMenu) == null || e.call(u, t));
2049
2046
  });
2050
2047
  }
2051
2048
  openMiniApp(t) {
2052
2049
  return a(this, null, function* () {
2053
2050
  var e;
2054
2051
  try {
2055
- return window.__MICRO_APP_ENVIRONMENT__ && ((e = w.openMiniApp) == null || e.call(w, t)), new Promise((r) => {
2052
+ return window.__MICRO_APP_ENVIRONMENT__ && ((e = u.openMiniApp) == null || e.call(u, t)), new Promise((r) => {
2056
2053
  r(t);
2057
2054
  });
2058
2055
  } catch (r) {
@@ -2064,7 +2061,7 @@ const Nt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
2064
2061
  return a(this, null, function* () {
2065
2062
  var e;
2066
2063
  try {
2067
- return window.__MICRO_APP_ENVIRONMENT__ && (console.log("window.microApp.forceDispatch showTitle", t), (e = w.showTitle) == null || e.call(w, t)), new Promise((r) => {
2064
+ return window.__MICRO_APP_ENVIRONMENT__ && (console.log("window.microApp.forceDispatch showTitle", t), (e = u.showTitle) == null || e.call(u, t)), new Promise((r) => {
2068
2065
  r(t);
2069
2066
  });
2070
2067
  } catch (r) {
@@ -2076,7 +2073,7 @@ const Nt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
2076
2073
  return a(this, null, function* () {
2077
2074
  var e;
2078
2075
  try {
2079
- return window.__MICRO_APP_ENVIRONMENT__ && ((e = w.showFABMenu) == null || e.call(w, t)), new Promise((r) => {
2076
+ return window.__MICRO_APP_ENVIRONMENT__ && ((e = u.showFABMenu) == null || e.call(u, t)), new Promise((r) => {
2080
2077
  r(t);
2081
2078
  });
2082
2079
  } catch (r) {
@@ -2088,7 +2085,7 @@ const Nt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
2088
2085
  return a(this, null, function* () {
2089
2086
  var e;
2090
2087
  try {
2091
- return window.__MICRO_APP_ENVIRONMENT__ && ((e = w.disableFAB) == null || e.call(w, t)), new Promise((r) => {
2088
+ return window.__MICRO_APP_ENVIRONMENT__ && ((e = u.disableFAB) == null || e.call(u, t)), new Promise((r) => {
2092
2089
  r(t);
2093
2090
  });
2094
2091
  } catch (r) {
@@ -2100,7 +2097,7 @@ const Nt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
2100
2097
  return a(this, null, function* () {
2101
2098
  var e;
2102
2099
  try {
2103
- return window.__MICRO_APP_ENVIRONMENT__ && ((e = w.disableBack) == null || e.call(w, t)), new Promise((r) => {
2100
+ return window.__MICRO_APP_ENVIRONMENT__ && ((e = u.disableBack) == null || e.call(u, t)), new Promise((r) => {
2104
2101
  r(t);
2105
2102
  });
2106
2103
  } catch (r) {
@@ -2112,7 +2109,7 @@ const Nt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
2112
2109
  return a(this, null, function* () {
2113
2110
  var e;
2114
2111
  try {
2115
- return window.__MICRO_APP_ENVIRONMENT__ && ((e = w.showSubMask) == null || e.call(w, t)), new Promise((r) => {
2112
+ return window.__MICRO_APP_ENVIRONMENT__ && ((e = u.showSubMask) == null || e.call(u, t)), new Promise((r) => {
2116
2113
  r(t);
2117
2114
  });
2118
2115
  } catch (r) {
@@ -2124,7 +2121,7 @@ const Nt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
2124
2121
  return a(this, null, function* () {
2125
2122
  var e;
2126
2123
  try {
2127
- return window.__MICRO_APP_ENVIRONMENT__ && ((e = w.setMiniAppVersion) == null || e.call(w, t)), new Promise((r) => {
2124
+ return window.__MICRO_APP_ENVIRONMENT__ && ((e = u.setMiniAppVersion) == null || e.call(u, t)), new Promise((r) => {
2128
2125
  r(t);
2129
2126
  });
2130
2127
  } catch (r) {
@@ -2135,13 +2132,13 @@ const Nt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
2135
2132
  showDialog() {
2136
2133
  return a(this, null, function* () {
2137
2134
  var t;
2138
- window.__MICRO_APP_ENVIRONMENT__ && ((t = w.showDialog) == null || t.call(w));
2135
+ window.__MICRO_APP_ENVIRONMENT__ && ((t = u.showDialog) == null || t.call(u));
2139
2136
  });
2140
2137
  }
2141
2138
  cancelDialog() {
2142
2139
  return a(this, null, function* () {
2143
2140
  var t;
2144
- window.__MICRO_APP_ENVIRONMENT__ && ((t = w.cancelDialog) == null || t.call(w));
2141
+ window.__MICRO_APP_ENVIRONMENT__ && ((t = u.cancelDialog) == null || t.call(u));
2145
2142
  });
2146
2143
  }
2147
2144
  getMiniAppKong(t) {
@@ -2149,7 +2146,7 @@ const Nt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
2149
2146
  var e, r;
2150
2147
  try {
2151
2148
  if (window.__MICRO_APP_ENVIRONMENT__) {
2152
- const n = (r = (e = w.getMiniAppKong) == null ? void 0 : e.call(w, t)) != null ? r : {};
2149
+ const n = (r = (e = u.getMiniAppKong) == null ? void 0 : e.call(u, t)) != null ? r : {};
2153
2150
  return new Promise((o) => {
2154
2151
  o(n);
2155
2152
  });
@@ -2165,7 +2162,7 @@ const Nt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
2165
2162
  closeMiniApp() {
2166
2163
  return a(this, null, function* () {
2167
2164
  var t;
2168
- window.__MICRO_APP_ENVIRONMENT__ && ((t = w.closeMiniApp) == null || t.call(w));
2165
+ window.__MICRO_APP_ENVIRONMENT__ && ((t = u.closeMiniApp) == null || t.call(u));
2169
2166
  });
2170
2167
  }
2171
2168
  getStatus() {
@@ -2184,7 +2181,7 @@ const Nt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
2184
2181
  try {
2185
2182
  return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((e) => a(this, null, function* () {
2186
2183
  var r;
2187
- e((yield (r = w == null ? void 0 : w.dispatchToShell) == null ? void 0 : r.call(w, t)) || {});
2184
+ e((yield (r = u == null ? void 0 : u.dispatchToShell) == null ? void 0 : r.call(u, t)) || {});
2188
2185
  })) : new Promise((e) => {
2189
2186
  e(t);
2190
2187
  });
@@ -2196,7 +2193,7 @@ const Nt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
2196
2193
  try {
2197
2194
  return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((e) => a(this, null, function* () {
2198
2195
  var r;
2199
- e((yield (r = w == null ? void 0 : w.getMiniAppInfo) == null ? void 0 : r.call(w, t)) || {});
2196
+ e((yield (r = u == null ? void 0 : u.getMiniAppInfo) == null ? void 0 : r.call(u, t)) || {});
2200
2197
  })) : new Promise((e) => {
2201
2198
  e({});
2202
2199
  });
@@ -2206,6 +2203,6 @@ const Nt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
2206
2203
  }
2207
2204
  } }, Symbol.toStringTag, { value: "Module" }));
2208
2205
  export {
2209
- St as NativeApi,
2210
- Mt as default
2206
+ gt as NativeApi,
2207
+ St as default
2211
2208
  };