@jieyin/editor-sdk-test 1.1.176 → 1.1.177
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/README.md +0 -1
- package/dist/editor-sdk.es.js +8202 -13748
- package/dist/renderWorker.js +1281 -1328
- package/dist/style.css +1 -1
- package/package.json +2 -3
package/dist/renderWorker.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var D0 = /* @__PURE__ */ ((r) => (r[r.Group = 0] = "Group", r[r.Layer = 1] = "Layer", r))(D0 || {});
|
|
2
|
-
function
|
|
3
|
-
let
|
|
2
|
+
function Qe(r) {
|
|
3
|
+
let h = r;
|
|
4
4
|
return () => {
|
|
5
|
-
const t =
|
|
6
|
-
return
|
|
5
|
+
const t = h;
|
|
6
|
+
return h += 1, t;
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function Ve(r, h) {
|
|
10
10
|
return {
|
|
11
11
|
name: r.name || "",
|
|
12
12
|
type: r.type || "Layer",
|
|
@@ -23,131 +23,131 @@ function et(r, l) {
|
|
|
23
23
|
quiltSliceY: r.quiltSliceY,
|
|
24
24
|
layerOrder: r.layerOrder,
|
|
25
25
|
imagePath: r.imagePath,
|
|
26
|
-
vectorMask: r.vectorMask ??
|
|
26
|
+
vectorMask: r.vectorMask ?? h,
|
|
27
27
|
filterList: r.filterList,
|
|
28
28
|
opacity: r.opacity,
|
|
29
29
|
clipping: r.clipping
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
function
|
|
33
|
-
let
|
|
34
|
-
if (r.type === "Group" &&
|
|
35
|
-
const x = r.children[0].name, n =
|
|
36
|
-
(E !== void 0 || n?.id !== void 0) && (
|
|
32
|
+
function Je(r, h, t, e) {
|
|
33
|
+
let u = r.name || "", v = h[u], m = v?.partId ?? (r.type === "Group" ? t.get(u) : void 0);
|
|
34
|
+
if (r.type === "Group" && m === void 0 && (!v || v.id === void 0) && r.children && r.children.length === 1) {
|
|
35
|
+
const x = r.children[0].name, n = h[x], E = n?.partId ?? t.get(x);
|
|
36
|
+
(E !== void 0 || n?.id !== void 0) && (u = x, v = n, m = E);
|
|
37
37
|
}
|
|
38
|
-
const
|
|
38
|
+
const B = r.id ?? v?.id ?? e();
|
|
39
39
|
if (r.type === "Group")
|
|
40
40
|
return {
|
|
41
|
-
id:
|
|
42
|
-
partId:
|
|
43
|
-
name:
|
|
41
|
+
id: B,
|
|
42
|
+
partId: m,
|
|
43
|
+
name: u,
|
|
44
44
|
blendMode: r.blendMode || "normal",
|
|
45
45
|
bounds: r.bounds || { left: 0, top: 0, width: 0, height: 0 },
|
|
46
46
|
type: D0.Group,
|
|
47
47
|
smartObjects: (r.children ?? []).map(
|
|
48
|
-
(x) =>
|
|
48
|
+
(x) => Ve(x, r.vectorMask)
|
|
49
49
|
),
|
|
50
50
|
opacity: r.opacity,
|
|
51
51
|
clipping: r.clipping,
|
|
52
52
|
layerOrder: r.layerOrder
|
|
53
53
|
};
|
|
54
|
-
let
|
|
55
|
-
return !
|
|
56
|
-
id:
|
|
54
|
+
let C = v?.url;
|
|
55
|
+
return !C && r.imagePath && (C = r.imagePath), {
|
|
56
|
+
id: B,
|
|
57
57
|
name: r.name || "",
|
|
58
58
|
blendMode: r.blendMode || "normal",
|
|
59
59
|
bounds: r.bounds || { left: 0, top: 0, width: 0, height: 0 },
|
|
60
60
|
type: D0.Layer,
|
|
61
|
-
url:
|
|
61
|
+
url: C,
|
|
62
62
|
opacity: r.opacity,
|
|
63
63
|
clipping: r.clipping,
|
|
64
64
|
layerOrder: r.layerOrder
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
function
|
|
68
|
-
const t = new Map(
|
|
67
|
+
function rt(r, h) {
|
|
68
|
+
const t = new Map(h.parts.map((u) => [u.name, u.id])), e = Qe(h.defaultIdStart ?? 1);
|
|
69
69
|
return {
|
|
70
|
-
parts:
|
|
71
|
-
models: r.map((
|
|
72
|
-
const
|
|
73
|
-
if (!
|
|
74
|
-
throw new Error(`无法获取 PSD 画布尺寸: canvasWidth=${
|
|
70
|
+
parts: h.parts,
|
|
71
|
+
models: r.map((u) => {
|
|
72
|
+
const v = u.layerExtrasByName ?? {}, m = u.psdJson, B = m.layerList || m.layerList || [], C = m.canvasWidth, x = m.canvasHeight;
|
|
73
|
+
if (!C || !x)
|
|
74
|
+
throw new Error(`无法获取 PSD 画布尺寸: canvasWidth=${C}, canvasHeight=${x}。请确保 jsonurl 中的 canvasWidth 和 canvasHeight 存在`);
|
|
75
75
|
const n = (s) => {
|
|
76
|
-
const
|
|
76
|
+
const f = [];
|
|
77
77
|
for (const p of s)
|
|
78
78
|
if (p.type === "Group" && p.children) {
|
|
79
|
-
const
|
|
80
|
-
const b = o.layerOrder ?? 0,
|
|
81
|
-
return b -
|
|
79
|
+
const l = [], g = [], i = [...p.children].sort((o, d) => {
|
|
80
|
+
const b = o.layerOrder ?? 0, D = d.layerOrder ?? 0;
|
|
81
|
+
return b - D;
|
|
82
82
|
});
|
|
83
83
|
for (const o of i)
|
|
84
|
-
o.isSmartObject === !0 ?
|
|
85
|
-
if (
|
|
86
|
-
const o = n(
|
|
87
|
-
|
|
84
|
+
o.isSmartObject === !0 ? l.push(o) : g.push(o);
|
|
85
|
+
if (g.length > 0) {
|
|
86
|
+
const o = n(g);
|
|
87
|
+
f.push(...o);
|
|
88
88
|
}
|
|
89
|
-
|
|
89
|
+
l.length > 0 && f.push({
|
|
90
90
|
...p,
|
|
91
|
-
children:
|
|
91
|
+
children: l
|
|
92
92
|
});
|
|
93
93
|
} else
|
|
94
|
-
|
|
95
|
-
return
|
|
96
|
-
}, a = n(
|
|
97
|
-
(s) =>
|
|
94
|
+
f.push(p);
|
|
95
|
+
return f;
|
|
96
|
+
}, a = n(B).map(
|
|
97
|
+
(s) => Je(s, v, t, e)
|
|
98
98
|
);
|
|
99
99
|
return {
|
|
100
|
-
width:
|
|
100
|
+
width: C,
|
|
101
101
|
height: x,
|
|
102
102
|
psdPartData: a
|
|
103
103
|
};
|
|
104
104
|
})
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function et(r) {
|
|
108
108
|
return r ? r.vectorMask && r.vectorMask.paths && Array.isArray(r.vectorMask.paths) ? { type: "bezier", paths: r.vectorMask.paths } : Array.isArray(r.vectorMask) ? { type: "simple", points: r.vectorMask } : null : null;
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function tt(r) {
|
|
111
111
|
return r ? r.type === "bezier" ? {
|
|
112
112
|
type: "bezier",
|
|
113
|
-
paths: r.paths.map((
|
|
114
|
-
open: !!
|
|
115
|
-
knots:
|
|
113
|
+
paths: r.paths.map((h) => ({
|
|
114
|
+
open: !!h.open,
|
|
115
|
+
knots: h.knots.map((t) => ({
|
|
116
116
|
linked: !!t.linked,
|
|
117
117
|
points: Array.isArray(t.points) ? [...t.points] : []
|
|
118
118
|
}))
|
|
119
119
|
}))
|
|
120
120
|
} : r.type === "simple" ? {
|
|
121
121
|
type: "simple",
|
|
122
|
-
points: r.points.map((
|
|
123
|
-
x:
|
|
124
|
-
y:
|
|
125
|
-
type:
|
|
122
|
+
points: r.points.map((h) => ({
|
|
123
|
+
x: h.x,
|
|
124
|
+
y: h.y,
|
|
125
|
+
type: h.type
|
|
126
126
|
}))
|
|
127
127
|
} : null : null;
|
|
128
128
|
}
|
|
129
|
-
function
|
|
130
|
-
if (
|
|
131
|
-
if (r.globalCompositeOperation = "destination-in", r.beginPath(),
|
|
132
|
-
|
|
129
|
+
function lr(r, h) {
|
|
130
|
+
if (h) {
|
|
131
|
+
if (r.globalCompositeOperation = "destination-in", r.beginPath(), h.type === "bezier" && Array.isArray(h.paths))
|
|
132
|
+
h.paths.forEach((t) => {
|
|
133
133
|
const e = t.knots;
|
|
134
134
|
if (!e || e.length < 2) return;
|
|
135
|
-
const
|
|
136
|
-
r.moveTo(
|
|
137
|
-
for (let
|
|
138
|
-
const
|
|
139
|
-
let
|
|
140
|
-
if (!t.open &&
|
|
141
|
-
|
|
142
|
-
else if (t.open &&
|
|
135
|
+
const u = e[0];
|
|
136
|
+
r.moveTo(u.points[2], u.points[3]);
|
|
137
|
+
for (let v = 0; v < e.length; v++) {
|
|
138
|
+
const m = e[v];
|
|
139
|
+
let B = (v + 1) % e.length;
|
|
140
|
+
if (!t.open && v === e.length - 1)
|
|
141
|
+
B = 0;
|
|
142
|
+
else if (t.open && v === e.length - 1)
|
|
143
143
|
break;
|
|
144
|
-
const
|
|
145
|
-
r.bezierCurveTo(x, n, E, a, s,
|
|
144
|
+
const C = e[B], x = m.points[4], n = m.points[5], E = C.points[0], a = C.points[1], s = C.points[2], f = C.points[3];
|
|
145
|
+
r.bezierCurveTo(x, n, E, a, s, f);
|
|
146
146
|
}
|
|
147
147
|
t.open || r.closePath();
|
|
148
148
|
});
|
|
149
|
-
else if (
|
|
150
|
-
const t =
|
|
149
|
+
else if (h.type === "simple" && Array.isArray(h.points)) {
|
|
150
|
+
const t = h.points;
|
|
151
151
|
if (t.length < 3) return;
|
|
152
152
|
r.moveTo(t[0].x, t[0].y);
|
|
153
153
|
for (let e = 1; e < t.length; e++) r.lineTo(t[e].x, t[e].y);
|
|
@@ -156,15 +156,15 @@ function pr(r, l) {
|
|
|
156
156
|
r.fillStyle = "#000", r.fill(), r.globalCompositeOperation = "source-over";
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
|
-
class
|
|
159
|
+
class v0 {
|
|
160
160
|
static hasStorage = typeof window < "u" && typeof localStorage < "u";
|
|
161
161
|
/**
|
|
162
162
|
* 获取存储项
|
|
163
163
|
*/
|
|
164
|
-
static getItem(
|
|
164
|
+
static getItem(h) {
|
|
165
165
|
if (!this.hasStorage) return null;
|
|
166
166
|
try {
|
|
167
|
-
return localStorage.getItem(
|
|
167
|
+
return localStorage.getItem(h);
|
|
168
168
|
} catch {
|
|
169
169
|
return null;
|
|
170
170
|
}
|
|
@@ -172,10 +172,10 @@ class p0 {
|
|
|
172
172
|
/**
|
|
173
173
|
* 设置存储项
|
|
174
174
|
*/
|
|
175
|
-
static setItem(
|
|
175
|
+
static setItem(h, t) {
|
|
176
176
|
if (!this.hasStorage) return !1;
|
|
177
177
|
try {
|
|
178
|
-
return localStorage.setItem(
|
|
178
|
+
return localStorage.setItem(h, t), !0;
|
|
179
179
|
} catch {
|
|
180
180
|
return !1;
|
|
181
181
|
}
|
|
@@ -183,10 +183,10 @@ class p0 {
|
|
|
183
183
|
/**
|
|
184
184
|
* 移除存储项
|
|
185
185
|
*/
|
|
186
|
-
static removeItem(
|
|
186
|
+
static removeItem(h) {
|
|
187
187
|
if (!this.hasStorage) return !1;
|
|
188
188
|
try {
|
|
189
|
-
return localStorage.removeItem(
|
|
189
|
+
return localStorage.removeItem(h), !0;
|
|
190
190
|
} catch {
|
|
191
191
|
return !1;
|
|
192
192
|
}
|
|
@@ -209,7 +209,7 @@ class p0 {
|
|
|
209
209
|
return this.hasStorage;
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
|
-
class
|
|
212
|
+
class fr {
|
|
213
213
|
/**
|
|
214
214
|
* 是否在浏览器环境
|
|
215
215
|
*/
|
|
@@ -247,14 +247,14 @@ class dr {
|
|
|
247
247
|
return this.isBrowser() ? window.location.origin : "http://localhost";
|
|
248
248
|
}
|
|
249
249
|
}
|
|
250
|
-
class
|
|
250
|
+
class h0 {
|
|
251
251
|
/**
|
|
252
252
|
* 安全地解析 URL
|
|
253
253
|
*/
|
|
254
|
-
static parse(
|
|
254
|
+
static parse(h) {
|
|
255
255
|
try {
|
|
256
|
-
const t =
|
|
257
|
-
return new URL(
|
|
256
|
+
const t = fr.getOrigin();
|
|
257
|
+
return new URL(h, t);
|
|
258
258
|
} catch {
|
|
259
259
|
return null;
|
|
260
260
|
}
|
|
@@ -262,291 +262,245 @@ class v0 {
|
|
|
262
262
|
/**
|
|
263
263
|
* 添加查询参数
|
|
264
264
|
*/
|
|
265
|
-
static addParam(
|
|
266
|
-
const
|
|
267
|
-
return !
|
|
265
|
+
static addParam(h, t, e) {
|
|
266
|
+
const u = this.parse(h);
|
|
267
|
+
return !u || u.searchParams.has(t) ? h : (u.searchParams.set(t, e), this.formatUrl(h, u));
|
|
268
268
|
}
|
|
269
269
|
/**
|
|
270
270
|
* 移除查询参数
|
|
271
271
|
*/
|
|
272
|
-
static removeParam(
|
|
273
|
-
const e = this.parse(
|
|
274
|
-
return !e || !e.searchParams.has(t) ?
|
|
272
|
+
static removeParam(h, t) {
|
|
273
|
+
const e = this.parse(h);
|
|
274
|
+
return !e || !e.searchParams.has(t) ? h : (e.searchParams.delete(t), this.formatUrl(h, e));
|
|
275
275
|
}
|
|
276
276
|
/**
|
|
277
277
|
* 检查是否有指定参数
|
|
278
278
|
*/
|
|
279
|
-
static hasParam(
|
|
280
|
-
return this.parse(
|
|
279
|
+
static hasParam(h, t) {
|
|
280
|
+
return this.parse(h)?.searchParams.has(t) ?? !1;
|
|
281
281
|
}
|
|
282
282
|
/**
|
|
283
283
|
* 格式化 URL(保持原始格式)
|
|
284
284
|
*/
|
|
285
|
-
static formatUrl(
|
|
286
|
-
const e = /^(https?:)?\/\//i.test(
|
|
287
|
-
return e ? t.toString() :
|
|
285
|
+
static formatUrl(h, t) {
|
|
286
|
+
const e = /^(https?:)?\/\//i.test(h), u = h.startsWith("//");
|
|
287
|
+
return e ? t.toString() : u ? t.toString().replace(/^https?:/, "") : `${t.pathname}${t.search}${t.hash}`;
|
|
288
288
|
}
|
|
289
289
|
/**
|
|
290
290
|
* 检查是否为数据 URL
|
|
291
291
|
*/
|
|
292
|
-
static isDataUrl(
|
|
293
|
-
return
|
|
292
|
+
static isDataUrl(h) {
|
|
293
|
+
return h?.startsWith("data:") ?? !1;
|
|
294
294
|
}
|
|
295
295
|
/**
|
|
296
296
|
* 检查是否为 Blob URL
|
|
297
297
|
*/
|
|
298
|
-
static isBlobUrl(
|
|
299
|
-
return
|
|
298
|
+
static isBlobUrl(h) {
|
|
299
|
+
return h?.startsWith("blob:") ?? !1;
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
|
-
const
|
|
303
|
-
function
|
|
304
|
-
|
|
305
|
-
}
|
|
306
|
-
(function(r, l) {
|
|
307
|
-
const t = r0, e = r();
|
|
302
|
+
const r0 = Fr;
|
|
303
|
+
(function(r, h) {
|
|
304
|
+
const t = Fr, e = r();
|
|
308
305
|
for (; ; )
|
|
309
306
|
try {
|
|
310
|
-
if (-parseInt(t(
|
|
307
|
+
if (-parseInt(t(431)) / 1 + -parseInt(t(428)) / 2 * (-parseInt(t(426)) / 3) + parseInt(t(433)) / 4 + parseInt(t(429)) / 5 + -parseInt(t(423)) / 6 + parseInt(t(408)) / 7 * (parseInt(t(421)) / 8) + -parseInt(t(439)) / 9 * (parseInt(t(418)) / 10) === h) break;
|
|
311
308
|
e.push(e.shift());
|
|
312
309
|
} catch {
|
|
313
310
|
e.push(e.shift());
|
|
314
311
|
}
|
|
315
|
-
})(
|
|
316
|
-
const
|
|
312
|
+
})(cr, 1 * 172189 + -303111 + 318152);
|
|
313
|
+
const A0 = /* @__PURE__ */ (function() {
|
|
317
314
|
let r = !0;
|
|
318
|
-
return function(
|
|
315
|
+
return function(h, t) {
|
|
319
316
|
const e = r ? function() {
|
|
320
|
-
const f = r0;
|
|
321
317
|
if (t) {
|
|
322
|
-
const
|
|
323
|
-
return t = null,
|
|
318
|
+
const u = t.apply(h, arguments);
|
|
319
|
+
return t = null, u;
|
|
324
320
|
}
|
|
325
321
|
} : function() {
|
|
326
322
|
};
|
|
327
323
|
return r = !1, e;
|
|
328
324
|
};
|
|
329
|
-
})(),
|
|
330
|
-
const r =
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
const _ = F0[r(461) + r(464) + "r"][r(480) + "type"][r(462)](F0), C = f[h], B = e[C] || _;
|
|
342
|
-
_[r(451) + "to__"] = F0.bind(F0), _.toString = B.toString.bind(B), e[C] = _;
|
|
325
|
+
})(), xt = A0(void 0, function() {
|
|
326
|
+
const r = Fr;
|
|
327
|
+
let h;
|
|
328
|
+
try {
|
|
329
|
+
h = Function("return (fu" + r(436) + "n() " + (r(420) + "nstru" + r(427) + r(444) + 'rn this")( )') + ");")();
|
|
330
|
+
} catch {
|
|
331
|
+
h = window;
|
|
332
|
+
}
|
|
333
|
+
const t = h.console = h[r(430) + "le"] || {}, e = ["log", "warn", "info", "error", "exception", "table", "trace"];
|
|
334
|
+
for (let u = 6097 + 7249 * -1 + 1152; u < e.length; u++) {
|
|
335
|
+
const v = A0.constructor.prototype.bind(A0), m = e[u], B = t[m] || v;
|
|
336
|
+
v[r(424) + "to__"] = A0.bind(A0), v[r(435) + "ing"] = B.toString.bind(B), t[m] = v;
|
|
343
337
|
}
|
|
344
338
|
});
|
|
345
|
-
|
|
346
|
-
const
|
|
347
|
-
function
|
|
348
|
-
return
|
|
339
|
+
xt();
|
|
340
|
+
const Er = r0(438) + "token", Ar = r0(438) + "token" + r0(412) + "re_time", nt = (-11304 + -3788 * -3) * (-16557 + 17557 * 1);
|
|
341
|
+
function Br() {
|
|
342
|
+
return v0.getItem(Er);
|
|
349
343
|
}
|
|
350
|
-
function
|
|
351
|
-
const
|
|
352
|
-
if (!
|
|
353
|
-
const e =
|
|
344
|
+
function at(r = nt) {
|
|
345
|
+
const h = r0;
|
|
346
|
+
if (!Br()) return !0;
|
|
347
|
+
const e = v0[h(445) + "em"](Ar);
|
|
354
348
|
if (!e) return !1;
|
|
355
|
-
const
|
|
356
|
-
return Date
|
|
349
|
+
const u = Number(e);
|
|
350
|
+
return Date.now() + r > u;
|
|
357
351
|
}
|
|
358
|
-
function
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
p0.setItem(Dr, String(e));
|
|
352
|
+
function ot(r, h) {
|
|
353
|
+
if (v0.setItem(Er, r), typeof h == "number" && h > 16653 + 5551 * -3) {
|
|
354
|
+
const t = Date.now() + h * 1e3;
|
|
355
|
+
v0.setItem(Ar, String(t));
|
|
363
356
|
}
|
|
364
357
|
}
|
|
365
|
-
function
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
async function Or(r) {
|
|
369
|
-
const l = r0, t = await r(), e = t?.[l(459)]?.data;
|
|
370
|
-
return t?.data?.code === -1 * 1373 + -2665 + 4238 && e?.["file_token"] ? (dt(e.file_token, e.expires_in), e[l(453) + "token"]) : null;
|
|
358
|
+
function it() {
|
|
359
|
+
const r = r0;
|
|
360
|
+
v0[r(425) + r(409)](Er), v0.removeItem(Ar);
|
|
371
361
|
}
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
return ur = function() {
|
|
376
|
-
return r;
|
|
377
|
-
}, ur();
|
|
362
|
+
async function Lr(r) {
|
|
363
|
+
const h = r0, t = await r(), e = t?.data?.data;
|
|
364
|
+
return t?.data?.code === -7 * 873 + 6846 + -535 && e?.["file_token"] ? (ot(e[h(438) + h(419)], e["expir" + h(437)]), e[h(438) + "token"]) : null;
|
|
378
365
|
}
|
|
379
|
-
|
|
380
|
-
|
|
366
|
+
let st = null;
|
|
367
|
+
function Fr(r, h) {
|
|
368
|
+
return r = r - 406, cr()[r];
|
|
381
369
|
}
|
|
382
|
-
function
|
|
383
|
-
return
|
|
370
|
+
function Ir() {
|
|
371
|
+
return fr.isBrowser() ? st : null;
|
|
384
372
|
}
|
|
385
|
-
async function
|
|
373
|
+
async function me() {
|
|
386
374
|
const r = r0;
|
|
387
|
-
if (!
|
|
388
|
-
const
|
|
389
|
-
if (
|
|
375
|
+
if (!fr.isBrowser()) return Br();
|
|
376
|
+
const h = Br();
|
|
377
|
+
if (h && !at()) return h;
|
|
390
378
|
try {
|
|
391
|
-
const t = await
|
|
392
|
-
if (
|
|
393
|
-
const e = await
|
|
379
|
+
const t = await Ir();
|
|
380
|
+
if (h && t?.["fetch" + r(415) + "okenR" + r(414) + "h"]) {
|
|
381
|
+
const e = await Lr(t["fetchFileT" + r(440) + r(414) + "h"]);
|
|
394
382
|
if (e) return e;
|
|
395
383
|
}
|
|
396
384
|
} catch {
|
|
397
385
|
}
|
|
398
386
|
try {
|
|
399
|
-
const t =
|
|
400
|
-
return t?.[r(
|
|
387
|
+
const t = Ir();
|
|
388
|
+
return t?.[r(407) + r(415) + "oken"] ? await Lr(t["fetch" + r(415) + "oken"]) : null;
|
|
401
389
|
} catch {
|
|
402
390
|
return null;
|
|
403
391
|
}
|
|
404
392
|
}
|
|
405
|
-
function
|
|
406
|
-
const
|
|
407
|
-
if (!r ||
|
|
408
|
-
const t =
|
|
409
|
-
return t ? t
|
|
393
|
+
function _e(r) {
|
|
394
|
+
const h = r0;
|
|
395
|
+
if (!r || h0["isDat" + h(411)](r) || h0[h(443) + h(432)](r)) return !1;
|
|
396
|
+
const t = h0.parse(r);
|
|
397
|
+
return t ? t.pathname.includes("/files/") && !h0[h(441) + h(413)](r, "fileToken") : r["inclu" + h(442)]("/files/") && !r[h(410) + "des"]("fileToken=");
|
|
410
398
|
}
|
|
411
|
-
function
|
|
399
|
+
function ye(r, h) {
|
|
412
400
|
const t = r0;
|
|
413
|
-
return !
|
|
401
|
+
return !h || !_e(r) ? r : h0[t(417) + "ram"](r, t(434) + "oken", h);
|
|
414
402
|
}
|
|
415
|
-
function
|
|
416
|
-
return
|
|
403
|
+
function ct(r) {
|
|
404
|
+
return h0["remov" + r0(416) + "m"](r, "fileToken");
|
|
417
405
|
}
|
|
418
|
-
async function
|
|
419
|
-
if (!
|
|
420
|
-
const
|
|
421
|
-
return
|
|
406
|
+
async function ft(r) {
|
|
407
|
+
if (!_e(r)) return r;
|
|
408
|
+
const h = await me();
|
|
409
|
+
return ye(r, h);
|
|
422
410
|
}
|
|
423
|
-
const
|
|
424
|
-
function
|
|
425
|
-
return "GET"
|
|
411
|
+
const hr = /* @__PURE__ */ new Map();
|
|
412
|
+
function ut(r, h) {
|
|
413
|
+
return "GET"["toUpp" + r0(406) + "e"]() + "\0" + r;
|
|
426
414
|
}
|
|
427
|
-
async function
|
|
415
|
+
async function we(r, h) {
|
|
428
416
|
const t = r0;
|
|
429
|
-
if (!
|
|
430
|
-
const e =
|
|
431
|
-
let
|
|
432
|
-
return !
|
|
433
|
-
try {
|
|
434
|
-
const C = await vt(e);
|
|
435
|
-
let B = await fetch(C, l);
|
|
436
|
-
if (B.status !== 5916 + 1117 * -1 + 6 * -733) return B;
|
|
437
|
-
lt();
|
|
438
|
-
const x = await ye(), n = ke(e, x);
|
|
439
|
-
return B = await fetch(n, l), B;
|
|
440
|
-
} finally {
|
|
441
|
-
Br.delete(f);
|
|
442
|
-
}
|
|
443
|
-
})(), Br.set(f, h)), (await h)[t(466)]();
|
|
444
|
-
}
|
|
445
|
-
const Ct = 96, Et = 200 * 1024 * 1024, x0 = /* @__PURE__ */ new Map();
|
|
446
|
-
let lr = 0;
|
|
447
|
-
const y0 = /* @__PURE__ */ new Map();
|
|
448
|
-
function At(r, l) {
|
|
449
|
-
return `${"GET".toUpperCase()}\0${Se(r)}`;
|
|
450
|
-
}
|
|
451
|
-
function Ft() {
|
|
452
|
-
const r = x0.keys().next().value;
|
|
453
|
-
if (r === void 0) return;
|
|
454
|
-
const l = x0.get(r);
|
|
455
|
-
x0.delete(r), l && (lr -= l.size);
|
|
456
|
-
}
|
|
457
|
-
function gt(r) {
|
|
458
|
-
for (; x0.size > 0; ) {
|
|
459
|
-
const l = x0.size >= Ct, t = lr + r > Et;
|
|
460
|
-
if (!l && !t) break;
|
|
461
|
-
Ft();
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
|
-
async function He(r, l) {
|
|
465
|
-
const t = At(r), e = x0.get(t);
|
|
466
|
-
if (e)
|
|
467
|
-
return x0.delete(t), x0.set(t, e), e;
|
|
468
|
-
let f = y0.get(t);
|
|
469
|
-
return f || (f = (async () => {
|
|
417
|
+
if (!fr.isBrowser()) return fetch(r, h);
|
|
418
|
+
const e = ct(r), u = ut(e);
|
|
419
|
+
let v = hr.get(u);
|
|
420
|
+
return !v && (v = (async () => {
|
|
470
421
|
try {
|
|
471
|
-
const
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
422
|
+
const B = await ft(e);
|
|
423
|
+
let C = await fetch(B, h);
|
|
424
|
+
if (C.status !== 1 * 5512 + -233 + -4878 * 1) return C;
|
|
425
|
+
it();
|
|
426
|
+
const x = await me(), n = ye(e, x);
|
|
427
|
+
return C = await fetch(n, h), C;
|
|
476
428
|
} finally {
|
|
477
|
-
|
|
429
|
+
hr.delete(u);
|
|
478
430
|
}
|
|
479
|
-
})(),
|
|
431
|
+
})(), hr[t(422)](u, v)), (await v).clone();
|
|
480
432
|
}
|
|
481
|
-
function
|
|
482
|
-
|
|
433
|
+
function cr() {
|
|
434
|
+
const r = ["{}.co", "136zDjdKD", "set", "1641804PFHysh", "__pro", "remov", "15LRbTQA", "ctor(", "26242MRLdlb", "763135nEUqfH", "conso", "8794HJUJdD", "bUrl", "273960vanXmn", "fileT", "toStr", "nctio", "es_in", "file_", "3447ELxLzB", "okenR", "hasPa", "des", "isBlo", '"retu', "getIt", "erCas", "fetch", "118538GLAZcb", "eItem", "inclu", "aUrl", "_expi", "ram", "efres", "FileT", "ePara", "addPa", "2740weleyH", "token"];
|
|
435
|
+
return cr = function() {
|
|
436
|
+
return r;
|
|
437
|
+
}, cr();
|
|
483
438
|
}
|
|
484
|
-
const
|
|
439
|
+
const ke = (r, h) => {
|
|
485
440
|
if (!r) return r;
|
|
486
|
-
const t = (
|
|
441
|
+
const t = (h || "").replace(/\/$/, "");
|
|
487
442
|
if (t && r.startsWith(t))
|
|
488
443
|
return r;
|
|
489
444
|
if (typeof window < "u") {
|
|
490
|
-
const
|
|
491
|
-
if (
|
|
445
|
+
const u = window.location.hostname;
|
|
446
|
+
if (u === "localhost" || u === "127.0.0.1")
|
|
492
447
|
try {
|
|
493
|
-
const
|
|
448
|
+
const v = new URL(r);
|
|
494
449
|
if (t)
|
|
495
450
|
try {
|
|
496
|
-
const
|
|
497
|
-
if (
|
|
451
|
+
const m = new URL(t).origin;
|
|
452
|
+
if (v.origin === m)
|
|
498
453
|
return r;
|
|
499
454
|
} catch {
|
|
500
455
|
}
|
|
501
|
-
if (
|
|
502
|
-
return t ? `${t}${
|
|
456
|
+
if (v.pathname.startsWith("/files/"))
|
|
457
|
+
return t ? `${t}${v.pathname}${v.search}${v.hash}` : `${v.pathname}${v.search}${v.hash}`;
|
|
503
458
|
} catch {
|
|
504
459
|
}
|
|
505
460
|
}
|
|
506
461
|
if (typeof window < "u" && window.location.hostname !== "localhost") return r;
|
|
507
462
|
const e = r.match(/^https?:\/\/([^/]+\.oss[^/]*\.aliyuncs\.com)(.*)$/);
|
|
508
463
|
return e ? `/oss${e[2]}` : r;
|
|
509
|
-
},
|
|
464
|
+
}, dt = (r, h) => {
|
|
510
465
|
if (typeof OffscreenCanvas < "u" && typeof document > "u")
|
|
511
|
-
return new OffscreenCanvas(r,
|
|
466
|
+
return new OffscreenCanvas(r, h);
|
|
512
467
|
const t = document.createElement("canvas");
|
|
513
|
-
return t.width = r, t.height =
|
|
514
|
-
},
|
|
515
|
-
if (!
|
|
468
|
+
return t.width = r, t.height = h, t;
|
|
469
|
+
}, _0 = async (r, h) => {
|
|
470
|
+
if (!h || h <= 0) return r;
|
|
516
471
|
const t = Math.max(r.width, r.height);
|
|
517
|
-
if (t <=
|
|
518
|
-
const e =
|
|
519
|
-
return
|
|
472
|
+
if (t <= h) return r;
|
|
473
|
+
const e = h / t, u = Math.max(1, Math.round(r.width * e)), v = Math.max(1, Math.round(r.height * e)), m = dt(u, v), B = m.getContext("2d");
|
|
474
|
+
return B ? (B.drawImage(r, 0, 0, u, v), r.close?.(), await createImageBitmap(m)) : r;
|
|
520
475
|
};
|
|
521
|
-
async function
|
|
476
|
+
async function lt(r, h, t) {
|
|
522
477
|
if (typeof r == "string")
|
|
523
478
|
try {
|
|
524
|
-
const e =
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
} catch {
|
|
529
|
-
throw new Error(`加载图片失败: ${r}`);
|
|
479
|
+
const e = ke(r, t), u = await we(e);
|
|
480
|
+
if (!u.ok) {
|
|
481
|
+
const m = u.status === 404 ? `图片不存在 (404): ${r}` : `加载图片失败 (${u.status} ${u.statusText}): ${r}`;
|
|
482
|
+
throw new Error(m);
|
|
530
483
|
}
|
|
531
|
-
|
|
484
|
+
const v = await u.blob();
|
|
485
|
+
if (!v.type.startsWith("image/") && v.size === 0)
|
|
532
486
|
throw new Error(`图片数据无效: URL=${r}`);
|
|
533
487
|
try {
|
|
534
|
-
const
|
|
535
|
-
return await
|
|
536
|
-
} catch (
|
|
537
|
-
throw new Error(`图片解码失败: URL=${r}, 错误=${
|
|
488
|
+
const m = await createImageBitmap(v);
|
|
489
|
+
return await _0(m, h);
|
|
490
|
+
} catch (m) {
|
|
491
|
+
throw new Error(`图片解码失败: URL=${r}, 错误=${m instanceof Error ? m.message : m}`);
|
|
538
492
|
}
|
|
539
493
|
} catch (e) {
|
|
540
494
|
throw e instanceof Error ? e : new Error(`加载图片失败: ${r}, ${e}`);
|
|
541
495
|
}
|
|
542
496
|
if (r instanceof HTMLImageElement) {
|
|
543
|
-
if ((!r.complete || r.naturalWidth === 0) && await new Promise((e,
|
|
544
|
-
r.onload = e, r.onerror = () =>
|
|
497
|
+
if ((!r.complete || r.naturalWidth === 0) && await new Promise((e, u) => {
|
|
498
|
+
r.onload = e, r.onerror = () => u(new Error(`图片加载失败: src=${r.src}`)), r.complete && e(null);
|
|
545
499
|
}), r.naturalWidth === 0 || r.naturalHeight === 0)
|
|
546
500
|
throw new Error(`图片尺寸无效: src=${r.src}, width=${r.naturalWidth}, height=${r.naturalHeight}`);
|
|
547
501
|
try {
|
|
548
502
|
const e = await createImageBitmap(r);
|
|
549
|
-
return await
|
|
503
|
+
return await _0(e, h);
|
|
550
504
|
} catch (e) {
|
|
551
505
|
throw new Error(`图片解码失败: src=${r.src}, 错误=${e instanceof Error ? e.message : e}`);
|
|
552
506
|
}
|
|
@@ -554,34 +508,33 @@ async function mt(r, l, t) {
|
|
|
554
508
|
if (r instanceof ImageBitmap) {
|
|
555
509
|
if (r.width === 0 || r.height === 0)
|
|
556
510
|
throw new Error(`ImageBitmap 尺寸无效: width=${r.width}, height=${r.height}`);
|
|
557
|
-
return await
|
|
511
|
+
return await _0(r, h);
|
|
558
512
|
}
|
|
559
513
|
throw new Error("不支持的图片类型");
|
|
560
514
|
}
|
|
561
|
-
async function
|
|
515
|
+
async function ht(r, h, t) {
|
|
562
516
|
try {
|
|
563
|
-
const e =
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
} catch {
|
|
568
|
-
throw new Error(`加载图片失败: ${r}`);
|
|
517
|
+
const e = ke(r, t), u = await we(e);
|
|
518
|
+
if (!u.ok) {
|
|
519
|
+
const m = u.status === 404 ? `图片不存在 (404): ${r}` : `加载图片失败 (${u.status} ${u.statusText}): ${r}`;
|
|
520
|
+
throw new Error(m);
|
|
569
521
|
}
|
|
570
|
-
|
|
522
|
+
const v = await u.blob();
|
|
523
|
+
if (!v.type.startsWith("image/") && v.size === 0)
|
|
571
524
|
throw new Error(`图片数据无效: URL=${r}`);
|
|
572
525
|
try {
|
|
573
|
-
const
|
|
574
|
-
return await
|
|
575
|
-
} catch (
|
|
576
|
-
throw new Error(`图片解码失败: URL=${r}, 错误=${
|
|
526
|
+
const m = await createImageBitmap(v);
|
|
527
|
+
return await _0(m, h);
|
|
528
|
+
} catch (m) {
|
|
529
|
+
throw new Error(`图片解码失败: URL=${r}, 错误=${m instanceof Error ? m.message : m}`);
|
|
577
530
|
}
|
|
578
531
|
} catch (e) {
|
|
579
532
|
throw e instanceof Error ? e : new Error(`加载图片失败: ${r}, ${e}`);
|
|
580
533
|
}
|
|
581
534
|
}
|
|
582
|
-
function
|
|
535
|
+
function Or(r) {
|
|
583
536
|
if (!r) return "source-over";
|
|
584
|
-
const
|
|
537
|
+
const h = r.trim().toLowerCase();
|
|
585
538
|
return {
|
|
586
539
|
normal: "source-over",
|
|
587
540
|
multiply: "multiply",
|
|
@@ -607,26 +560,26 @@ function Tr(r) {
|
|
|
607
560
|
"linear dodge": "lighter",
|
|
608
561
|
lighter: "lighter",
|
|
609
562
|
"pass-through": "source-over"
|
|
610
|
-
}[
|
|
563
|
+
}[h] || "source-over";
|
|
611
564
|
}
|
|
612
|
-
var
|
|
613
|
-
function
|
|
565
|
+
var vr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
566
|
+
function vt(r) {
|
|
614
567
|
if (Object.prototype.hasOwnProperty.call(r, "__esModule")) return r;
|
|
615
|
-
var
|
|
616
|
-
if (typeof
|
|
568
|
+
var h = r.default;
|
|
569
|
+
if (typeof h == "function") {
|
|
617
570
|
var t = function e() {
|
|
618
|
-
var
|
|
571
|
+
var u = !1;
|
|
619
572
|
try {
|
|
620
|
-
|
|
573
|
+
u = this instanceof e;
|
|
621
574
|
} catch {
|
|
622
575
|
}
|
|
623
|
-
return
|
|
576
|
+
return u ? Reflect.construct(h, arguments, this.constructor) : h.apply(this, arguments);
|
|
624
577
|
};
|
|
625
|
-
t.prototype =
|
|
578
|
+
t.prototype = h.prototype;
|
|
626
579
|
} else t = {};
|
|
627
580
|
return Object.defineProperty(t, "__esModule", { value: !0 }), Object.keys(r).forEach(function(e) {
|
|
628
|
-
var
|
|
629
|
-
Object.defineProperty(t, e,
|
|
581
|
+
var u = Object.getOwnPropertyDescriptor(r, e);
|
|
582
|
+
Object.defineProperty(t, e, u.get ? u : {
|
|
630
583
|
enumerable: !0,
|
|
631
584
|
get: function() {
|
|
632
585
|
return r[e];
|
|
@@ -634,48 +587,48 @@ function yt(r) {
|
|
|
634
587
|
});
|
|
635
588
|
}), t;
|
|
636
589
|
}
|
|
637
|
-
var
|
|
638
|
-
function
|
|
590
|
+
var y0 = { exports: {} };
|
|
591
|
+
function pt(r) {
|
|
639
592
|
throw new Error('Could not dynamically require "' + r + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
640
593
|
}
|
|
641
|
-
var
|
|
594
|
+
var w0 = { exports: {} }, Bt = {}, Ct = /* @__PURE__ */ Object.freeze({
|
|
642
595
|
__proto__: null,
|
|
643
|
-
default:
|
|
644
|
-
}),
|
|
596
|
+
default: Bt
|
|
597
|
+
}), Et = /* @__PURE__ */ vt(Ct), At = w0.exports, qr;
|
|
645
598
|
function M() {
|
|
646
|
-
return
|
|
599
|
+
return qr || (qr = 1, (function(r, h) {
|
|
647
600
|
(function(t, e) {
|
|
648
601
|
r.exports = e();
|
|
649
|
-
})(
|
|
650
|
-
var t = t || (function(e,
|
|
651
|
-
var
|
|
652
|
-
if (typeof window < "u" && window.crypto && (
|
|
602
|
+
})(At, function() {
|
|
603
|
+
var t = t || (function(e, u) {
|
|
604
|
+
var v;
|
|
605
|
+
if (typeof window < "u" && window.crypto && (v = window.crypto), typeof self < "u" && self.crypto && (v = self.crypto), typeof globalThis < "u" && globalThis.crypto && (v = globalThis.crypto), !v && typeof window < "u" && window.msCrypto && (v = window.msCrypto), !v && typeof vr < "u" && vr.crypto && (v = vr.crypto), !v && typeof pt == "function")
|
|
653
606
|
try {
|
|
654
|
-
|
|
607
|
+
v = Et;
|
|
655
608
|
} catch {
|
|
656
609
|
}
|
|
657
|
-
var
|
|
658
|
-
if (
|
|
659
|
-
if (typeof
|
|
610
|
+
var m = function() {
|
|
611
|
+
if (v) {
|
|
612
|
+
if (typeof v.getRandomValues == "function")
|
|
660
613
|
try {
|
|
661
|
-
return
|
|
614
|
+
return v.getRandomValues(new Uint32Array(1))[0];
|
|
662
615
|
} catch {
|
|
663
616
|
}
|
|
664
|
-
if (typeof
|
|
617
|
+
if (typeof v.randomBytes == "function")
|
|
665
618
|
try {
|
|
666
|
-
return
|
|
619
|
+
return v.randomBytes(4).readInt32LE();
|
|
667
620
|
} catch {
|
|
668
621
|
}
|
|
669
622
|
}
|
|
670
623
|
throw new Error("Native crypto module could not be used to get secure random number.");
|
|
671
|
-
},
|
|
624
|
+
}, B = Object.create || /* @__PURE__ */ (function() {
|
|
672
625
|
function i() {
|
|
673
626
|
}
|
|
674
627
|
return function(o) {
|
|
675
628
|
var d;
|
|
676
629
|
return i.prototype = o, d = new i(), i.prototype = null, d;
|
|
677
630
|
};
|
|
678
|
-
})(),
|
|
631
|
+
})(), C = {}, x = C.lib = {}, n = x.Base = /* @__PURE__ */ (function() {
|
|
679
632
|
return {
|
|
680
633
|
/**
|
|
681
634
|
* Creates a new object that inherits from this object.
|
|
@@ -696,7 +649,7 @@ function M() {
|
|
|
696
649
|
* });
|
|
697
650
|
*/
|
|
698
651
|
extend: function(i) {
|
|
699
|
-
var o =
|
|
652
|
+
var o = B(this);
|
|
700
653
|
return i && o.mixIn(i), (!o.hasOwnProperty("init") || this.init === o.init) && (o.init = function() {
|
|
701
654
|
o.$super.init.apply(this, arguments);
|
|
702
655
|
}), o.init.prototype = o, o.$super = this, o;
|
|
@@ -774,7 +727,7 @@ function M() {
|
|
|
774
727
|
* var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);
|
|
775
728
|
*/
|
|
776
729
|
init: function(i, o) {
|
|
777
|
-
i = this.words = i || [], o !=
|
|
730
|
+
i = this.words = i || [], o != u ? this.sigBytes = o : this.sigBytes = i.length * 4;
|
|
778
731
|
},
|
|
779
732
|
/**
|
|
780
733
|
* Converts this word array to a string.
|
|
@@ -804,16 +757,16 @@ function M() {
|
|
|
804
757
|
* wordArray1.concat(wordArray2);
|
|
805
758
|
*/
|
|
806
759
|
concat: function(i) {
|
|
807
|
-
var o = this.words, d = i.words, b = this.sigBytes,
|
|
760
|
+
var o = this.words, d = i.words, b = this.sigBytes, D = i.sigBytes;
|
|
808
761
|
if (this.clamp(), b % 4)
|
|
809
|
-
for (var y = 0; y <
|
|
762
|
+
for (var y = 0; y < D; y++) {
|
|
810
763
|
var k = d[y >>> 2] >>> 24 - y % 4 * 8 & 255;
|
|
811
764
|
o[b + y >>> 2] |= k << 24 - (b + y) % 4 * 8;
|
|
812
765
|
}
|
|
813
766
|
else
|
|
814
|
-
for (var
|
|
815
|
-
o[b +
|
|
816
|
-
return this.sigBytes +=
|
|
767
|
+
for (var R = 0; R < D; R += 4)
|
|
768
|
+
o[b + R >>> 2] = d[R >>> 2];
|
|
769
|
+
return this.sigBytes += D, this;
|
|
817
770
|
},
|
|
818
771
|
/**
|
|
819
772
|
* Removes insignificant bits.
|
|
@@ -854,10 +807,10 @@ function M() {
|
|
|
854
807
|
*/
|
|
855
808
|
random: function(i) {
|
|
856
809
|
for (var o = [], d = 0; d < i; d += 4)
|
|
857
|
-
o.push(
|
|
810
|
+
o.push(m());
|
|
858
811
|
return new E.init(o, i);
|
|
859
812
|
}
|
|
860
|
-
}), a =
|
|
813
|
+
}), a = C.enc = {}, s = a.Hex = {
|
|
861
814
|
/**
|
|
862
815
|
* Converts a word array to a hex string.
|
|
863
816
|
*
|
|
@@ -872,8 +825,8 @@ function M() {
|
|
|
872
825
|
* var hexString = CryptoJS.enc.Hex.stringify(wordArray);
|
|
873
826
|
*/
|
|
874
827
|
stringify: function(i) {
|
|
875
|
-
for (var o = i.words, d = i.sigBytes, b = [],
|
|
876
|
-
var y = o[
|
|
828
|
+
for (var o = i.words, d = i.sigBytes, b = [], D = 0; D < d; D++) {
|
|
829
|
+
var y = o[D >>> 2] >>> 24 - D % 4 * 8 & 255;
|
|
877
830
|
b.push((y >>> 4).toString(16)), b.push((y & 15).toString(16));
|
|
878
831
|
}
|
|
879
832
|
return b.join("");
|
|
@@ -896,7 +849,7 @@ function M() {
|
|
|
896
849
|
d[b >>> 3] |= parseInt(i.substr(b, 2), 16) << 24 - b % 8 * 4;
|
|
897
850
|
return new E.init(d, o / 2);
|
|
898
851
|
}
|
|
899
|
-
},
|
|
852
|
+
}, f = a.Latin1 = {
|
|
900
853
|
/**
|
|
901
854
|
* Converts a word array to a Latin1 string.
|
|
902
855
|
*
|
|
@@ -911,8 +864,8 @@ function M() {
|
|
|
911
864
|
* var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);
|
|
912
865
|
*/
|
|
913
866
|
stringify: function(i) {
|
|
914
|
-
for (var o = i.words, d = i.sigBytes, b = [],
|
|
915
|
-
var y = o[
|
|
867
|
+
for (var o = i.words, d = i.sigBytes, b = [], D = 0; D < d; D++) {
|
|
868
|
+
var y = o[D >>> 2] >>> 24 - D % 4 * 8 & 255;
|
|
916
869
|
b.push(String.fromCharCode(y));
|
|
917
870
|
}
|
|
918
871
|
return b.join("");
|
|
@@ -951,7 +904,7 @@ function M() {
|
|
|
951
904
|
*/
|
|
952
905
|
stringify: function(i) {
|
|
953
906
|
try {
|
|
954
|
-
return decodeURIComponent(escape(
|
|
907
|
+
return decodeURIComponent(escape(f.stringify(i)));
|
|
955
908
|
} catch {
|
|
956
909
|
throw new Error("Malformed UTF-8 data");
|
|
957
910
|
}
|
|
@@ -970,9 +923,9 @@ function M() {
|
|
|
970
923
|
* var wordArray = CryptoJS.enc.Utf8.parse(utf8String);
|
|
971
924
|
*/
|
|
972
925
|
parse: function(i) {
|
|
973
|
-
return
|
|
926
|
+
return f.parse(unescape(encodeURIComponent(i)));
|
|
974
927
|
}
|
|
975
|
-
},
|
|
928
|
+
}, l = x.BufferedBlockAlgorithm = n.extend({
|
|
976
929
|
/**
|
|
977
930
|
* Resets this block algorithm's data buffer to its initial state.
|
|
978
931
|
*
|
|
@@ -1011,9 +964,9 @@ function M() {
|
|
|
1011
964
|
* var processedData = bufferedBlockAlgorithm._process(!!'flush');
|
|
1012
965
|
*/
|
|
1013
966
|
_process: function(i) {
|
|
1014
|
-
var o, d = this._data, b = d.words,
|
|
1015
|
-
i ?
|
|
1016
|
-
var F =
|
|
967
|
+
var o, d = this._data, b = d.words, D = d.sigBytes, y = this.blockSize, k = y * 4, R = D / k;
|
|
968
|
+
i ? R = e.ceil(R) : R = e.max((R | 0) - this._minBufferSize, 0);
|
|
969
|
+
var F = R * y, w = e.min(F * 4, D);
|
|
1017
970
|
if (F) {
|
|
1018
971
|
for (var H = 0; H < F; H += y)
|
|
1019
972
|
this._doProcessBlock(b, H);
|
|
@@ -1036,7 +989,7 @@ function M() {
|
|
|
1036
989
|
},
|
|
1037
990
|
_minBufferSize: 0
|
|
1038
991
|
});
|
|
1039
|
-
x.Hasher =
|
|
992
|
+
x.Hasher = l.extend({
|
|
1040
993
|
/**
|
|
1041
994
|
* Configuration options.
|
|
1042
995
|
*/
|
|
@@ -1061,7 +1014,7 @@ function M() {
|
|
|
1061
1014
|
* hasher.reset();
|
|
1062
1015
|
*/
|
|
1063
1016
|
reset: function() {
|
|
1064
|
-
|
|
1017
|
+
l.reset.call(this), this._doReset();
|
|
1065
1018
|
},
|
|
1066
1019
|
/**
|
|
1067
1020
|
* Updates this hasher with a message.
|
|
@@ -1131,26 +1084,26 @@ function M() {
|
|
|
1131
1084
|
*/
|
|
1132
1085
|
_createHmacHelper: function(i) {
|
|
1133
1086
|
return function(o, d) {
|
|
1134
|
-
return new
|
|
1087
|
+
return new g.HMAC.init(i, d).finalize(o);
|
|
1135
1088
|
};
|
|
1136
1089
|
}
|
|
1137
1090
|
});
|
|
1138
|
-
var
|
|
1139
|
-
return
|
|
1091
|
+
var g = C.algo = {};
|
|
1092
|
+
return C;
|
|
1140
1093
|
})(Math);
|
|
1141
1094
|
return t;
|
|
1142
1095
|
});
|
|
1143
|
-
})(
|
|
1096
|
+
})(w0)), w0.exports;
|
|
1144
1097
|
}
|
|
1145
|
-
var
|
|
1146
|
-
function
|
|
1147
|
-
return
|
|
1098
|
+
var k0 = { exports: {} }, Ft = k0.exports, Tr;
|
|
1099
|
+
function ur() {
|
|
1100
|
+
return Tr || (Tr = 1, (function(r, h) {
|
|
1148
1101
|
(function(t, e) {
|
|
1149
1102
|
r.exports = e(M());
|
|
1150
|
-
})(
|
|
1103
|
+
})(Ft, function(t) {
|
|
1151
1104
|
return (function(e) {
|
|
1152
|
-
var
|
|
1153
|
-
|
|
1105
|
+
var u = t, v = u.lib, m = v.Base, B = v.WordArray, C = u.x64 = {};
|
|
1106
|
+
C.Word = m.extend({
|
|
1154
1107
|
/**
|
|
1155
1108
|
* Initializes a newly created 64-bit word.
|
|
1156
1109
|
*
|
|
@@ -1313,7 +1266,7 @@ function hr() {
|
|
|
1313
1266
|
// var high = (this.high + word.high + carry) | 0;
|
|
1314
1267
|
// return X64Word.create(high, low);
|
|
1315
1268
|
// }
|
|
1316
|
-
}),
|
|
1269
|
+
}), C.WordArray = m.extend({
|
|
1317
1270
|
/**
|
|
1318
1271
|
* Initializes a newly created word array.
|
|
1319
1272
|
*
|
|
@@ -1351,7 +1304,7 @@ function hr() {
|
|
|
1351
1304
|
var s = x[a];
|
|
1352
1305
|
E.push(s.high), E.push(s.low);
|
|
1353
1306
|
}
|
|
1354
|
-
return
|
|
1307
|
+
return B.create(E, this.sigBytes);
|
|
1355
1308
|
},
|
|
1356
1309
|
/**
|
|
1357
1310
|
* Creates a copy of this word array.
|
|
@@ -1363,46 +1316,46 @@ function hr() {
|
|
|
1363
1316
|
* var clone = x64WordArray.clone();
|
|
1364
1317
|
*/
|
|
1365
1318
|
clone: function() {
|
|
1366
|
-
for (var x =
|
|
1319
|
+
for (var x = m.clone.call(this), n = x.words = this.words.slice(0), E = n.length, a = 0; a < E; a++)
|
|
1367
1320
|
n[a] = n[a].clone();
|
|
1368
1321
|
return x;
|
|
1369
1322
|
}
|
|
1370
1323
|
});
|
|
1371
1324
|
})(), t;
|
|
1372
1325
|
});
|
|
1373
|
-
})(
|
|
1326
|
+
})(k0)), k0.exports;
|
|
1374
1327
|
}
|
|
1375
|
-
var
|
|
1376
|
-
function
|
|
1377
|
-
return
|
|
1328
|
+
var S0 = { exports: {} }, Dt = S0.exports, Mr;
|
|
1329
|
+
function gt() {
|
|
1330
|
+
return Mr || (Mr = 1, (function(r, h) {
|
|
1378
1331
|
(function(t, e) {
|
|
1379
1332
|
r.exports = e(M());
|
|
1380
|
-
})(
|
|
1333
|
+
})(Dt, function(t) {
|
|
1381
1334
|
return (function() {
|
|
1382
1335
|
if (typeof ArrayBuffer == "function") {
|
|
1383
|
-
var e = t,
|
|
1384
|
-
if (
|
|
1385
|
-
for (var x =
|
|
1386
|
-
n[E >>> 2] |=
|
|
1387
|
-
|
|
1336
|
+
var e = t, u = e.lib, v = u.WordArray, m = v.init, B = v.init = function(C) {
|
|
1337
|
+
if (C instanceof ArrayBuffer && (C = new Uint8Array(C)), (C instanceof Int8Array || typeof Uint8ClampedArray < "u" && C instanceof Uint8ClampedArray || C instanceof Int16Array || C instanceof Uint16Array || C instanceof Int32Array || C instanceof Uint32Array || C instanceof Float32Array || C instanceof Float64Array) && (C = new Uint8Array(C.buffer, C.byteOffset, C.byteLength)), C instanceof Uint8Array) {
|
|
1338
|
+
for (var x = C.byteLength, n = [], E = 0; E < x; E++)
|
|
1339
|
+
n[E >>> 2] |= C[E] << 24 - E % 4 * 8;
|
|
1340
|
+
m.call(this, n, x);
|
|
1388
1341
|
} else
|
|
1389
|
-
|
|
1342
|
+
m.apply(this, arguments);
|
|
1390
1343
|
};
|
|
1391
|
-
|
|
1344
|
+
B.prototype = v;
|
|
1392
1345
|
}
|
|
1393
1346
|
})(), t.lib.WordArray;
|
|
1394
1347
|
});
|
|
1395
|
-
})(
|
|
1348
|
+
})(S0)), S0.exports;
|
|
1396
1349
|
}
|
|
1397
|
-
var
|
|
1398
|
-
function
|
|
1399
|
-
return
|
|
1350
|
+
var H0 = { exports: {} }, bt = H0.exports, Nr;
|
|
1351
|
+
function mt() {
|
|
1352
|
+
return Nr || (Nr = 1, (function(r, h) {
|
|
1400
1353
|
(function(t, e) {
|
|
1401
1354
|
r.exports = e(M());
|
|
1402
|
-
})(
|
|
1355
|
+
})(bt, function(t) {
|
|
1403
1356
|
return (function() {
|
|
1404
|
-
var e = t,
|
|
1405
|
-
|
|
1357
|
+
var e = t, u = e.lib, v = u.WordArray, m = e.enc;
|
|
1358
|
+
m.Utf16 = m.Utf16BE = {
|
|
1406
1359
|
/**
|
|
1407
1360
|
* Converts a word array to a UTF-16 BE string.
|
|
1408
1361
|
*
|
|
@@ -1416,8 +1369,8 @@ function It() {
|
|
|
1416
1369
|
*
|
|
1417
1370
|
* var utf16String = CryptoJS.enc.Utf16.stringify(wordArray);
|
|
1418
1371
|
*/
|
|
1419
|
-
stringify: function(
|
|
1420
|
-
for (var x =
|
|
1372
|
+
stringify: function(C) {
|
|
1373
|
+
for (var x = C.words, n = C.sigBytes, E = [], a = 0; a < n; a += 2) {
|
|
1421
1374
|
var s = x[a >>> 2] >>> 16 - a % 4 * 8 & 65535;
|
|
1422
1375
|
E.push(String.fromCharCode(s));
|
|
1423
1376
|
}
|
|
@@ -1436,12 +1389,12 @@ function It() {
|
|
|
1436
1389
|
*
|
|
1437
1390
|
* var wordArray = CryptoJS.enc.Utf16.parse(utf16String);
|
|
1438
1391
|
*/
|
|
1439
|
-
parse: function(
|
|
1440
|
-
for (var x =
|
|
1441
|
-
n[E >>> 1] |=
|
|
1442
|
-
return
|
|
1392
|
+
parse: function(C) {
|
|
1393
|
+
for (var x = C.length, n = [], E = 0; E < x; E++)
|
|
1394
|
+
n[E >>> 1] |= C.charCodeAt(E) << 16 - E % 2 * 16;
|
|
1395
|
+
return v.create(n, x * 2);
|
|
1443
1396
|
}
|
|
1444
|
-
},
|
|
1397
|
+
}, m.Utf16LE = {
|
|
1445
1398
|
/**
|
|
1446
1399
|
* Converts a word array to a UTF-16 LE string.
|
|
1447
1400
|
*
|
|
@@ -1455,9 +1408,9 @@ function It() {
|
|
|
1455
1408
|
*
|
|
1456
1409
|
* var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray);
|
|
1457
1410
|
*/
|
|
1458
|
-
stringify: function(
|
|
1459
|
-
for (var x =
|
|
1460
|
-
var s =
|
|
1411
|
+
stringify: function(C) {
|
|
1412
|
+
for (var x = C.words, n = C.sigBytes, E = [], a = 0; a < n; a += 2) {
|
|
1413
|
+
var s = B(x[a >>> 2] >>> 16 - a % 4 * 8 & 65535);
|
|
1461
1414
|
E.push(String.fromCharCode(s));
|
|
1462
1415
|
}
|
|
1463
1416
|
return E.join("");
|
|
@@ -1475,28 +1428,28 @@ function It() {
|
|
|
1475
1428
|
*
|
|
1476
1429
|
* var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str);
|
|
1477
1430
|
*/
|
|
1478
|
-
parse: function(
|
|
1479
|
-
for (var x =
|
|
1480
|
-
n[E >>> 1] |= C
|
|
1481
|
-
return
|
|
1431
|
+
parse: function(C) {
|
|
1432
|
+
for (var x = C.length, n = [], E = 0; E < x; E++)
|
|
1433
|
+
n[E >>> 1] |= B(C.charCodeAt(E) << 16 - E % 2 * 16);
|
|
1434
|
+
return v.create(n, x * 2);
|
|
1482
1435
|
}
|
|
1483
1436
|
};
|
|
1484
|
-
function C
|
|
1485
|
-
return
|
|
1437
|
+
function B(C) {
|
|
1438
|
+
return C << 8 & 4278255360 | C >>> 8 & 16711935;
|
|
1486
1439
|
}
|
|
1487
1440
|
})(), t.enc.Utf16;
|
|
1488
1441
|
});
|
|
1489
|
-
})(
|
|
1442
|
+
})(H0)), H0.exports;
|
|
1490
1443
|
}
|
|
1491
|
-
var
|
|
1492
|
-
function
|
|
1493
|
-
return
|
|
1444
|
+
var $0 = { exports: {} }, _t = $0.exports, Ur;
|
|
1445
|
+
function s0() {
|
|
1446
|
+
return Ur || (Ur = 1, (function(r, h) {
|
|
1494
1447
|
(function(t, e) {
|
|
1495
1448
|
r.exports = e(M());
|
|
1496
|
-
})(
|
|
1449
|
+
})(_t, function(t) {
|
|
1497
1450
|
return (function() {
|
|
1498
|
-
var e = t,
|
|
1499
|
-
|
|
1451
|
+
var e = t, u = e.lib, v = u.WordArray, m = e.enc;
|
|
1452
|
+
m.Base64 = {
|
|
1500
1453
|
/**
|
|
1501
1454
|
* Converts a word array to a Base64 string.
|
|
1502
1455
|
*
|
|
@@ -1510,12 +1463,12 @@ function c0() {
|
|
|
1510
1463
|
*
|
|
1511
1464
|
* var base64String = CryptoJS.enc.Base64.stringify(wordArray);
|
|
1512
1465
|
*/
|
|
1513
|
-
stringify: function(
|
|
1514
|
-
var x =
|
|
1515
|
-
|
|
1466
|
+
stringify: function(C) {
|
|
1467
|
+
var x = C.words, n = C.sigBytes, E = this._map;
|
|
1468
|
+
C.clamp();
|
|
1516
1469
|
for (var a = [], s = 0; s < n; s += 3)
|
|
1517
|
-
for (var
|
|
1518
|
-
a.push(E.charAt(
|
|
1470
|
+
for (var f = x[s >>> 2] >>> 24 - s % 4 * 8 & 255, p = x[s + 1 >>> 2] >>> 24 - (s + 1) % 4 * 8 & 255, l = x[s + 2 >>> 2] >>> 24 - (s + 2) % 4 * 8 & 255, g = f << 16 | p << 8 | l, i = 0; i < 4 && s + i * 0.75 < n; i++)
|
|
1471
|
+
a.push(E.charAt(g >>> 6 * (3 - i) & 63));
|
|
1519
1472
|
var o = E.charAt(64);
|
|
1520
1473
|
if (o)
|
|
1521
1474
|
for (; a.length % 4; )
|
|
@@ -1535,8 +1488,8 @@ function c0() {
|
|
|
1535
1488
|
*
|
|
1536
1489
|
* var wordArray = CryptoJS.enc.Base64.parse(base64String);
|
|
1537
1490
|
*/
|
|
1538
|
-
parse: function(
|
|
1539
|
-
var x =
|
|
1491
|
+
parse: function(C) {
|
|
1492
|
+
var x = C.length, n = this._map, E = this._reverseMap;
|
|
1540
1493
|
if (!E) {
|
|
1541
1494
|
E = this._reverseMap = [];
|
|
1542
1495
|
for (var a = 0; a < n.length; a++)
|
|
@@ -1544,34 +1497,34 @@ function c0() {
|
|
|
1544
1497
|
}
|
|
1545
1498
|
var s = n.charAt(64);
|
|
1546
1499
|
if (s) {
|
|
1547
|
-
var
|
|
1548
|
-
|
|
1500
|
+
var f = C.indexOf(s);
|
|
1501
|
+
f !== -1 && (x = f);
|
|
1549
1502
|
}
|
|
1550
|
-
return C
|
|
1503
|
+
return B(C, x, E);
|
|
1551
1504
|
},
|
|
1552
1505
|
_map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
|
|
1553
1506
|
};
|
|
1554
|
-
function C
|
|
1507
|
+
function B(C, x, n) {
|
|
1555
1508
|
for (var E = [], a = 0, s = 0; s < x; s++)
|
|
1556
1509
|
if (s % 4) {
|
|
1557
|
-
var
|
|
1558
|
-
E[a >>> 2] |=
|
|
1510
|
+
var f = n[C.charCodeAt(s - 1)] << s % 4 * 2, p = n[C.charCodeAt(s)] >>> 6 - s % 4 * 2, l = f | p;
|
|
1511
|
+
E[a >>> 2] |= l << 24 - a % 4 * 8, a++;
|
|
1559
1512
|
}
|
|
1560
|
-
return
|
|
1513
|
+
return v.create(E, a);
|
|
1561
1514
|
}
|
|
1562
1515
|
})(), t.enc.Base64;
|
|
1563
1516
|
});
|
|
1564
|
-
})(
|
|
1517
|
+
})($0)), $0.exports;
|
|
1565
1518
|
}
|
|
1566
|
-
var
|
|
1567
|
-
function
|
|
1568
|
-
return
|
|
1519
|
+
var R0 = { exports: {} }, yt = R0.exports, jr;
|
|
1520
|
+
function wt() {
|
|
1521
|
+
return jr || (jr = 1, (function(r, h) {
|
|
1569
1522
|
(function(t, e) {
|
|
1570
1523
|
r.exports = e(M());
|
|
1571
|
-
})(
|
|
1524
|
+
})(yt, function(t) {
|
|
1572
1525
|
return (function() {
|
|
1573
|
-
var e = t,
|
|
1574
|
-
|
|
1526
|
+
var e = t, u = e.lib, v = u.WordArray, m = e.enc;
|
|
1527
|
+
m.Base64url = {
|
|
1575
1528
|
/**
|
|
1576
1529
|
* Converts a word array to a Base64url string.
|
|
1577
1530
|
*
|
|
@@ -1587,12 +1540,12 @@ function qt() {
|
|
|
1587
1540
|
*
|
|
1588
1541
|
* var base64String = CryptoJS.enc.Base64url.stringify(wordArray);
|
|
1589
1542
|
*/
|
|
1590
|
-
stringify: function(
|
|
1543
|
+
stringify: function(C, x) {
|
|
1591
1544
|
x === void 0 && (x = !0);
|
|
1592
|
-
var n =
|
|
1593
|
-
|
|
1594
|
-
for (var s = [],
|
|
1595
|
-
for (var p = n[
|
|
1545
|
+
var n = C.words, E = C.sigBytes, a = x ? this._safe_map : this._map;
|
|
1546
|
+
C.clamp();
|
|
1547
|
+
for (var s = [], f = 0; f < E; f += 3)
|
|
1548
|
+
for (var p = n[f >>> 2] >>> 24 - f % 4 * 8 & 255, l = n[f + 1 >>> 2] >>> 24 - (f + 1) % 4 * 8 & 255, g = n[f + 2 >>> 2] >>> 24 - (f + 2) % 4 * 8 & 255, i = p << 16 | l << 8 | g, o = 0; o < 4 && f + o * 0.75 < E; o++)
|
|
1596
1549
|
s.push(a.charAt(i >>> 6 * (3 - o) & 63));
|
|
1597
1550
|
var d = a.charAt(64);
|
|
1598
1551
|
if (d)
|
|
@@ -1615,112 +1568,112 @@ function qt() {
|
|
|
1615
1568
|
*
|
|
1616
1569
|
* var wordArray = CryptoJS.enc.Base64url.parse(base64String);
|
|
1617
1570
|
*/
|
|
1618
|
-
parse: function(
|
|
1571
|
+
parse: function(C, x) {
|
|
1619
1572
|
x === void 0 && (x = !0);
|
|
1620
|
-
var n =
|
|
1573
|
+
var n = C.length, E = x ? this._safe_map : this._map, a = this._reverseMap;
|
|
1621
1574
|
if (!a) {
|
|
1622
1575
|
a = this._reverseMap = [];
|
|
1623
1576
|
for (var s = 0; s < E.length; s++)
|
|
1624
1577
|
a[E.charCodeAt(s)] = s;
|
|
1625
1578
|
}
|
|
1626
|
-
var
|
|
1627
|
-
if (
|
|
1628
|
-
var p =
|
|
1579
|
+
var f = E.charAt(64);
|
|
1580
|
+
if (f) {
|
|
1581
|
+
var p = C.indexOf(f);
|
|
1629
1582
|
p !== -1 && (n = p);
|
|
1630
1583
|
}
|
|
1631
|
-
return C
|
|
1584
|
+
return B(C, n, a);
|
|
1632
1585
|
},
|
|
1633
1586
|
_map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
|
|
1634
1587
|
_safe_map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"
|
|
1635
1588
|
};
|
|
1636
|
-
function C
|
|
1589
|
+
function B(C, x, n) {
|
|
1637
1590
|
for (var E = [], a = 0, s = 0; s < x; s++)
|
|
1638
1591
|
if (s % 4) {
|
|
1639
|
-
var
|
|
1640
|
-
E[a >>> 2] |=
|
|
1592
|
+
var f = n[C.charCodeAt(s - 1)] << s % 4 * 2, p = n[C.charCodeAt(s)] >>> 6 - s % 4 * 2, l = f | p;
|
|
1593
|
+
E[a >>> 2] |= l << 24 - a % 4 * 8, a++;
|
|
1641
1594
|
}
|
|
1642
|
-
return
|
|
1595
|
+
return v.create(E, a);
|
|
1643
1596
|
}
|
|
1644
1597
|
})(), t.enc.Base64url;
|
|
1645
1598
|
});
|
|
1646
|
-
})(
|
|
1599
|
+
})(R0)), R0.exports;
|
|
1647
1600
|
}
|
|
1648
|
-
var
|
|
1649
|
-
function
|
|
1650
|
-
return
|
|
1601
|
+
var P0 = { exports: {} }, kt = P0.exports, Gr;
|
|
1602
|
+
function c0() {
|
|
1603
|
+
return Gr || (Gr = 1, (function(r, h) {
|
|
1651
1604
|
(function(t, e) {
|
|
1652
1605
|
r.exports = e(M());
|
|
1653
|
-
})(
|
|
1606
|
+
})(kt, function(t) {
|
|
1654
1607
|
return (function(e) {
|
|
1655
|
-
var
|
|
1608
|
+
var u = t, v = u.lib, m = v.WordArray, B = v.Hasher, C = u.algo, x = [];
|
|
1656
1609
|
(function() {
|
|
1657
1610
|
for (var p = 0; p < 64; p++)
|
|
1658
1611
|
x[p] = e.abs(e.sin(p + 1)) * 4294967296 | 0;
|
|
1659
1612
|
})();
|
|
1660
|
-
var n =
|
|
1613
|
+
var n = C.MD5 = B.extend({
|
|
1661
1614
|
_doReset: function() {
|
|
1662
|
-
this._hash = new
|
|
1615
|
+
this._hash = new m.init([
|
|
1663
1616
|
1732584193,
|
|
1664
1617
|
4023233417,
|
|
1665
1618
|
2562383102,
|
|
1666
1619
|
271733878
|
|
1667
1620
|
]);
|
|
1668
1621
|
},
|
|
1669
|
-
_doProcessBlock: function(p,
|
|
1670
|
-
for (var
|
|
1671
|
-
var i =
|
|
1622
|
+
_doProcessBlock: function(p, l) {
|
|
1623
|
+
for (var g = 0; g < 16; g++) {
|
|
1624
|
+
var i = l + g, o = p[i];
|
|
1672
1625
|
p[i] = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360;
|
|
1673
1626
|
}
|
|
1674
|
-
var d = this._hash.words, b = p[
|
|
1675
|
-
S = E(S, c, A,
|
|
1627
|
+
var d = this._hash.words, b = p[l + 0], D = p[l + 1], y = p[l + 2], k = p[l + 3], R = p[l + 4], F = p[l + 5], w = p[l + 6], H = p[l + 7], $ = p[l + 8], z = p[l + 9], O = p[l + 10], q = p[l + 11], U = p[l + 12], T = p[l + 13], N = p[l + 14], j = p[l + 15], S = d[0], c = d[1], A = d[2], _ = d[3];
|
|
1628
|
+
S = E(S, c, A, _, b, 7, x[0]), _ = E(_, S, c, A, D, 12, x[1]), A = E(A, _, S, c, y, 17, x[2]), c = E(c, A, _, S, k, 22, x[3]), S = E(S, c, A, _, R, 7, x[4]), _ = E(_, S, c, A, F, 12, x[5]), A = E(A, _, S, c, w, 17, x[6]), c = E(c, A, _, S, H, 22, x[7]), S = E(S, c, A, _, $, 7, x[8]), _ = E(_, S, c, A, z, 12, x[9]), A = E(A, _, S, c, O, 17, x[10]), c = E(c, A, _, S, q, 22, x[11]), S = E(S, c, A, _, U, 7, x[12]), _ = E(_, S, c, A, T, 12, x[13]), A = E(A, _, S, c, N, 17, x[14]), c = E(c, A, _, S, j, 22, x[15]), S = a(S, c, A, _, D, 5, x[16]), _ = a(_, S, c, A, w, 9, x[17]), A = a(A, _, S, c, q, 14, x[18]), c = a(c, A, _, S, b, 20, x[19]), S = a(S, c, A, _, F, 5, x[20]), _ = a(_, S, c, A, O, 9, x[21]), A = a(A, _, S, c, j, 14, x[22]), c = a(c, A, _, S, R, 20, x[23]), S = a(S, c, A, _, z, 5, x[24]), _ = a(_, S, c, A, N, 9, x[25]), A = a(A, _, S, c, k, 14, x[26]), c = a(c, A, _, S, $, 20, x[27]), S = a(S, c, A, _, T, 5, x[28]), _ = a(_, S, c, A, y, 9, x[29]), A = a(A, _, S, c, H, 14, x[30]), c = a(c, A, _, S, U, 20, x[31]), S = s(S, c, A, _, F, 4, x[32]), _ = s(_, S, c, A, $, 11, x[33]), A = s(A, _, S, c, q, 16, x[34]), c = s(c, A, _, S, N, 23, x[35]), S = s(S, c, A, _, D, 4, x[36]), _ = s(_, S, c, A, R, 11, x[37]), A = s(A, _, S, c, H, 16, x[38]), c = s(c, A, _, S, O, 23, x[39]), S = s(S, c, A, _, T, 4, x[40]), _ = s(_, S, c, A, b, 11, x[41]), A = s(A, _, S, c, k, 16, x[42]), c = s(c, A, _, S, w, 23, x[43]), S = s(S, c, A, _, z, 4, x[44]), _ = s(_, S, c, A, U, 11, x[45]), A = s(A, _, S, c, j, 16, x[46]), c = s(c, A, _, S, y, 23, x[47]), S = f(S, c, A, _, b, 6, x[48]), _ = f(_, S, c, A, H, 10, x[49]), A = f(A, _, S, c, N, 15, x[50]), c = f(c, A, _, S, F, 21, x[51]), S = f(S, c, A, _, U, 6, x[52]), _ = f(_, S, c, A, k, 10, x[53]), A = f(A, _, S, c, O, 15, x[54]), c = f(c, A, _, S, D, 21, x[55]), S = f(S, c, A, _, $, 6, x[56]), _ = f(_, S, c, A, j, 10, x[57]), A = f(A, _, S, c, w, 15, x[58]), c = f(c, A, _, S, T, 21, x[59]), S = f(S, c, A, _, R, 6, x[60]), _ = f(_, S, c, A, q, 10, x[61]), A = f(A, _, S, c, y, 15, x[62]), c = f(c, A, _, S, z, 21, x[63]), d[0] = d[0] + S | 0, d[1] = d[1] + c | 0, d[2] = d[2] + A | 0, d[3] = d[3] + _ | 0;
|
|
1676
1629
|
},
|
|
1677
1630
|
_doFinalize: function() {
|
|
1678
|
-
var p = this._data,
|
|
1679
|
-
|
|
1680
|
-
var o = e.floor(
|
|
1681
|
-
|
|
1682
|
-
for (var b = this._hash,
|
|
1683
|
-
var k =
|
|
1684
|
-
|
|
1631
|
+
var p = this._data, l = p.words, g = this._nDataBytes * 8, i = p.sigBytes * 8;
|
|
1632
|
+
l[i >>> 5] |= 128 << 24 - i % 32;
|
|
1633
|
+
var o = e.floor(g / 4294967296), d = g;
|
|
1634
|
+
l[(i + 64 >>> 9 << 4) + 15] = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360, l[(i + 64 >>> 9 << 4) + 14] = (d << 8 | d >>> 24) & 16711935 | (d << 24 | d >>> 8) & 4278255360, p.sigBytes = (l.length + 1) * 4, this._process();
|
|
1635
|
+
for (var b = this._hash, D = b.words, y = 0; y < 4; y++) {
|
|
1636
|
+
var k = D[y];
|
|
1637
|
+
D[y] = (k << 8 | k >>> 24) & 16711935 | (k << 24 | k >>> 8) & 4278255360;
|
|
1685
1638
|
}
|
|
1686
1639
|
return b;
|
|
1687
1640
|
},
|
|
1688
1641
|
clone: function() {
|
|
1689
|
-
var p =
|
|
1642
|
+
var p = B.clone.call(this);
|
|
1690
1643
|
return p._hash = this._hash.clone(), p;
|
|
1691
1644
|
}
|
|
1692
1645
|
});
|
|
1693
|
-
function E(p,
|
|
1694
|
-
var
|
|
1695
|
-
return (
|
|
1646
|
+
function E(p, l, g, i, o, d, b) {
|
|
1647
|
+
var D = p + (l & g | ~l & i) + o + b;
|
|
1648
|
+
return (D << d | D >>> 32 - d) + l;
|
|
1696
1649
|
}
|
|
1697
|
-
function a(p,
|
|
1698
|
-
var
|
|
1699
|
-
return (
|
|
1650
|
+
function a(p, l, g, i, o, d, b) {
|
|
1651
|
+
var D = p + (l & i | g & ~i) + o + b;
|
|
1652
|
+
return (D << d | D >>> 32 - d) + l;
|
|
1700
1653
|
}
|
|
1701
|
-
function s(p,
|
|
1702
|
-
var
|
|
1703
|
-
return (
|
|
1654
|
+
function s(p, l, g, i, o, d, b) {
|
|
1655
|
+
var D = p + (l ^ g ^ i) + o + b;
|
|
1656
|
+
return (D << d | D >>> 32 - d) + l;
|
|
1704
1657
|
}
|
|
1705
|
-
function
|
|
1706
|
-
var
|
|
1707
|
-
return (
|
|
1658
|
+
function f(p, l, g, i, o, d, b) {
|
|
1659
|
+
var D = p + (g ^ (l | ~i)) + o + b;
|
|
1660
|
+
return (D << d | D >>> 32 - d) + l;
|
|
1708
1661
|
}
|
|
1709
|
-
|
|
1662
|
+
u.MD5 = B._createHelper(n), u.HmacMD5 = B._createHmacHelper(n);
|
|
1710
1663
|
})(Math), t.MD5;
|
|
1711
1664
|
});
|
|
1712
|
-
})(
|
|
1665
|
+
})(P0)), P0.exports;
|
|
1713
1666
|
}
|
|
1714
|
-
var
|
|
1715
|
-
function
|
|
1716
|
-
return
|
|
1667
|
+
var z0 = { exports: {} }, St = z0.exports, Kr;
|
|
1668
|
+
function Se() {
|
|
1669
|
+
return Kr || (Kr = 1, (function(r, h) {
|
|
1717
1670
|
(function(t, e) {
|
|
1718
1671
|
r.exports = e(M());
|
|
1719
|
-
})(
|
|
1672
|
+
})(St, function(t) {
|
|
1720
1673
|
return (function() {
|
|
1721
|
-
var e = t,
|
|
1674
|
+
var e = t, u = e.lib, v = u.WordArray, m = u.Hasher, B = e.algo, C = [], x = B.SHA1 = m.extend({
|
|
1722
1675
|
_doReset: function() {
|
|
1723
|
-
this._hash = new
|
|
1676
|
+
this._hash = new v.init([
|
|
1724
1677
|
1732584193,
|
|
1725
1678
|
4023233417,
|
|
1726
1679
|
2562383102,
|
|
@@ -1729,94 +1682,94 @@ function $e() {
|
|
|
1729
1682
|
]);
|
|
1730
1683
|
},
|
|
1731
1684
|
_doProcessBlock: function(n, E) {
|
|
1732
|
-
for (var a = this._hash.words, s = a[0],
|
|
1685
|
+
for (var a = this._hash.words, s = a[0], f = a[1], p = a[2], l = a[3], g = a[4], i = 0; i < 80; i++) {
|
|
1733
1686
|
if (i < 16)
|
|
1734
|
-
|
|
1687
|
+
C[i] = n[E + i] | 0;
|
|
1735
1688
|
else {
|
|
1736
|
-
var o =
|
|
1737
|
-
|
|
1689
|
+
var o = C[i - 3] ^ C[i - 8] ^ C[i - 14] ^ C[i - 16];
|
|
1690
|
+
C[i] = o << 1 | o >>> 31;
|
|
1738
1691
|
}
|
|
1739
|
-
var d = (s << 5 | s >>> 27) +
|
|
1740
|
-
i < 20 ? d += (
|
|
1692
|
+
var d = (s << 5 | s >>> 27) + g + C[i];
|
|
1693
|
+
i < 20 ? d += (f & p | ~f & l) + 1518500249 : i < 40 ? d += (f ^ p ^ l) + 1859775393 : i < 60 ? d += (f & p | f & l | p & l) - 1894007588 : d += (f ^ p ^ l) - 899497514, g = l, l = p, p = f << 30 | f >>> 2, f = s, s = d;
|
|
1741
1694
|
}
|
|
1742
|
-
a[0] = a[0] + s | 0, a[1] = a[1] +
|
|
1695
|
+
a[0] = a[0] + s | 0, a[1] = a[1] + f | 0, a[2] = a[2] + p | 0, a[3] = a[3] + l | 0, a[4] = a[4] + g | 0;
|
|
1743
1696
|
},
|
|
1744
1697
|
_doFinalize: function() {
|
|
1745
1698
|
var n = this._data, E = n.words, a = this._nDataBytes * 8, s = n.sigBytes * 8;
|
|
1746
1699
|
return E[s >>> 5] |= 128 << 24 - s % 32, E[(s + 64 >>> 9 << 4) + 14] = Math.floor(a / 4294967296), E[(s + 64 >>> 9 << 4) + 15] = a, n.sigBytes = E.length * 4, this._process(), this._hash;
|
|
1747
1700
|
},
|
|
1748
1701
|
clone: function() {
|
|
1749
|
-
var n =
|
|
1702
|
+
var n = m.clone.call(this);
|
|
1750
1703
|
return n._hash = this._hash.clone(), n;
|
|
1751
1704
|
}
|
|
1752
1705
|
});
|
|
1753
|
-
e.SHA1 =
|
|
1706
|
+
e.SHA1 = m._createHelper(x), e.HmacSHA1 = m._createHmacHelper(x);
|
|
1754
1707
|
})(), t.SHA1;
|
|
1755
1708
|
});
|
|
1756
|
-
})(
|
|
1709
|
+
})(z0)), z0.exports;
|
|
1757
1710
|
}
|
|
1758
|
-
var
|
|
1759
|
-
function
|
|
1760
|
-
return
|
|
1711
|
+
var W0 = { exports: {} }, Ht = W0.exports, Xr;
|
|
1712
|
+
function Dr() {
|
|
1713
|
+
return Xr || (Xr = 1, (function(r, h) {
|
|
1761
1714
|
(function(t, e) {
|
|
1762
1715
|
r.exports = e(M());
|
|
1763
|
-
})(
|
|
1716
|
+
})(Ht, function(t) {
|
|
1764
1717
|
return (function(e) {
|
|
1765
|
-
var
|
|
1718
|
+
var u = t, v = u.lib, m = v.WordArray, B = v.Hasher, C = u.algo, x = [], n = [];
|
|
1766
1719
|
(function() {
|
|
1767
|
-
function s(
|
|
1768
|
-
for (var i = e.sqrt(
|
|
1769
|
-
if (!(
|
|
1720
|
+
function s(g) {
|
|
1721
|
+
for (var i = e.sqrt(g), o = 2; o <= i; o++)
|
|
1722
|
+
if (!(g % o))
|
|
1770
1723
|
return !1;
|
|
1771
1724
|
return !0;
|
|
1772
1725
|
}
|
|
1773
|
-
function
|
|
1774
|
-
return (
|
|
1726
|
+
function f(g) {
|
|
1727
|
+
return (g - (g | 0)) * 4294967296 | 0;
|
|
1775
1728
|
}
|
|
1776
|
-
for (var p = 2,
|
|
1777
|
-
s(p) && (
|
|
1729
|
+
for (var p = 2, l = 0; l < 64; )
|
|
1730
|
+
s(p) && (l < 8 && (x[l] = f(e.pow(p, 1 / 2))), n[l] = f(e.pow(p, 1 / 3)), l++), p++;
|
|
1778
1731
|
})();
|
|
1779
|
-
var E = [], a =
|
|
1732
|
+
var E = [], a = C.SHA256 = B.extend({
|
|
1780
1733
|
_doReset: function() {
|
|
1781
|
-
this._hash = new
|
|
1734
|
+
this._hash = new m.init(x.slice(0));
|
|
1782
1735
|
},
|
|
1783
|
-
_doProcessBlock: function(s,
|
|
1784
|
-
for (var p = this._hash.words,
|
|
1736
|
+
_doProcessBlock: function(s, f) {
|
|
1737
|
+
for (var p = this._hash.words, l = p[0], g = p[1], i = p[2], o = p[3], d = p[4], b = p[5], D = p[6], y = p[7], k = 0; k < 64; k++) {
|
|
1785
1738
|
if (k < 16)
|
|
1786
|
-
E[k] = s[
|
|
1739
|
+
E[k] = s[f + k] | 0;
|
|
1787
1740
|
else {
|
|
1788
|
-
var
|
|
1741
|
+
var R = E[k - 15], F = (R << 25 | R >>> 7) ^ (R << 14 | R >>> 18) ^ R >>> 3, w = E[k - 2], H = (w << 15 | w >>> 17) ^ (w << 13 | w >>> 19) ^ w >>> 10;
|
|
1789
1742
|
E[k] = F + E[k - 7] + H + E[k - 16];
|
|
1790
1743
|
}
|
|
1791
|
-
var
|
|
1792
|
-
y =
|
|
1744
|
+
var $ = d & b ^ ~d & D, z = l & g ^ l & i ^ g & i, O = (l << 30 | l >>> 2) ^ (l << 19 | l >>> 13) ^ (l << 10 | l >>> 22), q = (d << 26 | d >>> 6) ^ (d << 21 | d >>> 11) ^ (d << 7 | d >>> 25), U = y + q + $ + n[k] + E[k], T = O + z;
|
|
1745
|
+
y = D, D = b, b = d, d = o + U | 0, o = i, i = g, g = l, l = U + T | 0;
|
|
1793
1746
|
}
|
|
1794
|
-
p[0] = p[0] +
|
|
1747
|
+
p[0] = p[0] + l | 0, p[1] = p[1] + g | 0, p[2] = p[2] + i | 0, p[3] = p[3] + o | 0, p[4] = p[4] + d | 0, p[5] = p[5] + b | 0, p[6] = p[6] + D | 0, p[7] = p[7] + y | 0;
|
|
1795
1748
|
},
|
|
1796
1749
|
_doFinalize: function() {
|
|
1797
|
-
var s = this._data,
|
|
1798
|
-
return
|
|
1750
|
+
var s = this._data, f = s.words, p = this._nDataBytes * 8, l = s.sigBytes * 8;
|
|
1751
|
+
return f[l >>> 5] |= 128 << 24 - l % 32, f[(l + 64 >>> 9 << 4) + 14] = e.floor(p / 4294967296), f[(l + 64 >>> 9 << 4) + 15] = p, s.sigBytes = f.length * 4, this._process(), this._hash;
|
|
1799
1752
|
},
|
|
1800
1753
|
clone: function() {
|
|
1801
|
-
var s =
|
|
1754
|
+
var s = B.clone.call(this);
|
|
1802
1755
|
return s._hash = this._hash.clone(), s;
|
|
1803
1756
|
}
|
|
1804
1757
|
});
|
|
1805
|
-
|
|
1758
|
+
u.SHA256 = B._createHelper(a), u.HmacSHA256 = B._createHmacHelper(a);
|
|
1806
1759
|
})(Math), t.SHA256;
|
|
1807
1760
|
});
|
|
1808
|
-
})(
|
|
1761
|
+
})(W0)), W0.exports;
|
|
1809
1762
|
}
|
|
1810
|
-
var
|
|
1811
|
-
function
|
|
1812
|
-
return
|
|
1813
|
-
(function(t, e,
|
|
1814
|
-
r.exports = e(M(),
|
|
1815
|
-
})(
|
|
1763
|
+
var L0 = { exports: {} }, $t = L0.exports, Zr;
|
|
1764
|
+
function Rt() {
|
|
1765
|
+
return Zr || (Zr = 1, (function(r, h) {
|
|
1766
|
+
(function(t, e, u) {
|
|
1767
|
+
r.exports = e(M(), Dr());
|
|
1768
|
+
})($t, function(t) {
|
|
1816
1769
|
return (function() {
|
|
1817
|
-
var e = t,
|
|
1770
|
+
var e = t, u = e.lib, v = u.WordArray, m = e.algo, B = m.SHA256, C = m.SHA224 = B.extend({
|
|
1818
1771
|
_doReset: function() {
|
|
1819
|
-
this._hash = new
|
|
1772
|
+
this._hash = new v.init([
|
|
1820
1773
|
3238371032,
|
|
1821
1774
|
914150663,
|
|
1822
1775
|
812702999,
|
|
@@ -1828,25 +1781,25 @@ function jt() {
|
|
|
1828
1781
|
]);
|
|
1829
1782
|
},
|
|
1830
1783
|
_doFinalize: function() {
|
|
1831
|
-
var x =
|
|
1784
|
+
var x = B._doFinalize.call(this);
|
|
1832
1785
|
return x.sigBytes -= 4, x;
|
|
1833
1786
|
}
|
|
1834
1787
|
});
|
|
1835
|
-
e.SHA224 =
|
|
1788
|
+
e.SHA224 = B._createHelper(C), e.HmacSHA224 = B._createHmacHelper(C);
|
|
1836
1789
|
})(), t.SHA224;
|
|
1837
1790
|
});
|
|
1838
|
-
})(
|
|
1791
|
+
})(L0)), L0.exports;
|
|
1839
1792
|
}
|
|
1840
|
-
var
|
|
1841
|
-
function
|
|
1842
|
-
return
|
|
1843
|
-
(function(t, e,
|
|
1844
|
-
r.exports = e(M(),
|
|
1845
|
-
})(
|
|
1793
|
+
var I0 = { exports: {} }, Pt = I0.exports, Yr;
|
|
1794
|
+
function He() {
|
|
1795
|
+
return Yr || (Yr = 1, (function(r, h) {
|
|
1796
|
+
(function(t, e, u) {
|
|
1797
|
+
r.exports = e(M(), ur());
|
|
1798
|
+
})(Pt, function(t) {
|
|
1846
1799
|
return (function() {
|
|
1847
|
-
var e = t,
|
|
1800
|
+
var e = t, u = e.lib, v = u.Hasher, m = e.x64, B = m.Word, C = m.WordArray, x = e.algo;
|
|
1848
1801
|
function n() {
|
|
1849
|
-
return
|
|
1802
|
+
return B.create.apply(B, arguments);
|
|
1850
1803
|
}
|
|
1851
1804
|
var E = [
|
|
1852
1805
|
n(1116352408, 3609767458),
|
|
@@ -1931,117 +1884,117 @@ function Pe() {
|
|
|
1931
1884
|
n(1816402316, 1246189591)
|
|
1932
1885
|
], a = [];
|
|
1933
1886
|
(function() {
|
|
1934
|
-
for (var
|
|
1935
|
-
a[
|
|
1887
|
+
for (var f = 0; f < 80; f++)
|
|
1888
|
+
a[f] = n();
|
|
1936
1889
|
})();
|
|
1937
|
-
var s = x.SHA512 =
|
|
1890
|
+
var s = x.SHA512 = v.extend({
|
|
1938
1891
|
_doReset: function() {
|
|
1939
|
-
this._hash = new
|
|
1940
|
-
new
|
|
1941
|
-
new
|
|
1942
|
-
new
|
|
1943
|
-
new
|
|
1944
|
-
new
|
|
1945
|
-
new
|
|
1946
|
-
new
|
|
1947
|
-
new
|
|
1892
|
+
this._hash = new C.init([
|
|
1893
|
+
new B.init(1779033703, 4089235720),
|
|
1894
|
+
new B.init(3144134277, 2227873595),
|
|
1895
|
+
new B.init(1013904242, 4271175723),
|
|
1896
|
+
new B.init(2773480762, 1595750129),
|
|
1897
|
+
new B.init(1359893119, 2917565137),
|
|
1898
|
+
new B.init(2600822924, 725511199),
|
|
1899
|
+
new B.init(528734635, 4215389547),
|
|
1900
|
+
new B.init(1541459225, 327033209)
|
|
1948
1901
|
]);
|
|
1949
1902
|
},
|
|
1950
|
-
_doProcessBlock: function(
|
|
1951
|
-
for (var
|
|
1952
|
-
var J,
|
|
1903
|
+
_doProcessBlock: function(f, p) {
|
|
1904
|
+
for (var l = this._hash.words, g = l[0], i = l[1], o = l[2], d = l[3], b = l[4], D = l[5], y = l[6], k = l[7], R = g.high, F = g.low, w = i.high, H = i.low, $ = o.high, z = o.low, O = d.high, q = d.low, U = b.high, T = b.low, N = D.high, j = D.low, S = y.high, c = y.low, A = k.high, _ = k.low, W = R, P = F, I = w, L = H, Y = $, Q = z, o0 = O, K = q, G = U, Z = T, e0 = N, f0 = j, g0 = S, p0 = c, dr = A, B0 = _, t0 = 0; t0 < 80; t0++) {
|
|
1905
|
+
var J, x0, b0 = a[t0];
|
|
1953
1906
|
if (t0 < 16)
|
|
1954
|
-
|
|
1907
|
+
x0 = b0.high = f[p + t0 * 2] | 0, J = b0.low = f[p + t0 * 2 + 1] | 0;
|
|
1955
1908
|
else {
|
|
1956
|
-
var
|
|
1957
|
-
J =
|
|
1909
|
+
var mr = a[t0 - 15], u0 = mr.high, C0 = mr.low, Ie = (u0 >>> 1 | C0 << 31) ^ (u0 >>> 8 | C0 << 24) ^ u0 >>> 7, _r = (C0 >>> 1 | u0 << 31) ^ (C0 >>> 8 | u0 << 24) ^ (C0 >>> 7 | u0 << 25), yr = a[t0 - 2], d0 = yr.high, E0 = yr.low, Oe = (d0 >>> 19 | E0 << 13) ^ (d0 << 3 | E0 >>> 29) ^ d0 >>> 6, wr = (E0 >>> 19 | d0 << 13) ^ (E0 << 3 | d0 >>> 29) ^ (E0 >>> 6 | d0 << 26), kr = a[t0 - 7], qe = kr.high, Te = kr.low, Sr = a[t0 - 16], Me = Sr.high, Hr = Sr.low;
|
|
1910
|
+
J = _r + Te, x0 = Ie + qe + (J >>> 0 < _r >>> 0 ? 1 : 0), J = J + wr, x0 = x0 + Oe + (J >>> 0 < wr >>> 0 ? 1 : 0), J = J + Hr, x0 = x0 + Me + (J >>> 0 < Hr >>> 0 ? 1 : 0), b0.high = x0, b0.low = J;
|
|
1958
1911
|
}
|
|
1959
|
-
var
|
|
1960
|
-
|
|
1912
|
+
var Ne = G & e0 ^ ~G & g0, $r = Z & f0 ^ ~Z & p0, Ue = W & I ^ W & Y ^ I & Y, je = P & L ^ P & Q ^ L & Q, Ge = (W >>> 28 | P << 4) ^ (W << 30 | P >>> 2) ^ (W << 25 | P >>> 7), Rr = (P >>> 28 | W << 4) ^ (P << 30 | W >>> 2) ^ (P << 25 | W >>> 7), Ke = (G >>> 14 | Z << 18) ^ (G >>> 18 | Z << 14) ^ (G << 23 | Z >>> 9), Xe = (Z >>> 14 | G << 18) ^ (Z >>> 18 | G << 14) ^ (Z << 23 | G >>> 9), Pr = E[t0], Ze = Pr.high, zr = Pr.low, V = B0 + Xe, n0 = dr + Ke + (V >>> 0 < B0 >>> 0 ? 1 : 0), V = V + $r, n0 = n0 + Ne + (V >>> 0 < $r >>> 0 ? 1 : 0), V = V + zr, n0 = n0 + Ze + (V >>> 0 < zr >>> 0 ? 1 : 0), V = V + J, n0 = n0 + x0 + (V >>> 0 < J >>> 0 ? 1 : 0), Wr = Rr + je, Ye = Ge + Ue + (Wr >>> 0 < Rr >>> 0 ? 1 : 0);
|
|
1913
|
+
dr = g0, B0 = p0, g0 = e0, p0 = f0, e0 = G, f0 = Z, Z = K + V | 0, G = o0 + n0 + (Z >>> 0 < K >>> 0 ? 1 : 0) | 0, o0 = Y, K = Q, Y = I, Q = L, I = W, L = P, P = V + Wr | 0, W = n0 + Ye + (P >>> 0 < V >>> 0 ? 1 : 0) | 0;
|
|
1961
1914
|
}
|
|
1962
|
-
F =
|
|
1915
|
+
F = g.low = F + P, g.high = R + W + (F >>> 0 < P >>> 0 ? 1 : 0), H = i.low = H + L, i.high = w + I + (H >>> 0 < L >>> 0 ? 1 : 0), z = o.low = z + Q, o.high = $ + Y + (z >>> 0 < Q >>> 0 ? 1 : 0), q = d.low = q + K, d.high = O + o0 + (q >>> 0 < K >>> 0 ? 1 : 0), T = b.low = T + Z, b.high = U + G + (T >>> 0 < Z >>> 0 ? 1 : 0), j = D.low = j + f0, D.high = N + e0 + (j >>> 0 < f0 >>> 0 ? 1 : 0), c = y.low = c + p0, y.high = S + g0 + (c >>> 0 < p0 >>> 0 ? 1 : 0), _ = k.low = _ + B0, k.high = A + dr + (_ >>> 0 < B0 >>> 0 ? 1 : 0);
|
|
1963
1916
|
},
|
|
1964
1917
|
_doFinalize: function() {
|
|
1965
|
-
var
|
|
1966
|
-
p[
|
|
1918
|
+
var f = this._data, p = f.words, l = this._nDataBytes * 8, g = f.sigBytes * 8;
|
|
1919
|
+
p[g >>> 5] |= 128 << 24 - g % 32, p[(g + 128 >>> 10 << 5) + 30] = Math.floor(l / 4294967296), p[(g + 128 >>> 10 << 5) + 31] = l, f.sigBytes = p.length * 4, this._process();
|
|
1967
1920
|
var i = this._hash.toX32();
|
|
1968
1921
|
return i;
|
|
1969
1922
|
},
|
|
1970
1923
|
clone: function() {
|
|
1971
|
-
var
|
|
1972
|
-
return
|
|
1924
|
+
var f = v.clone.call(this);
|
|
1925
|
+
return f._hash = this._hash.clone(), f;
|
|
1973
1926
|
},
|
|
1974
1927
|
blockSize: 1024 / 32
|
|
1975
1928
|
});
|
|
1976
|
-
e.SHA512 =
|
|
1929
|
+
e.SHA512 = v._createHelper(s), e.HmacSHA512 = v._createHmacHelper(s);
|
|
1977
1930
|
})(), t.SHA512;
|
|
1978
1931
|
});
|
|
1979
|
-
})(
|
|
1932
|
+
})(I0)), I0.exports;
|
|
1980
1933
|
}
|
|
1981
|
-
var
|
|
1982
|
-
function
|
|
1983
|
-
return
|
|
1984
|
-
(function(t, e,
|
|
1985
|
-
r.exports = e(M(),
|
|
1986
|
-
})(
|
|
1934
|
+
var O0 = { exports: {} }, zt = O0.exports, Qr;
|
|
1935
|
+
function Wt() {
|
|
1936
|
+
return Qr || (Qr = 1, (function(r, h) {
|
|
1937
|
+
(function(t, e, u) {
|
|
1938
|
+
r.exports = e(M(), ur(), He());
|
|
1939
|
+
})(zt, function(t) {
|
|
1987
1940
|
return (function() {
|
|
1988
|
-
var e = t,
|
|
1941
|
+
var e = t, u = e.x64, v = u.Word, m = u.WordArray, B = e.algo, C = B.SHA512, x = B.SHA384 = C.extend({
|
|
1989
1942
|
_doReset: function() {
|
|
1990
|
-
this._hash = new
|
|
1991
|
-
new
|
|
1992
|
-
new
|
|
1993
|
-
new
|
|
1994
|
-
new
|
|
1995
|
-
new
|
|
1996
|
-
new
|
|
1997
|
-
new
|
|
1998
|
-
new
|
|
1943
|
+
this._hash = new m.init([
|
|
1944
|
+
new v.init(3418070365, 3238371032),
|
|
1945
|
+
new v.init(1654270250, 914150663),
|
|
1946
|
+
new v.init(2438529370, 812702999),
|
|
1947
|
+
new v.init(355462360, 4144912697),
|
|
1948
|
+
new v.init(1731405415, 4290775857),
|
|
1949
|
+
new v.init(2394180231, 1750603025),
|
|
1950
|
+
new v.init(3675008525, 1694076839),
|
|
1951
|
+
new v.init(1203062813, 3204075428)
|
|
1999
1952
|
]);
|
|
2000
1953
|
},
|
|
2001
1954
|
_doFinalize: function() {
|
|
2002
|
-
var n =
|
|
1955
|
+
var n = C._doFinalize.call(this);
|
|
2003
1956
|
return n.sigBytes -= 16, n;
|
|
2004
1957
|
}
|
|
2005
1958
|
});
|
|
2006
|
-
e.SHA384 =
|
|
1959
|
+
e.SHA384 = C._createHelper(x), e.HmacSHA384 = C._createHmacHelper(x);
|
|
2007
1960
|
})(), t.SHA384;
|
|
2008
1961
|
});
|
|
2009
|
-
})(
|
|
1962
|
+
})(O0)), O0.exports;
|
|
2010
1963
|
}
|
|
2011
|
-
var
|
|
2012
|
-
function
|
|
2013
|
-
return
|
|
2014
|
-
(function(t, e,
|
|
2015
|
-
r.exports = e(M(),
|
|
2016
|
-
})(
|
|
1964
|
+
var q0 = { exports: {} }, Lt = q0.exports, Vr;
|
|
1965
|
+
function It() {
|
|
1966
|
+
return Vr || (Vr = 1, (function(r, h) {
|
|
1967
|
+
(function(t, e, u) {
|
|
1968
|
+
r.exports = e(M(), ur());
|
|
1969
|
+
})(Lt, function(t) {
|
|
2017
1970
|
return (function(e) {
|
|
2018
|
-
var
|
|
1971
|
+
var u = t, v = u.lib, m = v.WordArray, B = v.Hasher, C = u.x64, x = C.Word, n = u.algo, E = [], a = [], s = [];
|
|
2019
1972
|
(function() {
|
|
2020
|
-
for (var
|
|
2021
|
-
E[
|
|
2022
|
-
var o =
|
|
2023
|
-
|
|
1973
|
+
for (var l = 1, g = 0, i = 0; i < 24; i++) {
|
|
1974
|
+
E[l + 5 * g] = (i + 1) * (i + 2) / 2 % 64;
|
|
1975
|
+
var o = g % 5, d = (2 * l + 3 * g) % 5;
|
|
1976
|
+
l = o, g = d;
|
|
2024
1977
|
}
|
|
2025
|
-
for (var
|
|
2026
|
-
for (var
|
|
2027
|
-
a[
|
|
2028
|
-
for (var b = 1,
|
|
2029
|
-
for (var y = 0, k = 0,
|
|
1978
|
+
for (var l = 0; l < 5; l++)
|
|
1979
|
+
for (var g = 0; g < 5; g++)
|
|
1980
|
+
a[l + 5 * g] = g + (2 * l + 3 * g) % 5 * 5;
|
|
1981
|
+
for (var b = 1, D = 0; D < 24; D++) {
|
|
1982
|
+
for (var y = 0, k = 0, R = 0; R < 7; R++) {
|
|
2030
1983
|
if (b & 1) {
|
|
2031
|
-
var F = (1 <<
|
|
1984
|
+
var F = (1 << R) - 1;
|
|
2032
1985
|
F < 32 ? k ^= 1 << F : y ^= 1 << F - 32;
|
|
2033
1986
|
}
|
|
2034
1987
|
b & 128 ? b = b << 1 ^ 113 : b <<= 1;
|
|
2035
1988
|
}
|
|
2036
|
-
s[
|
|
1989
|
+
s[D] = x.create(y, k);
|
|
2037
1990
|
}
|
|
2038
1991
|
})();
|
|
2039
|
-
var
|
|
1992
|
+
var f = [];
|
|
2040
1993
|
(function() {
|
|
2041
|
-
for (var
|
|
2042
|
-
|
|
1994
|
+
for (var l = 0; l < 25; l++)
|
|
1995
|
+
f[l] = x.create();
|
|
2043
1996
|
})();
|
|
2044
|
-
var p = n.SHA3 =
|
|
1997
|
+
var p = n.SHA3 = B.extend({
|
|
2045
1998
|
/**
|
|
2046
1999
|
* Configuration options.
|
|
2047
2000
|
*
|
|
@@ -2050,82 +2003,82 @@ function Yt() {
|
|
|
2050
2003
|
* Only values permitted are: 224, 256, 384, 512.
|
|
2051
2004
|
* Default: 512
|
|
2052
2005
|
*/
|
|
2053
|
-
cfg:
|
|
2006
|
+
cfg: B.cfg.extend({
|
|
2054
2007
|
outputLength: 512
|
|
2055
2008
|
}),
|
|
2056
2009
|
_doReset: function() {
|
|
2057
|
-
for (var
|
|
2058
|
-
|
|
2010
|
+
for (var l = this._state = [], g = 0; g < 25; g++)
|
|
2011
|
+
l[g] = new x.init();
|
|
2059
2012
|
this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32;
|
|
2060
2013
|
},
|
|
2061
|
-
_doProcessBlock: function(
|
|
2014
|
+
_doProcessBlock: function(l, g) {
|
|
2062
2015
|
for (var i = this._state, o = this.blockSize / 2, d = 0; d < o; d++) {
|
|
2063
|
-
var b =
|
|
2064
|
-
b = (b << 8 | b >>> 24) & 16711935 | (b << 24 | b >>> 8) & 4278255360,
|
|
2016
|
+
var b = l[g + 2 * d], D = l[g + 2 * d + 1];
|
|
2017
|
+
b = (b << 8 | b >>> 24) & 16711935 | (b << 24 | b >>> 8) & 4278255360, D = (D << 8 | D >>> 24) & 16711935 | (D << 24 | D >>> 8) & 4278255360;
|
|
2065
2018
|
var y = i[d];
|
|
2066
|
-
y.high ^=
|
|
2019
|
+
y.high ^= D, y.low ^= b;
|
|
2067
2020
|
}
|
|
2068
2021
|
for (var k = 0; k < 24; k++) {
|
|
2069
|
-
for (var
|
|
2022
|
+
for (var R = 0; R < 5; R++) {
|
|
2070
2023
|
for (var F = 0, w = 0, H = 0; H < 5; H++) {
|
|
2071
|
-
var y = i[
|
|
2024
|
+
var y = i[R + 5 * H];
|
|
2072
2025
|
F ^= y.high, w ^= y.low;
|
|
2073
2026
|
}
|
|
2074
|
-
var
|
|
2075
|
-
|
|
2027
|
+
var $ = f[R];
|
|
2028
|
+
$.high = F, $.low = w;
|
|
2076
2029
|
}
|
|
2077
|
-
for (var
|
|
2078
|
-
for (var z =
|
|
2079
|
-
var y = i[
|
|
2030
|
+
for (var R = 0; R < 5; R++)
|
|
2031
|
+
for (var z = f[(R + 4) % 5], O = f[(R + 1) % 5], q = O.high, U = O.low, F = z.high ^ (q << 1 | U >>> 31), w = z.low ^ (U << 1 | q >>> 31), H = 0; H < 5; H++) {
|
|
2032
|
+
var y = i[R + 5 * H];
|
|
2080
2033
|
y.high ^= F, y.low ^= w;
|
|
2081
2034
|
}
|
|
2082
2035
|
for (var T = 1; T < 25; T++) {
|
|
2083
2036
|
var F, w, y = i[T], N = y.high, j = y.low, S = E[T];
|
|
2084
2037
|
S < 32 ? (F = N << S | j >>> 32 - S, w = j << S | N >>> 32 - S) : (F = j << S - 32 | N >>> 64 - S, w = N << S - 32 | j >>> 64 - S);
|
|
2085
|
-
var c =
|
|
2038
|
+
var c = f[a[T]];
|
|
2086
2039
|
c.high = F, c.low = w;
|
|
2087
2040
|
}
|
|
2088
|
-
var A =
|
|
2089
|
-
A.high =
|
|
2090
|
-
for (var
|
|
2041
|
+
var A = f[0], _ = i[0];
|
|
2042
|
+
A.high = _.high, A.low = _.low;
|
|
2043
|
+
for (var R = 0; R < 5; R++)
|
|
2091
2044
|
for (var H = 0; H < 5; H++) {
|
|
2092
|
-
var T =
|
|
2093
|
-
y.high = W.high ^ ~P.high &
|
|
2045
|
+
var T = R + 5 * H, y = i[T], W = f[T], P = f[(R + 1) % 5 + 5 * H], I = f[(R + 2) % 5 + 5 * H];
|
|
2046
|
+
y.high = W.high ^ ~P.high & I.high, y.low = W.low ^ ~P.low & I.low;
|
|
2094
2047
|
}
|
|
2095
|
-
var y = i[0],
|
|
2096
|
-
y.high ^=
|
|
2048
|
+
var y = i[0], L = s[k];
|
|
2049
|
+
y.high ^= L.high, y.low ^= L.low;
|
|
2097
2050
|
}
|
|
2098
2051
|
},
|
|
2099
2052
|
_doFinalize: function() {
|
|
2100
|
-
var
|
|
2053
|
+
var l = this._data, g = l.words;
|
|
2101
2054
|
this._nDataBytes * 8;
|
|
2102
|
-
var i =
|
|
2103
|
-
|
|
2104
|
-
for (var d = this._state, b = this.cfg.outputLength / 8,
|
|
2105
|
-
var
|
|
2055
|
+
var i = l.sigBytes * 8, o = this.blockSize * 32;
|
|
2056
|
+
g[i >>> 5] |= 1 << 24 - i % 32, g[(e.ceil((i + 1) / o) * o >>> 5) - 1] |= 128, l.sigBytes = g.length * 4, this._process();
|
|
2057
|
+
for (var d = this._state, b = this.cfg.outputLength / 8, D = b / 8, y = [], k = 0; k < D; k++) {
|
|
2058
|
+
var R = d[k], F = R.high, w = R.low;
|
|
2106
2059
|
F = (F << 8 | F >>> 24) & 16711935 | (F << 24 | F >>> 8) & 4278255360, w = (w << 8 | w >>> 24) & 16711935 | (w << 24 | w >>> 8) & 4278255360, y.push(w), y.push(F);
|
|
2107
2060
|
}
|
|
2108
|
-
return new
|
|
2061
|
+
return new m.init(y, b);
|
|
2109
2062
|
},
|
|
2110
2063
|
clone: function() {
|
|
2111
|
-
for (var
|
|
2112
|
-
|
|
2113
|
-
return
|
|
2064
|
+
for (var l = B.clone.call(this), g = l._state = this._state.slice(0), i = 0; i < 25; i++)
|
|
2065
|
+
g[i] = g[i].clone();
|
|
2066
|
+
return l;
|
|
2114
2067
|
}
|
|
2115
2068
|
});
|
|
2116
|
-
|
|
2069
|
+
u.SHA3 = B._createHelper(p), u.HmacSHA3 = B._createHmacHelper(p);
|
|
2117
2070
|
})(Math), t.SHA3;
|
|
2118
2071
|
});
|
|
2119
|
-
})(
|
|
2072
|
+
})(q0)), q0.exports;
|
|
2120
2073
|
}
|
|
2121
|
-
var
|
|
2122
|
-
function
|
|
2123
|
-
return
|
|
2074
|
+
var T0 = { exports: {} }, Ot = T0.exports, Jr;
|
|
2075
|
+
function qt() {
|
|
2076
|
+
return Jr || (Jr = 1, (function(r, h) {
|
|
2124
2077
|
(function(t, e) {
|
|
2125
2078
|
r.exports = e(M());
|
|
2126
|
-
})(
|
|
2079
|
+
})(Ot, function(t) {
|
|
2127
2080
|
return (function(e) {
|
|
2128
|
-
var
|
|
2081
|
+
var u = t, v = u.lib, m = v.WordArray, B = v.Hasher, C = u.algo, x = m.create([
|
|
2129
2082
|
0,
|
|
2130
2083
|
1,
|
|
2131
2084
|
2,
|
|
@@ -2206,7 +2159,7 @@ function Vt() {
|
|
|
2206
2159
|
6,
|
|
2207
2160
|
15,
|
|
2208
2161
|
13
|
|
2209
|
-
]), n =
|
|
2162
|
+
]), n = m.create([
|
|
2210
2163
|
5,
|
|
2211
2164
|
14,
|
|
2212
2165
|
7,
|
|
@@ -2287,7 +2240,7 @@ function Vt() {
|
|
|
2287
2240
|
3,
|
|
2288
2241
|
9,
|
|
2289
2242
|
11
|
|
2290
|
-
]), E =
|
|
2243
|
+
]), E = m.create([
|
|
2291
2244
|
11,
|
|
2292
2245
|
14,
|
|
2293
2246
|
15,
|
|
@@ -2368,7 +2321,7 @@ function Vt() {
|
|
|
2368
2321
|
8,
|
|
2369
2322
|
5,
|
|
2370
2323
|
6
|
|
2371
|
-
]), a =
|
|
2324
|
+
]), a = m.create([
|
|
2372
2325
|
8,
|
|
2373
2326
|
9,
|
|
2374
2327
|
9,
|
|
@@ -2449,67 +2402,67 @@ function Vt() {
|
|
|
2449
2402
|
13,
|
|
2450
2403
|
11,
|
|
2451
2404
|
11
|
|
2452
|
-
]), s =
|
|
2405
|
+
]), s = m.create([0, 1518500249, 1859775393, 2400959708, 2840853838]), f = m.create([1352829926, 1548603684, 1836072691, 2053994217, 0]), p = C.RIPEMD160 = B.extend({
|
|
2453
2406
|
_doReset: function() {
|
|
2454
|
-
this._hash =
|
|
2407
|
+
this._hash = m.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]);
|
|
2455
2408
|
},
|
|
2456
|
-
_doProcessBlock: function(
|
|
2409
|
+
_doProcessBlock: function(D, y) {
|
|
2457
2410
|
for (var k = 0; k < 16; k++) {
|
|
2458
|
-
var
|
|
2459
|
-
|
|
2411
|
+
var R = y + k, F = D[R];
|
|
2412
|
+
D[R] = (F << 8 | F >>> 24) & 16711935 | (F << 24 | F >>> 8) & 4278255360;
|
|
2460
2413
|
}
|
|
2461
|
-
var w = this._hash.words, H = s.words,
|
|
2462
|
-
A = T = w[0],
|
|
2463
|
-
for (var
|
|
2464
|
-
|
|
2465
|
-
|
|
2414
|
+
var w = this._hash.words, H = s.words, $ = f.words, z = x.words, O = n.words, q = E.words, U = a.words, T, N, j, S, c, A, _, W, P, I;
|
|
2415
|
+
A = T = w[0], _ = N = w[1], W = j = w[2], P = S = w[3], I = c = w[4];
|
|
2416
|
+
for (var L, k = 0; k < 80; k += 1)
|
|
2417
|
+
L = T + D[y + z[k]] | 0, k < 16 ? L += l(N, j, S) + H[0] : k < 32 ? L += g(N, j, S) + H[1] : k < 48 ? L += i(N, j, S) + H[2] : k < 64 ? L += o(N, j, S) + H[3] : L += d(N, j, S) + H[4], L = L | 0, L = b(L, q[k]), L = L + c | 0, T = c, c = S, S = b(j, 10), j = N, N = L, L = A + D[y + O[k]] | 0, k < 16 ? L += d(_, W, P) + $[0] : k < 32 ? L += o(_, W, P) + $[1] : k < 48 ? L += i(_, W, P) + $[2] : k < 64 ? L += g(_, W, P) + $[3] : L += l(_, W, P) + $[4], L = L | 0, L = b(L, U[k]), L = L + I | 0, A = I, I = P, P = b(W, 10), W = _, _ = L;
|
|
2418
|
+
L = w[1] + j + P | 0, w[1] = w[2] + S + I | 0, w[2] = w[3] + c + A | 0, w[3] = w[4] + T + _ | 0, w[4] = w[0] + N + W | 0, w[0] = L;
|
|
2466
2419
|
},
|
|
2467
2420
|
_doFinalize: function() {
|
|
2468
|
-
var
|
|
2469
|
-
y[
|
|
2421
|
+
var D = this._data, y = D.words, k = this._nDataBytes * 8, R = D.sigBytes * 8;
|
|
2422
|
+
y[R >>> 5] |= 128 << 24 - R % 32, y[(R + 64 >>> 9 << 4) + 14] = (k << 8 | k >>> 24) & 16711935 | (k << 24 | k >>> 8) & 4278255360, D.sigBytes = (y.length + 1) * 4, this._process();
|
|
2470
2423
|
for (var F = this._hash, w = F.words, H = 0; H < 5; H++) {
|
|
2471
|
-
var
|
|
2472
|
-
w[H] = (
|
|
2424
|
+
var $ = w[H];
|
|
2425
|
+
w[H] = ($ << 8 | $ >>> 24) & 16711935 | ($ << 24 | $ >>> 8) & 4278255360;
|
|
2473
2426
|
}
|
|
2474
2427
|
return F;
|
|
2475
2428
|
},
|
|
2476
2429
|
clone: function() {
|
|
2477
|
-
var
|
|
2478
|
-
return
|
|
2430
|
+
var D = B.clone.call(this);
|
|
2431
|
+
return D._hash = this._hash.clone(), D;
|
|
2479
2432
|
}
|
|
2480
2433
|
});
|
|
2481
|
-
function
|
|
2482
|
-
return
|
|
2434
|
+
function l(D, y, k) {
|
|
2435
|
+
return D ^ y ^ k;
|
|
2483
2436
|
}
|
|
2484
|
-
function D
|
|
2485
|
-
return
|
|
2437
|
+
function g(D, y, k) {
|
|
2438
|
+
return D & y | ~D & k;
|
|
2486
2439
|
}
|
|
2487
|
-
function i(
|
|
2488
|
-
return (
|
|
2440
|
+
function i(D, y, k) {
|
|
2441
|
+
return (D | ~y) ^ k;
|
|
2489
2442
|
}
|
|
2490
|
-
function o(
|
|
2491
|
-
return
|
|
2443
|
+
function o(D, y, k) {
|
|
2444
|
+
return D & k | y & ~k;
|
|
2492
2445
|
}
|
|
2493
|
-
function d(
|
|
2494
|
-
return
|
|
2446
|
+
function d(D, y, k) {
|
|
2447
|
+
return D ^ (y | ~k);
|
|
2495
2448
|
}
|
|
2496
|
-
function b(
|
|
2497
|
-
return
|
|
2449
|
+
function b(D, y) {
|
|
2450
|
+
return D << y | D >>> 32 - y;
|
|
2498
2451
|
}
|
|
2499
|
-
|
|
2452
|
+
u.RIPEMD160 = B._createHelper(p), u.HmacRIPEMD160 = B._createHmacHelper(p);
|
|
2500
2453
|
})(), t.RIPEMD160;
|
|
2501
2454
|
});
|
|
2502
|
-
})(
|
|
2455
|
+
})(T0)), T0.exports;
|
|
2503
2456
|
}
|
|
2504
|
-
var
|
|
2505
|
-
function
|
|
2506
|
-
return
|
|
2457
|
+
var M0 = { exports: {} }, Tt = M0.exports, re;
|
|
2458
|
+
function gr() {
|
|
2459
|
+
return re || (re = 1, (function(r, h) {
|
|
2507
2460
|
(function(t, e) {
|
|
2508
2461
|
r.exports = e(M());
|
|
2509
|
-
})(
|
|
2462
|
+
})(Tt, function(t) {
|
|
2510
2463
|
(function() {
|
|
2511
|
-
var e = t,
|
|
2512
|
-
|
|
2464
|
+
var e = t, u = e.lib, v = u.Base, m = e.enc, B = m.Utf8, C = e.algo;
|
|
2465
|
+
C.HMAC = v.extend({
|
|
2513
2466
|
/**
|
|
2514
2467
|
* Initializes a newly created HMAC.
|
|
2515
2468
|
*
|
|
@@ -2521,12 +2474,12 @@ function mr() {
|
|
|
2521
2474
|
* var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key);
|
|
2522
2475
|
*/
|
|
2523
2476
|
init: function(x, n) {
|
|
2524
|
-
x = this._hasher = new x.init(), typeof n == "string" && (n =
|
|
2477
|
+
x = this._hasher = new x.init(), typeof n == "string" && (n = B.parse(n));
|
|
2525
2478
|
var E = x.blockSize, a = E * 4;
|
|
2526
2479
|
n.sigBytes > a && (n = x.finalize(n)), n.clamp();
|
|
2527
|
-
for (var s = this._oKey = n.clone(),
|
|
2528
|
-
p[
|
|
2529
|
-
s.sigBytes =
|
|
2480
|
+
for (var s = this._oKey = n.clone(), f = this._iKey = n.clone(), p = s.words, l = f.words, g = 0; g < E; g++)
|
|
2481
|
+
p[g] ^= 1549556828, l[g] ^= 909522486;
|
|
2482
|
+
s.sigBytes = f.sigBytes = a, this.reset();
|
|
2530
2483
|
},
|
|
2531
2484
|
/**
|
|
2532
2485
|
* Resets this HMAC to its initial state.
|
|
@@ -2577,16 +2530,16 @@ function mr() {
|
|
|
2577
2530
|
});
|
|
2578
2531
|
})();
|
|
2579
2532
|
});
|
|
2580
|
-
})(
|
|
2533
|
+
})(M0)), M0.exports;
|
|
2581
2534
|
}
|
|
2582
|
-
var
|
|
2583
|
-
function
|
|
2584
|
-
return
|
|
2585
|
-
(function(t, e,
|
|
2586
|
-
r.exports = e(M(),
|
|
2587
|
-
})(
|
|
2535
|
+
var N0 = { exports: {} }, Mt = N0.exports, ee;
|
|
2536
|
+
function Nt() {
|
|
2537
|
+
return ee || (ee = 1, (function(r, h) {
|
|
2538
|
+
(function(t, e, u) {
|
|
2539
|
+
r.exports = e(M(), Dr(), gr());
|
|
2540
|
+
})(Mt, function(t) {
|
|
2588
2541
|
return (function() {
|
|
2589
|
-
var e = t,
|
|
2542
|
+
var e = t, u = e.lib, v = u.Base, m = u.WordArray, B = e.algo, C = B.SHA256, x = B.HMAC, n = B.PBKDF2 = v.extend({
|
|
2590
2543
|
/**
|
|
2591
2544
|
* Configuration options.
|
|
2592
2545
|
*
|
|
@@ -2594,9 +2547,9 @@ function ex() {
|
|
|
2594
2547
|
* @property {Hasher} hasher The hasher to use. Default: SHA256
|
|
2595
2548
|
* @property {number} iterations The number of iterations to perform. Default: 250000
|
|
2596
2549
|
*/
|
|
2597
|
-
cfg:
|
|
2550
|
+
cfg: v.extend({
|
|
2598
2551
|
keySize: 128 / 32,
|
|
2599
|
-
hasher:
|
|
2552
|
+
hasher: C,
|
|
2600
2553
|
iterations: 25e4
|
|
2601
2554
|
}),
|
|
2602
2555
|
/**
|
|
@@ -2626,13 +2579,13 @@ function ex() {
|
|
|
2626
2579
|
* var key = kdf.compute(password, salt);
|
|
2627
2580
|
*/
|
|
2628
2581
|
compute: function(E, a) {
|
|
2629
|
-
for (var s = this.cfg,
|
|
2630
|
-
var b =
|
|
2631
|
-
|
|
2632
|
-
for (var
|
|
2633
|
-
k =
|
|
2582
|
+
for (var s = this.cfg, f = x.create(s.hasher, E), p = m.create(), l = m.create([1]), g = p.words, i = l.words, o = s.keySize, d = s.iterations; g.length < o; ) {
|
|
2583
|
+
var b = f.update(a).finalize(l);
|
|
2584
|
+
f.reset();
|
|
2585
|
+
for (var D = b.words, y = D.length, k = b, R = 1; R < d; R++) {
|
|
2586
|
+
k = f.finalize(k), f.reset();
|
|
2634
2587
|
for (var F = k.words, w = 0; w < y; w++)
|
|
2635
|
-
|
|
2588
|
+
D[w] ^= F[w];
|
|
2636
2589
|
}
|
|
2637
2590
|
p.concat(b), i[0]++;
|
|
2638
2591
|
}
|
|
@@ -2644,16 +2597,16 @@ function ex() {
|
|
|
2644
2597
|
};
|
|
2645
2598
|
})(), t.PBKDF2;
|
|
2646
2599
|
});
|
|
2647
|
-
})(
|
|
2600
|
+
})(N0)), N0.exports;
|
|
2648
2601
|
}
|
|
2649
|
-
var
|
|
2650
|
-
function
|
|
2651
|
-
return
|
|
2652
|
-
(function(t, e,
|
|
2653
|
-
r.exports = e(M(),
|
|
2654
|
-
})(
|
|
2602
|
+
var U0 = { exports: {} }, Ut = U0.exports, te;
|
|
2603
|
+
function a0() {
|
|
2604
|
+
return te || (te = 1, (function(r, h) {
|
|
2605
|
+
(function(t, e, u) {
|
|
2606
|
+
r.exports = e(M(), Se(), gr());
|
|
2607
|
+
})(Ut, function(t) {
|
|
2655
2608
|
return (function() {
|
|
2656
|
-
var e = t,
|
|
2609
|
+
var e = t, u = e.lib, v = u.Base, m = u.WordArray, B = e.algo, C = B.MD5, x = B.EvpKDF = v.extend({
|
|
2657
2610
|
/**
|
|
2658
2611
|
* Configuration options.
|
|
2659
2612
|
*
|
|
@@ -2661,9 +2614,9 @@ function o0() {
|
|
|
2661
2614
|
* @property {Hasher} hasher The hash algorithm to use. Default: MD5
|
|
2662
2615
|
* @property {number} iterations The number of iterations to perform. Default: 1
|
|
2663
2616
|
*/
|
|
2664
|
-
cfg:
|
|
2617
|
+
cfg: v.extend({
|
|
2665
2618
|
keySize: 128 / 32,
|
|
2666
|
-
hasher:
|
|
2619
|
+
hasher: C,
|
|
2667
2620
|
iterations: 1
|
|
2668
2621
|
}),
|
|
2669
2622
|
/**
|
|
@@ -2693,13 +2646,13 @@ function o0() {
|
|
|
2693
2646
|
* var key = kdf.compute(password, salt);
|
|
2694
2647
|
*/
|
|
2695
2648
|
compute: function(n, E) {
|
|
2696
|
-
for (var a, s = this.cfg,
|
|
2697
|
-
a &&
|
|
2649
|
+
for (var a, s = this.cfg, f = s.hasher.create(), p = m.create(), l = p.words, g = s.keySize, i = s.iterations; l.length < g; ) {
|
|
2650
|
+
a && f.update(a), a = f.update(n).finalize(E), f.reset();
|
|
2698
2651
|
for (var o = 1; o < i; o++)
|
|
2699
|
-
a =
|
|
2652
|
+
a = f.finalize(a), f.reset();
|
|
2700
2653
|
p.concat(a);
|
|
2701
2654
|
}
|
|
2702
|
-
return p.sigBytes =
|
|
2655
|
+
return p.sigBytes = g * 4, p;
|
|
2703
2656
|
}
|
|
2704
2657
|
});
|
|
2705
2658
|
e.EvpKDF = function(n, E, a) {
|
|
@@ -2707,24 +2660,24 @@ function o0() {
|
|
|
2707
2660
|
};
|
|
2708
2661
|
})(), t.EvpKDF;
|
|
2709
2662
|
});
|
|
2710
|
-
})(
|
|
2663
|
+
})(U0)), U0.exports;
|
|
2711
2664
|
}
|
|
2712
|
-
var
|
|
2665
|
+
var j0 = { exports: {} }, jt = j0.exports, xe;
|
|
2713
2666
|
function X() {
|
|
2714
|
-
return
|
|
2715
|
-
(function(t, e,
|
|
2716
|
-
r.exports = e(M(),
|
|
2717
|
-
})(
|
|
2667
|
+
return xe || (xe = 1, (function(r, h) {
|
|
2668
|
+
(function(t, e, u) {
|
|
2669
|
+
r.exports = e(M(), a0());
|
|
2670
|
+
})(jt, function(t) {
|
|
2718
2671
|
t.lib.Cipher || (function(e) {
|
|
2719
|
-
var
|
|
2672
|
+
var u = t, v = u.lib, m = v.Base, B = v.WordArray, C = v.BufferedBlockAlgorithm, x = u.enc;
|
|
2720
2673
|
x.Utf8;
|
|
2721
|
-
var n = x.Base64, E =
|
|
2674
|
+
var n = x.Base64, E = u.algo, a = E.EvpKDF, s = v.Cipher = C.extend({
|
|
2722
2675
|
/**
|
|
2723
2676
|
* Configuration options.
|
|
2724
2677
|
*
|
|
2725
2678
|
* @property {WordArray} iv The IV to use for this operation.
|
|
2726
2679
|
*/
|
|
2727
|
-
cfg:
|
|
2680
|
+
cfg: m.extend(),
|
|
2728
2681
|
/**
|
|
2729
2682
|
* Creates this cipher in encryption mode.
|
|
2730
2683
|
*
|
|
@@ -2781,7 +2734,7 @@ function X() {
|
|
|
2781
2734
|
* cipher.reset();
|
|
2782
2735
|
*/
|
|
2783
2736
|
reset: function() {
|
|
2784
|
-
|
|
2737
|
+
C.reset.call(this), this._doReset();
|
|
2785
2738
|
},
|
|
2786
2739
|
/**
|
|
2787
2740
|
* Adds data to be encrypted or decrypted.
|
|
@@ -2836,28 +2789,28 @@ function X() {
|
|
|
2836
2789
|
*/
|
|
2837
2790
|
_createHelper: /* @__PURE__ */ (function() {
|
|
2838
2791
|
function F(w) {
|
|
2839
|
-
return typeof w == "string" ?
|
|
2792
|
+
return typeof w == "string" ? R : D;
|
|
2840
2793
|
}
|
|
2841
2794
|
return function(w) {
|
|
2842
2795
|
return {
|
|
2843
|
-
encrypt: function(H,
|
|
2844
|
-
return F(
|
|
2796
|
+
encrypt: function(H, $, z) {
|
|
2797
|
+
return F($).encrypt(w, H, $, z);
|
|
2845
2798
|
},
|
|
2846
|
-
decrypt: function(H,
|
|
2847
|
-
return F(
|
|
2799
|
+
decrypt: function(H, $, z) {
|
|
2800
|
+
return F($).decrypt(w, H, $, z);
|
|
2848
2801
|
}
|
|
2849
2802
|
};
|
|
2850
2803
|
};
|
|
2851
2804
|
})()
|
|
2852
2805
|
});
|
|
2853
|
-
|
|
2806
|
+
v.StreamCipher = s.extend({
|
|
2854
2807
|
_doFinalize: function() {
|
|
2855
2808
|
var F = this._process(!0);
|
|
2856
2809
|
return F;
|
|
2857
2810
|
},
|
|
2858
2811
|
blockSize: 1
|
|
2859
2812
|
});
|
|
2860
|
-
var
|
|
2813
|
+
var f = u.mode = {}, p = v.BlockCipherMode = m.extend({
|
|
2861
2814
|
/**
|
|
2862
2815
|
* Creates this mode for encryption.
|
|
2863
2816
|
*
|
|
@@ -2901,7 +2854,7 @@ function X() {
|
|
|
2901
2854
|
init: function(F, w) {
|
|
2902
2855
|
this._cipher = F, this._iv = w;
|
|
2903
2856
|
}
|
|
2904
|
-
}),
|
|
2857
|
+
}), l = f.CBC = (function() {
|
|
2905
2858
|
var F = p.extend();
|
|
2906
2859
|
F.Encryptor = F.extend({
|
|
2907
2860
|
/**
|
|
@@ -2914,9 +2867,9 @@ function X() {
|
|
|
2914
2867
|
*
|
|
2915
2868
|
* mode.processBlock(data.words, offset);
|
|
2916
2869
|
*/
|
|
2917
|
-
processBlock: function(H,
|
|
2870
|
+
processBlock: function(H, $) {
|
|
2918
2871
|
var z = this._cipher, O = z.blockSize;
|
|
2919
|
-
w.call(this, H,
|
|
2872
|
+
w.call(this, H, $, O), z.encryptBlock(H, $), this._prevBlock = H.slice($, $ + O);
|
|
2920
2873
|
}
|
|
2921
2874
|
}), F.Decryptor = F.extend({
|
|
2922
2875
|
/**
|
|
@@ -2929,19 +2882,19 @@ function X() {
|
|
|
2929
2882
|
*
|
|
2930
2883
|
* mode.processBlock(data.words, offset);
|
|
2931
2884
|
*/
|
|
2932
|
-
processBlock: function(H,
|
|
2933
|
-
var z = this._cipher, O = z.blockSize, q = H.slice(
|
|
2934
|
-
z.decryptBlock(H,
|
|
2885
|
+
processBlock: function(H, $) {
|
|
2886
|
+
var z = this._cipher, O = z.blockSize, q = H.slice($, $ + O);
|
|
2887
|
+
z.decryptBlock(H, $), w.call(this, H, $, O), this._prevBlock = q;
|
|
2935
2888
|
}
|
|
2936
2889
|
});
|
|
2937
|
-
function w(H,
|
|
2890
|
+
function w(H, $, z) {
|
|
2938
2891
|
var O, q = this._iv;
|
|
2939
2892
|
q ? (O = q, this._iv = e) : O = this._prevBlock;
|
|
2940
2893
|
for (var U = 0; U < z; U++)
|
|
2941
|
-
H[
|
|
2894
|
+
H[$ + U] ^= O[U];
|
|
2942
2895
|
}
|
|
2943
2896
|
return F;
|
|
2944
|
-
})(),
|
|
2897
|
+
})(), g = u.pad = {}, i = g.Pkcs7 = {
|
|
2945
2898
|
/**
|
|
2946
2899
|
* Pads data using the algorithm defined in PKCS #5/7.
|
|
2947
2900
|
*
|
|
@@ -2955,9 +2908,9 @@ function X() {
|
|
|
2955
2908
|
* CryptoJS.pad.Pkcs7.pad(wordArray, 4);
|
|
2956
2909
|
*/
|
|
2957
2910
|
pad: function(F, w) {
|
|
2958
|
-
for (var H = w * 4,
|
|
2911
|
+
for (var H = w * 4, $ = H - F.sigBytes % H, z = $ << 24 | $ << 16 | $ << 8 | $, O = [], q = 0; q < $; q += 4)
|
|
2959
2912
|
O.push(z);
|
|
2960
|
-
var U =
|
|
2913
|
+
var U = B.create(O, $);
|
|
2961
2914
|
F.concat(U);
|
|
2962
2915
|
},
|
|
2963
2916
|
/**
|
|
@@ -2976,7 +2929,7 @@ function X() {
|
|
|
2976
2929
|
F.sigBytes -= w;
|
|
2977
2930
|
}
|
|
2978
2931
|
};
|
|
2979
|
-
|
|
2932
|
+
v.BlockCipher = s.extend({
|
|
2980
2933
|
/**
|
|
2981
2934
|
* Configuration options.
|
|
2982
2935
|
*
|
|
@@ -2984,14 +2937,14 @@ function X() {
|
|
|
2984
2937
|
* @property {Padding} padding The padding strategy to use. Default: Pkcs7
|
|
2985
2938
|
*/
|
|
2986
2939
|
cfg: s.cfg.extend({
|
|
2987
|
-
mode:
|
|
2940
|
+
mode: l,
|
|
2988
2941
|
padding: i
|
|
2989
2942
|
}),
|
|
2990
2943
|
reset: function() {
|
|
2991
2944
|
var F;
|
|
2992
2945
|
s.reset.call(this);
|
|
2993
|
-
var w = this.cfg, H = w.iv,
|
|
2994
|
-
this._xformMode == this._ENC_XFORM_MODE ? F =
|
|
2946
|
+
var w = this.cfg, H = w.iv, $ = w.mode;
|
|
2947
|
+
this._xformMode == this._ENC_XFORM_MODE ? F = $.createEncryptor : (F = $.createDecryptor, this._minBufferSize = 1), this._mode && this._mode.__creator == F ? this._mode.init(this, H && H.words) : (this._mode = F.call($, this, H && H.words), this._mode.__creator = F);
|
|
2995
2948
|
},
|
|
2996
2949
|
_doProcessBlock: function(F, w) {
|
|
2997
2950
|
this._mode.processBlock(F, w);
|
|
@@ -3002,7 +2955,7 @@ function X() {
|
|
|
3002
2955
|
},
|
|
3003
2956
|
blockSize: 128 / 32
|
|
3004
2957
|
});
|
|
3005
|
-
var o =
|
|
2958
|
+
var o = v.CipherParams = m.extend({
|
|
3006
2959
|
/**
|
|
3007
2960
|
* Initializes a newly created cipher params object.
|
|
3008
2961
|
*
|
|
@@ -3043,7 +2996,7 @@ function X() {
|
|
|
3043
2996
|
toString: function(F) {
|
|
3044
2997
|
return (F || this.formatter).stringify(this);
|
|
3045
2998
|
}
|
|
3046
|
-
}), d =
|
|
2999
|
+
}), d = u.format = {}, b = d.OpenSSL = {
|
|
3047
3000
|
/**
|
|
3048
3001
|
* Converts a cipher params object to an OpenSSL-compatible string.
|
|
3049
3002
|
*
|
|
@@ -3058,8 +3011,8 @@ function X() {
|
|
|
3058
3011
|
* var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams);
|
|
3059
3012
|
*/
|
|
3060
3013
|
stringify: function(F) {
|
|
3061
|
-
var w, H = F.ciphertext,
|
|
3062
|
-
return
|
|
3014
|
+
var w, H = F.ciphertext, $ = F.salt;
|
|
3015
|
+
return $ ? w = B.create([1398893684, 1701076831]).concat($).concat(H) : w = H, w.toString(n);
|
|
3063
3016
|
},
|
|
3064
3017
|
/**
|
|
3065
3018
|
* Converts an OpenSSL-compatible string to a cipher params object.
|
|
@@ -3075,16 +3028,16 @@ function X() {
|
|
|
3075
3028
|
* var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString);
|
|
3076
3029
|
*/
|
|
3077
3030
|
parse: function(F) {
|
|
3078
|
-
var w, H = n.parse(F),
|
|
3079
|
-
return
|
|
3031
|
+
var w, H = n.parse(F), $ = H.words;
|
|
3032
|
+
return $[0] == 1398893684 && $[1] == 1701076831 && (w = B.create($.slice(2, 4)), $.splice(0, 4), H.sigBytes -= 16), o.create({ ciphertext: H, salt: w });
|
|
3080
3033
|
}
|
|
3081
|
-
},
|
|
3034
|
+
}, D = v.SerializableCipher = m.extend({
|
|
3082
3035
|
/**
|
|
3083
3036
|
* Configuration options.
|
|
3084
3037
|
*
|
|
3085
3038
|
* @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL
|
|
3086
3039
|
*/
|
|
3087
|
-
cfg:
|
|
3040
|
+
cfg: m.extend({
|
|
3088
3041
|
format: b
|
|
3089
3042
|
}),
|
|
3090
3043
|
/**
|
|
@@ -3105,9 +3058,9 @@ function X() {
|
|
|
3105
3058
|
* var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv });
|
|
3106
3059
|
* var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL });
|
|
3107
3060
|
*/
|
|
3108
|
-
encrypt: function(F, w, H,
|
|
3109
|
-
|
|
3110
|
-
var z = F.createEncryptor(H,
|
|
3061
|
+
encrypt: function(F, w, H, $) {
|
|
3062
|
+
$ = this.cfg.extend($);
|
|
3063
|
+
var z = F.createEncryptor(H, $), O = z.finalize(w), q = z.cfg;
|
|
3111
3064
|
return o.create({
|
|
3112
3065
|
ciphertext: O,
|
|
3113
3066
|
key: H,
|
|
@@ -3116,7 +3069,7 @@ function X() {
|
|
|
3116
3069
|
mode: q.mode,
|
|
3117
3070
|
padding: q.padding,
|
|
3118
3071
|
blockSize: F.blockSize,
|
|
3119
|
-
formatter:
|
|
3072
|
+
formatter: $.format
|
|
3120
3073
|
});
|
|
3121
3074
|
},
|
|
3122
3075
|
/**
|
|
@@ -3136,9 +3089,9 @@ function X() {
|
|
|
3136
3089
|
* var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL });
|
|
3137
3090
|
* var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL });
|
|
3138
3091
|
*/
|
|
3139
|
-
decrypt: function(F, w, H,
|
|
3140
|
-
|
|
3141
|
-
var z = F.createDecryptor(H,
|
|
3092
|
+
decrypt: function(F, w, H, $) {
|
|
3093
|
+
$ = this.cfg.extend($), w = this._parse(w, $.format);
|
|
3094
|
+
var z = F.createDecryptor(H, $).finalize(w.ciphertext);
|
|
3142
3095
|
return z;
|
|
3143
3096
|
},
|
|
3144
3097
|
/**
|
|
@@ -3159,7 +3112,7 @@ function X() {
|
|
|
3159
3112
|
_parse: function(F, w) {
|
|
3160
3113
|
return typeof F == "string" ? w.parse(F, this) : F;
|
|
3161
3114
|
}
|
|
3162
|
-
}), y =
|
|
3115
|
+
}), y = u.kdf = {}, k = y.OpenSSL = {
|
|
3163
3116
|
/**
|
|
3164
3117
|
* Derives a key and IV from a password.
|
|
3165
3118
|
*
|
|
@@ -3177,21 +3130,21 @@ function X() {
|
|
|
3177
3130
|
* var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32);
|
|
3178
3131
|
* var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt');
|
|
3179
3132
|
*/
|
|
3180
|
-
execute: function(F, w, H,
|
|
3181
|
-
if (
|
|
3182
|
-
var O = a.create({ keySize: w + H, hasher: z }).compute(F,
|
|
3133
|
+
execute: function(F, w, H, $, z) {
|
|
3134
|
+
if ($ || ($ = B.random(64 / 8)), z)
|
|
3135
|
+
var O = a.create({ keySize: w + H, hasher: z }).compute(F, $);
|
|
3183
3136
|
else
|
|
3184
|
-
var O = a.create({ keySize: w + H }).compute(F,
|
|
3185
|
-
var q =
|
|
3186
|
-
return O.sigBytes = w * 4, o.create({ key: O, iv: q, salt:
|
|
3137
|
+
var O = a.create({ keySize: w + H }).compute(F, $);
|
|
3138
|
+
var q = B.create(O.words.slice(w), H * 4);
|
|
3139
|
+
return O.sigBytes = w * 4, o.create({ key: O, iv: q, salt: $ });
|
|
3187
3140
|
}
|
|
3188
|
-
},
|
|
3141
|
+
}, R = v.PasswordBasedCipher = D.extend({
|
|
3189
3142
|
/**
|
|
3190
3143
|
* Configuration options.
|
|
3191
3144
|
*
|
|
3192
3145
|
* @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL
|
|
3193
3146
|
*/
|
|
3194
|
-
cfg:
|
|
3147
|
+
cfg: D.cfg.extend({
|
|
3195
3148
|
kdf: k
|
|
3196
3149
|
}),
|
|
3197
3150
|
/**
|
|
@@ -3211,11 +3164,11 @@ function X() {
|
|
|
3211
3164
|
* var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password');
|
|
3212
3165
|
* var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL });
|
|
3213
3166
|
*/
|
|
3214
|
-
encrypt: function(F, w, H,
|
|
3215
|
-
|
|
3216
|
-
var z =
|
|
3217
|
-
|
|
3218
|
-
var O =
|
|
3167
|
+
encrypt: function(F, w, H, $) {
|
|
3168
|
+
$ = this.cfg.extend($);
|
|
3169
|
+
var z = $.kdf.execute(H, F.keySize, F.ivSize, $.salt, $.hasher);
|
|
3170
|
+
$.iv = z.iv;
|
|
3171
|
+
var O = D.encrypt.call(this, F, w, z.key, $);
|
|
3219
3172
|
return O.mixIn(z), O;
|
|
3220
3173
|
},
|
|
3221
3174
|
/**
|
|
@@ -3235,228 +3188,228 @@ function X() {
|
|
|
3235
3188
|
* var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL });
|
|
3236
3189
|
* var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL });
|
|
3237
3190
|
*/
|
|
3238
|
-
decrypt: function(F, w, H,
|
|
3239
|
-
|
|
3240
|
-
var z =
|
|
3241
|
-
|
|
3242
|
-
var O =
|
|
3191
|
+
decrypt: function(F, w, H, $) {
|
|
3192
|
+
$ = this.cfg.extend($), w = this._parse(w, $.format);
|
|
3193
|
+
var z = $.kdf.execute(H, F.keySize, F.ivSize, w.salt, $.hasher);
|
|
3194
|
+
$.iv = z.iv;
|
|
3195
|
+
var O = D.decrypt.call(this, F, w, z.key, $);
|
|
3243
3196
|
return O;
|
|
3244
3197
|
}
|
|
3245
3198
|
});
|
|
3246
3199
|
})();
|
|
3247
3200
|
});
|
|
3248
|
-
})(
|
|
3201
|
+
})(j0)), j0.exports;
|
|
3249
3202
|
}
|
|
3250
|
-
var
|
|
3251
|
-
function
|
|
3252
|
-
return
|
|
3253
|
-
(function(t, e,
|
|
3203
|
+
var G0 = { exports: {} }, Gt = G0.exports, ne;
|
|
3204
|
+
function Kt() {
|
|
3205
|
+
return ne || (ne = 1, (function(r, h) {
|
|
3206
|
+
(function(t, e, u) {
|
|
3254
3207
|
r.exports = e(M(), X());
|
|
3255
|
-
})(
|
|
3208
|
+
})(Gt, function(t) {
|
|
3256
3209
|
return t.mode.CFB = (function() {
|
|
3257
3210
|
var e = t.lib.BlockCipherMode.extend();
|
|
3258
3211
|
e.Encryptor = e.extend({
|
|
3259
|
-
processBlock: function(
|
|
3260
|
-
var
|
|
3261
|
-
|
|
3212
|
+
processBlock: function(v, m) {
|
|
3213
|
+
var B = this._cipher, C = B.blockSize;
|
|
3214
|
+
u.call(this, v, m, C, B), this._prevBlock = v.slice(m, m + C);
|
|
3262
3215
|
}
|
|
3263
3216
|
}), e.Decryptor = e.extend({
|
|
3264
|
-
processBlock: function(
|
|
3265
|
-
var
|
|
3266
|
-
|
|
3217
|
+
processBlock: function(v, m) {
|
|
3218
|
+
var B = this._cipher, C = B.blockSize, x = v.slice(m, m + C);
|
|
3219
|
+
u.call(this, v, m, C, B), this._prevBlock = x;
|
|
3267
3220
|
}
|
|
3268
3221
|
});
|
|
3269
|
-
function
|
|
3222
|
+
function u(v, m, B, C) {
|
|
3270
3223
|
var x, n = this._iv;
|
|
3271
|
-
n ? (x = n.slice(0), this._iv = void 0) : x = this._prevBlock,
|
|
3272
|
-
for (var E = 0; E <
|
|
3273
|
-
|
|
3224
|
+
n ? (x = n.slice(0), this._iv = void 0) : x = this._prevBlock, C.encryptBlock(x, 0);
|
|
3225
|
+
for (var E = 0; E < B; E++)
|
|
3226
|
+
v[m + E] ^= x[E];
|
|
3274
3227
|
}
|
|
3275
3228
|
return e;
|
|
3276
3229
|
})(), t.mode.CFB;
|
|
3277
3230
|
});
|
|
3278
|
-
})(
|
|
3231
|
+
})(G0)), G0.exports;
|
|
3279
3232
|
}
|
|
3280
|
-
var
|
|
3281
|
-
function
|
|
3282
|
-
return
|
|
3283
|
-
(function(t, e,
|
|
3233
|
+
var K0 = { exports: {} }, Xt = K0.exports, ae;
|
|
3234
|
+
function Zt() {
|
|
3235
|
+
return ae || (ae = 1, (function(r, h) {
|
|
3236
|
+
(function(t, e, u) {
|
|
3284
3237
|
r.exports = e(M(), X());
|
|
3285
|
-
})(
|
|
3238
|
+
})(Xt, function(t) {
|
|
3286
3239
|
return t.mode.CTR = (function() {
|
|
3287
|
-
var e = t.lib.BlockCipherMode.extend(),
|
|
3288
|
-
processBlock: function(
|
|
3289
|
-
var
|
|
3240
|
+
var e = t.lib.BlockCipherMode.extend(), u = e.Encryptor = e.extend({
|
|
3241
|
+
processBlock: function(v, m) {
|
|
3242
|
+
var B = this._cipher, C = B.blockSize, x = this._iv, n = this._counter;
|
|
3290
3243
|
x && (n = this._counter = x.slice(0), this._iv = void 0);
|
|
3291
3244
|
var E = n.slice(0);
|
|
3292
|
-
|
|
3293
|
-
for (var a = 0; a <
|
|
3294
|
-
|
|
3245
|
+
B.encryptBlock(E, 0), n[C - 1] = n[C - 1] + 1 | 0;
|
|
3246
|
+
for (var a = 0; a < C; a++)
|
|
3247
|
+
v[m + a] ^= E[a];
|
|
3295
3248
|
}
|
|
3296
3249
|
});
|
|
3297
|
-
return e.Decryptor =
|
|
3250
|
+
return e.Decryptor = u, e;
|
|
3298
3251
|
})(), t.mode.CTR;
|
|
3299
3252
|
});
|
|
3300
|
-
})(
|
|
3253
|
+
})(K0)), K0.exports;
|
|
3301
3254
|
}
|
|
3302
|
-
var
|
|
3303
|
-
function
|
|
3304
|
-
return
|
|
3305
|
-
(function(t, e,
|
|
3255
|
+
var X0 = { exports: {} }, Yt = X0.exports, oe;
|
|
3256
|
+
function Qt() {
|
|
3257
|
+
return oe || (oe = 1, (function(r, h) {
|
|
3258
|
+
(function(t, e, u) {
|
|
3306
3259
|
r.exports = e(M(), X());
|
|
3307
|
-
})(
|
|
3260
|
+
})(Yt, function(t) {
|
|
3308
3261
|
return t.mode.CTRGladman = (function() {
|
|
3309
3262
|
var e = t.lib.BlockCipherMode.extend();
|
|
3310
|
-
function
|
|
3311
|
-
if ((
|
|
3312
|
-
var
|
|
3313
|
-
|
|
3263
|
+
function u(B) {
|
|
3264
|
+
if ((B >> 24 & 255) === 255) {
|
|
3265
|
+
var C = B >> 16 & 255, x = B >> 8 & 255, n = B & 255;
|
|
3266
|
+
C === 255 ? (C = 0, x === 255 ? (x = 0, n === 255 ? n = 0 : ++n) : ++x) : ++C, B = 0, B += C << 16, B += x << 8, B += n;
|
|
3314
3267
|
} else
|
|
3315
|
-
|
|
3316
|
-
return
|
|
3268
|
+
B += 1 << 24;
|
|
3269
|
+
return B;
|
|
3317
3270
|
}
|
|
3318
|
-
function
|
|
3319
|
-
return (
|
|
3271
|
+
function v(B) {
|
|
3272
|
+
return (B[0] = u(B[0])) === 0 && (B[1] = u(B[1])), B;
|
|
3320
3273
|
}
|
|
3321
|
-
var
|
|
3322
|
-
processBlock: function(
|
|
3274
|
+
var m = e.Encryptor = e.extend({
|
|
3275
|
+
processBlock: function(B, C) {
|
|
3323
3276
|
var x = this._cipher, n = x.blockSize, E = this._iv, a = this._counter;
|
|
3324
|
-
E && (a = this._counter = E.slice(0), this._iv = void 0),
|
|
3277
|
+
E && (a = this._counter = E.slice(0), this._iv = void 0), v(a);
|
|
3325
3278
|
var s = a.slice(0);
|
|
3326
3279
|
x.encryptBlock(s, 0);
|
|
3327
|
-
for (var
|
|
3328
|
-
C
|
|
3280
|
+
for (var f = 0; f < n; f++)
|
|
3281
|
+
B[C + f] ^= s[f];
|
|
3329
3282
|
}
|
|
3330
3283
|
});
|
|
3331
|
-
return e.Decryptor =
|
|
3284
|
+
return e.Decryptor = m, e;
|
|
3332
3285
|
})(), t.mode.CTRGladman;
|
|
3333
3286
|
});
|
|
3334
|
-
})(
|
|
3287
|
+
})(X0)), X0.exports;
|
|
3335
3288
|
}
|
|
3336
|
-
var
|
|
3337
|
-
function
|
|
3338
|
-
return
|
|
3339
|
-
(function(t, e,
|
|
3289
|
+
var Z0 = { exports: {} }, Vt = Z0.exports, ie;
|
|
3290
|
+
function Jt() {
|
|
3291
|
+
return ie || (ie = 1, (function(r, h) {
|
|
3292
|
+
(function(t, e, u) {
|
|
3340
3293
|
r.exports = e(M(), X());
|
|
3341
|
-
})(
|
|
3294
|
+
})(Vt, function(t) {
|
|
3342
3295
|
return t.mode.OFB = (function() {
|
|
3343
|
-
var e = t.lib.BlockCipherMode.extend(),
|
|
3344
|
-
processBlock: function(
|
|
3345
|
-
var
|
|
3346
|
-
x && (n = this._keystream = x.slice(0), this._iv = void 0),
|
|
3347
|
-
for (var E = 0; E <
|
|
3348
|
-
|
|
3296
|
+
var e = t.lib.BlockCipherMode.extend(), u = e.Encryptor = e.extend({
|
|
3297
|
+
processBlock: function(v, m) {
|
|
3298
|
+
var B = this._cipher, C = B.blockSize, x = this._iv, n = this._keystream;
|
|
3299
|
+
x && (n = this._keystream = x.slice(0), this._iv = void 0), B.encryptBlock(n, 0);
|
|
3300
|
+
for (var E = 0; E < C; E++)
|
|
3301
|
+
v[m + E] ^= n[E];
|
|
3349
3302
|
}
|
|
3350
3303
|
});
|
|
3351
|
-
return e.Decryptor =
|
|
3304
|
+
return e.Decryptor = u, e;
|
|
3352
3305
|
})(), t.mode.OFB;
|
|
3353
3306
|
});
|
|
3354
|
-
})(
|
|
3307
|
+
})(Z0)), Z0.exports;
|
|
3355
3308
|
}
|
|
3356
|
-
var
|
|
3357
|
-
function
|
|
3358
|
-
return
|
|
3359
|
-
(function(t, e,
|
|
3309
|
+
var Y0 = { exports: {} }, rx = Y0.exports, se;
|
|
3310
|
+
function ex() {
|
|
3311
|
+
return se || (se = 1, (function(r, h) {
|
|
3312
|
+
(function(t, e, u) {
|
|
3360
3313
|
r.exports = e(M(), X());
|
|
3361
|
-
})(
|
|
3314
|
+
})(rx, function(t) {
|
|
3362
3315
|
return t.mode.ECB = (function() {
|
|
3363
3316
|
var e = t.lib.BlockCipherMode.extend();
|
|
3364
3317
|
return e.Encryptor = e.extend({
|
|
3365
|
-
processBlock: function(
|
|
3366
|
-
this._cipher.encryptBlock(
|
|
3318
|
+
processBlock: function(u, v) {
|
|
3319
|
+
this._cipher.encryptBlock(u, v);
|
|
3367
3320
|
}
|
|
3368
3321
|
}), e.Decryptor = e.extend({
|
|
3369
|
-
processBlock: function(
|
|
3370
|
-
this._cipher.decryptBlock(
|
|
3322
|
+
processBlock: function(u, v) {
|
|
3323
|
+
this._cipher.decryptBlock(u, v);
|
|
3371
3324
|
}
|
|
3372
3325
|
}), e;
|
|
3373
3326
|
})(), t.mode.ECB;
|
|
3374
3327
|
});
|
|
3375
|
-
})(
|
|
3328
|
+
})(Y0)), Y0.exports;
|
|
3376
3329
|
}
|
|
3377
|
-
var
|
|
3378
|
-
function
|
|
3379
|
-
return
|
|
3380
|
-
(function(t, e,
|
|
3330
|
+
var Q0 = { exports: {} }, tx = Q0.exports, ce;
|
|
3331
|
+
function xx() {
|
|
3332
|
+
return ce || (ce = 1, (function(r, h) {
|
|
3333
|
+
(function(t, e, u) {
|
|
3381
3334
|
r.exports = e(M(), X());
|
|
3382
|
-
})(
|
|
3335
|
+
})(tx, function(t) {
|
|
3383
3336
|
return t.pad.AnsiX923 = {
|
|
3384
|
-
pad: function(e,
|
|
3385
|
-
var
|
|
3386
|
-
e.clamp(), e.words[
|
|
3337
|
+
pad: function(e, u) {
|
|
3338
|
+
var v = e.sigBytes, m = u * 4, B = m - v % m, C = v + B - 1;
|
|
3339
|
+
e.clamp(), e.words[C >>> 2] |= B << 24 - C % 4 * 8, e.sigBytes += B;
|
|
3387
3340
|
},
|
|
3388
3341
|
unpad: function(e) {
|
|
3389
|
-
var
|
|
3390
|
-
e.sigBytes -=
|
|
3342
|
+
var u = e.words[e.sigBytes - 1 >>> 2] & 255;
|
|
3343
|
+
e.sigBytes -= u;
|
|
3391
3344
|
}
|
|
3392
3345
|
}, t.pad.Ansix923;
|
|
3393
3346
|
});
|
|
3394
|
-
})(
|
|
3347
|
+
})(Q0)), Q0.exports;
|
|
3395
3348
|
}
|
|
3396
|
-
var
|
|
3397
|
-
function
|
|
3398
|
-
return
|
|
3399
|
-
(function(t, e,
|
|
3349
|
+
var V0 = { exports: {} }, nx = V0.exports, fe;
|
|
3350
|
+
function ax() {
|
|
3351
|
+
return fe || (fe = 1, (function(r, h) {
|
|
3352
|
+
(function(t, e, u) {
|
|
3400
3353
|
r.exports = e(M(), X());
|
|
3401
|
-
})(
|
|
3354
|
+
})(nx, function(t) {
|
|
3402
3355
|
return t.pad.Iso10126 = {
|
|
3403
|
-
pad: function(e,
|
|
3404
|
-
var
|
|
3405
|
-
e.concat(t.lib.WordArray.random(
|
|
3356
|
+
pad: function(e, u) {
|
|
3357
|
+
var v = u * 4, m = v - e.sigBytes % v;
|
|
3358
|
+
e.concat(t.lib.WordArray.random(m - 1)).concat(t.lib.WordArray.create([m << 24], 1));
|
|
3406
3359
|
},
|
|
3407
3360
|
unpad: function(e) {
|
|
3408
|
-
var
|
|
3409
|
-
e.sigBytes -=
|
|
3361
|
+
var u = e.words[e.sigBytes - 1 >>> 2] & 255;
|
|
3362
|
+
e.sigBytes -= u;
|
|
3410
3363
|
}
|
|
3411
3364
|
}, t.pad.Iso10126;
|
|
3412
3365
|
});
|
|
3413
|
-
})(
|
|
3366
|
+
})(V0)), V0.exports;
|
|
3414
3367
|
}
|
|
3415
|
-
var
|
|
3416
|
-
function
|
|
3417
|
-
return
|
|
3418
|
-
(function(t, e,
|
|
3368
|
+
var J0 = { exports: {} }, ox = J0.exports, ue;
|
|
3369
|
+
function ix() {
|
|
3370
|
+
return ue || (ue = 1, (function(r, h) {
|
|
3371
|
+
(function(t, e, u) {
|
|
3419
3372
|
r.exports = e(M(), X());
|
|
3420
|
-
})(
|
|
3373
|
+
})(ox, function(t) {
|
|
3421
3374
|
return t.pad.Iso97971 = {
|
|
3422
|
-
pad: function(e,
|
|
3423
|
-
e.concat(t.lib.WordArray.create([2147483648], 1)), t.pad.ZeroPadding.pad(e,
|
|
3375
|
+
pad: function(e, u) {
|
|
3376
|
+
e.concat(t.lib.WordArray.create([2147483648], 1)), t.pad.ZeroPadding.pad(e, u);
|
|
3424
3377
|
},
|
|
3425
3378
|
unpad: function(e) {
|
|
3426
3379
|
t.pad.ZeroPadding.unpad(e), e.sigBytes--;
|
|
3427
3380
|
}
|
|
3428
3381
|
}, t.pad.Iso97971;
|
|
3429
3382
|
});
|
|
3430
|
-
})(
|
|
3383
|
+
})(J0)), J0.exports;
|
|
3431
3384
|
}
|
|
3432
|
-
var
|
|
3433
|
-
function
|
|
3434
|
-
return
|
|
3435
|
-
(function(t, e,
|
|
3385
|
+
var rr = { exports: {} }, sx = rr.exports, de;
|
|
3386
|
+
function cx() {
|
|
3387
|
+
return de || (de = 1, (function(r, h) {
|
|
3388
|
+
(function(t, e, u) {
|
|
3436
3389
|
r.exports = e(M(), X());
|
|
3437
|
-
})(
|
|
3390
|
+
})(sx, function(t) {
|
|
3438
3391
|
return t.pad.ZeroPadding = {
|
|
3439
|
-
pad: function(e,
|
|
3440
|
-
var
|
|
3441
|
-
e.clamp(), e.sigBytes +=
|
|
3392
|
+
pad: function(e, u) {
|
|
3393
|
+
var v = u * 4;
|
|
3394
|
+
e.clamp(), e.sigBytes += v - (e.sigBytes % v || v);
|
|
3442
3395
|
},
|
|
3443
3396
|
unpad: function(e) {
|
|
3444
|
-
for (var
|
|
3445
|
-
if (
|
|
3446
|
-
e.sigBytes =
|
|
3397
|
+
for (var u = e.words, v = e.sigBytes - 1, v = e.sigBytes - 1; v >= 0; v--)
|
|
3398
|
+
if (u[v >>> 2] >>> 24 - v % 4 * 8 & 255) {
|
|
3399
|
+
e.sigBytes = v + 1;
|
|
3447
3400
|
break;
|
|
3448
3401
|
}
|
|
3449
3402
|
}
|
|
3450
3403
|
}, t.pad.ZeroPadding;
|
|
3451
3404
|
});
|
|
3452
|
-
})(
|
|
3405
|
+
})(rr)), rr.exports;
|
|
3453
3406
|
}
|
|
3454
|
-
var
|
|
3455
|
-
function
|
|
3456
|
-
return
|
|
3457
|
-
(function(t, e,
|
|
3407
|
+
var er = { exports: {} }, fx = er.exports, le;
|
|
3408
|
+
function ux() {
|
|
3409
|
+
return le || (le = 1, (function(r, h) {
|
|
3410
|
+
(function(t, e, u) {
|
|
3458
3411
|
r.exports = e(M(), X());
|
|
3459
|
-
})(
|
|
3412
|
+
})(fx, function(t) {
|
|
3460
3413
|
return t.pad.NoPadding = {
|
|
3461
3414
|
pad: function() {
|
|
3462
3415
|
},
|
|
@@ -3464,16 +3417,16 @@ function Dx() {
|
|
|
3464
3417
|
}
|
|
3465
3418
|
}, t.pad.NoPadding;
|
|
3466
3419
|
});
|
|
3467
|
-
})(
|
|
3420
|
+
})(er)), er.exports;
|
|
3468
3421
|
}
|
|
3469
|
-
var
|
|
3470
|
-
function
|
|
3471
|
-
return
|
|
3472
|
-
(function(t, e,
|
|
3422
|
+
var tr = { exports: {} }, dx = tr.exports, he;
|
|
3423
|
+
function lx() {
|
|
3424
|
+
return he || (he = 1, (function(r, h) {
|
|
3425
|
+
(function(t, e, u) {
|
|
3473
3426
|
r.exports = e(M(), X());
|
|
3474
|
-
})(
|
|
3427
|
+
})(dx, function(t) {
|
|
3475
3428
|
return (function(e) {
|
|
3476
|
-
var
|
|
3429
|
+
var u = t, v = u.lib, m = v.CipherParams, B = u.enc, C = B.Hex, x = u.format;
|
|
3477
3430
|
x.Hex = {
|
|
3478
3431
|
/**
|
|
3479
3432
|
* Converts the ciphertext of a cipher params object to a hexadecimally encoded string.
|
|
@@ -3489,7 +3442,7 @@ function mx() {
|
|
|
3489
3442
|
* var hexString = CryptoJS.format.Hex.stringify(cipherParams);
|
|
3490
3443
|
*/
|
|
3491
3444
|
stringify: function(n) {
|
|
3492
|
-
return n.ciphertext.toString(
|
|
3445
|
+
return n.ciphertext.toString(C);
|
|
3493
3446
|
},
|
|
3494
3447
|
/**
|
|
3495
3448
|
* Converts a hexadecimally encoded ciphertext string to a cipher params object.
|
|
@@ -3505,82 +3458,82 @@ function mx() {
|
|
|
3505
3458
|
* var cipherParams = CryptoJS.format.Hex.parse(hexString);
|
|
3506
3459
|
*/
|
|
3507
3460
|
parse: function(n) {
|
|
3508
|
-
var E =
|
|
3509
|
-
return
|
|
3461
|
+
var E = C.parse(n);
|
|
3462
|
+
return m.create({ ciphertext: E });
|
|
3510
3463
|
}
|
|
3511
3464
|
};
|
|
3512
3465
|
})(), t.format.Hex;
|
|
3513
3466
|
});
|
|
3514
|
-
})(
|
|
3467
|
+
})(tr)), tr.exports;
|
|
3515
3468
|
}
|
|
3516
|
-
var
|
|
3517
|
-
function
|
|
3518
|
-
return
|
|
3519
|
-
(function(t, e,
|
|
3520
|
-
r.exports = e(M(),
|
|
3521
|
-
})(
|
|
3469
|
+
var xr = { exports: {} }, hx = xr.exports, ve;
|
|
3470
|
+
function vx() {
|
|
3471
|
+
return ve || (ve = 1, (function(r, h) {
|
|
3472
|
+
(function(t, e, u) {
|
|
3473
|
+
r.exports = e(M(), s0(), c0(), a0(), X());
|
|
3474
|
+
})(hx, function(t) {
|
|
3522
3475
|
return (function() {
|
|
3523
|
-
var e = t,
|
|
3476
|
+
var e = t, u = e.lib, v = u.BlockCipher, m = e.algo, B = [], C = [], x = [], n = [], E = [], a = [], s = [], f = [], p = [], l = [];
|
|
3524
3477
|
(function() {
|
|
3525
3478
|
for (var o = [], d = 0; d < 256; d++)
|
|
3526
3479
|
d < 128 ? o[d] = d << 1 : o[d] = d << 1 ^ 283;
|
|
3527
|
-
for (var b = 0,
|
|
3528
|
-
var y =
|
|
3529
|
-
y = y >>> 8 ^ y & 255 ^ 99,
|
|
3530
|
-
var k = o[b],
|
|
3480
|
+
for (var b = 0, D = 0, d = 0; d < 256; d++) {
|
|
3481
|
+
var y = D ^ D << 1 ^ D << 2 ^ D << 3 ^ D << 4;
|
|
3482
|
+
y = y >>> 8 ^ y & 255 ^ 99, B[b] = y, C[y] = b;
|
|
3483
|
+
var k = o[b], R = o[k], F = o[R], w = o[y] * 257 ^ y * 16843008;
|
|
3531
3484
|
x[b] = w << 24 | w >>> 8, n[b] = w << 16 | w >>> 16, E[b] = w << 8 | w >>> 24, a[b] = w;
|
|
3532
|
-
var w = F * 16843009 ^
|
|
3533
|
-
s[y] = w << 24 | w >>> 8,
|
|
3485
|
+
var w = F * 16843009 ^ R * 65537 ^ k * 257 ^ b * 16843008;
|
|
3486
|
+
s[y] = w << 24 | w >>> 8, f[y] = w << 16 | w >>> 16, p[y] = w << 8 | w >>> 24, l[y] = w, b ? (b = k ^ o[o[o[F ^ k]]], D ^= o[o[D]]) : b = D = 1;
|
|
3534
3487
|
}
|
|
3535
3488
|
})();
|
|
3536
|
-
var
|
|
3489
|
+
var g = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], i = m.AES = v.extend({
|
|
3537
3490
|
_doReset: function() {
|
|
3538
3491
|
var o;
|
|
3539
3492
|
if (!(this._nRounds && this._keyPriorReset === this._key)) {
|
|
3540
|
-
for (var d = this._keyPriorReset = this._key, b = d.words,
|
|
3541
|
-
F <
|
|
3493
|
+
for (var d = this._keyPriorReset = this._key, b = d.words, D = d.sigBytes / 4, y = this._nRounds = D + 6, k = (y + 1) * 4, R = this._keySchedule = [], F = 0; F < k; F++)
|
|
3494
|
+
F < D ? R[F] = b[F] : (o = R[F - 1], F % D ? D > 6 && F % D == 4 && (o = B[o >>> 24] << 24 | B[o >>> 16 & 255] << 16 | B[o >>> 8 & 255] << 8 | B[o & 255]) : (o = o << 8 | o >>> 24, o = B[o >>> 24] << 24 | B[o >>> 16 & 255] << 16 | B[o >>> 8 & 255] << 8 | B[o & 255], o ^= g[F / D | 0] << 24), R[F] = R[F - D] ^ o);
|
|
3542
3495
|
for (var w = this._invKeySchedule = [], H = 0; H < k; H++) {
|
|
3543
3496
|
var F = k - H;
|
|
3544
3497
|
if (H % 4)
|
|
3545
|
-
var o =
|
|
3498
|
+
var o = R[F];
|
|
3546
3499
|
else
|
|
3547
|
-
var o =
|
|
3548
|
-
H < 4 || F <= 4 ? w[H] = o : w[H] = s[
|
|
3500
|
+
var o = R[F - 4];
|
|
3501
|
+
H < 4 || F <= 4 ? w[H] = o : w[H] = s[B[o >>> 24]] ^ f[B[o >>> 16 & 255]] ^ p[B[o >>> 8 & 255]] ^ l[B[o & 255]];
|
|
3549
3502
|
}
|
|
3550
3503
|
}
|
|
3551
3504
|
},
|
|
3552
3505
|
encryptBlock: function(o, d) {
|
|
3553
|
-
this._doCryptBlock(o, d, this._keySchedule, x, n, E, a,
|
|
3506
|
+
this._doCryptBlock(o, d, this._keySchedule, x, n, E, a, B);
|
|
3554
3507
|
},
|
|
3555
3508
|
decryptBlock: function(o, d) {
|
|
3556
3509
|
var b = o[d + 1];
|
|
3557
|
-
o[d + 1] = o[d + 3], o[d + 3] = b, this._doCryptBlock(o, d, this._invKeySchedule, s,
|
|
3510
|
+
o[d + 1] = o[d + 3], o[d + 3] = b, this._doCryptBlock(o, d, this._invKeySchedule, s, f, p, l, C);
|
|
3558
3511
|
var b = o[d + 1];
|
|
3559
3512
|
o[d + 1] = o[d + 3], o[d + 3] = b;
|
|
3560
3513
|
},
|
|
3561
|
-
_doCryptBlock: function(o, d, b,
|
|
3562
|
-
for (var w = this._nRounds, H = o[d] ^ b[0],
|
|
3563
|
-
var T =
|
|
3564
|
-
H = T,
|
|
3514
|
+
_doCryptBlock: function(o, d, b, D, y, k, R, F) {
|
|
3515
|
+
for (var w = this._nRounds, H = o[d] ^ b[0], $ = o[d + 1] ^ b[1], z = o[d + 2] ^ b[2], O = o[d + 3] ^ b[3], q = 4, U = 1; U < w; U++) {
|
|
3516
|
+
var T = D[H >>> 24] ^ y[$ >>> 16 & 255] ^ k[z >>> 8 & 255] ^ R[O & 255] ^ b[q++], N = D[$ >>> 24] ^ y[z >>> 16 & 255] ^ k[O >>> 8 & 255] ^ R[H & 255] ^ b[q++], j = D[z >>> 24] ^ y[O >>> 16 & 255] ^ k[H >>> 8 & 255] ^ R[$ & 255] ^ b[q++], S = D[O >>> 24] ^ y[H >>> 16 & 255] ^ k[$ >>> 8 & 255] ^ R[z & 255] ^ b[q++];
|
|
3517
|
+
H = T, $ = N, z = j, O = S;
|
|
3565
3518
|
}
|
|
3566
|
-
var T = (F[H >>> 24] << 24 | F[
|
|
3519
|
+
var T = (F[H >>> 24] << 24 | F[$ >>> 16 & 255] << 16 | F[z >>> 8 & 255] << 8 | F[O & 255]) ^ b[q++], N = (F[$ >>> 24] << 24 | F[z >>> 16 & 255] << 16 | F[O >>> 8 & 255] << 8 | F[H & 255]) ^ b[q++], j = (F[z >>> 24] << 24 | F[O >>> 16 & 255] << 16 | F[H >>> 8 & 255] << 8 | F[$ & 255]) ^ b[q++], S = (F[O >>> 24] << 24 | F[H >>> 16 & 255] << 16 | F[$ >>> 8 & 255] << 8 | F[z & 255]) ^ b[q++];
|
|
3567
3520
|
o[d] = T, o[d + 1] = N, o[d + 2] = j, o[d + 3] = S;
|
|
3568
3521
|
},
|
|
3569
3522
|
keySize: 256 / 32
|
|
3570
3523
|
});
|
|
3571
|
-
e.AES =
|
|
3524
|
+
e.AES = v._createHelper(i);
|
|
3572
3525
|
})(), t.AES;
|
|
3573
3526
|
});
|
|
3574
|
-
})(
|
|
3527
|
+
})(xr)), xr.exports;
|
|
3575
3528
|
}
|
|
3576
|
-
var
|
|
3577
|
-
function
|
|
3578
|
-
return
|
|
3579
|
-
(function(t, e,
|
|
3580
|
-
r.exports = e(M(),
|
|
3581
|
-
})(
|
|
3529
|
+
var nr = { exports: {} }, px = nr.exports, pe;
|
|
3530
|
+
function Bx() {
|
|
3531
|
+
return pe || (pe = 1, (function(r, h) {
|
|
3532
|
+
(function(t, e, u) {
|
|
3533
|
+
r.exports = e(M(), s0(), c0(), a0(), X());
|
|
3534
|
+
})(px, function(t) {
|
|
3582
3535
|
return (function() {
|
|
3583
|
-
var e = t,
|
|
3536
|
+
var e = t, u = e.lib, v = u.WordArray, m = u.BlockCipher, B = e.algo, C = [
|
|
3584
3537
|
57,
|
|
3585
3538
|
49,
|
|
3586
3539
|
41,
|
|
@@ -4224,140 +4177,140 @@ function kx() {
|
|
|
4224
4177
|
8064,
|
|
4225
4178
|
504,
|
|
4226
4179
|
2147483679
|
|
4227
|
-
], s =
|
|
4180
|
+
], s = B.DES = m.extend({
|
|
4228
4181
|
_doReset: function() {
|
|
4229
|
-
for (var
|
|
4230
|
-
var b =
|
|
4182
|
+
for (var g = this._key, i = g.words, o = [], d = 0; d < 56; d++) {
|
|
4183
|
+
var b = C[d] - 1;
|
|
4231
4184
|
o[d] = i[b >>> 5] >>> 31 - b % 32 & 1;
|
|
4232
4185
|
}
|
|
4233
|
-
for (var
|
|
4234
|
-
for (var k =
|
|
4235
|
-
k[d / 6 | 0] |= o[(x[d] - 1 +
|
|
4186
|
+
for (var D = this._subKeys = [], y = 0; y < 16; y++) {
|
|
4187
|
+
for (var k = D[y] = [], R = n[y], d = 0; d < 24; d++)
|
|
4188
|
+
k[d / 6 | 0] |= o[(x[d] - 1 + R) % 28] << 31 - d % 6, k[4 + (d / 6 | 0)] |= o[28 + (x[d + 24] - 1 + R) % 28] << 31 - d % 6;
|
|
4236
4189
|
k[0] = k[0] << 1 | k[0] >>> 31;
|
|
4237
4190
|
for (var d = 1; d < 7; d++)
|
|
4238
4191
|
k[d] = k[d] >>> (d - 1) * 4 + 3;
|
|
4239
4192
|
k[7] = k[7] << 5 | k[7] >>> 27;
|
|
4240
4193
|
}
|
|
4241
4194
|
for (var F = this._invSubKeys = [], d = 0; d < 16; d++)
|
|
4242
|
-
F[d] =
|
|
4195
|
+
F[d] = D[15 - d];
|
|
4243
4196
|
},
|
|
4244
|
-
encryptBlock: function(
|
|
4245
|
-
this._doCryptBlock(
|
|
4197
|
+
encryptBlock: function(g, i) {
|
|
4198
|
+
this._doCryptBlock(g, i, this._subKeys);
|
|
4246
4199
|
},
|
|
4247
|
-
decryptBlock: function(
|
|
4248
|
-
this._doCryptBlock(
|
|
4200
|
+
decryptBlock: function(g, i) {
|
|
4201
|
+
this._doCryptBlock(g, i, this._invSubKeys);
|
|
4249
4202
|
},
|
|
4250
|
-
_doCryptBlock: function(
|
|
4251
|
-
this._lBlock =
|
|
4203
|
+
_doCryptBlock: function(g, i, o) {
|
|
4204
|
+
this._lBlock = g[i], this._rBlock = g[i + 1], f.call(this, 4, 252645135), f.call(this, 16, 65535), p.call(this, 2, 858993459), p.call(this, 8, 16711935), f.call(this, 1, 1431655765);
|
|
4252
4205
|
for (var d = 0; d < 16; d++) {
|
|
4253
|
-
for (var b = o[d],
|
|
4254
|
-
k |= E[
|
|
4255
|
-
this._lBlock = y, this._rBlock =
|
|
4206
|
+
for (var b = o[d], D = this._lBlock, y = this._rBlock, k = 0, R = 0; R < 8; R++)
|
|
4207
|
+
k |= E[R][((y ^ b[R]) & a[R]) >>> 0];
|
|
4208
|
+
this._lBlock = y, this._rBlock = D ^ k;
|
|
4256
4209
|
}
|
|
4257
4210
|
var F = this._lBlock;
|
|
4258
|
-
this._lBlock = this._rBlock, this._rBlock = F,
|
|
4211
|
+
this._lBlock = this._rBlock, this._rBlock = F, f.call(this, 1, 1431655765), p.call(this, 8, 16711935), p.call(this, 2, 858993459), f.call(this, 16, 65535), f.call(this, 4, 252645135), g[i] = this._lBlock, g[i + 1] = this._rBlock;
|
|
4259
4212
|
},
|
|
4260
4213
|
keySize: 64 / 32,
|
|
4261
4214
|
ivSize: 64 / 32,
|
|
4262
4215
|
blockSize: 64 / 32
|
|
4263
4216
|
});
|
|
4264
|
-
function
|
|
4265
|
-
var o = (this._lBlock >>>
|
|
4266
|
-
this._rBlock ^= o, this._lBlock ^= o <<
|
|
4217
|
+
function f(g, i) {
|
|
4218
|
+
var o = (this._lBlock >>> g ^ this._rBlock) & i;
|
|
4219
|
+
this._rBlock ^= o, this._lBlock ^= o << g;
|
|
4267
4220
|
}
|
|
4268
|
-
function p(
|
|
4269
|
-
var o = (this._rBlock >>>
|
|
4270
|
-
this._lBlock ^= o, this._rBlock ^= o <<
|
|
4221
|
+
function p(g, i) {
|
|
4222
|
+
var o = (this._rBlock >>> g ^ this._lBlock) & i;
|
|
4223
|
+
this._lBlock ^= o, this._rBlock ^= o << g;
|
|
4271
4224
|
}
|
|
4272
|
-
e.DES =
|
|
4273
|
-
var
|
|
4225
|
+
e.DES = m._createHelper(s);
|
|
4226
|
+
var l = B.TripleDES = m.extend({
|
|
4274
4227
|
_doReset: function() {
|
|
4275
|
-
var
|
|
4228
|
+
var g = this._key, i = g.words;
|
|
4276
4229
|
if (i.length !== 2 && i.length !== 4 && i.length < 6)
|
|
4277
4230
|
throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");
|
|
4278
4231
|
var o = i.slice(0, 2), d = i.length < 4 ? i.slice(0, 2) : i.slice(2, 4), b = i.length < 6 ? i.slice(0, 2) : i.slice(4, 6);
|
|
4279
|
-
this._des1 = s.createEncryptor(
|
|
4232
|
+
this._des1 = s.createEncryptor(v.create(o)), this._des2 = s.createEncryptor(v.create(d)), this._des3 = s.createEncryptor(v.create(b));
|
|
4280
4233
|
},
|
|
4281
|
-
encryptBlock: function(
|
|
4282
|
-
this._des1.encryptBlock(
|
|
4234
|
+
encryptBlock: function(g, i) {
|
|
4235
|
+
this._des1.encryptBlock(g, i), this._des2.decryptBlock(g, i), this._des3.encryptBlock(g, i);
|
|
4283
4236
|
},
|
|
4284
|
-
decryptBlock: function(
|
|
4285
|
-
this._des3.decryptBlock(
|
|
4237
|
+
decryptBlock: function(g, i) {
|
|
4238
|
+
this._des3.decryptBlock(g, i), this._des2.encryptBlock(g, i), this._des1.decryptBlock(g, i);
|
|
4286
4239
|
},
|
|
4287
4240
|
keySize: 192 / 32,
|
|
4288
4241
|
ivSize: 64 / 32,
|
|
4289
4242
|
blockSize: 64 / 32
|
|
4290
4243
|
});
|
|
4291
|
-
e.TripleDES =
|
|
4244
|
+
e.TripleDES = m._createHelper(l);
|
|
4292
4245
|
})(), t.TripleDES;
|
|
4293
4246
|
});
|
|
4294
|
-
})(
|
|
4247
|
+
})(nr)), nr.exports;
|
|
4295
4248
|
}
|
|
4296
|
-
var
|
|
4297
|
-
function
|
|
4298
|
-
return
|
|
4299
|
-
(function(t, e,
|
|
4300
|
-
r.exports = e(M(),
|
|
4301
|
-
})(
|
|
4249
|
+
var ar = { exports: {} }, Cx = ar.exports, Be;
|
|
4250
|
+
function Ex() {
|
|
4251
|
+
return Be || (Be = 1, (function(r, h) {
|
|
4252
|
+
(function(t, e, u) {
|
|
4253
|
+
r.exports = e(M(), s0(), c0(), a0(), X());
|
|
4254
|
+
})(Cx, function(t) {
|
|
4302
4255
|
return (function() {
|
|
4303
|
-
var e = t,
|
|
4256
|
+
var e = t, u = e.lib, v = u.StreamCipher, m = e.algo, B = m.RC4 = v.extend({
|
|
4304
4257
|
_doReset: function() {
|
|
4305
|
-
for (var n = this._key, E = n.words, a = n.sigBytes, s = this._S = [],
|
|
4306
|
-
s[
|
|
4307
|
-
for (var
|
|
4308
|
-
var
|
|
4309
|
-
p = (p + s[
|
|
4310
|
-
var i = s[
|
|
4311
|
-
s[
|
|
4258
|
+
for (var n = this._key, E = n.words, a = n.sigBytes, s = this._S = [], f = 0; f < 256; f++)
|
|
4259
|
+
s[f] = f;
|
|
4260
|
+
for (var f = 0, p = 0; f < 256; f++) {
|
|
4261
|
+
var l = f % a, g = E[l >>> 2] >>> 24 - l % 4 * 8 & 255;
|
|
4262
|
+
p = (p + s[f] + g) % 256;
|
|
4263
|
+
var i = s[f];
|
|
4264
|
+
s[f] = s[p], s[p] = i;
|
|
4312
4265
|
}
|
|
4313
4266
|
this._i = this._j = 0;
|
|
4314
4267
|
},
|
|
4315
4268
|
_doProcessBlock: function(n, E) {
|
|
4316
|
-
n[E] ^=
|
|
4269
|
+
n[E] ^= C.call(this);
|
|
4317
4270
|
},
|
|
4318
4271
|
keySize: 256 / 32,
|
|
4319
4272
|
ivSize: 0
|
|
4320
4273
|
});
|
|
4321
|
-
function
|
|
4322
|
-
for (var n = this._S, E = this._i, a = this._j, s = 0,
|
|
4274
|
+
function C() {
|
|
4275
|
+
for (var n = this._S, E = this._i, a = this._j, s = 0, f = 0; f < 4; f++) {
|
|
4323
4276
|
E = (E + 1) % 256, a = (a + n[E]) % 256;
|
|
4324
4277
|
var p = n[E];
|
|
4325
|
-
n[E] = n[a], n[a] = p, s |= n[(n[E] + n[a]) % 256] << 24 -
|
|
4278
|
+
n[E] = n[a], n[a] = p, s |= n[(n[E] + n[a]) % 256] << 24 - f * 8;
|
|
4326
4279
|
}
|
|
4327
4280
|
return this._i = E, this._j = a, s;
|
|
4328
4281
|
}
|
|
4329
|
-
e.RC4 =
|
|
4330
|
-
var x =
|
|
4282
|
+
e.RC4 = v._createHelper(B);
|
|
4283
|
+
var x = m.RC4Drop = B.extend({
|
|
4331
4284
|
/**
|
|
4332
4285
|
* Configuration options.
|
|
4333
4286
|
*
|
|
4334
4287
|
* @property {number} drop The number of keystream words to drop. Default 192
|
|
4335
4288
|
*/
|
|
4336
|
-
cfg:
|
|
4289
|
+
cfg: B.cfg.extend({
|
|
4337
4290
|
drop: 192
|
|
4338
4291
|
}),
|
|
4339
4292
|
_doReset: function() {
|
|
4340
|
-
|
|
4293
|
+
B._doReset.call(this);
|
|
4341
4294
|
for (var n = this.cfg.drop; n > 0; n--)
|
|
4342
|
-
|
|
4295
|
+
C.call(this);
|
|
4343
4296
|
}
|
|
4344
4297
|
});
|
|
4345
|
-
e.RC4Drop =
|
|
4298
|
+
e.RC4Drop = v._createHelper(x);
|
|
4346
4299
|
})(), t.RC4;
|
|
4347
4300
|
});
|
|
4348
|
-
})(
|
|
4301
|
+
})(ar)), ar.exports;
|
|
4349
4302
|
}
|
|
4350
|
-
var
|
|
4351
|
-
function
|
|
4352
|
-
return
|
|
4353
|
-
(function(t, e,
|
|
4354
|
-
r.exports = e(M(),
|
|
4355
|
-
})(
|
|
4303
|
+
var or = { exports: {} }, Ax = or.exports, Ce;
|
|
4304
|
+
function Fx() {
|
|
4305
|
+
return Ce || (Ce = 1, (function(r, h) {
|
|
4306
|
+
(function(t, e, u) {
|
|
4307
|
+
r.exports = e(M(), s0(), c0(), a0(), X());
|
|
4308
|
+
})(Ax, function(t) {
|
|
4356
4309
|
return (function() {
|
|
4357
|
-
var e = t,
|
|
4310
|
+
var e = t, u = e.lib, v = u.StreamCipher, m = e.algo, B = [], C = [], x = [], n = m.Rabbit = v.extend({
|
|
4358
4311
|
_doReset: function() {
|
|
4359
|
-
for (var a = this._key.words, s = this.cfg.iv,
|
|
4360
|
-
a[
|
|
4312
|
+
for (var a = this._key.words, s = this.cfg.iv, f = 0; f < 4; f++)
|
|
4313
|
+
a[f] = (a[f] << 8 | a[f] >>> 24) & 16711935 | (a[f] << 24 | a[f] >>> 8) & 4278255360;
|
|
4361
4314
|
var p = this._X = [
|
|
4362
4315
|
a[0],
|
|
4363
4316
|
a[3] << 16 | a[2] >>> 16,
|
|
@@ -4367,7 +4320,7 @@ function $x() {
|
|
|
4367
4320
|
a[1] << 16 | a[0] >>> 16,
|
|
4368
4321
|
a[3],
|
|
4369
4322
|
a[2] << 16 | a[1] >>> 16
|
|
4370
|
-
],
|
|
4323
|
+
], l = this._C = [
|
|
4371
4324
|
a[2] << 16 | a[2] >>> 16,
|
|
4372
4325
|
a[0] & 4294901760 | a[1] & 65535,
|
|
4373
4326
|
a[3] << 16 | a[3] >>> 16,
|
|
@@ -4378,51 +4331,51 @@ function $x() {
|
|
|
4378
4331
|
a[3] & 4294901760 | a[0] & 65535
|
|
4379
4332
|
];
|
|
4380
4333
|
this._b = 0;
|
|
4381
|
-
for (var
|
|
4334
|
+
for (var f = 0; f < 4; f++)
|
|
4382
4335
|
E.call(this);
|
|
4383
|
-
for (var
|
|
4384
|
-
|
|
4336
|
+
for (var f = 0; f < 8; f++)
|
|
4337
|
+
l[f] ^= p[f + 4 & 7];
|
|
4385
4338
|
if (s) {
|
|
4386
|
-
var
|
|
4387
|
-
|
|
4388
|
-
for (var
|
|
4339
|
+
var g = s.words, i = g[0], o = g[1], d = (i << 8 | i >>> 24) & 16711935 | (i << 24 | i >>> 8) & 4278255360, b = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360, D = d >>> 16 | b & 4294901760, y = b << 16 | d & 65535;
|
|
4340
|
+
l[0] ^= d, l[1] ^= D, l[2] ^= b, l[3] ^= y, l[4] ^= d, l[5] ^= D, l[6] ^= b, l[7] ^= y;
|
|
4341
|
+
for (var f = 0; f < 4; f++)
|
|
4389
4342
|
E.call(this);
|
|
4390
4343
|
}
|
|
4391
4344
|
},
|
|
4392
4345
|
_doProcessBlock: function(a, s) {
|
|
4393
|
-
var
|
|
4394
|
-
E.call(this),
|
|
4346
|
+
var f = this._X;
|
|
4347
|
+
E.call(this), B[0] = f[0] ^ f[5] >>> 16 ^ f[3] << 16, B[1] = f[2] ^ f[7] >>> 16 ^ f[5] << 16, B[2] = f[4] ^ f[1] >>> 16 ^ f[7] << 16, B[3] = f[6] ^ f[3] >>> 16 ^ f[1] << 16;
|
|
4395
4348
|
for (var p = 0; p < 4; p++)
|
|
4396
|
-
|
|
4349
|
+
B[p] = (B[p] << 8 | B[p] >>> 24) & 16711935 | (B[p] << 24 | B[p] >>> 8) & 4278255360, a[s + p] ^= B[p];
|
|
4397
4350
|
},
|
|
4398
4351
|
blockSize: 128 / 32,
|
|
4399
4352
|
ivSize: 64 / 32
|
|
4400
4353
|
});
|
|
4401
4354
|
function E() {
|
|
4402
|
-
for (var a = this._X, s = this._C,
|
|
4403
|
-
|
|
4404
|
-
s[0] = s[0] + 1295307597 + this._b | 0, s[1] = s[1] + 3545052371 + (s[0] >>> 0 <
|
|
4405
|
-
for (var
|
|
4406
|
-
var p = a[
|
|
4407
|
-
x[
|
|
4355
|
+
for (var a = this._X, s = this._C, f = 0; f < 8; f++)
|
|
4356
|
+
C[f] = s[f];
|
|
4357
|
+
s[0] = s[0] + 1295307597 + this._b | 0, s[1] = s[1] + 3545052371 + (s[0] >>> 0 < C[0] >>> 0 ? 1 : 0) | 0, s[2] = s[2] + 886263092 + (s[1] >>> 0 < C[1] >>> 0 ? 1 : 0) | 0, s[3] = s[3] + 1295307597 + (s[2] >>> 0 < C[2] >>> 0 ? 1 : 0) | 0, s[4] = s[4] + 3545052371 + (s[3] >>> 0 < C[3] >>> 0 ? 1 : 0) | 0, s[5] = s[5] + 886263092 + (s[4] >>> 0 < C[4] >>> 0 ? 1 : 0) | 0, s[6] = s[6] + 1295307597 + (s[5] >>> 0 < C[5] >>> 0 ? 1 : 0) | 0, s[7] = s[7] + 3545052371 + (s[6] >>> 0 < C[6] >>> 0 ? 1 : 0) | 0, this._b = s[7] >>> 0 < C[7] >>> 0 ? 1 : 0;
|
|
4358
|
+
for (var f = 0; f < 8; f++) {
|
|
4359
|
+
var p = a[f] + s[f], l = p & 65535, g = p >>> 16, i = ((l * l >>> 17) + l * g >>> 15) + g * g, o = ((p & 4294901760) * p | 0) + ((p & 65535) * p | 0);
|
|
4360
|
+
x[f] = i ^ o;
|
|
4408
4361
|
}
|
|
4409
4362
|
a[0] = x[0] + (x[7] << 16 | x[7] >>> 16) + (x[6] << 16 | x[6] >>> 16) | 0, a[1] = x[1] + (x[0] << 8 | x[0] >>> 24) + x[7] | 0, a[2] = x[2] + (x[1] << 16 | x[1] >>> 16) + (x[0] << 16 | x[0] >>> 16) | 0, a[3] = x[3] + (x[2] << 8 | x[2] >>> 24) + x[1] | 0, a[4] = x[4] + (x[3] << 16 | x[3] >>> 16) + (x[2] << 16 | x[2] >>> 16) | 0, a[5] = x[5] + (x[4] << 8 | x[4] >>> 24) + x[3] | 0, a[6] = x[6] + (x[5] << 16 | x[5] >>> 16) + (x[4] << 16 | x[4] >>> 16) | 0, a[7] = x[7] + (x[6] << 8 | x[6] >>> 24) + x[5] | 0;
|
|
4410
4363
|
}
|
|
4411
|
-
e.Rabbit =
|
|
4364
|
+
e.Rabbit = v._createHelper(n);
|
|
4412
4365
|
})(), t.Rabbit;
|
|
4413
4366
|
});
|
|
4414
|
-
})(
|
|
4367
|
+
})(or)), or.exports;
|
|
4415
4368
|
}
|
|
4416
|
-
var
|
|
4417
|
-
function
|
|
4418
|
-
return
|
|
4419
|
-
(function(t, e,
|
|
4420
|
-
r.exports = e(M(),
|
|
4421
|
-
})(
|
|
4369
|
+
var ir = { exports: {} }, Dx = ir.exports, Ee;
|
|
4370
|
+
function gx() {
|
|
4371
|
+
return Ee || (Ee = 1, (function(r, h) {
|
|
4372
|
+
(function(t, e, u) {
|
|
4373
|
+
r.exports = e(M(), s0(), c0(), a0(), X());
|
|
4374
|
+
})(Dx, function(t) {
|
|
4422
4375
|
return (function() {
|
|
4423
|
-
var e = t,
|
|
4376
|
+
var e = t, u = e.lib, v = u.StreamCipher, m = e.algo, B = [], C = [], x = [], n = m.RabbitLegacy = v.extend({
|
|
4424
4377
|
_doReset: function() {
|
|
4425
|
-
var a = this._key.words, s = this.cfg.iv,
|
|
4378
|
+
var a = this._key.words, s = this.cfg.iv, f = this._X = [
|
|
4426
4379
|
a[0],
|
|
4427
4380
|
a[3] << 16 | a[2] >>> 16,
|
|
4428
4381
|
a[1],
|
|
@@ -4442,50 +4395,50 @@ function zx() {
|
|
|
4442
4395
|
a[3] & 4294901760 | a[0] & 65535
|
|
4443
4396
|
];
|
|
4444
4397
|
this._b = 0;
|
|
4445
|
-
for (var
|
|
4398
|
+
for (var l = 0; l < 4; l++)
|
|
4446
4399
|
E.call(this);
|
|
4447
|
-
for (var
|
|
4448
|
-
p[
|
|
4400
|
+
for (var l = 0; l < 8; l++)
|
|
4401
|
+
p[l] ^= f[l + 4 & 7];
|
|
4449
4402
|
if (s) {
|
|
4450
|
-
var
|
|
4451
|
-
p[0] ^= d, p[1] ^=
|
|
4452
|
-
for (var
|
|
4403
|
+
var g = s.words, i = g[0], o = g[1], d = (i << 8 | i >>> 24) & 16711935 | (i << 24 | i >>> 8) & 4278255360, b = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360, D = d >>> 16 | b & 4294901760, y = b << 16 | d & 65535;
|
|
4404
|
+
p[0] ^= d, p[1] ^= D, p[2] ^= b, p[3] ^= y, p[4] ^= d, p[5] ^= D, p[6] ^= b, p[7] ^= y;
|
|
4405
|
+
for (var l = 0; l < 4; l++)
|
|
4453
4406
|
E.call(this);
|
|
4454
4407
|
}
|
|
4455
4408
|
},
|
|
4456
4409
|
_doProcessBlock: function(a, s) {
|
|
4457
|
-
var
|
|
4458
|
-
E.call(this),
|
|
4410
|
+
var f = this._X;
|
|
4411
|
+
E.call(this), B[0] = f[0] ^ f[5] >>> 16 ^ f[3] << 16, B[1] = f[2] ^ f[7] >>> 16 ^ f[5] << 16, B[2] = f[4] ^ f[1] >>> 16 ^ f[7] << 16, B[3] = f[6] ^ f[3] >>> 16 ^ f[1] << 16;
|
|
4459
4412
|
for (var p = 0; p < 4; p++)
|
|
4460
|
-
|
|
4413
|
+
B[p] = (B[p] << 8 | B[p] >>> 24) & 16711935 | (B[p] << 24 | B[p] >>> 8) & 4278255360, a[s + p] ^= B[p];
|
|
4461
4414
|
},
|
|
4462
4415
|
blockSize: 128 / 32,
|
|
4463
4416
|
ivSize: 64 / 32
|
|
4464
4417
|
});
|
|
4465
4418
|
function E() {
|
|
4466
|
-
for (var a = this._X, s = this._C,
|
|
4467
|
-
|
|
4468
|
-
s[0] = s[0] + 1295307597 + this._b | 0, s[1] = s[1] + 3545052371 + (s[0] >>> 0 <
|
|
4469
|
-
for (var
|
|
4470
|
-
var p = a[
|
|
4471
|
-
x[
|
|
4419
|
+
for (var a = this._X, s = this._C, f = 0; f < 8; f++)
|
|
4420
|
+
C[f] = s[f];
|
|
4421
|
+
s[0] = s[0] + 1295307597 + this._b | 0, s[1] = s[1] + 3545052371 + (s[0] >>> 0 < C[0] >>> 0 ? 1 : 0) | 0, s[2] = s[2] + 886263092 + (s[1] >>> 0 < C[1] >>> 0 ? 1 : 0) | 0, s[3] = s[3] + 1295307597 + (s[2] >>> 0 < C[2] >>> 0 ? 1 : 0) | 0, s[4] = s[4] + 3545052371 + (s[3] >>> 0 < C[3] >>> 0 ? 1 : 0) | 0, s[5] = s[5] + 886263092 + (s[4] >>> 0 < C[4] >>> 0 ? 1 : 0) | 0, s[6] = s[6] + 1295307597 + (s[5] >>> 0 < C[5] >>> 0 ? 1 : 0) | 0, s[7] = s[7] + 3545052371 + (s[6] >>> 0 < C[6] >>> 0 ? 1 : 0) | 0, this._b = s[7] >>> 0 < C[7] >>> 0 ? 1 : 0;
|
|
4422
|
+
for (var f = 0; f < 8; f++) {
|
|
4423
|
+
var p = a[f] + s[f], l = p & 65535, g = p >>> 16, i = ((l * l >>> 17) + l * g >>> 15) + g * g, o = ((p & 4294901760) * p | 0) + ((p & 65535) * p | 0);
|
|
4424
|
+
x[f] = i ^ o;
|
|
4472
4425
|
}
|
|
4473
4426
|
a[0] = x[0] + (x[7] << 16 | x[7] >>> 16) + (x[6] << 16 | x[6] >>> 16) | 0, a[1] = x[1] + (x[0] << 8 | x[0] >>> 24) + x[7] | 0, a[2] = x[2] + (x[1] << 16 | x[1] >>> 16) + (x[0] << 16 | x[0] >>> 16) | 0, a[3] = x[3] + (x[2] << 8 | x[2] >>> 24) + x[1] | 0, a[4] = x[4] + (x[3] << 16 | x[3] >>> 16) + (x[2] << 16 | x[2] >>> 16) | 0, a[5] = x[5] + (x[4] << 8 | x[4] >>> 24) + x[3] | 0, a[6] = x[6] + (x[5] << 16 | x[5] >>> 16) + (x[4] << 16 | x[4] >>> 16) | 0, a[7] = x[7] + (x[6] << 8 | x[6] >>> 24) + x[5] | 0;
|
|
4474
4427
|
}
|
|
4475
|
-
e.RabbitLegacy =
|
|
4428
|
+
e.RabbitLegacy = v._createHelper(n);
|
|
4476
4429
|
})(), t.RabbitLegacy;
|
|
4477
4430
|
});
|
|
4478
|
-
})(
|
|
4431
|
+
})(ir)), ir.exports;
|
|
4479
4432
|
}
|
|
4480
|
-
var
|
|
4481
|
-
function
|
|
4482
|
-
return
|
|
4483
|
-
(function(t, e,
|
|
4484
|
-
r.exports = e(M(),
|
|
4485
|
-
})(
|
|
4433
|
+
var sr = { exports: {} }, bx = sr.exports, Ae;
|
|
4434
|
+
function mx() {
|
|
4435
|
+
return Ae || (Ae = 1, (function(r, h) {
|
|
4436
|
+
(function(t, e, u) {
|
|
4437
|
+
r.exports = e(M(), s0(), c0(), a0(), X());
|
|
4438
|
+
})(bx, function(t) {
|
|
4486
4439
|
return (function() {
|
|
4487
|
-
var e = t,
|
|
4488
|
-
const
|
|
4440
|
+
var e = t, u = e.lib, v = u.BlockCipher, m = e.algo;
|
|
4441
|
+
const B = 16, C = [
|
|
4489
4442
|
608135816,
|
|
4490
4443
|
2242054355,
|
|
4491
4444
|
320440878,
|
|
@@ -5542,163 +5495,163 @@ function Ix() {
|
|
|
5542
5495
|
pbox: [],
|
|
5543
5496
|
sbox: []
|
|
5544
5497
|
};
|
|
5545
|
-
function E(
|
|
5546
|
-
let i =
|
|
5547
|
-
return
|
|
5498
|
+
function E(l, g) {
|
|
5499
|
+
let i = g >> 24 & 255, o = g >> 16 & 255, d = g >> 8 & 255, b = g & 255, D = l.sbox[0][i] + l.sbox[1][o];
|
|
5500
|
+
return D = D ^ l.sbox[2][d], D = D + l.sbox[3][b], D;
|
|
5548
5501
|
}
|
|
5549
|
-
function a(
|
|
5550
|
-
let o =
|
|
5551
|
-
for (let
|
|
5552
|
-
o = o ^
|
|
5553
|
-
return b = o, o = d, d = b, d = d ^
|
|
5502
|
+
function a(l, g, i) {
|
|
5503
|
+
let o = g, d = i, b;
|
|
5504
|
+
for (let D = 0; D < B; ++D)
|
|
5505
|
+
o = o ^ l.pbox[D], d = E(l, o) ^ d, b = o, o = d, d = b;
|
|
5506
|
+
return b = o, o = d, d = b, d = d ^ l.pbox[B], o = o ^ l.pbox[B + 1], { left: o, right: d };
|
|
5554
5507
|
}
|
|
5555
|
-
function s(
|
|
5556
|
-
let o =
|
|
5557
|
-
for (let
|
|
5558
|
-
o = o ^
|
|
5559
|
-
return b = o, o = d, d = b, d = d ^
|
|
5508
|
+
function s(l, g, i) {
|
|
5509
|
+
let o = g, d = i, b;
|
|
5510
|
+
for (let D = B + 1; D > 1; --D)
|
|
5511
|
+
o = o ^ l.pbox[D], d = E(l, o) ^ d, b = o, o = d, d = b;
|
|
5512
|
+
return b = o, o = d, d = b, d = d ^ l.pbox[1], o = o ^ l.pbox[0], { left: o, right: d };
|
|
5560
5513
|
}
|
|
5561
|
-
function
|
|
5514
|
+
function f(l, g, i) {
|
|
5562
5515
|
for (let y = 0; y < 4; y++) {
|
|
5563
|
-
|
|
5516
|
+
l.sbox[y] = [];
|
|
5564
5517
|
for (let k = 0; k < 256; k++)
|
|
5565
|
-
|
|
5518
|
+
l.sbox[y][k] = x[y][k];
|
|
5566
5519
|
}
|
|
5567
5520
|
let o = 0;
|
|
5568
|
-
for (let y = 0; y <
|
|
5569
|
-
|
|
5570
|
-
let d = 0, b = 0,
|
|
5571
|
-
for (let y = 0; y <
|
|
5572
|
-
|
|
5521
|
+
for (let y = 0; y < B + 2; y++)
|
|
5522
|
+
l.pbox[y] = C[y] ^ g[o], o++, o >= i && (o = 0);
|
|
5523
|
+
let d = 0, b = 0, D = 0;
|
|
5524
|
+
for (let y = 0; y < B + 2; y += 2)
|
|
5525
|
+
D = a(l, d, b), d = D.left, b = D.right, l.pbox[y] = d, l.pbox[y + 1] = b;
|
|
5573
5526
|
for (let y = 0; y < 4; y++)
|
|
5574
5527
|
for (let k = 0; k < 256; k += 2)
|
|
5575
|
-
|
|
5528
|
+
D = a(l, d, b), d = D.left, b = D.right, l.sbox[y][k] = d, l.sbox[y][k + 1] = b;
|
|
5576
5529
|
return !0;
|
|
5577
5530
|
}
|
|
5578
|
-
var p =
|
|
5531
|
+
var p = m.Blowfish = v.extend({
|
|
5579
5532
|
_doReset: function() {
|
|
5580
5533
|
if (this._keyPriorReset !== this._key) {
|
|
5581
|
-
var
|
|
5582
|
-
|
|
5534
|
+
var l = this._keyPriorReset = this._key, g = l.words, i = l.sigBytes / 4;
|
|
5535
|
+
f(n, g, i);
|
|
5583
5536
|
}
|
|
5584
5537
|
},
|
|
5585
|
-
encryptBlock: function(
|
|
5586
|
-
var i = a(n,
|
|
5587
|
-
|
|
5538
|
+
encryptBlock: function(l, g) {
|
|
5539
|
+
var i = a(n, l[g], l[g + 1]);
|
|
5540
|
+
l[g] = i.left, l[g + 1] = i.right;
|
|
5588
5541
|
},
|
|
5589
|
-
decryptBlock: function(
|
|
5590
|
-
var i = s(n,
|
|
5591
|
-
|
|
5542
|
+
decryptBlock: function(l, g) {
|
|
5543
|
+
var i = s(n, l[g], l[g + 1]);
|
|
5544
|
+
l[g] = i.left, l[g + 1] = i.right;
|
|
5592
5545
|
},
|
|
5593
5546
|
blockSize: 64 / 32,
|
|
5594
5547
|
keySize: 128 / 32,
|
|
5595
5548
|
ivSize: 64 / 32
|
|
5596
5549
|
});
|
|
5597
|
-
e.Blowfish =
|
|
5550
|
+
e.Blowfish = v._createHelper(p);
|
|
5598
5551
|
})(), t.Blowfish;
|
|
5599
5552
|
});
|
|
5600
|
-
})(
|
|
5553
|
+
})(sr)), sr.exports;
|
|
5601
5554
|
}
|
|
5602
|
-
var
|
|
5603
|
-
function
|
|
5604
|
-
return
|
|
5605
|
-
(function(t, e,
|
|
5606
|
-
r.exports = e(M(),
|
|
5607
|
-
})(
|
|
5555
|
+
var _x = y0.exports, Fe;
|
|
5556
|
+
function yx() {
|
|
5557
|
+
return Fe || (Fe = 1, (function(r, h) {
|
|
5558
|
+
(function(t, e, u) {
|
|
5559
|
+
r.exports = e(M(), ur(), gt(), mt(), s0(), wt(), c0(), Se(), Dr(), Rt(), He(), Wt(), It(), qt(), gr(), Nt(), a0(), X(), Kt(), Zt(), Qt(), Jt(), ex(), xx(), ax(), ix(), cx(), ux(), lx(), vx(), Bx(), Ex(), Fx(), gx(), mx());
|
|
5560
|
+
})(_x, function(t) {
|
|
5608
5561
|
return t;
|
|
5609
5562
|
});
|
|
5610
|
-
})(
|
|
5563
|
+
})(y0)), y0.exports;
|
|
5611
5564
|
}
|
|
5612
|
-
|
|
5613
|
-
let
|
|
5565
|
+
yx();
|
|
5566
|
+
let $e = null, Re = null, Pe = null, ze = null;
|
|
5614
5567
|
Math.random().toString(36).substring(7);
|
|
5615
|
-
function
|
|
5616
|
-
|
|
5568
|
+
function wx(r) {
|
|
5569
|
+
$e = r.token, Re = r.apiUrl, Pe = r.deviceId, ze = r.domain;
|
|
5617
5570
|
}
|
|
5618
|
-
function
|
|
5571
|
+
function kx() {
|
|
5619
5572
|
return {
|
|
5620
|
-
token:
|
|
5621
|
-
apiUrl:
|
|
5622
|
-
deviceId:
|
|
5623
|
-
domain:
|
|
5573
|
+
token: $e,
|
|
5574
|
+
apiUrl: Re,
|
|
5575
|
+
deviceId: Pe,
|
|
5576
|
+
domain: ze
|
|
5624
5577
|
};
|
|
5625
5578
|
}
|
|
5626
|
-
function
|
|
5627
|
-
return `/sdk-workers/${(r.split("/").pop() || r).replace(/\.ts$/, ".js")}?v=1.1.
|
|
5579
|
+
function Sx(r) {
|
|
5580
|
+
return `/sdk-workers/${(r.split("/").pop() || r).replace(/\.ts$/, ".js")}?v=1.1.177`;
|
|
5628
5581
|
}
|
|
5629
|
-
function
|
|
5630
|
-
const t =
|
|
5631
|
-
return new Worker(t, { type: "module", ...
|
|
5582
|
+
function Hx(r, h) {
|
|
5583
|
+
const t = Sx(r);
|
|
5584
|
+
return new Worker(t, { type: "module", ...h });
|
|
5632
5585
|
}
|
|
5633
|
-
const
|
|
5586
|
+
const br = () => {
|
|
5634
5587
|
try {
|
|
5635
5588
|
if (globalThis.__DEBUG_RENDER__ === !0 || typeof localStorage < "u" && localStorage.getItem("DEBUG_RENDER") === "1") return !0;
|
|
5636
5589
|
} catch {
|
|
5637
5590
|
}
|
|
5638
5591
|
return !1;
|
|
5639
|
-
},
|
|
5640
|
-
|
|
5641
|
-
},
|
|
5642
|
-
|
|
5643
|
-
},
|
|
5644
|
-
let
|
|
5645
|
-
function
|
|
5646
|
-
const
|
|
5647
|
-
if (
|
|
5648
|
-
const t =
|
|
5592
|
+
}, m0 = (...r) => {
|
|
5593
|
+
br();
|
|
5594
|
+
}, De = (...r) => {
|
|
5595
|
+
br();
|
|
5596
|
+
}, ge = /* @__PURE__ */ new Map(), Cr = /* @__PURE__ */ new Map();
|
|
5597
|
+
let $x = 0;
|
|
5598
|
+
function Rx(r) {
|
|
5599
|
+
const h = ge.get(r);
|
|
5600
|
+
if (h) return h;
|
|
5601
|
+
const t = Hx("./deform.worker.ts");
|
|
5649
5602
|
try {
|
|
5650
|
-
t.postMessage({ type: "SET_DEBUG", debugRender:
|
|
5603
|
+
t.postMessage({ type: "SET_DEBUG", debugRender: br() });
|
|
5651
5604
|
} catch {
|
|
5652
5605
|
}
|
|
5653
|
-
t.onmessage = (
|
|
5654
|
-
const { id:
|
|
5655
|
-
|
|
5656
|
-
hasImageBitmap: !!
|
|
5657
|
-
width:
|
|
5658
|
-
height:
|
|
5659
|
-
error:
|
|
5606
|
+
t.onmessage = (u) => {
|
|
5607
|
+
const { id: v, imageBitmap: m, error: B, duration: C } = u.data ?? {}, x = C ? ` worker耗时=${Math.round(C)}ms` : "";
|
|
5608
|
+
m0(`[renderService] deform worker 响应 id=${v}${x}`, {
|
|
5609
|
+
hasImageBitmap: !!m,
|
|
5610
|
+
width: m?.width,
|
|
5611
|
+
height: m?.height,
|
|
5612
|
+
error: B
|
|
5660
5613
|
});
|
|
5661
|
-
const n =
|
|
5614
|
+
const n = Cr.get(v);
|
|
5662
5615
|
if (n) {
|
|
5663
|
-
if (
|
|
5664
|
-
n.reject(new Error(
|
|
5616
|
+
if (Cr.delete(v), B) {
|
|
5617
|
+
n.reject(new Error(B));
|
|
5665
5618
|
return;
|
|
5666
5619
|
}
|
|
5667
|
-
n.resolve(
|
|
5620
|
+
n.resolve(m);
|
|
5668
5621
|
}
|
|
5669
|
-
}, t.onerror = (
|
|
5622
|
+
}, t.onerror = (u) => {
|
|
5670
5623
|
};
|
|
5671
5624
|
const e = () => {
|
|
5672
|
-
const
|
|
5673
|
-
return
|
|
5674
|
-
hasToken: !!
|
|
5675
|
-
tokenPreview:
|
|
5625
|
+
const u = kx();
|
|
5626
|
+
return m0("🔍 [workerManager] 检查 License Token:", {
|
|
5627
|
+
hasToken: !!u.token,
|
|
5628
|
+
tokenPreview: u.token ? u.token.substring(0, 20) + "..." : "undefined",
|
|
5676
5629
|
faceId: r,
|
|
5677
5630
|
source: "licenseStore模块"
|
|
5678
|
-
}),
|
|
5631
|
+
}), u.token ? (m0("📤 [workerManager] 发送 License 到新创建的 Worker", { faceId: r }), t.postMessage({
|
|
5679
5632
|
type: "SET_LICENSE",
|
|
5680
|
-
licenseToken:
|
|
5681
|
-
licenseApiUrl:
|
|
5682
|
-
deviceId:
|
|
5683
|
-
domain:
|
|
5633
|
+
licenseToken: u.token,
|
|
5634
|
+
licenseApiUrl: u.apiUrl,
|
|
5635
|
+
deviceId: u.deviceId,
|
|
5636
|
+
domain: u.domain
|
|
5684
5637
|
}), !0) : !1;
|
|
5685
5638
|
};
|
|
5686
|
-
return e() || (
|
|
5687
|
-
e() ||
|
|
5639
|
+
return e() || (m0("⏳ [workerManager] License Token 未设置,等待后重试...", { faceId: r }), setTimeout(() => {
|
|
5640
|
+
e() || De("⚠️ [workerManager] 等待后 License Token 仍未设置", { faceId: r });
|
|
5688
5641
|
}, 200), setTimeout(() => {
|
|
5689
|
-
e() ||
|
|
5690
|
-
}, 500)),
|
|
5642
|
+
e() || De("⚠️ [workerManager] 第二次等待后 License Token 仍未设置", { faceId: r });
|
|
5643
|
+
}, 500)), ge.set(r, t), t;
|
|
5691
5644
|
}
|
|
5692
|
-
function
|
|
5645
|
+
function Px(r) {
|
|
5693
5646
|
return {
|
|
5694
5647
|
name: r.name,
|
|
5695
5648
|
type: r.type,
|
|
5696
5649
|
blendMode: r.blendMode,
|
|
5697
5650
|
transform: Array.isArray(r.transform) ? [...r.transform] : [],
|
|
5698
|
-
meshPoints: Array.isArray(r.meshPoints) ? r.meshPoints.map((
|
|
5699
|
-
x:
|
|
5700
|
-
y:
|
|
5701
|
-
type:
|
|
5651
|
+
meshPoints: Array.isArray(r.meshPoints) ? r.meshPoints.map((h) => ({
|
|
5652
|
+
x: h.x,
|
|
5653
|
+
y: h.y,
|
|
5654
|
+
type: h.type
|
|
5702
5655
|
})) : [],
|
|
5703
5656
|
bounds: r.bounds ? {
|
|
5704
5657
|
width: r.bounds.width,
|
|
@@ -5721,30 +5674,30 @@ function Gx(r) {
|
|
|
5721
5674
|
layerOrder: r.layerOrder,
|
|
5722
5675
|
imagePath: r.imagePath,
|
|
5723
5676
|
vectorMask: r.vectorMask ? {
|
|
5724
|
-
paths: r.vectorMask.paths?.map((
|
|
5725
|
-
open:
|
|
5726
|
-
knots:
|
|
5677
|
+
paths: r.vectorMask.paths?.map((h) => ({
|
|
5678
|
+
open: h.open,
|
|
5679
|
+
knots: h.knots?.map((t) => ({
|
|
5727
5680
|
linked: t.linked,
|
|
5728
5681
|
points: [...t.points]
|
|
5729
5682
|
})),
|
|
5730
|
-
fillRule:
|
|
5731
|
-
operation:
|
|
5683
|
+
fillRule: h.fillRule,
|
|
5684
|
+
operation: h.operation
|
|
5732
5685
|
})),
|
|
5733
|
-
points: r.vectorMask.points?.map((
|
|
5734
|
-
x:
|
|
5735
|
-
y:
|
|
5736
|
-
type:
|
|
5686
|
+
points: r.vectorMask.points?.map((h) => ({
|
|
5687
|
+
x: h.x,
|
|
5688
|
+
y: h.y,
|
|
5689
|
+
type: h.type
|
|
5737
5690
|
})),
|
|
5738
5691
|
invert: r.vectorMask.invert,
|
|
5739
5692
|
notLink: r.vectorMask.notLink,
|
|
5740
5693
|
disable: r.vectorMask.disable,
|
|
5741
5694
|
fillStartsWithAllPixels: r.vectorMask.fillStartsWithAllPixels
|
|
5742
5695
|
} : void 0,
|
|
5743
|
-
filterList: r.filterList ? r.filterList.map((
|
|
5744
|
-
type:
|
|
5745
|
-
enabled:
|
|
5746
|
-
filter:
|
|
5747
|
-
puppetShapeList:
|
|
5696
|
+
filterList: r.filterList ? r.filterList.map((h) => ({
|
|
5697
|
+
type: h.type,
|
|
5698
|
+
enabled: h.enabled,
|
|
5699
|
+
filter: h.filter ? {
|
|
5700
|
+
puppetShapeList: h.filter.puppetShapeList?.map((t) => ({
|
|
5748
5701
|
originalVertexArray: t.originalVertexArray.map((e) => ({
|
|
5749
5702
|
x: e.x,
|
|
5750
5703
|
y: e.y
|
|
@@ -5761,47 +5714,47 @@ function Gx(r) {
|
|
|
5761
5714
|
clipping: r.clipping
|
|
5762
5715
|
};
|
|
5763
5716
|
}
|
|
5764
|
-
function
|
|
5765
|
-
const
|
|
5766
|
-
return performance.now(), (/* @__PURE__ */ new Date()).toISOString(), new Promise((
|
|
5767
|
-
|
|
5717
|
+
function zx(r, h, t, e) {
|
|
5718
|
+
const u = ++$x, v = Rx(t);
|
|
5719
|
+
return performance.now(), (/* @__PURE__ */ new Date()).toISOString(), new Promise((m, B) => {
|
|
5720
|
+
Cr.set(u, {
|
|
5768
5721
|
resolve: (x) => {
|
|
5769
|
-
performance.now(), (/* @__PURE__ */ new Date()).toISOString(),
|
|
5722
|
+
performance.now(), (/* @__PURE__ */ new Date()).toISOString(), m(x);
|
|
5770
5723
|
},
|
|
5771
|
-
reject:
|
|
5724
|
+
reject: B
|
|
5772
5725
|
});
|
|
5773
|
-
const
|
|
5774
|
-
|
|
5726
|
+
const C = Px(h);
|
|
5727
|
+
v.postMessage({ id: u, designBitmap: r, layerData: C, canvasSize: e }, [
|
|
5775
5728
|
r
|
|
5776
5729
|
]);
|
|
5777
5730
|
});
|
|
5778
5731
|
}
|
|
5779
|
-
async function
|
|
5780
|
-
const
|
|
5781
|
-
if (!
|
|
5732
|
+
async function Wx(r, h, t = 0, e, u, v) {
|
|
5733
|
+
const m = await lt(r, u, v);
|
|
5734
|
+
if (!m || m.width === 0 || m.height === 0)
|
|
5782
5735
|
throw new Error("图片无效:尺寸为 0");
|
|
5783
|
-
return await
|
|
5736
|
+
return await zx(m, h, t, e);
|
|
5784
5737
|
}
|
|
5785
|
-
function
|
|
5738
|
+
function l0(r, h) {
|
|
5786
5739
|
if (typeof OffscreenCanvas < "u" && typeof document > "u")
|
|
5787
|
-
return new OffscreenCanvas(r,
|
|
5740
|
+
return new OffscreenCanvas(r, h);
|
|
5788
5741
|
if (typeof document < "u") {
|
|
5789
5742
|
const t = document.createElement("canvas");
|
|
5790
|
-
return t.width = r, t.height =
|
|
5743
|
+
return t.width = r, t.height = h, t;
|
|
5791
5744
|
} else
|
|
5792
5745
|
throw new Error("无法创建 canvas:不在 Worker 或主线程环境中");
|
|
5793
5746
|
}
|
|
5794
|
-
function
|
|
5747
|
+
function F0(r) {
|
|
5795
5748
|
return r.getContext("2d");
|
|
5796
5749
|
}
|
|
5797
|
-
function
|
|
5798
|
-
const
|
|
5799
|
-
if (!
|
|
5750
|
+
function be(r) {
|
|
5751
|
+
const h = F0(r);
|
|
5752
|
+
if (!h)
|
|
5800
5753
|
throw new Error("无法创建 canvas context");
|
|
5801
|
-
return
|
|
5754
|
+
return h;
|
|
5802
5755
|
}
|
|
5803
|
-
async function
|
|
5804
|
-
const
|
|
5756
|
+
async function Lx(r) {
|
|
5757
|
+
const h = performance.now(), t = () => {
|
|
5805
5758
|
try {
|
|
5806
5759
|
if (globalThis.__DEBUG_RENDER__ === !0 || typeof localStorage < "u" && localStorage.getItem("DEBUG_RENDER") === "1") return !0;
|
|
5807
5760
|
} catch {
|
|
@@ -5809,19 +5762,19 @@ async function Zx(r) {
|
|
|
5809
5762
|
return !1;
|
|
5810
5763
|
}, e = (...c) => {
|
|
5811
5764
|
t();
|
|
5812
|
-
},
|
|
5765
|
+
}, u = (...c) => {
|
|
5813
5766
|
t();
|
|
5814
5767
|
}, {
|
|
5815
|
-
psdJson:
|
|
5816
|
-
materialList:
|
|
5817
|
-
fabricScreenshotList:
|
|
5818
|
-
width:
|
|
5768
|
+
psdJson: v,
|
|
5769
|
+
materialList: m,
|
|
5770
|
+
fabricScreenshotList: B,
|
|
5771
|
+
width: C,
|
|
5819
5772
|
height: x,
|
|
5820
5773
|
baseUrl: n
|
|
5821
5774
|
} = r, E = r.maxImageSize;
|
|
5822
5775
|
e("[renderByJson] 接收到的数据:", {
|
|
5823
|
-
psdJsonLayerCount:
|
|
5824
|
-
psdJsonLayers:
|
|
5776
|
+
psdJsonLayerCount: v.layerList?.length || 0,
|
|
5777
|
+
psdJsonLayers: v.layerList?.map((c) => ({
|
|
5825
5778
|
name: c.name,
|
|
5826
5779
|
type: c.type,
|
|
5827
5780
|
id: c.id,
|
|
@@ -5834,8 +5787,8 @@ async function Zx(r) {
|
|
|
5834
5787
|
id: A.id
|
|
5835
5788
|
}))
|
|
5836
5789
|
})),
|
|
5837
|
-
fabricScreenshotListCount:
|
|
5838
|
-
fabricScreenshotList:
|
|
5790
|
+
fabricScreenshotListCount: B.length,
|
|
5791
|
+
fabricScreenshotList: B.map((c) => ({ id: c.id, url: c.url.substring(0, 50) + "..." }))
|
|
5839
5792
|
});
|
|
5840
5793
|
const a = (c) => {
|
|
5841
5794
|
if (!c || typeof c != "string" || !c.includes("http")) return;
|
|
@@ -5844,57 +5797,57 @@ async function Zx(r) {
|
|
|
5844
5797
|
if (!n)
|
|
5845
5798
|
return !c.includes("http") && !c.startsWith("data:") && !c.startsWith("blob:") ? void 0 : c;
|
|
5846
5799
|
try {
|
|
5847
|
-
const
|
|
5848
|
-
return !
|
|
5849
|
-
} catch (
|
|
5850
|
-
|
|
5800
|
+
const _ = new URL(c, n).toString();
|
|
5801
|
+
return !_.includes("http") && !_.startsWith("data:") && !_.startsWith("blob:") ? void 0 : _;
|
|
5802
|
+
} catch (_) {
|
|
5803
|
+
u(`[renderByJson] 解析图片 URL 失败: ${c}`, _);
|
|
5851
5804
|
return;
|
|
5852
5805
|
}
|
|
5853
|
-
}, s = {},
|
|
5854
|
-
for (const c of
|
|
5806
|
+
}, s = {}, f = /* @__PURE__ */ new Map();
|
|
5807
|
+
for (const c of m) {
|
|
5855
5808
|
const A = c.sourceName || c.layerName;
|
|
5856
5809
|
A && (s[A] = {
|
|
5857
5810
|
url: c.url
|
|
5858
|
-
},
|
|
5811
|
+
}, f.set(A, c.url)), c.layerName && c.layerName !== A && (s[c.layerName] || (s[c.layerName] = {
|
|
5859
5812
|
url: c.url
|
|
5860
|
-
}),
|
|
5813
|
+
}), f.set(c.layerName, c.url));
|
|
5861
5814
|
}
|
|
5862
5815
|
const p = /* @__PURE__ */ new Map();
|
|
5863
|
-
for (const c of
|
|
5816
|
+
for (const c of B)
|
|
5864
5817
|
p.set(c.id, c.url);
|
|
5865
|
-
e("[renderByJson] fabricScreenshotMap:", Array.from(p.entries())), e("[renderByJson] psdJson.layerList 结构:",
|
|
5818
|
+
e("[renderByJson] fabricScreenshotMap:", Array.from(p.entries())), e("[renderByJson] psdJson.layerList 结构:", v.layerList?.map((c) => ({
|
|
5866
5819
|
name: c.name,
|
|
5867
5820
|
type: c.type,
|
|
5868
5821
|
id: c.id,
|
|
5869
5822
|
hasChildren: !!c.children,
|
|
5870
5823
|
childrenCount: c.children?.length || 0
|
|
5871
5824
|
})));
|
|
5872
|
-
function
|
|
5873
|
-
const
|
|
5825
|
+
function l(c, A) {
|
|
5826
|
+
const _ = c.color || (c.name && ["粉", "白", "绿", "红", "蓝", "黄", "黑", "灰"].includes(c.name) ? c.name : A);
|
|
5874
5827
|
if (c.type === "Layer") {
|
|
5875
5828
|
if (c.imagePath) {
|
|
5876
|
-
const W =
|
|
5877
|
-
const
|
|
5878
|
-
return !
|
|
5829
|
+
const W = m.find((P) => {
|
|
5830
|
+
const I = P.sourceName || P.layerName;
|
|
5831
|
+
return !I || !c.imagePath ? !1 : I === c.imagePath || I.endsWith(c.imagePath) || c.imagePath.endsWith(I);
|
|
5879
5832
|
});
|
|
5880
5833
|
W && (s[c.imagePath] = {
|
|
5881
5834
|
url: W.url
|
|
5882
5835
|
});
|
|
5883
5836
|
}
|
|
5884
5837
|
if (c.name) {
|
|
5885
|
-
if (
|
|
5886
|
-
const W = `${
|
|
5887
|
-
const
|
|
5888
|
-
return
|
|
5838
|
+
if (_) {
|
|
5839
|
+
const W = `${_}-${c.name}`, P = m.find((I) => {
|
|
5840
|
+
const L = I.sourceName || I.layerName;
|
|
5841
|
+
return L ? (L.split("/").pop() || L).replace(/\.(png|jpg|jpeg|gif|webp)$/i, "").startsWith(`${_}-${c.name}`) : !1;
|
|
5889
5842
|
});
|
|
5890
5843
|
P && (s[W] = {
|
|
5891
5844
|
url: P.url
|
|
5892
5845
|
});
|
|
5893
5846
|
}
|
|
5894
5847
|
if (c.imagePath && c.name) {
|
|
5895
|
-
const W = c.imagePath.split("/").pop() || c.imagePath, P =
|
|
5896
|
-
const
|
|
5897
|
-
return
|
|
5848
|
+
const W = c.imagePath.split("/").pop() || c.imagePath, P = m.find((I) => {
|
|
5849
|
+
const L = I.sourceName || I.layerName;
|
|
5850
|
+
return L ? (L.split("/").pop() || L) === W : !1;
|
|
5898
5851
|
});
|
|
5899
5852
|
P && (s[c.imagePath] = {
|
|
5900
5853
|
url: P.url
|
|
@@ -5904,36 +5857,36 @@ async function Zx(r) {
|
|
|
5904
5857
|
}
|
|
5905
5858
|
if (c.children)
|
|
5906
5859
|
for (const W of c.children)
|
|
5907
|
-
W &&
|
|
5860
|
+
W && l(W, _);
|
|
5908
5861
|
}
|
|
5909
|
-
function
|
|
5910
|
-
const
|
|
5911
|
-
if (c.type === "Group" &&
|
|
5912
|
-
if (e(`[renderByJson] processLayer 检查 Group: name="${c.name}", id=${
|
|
5913
|
-
const W = p.get(
|
|
5914
|
-
if (e(`[renderByJson] ✅ 找到匹配的 fabricScreenshot: Group id=${
|
|
5862
|
+
function g(c, A) {
|
|
5863
|
+
const _ = c.id ?? A;
|
|
5864
|
+
if (c.type === "Group" && _)
|
|
5865
|
+
if (e(`[renderByJson] processLayer 检查 Group: name="${c.name}", id=${_}, hasFabricScreenshot=${p.has(_)}`), p.has(_)) {
|
|
5866
|
+
const W = p.get(_);
|
|
5867
|
+
if (e(`[renderByJson] ✅ 找到匹配的 fabricScreenshot: Group id=${_}, name="${c.name}", url=${W.substring(0, 50)}...`), c.children) {
|
|
5915
5868
|
e(`[renderByJson] Group "${c.name}" 有 ${c.children.length} 个子图层`);
|
|
5916
5869
|
for (const P of c.children)
|
|
5917
5870
|
if (P && P.isSmartObject === !0) {
|
|
5918
|
-
const
|
|
5919
|
-
e(`[renderByJson] 找到智能对象: name="${
|
|
5871
|
+
const I = P?.name || "";
|
|
5872
|
+
e(`[renderByJson] 找到智能对象: name="${I}"`), I && !s[I] && (s[I] = {}), I ? (s[I].designImage = W, e(`[renderByJson] ✅ 为智能对象 "${I}" 设置 designImage: ${W.substring(0, 50)}...`)) : u("[renderByJson] ⚠️ 智能对象没有 name,无法设置 designImage");
|
|
5920
5873
|
}
|
|
5921
5874
|
} else
|
|
5922
|
-
|
|
5875
|
+
u(`[renderByJson] ⚠️ Group id=${_} 没有 children`);
|
|
5923
5876
|
} else
|
|
5924
|
-
e(`[renderByJson] ⚠️ Group id=${
|
|
5877
|
+
e(`[renderByJson] ⚠️ Group id=${_}, name="${c.name}" 没有匹配的 fabricScreenshot`);
|
|
5925
5878
|
if (c.children)
|
|
5926
5879
|
for (const W of c.children)
|
|
5927
|
-
W &&
|
|
5880
|
+
W && g(W, _);
|
|
5928
5881
|
}
|
|
5929
|
-
if (
|
|
5930
|
-
for (const c of
|
|
5931
|
-
c &&
|
|
5932
|
-
if (
|
|
5933
|
-
for (const c of
|
|
5934
|
-
c &&
|
|
5935
|
-
const o =
|
|
5936
|
-
psdJson:
|
|
5882
|
+
if (v.layerList)
|
|
5883
|
+
for (const c of v.layerList)
|
|
5884
|
+
c && l(c);
|
|
5885
|
+
if (v.layerList)
|
|
5886
|
+
for (const c of v.layerList)
|
|
5887
|
+
c && g(c);
|
|
5888
|
+
const o = rt([{
|
|
5889
|
+
psdJson: v,
|
|
5937
5890
|
layerExtrasByName: s
|
|
5938
5891
|
}], {
|
|
5939
5892
|
parts: [],
|
|
@@ -5944,41 +5897,41 @@ async function Zx(r) {
|
|
|
5944
5897
|
const d = o.models[0];
|
|
5945
5898
|
if (!d.psdPartData)
|
|
5946
5899
|
throw new Error("JSON 数据中没有 psdPartData");
|
|
5947
|
-
const b = d.width,
|
|
5900
|
+
const b = d.width, D = d.height, y = l0(b, D), k = be(y), R = [], F = (c) => {
|
|
5948
5901
|
if (c.url && s[c.url])
|
|
5949
5902
|
return s[c.url];
|
|
5950
5903
|
if (c.url) {
|
|
5951
5904
|
const A = c.url.split("/").pop() || c.url;
|
|
5952
5905
|
if (s[A])
|
|
5953
5906
|
return s[A];
|
|
5954
|
-
const
|
|
5907
|
+
const _ = m.find((W) => {
|
|
5955
5908
|
const P = W.sourceName || W.layerName;
|
|
5956
5909
|
return !P || !c.url ? !1 : (P.split("/").pop() || P) === A || P === c.url || P.endsWith(c.url) || c.url.endsWith(P);
|
|
5957
5910
|
});
|
|
5958
|
-
if (
|
|
5959
|
-
const W =
|
|
5911
|
+
if (_) {
|
|
5912
|
+
const W = _.sourceName || _.layerName;
|
|
5960
5913
|
if (W)
|
|
5961
|
-
return s[W] || { url:
|
|
5914
|
+
return s[W] || { url: _.url };
|
|
5962
5915
|
}
|
|
5963
5916
|
}
|
|
5964
5917
|
};
|
|
5965
5918
|
for (let c = 0; c < d.psdPartData.length; c++) {
|
|
5966
|
-
const A = d.psdPartData[c],
|
|
5919
|
+
const A = d.psdPartData[c], _ = F(A);
|
|
5967
5920
|
if (A.type === D0.Layer) {
|
|
5968
|
-
if (!
|
|
5969
|
-
|
|
5921
|
+
if (!_ || !_.url) {
|
|
5922
|
+
u(`图层 "${A.name}" 没有匹配的 material,跳过`);
|
|
5970
5923
|
continue;
|
|
5971
5924
|
}
|
|
5972
|
-
const W =
|
|
5925
|
+
const W = _.url, P = a(W);
|
|
5973
5926
|
if (!P) {
|
|
5974
|
-
|
|
5927
|
+
u(`图层 "${A.name}" 没有有效的 url,跳过`);
|
|
5975
5928
|
continue;
|
|
5976
5929
|
}
|
|
5977
|
-
|
|
5930
|
+
R.push({
|
|
5978
5931
|
index: c,
|
|
5979
5932
|
type: "layer",
|
|
5980
5933
|
partData: A,
|
|
5981
|
-
promise:
|
|
5934
|
+
promise: ht(P, E, n).catch((I) => null)
|
|
5982
5935
|
});
|
|
5983
5936
|
} else if (A.type === D0.Group) {
|
|
5984
5937
|
if (!A.smartObjects || A.smartObjects.length === 0)
|
|
@@ -5987,41 +5940,41 @@ async function Zx(r) {
|
|
|
5987
5940
|
const P = A.smartObjects[W];
|
|
5988
5941
|
if (!P || !P.name)
|
|
5989
5942
|
continue;
|
|
5990
|
-
let
|
|
5991
|
-
if (!
|
|
5943
|
+
let I = s[P.name] ?? _;
|
|
5944
|
+
if (!I && P.imagePath && (I = s[P.imagePath], !I)) {
|
|
5992
5945
|
const K = P.imagePath.split("/").pop() || P.imagePath;
|
|
5993
|
-
if (
|
|
5994
|
-
const G =
|
|
5946
|
+
if (I = s[K], !I) {
|
|
5947
|
+
const G = m.find((Z) => {
|
|
5995
5948
|
const e0 = Z.sourceName || Z.layerName;
|
|
5996
5949
|
return !e0 || !P.imagePath ? !1 : (e0.split("/").pop() || e0) === K || e0 === P.imagePath || e0.endsWith(P.imagePath) || P.imagePath.endsWith(e0);
|
|
5997
5950
|
});
|
|
5998
|
-
G && (
|
|
5951
|
+
G && (I = { url: G.url });
|
|
5999
5952
|
}
|
|
6000
5953
|
}
|
|
6001
|
-
if (!
|
|
5954
|
+
if (!I || !I.designImage && !I.url)
|
|
6002
5955
|
continue;
|
|
6003
|
-
let
|
|
6004
|
-
if (!
|
|
5956
|
+
let L = I.designImage ?? I.url;
|
|
5957
|
+
if (!L)
|
|
6005
5958
|
continue;
|
|
6006
|
-
if (typeof
|
|
6007
|
-
/^(https?:)?\/\//i.test(
|
|
6008
|
-
const G = a(
|
|
5959
|
+
if (typeof L == "string") {
|
|
5960
|
+
/^(https?:)?\/\//i.test(L) || L.startsWith("data:") || L.startsWith("blob:") || (L = f.get(L) ?? L);
|
|
5961
|
+
const G = a(L);
|
|
6009
5962
|
if (!G)
|
|
6010
5963
|
continue;
|
|
6011
|
-
|
|
5964
|
+
L = G;
|
|
6012
5965
|
}
|
|
6013
|
-
const Y = (A.partId ?? A.id) * 100 + W, Q =
|
|
6014
|
-
|
|
5966
|
+
const Y = (A.partId ?? A.id) * 100 + W, Q = tt(et(P)), o0 = { width: b, height: D };
|
|
5967
|
+
R.push({
|
|
6015
5968
|
index: c + W * 0.01,
|
|
6016
5969
|
type: "group",
|
|
6017
5970
|
partData: A,
|
|
6018
5971
|
smartObject: P,
|
|
6019
5972
|
maskData: Q,
|
|
6020
|
-
promise:
|
|
6021
|
-
|
|
5973
|
+
promise: Wx(
|
|
5974
|
+
L,
|
|
6022
5975
|
P,
|
|
6023
5976
|
Y,
|
|
6024
|
-
|
|
5977
|
+
o0,
|
|
6025
5978
|
E,
|
|
6026
5979
|
n
|
|
6027
5980
|
).catch((K) => null)
|
|
@@ -6029,152 +5982,152 @@ async function Zx(r) {
|
|
|
6029
5982
|
}
|
|
6030
5983
|
}
|
|
6031
5984
|
}
|
|
6032
|
-
const w = await Promise.all(
|
|
5985
|
+
const w = await Promise.all(R.map((c) => c.promise)), H = R.map((c, A) => ({
|
|
6033
5986
|
task: c,
|
|
6034
5987
|
imageBitmap: w[A]
|
|
6035
5988
|
})).sort((c, A) => {
|
|
6036
|
-
const
|
|
6037
|
-
return
|
|
5989
|
+
const _ = c.task.type === "group" && c.task.smartObject?.layerOrder !== void 0 ? c.task.smartObject.layerOrder : c.task.partData.layerOrder ?? c.task.index, W = A.task.type === "group" && A.task.smartObject?.layerOrder !== void 0 ? A.task.smartObject.layerOrder : A.task.partData.layerOrder ?? A.task.index;
|
|
5990
|
+
return _ - W;
|
|
6038
5991
|
});
|
|
6039
|
-
let
|
|
5992
|
+
let $ = l0(b, D), z = F0($), O = !1, q = "normal";
|
|
6040
5993
|
for (let c = 0; c < H.length; c++) {
|
|
6041
|
-
const { task: A, imageBitmap:
|
|
6042
|
-
if (!
|
|
6043
|
-
|
|
5994
|
+
const { task: A, imageBitmap: _ } = H[c];
|
|
5995
|
+
if (!_) {
|
|
5996
|
+
u(`[renderByJson] 图层 "${A.partData.name}" 没有 imageBitmap,跳过`);
|
|
6044
5997
|
continue;
|
|
6045
5998
|
}
|
|
6046
5999
|
const { partData: W } = A, P = W.bounds;
|
|
6047
|
-
let L;
|
|
6048
|
-
A.type === "group" && A.smartObject ? L = A.smartObject.opacity ?? W.opacity : L = W.opacity, (typeof L != "number" || isNaN(L)) && (L = 1);
|
|
6049
6000
|
let I;
|
|
6050
|
-
A.type === "group" && A.smartObject ? I = A.smartObject.
|
|
6001
|
+
A.type === "group" && A.smartObject ? I = A.smartObject.opacity ?? W.opacity : I = W.opacity, (typeof I != "number" || isNaN(I)) && (I = 1);
|
|
6002
|
+
let L;
|
|
6003
|
+
A.type === "group" && A.smartObject ? L = A.smartObject.clipping ?? W.clipping === !0 : L = W.clipping === !0;
|
|
6051
6004
|
const Y = H[c + 1];
|
|
6052
6005
|
let Q = !1;
|
|
6053
6006
|
if (Y) {
|
|
6054
6007
|
const K = Y.task.partData;
|
|
6055
6008
|
Y.task.type === "group" && Y.task.smartObject ? Q = Y.task.smartObject.clipping ?? K.clipping === !0 : Q = K.clipping === !0;
|
|
6056
6009
|
}
|
|
6057
|
-
const
|
|
6058
|
-
if (e(`[renderByJson] 绘制图层 "${
|
|
6010
|
+
const o0 = A.type === "group" && A.smartObject && A.smartObject.name ? A.smartObject.name : W?.name || "未命名图层";
|
|
6011
|
+
if (e(`[renderByJson] 绘制图层 "${o0}"`, {
|
|
6059
6012
|
type: A.type,
|
|
6060
|
-
bitmapSize: { width:
|
|
6013
|
+
bitmapSize: { width: _.width, height: _.height },
|
|
6061
6014
|
bounds: P,
|
|
6062
6015
|
hasMask: !!A.maskData,
|
|
6063
6016
|
blendMode: W.blendMode,
|
|
6064
|
-
opacity:
|
|
6065
|
-
clipping:
|
|
6066
|
-
}), !
|
|
6017
|
+
opacity: I,
|
|
6018
|
+
clipping: L
|
|
6019
|
+
}), !L && Q) {
|
|
6067
6020
|
if (O = !0, q = W.blendMode || "normal", z) {
|
|
6068
|
-
if (z.clearRect(0, 0, b,
|
|
6021
|
+
if (z.clearRect(0, 0, b, D), z.globalCompositeOperation = "source-over", z.globalAlpha = I, A.type === "group" && A.smartObject)
|
|
6069
6022
|
if (A.maskData) {
|
|
6070
|
-
const K =
|
|
6071
|
-
G && (G.drawImage(
|
|
6023
|
+
const K = l0(b, D), G = F0(K);
|
|
6024
|
+
G && (G.drawImage(_, 0, 0), lr(G, A.maskData), z.drawImage(K, 0, 0));
|
|
6072
6025
|
} else
|
|
6073
|
-
z.drawImage(
|
|
6026
|
+
z.drawImage(_, 0, 0);
|
|
6074
6027
|
else A.type === "layer" && (P ? z.drawImage(
|
|
6075
|
-
|
|
6028
|
+
_,
|
|
6076
6029
|
P.left,
|
|
6077
6030
|
P.top,
|
|
6078
6031
|
P.width,
|
|
6079
6032
|
P.height
|
|
6080
|
-
) : z.drawImage(
|
|
6033
|
+
) : z.drawImage(_, 0, 0));
|
|
6081
6034
|
z.globalAlpha = 1;
|
|
6082
6035
|
}
|
|
6083
|
-
} else if (
|
|
6036
|
+
} else if (L) {
|
|
6084
6037
|
if (z) {
|
|
6085
|
-
if (z.globalCompositeOperation = "source-atop", z.globalAlpha =
|
|
6038
|
+
if (z.globalCompositeOperation = "source-atop", z.globalAlpha = I, A.type === "group" && A.smartObject)
|
|
6086
6039
|
if (A.maskData) {
|
|
6087
|
-
const K =
|
|
6088
|
-
G && (G.drawImage(
|
|
6040
|
+
const K = l0(b, D), G = F0(K);
|
|
6041
|
+
G && (G.drawImage(_, 0, 0), lr(G, A.maskData), z.drawImage(K, 0, 0));
|
|
6089
6042
|
} else
|
|
6090
|
-
z.drawImage(
|
|
6043
|
+
z.drawImage(_, 0, 0);
|
|
6091
6044
|
else A.type === "layer" && (P ? z.drawImage(
|
|
6092
|
-
|
|
6045
|
+
_,
|
|
6093
6046
|
P.left,
|
|
6094
6047
|
P.top,
|
|
6095
6048
|
P.width,
|
|
6096
6049
|
P.height
|
|
6097
|
-
) : z.drawImage(
|
|
6050
|
+
) : z.drawImage(_, 0, 0));
|
|
6098
6051
|
z.globalAlpha = 1, z.globalCompositeOperation = "source-over";
|
|
6099
6052
|
}
|
|
6100
6053
|
} else {
|
|
6101
|
-
if (k.globalCompositeOperation =
|
|
6054
|
+
if (k.globalCompositeOperation = Or(W.blendMode), k.globalAlpha = I, A.type === "group" && A.smartObject)
|
|
6102
6055
|
if (A.maskData) {
|
|
6103
|
-
const K =
|
|
6104
|
-
G && (G.drawImage(
|
|
6056
|
+
const K = l0(b, D), G = F0(K);
|
|
6057
|
+
G && (G.drawImage(_, 0, 0), lr(G, A.maskData), k.drawImage(K, 0, 0));
|
|
6105
6058
|
} else
|
|
6106
|
-
k.drawImage(
|
|
6059
|
+
k.drawImage(_, 0, 0);
|
|
6107
6060
|
else A.type === "layer" && (P ? k.drawImage(
|
|
6108
|
-
|
|
6061
|
+
_,
|
|
6109
6062
|
P.left,
|
|
6110
6063
|
P.top,
|
|
6111
6064
|
P.width,
|
|
6112
6065
|
P.height
|
|
6113
|
-
) : k.drawImage(
|
|
6066
|
+
) : k.drawImage(_, 0, 0));
|
|
6114
6067
|
k.globalAlpha = 1, k.globalCompositeOperation = "source-over";
|
|
6115
6068
|
}
|
|
6116
|
-
O && !Q && (k.globalCompositeOperation =
|
|
6069
|
+
O && !Q && (k.globalCompositeOperation = Or(q), k.drawImage($, 0, 0), k.globalCompositeOperation = "source-over", O = !1);
|
|
6117
6070
|
}
|
|
6118
|
-
|
|
6119
|
-
let U = y, T = b, N =
|
|
6120
|
-
if (
|
|
6121
|
-
if (
|
|
6122
|
-
T =
|
|
6123
|
-
else if (
|
|
6124
|
-
const A =
|
|
6125
|
-
T =
|
|
6071
|
+
$ = null, z = null;
|
|
6072
|
+
let U = y, T = b, N = D;
|
|
6073
|
+
if (C !== void 0 || x !== void 0) {
|
|
6074
|
+
if (C !== void 0 && x !== void 0)
|
|
6075
|
+
T = C, N = x;
|
|
6076
|
+
else if (C !== void 0) {
|
|
6077
|
+
const A = C / b;
|
|
6078
|
+
T = C, N = Math.round(D * A);
|
|
6126
6079
|
} else if (x !== void 0) {
|
|
6127
|
-
const A = x /
|
|
6080
|
+
const A = x / D;
|
|
6128
6081
|
T = Math.round(b * A), N = x;
|
|
6129
6082
|
}
|
|
6130
|
-
U =
|
|
6131
|
-
const c =
|
|
6132
|
-
c.imageSmoothingEnabled = !0, c.imageSmoothingQuality = "high", c.drawImage(y, 0, 0, b,
|
|
6083
|
+
U = l0(T, N);
|
|
6084
|
+
const c = be(U);
|
|
6085
|
+
c.imageSmoothingEnabled = !0, c.imageSmoothingQuality = "high", c.drawImage(y, 0, 0, b, D, 0, 0, T, N), e(`[renderByJson] 已缩放结果: ${b}x${D} -> ${T}x${N}`);
|
|
6133
6086
|
}
|
|
6134
|
-
const S = performance.now() -
|
|
6087
|
+
const S = performance.now() - h;
|
|
6135
6088
|
return e(`[renderByJson] 绘制完成,总渲染时间: ${Math.round(S)}ms`), {
|
|
6136
6089
|
canvas: U,
|
|
6137
6090
|
width: T,
|
|
6138
6091
|
height: N
|
|
6139
6092
|
};
|
|
6140
6093
|
}
|
|
6141
|
-
const
|
|
6142
|
-
const t = (await
|
|
6094
|
+
const We = async (r) => {
|
|
6095
|
+
const t = (await Lx(r)).canvas;
|
|
6143
6096
|
return t ? createImageBitmap(t) : null;
|
|
6144
6097
|
};
|
|
6145
|
-
let
|
|
6146
|
-
const
|
|
6147
|
-
if (!
|
|
6148
|
-
|
|
6098
|
+
let i0 = null, pr = !1;
|
|
6099
|
+
const Le = async () => {
|
|
6100
|
+
if (!pr) {
|
|
6101
|
+
pr = !0;
|
|
6149
6102
|
try {
|
|
6150
|
-
for (;
|
|
6151
|
-
const r =
|
|
6152
|
-
|
|
6103
|
+
for (; i0; ) {
|
|
6104
|
+
const r = i0;
|
|
6105
|
+
i0 = null;
|
|
6153
6106
|
try {
|
|
6154
|
-
const
|
|
6155
|
-
if (
|
|
6156
|
-
|
|
6107
|
+
const h = await We(r.renderData);
|
|
6108
|
+
if (i0) {
|
|
6109
|
+
h?.close?.();
|
|
6157
6110
|
continue;
|
|
6158
6111
|
}
|
|
6159
|
-
self.postMessage({ id: r.id, bitmap:
|
|
6160
|
-
} catch (
|
|
6161
|
-
if (
|
|
6112
|
+
self.postMessage({ id: r.id, bitmap: h }, h ? [h] : []);
|
|
6113
|
+
} catch (h) {
|
|
6114
|
+
if (i0) continue;
|
|
6162
6115
|
self.postMessage({
|
|
6163
6116
|
id: r.id,
|
|
6164
|
-
error:
|
|
6117
|
+
error: h instanceof Error ? h.message : String(h)
|
|
6165
6118
|
});
|
|
6166
6119
|
}
|
|
6167
6120
|
}
|
|
6168
6121
|
} finally {
|
|
6169
|
-
|
|
6122
|
+
pr = !1, i0 && Le();
|
|
6170
6123
|
}
|
|
6171
6124
|
}
|
|
6172
6125
|
};
|
|
6173
6126
|
self.onmessage = async (r) => {
|
|
6174
|
-
const
|
|
6175
|
-
if (
|
|
6176
|
-
const e =
|
|
6177
|
-
|
|
6127
|
+
const h = r.data;
|
|
6128
|
+
if (h && typeof h == "object" && "type" in h && h.type === "SET_LICENSE") {
|
|
6129
|
+
const e = h;
|
|
6130
|
+
wx({
|
|
6178
6131
|
token: e.licenseToken,
|
|
6179
6132
|
apiUrl: e.licenseApiUrl,
|
|
6180
6133
|
deviceId: e.deviceId,
|
|
@@ -6182,13 +6135,13 @@ self.onmessage = async (r) => {
|
|
|
6182
6135
|
});
|
|
6183
6136
|
return;
|
|
6184
6137
|
}
|
|
6185
|
-
const t =
|
|
6138
|
+
const t = h;
|
|
6186
6139
|
if (t.coalesce === !0) {
|
|
6187
|
-
|
|
6140
|
+
i0 = { id: t.id, renderData: t.renderData }, Le();
|
|
6188
6141
|
return;
|
|
6189
6142
|
}
|
|
6190
6143
|
try {
|
|
6191
|
-
const e = await
|
|
6144
|
+
const e = await We(t.renderData);
|
|
6192
6145
|
self.postMessage({ id: t.id, bitmap: e }, e ? [e] : []);
|
|
6193
6146
|
} catch (e) {
|
|
6194
6147
|
self.postMessage({
|