superapp-miniapp-invoke-native 1.3.4 → 1.5.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 CHANGED
@@ -14,7 +14,7 @@ declare interface BackBtnParamsType {
14
14
  callBack?: PluginCallback;
15
15
  }
16
16
 
17
- declare interface cameraMultipleParamsType {
17
+ declare interface CameraMultipleParamsType {
18
18
  itemCode: string;
19
19
  barcode: string[];
20
20
  }
@@ -24,36 +24,56 @@ declare interface CameraScanMultipleNoCountParamsType {
24
24
  codes: any[];
25
25
  }
26
26
 
27
+ declare interface CameraScanMultipleNoCountParamsTypeStateParamsType {
28
+ isOpenCameraScanMultipleNoCount: boolean;
29
+ }
30
+
27
31
  declare class CameraScanMultipleNoCountPlugins implements CameraScanMultipleNoCountPluginsHandleType {
28
32
  pickCameraScanMultipleNoCount(cameraMultipleNoCountParams: CameraScanMultipleNoCountParamsType): Promise<void>;
33
+ setCameraScanMultipleNoCountState(cameraMultipleNoCountStateParams: CameraScanMultipleNoCountParamsTypeStateParamsType): Promise<void>;
29
34
  }
30
35
 
31
36
  declare interface CameraScanMultipleNoCountPluginsHandleType {
32
37
  pickCameraScanMultipleNoCount(cameraMultipleNoCountParams: CameraScanMultipleNoCountParamsType): Promise<void>;
38
+ setCameraScanMultipleNoCountState(cameraMultipleNoCountStateParams: CameraScanMultipleNoCountParamsTypeStateParamsType): Promise<void>;
33
39
  }
34
40
 
35
41
  declare class CameraScanMultiplePlugins implements CameraScanMultiplePluginsHandleType {
36
- pickCameraScanMultiple(cameraMultipleParams: cameraMultipleParamsType): Promise<void>;
42
+ pickCameraScanMultiple(cameraMultipleParams: CameraMultipleParamsType): Promise<void>;
43
+ setCameraScanMultipleState(cameraScanMultipleStateParams: CameraScanMultipleStateParamsType): Promise<void>;
37
44
  }
38
45
 
39
46
  declare interface CameraScanMultiplePluginsHandleType {
40
- pickCameraScanMultiple(cameraMultipleParams: cameraMultipleParamsType): Promise<void>;
47
+ pickCameraScanMultiple(cameraMultipleParams: CameraMultipleParamsType): Promise<void>;
48
+ setCameraScanMultipleState(cameraScanMultipleStateParams: CameraScanMultipleStateParamsType): Promise<void>;
49
+ }
50
+
51
+ declare interface CameraScanMultipleStateParamsType {
52
+ isOpenCameraScanMultiple: boolean;
41
53
  }
42
54
 
43
55
  declare class CameraScanPlugins implements CameraScanPluginsHandleType {
44
- pickCameraScan(pickCameraScan?: pickCameraScanParamsType): Promise<pickCameraScanParamsType>;
56
+ pickCameraScan(pickCameraScan?: PickCameraScanParamsType): Promise<PickCameraScanParamsType>;
57
+ setCameraScanState(cameraScanStateParams: CameraScanStateParamsType): Promise<void>;
45
58
  }
46
59
 
47
60
  declare interface CameraScanPluginsHandleType {
48
- pickCameraScan(pickCameraScan: pickCameraScanParamsType): Promise<pickCameraScanParamsType | undefined>;
61
+ pickCameraScan(pickCameraScan: PickCameraScanParamsType): Promise<PickCameraScanParamsType | undefined>;
62
+ setCameraScanState(cameraScanStateParams: CameraScanStateParamsType): Promise<void>;
49
63
  }
50
64
 
51
65
  declare class CameraScanSingleOrDualPlugins implements CameraScanSingleOrDualPluginsHandleType {
52
66
  pickCameraScanSingleOrDual(cameraScanSingleOrDualParams?: CameraScanSingleOrDualType): Promise<void>;
67
+ setCameraScanSingleOrDualState(isOpenCameraScanSingleOrDual: CameraScanSingleOrDualStateParamsType): Promise<void>;
53
68
  }
54
69
 
55
70
  declare interface CameraScanSingleOrDualPluginsHandleType {
56
71
  pickCameraScanSingleOrDual(cameraScanSingleOrDualParams: CameraScanSingleOrDualType): Promise<void>;
72
+ setCameraScanSingleOrDualState(isOpenCameraScanSingleOrDual: CameraScanSingleOrDualStateParamsType): Promise<void>;
73
+ }
74
+
75
+ declare interface CameraScanSingleOrDualStateParamsType {
76
+ isOpenCameraScanSingleOrDual: boolean;
57
77
  }
58
78
 
59
79
  declare interface CameraScanSingleOrDualType {
@@ -61,6 +81,10 @@ declare interface CameraScanSingleOrDualType {
61
81
  barcode: string[];
62
82
  }
63
83
 
84
+ declare interface CameraScanStateParamsType {
85
+ isOpenCameraScan: boolean;
86
+ }
87
+
64
88
  declare class ClickStreamPlugins implements ClickStreamPluginsHandleType {
65
89
  constructor();
66
90
  init(): Promise<void>;
@@ -116,9 +140,29 @@ declare interface CountAssistPluginsType {
116
140
  setCountAssistBtn(setCountAssistBtnParams: SetCountAssistBtnParamsType): void;
117
141
  }
118
142
 
143
+ declare interface CreatePollingParamsType {
144
+ pollingParams: PollingParamsType;
145
+ mounted: (fn: () => void) => void;
146
+ callBack?: (value: NativeSendPollingParamsType) => void;
147
+ }
148
+
119
149
  declare const _default: NativeApi;
120
150
  export default _default;
121
151
 
152
+ declare interface DestroyPollingParamsType {
153
+ pollingId: string;
154
+ }
155
+
156
+ declare interface DeviceInteractionHandleType {
157
+ callVibrate: () => Promise<void | undefined>;
158
+ callErrorBeep: () => Promise<void | undefined>;
159
+ }
160
+
161
+ declare class DeviceInteractionPlugin implements DeviceInteractionHandleType {
162
+ callVibrate(): Promise<void>;
163
+ callErrorBeep(): Promise<void>;
164
+ }
165
+
122
166
  declare type FabBtnHandleType = (data: SetFabDataType | any) => void;
123
167
 
124
168
  declare type HomeBtnHandleType = (cb: PluginCallback) => void;
@@ -208,6 +252,8 @@ export declare class NativeApi {
208
252
  countAssistPlugins: CountAssistPlugins;
209
253
  clickStreamPlugins: ClickStreamPlugins;
210
254
  lifecyclePlugins: LifecyclePlugins;
255
+ deviceInteractionPlugins: DeviceInteractionPlugin;
256
+ pollingPlugins: PollingPlugins;
211
257
  }
212
258
 
213
259
  declare interface NativeInfoConfigType {
@@ -223,12 +269,36 @@ declare interface NativeInfoConfigType {
223
269
  };
224
270
  }
225
271
 
272
+ declare interface NativeSendPollingParamsType {
273
+ pollingId: string;
274
+ [key: string]: any;
275
+ }
276
+
226
277
  declare type PackOrdersScanBoxType = "pack_orders_scan_box" | "collect_orders_scan_box";
227
278
 
228
- declare interface pickCameraScanParamsType {
279
+ declare interface PickCameraScanParamsType {
229
280
  title: string;
230
281
  }
231
282
 
283
+ declare interface PollingParamsType {
284
+ pollingId: string;
285
+ pollingStartTime: number;
286
+ pollingEndTime: number;
287
+ delay: number;
288
+ }
289
+
290
+ declare class PollingPlugins implements PollingPluginsHandleType {
291
+ pollingList: any[];
292
+ constructor();
293
+ create(createPollingParams: CreatePollingParamsType): () => void | null;
294
+ destroy(destroyPollingParams: DestroyPollingParamsType): void;
295
+ }
296
+
297
+ declare interface PollingPluginsHandleType {
298
+ create(createPollingParams: CreatePollingParamsType): void;
299
+ destroy(pollingParams: PollingParamsType): void;
300
+ }
301
+
232
302
  declare interface SetCountAssistBtnParamsType {
233
303
  mounted: (fn: () => void) => void;
234
304
  beforeUnmount: (fn: () => void) => void;
package/lib/main.js CHANGED
@@ -1,24 +1,34 @@
1
- var ge = Object.defineProperty;
2
- var ve = (r, e, t) => e in r ? ge(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
- var v = (r, e, t) => (ve(r, typeof e != "symbol" ? e + "" : e, t), t);
1
+ var Be = Object.defineProperty, Ee = Object.defineProperties;
2
+ var Ie = Object.getOwnPropertyDescriptors;
3
+ var ie = Object.getOwnPropertySymbols;
4
+ var Ue = Object.prototype.hasOwnProperty, xe = Object.prototype.propertyIsEnumerable;
5
+ var Y = (r, e, t) => e in r ? Be(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, ce = (r, e) => {
6
+ for (var t in e || (e = {}))
7
+ Ue.call(e, t) && Y(r, t, e[t]);
8
+ if (ie)
9
+ for (var t of ie(e))
10
+ xe.call(e, t) && Y(r, t, e[t]);
11
+ return r;
12
+ }, le = (r, e) => Ee(r, Ie(e));
13
+ var g = (r, e, t) => (Y(r, typeof e != "symbol" ? e + "" : e, t), t);
4
14
  var a = (r, e, t) => new Promise((n, o) => {
5
- var s = (w) => {
15
+ var s = (l) => {
6
16
  try {
7
- i(t.next(w));
17
+ i(t.next(l));
8
18
  } catch (m) {
9
19
  o(m);
10
20
  }
11
- }, c = (w) => {
21
+ }, c = (l) => {
12
22
  try {
13
- i(t.throw(w));
23
+ i(t.throw(l));
14
24
  } catch (m) {
15
25
  o(m);
16
26
  }
17
- }, i = (w) => w.done ? n(w.value) : Promise.resolve(w.value).then(s, c);
27
+ }, i = (l) => l.done ? n(l.value) : Promise.resolve(l.value).then(s, c);
18
28
  i((t = t.apply(r, e)).next());
19
29
  });
20
30
  /*! Capacitor: https://capacitorjs.com/ - MIT License */
21
- const be = (r) => r.CapacitorPlatforms = ((e) => {
31
+ const He = (r) => r.CapacitorPlatforms = ((e) => {
22
32
  const t = /* @__PURE__ */ new Map();
23
33
  t.set("web", { name: "web" });
24
34
  const n = e.CapacitorPlatforms || { currentPlatform: { name: "web" }, platforms: t };
@@ -27,91 +37,91 @@ const be = (r) => r.CapacitorPlatforms = ((e) => {
27
37
  }, n.setPlatform = (o) => {
28
38
  n.platforms.has(o) && (n.currentPlatform = n.platforms.get(o));
29
39
  }, n;
30
- })(r), ae = be(typeof globalThis != "undefined" ? globalThis : typeof self != "undefined" ? self : typeof window != "undefined" ? window : typeof global != "undefined" ? global : {});
31
- var E;
32
- ae.addPlatform, ae.setPlatform, function(r) {
40
+ })(r), de = He(typeof globalThis != "undefined" ? globalThis : typeof self != "undefined" ? self : typeof window != "undefined" ? window : typeof global != "undefined" ? global : {});
41
+ var U;
42
+ de.addPlatform, de.setPlatform, function(r) {
33
43
  r.Unimplemented = "UNIMPLEMENTED", r.Unavailable = "UNAVAILABLE";
34
- }(E || (E = {}));
35
- class X extends Error {
44
+ }(U || (U = {}));
45
+ class Z extends Error {
36
46
  constructor(e, t, n) {
37
47
  super(e), this.message = e, this.code = t, this.data = n;
38
48
  }
39
49
  }
40
- const Pe = (r) => {
50
+ const _e = (r) => {
41
51
  var e, t, n, o, s;
42
- const c = r.CapacitorCustomPlatform || null, i = r.Capacitor || {}, w = i.Plugins = i.Plugins || {}, m = r.CapacitorPlatforms, b = ((e = m == null ? void 0 : m.currentPlatform) === null || e === void 0 ? void 0 : e.getPlatform) || (() => c !== null ? c.name : ((l) => {
43
- var d, h;
44
- return l != null && l.androidBridge ? "android" : !((h = (d = l == null ? void 0 : l.webkit) === null || d === void 0 ? void 0 : d.messageHandlers) === null || h === void 0) && h.bridge ? "ios" : "web";
45
- })(r)), f = ((t = m == null ? void 0 : m.currentPlatform) === null || t === void 0 ? void 0 : t.isNativePlatform) || (() => b() !== "web"), g = ((n = m == null ? void 0 : m.currentPlatform) === null || n === void 0 ? void 0 : n.isPluginAvailable) || ((l) => {
46
- const d = P.get(l);
47
- return !!(d != null && d.platforms.has(b())) || !!B(l);
48
- }), B = ((o = m == null ? void 0 : m.currentPlatform) === null || o === void 0 ? void 0 : o.getPluginHeader) || ((l) => {
49
- var d;
50
- return (d = i.PluginHeaders) === null || d === void 0 ? void 0 : d.find((h) => h.name === l);
51
- }), P = /* @__PURE__ */ new Map(), L = ((s = m == null ? void 0 : m.currentPlatform) === null || s === void 0 ? void 0 : s.registerPlugin) || ((l, d = {}) => {
52
- const h = P.get(l);
53
- if (h)
54
- return console.warn(`Capacitor plugin "${l}" already registered. Cannot register plugins twice.`), h.proxy;
55
- const S = b(), _ = B(l);
52
+ const c = r.CapacitorCustomPlatform || null, i = r.Capacitor || {}, l = i.Plugins = i.Plugins || {}, m = r.CapacitorPlatforms, P = ((e = m == null ? void 0 : m.currentPlatform) === null || e === void 0 ? void 0 : e.getPlatform) || (() => c !== null ? c.name : ((d) => {
53
+ var h, w;
54
+ return d != null && d.androidBridge ? "android" : !((w = (h = d == null ? void 0 : d.webkit) === null || h === void 0 ? void 0 : h.messageHandlers) === null || w === void 0) && w.bridge ? "ios" : "web";
55
+ })(r)), f = ((t = m == null ? void 0 : m.currentPlatform) === null || t === void 0 ? void 0 : t.isNativePlatform) || (() => P() !== "web"), v = ((n = m == null ? void 0 : m.currentPlatform) === null || n === void 0 ? void 0 : n.isPluginAvailable) || ((d) => {
56
+ const h = b.get(d);
57
+ return !!(h != null && h.platforms.has(P())) || !!E(d);
58
+ }), E = ((o = m == null ? void 0 : m.currentPlatform) === null || o === void 0 ? void 0 : o.getPluginHeader) || ((d) => {
59
+ var h;
60
+ return (h = i.PluginHeaders) === null || h === void 0 ? void 0 : h.find((w) => w.name === d);
61
+ }), b = /* @__PURE__ */ new Map(), S = ((s = m == null ? void 0 : m.currentPlatform) === null || s === void 0 ? void 0 : s.registerPlugin) || ((d, h = {}) => {
62
+ const w = b.get(d);
63
+ if (w)
64
+ return console.warn(`Capacitor plugin "${d}" already registered. Cannot register plugins twice.`), w.proxy;
65
+ const L = P(), x = E(d);
56
66
  let M;
57
- const V = (k) => {
67
+ const G = (k) => {
58
68
  let A;
59
- const U = (...R) => {
60
- const x = (() => a(void 0, null, function* () {
61
- return !M && S in d ? M = M = typeof d[S] == "function" ? yield d[S]() : d[S] : c !== null && !M && "web" in d && (M = M = typeof d.web == "function" ? yield d.web() : d.web), M;
62
- }))().then((I) => {
63
- const ne = ((C, j) => {
64
- var J, Q;
65
- if (!_) {
69
+ const I = (...R) => {
70
+ const H = (() => a(void 0, null, function* () {
71
+ return !M && L in h ? M = M = typeof h[L] == "function" ? yield h[L]() : h[L] : c !== null && !M && "web" in h && (M = M = typeof h.web == "function" ? yield h.web() : h.web), M;
72
+ }))().then((_) => {
73
+ const ae = ((C, j) => {
74
+ var Q, X;
75
+ if (!x) {
66
76
  if (C)
67
- return (Q = C[j]) === null || Q === void 0 ? void 0 : Q.bind(C);
68
- throw new X(`"${l}" plugin is not implemented on ${S}`, E.Unimplemented);
77
+ return (X = C[j]) === null || X === void 0 ? void 0 : X.bind(C);
78
+ throw new Z(`"${d}" plugin is not implemented on ${L}`, U.Unimplemented);
69
79
  }
70
80
  {
71
- const oe = _ == null ? void 0 : _.methods.find((T) => j === T.name);
72
- if (oe)
73
- return oe.rtype === "promise" ? (T) => i.nativePromise(l, j.toString(), T) : (T, fe) => i.nativeCallback(l, j.toString(), T, fe);
81
+ const se = x == null ? void 0 : x.methods.find((F) => j === F.name);
82
+ if (se)
83
+ return se.rtype === "promise" ? (F) => i.nativePromise(d, j.toString(), F) : (F, Oe) => i.nativeCallback(d, j.toString(), F, Oe);
74
84
  if (C)
75
- return (J = C[j]) === null || J === void 0 ? void 0 : J.bind(C);
85
+ return (Q = C[j]) === null || Q === void 0 ? void 0 : Q.bind(C);
76
86
  }
77
- })(I, k);
78
- if (ne) {
79
- const C = ne(...R);
87
+ })(_, k);
88
+ if (ae) {
89
+ const C = ae(...R);
80
90
  return A = C == null ? void 0 : C.remove, C;
81
91
  }
82
- throw new X(`"${l}.${k}()" is not implemented on ${S}`, E.Unimplemented);
92
+ throw new Z(`"${d}.${k}()" is not implemented on ${L}`, U.Unimplemented);
83
93
  });
84
- return k === "addListener" && (x.remove = () => a(void 0, null, function* () {
94
+ return k === "addListener" && (H.remove = () => a(void 0, null, function* () {
85
95
  return A();
86
- })), x;
96
+ })), H;
87
97
  };
88
- return U.toString = () => `${k.toString()}() { [capacitor code] }`, Object.defineProperty(U, "name", { value: k, writable: !1, configurable: !1 }), U;
89
- }, te = V("addListener"), re = V("removeListener"), ye = (k, A) => {
90
- const U = te({ eventName: k }, A), R = () => a(void 0, null, function* () {
91
- const I = yield U;
92
- re({ eventName: k, callbackId: I }, A);
93
- }), x = new Promise((I) => U.then(() => I({ remove: R })));
94
- return x.remove = () => a(void 0, null, function* () {
98
+ return I.toString = () => `${k.toString()}() { [capacitor code] }`, Object.defineProperty(I, "name", { value: k, writable: !1, configurable: !1 }), I;
99
+ }, ne = G("addListener"), oe = G("removeListener"), Ne = (k, A) => {
100
+ const I = ne({ eventName: k }, A), R = () => a(void 0, null, function* () {
101
+ const _ = yield I;
102
+ oe({ eventName: k, callbackId: _ }, A);
103
+ }), H = new Promise((_) => I.then(() => _({ remove: R })));
104
+ return H.remove = () => a(void 0, null, function* () {
95
105
  console.warn("Using addListener() without 'await' is deprecated."), yield R();
96
- }), x;
97
- }, G = new Proxy({}, { get(k, A) {
106
+ }), H;
107
+ }, J = new Proxy({}, { get(k, A) {
98
108
  switch (A) {
99
109
  case "$$typeof":
100
110
  return;
101
111
  case "toJSON":
102
112
  return () => ({});
103
113
  case "addListener":
104
- return _ ? ye : te;
114
+ return x ? Ne : ne;
105
115
  case "removeListener":
106
- return re;
116
+ return oe;
107
117
  default:
108
- return V(A);
118
+ return G(A);
109
119
  }
110
120
  } });
111
- return w[l] = G, P.set(l, { name: l, proxy: G, platforms: /* @__PURE__ */ new Set([...Object.keys(d), ..._ ? [S] : []]) }), G;
121
+ return l[d] = J, b.set(d, { name: d, proxy: J, platforms: /* @__PURE__ */ new Set([...Object.keys(h), ...x ? [L] : []]) }), J;
112
122
  });
113
- return i.convertFileSrc || (i.convertFileSrc = (l) => l), i.getPlatform = b, i.handleError = (l) => r.console.error(l), i.isNativePlatform = f, i.isPluginAvailable = g, i.pluginMethodNoop = (l, d, h) => Promise.reject(`${h} does not have an implementation of "${d}".`), i.registerPlugin = L, i.Exception = X, i.DEBUG = !!i.DEBUG, i.isLoggingEnabled = !!i.isLoggingEnabled, i.platform = i.getPlatform(), i.isNative = i.isNativePlatform(), i;
114
- }, Le = (r) => r.Capacitor = Pe(r), u = Le(typeof globalThis != "undefined" ? globalThis : typeof self != "undefined" ? self : typeof window != "undefined" ? window : typeof global != "undefined" ? global : {}), ee = u.registerPlugin;
123
+ return i.convertFileSrc || (i.convertFileSrc = (d) => d), i.getPlatform = P, i.handleError = (d) => r.console.error(d), i.isNativePlatform = f, i.isPluginAvailable = v, i.pluginMethodNoop = (d, h, w) => Promise.reject(`${w} does not have an implementation of "${h}".`), i.registerPlugin = S, i.Exception = Z, i.DEBUG = !!i.DEBUG, i.isLoggingEnabled = !!i.isLoggingEnabled, i.platform = i.getPlatform(), i.isNative = i.isNativePlatform(), i;
124
+ }, je = (r) => r.Capacitor = _e(r), u = je(typeof globalThis != "undefined" ? globalThis : typeof self != "undefined" ? self : typeof window != "undefined" ? window : typeof global != "undefined" ? global : {}), re = u.registerPlugin;
115
125
  u.Plugins;
116
126
  class y {
117
127
  constructor(e) {
@@ -149,10 +159,10 @@ class y {
149
159
  } };
150
160
  }
151
161
  unimplemented(e = "not implemented") {
152
- return new u.Exception(e, E.Unimplemented);
162
+ return new u.Exception(e, U.Unimplemented);
153
163
  }
154
164
  unavailable(e = "not available") {
155
- return new u.Exception(e, E.Unavailable);
165
+ return new u.Exception(e, U.Unavailable);
156
166
  }
157
167
  removeListener(e, t) {
158
168
  return a(this, null, function* () {
@@ -170,8 +180,8 @@ class y {
170
180
  e && (window.removeEventListener(e.windowEventName, e.handler), e.registered = !1);
171
181
  }
172
182
  }
173
- const se = (r) => encodeURIComponent(r).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape), ie = (r) => r.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
174
- class Se extends y {
183
+ const ue = (r) => encodeURIComponent(r).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape), me = (r) => r.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
184
+ class Fe extends y {
175
185
  getCookies() {
176
186
  return a(this, null, function* () {
177
187
  const e = document.cookie, t = {};
@@ -179,14 +189,14 @@ class Se extends y {
179
189
  if (n.length <= 0)
180
190
  return;
181
191
  let [o, s] = n.replace(/=/, "CAP_COOKIE").split("CAP_COOKIE");
182
- o = ie(o).trim(), s = ie(s).trim(), t[o] = s;
192
+ o = me(o).trim(), s = me(s).trim(), t[o] = s;
183
193
  }), t;
184
194
  });
185
195
  }
186
196
  setCookie(e) {
187
197
  return a(this, null, function* () {
188
198
  try {
189
- const t = se(e.key), n = se(e.value), o = `; expires=${(e.expires || "").replace("expires=", "")}`, s = (e.path || "/").replace("path=", ""), c = e.url != null && e.url.length > 0 ? `domain=${e.url}` : "";
199
+ const t = ue(e.key), n = ue(e.value), o = `; expires=${(e.expires || "").replace("expires=", "")}`, s = (e.path || "/").replace("path=", ""), c = e.url != null && e.url.length > 0 ? `domain=${e.url}` : "";
190
200
  document.cookie = `${t}=${n || ""}${o}; path=${s}; ${c};`;
191
201
  } catch (t) {
192
202
  return Promise.reject(t);
@@ -223,11 +233,11 @@ class Se extends y {
223
233
  });
224
234
  }
225
235
  }
226
- ee("CapacitorCookies", { web: () => new Se() });
227
- const Ce = (r, e = {}) => {
236
+ re("CapacitorCookies", { web: () => new Fe() });
237
+ const Te = (r, e = {}) => {
228
238
  const t = Object.assign({ method: r.method || "GET", headers: r.headers }, e), n = ((o = {}) => {
229
239
  const s = Object.keys(o);
230
- return Object.keys(o).map((c) => c.toLocaleLowerCase()).reduce((c, i, w) => (c[i] = o[s[w]], c), {});
240
+ return Object.keys(o).map((c) => c.toLocaleLowerCase()).reduce((c, i, l) => (c[i] = o[s[l]], c), {});
231
241
  })(r.headers)["content-type"] || "";
232
242
  if (typeof r.data == "string")
233
243
  t.body = r.data;
@@ -252,29 +262,29 @@ const Ce = (r, e = {}) => {
252
262
  (n.includes("application/json") || typeof r.data == "object") && (t.body = JSON.stringify(r.data));
253
263
  return t;
254
264
  };
255
- class ke extends y {
265
+ class $e extends y {
256
266
  request(e) {
257
267
  return a(this, null, function* () {
258
- const t = Ce(e, e.webFetchExtra), n = ((f, g = !0) => f ? Object.entries(f).reduce((B, P) => {
259
- const [L, l] = P;
260
- let d, h;
261
- return Array.isArray(l) ? (h = "", l.forEach((S) => {
262
- d = g ? encodeURIComponent(S) : S, h += `${L}=${d}&`;
263
- }), h.slice(0, -1)) : (d = g ? encodeURIComponent(l) : l, h = `${L}=${d}`), `${B}&${h}`;
268
+ const t = Te(e, e.webFetchExtra), n = ((f, v = !0) => f ? Object.entries(f).reduce((E, b) => {
269
+ const [S, d] = b;
270
+ let h, w;
271
+ return Array.isArray(d) ? (w = "", d.forEach((L) => {
272
+ h = v ? encodeURIComponent(L) : L, w += `${S}=${h}&`;
273
+ }), w.slice(0, -1)) : (h = v ? encodeURIComponent(d) : d, w = `${S}=${h}`), `${E}&${w}`;
264
274
  }, "").substr(1) : null)(e.params, e.shouldEncodeUrlParams), o = n ? `${e.url}?${n}` : e.url, s = yield fetch(o, t), c = s.headers.get("content-type") || "";
265
- let i, w, { responseType: m = "text" } = s.ok ? e : {};
275
+ let i, l, { responseType: m = "text" } = s.ok ? e : {};
266
276
  switch (c.includes("application/json") && (m = "json"), m) {
267
277
  case "arraybuffer":
268
278
  case "blob":
269
- w = yield s.blob(), i = yield ((f) => a(this, null, function* () {
270
- return new Promise((g, B) => {
271
- const P = new FileReader();
272
- P.onload = () => {
273
- const L = P.result;
274
- g(L.indexOf(",") >= 0 ? L.split(",")[1] : L);
275
- }, P.onerror = (L) => B(L), P.readAsDataURL(f);
279
+ l = yield s.blob(), i = yield ((f) => a(this, null, function* () {
280
+ return new Promise((v, E) => {
281
+ const b = new FileReader();
282
+ b.onload = () => {
283
+ const S = b.result;
284
+ v(S.indexOf(",") >= 0 ? S.split(",")[1] : S);
285
+ }, b.onerror = (S) => E(S), b.readAsDataURL(f);
276
286
  });
277
- }))(w);
287
+ }))(l);
278
288
  break;
279
289
  case "json":
280
290
  i = yield s.json();
@@ -282,10 +292,10 @@ class ke extends y {
282
292
  default:
283
293
  i = yield s.text();
284
294
  }
285
- const b = {};
286
- return s.headers.forEach((f, g) => {
287
- b[g] = f;
288
- }), { data: i, headers: b, status: s.status, url: s.url };
295
+ const P = {};
296
+ return s.headers.forEach((f, v) => {
297
+ P[v] = f;
298
+ }), { data: i, headers: P, status: s.status, url: s.url };
289
299
  });
290
300
  }
291
301
  get(e) {
@@ -314,14 +324,14 @@ class ke extends y {
314
324
  });
315
325
  }
316
326
  }
317
- function Y() {
327
+ function ee() {
318
328
  return u.getPlatform() === "android" ? JSON.parse(AndroidInitialContext.initialContext()) : window.portalInitialContext;
319
329
  }
320
- ee("CapacitorHttp", { web: () => new ke() }), /*! Ionic Portals: https://ionic.io/portals - Commercial License */
321
- ee("Portals", { web: () => Promise.resolve().then(function() {
322
- return Ae;
330
+ re("CapacitorHttp", { web: () => new $e() }), /*! Ionic Portals: https://ionic.io/portals - Commercial License */
331
+ re("Portals", { web: () => Promise.resolve().then(function() {
332
+ return Re;
323
333
  }).then((r) => new r.PortalsWeb()) });
324
- const Ae = Object.freeze({ __proto__: null, PortalsWeb: class extends y {
334
+ const Re = Object.freeze({ __proto__: null, PortalsWeb: class extends y {
325
335
  publishNative(r) {
326
336
  return a(this, null, function* () {
327
337
  });
@@ -331,8 +341,8 @@ const Ae = Object.freeze({ __proto__: null, PortalsWeb: class extends y {
331
341
  try {
332
342
  if (typeof window == "undefined")
333
343
  return;
334
- if (Y && ((e = Y()) != null && e.value)) {
335
- const o = (n = (t = Y()) == null ? void 0 : t.value) != null ? n : null;
344
+ if (ee && ((e = ee()) != null && e.value)) {
345
+ const o = (n = (t = ee()) == null ? void 0 : t.value) != null ? n : null;
336
346
  if (!o)
337
347
  return void console.error("native initialContext is undefine");
338
348
  if (!r)
@@ -343,7 +353,7 @@ const Ae = Object.freeze({ __proto__: null, PortalsWeb: class extends y {
343
353
  throw console.error("getInitialContextHandle error", o), o;
344
354
  }
345
355
  };
346
- class Me {
356
+ class De {
347
357
  isNative() {
348
358
  try {
349
359
  return (() => {
@@ -403,14 +413,14 @@ class Me {
403
413
  }
404
414
  }
405
415
  }
406
- const H = () => {
416
+ const B = () => {
407
417
  try {
408
418
  let r = {};
409
419
  return typeof window != "undefined" && (r = window), r;
410
420
  } catch (r) {
411
421
  throw console.error("isWinHandle error", r), r;
412
422
  }
413
- }, $ = "CommunicatePlugin", p = u.registerPlugin($, { web: () => Promise.resolve().then(() => ze).then((r) => new r.PluginsWeb()) }), Ne = u.registerPlugin("CountAssistPlugin", { web: new class extends y {
423
+ }, $ = "CommunicatePlugin", p = u.registerPlugin($, { web: () => Promise.resolve().then(() => at).then((r) => new r.PluginsWeb()) }), We = u.registerPlugin("CountAssistPlugin", { web: new class extends y {
414
424
  setCountAssistState(r) {
415
425
  return a(this, null, function* () {
416
426
  try {
@@ -422,9 +432,9 @@ const H = () => {
422
432
  }
423
433
  });
424
434
  }
425
- }() }), W = H();
435
+ }() }), W = B();
426
436
  W.removeAddListenerFab = () => null;
427
- const Oe = (r) => {
437
+ const Ve = (r) => {
428
438
  var e, t;
429
439
  try {
430
440
  W.removeAddListenerFab && W.removeAddListenerFab();
@@ -432,8 +442,8 @@ const Oe = (r) => {
432
442
  if ((e = p.showFABMenu) == null || e.call(p, { fabMenu: n }), !r || !((t = Object.keys(r)) != null && t.length))
433
443
  return;
434
444
  Object.keys(r).forEach((o) => {
435
- var s, c, i, w, m, b, f, g;
436
- n.push({ disable: (c = (s = r == null ? void 0 : r[o]) == null ? void 0 : s.disable) != null ? c : !1, icon: (w = (i = r == null ? void 0 : r[o]) == null ? void 0 : i.icon) != null ? w : "", id: (b = (m = r == null ? void 0 : r[o]) == null ? void 0 : m.id) != null ? b : "", name: (g = (f = r == null ? void 0 : r[o]) == null ? void 0 : f.title) != null ? g : "" });
445
+ var s, c, i, l, m, P, f, v;
446
+ n.push({ disable: (c = (s = r == null ? void 0 : r[o]) == null ? void 0 : s.disable) != null ? c : !1, icon: (l = (i = r == null ? void 0 : r[o]) == null ? void 0 : i.icon) != null ? l : "", id: (P = (m = r == null ? void 0 : r[o]) == null ? void 0 : m.id) != null ? P : "", name: (v = (f = r == null ? void 0 : r[o]) == null ? void 0 : f.title) != null ? v : "" });
437
447
  }), queueMicrotask(() => {
438
448
  var o;
439
449
  (o = p.showFABMenu) == null || o.call(p, { fabMenu: n });
@@ -452,17 +462,17 @@ const Oe = (r) => {
452
462
  }))((o) => {
453
463
  let s;
454
464
  o != null && o.disable || o != null && o.id && (Object.keys(r).forEach((c) => {
455
- var i, w, m;
456
- (i = r == null ? void 0 : r[c]) != null && i.id && o.id === r[c].id && (s = (m = (w = r[c]) == null ? void 0 : w.fn) != null ? m : () => null);
465
+ var i, l, m;
466
+ (i = r == null ? void 0 : r[c]) != null && i.id && o.id === r[c].id && (s = (m = (l = r[c]) == null ? void 0 : l.fn) != null ? m : () => null);
457
467
  }), typeof s == "function" && s());
458
468
  });
459
469
  });
460
470
  } catch (n) {
461
471
  throw console.error("fabBtnHandle error", n), n;
462
472
  }
463
- }, N = H();
473
+ }, N = B();
464
474
  N.addListenerBackRemoveHandle = () => null;
465
- const ce = (r = () => null) => a(void 0, null, function* () {
475
+ const he = (r = () => null) => a(void 0, null, function* () {
466
476
  try {
467
477
  N != null && N.addListenerBackRemoveHandle && typeof N.addListenerBackRemoveHandle == "function" && N.addListenerBackRemoveHandle(), N.addListenerBackRemoveHandle = yield ((e) => a(void 0, null, function* () {
468
478
  try {
@@ -477,13 +487,13 @@ const ce = (r = () => null) => a(void 0, null, function* () {
477
487
  } catch (e) {
478
488
  throw console.error("initBackBtnFn error", e), e;
479
489
  }
480
- }), q = H();
481
- q.addListenerHomeHandle = () => null;
482
- const Be = (r) => {
490
+ }), V = B();
491
+ V.addListenerHomeHandle = () => null;
492
+ const qe = (r) => {
483
493
  try {
484
- q.addListenerHomeHandle && q.addListenerHomeHandle(), setTimeout(() => {
494
+ V.addListenerHomeHandle && V.addListenerHomeHandle(), setTimeout(() => {
485
495
  ((e) => a(void 0, null, function* () {
486
- e && (q.addListenerHomeHandle = yield ((t) => a(void 0, null, function* () {
496
+ e && (V.addListenerHomeHandle = yield ((t) => a(void 0, null, function* () {
487
497
  try {
488
498
  if (u.addListener) {
489
499
  const n = yield u.addListener($, "nativeSendHome", (o) => t && t(o));
@@ -499,7 +509,7 @@ const Be = (r) => {
499
509
  throw console.error("homeFn error", e), e;
500
510
  }
501
511
  };
502
- class Ue {
512
+ class ze {
503
513
  constructor() {
504
514
  this.homeBtnSwitch({ isClick: !0 });
505
515
  }
@@ -519,9 +529,9 @@ class Ue {
519
529
  try {
520
530
  const { mounted: n, beforeUnmount: o, callBack: s } = t;
521
531
  n(() => {
522
- ce(s);
532
+ he(s);
523
533
  }), o(() => {
524
- ce();
534
+ he();
525
535
  });
526
536
  } catch (n) {
527
537
  throw console.error("backBtnHandle error", n), n;
@@ -533,14 +543,14 @@ class Ue {
533
543
  }
534
544
  setHomeBtn(e) {
535
545
  try {
536
- Be(e);
546
+ qe(e);
537
547
  } catch (t) {
538
548
  throw console.error("setHomeBtn error", t), t;
539
549
  }
540
550
  }
541
551
  setFabBtn(e) {
542
552
  try {
543
- Oe(e);
553
+ Ve(e);
544
554
  } catch (t) {
545
555
  throw console.error("setFabBtn error", t), t;
546
556
  }
@@ -609,7 +619,7 @@ class Ue {
609
619
  });
610
620
  }
611
621
  }
612
- const Ee = u.registerPlugin("CameraScanPlugin", { web: new class extends y {
622
+ const we = u.registerPlugin("CameraScanPlugin", { web: new class extends y {
613
623
  pickCameraScan(r) {
614
624
  return a(this, null, function* () {
615
625
  return new Promise((e) => {
@@ -617,71 +627,123 @@ const Ee = u.registerPlugin("CameraScanPlugin", { web: new class extends y {
617
627
  });
618
628
  });
619
629
  }
630
+ setCameraScanState() {
631
+ return a(this, null, function* () {
632
+ });
633
+ }
620
634
  }() });
621
635
  window.removeAddListenerCameraScan = () => null;
622
- class He {
636
+ class Ke {
623
637
  pickCameraScan(e) {
624
638
  return a(this, null, function* () {
625
639
  try {
626
- return yield Ee.pickCameraScan(e);
640
+ return yield we.pickCameraScan(e);
627
641
  } catch (t) {
628
642
  throw console.error("pickCameraScan error", t), t;
629
643
  }
630
644
  });
631
645
  }
646
+ setCameraScanState(e) {
647
+ return a(this, null, function* () {
648
+ try {
649
+ return yield we.setCameraScanState(e);
650
+ } catch (t) {
651
+ throw console.error("setCameraScanState error", t), t;
652
+ }
653
+ });
654
+ }
632
655
  }
633
- const _e = u.registerPlugin("CameraScanMultiplePlugin", { web: new class extends y {
656
+ const pe = u.registerPlugin("CameraScanMultiplePlugin", { web: new class extends y {
634
657
  pickCameraScanMultiple() {
635
658
  return a(this, null, function* () {
636
659
  });
637
660
  }
661
+ setCameraScanMultipleState() {
662
+ return a(this, null, function* () {
663
+ });
664
+ }
638
665
  }() });
639
- class xe {
666
+ class Ge {
640
667
  pickCameraScanMultiple(e) {
641
668
  return a(this, null, function* () {
642
669
  try {
643
- return yield _e.pickCameraScanMultiple(e);
670
+ return yield pe.pickCameraScanMultiple(e);
644
671
  } catch (t) {
645
672
  throw console.error("pickCameraScanMultiple error", t), t;
646
673
  }
647
674
  });
648
675
  }
676
+ setCameraScanMultipleState(e) {
677
+ return a(this, null, function* () {
678
+ try {
679
+ return yield pe.setCameraScanMultipleState(e);
680
+ } catch (t) {
681
+ throw console.error("setCameraScanMultipleState error", t), t;
682
+ }
683
+ });
684
+ }
649
685
  }
650
- const Ie = u.registerPlugin("CameraScanMultipleNoCountPlugin", { web: new class extends y {
686
+ const ge = u.registerPlugin("CameraScanMultipleNoCountPlugin", { web: new class extends y {
651
687
  pickCameraScanMultipleNoCount() {
652
688
  return a(this, null, function* () {
653
689
  });
654
690
  }
691
+ setCameraScanMultipleNoCountState() {
692
+ return a(this, null, function* () {
693
+ });
694
+ }
655
695
  }() });
656
- class je {
696
+ class Je {
657
697
  pickCameraScanMultipleNoCount(e) {
658
698
  return a(this, null, function* () {
659
699
  try {
660
- return yield Ie.pickCameraScanMultipleNoCount(e);
700
+ return yield ge.pickCameraScanMultipleNoCount(e);
661
701
  } catch (t) {
662
702
  throw console.error("pickCameraScanMultipleNoCount error", t), t;
663
703
  }
664
704
  });
665
705
  }
706
+ setCameraScanMultipleNoCountState(e) {
707
+ return a(this, null, function* () {
708
+ try {
709
+ return yield ge.setCameraScanMultipleNoCountState(e);
710
+ } catch (t) {
711
+ throw console.error("setCameraScanMultipleNoCountState error", t), t;
712
+ }
713
+ });
714
+ }
666
715
  }
667
- const Te = u.registerPlugin("CameraScanSingleOrDualPlugin", { web: new class extends y {
716
+ const ye = u.registerPlugin("CameraScanSingleOrDualPlugin", { web: new class extends y {
668
717
  pickCameraScanSingleOrDual() {
669
718
  return a(this, null, function* () {
670
719
  });
671
720
  }
721
+ setCameraScanSingleOrDualState() {
722
+ return a(this, null, function* () {
723
+ });
724
+ }
672
725
  }() });
673
- class Fe {
726
+ class Qe {
674
727
  pickCameraScanSingleOrDual(e) {
675
728
  return a(this, null, function* () {
676
729
  try {
677
- return yield Te.pickCameraScanSingleOrDual(e);
730
+ return yield ye.pickCameraScanSingleOrDual(e);
678
731
  } catch (t) {
679
732
  throw console.error("pickCameraScanSingleOrDual error", t), t;
680
733
  }
681
734
  });
682
735
  }
736
+ setCameraScanSingleOrDualState(e) {
737
+ return a(this, null, function* () {
738
+ try {
739
+ return yield ye.setCameraScanSingleOrDualState(e);
740
+ } catch (t) {
741
+ throw console.error("setCameraScanSingleOrDualState error", t), t;
742
+ }
743
+ });
744
+ }
683
745
  }
684
- const he = "LaserScanPlugin", Z = u.registerPlugin(he, { web: new class extends y {
746
+ const ke = "LaserScanPlugin", te = u.registerPlugin(ke, { web: new class extends y {
685
747
  pickLaserScan() {
686
748
  return a(this, null, function* () {
687
749
  });
@@ -694,16 +756,16 @@ const he = "LaserScanPlugin", Z = u.registerPlugin(he, { web: new class extends
694
756
  return a(this, null, function* () {
695
757
  });
696
758
  }
697
- }() }), z = H();
698
- z.removeAddListenerLaserScan = () => null;
699
- const le = (r = () => null) => {
759
+ }() }), q = B();
760
+ q.removeAddListenerLaserScan = () => null;
761
+ const fe = (r = () => null) => {
700
762
  try {
701
- z.removeAddListenerLaserScan && z.removeAddListenerLaserScan();
763
+ q.removeAddListenerLaserScan && q.removeAddListenerLaserScan();
702
764
  const e = (t) => a(void 0, null, function* () {
703
- t && (z.removeAddListenerLaserScan = yield ((n) => a(void 0, null, function* () {
765
+ t && (q.removeAddListenerLaserScan = yield ((n) => a(void 0, null, function* () {
704
766
  try {
705
767
  if (u.addListener) {
706
- const o = yield u.addListener(he, "nativeSendLaser", (s) => n && n(s));
768
+ const o = yield u.addListener(ke, "nativeSendLaser", (s) => n && n(s));
707
769
  return o != null && o.remove ? o.remove : () => null;
708
770
  }
709
771
  } catch (o) {
@@ -718,14 +780,14 @@ const le = (r = () => null) => {
718
780
  throw console.error("laserScanFn error", e), e;
719
781
  }
720
782
  };
721
- class $e {
783
+ class Xe {
722
784
  constructor() {
723
785
  this.pickLaserScan();
724
786
  }
725
787
  pickLaserScan() {
726
788
  return a(this, null, function* () {
727
789
  try {
728
- return yield Z.pickLaserScan({ isContinue: !1 });
790
+ return yield te.pickLaserScan({ isContinue: !1 });
729
791
  } catch (e) {
730
792
  throw console.error("pickLaserScan error", e), e;
731
793
  }
@@ -734,7 +796,7 @@ class $e {
734
796
  unPickLaserScan() {
735
797
  return a(this, null, function* () {
736
798
  try {
737
- return yield Z.unPickLaserScan();
799
+ return yield te.unPickLaserScan();
738
800
  } catch (e) {
739
801
  throw console.error("unPickLaserScan error", e), e;
740
802
  }
@@ -742,7 +804,7 @@ class $e {
742
804
  }
743
805
  setLaserState(e) {
744
806
  try {
745
- Z.setLaserState(e);
807
+ te.setLaserState(e);
746
808
  } catch (t) {
747
809
  throw console.error("setLaserState error", t), t;
748
810
  }
@@ -752,9 +814,9 @@ class $e {
752
814
  try {
753
815
  const { mounted: n, beforeUnmount: o, callBack: s } = t;
754
816
  n(() => {
755
- le(s);
817
+ fe(s);
756
818
  }), o(() => {
757
- le();
819
+ fe();
758
820
  });
759
821
  } catch (n) {
760
822
  throw console.error("laserScanApiParams error", n), n;
@@ -762,9 +824,9 @@ class $e {
762
824
  })(e);
763
825
  }
764
826
  }
765
- const O = H();
827
+ const O = B();
766
828
  O.addListenerCountAssistRemoveHandle = () => null;
767
- const de = (r = () => null) => a(void 0, null, function* () {
829
+ const ve = (r = () => null) => a(void 0, null, function* () {
768
830
  try {
769
831
  O != null && O.addListenerCountAssistRemoveHandle && typeof O.addListenerCountAssistRemoveHandle == "function" && O.addListenerCountAssistRemoveHandle(), O.addListenerCountAssistRemoveHandle = yield ((e) => a(void 0, null, function* () {
770
832
  try {
@@ -780,10 +842,10 @@ const de = (r = () => null) => a(void 0, null, function* () {
780
842
  throw console.error("initCountAssistFn error", e), e;
781
843
  }
782
844
  });
783
- class Re {
845
+ class Ye {
784
846
  setCountAssistState(e) {
785
847
  return a(this, null, function* () {
786
- return yield Ne.setCountAssistState(e);
848
+ return yield We.setCountAssistState(e);
787
849
  });
788
850
  }
789
851
  getCountAssistState(e) {
@@ -803,9 +865,9 @@ class Re {
803
865
  try {
804
866
  const { mounted: n, beforeUnmount: o, callBack: s } = t;
805
867
  n(() => {
806
- de(s);
868
+ ve(s);
807
869
  }), o(() => {
808
- de();
870
+ ve();
809
871
  });
810
872
  } catch (n) {
811
873
  throw console.error("setCountAssistBtnHandle error", n), n;
@@ -813,7 +875,7 @@ class Re {
813
875
  })(e);
814
876
  }
815
877
  }
816
- const ue = u.registerPlugin("ClickStreamPlugin", { web: new class extends y {
878
+ const Pe = u.registerPlugin("ClickStreamPlugin", { web: new class extends y {
817
879
  init() {
818
880
  return a(this, null, function* () {
819
881
  return new Promise((r) => {
@@ -833,14 +895,14 @@ const ue = u.registerPlugin("ClickStreamPlugin", { web: new class extends y {
833
895
  });
834
896
  }
835
897
  }() });
836
- class De {
898
+ class Ze {
837
899
  constructor() {
838
900
  this.init();
839
901
  }
840
902
  init() {
841
903
  return a(this, null, function* () {
842
904
  try {
843
- return yield ue.init();
905
+ return yield Pe.init();
844
906
  } catch (e) {
845
907
  throw console.error("clickStreamPlugin, init error", e), e;
846
908
  }
@@ -849,16 +911,16 @@ class De {
849
911
  trace(e) {
850
912
  return a(this, null, function* () {
851
913
  try {
852
- return yield ue.trace(e);
914
+ return yield Pe.trace(e);
853
915
  } catch (t) {
854
916
  throw console.error("clickStreamPlugin, trace error", t), t;
855
917
  }
856
918
  });
857
919
  }
858
920
  }
859
- const pe = "MiniAppLifecyclePlugin";
860
- var F = ((r) => (r.MINI_APP_BEFORE_UNMOUNT_PERMISSION = "mini_app_before_unmount_permission", r.MINI_APP_BEFORE_UNMOUNT_COMPLETION = "mini_app_before_unmount_completion", r))(F || {});
861
- const me = u.registerPlugin(pe, { web: new class extends y {
921
+ const Ae = "MiniAppLifecyclePlugin";
922
+ var T = ((r) => (r.MINI_APP_BEFORE_UNMOUNT_PERMISSION = "mini_app_before_unmount_permission", r.MINI_APP_BEFORE_UNMOUNT_COMPLETION = "mini_app_before_unmount_completion", r))(T || {});
923
+ const be = u.registerPlugin(Ae, { web: new class extends y {
862
924
  setNativeUsagePermission() {
863
925
  return a(this, null, function* () {
864
926
  });
@@ -867,16 +929,16 @@ const me = u.registerPlugin(pe, { web: new class extends y {
867
929
  return a(this, null, function* () {
868
930
  });
869
931
  }
870
- }() }), K = H();
871
- K.removeAddListenerLifecycleMiniAppBeforeUnmount = () => null;
872
- const we = (r = () => null) => {
932
+ }() }), z = B();
933
+ z.removeAddListenerLifecycleMiniAppBeforeUnmount = () => null;
934
+ const Se = (r = () => null) => {
873
935
  try {
874
- K.removeAddListenerLifecycleMiniAppBeforeUnmount && K.removeAddListenerLifecycleMiniAppBeforeUnmount();
936
+ z.removeAddListenerLifecycleMiniAppBeforeUnmount && z.removeAddListenerLifecycleMiniAppBeforeUnmount();
875
937
  const e = (t) => a(void 0, null, function* () {
876
- t && (K.removeAddListenerLifecycleMiniAppBeforeUnmount = yield ((n) => a(void 0, null, function* () {
938
+ t && (z.removeAddListenerLifecycleMiniAppBeforeUnmount = yield ((n) => a(void 0, null, function* () {
877
939
  try {
878
940
  if (u.addListener) {
879
- const o = yield u.addListener(pe, "miniAppBeforeUnmount", (s) => n && n(s));
941
+ const o = yield u.addListener(Ae, "miniAppBeforeUnmount", (s) => n && n(s));
880
942
  return o != null && o.remove ? o.remove : () => null;
881
943
  }
882
944
  } catch (o) {
@@ -891,13 +953,13 @@ const we = (r = () => null) => {
891
953
  throw console.error("laserScanFn error", e), e;
892
954
  }
893
955
  };
894
- class We {
956
+ class et {
895
957
  constructor() {
896
958
  }
897
959
  setNativeUsagePermission(e) {
898
960
  return a(this, null, function* () {
899
961
  try {
900
- return yield me.setNativeUsagePermission(e);
962
+ return yield be.setNativeUsagePermission(e);
901
963
  } catch (t) {
902
964
  throw console.error("lifecyclePlugin.setNativeUsagePermission error", t), t;
903
965
  }
@@ -906,23 +968,23 @@ class We {
906
968
  authorizeWebCallback(e) {
907
969
  return a(this, null, function* () {
908
970
  try {
909
- return yield me.authorizeWebCallback(e);
971
+ return yield be.authorizeWebCallback(e);
910
972
  } catch (t) {
911
973
  throw console.error("lifecyclePlugin.authorizeWebCallback error", t), t;
912
974
  }
913
975
  });
914
976
  }
915
977
  miniAppBeforeUnmount(e) {
916
- this.setNativeUsagePermission({ action: F.MINI_APP_BEFORE_UNMOUNT_PERMISSION, value: !0 }), ((t, n) => {
978
+ this.setNativeUsagePermission({ action: T.MINI_APP_BEFORE_UNMOUNT_PERMISSION, value: !0 }), ((t, n) => {
917
979
  try {
918
980
  const { mounted: o, beforeUnmount: s, callBack: c } = t;
919
981
  o(() => {
920
- we((i) => a(this, null, function* () {
921
- var w;
982
+ Se((i) => a(this, null, function* () {
983
+ var l;
922
984
  if (c && c instanceof Function)
923
985
  try {
924
- (w = c(i)) == null || w.then(() => a(this, null, function* () {
925
- yield n.setNativeUsagePermission({ action: F.MINI_APP_BEFORE_UNMOUNT_PERMISSION, value: !1 }), yield n.authorizeWebCallback({ action: F.MINI_APP_BEFORE_UNMOUNT_COMPLETION });
986
+ (l = c(i)) == null || l.then(() => a(this, null, function* () {
987
+ yield n.setNativeUsagePermission({ action: T.MINI_APP_BEFORE_UNMOUNT_PERMISSION, value: !1 }), yield n.authorizeWebCallback({ action: T.MINI_APP_BEFORE_UNMOUNT_COMPLETION });
926
988
  }));
927
989
  } catch (m) {
928
990
  console.error("miniAppBeforeUnmount error callBack is not a function or promise");
@@ -931,7 +993,7 @@ class We {
931
993
  console.error("miniAppBeforeUnmount error callBack is not a function or promise");
932
994
  }));
933
995
  }), s(() => a(this, null, function* () {
934
- we(), n.setNativeUsagePermission({ action: F.MINI_APP_BEFORE_UNMOUNT_PERMISSION, value: !1 });
996
+ Se(), n.setNativeUsagePermission({ action: T.MINI_APP_BEFORE_UNMOUNT_PERMISSION, value: !1 });
935
997
  }));
936
998
  } catch (o) {
937
999
  throw console.error("miniAppBeforeUnmount error", o), o;
@@ -939,21 +1001,123 @@ class We {
939
1001
  })(e, this);
940
1002
  }
941
1003
  }
942
- class qe {
1004
+ const Le = u.registerPlugin("DeviceInteractionPlugin", { web: new class extends y {
1005
+ callVibrate() {
1006
+ return a(this, null, function* () {
1007
+ });
1008
+ }
1009
+ callErrorBeep() {
1010
+ return a(this, null, function* () {
1011
+ });
1012
+ }
1013
+ }() });
1014
+ class tt {
1015
+ callVibrate() {
1016
+ return a(this, null, function* () {
1017
+ try {
1018
+ return yield Le.callVibrate();
1019
+ } catch (e) {
1020
+ throw console.error("callVibrate error", e), e;
1021
+ }
1022
+ });
1023
+ }
1024
+ callErrorBeep() {
1025
+ return a(this, null, function* () {
1026
+ try {
1027
+ return yield Le.callErrorBeep();
1028
+ } catch (e) {
1029
+ throw console.error("callErrorBeep error", e), e;
1030
+ }
1031
+ });
1032
+ }
1033
+ }
1034
+ const Me = "PollingPlugin", Ce = u.registerPlugin(Me, { web: new class extends y {
1035
+ create() {
1036
+ return a(this, null, function* () {
1037
+ });
1038
+ }
1039
+ destroy() {
1040
+ return a(this, null, function* () {
1041
+ });
1042
+ }
1043
+ }() }), K = B();
1044
+ K.removeAddListenerPolling = () => null;
1045
+ const rt = (r, e) => {
1046
+ try {
1047
+ K.removeAddListenerPolling && K.removeAddListenerPolling();
1048
+ const t = e.pollingId;
1049
+ ((n) => a(void 0, null, function* () {
1050
+ return n && (K.removeAddListenerPolling = yield ((o) => a(void 0, null, function* () {
1051
+ try {
1052
+ if (u.addListener) {
1053
+ const s = yield u.addListener(Me, "nativeSendPolling", (c) => o && o(c));
1054
+ return s != null && s.remove ? s.remove : () => null;
1055
+ }
1056
+ } catch (s) {
1057
+ throw console.error("addListenerPollingHandle error", s), s;
1058
+ }
1059
+ }))(n));
1060
+ }))((n) => {
1061
+ (n == null ? void 0 : n.pollingId) === t && (n != null && n.pollingId) && r.pollingList.forEach((o) => {
1062
+ o != null && o.pollingId && (n == null ? void 0 : n.pollingId) === (o == null ? void 0 : o.pollingId) && typeof (o == null ? void 0 : o.callBack) == "function" && o.callBack(n);
1063
+ });
1064
+ });
1065
+ } catch (t) {
1066
+ throw console.error("pollingFn error", t), t;
1067
+ }
1068
+ };
1069
+ class nt {
1070
+ constructor() {
1071
+ g(this, "pollingList");
1072
+ this.pollingList = [];
1073
+ }
1074
+ create(e) {
1075
+ var t, n, o;
1076
+ try {
1077
+ (t = e == null ? void 0 : e.pollingParams) != null && t.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, i, l) => i === l.findIndex((m) => m.pollingId === c.pollingId));
1078
+ const s = ((o = e == null ? void 0 : e.pollingParams) == null ? void 0 : o.delay) / 1e3;
1079
+ return Ce.create(le(ce({}, e == null ? void 0 : e.pollingParams), { delay: s })), ((c, i) => {
1080
+ try {
1081
+ const { mounted: l, pollingParams: m } = c;
1082
+ l(() => rt(i, m));
1083
+ } catch (l) {
1084
+ throw console.error("createPolling error", l), l;
1085
+ }
1086
+ })(e, this), () => {
1087
+ var c, i;
1088
+ return (c = e == null ? void 0 : e.pollingParams) != null && c.pollingId ? this.destroy({ pollingId: (i = e == null ? void 0 : e.pollingParams) == null ? void 0 : i.pollingId }) : null;
1089
+ };
1090
+ } catch (s) {
1091
+ throw console.error("pollingPlugin create error", s), s;
1092
+ }
1093
+ }
1094
+ destroy(e) {
1095
+ var t;
1096
+ try {
1097
+ const n = this.pollingList.map((o) => o.pollingId).indexOf(e.pollingId);
1098
+ return (t = this.pollingList) != null && t.length && (Number(n) || Number(n) >= 0) && this.pollingList.splice(Number(n), 1), Ce.destroy(e);
1099
+ } catch (n) {
1100
+ throw console.error("pollingPlugin destroy error", n), n;
1101
+ }
1102
+ }
1103
+ }
1104
+ class ot {
943
1105
  constructor() {
944
- v(this, "initialContextPlugins", new Me());
945
- v(this, "communicatePlugins", new Ue());
946
- v(this, "cameraScanPlugins", new He());
947
- v(this, "cameraScanMultiplePlugins", new xe());
948
- v(this, "cameraScanMultipleNoCountPlugins", new je());
949
- v(this, "cameraScanSingleOrDualPlugins", new Fe());
950
- v(this, "laserScanPlugins", new $e());
951
- v(this, "countAssistPlugins", new Re());
952
- v(this, "clickStreamPlugins", new De());
953
- v(this, "lifecyclePlugins", new We());
1106
+ g(this, "initialContextPlugins", new De());
1107
+ g(this, "communicatePlugins", new ze());
1108
+ g(this, "cameraScanPlugins", new Ke());
1109
+ g(this, "cameraScanMultiplePlugins", new Ge());
1110
+ g(this, "cameraScanMultipleNoCountPlugins", new Je());
1111
+ g(this, "cameraScanSingleOrDualPlugins", new Qe());
1112
+ g(this, "laserScanPlugins", new Xe());
1113
+ g(this, "countAssistPlugins", new Ye());
1114
+ g(this, "clickStreamPlugins", new Ze());
1115
+ g(this, "lifecyclePlugins", new et());
1116
+ g(this, "deviceInteractionPlugins", new tt());
1117
+ g(this, "pollingPlugins", new nt());
954
1118
  }
955
1119
  }
956
- const Ve = new qe(), ze = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: class extends y {
1120
+ const it = new ot(), at = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: class extends y {
957
1121
  homeIsClick() {
958
1122
  return a(this, null, function* () {
959
1123
  });
@@ -1034,6 +1198,6 @@ const Ve = new qe(), ze = Object.freeze(Object.defineProperty({ __proto__: null,
1034
1198
  }
1035
1199
  } }, Symbol.toStringTag, { value: "Module" }));
1036
1200
  export {
1037
- qe as NativeApi,
1038
- Ve as default
1201
+ ot as NativeApi,
1202
+ it as default
1039
1203
  };
package/lib/main.umd.cjs CHANGED
@@ -1 +1 @@
1
- (function(g,y){typeof exports=="object"&&typeof module!="undefined"?y(exports):typeof define=="function"&&define.amd?define(["exports"],y):y((g=typeof globalThis!="undefined"?globalThis:g||self).main={})})(this,function(g){"use strict";var Ke=Object.defineProperty;var Ve=(g,y,v)=>y in g?Ke(g,y,{enumerable:!0,configurable:!0,writable:!0,value:v}):g[y]=v;var S=(g,y,v)=>(Ve(g,typeof y!="symbol"?y+"":y,v),v);var a=(g,y,v)=>new Promise((B,H)=>{var Y=P=>{try{l(v.next(P))}catch(w){H(w)}},Z=P=>{try{l(v.throw(P))}catch(w){H(w)}},l=P=>P.done?B(P.value):Promise.resolve(P.value).then(Y,Z);l((v=v.apply(g,y)).next())});/*! Capacitor: https://capacitorjs.com/ - MIT License */const y=r=>r.CapacitorPlatforms=(e=>{const t=new Map;t.set("web",{name:"web"});const n=e.CapacitorPlatforms||{currentPlatform:{name:"web"},platforms:t};return n.addPlatform=(o,s)=>{n.platforms.set(o,s)},n.setPlatform=o=>{n.platforms.has(o)&&(n.currentPlatform=n.platforms.get(o))},n})(r),v=y(typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});var B;v.addPlatform,v.setPlatform,function(r){r.Unimplemented="UNIMPLEMENTED",r.Unavailable="UNAVAILABLE"}(B||(B={}));class H extends Error{constructor(e,t,n){super(e),this.message=e,this.code=t,this.data=n}}const Y=r=>{var e,t,n,o,s;const c=r.CapacitorCustomPlatform||null,i=r.Capacitor||{},f=i.Plugins=i.Plugins||{},m=r.CapacitorPlatforms,C=((e=m==null?void 0:m.currentPlatform)===null||e===void 0?void 0:e.getPlatform)||(()=>c!==null?c.name:(d=>{var u,p;return d!=null&&d.androidBridge?"android":!((p=(u=d==null?void 0:d.webkit)===null||u===void 0?void 0:u.messageHandlers)===null||p===void 0)&&p.bridge?"ios":"web"})(r)),b=((t=m==null?void 0:m.currentPlatform)===null||t===void 0?void 0:t.isNativePlatform)||(()=>C()!=="web"),L=((n=m==null?void 0:m.currentPlatform)===null||n===void 0?void 0:n.isPluginAvailable)||(d=>{const u=k.get(d);return!!(u!=null&&u.platforms.has(C()))||!!j(d)}),j=((o=m==null?void 0:m.currentPlatform)===null||o===void 0?void 0:o.getPluginHeader)||(d=>{var u;return(u=i.PluginHeaders)===null||u===void 0?void 0:u.find(p=>p.name===d)}),k=new Map,A=((s=m==null?void 0:m.currentPlatform)===null||s===void 0?void 0:s.registerPlugin)||((d,u={})=>{const p=k.get(d);if(p)return console.warn(`Capacitor plugin "${d}" already registered. Cannot register plugins twice.`),p.proxy;const M=C(),R=j(d);let x;const re=O=>{let U;const T=(...X)=>{const D=(()=>a(this,null,function*(){return!x&&M in u?x=x=typeof u[M]=="function"?yield u[M]():u[M]:c!==null&&!x&&"web"in u&&(x=x=typeof u.web=="function"?yield u.web():u.web),x}))().then(W=>{const ve=((N,q)=>{var oe,ae;if(!R){if(N)return(ae=N[q])===null||ae===void 0?void 0:ae.bind(N);throw new H(`"${d}" plugin is not implemented on ${M}`,B.Unimplemented)}{const Pe=R==null?void 0:R.methods.find(z=>q===z.name);if(Pe)return Pe.rtype==="promise"?z=>i.nativePromise(d,q.toString(),z):(z,ze)=>i.nativeCallback(d,q.toString(),z,ze);if(N)return(oe=N[q])===null||oe===void 0?void 0:oe.bind(N)}})(W,O);if(ve){const N=ve(...X);return U=N==null?void 0:N.remove,N}throw new H(`"${d}.${O}()" is not implemented on ${M}`,B.Unimplemented)});return O==="addListener"&&(D.remove=()=>a(this,null,function*(){return U()})),D};return T.toString=()=>`${O.toString()}() { [capacitor code] }`,Object.defineProperty(T,"name",{value:O,writable:!1,configurable:!1}),T},fe=re("addListener"),ge=re("removeListener"),qe=(O,U)=>{const T=fe({eventName:O},U),X=()=>a(this,null,function*(){const W=yield T;ge({eventName:O,callbackId:W},U)}),D=new Promise(W=>T.then(()=>W({remove:X})));return D.remove=()=>a(this,null,function*(){console.warn("Using addListener() without 'await' is deprecated."),yield X()}),D},ne=new Proxy({},{get(O,U){switch(U){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return R?qe:fe;case"removeListener":return ge;default:return re(U)}}});return f[d]=ne,k.set(d,{name:d,proxy:ne,platforms:new Set([...Object.keys(u),...R?[M]:[]])}),ne});return i.convertFileSrc||(i.convertFileSrc=d=>d),i.getPlatform=C,i.handleError=d=>r.console.error(d),i.isNativePlatform=b,i.isPluginAvailable=L,i.pluginMethodNoop=(d,u,p)=>Promise.reject(`${p} does not have an implementation of "${u}".`),i.registerPlugin=A,i.Exception=H,i.DEBUG=!!i.DEBUG,i.isLoggingEnabled=!!i.isLoggingEnabled,i.platform=i.getPlatform(),i.isNative=i.isNativePlatform(),i},Z=r=>r.Capacitor=Y(r),l=Z(typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}),P=l.registerPlugin;l.Plugins;class w{constructor(e){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)}addListener(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t);const n=this.windowListeners[e];n&&!n.registered&&this.addWindowListener(n);const o=()=>a(this,null,function*(){return this.removeListener(e,t)}),s=Promise.resolve({remove:o});return Object.defineProperty(s,"remove",{value:()=>a(this,null,function*(){console.warn("Using addListener() without 'await' is deprecated."),yield o()})}),s}removeAllListeners(){return a(this,null,function*(){this.listeners={};for(const e in this.windowListeners)this.removeWindowListener(this.windowListeners[e]);this.windowListeners={}})}notifyListeners(e,t){const n=this.listeners[e];n&&n.forEach(o=>o(t))}hasListeners(e){return!!this.listeners[e].length}registerWindowListener(e,t){this.windowListeners[t]={registered:!1,windowEventName:e,pluginEventName:t,handler:n=>{this.notifyListeners(t,n)}}}unimplemented(e="not implemented"){return new l.Exception(e,B.Unimplemented)}unavailable(e="not available"){return new l.Exception(e,B.Unavailable)}removeListener(e,t){return a(this,null,function*(){const n=this.listeners[e];if(!n)return;const o=n.indexOf(t);this.listeners[e].splice(o,1),this.listeners[e].length||this.removeWindowListener(this.windowListeners[e])})}addWindowListener(e){window.addEventListener(e.windowEventName,e.handler),e.registered=!0}removeWindowListener(e){e&&(window.removeEventListener(e.windowEventName,e.handler),e.registered=!1)}}const se=r=>encodeURIComponent(r).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),ie=r=>r.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class be extends w{getCookies(){return a(this,null,function*(){const e=document.cookie,t={};return e.split(";").forEach(n=>{if(n.length<=0)return;let[o,s]=n.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");o=ie(o).trim(),s=ie(s).trim(),t[o]=s}),t})}setCookie(e){return a(this,null,function*(){try{const t=se(e.key),n=se(e.value),o=`; expires=${(e.expires||"").replace("expires=","")}`,s=(e.path||"/").replace("path=",""),c=e.url!=null&&e.url.length>0?`domain=${e.url}`:"";document.cookie=`${t}=${n||""}${o}; path=${s}; ${c};`}catch(t){return Promise.reject(t)}})}deleteCookie(e){return a(this,null,function*(){try{document.cookie=`${e.key}=; Max-Age=0`}catch(t){return Promise.reject(t)}})}clearCookies(){return a(this,null,function*(){try{const e=document.cookie.split(";")||[];for(const t of e)document.cookie=t.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}catch(e){return Promise.reject(e)}})}clearAllCookies(){return a(this,null,function*(){try{yield this.clearCookies()}catch(e){return Promise.reject(e)}})}}P("CapacitorCookies",{web:()=>new be});const Le=(r,e={})=>{const t=Object.assign({method:r.method||"GET",headers:r.headers},e),n=((o={})=>{const s=Object.keys(o);return Object.keys(o).map(c=>c.toLocaleLowerCase()).reduce((c,i,f)=>(c[i]=o[s[f]],c),{})})(r.headers)["content-type"]||"";if(typeof r.data=="string")t.body=r.data;else if(n.includes("application/x-www-form-urlencoded")){const o=new URLSearchParams;for(const[s,c]of Object.entries(r.data||{}))o.set(s,c);t.body=o.toString()}else if(n.includes("multipart/form-data")){const o=new FormData;if(r.data instanceof FormData)r.data.forEach((c,i)=>{o.append(i,c)});else for(const c of Object.keys(r.data))o.append(c,r.data[c]);t.body=o;const s=new Headers(t.headers);s.delete("content-type"),t.headers=s}else(n.includes("application/json")||typeof r.data=="object")&&(t.body=JSON.stringify(r.data));return t};class Se extends w{request(e){return a(this,null,function*(){const t=Le(e,e.webFetchExtra),n=((b,L=!0)=>b?Object.entries(b).reduce((j,k)=>{const[A,d]=k;let u,p;return Array.isArray(d)?(p="",d.forEach(M=>{u=L?encodeURIComponent(M):M,p+=`${A}=${u}&`}),p.slice(0,-1)):(u=L?encodeURIComponent(d):d,p=`${A}=${u}`),`${j}&${p}`},"").substr(1):null)(e.params,e.shouldEncodeUrlParams),o=n?`${e.url}?${n}`:e.url,s=yield fetch(o,t),c=s.headers.get("content-type")||"";let i,f,{responseType:m="text"}=s.ok?e:{};switch(c.includes("application/json")&&(m="json"),m){case"arraybuffer":case"blob":f=yield s.blob(),i=yield(b=>a(this,null,function*(){return new Promise((L,j)=>{const k=new FileReader;k.onload=()=>{const A=k.result;L(A.indexOf(",")>=0?A.split(",")[1]:A)},k.onerror=A=>j(A),k.readAsDataURL(b)})}))(f);break;case"json":i=yield s.json();break;default:i=yield s.text()}const C={};return s.headers.forEach((b,L)=>{C[L]=b}),{data:i,headers:C,status:s.status,url:s.url}})}get(e){return a(this,null,function*(){return this.request(Object.assign(Object.assign({},e),{method:"GET"}))})}post(e){return a(this,null,function*(){return this.request(Object.assign(Object.assign({},e),{method:"POST"}))})}put(e){return a(this,null,function*(){return this.request(Object.assign(Object.assign({},e),{method:"PUT"}))})}patch(e){return a(this,null,function*(){return this.request(Object.assign(Object.assign({},e),{method:"PATCH"}))})}delete(e){return a(this,null,function*(){return this.request(Object.assign(Object.assign({},e),{method:"DELETE"}))})}}function ee(){return l.getPlatform()==="android"?JSON.parse(AndroidInitialContext.initialContext()):window.portalInitialContext}P("CapacitorHttp",{web:()=>new Se}),P("Portals",{web:()=>Promise.resolve().then(function(){return Ce}).then(r=>new r.PortalsWeb)});const Ce=Object.freeze({__proto__:null,PortalsWeb:class extends w{publishNative(r){return a(this,null,function*(){})}}}),K=r=>{var e,t,n;try{if(typeof window=="undefined")return;if(ee&&((e=ee())!=null&&e.value)){const o=(n=(t=ee())==null?void 0:t.value)!=null?n:null;if(!o)return void console.error("native initialContext is undefine");if(!r)return void console.error("initialContext call back is undefine");r(o)}}catch(o){throw console.error("getInitialContextHandle error",o),o}};class ke{isNative(){try{return(()=>{try{let e=!1;return K(t=>{e=!!(t!=null&&t.isNative)}),e}catch(e){throw console.error("isNative error",e),e}})()}catch(e){throw console.error("isNative error",e),e}}redirectPage(e){try{(({callBack:t})=>{K(n=>{var o;try{if(!(n!=null&&n.params))return void console.info("initial context native params is undefine");const s=(o=n==null?void 0:n.params)!=null?o:null;if(!s)return;if(!t)return void console.error("initial context call back is undefine");t(s)}catch(s){throw console.error("redirectPageHandle error",s),s}})})(e)}catch(t){throw console.error("redirectPage error",t),t}}getNativeInfo(e){try{return this.isNative()?(()=>{try{let t=null;return K(n=>{t=n!=null?n:null}),t}catch(t){throw console.error("getNativeInfoHandle error",t),t}})():(t=>{var n;return(n=t==null?void 0:t.mockData)!=null?n:null})(e)}catch(t){throw console.error("getNativeInfo error",t),t}}}const I=()=>{try{let r={};return typeof window!="undefined"&&(r=window),r}catch(r){throw console.error("isWinHandle error",r),r}},F="CommunicatePlugin",h=l.registerPlugin(F,{web:()=>Promise.resolve().then(()=>We).then(r=>new r.PluginsWeb)}),Ae=l.registerPlugin("CountAssistPlugin",{web:new class extends w{setCountAssistState(r){return a(this,null,function*(){try{return new Promise(e=>{e(r)})}catch(e){throw console.error("setCountAssistState error",e),e}})}}}),V=I();V.removeAddListenerFab=()=>null;const Me=r=>{var e,t;try{V.removeAddListenerFab&&V.removeAddListenerFab();const n=[];if((e=h.showFABMenu)==null||e.call(h,{fabMenu:n}),!r||!((t=Object.keys(r))!=null&&t.length))return;Object.keys(r).forEach(o=>{var s,c,i,f,m,C,b,L;n.push({disable:(c=(s=r==null?void 0:r[o])==null?void 0:s.disable)!=null?c:!1,icon:(f=(i=r==null?void 0:r[o])==null?void 0:i.icon)!=null?f:"",id:(C=(m=r==null?void 0:r[o])==null?void 0:m.id)!=null?C:"",name:(L=(b=r==null?void 0:r[o])==null?void 0:b.title)!=null?L:""})}),queueMicrotask(()=>{var o;(o=h.showFABMenu)==null||o.call(h,{fabMenu:n})}),setTimeout(()=>{(o=>a(this,null,function*(){o&&(V.removeAddListenerFab=yield(s=>a(this,null,function*(){try{if(l.addListener){const c=yield l.addListener(F,"nativeSendFab",i=>s&&s(i));return c!=null&&c.remove?c.remove:()=>null}}catch(c){throw console.error("addListenerFabHandle error",c),c}}))(o))}))(o=>{let s;o!=null&&o.disable||o!=null&&o.id&&(Object.keys(r).forEach(c=>{var i,f,m;(i=r==null?void 0:r[c])!=null&&i.id&&o.id===r[c].id&&(s=(m=(f=r[c])==null?void 0:f.fn)!=null?m:()=>null)}),typeof s=="function"&&s())})})}catch(n){throw console.error("fabBtnHandle error",n),n}},E=I();E.addListenerBackRemoveHandle=()=>null;const ce=(r=()=>null)=>a(this,null,function*(){try{E!=null&&E.addListenerBackRemoveHandle&&typeof E.addListenerBackRemoveHandle=="function"&&E.addListenerBackRemoveHandle(),E.addListenerBackRemoveHandle=yield(e=>a(this,null,function*(){try{if(l.addListener){const t=yield l.addListener(F,"nativeSendBack",n=>e&&e(n));return t!=null&&t.remove?t.remove:()=>null}}catch(t){throw console.error("addListenerBackHandle error",t),t}}))(r)}catch(e){throw console.error("initBackBtnFn error",e),e}}),G=I();G.addListenerHomeHandle=()=>null;const Ne=r=>{try{G.addListenerHomeHandle&&G.addListenerHomeHandle(),setTimeout(()=>{(e=>a(this,null,function*(){e&&(G.addListenerHomeHandle=yield(t=>a(this,null,function*(){try{if(l.addListener){const n=yield l.addListener(F,"nativeSendHome",o=>t&&t(o));return n!=null&&n.remove?n.remove:()=>null}}catch(n){throw console.error("addListenerHomeHandle error",n),n}}))(e))}))(r)})}catch(e){throw console.error("homeFn error",e),e}};class Oe{constructor(){this.homeBtnSwitch({isClick:!0})}homeBtnSwitch(e){return a(this,null,function*(){var t;try{return yield(t=h.homeIsClick)==null?void 0:t.call(h,e)}catch(n){throw console.error("homeBtnSwitch error",n),n}})}setBackBtn(e){try{(t=>{try{const{mounted:n,beforeUnmount:o,callBack:s}=t;n(()=>{ce(s)}),o(()=>{ce()})}catch(n){throw console.error("backBtnHandle error",n),n}})(e)}catch(t){throw console.error("setBackBtn error",t),t}}setHomeBtn(e){try{Ne(e)}catch(t){throw console.error("setHomeBtn error",t),t}}setFabBtn(e){try{Me(e)}catch(t){throw console.error("setFabBtn error",t),t}}openMiniApp(e){return a(this,null,function*(){try{return yield h.openMiniApp(e)}catch(t){throw console.error("openMiniApp error",t),t}})}showTitle(e){return a(this,null,function*(){try{return yield h.showTitle(e)}catch(t){throw console.error("showTitle error",t),t}})}showSubMask(e){return a(this,null,function*(){try{return yield h.showSubMask(e)}catch(t){throw console.error("showSubMask error",t),t}})}setMiniAppVersion(e){return a(this,null,function*(){try{return yield h.setMiniAppVersion(e)}catch(t){throw console.error("setMiniAppVersion error",t),t}})}showNativeLoading(){return a(this,null,function*(){try{return yield h.showDialog()}catch(e){throw console.error("showNativeLoading error",e),e}})}cancelNativeLoading(){return a(this,null,function*(){try{return yield h.cancelDialog()}catch(e){throw console.error("cancelNativeLoading error",e),e}})}getMiniAppKong(e){return a(this,null,function*(){try{return yield h.getMiniAppKong(e)}catch(t){throw console.error("getMiniAppKong error",t),t}})}}const Be=l.registerPlugin("CameraScanPlugin",{web:new class extends w{pickCameraScan(r){return a(this,null,function*(){return new Promise(e=>{e(r)})})}}});window.removeAddListenerCameraScan=()=>null;class Ue{pickCameraScan(e){return a(this,null,function*(){try{return yield Be.pickCameraScan(e)}catch(t){throw console.error("pickCameraScan error",t),t}})}}const Ee=l.registerPlugin("CameraScanMultiplePlugin",{web:new class extends w{pickCameraScanMultiple(){return a(this,null,function*(){})}}});class _e{pickCameraScanMultiple(e){return a(this,null,function*(){try{return yield Ee.pickCameraScanMultiple(e)}catch(t){throw console.error("pickCameraScanMultiple error",t),t}})}}const xe=l.registerPlugin("CameraScanMultipleNoCountPlugin",{web:new class extends w{pickCameraScanMultipleNoCount(){return a(this,null,function*(){})}}});class He{pickCameraScanMultipleNoCount(e){return a(this,null,function*(){try{return yield xe.pickCameraScanMultipleNoCount(e)}catch(t){throw console.error("pickCameraScanMultipleNoCount error",t),t}})}}const Ie=l.registerPlugin("CameraScanSingleOrDualPlugin",{web:new class extends w{pickCameraScanSingleOrDual(){return a(this,null,function*(){})}}});class je{pickCameraScanSingleOrDual(e){return a(this,null,function*(){try{return yield Ie.pickCameraScanSingleOrDual(e)}catch(t){throw console.error("pickCameraScanSingleOrDual error",t),t}})}}const le="LaserScanPlugin",te=l.registerPlugin(le,{web:new class extends w{pickLaserScan(){return a(this,null,function*(){})}unPickLaserScan(){return a(this,null,function*(){})}setLaserState(){return a(this,null,function*(){})}}}),J=I();J.removeAddListenerLaserScan=()=>null;const de=(r=()=>null)=>{try{J.removeAddListenerLaserScan&&J.removeAddListenerLaserScan();const e=t=>a(this,null,function*(){t&&(J.removeAddListenerLaserScan=yield(n=>a(this,null,function*(){try{if(l.addListener){const o=yield l.addListener(le,"nativeSendLaser",s=>n&&n(s));return o!=null&&o.remove?o.remove:()=>null}}catch(o){throw console.error("addListenerLaserHandle error",o),o}}))(t))});setTimeout(()=>{e(r)})}catch(e){throw console.error("laserScanFn error",e),e}};class Te{constructor(){this.pickLaserScan()}pickLaserScan(){return a(this,null,function*(){try{return yield te.pickLaserScan({isContinue:!1})}catch(e){throw console.error("pickLaserScan error",e),e}})}unPickLaserScan(){return a(this,null,function*(){try{return yield te.unPickLaserScan()}catch(e){throw console.error("unPickLaserScan error",e),e}})}setLaserState(e){try{te.setLaserState(e)}catch(t){throw console.error("setLaserState error",t),t}}setLaserScan(e){(t=>{try{const{mounted:n,beforeUnmount:o,callBack:s}=t;n(()=>{de(s)}),o(()=>{de()})}catch(n){throw console.error("laserScanApiParams error",n),n}})(e)}}const _=I();_.addListenerCountAssistRemoveHandle=()=>null;const ue=(r=()=>null)=>a(this,null,function*(){try{_!=null&&_.addListenerCountAssistRemoveHandle&&typeof _.addListenerCountAssistRemoveHandle=="function"&&_.addListenerCountAssistRemoveHandle(),_.addListenerCountAssistRemoveHandle=yield(e=>a(this,null,function*(){try{if(l.addListener){const t=yield l.addListener(F,"nativeSendCountAssist",n=>e&&e(n));return t!=null&&t.remove?t.remove:()=>null}}catch(t){throw console.error("addListenerCountAssistHandle error",t),t}}))(r)}catch(e){throw console.error("initCountAssistFn error",e),e}});class Fe{setCountAssistState(e){return a(this,null,function*(){return yield Ae.setCountAssistState(e)})}getCountAssistState(e){return(t=>{try{let n=t!=null?t:!1;return K(o=>{n=!!(o!=null&&o.countAssistState)}),n}catch(n){throw console.error("getCountAssistStateHandle error",n),n}})(e)}setCountAssistBtn(e){(t=>{try{const{mounted:n,beforeUnmount:o,callBack:s}=t;n(()=>{ue(s)}),o(()=>{ue()})}catch(n){throw console.error("setCountAssistBtnHandle error",n),n}})(e)}}const me=l.registerPlugin("ClickStreamPlugin",{web:new class extends w{init(){return a(this,null,function*(){return new Promise(r=>{r(null)})})}trace(r){return a(this,null,function*(){try{return new Promise(e=>{e(r)})}catch(e){throw console.error("clickStreamTraceParams error",e),e}})}}});class $e{constructor(){this.init()}init(){return a(this,null,function*(){try{return yield me.init()}catch(e){throw console.error("clickStreamPlugin, init error",e),e}})}trace(e){return a(this,null,function*(){try{return yield me.trace(e)}catch(t){throw console.error("clickStreamPlugin, trace error",t),t}})}}const we="MiniAppLifecyclePlugin";var $=(r=>(r.MINI_APP_BEFORE_UNMOUNT_PERMISSION="mini_app_before_unmount_permission",r.MINI_APP_BEFORE_UNMOUNT_COMPLETION="mini_app_before_unmount_completion",r))($||{});const he=l.registerPlugin(we,{web:new class extends w{setNativeUsagePermission(){return a(this,null,function*(){})}authorizeWebCallback(){return a(this,null,function*(){})}}}),Q=I();Q.removeAddListenerLifecycleMiniAppBeforeUnmount=()=>null;const pe=(r=()=>null)=>{try{Q.removeAddListenerLifecycleMiniAppBeforeUnmount&&Q.removeAddListenerLifecycleMiniAppBeforeUnmount();const e=t=>a(this,null,function*(){t&&(Q.removeAddListenerLifecycleMiniAppBeforeUnmount=yield(n=>a(this,null,function*(){try{if(l.addListener){const o=yield l.addListener(we,"miniAppBeforeUnmount",s=>n&&n(s));return o!=null&&o.remove?o.remove:()=>null}}catch(o){throw console.error("miniAppBeforeUnmountHandle error",o),o}}))(t))});setTimeout(()=>a(this,null,function*(){yield e(r)}))}catch(e){throw console.error("laserScanFn error",e),e}};class Re{constructor(){}setNativeUsagePermission(e){return a(this,null,function*(){try{return yield he.setNativeUsagePermission(e)}catch(t){throw console.error("lifecyclePlugin.setNativeUsagePermission error",t),t}})}authorizeWebCallback(e){return a(this,null,function*(){try{return yield he.authorizeWebCallback(e)}catch(t){throw console.error("lifecyclePlugin.authorizeWebCallback error",t),t}})}miniAppBeforeUnmount(e){this.setNativeUsagePermission({action:$.MINI_APP_BEFORE_UNMOUNT_PERMISSION,value:!0}),((t,n)=>{try{const{mounted:o,beforeUnmount:s,callBack:c}=t;o(()=>{pe(i=>a(this,null,function*(){var f;if(c&&c instanceof Function)try{(f=c(i))==null||f.then(()=>a(this,null,function*(){yield n.setNativeUsagePermission({action:$.MINI_APP_BEFORE_UNMOUNT_PERMISSION,value:!1}),yield n.authorizeWebCallback({action:$.MINI_APP_BEFORE_UNMOUNT_COMPLETION})}))}catch(m){console.error("miniAppBeforeUnmount error callBack is not a function or promise")}else console.error("miniAppBeforeUnmount error callBack is not a function or promise")}))}),s(()=>a(this,null,function*(){pe(),n.setNativeUsagePermission({action:$.MINI_APP_BEFORE_UNMOUNT_PERMISSION,value:!1})}))}catch(o){throw console.error("miniAppBeforeUnmount error",o),o}})(e,this)}}class ye{constructor(){S(this,"initialContextPlugins",new ke);S(this,"communicatePlugins",new Oe);S(this,"cameraScanPlugins",new Ue);S(this,"cameraScanMultiplePlugins",new _e);S(this,"cameraScanMultipleNoCountPlugins",new He);S(this,"cameraScanSingleOrDualPlugins",new je);S(this,"laserScanPlugins",new Te);S(this,"countAssistPlugins",new Fe);S(this,"clickStreamPlugins",new $e);S(this,"lifecyclePlugins",new Re)}}const De=new ye,We=Object.freeze(Object.defineProperty({__proto__:null,PluginsWeb:class extends w{homeIsClick(){return a(this,null,function*(){})}openMiniApp(r){return a(this,null,function*(){try{return new Promise(e=>{e(r)})}catch(e){throw console.error("openMiniApp error",e),e}})}showTitle(r){return a(this,null,function*(){try{return new Promise(e=>{e(r)})}catch(e){throw console.error("showTitle error",e),e}})}showFABMenu(r){return a(this,null,function*(){try{return new Promise(e=>{e(r)})}catch(e){throw console.error("showFABMenu error",e),e}})}showSubMask(r){return a(this,null,function*(){try{return new Promise(e=>{e(r)})}catch(e){throw console.error("showSubMask error",e),e}})}setMiniAppVersion(r){return a(this,null,function*(){try{return new Promise(e=>{e(r)})}catch(e){throw console.error("setMiniAppVersion error",e),e}})}showDialog(){return a(this,null,function*(){})}cancelDialog(){return a(this,null,function*(){})}getMiniAppKong(r){return a(this,null,function*(){try{return new Promise(e=>{e(r)})}catch(e){throw console.error("getMiniAppKong error",e),e}})}}},Symbol.toStringTag,{value:"Module"}));g.NativeApi=ye,g.default=De,Object.defineProperties(g,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(g,m){typeof exports=="object"&&typeof module!="undefined"?m(exports):typeof define=="function"&&define.amd?define(["exports"],m):m((g=typeof globalThis!="undefined"?globalThis:g||self).main={})})(this,function(g){"use strict";var nt=Object.defineProperty,ot=Object.defineProperties;var at=Object.getOwnPropertyDescriptors;var Be=Object.getOwnPropertySymbols;var st=Object.prototype.hasOwnProperty,it=Object.prototype.propertyIsEnumerable;var ie=(g,m,w)=>m in g?nt(g,m,{enumerable:!0,configurable:!0,writable:!0,value:w}):g[m]=w,Ee=(g,m)=>{for(var w in m||(m={}))st.call(m,w)&&ie(g,w,m[w]);if(Be)for(var w of Be(m))it.call(m,w)&&ie(g,w,m[w]);return g},Ie=(g,m)=>ot(g,at(m));var P=(g,m,w)=>(ie(g,typeof m!="symbol"?m+"":m,w),w);var a=(g,m,w)=>new Promise((B,H)=>{var Z=S=>{try{l(w.next(S))}catch(y){H(y)}},ee=S=>{try{l(w.throw(S))}catch(y){H(y)}},l=S=>S.done?B(S.value):Promise.resolve(S.value).then(Z,ee);l((w=w.apply(g,m)).next())});/*! Capacitor: https://capacitorjs.com/ - MIT License */const m=n=>n.CapacitorPlatforms=(e=>{const t=new Map;t.set("web",{name:"web"});const r=e.CapacitorPlatforms||{currentPlatform:{name:"web"},platforms:t};return r.addPlatform=(o,s)=>{r.platforms.set(o,s)},r.setPlatform=o=>{r.platforms.has(o)&&(r.currentPlatform=r.platforms.get(o))},r})(n),w=m(typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});var B;w.addPlatform,w.setPlatform,function(n){n.Unimplemented="UNIMPLEMENTED",n.Unavailable="UNAVAILABLE"}(B||(B={}));class H extends Error{constructor(e,t,r){super(e),this.message=e,this.code=t,this.data=r}}const Z=n=>{var e,t,r,o,s;const c=n.CapacitorCustomPlatform||null,i=n.Capacitor||{},p=i.Plugins=i.Plugins||{},h=n.CapacitorPlatforms,C=((e=h==null?void 0:h.currentPlatform)===null||e===void 0?void 0:e.getPlatform)||(()=>c!==null?c.name:(d=>{var u,v;return d!=null&&d.androidBridge?"android":!((v=(u=d==null?void 0:d.webkit)===null||u===void 0?void 0:u.messageHandlers)===null||v===void 0)&&v.bridge?"ios":"web"})(n)),b=((t=h==null?void 0:h.currentPlatform)===null||t===void 0?void 0:t.isNativePlatform)||(()=>C()!=="web"),L=((r=h==null?void 0:h.currentPlatform)===null||r===void 0?void 0:r.isPluginAvailable)||(d=>{const u=k.get(d);return!!(u!=null&&u.platforms.has(C()))||!!j(d)}),j=((o=h==null?void 0:h.currentPlatform)===null||o===void 0?void 0:o.getPluginHeader)||(d=>{var u;return(u=i.PluginHeaders)===null||u===void 0?void 0:u.find(v=>v.name===d)}),k=new Map,A=((s=h==null?void 0:h.currentPlatform)===null||s===void 0?void 0:s.registerPlugin)||((d,u={})=>{const v=k.get(d);if(v)return console.warn(`Capacitor plugin "${d}" already registered. Cannot register plugins twice.`),v.proxy;const M=C(),R=j(d);let _;const ne=O=>{let E;const T=(...Y)=>{const D=(()=>a(this,null,function*(){return!_&&M in u?_=_=typeof u[M]=="function"?yield u[M]():u[M]:c!==null&&!_&&"web"in u&&(_=_=typeof u.web=="function"?yield u.web():u.web),_}))().then(W=>{const Ne=((N,V)=>{var ae,se;if(!R){if(N)return(se=N[V])===null||se===void 0?void 0:se.bind(N);throw new H(`"${d}" plugin is not implemented on ${M}`,B.Unimplemented)}{const Oe=R==null?void 0:R.methods.find(q=>V===q.name);if(Oe)return Oe.rtype==="promise"?q=>i.nativePromise(d,V.toString(),q):(q,rt)=>i.nativeCallback(d,V.toString(),q,rt);if(N)return(ae=N[V])===null||ae===void 0?void 0:ae.bind(N)}})(W,O);if(Ne){const N=Ne(...Y);return E=N==null?void 0:N.remove,N}throw new H(`"${d}.${O}()" is not implemented on ${M}`,B.Unimplemented)});return O==="addListener"&&(D.remove=()=>a(this,null,function*(){return E()})),D};return T.toString=()=>`${O.toString()}() { [capacitor code] }`,Object.defineProperty(T,"name",{value:O,writable:!1,configurable:!1}),T},Ae=ne("addListener"),Me=ne("removeListener"),tt=(O,E)=>{const T=Ae({eventName:O},E),Y=()=>a(this,null,function*(){const W=yield T;Me({eventName:O,callbackId:W},E)}),D=new Promise(W=>T.then(()=>W({remove:Y})));return D.remove=()=>a(this,null,function*(){console.warn("Using addListener() without 'await' is deprecated."),yield Y()}),D},oe=new Proxy({},{get(O,E){switch(E){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return R?tt:Ae;case"removeListener":return Me;default:return ne(E)}}});return p[d]=oe,k.set(d,{name:d,proxy:oe,platforms:new Set([...Object.keys(u),...R?[M]:[]])}),oe});return i.convertFileSrc||(i.convertFileSrc=d=>d),i.getPlatform=C,i.handleError=d=>n.console.error(d),i.isNativePlatform=b,i.isPluginAvailable=L,i.pluginMethodNoop=(d,u,v)=>Promise.reject(`${v} does not have an implementation of "${u}".`),i.registerPlugin=A,i.Exception=H,i.DEBUG=!!i.DEBUG,i.isLoggingEnabled=!!i.isLoggingEnabled,i.platform=i.getPlatform(),i.isNative=i.isNativePlatform(),i},ee=n=>n.Capacitor=Z(n),l=ee(typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}),S=l.registerPlugin;l.Plugins;class y{constructor(e){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)}addListener(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t);const r=this.windowListeners[e];r&&!r.registered&&this.addWindowListener(r);const o=()=>a(this,null,function*(){return this.removeListener(e,t)}),s=Promise.resolve({remove:o});return Object.defineProperty(s,"remove",{value:()=>a(this,null,function*(){console.warn("Using addListener() without 'await' is deprecated."),yield o()})}),s}removeAllListeners(){return a(this,null,function*(){this.listeners={};for(const e in this.windowListeners)this.removeWindowListener(this.windowListeners[e]);this.windowListeners={}})}notifyListeners(e,t){const r=this.listeners[e];r&&r.forEach(o=>o(t))}hasListeners(e){return!!this.listeners[e].length}registerWindowListener(e,t){this.windowListeners[t]={registered:!1,windowEventName:e,pluginEventName:t,handler:r=>{this.notifyListeners(t,r)}}}unimplemented(e="not implemented"){return new l.Exception(e,B.Unimplemented)}unavailable(e="not available"){return new l.Exception(e,B.Unavailable)}removeListener(e,t){return a(this,null,function*(){const r=this.listeners[e];if(!r)return;const o=r.indexOf(t);this.listeners[e].splice(o,1),this.listeners[e].length||this.removeWindowListener(this.windowListeners[e])})}addWindowListener(e){window.addEventListener(e.windowEventName,e.handler),e.registered=!0}removeWindowListener(e){e&&(window.removeEventListener(e.windowEventName,e.handler),e.registered=!1)}}const ce=n=>encodeURIComponent(n).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),le=n=>n.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class Ue extends y{getCookies(){return a(this,null,function*(){const e=document.cookie,t={};return e.split(";").forEach(r=>{if(r.length<=0)return;let[o,s]=r.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");o=le(o).trim(),s=le(s).trim(),t[o]=s}),t})}setCookie(e){return a(this,null,function*(){try{const t=ce(e.key),r=ce(e.value),o=`; expires=${(e.expires||"").replace("expires=","")}`,s=(e.path||"/").replace("path=",""),c=e.url!=null&&e.url.length>0?`domain=${e.url}`:"";document.cookie=`${t}=${r||""}${o}; path=${s}; ${c};`}catch(t){return Promise.reject(t)}})}deleteCookie(e){return a(this,null,function*(){try{document.cookie=`${e.key}=; Max-Age=0`}catch(t){return Promise.reject(t)}})}clearCookies(){return a(this,null,function*(){try{const e=document.cookie.split(";")||[];for(const t of e)document.cookie=t.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}catch(e){return Promise.reject(e)}})}clearAllCookies(){return a(this,null,function*(){try{yield this.clearCookies()}catch(e){return Promise.reject(e)}})}}S("CapacitorCookies",{web:()=>new Ue});const xe=(n,e={})=>{const t=Object.assign({method:n.method||"GET",headers:n.headers},e),r=((o={})=>{const s=Object.keys(o);return Object.keys(o).map(c=>c.toLocaleLowerCase()).reduce((c,i,p)=>(c[i]=o[s[p]],c),{})})(n.headers)["content-type"]||"";if(typeof n.data=="string")t.body=n.data;else if(r.includes("application/x-www-form-urlencoded")){const o=new URLSearchParams;for(const[s,c]of Object.entries(n.data||{}))o.set(s,c);t.body=o.toString()}else if(r.includes("multipart/form-data")){const o=new FormData;if(n.data instanceof FormData)n.data.forEach((c,i)=>{o.append(i,c)});else for(const c of Object.keys(n.data))o.append(c,n.data[c]);t.body=o;const s=new Headers(t.headers);s.delete("content-type"),t.headers=s}else(r.includes("application/json")||typeof n.data=="object")&&(t.body=JSON.stringify(n.data));return t};class _e extends y{request(e){return a(this,null,function*(){const t=xe(e,e.webFetchExtra),r=((b,L=!0)=>b?Object.entries(b).reduce((j,k)=>{const[A,d]=k;let u,v;return Array.isArray(d)?(v="",d.forEach(M=>{u=L?encodeURIComponent(M):M,v+=`${A}=${u}&`}),v.slice(0,-1)):(u=L?encodeURIComponent(d):d,v=`${A}=${u}`),`${j}&${v}`},"").substr(1):null)(e.params,e.shouldEncodeUrlParams),o=r?`${e.url}?${r}`:e.url,s=yield fetch(o,t),c=s.headers.get("content-type")||"";let i,p,{responseType:h="text"}=s.ok?e:{};switch(c.includes("application/json")&&(h="json"),h){case"arraybuffer":case"blob":p=yield s.blob(),i=yield(b=>a(this,null,function*(){return new Promise((L,j)=>{const k=new FileReader;k.onload=()=>{const A=k.result;L(A.indexOf(",")>=0?A.split(",")[1]:A)},k.onerror=A=>j(A),k.readAsDataURL(b)})}))(p);break;case"json":i=yield s.json();break;default:i=yield s.text()}const C={};return s.headers.forEach((b,L)=>{C[L]=b}),{data:i,headers:C,status:s.status,url:s.url}})}get(e){return a(this,null,function*(){return this.request(Object.assign(Object.assign({},e),{method:"GET"}))})}post(e){return a(this,null,function*(){return this.request(Object.assign(Object.assign({},e),{method:"POST"}))})}put(e){return a(this,null,function*(){return this.request(Object.assign(Object.assign({},e),{method:"PUT"}))})}patch(e){return a(this,null,function*(){return this.request(Object.assign(Object.assign({},e),{method:"PATCH"}))})}delete(e){return a(this,null,function*(){return this.request(Object.assign(Object.assign({},e),{method:"DELETE"}))})}}function te(){return l.getPlatform()==="android"?JSON.parse(AndroidInitialContext.initialContext()):window.portalInitialContext}S("CapacitorHttp",{web:()=>new _e}),S("Portals",{web:()=>Promise.resolve().then(function(){return He}).then(n=>new n.PortalsWeb)});const He=Object.freeze({__proto__:null,PortalsWeb:class extends y{publishNative(n){return a(this,null,function*(){})}}}),z=n=>{var e,t,r;try{if(typeof window=="undefined")return;if(te&&((e=te())!=null&&e.value)){const o=(r=(t=te())==null?void 0:t.value)!=null?r:null;if(!o)return void console.error("native initialContext is undefine");if(!n)return void console.error("initialContext call back is undefine");n(o)}}catch(o){throw console.error("getInitialContextHandle error",o),o}};class je{isNative(){try{return(()=>{try{let e=!1;return z(t=>{e=!!(t!=null&&t.isNative)}),e}catch(e){throw console.error("isNative error",e),e}})()}catch(e){throw console.error("isNative error",e),e}}redirectPage(e){try{(({callBack:t})=>{z(r=>{var o;try{if(!(r!=null&&r.params))return void console.info("initial context native params is undefine");const s=(o=r==null?void 0:r.params)!=null?o:null;if(!s)return;if(!t)return void console.error("initial context call back is undefine");t(s)}catch(s){throw console.error("redirectPageHandle error",s),s}})})(e)}catch(t){throw console.error("redirectPage error",t),t}}getNativeInfo(e){try{return this.isNative()?(()=>{try{let t=null;return z(r=>{t=r!=null?r:null}),t}catch(t){throw console.error("getNativeInfoHandle error",t),t}})():(t=>{var r;return(r=t==null?void 0:t.mockData)!=null?r:null})(e)}catch(t){throw console.error("getNativeInfo error",t),t}}}const I=()=>{try{let n={};return typeof window!="undefined"&&(n=window),n}catch(n){throw console.error("isWinHandle error",n),n}},F="CommunicatePlugin",f=l.registerPlugin(F,{web:()=>Promise.resolve().then(()=>et).then(n=>new n.PluginsWeb)}),Te=l.registerPlugin("CountAssistPlugin",{web:new class extends y{setCountAssistState(n){return a(this,null,function*(){try{return new Promise(e=>{e(n)})}catch(e){throw console.error("setCountAssistState error",e),e}})}}}),K=I();K.removeAddListenerFab=()=>null;const Fe=n=>{var e,t;try{K.removeAddListenerFab&&K.removeAddListenerFab();const r=[];if((e=f.showFABMenu)==null||e.call(f,{fabMenu:r}),!n||!((t=Object.keys(n))!=null&&t.length))return;Object.keys(n).forEach(o=>{var s,c,i,p,h,C,b,L;r.push({disable:(c=(s=n==null?void 0:n[o])==null?void 0:s.disable)!=null?c:!1,icon:(p=(i=n==null?void 0:n[o])==null?void 0:i.icon)!=null?p:"",id:(C=(h=n==null?void 0:n[o])==null?void 0:h.id)!=null?C:"",name:(L=(b=n==null?void 0:n[o])==null?void 0:b.title)!=null?L:""})}),queueMicrotask(()=>{var o;(o=f.showFABMenu)==null||o.call(f,{fabMenu:r})}),setTimeout(()=>{(o=>a(this,null,function*(){o&&(K.removeAddListenerFab=yield(s=>a(this,null,function*(){try{if(l.addListener){const c=yield l.addListener(F,"nativeSendFab",i=>s&&s(i));return c!=null&&c.remove?c.remove:()=>null}}catch(c){throw console.error("addListenerFabHandle error",c),c}}))(o))}))(o=>{let s;o!=null&&o.disable||o!=null&&o.id&&(Object.keys(n).forEach(c=>{var i,p,h;(i=n==null?void 0:n[c])!=null&&i.id&&o.id===n[c].id&&(s=(h=(p=n[c])==null?void 0:p.fn)!=null?h:()=>null)}),typeof s=="function"&&s())})})}catch(r){throw console.error("fabBtnHandle error",r),r}},U=I();U.addListenerBackRemoveHandle=()=>null;const de=(n=()=>null)=>a(this,null,function*(){try{U!=null&&U.addListenerBackRemoveHandle&&typeof U.addListenerBackRemoveHandle=="function"&&U.addListenerBackRemoveHandle(),U.addListenerBackRemoveHandle=yield(e=>a(this,null,function*(){try{if(l.addListener){const t=yield l.addListener(F,"nativeSendBack",r=>e&&e(r));return t!=null&&t.remove?t.remove:()=>null}}catch(t){throw console.error("addListenerBackHandle error",t),t}}))(n)}catch(e){throw console.error("initBackBtnFn error",e),e}}),G=I();G.addListenerHomeHandle=()=>null;const $e=n=>{try{G.addListenerHomeHandle&&G.addListenerHomeHandle(),setTimeout(()=>{(e=>a(this,null,function*(){e&&(G.addListenerHomeHandle=yield(t=>a(this,null,function*(){try{if(l.addListener){const r=yield l.addListener(F,"nativeSendHome",o=>t&&t(o));return r!=null&&r.remove?r.remove:()=>null}}catch(r){throw console.error("addListenerHomeHandle error",r),r}}))(e))}))(n)})}catch(e){throw console.error("homeFn error",e),e}};class Re{constructor(){this.homeBtnSwitch({isClick:!0})}homeBtnSwitch(e){return a(this,null,function*(){var t;try{return yield(t=f.homeIsClick)==null?void 0:t.call(f,e)}catch(r){throw console.error("homeBtnSwitch error",r),r}})}setBackBtn(e){try{(t=>{try{const{mounted:r,beforeUnmount:o,callBack:s}=t;r(()=>{de(s)}),o(()=>{de()})}catch(r){throw console.error("backBtnHandle error",r),r}})(e)}catch(t){throw console.error("setBackBtn error",t),t}}setHomeBtn(e){try{$e(e)}catch(t){throw console.error("setHomeBtn error",t),t}}setFabBtn(e){try{Fe(e)}catch(t){throw console.error("setFabBtn error",t),t}}openMiniApp(e){return a(this,null,function*(){try{return yield f.openMiniApp(e)}catch(t){throw console.error("openMiniApp error",t),t}})}showTitle(e){return a(this,null,function*(){try{return yield f.showTitle(e)}catch(t){throw console.error("showTitle error",t),t}})}showSubMask(e){return a(this,null,function*(){try{return yield f.showSubMask(e)}catch(t){throw console.error("showSubMask error",t),t}})}setMiniAppVersion(e){return a(this,null,function*(){try{return yield f.setMiniAppVersion(e)}catch(t){throw console.error("setMiniAppVersion error",t),t}})}showNativeLoading(){return a(this,null,function*(){try{return yield f.showDialog()}catch(e){throw console.error("showNativeLoading error",e),e}})}cancelNativeLoading(){return a(this,null,function*(){try{return yield f.cancelDialog()}catch(e){throw console.error("cancelNativeLoading error",e),e}})}getMiniAppKong(e){return a(this,null,function*(){try{return yield f.getMiniAppKong(e)}catch(t){throw console.error("getMiniAppKong error",t),t}})}}const ue=l.registerPlugin("CameraScanPlugin",{web:new class extends y{pickCameraScan(n){return a(this,null,function*(){return new Promise(e=>{e(n)})})}setCameraScanState(){return a(this,null,function*(){})}}});window.removeAddListenerCameraScan=()=>null;class De{pickCameraScan(e){return a(this,null,function*(){try{return yield ue.pickCameraScan(e)}catch(t){throw console.error("pickCameraScan error",t),t}})}setCameraScanState(e){return a(this,null,function*(){try{return yield ue.setCameraScanState(e)}catch(t){throw console.error("setCameraScanState error",t),t}})}}const me=l.registerPlugin("CameraScanMultiplePlugin",{web:new class extends y{pickCameraScanMultiple(){return a(this,null,function*(){})}setCameraScanMultipleState(){return a(this,null,function*(){})}}});class We{pickCameraScanMultiple(e){return a(this,null,function*(){try{return yield me.pickCameraScanMultiple(e)}catch(t){throw console.error("pickCameraScanMultiple error",t),t}})}setCameraScanMultipleState(e){return a(this,null,function*(){try{return yield me.setCameraScanMultipleState(e)}catch(t){throw console.error("setCameraScanMultipleState error",t),t}})}}const he=l.registerPlugin("CameraScanMultipleNoCountPlugin",{web:new class extends y{pickCameraScanMultipleNoCount(){return a(this,null,function*(){})}setCameraScanMultipleNoCountState(){return a(this,null,function*(){})}}});class Ve{pickCameraScanMultipleNoCount(e){return a(this,null,function*(){try{return yield he.pickCameraScanMultipleNoCount(e)}catch(t){throw console.error("pickCameraScanMultipleNoCount error",t),t}})}setCameraScanMultipleNoCountState(e){return a(this,null,function*(){try{return yield he.setCameraScanMultipleNoCountState(e)}catch(t){throw console.error("setCameraScanMultipleNoCountState error",t),t}})}}const pe=l.registerPlugin("CameraScanSingleOrDualPlugin",{web:new class extends y{pickCameraScanSingleOrDual(){return a(this,null,function*(){})}setCameraScanSingleOrDualState(){return a(this,null,function*(){})}}});class qe{pickCameraScanSingleOrDual(e){return a(this,null,function*(){try{return yield pe.pickCameraScanSingleOrDual(e)}catch(t){throw console.error("pickCameraScanSingleOrDual error",t),t}})}setCameraScanSingleOrDualState(e){return a(this,null,function*(){try{return yield pe.setCameraScanSingleOrDualState(e)}catch(t){throw console.error("setCameraScanSingleOrDualState error",t),t}})}}const we="LaserScanPlugin",re=l.registerPlugin(we,{web:new class extends y{pickLaserScan(){return a(this,null,function*(){})}unPickLaserScan(){return a(this,null,function*(){})}setLaserState(){return a(this,null,function*(){})}}}),J=I();J.removeAddListenerLaserScan=()=>null;const ge=(n=()=>null)=>{try{J.removeAddListenerLaserScan&&J.removeAddListenerLaserScan();const e=t=>a(this,null,function*(){t&&(J.removeAddListenerLaserScan=yield(r=>a(this,null,function*(){try{if(l.addListener){const o=yield l.addListener(we,"nativeSendLaser",s=>r&&r(s));return o!=null&&o.remove?o.remove:()=>null}}catch(o){throw console.error("addListenerLaserHandle error",o),o}}))(t))});setTimeout(()=>{e(n)})}catch(e){throw console.error("laserScanFn error",e),e}};class ze{constructor(){this.pickLaserScan()}pickLaserScan(){return a(this,null,function*(){try{return yield re.pickLaserScan({isContinue:!1})}catch(e){throw console.error("pickLaserScan error",e),e}})}unPickLaserScan(){return a(this,null,function*(){try{return yield re.unPickLaserScan()}catch(e){throw console.error("unPickLaserScan error",e),e}})}setLaserState(e){try{re.setLaserState(e)}catch(t){throw console.error("setLaserState error",t),t}}setLaserScan(e){(t=>{try{const{mounted:r,beforeUnmount:o,callBack:s}=t;r(()=>{ge(s)}),o(()=>{ge()})}catch(r){throw console.error("laserScanApiParams error",r),r}})(e)}}const x=I();x.addListenerCountAssistRemoveHandle=()=>null;const ye=(n=()=>null)=>a(this,null,function*(){try{x!=null&&x.addListenerCountAssistRemoveHandle&&typeof x.addListenerCountAssistRemoveHandle=="function"&&x.addListenerCountAssistRemoveHandle(),x.addListenerCountAssistRemoveHandle=yield(e=>a(this,null,function*(){try{if(l.addListener){const t=yield l.addListener(F,"nativeSendCountAssist",r=>e&&e(r));return t!=null&&t.remove?t.remove:()=>null}}catch(t){throw console.error("addListenerCountAssistHandle error",t),t}}))(n)}catch(e){throw console.error("initCountAssistFn error",e),e}});class Ke{setCountAssistState(e){return a(this,null,function*(){return yield Te.setCountAssistState(e)})}getCountAssistState(e){return(t=>{try{let r=t!=null?t:!1;return z(o=>{r=!!(o!=null&&o.countAssistState)}),r}catch(r){throw console.error("getCountAssistStateHandle error",r),r}})(e)}setCountAssistBtn(e){(t=>{try{const{mounted:r,beforeUnmount:o,callBack:s}=t;r(()=>{ye(s)}),o(()=>{ye()})}catch(r){throw console.error("setCountAssistBtnHandle error",r),r}})(e)}}const fe=l.registerPlugin("ClickStreamPlugin",{web:new class extends y{init(){return a(this,null,function*(){return new Promise(n=>{n(null)})})}trace(n){return a(this,null,function*(){try{return new Promise(e=>{e(n)})}catch(e){throw console.error("clickStreamTraceParams error",e),e}})}}});class Ge{constructor(){this.init()}init(){return a(this,null,function*(){try{return yield fe.init()}catch(e){throw console.error("clickStreamPlugin, init error",e),e}})}trace(e){return a(this,null,function*(){try{return yield fe.trace(e)}catch(t){throw console.error("clickStreamPlugin, trace error",t),t}})}}const ve="MiniAppLifecyclePlugin";var $=(n=>(n.MINI_APP_BEFORE_UNMOUNT_PERMISSION="mini_app_before_unmount_permission",n.MINI_APP_BEFORE_UNMOUNT_COMPLETION="mini_app_before_unmount_completion",n))($||{});const Pe=l.registerPlugin(ve,{web:new class extends y{setNativeUsagePermission(){return a(this,null,function*(){})}authorizeWebCallback(){return a(this,null,function*(){})}}}),Q=I();Q.removeAddListenerLifecycleMiniAppBeforeUnmount=()=>null;const Se=(n=()=>null)=>{try{Q.removeAddListenerLifecycleMiniAppBeforeUnmount&&Q.removeAddListenerLifecycleMiniAppBeforeUnmount();const e=t=>a(this,null,function*(){t&&(Q.removeAddListenerLifecycleMiniAppBeforeUnmount=yield(r=>a(this,null,function*(){try{if(l.addListener){const o=yield l.addListener(ve,"miniAppBeforeUnmount",s=>r&&r(s));return o!=null&&o.remove?o.remove:()=>null}}catch(o){throw console.error("miniAppBeforeUnmountHandle error",o),o}}))(t))});setTimeout(()=>a(this,null,function*(){yield e(n)}))}catch(e){throw console.error("laserScanFn error",e),e}};class Je{constructor(){}setNativeUsagePermission(e){return a(this,null,function*(){try{return yield Pe.setNativeUsagePermission(e)}catch(t){throw console.error("lifecyclePlugin.setNativeUsagePermission error",t),t}})}authorizeWebCallback(e){return a(this,null,function*(){try{return yield Pe.authorizeWebCallback(e)}catch(t){throw console.error("lifecyclePlugin.authorizeWebCallback error",t),t}})}miniAppBeforeUnmount(e){this.setNativeUsagePermission({action:$.MINI_APP_BEFORE_UNMOUNT_PERMISSION,value:!0}),((t,r)=>{try{const{mounted:o,beforeUnmount:s,callBack:c}=t;o(()=>{Se(i=>a(this,null,function*(){var p;if(c&&c instanceof Function)try{(p=c(i))==null||p.then(()=>a(this,null,function*(){yield r.setNativeUsagePermission({action:$.MINI_APP_BEFORE_UNMOUNT_PERMISSION,value:!1}),yield r.authorizeWebCallback({action:$.MINI_APP_BEFORE_UNMOUNT_COMPLETION})}))}catch(h){console.error("miniAppBeforeUnmount error callBack is not a function or promise")}else console.error("miniAppBeforeUnmount error callBack is not a function or promise")}))}),s(()=>a(this,null,function*(){Se(),r.setNativeUsagePermission({action:$.MINI_APP_BEFORE_UNMOUNT_PERMISSION,value:!1})}))}catch(o){throw console.error("miniAppBeforeUnmount error",o),o}})(e,this)}}const be=l.registerPlugin("DeviceInteractionPlugin",{web:new class extends y{callVibrate(){return a(this,null,function*(){})}callErrorBeep(){return a(this,null,function*(){})}}});class Qe{callVibrate(){return a(this,null,function*(){try{return yield be.callVibrate()}catch(e){throw console.error("callVibrate error",e),e}})}callErrorBeep(){return a(this,null,function*(){try{return yield be.callErrorBeep()}catch(e){throw console.error("callErrorBeep error",e),e}})}}const Le="PollingPlugin",Ce=l.registerPlugin(Le,{web:new class extends y{create(){return a(this,null,function*(){})}destroy(){return a(this,null,function*(){})}}}),X=I();X.removeAddListenerPolling=()=>null;const Xe=(n,e)=>{try{X.removeAddListenerPolling&&X.removeAddListenerPolling();const t=e.pollingId;(r=>a(this,null,function*(){return r&&(X.removeAddListenerPolling=yield(o=>a(this,null,function*(){try{if(l.addListener){const s=yield l.addListener(Le,"nativeSendPolling",c=>o&&o(c));return s!=null&&s.remove?s.remove:()=>null}}catch(s){throw console.error("addListenerPollingHandle error",s),s}}))(r))}))(r=>{(r==null?void 0:r.pollingId)===t&&(r!=null&&r.pollingId)&&n.pollingList.forEach(o=>{o!=null&&o.pollingId&&(r==null?void 0:r.pollingId)===(o==null?void 0:o.pollingId)&&typeof(o==null?void 0:o.callBack)=="function"&&o.callBack(r)})})}catch(t){throw console.error("pollingFn error",t),t}};class Ye{constructor(){P(this,"pollingList");this.pollingList=[]}create(e){var t,r,o;try{(t=e==null?void 0:e.pollingParams)!=null&&t.pollingId&&this.pollingList.push({pollingId:(r=e==null?void 0:e.pollingParams)==null?void 0:r.pollingId,callBack:e==null?void 0:e.callBack}),this.pollingList=this.pollingList.filter((c,i,p)=>i===p.findIndex(h=>h.pollingId===c.pollingId));const s=((o=e==null?void 0:e.pollingParams)==null?void 0:o.delay)/1e3;return Ce.create(Ie(Ee({},e==null?void 0:e.pollingParams),{delay:s})),((c,i)=>{try{const{mounted:p,pollingParams:h}=c;p(()=>Xe(i,h))}catch(p){throw console.error("createPolling error",p),p}})(e,this),()=>{var c,i;return(c=e==null?void 0:e.pollingParams)!=null&&c.pollingId?this.destroy({pollingId:(i=e==null?void 0:e.pollingParams)==null?void 0:i.pollingId}):null}}catch(s){throw console.error("pollingPlugin create error",s),s}}destroy(e){var t;try{const r=this.pollingList.map(o=>o.pollingId).indexOf(e.pollingId);return(t=this.pollingList)!=null&&t.length&&(Number(r)||Number(r)>=0)&&this.pollingList.splice(Number(r),1),Ce.destroy(e)}catch(r){throw console.error("pollingPlugin destroy error",r),r}}}class ke{constructor(){P(this,"initialContextPlugins",new je);P(this,"communicatePlugins",new Re);P(this,"cameraScanPlugins",new De);P(this,"cameraScanMultiplePlugins",new We);P(this,"cameraScanMultipleNoCountPlugins",new Ve);P(this,"cameraScanSingleOrDualPlugins",new qe);P(this,"laserScanPlugins",new ze);P(this,"countAssistPlugins",new Ke);P(this,"clickStreamPlugins",new Ge);P(this,"lifecyclePlugins",new Je);P(this,"deviceInteractionPlugins",new Qe);P(this,"pollingPlugins",new Ye)}}const Ze=new ke,et=Object.freeze(Object.defineProperty({__proto__:null,PluginsWeb:class extends y{homeIsClick(){return a(this,null,function*(){})}openMiniApp(n){return a(this,null,function*(){try{return new Promise(e=>{e(n)})}catch(e){throw console.error("openMiniApp error",e),e}})}showTitle(n){return a(this,null,function*(){try{return new Promise(e=>{e(n)})}catch(e){throw console.error("showTitle error",e),e}})}showFABMenu(n){return a(this,null,function*(){try{return new Promise(e=>{e(n)})}catch(e){throw console.error("showFABMenu error",e),e}})}showSubMask(n){return a(this,null,function*(){try{return new Promise(e=>{e(n)})}catch(e){throw console.error("showSubMask error",e),e}})}setMiniAppVersion(n){return a(this,null,function*(){try{return new Promise(e=>{e(n)})}catch(e){throw console.error("setMiniAppVersion error",e),e}})}showDialog(){return a(this,null,function*(){})}cancelDialog(){return a(this,null,function*(){})}getMiniAppKong(n){return a(this,null,function*(){try{return new Promise(e=>{e(n)})}catch(e){throw console.error("getMiniAppKong error",e),e}})}}},Symbol.toStringTag,{value:"Module"}));g.NativeApi=ke,g.default=Ze,Object.defineProperties(g,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "superapp-miniapp-invoke-native",
3
3
  "type": "module",
4
- "version": "1.3.4",
4
+ "version": "1.5.0",
5
5
  "description": "In Superapp, the encapsulation of calling Native interfaces by mini-programs.",
6
6
  "scripts": {
7
7
  "dev": "vite",