gws-client 1.3.0 → 1.3.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.cjs.js +1 -1
- package/dist/index.d.ts +12 -8
- package/dist/index.es.js +807 -791
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Ne = Object.defineProperty, xe = Object.defineProperties;
|
|
2
2
|
var $e = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var
|
|
4
|
-
var Te = Object.prototype.hasOwnProperty,
|
|
5
|
-
var
|
|
3
|
+
var re = Object.getOwnPropertySymbols;
|
|
4
|
+
var Te = Object.prototype.hasOwnProperty, Oe = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var Y = (i, e, t) => e in i ? Ne(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, S = (i, e) => {
|
|
6
6
|
for (var t in e || (e = {}))
|
|
7
|
-
Te.call(e, t) &&
|
|
8
|
-
if (
|
|
9
|
-
for (var t of
|
|
10
|
-
|
|
11
|
-
return
|
|
12
|
-
}, v = (
|
|
13
|
-
var
|
|
14
|
-
var c = (
|
|
15
|
-
var
|
|
7
|
+
Te.call(e, t) && Y(i, t, e[t]);
|
|
8
|
+
if (re)
|
|
9
|
+
for (var t of re(e))
|
|
10
|
+
Oe.call(e, t) && Y(i, t, e[t]);
|
|
11
|
+
return i;
|
|
12
|
+
}, v = (i, e) => xe(i, $e(e));
|
|
13
|
+
var a = (i, e, t) => Y(i, typeof e != "symbol" ? e + "" : e, t);
|
|
14
|
+
var c = (i, e, t) => new Promise((n, s) => {
|
|
15
|
+
var r = (h) => {
|
|
16
16
|
try {
|
|
17
|
-
l(t.next(
|
|
17
|
+
l(t.next(h));
|
|
18
18
|
} catch (u) {
|
|
19
|
-
|
|
19
|
+
s(u);
|
|
20
20
|
}
|
|
21
|
-
}, o = (
|
|
21
|
+
}, o = (h) => {
|
|
22
22
|
try {
|
|
23
|
-
l(t.throw(
|
|
23
|
+
l(t.throw(h));
|
|
24
24
|
} catch (u) {
|
|
25
|
-
|
|
25
|
+
s(u);
|
|
26
26
|
}
|
|
27
|
-
}, l = (
|
|
28
|
-
l((t = t.apply(
|
|
27
|
+
}, l = (h) => h.done ? n(h.value) : Promise.resolve(h.value).then(r, o);
|
|
28
|
+
l((t = t.apply(i, e)).next());
|
|
29
29
|
});
|
|
30
|
-
const
|
|
31
|
-
var
|
|
32
|
-
const
|
|
30
|
+
const Me = window.location.href.includes("https") ? "wss://localhost:19528" : "ws://localhost:9527", oe = "1", ae = "2", Ge = "1", Fe = "2", Ve = "3";
|
|
31
|
+
var ke = /* @__PURE__ */ ((i) => (i.MIN = "0", i.LOW = "1", i.MIDDLE = "2", i.HIGH = "3", i))(ke || {});
|
|
32
|
+
const L = {
|
|
33
33
|
LEVEL_1: 1,
|
|
34
34
|
LEVEL_2: 2,
|
|
35
35
|
LEVEL_3: 4
|
|
36
36
|
}, Ze = {
|
|
37
|
-
OPEN:
|
|
38
|
-
INTERNAL:
|
|
39
|
-
OMP:
|
|
40
|
-
}, He = "00000001", q = "NO_SEAL_AVAILABLE", Ue = "CERTIFICATE_NOT_FOUND", je = "CLIENT_CONNECTION_FAILED",
|
|
37
|
+
OPEN: L.LEVEL_1,
|
|
38
|
+
INTERNAL: L.LEVEL_2 | L.LEVEL_1,
|
|
39
|
+
OMP: L.LEVEL_3 | L.LEVEL_2 | L.LEVEL_1
|
|
40
|
+
}, He = "00000001", q = "NO_SEAL_AVAILABLE", Ue = "CERTIFICATE_NOT_FOUND", je = "CLIENT_CONNECTION_FAILED", Re = "ACCESS_DENIED", ce = [
|
|
41
41
|
{
|
|
42
42
|
oid: "1.2.86.21.1.3",
|
|
43
43
|
key: "trustServiceNo"
|
|
@@ -51,62 +51,62 @@ const _ = {
|
|
|
51
51
|
key: "orgCode"
|
|
52
52
|
}
|
|
53
53
|
];
|
|
54
|
-
function
|
|
55
|
-
return
|
|
54
|
+
function Ke(i) {
|
|
55
|
+
return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
|
|
56
56
|
}
|
|
57
|
-
var
|
|
58
|
-
function
|
|
59
|
-
if (le) return
|
|
60
|
-
le = 1,
|
|
61
|
-
for (var
|
|
62
|
-
s
|
|
57
|
+
var M = {}, le;
|
|
58
|
+
function ze() {
|
|
59
|
+
if (le) return M;
|
|
60
|
+
le = 1, M.byteLength = l, M.toByteArray = u, M.fromByteArray = C;
|
|
61
|
+
for (var i = [], e = [], t = typeof Uint8Array != "undefined" ? Uint8Array : Array, n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", s = 0, r = n.length; s < r; ++s)
|
|
62
|
+
i[s] = n[s], e[n.charCodeAt(s)] = s;
|
|
63
63
|
e[45] = 62, e[95] = 63;
|
|
64
64
|
function o(y) {
|
|
65
|
-
var
|
|
66
|
-
if (
|
|
65
|
+
var f = y.length;
|
|
66
|
+
if (f % 4 > 0)
|
|
67
67
|
throw new Error("Invalid string. Length must be a multiple of 4");
|
|
68
68
|
var E = y.indexOf("=");
|
|
69
|
-
E === -1 && (E =
|
|
70
|
-
var
|
|
71
|
-
return [E,
|
|
69
|
+
E === -1 && (E = f);
|
|
70
|
+
var w = E === f ? 0 : 4 - E % 4;
|
|
71
|
+
return [E, w];
|
|
72
72
|
}
|
|
73
73
|
function l(y) {
|
|
74
|
-
var
|
|
75
|
-
return (E +
|
|
74
|
+
var f = o(y), E = f[0], w = f[1];
|
|
75
|
+
return (E + w) * 3 / 4 - w;
|
|
76
76
|
}
|
|
77
|
-
function
|
|
78
|
-
return (
|
|
77
|
+
function h(y, f, E) {
|
|
78
|
+
return (f + E) * 3 / 4 - E;
|
|
79
79
|
}
|
|
80
80
|
function u(y) {
|
|
81
|
-
var
|
|
82
|
-
for (
|
|
83
|
-
|
|
84
|
-
return
|
|
81
|
+
var f, E = o(y), w = E[0], m = E[1], I = new t(h(y, w, m)), _ = 0, B = m > 0 ? w - 4 : w, k;
|
|
82
|
+
for (k = 0; k < B; k += 4)
|
|
83
|
+
f = e[y.charCodeAt(k)] << 18 | e[y.charCodeAt(k + 1)] << 12 | e[y.charCodeAt(k + 2)] << 6 | e[y.charCodeAt(k + 3)], I[_++] = f >> 16 & 255, I[_++] = f >> 8 & 255, I[_++] = f & 255;
|
|
84
|
+
return m === 2 && (f = e[y.charCodeAt(k)] << 2 | e[y.charCodeAt(k + 1)] >> 4, I[_++] = f & 255), m === 1 && (f = e[y.charCodeAt(k)] << 10 | e[y.charCodeAt(k + 1)] << 4 | e[y.charCodeAt(k + 2)] >> 2, I[_++] = f >> 8 & 255, I[_++] = f & 255), I;
|
|
85
85
|
}
|
|
86
|
-
function
|
|
87
|
-
return
|
|
86
|
+
function g(y) {
|
|
87
|
+
return i[y >> 18 & 63] + i[y >> 12 & 63] + i[y >> 6 & 63] + i[y & 63];
|
|
88
88
|
}
|
|
89
|
-
function
|
|
90
|
-
for (var
|
|
91
|
-
|
|
92
|
-
return
|
|
89
|
+
function d(y, f, E) {
|
|
90
|
+
for (var w, m = [], I = f; I < E; I += 3)
|
|
91
|
+
w = (y[I] << 16 & 16711680) + (y[I + 1] << 8 & 65280) + (y[I + 2] & 255), m.push(g(w));
|
|
92
|
+
return m.join("");
|
|
93
93
|
}
|
|
94
|
-
function
|
|
95
|
-
for (var
|
|
96
|
-
|
|
97
|
-
return
|
|
98
|
-
|
|
99
|
-
)) :
|
|
100
|
-
|
|
101
|
-
)),
|
|
94
|
+
function C(y) {
|
|
95
|
+
for (var f, E = y.length, w = E % 3, m = [], I = 16383, _ = 0, B = E - w; _ < B; _ += I)
|
|
96
|
+
m.push(d(y, _, _ + I > B ? B : _ + I));
|
|
97
|
+
return w === 1 ? (f = y[E - 1], m.push(
|
|
98
|
+
i[f >> 2] + i[f << 4 & 63] + "=="
|
|
99
|
+
)) : w === 2 && (f = (y[E - 2] << 8) + y[E - 1], m.push(
|
|
100
|
+
i[f >> 10] + i[f >> 4 & 63] + i[f << 2 & 63] + "="
|
|
101
|
+
)), m.join("");
|
|
102
102
|
}
|
|
103
|
-
return
|
|
103
|
+
return M;
|
|
104
104
|
}
|
|
105
|
-
var
|
|
106
|
-
const ue = /* @__PURE__ */
|
|
107
|
-
class
|
|
105
|
+
var Je = ze();
|
|
106
|
+
const ue = /* @__PURE__ */ Ke(Je);
|
|
107
|
+
class We {
|
|
108
108
|
constructor() {
|
|
109
|
-
|
|
109
|
+
a(this, "deps", /* @__PURE__ */ new Map());
|
|
110
110
|
}
|
|
111
111
|
on(e, t) {
|
|
112
112
|
this.deps.set(e, t);
|
|
@@ -118,253 +118,253 @@ class Qe {
|
|
|
118
118
|
}
|
|
119
119
|
(function() {
|
|
120
120
|
try {
|
|
121
|
-
var
|
|
122
|
-
|
|
121
|
+
var i = document.createElement("style");
|
|
122
|
+
i.appendChild(document.createTextNode("button.svelte-16iv9d0{background-color:transparent;border:none;padding:0;margin:0;font-family:inherit;font-size:inherit;color:inherit;cursor:pointer;outline:none}.modal-background.svelte-16iv9d0{display:none;position:fixed;z-index:10000;left:0;top:0;width:100%;height:100%;background-color:#00000080;align-items:center;justify-content:center}.modal-content.svelte-16iv9d0{background-color:#fff;padding:1.25rem;border-radius:.3125rem;width:40%}.model-title.svelte-16iv9d0{color:#303133;font-size:1.125rem;margin-bottom:1.125rem}.modal-visible.svelte-16iv9d0{display:flex}.modal-footer.svelte-16iv9d0{display:flex;align-items:center;justify-content:flex-end;margin-top:1rem}.modal-btn.svelte-16iv9d0{padding:.5rem .9375rem;border-radius:.25rem;font-size:.875rem;border:.0625rem solid #dcdfe6}.success.svelte-16iv9d0{margin-left:.75rem;color:#fff}.slot.svelte-16iv9d0{max-height:12.5rem;overflow-y:scroll}.slot.svelte-16iv9d0::-webkit-scrollbar{display:none}.seal-wrapper.svelte-1w19fs3.svelte-1w19fs3{display:flex;flex-direction:row;align-items:center;flex-wrap:wrap}.seal-item.svelte-1w19fs3.svelte-1w19fs3{width:11.25rem;height:11.25rem;display:flex;flex-direction:column;align-items:center;justify-content:center;border:.0625rem solid #ccc;margin-top:.625rem;margin-right:.625rem;border-radius:.25rem}.seal-item.svelte-1w19fs3 img.svelte-1w19fs3{width:6.25rem;height:6.25rem}.seal-item-selected.svelte-1w19fs3.svelte-1w19fs3{background-color:#f1f1f1}.seal-name.svelte-1w19fs3.svelte-1w19fs3{margin-top:.625rem;color:#333}.cert-item.svelte-1kh75ag.svelte-1kh75ag{padding:1rem;display:flex;align-items:center;cursor:pointer;border-bottom:.0625rem solid #ebeef5;font-size:1rem}.cert-item.svelte-1kh75ag>div.svelte-1kh75ag{word-break:break-all;color:#373a40}.cert-item.svelte-1kh75ag>div.svelte-1kh75ag:nth-child(1){padding-right:.5rem}.cert-item-selected.svelte-1kh75ag.svelte-1kh75ag{background-color:#f1f1f1}.cert-item-first.svelte-1kh75ag.svelte-1kh75ag{border-top:.0625rem solid #ebeef5}")), document.head.appendChild(i);
|
|
123
123
|
} catch (e) {
|
|
124
124
|
console.error("vite-plugin-css-injected-by-js", e);
|
|
125
125
|
}
|
|
126
126
|
})();
|
|
127
|
-
var
|
|
127
|
+
var Qe = Object.defineProperty, Ye = (i, e, t) => e in i ? Qe(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, he = (i, e, t) => Ye(i, typeof e != "symbol" ? e + "" : e, t);
|
|
128
128
|
function ee() {
|
|
129
129
|
}
|
|
130
|
-
function qe(
|
|
131
|
-
for (const t in e)
|
|
130
|
+
function qe(i, e) {
|
|
131
|
+
for (const t in e) i[t] = e[t];
|
|
132
132
|
return (
|
|
133
133
|
/** @type {T & S} */
|
|
134
|
-
|
|
134
|
+
i
|
|
135
135
|
);
|
|
136
136
|
}
|
|
137
|
-
function
|
|
138
|
-
return
|
|
137
|
+
function Ie(i) {
|
|
138
|
+
return i();
|
|
139
139
|
}
|
|
140
|
-
function
|
|
140
|
+
function de() {
|
|
141
141
|
return /* @__PURE__ */ Object.create(null);
|
|
142
142
|
}
|
|
143
|
-
function
|
|
144
|
-
|
|
143
|
+
function Z(i) {
|
|
144
|
+
i.forEach(Ie);
|
|
145
145
|
}
|
|
146
|
-
function
|
|
147
|
-
return typeof
|
|
146
|
+
function z(i) {
|
|
147
|
+
return typeof i == "function";
|
|
148
148
|
}
|
|
149
|
-
function ve(
|
|
150
|
-
return
|
|
149
|
+
function ve(i, e) {
|
|
150
|
+
return i != i ? e == e : i !== e || i && typeof i == "object" || typeof i == "function";
|
|
151
151
|
}
|
|
152
|
-
function Xe(
|
|
153
|
-
return Object.keys(
|
|
152
|
+
function Xe(i) {
|
|
153
|
+
return Object.keys(i).length === 0;
|
|
154
154
|
}
|
|
155
|
-
function et(
|
|
156
|
-
if (
|
|
157
|
-
const
|
|
158
|
-
return
|
|
155
|
+
function et(i, e, t, n) {
|
|
156
|
+
if (i) {
|
|
157
|
+
const s = Le(i, e, t, n);
|
|
158
|
+
return i[0](s);
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
|
-
function
|
|
162
|
-
return
|
|
161
|
+
function Le(i, e, t, n) {
|
|
162
|
+
return i[1] && n ? qe(t.ctx.slice(), i[1](n(e))) : t.ctx;
|
|
163
163
|
}
|
|
164
|
-
function tt(
|
|
165
|
-
if (
|
|
166
|
-
const
|
|
164
|
+
function tt(i, e, t, n) {
|
|
165
|
+
if (i[2] && n) {
|
|
166
|
+
const s = i[2](n(t));
|
|
167
167
|
if (e.dirty === void 0)
|
|
168
|
-
return
|
|
169
|
-
if (typeof
|
|
170
|
-
const
|
|
168
|
+
return s;
|
|
169
|
+
if (typeof s == "object") {
|
|
170
|
+
const r = [], o = Math.max(e.dirty.length, s.length);
|
|
171
171
|
for (let l = 0; l < o; l += 1)
|
|
172
|
-
|
|
173
|
-
return
|
|
172
|
+
r[l] = e.dirty[l] | s[l];
|
|
173
|
+
return r;
|
|
174
174
|
}
|
|
175
|
-
return e.dirty |
|
|
175
|
+
return e.dirty | s;
|
|
176
176
|
}
|
|
177
177
|
return e.dirty;
|
|
178
178
|
}
|
|
179
|
-
function nt(
|
|
180
|
-
if (
|
|
181
|
-
const o =
|
|
182
|
-
|
|
179
|
+
function nt(i, e, t, n, s, r) {
|
|
180
|
+
if (s) {
|
|
181
|
+
const o = Le(e, t, n, r);
|
|
182
|
+
i.p(o, s);
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
|
-
function st(
|
|
186
|
-
if (
|
|
187
|
-
const e = [], t =
|
|
185
|
+
function st(i) {
|
|
186
|
+
if (i.ctx.length > 32) {
|
|
187
|
+
const e = [], t = i.ctx.length / 32;
|
|
188
188
|
for (let n = 0; n < t; n++)
|
|
189
189
|
e[n] = -1;
|
|
190
190
|
return e;
|
|
191
191
|
}
|
|
192
192
|
return -1;
|
|
193
193
|
}
|
|
194
|
-
function ge(
|
|
195
|
-
return
|
|
194
|
+
function ge(i) {
|
|
195
|
+
return i == null ? "" : i;
|
|
196
196
|
}
|
|
197
|
-
function
|
|
198
|
-
|
|
197
|
+
function D(i, e) {
|
|
198
|
+
i.appendChild(e);
|
|
199
199
|
}
|
|
200
|
-
function
|
|
201
|
-
|
|
200
|
+
function Q(i, e, t) {
|
|
201
|
+
i.insertBefore(e, t || null);
|
|
202
202
|
}
|
|
203
|
-
function
|
|
204
|
-
|
|
203
|
+
function H(i) {
|
|
204
|
+
i.parentNode && i.parentNode.removeChild(i);
|
|
205
205
|
}
|
|
206
|
-
function
|
|
207
|
-
for (let t = 0; t <
|
|
208
|
-
|
|
206
|
+
function _e(i, e) {
|
|
207
|
+
for (let t = 0; t < i.length; t += 1)
|
|
208
|
+
i[t] && i[t].d(e);
|
|
209
209
|
}
|
|
210
|
-
function
|
|
211
|
-
return document.createElement(
|
|
210
|
+
function P(i) {
|
|
211
|
+
return document.createElement(i);
|
|
212
212
|
}
|
|
213
|
-
function T(
|
|
214
|
-
return document.createTextNode(
|
|
213
|
+
function T(i) {
|
|
214
|
+
return document.createTextNode(i);
|
|
215
215
|
}
|
|
216
|
-
function
|
|
216
|
+
function U() {
|
|
217
217
|
return T(" ");
|
|
218
218
|
}
|
|
219
219
|
function it() {
|
|
220
220
|
return T("");
|
|
221
221
|
}
|
|
222
|
-
function
|
|
223
|
-
return
|
|
222
|
+
function j(i, e, t, n) {
|
|
223
|
+
return i.addEventListener(e, t, n), () => i.removeEventListener(e, t, n);
|
|
224
224
|
}
|
|
225
|
-
function
|
|
226
|
-
t == null ?
|
|
225
|
+
function A(i, e, t) {
|
|
226
|
+
t == null ? i.removeAttribute(e) : i.getAttribute(e) !== t && i.setAttribute(e, t);
|
|
227
227
|
}
|
|
228
|
-
function
|
|
229
|
-
return Array.from(
|
|
228
|
+
function rt(i) {
|
|
229
|
+
return Array.from(i.childNodes);
|
|
230
230
|
}
|
|
231
|
-
function
|
|
232
|
-
e = "" + e,
|
|
231
|
+
function R(i, e) {
|
|
232
|
+
e = "" + e, i.data !== e && (i.data = /** @type {string} */
|
|
233
233
|
e);
|
|
234
234
|
}
|
|
235
|
-
function
|
|
236
|
-
t == null ?
|
|
235
|
+
function J(i, e, t, n) {
|
|
236
|
+
t == null ? i.style.removeProperty(e) : i.style.setProperty(e, t, "");
|
|
237
237
|
}
|
|
238
238
|
let se;
|
|
239
|
-
function
|
|
240
|
-
se =
|
|
239
|
+
function F(i) {
|
|
240
|
+
se = i;
|
|
241
241
|
}
|
|
242
242
|
const x = [], ye = [];
|
|
243
|
-
let
|
|
244
|
-
const Ce = [],
|
|
243
|
+
let O = [];
|
|
244
|
+
const Ce = [], ot = /* @__PURE__ */ Promise.resolve();
|
|
245
245
|
let te = !1;
|
|
246
|
-
function
|
|
247
|
-
te || (te = !0,
|
|
246
|
+
function at() {
|
|
247
|
+
te || (te = !0, ot.then(De));
|
|
248
248
|
}
|
|
249
|
-
function ne(
|
|
250
|
-
|
|
249
|
+
function ne(i) {
|
|
250
|
+
O.push(i);
|
|
251
251
|
}
|
|
252
252
|
const X = /* @__PURE__ */ new Set();
|
|
253
|
-
let
|
|
254
|
-
function
|
|
255
|
-
if (
|
|
253
|
+
let N = 0;
|
|
254
|
+
function De() {
|
|
255
|
+
if (N !== 0)
|
|
256
256
|
return;
|
|
257
|
-
const
|
|
257
|
+
const i = se;
|
|
258
258
|
do {
|
|
259
259
|
try {
|
|
260
|
-
for (;
|
|
261
|
-
const e = x[
|
|
262
|
-
|
|
260
|
+
for (; N < x.length; ) {
|
|
261
|
+
const e = x[N];
|
|
262
|
+
N++, F(e), ct(e.$$);
|
|
263
263
|
}
|
|
264
264
|
} catch (e) {
|
|
265
|
-
throw x.length = 0,
|
|
265
|
+
throw x.length = 0, N = 0, e;
|
|
266
266
|
}
|
|
267
|
-
for (
|
|
268
|
-
for (let e = 0; e <
|
|
269
|
-
const t =
|
|
267
|
+
for (F(null), x.length = 0, N = 0; ye.length; ) ye.pop()();
|
|
268
|
+
for (let e = 0; e < O.length; e += 1) {
|
|
269
|
+
const t = O[e];
|
|
270
270
|
X.has(t) || (X.add(t), t());
|
|
271
271
|
}
|
|
272
|
-
|
|
272
|
+
O.length = 0;
|
|
273
273
|
} while (x.length);
|
|
274
274
|
for (; Ce.length; )
|
|
275
275
|
Ce.pop()();
|
|
276
|
-
te = !1, X.clear(),
|
|
276
|
+
te = !1, X.clear(), F(i);
|
|
277
277
|
}
|
|
278
|
-
function ct(
|
|
279
|
-
if (
|
|
280
|
-
|
|
281
|
-
const e =
|
|
282
|
-
|
|
278
|
+
function ct(i) {
|
|
279
|
+
if (i.fragment !== null) {
|
|
280
|
+
i.update(), Z(i.before_update);
|
|
281
|
+
const e = i.dirty;
|
|
282
|
+
i.dirty = [-1], i.fragment && i.fragment.p(i.ctx, e), i.after_update.forEach(ne);
|
|
283
283
|
}
|
|
284
284
|
}
|
|
285
|
-
function lt(
|
|
285
|
+
function lt(i) {
|
|
286
286
|
const e = [], t = [];
|
|
287
|
-
|
|
287
|
+
O.forEach((n) => i.indexOf(n) === -1 ? e.push(n) : t.push(n)), t.forEach((n) => n()), O = e;
|
|
288
288
|
}
|
|
289
|
-
const
|
|
289
|
+
const K = /* @__PURE__ */ new Set();
|
|
290
290
|
let ut;
|
|
291
|
-
function ie(
|
|
292
|
-
|
|
291
|
+
function ie(i, e) {
|
|
292
|
+
i && i.i && (K.delete(i), i.i(e));
|
|
293
293
|
}
|
|
294
|
-
function
|
|
295
|
-
if (
|
|
296
|
-
if (
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
}),
|
|
294
|
+
function pe(i, e, t, n) {
|
|
295
|
+
if (i && i.o) {
|
|
296
|
+
if (K.has(i)) return;
|
|
297
|
+
K.add(i), ut.c.push(() => {
|
|
298
|
+
K.delete(i);
|
|
299
|
+
}), i.o(e);
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
|
-
function
|
|
303
|
-
return (
|
|
302
|
+
function W(i) {
|
|
303
|
+
return (i == null ? void 0 : i.length) !== void 0 ? i : Array.from(i);
|
|
304
304
|
}
|
|
305
|
-
function
|
|
306
|
-
|
|
305
|
+
function ht(i) {
|
|
306
|
+
i && i.c();
|
|
307
307
|
}
|
|
308
|
-
function
|
|
309
|
-
const { fragment: n, after_update:
|
|
308
|
+
function Ae(i, e, t) {
|
|
309
|
+
const { fragment: n, after_update: s } = i.$$;
|
|
310
310
|
n && n.m(e, t), ne(() => {
|
|
311
|
-
const
|
|
312
|
-
|
|
313
|
-
}),
|
|
311
|
+
const r = i.$$.on_mount.map(Ie).filter(z);
|
|
312
|
+
i.$$.on_destroy ? i.$$.on_destroy.push(...r) : Z(r), i.$$.on_mount = [];
|
|
313
|
+
}), s.forEach(ne);
|
|
314
314
|
}
|
|
315
|
-
function
|
|
316
|
-
const t =
|
|
317
|
-
t.fragment !== null && (lt(t.after_update),
|
|
315
|
+
function Be(i, e) {
|
|
316
|
+
const t = i.$$;
|
|
317
|
+
t.fragment !== null && (lt(t.after_update), Z(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
|
|
318
318
|
}
|
|
319
|
-
function
|
|
320
|
-
|
|
319
|
+
function dt(i, e) {
|
|
320
|
+
i.$$.dirty[0] === -1 && (x.push(i), at(), i.$$.dirty.fill(0)), i.$$.dirty[e / 31 | 0] |= 1 << e % 31;
|
|
321
321
|
}
|
|
322
|
-
function
|
|
323
|
-
const
|
|
324
|
-
|
|
325
|
-
const u =
|
|
322
|
+
function Pe(i, e, t, n, s, r, o = null, l = [-1]) {
|
|
323
|
+
const h = se;
|
|
324
|
+
F(i);
|
|
325
|
+
const u = i.$$ = {
|
|
326
326
|
fragment: null,
|
|
327
327
|
ctx: [],
|
|
328
328
|
// state
|
|
329
|
-
props:
|
|
329
|
+
props: r,
|
|
330
330
|
update: ee,
|
|
331
|
-
not_equal:
|
|
332
|
-
bound:
|
|
331
|
+
not_equal: s,
|
|
332
|
+
bound: de(),
|
|
333
333
|
// lifecycle
|
|
334
334
|
on_mount: [],
|
|
335
335
|
on_destroy: [],
|
|
336
336
|
on_disconnect: [],
|
|
337
337
|
before_update: [],
|
|
338
338
|
after_update: [],
|
|
339
|
-
context: new Map(e.context || (
|
|
339
|
+
context: new Map(e.context || (h ? h.$$.context : [])),
|
|
340
340
|
// everything else
|
|
341
|
-
callbacks:
|
|
341
|
+
callbacks: de(),
|
|
342
342
|
dirty: l,
|
|
343
343
|
skip_bound: !1,
|
|
344
|
-
root: e.target ||
|
|
344
|
+
root: e.target || h.$$.root
|
|
345
345
|
};
|
|
346
346
|
o && o(u.root);
|
|
347
|
-
let
|
|
348
|
-
if (u.ctx = t ? t(
|
|
349
|
-
const
|
|
350
|
-
return u.ctx &&
|
|
351
|
-
}) : [], u.update(),
|
|
347
|
+
let g = !1;
|
|
348
|
+
if (u.ctx = t ? t(i, e.props || {}, (d, C, ...y) => {
|
|
349
|
+
const f = y.length ? y[0] : C;
|
|
350
|
+
return u.ctx && s(u.ctx[d], u.ctx[d] = f) && (!u.skip_bound && u.bound[d] && u.bound[d](f), g && dt(i, d)), C;
|
|
351
|
+
}) : [], u.update(), g = !0, Z(u.before_update), u.fragment = n ? n(u.ctx) : !1, e.target) {
|
|
352
352
|
if (e.hydrate) {
|
|
353
|
-
const
|
|
354
|
-
u.fragment && u.fragment.l(
|
|
353
|
+
const d = rt(e.target);
|
|
354
|
+
u.fragment && u.fragment.l(d), d.forEach(H);
|
|
355
355
|
} else
|
|
356
356
|
u.fragment && u.fragment.c();
|
|
357
|
-
e.intro && ie(
|
|
357
|
+
e.intro && ie(i.$$.fragment), Ae(i, e.target, e.anchor), De();
|
|
358
358
|
}
|
|
359
|
-
|
|
359
|
+
F(h);
|
|
360
360
|
}
|
|
361
|
-
class
|
|
361
|
+
class be {
|
|
362
362
|
constructor() {
|
|
363
|
-
|
|
363
|
+
he(this, "$$"), he(this, "$$set");
|
|
364
364
|
}
|
|
365
365
|
/** @returns {void} */
|
|
366
366
|
$destroy() {
|
|
367
|
-
|
|
367
|
+
Be(this, 1), this.$destroy = ee;
|
|
368
368
|
}
|
|
369
369
|
/**
|
|
370
370
|
* @template {Extract<keyof Events, string>} K
|
|
@@ -373,12 +373,12 @@ class Ne {
|
|
|
373
373
|
* @returns {() => void}
|
|
374
374
|
*/
|
|
375
375
|
$on(e, t) {
|
|
376
|
-
if (!
|
|
376
|
+
if (!z(t))
|
|
377
377
|
return ee;
|
|
378
378
|
const n = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
|
|
379
379
|
return n.push(t), () => {
|
|
380
|
-
const
|
|
381
|
-
|
|
380
|
+
const s = n.indexOf(t);
|
|
381
|
+
s !== -1 && n.splice(s, 1);
|
|
382
382
|
};
|
|
383
383
|
}
|
|
384
384
|
/**
|
|
@@ -391,375 +391,369 @@ class Ne {
|
|
|
391
391
|
}
|
|
392
392
|
const gt = "4";
|
|
393
393
|
typeof window != "undefined" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(gt);
|
|
394
|
-
function yt(
|
|
395
|
-
let e, t, n,
|
|
394
|
+
function yt(i) {
|
|
395
|
+
let e, t, n, s = (
|
|
396
396
|
/*title*/
|
|
397
|
-
(
|
|
398
|
-
),
|
|
397
|
+
(i[1] || "标题") + ""
|
|
398
|
+
), r, o, l, h, u, g, d = (
|
|
399
399
|
/*cancelText*/
|
|
400
|
-
(
|
|
401
|
-
),
|
|
400
|
+
(i[3] || "取消") + ""
|
|
401
|
+
), C, y, f, E = (
|
|
402
402
|
/*okText*/
|
|
403
|
-
(
|
|
404
|
-
),
|
|
405
|
-
const
|
|
403
|
+
(i[4] || "确认") + ""
|
|
404
|
+
), w, m, I, _;
|
|
405
|
+
const B = (
|
|
406
406
|
/*#slots*/
|
|
407
|
-
|
|
408
|
-
),
|
|
409
|
-
|
|
410
|
-
|
|
407
|
+
i[8].default
|
|
408
|
+
), k = et(
|
|
409
|
+
B,
|
|
410
|
+
i,
|
|
411
411
|
/*$$scope*/
|
|
412
|
-
|
|
412
|
+
i[7],
|
|
413
413
|
null
|
|
414
414
|
);
|
|
415
415
|
return {
|
|
416
416
|
c() {
|
|
417
|
-
e =
|
|
418
|
-
|
|
417
|
+
e = P("div"), t = P("div"), n = P("div"), r = T(s), o = U(), l = P("div"), k && k.c(), h = U(), u = P("div"), g = P("button"), C = T(d), y = U(), f = P("button"), w = T(E), A(n, "class", "model-title svelte-16iv9d0"), A(l, "class", "slot svelte-16iv9d0"), A(g, "class", "modal-btn svelte-16iv9d0"), A(f, "class", "modal-btn success svelte-16iv9d0"), J(
|
|
418
|
+
f,
|
|
419
419
|
"background-color",
|
|
420
420
|
/*theme*/
|
|
421
|
-
|
|
422
|
-
),
|
|
421
|
+
i[5]
|
|
422
|
+
), A(u, "class", "modal-footer svelte-16iv9d0"), A(t, "class", "modal-content svelte-16iv9d0"), A(e, "class", "modal-background modal-visible svelte-16iv9d0");
|
|
423
423
|
},
|
|
424
|
-
m(
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
424
|
+
m(p, b) {
|
|
425
|
+
Q(p, e, b), D(e, t), D(t, n), D(n, r), D(t, o), D(t, l), k && k.m(l, null), D(t, h), D(t, u), D(u, g), D(g, C), D(u, y), D(u, f), D(f, w), m = !0, I || (_ = [
|
|
426
|
+
j(g, "click", function() {
|
|
427
|
+
z(
|
|
428
428
|
/*onCancel*/
|
|
429
|
-
|
|
430
|
-
) &&
|
|
429
|
+
i[0]
|
|
430
|
+
) && i[0].apply(this, arguments);
|
|
431
431
|
}),
|
|
432
|
-
|
|
433
|
-
|
|
432
|
+
j(f, "click", function() {
|
|
433
|
+
z(
|
|
434
434
|
/*onOk*/
|
|
435
|
-
|
|
436
|
-
) &&
|
|
435
|
+
i[2]
|
|
436
|
+
) && i[2].apply(this, arguments);
|
|
437
437
|
}),
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
V(
|
|
441
|
-
/*onClose*/
|
|
442
|
-
s[3]
|
|
443
|
-
) && s[3].apply(this, arguments);
|
|
444
|
-
})
|
|
445
|
-
], k = !0);
|
|
438
|
+
j(t, "click", Ct)
|
|
439
|
+
], I = !0);
|
|
446
440
|
},
|
|
447
|
-
p(
|
|
448
|
-
|
|
449
|
-
2) &&
|
|
450
|
-
(
|
|
441
|
+
p(p, [b]) {
|
|
442
|
+
i = p, (!m || b & /*title*/
|
|
443
|
+
2) && s !== (s = /*title*/
|
|
444
|
+
(i[1] || "标题") + "") && R(r, s), k && k.p && (!m || b & /*$$scope*/
|
|
451
445
|
128) && nt(
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
446
|
+
k,
|
|
447
|
+
B,
|
|
448
|
+
i,
|
|
455
449
|
/*$$scope*/
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
450
|
+
i[7],
|
|
451
|
+
m ? tt(
|
|
452
|
+
B,
|
|
459
453
|
/*$$scope*/
|
|
460
|
-
|
|
461
|
-
|
|
454
|
+
i[7],
|
|
455
|
+
b,
|
|
462
456
|
null
|
|
463
457
|
) : st(
|
|
464
458
|
/*$$scope*/
|
|
465
|
-
|
|
459
|
+
i[7]
|
|
466
460
|
),
|
|
467
461
|
null
|
|
468
|
-
), (!
|
|
469
|
-
|
|
470
|
-
(
|
|
471
|
-
|
|
472
|
-
(
|
|
473
|
-
|
|
474
|
-
|
|
462
|
+
), (!m || b & /*cancelText*/
|
|
463
|
+
8) && d !== (d = /*cancelText*/
|
|
464
|
+
(i[3] || "取消") + "") && R(C, d), (!m || b & /*okText*/
|
|
465
|
+
16) && E !== (E = /*okText*/
|
|
466
|
+
(i[4] || "确认") + "") && R(w, E), (!m || b & /*theme*/
|
|
467
|
+
32) && J(
|
|
468
|
+
f,
|
|
475
469
|
"background-color",
|
|
476
470
|
/*theme*/
|
|
477
|
-
|
|
471
|
+
i[5]
|
|
478
472
|
);
|
|
479
473
|
},
|
|
480
|
-
i(
|
|
481
|
-
|
|
474
|
+
i(p) {
|
|
475
|
+
m || (ie(k, p), m = !0);
|
|
482
476
|
},
|
|
483
|
-
o(
|
|
484
|
-
|
|
477
|
+
o(p) {
|
|
478
|
+
pe(k, p), m = !1;
|
|
485
479
|
},
|
|
486
|
-
d(
|
|
487
|
-
|
|
480
|
+
d(p) {
|
|
481
|
+
p && H(e), k && k.d(p), I = !1, Z(_);
|
|
488
482
|
}
|
|
489
483
|
};
|
|
490
484
|
}
|
|
491
|
-
const Ct = (
|
|
492
|
-
function ft(
|
|
493
|
-
let { $$slots: n = {}, $$scope:
|
|
494
|
-
return
|
|
495
|
-
"onCancel" in
|
|
496
|
-
}, [
|
|
485
|
+
const Ct = (i) => i.stopPropagation();
|
|
486
|
+
function ft(i, e, t) {
|
|
487
|
+
let { $$slots: n = {}, $$scope: s } = e, { onCancel: r } = e, { title: o } = e, { onOk: l } = e, { onClose: h } = e, { cancelText: u } = e, { okText: g } = e, { theme: d } = e;
|
|
488
|
+
return i.$$set = (C) => {
|
|
489
|
+
"onCancel" in C && t(0, r = C.onCancel), "title" in C && t(1, o = C.title), "onOk" in C && t(2, l = C.onOk), "onClose" in C && t(6, h = C.onClose), "cancelText" in C && t(3, u = C.cancelText), "okText" in C && t(4, g = C.okText), "theme" in C && t(5, d = C.theme), "$$scope" in C && t(7, s = C.$$scope);
|
|
490
|
+
}, [r, o, l, u, g, d, h, s, n];
|
|
497
491
|
}
|
|
498
|
-
class wt extends
|
|
492
|
+
class wt extends be {
|
|
499
493
|
constructor(e) {
|
|
500
|
-
super(),
|
|
494
|
+
super(), Pe(this, e, ft, yt, ve, {
|
|
501
495
|
onCancel: 0,
|
|
502
496
|
title: 1,
|
|
503
497
|
onOk: 2,
|
|
504
|
-
onClose:
|
|
505
|
-
cancelText:
|
|
506
|
-
okText:
|
|
507
|
-
theme:
|
|
498
|
+
onClose: 6,
|
|
499
|
+
cancelText: 3,
|
|
500
|
+
okText: 4,
|
|
501
|
+
theme: 5
|
|
508
502
|
});
|
|
509
503
|
}
|
|
510
504
|
}
|
|
511
|
-
function fe(
|
|
512
|
-
const n =
|
|
505
|
+
function fe(i, e, t) {
|
|
506
|
+
const n = i.slice();
|
|
513
507
|
return n[13] = e[t], n[15] = t, n;
|
|
514
508
|
}
|
|
515
|
-
function we(
|
|
516
|
-
const n =
|
|
509
|
+
function we(i, e, t) {
|
|
510
|
+
const n = i.slice();
|
|
517
511
|
return n[16] = e[t], n;
|
|
518
512
|
}
|
|
519
|
-
function
|
|
513
|
+
function Se(i) {
|
|
520
514
|
let e, t = (
|
|
521
515
|
/*col*/
|
|
522
|
-
(
|
|
516
|
+
(i[16].format ? (
|
|
523
517
|
/*col*/
|
|
524
|
-
|
|
518
|
+
i[16].format(
|
|
525
519
|
/*row*/
|
|
526
|
-
|
|
520
|
+
i[13]
|
|
527
521
|
)
|
|
528
522
|
) : (
|
|
529
523
|
/*row*/
|
|
530
|
-
|
|
524
|
+
i[13][
|
|
531
525
|
/*col*/
|
|
532
|
-
|
|
526
|
+
i[16].key
|
|
533
527
|
]
|
|
534
528
|
)) + ""
|
|
535
529
|
), n;
|
|
536
530
|
return {
|
|
537
531
|
c() {
|
|
538
|
-
e =
|
|
539
|
-
|
|
532
|
+
e = P("div"), n = T(t), A(e, "class", "svelte-1kh75ag"), J(e, "width", `${100 / /*columns*/
|
|
533
|
+
i[1].length}%`);
|
|
540
534
|
},
|
|
541
|
-
m(
|
|
542
|
-
|
|
535
|
+
m(s, r) {
|
|
536
|
+
Q(s, e, r), D(e, n);
|
|
543
537
|
},
|
|
544
|
-
p(
|
|
545
|
-
|
|
538
|
+
p(s, r) {
|
|
539
|
+
r & /*columns, data*/
|
|
546
540
|
3 && t !== (t = /*col*/
|
|
547
|
-
(
|
|
541
|
+
(s[16].format ? (
|
|
548
542
|
/*col*/
|
|
549
|
-
|
|
543
|
+
s[16].format(
|
|
550
544
|
/*row*/
|
|
551
|
-
|
|
545
|
+
s[13]
|
|
552
546
|
)
|
|
553
547
|
) : (
|
|
554
548
|
/*row*/
|
|
555
|
-
|
|
549
|
+
s[13][
|
|
556
550
|
/*col*/
|
|
557
|
-
|
|
551
|
+
s[16].key
|
|
558
552
|
]
|
|
559
|
-
)) + "") &&
|
|
560
|
-
2 &&
|
|
561
|
-
|
|
553
|
+
)) + "") && R(n, t), r & /*columns*/
|
|
554
|
+
2 && J(e, "width", `${100 / /*columns*/
|
|
555
|
+
s[1].length}%`);
|
|
562
556
|
},
|
|
563
|
-
d(
|
|
564
|
-
|
|
557
|
+
d(s) {
|
|
558
|
+
s && H(e);
|
|
565
559
|
}
|
|
566
560
|
};
|
|
567
561
|
}
|
|
568
|
-
function Ee(
|
|
569
|
-
let e, t, n,
|
|
562
|
+
function Ee(i) {
|
|
563
|
+
let e, t, n, s, r, o = W(
|
|
570
564
|
/*columns*/
|
|
571
|
-
|
|
565
|
+
i[1]
|
|
572
566
|
), l = [];
|
|
573
567
|
for (let u = 0; u < o.length; u += 1)
|
|
574
|
-
l[u] =
|
|
575
|
-
function
|
|
568
|
+
l[u] = Se(we(i, o, u));
|
|
569
|
+
function h() {
|
|
576
570
|
return (
|
|
577
571
|
/*click_handler*/
|
|
578
|
-
|
|
572
|
+
i[12](
|
|
579
573
|
/*index*/
|
|
580
|
-
|
|
574
|
+
i[15]
|
|
581
575
|
)
|
|
582
576
|
);
|
|
583
577
|
}
|
|
584
578
|
return {
|
|
585
579
|
c() {
|
|
586
|
-
e =
|
|
580
|
+
e = P("div");
|
|
587
581
|
for (let u = 0; u < l.length; u += 1)
|
|
588
582
|
l[u].c();
|
|
589
|
-
t =
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
583
|
+
t = U(), A(e, "class", n = ge(`cert-item ${/*index*/
|
|
584
|
+
i[15] === 0 ? "cert-item-first" : ""} ${/*index*/
|
|
585
|
+
i[15] === /*selectedIndex*/
|
|
586
|
+
i[7] ? "cert-item-selected" : ""}`) + " svelte-1kh75ag");
|
|
593
587
|
},
|
|
594
|
-
m(u,
|
|
595
|
-
|
|
596
|
-
for (let
|
|
597
|
-
l[
|
|
598
|
-
|
|
588
|
+
m(u, g) {
|
|
589
|
+
Q(u, e, g);
|
|
590
|
+
for (let d = 0; d < l.length; d += 1)
|
|
591
|
+
l[d] && l[d].m(e, null);
|
|
592
|
+
D(e, t), s || (r = j(e, "click", h), s = !0);
|
|
599
593
|
},
|
|
600
|
-
p(u,
|
|
601
|
-
if (
|
|
594
|
+
p(u, g) {
|
|
595
|
+
if (i = u, g & /*columns, data*/
|
|
602
596
|
3) {
|
|
603
|
-
o =
|
|
597
|
+
o = W(
|
|
604
598
|
/*columns*/
|
|
605
|
-
|
|
599
|
+
i[1]
|
|
606
600
|
);
|
|
607
|
-
let
|
|
608
|
-
for (
|
|
609
|
-
const
|
|
610
|
-
l[
|
|
601
|
+
let d;
|
|
602
|
+
for (d = 0; d < o.length; d += 1) {
|
|
603
|
+
const C = we(i, o, d);
|
|
604
|
+
l[d] ? l[d].p(C, g) : (l[d] = Se(C), l[d].c(), l[d].m(e, t));
|
|
611
605
|
}
|
|
612
|
-
for (;
|
|
613
|
-
l[
|
|
606
|
+
for (; d < l.length; d += 1)
|
|
607
|
+
l[d].d(1);
|
|
614
608
|
l.length = o.length;
|
|
615
609
|
}
|
|
616
|
-
|
|
610
|
+
g & /*selectedIndex*/
|
|
617
611
|
128 && n !== (n = ge(`cert-item ${/*index*/
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
612
|
+
i[15] === 0 ? "cert-item-first" : ""} ${/*index*/
|
|
613
|
+
i[15] === /*selectedIndex*/
|
|
614
|
+
i[7] ? "cert-item-selected" : ""}`) + " svelte-1kh75ag") && A(e, "class", n);
|
|
621
615
|
},
|
|
622
616
|
d(u) {
|
|
623
|
-
u &&
|
|
617
|
+
u && H(e), _e(l, u), s = !1, r();
|
|
624
618
|
}
|
|
625
619
|
};
|
|
626
620
|
}
|
|
627
|
-
function
|
|
628
|
-
let e, t =
|
|
621
|
+
function St(i) {
|
|
622
|
+
let e, t = W(
|
|
629
623
|
/*data*/
|
|
630
|
-
|
|
624
|
+
i[0]
|
|
631
625
|
), n = [];
|
|
632
|
-
for (let
|
|
633
|
-
n[
|
|
626
|
+
for (let s = 0; s < t.length; s += 1)
|
|
627
|
+
n[s] = Ee(fe(i, t, s));
|
|
634
628
|
return {
|
|
635
629
|
c() {
|
|
636
|
-
for (let
|
|
637
|
-
n[
|
|
630
|
+
for (let s = 0; s < n.length; s += 1)
|
|
631
|
+
n[s].c();
|
|
638
632
|
e = it();
|
|
639
633
|
},
|
|
640
|
-
m(
|
|
634
|
+
m(s, r) {
|
|
641
635
|
for (let o = 0; o < n.length; o += 1)
|
|
642
|
-
n[o] && n[o].m(
|
|
643
|
-
|
|
636
|
+
n[o] && n[o].m(s, r);
|
|
637
|
+
Q(s, e, r);
|
|
644
638
|
},
|
|
645
|
-
p(
|
|
646
|
-
if (
|
|
639
|
+
p(s, r) {
|
|
640
|
+
if (r & /*selectedIndex, columns, data*/
|
|
647
641
|
131) {
|
|
648
|
-
t =
|
|
642
|
+
t = W(
|
|
649
643
|
/*data*/
|
|
650
|
-
|
|
644
|
+
s[0]
|
|
651
645
|
);
|
|
652
646
|
let o;
|
|
653
647
|
for (o = 0; o < t.length; o += 1) {
|
|
654
|
-
const l = fe(
|
|
655
|
-
n[o] ? n[o].p(l,
|
|
648
|
+
const l = fe(s, t, o);
|
|
649
|
+
n[o] ? n[o].p(l, r) : (n[o] = Ee(l), n[o].c(), n[o].m(e.parentNode, e));
|
|
656
650
|
}
|
|
657
651
|
for (; o < n.length; o += 1)
|
|
658
652
|
n[o].d(1);
|
|
659
653
|
n.length = t.length;
|
|
660
654
|
}
|
|
661
655
|
},
|
|
662
|
-
d(
|
|
663
|
-
|
|
656
|
+
d(s) {
|
|
657
|
+
s && H(e), _e(n, s);
|
|
664
658
|
}
|
|
665
659
|
};
|
|
666
660
|
}
|
|
667
|
-
function Et(
|
|
661
|
+
function Et(i) {
|
|
668
662
|
let e, t;
|
|
669
663
|
return e = new wt({
|
|
670
664
|
props: {
|
|
671
665
|
onOk: (
|
|
672
666
|
/*handleOk*/
|
|
673
|
-
|
|
667
|
+
i[9]
|
|
674
668
|
),
|
|
675
669
|
onClose: (
|
|
676
670
|
/*onClose*/
|
|
677
|
-
|
|
671
|
+
i[2]
|
|
678
672
|
),
|
|
679
673
|
onCancel: (
|
|
680
674
|
/*handleCancel*/
|
|
681
|
-
|
|
675
|
+
i[8]
|
|
682
676
|
),
|
|
683
677
|
cancelText: (
|
|
684
678
|
/*cancelText*/
|
|
685
|
-
|
|
679
|
+
i[3]
|
|
686
680
|
),
|
|
687
681
|
okText: (
|
|
688
682
|
/*okText*/
|
|
689
|
-
|
|
683
|
+
i[4]
|
|
690
684
|
),
|
|
691
685
|
title: (
|
|
692
686
|
/*title*/
|
|
693
|
-
|
|
687
|
+
i[6]
|
|
694
688
|
),
|
|
695
689
|
theme: (
|
|
696
690
|
/*theme*/
|
|
697
|
-
|
|
691
|
+
i[5]
|
|
698
692
|
),
|
|
699
|
-
$$slots: { default: [
|
|
700
|
-
$$scope: { ctx:
|
|
693
|
+
$$slots: { default: [St] },
|
|
694
|
+
$$scope: { ctx: i }
|
|
701
695
|
}
|
|
702
696
|
}), {
|
|
703
697
|
c() {
|
|
704
|
-
|
|
698
|
+
ht(e.$$.fragment);
|
|
705
699
|
},
|
|
706
|
-
m(n,
|
|
707
|
-
|
|
700
|
+
m(n, s) {
|
|
701
|
+
Ae(e, n, s), t = !0;
|
|
708
702
|
},
|
|
709
|
-
p(n, [
|
|
710
|
-
const
|
|
711
|
-
|
|
712
|
-
4 && (
|
|
713
|
-
n[2]),
|
|
714
|
-
8 && (
|
|
715
|
-
n[3]),
|
|
716
|
-
16 && (
|
|
717
|
-
n[4]),
|
|
718
|
-
64 && (
|
|
719
|
-
n[6]),
|
|
720
|
-
32 && (
|
|
721
|
-
n[5]),
|
|
722
|
-
524419 && (
|
|
703
|
+
p(n, [s]) {
|
|
704
|
+
const r = {};
|
|
705
|
+
s & /*onClose*/
|
|
706
|
+
4 && (r.onClose = /*onClose*/
|
|
707
|
+
n[2]), s & /*cancelText*/
|
|
708
|
+
8 && (r.cancelText = /*cancelText*/
|
|
709
|
+
n[3]), s & /*okText*/
|
|
710
|
+
16 && (r.okText = /*okText*/
|
|
711
|
+
n[4]), s & /*title*/
|
|
712
|
+
64 && (r.title = /*title*/
|
|
713
|
+
n[6]), s & /*theme*/
|
|
714
|
+
32 && (r.theme = /*theme*/
|
|
715
|
+
n[5]), s & /*$$scope, data, selectedIndex, columns*/
|
|
716
|
+
524419 && (r.$$scope = { dirty: s, ctx: n }), e.$set(r);
|
|
723
717
|
},
|
|
724
718
|
i(n) {
|
|
725
719
|
t || (ie(e.$$.fragment, n), t = !0);
|
|
726
720
|
},
|
|
727
721
|
o(n) {
|
|
728
|
-
|
|
722
|
+
pe(e.$$.fragment, n), t = !1;
|
|
729
723
|
},
|
|
730
724
|
d(n) {
|
|
731
|
-
|
|
725
|
+
Be(e, n);
|
|
732
726
|
}
|
|
733
727
|
};
|
|
734
728
|
}
|
|
735
|
-
function
|
|
736
|
-
let { data: n = [] } = e, { columns:
|
|
729
|
+
function mt(i, e, t) {
|
|
730
|
+
let { data: n = [] } = e, { columns: s = [] } = e, { onCancel: r } = e, { onOk: o } = e, { onClose: l } = e, { cancelText: h = "" } = e, { okText: u = "" } = e, { theme: g = "#409eff" } = e, { title: d = "" } = e, C = 0;
|
|
737
731
|
const y = () => {
|
|
738
|
-
|
|
739
|
-
},
|
|
740
|
-
o == null || o(n[
|
|
741
|
-
}, E = (
|
|
742
|
-
return
|
|
743
|
-
"data" in
|
|
732
|
+
r(`${d}失败`), l == null || l();
|
|
733
|
+
}, f = () => {
|
|
734
|
+
o == null || o(n[C]), l == null || l();
|
|
735
|
+
}, E = (w) => t(7, C = w);
|
|
736
|
+
return i.$$set = (w) => {
|
|
737
|
+
"data" in w && t(0, n = w.data), "columns" in w && t(1, s = w.columns), "onCancel" in w && t(10, r = w.onCancel), "onOk" in w && t(11, o = w.onOk), "onClose" in w && t(2, l = w.onClose), "cancelText" in w && t(3, h = w.cancelText), "okText" in w && t(4, u = w.okText), "theme" in w && t(5, g = w.theme), "title" in w && t(6, d = w.title);
|
|
744
738
|
}, [
|
|
745
739
|
n,
|
|
746
|
-
|
|
740
|
+
s,
|
|
747
741
|
l,
|
|
748
|
-
|
|
742
|
+
h,
|
|
749
743
|
u,
|
|
744
|
+
g,
|
|
745
|
+
d,
|
|
750
746
|
C,
|
|
751
|
-
h,
|
|
752
|
-
w,
|
|
753
747
|
y,
|
|
754
|
-
|
|
755
|
-
|
|
748
|
+
f,
|
|
749
|
+
r,
|
|
756
750
|
o,
|
|
757
751
|
E
|
|
758
752
|
];
|
|
759
753
|
}
|
|
760
|
-
class
|
|
754
|
+
class kt extends be {
|
|
761
755
|
constructor(e) {
|
|
762
|
-
super(),
|
|
756
|
+
super(), Pe(this, e, mt, Et, ve, {
|
|
763
757
|
data: 0,
|
|
764
758
|
columns: 1,
|
|
765
759
|
onCancel: 10,
|
|
@@ -772,21 +766,21 @@ class It extends Ne {
|
|
|
772
766
|
});
|
|
773
767
|
}
|
|
774
768
|
}
|
|
775
|
-
class
|
|
769
|
+
class It {
|
|
776
770
|
constructor() {
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
this.modalInstance.current = new
|
|
771
|
+
a(this, "modalInstance", { current: null });
|
|
772
|
+
a(this, "open", (e) => new Promise((t, n) => {
|
|
773
|
+
this.modalInstance.current = new kt({
|
|
780
774
|
target: document.body,
|
|
781
|
-
props: v(
|
|
782
|
-
onCancel: (
|
|
775
|
+
props: v(S({}, e), {
|
|
776
|
+
onCancel: (s) => {
|
|
783
777
|
n({
|
|
784
778
|
code: -1,
|
|
785
|
-
msg:
|
|
779
|
+
msg: s
|
|
786
780
|
});
|
|
787
781
|
},
|
|
788
|
-
onOk: (
|
|
789
|
-
t(
|
|
782
|
+
onOk: (s) => {
|
|
783
|
+
t(s);
|
|
790
784
|
},
|
|
791
785
|
onClose: () => {
|
|
792
786
|
this.close();
|
|
@@ -794,7 +788,7 @@ class kt {
|
|
|
794
788
|
})
|
|
795
789
|
});
|
|
796
790
|
}));
|
|
797
|
-
|
|
791
|
+
a(this, "close", () => {
|
|
798
792
|
setTimeout(() => {
|
|
799
793
|
var e;
|
|
800
794
|
(e = this.modalInstance.current) == null || e.$destroy();
|
|
@@ -802,27 +796,55 @@ class kt {
|
|
|
802
796
|
});
|
|
803
797
|
}
|
|
804
798
|
}
|
|
805
|
-
const G = new
|
|
806
|
-
function vt(
|
|
807
|
-
const n = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),
|
|
808
|
-
if (t = t || n.length,
|
|
809
|
-
for (let
|
|
799
|
+
const G = new It();
|
|
800
|
+
function vt(i = 32, e = !0, t = 0) {
|
|
801
|
+
const n = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""), s = [];
|
|
802
|
+
if (t = t || n.length, i)
|
|
803
|
+
for (let r = 0; r < i; r++) s[r] = n[0 | Math.random() * t];
|
|
810
804
|
else {
|
|
811
|
-
let
|
|
812
|
-
|
|
805
|
+
let r;
|
|
806
|
+
s[8] = s[13] = s[18] = s[23] = "-", s[14] = "4";
|
|
813
807
|
for (let o = 0; o < 36; o++)
|
|
814
|
-
|
|
808
|
+
s[o] || (r = 0 | Math.random() * 16, s[o] = n[o === 19 ? r & 3 | 8 : r]);
|
|
809
|
+
}
|
|
810
|
+
return e ? (s.shift(), `u${s.join("")}`) : s.join("");
|
|
811
|
+
}
|
|
812
|
+
function Lt(i) {
|
|
813
|
+
const e = new Uint8Array(i), t = new TextDecoder("gbk"), n = new TextDecoder("latin1").decode(e);
|
|
814
|
+
try {
|
|
815
|
+
const s = JSON.parse(n), r = (o) => {
|
|
816
|
+
if (typeof o == "string") {
|
|
817
|
+
const l = new Uint8Array(o.length);
|
|
818
|
+
for (let h = 0; h < o.length; h++)
|
|
819
|
+
l[h] = o.charCodeAt(h) & 255;
|
|
820
|
+
return t.decode(l);
|
|
821
|
+
}
|
|
822
|
+
if (Array.isArray(o))
|
|
823
|
+
return o.map(r);
|
|
824
|
+
if (o !== null && typeof o == "object") {
|
|
825
|
+
const l = {}, h = o;
|
|
826
|
+
for (const u in o)
|
|
827
|
+
if (Object.prototype.hasOwnProperty.call(h, u)) {
|
|
828
|
+
const g = r(u);
|
|
829
|
+
l[g] = r(h[u]);
|
|
830
|
+
}
|
|
831
|
+
return l;
|
|
832
|
+
}
|
|
833
|
+
return o;
|
|
834
|
+
};
|
|
835
|
+
return r(s);
|
|
836
|
+
} catch (s) {
|
|
837
|
+
throw console.error("GBK JSON 修复流程失败:", s), s;
|
|
815
838
|
}
|
|
816
|
-
return e ? (i.shift(), `u${i.join("")}`) : i.join("");
|
|
817
839
|
}
|
|
818
840
|
const _t = [
|
|
819
841
|
{
|
|
820
842
|
key: "CN"
|
|
821
843
|
},
|
|
822
844
|
{
|
|
823
|
-
format: (
|
|
845
|
+
format: (i) => `${i.DevClass}(${i.sn})`
|
|
824
846
|
}
|
|
825
|
-
],
|
|
847
|
+
], Dt = [
|
|
826
848
|
{
|
|
827
849
|
key: "SealId"
|
|
828
850
|
},
|
|
@@ -830,13 +852,13 @@ const _t = [
|
|
|
830
852
|
key: "Vid"
|
|
831
853
|
},
|
|
832
854
|
{
|
|
833
|
-
format: (
|
|
855
|
+
format: (i) => `${i.FileName}(${i.FileSize}B)`
|
|
834
856
|
}
|
|
835
|
-
],
|
|
857
|
+
], me = [
|
|
836
858
|
{
|
|
837
859
|
key: "SealId"
|
|
838
860
|
}
|
|
839
|
-
],
|
|
861
|
+
], pt = [
|
|
840
862
|
{
|
|
841
863
|
key: "manu"
|
|
842
864
|
},
|
|
@@ -844,47 +866,47 @@ const _t = [
|
|
|
844
866
|
key: "sn"
|
|
845
867
|
}
|
|
846
868
|
];
|
|
847
|
-
class
|
|
869
|
+
class At {
|
|
848
870
|
constructor(e) {
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
871
|
+
a(this, "socketInstance", null);
|
|
872
|
+
a(this, "eventBus", new We());
|
|
873
|
+
a(this, "scene");
|
|
874
|
+
a(this, "isRememberPin", !1);
|
|
875
|
+
a(this, "pinPolicy");
|
|
876
|
+
a(this, "socketConfig", null);
|
|
877
|
+
a(this, "isConnecting", !1);
|
|
878
|
+
a(this, "messageQueue", []);
|
|
879
|
+
a(this, "getSocketReadyState", () => {
|
|
858
880
|
var e;
|
|
859
881
|
return (e = this.socketInstance) == null ? void 0 : e.readyState;
|
|
860
882
|
});
|
|
861
|
-
|
|
883
|
+
a(this, "destroy", () => {
|
|
862
884
|
var e;
|
|
863
885
|
(e = this.socketInstance) == null || e.close();
|
|
864
886
|
});
|
|
865
|
-
|
|
887
|
+
a(this, "sendMessage", (e, t, n) => new Promise((s, r) => {
|
|
866
888
|
var l;
|
|
867
889
|
const o = () => {
|
|
868
|
-
var
|
|
869
|
-
if (((
|
|
870
|
-
|
|
890
|
+
var d, C;
|
|
891
|
+
if (((d = this.socketInstance) == null ? void 0 : d.readyState) !== WebSocket.OPEN) {
|
|
892
|
+
r({
|
|
871
893
|
errCode: je,
|
|
872
894
|
msg: "数字证书客户端连接失败"
|
|
873
895
|
});
|
|
874
896
|
return;
|
|
875
897
|
}
|
|
876
|
-
const
|
|
877
|
-
y.success ?
|
|
878
|
-
},
|
|
898
|
+
const h = vt(), u = (y) => {
|
|
899
|
+
y.success ? s(y.data) : r(y);
|
|
900
|
+
}, g = {
|
|
879
901
|
function: e,
|
|
880
902
|
args: t ? [t] : [],
|
|
881
|
-
msgid:
|
|
903
|
+
msgid: h
|
|
882
904
|
};
|
|
883
|
-
(
|
|
905
|
+
(C = this.socketInstance) == null || C.send(JSON.stringify(g)), this.eventBus.on(e, u), this.eventBus.on(h, u);
|
|
884
906
|
};
|
|
885
907
|
if (n && (this.scene & n) !== n) {
|
|
886
|
-
|
|
887
|
-
errCode:
|
|
908
|
+
r({
|
|
909
|
+
errCode: Re,
|
|
888
910
|
msg: "无权限执行此操作"
|
|
889
911
|
});
|
|
890
912
|
return;
|
|
@@ -895,56 +917,54 @@ class Dt {
|
|
|
895
917
|
}
|
|
896
918
|
this.messageQueue.push(o), this.isConnecting || this.initSocket(this.socketConfig);
|
|
897
919
|
}));
|
|
898
|
-
|
|
920
|
+
a(this, "flushMsgQueue", () => {
|
|
899
921
|
var e;
|
|
900
922
|
(e = this.messageQueue) == null || e.forEach((t) => t()), this.messageQueue = [];
|
|
901
923
|
});
|
|
902
|
-
|
|
903
|
-
var t, n,
|
|
924
|
+
a(this, "handleEventData", (e) => c(this, null, function* () {
|
|
925
|
+
var t, n, s, r, o, l, h, u;
|
|
904
926
|
if (e.data instanceof Blob) {
|
|
905
|
-
const
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
}, f = (o = g.result) == null ? void 0 : o.function, S = (l = g.result) == null ? void 0 : l.msgid;
|
|
914
|
-
S ? this.eventBus.emit(S, E) : this.eventBus.emit(f, E), (u = (d = this.socketConfig) == null ? void 0 : d.onMessage) == null || u.call(d, E);
|
|
927
|
+
const g = yield e.data.arrayBuffer(), C = navigator.userAgent.includes("Windows") ? Lt(g) : JSON.parse(new TextDecoder().decode(g)), y = {
|
|
928
|
+
success: (t = C.result) == null ? void 0 : t.success,
|
|
929
|
+
msg: (n = C.result) == null ? void 0 : n.msg,
|
|
930
|
+
errCode: (s = C.result) == null ? void 0 : s.errCode,
|
|
931
|
+
data: C.data,
|
|
932
|
+
type: (r = C.result) == null ? void 0 : r.event
|
|
933
|
+
}, f = (o = C.result) == null ? void 0 : o.function, E = (l = C.result) == null ? void 0 : l.msgid;
|
|
934
|
+
E ? this.eventBus.emit(E, y) : this.eventBus.emit(f, y), (u = (h = this.socketConfig) == null ? void 0 : h.onMessage) == null || u.call(h, y);
|
|
915
935
|
}
|
|
916
936
|
}));
|
|
917
|
-
|
|
937
|
+
a(this, "base64Encode", (e) => {
|
|
918
938
|
const t = new TextEncoder().encode(e);
|
|
919
939
|
return ue.fromByteArray(t);
|
|
920
940
|
});
|
|
921
|
-
|
|
941
|
+
a(this, "base64Decode", (e) => {
|
|
922
942
|
const t = ue.toByteArray(e);
|
|
923
943
|
return new TextDecoder().decode(t);
|
|
924
944
|
});
|
|
925
|
-
|
|
945
|
+
a(this, "changeIsRememberPin", (e) => c(this, null, function* () {
|
|
926
946
|
this.isRememberPin = e;
|
|
927
947
|
}));
|
|
928
|
-
|
|
948
|
+
a(this, "changePinPolicy", (e) => c(this, null, function* () {
|
|
929
949
|
this.pinPolicy = e;
|
|
930
950
|
}));
|
|
931
|
-
|
|
951
|
+
a(this, "checkCertIsLogin", (e) => c(this, null, function* () {
|
|
932
952
|
return yield this.sendMessage("GZCA_IsLogin", e);
|
|
933
953
|
}));
|
|
934
|
-
|
|
954
|
+
a(this, "addUkeyEvents", () => c(this, null, function* () {
|
|
935
955
|
this.sendMessage("GZCA_WaitForDevEvent", {
|
|
936
956
|
Type: He
|
|
937
957
|
}), this.eventBus.on(
|
|
938
958
|
"GZCA_OnDeviceChange",
|
|
939
959
|
(e) => {
|
|
940
|
-
var t, n,
|
|
941
|
-
(
|
|
960
|
+
var t, n, s;
|
|
961
|
+
(s = (t = this.socketConfig) == null ? void 0 : t.onUkeyChange) == null || s.call(t, v(S({}, e), {
|
|
942
962
|
data: (n = e.data) == null ? void 0 : n[0]
|
|
943
963
|
}));
|
|
944
964
|
}
|
|
945
965
|
);
|
|
946
966
|
}));
|
|
947
|
-
|
|
967
|
+
a(this, "ensureCertLogin", (e) => c(this, null, function* () {
|
|
948
968
|
const t = yield this.checkCertIsLogin({
|
|
949
969
|
ContainerName: e.ContainerName
|
|
950
970
|
});
|
|
@@ -955,208 +975,208 @@ class Dt {
|
|
|
955
975
|
PinPolicy: this.pinPolicy
|
|
956
976
|
}));
|
|
957
977
|
}));
|
|
958
|
-
|
|
978
|
+
a(this, "verifyPin", (e) => c(this, null, function* () {
|
|
959
979
|
var t;
|
|
960
|
-
yield this.sendMessage("GZCA_Login", {
|
|
980
|
+
console.log("params2", e), yield this.sendMessage("GZCA_Login", {
|
|
961
981
|
ContainerName: e.ContainerName,
|
|
962
982
|
IsLogin: e.UserPin ? "Y" : "N",
|
|
963
983
|
UserPin: (t = e.UserPin) != null ? t : "123456",
|
|
964
984
|
PinPolicy: this.pinPolicy
|
|
965
985
|
});
|
|
966
986
|
}));
|
|
967
|
-
|
|
968
|
-
const
|
|
987
|
+
a(this, "getCert", (e, t, n) => c(this, null, function* () {
|
|
988
|
+
const s = t != null ? t : yield this.chooseCert(e);
|
|
969
989
|
return this.isRememberPin && n && (yield this.ensureCertLogin({
|
|
970
|
-
ContainerName:
|
|
971
|
-
})),
|
|
990
|
+
ContainerName: s.ContainerName
|
|
991
|
+
})), s;
|
|
972
992
|
}));
|
|
973
|
-
|
|
974
|
-
var
|
|
993
|
+
a(this, "chooseCert", (e) => c(this, null, function* () {
|
|
994
|
+
var s;
|
|
975
995
|
const t = yield this.getCertList(e);
|
|
976
996
|
return t != null && t.length ? (t == null ? void 0 : t.length) === 1 ? t[0] : yield G.open({
|
|
977
997
|
title: "选择证书",
|
|
978
998
|
data: t,
|
|
979
999
|
columns: _t,
|
|
980
|
-
theme: (
|
|
1000
|
+
theme: (s = this.socketConfig) == null ? void 0 : s.theme
|
|
981
1001
|
}) : Promise.reject({
|
|
982
1002
|
errCode: Ue,
|
|
983
1003
|
msg: "暂无证书"
|
|
984
1004
|
});
|
|
985
1005
|
}));
|
|
986
|
-
|
|
1006
|
+
a(this, "getCertList", (e) => c(this, null, function* () {
|
|
987
1007
|
return yield this.sendMessage(
|
|
988
1008
|
"GZCA_GetCertList",
|
|
989
1009
|
e
|
|
990
1010
|
);
|
|
991
1011
|
}));
|
|
992
|
-
|
|
993
|
-
return yield this.sendMessage("GZCA_Pkcs1SignData",
|
|
1012
|
+
a(this, "pkcs1Sign", (e) => c(this, null, function* () {
|
|
1013
|
+
return yield this.sendMessage("GZCA_Pkcs1SignData", S({
|
|
994
1014
|
IsLogin: this.getIsLogin(),
|
|
995
1015
|
PinPolicy: this.pinPolicy
|
|
996
1016
|
}, e != null ? e : {}));
|
|
997
1017
|
}));
|
|
998
|
-
|
|
999
|
-
return yield this.sendMessage("GZCA_Pkcs1SignDataEx",
|
|
1018
|
+
a(this, "pkcs1Base64Sign", (e) => c(this, null, function* () {
|
|
1019
|
+
return yield this.sendMessage("GZCA_Pkcs1SignDataEx", S({
|
|
1000
1020
|
IsLogin: this.getIsLogin(),
|
|
1001
1021
|
PinPolicy: this.pinPolicy
|
|
1002
1022
|
}, e != null ? e : {}));
|
|
1003
1023
|
}));
|
|
1004
|
-
|
|
1005
|
-
return yield this.sendMessage("GZCA_BatchPkcs1SignDataEx",
|
|
1024
|
+
a(this, "batchPkcs1Base64Sign", (e) => c(this, null, function* () {
|
|
1025
|
+
return yield this.sendMessage("GZCA_BatchPkcs1SignDataEx", S({
|
|
1006
1026
|
IsLogin: this.getIsLogin(),
|
|
1007
1027
|
PinPolicy: this.pinPolicy
|
|
1008
1028
|
}, e != null ? e : {}));
|
|
1009
1029
|
}));
|
|
1010
|
-
|
|
1030
|
+
a(this, "pkcs1VerifySignature", (e) => c(this, null, function* () {
|
|
1011
1031
|
return yield this.sendMessage("GZCA_Pkcs1VerifySign", e);
|
|
1012
1032
|
}));
|
|
1013
|
-
|
|
1033
|
+
a(this, "pkcs1Base64VerifySignature", (e) => c(this, null, function* () {
|
|
1014
1034
|
return yield this.sendMessage("GZCA_Pkcs1VerifySignEx", e);
|
|
1015
1035
|
}));
|
|
1016
|
-
|
|
1036
|
+
a(this, "getSealList", (e) => c(this, null, function* () {
|
|
1017
1037
|
return yield this.sendMessage(
|
|
1018
1038
|
"GZCA_EnumSeals",
|
|
1019
|
-
|
|
1039
|
+
S({
|
|
1020
1040
|
IsLogin: this.getIsLogin()
|
|
1021
1041
|
}, e != null ? e : {}),
|
|
1022
|
-
|
|
1042
|
+
L.LEVEL_2
|
|
1023
1043
|
);
|
|
1024
1044
|
}));
|
|
1025
|
-
|
|
1045
|
+
a(this, "writeSeal", (e) => c(this, null, function* () {
|
|
1026
1046
|
return yield this.sendMessage(
|
|
1027
1047
|
"GZCA_WriteSeal",
|
|
1028
|
-
|
|
1048
|
+
S({
|
|
1029
1049
|
IsLogin: this.getIsLogin()
|
|
1030
1050
|
}, e != null ? e : {}),
|
|
1031
|
-
|
|
1051
|
+
L.LEVEL_2
|
|
1032
1052
|
);
|
|
1033
1053
|
}));
|
|
1034
|
-
|
|
1054
|
+
a(this, "deleteSeal", (e) => c(this, null, function* () {
|
|
1035
1055
|
return yield this.sendMessage(
|
|
1036
1056
|
"GZCA_DeleteSeal",
|
|
1037
|
-
|
|
1057
|
+
S({
|
|
1038
1058
|
IsLogin: this.getIsLogin()
|
|
1039
1059
|
}, e != null ? e : {}),
|
|
1040
|
-
|
|
1060
|
+
L.LEVEL_2
|
|
1041
1061
|
);
|
|
1042
1062
|
}));
|
|
1043
|
-
|
|
1063
|
+
a(this, "getSealInfo", (e) => c(this, null, function* () {
|
|
1044
1064
|
return yield this.sendMessage(
|
|
1045
1065
|
"GZCA_ReadSeal",
|
|
1046
|
-
|
|
1066
|
+
S({
|
|
1047
1067
|
IsLogin: this.getIsLogin()
|
|
1048
1068
|
}, e != null ? e : {}),
|
|
1049
|
-
|
|
1069
|
+
L.LEVEL_2
|
|
1050
1070
|
);
|
|
1051
1071
|
}));
|
|
1052
|
-
|
|
1072
|
+
a(this, "getTPSealList", (e) => c(this, null, function* () {
|
|
1053
1073
|
return yield this.sendMessage(
|
|
1054
1074
|
"GZCA_GetSealPicList",
|
|
1055
|
-
|
|
1075
|
+
S({
|
|
1056
1076
|
IsLogin: this.getIsLogin()
|
|
1057
1077
|
}, e != null ? e : {}),
|
|
1058
|
-
|
|
1078
|
+
L.LEVEL_2
|
|
1059
1079
|
);
|
|
1060
1080
|
}));
|
|
1061
|
-
|
|
1081
|
+
a(this, "getTPSealPic", (e) => c(this, null, function* () {
|
|
1062
1082
|
return yield this.sendMessage(
|
|
1063
1083
|
"GZCA_GetSealPicData",
|
|
1064
|
-
|
|
1084
|
+
S({
|
|
1065
1085
|
IsLogin: this.getIsLogin()
|
|
1066
1086
|
}, e != null ? e : {}),
|
|
1067
|
-
|
|
1087
|
+
L.LEVEL_2
|
|
1068
1088
|
);
|
|
1069
1089
|
}));
|
|
1070
|
-
|
|
1090
|
+
a(this, "sm2SignPreprocess1", (e) => c(this, null, function* () {
|
|
1071
1091
|
return yield this.sendMessage("GZCA_PrepareSm2SignStep1", e);
|
|
1072
1092
|
}));
|
|
1073
|
-
|
|
1093
|
+
a(this, "sm2SignPreprocess2", (e) => c(this, null, function* () {
|
|
1074
1094
|
return yield this.sendMessage("GZCA_PrepareSm2SignStep2", e);
|
|
1075
1095
|
}));
|
|
1076
|
-
|
|
1077
|
-
return yield this.sendMessage("GZCA_Pkcs1SignDataForHash",
|
|
1096
|
+
a(this, "pkcs1HashSign", (e) => c(this, null, function* () {
|
|
1097
|
+
return yield this.sendMessage("GZCA_Pkcs1SignDataForHash", S({
|
|
1078
1098
|
IsLogin: this.getIsLogin(),
|
|
1079
1099
|
PinPolicy: this.pinPolicy
|
|
1080
1100
|
}, e != null ? e : {}));
|
|
1081
1101
|
}));
|
|
1082
|
-
|
|
1102
|
+
a(this, "pkcs1HashVerifySignature", (e) => c(this, null, function* () {
|
|
1083
1103
|
return yield this.sendMessage("GZCA_Pkcs1VerifySignForHash", e);
|
|
1084
1104
|
}));
|
|
1085
|
-
|
|
1086
|
-
return yield this.sendMessage("GZCA_Pkcs7SignData",
|
|
1105
|
+
a(this, "pkcs7Sign", (e) => c(this, null, function* () {
|
|
1106
|
+
return yield this.sendMessage("GZCA_Pkcs7SignData", S({
|
|
1087
1107
|
IsLogin: this.getIsLogin(),
|
|
1088
1108
|
IsAuthAttr: "Y",
|
|
1089
1109
|
PinPolicy: this.pinPolicy
|
|
1090
1110
|
}, e != null ? e : {}));
|
|
1091
1111
|
}));
|
|
1092
|
-
|
|
1112
|
+
a(this, "pkcs7VerifySignature", (e) => c(this, null, function* () {
|
|
1093
1113
|
return yield this.sendMessage("GZCA_Pkcs7VerifySign", e);
|
|
1094
1114
|
}));
|
|
1095
|
-
|
|
1115
|
+
a(this, "sm3Hash", (e) => c(this, null, function* () {
|
|
1096
1116
|
return yield this.sendMessage("GZCA_HashData", e);
|
|
1097
1117
|
}));
|
|
1098
|
-
|
|
1118
|
+
a(this, "sm3HexHash", (e) => c(this, null, function* () {
|
|
1099
1119
|
return yield this.sendMessage("GZCA_HashDataEx", e);
|
|
1100
1120
|
}));
|
|
1101
|
-
|
|
1121
|
+
a(this, "sm3FileHash", (e) => c(this, null, function* () {
|
|
1102
1122
|
return yield this.sendMessage("GZCA_HashFile", e);
|
|
1103
1123
|
}));
|
|
1104
|
-
|
|
1124
|
+
a(this, "sm3HashEncryption", (e) => c(this, null, function* () {
|
|
1105
1125
|
return yield this.sendMessage("GZCA_HMac", e);
|
|
1106
1126
|
}));
|
|
1107
|
-
|
|
1127
|
+
a(this, "pkcs7Encryption", (e) => c(this, null, function* () {
|
|
1108
1128
|
return yield this.sendMessage("GZCA_Pkcs7EncryptData", e);
|
|
1109
1129
|
}));
|
|
1110
|
-
|
|
1111
|
-
return yield this.sendMessage("GZCA_Pkcs7DecryptData",
|
|
1130
|
+
a(this, "pkcs7Decryption", (e) => c(this, null, function* () {
|
|
1131
|
+
return yield this.sendMessage("GZCA_Pkcs7DecryptData", S({
|
|
1112
1132
|
IsLogin: this.getIsLogin()
|
|
1113
1133
|
}, e != null ? e : {}));
|
|
1114
1134
|
}));
|
|
1115
|
-
|
|
1135
|
+
a(this, "pkcs7FileEncryption", (e) => c(this, null, function* () {
|
|
1116
1136
|
return yield this.sendMessage("GZCA_EnvelopeSealFileEx_qyzc", e);
|
|
1117
1137
|
}));
|
|
1118
|
-
|
|
1119
|
-
return yield this.sendMessage("GZCA_EnvelopeOpenFileEx_qyzc",
|
|
1138
|
+
a(this, "pkcs7FileDecryption", (e) => c(this, null, function* () {
|
|
1139
|
+
return yield this.sendMessage("GZCA_EnvelopeOpenFileEx_qyzc", S({
|
|
1120
1140
|
IsLogin: this.getIsLogin()
|
|
1121
1141
|
}, e != null ? e : {}));
|
|
1122
1142
|
}));
|
|
1123
|
-
|
|
1143
|
+
a(this, "asymmetricEncryption", (e) => c(this, null, function* () {
|
|
1124
1144
|
return yield this.sendMessage("GZCA_AsymEncryptData", e);
|
|
1125
1145
|
}));
|
|
1126
|
-
|
|
1127
|
-
return yield this.sendMessage("GZCA_AsymDecryptData",
|
|
1146
|
+
a(this, "asymmetricDecryption", (e) => c(this, null, function* () {
|
|
1147
|
+
return yield this.sendMessage("GZCA_AsymDecryptData", S({
|
|
1128
1148
|
IsLogin: this.getIsLogin()
|
|
1129
1149
|
}, e != null ? e : {}));
|
|
1130
1150
|
}));
|
|
1131
|
-
|
|
1151
|
+
a(this, "sm4Encryption", (e) => c(this, null, function* () {
|
|
1132
1152
|
return yield this.sendMessage("GZCA_EncryptDataEx", e);
|
|
1133
1153
|
}));
|
|
1134
|
-
|
|
1154
|
+
a(this, "sm4Decryption", (e) => c(this, null, function* () {
|
|
1135
1155
|
return yield this.sendMessage("GZCA_DecryptDataEx", e);
|
|
1136
1156
|
}));
|
|
1137
|
-
|
|
1157
|
+
a(this, "getCertInfo", (e) => c(this, null, function* () {
|
|
1138
1158
|
return yield this.sendMessage("GZCA_GetCertInfo", e);
|
|
1139
1159
|
}));
|
|
1140
|
-
|
|
1160
|
+
a(this, "getCertInfoByOid", (e) => c(this, null, function* () {
|
|
1141
1161
|
return yield this.sendMessage("GZCA_GetCertInfoByOid", e);
|
|
1142
1162
|
}));
|
|
1143
|
-
|
|
1163
|
+
a(this, "getSealVendor", (e) => c(this, null, function* () {
|
|
1144
1164
|
return yield this.sendMessage(
|
|
1145
1165
|
"GZCA_GetSealIssuer",
|
|
1146
1166
|
e,
|
|
1147
|
-
|
|
1167
|
+
L.LEVEL_2
|
|
1148
1168
|
);
|
|
1149
1169
|
}));
|
|
1150
|
-
|
|
1170
|
+
a(this, "deleteAllSealByVendor", (e) => c(this, null, function* () {
|
|
1151
1171
|
return yield this.sendMessage(
|
|
1152
1172
|
"GZCA_ClearSeal",
|
|
1153
|
-
|
|
1173
|
+
S({
|
|
1154
1174
|
IsLogin: this.getIsLogin()
|
|
1155
1175
|
}, e != null ? e : {}),
|
|
1156
|
-
|
|
1176
|
+
L.LEVEL_2
|
|
1157
1177
|
);
|
|
1158
1178
|
}));
|
|
1159
|
-
|
|
1179
|
+
a(this, "applyCert", (e) => c(this, null, function* () {
|
|
1160
1180
|
return yield this.sendMessage(
|
|
1161
1181
|
"GZCA_ApplyCert",
|
|
1162
1182
|
{
|
|
@@ -1166,47 +1186,47 @@ class Dt {
|
|
|
1166
1186
|
type: e.type,
|
|
1167
1187
|
url: e.url
|
|
1168
1188
|
},
|
|
1169
|
-
|
|
1189
|
+
L.LEVEL_3
|
|
1170
1190
|
);
|
|
1171
1191
|
}));
|
|
1172
|
-
|
|
1192
|
+
a(this, "resetPin", (e) => c(this, null, function* () {
|
|
1173
1193
|
return yield this.sendMessage(
|
|
1174
1194
|
"GZCA_UnblockUserPin",
|
|
1175
|
-
|
|
1176
|
-
|
|
1195
|
+
S({}, e != null ? e : {}),
|
|
1196
|
+
L.LEVEL_3
|
|
1177
1197
|
);
|
|
1178
1198
|
}));
|
|
1179
|
-
|
|
1199
|
+
a(this, "getUKeyList", () => c(this, null, function* () {
|
|
1180
1200
|
return yield this.sendMessage(
|
|
1181
1201
|
"GetUKeyList",
|
|
1182
1202
|
void 0,
|
|
1183
|
-
|
|
1203
|
+
L.LEVEL_3
|
|
1184
1204
|
);
|
|
1185
1205
|
}));
|
|
1186
|
-
|
|
1206
|
+
a(this, "getUKeyInfo", (e) => c(this, null, function* () {
|
|
1187
1207
|
return yield this.sendMessage(
|
|
1188
1208
|
"GetUKeyID",
|
|
1189
1209
|
e != null ? e : {},
|
|
1190
|
-
|
|
1210
|
+
L.LEVEL_3
|
|
1191
1211
|
);
|
|
1192
1212
|
}));
|
|
1193
|
-
var t, n,
|
|
1194
|
-
this.socketConfig = e, this.initSocket(e), this.isRememberPin = (t = e.isRememberPin) != null ? t : !1, this.scene = (n = e.scene) != null ? n : Ze.OPEN, this.pinPolicy = (
|
|
1213
|
+
var t, n, s;
|
|
1214
|
+
this.socketConfig = e, this.initSocket(e), this.isRememberPin = (t = e.isRememberPin) != null ? t : !1, this.scene = (n = e.scene) != null ? n : Ze.OPEN, this.pinPolicy = (s = e.pinPolicy) != null ? s : ke.MIN;
|
|
1195
1215
|
}
|
|
1196
1216
|
initSocket(e) {
|
|
1197
1217
|
this.isConnecting = !0;
|
|
1198
1218
|
const t = new WebSocket(e.url);
|
|
1199
1219
|
t.onerror = (n) => {
|
|
1200
|
-
var
|
|
1201
|
-
this.isConnecting = !1, (
|
|
1220
|
+
var s;
|
|
1221
|
+
this.isConnecting = !1, (s = e.onError) == null || s.call(e, n), this.flushMsgQueue();
|
|
1202
1222
|
}, t.onopen = (n) => {
|
|
1203
|
-
var
|
|
1204
|
-
this.isConnecting = !1, (
|
|
1223
|
+
var s;
|
|
1224
|
+
this.isConnecting = !1, (s = e.onOpen) == null || s.call(e, n), e.onUkeyChange && this.addUkeyEvents(), this.flushMsgQueue();
|
|
1205
1225
|
}, t.onmessage = (n) => {
|
|
1206
1226
|
this.handleEventData(n);
|
|
1207
1227
|
}, t.onclose = (n) => {
|
|
1208
|
-
var
|
|
1209
|
-
this.isConnecting = !1, (
|
|
1228
|
+
var s;
|
|
1229
|
+
this.isConnecting = !1, (s = e.onClose) == null || s.call(e, n);
|
|
1210
1230
|
}, this.socketInstance = t;
|
|
1211
1231
|
}
|
|
1212
1232
|
getIsLogin() {
|
|
@@ -1215,419 +1235,415 @@ class Dt {
|
|
|
1215
1235
|
}
|
|
1216
1236
|
const $ = class $ {
|
|
1217
1237
|
constructor(e) {
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
this.gwsConfig = e != null ? e : {}, this.coreInstance = new
|
|
1222
|
-
url:
|
|
1238
|
+
a(this, "coreInstance", null);
|
|
1239
|
+
a(this, "gwsConfig", {});
|
|
1240
|
+
a(this, "createGwsCore", (e) => {
|
|
1241
|
+
this.gwsConfig = e != null ? e : {}, this.coreInstance = new At(v(S({}, e != null ? e : {}), {
|
|
1242
|
+
url: Me
|
|
1223
1243
|
}));
|
|
1224
1244
|
});
|
|
1225
|
-
|
|
1245
|
+
a(this, "appendCertBase64", (e, t = !0) => c(this, null, function* () {
|
|
1226
1246
|
if (e.CertB64) return e;
|
|
1227
1247
|
const n = t ? yield this.getSignatureCert() : yield this.getEncryptionCert();
|
|
1228
|
-
return v(
|
|
1248
|
+
return v(S({}, e != null ? e : {}), { CertB64: n == null ? void 0 : n.CertB64 });
|
|
1229
1249
|
}));
|
|
1230
|
-
|
|
1250
|
+
a(this, "destroy", () => {
|
|
1231
1251
|
var e;
|
|
1232
1252
|
(e = this.coreInstance) == null || e.destroy(), this.coreInstance = null;
|
|
1233
1253
|
});
|
|
1234
|
-
|
|
1254
|
+
a(this, "restart", (e) => {
|
|
1235
1255
|
this.coreInstance && this.destroy(), this.gwsConfig = e != null ? e : this.gwsConfig, this.createGwsCore(e);
|
|
1236
1256
|
});
|
|
1237
|
-
|
|
1257
|
+
a(this, "getSocketReadyState", () => {
|
|
1238
1258
|
var e;
|
|
1239
1259
|
return (e = this.coreInstance) == null ? void 0 : e.getSocketReadyState();
|
|
1240
1260
|
});
|
|
1241
|
-
|
|
1242
|
-
var
|
|
1261
|
+
a(this, "verifyPin", (e, t) => c(this, null, function* () {
|
|
1262
|
+
var s, r;
|
|
1243
1263
|
const n = yield this.getSignatureCert(t);
|
|
1244
|
-
return (
|
|
1245
|
-
ContainerName: (
|
|
1264
|
+
return (r = this.coreInstance) == null ? void 0 : r.verifyPin({
|
|
1265
|
+
ContainerName: (s = n == null ? void 0 : n.ContainerName) != null ? s : "",
|
|
1246
1266
|
UserPin: e == null ? void 0 : e.UserPin
|
|
1247
1267
|
});
|
|
1248
1268
|
}));
|
|
1249
|
-
|
|
1250
|
-
var
|
|
1269
|
+
a(this, "ensureCertLogin", (e) => c(this, null, function* () {
|
|
1270
|
+
var s, r;
|
|
1251
1271
|
const t = yield this.getSignatureCert(e);
|
|
1252
|
-
return yield (
|
|
1253
|
-
ContainerName: (
|
|
1272
|
+
return yield (r = this.coreInstance) == null ? void 0 : r.ensureCertLogin({
|
|
1273
|
+
ContainerName: (s = t == null ? void 0 : t.ContainerName) != null ? s : ""
|
|
1254
1274
|
});
|
|
1255
1275
|
}));
|
|
1256
|
-
|
|
1257
|
-
var
|
|
1258
|
-
return yield (
|
|
1259
|
-
{ CertType:
|
|
1276
|
+
a(this, "getSignatureCert", (e, t = !0) => c(this, null, function* () {
|
|
1277
|
+
var s;
|
|
1278
|
+
return yield (s = this.coreInstance) == null ? void 0 : s.getCert(
|
|
1279
|
+
{ CertType: oe },
|
|
1260
1280
|
e,
|
|
1261
1281
|
t
|
|
1262
1282
|
);
|
|
1263
1283
|
}));
|
|
1264
|
-
|
|
1284
|
+
a(this, "getSignatureCertList", () => c(this, null, function* () {
|
|
1265
1285
|
var t;
|
|
1266
1286
|
return yield (t = this.coreInstance) == null ? void 0 : t.getCertList({
|
|
1267
|
-
CertType:
|
|
1287
|
+
CertType: oe
|
|
1268
1288
|
});
|
|
1269
1289
|
}));
|
|
1270
|
-
|
|
1271
|
-
var
|
|
1272
|
-
return yield (
|
|
1273
|
-
{ CertType:
|
|
1290
|
+
a(this, "getEncryptionCert", (e, t = !0) => c(this, null, function* () {
|
|
1291
|
+
var s;
|
|
1292
|
+
return yield (s = this.coreInstance) == null ? void 0 : s.getCert(
|
|
1293
|
+
{ CertType: ae },
|
|
1274
1294
|
e,
|
|
1275
1295
|
t
|
|
1276
1296
|
);
|
|
1277
1297
|
}));
|
|
1278
|
-
|
|
1298
|
+
a(this, "getEncryptionCertList", () => c(this, null, function* () {
|
|
1279
1299
|
var t;
|
|
1280
1300
|
return yield (t = this.coreInstance) == null ? void 0 : t.getCertList({
|
|
1281
|
-
CertType:
|
|
1301
|
+
CertType: ae
|
|
1282
1302
|
});
|
|
1283
1303
|
}));
|
|
1284
|
-
|
|
1304
|
+
a(this, "base64Encode", (e) => {
|
|
1285
1305
|
var t;
|
|
1286
1306
|
return (t = this.coreInstance) == null ? void 0 : t.base64Encode(e.Data);
|
|
1287
1307
|
});
|
|
1288
|
-
|
|
1308
|
+
a(this, "base64Decode", (e) => {
|
|
1289
1309
|
var t;
|
|
1290
1310
|
return (t = this.coreInstance) == null ? void 0 : t.base64Decode(e.DataB64);
|
|
1291
1311
|
});
|
|
1292
|
-
|
|
1312
|
+
a(this, "changeIsRememberPin", (e) => {
|
|
1293
1313
|
var t;
|
|
1294
1314
|
(t = this.coreInstance) == null || t.changeIsRememberPin(e);
|
|
1295
1315
|
});
|
|
1296
|
-
|
|
1316
|
+
a(this, "changePinPolicy", (e) => {
|
|
1297
1317
|
var t;
|
|
1298
1318
|
(t = this.coreInstance) == null || t.changePinPolicy(e);
|
|
1299
1319
|
});
|
|
1300
|
-
|
|
1301
|
-
var
|
|
1302
|
-
const n = yield this.getSignatureCert(t),
|
|
1303
|
-
ContainerName: (
|
|
1320
|
+
a(this, "pkcs1Sign", (e, t) => c(this, null, function* () {
|
|
1321
|
+
var r, o, l;
|
|
1322
|
+
const n = yield this.getSignatureCert(t), s = yield (o = this.coreInstance) == null ? void 0 : o.pkcs1Sign(v(S({}, e != null ? e : {}), {
|
|
1323
|
+
ContainerName: (r = n == null ? void 0 : n.ContainerName) != null ? r : ""
|
|
1304
1324
|
}));
|
|
1305
|
-
return (l =
|
|
1325
|
+
return (l = s == null ? void 0 : s[0]) == null ? void 0 : l.SignData;
|
|
1306
1326
|
}));
|
|
1307
|
-
|
|
1308
|
-
var
|
|
1309
|
-
const t = yield this.appendCertBase64(e), n = yield (
|
|
1327
|
+
a(this, "pkcs1VerifySignature", (e) => c(this, null, function* () {
|
|
1328
|
+
var s;
|
|
1329
|
+
const t = yield this.appendCertBase64(e), n = yield (s = this.coreInstance) == null ? void 0 : s.pkcs1VerifySignature(t);
|
|
1310
1330
|
return Array.isArray(n);
|
|
1311
1331
|
}));
|
|
1312
|
-
|
|
1313
|
-
var o, l,
|
|
1314
|
-
const n = yield this.getSignatureCert(t),
|
|
1315
|
-
ContainerName: (
|
|
1316
|
-
DataB64:
|
|
1332
|
+
a(this, "pkcs1Base64Sign", (e, t) => c(this, null, function* () {
|
|
1333
|
+
var o, l, h, u, g;
|
|
1334
|
+
const n = yield this.getSignatureCert(t), s = (l = e.DataB64) != null ? l : this.base64Encode({ Data: (o = e.Data) != null ? o : "" }), r = yield (u = this.coreInstance) == null ? void 0 : u.pkcs1Base64Sign(v(S({}, e != null ? e : {}), {
|
|
1335
|
+
ContainerName: (h = n == null ? void 0 : n.ContainerName) != null ? h : "",
|
|
1336
|
+
DataB64: s
|
|
1317
1337
|
}));
|
|
1318
|
-
return (
|
|
1338
|
+
return (g = r == null ? void 0 : r[0]) == null ? void 0 : g.SignData;
|
|
1319
1339
|
}));
|
|
1320
|
-
|
|
1321
|
-
var
|
|
1322
|
-
const n = "|",
|
|
1340
|
+
a(this, "batchPkcs1Base64Sign", (e, t) => c(this, null, function* () {
|
|
1341
|
+
var g, d, C, y, f, E;
|
|
1342
|
+
const n = "|", s = (d = e.DataB64) != null ? d : (g = e.Data) == null ? void 0 : g.map((w) => this.base64Encode({ Data: w })), r = yield this.getSignatureCert(t);
|
|
1323
1343
|
let o = "";
|
|
1324
|
-
o = Array.isArray(
|
|
1344
|
+
o = Array.isArray(s) ? s == null ? void 0 : s.map((w, m) => `${m}:${w}`).join(n) : "";
|
|
1325
1345
|
const l = yield (y = this.coreInstance) == null ? void 0 : y.batchPkcs1Base64Sign({
|
|
1326
|
-
ContainerName: (
|
|
1346
|
+
ContainerName: (C = r == null ? void 0 : r.ContainerName) != null ? C : "",
|
|
1327
1347
|
DataB64: o
|
|
1328
|
-
}),
|
|
1329
|
-
return
|
|
1330
|
-
const
|
|
1331
|
-
u[
|
|
1348
|
+
}), h = (E = (f = l == null ? void 0 : l[0]) == null ? void 0 : f.SignData) == null ? void 0 : E.split(n), u = [];
|
|
1349
|
+
return h.forEach((w) => {
|
|
1350
|
+
const m = w.split(":"), I = Number(m[0]), _ = m[1];
|
|
1351
|
+
u[I] = _;
|
|
1332
1352
|
}), u;
|
|
1333
1353
|
}));
|
|
1334
|
-
|
|
1335
|
-
var
|
|
1336
|
-
const t = (o = e.DataB64) != null ? o : this.base64Encode({ Data: (
|
|
1354
|
+
a(this, "pkcs1Base64VerifySignature", (e) => c(this, null, function* () {
|
|
1355
|
+
var r, o, l;
|
|
1356
|
+
const t = (o = e.DataB64) != null ? o : this.base64Encode({ Data: (r = e.Data) != null ? r : "" }), n = yield this.appendCertBase64(e);
|
|
1337
1357
|
return !!(yield (l = this.coreInstance) == null ? void 0 : l.pkcs1Base64VerifySignature({
|
|
1338
1358
|
CertB64: n.CertB64,
|
|
1339
1359
|
DataB64: t,
|
|
1340
1360
|
SignData: n.SignData
|
|
1341
1361
|
}));
|
|
1342
1362
|
}));
|
|
1343
|
-
|
|
1344
|
-
var
|
|
1363
|
+
a(this, "writeSeal", (e, t) => c(this, null, function* () {
|
|
1364
|
+
var r, o;
|
|
1345
1365
|
const n = yield this.getSignatureCert(t);
|
|
1346
|
-
return !!(yield (o = this.coreInstance) == null ? void 0 : o.writeSeal(v(
|
|
1347
|
-
ContainerName: (
|
|
1366
|
+
return !!(yield (o = this.coreInstance) == null ? void 0 : o.writeSeal(v(S({}, e != null ? e : {}), {
|
|
1367
|
+
ContainerName: (r = n == null ? void 0 : n.ContainerName) != null ? r : ""
|
|
1348
1368
|
})));
|
|
1349
1369
|
}));
|
|
1350
|
-
|
|
1351
|
-
var
|
|
1352
|
-
const t = yield this.getSealList(e);
|
|
1353
|
-
if (!(
|
|
1370
|
+
a(this, "deleteSeal", (e, t) => c(this, null, function* () {
|
|
1371
|
+
var h, u, g;
|
|
1372
|
+
const n = yield this.getSignatureCert(t), s = yield this.getSealList(e, n);
|
|
1373
|
+
if (!(s != null && s.length))
|
|
1354
1374
|
return Promise.reject({
|
|
1355
1375
|
errCode: q,
|
|
1356
1376
|
msg: "暂无印章"
|
|
1357
1377
|
});
|
|
1358
|
-
const
|
|
1378
|
+
const r = yield G.open({
|
|
1359
1379
|
title: "删除印章",
|
|
1360
|
-
data:
|
|
1361
|
-
columns:
|
|
1380
|
+
data: s,
|
|
1381
|
+
columns: me,
|
|
1362
1382
|
okText: "删除"
|
|
1363
|
-
}),
|
|
1364
|
-
return !!(yield (
|
|
1365
|
-
ContainerName: (u =
|
|
1366
|
-
SealId:
|
|
1367
|
-
}));
|
|
1368
|
-
}));
|
|
1369
|
-
|
|
1370
|
-
var
|
|
1383
|
+
}), o = (h = r == null ? void 0 : r.SealId) != null ? h : "";
|
|
1384
|
+
return !!(yield (g = this.coreInstance) == null ? void 0 : g.deleteSeal(S({
|
|
1385
|
+
ContainerName: (u = n == null ? void 0 : n.ContainerName) != null ? u : "",
|
|
1386
|
+
SealId: o
|
|
1387
|
+
}, e != null ? e : {})));
|
|
1388
|
+
}));
|
|
1389
|
+
a(this, "deleteSealById", (e, t) => c(this, null, function* () {
|
|
1390
|
+
var r, o;
|
|
1371
1391
|
const n = yield this.getSignatureCert(t);
|
|
1372
|
-
return !!(yield (o = this.coreInstance) == null ? void 0 : o.deleteSeal(v(
|
|
1373
|
-
ContainerName: (
|
|
1392
|
+
return !!(yield (o = this.coreInstance) == null ? void 0 : o.deleteSeal(v(S({}, e != null ? e : {}), {
|
|
1393
|
+
ContainerName: (r = n == null ? void 0 : n.ContainerName) != null ? r : ""
|
|
1374
1394
|
})));
|
|
1375
1395
|
}));
|
|
1376
|
-
|
|
1377
|
-
var
|
|
1378
|
-
const
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
});
|
|
1382
|
-
return {
|
|
1383
|
-
cert: t,
|
|
1384
|
-
data: n
|
|
1385
|
-
};
|
|
1396
|
+
a(this, "getSealList", (e, t) => c(this, null, function* () {
|
|
1397
|
+
var r, o;
|
|
1398
|
+
const n = yield this.getSignatureCert(t);
|
|
1399
|
+
return yield (o = this.coreInstance) == null ? void 0 : o.getSealList(S({
|
|
1400
|
+
ContainerName: (r = n == null ? void 0 : n.ContainerName) != null ? r : ""
|
|
1401
|
+
}, e != null ? e : {}));
|
|
1386
1402
|
}));
|
|
1387
|
-
|
|
1388
|
-
var
|
|
1389
|
-
const t = yield this.getSealList(e);
|
|
1390
|
-
if (!(
|
|
1403
|
+
a(this, "getSealInfo", (e, t) => c(this, null, function* () {
|
|
1404
|
+
var l, h, u, g;
|
|
1405
|
+
const n = yield this.getSignatureCert(t), s = yield this.getSealList(e, n);
|
|
1406
|
+
if (!(s != null && s.length))
|
|
1391
1407
|
return Promise.reject({
|
|
1392
1408
|
errCode: q,
|
|
1393
1409
|
msg: "暂无印章"
|
|
1394
1410
|
});
|
|
1395
|
-
const
|
|
1411
|
+
const r = (s == null ? void 0 : s.length) > 1 ? yield G.open({
|
|
1396
1412
|
title: "选择印章",
|
|
1397
|
-
data:
|
|
1398
|
-
columns:
|
|
1413
|
+
data: s,
|
|
1414
|
+
columns: me,
|
|
1399
1415
|
theme: (l = this.gwsConfig) == null ? void 0 : l.theme
|
|
1400
|
-
}) :
|
|
1401
|
-
ContainerName: (
|
|
1402
|
-
SealId: (
|
|
1416
|
+
}) : s == null ? void 0 : s[0], o = yield (g = this.coreInstance) == null ? void 0 : g.getSealInfo({
|
|
1417
|
+
ContainerName: (h = n == null ? void 0 : n.ContainerName) != null ? h : "",
|
|
1418
|
+
SealId: (u = r == null ? void 0 : r.SealId) != null ? u : ""
|
|
1403
1419
|
});
|
|
1404
|
-
return
|
|
1420
|
+
return o == null ? void 0 : o[0];
|
|
1405
1421
|
}));
|
|
1406
|
-
|
|
1407
|
-
var
|
|
1422
|
+
a(this, "getTPSealList", (e, t) => c(this, null, function* () {
|
|
1423
|
+
var r, o;
|
|
1408
1424
|
const n = yield this.getSignatureCert(t);
|
|
1409
|
-
return yield (o = this.coreInstance) == null ? void 0 : o.getTPSealList(
|
|
1410
|
-
ContainerName: (
|
|
1425
|
+
return yield (o = this.coreInstance) == null ? void 0 : o.getTPSealList(S({
|
|
1426
|
+
ContainerName: (r = n == null ? void 0 : n.ContainerName) != null ? r : ""
|
|
1411
1427
|
}, e != null ? e : {}));
|
|
1412
1428
|
}));
|
|
1413
|
-
|
|
1414
|
-
var
|
|
1429
|
+
a(this, "getTPSeal", (e, t) => c(this, null, function* () {
|
|
1430
|
+
var r;
|
|
1415
1431
|
const n = yield this.getTPSealList(e, t);
|
|
1416
1432
|
return n != null && n.length ? (n == null ? void 0 : n.length) === 1 ? n == null ? void 0 : n[0] : yield G.open({
|
|
1417
1433
|
title: "选择印章",
|
|
1418
1434
|
data: n,
|
|
1419
|
-
columns:
|
|
1420
|
-
theme: (
|
|
1435
|
+
columns: Dt,
|
|
1436
|
+
theme: (r = this.gwsConfig) == null ? void 0 : r.theme
|
|
1421
1437
|
}) : Promise.reject({
|
|
1422
1438
|
errCode: q,
|
|
1423
1439
|
msg: "暂无印章"
|
|
1424
1440
|
});
|
|
1425
1441
|
}));
|
|
1426
|
-
|
|
1427
|
-
var l,
|
|
1428
|
-
const
|
|
1429
|
-
ContainerName: (l =
|
|
1430
|
-
},
|
|
1431
|
-
FileSize: String(
|
|
1442
|
+
a(this, "getTPSealPic", (e, t, n) => c(this, null, function* () {
|
|
1443
|
+
var l, h;
|
|
1444
|
+
const s = yield this.getSignatureCert(t), r = n || (yield this.getTPSeal(e, t)), o = yield (h = this.coreInstance) == null ? void 0 : h.getTPSealPic(v(S(S({
|
|
1445
|
+
ContainerName: (l = s == null ? void 0 : s.ContainerName) != null ? l : ""
|
|
1446
|
+
}, r != null ? r : {}), e != null ? e : {}), {
|
|
1447
|
+
FileSize: String(r == null ? void 0 : r.FileSize)
|
|
1432
1448
|
}));
|
|
1433
1449
|
return o == null ? void 0 : o[0];
|
|
1434
1450
|
}));
|
|
1435
|
-
|
|
1436
|
-
var
|
|
1437
|
-
const t = yield this.appendCertBase64(e), n = yield (
|
|
1438
|
-
return (
|
|
1451
|
+
a(this, "sm2SignPreprocess1", (e) => c(this, null, function* () {
|
|
1452
|
+
var s, r;
|
|
1453
|
+
const t = yield this.appendCertBase64(e), n = yield (s = this.coreInstance) == null ? void 0 : s.sm2SignPreprocess1(t);
|
|
1454
|
+
return (r = n == null ? void 0 : n[0]) == null ? void 0 : r.Z;
|
|
1439
1455
|
}));
|
|
1440
|
-
|
|
1441
|
-
var
|
|
1442
|
-
const t = this.base64Encode({ Data: (
|
|
1456
|
+
a(this, "sm2SignPreprocess2", (e) => c(this, null, function* () {
|
|
1457
|
+
var r, o;
|
|
1458
|
+
const t = this.base64Encode({ Data: (r = e.Data) != null ? r : "" }), n = yield this.appendCertBase64(e), s = yield (o = this.coreInstance) == null ? void 0 : o.sm2SignPreprocess2({
|
|
1443
1459
|
CertB64: n.CertB64,
|
|
1444
1460
|
DataB64: t
|
|
1445
1461
|
});
|
|
1446
|
-
return
|
|
1462
|
+
return s == null ? void 0 : s[0].H;
|
|
1447
1463
|
}));
|
|
1448
|
-
|
|
1449
|
-
var
|
|
1450
|
-
const n = yield this.getSignatureCert(t),
|
|
1451
|
-
ContainerName: (
|
|
1464
|
+
a(this, "pkcs1HashSign", (e, t) => c(this, null, function* () {
|
|
1465
|
+
var r, o, l, h;
|
|
1466
|
+
const n = yield this.getSignatureCert(t), s = yield (l = this.coreInstance) == null ? void 0 : l.pkcs1HashSign({
|
|
1467
|
+
ContainerName: (r = n == null ? void 0 : n.ContainerName) != null ? r : "",
|
|
1452
1468
|
DataB64: e.DataB64,
|
|
1453
1469
|
HashAlg: (o = e.HashAlg) != null ? o : "sm3"
|
|
1454
1470
|
});
|
|
1455
|
-
return (
|
|
1471
|
+
return (h = s == null ? void 0 : s[0]) == null ? void 0 : h.SignData;
|
|
1456
1472
|
}));
|
|
1457
|
-
|
|
1458
|
-
var
|
|
1473
|
+
a(this, "pkcs1HashVerifySignature", (e) => c(this, null, function* () {
|
|
1474
|
+
var s, r;
|
|
1459
1475
|
const t = yield this.appendCertBase64(e);
|
|
1460
|
-
return !!(yield (
|
|
1461
|
-
HashAlg: (
|
|
1476
|
+
return !!(yield (r = this.coreInstance) == null ? void 0 : r.pkcs1HashVerifySignature(v(S({}, t), {
|
|
1477
|
+
HashAlg: (s = t.HashAlg) != null ? s : "sm3"
|
|
1462
1478
|
})));
|
|
1463
1479
|
}));
|
|
1464
|
-
|
|
1465
|
-
var o, l,
|
|
1466
|
-
const n = (l = e.DataB64) != null ? l : this.base64Encode({ Data: (o = e.Data) != null ? o : "" }),
|
|
1467
|
-
ContainerName: (
|
|
1480
|
+
a(this, "pkcs7Sign", (e, t) => c(this, null, function* () {
|
|
1481
|
+
var o, l, h, u, g;
|
|
1482
|
+
const n = (l = e.DataB64) != null ? l : this.base64Encode({ Data: (o = e.Data) != null ? o : "" }), s = yield this.getSignatureCert(t), r = yield (u = this.coreInstance) == null ? void 0 : u.pkcs7Sign(v(S({}, e != null ? e : {}), {
|
|
1483
|
+
ContainerName: (h = s == null ? void 0 : s.ContainerName) != null ? h : "",
|
|
1468
1484
|
DataB64: n
|
|
1469
1485
|
}));
|
|
1470
|
-
return (
|
|
1486
|
+
return (g = r == null ? void 0 : r[0]) == null ? void 0 : g.SignData;
|
|
1471
1487
|
}));
|
|
1472
|
-
|
|
1473
|
-
var
|
|
1474
|
-
const t = (
|
|
1488
|
+
a(this, "pkcs7VerifySignature", (e) => c(this, null, function* () {
|
|
1489
|
+
var s, r, o;
|
|
1490
|
+
const t = (r = e.DataB64) != null ? r : this.base64Encode({ Data: (s = e.Data) != null ? s : "" });
|
|
1475
1491
|
return !!(yield (o = this.coreInstance) == null ? void 0 : o.pkcs7VerifySignature({
|
|
1476
1492
|
DataB64: t,
|
|
1477
1493
|
SignData: e.SignData
|
|
1478
1494
|
}));
|
|
1479
1495
|
}));
|
|
1480
|
-
|
|
1481
|
-
var n,
|
|
1496
|
+
a(this, "sm3Hash", (e) => c(this, null, function* () {
|
|
1497
|
+
var n, s;
|
|
1482
1498
|
const t = yield (n = this.coreInstance) == null ? void 0 : n.sm3Hash(e);
|
|
1483
|
-
return (
|
|
1499
|
+
return (s = t == null ? void 0 : t[0]) == null ? void 0 : s.HashB64;
|
|
1484
1500
|
}));
|
|
1485
|
-
|
|
1486
|
-
var n,
|
|
1501
|
+
a(this, "sm3HexHash", (e) => c(this, null, function* () {
|
|
1502
|
+
var n, s;
|
|
1487
1503
|
const t = yield (n = this.coreInstance) == null ? void 0 : n.sm3HexHash(e);
|
|
1488
|
-
return (
|
|
1504
|
+
return (s = t == null ? void 0 : t[0]) == null ? void 0 : s.HashB64;
|
|
1489
1505
|
}));
|
|
1490
|
-
|
|
1491
|
-
var n,
|
|
1506
|
+
a(this, "sm3FileHash", (e) => c(this, null, function* () {
|
|
1507
|
+
var n, s;
|
|
1492
1508
|
const t = yield (n = this.coreInstance) == null ? void 0 : n.sm3FileHash(e);
|
|
1493
|
-
return (
|
|
1509
|
+
return (s = t == null ? void 0 : t[0]) == null ? void 0 : s.HashB64;
|
|
1494
1510
|
}));
|
|
1495
|
-
|
|
1496
|
-
var
|
|
1497
|
-
const t = (o = e.DataB64) != null ? o : this.base64Encode({ Data: (
|
|
1511
|
+
a(this, "sm3HashEncryption", (e) => c(this, null, function* () {
|
|
1512
|
+
var r, o, l, h, u, g;
|
|
1513
|
+
const t = (o = e.DataB64) != null ? o : this.base64Encode({ Data: (r = e.Data) != null ? r : "" }), n = (h = e.KeyB64) != null ? h : this.base64Encode({ Data: (l = e.Key) != null ? l : "" }), s = yield (u = this.coreInstance) == null ? void 0 : u.sm3HashEncryption({
|
|
1498
1514
|
dataB64: t,
|
|
1499
1515
|
keyB64: n,
|
|
1500
1516
|
alg: "sm3"
|
|
1501
1517
|
});
|
|
1502
|
-
return (
|
|
1518
|
+
return (g = s == null ? void 0 : s[0]) == null ? void 0 : g.DataB64;
|
|
1503
1519
|
}));
|
|
1504
|
-
|
|
1505
|
-
var
|
|
1520
|
+
a(this, "pkcs7Encryption", (e) => c(this, null, function* () {
|
|
1521
|
+
var s, r, o, l;
|
|
1506
1522
|
if (!e.CertB64List) {
|
|
1507
|
-
const
|
|
1508
|
-
e.CertB64List =
|
|
1523
|
+
const h = yield this.getEncryptionCert();
|
|
1524
|
+
e.CertB64List = h == null ? void 0 : h.CertB64;
|
|
1509
1525
|
}
|
|
1510
|
-
const t = (
|
|
1526
|
+
const t = (r = e.DataB64) != null ? r : this.base64Encode({ Data: (s = e.Data) != null ? s : "" }), n = yield (o = this.coreInstance) == null ? void 0 : o.pkcs7Encryption({
|
|
1511
1527
|
DataB64: t,
|
|
1512
1528
|
CertB64List: e.CertB64List
|
|
1513
1529
|
});
|
|
1514
1530
|
return (l = n == null ? void 0 : n[0]) == null ? void 0 : l.DataB64;
|
|
1515
1531
|
}));
|
|
1516
|
-
|
|
1517
|
-
var
|
|
1518
|
-
const t = yield this.getEncryptionCert(), n = yield (
|
|
1532
|
+
a(this, "pkcs7Decryption", (e) => c(this, null, function* () {
|
|
1533
|
+
var r, o;
|
|
1534
|
+
const t = yield this.getEncryptionCert(), n = yield (r = this.coreInstance) == null ? void 0 : r.pkcs7Decryption(v(S({}, e != null ? e : {}), {
|
|
1519
1535
|
ContainerName: t == null ? void 0 : t.ContainerName
|
|
1520
|
-
})),
|
|
1521
|
-
return e.shouldDecodeBase64 ? this.base64Decode({ DataB64:
|
|
1536
|
+
})), s = (o = n == null ? void 0 : n[0]) == null ? void 0 : o.DataB64;
|
|
1537
|
+
return e.shouldDecodeBase64 ? this.base64Decode({ DataB64: s }) : s;
|
|
1522
1538
|
}));
|
|
1523
|
-
|
|
1524
|
-
var
|
|
1525
|
-
const t = yield this.appendCertBase64(e, !1), n = yield (
|
|
1526
|
-
return (
|
|
1539
|
+
a(this, "pkcs7FileEncryption", (e) => c(this, null, function* () {
|
|
1540
|
+
var s, r;
|
|
1541
|
+
const t = yield this.appendCertBase64(e, !1), n = yield (s = this.coreInstance) == null ? void 0 : s.pkcs7FileEncryption(t);
|
|
1542
|
+
return (r = n == null ? void 0 : n[0]) == null ? void 0 : r.DataB64;
|
|
1527
1543
|
}));
|
|
1528
|
-
|
|
1529
|
-
var
|
|
1530
|
-
const t = yield this.getEncryptionCert(), n = yield (
|
|
1544
|
+
a(this, "pkcs7FileDecryption", (e) => c(this, null, function* () {
|
|
1545
|
+
var s, r, o;
|
|
1546
|
+
const t = yield this.getEncryptionCert(), n = yield (r = this.coreInstance) == null ? void 0 : r.pkcs7FileDecryption({
|
|
1531
1547
|
SrcFile: e.SrcFile,
|
|
1532
|
-
DstFile: (
|
|
1548
|
+
DstFile: (s = e.DstFile) != null ? s : e.SrcFile.slice(0, -4),
|
|
1533
1549
|
ContainerName: t == null ? void 0 : t.ContainerName
|
|
1534
1550
|
});
|
|
1535
1551
|
return (o = n == null ? void 0 : n[0]) == null ? void 0 : o.DataB64;
|
|
1536
1552
|
}));
|
|
1537
|
-
|
|
1538
|
-
var
|
|
1539
|
-
const t = yield this.appendCertBase64(e, !1), n = yield (
|
|
1540
|
-
return (
|
|
1553
|
+
a(this, "asymmetricEncryption", (e) => c(this, null, function* () {
|
|
1554
|
+
var s, r;
|
|
1555
|
+
const t = yield this.appendCertBase64(e, !1), n = yield (s = this.coreInstance) == null ? void 0 : s.asymmetricEncryption(t);
|
|
1556
|
+
return (r = n == null ? void 0 : n[0]) == null ? void 0 : r.Data;
|
|
1541
1557
|
}));
|
|
1542
|
-
|
|
1543
|
-
var
|
|
1544
|
-
const n = yield this.getEncryptionCert(t),
|
|
1558
|
+
a(this, "asymmetricDecryption", (e, t) => c(this, null, function* () {
|
|
1559
|
+
var r, o;
|
|
1560
|
+
const n = yield this.getEncryptionCert(t), s = yield (r = this.coreInstance) == null ? void 0 : r.asymmetricDecryption(v(S({}, e != null ? e : {}), {
|
|
1545
1561
|
ContainerName: n == null ? void 0 : n.ContainerName
|
|
1546
1562
|
}));
|
|
1547
|
-
return (o =
|
|
1563
|
+
return (o = s == null ? void 0 : s[0]) == null ? void 0 : o.Data;
|
|
1548
1564
|
}));
|
|
1549
|
-
|
|
1565
|
+
a(this, "sm4Encryption", (e) => c(this, null, function* () {
|
|
1550
1566
|
var n;
|
|
1551
1567
|
const t = yield (n = this.coreInstance) == null ? void 0 : n.sm4Encryption(e);
|
|
1552
1568
|
return t == null ? void 0 : t[0];
|
|
1553
1569
|
}));
|
|
1554
|
-
|
|
1555
|
-
var n,
|
|
1570
|
+
a(this, "sm4Decryption", (e) => c(this, null, function* () {
|
|
1571
|
+
var n, s;
|
|
1556
1572
|
const t = yield (n = this.coreInstance) == null ? void 0 : n.sm4Decryption(e);
|
|
1557
|
-
return (
|
|
1573
|
+
return (s = t == null ? void 0 : t[0]) == null ? void 0 : s.Data;
|
|
1558
1574
|
}));
|
|
1559
|
-
|
|
1560
|
-
var
|
|
1561
|
-
const t = yield (
|
|
1575
|
+
a(this, "getCertInfo", (e) => c(this, null, function* () {
|
|
1576
|
+
var s, r, o, l, h;
|
|
1577
|
+
const t = yield (s = this.coreInstance) == null ? void 0 : s.getCertInfo(e), n = (r = t == null ? void 0 : t[0]) != null ? r : {};
|
|
1562
1578
|
for (let u = 0; u < ce.length; u++) {
|
|
1563
|
-
const
|
|
1579
|
+
const g = ce[u];
|
|
1564
1580
|
try {
|
|
1565
|
-
const
|
|
1566
|
-
Oid:
|
|
1581
|
+
const d = yield (o = this.coreInstance) == null ? void 0 : o.getCertInfoByOid({
|
|
1582
|
+
Oid: g.oid,
|
|
1567
1583
|
CertB64: e.CertB64
|
|
1568
1584
|
});
|
|
1569
|
-
n[
|
|
1570
|
-
} catch (
|
|
1571
|
-
n[
|
|
1585
|
+
n[g.key] = (h = (l = d == null ? void 0 : d[0]) == null ? void 0 : l.OidValue) == null ? void 0 : h.replace(/\./g, "");
|
|
1586
|
+
} catch (d) {
|
|
1587
|
+
n[g.key] = null;
|
|
1572
1588
|
}
|
|
1573
1589
|
}
|
|
1574
|
-
return n != null && n.idCardNo ? n != null && n.CertSubject.includes("O=") || n.orgCode ? n.certCate =
|
|
1590
|
+
return n != null && n.idCardNo ? n != null && n.CertSubject.includes("O=") || n.orgCode ? n.certCate = Fe : n.certCate = Ge : n.certCate = Ve, n;
|
|
1575
1591
|
}));
|
|
1576
|
-
|
|
1577
|
-
var n,
|
|
1578
|
-
const t = yield (n = this.coreInstance) == null ? void 0 : n.getCertInfoByOid(
|
|
1579
|
-
return (
|
|
1592
|
+
a(this, "getCertInfoByOid", (e) => c(this, null, function* () {
|
|
1593
|
+
var n, s;
|
|
1594
|
+
const t = yield (n = this.coreInstance) == null ? void 0 : n.getCertInfoByOid(S({}, e != null ? e : {}));
|
|
1595
|
+
return (s = t == null ? void 0 : t[0]) == null ? void 0 : s.OidValue;
|
|
1580
1596
|
}));
|
|
1581
|
-
|
|
1582
|
-
var
|
|
1583
|
-
const t = yield this.getSignatureCert(e), n = yield (
|
|
1597
|
+
a(this, "getSealVendor", (e) => c(this, null, function* () {
|
|
1598
|
+
var s;
|
|
1599
|
+
const t = yield this.getSignatureCert(e), n = yield (s = this.coreInstance) == null ? void 0 : s.getSealVendor({
|
|
1584
1600
|
ContainerName: t == null ? void 0 : t.ContainerName
|
|
1585
1601
|
});
|
|
1586
1602
|
return n == null ? void 0 : n[0];
|
|
1587
1603
|
}));
|
|
1588
|
-
|
|
1589
|
-
var
|
|
1590
|
-
const n = yield this.getSignatureCert(t),
|
|
1604
|
+
a(this, "deleteAllSealByVendor", (e, t) => c(this, null, function* () {
|
|
1605
|
+
var r;
|
|
1606
|
+
const n = yield this.getSignatureCert(t), s = yield (r = this.coreInstance) == null ? void 0 : r.deleteAllSealByVendor(v(S({}, e != null ? e : {}), {
|
|
1591
1607
|
ContainerName: n == null ? void 0 : n.ContainerName
|
|
1592
1608
|
}));
|
|
1593
|
-
return
|
|
1609
|
+
return s == null ? void 0 : s[0];
|
|
1594
1610
|
}));
|
|
1595
|
-
|
|
1596
|
-
var
|
|
1611
|
+
a(this, "getUKey", (e) => c(this, null, function* () {
|
|
1612
|
+
var s, r;
|
|
1597
1613
|
if (e) return e;
|
|
1598
|
-
const t = yield (
|
|
1614
|
+
const t = yield (s = this.coreInstance) == null ? void 0 : s.getUKeyList();
|
|
1599
1615
|
return yield G.open({
|
|
1600
1616
|
title: "选择介质",
|
|
1601
1617
|
data: t,
|
|
1602
|
-
columns:
|
|
1603
|
-
theme: (
|
|
1618
|
+
columns: pt,
|
|
1619
|
+
theme: (r = this.gwsConfig) == null ? void 0 : r.theme
|
|
1604
1620
|
});
|
|
1605
1621
|
}));
|
|
1606
|
-
|
|
1622
|
+
a(this, "getUKeyList", () => c(this, null, function* () {
|
|
1607
1623
|
var t;
|
|
1608
1624
|
return yield (t = this.coreInstance) == null ? void 0 : t.getUKeyList();
|
|
1609
1625
|
}));
|
|
1610
|
-
|
|
1611
|
-
var
|
|
1612
|
-
const t = yield this.getUKey(e), n = yield (
|
|
1626
|
+
a(this, "getUKeyInfo", (e) => c(this, null, function* () {
|
|
1627
|
+
var s;
|
|
1628
|
+
const t = yield this.getUKey(e), n = yield (s = this.coreInstance) == null ? void 0 : s.getUKeyInfo({
|
|
1613
1629
|
manu: t == null ? void 0 : t.manu,
|
|
1614
1630
|
sn: t == null ? void 0 : t.sn
|
|
1615
1631
|
});
|
|
1616
1632
|
return n == null ? void 0 : n[0];
|
|
1617
1633
|
}));
|
|
1618
|
-
|
|
1634
|
+
a(this, "applyCert", (e, t) => c(this, null, function* () {
|
|
1619
1635
|
var o;
|
|
1620
|
-
const n = yield this.getUKey(t),
|
|
1621
|
-
return yield (o = this.coreInstance) == null ? void 0 : o.applyCert(v(
|
|
1622
|
-
manu:
|
|
1623
|
-
sn:
|
|
1624
|
-
ContainerName:
|
|
1636
|
+
const n = yield this.getUKey(t), s = yield this.getUKeyInfo(n);
|
|
1637
|
+
return yield (o = this.coreInstance) == null ? void 0 : o.applyCert(v(S({}, e != null ? e : {}), {
|
|
1638
|
+
manu: s == null ? void 0 : s.manu,
|
|
1639
|
+
sn: s == null ? void 0 : s.sn,
|
|
1640
|
+
ContainerName: s == null ? void 0 : s.keyid
|
|
1625
1641
|
}));
|
|
1626
1642
|
}));
|
|
1627
|
-
|
|
1628
|
-
var
|
|
1643
|
+
a(this, "resetPin", (e, t) => c(this, null, function* () {
|
|
1644
|
+
var r;
|
|
1629
1645
|
const n = yield this.getSignatureCert(t);
|
|
1630
|
-
return yield (
|
|
1646
|
+
return yield (r = this.coreInstance) == null ? void 0 : r.resetPin(v(S({}, e != null ? e : {}), {
|
|
1631
1647
|
manu: n == null ? void 0 : n.manu,
|
|
1632
1648
|
sn: n == null ? void 0 : n.sn,
|
|
1633
1649
|
ContainerName: n == null ? void 0 : n.ContainerName
|
|
@@ -1636,27 +1652,27 @@ const $ = class $ {
|
|
|
1636
1652
|
return $.instance && !(e != null && e.isCreateNew) ? $.instance : (this.createGwsCore(e), $.instance = this, this);
|
|
1637
1653
|
}
|
|
1638
1654
|
};
|
|
1639
|
-
|
|
1640
|
-
let
|
|
1641
|
-
function Pt(
|
|
1655
|
+
a($, "instance", null);
|
|
1656
|
+
let V = $;
|
|
1657
|
+
function Pt(i) {
|
|
1642
1658
|
return new Promise((e, t) => {
|
|
1643
|
-
if (
|
|
1644
|
-
e(
|
|
1659
|
+
if (V.instance && !(i != null && i.isCreateNew))
|
|
1660
|
+
e(V.instance);
|
|
1645
1661
|
else {
|
|
1646
|
-
const n = new
|
|
1647
|
-
onOpen(
|
|
1648
|
-
var
|
|
1649
|
-
e(n), (
|
|
1662
|
+
const n = new V(v(S({}, i != null ? i : {}), {
|
|
1663
|
+
onOpen(s) {
|
|
1664
|
+
var r;
|
|
1665
|
+
e(n), (r = i == null ? void 0 : i.onOpen) == null || r.call(i, s);
|
|
1650
1666
|
},
|
|
1651
|
-
onClose(
|
|
1652
|
-
var
|
|
1653
|
-
t(
|
|
1667
|
+
onClose(s) {
|
|
1668
|
+
var r;
|
|
1669
|
+
t(s), (r = i == null ? void 0 : i.onClose) == null || r.call(i, s);
|
|
1654
1670
|
}
|
|
1655
1671
|
}));
|
|
1656
1672
|
}
|
|
1657
1673
|
});
|
|
1658
1674
|
}
|
|
1659
1675
|
export {
|
|
1660
|
-
|
|
1676
|
+
V as GwsService,
|
|
1661
1677
|
Pt as createService
|
|
1662
1678
|
};
|