gws-client 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,89 +1,89 @@
1
- var Ee = Object.defineProperty, Pe = Object.defineProperties;
1
+ var xe = Object.defineProperty, Pe = Object.defineProperties;
2
2
  var $e = Object.getOwnPropertyDescriptors;
3
- var se = Object.getOwnPropertySymbols;
4
- var _e = Object.prototype.hasOwnProperty, Le = Object.prototype.propertyIsEnumerable;
5
- var Y = (s, e, t) => e in s ? Ee(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, p = (s, e) => {
3
+ var re = Object.getOwnPropertySymbols;
4
+ var Ne = Object.prototype.hasOwnProperty, Le = Object.prototype.propertyIsEnumerable;
5
+ var K = (s, e, t) => e in s ? xe(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, S = (s, e) => {
6
6
  for (var t in e || (e = {}))
7
- _e.call(e, t) && Y(s, t, e[t]);
8
- if (se)
9
- for (var t of se(e))
10
- Le.call(e, t) && Y(s, t, e[t]);
7
+ Ne.call(e, t) && K(s, t, e[t]);
8
+ if (re)
9
+ for (var t of re(e))
10
+ Le.call(e, t) && K(s, t, e[t]);
11
11
  return s;
12
- }, B = (s, e) => Pe(s, $e(e));
13
- var o = (s, e, t) => Y(s, typeof e != "symbol" ? e + "" : e, t);
12
+ }, E = (s, e) => Pe(s, $e(e));
13
+ var o = (s, e, t) => K(s, typeof e != "symbol" ? e + "" : e, t);
14
14
  var l = (s, e, t) => new Promise((n, r) => {
15
- var a = (u) => {
15
+ var a = (d) => {
16
16
  try {
17
- c(t.next(u));
18
- } catch (d) {
19
- r(d);
17
+ c(t.next(d));
18
+ } catch (u) {
19
+ r(u);
20
20
  }
21
- }, i = (u) => {
21
+ }, i = (d) => {
22
22
  try {
23
- c(t.throw(u));
24
- } catch (d) {
25
- r(d);
23
+ c(t.throw(d));
24
+ } catch (u) {
25
+ r(u);
26
26
  }
27
- }, c = (u) => u.done ? n(u.value) : Promise.resolve(u.value).then(a, i);
27
+ }, c = (d) => d.done ? n(d.value) : Promise.resolve(d.value).then(a, i);
28
28
  c((t = t.apply(s, e)).next());
29
29
  });
30
- const Me = window.location.href.includes("https") ? "wss://localhost:19528" : "ws://localhost:9527", re = "1", ae = "2";
31
- var we = /* @__PURE__ */ ((s) => (s.MIN = "0", s.LOW = "1", s.MIDDLE = "2", s.HIGH = "3", s))(we || {});
32
- const Ne = "00000001";
33
- function Te(s) {
30
+ const Te = window.location.href.includes("https") ? "wss://localhost:19528" : "ws://localhost:9527", ae = "1", ie = "2";
31
+ var Se = /* @__PURE__ */ ((s) => (s.MIN = "0", s.LOW = "1", s.MIDDLE = "2", s.HIGH = "3", s))(Se || {});
32
+ const Me = "00000001", Y = "NO_SEAL_AVAILABLE", Fe = "CERTIFICATE_NOT_FOUND", Ge = "CLIENT_CONNECTION_FAILED";
33
+ function Oe(s) {
34
34
  return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
35
35
  }
36
- var T = {}, ie;
37
- function Ge() {
38
- if (ie) return T;
39
- ie = 1, T.byteLength = c, T.toByteArray = d, T.fromByteArray = m;
36
+ var M = {}, oe;
37
+ function He() {
38
+ if (oe) return M;
39
+ oe = 1, M.byteLength = c, M.toByteArray = u, M.fromByteArray = m;
40
40
  for (var s = [], e = [], t = typeof Uint8Array != "undefined" ? Uint8Array : Array, n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", r = 0, a = n.length; r < a; ++r)
41
41
  s[r] = n[r], e[n.charCodeAt(r)] = r;
42
42
  e[45] = 62, e[95] = 63;
43
43
  function i(h) {
44
- var y = h.length;
45
- if (y % 4 > 0)
44
+ var f = h.length;
45
+ if (f % 4 > 0)
46
46
  throw new Error("Invalid string. Length must be a multiple of 4");
47
47
  var w = h.indexOf("=");
48
- w === -1 && (w = y);
49
- var g = w === y ? 0 : 4 - w % 4;
50
- return [w, g];
48
+ w === -1 && (w = f);
49
+ var y = w === f ? 0 : 4 - w % 4;
50
+ return [w, y];
51
51
  }
52
52
  function c(h) {
53
- var y = i(h), w = y[0], g = y[1];
54
- return (w + g) * 3 / 4 - g;
53
+ var f = i(h), w = f[0], y = f[1];
54
+ return (w + y) * 3 / 4 - y;
55
55
  }
56
- function u(h, y, w) {
57
- return (y + w) * 3 / 4 - w;
56
+ function d(h, f, w) {
57
+ return (f + w) * 3 / 4 - w;
58
58
  }
59
- function d(h) {
60
- var y, w = i(h), g = w[0], S = w[1], v = new t(u(h, g, S)), I = 0, A = S > 0 ? g - 4 : g, k;
61
- for (k = 0; k < A; k += 4)
62
- y = e[h.charCodeAt(k)] << 18 | e[h.charCodeAt(k + 1)] << 12 | e[h.charCodeAt(k + 2)] << 6 | e[h.charCodeAt(k + 3)], v[I++] = y >> 16 & 255, v[I++] = y >> 8 & 255, v[I++] = y & 255;
63
- return S === 2 && (y = e[h.charCodeAt(k)] << 2 | e[h.charCodeAt(k + 1)] >> 4, v[I++] = y & 255), S === 1 && (y = e[h.charCodeAt(k)] << 10 | e[h.charCodeAt(k + 1)] << 4 | e[h.charCodeAt(k + 2)] >> 2, v[I++] = y >> 8 & 255, v[I++] = y & 255), v;
59
+ function u(h) {
60
+ var f, w = i(h), y = w[0], p = w[1], v = new t(d(h, y, p)), I = 0, b = p > 0 ? y - 4 : y, k;
61
+ for (k = 0; k < b; k += 4)
62
+ f = e[h.charCodeAt(k)] << 18 | e[h.charCodeAt(k + 1)] << 12 | e[h.charCodeAt(k + 2)] << 6 | e[h.charCodeAt(k + 3)], v[I++] = f >> 16 & 255, v[I++] = f >> 8 & 255, v[I++] = f & 255;
63
+ return p === 2 && (f = e[h.charCodeAt(k)] << 2 | e[h.charCodeAt(k + 1)] >> 4, v[I++] = f & 255), p === 1 && (f = e[h.charCodeAt(k)] << 10 | e[h.charCodeAt(k + 1)] << 4 | e[h.charCodeAt(k + 2)] >> 2, v[I++] = f >> 8 & 255, v[I++] = f & 255), v;
64
64
  }
65
65
  function C(h) {
66
66
  return s[h >> 18 & 63] + s[h >> 12 & 63] + s[h >> 6 & 63] + s[h & 63];
67
67
  }
68
- function f(h, y, w) {
69
- for (var g, S = [], v = y; v < w; v += 3)
70
- g = (h[v] << 16 & 16711680) + (h[v + 1] << 8 & 65280) + (h[v + 2] & 255), S.push(C(g));
71
- return S.join("");
68
+ function g(h, f, w) {
69
+ for (var y, p = [], v = f; v < w; v += 3)
70
+ y = (h[v] << 16 & 16711680) + (h[v + 1] << 8 & 65280) + (h[v + 2] & 255), p.push(C(y));
71
+ return p.join("");
72
72
  }
73
73
  function m(h) {
74
- for (var y, w = h.length, g = w % 3, S = [], v = 16383, I = 0, A = w - g; I < A; I += v)
75
- S.push(f(h, I, I + v > A ? A : I + v));
76
- return g === 1 ? (y = h[w - 1], S.push(
77
- s[y >> 2] + s[y << 4 & 63] + "=="
78
- )) : g === 2 && (y = (h[w - 2] << 8) + h[w - 1], S.push(
79
- s[y >> 10] + s[y >> 4 & 63] + s[y << 2 & 63] + "="
80
- )), S.join("");
74
+ for (var f, w = h.length, y = w % 3, p = [], v = 16383, I = 0, b = w - y; I < b; I += v)
75
+ p.push(g(h, I, I + v > b ? b : I + v));
76
+ return y === 1 ? (f = h[w - 1], p.push(
77
+ s[f >> 2] + s[f << 4 & 63] + "=="
78
+ )) : y === 2 && (f = (h[w - 2] << 8) + h[w - 1], p.push(
79
+ s[f >> 10] + s[f >> 4 & 63] + s[f << 2 & 63] + "="
80
+ )), p.join("");
81
81
  }
82
- return T;
82
+ return M;
83
83
  }
84
- var Fe = Ge();
85
- const oe = /* @__PURE__ */ Te(Fe);
86
- class He {
84
+ var Ze = He();
85
+ const ce = /* @__PURE__ */ Oe(Ze);
86
+ class Ve {
87
87
  constructor() {
88
88
  o(this, "deps", /* @__PURE__ */ new Map());
89
89
  }
@@ -103,10 +103,10 @@ class He {
103
103
  console.error("vite-plugin-css-injected-by-js", e);
104
104
  }
105
105
  })();
106
- var Ze = Object.defineProperty, Oe = (s, e, t) => e in s ? Ze(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, ce = (s, e, t) => Oe(s, typeof e != "symbol" ? e + "" : e, t);
107
- function Q() {
106
+ var je = Object.defineProperty, Ue = (s, e, t) => e in s ? je(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, le = (s, e, t) => Ue(s, typeof e != "symbol" ? e + "" : e, t);
107
+ function X() {
108
108
  }
109
- function Ve(s, e) {
109
+ function ze(s, e) {
110
110
  for (const t in e) s[t] = e[t];
111
111
  return (
112
112
  /** @type {T & S} */
@@ -116,31 +116,31 @@ function Ve(s, e) {
116
116
  function pe(s) {
117
117
  return s();
118
118
  }
119
- function le() {
119
+ function ue() {
120
120
  return /* @__PURE__ */ Object.create(null);
121
121
  }
122
- function O(s) {
122
+ function Z(s) {
123
123
  s.forEach(pe);
124
124
  }
125
- function F(s) {
125
+ function G(s) {
126
126
  return typeof s == "function";
127
127
  }
128
- function Se(s, e) {
128
+ function ke(s, e) {
129
129
  return s != s ? e == e : s !== e || s && typeof s == "object" || typeof s == "function";
130
130
  }
131
- function je(s) {
131
+ function Je(s) {
132
132
  return Object.keys(s).length === 0;
133
133
  }
134
- function Ue(s, e, t, n) {
134
+ function Qe(s, e, t, n) {
135
135
  if (s) {
136
- const r = ke(s, e, t, n);
136
+ const r = ve(s, e, t, n);
137
137
  return s[0](r);
138
138
  }
139
139
  }
140
- function ke(s, e, t, n) {
141
- return s[1] && n ? Ve(t.ctx.slice(), s[1](n(e))) : t.ctx;
140
+ function ve(s, e, t, n) {
141
+ return s[1] && n ? ze(t.ctx.slice(), s[1](n(e))) : t.ctx;
142
142
  }
143
- function ze(s, e, t, n) {
143
+ function We(s, e, t, n) {
144
144
  if (s[2] && n) {
145
145
  const r = s[2](n(t));
146
146
  if (e.dirty === void 0)
@@ -155,13 +155,13 @@ function ze(s, e, t, n) {
155
155
  }
156
156
  return e.dirty;
157
157
  }
158
- function Je(s, e, t, n, r, a) {
158
+ function qe(s, e, t, n, r, a) {
159
159
  if (r) {
160
- const i = ke(e, t, n, a);
160
+ const i = ve(e, t, n, a);
161
161
  s.p(i, r);
162
162
  }
163
163
  }
164
- function qe(s) {
164
+ function Ke(s) {
165
165
  if (s.ctx.length > 32) {
166
166
  const e = [], t = s.ctx.length / 32;
167
167
  for (let n = 0; n < t; n++)
@@ -173,107 +173,107 @@ function qe(s) {
173
173
  function de(s) {
174
174
  return s == null ? "" : s;
175
175
  }
176
- function b(s, e) {
176
+ function B(s, e) {
177
177
  s.appendChild(e);
178
178
  }
179
- function K(s, e, t) {
179
+ function q(s, e, t) {
180
180
  s.insertBefore(e, t || null);
181
181
  }
182
182
  function V(s) {
183
183
  s.parentNode && s.parentNode.removeChild(s);
184
184
  }
185
- function ve(s, e) {
185
+ function Ie(s, e) {
186
186
  for (let t = 0; t < s.length; t += 1)
187
187
  s[t] && s[t].d(e);
188
188
  }
189
- function E(s) {
189
+ function _(s) {
190
190
  return document.createElement(s);
191
191
  }
192
- function M(s) {
192
+ function L(s) {
193
193
  return document.createTextNode(s);
194
194
  }
195
195
  function j() {
196
- return M(" ");
196
+ return L(" ");
197
197
  }
198
- function We() {
199
- return M("");
198
+ function Ye() {
199
+ return L("");
200
200
  }
201
- function G(s, e, t, n) {
201
+ function F(s, e, t, n) {
202
202
  return s.addEventListener(e, t, n), () => s.removeEventListener(e, t, n);
203
203
  }
204
- function x(s, e, t) {
204
+ function D(s, e, t) {
205
205
  t == null ? s.removeAttribute(e) : s.getAttribute(e) !== t && s.setAttribute(e, t);
206
206
  }
207
- function Ke(s) {
207
+ function Re(s) {
208
208
  return Array.from(s.childNodes);
209
209
  }
210
210
  function U(s, e) {
211
211
  e = "" + e, s.data !== e && (s.data = /** @type {string} */
212
212
  e);
213
213
  }
214
- function q(s, e, t, n) {
214
+ function Q(s, e, t, n) {
215
215
  t == null ? s.style.removeProperty(e) : s.style.setProperty(e, t, "");
216
216
  }
217
- let te;
218
- function H(s) {
219
- te = s;
217
+ let ne;
218
+ function O(s) {
219
+ ne = s;
220
220
  }
221
- const _ = [], ue = [];
222
- let N = [];
223
- const he = [], Ye = /* @__PURE__ */ Promise.resolve();
224
- let X = !1;
225
- function Re() {
226
- X || (X = !0, Ye.then(Ie));
221
+ const $ = [], he = [];
222
+ let T = [];
223
+ const ge = [], Xe = /* @__PURE__ */ Promise.resolve();
224
+ let ee = !1;
225
+ function et() {
226
+ ee || (ee = !0, Xe.then(Ee));
227
227
  }
228
- function ee(s) {
229
- N.push(s);
228
+ function te(s) {
229
+ T.push(s);
230
230
  }
231
231
  const R = /* @__PURE__ */ new Set();
232
- let $ = 0;
233
- function Ie() {
234
- if ($ !== 0)
232
+ let P = 0;
233
+ function Ee() {
234
+ if (P !== 0)
235
235
  return;
236
- const s = te;
236
+ const s = ne;
237
237
  do {
238
238
  try {
239
- for (; $ < _.length; ) {
240
- const e = _[$];
241
- $++, H(e), Qe(e.$$);
239
+ for (; P < $.length; ) {
240
+ const e = $[P];
241
+ P++, O(e), tt(e.$$);
242
242
  }
243
243
  } catch (e) {
244
- throw _.length = 0, $ = 0, e;
244
+ throw $.length = 0, P = 0, e;
245
245
  }
246
- for (H(null), _.length = 0, $ = 0; ue.length; ) ue.pop()();
247
- for (let e = 0; e < N.length; e += 1) {
248
- const t = N[e];
246
+ for (O(null), $.length = 0, P = 0; he.length; ) he.pop()();
247
+ for (let e = 0; e < T.length; e += 1) {
248
+ const t = T[e];
249
249
  R.has(t) || (R.add(t), t());
250
250
  }
251
- N.length = 0;
252
- } while (_.length);
253
- for (; he.length; )
254
- he.pop()();
255
- X = !1, R.clear(), H(s);
251
+ T.length = 0;
252
+ } while ($.length);
253
+ for (; ge.length; )
254
+ ge.pop()();
255
+ ee = !1, R.clear(), O(s);
256
256
  }
257
- function Qe(s) {
257
+ function tt(s) {
258
258
  if (s.fragment !== null) {
259
- s.update(), O(s.before_update);
259
+ s.update(), Z(s.before_update);
260
260
  const e = s.dirty;
261
- s.dirty = [-1], s.fragment && s.fragment.p(s.ctx, e), s.after_update.forEach(ee);
261
+ s.dirty = [-1], s.fragment && s.fragment.p(s.ctx, e), s.after_update.forEach(te);
262
262
  }
263
263
  }
264
- function Xe(s) {
264
+ function nt(s) {
265
265
  const e = [], t = [];
266
- N.forEach((n) => s.indexOf(n) === -1 ? e.push(n) : t.push(n)), t.forEach((n) => n()), N = e;
266
+ T.forEach((n) => s.indexOf(n) === -1 ? e.push(n) : t.push(n)), t.forEach((n) => n()), T = e;
267
267
  }
268
268
  const z = /* @__PURE__ */ new Set();
269
- let et;
270
- function ne(s, e) {
269
+ let st;
270
+ function se(s, e) {
271
271
  s && s.i && (z.delete(s), s.i(e));
272
272
  }
273
273
  function Be(s, e, t, n) {
274
274
  if (s && s.o) {
275
275
  if (z.has(s)) return;
276
- z.add(s), et.c.push(() => {
276
+ z.add(s), st.c.push(() => {
277
277
  z.delete(s);
278
278
  }), s.o(e);
279
279
  }
@@ -281,69 +281,69 @@ function Be(s, e, t, n) {
281
281
  function W(s) {
282
282
  return (s == null ? void 0 : s.length) !== void 0 ? s : Array.from(s);
283
283
  }
284
- function tt(s) {
284
+ function rt(s) {
285
285
  s && s.c();
286
286
  }
287
- function be(s, e, t) {
287
+ function Ae(s, e, t) {
288
288
  const { fragment: n, after_update: r } = s.$$;
289
- n && n.m(e, t), ee(() => {
290
- const a = s.$$.on_mount.map(pe).filter(F);
291
- s.$$.on_destroy ? s.$$.on_destroy.push(...a) : O(a), s.$$.on_mount = [];
292
- }), r.forEach(ee);
289
+ n && n.m(e, t), te(() => {
290
+ const a = s.$$.on_mount.map(pe).filter(G);
291
+ s.$$.on_destroy ? s.$$.on_destroy.push(...a) : Z(a), s.$$.on_mount = [];
292
+ }), r.forEach(te);
293
293
  }
294
294
  function De(s, e) {
295
295
  const t = s.$$;
296
- t.fragment !== null && (Xe(t.after_update), O(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
296
+ t.fragment !== null && (nt(t.after_update), Z(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
297
297
  }
298
- function nt(s, e) {
299
- s.$$.dirty[0] === -1 && (_.push(s), Re(), s.$$.dirty.fill(0)), s.$$.dirty[e / 31 | 0] |= 1 << e % 31;
298
+ function at(s, e) {
299
+ s.$$.dirty[0] === -1 && ($.push(s), et(), s.$$.dirty.fill(0)), s.$$.dirty[e / 31 | 0] |= 1 << e % 31;
300
300
  }
301
- function xe(s, e, t, n, r, a, i = null, c = [-1]) {
302
- const u = te;
303
- H(s);
304
- const d = s.$$ = {
301
+ function be(s, e, t, n, r, a, i = null, c = [-1]) {
302
+ const d = ne;
303
+ O(s);
304
+ const u = s.$$ = {
305
305
  fragment: null,
306
306
  ctx: [],
307
307
  // state
308
308
  props: a,
309
- update: Q,
309
+ update: X,
310
310
  not_equal: r,
311
- bound: le(),
311
+ bound: ue(),
312
312
  // lifecycle
313
313
  on_mount: [],
314
314
  on_destroy: [],
315
315
  on_disconnect: [],
316
316
  before_update: [],
317
317
  after_update: [],
318
- context: new Map(e.context || (u ? u.$$.context : [])),
318
+ context: new Map(e.context || (d ? d.$$.context : [])),
319
319
  // everything else
320
- callbacks: le(),
320
+ callbacks: ue(),
321
321
  dirty: c,
322
322
  skip_bound: !1,
323
- root: e.target || u.$$.root
323
+ root: e.target || d.$$.root
324
324
  };
325
- i && i(d.root);
325
+ i && i(u.root);
326
326
  let C = !1;
327
- if (d.ctx = t ? t(s, e.props || {}, (f, m, ...h) => {
328
- const y = h.length ? h[0] : m;
329
- return d.ctx && r(d.ctx[f], d.ctx[f] = y) && (!d.skip_bound && d.bound[f] && d.bound[f](y), C && nt(s, f)), m;
330
- }) : [], d.update(), C = !0, O(d.before_update), d.fragment = n ? n(d.ctx) : !1, e.target) {
327
+ if (u.ctx = t ? t(s, e.props || {}, (g, m, ...h) => {
328
+ const f = h.length ? h[0] : m;
329
+ return u.ctx && r(u.ctx[g], u.ctx[g] = f) && (!u.skip_bound && u.bound[g] && u.bound[g](f), C && at(s, g)), m;
330
+ }) : [], u.update(), C = !0, Z(u.before_update), u.fragment = n ? n(u.ctx) : !1, e.target) {
331
331
  if (e.hydrate) {
332
- const f = Ke(e.target);
333
- d.fragment && d.fragment.l(f), f.forEach(V);
332
+ const g = Re(e.target);
333
+ u.fragment && u.fragment.l(g), g.forEach(V);
334
334
  } else
335
- d.fragment && d.fragment.c();
336
- e.intro && ne(s.$$.fragment), be(s, e.target, e.anchor), Ie();
335
+ u.fragment && u.fragment.c();
336
+ e.intro && se(s.$$.fragment), Ae(s, e.target, e.anchor), Ee();
337
337
  }
338
- H(u);
338
+ O(d);
339
339
  }
340
- class Ae {
340
+ class _e {
341
341
  constructor() {
342
- ce(this, "$$"), ce(this, "$$set");
342
+ le(this, "$$"), le(this, "$$set");
343
343
  }
344
344
  /** @returns {void} */
345
345
  $destroy() {
346
- De(this, 1), this.$destroy = Q;
346
+ De(this, 1), this.$destroy = X;
347
347
  }
348
348
  /**
349
349
  * @template {Extract<keyof Events, string>} K
@@ -352,8 +352,8 @@ class Ae {
352
352
  * @returns {() => void}
353
353
  */
354
354
  $on(e, t) {
355
- if (!F(t))
356
- return Q;
355
+ if (!G(t))
356
+ return X;
357
357
  const n = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
358
358
  return n.push(t), () => {
359
359
  const r = n.indexOf(t);
@@ -365,27 +365,27 @@ class Ae {
365
365
  * @returns {void}
366
366
  */
367
367
  $set(e) {
368
- this.$$set && !je(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
368
+ this.$$set && !Je(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
369
369
  }
370
370
  }
371
- const st = "4";
372
- typeof window != "undefined" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(st);
373
- function rt(s) {
371
+ const it = "4";
372
+ typeof window != "undefined" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(it);
373
+ function ot(s) {
374
374
  let e, t, n, r = (
375
375
  /*title*/
376
376
  (s[1] || "标题") + ""
377
- ), a, i, c, u, d, C, f = (
377
+ ), a, i, c, d, u, C, g = (
378
378
  /*cancelText*/
379
379
  (s[4] || "取消") + ""
380
- ), m, h, y, w = (
380
+ ), m, h, f, w = (
381
381
  /*okText*/
382
382
  (s[5] || "确认") + ""
383
- ), g, S, v, I;
384
- const A = (
383
+ ), y, p, v, I;
384
+ const b = (
385
385
  /*#slots*/
386
386
  s[8].default
387
- ), k = Ue(
388
- A,
387
+ ), k = Qe(
388
+ b,
389
389
  s,
390
390
  /*$$scope*/
391
391
  s[7],
@@ -393,90 +393,90 @@ function rt(s) {
393
393
  );
394
394
  return {
395
395
  c() {
396
- e = E("div"), t = E("div"), n = E("div"), a = M(r), i = j(), c = E("div"), k && k.c(), u = j(), d = E("div"), C = E("button"), m = M(f), h = j(), y = E("button"), g = M(w), x(n, "class", "model-title svelte-16iv9d0"), x(c, "class", "slot svelte-16iv9d0"), x(C, "class", "modal-btn svelte-16iv9d0"), x(y, "class", "modal-btn success svelte-16iv9d0"), q(
397
- y,
396
+ e = _("div"), t = _("div"), n = _("div"), a = L(r), i = j(), c = _("div"), k && k.c(), d = j(), u = _("div"), C = _("button"), m = L(g), h = j(), f = _("button"), y = L(w), D(n, "class", "model-title svelte-16iv9d0"), D(c, "class", "slot svelte-16iv9d0"), D(C, "class", "modal-btn svelte-16iv9d0"), D(f, "class", "modal-btn success svelte-16iv9d0"), Q(
397
+ f,
398
398
  "background-color",
399
399
  /*theme*/
400
400
  s[6]
401
- ), x(d, "class", "modal-footer svelte-16iv9d0"), x(t, "class", "modal-content svelte-16iv9d0"), x(e, "class", "modal-background modal-visible svelte-16iv9d0");
401
+ ), D(u, "class", "modal-footer svelte-16iv9d0"), D(t, "class", "modal-content svelte-16iv9d0"), D(e, "class", "modal-background modal-visible svelte-16iv9d0");
402
402
  },
403
- m(D, P) {
404
- K(D, e, P), b(e, t), b(t, n), b(n, a), b(t, i), b(t, c), k && k.m(c, null), b(t, u), b(t, d), b(d, C), b(C, m), b(d, h), b(d, y), b(y, g), S = !0, v || (I = [
405
- G(C, "click", function() {
406
- F(
403
+ m(A, x) {
404
+ q(A, e, x), B(e, t), B(t, n), B(n, a), B(t, i), B(t, c), k && k.m(c, null), B(t, d), B(t, u), B(u, C), B(C, m), B(u, h), B(u, f), B(f, y), p = !0, v || (I = [
405
+ F(C, "click", function() {
406
+ G(
407
407
  /*onCancel*/
408
408
  s[0]
409
409
  ) && s[0].apply(this, arguments);
410
410
  }),
411
- G(y, "click", function() {
412
- F(
411
+ F(f, "click", function() {
412
+ G(
413
413
  /*onOk*/
414
414
  s[2]
415
415
  ) && s[2].apply(this, arguments);
416
416
  }),
417
- G(t, "click", at),
418
- G(e, "click", function() {
419
- F(
417
+ F(t, "click", ct),
418
+ F(e, "click", function() {
419
+ G(
420
420
  /*onClose*/
421
421
  s[3]
422
422
  ) && s[3].apply(this, arguments);
423
423
  })
424
424
  ], v = !0);
425
425
  },
426
- p(D, [P]) {
427
- s = D, (!S || P & /*title*/
426
+ p(A, [x]) {
427
+ s = A, (!p || x & /*title*/
428
428
  2) && r !== (r = /*title*/
429
- (s[1] || "标题") + "") && U(a, r), k && k.p && (!S || P & /*$$scope*/
430
- 128) && Je(
429
+ (s[1] || "标题") + "") && U(a, r), k && k.p && (!p || x & /*$$scope*/
430
+ 128) && qe(
431
431
  k,
432
- A,
432
+ b,
433
433
  s,
434
434
  /*$$scope*/
435
435
  s[7],
436
- S ? ze(
437
- A,
436
+ p ? We(
437
+ b,
438
438
  /*$$scope*/
439
439
  s[7],
440
- P,
440
+ x,
441
441
  null
442
- ) : qe(
442
+ ) : Ke(
443
443
  /*$$scope*/
444
444
  s[7]
445
445
  ),
446
446
  null
447
- ), (!S || P & /*cancelText*/
448
- 16) && f !== (f = /*cancelText*/
449
- (s[4] || "取消") + "") && U(m, f), (!S || P & /*okText*/
447
+ ), (!p || x & /*cancelText*/
448
+ 16) && g !== (g = /*cancelText*/
449
+ (s[4] || "取消") + "") && U(m, g), (!p || x & /*okText*/
450
450
  32) && w !== (w = /*okText*/
451
- (s[5] || "确认") + "") && U(g, w), (!S || P & /*theme*/
452
- 64) && q(
453
- y,
451
+ (s[5] || "确认") + "") && U(y, w), (!p || x & /*theme*/
452
+ 64) && Q(
453
+ f,
454
454
  "background-color",
455
455
  /*theme*/
456
456
  s[6]
457
457
  );
458
458
  },
459
- i(D) {
460
- S || (ne(k, D), S = !0);
459
+ i(A) {
460
+ p || (se(k, A), p = !0);
461
461
  },
462
- o(D) {
463
- Be(k, D), S = !1;
462
+ o(A) {
463
+ Be(k, A), p = !1;
464
464
  },
465
- d(D) {
466
- D && V(e), k && k.d(D), v = !1, O(I);
465
+ d(A) {
466
+ A && V(e), k && k.d(A), v = !1, Z(I);
467
467
  }
468
468
  };
469
469
  }
470
- const at = (s) => s.stopPropagation();
471
- function it(s, e, t) {
472
- let { $$slots: n = {}, $$scope: r } = e, { onCancel: a } = e, { title: i } = e, { onOk: c } = e, { onClose: u } = e, { cancelText: d } = e, { okText: C } = e, { theme: f } = e;
470
+ const ct = (s) => s.stopPropagation();
471
+ function lt(s, e, t) {
472
+ let { $$slots: n = {}, $$scope: r } = e, { onCancel: a } = e, { title: i } = e, { onOk: c } = e, { onClose: d } = e, { cancelText: u } = e, { okText: C } = e, { theme: g } = e;
473
473
  return s.$$set = (m) => {
474
- "onCancel" in m && t(0, a = m.onCancel), "title" in m && t(1, i = m.title), "onOk" in m && t(2, c = m.onOk), "onClose" in m && t(3, u = m.onClose), "cancelText" in m && t(4, d = m.cancelText), "okText" in m && t(5, C = m.okText), "theme" in m && t(6, f = m.theme), "$$scope" in m && t(7, r = m.$$scope);
475
- }, [a, i, c, u, d, C, f, r, n];
474
+ "onCancel" in m && t(0, a = m.onCancel), "title" in m && t(1, i = m.title), "onOk" in m && t(2, c = m.onOk), "onClose" in m && t(3, d = m.onClose), "cancelText" in m && t(4, u = m.cancelText), "okText" in m && t(5, C = m.okText), "theme" in m && t(6, g = m.theme), "$$scope" in m && t(7, r = m.$$scope);
475
+ }, [a, i, c, d, u, C, g, r, n];
476
476
  }
477
- class ot extends Ae {
477
+ class ut extends _e {
478
478
  constructor(e) {
479
- super(), xe(this, e, it, rt, Se, {
479
+ super(), be(this, e, lt, ot, ke, {
480
480
  onCancel: 0,
481
481
  title: 1,
482
482
  onOk: 2,
@@ -487,15 +487,15 @@ class ot extends Ae {
487
487
  });
488
488
  }
489
489
  }
490
- function ge(s, e, t) {
490
+ function ye(s, e, t) {
491
491
  const n = s.slice();
492
492
  return n[13] = e[t], n[15] = t, n;
493
493
  }
494
- function ye(s, e, t) {
494
+ function fe(s, e, t) {
495
495
  const n = s.slice();
496
496
  return n[16] = e[t], n;
497
497
  }
498
- function fe(s) {
498
+ function Ce(s) {
499
499
  let e, t = (
500
500
  /*col*/
501
501
  (s[16].format ? (
@@ -514,11 +514,11 @@ function fe(s) {
514
514
  ), n;
515
515
  return {
516
516
  c() {
517
- e = E("div"), n = M(t), x(e, "class", "svelte-1kh75ag"), q(e, "width", `${100 / /*columns*/
517
+ e = _("div"), n = L(t), D(e, "class", "svelte-1kh75ag"), Q(e, "width", `${100 / /*columns*/
518
518
  s[1].length}%`);
519
519
  },
520
520
  m(r, a) {
521
- K(r, e, a), b(e, n);
521
+ q(r, e, a), B(e, n);
522
522
  },
523
523
  p(r, a) {
524
524
  a & /*columns, data*/
@@ -536,7 +536,7 @@ function fe(s) {
536
536
  r[16].key
537
537
  ]
538
538
  )) + "") && U(n, t), a & /*columns*/
539
- 2 && q(e, "width", `${100 / /*columns*/
539
+ 2 && Q(e, "width", `${100 / /*columns*/
540
540
  r[1].length}%`);
541
541
  },
542
542
  d(r) {
@@ -544,14 +544,14 @@ function fe(s) {
544
544
  }
545
545
  };
546
546
  }
547
- function Ce(s) {
547
+ function me(s) {
548
548
  let e, t, n, r, a, i = W(
549
549
  /*columns*/
550
550
  s[1]
551
551
  ), c = [];
552
- for (let d = 0; d < i.length; d += 1)
553
- c[d] = fe(ye(s, i, d));
554
- function u() {
552
+ for (let u = 0; u < i.length; u += 1)
553
+ c[u] = Ce(fe(s, i, u));
554
+ function d() {
555
555
  return (
556
556
  /*click_handler*/
557
557
  s[12](
@@ -562,64 +562,64 @@ function Ce(s) {
562
562
  }
563
563
  return {
564
564
  c() {
565
- e = E("div");
566
- for (let d = 0; d < c.length; d += 1)
567
- c[d].c();
568
- t = j(), x(e, "class", n = de(`cert-item ${/*index*/
565
+ e = _("div");
566
+ for (let u = 0; u < c.length; u += 1)
567
+ c[u].c();
568
+ t = j(), D(e, "class", n = de(`cert-item ${/*index*/
569
569
  s[15] === 0 ? "cert-item-first" : ""} ${/*index*/
570
570
  s[15] === /*selectedIndex*/
571
571
  s[7] ? "cert-item-selected" : ""}`) + " svelte-1kh75ag");
572
572
  },
573
- m(d, C) {
574
- K(d, e, C);
575
- for (let f = 0; f < c.length; f += 1)
576
- c[f] && c[f].m(e, null);
577
- b(e, t), r || (a = G(e, "click", u), r = !0);
573
+ m(u, C) {
574
+ q(u, e, C);
575
+ for (let g = 0; g < c.length; g += 1)
576
+ c[g] && c[g].m(e, null);
577
+ B(e, t), r || (a = F(e, "click", d), r = !0);
578
578
  },
579
- p(d, C) {
580
- if (s = d, C & /*columns, data*/
579
+ p(u, C) {
580
+ if (s = u, C & /*columns, data*/
581
581
  3) {
582
582
  i = W(
583
583
  /*columns*/
584
584
  s[1]
585
585
  );
586
- let f;
587
- for (f = 0; f < i.length; f += 1) {
588
- const m = ye(s, i, f);
589
- c[f] ? c[f].p(m, C) : (c[f] = fe(m), c[f].c(), c[f].m(e, t));
586
+ let g;
587
+ for (g = 0; g < i.length; g += 1) {
588
+ const m = fe(s, i, g);
589
+ c[g] ? c[g].p(m, C) : (c[g] = Ce(m), c[g].c(), c[g].m(e, t));
590
590
  }
591
- for (; f < c.length; f += 1)
592
- c[f].d(1);
591
+ for (; g < c.length; g += 1)
592
+ c[g].d(1);
593
593
  c.length = i.length;
594
594
  }
595
595
  C & /*selectedIndex*/
596
596
  128 && n !== (n = de(`cert-item ${/*index*/
597
597
  s[15] === 0 ? "cert-item-first" : ""} ${/*index*/
598
598
  s[15] === /*selectedIndex*/
599
- s[7] ? "cert-item-selected" : ""}`) + " svelte-1kh75ag") && x(e, "class", n);
599
+ s[7] ? "cert-item-selected" : ""}`) + " svelte-1kh75ag") && D(e, "class", n);
600
600
  },
601
- d(d) {
602
- d && V(e), ve(c, d), r = !1, a();
601
+ d(u) {
602
+ u && V(e), Ie(c, u), r = !1, a();
603
603
  }
604
604
  };
605
605
  }
606
- function ct(s) {
606
+ function dt(s) {
607
607
  let e, t = W(
608
608
  /*data*/
609
609
  s[0]
610
610
  ), n = [];
611
611
  for (let r = 0; r < t.length; r += 1)
612
- n[r] = Ce(ge(s, t, r));
612
+ n[r] = me(ye(s, t, r));
613
613
  return {
614
614
  c() {
615
615
  for (let r = 0; r < n.length; r += 1)
616
616
  n[r].c();
617
- e = We();
617
+ e = Ye();
618
618
  },
619
619
  m(r, a) {
620
620
  for (let i = 0; i < n.length; i += 1)
621
621
  n[i] && n[i].m(r, a);
622
- K(r, e, a);
622
+ q(r, e, a);
623
623
  },
624
624
  p(r, a) {
625
625
  if (a & /*selectedIndex, columns, data*/
@@ -630,8 +630,8 @@ function ct(s) {
630
630
  );
631
631
  let i;
632
632
  for (i = 0; i < t.length; i += 1) {
633
- const c = ge(r, t, i);
634
- n[i] ? n[i].p(c, a) : (n[i] = Ce(c), n[i].c(), n[i].m(e.parentNode, e));
633
+ const c = ye(r, t, i);
634
+ n[i] ? n[i].p(c, a) : (n[i] = me(c), n[i].c(), n[i].m(e.parentNode, e));
635
635
  }
636
636
  for (; i < n.length; i += 1)
637
637
  n[i].d(1);
@@ -639,13 +639,13 @@ function ct(s) {
639
639
  }
640
640
  },
641
641
  d(r) {
642
- r && V(e), ve(n, r);
642
+ r && V(e), Ie(n, r);
643
643
  }
644
644
  };
645
645
  }
646
- function lt(s) {
646
+ function ht(s) {
647
647
  let e, t;
648
- return e = new ot({
648
+ return e = new ut({
649
649
  props: {
650
650
  onOk: (
651
651
  /*handleOk*/
@@ -675,15 +675,15 @@ function lt(s) {
675
675
  /*theme*/
676
676
  s[5]
677
677
  ),
678
- $$slots: { default: [ct] },
678
+ $$slots: { default: [dt] },
679
679
  $$scope: { ctx: s }
680
680
  }
681
681
  }), {
682
682
  c() {
683
- tt(e.$$.fragment);
683
+ rt(e.$$.fragment);
684
684
  },
685
685
  m(n, r) {
686
- be(e, n, r), t = !0;
686
+ Ae(e, n, r), t = !0;
687
687
  },
688
688
  p(n, [r]) {
689
689
  const a = {};
@@ -701,7 +701,7 @@ function lt(s) {
701
701
  524419 && (a.$$scope = { dirty: r, ctx: n }), e.$set(a);
702
702
  },
703
703
  i(n) {
704
- t || (ne(e.$$.fragment, n), t = !0);
704
+ t || (se(e.$$.fragment, n), t = !0);
705
705
  },
706
706
  o(n) {
707
707
  Be(e.$$.fragment, n), t = !1;
@@ -711,34 +711,34 @@ function lt(s) {
711
711
  }
712
712
  };
713
713
  }
714
- function dt(s, e, t) {
715
- let { data: n = [] } = e, { columns: r = [] } = e, { onCancel: a } = e, { onOk: i } = e, { onClose: c } = e, { cancelText: u = "" } = e, { okText: d = "" } = e, { theme: C = "#409eff" } = e, { title: f = "" } = e, m = 0;
714
+ function gt(s, e, t) {
715
+ let { data: n = [] } = e, { columns: r = [] } = e, { onCancel: a } = e, { onOk: i } = e, { onClose: c } = e, { cancelText: d = "" } = e, { okText: u = "" } = e, { theme: C = "#409eff" } = e, { title: g = "" } = e, m = 0;
716
716
  const h = () => {
717
- a(`${f}失败`), c == null || c();
718
- }, y = () => {
717
+ a(`${g}失败`), c == null || c();
718
+ }, f = () => {
719
719
  i == null || i(n[m]), c == null || c();
720
- }, w = (g) => t(7, m = g);
721
- return s.$$set = (g) => {
722
- "data" in g && t(0, n = g.data), "columns" in g && t(1, r = g.columns), "onCancel" in g && t(10, a = g.onCancel), "onOk" in g && t(11, i = g.onOk), "onClose" in g && t(2, c = g.onClose), "cancelText" in g && t(3, u = g.cancelText), "okText" in g && t(4, d = g.okText), "theme" in g && t(5, C = g.theme), "title" in g && t(6, f = g.title);
720
+ }, w = (y) => t(7, m = y);
721
+ return s.$$set = (y) => {
722
+ "data" in y && t(0, n = y.data), "columns" in y && t(1, r = y.columns), "onCancel" in y && t(10, a = y.onCancel), "onOk" in y && t(11, i = y.onOk), "onClose" in y && t(2, c = y.onClose), "cancelText" in y && t(3, d = y.cancelText), "okText" in y && t(4, u = y.okText), "theme" in y && t(5, C = y.theme), "title" in y && t(6, g = y.title);
723
723
  }, [
724
724
  n,
725
725
  r,
726
726
  c,
727
- u,
728
727
  d,
728
+ u,
729
729
  C,
730
- f,
730
+ g,
731
731
  m,
732
732
  h,
733
- y,
733
+ f,
734
734
  a,
735
735
  i,
736
736
  w
737
737
  ];
738
738
  }
739
- class ut extends Ae {
739
+ class yt extends _e {
740
740
  constructor(e) {
741
- super(), xe(this, e, dt, lt, Se, {
741
+ super(), be(this, e, gt, ht, ke, {
742
742
  data: 0,
743
743
  columns: 1,
744
744
  onCancel: 10,
@@ -751,13 +751,13 @@ class ut extends Ae {
751
751
  });
752
752
  }
753
753
  }
754
- class ht {
754
+ class ft {
755
755
  constructor() {
756
756
  o(this, "modalInstance", { current: null });
757
757
  o(this, "open", (e) => new Promise((t, n) => {
758
- this.modalInstance.current = new ut({
758
+ this.modalInstance.current = new yt({
759
759
  target: document.body,
760
- props: B(p({}, e), {
760
+ props: E(S({}, e), {
761
761
  onCancel: (r) => {
762
762
  n({
763
763
  code: -1,
@@ -781,8 +781,8 @@ class ht {
781
781
  });
782
782
  }
783
783
  }
784
- const J = new ht();
785
- function gt(s = 32, e = !0, t = 0) {
784
+ const J = new ft();
785
+ function Ct(s = 32, e = !0, t = 0) {
786
786
  const n = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""), r = [];
787
787
  if (t = t || n.length, s)
788
788
  for (let a = 0; a < s; a++) r[a] = n[0 | Math.random() * t];
@@ -794,14 +794,14 @@ function gt(s = 32, e = !0, t = 0) {
794
794
  }
795
795
  return e ? (r.shift(), `u${r.join("")}`) : r.join("");
796
796
  }
797
- const yt = [
797
+ const mt = [
798
798
  {
799
799
  key: "CN"
800
800
  },
801
801
  {
802
802
  format: (s) => `${s.DevClass}(${s.sn})`
803
803
  }
804
- ], ft = [
804
+ ], wt = [
805
805
  {
806
806
  key: "SealId"
807
807
  },
@@ -811,18 +811,20 @@ const yt = [
811
811
  {
812
812
  format: (s) => `${s.FileName}(${s.FileSize}B)`
813
813
  }
814
- ], me = [
814
+ ], we = [
815
815
  {
816
816
  key: "SealId"
817
817
  }
818
818
  ];
819
- class Ct {
819
+ class St {
820
820
  constructor(e) {
821
821
  o(this, "socketInstance", null);
822
- o(this, "eventBus", new He());
822
+ o(this, "eventBus", new Ve());
823
823
  o(this, "isRememberPin", !1);
824
824
  o(this, "pinPolicy");
825
825
  o(this, "socketConfig", null);
826
+ o(this, "isConnecting", !1);
827
+ o(this, "messageQueue", []);
826
828
  o(this, "getSocketReadyState", () => {
827
829
  var e;
828
830
  return (e = this.socketInstance) == null ? void 0 : e.readyState;
@@ -832,42 +834,54 @@ class Ct {
832
834
  (e = this.socketInstance) == null || e.close();
833
835
  });
834
836
  o(this, "sendMessage", (e, t) => new Promise((n, r) => {
835
- var u, d;
836
- if (((u = this.socketInstance) == null ? void 0 : u.readyState) !== WebSocket.OPEN) {
837
- r({
838
- errCode: -1,
839
- msg: "数字证书客户端连接失败"
840
- });
837
+ var i;
838
+ const a = () => {
839
+ var C, g;
840
+ if (((C = this.socketInstance) == null ? void 0 : C.readyState) !== WebSocket.OPEN) {
841
+ r({
842
+ errCode: Ge,
843
+ msg: "数字证书客户端连接失败"
844
+ });
845
+ return;
846
+ }
847
+ const c = Ct(), d = (m) => {
848
+ m.success ? n(m.data) : r(m);
849
+ }, u = {
850
+ function: e,
851
+ args: [t != null ? t : {}],
852
+ msgid: c
853
+ };
854
+ (g = this.socketInstance) == null || g.send(JSON.stringify(u)), this.eventBus.on(e, d), this.eventBus.on(c, d);
855
+ };
856
+ if (((i = this.socketInstance) == null ? void 0 : i.readyState) === WebSocket.OPEN) {
857
+ a();
841
858
  return;
842
859
  }
843
- const a = gt(), i = (C) => {
844
- C.success ? n(C.data) : r(C);
845
- }, c = {
846
- function: e,
847
- args: [t != null ? t : {}],
848
- msgid: a
849
- };
850
- (d = this.socketInstance) == null || d.send(JSON.stringify(c)), this.eventBus.on(e, i), this.eventBus.on(a, i);
860
+ this.messageQueue.push(a), this.isConnecting || this.initSocket(this.socketConfig);
851
861
  }));
862
+ o(this, "flushMsgQueue", () => {
863
+ var e;
864
+ (e = this.messageQueue) == null || e.forEach((t) => t()), this.messageQueue = [];
865
+ });
852
866
  o(this, "handleEventData", (e) => l(this, null, function* () {
853
- var t, n, r, a, i, c, u, d;
867
+ var t, n, r, a, i, c, d, u;
854
868
  if (e.data instanceof Blob) {
855
- const C = yield e.data.arrayBuffer(), m = new TextDecoder("gbk").decode(C), h = JSON.parse(m), y = {
869
+ const C = yield e.data.arrayBuffer(), m = new TextDecoder("gbk").decode(C), h = JSON.parse(m), f = {
856
870
  success: (t = h.result) == null ? void 0 : t.success,
857
871
  msg: (n = h.result) == null ? void 0 : n.msg,
858
872
  errCode: (r = h.result) == null ? void 0 : r.errCode,
859
873
  data: h.data,
860
874
  type: (a = h.result) == null ? void 0 : a.event
861
- }, w = (i = h.result) == null ? void 0 : i.function, g = (c = h.result) == null ? void 0 : c.msgid;
862
- g ? this.eventBus.emit(g, y) : this.eventBus.emit(w, y), (d = (u = this.socketConfig) == null ? void 0 : u.onMessage) == null || d.call(u, y);
875
+ }, w = (i = h.result) == null ? void 0 : i.function, y = (c = h.result) == null ? void 0 : c.msgid;
876
+ y ? this.eventBus.emit(y, f) : this.eventBus.emit(w, f), (u = (d = this.socketConfig) == null ? void 0 : d.onMessage) == null || u.call(d, f);
863
877
  }
864
878
  }));
865
879
  o(this, "base64Encode", (e) => {
866
880
  const t = new TextEncoder().encode(e);
867
- return oe.fromByteArray(t);
881
+ return ce.fromByteArray(t);
868
882
  });
869
883
  o(this, "base64Decode", (e) => {
870
- const t = oe.toByteArray(e);
884
+ const t = ce.toByteArray(e);
871
885
  return new TextDecoder().decode(t);
872
886
  });
873
887
  o(this, "changeIsRememberPin", (e) => l(this, null, function* () {
@@ -881,12 +895,12 @@ class Ct {
881
895
  }));
882
896
  o(this, "addUkeyEvents", () => l(this, null, function* () {
883
897
  this.sendMessage("GZCA_WaitForDevEvent", {
884
- Type: Ne
898
+ Type: Me
885
899
  }), this.eventBus.on(
886
900
  "GZCA_OnDeviceChange",
887
901
  (e) => {
888
902
  var t, n, r;
889
- (r = (t = this.socketConfig) == null ? void 0 : t.onUkeyChange) == null || r.call(t, B(p({}, e), {
903
+ (r = (t = this.socketConfig) == null ? void 0 : t.onUkeyChange) == null || r.call(t, E(S({}, e), {
890
904
  data: (n = e.data) == null ? void 0 : n[0]
891
905
  }));
892
906
  }
@@ -913,10 +927,10 @@ class Ct {
913
927
  return t != null && t.length ? (t == null ? void 0 : t.length) === 1 ? t[0] : yield J.open({
914
928
  title: "选择证书",
915
929
  data: t,
916
- columns: yt,
930
+ columns: mt,
917
931
  theme: (r = this.socketConfig) == null ? void 0 : r.theme
918
932
  }) : Promise.reject({
919
- errCode: -1,
933
+ errCode: Fe,
920
934
  msg: "暂无证书"
921
935
  });
922
936
  }));
@@ -927,19 +941,19 @@ class Ct {
927
941
  );
928
942
  }));
929
943
  o(this, "pkcs1Sign", (e) => l(this, null, function* () {
930
- return yield this.sendMessage("GZCA_Pkcs1SignData", p({
944
+ return yield this.sendMessage("GZCA_Pkcs1SignData", S({
931
945
  IsLogin: this.getIsLogin(),
932
946
  PinPolicy: this.pinPolicy
933
947
  }, e != null ? e : {}));
934
948
  }));
935
949
  o(this, "pkcs1Base64Sign", (e) => l(this, null, function* () {
936
- return yield this.sendMessage("GZCA_Pkcs1SignDataEx", p({
950
+ return yield this.sendMessage("GZCA_Pkcs1SignDataEx", S({
937
951
  IsLogin: this.getIsLogin(),
938
952
  PinPolicy: this.pinPolicy
939
953
  }, e != null ? e : {}));
940
954
  }));
941
955
  o(this, "batchPkcs1Base64Sign", (e) => l(this, null, function* () {
942
- return yield this.sendMessage("GZCA_BatchPkcs1SignDataEx", p({
956
+ return yield this.sendMessage("GZCA_BatchPkcs1SignDataEx", S({
943
957
  IsLogin: this.getIsLogin(),
944
958
  PinPolicy: this.pinPolicy
945
959
  }, e != null ? e : {}));
@@ -951,33 +965,33 @@ class Ct {
951
965
  return yield this.sendMessage("GZCA_Pkcs1VerifySignEx", e);
952
966
  }));
953
967
  o(this, "getSealList", (e) => l(this, null, function* () {
954
- return yield this.sendMessage("GZCA_EnumSeals", p({
968
+ return yield this.sendMessage("GZCA_EnumSeals", S({
955
969
  IsLogin: this.getIsLogin()
956
970
  }, e != null ? e : {}));
957
971
  }));
958
972
  o(this, "writeSeal", (e) => l(this, null, function* () {
959
- return yield this.sendMessage("GZCA_WriteSeal", p({
973
+ return yield this.sendMessage("GZCA_WriteSeal", S({
960
974
  IsLogin: this.getIsLogin()
961
975
  }, e != null ? e : {}));
962
976
  }));
963
977
  o(this, "deleteSeal", (e) => l(this, null, function* () {
964
- return yield this.sendMessage("GZCA_DeleteSeal", p({
978
+ return yield this.sendMessage("GZCA_DeleteSeal", S({
965
979
  IsLogin: this.getIsLogin()
966
980
  }, e != null ? e : {}));
967
981
  }));
968
982
  o(this, "getSealInfo", (e) => l(this, null, function* () {
969
- return yield this.sendMessage("GZCA_ReadSeal", p({
983
+ return yield this.sendMessage("GZCA_ReadSeal", S({
970
984
  IsLogin: this.getIsLogin()
971
985
  }, e != null ? e : {}));
972
986
  }));
973
987
  o(this, "getTPSealList", (e) => l(this, null, function* () {
974
- return yield this.sendMessage("GZCA_GetSealPicList", p({
988
+ return yield this.sendMessage("GZCA_GetSealPicList", S({
975
989
  IsLogin: this.getIsLogin()
976
990
  }, e != null ? e : {}));
977
991
  }));
978
992
  o(this, "getTPSealPic", (e) => l(this, null, function* () {
979
993
  var n;
980
- return yield this.sendMessage("GZCA_GetSealPicData", p({
994
+ return yield this.sendMessage("GZCA_GetSealPicData", S({
981
995
  IsLogin: (n = e.IsLogin) != null ? n : this.getIsLogin()
982
996
  }, e != null ? e : {}));
983
997
  }));
@@ -988,7 +1002,7 @@ class Ct {
988
1002
  return yield this.sendMessage("GZCA_PrepareSm2SignStep2", e);
989
1003
  }));
990
1004
  o(this, "pkcs1HashSign", (e) => l(this, null, function* () {
991
- return yield this.sendMessage("GZCA_Pkcs1SignDataForHash", p({
1005
+ return yield this.sendMessage("GZCA_Pkcs1SignDataForHash", S({
992
1006
  IsLogin: this.getIsLogin(),
993
1007
  PinPolicy: this.pinPolicy
994
1008
  }, e != null ? e : {}));
@@ -997,7 +1011,7 @@ class Ct {
997
1011
  return yield this.sendMessage("GZCA_Pkcs1VerifySignForHash", e);
998
1012
  }));
999
1013
  o(this, "pkcs7Sign", (e) => l(this, null, function* () {
1000
- return yield this.sendMessage("GZCA_Pkcs7SignData", p({
1014
+ return yield this.sendMessage("GZCA_Pkcs7SignData", S({
1001
1015
  IsLogin: this.getIsLogin(),
1002
1016
  IsAuthAttr: "Y",
1003
1017
  PinPolicy: this.pinPolicy
@@ -1022,7 +1036,7 @@ class Ct {
1022
1036
  return yield this.sendMessage("GZCA_Pkcs7EncryptData", e);
1023
1037
  }));
1024
1038
  o(this, "pkcs7Decryption", (e) => l(this, null, function* () {
1025
- return yield this.sendMessage("GZCA_Pkcs7DecryptData", p({
1039
+ return yield this.sendMessage("GZCA_Pkcs7DecryptData", S({
1026
1040
  IsLogin: this.getIsLogin()
1027
1041
  }, e != null ? e : {}));
1028
1042
  }));
@@ -1030,7 +1044,7 @@ class Ct {
1030
1044
  return yield this.sendMessage("GZCA_EnvelopeSealFileEx_qyzc", e);
1031
1045
  }));
1032
1046
  o(this, "pkcs7FileDecryption", (e) => l(this, null, function* () {
1033
- return yield this.sendMessage("GZCA_EnvelopeOpenFileEx_qyzc", p({
1047
+ return yield this.sendMessage("GZCA_EnvelopeOpenFileEx_qyzc", S({
1034
1048
  IsLogin: this.getIsLogin()
1035
1049
  }, e != null ? e : {}));
1036
1050
  }));
@@ -1038,7 +1052,7 @@ class Ct {
1038
1052
  return yield this.sendMessage("GZCA_AsymEncryptData", e);
1039
1053
  }));
1040
1054
  o(this, "asymmetricDecryption", (e) => l(this, null, function* () {
1041
- return yield this.sendMessage("GZCA_AsymDecryptData", p({
1055
+ return yield this.sendMessage("GZCA_AsymDecryptData", S({
1042
1056
  IsLogin: this.getIsLogin()
1043
1057
  }, e != null ? e : {}));
1044
1058
  }));
@@ -1058,45 +1072,46 @@ class Ct {
1058
1072
  return yield this.sendMessage("GZCA_GetSealIssuer", e);
1059
1073
  }));
1060
1074
  o(this, "deleteAllSealByVendor", (e) => l(this, null, function* () {
1061
- return yield this.sendMessage("GZCA_ClearSeal", p({
1075
+ return yield this.sendMessage("GZCA_ClearSeal", S({
1062
1076
  IsLogin: this.getIsLogin()
1063
1077
  }, e != null ? e : {}));
1064
1078
  }));
1065
1079
  var t, n;
1066
- this.socketConfig = e, this.socketInstance = this.createSocket(e), this.isRememberPin = (t = e.isRememberPin) != null ? t : !1, this.pinPolicy = (n = e.pinPolicy) != null ? n : we.MIN;
1080
+ this.socketConfig = e, this.initSocket(e), this.isRememberPin = (t = e.isRememberPin) != null ? t : !1, this.pinPolicy = (n = e.pinPolicy) != null ? n : Se.MIN;
1067
1081
  }
1068
- createSocket(e) {
1082
+ initSocket(e) {
1083
+ this.isConnecting = !0;
1069
1084
  const t = new WebSocket(e.url);
1070
1085
  return t.onerror = (n) => {
1071
1086
  var r;
1072
- (r = e.onError) == null || r.call(e, n);
1087
+ this.isConnecting = !1, (r = e.onError) == null || r.call(e, n), this.flushMsgQueue();
1073
1088
  }, t.onopen = (n) => {
1074
1089
  var r;
1075
- (r = e.onOpen) == null || r.call(e, n), e.onUkeyChange && this.addUkeyEvents();
1090
+ this.isConnecting = !1, (r = e.onOpen) == null || r.call(e, n), e.onUkeyChange && this.addUkeyEvents(), this.flushMsgQueue();
1076
1091
  }, t.onmessage = (n) => {
1077
1092
  this.handleEventData(n);
1078
1093
  }, t.onclose = (n) => {
1079
1094
  var r;
1080
- (r = e.onClose) == null || r.call(e, n);
1081
- }, t;
1095
+ this.isConnecting = !1, (r = e.onClose) == null || r.call(e, n);
1096
+ }, this.socketInstance = t, t;
1082
1097
  }
1083
1098
  getIsLogin() {
1084
1099
  return this.isRememberPin ? "Y" : "N";
1085
1100
  }
1086
1101
  }
1087
- const L = class L {
1102
+ const N = class N {
1088
1103
  constructor(e) {
1089
1104
  o(this, "coreInstance", null);
1090
1105
  o(this, "gwsConfig", {});
1091
1106
  o(this, "createGwsCore", (e) => {
1092
- this.gwsConfig = e != null ? e : {}, this.coreInstance = new Ct(B(p({}, e != null ? e : {}), {
1093
- url: Me
1107
+ this.gwsConfig = e != null ? e : {}, this.coreInstance = new St(E(S({}, e != null ? e : {}), {
1108
+ url: Te
1094
1109
  }));
1095
1110
  });
1096
1111
  o(this, "appendCertBase64", (e, t = !0) => l(this, null, function* () {
1097
1112
  if (e.CertB64) return e;
1098
1113
  const n = t ? yield this.getSignatureCert() : yield this.getEncryptionCert();
1099
- return B(p({}, e != null ? e : {}), { CertB64: n == null ? void 0 : n.CertB64 });
1114
+ return E(S({}, e != null ? e : {}), { CertB64: n == null ? void 0 : n.CertB64 });
1100
1115
  }));
1101
1116
  o(this, "destroy", () => {
1102
1117
  var e;
@@ -1112,7 +1127,7 @@ const L = class L {
1112
1127
  o(this, "getSignatureCert", (e, t = !0) => l(this, null, function* () {
1113
1128
  var r;
1114
1129
  return yield (r = this.coreInstance) == null ? void 0 : r.getCert(
1115
- { CertType: re },
1130
+ { CertType: ae },
1116
1131
  e,
1117
1132
  t
1118
1133
  );
@@ -1120,13 +1135,13 @@ const L = class L {
1120
1135
  o(this, "getSignatureCertList", () => l(this, null, function* () {
1121
1136
  var t;
1122
1137
  return yield (t = this.coreInstance) == null ? void 0 : t.getCertList({
1123
- CertType: re
1138
+ CertType: ae
1124
1139
  });
1125
1140
  }));
1126
1141
  o(this, "getEncryptionCert", (e, t = !0) => l(this, null, function* () {
1127
1142
  var r;
1128
1143
  return yield (r = this.coreInstance) == null ? void 0 : r.getCert(
1129
- { CertType: ae },
1144
+ { CertType: ie },
1130
1145
  e,
1131
1146
  t
1132
1147
  );
@@ -1134,7 +1149,7 @@ const L = class L {
1134
1149
  o(this, "getEncryptionCertList", () => l(this, null, function* () {
1135
1150
  var t;
1136
1151
  return yield (t = this.coreInstance) == null ? void 0 : t.getCertList({
1137
- CertType: ae
1152
+ CertType: ie
1138
1153
  });
1139
1154
  }));
1140
1155
  o(this, "base64Encode", (e) => {
@@ -1155,7 +1170,7 @@ const L = class L {
1155
1170
  });
1156
1171
  o(this, "pkcs1Sign", (e, t) => l(this, null, function* () {
1157
1172
  var a, i, c;
1158
- const n = yield this.getSignatureCert(t), r = yield (i = this.coreInstance) == null ? void 0 : i.pkcs1Sign(B(p({}, e != null ? e : {}), {
1173
+ const n = yield this.getSignatureCert(t), r = yield (i = this.coreInstance) == null ? void 0 : i.pkcs1Sign(E(S({}, e != null ? e : {}), {
1159
1174
  ContainerName: (a = n == null ? void 0 : n.ContainerName) != null ? a : ""
1160
1175
  }));
1161
1176
  return (c = r == null ? void 0 : r[0]) == null ? void 0 : c.SignData;
@@ -1166,26 +1181,26 @@ const L = class L {
1166
1181
  return Array.isArray(n);
1167
1182
  }));
1168
1183
  o(this, "pkcs1Base64Sign", (e, t) => l(this, null, function* () {
1169
- var i, c, u, d, C;
1170
- const n = yield this.getSignatureCert(t), r = (c = e.DataB64) != null ? c : this.base64Encode({ Data: (i = e.Data) != null ? i : "" }), a = yield (d = this.coreInstance) == null ? void 0 : d.pkcs1Base64Sign(B(p({}, e != null ? e : {}), {
1171
- ContainerName: (u = n == null ? void 0 : n.ContainerName) != null ? u : "",
1184
+ var i, c, d, u, C;
1185
+ const n = yield this.getSignatureCert(t), r = (c = e.DataB64) != null ? c : this.base64Encode({ Data: (i = e.Data) != null ? i : "" }), a = yield (u = this.coreInstance) == null ? void 0 : u.pkcs1Base64Sign(E(S({}, e != null ? e : {}), {
1186
+ ContainerName: (d = n == null ? void 0 : n.ContainerName) != null ? d : "",
1172
1187
  DataB64: r
1173
1188
  }));
1174
1189
  return (C = a == null ? void 0 : a[0]) == null ? void 0 : C.SignData;
1175
1190
  }));
1176
1191
  o(this, "batchPkcs1Base64Sign", (e, t) => l(this, null, function* () {
1177
- var C, f, m, h, y, w;
1178
- const n = "|", r = (f = e.DataB64) != null ? f : (C = e.Data) == null ? void 0 : C.map((g) => this.base64Encode({ Data: g })), a = yield this.getSignatureCert(t);
1192
+ var C, g, m, h, f, w;
1193
+ const n = "|", r = (g = e.DataB64) != null ? g : (C = e.Data) == null ? void 0 : C.map((y) => this.base64Encode({ Data: y })), a = yield this.getSignatureCert(t);
1179
1194
  let i = "";
1180
- i = Array.isArray(r) ? r == null ? void 0 : r.map((g, S) => `${S}:${g}`).join(n) : "";
1195
+ i = Array.isArray(r) ? r == null ? void 0 : r.map((y, p) => `${p}:${y}`).join(n) : "";
1181
1196
  const c = yield (h = this.coreInstance) == null ? void 0 : h.batchPkcs1Base64Sign({
1182
1197
  ContainerName: (m = a == null ? void 0 : a.ContainerName) != null ? m : "",
1183
1198
  DataB64: i
1184
- }), u = (w = (y = c == null ? void 0 : c[0]) == null ? void 0 : y.SignData) == null ? void 0 : w.split(n), d = [];
1185
- return u.forEach((g) => {
1186
- const S = g.split(":"), v = Number(S[0]), I = S[1];
1187
- d[v] = I;
1188
- }), d;
1199
+ }), d = (w = (f = c == null ? void 0 : c[0]) == null ? void 0 : f.SignData) == null ? void 0 : w.split(n), u = [];
1200
+ return d.forEach((y) => {
1201
+ const p = y.split(":"), v = Number(p[0]), I = p[1];
1202
+ u[v] = I;
1203
+ }), u;
1189
1204
  }));
1190
1205
  o(this, "pkcs1Base64VerifySignature", (e) => l(this, null, function* () {
1191
1206
  var a, i, c;
@@ -1199,27 +1214,27 @@ const L = class L {
1199
1214
  o(this, "writeSeal", (e, t) => l(this, null, function* () {
1200
1215
  var a, i;
1201
1216
  const n = yield this.getSignatureCert(t);
1202
- return !!(yield (i = this.coreInstance) == null ? void 0 : i.writeSeal(B(p({}, e != null ? e : {}), {
1217
+ return !!(yield (i = this.coreInstance) == null ? void 0 : i.writeSeal(E(S({}, e != null ? e : {}), {
1203
1218
  ContainerName: (a = n == null ? void 0 : n.ContainerName) != null ? a : ""
1204
1219
  })));
1205
1220
  }));
1206
1221
  o(this, "deleteSeal", (e) => l(this, null, function* () {
1207
- var a, i, c, u, d;
1222
+ var a, i, c, d, u;
1208
1223
  const t = yield this.getSealList(e);
1209
1224
  if (!((a = t == null ? void 0 : t.data) != null && a.length))
1210
1225
  return Promise.reject({
1211
- errCode: -1,
1226
+ errCode: Y,
1212
1227
  msg: "暂无印章"
1213
1228
  });
1214
1229
  const n = yield J.open({
1215
1230
  title: "删除印章",
1216
1231
  data: t == null ? void 0 : t.data,
1217
- columns: me,
1232
+ columns: we,
1218
1233
  okText: "删除"
1219
1234
  });
1220
- return !!(yield (d = this.coreInstance) == null ? void 0 : d.deleteSeal({
1235
+ return !!(yield (u = this.coreInstance) == null ? void 0 : u.deleteSeal({
1221
1236
  ContainerName: (c = (i = t == null ? void 0 : t.cert) == null ? void 0 : i.ContainerName) != null ? c : "",
1222
- SealId: (u = n == null ? void 0 : n.SealId) != null ? u : ""
1237
+ SealId: (d = n == null ? void 0 : n.SealId) != null ? d : ""
1223
1238
  }));
1224
1239
  }));
1225
1240
  o(this, "getSealList", (e) => l(this, null, function* () {
@@ -1234,20 +1249,20 @@ const L = class L {
1234
1249
  };
1235
1250
  }));
1236
1251
  o(this, "getSealInfo", (e) => l(this, null, function* () {
1237
- var a, i, c, u, d, C, f;
1252
+ var a, i, c, d, u, C, g;
1238
1253
  const t = yield this.getSealList(e);
1239
1254
  if (!((a = t == null ? void 0 : t.data) != null && a.length))
1240
1255
  return Promise.reject({
1241
- errCode: -1,
1256
+ errCode: Y,
1242
1257
  msg: "暂无印章"
1243
1258
  });
1244
1259
  const n = ((i = t == null ? void 0 : t.data) == null ? void 0 : i.length) > 1 ? yield J.open({
1245
1260
  title: "选择印章",
1246
1261
  data: t == null ? void 0 : t.data,
1247
- columns: me,
1262
+ columns: we,
1248
1263
  theme: (c = this.gwsConfig) == null ? void 0 : c.theme
1249
- }) : t == null ? void 0 : t.data[0], r = yield (f = this.coreInstance) == null ? void 0 : f.getSealInfo({
1250
- ContainerName: (d = (u = t == null ? void 0 : t.cert) == null ? void 0 : u.ContainerName) != null ? d : "",
1264
+ }) : t == null ? void 0 : t.data[0], r = yield (g = this.coreInstance) == null ? void 0 : g.getSealInfo({
1265
+ ContainerName: (u = (d = t == null ? void 0 : t.cert) == null ? void 0 : d.ContainerName) != null ? u : "",
1251
1266
  SealId: (C = n == null ? void 0 : n.SealId) != null ? C : ""
1252
1267
  });
1253
1268
  return r == null ? void 0 : r[0];
@@ -1268,13 +1283,13 @@ const L = class L {
1268
1283
  const n = yield this.getTPSealList(e, t);
1269
1284
  if (!((a = n == null ? void 0 : n.data) != null && a.length))
1270
1285
  return Promise.reject({
1271
- errCode: -1,
1286
+ errCode: Y,
1272
1287
  msg: "暂无印章"
1273
1288
  });
1274
1289
  const r = ((i = n == null ? void 0 : n.data) == null ? void 0 : i.length) === 1 ? n == null ? void 0 : n.data[0] : yield J.open({
1275
1290
  title: "选择印章",
1276
1291
  data: n == null ? void 0 : n.data,
1277
- columns: ft,
1292
+ columns: wt,
1278
1293
  theme: (c = this.gwsConfig) == null ? void 0 : c.theme
1279
1294
  });
1280
1295
  return {
@@ -1283,11 +1298,11 @@ const L = class L {
1283
1298
  };
1284
1299
  }));
1285
1300
  o(this, "getTPSealPic", (e, t) => l(this, null, function* () {
1286
- var a, i, c, u, d;
1287
- const n = yield this.getTPSeal(e, t), r = yield (d = this.coreInstance) == null ? void 0 : d.getTPSealPic(B(p({
1301
+ var a, i, c, d, u;
1302
+ const n = yield this.getTPSeal(e, t), r = yield (u = this.coreInstance) == null ? void 0 : u.getTPSealPic(E(S({
1288
1303
  ContainerName: (i = (a = n == null ? void 0 : n.cert) == null ? void 0 : a.ContainerName) != null ? i : ""
1289
1304
  }, (c = n == null ? void 0 : n.data) != null ? c : {}), {
1290
- FileSize: String((u = n == null ? void 0 : n.data) == null ? void 0 : u.FileSize)
1305
+ FileSize: String((d = n == null ? void 0 : n.data) == null ? void 0 : d.FileSize)
1291
1306
  }));
1292
1307
  return r == null ? void 0 : r[0];
1293
1308
  }));
@@ -1305,25 +1320,25 @@ const L = class L {
1305
1320
  return r == null ? void 0 : r[0].H;
1306
1321
  }));
1307
1322
  o(this, "pkcs1HashSign", (e, t) => l(this, null, function* () {
1308
- var a, i, c, u;
1323
+ var a, i, c, d;
1309
1324
  const n = yield this.getSignatureCert(t), r = yield (c = this.coreInstance) == null ? void 0 : c.pkcs1HashSign({
1310
1325
  ContainerName: (a = n == null ? void 0 : n.ContainerName) != null ? a : "",
1311
1326
  DataB64: e.DataB64,
1312
1327
  HashAlg: (i = e.HashAlg) != null ? i : "sm3"
1313
1328
  });
1314
- return (u = r == null ? void 0 : r[0]) == null ? void 0 : u.SignData;
1329
+ return (d = r == null ? void 0 : r[0]) == null ? void 0 : d.SignData;
1315
1330
  }));
1316
1331
  o(this, "pkcs1HashVerifySignature", (e) => l(this, null, function* () {
1317
1332
  var r, a;
1318
1333
  const t = yield this.appendCertBase64(e);
1319
- return !!(yield (a = this.coreInstance) == null ? void 0 : a.pkcs1HashVerifySignature(B(p({}, t), {
1334
+ return !!(yield (a = this.coreInstance) == null ? void 0 : a.pkcs1HashVerifySignature(E(S({}, t), {
1320
1335
  HashAlg: (r = t.HashAlg) != null ? r : "sm3"
1321
1336
  })));
1322
1337
  }));
1323
1338
  o(this, "pkcs7Sign", (e, t) => l(this, null, function* () {
1324
- var i, c, u, d, C;
1325
- const n = (c = e.DataB64) != null ? c : this.base64Encode({ Data: (i = e.Data) != null ? i : "" }), r = yield this.getSignatureCert(t), a = yield (d = this.coreInstance) == null ? void 0 : d.pkcs7Sign(B(p({}, e != null ? e : {}), {
1326
- ContainerName: (u = r == null ? void 0 : r.ContainerName) != null ? u : "",
1339
+ var i, c, d, u, C;
1340
+ const n = (c = e.DataB64) != null ? c : this.base64Encode({ Data: (i = e.Data) != null ? i : "" }), r = yield this.getSignatureCert(t), a = yield (u = this.coreInstance) == null ? void 0 : u.pkcs7Sign(E(S({}, e != null ? e : {}), {
1341
+ ContainerName: (d = r == null ? void 0 : r.ContainerName) != null ? d : "",
1327
1342
  DataB64: n
1328
1343
  }));
1329
1344
  return (C = a == null ? void 0 : a[0]) == null ? void 0 : C.SignData;
@@ -1352,8 +1367,8 @@ const L = class L {
1352
1367
  return (r = t == null ? void 0 : t[0]) == null ? void 0 : r.HashB64;
1353
1368
  }));
1354
1369
  o(this, "sm3HashEncryption", (e) => l(this, null, function* () {
1355
- var a, i, c, u, d, C;
1356
- const t = (i = e.DataB64) != null ? i : this.base64Encode({ Data: (a = e.Data) != null ? a : "" }), n = (u = e.KeyB64) != null ? u : this.base64Encode({ Data: (c = e.Key) != null ? c : "" }), r = yield (d = this.coreInstance) == null ? void 0 : d.sm3HashEncryption({
1370
+ var a, i, c, d, u, C;
1371
+ const t = (i = e.DataB64) != null ? i : this.base64Encode({ Data: (a = e.Data) != null ? a : "" }), n = (d = e.KeyB64) != null ? d : this.base64Encode({ Data: (c = e.Key) != null ? c : "" }), r = yield (u = this.coreInstance) == null ? void 0 : u.sm3HashEncryption({
1357
1372
  dataB64: t,
1358
1373
  keyB64: n,
1359
1374
  alg: "sm3"
@@ -1363,8 +1378,8 @@ const L = class L {
1363
1378
  o(this, "pkcs7Encryption", (e) => l(this, null, function* () {
1364
1379
  var r, a, i, c;
1365
1380
  if (!e.CertB64List) {
1366
- const u = yield this.getEncryptionCert();
1367
- e.CertB64List = u == null ? void 0 : u.CertB64;
1381
+ const d = yield this.getEncryptionCert();
1382
+ e.CertB64List = d == null ? void 0 : d.CertB64;
1368
1383
  }
1369
1384
  const t = (a = e.DataB64) != null ? a : this.base64Encode({ Data: (r = e.Data) != null ? r : "" }), n = yield (i = this.coreInstance) == null ? void 0 : i.pkcs7Encryption({
1370
1385
  DataB64: t,
@@ -1374,7 +1389,7 @@ const L = class L {
1374
1389
  }));
1375
1390
  o(this, "pkcs7Decryption", (e) => l(this, null, function* () {
1376
1391
  var a, i;
1377
- const t = yield this.getEncryptionCert(), n = yield (a = this.coreInstance) == null ? void 0 : a.pkcs7Decryption(B(p({}, e != null ? e : {}), {
1392
+ const t = yield this.getEncryptionCert(), n = yield (a = this.coreInstance) == null ? void 0 : a.pkcs7Decryption(E(S({}, e != null ? e : {}), {
1378
1393
  ContainerName: t == null ? void 0 : t.ContainerName
1379
1394
  })), r = (i = n == null ? void 0 : n[0]) == null ? void 0 : i.DataB64;
1380
1395
  return e.shouldDecodeBase64 ? this.base64Decode({ DataB64: r }) : r;
@@ -1400,7 +1415,7 @@ const L = class L {
1400
1415
  }));
1401
1416
  o(this, "asymmetricDecryption", (e, t) => l(this, null, function* () {
1402
1417
  var a, i;
1403
- const n = yield this.getEncryptionCert(t), r = yield (a = this.coreInstance) == null ? void 0 : a.asymmetricDecryption(B(p({}, e != null ? e : {}), {
1418
+ const n = yield this.getEncryptionCert(t), r = yield (a = this.coreInstance) == null ? void 0 : a.asymmetricDecryption(E(S({}, e != null ? e : {}), {
1404
1419
  ContainerName: n == null ? void 0 : n.ContainerName
1405
1420
  }));
1406
1421
  return (i = r == null ? void 0 : r[0]) == null ? void 0 : i.Data;
@@ -1418,11 +1433,11 @@ const L = class L {
1418
1433
  o(this, "getCertInfo", (e) => l(this, null, function* () {
1419
1434
  var n, r;
1420
1435
  const t = yield (n = this.coreInstance) == null ? void 0 : n.getCertInfo(e);
1421
- return p({}, (r = t == null ? void 0 : t[0]) != null ? r : {});
1436
+ return S({}, (r = t == null ? void 0 : t[0]) != null ? r : {});
1422
1437
  }));
1423
1438
  o(this, "getCertInfoByOid", (e) => l(this, null, function* () {
1424
1439
  var n, r;
1425
- const t = yield (n = this.coreInstance) == null ? void 0 : n.getCertInfoByOid(p({}, e != null ? e : {}));
1440
+ const t = yield (n = this.coreInstance) == null ? void 0 : n.getCertInfoByOid(S({}, e != null ? e : {}));
1426
1441
  return (r = t == null ? void 0 : t[0]) == null ? void 0 : r.OidValue;
1427
1442
  }));
1428
1443
  o(this, "getSealVendor", (e) => l(this, null, function* () {
@@ -1434,22 +1449,22 @@ const L = class L {
1434
1449
  }));
1435
1450
  o(this, "deleteAllSealByVendor", (e, t) => l(this, null, function* () {
1436
1451
  var a;
1437
- const n = yield this.getSignatureCert(t), r = yield (a = this.coreInstance) == null ? void 0 : a.deleteAllSealByVendor(B(p({}, e != null ? e : {}), {
1452
+ const n = yield this.getSignatureCert(t), r = yield (a = this.coreInstance) == null ? void 0 : a.deleteAllSealByVendor(E(S({}, e != null ? e : {}), {
1438
1453
  ContainerName: n == null ? void 0 : n.ContainerName
1439
1454
  }));
1440
1455
  return r == null ? void 0 : r[0];
1441
1456
  }));
1442
- return L.instance && !(e != null && e.isCreateNew) ? L.instance : (this.createGwsCore(e), L.instance = this, this);
1457
+ return N.instance && !(e != null && e.isCreateNew) ? N.instance : (this.createGwsCore(e), N.instance = this, this);
1443
1458
  }
1444
1459
  };
1445
- o(L, "instance", null);
1446
- let Z = L;
1447
- function wt(s) {
1460
+ o(N, "instance", null);
1461
+ let H = N;
1462
+ function kt(s) {
1448
1463
  return new Promise((e, t) => {
1449
- if (Z.instance && !(s != null && s.isCreateNew))
1450
- e(Z.instance);
1464
+ if (H.instance && !(s != null && s.isCreateNew))
1465
+ e(H.instance);
1451
1466
  else {
1452
- const n = new Z(B(p({}, s != null ? s : {}), {
1467
+ const n = new H(E(S({}, s != null ? s : {}), {
1453
1468
  onOpen(r) {
1454
1469
  var a;
1455
1470
  e(n), (a = s == null ? void 0 : s.onOpen) == null || a.call(s, r);
@@ -1463,6 +1478,6 @@ function wt(s) {
1463
1478
  });
1464
1479
  }
1465
1480
  export {
1466
- Z as GwsService,
1467
- wt as createService
1481
+ H as GwsService,
1482
+ kt as createService
1468
1483
  };