@rive-app/canvas-advanced-lite 2.35.3 → 2.35.4
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/canvas_advanced.mjs +666 -658
- package/package.json +1 -1
- package/rive.wasm +0 -0
- package/rive_advanced.mjs.d.ts +13 -9
- package/rive_fallback.wasm +0 -0
package/canvas_advanced.mjs
CHANGED
|
@@ -6,11 +6,11 @@ var Rive = (() => {
|
|
|
6
6
|
function(moduleArg = {}) {
|
|
7
7
|
var moduleRtn;
|
|
8
8
|
|
|
9
|
-
var k = moduleArg, aa, ba,
|
|
9
|
+
var k = moduleArg, aa, ba, da = new Promise((b, a) => {
|
|
10
10
|
aa = b;
|
|
11
11
|
ba = a;
|
|
12
|
-
}),
|
|
13
|
-
function
|
|
12
|
+
}), ea = "object" == typeof window, fa = "function" == typeof importScripts;
|
|
13
|
+
function ka() {
|
|
14
14
|
function b(m) {
|
|
15
15
|
const h = d;
|
|
16
16
|
c = a = 0;
|
|
@@ -56,7 +56,7 @@ function ja() {
|
|
|
56
56
|
this.va = function() {
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function la(b) {
|
|
60
60
|
console.assert(!0);
|
|
61
61
|
const a = new Map();
|
|
62
62
|
let c = -Infinity;
|
|
@@ -71,9 +71,9 @@ function ka(b) {
|
|
|
71
71
|
return c << b;
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
|
-
const
|
|
74
|
+
const ma = k.onRuntimeInitialized;
|
|
75
75
|
k.onRuntimeInitialized = function() {
|
|
76
|
-
|
|
76
|
+
ma && ma();
|
|
77
77
|
let b = k.decodeAudio;
|
|
78
78
|
k.decodeAudio = function(e, f) {
|
|
79
79
|
e = b(e);
|
|
@@ -135,7 +135,7 @@ k.onRuntimeInitialized = function() {
|
|
|
135
135
|
return d.call(this, e, f, m, h, l);
|
|
136
136
|
};
|
|
137
137
|
};
|
|
138
|
-
const
|
|
138
|
+
const pa = "createConicGradient createImageData createLinearGradient createPattern createRadialGradient getContextAttributes getImageData getLineDash getTransform isContextLost isPointInPath isPointInStroke measureText".split(" "), qa = new function() {
|
|
139
139
|
function b() {
|
|
140
140
|
if (!a) {
|
|
141
141
|
var g = document.createElement("canvas"), t = {alpha:1, depth:0, stencil:0, antialias:0, premultipliedAlpha:1, preserveDrawingBuffer:0, powerPreference:"high-performance", failIfMajorPerformanceCaveat:0, enableExtensionsByDefault:1, explicitSwapControl:1, renderViaOffscreenBackBuffer:1,};
|
|
@@ -155,38 +155,38 @@ const oa = "createConicGradient createImageData createLinearGradient createPatte
|
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
|
-
q = new Proxy(q, {get(
|
|
159
|
-
if (
|
|
160
|
-
if (l || (console.error("Cannot render the mesh because the GL Context was lost. Tried to invoke ", v), l = !0), "function" === typeof
|
|
158
|
+
q = new Proxy(q, {get(F, v) {
|
|
159
|
+
if (F.isContextLost()) {
|
|
160
|
+
if (l || (console.error("Cannot render the mesh because the GL Context was lost. Tried to invoke ", v), l = !0), "function" === typeof F[v]) {
|
|
161
161
|
return function() {
|
|
162
162
|
};
|
|
163
163
|
}
|
|
164
164
|
} else {
|
|
165
|
-
return "function" === typeof
|
|
166
|
-
return
|
|
167
|
-
} :
|
|
165
|
+
return "function" === typeof F[v] ? function(...H) {
|
|
166
|
+
return F[v].apply(F, H);
|
|
167
|
+
} : F[v];
|
|
168
168
|
}
|
|
169
|
-
}, set(
|
|
170
|
-
if (
|
|
169
|
+
}, set(F, v, H) {
|
|
170
|
+
if (F.isContextLost()) {
|
|
171
171
|
l || (console.error("Cannot render the mesh because the GL Context was lost. Tried to set property " + v), l = !0);
|
|
172
172
|
} else {
|
|
173
|
-
return
|
|
173
|
+
return F[v] = H, !0;
|
|
174
174
|
}
|
|
175
175
|
},});
|
|
176
176
|
d = Math.min(q.getParameter(q.MAX_RENDERBUFFER_SIZE), q.getParameter(q.MAX_TEXTURE_SIZE));
|
|
177
|
-
function F
|
|
177
|
+
function G(F, v, H) {
|
|
178
178
|
v = q.createShader(v);
|
|
179
|
-
q.shaderSource(v,
|
|
179
|
+
q.shaderSource(v, H);
|
|
180
180
|
q.compileShader(v);
|
|
181
|
-
|
|
182
|
-
if (0 < (
|
|
183
|
-
throw
|
|
181
|
+
H = q.getShaderInfoLog(v);
|
|
182
|
+
if (0 < (H || "").length) {
|
|
183
|
+
throw H;
|
|
184
184
|
}
|
|
185
|
-
q.attachShader(
|
|
185
|
+
q.attachShader(F, v);
|
|
186
186
|
}
|
|
187
187
|
g = q.createProgram();
|
|
188
|
-
|
|
189
|
-
|
|
188
|
+
G(g, q.VERTEX_SHADER, "attribute vec2 vertex;\n attribute vec2 uv;\n uniform vec4 mat;\n uniform vec2 translate;\n varying vec2 st;\n void main() {\n st = uv;\n gl_Position = vec4(mat2(mat) * vertex + translate, 0, 1);\n }");
|
|
189
|
+
G(g, q.FRAGMENT_SHADER, "precision highp float;\n uniform sampler2D image;\n varying vec2 st;\n void main() {\n gl_FragColor = texture2D(image, st);\n }");
|
|
190
190
|
q.bindAttribLocation(g, 0, "vertex");
|
|
191
191
|
q.bindAttribLocation(g, 1, "uv");
|
|
192
192
|
q.linkProgram(g);
|
|
@@ -232,63 +232,63 @@ const oa = "createConicGradient createImageData createLinearGradient createPatte
|
|
|
232
232
|
2 == c ? (a.texParameteri(a.TEXTURE_2D, a.TEXTURE_MIN_FILTER, a.LINEAR_MIPMAP_LINEAR), a.generateMipmap(a.TEXTURE_2D)) : a.texParameteri(a.TEXTURE_2D, a.TEXTURE_MIN_FILTER, a.LINEAR);
|
|
233
233
|
return t;
|
|
234
234
|
};
|
|
235
|
-
const n = new
|
|
236
|
-
this.Ma = function(g, t, q,
|
|
235
|
+
const n = new la(8), r = new la(8), w = new la(10), z = new la(10);
|
|
236
|
+
this.Ma = function(g, t, q, G, F) {
|
|
237
237
|
if (b()) {
|
|
238
|
-
var v = n.push(g),
|
|
238
|
+
var v = n.push(g), H = r.push(t);
|
|
239
239
|
if (a.canvas) {
|
|
240
|
-
if (a.canvas.width != v || a.canvas.height !=
|
|
241
|
-
a.canvas.width = v, a.canvas.height =
|
|
240
|
+
if (a.canvas.width != v || a.canvas.height != H) {
|
|
241
|
+
a.canvas.width = v, a.canvas.height = H;
|
|
242
242
|
}
|
|
243
|
-
a.viewport(0,
|
|
243
|
+
a.viewport(0, H - t, g, t);
|
|
244
244
|
a.disable(a.SCISSOR_TEST);
|
|
245
245
|
a.clearColor(0, 0, 0, 0);
|
|
246
246
|
a.clear(a.COLOR_BUFFER_BIT);
|
|
247
247
|
a.enable(a.SCISSOR_TEST);
|
|
248
|
-
q.sort((
|
|
249
|
-
v = w.push(
|
|
248
|
+
q.sort((E, V) => V.ya - E.ya);
|
|
249
|
+
v = w.push(G);
|
|
250
250
|
m != v && (a.bufferData(a.ARRAY_BUFFER, 8 * v, a.DYNAMIC_DRAW), m = v);
|
|
251
251
|
v = 0;
|
|
252
|
-
for (var
|
|
253
|
-
a.bufferSubData(a.ARRAY_BUFFER, v,
|
|
252
|
+
for (var L of q) {
|
|
253
|
+
a.bufferSubData(a.ARRAY_BUFFER, v, L.ia), v += 4 * L.ia.length;
|
|
254
254
|
}
|
|
255
|
-
console.assert(v == 4 *
|
|
256
|
-
for (var
|
|
257
|
-
a.bufferSubData(a.ARRAY_BUFFER, v,
|
|
255
|
+
console.assert(v == 4 * G);
|
|
256
|
+
for (var Q of q) {
|
|
257
|
+
a.bufferSubData(a.ARRAY_BUFFER, v, Q.Ba), v += 4 * Q.Ba.length;
|
|
258
258
|
}
|
|
259
|
-
console.assert(v == 8 *
|
|
260
|
-
v =
|
|
259
|
+
console.assert(v == 8 * G);
|
|
260
|
+
v = z.push(F);
|
|
261
261
|
h != v && (a.bufferData(a.ELEMENT_ARRAY_BUFFER, 2 * v, a.DYNAMIC_DRAW), h = v);
|
|
262
|
-
|
|
263
|
-
for (var
|
|
264
|
-
a.bufferSubData(a.ELEMENT_ARRAY_BUFFER,
|
|
262
|
+
L = 0;
|
|
263
|
+
for (var ha of q) {
|
|
264
|
+
a.bufferSubData(a.ELEMENT_ARRAY_BUFFER, L, ha.indices), L += 2 * ha.indices.length;
|
|
265
265
|
}
|
|
266
|
-
console.assert(
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
v =
|
|
270
|
-
for (const
|
|
271
|
-
|
|
272
|
-
|
|
266
|
+
console.assert(L == 2 * F);
|
|
267
|
+
ha = 0;
|
|
268
|
+
Q = !0;
|
|
269
|
+
v = L = 0;
|
|
270
|
+
for (const E of q) {
|
|
271
|
+
E.image.da != ha && (a.bindTexture(a.TEXTURE_2D, E.image.ca || null), ha = E.image.da);
|
|
272
|
+
E.$a ? (a.scissor(E.na, H - E.oa - E.ta, E.lb, E.ta), Q = !0) : Q && (a.scissor(0, H - t, g, t), Q = !1);
|
|
273
273
|
q = 2 / g;
|
|
274
274
|
const V = -2 / t;
|
|
275
|
-
a.uniform4f(e,
|
|
276
|
-
a.uniform2f(f,
|
|
275
|
+
a.uniform4f(e, E.N[0] * q * E.X, E.N[1] * V * E.Y, E.N[2] * q * E.X, E.N[3] * V * E.Y);
|
|
276
|
+
a.uniform2f(f, E.N[4] * q * E.X + q * (E.na - E.Ya * E.X) - 1, E.N[5] * V * E.Y + V * (E.oa - E.Za * E.Y) + 1);
|
|
277
277
|
a.vertexAttribPointer(0, 2, a.FLOAT, !1, 0, v);
|
|
278
|
-
a.vertexAttribPointer(1, 2, a.FLOAT, !1, 0, v + 4 *
|
|
279
|
-
a.drawElements(a.TRIANGLES,
|
|
280
|
-
v += 4 *
|
|
281
|
-
|
|
278
|
+
a.vertexAttribPointer(1, 2, a.FLOAT, !1, 0, v + 4 * G);
|
|
279
|
+
a.drawElements(a.TRIANGLES, E.indices.length, a.UNSIGNED_SHORT, L);
|
|
280
|
+
v += 4 * E.ia.length;
|
|
281
|
+
L += 2 * E.indices.length;
|
|
282
282
|
}
|
|
283
|
-
console.assert(v == 4 *
|
|
284
|
-
console.assert(
|
|
283
|
+
console.assert(v == 4 * G);
|
|
284
|
+
console.assert(L == 2 * F);
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
287
|
};
|
|
288
288
|
this.canvas = function() {
|
|
289
289
|
return b() && a.canvas;
|
|
290
290
|
};
|
|
291
|
-
}(),
|
|
291
|
+
}(), ra = k.onRuntimeInitialized;
|
|
292
292
|
k.onRuntimeInitialized = function() {
|
|
293
293
|
function b(p) {
|
|
294
294
|
switch(p) {
|
|
@@ -330,18 +330,18 @@ k.onRuntimeInitialized = function() {
|
|
|
330
330
|
return "rgba(" + ((16711680 & p) >>> 16) + "," + ((65280 & p) >>> 8) + "," + ((255 & p) >>> 0) + "," + ((4278190080 & p) >>> 24) / 255 + ")";
|
|
331
331
|
}
|
|
332
332
|
function c() {
|
|
333
|
-
0 <
|
|
334
|
-
for (const p of
|
|
333
|
+
0 < H.length && (qa.Ma(v.drawWidth(), v.drawHeight(), H, L, Q), H = [], Q = L = 0, v.reset(512, 512));
|
|
334
|
+
for (const p of F) {
|
|
335
335
|
for (const u of p.v) {
|
|
336
336
|
u();
|
|
337
337
|
}
|
|
338
338
|
p.v = [];
|
|
339
339
|
}
|
|
340
|
-
|
|
340
|
+
F.clear();
|
|
341
341
|
}
|
|
342
|
-
|
|
342
|
+
ra && ra();
|
|
343
343
|
var d = k.RenderPaintStyle;
|
|
344
|
-
const e = k.RenderPath, f = k.RenderPaint, m = k.Renderer, h = k.StrokeCap, l = k.StrokeJoin, n = k.BlendMode, r = d.fill, w = d.stroke,
|
|
344
|
+
const e = k.RenderPath, f = k.RenderPaint, m = k.Renderer, h = k.StrokeCap, l = k.StrokeJoin, n = k.BlendMode, r = d.fill, w = d.stroke, z = k.FillRule.evenOdd;
|
|
345
345
|
let g = 1;
|
|
346
346
|
var t = k.RenderImage.extend("CanvasRenderImage", {__construct:function({R:p, W:u} = {}) {
|
|
347
347
|
this.__parent.__construct.call(this);
|
|
@@ -350,47 +350,47 @@ k.onRuntimeInitialized = function() {
|
|
|
350
350
|
this.R = p;
|
|
351
351
|
this.W = u;
|
|
352
352
|
}, __destruct:function() {
|
|
353
|
-
this.ca && (
|
|
353
|
+
this.ca && (qa.Ja(this.ca), URL.revokeObjectURL(this.la));
|
|
354
354
|
this.__parent.__destruct.call(this);
|
|
355
355
|
}, decode:function(p) {
|
|
356
356
|
var u = this;
|
|
357
357
|
u.W && u.W(u);
|
|
358
|
-
var
|
|
358
|
+
var D = new Image();
|
|
359
359
|
u.la = URL.createObjectURL(new Blob([p], {type:"image/png",}));
|
|
360
|
-
|
|
361
|
-
u.Da =
|
|
362
|
-
u.ca =
|
|
363
|
-
u.size(
|
|
360
|
+
D.onload = function() {
|
|
361
|
+
u.Da = D;
|
|
362
|
+
u.ca = qa.Ia(D);
|
|
363
|
+
u.size(D.width, D.height);
|
|
364
364
|
u.R && u.R(u);
|
|
365
365
|
};
|
|
366
|
-
|
|
366
|
+
D.src = u.la;
|
|
367
367
|
},}), q = e.extend("CanvasRenderPath", {__construct:function() {
|
|
368
368
|
this.__parent.__construct.call(this);
|
|
369
369
|
this.H = new Path2D();
|
|
370
370
|
}, rewind:function() {
|
|
371
371
|
this.H = new Path2D();
|
|
372
|
-
}, addPath:function(p, u,
|
|
373
|
-
var
|
|
372
|
+
}, addPath:function(p, u, D, B, x, C, A) {
|
|
373
|
+
var I = this.H, na = I.addPath;
|
|
374
374
|
p = p.H;
|
|
375
|
-
const
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
375
|
+
const P = new DOMMatrix();
|
|
376
|
+
P.a = u;
|
|
377
|
+
P.b = D;
|
|
378
|
+
P.c = B;
|
|
379
|
+
P.d = x;
|
|
380
|
+
P.e = C;
|
|
381
|
+
P.f = A;
|
|
382
|
+
na.call(I, p, P);
|
|
383
383
|
}, fillRule:function(p) {
|
|
384
384
|
this.ka = p;
|
|
385
385
|
}, moveTo:function(p, u) {
|
|
386
386
|
this.H.moveTo(p, u);
|
|
387
387
|
}, lineTo:function(p, u) {
|
|
388
388
|
this.H.lineTo(p, u);
|
|
389
|
-
}, cubicTo:function(p, u,
|
|
390
|
-
this.H.bezierCurveTo(p, u,
|
|
389
|
+
}, cubicTo:function(p, u, D, B, x, C) {
|
|
390
|
+
this.H.bezierCurveTo(p, u, D, B, x, C);
|
|
391
391
|
}, close:function() {
|
|
392
392
|
this.H.closePath();
|
|
393
|
-
},}),
|
|
393
|
+
},}), G = f.extend("CanvasRenderPaint", {color:function(p) {
|
|
394
394
|
this.ma = a(p);
|
|
395
395
|
}, thickness:function(p) {
|
|
396
396
|
this.Ga = p;
|
|
@@ -422,32 +422,32 @@ k.onRuntimeInitialized = function() {
|
|
|
422
422
|
this.Ca = b(p);
|
|
423
423
|
}, clearGradient:function() {
|
|
424
424
|
this.P = null;
|
|
425
|
-
}, linearGradient:function(p, u,
|
|
426
|
-
this.P = {za:p, Aa:u, qa:
|
|
427
|
-
}, radialGradient:function(p, u,
|
|
428
|
-
this.P = {za:p, Aa:u, qa:
|
|
425
|
+
}, linearGradient:function(p, u, D, B) {
|
|
426
|
+
this.P = {za:p, Aa:u, qa:D, ra:B, ga:[],};
|
|
427
|
+
}, radialGradient:function(p, u, D, B) {
|
|
428
|
+
this.P = {za:p, Aa:u, qa:D, ra:B, ga:[], Wa:!0,};
|
|
429
429
|
}, addStop:function(p, u) {
|
|
430
430
|
this.P.ga.push({color:p, stop:u,});
|
|
431
431
|
}, completeGradient:function() {
|
|
432
|
-
}, draw:function(p, u,
|
|
433
|
-
let
|
|
432
|
+
}, draw:function(p, u, D, B) {
|
|
433
|
+
let x = this.Fa;
|
|
434
434
|
var C = this.ma, A = this.P;
|
|
435
|
-
const
|
|
435
|
+
const I = p.globalCompositeOperation, na = p.globalAlpha;
|
|
436
436
|
p.globalCompositeOperation = this.Ca;
|
|
437
|
-
p.globalAlpha =
|
|
437
|
+
p.globalAlpha = B;
|
|
438
438
|
if (null != A) {
|
|
439
439
|
C = A.za;
|
|
440
|
-
const
|
|
441
|
-
var
|
|
442
|
-
|
|
443
|
-
A.Wa ? (A =
|
|
444
|
-
for (let
|
|
445
|
-
A =
|
|
440
|
+
const T = A.Aa, ca = A.qa;
|
|
441
|
+
var P = A.ra;
|
|
442
|
+
B = A.ga;
|
|
443
|
+
A.Wa ? (A = ca - C, P -= T, C = p.createRadialGradient(C, T, 0, C, T, Math.sqrt(A * A + P * P))) : C = p.createLinearGradient(C, T, ca, P);
|
|
444
|
+
for (let U = 0, W = B.length; U < W; U++) {
|
|
445
|
+
A = B[U], C.addColorStop(A.stop, a(A.color));
|
|
446
446
|
}
|
|
447
447
|
this.ma = C;
|
|
448
448
|
this.P = null;
|
|
449
449
|
}
|
|
450
|
-
switch(
|
|
450
|
+
switch(x) {
|
|
451
451
|
case w:
|
|
452
452
|
p.strokeStyle = C;
|
|
453
453
|
p.lineWidth = this.Ga;
|
|
@@ -456,14 +456,14 @@ k.onRuntimeInitialized = function() {
|
|
|
456
456
|
p.stroke(u);
|
|
457
457
|
break;
|
|
458
458
|
case r:
|
|
459
|
-
p.fillStyle = C, p.fill(u,
|
|
459
|
+
p.fillStyle = C, p.fill(u, D);
|
|
460
460
|
}
|
|
461
|
-
p.globalCompositeOperation =
|
|
462
|
-
p.globalAlpha =
|
|
461
|
+
p.globalCompositeOperation = I;
|
|
462
|
+
p.globalAlpha = na;
|
|
463
463
|
},});
|
|
464
|
-
const
|
|
465
|
-
let v = null,
|
|
466
|
-
var
|
|
464
|
+
const F = new Set();
|
|
465
|
+
let v = null, H = [], L = 0, Q = 0;
|
|
466
|
+
var ha = k.CanvasRenderer = m.extend("Renderer", {__construct:function(p) {
|
|
467
467
|
this.__parent.__construct.call(this);
|
|
468
468
|
this.G = [1, 0, 0, 1, 0, 0];
|
|
469
469
|
this.u = [1.0];
|
|
@@ -482,10 +482,10 @@ k.onRuntimeInitialized = function() {
|
|
|
482
482
|
this.G.splice(p);
|
|
483
483
|
this.u.pop();
|
|
484
484
|
this.v.push(this.m.restore.bind(this.m));
|
|
485
|
-
}, transform:function(p, u,
|
|
486
|
-
const A = this.G,
|
|
487
|
-
A.splice(
|
|
488
|
-
this.v.push(this.m.transform.bind(this.m, p, u,
|
|
485
|
+
}, transform:function(p, u, D, B, x, C) {
|
|
486
|
+
const A = this.G, I = A.length - 6;
|
|
487
|
+
A.splice(I, 6, A[I] * p + A[I + 2] * u, A[I + 1] * p + A[I + 3] * u, A[I] * D + A[I + 2] * B, A[I + 1] * D + A[I + 3] * B, A[I] * x + A[I + 2] * C + A[I + 4], A[I + 1] * x + A[I + 3] * C + A[I + 5]);
|
|
488
|
+
this.v.push(this.m.transform.bind(this.m, p, u, D, B, x, C));
|
|
489
489
|
}, rotate:function(p) {
|
|
490
490
|
const u = Math.sin(p);
|
|
491
491
|
p = Math.cos(p);
|
|
@@ -493,89 +493,97 @@ k.onRuntimeInitialized = function() {
|
|
|
493
493
|
}, modulateOpacity:function(p) {
|
|
494
494
|
this.u[this.u.length - 1] *= p;
|
|
495
495
|
}, _drawPath:function(p, u) {
|
|
496
|
-
this.v.push(u.draw.bind(u, this.m, p.H, p.ka ===
|
|
497
|
-
}, _drawRiveImage:function(p, u,
|
|
498
|
-
var
|
|
499
|
-
if (
|
|
500
|
-
var C = this.m, A = b(
|
|
496
|
+
this.v.push(u.draw.bind(u, this.m, p.H, p.ka === z ? "evenodd" : "nonzero", Math.max(0, this.u[this.u.length - 1])));
|
|
497
|
+
}, _drawRiveImage:function(p, u, D, B) {
|
|
498
|
+
var x = p.Da;
|
|
499
|
+
if (x) {
|
|
500
|
+
var C = this.m, A = b(D), I = Math.max(0, B * this.u[this.u.length - 1]);
|
|
501
501
|
this.v.push(function() {
|
|
502
502
|
C.globalCompositeOperation = A;
|
|
503
|
-
C.globalAlpha =
|
|
504
|
-
C.drawImage(
|
|
503
|
+
C.globalAlpha = I;
|
|
504
|
+
C.drawImage(x, 0, 0);
|
|
505
505
|
C.globalAlpha = 1;
|
|
506
506
|
});
|
|
507
507
|
}
|
|
508
508
|
}, _getMatrix:function(p) {
|
|
509
|
-
const u = this.G,
|
|
510
|
-
for (let
|
|
511
|
-
p[
|
|
509
|
+
const u = this.G, D = u.length - 6;
|
|
510
|
+
for (let B = 0; 6 > B; ++B) {
|
|
511
|
+
p[B] = u[D + B];
|
|
512
|
+
}
|
|
513
|
+
}, _drawImageMesh:function(p, u, D, B, x, C, A, I, na, P, T, ca, U, W) {
|
|
514
|
+
let ub, vb, wb;
|
|
515
|
+
try {
|
|
516
|
+
ub = k.HEAPF32.slice(x >> 2, (x >> 2) + C), vb = k.HEAPF32.slice(A >> 2, (A >> 2) + I), wb = k.HEAPU16.slice(na >> 1, (na >> 1) + P);
|
|
517
|
+
} catch (Ya) {
|
|
518
|
+
console.error("[Rive] _drawImageMesh: failed to read mesh data from WASM heap. Mesh skipped for this frame.");
|
|
519
|
+
return;
|
|
512
520
|
}
|
|
513
|
-
}, _drawImageMesh:function(p, u, B, z, G, C, A, H, W, L, S) {
|
|
514
521
|
u = this.m.canvas.width;
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
console.assert(va <= Math.min(
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
ia >
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
N
|
|
537
|
-
|
|
538
|
-
|
|
522
|
+
x = this.m.canvas.height;
|
|
523
|
+
A = U - T;
|
|
524
|
+
I = W - ca;
|
|
525
|
+
T = Math.max(T, 0);
|
|
526
|
+
ca = Math.max(ca, 0);
|
|
527
|
+
U = Math.min(U, u);
|
|
528
|
+
W = Math.min(W, x);
|
|
529
|
+
const va = U - T, wa = W - ca;
|
|
530
|
+
console.assert(va <= Math.min(A, u));
|
|
531
|
+
console.assert(wa <= Math.min(I, x));
|
|
532
|
+
if (!(0 >= va || 0 >= wa)) {
|
|
533
|
+
U = va < A || wa < I;
|
|
534
|
+
u = W = 1;
|
|
535
|
+
var ia = Math.ceil(va * W), ja = Math.ceil(wa * u);
|
|
536
|
+
x = qa.Xa();
|
|
537
|
+
ia > x && (W *= x / ia, ia = x);
|
|
538
|
+
ja > x && (u *= x / ja, ja = x);
|
|
539
|
+
v || (v = new k.DynamicRectanizer(x), v.reset(512, 512));
|
|
540
|
+
x = v.addRect(ia, ja);
|
|
541
|
+
0 > x && (c(), F.add(this), x = v.addRect(ia, ja), console.assert(0 <= x));
|
|
542
|
+
var xb = x & 65535, yb = x >> 16;
|
|
543
|
+
H.push({N:this.G.slice(this.G.length - 6), image:p, na:xb, oa:yb, Ya:T, Za:ca, lb:ia, ta:ja, X:W, Y:u, ia:ub, Ba:vb, indices:wb, $a:U, ya:p.da << 1 | (U ? 1 : 0),});
|
|
544
|
+
L += C;
|
|
545
|
+
Q += P;
|
|
546
|
+
var oa = this.m, oc = b(D), pc = Math.max(0, B * this.u[this.u.length - 1]);
|
|
539
547
|
this.v.push(function() {
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
const
|
|
545
|
-
|
|
546
|
-
|
|
548
|
+
oa.save();
|
|
549
|
+
oa.resetTransform();
|
|
550
|
+
oa.globalCompositeOperation = oc;
|
|
551
|
+
oa.globalAlpha = pc;
|
|
552
|
+
const Ya = qa.canvas();
|
|
553
|
+
Ya && oa.drawImage(Ya, xb, yb, ia, ja, T, ca, va, wa);
|
|
554
|
+
oa.restore();
|
|
547
555
|
});
|
|
548
556
|
}
|
|
549
557
|
}, _clipPath:function(p) {
|
|
550
|
-
this.v.push(this.m.clip.bind(this.m, p.H, p.ka ===
|
|
558
|
+
this.v.push(this.m.clip.bind(this.m, p.H, p.ka === z ? "evenodd" : "nonzero"));
|
|
551
559
|
}, clear:function() {
|
|
552
|
-
|
|
560
|
+
F.add(this);
|
|
553
561
|
this.v.push(this.m.clearRect.bind(this.m, 0, 0, this.ja.width, this.ja.height));
|
|
554
562
|
}, flush:function() {
|
|
555
563
|
}, translate:function(p, u) {
|
|
556
564
|
this.transform(1, 0, 0, 1, p, u);
|
|
557
565
|
},});
|
|
558
566
|
k.makeRenderer = function(p) {
|
|
559
|
-
const u = new
|
|
560
|
-
return new Proxy(u, {get(
|
|
561
|
-
if ("function" === typeof
|
|
567
|
+
const u = new ha(p), D = u.m;
|
|
568
|
+
return new Proxy(u, {get(B, x) {
|
|
569
|
+
if ("function" === typeof B[x]) {
|
|
562
570
|
return function(...C) {
|
|
563
|
-
return
|
|
571
|
+
return B[x].apply(B, C);
|
|
564
572
|
};
|
|
565
573
|
}
|
|
566
|
-
if ("function" === typeof
|
|
567
|
-
if (-1 <
|
|
568
|
-
throw Error("RiveException: Method call to '" +
|
|
574
|
+
if ("function" === typeof D[x]) {
|
|
575
|
+
if (-1 < pa.indexOf(x)) {
|
|
576
|
+
throw Error("RiveException: Method call to '" + x + "()' is not allowed, as the renderer cannot immediately pass through the return values of any canvas 2d context methods.");
|
|
569
577
|
}
|
|
570
578
|
return function(...C) {
|
|
571
|
-
u.v.push(
|
|
579
|
+
u.v.push(D[x].bind(D, ...C));
|
|
572
580
|
};
|
|
573
581
|
}
|
|
574
|
-
return
|
|
575
|
-
}, set(
|
|
576
|
-
if (
|
|
582
|
+
return B[x];
|
|
583
|
+
}, set(B, x, C) {
|
|
584
|
+
if (x in D) {
|
|
577
585
|
return u.v.push(() => {
|
|
578
|
-
|
|
586
|
+
D[x] = C;
|
|
579
587
|
}), !0;
|
|
580
588
|
}
|
|
581
589
|
},});
|
|
@@ -584,7 +592,7 @@ k.onRuntimeInitialized = function() {
|
|
|
584
592
|
(new t({R:u})).decode(p);
|
|
585
593
|
};
|
|
586
594
|
k.renderFactory = {makeRenderPaint:function() {
|
|
587
|
-
return new
|
|
595
|
+
return new G();
|
|
588
596
|
}, makeRenderPath:function() {
|
|
589
597
|
return new q();
|
|
590
598
|
}, makeRenderImage:function() {
|
|
@@ -599,25 +607,25 @@ k.onRuntimeInitialized = function() {
|
|
|
599
607
|
}
|
|
600
608
|
},});
|
|
601
609
|
},};
|
|
602
|
-
let
|
|
603
|
-
k.load = function(p, u,
|
|
604
|
-
const
|
|
605
|
-
void 0 !== u &&
|
|
606
|
-
|
|
607
|
-
return new Promise(function(
|
|
610
|
+
let E = k.load, V = null;
|
|
611
|
+
k.load = function(p, u, D = !0) {
|
|
612
|
+
const B = new k.FallbackFileAssetLoader();
|
|
613
|
+
void 0 !== u && B.addLoader(u);
|
|
614
|
+
D && (u = new k.CDNFileAssetLoader(), B.addLoader(u));
|
|
615
|
+
return new Promise(function(x) {
|
|
608
616
|
let C = null;
|
|
609
617
|
V = {total:0, loaded:0, ready:function() {
|
|
610
|
-
|
|
618
|
+
x(C);
|
|
611
619
|
},};
|
|
612
|
-
C =
|
|
613
|
-
0 == V.total &&
|
|
620
|
+
C = E(p, B);
|
|
621
|
+
0 == V.total && x(C);
|
|
614
622
|
});
|
|
615
623
|
};
|
|
616
|
-
let
|
|
617
|
-
k.RendererWrapper.prototype.align = function(p, u,
|
|
618
|
-
|
|
624
|
+
let qc = k.RendererWrapper.prototype.align;
|
|
625
|
+
k.RendererWrapper.prototype.align = function(p, u, D, B, x = 1.0) {
|
|
626
|
+
qc.call(this, p, u, D, B, x);
|
|
619
627
|
};
|
|
620
|
-
d = new
|
|
628
|
+
d = new ka();
|
|
621
629
|
k.requestAnimationFrame = d.requestAnimationFrame.bind(d);
|
|
622
630
|
k.cancelAnimationFrame = d.cancelAnimationFrame.bind(d);
|
|
623
631
|
k.enableFPSCounter = d.Na.bind(d);
|
|
@@ -628,16 +636,16 @@ k.onRuntimeInitialized = function() {
|
|
|
628
636
|
v && v.delete();
|
|
629
637
|
};
|
|
630
638
|
};
|
|
631
|
-
var
|
|
632
|
-
if (
|
|
633
|
-
|
|
639
|
+
var sa = Object.assign({}, k), ta = "./this.program", y = "", ua, xa;
|
|
640
|
+
if (ea || fa) {
|
|
641
|
+
fa ? y = self.location.href : "undefined" != typeof document && document.currentScript && (y = document.currentScript.src), _scriptName && (y = _scriptName), y.startsWith("blob:") ? y = "" : y = y.substr(0, y.replace(/[?#].*/, "").lastIndexOf("/") + 1), fa && (xa = b => {
|
|
634
642
|
var a = new XMLHttpRequest();
|
|
635
643
|
a.open("GET", b, !1);
|
|
636
644
|
a.responseType = "arraybuffer";
|
|
637
645
|
a.send(null);
|
|
638
646
|
return new Uint8Array(a.response);
|
|
639
|
-
}),
|
|
640
|
-
if (
|
|
647
|
+
}), ua = (b, a, c) => {
|
|
648
|
+
if (ya(b)) {
|
|
641
649
|
var d = new XMLHttpRequest();
|
|
642
650
|
d.open("GET", b, !0);
|
|
643
651
|
d.responseType = "arraybuffer";
|
|
@@ -651,22 +659,22 @@ if (da || ea) {
|
|
|
651
659
|
}
|
|
652
660
|
};
|
|
653
661
|
}
|
|
654
|
-
var
|
|
655
|
-
Object.assign(k,
|
|
656
|
-
|
|
657
|
-
k.thisProgram && (
|
|
658
|
-
var
|
|
659
|
-
k.wasmBinary && (
|
|
660
|
-
var
|
|
662
|
+
var za = k.print || console.log.bind(console), Aa = k.printErr || console.error.bind(console);
|
|
663
|
+
Object.assign(k, sa);
|
|
664
|
+
sa = null;
|
|
665
|
+
k.thisProgram && (ta = k.thisProgram);
|
|
666
|
+
var Ba;
|
|
667
|
+
k.wasmBinary && (Ba = k.wasmBinary);
|
|
668
|
+
var Ca, Da = !1, Ea, J, Fa, Ga, K, M, Ha, Ia;
|
|
661
669
|
function Ja() {
|
|
662
|
-
var b =
|
|
663
|
-
k.HEAP8 =
|
|
664
|
-
k.HEAP16 =
|
|
670
|
+
var b = Ca.buffer;
|
|
671
|
+
k.HEAP8 = Ea = new Int8Array(b);
|
|
672
|
+
k.HEAP16 = Fa = new Int16Array(b);
|
|
665
673
|
k.HEAPU8 = J = new Uint8Array(b);
|
|
666
|
-
k.HEAPU16 =
|
|
674
|
+
k.HEAPU16 = Ga = new Uint16Array(b);
|
|
667
675
|
k.HEAP32 = K = new Int32Array(b);
|
|
668
|
-
k.HEAPU32 =
|
|
669
|
-
k.HEAPF32 =
|
|
676
|
+
k.HEAPU32 = M = new Uint32Array(b);
|
|
677
|
+
k.HEAPF32 = Ha = new Float32Array(b);
|
|
670
678
|
k.HEAPF64 = Ia = new Float64Array(b);
|
|
671
679
|
}
|
|
672
680
|
var Ka = [], La = [], Ma = [];
|
|
@@ -678,25 +686,25 @@ var Oa = 0, Pa = null, Qa = null;
|
|
|
678
686
|
function Ra(b) {
|
|
679
687
|
k.onAbort?.(b);
|
|
680
688
|
b = "Aborted(" + b + ")";
|
|
681
|
-
|
|
682
|
-
|
|
689
|
+
Aa(b);
|
|
690
|
+
Da = !0;
|
|
683
691
|
b = new WebAssembly.RuntimeError(b + ". Build with -sASSERTIONS for more info.");
|
|
684
692
|
ba(b);
|
|
685
693
|
throw b;
|
|
686
694
|
}
|
|
687
|
-
var Sa = b => b.startsWith("data:application/octet-stream;base64,"),
|
|
695
|
+
var Sa = b => b.startsWith("data:application/octet-stream;base64,"), ya = b => b.startsWith("file://"), Ta;
|
|
688
696
|
function Ua(b) {
|
|
689
|
-
if (b == Ta &&
|
|
690
|
-
return new Uint8Array(
|
|
697
|
+
if (b == Ta && Ba) {
|
|
698
|
+
return new Uint8Array(Ba);
|
|
691
699
|
}
|
|
692
|
-
if (
|
|
693
|
-
return
|
|
700
|
+
if (xa) {
|
|
701
|
+
return xa(b);
|
|
694
702
|
}
|
|
695
703
|
throw "both async and sync fetching of the wasm failed";
|
|
696
704
|
}
|
|
697
705
|
function Va(b) {
|
|
698
|
-
return
|
|
699
|
-
|
|
706
|
+
return Ba ? Promise.resolve().then(() => Ua(b)) : new Promise((a, c) => {
|
|
707
|
+
ua(b, d => a(new Uint8Array(d)), () => {
|
|
700
708
|
try {
|
|
701
709
|
a(Ua(b));
|
|
702
710
|
} catch (d) {
|
|
@@ -707,28 +715,28 @@ function Va(b) {
|
|
|
707
715
|
}
|
|
708
716
|
function Wa(b, a, c) {
|
|
709
717
|
return Va(b).then(d => WebAssembly.instantiate(d, a)).then(c, d => {
|
|
710
|
-
|
|
718
|
+
Aa(`failed to asynchronously prepare wasm: ${d}`);
|
|
711
719
|
Ra(d);
|
|
712
720
|
});
|
|
713
721
|
}
|
|
714
722
|
function Xa(b, a) {
|
|
715
723
|
var c = Ta;
|
|
716
|
-
return
|
|
717
|
-
|
|
718
|
-
|
|
724
|
+
return Ba || "function" != typeof WebAssembly.instantiateStreaming || Sa(c) || ya(c) || "function" != typeof fetch ? Wa(c, b, a) : fetch(c, {credentials:"same-origin"}).then(d => WebAssembly.instantiateStreaming(d, b).then(a, function(e) {
|
|
725
|
+
Aa(`wasm streaming compile failed: ${e}`);
|
|
726
|
+
Aa("falling back to ArrayBuffer instantiation");
|
|
719
727
|
return Wa(c, b, a);
|
|
720
728
|
}));
|
|
721
729
|
}
|
|
722
|
-
var
|
|
730
|
+
var Za = b => {
|
|
723
731
|
for (; 0 < b.length;) {
|
|
724
732
|
b.shift()(k);
|
|
725
733
|
}
|
|
726
|
-
},
|
|
734
|
+
}, $a = (b, a) => Object.defineProperty(a, "name", {value:b}), ab = [], N = [], O, R = b => {
|
|
727
735
|
if (!b) {
|
|
728
|
-
throw new
|
|
736
|
+
throw new O("Cannot use deleted val. handle = " + b);
|
|
729
737
|
}
|
|
730
|
-
return
|
|
731
|
-
},
|
|
738
|
+
return N[b];
|
|
739
|
+
}, bb = b => {
|
|
732
740
|
switch(b) {
|
|
733
741
|
case void 0:
|
|
734
742
|
return 2;
|
|
@@ -739,13 +747,13 @@ var Ya = b => {
|
|
|
739
747
|
case !1:
|
|
740
748
|
return 8;
|
|
741
749
|
default:
|
|
742
|
-
const a =
|
|
743
|
-
|
|
744
|
-
|
|
750
|
+
const a = ab.pop() || N.length;
|
|
751
|
+
N[a] = b;
|
|
752
|
+
N[a + 1] = 1;
|
|
745
753
|
return a;
|
|
746
754
|
}
|
|
747
|
-
},
|
|
748
|
-
var a = Error, c =
|
|
755
|
+
}, cb = b => {
|
|
756
|
+
var a = Error, c = $a(b, function(d) {
|
|
749
757
|
this.name = b;
|
|
750
758
|
this.message = d;
|
|
751
759
|
d = Error(d).stack;
|
|
@@ -757,160 +765,160 @@ var Ya = b => {
|
|
|
757
765
|
return void 0 === this.message ? this.name : `${this.name}: ${this.message}`;
|
|
758
766
|
};
|
|
759
767
|
return c;
|
|
760
|
-
},
|
|
768
|
+
}, db, eb, S = b => {
|
|
761
769
|
for (var a = ""; J[b];) {
|
|
762
|
-
a +=
|
|
770
|
+
a += eb[J[b++]];
|
|
763
771
|
}
|
|
764
772
|
return a;
|
|
765
|
-
},
|
|
766
|
-
for (;
|
|
767
|
-
var b =
|
|
773
|
+
}, fb = [], gb = () => {
|
|
774
|
+
for (; fb.length;) {
|
|
775
|
+
var b = fb.pop();
|
|
768
776
|
b.g.M = !1;
|
|
769
777
|
b["delete"]();
|
|
770
778
|
}
|
|
771
|
-
},
|
|
779
|
+
}, hb, ib = {}, jb = (b, a) => {
|
|
772
780
|
if (void 0 === a) {
|
|
773
|
-
throw new
|
|
781
|
+
throw new O("ptr should not be undefined");
|
|
774
782
|
}
|
|
775
783
|
for (; b.o;) {
|
|
776
784
|
a = b.S(a), b = b.o;
|
|
777
785
|
}
|
|
778
786
|
return a;
|
|
779
|
-
},
|
|
780
|
-
b =
|
|
781
|
-
var a =
|
|
782
|
-
|
|
787
|
+
}, kb = {}, nb = b => {
|
|
788
|
+
b = lb(b);
|
|
789
|
+
var a = S(b);
|
|
790
|
+
mb(b);
|
|
783
791
|
return a;
|
|
784
|
-
},
|
|
785
|
-
var c =
|
|
792
|
+
}, ob = (b, a) => {
|
|
793
|
+
var c = kb[b];
|
|
786
794
|
if (void 0 === c) {
|
|
787
|
-
throw b = `${a} has unknown type ${
|
|
795
|
+
throw b = `${a} has unknown type ${nb(b)}`, new O(b);
|
|
788
796
|
}
|
|
789
797
|
return c;
|
|
790
|
-
},
|
|
791
|
-
},
|
|
798
|
+
}, pb = () => {
|
|
799
|
+
}, qb = !1, rb = (b, a, c) => {
|
|
792
800
|
if (a === c) {
|
|
793
801
|
return b;
|
|
794
802
|
}
|
|
795
803
|
if (void 0 === c.o) {
|
|
796
804
|
return null;
|
|
797
805
|
}
|
|
798
|
-
b =
|
|
806
|
+
b = rb(b, a, c.o);
|
|
799
807
|
return null === b ? null : c.La(b);
|
|
800
|
-
},
|
|
801
|
-
a =
|
|
802
|
-
return
|
|
803
|
-
},
|
|
808
|
+
}, sb = {}, tb = (b, a) => {
|
|
809
|
+
a = jb(b, a);
|
|
810
|
+
return ib[a];
|
|
811
|
+
}, zb, Bb = (b, a) => {
|
|
804
812
|
if (!a.j || !a.i) {
|
|
805
|
-
throw new
|
|
813
|
+
throw new zb("makeClassHandle requires ptr and ptrType");
|
|
806
814
|
}
|
|
807
815
|
if (!!a.A !== !!a.s) {
|
|
808
|
-
throw new
|
|
816
|
+
throw new zb("Both smartPtrType and smartPtr must be specified");
|
|
809
817
|
}
|
|
810
818
|
a.count = {value:1};
|
|
811
|
-
return
|
|
812
|
-
},
|
|
819
|
+
return Ab(Object.create(b, {g:{value:a, writable:!0,},}));
|
|
820
|
+
}, Ab = b => {
|
|
813
821
|
if ("undefined" === typeof FinalizationRegistry) {
|
|
814
|
-
return
|
|
822
|
+
return Ab = a => a, b;
|
|
815
823
|
}
|
|
816
|
-
|
|
824
|
+
qb = new FinalizationRegistry(a => {
|
|
817
825
|
a = a.g;
|
|
818
826
|
--a.count.value;
|
|
819
827
|
0 === a.count.value && (a.s ? a.A.D(a.s) : a.j.h.D(a.i));
|
|
820
828
|
});
|
|
821
|
-
|
|
829
|
+
Ab = a => {
|
|
822
830
|
var c = a.g;
|
|
823
|
-
c.s &&
|
|
831
|
+
c.s && qb.register(a, {g:c}, a);
|
|
824
832
|
return a;
|
|
825
833
|
};
|
|
826
|
-
|
|
827
|
-
|
|
834
|
+
pb = a => {
|
|
835
|
+
qb.unregister(a);
|
|
828
836
|
};
|
|
829
|
-
return
|
|
830
|
-
},
|
|
837
|
+
return Ab(b);
|
|
838
|
+
}, Cb = {}, Db = b => {
|
|
831
839
|
for (; b.length;) {
|
|
832
840
|
var a = b.pop();
|
|
833
841
|
b.pop()(a);
|
|
834
842
|
}
|
|
835
843
|
};
|
|
836
|
-
function
|
|
837
|
-
return this.fromWireType(
|
|
844
|
+
function Eb(b) {
|
|
845
|
+
return this.fromWireType(M[b >> 2]);
|
|
838
846
|
}
|
|
839
|
-
var
|
|
847
|
+
var Fb = {}, Gb = {}, X = (b, a, c) => {
|
|
840
848
|
function d(h) {
|
|
841
849
|
h = c(h);
|
|
842
850
|
if (h.length !== b.length) {
|
|
843
|
-
throw new
|
|
851
|
+
throw new zb("Mismatched type converter count");
|
|
844
852
|
}
|
|
845
853
|
for (var l = 0; l < b.length; ++l) {
|
|
846
|
-
|
|
854
|
+
Hb(b[l], h[l]);
|
|
847
855
|
}
|
|
848
856
|
}
|
|
849
857
|
b.forEach(function(h) {
|
|
850
|
-
|
|
858
|
+
Gb[h] = a;
|
|
851
859
|
});
|
|
852
860
|
var e = Array(a.length), f = [], m = 0;
|
|
853
861
|
a.forEach((h, l) => {
|
|
854
|
-
|
|
855
|
-
e[l] =
|
|
862
|
+
kb.hasOwnProperty(h) ? e[l] = kb[h] : (f.push(h), Fb.hasOwnProperty(h) || (Fb[h] = []), Fb[h].push(() => {
|
|
863
|
+
e[l] = kb[h];
|
|
856
864
|
++m;
|
|
857
865
|
m === f.length && d(e);
|
|
858
866
|
}));
|
|
859
867
|
});
|
|
860
868
|
0 === f.length && d(e);
|
|
861
869
|
};
|
|
862
|
-
function
|
|
870
|
+
function Ib(b, a, c = {}) {
|
|
863
871
|
var d = a.name;
|
|
864
872
|
if (!b) {
|
|
865
|
-
throw new
|
|
873
|
+
throw new O(`type "${d}" must have a positive integer typeid pointer`);
|
|
866
874
|
}
|
|
867
|
-
if (
|
|
875
|
+
if (kb.hasOwnProperty(b)) {
|
|
868
876
|
if (c.Va) {
|
|
869
877
|
return;
|
|
870
878
|
}
|
|
871
|
-
throw new
|
|
879
|
+
throw new O(`Cannot register type '${d}' twice`);
|
|
872
880
|
}
|
|
873
|
-
|
|
874
|
-
delete
|
|
875
|
-
|
|
881
|
+
kb[b] = a;
|
|
882
|
+
delete Gb[b];
|
|
883
|
+
Fb.hasOwnProperty(b) && (a = Fb[b], delete Fb[b], a.forEach(e => e()));
|
|
876
884
|
}
|
|
877
|
-
function
|
|
885
|
+
function Hb(b, a, c = {}) {
|
|
878
886
|
if (!("argPackAdvance" in a)) {
|
|
879
887
|
throw new TypeError("registerType registeredInstance requires argPackAdvance");
|
|
880
888
|
}
|
|
881
|
-
return
|
|
889
|
+
return Ib(b, a, c);
|
|
882
890
|
}
|
|
883
|
-
var
|
|
884
|
-
throw new
|
|
891
|
+
var Jb = b => {
|
|
892
|
+
throw new O(b.g.j.h.name + " instance already deleted");
|
|
885
893
|
};
|
|
886
|
-
function
|
|
894
|
+
function Kb() {
|
|
887
895
|
}
|
|
888
|
-
var
|
|
896
|
+
var Lb = (b, a, c) => {
|
|
889
897
|
if (void 0 === b[a].l) {
|
|
890
898
|
var d = b[a];
|
|
891
899
|
b[a] = function(...e) {
|
|
892
900
|
if (!b[a].l.hasOwnProperty(e.length)) {
|
|
893
|
-
throw new
|
|
901
|
+
throw new O(`Function '${c}' called with an invalid number of arguments (${e.length}) - expects one of (${b[a].l})!`);
|
|
894
902
|
}
|
|
895
903
|
return b[a].l[e.length].apply(this, e);
|
|
896
904
|
};
|
|
897
905
|
b[a].l = [];
|
|
898
906
|
b[a].l[d.L] = d;
|
|
899
907
|
}
|
|
900
|
-
},
|
|
908
|
+
}, Mb = (b, a, c) => {
|
|
901
909
|
if (k.hasOwnProperty(b)) {
|
|
902
910
|
if (void 0 === c || void 0 !== k[b].l && void 0 !== k[b].l[c]) {
|
|
903
|
-
throw new
|
|
911
|
+
throw new O(`Cannot register public name '${b}' twice`);
|
|
904
912
|
}
|
|
905
|
-
|
|
913
|
+
Lb(k, b, b);
|
|
906
914
|
if (k.hasOwnProperty(c)) {
|
|
907
|
-
throw new
|
|
915
|
+
throw new O(`Cannot register multiple overloads of a function with the same number of arguments (${c})!`);
|
|
908
916
|
}
|
|
909
917
|
k[b].l[c] = a;
|
|
910
918
|
} else {
|
|
911
919
|
k[b] = a, void 0 !== c && (k[b].nb = c);
|
|
912
920
|
}
|
|
913
|
-
},
|
|
921
|
+
}, Nb = b => {
|
|
914
922
|
if (void 0 === b) {
|
|
915
923
|
return "_unknown";
|
|
916
924
|
}
|
|
@@ -918,7 +926,7 @@ var Ib = (b, a, c) => {
|
|
|
918
926
|
var a = b.charCodeAt(0);
|
|
919
927
|
return 48 <= a && 57 >= a ? `_${b}` : b;
|
|
920
928
|
};
|
|
921
|
-
function
|
|
929
|
+
function Ob(b, a, c, d, e, f, m, h) {
|
|
922
930
|
this.name = b;
|
|
923
931
|
this.constructor = a;
|
|
924
932
|
this.C = c;
|
|
@@ -929,35 +937,35 @@ function Lb(b, a, c, d, e, f, m, h) {
|
|
|
929
937
|
this.La = h;
|
|
930
938
|
this.wa = [];
|
|
931
939
|
}
|
|
932
|
-
var
|
|
940
|
+
var Pb = (b, a, c) => {
|
|
933
941
|
for (; a !== c;) {
|
|
934
942
|
if (!a.S) {
|
|
935
|
-
throw new
|
|
943
|
+
throw new O(`Expected null or instance of ${c.name}, got an instance of ${a.name}`);
|
|
936
944
|
}
|
|
937
945
|
b = a.S(b);
|
|
938
946
|
a = a.o;
|
|
939
947
|
}
|
|
940
948
|
return b;
|
|
941
949
|
};
|
|
942
|
-
function
|
|
950
|
+
function Qb(b, a) {
|
|
943
951
|
if (null === a) {
|
|
944
952
|
if (this.ea) {
|
|
945
|
-
throw new
|
|
953
|
+
throw new O(`null is not a valid ${this.name}`);
|
|
946
954
|
}
|
|
947
955
|
return 0;
|
|
948
956
|
}
|
|
949
957
|
if (!a.g) {
|
|
950
|
-
throw new
|
|
958
|
+
throw new O(`Cannot pass "${Rb(a)}" as a ${this.name}`);
|
|
951
959
|
}
|
|
952
960
|
if (!a.g.i) {
|
|
953
|
-
throw new
|
|
961
|
+
throw new O(`Cannot pass deleted object as a pointer of type ${this.name}`);
|
|
954
962
|
}
|
|
955
|
-
return
|
|
963
|
+
return Pb(a.g.i, a.g.j.h, this.h);
|
|
956
964
|
}
|
|
957
|
-
function
|
|
965
|
+
function Sb(b, a) {
|
|
958
966
|
if (null === a) {
|
|
959
967
|
if (this.ea) {
|
|
960
|
-
throw new
|
|
968
|
+
throw new O(`null is not a valid ${this.name}`);
|
|
961
969
|
}
|
|
962
970
|
if (this.V) {
|
|
963
971
|
var c = this.fa();
|
|
@@ -967,25 +975,25 @@ function Pb(b, a) {
|
|
|
967
975
|
return 0;
|
|
968
976
|
}
|
|
969
977
|
if (!a || !a.g) {
|
|
970
|
-
throw new
|
|
978
|
+
throw new O(`Cannot pass "${Rb(a)}" as a ${this.name}`);
|
|
971
979
|
}
|
|
972
980
|
if (!a.g.i) {
|
|
973
|
-
throw new
|
|
981
|
+
throw new O(`Cannot pass deleted object as a pointer of type ${this.name}`);
|
|
974
982
|
}
|
|
975
983
|
if (!this.U && a.g.j.U) {
|
|
976
|
-
throw new
|
|
984
|
+
throw new O(`Cannot convert argument of type ${a.g.A ? a.g.A.name : a.g.j.name} to parameter type ${this.name}`);
|
|
977
985
|
}
|
|
978
|
-
c =
|
|
986
|
+
c = Pb(a.g.i, a.g.j.h, this.h);
|
|
979
987
|
if (this.V) {
|
|
980
988
|
if (void 0 === a.g.s) {
|
|
981
|
-
throw new
|
|
989
|
+
throw new O("Passing raw pointer to smart pointer is illegal");
|
|
982
990
|
}
|
|
983
991
|
switch(this.gb) {
|
|
984
992
|
case 0:
|
|
985
993
|
if (a.g.A === this) {
|
|
986
994
|
c = a.g.s;
|
|
987
995
|
} else {
|
|
988
|
-
throw new
|
|
996
|
+
throw new O(`Cannot convert argument of type ${a.g.A ? a.g.A.name : a.g.j.name} to parameter type ${this.name}`);
|
|
989
997
|
}
|
|
990
998
|
break;
|
|
991
999
|
case 1:
|
|
@@ -996,35 +1004,35 @@ function Pb(b, a) {
|
|
|
996
1004
|
c = a.g.s;
|
|
997
1005
|
} else {
|
|
998
1006
|
var d = a.clone();
|
|
999
|
-
c = this.bb(c,
|
|
1007
|
+
c = this.bb(c, bb(() => d["delete"]()));
|
|
1000
1008
|
null !== b && b.push(this.D, c);
|
|
1001
1009
|
}
|
|
1002
1010
|
break;
|
|
1003
1011
|
default:
|
|
1004
|
-
throw new
|
|
1012
|
+
throw new O("Unsupporting sharing policy");
|
|
1005
1013
|
}
|
|
1006
1014
|
}
|
|
1007
1015
|
return c;
|
|
1008
1016
|
}
|
|
1009
|
-
function
|
|
1017
|
+
function Tb(b, a) {
|
|
1010
1018
|
if (null === a) {
|
|
1011
1019
|
if (this.ea) {
|
|
1012
|
-
throw new
|
|
1020
|
+
throw new O(`null is not a valid ${this.name}`);
|
|
1013
1021
|
}
|
|
1014
1022
|
return 0;
|
|
1015
1023
|
}
|
|
1016
1024
|
if (!a.g) {
|
|
1017
|
-
throw new
|
|
1025
|
+
throw new O(`Cannot pass "${Rb(a)}" as a ${this.name}`);
|
|
1018
1026
|
}
|
|
1019
1027
|
if (!a.g.i) {
|
|
1020
|
-
throw new
|
|
1028
|
+
throw new O(`Cannot pass deleted object as a pointer of type ${this.name}`);
|
|
1021
1029
|
}
|
|
1022
1030
|
if (a.g.j.U) {
|
|
1023
|
-
throw new
|
|
1031
|
+
throw new O(`Cannot convert argument of type ${a.g.j.name} to parameter type ${this.name}`);
|
|
1024
1032
|
}
|
|
1025
|
-
return
|
|
1033
|
+
return Pb(a.g.i, a.g.j.h, this.h);
|
|
1026
1034
|
}
|
|
1027
|
-
function
|
|
1035
|
+
function Ub(b, a, c, d, e, f, m, h, l, n, r) {
|
|
1028
1036
|
this.name = b;
|
|
1029
1037
|
this.h = a;
|
|
1030
1038
|
this.ea = c;
|
|
@@ -1036,36 +1044,36 @@ function Rb(b, a, c, d, e, f, m, h, l, n, r) {
|
|
|
1036
1044
|
this.fa = l;
|
|
1037
1045
|
this.bb = n;
|
|
1038
1046
|
this.D = r;
|
|
1039
|
-
e || void 0 !== a.o ? this.toWireType =
|
|
1047
|
+
e || void 0 !== a.o ? this.toWireType = Sb : (this.toWireType = d ? Qb : Tb, this.B = null);
|
|
1040
1048
|
}
|
|
1041
|
-
var
|
|
1049
|
+
var Vb = (b, a, c) => {
|
|
1042
1050
|
if (!k.hasOwnProperty(b)) {
|
|
1043
|
-
throw new
|
|
1051
|
+
throw new zb("Replacing nonexistent public symbol");
|
|
1044
1052
|
}
|
|
1045
1053
|
void 0 !== k[b].l && void 0 !== c ? k[b].l[c] = a : (k[b] = a, k[b].L = c);
|
|
1046
|
-
},
|
|
1047
|
-
var a =
|
|
1048
|
-
a || (b >=
|
|
1054
|
+
}, Wb = [], Xb, Yb = b => {
|
|
1055
|
+
var a = Wb[b];
|
|
1056
|
+
a || (b >= Wb.length && (Wb.length = b + 1), Wb[b] = a = Xb.get(b));
|
|
1049
1057
|
return a;
|
|
1050
|
-
},
|
|
1051
|
-
b.includes("j") ? (b = b.replace(/p/g, "i"), a = (0,k["dynCall_" + b])(a, ...c)) : a =
|
|
1058
|
+
}, Zb = (b, a, c = []) => {
|
|
1059
|
+
b.includes("j") ? (b = b.replace(/p/g, "i"), a = (0,k["dynCall_" + b])(a, ...c)) : a = Yb(a)(...c);
|
|
1052
1060
|
return a;
|
|
1053
|
-
},
|
|
1054
|
-
b =
|
|
1055
|
-
var c = b.includes("j") ?
|
|
1061
|
+
}, $b = (b, a) => (...c) => Zb(b, a, c), Y = (b, a) => {
|
|
1062
|
+
b = S(b);
|
|
1063
|
+
var c = b.includes("j") ? $b(b, a) : Yb(a);
|
|
1056
1064
|
if ("function" != typeof c) {
|
|
1057
|
-
throw new
|
|
1065
|
+
throw new O(`unknown function pointer with signature ${b}: ${a}`);
|
|
1058
1066
|
}
|
|
1059
1067
|
return c;
|
|
1060
|
-
},
|
|
1068
|
+
}, ac, bc = (b, a) => {
|
|
1061
1069
|
function c(f) {
|
|
1062
|
-
e[f] ||
|
|
1070
|
+
e[f] || kb[f] || (Gb[f] ? Gb[f].forEach(c) : (d.push(f), e[f] = !0));
|
|
1063
1071
|
}
|
|
1064
1072
|
var d = [], e = {};
|
|
1065
1073
|
a.forEach(c);
|
|
1066
|
-
throw new
|
|
1074
|
+
throw new ac(`${b}: ` + d.map(nb).join([", "]));
|
|
1067
1075
|
};
|
|
1068
|
-
function
|
|
1076
|
+
function cc(b) {
|
|
1069
1077
|
for (var a = 1; a < b.length; ++a) {
|
|
1070
1078
|
if (null !== b[a] && void 0 === b[a].B) {
|
|
1071
1079
|
return !0;
|
|
@@ -1073,99 +1081,99 @@ function $b(b) {
|
|
|
1073
1081
|
}
|
|
1074
1082
|
return !1;
|
|
1075
1083
|
}
|
|
1076
|
-
function
|
|
1084
|
+
function dc(b, a, c, d, e) {
|
|
1077
1085
|
var f = a.length;
|
|
1078
1086
|
if (2 > f) {
|
|
1079
|
-
throw new
|
|
1087
|
+
throw new O("argTypes array size mismatch! Must at least get return value and 'this' types!");
|
|
1080
1088
|
}
|
|
1081
|
-
var m = null !== a[1] && null !== c, h =
|
|
1082
|
-
return
|
|
1089
|
+
var m = null !== a[1] && null !== c, h = cc(a), l = "void" !== a[0].name, n = f - 2, r = Array(n), w = [], z = [];
|
|
1090
|
+
return $a(b, function(...g) {
|
|
1083
1091
|
if (g.length !== n) {
|
|
1084
|
-
throw new
|
|
1092
|
+
throw new O(`function ${b} called with ${g.length} arguments, expected ${n}`);
|
|
1085
1093
|
}
|
|
1086
|
-
|
|
1094
|
+
z.length = 0;
|
|
1087
1095
|
w.length = m ? 2 : 1;
|
|
1088
1096
|
w[0] = e;
|
|
1089
1097
|
if (m) {
|
|
1090
|
-
var t = a[1].toWireType(
|
|
1098
|
+
var t = a[1].toWireType(z, this);
|
|
1091
1099
|
w[1] = t;
|
|
1092
1100
|
}
|
|
1093
1101
|
for (var q = 0; q < n; ++q) {
|
|
1094
|
-
r[q] = a[q + 2].toWireType(
|
|
1102
|
+
r[q] = a[q + 2].toWireType(z, g[q]), w.push(r[q]);
|
|
1095
1103
|
}
|
|
1096
1104
|
g = d(...w);
|
|
1097
1105
|
if (h) {
|
|
1098
|
-
|
|
1106
|
+
Db(z);
|
|
1099
1107
|
} else {
|
|
1100
1108
|
for (q = m ? 1 : 2; q < a.length; q++) {
|
|
1101
|
-
var
|
|
1102
|
-
null !== a[q].B && a[q].B(
|
|
1109
|
+
var G = 1 === q ? t : r[q - 2];
|
|
1110
|
+
null !== a[q].B && a[q].B(G);
|
|
1103
1111
|
}
|
|
1104
1112
|
}
|
|
1105
1113
|
t = l ? a[0].fromWireType(g) : void 0;
|
|
1106
1114
|
return t;
|
|
1107
1115
|
});
|
|
1108
1116
|
}
|
|
1109
|
-
var
|
|
1117
|
+
var ec = (b, a) => {
|
|
1110
1118
|
for (var c = [], d = 0; d < b; d++) {
|
|
1111
|
-
c.push(
|
|
1119
|
+
c.push(M[a + 4 * d >> 2]);
|
|
1112
1120
|
}
|
|
1113
1121
|
return c;
|
|
1114
|
-
},
|
|
1122
|
+
}, fc = b => {
|
|
1115
1123
|
b = b.trim();
|
|
1116
1124
|
const a = b.indexOf("(");
|
|
1117
1125
|
return -1 !== a ? b.substr(0, a) : b;
|
|
1118
|
-
},
|
|
1126
|
+
}, gc = (b, a, c) => {
|
|
1119
1127
|
if (!(b instanceof Object)) {
|
|
1120
|
-
throw new
|
|
1128
|
+
throw new O(`${c} with invalid "this": ${b}`);
|
|
1121
1129
|
}
|
|
1122
1130
|
if (!(b instanceof a.h.constructor)) {
|
|
1123
|
-
throw new
|
|
1131
|
+
throw new O(`${c} incompatible with "this" of type ${b.constructor.name}`);
|
|
1124
1132
|
}
|
|
1125
1133
|
if (!b.g.i) {
|
|
1126
|
-
throw new
|
|
1127
|
-
}
|
|
1128
|
-
return
|
|
1129
|
-
},
|
|
1130
|
-
9 < b && 0 === --
|
|
1131
|
-
},
|
|
1132
|
-
var a =
|
|
1133
|
-
|
|
1134
|
+
throw new O(`cannot call emscripten binding method ${c} on deleted object`);
|
|
1135
|
+
}
|
|
1136
|
+
return Pb(b.g.i, b.g.j.h, a.h);
|
|
1137
|
+
}, hc = b => {
|
|
1138
|
+
9 < b && 0 === --N[b + 1] && (N[b] = void 0, ab.push(b));
|
|
1139
|
+
}, ic = {name:"emscripten::val", fromWireType:b => {
|
|
1140
|
+
var a = R(b);
|
|
1141
|
+
hc(b);
|
|
1134
1142
|
return a;
|
|
1135
|
-
}, toWireType:(b, a) =>
|
|
1143
|
+
}, toWireType:(b, a) => bb(a), argPackAdvance:8, readValueFromPointer:Eb, B:null,}, jc = (b, a, c) => {
|
|
1136
1144
|
switch(a) {
|
|
1137
1145
|
case 1:
|
|
1138
1146
|
return c ? function(d) {
|
|
1139
|
-
return this.fromWireType(
|
|
1147
|
+
return this.fromWireType(Ea[d]);
|
|
1140
1148
|
} : function(d) {
|
|
1141
1149
|
return this.fromWireType(J[d]);
|
|
1142
1150
|
};
|
|
1143
1151
|
case 2:
|
|
1144
1152
|
return c ? function(d) {
|
|
1145
|
-
return this.fromWireType(Ea[d >> 1]);
|
|
1146
|
-
} : function(d) {
|
|
1147
1153
|
return this.fromWireType(Fa[d >> 1]);
|
|
1154
|
+
} : function(d) {
|
|
1155
|
+
return this.fromWireType(Ga[d >> 1]);
|
|
1148
1156
|
};
|
|
1149
1157
|
case 4:
|
|
1150
1158
|
return c ? function(d) {
|
|
1151
1159
|
return this.fromWireType(K[d >> 2]);
|
|
1152
1160
|
} : function(d) {
|
|
1153
|
-
return this.fromWireType(
|
|
1161
|
+
return this.fromWireType(M[d >> 2]);
|
|
1154
1162
|
};
|
|
1155
1163
|
default:
|
|
1156
1164
|
throw new TypeError(`invalid integer width (${a}): ${b}`);
|
|
1157
1165
|
}
|
|
1158
|
-
},
|
|
1166
|
+
}, Rb = b => {
|
|
1159
1167
|
if (null === b) {
|
|
1160
1168
|
return "null";
|
|
1161
1169
|
}
|
|
1162
1170
|
var a = typeof b;
|
|
1163
1171
|
return "object" === a || "array" === a || "function" === a ? b.toString() : "" + b;
|
|
1164
|
-
},
|
|
1172
|
+
}, kc = (b, a) => {
|
|
1165
1173
|
switch(a) {
|
|
1166
1174
|
case 4:
|
|
1167
1175
|
return function(c) {
|
|
1168
|
-
return this.fromWireType(
|
|
1176
|
+
return this.fromWireType(Ha[c >> 2]);
|
|
1169
1177
|
};
|
|
1170
1178
|
case 8:
|
|
1171
1179
|
return function(c) {
|
|
@@ -1174,18 +1182,18 @@ var bc = (b, a) => {
|
|
|
1174
1182
|
default:
|
|
1175
1183
|
throw new TypeError(`invalid float width (${a}): ${b}`);
|
|
1176
1184
|
}
|
|
1177
|
-
},
|
|
1185
|
+
}, lc = (b, a, c) => {
|
|
1178
1186
|
switch(a) {
|
|
1179
1187
|
case 1:
|
|
1180
|
-
return c ? d =>
|
|
1188
|
+
return c ? d => Ea[d] : d => J[d];
|
|
1181
1189
|
case 2:
|
|
1182
|
-
return c ? d =>
|
|
1190
|
+
return c ? d => Fa[d >> 1] : d => Ga[d >> 1];
|
|
1183
1191
|
case 4:
|
|
1184
|
-
return c ? d => K[d >> 2] : d =>
|
|
1192
|
+
return c ? d => K[d >> 2] : d => M[d >> 2];
|
|
1185
1193
|
default:
|
|
1186
1194
|
throw new TypeError(`invalid integer width (${a}): ${b}`);
|
|
1187
1195
|
}
|
|
1188
|
-
},
|
|
1196
|
+
}, mc = (b, a, c, d) => {
|
|
1189
1197
|
if (0 < d) {
|
|
1190
1198
|
d = c + d - 1;
|
|
1191
1199
|
for (var e = 0; e < b.length; ++e) {
|
|
@@ -1225,19 +1233,19 @@ var bc = (b, a) => {
|
|
|
1225
1233
|
}
|
|
1226
1234
|
a[c] = 0;
|
|
1227
1235
|
}
|
|
1228
|
-
},
|
|
1236
|
+
}, nc = b => {
|
|
1229
1237
|
for (var a = 0, c = 0; c < b.length; ++c) {
|
|
1230
1238
|
var d = b.charCodeAt(c);
|
|
1231
1239
|
127 >= d ? a++ : 2047 >= d ? a += 2 : 55296 <= d && 57343 >= d ? (a += 4, ++c) : a += 3;
|
|
1232
1240
|
}
|
|
1233
1241
|
return a;
|
|
1234
|
-
},
|
|
1242
|
+
}, rc = "undefined" != typeof TextDecoder ? new TextDecoder("utf8") : void 0, sc = (b, a, c) => {
|
|
1235
1243
|
var d = a + c;
|
|
1236
1244
|
for (c = a; b[c] && !(c >= d);) {
|
|
1237
1245
|
++c;
|
|
1238
1246
|
}
|
|
1239
|
-
if (16 < c - a && b.buffer &&
|
|
1240
|
-
return
|
|
1247
|
+
if (16 < c - a && b.buffer && rc) {
|
|
1248
|
+
return rc.decode(b.subarray(a, c));
|
|
1241
1249
|
}
|
|
1242
1250
|
for (d = ""; a < c;) {
|
|
1243
1251
|
var e = b[a++];
|
|
@@ -1255,25 +1263,25 @@ var bc = (b, a) => {
|
|
|
1255
1263
|
}
|
|
1256
1264
|
}
|
|
1257
1265
|
return d;
|
|
1258
|
-
},
|
|
1266
|
+
}, tc = "undefined" != typeof TextDecoder ? new TextDecoder("utf-16le") : void 0, uc = (b, a) => {
|
|
1259
1267
|
var c = b >> 1;
|
|
1260
|
-
for (var d = c + a / 2; !(c >= d) &&
|
|
1268
|
+
for (var d = c + a / 2; !(c >= d) && Ga[c];) {
|
|
1261
1269
|
++c;
|
|
1262
1270
|
}
|
|
1263
1271
|
c <<= 1;
|
|
1264
|
-
if (32 < c - b &&
|
|
1265
|
-
return
|
|
1272
|
+
if (32 < c - b && tc) {
|
|
1273
|
+
return tc.decode(J.subarray(b, c));
|
|
1266
1274
|
}
|
|
1267
1275
|
c = "";
|
|
1268
1276
|
for (d = 0; !(d >= a / 2); ++d) {
|
|
1269
|
-
var e =
|
|
1277
|
+
var e = Fa[b + 2 * d >> 1];
|
|
1270
1278
|
if (0 == e) {
|
|
1271
1279
|
break;
|
|
1272
1280
|
}
|
|
1273
1281
|
c += String.fromCharCode(e);
|
|
1274
1282
|
}
|
|
1275
1283
|
return c;
|
|
1276
|
-
},
|
|
1284
|
+
}, vc = (b, a, c) => {
|
|
1277
1285
|
c ??= 2147483647;
|
|
1278
1286
|
if (2 > c) {
|
|
1279
1287
|
return 0;
|
|
@@ -1282,11 +1290,11 @@ var bc = (b, a) => {
|
|
|
1282
1290
|
var d = a;
|
|
1283
1291
|
c = c < 2 * b.length ? c / 2 : b.length;
|
|
1284
1292
|
for (var e = 0; e < c; ++e) {
|
|
1285
|
-
|
|
1293
|
+
Fa[a >> 1] = b.charCodeAt(e), a += 2;
|
|
1286
1294
|
}
|
|
1287
|
-
|
|
1295
|
+
Fa[a >> 1] = 0;
|
|
1288
1296
|
return a - d;
|
|
1289
|
-
},
|
|
1297
|
+
}, wc = b => 2 * b.length, xc = (b, a) => {
|
|
1290
1298
|
for (var c = 0, d = ""; !(c >= a / 4);) {
|
|
1291
1299
|
var e = K[b + 4 * c >> 2];
|
|
1292
1300
|
if (0 == e) {
|
|
@@ -1296,7 +1304,7 @@ var bc = (b, a) => {
|
|
|
1296
1304
|
65536 <= e ? (e -= 65536, d += String.fromCharCode(55296 | e >> 10, 56320 | e & 1023)) : d += String.fromCharCode(e);
|
|
1297
1305
|
}
|
|
1298
1306
|
return d;
|
|
1299
|
-
},
|
|
1307
|
+
}, yc = (b, a, c) => {
|
|
1300
1308
|
c ??= 2147483647;
|
|
1301
1309
|
if (4 > c) {
|
|
1302
1310
|
return 0;
|
|
@@ -1317,50 +1325,50 @@ var bc = (b, a) => {
|
|
|
1317
1325
|
}
|
|
1318
1326
|
K[a >> 2] = 0;
|
|
1319
1327
|
return a - d;
|
|
1320
|
-
},
|
|
1328
|
+
}, zc = b => {
|
|
1321
1329
|
for (var a = 0, c = 0; c < b.length; ++c) {
|
|
1322
1330
|
var d = b.charCodeAt(c);
|
|
1323
1331
|
55296 <= d && 57343 >= d && ++c;
|
|
1324
1332
|
a += 4;
|
|
1325
1333
|
}
|
|
1326
1334
|
return a;
|
|
1327
|
-
},
|
|
1335
|
+
}, Ac = (b, a, c) => {
|
|
1328
1336
|
var d = [];
|
|
1329
1337
|
b = b.toWireType(d, c);
|
|
1330
|
-
d.length && (
|
|
1338
|
+
d.length && (M[a >> 2] = bb(d));
|
|
1331
1339
|
return b;
|
|
1332
|
-
},
|
|
1333
|
-
var a =
|
|
1334
|
-
return void 0 === a ?
|
|
1335
|
-
},
|
|
1336
|
-
var a =
|
|
1337
|
-
|
|
1340
|
+
}, Bc = {}, Cc = b => {
|
|
1341
|
+
var a = Bc[b];
|
|
1342
|
+
return void 0 === a ? S(b) : a;
|
|
1343
|
+
}, Dc = [], Ec = b => {
|
|
1344
|
+
var a = Dc.length;
|
|
1345
|
+
Dc.push(b);
|
|
1338
1346
|
return a;
|
|
1339
|
-
},
|
|
1347
|
+
}, Fc = (b, a) => {
|
|
1340
1348
|
for (var c = Array(b), d = 0; d < b; ++d) {
|
|
1341
|
-
c[d] =
|
|
1349
|
+
c[d] = ob(M[a + 4 * d >> 2], "parameter " + d);
|
|
1342
1350
|
}
|
|
1343
1351
|
return c;
|
|
1344
|
-
},
|
|
1345
|
-
if (!
|
|
1346
|
-
var b = {USER:"web_user", LOGNAME:"web_user", PATH:"/", PWD:"/", HOME:"/home/web_user", LANG:("object" == typeof navigator && navigator.languages && navigator.languages[0] || "C").replace("-", "_") + ".UTF-8", _:
|
|
1347
|
-
for (a in
|
|
1348
|
-
void 0 ===
|
|
1352
|
+
}, Gc = Reflect.construct, Hc = {}, Jc = () => {
|
|
1353
|
+
if (!Ic) {
|
|
1354
|
+
var b = {USER:"web_user", LOGNAME:"web_user", PATH:"/", PWD:"/", HOME:"/home/web_user", LANG:("object" == typeof navigator && navigator.languages && navigator.languages[0] || "C").replace("-", "_") + ".UTF-8", _:ta || "./this.program"}, a;
|
|
1355
|
+
for (a in Hc) {
|
|
1356
|
+
void 0 === Hc[a] ? delete b[a] : b[a] = Hc[a];
|
|
1349
1357
|
}
|
|
1350
1358
|
var c = [];
|
|
1351
1359
|
for (a in b) {
|
|
1352
1360
|
c.push(`${a}=${b[a]}`);
|
|
1353
1361
|
}
|
|
1354
|
-
|
|
1362
|
+
Ic = c;
|
|
1355
1363
|
}
|
|
1356
|
-
return
|
|
1357
|
-
},
|
|
1358
|
-
function
|
|
1359
|
-
var a = Array(
|
|
1360
|
-
|
|
1364
|
+
return Ic;
|
|
1365
|
+
}, Ic, Kc = [null, [], []], Lc = b => 0 === b % 4 && (0 !== b % 100 || 0 === b % 400), Mc = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Nc = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
1366
|
+
function Oc(b) {
|
|
1367
|
+
var a = Array(nc(b) + 1);
|
|
1368
|
+
mc(b, a, 0, a.length);
|
|
1361
1369
|
return a;
|
|
1362
1370
|
}
|
|
1363
|
-
var
|
|
1371
|
+
var Pc = (b, a, c, d) => {
|
|
1364
1372
|
function e(g, t, q) {
|
|
1365
1373
|
for (g = "number" == typeof g ? g.toString() : g || ""; g.length < t;) {
|
|
1366
1374
|
g = q[0] + g;
|
|
@@ -1371,12 +1379,12 @@ var Mc = (b, a, c, d) => {
|
|
|
1371
1379
|
return e(g, t, "0");
|
|
1372
1380
|
}
|
|
1373
1381
|
function m(g, t) {
|
|
1374
|
-
function q(
|
|
1375
|
-
return 0 >
|
|
1382
|
+
function q(F) {
|
|
1383
|
+
return 0 > F ? -1 : 0 < F ? 1 : 0;
|
|
1376
1384
|
}
|
|
1377
|
-
var
|
|
1378
|
-
0 === (
|
|
1379
|
-
return
|
|
1385
|
+
var G;
|
|
1386
|
+
0 === (G = q(g.getFullYear() - t.getFullYear())) && 0 === (G = q(g.getMonth() - t.getMonth())) && (G = q(g.getDate() - t.getDate()));
|
|
1387
|
+
return G;
|
|
1380
1388
|
}
|
|
1381
1389
|
function h(g) {
|
|
1382
1390
|
switch(g.getDay()) {
|
|
@@ -1399,9 +1407,9 @@ var Mc = (b, a, c, d) => {
|
|
|
1399
1407
|
function l(g) {
|
|
1400
1408
|
var t = g.J;
|
|
1401
1409
|
for (g = new Date((new Date(g.K + 1900, 0, 1)).getTime()); 0 < t;) {
|
|
1402
|
-
var q = g.getMonth(),
|
|
1403
|
-
if (t >
|
|
1404
|
-
t -=
|
|
1410
|
+
var q = g.getMonth(), G = (Lc(g.getFullYear()) ? Mc : Nc)[q];
|
|
1411
|
+
if (t > G - g.getDate()) {
|
|
1412
|
+
t -= G - g.getDate() + 1, g.setDate(1), 11 > q ? g.setMonth(q + 1) : (g.setMonth(0), g.setFullYear(g.getFullYear() + 1));
|
|
1405
1413
|
} else {
|
|
1406
1414
|
g.setDate(g.getDate() + t);
|
|
1407
1415
|
break;
|
|
@@ -1412,31 +1420,31 @@ var Mc = (b, a, c, d) => {
|
|
|
1412
1420
|
q = h(q);
|
|
1413
1421
|
return 0 >= m(t, g) ? 0 >= m(q, g) ? g.getFullYear() + 1 : g.getFullYear() : g.getFullYear() - 1;
|
|
1414
1422
|
}
|
|
1415
|
-
var n =
|
|
1416
|
-
d = {jb:K[d >> 2], ib:K[d + 4 >> 2], Z:K[d + 8 >> 2], ha:K[d + 12 >> 2], $:K[d + 16 >> 2], K:K[d + 20 >> 2], F:K[d + 24 >> 2], J:K[d + 28 >> 2], ob:K[d + 32 >> 2], hb:K[d + 36 >> 2], kb:n ? n ?
|
|
1417
|
-
c = c ?
|
|
1423
|
+
var n = M[d + 40 >> 2];
|
|
1424
|
+
d = {jb:K[d >> 2], ib:K[d + 4 >> 2], Z:K[d + 8 >> 2], ha:K[d + 12 >> 2], $:K[d + 16 >> 2], K:K[d + 20 >> 2], F:K[d + 24 >> 2], J:K[d + 28 >> 2], ob:K[d + 32 >> 2], hb:K[d + 36 >> 2], kb:n ? n ? sc(J, n) : "" : ""};
|
|
1425
|
+
c = c ? sc(J, c) : "";
|
|
1418
1426
|
n = {"%c":"%a %b %d %H:%M:%S %Y", "%D":"%m/%d/%y", "%F":"%Y-%m-%d", "%h":"%b", "%r":"%I:%M:%S %p", "%R":"%H:%M", "%T":"%H:%M:%S", "%x":"%m/%d/%y", "%X":"%H:%M:%S", "%Ec":"%c", "%EC":"%C", "%Ex":"%m/%d/%y", "%EX":"%H:%M:%S", "%Ey":"%y", "%EY":"%Y", "%Od":"%d", "%Oe":"%e", "%OH":"%H", "%OI":"%I", "%Om":"%m", "%OM":"%M", "%OS":"%S", "%Ou":"%u", "%OU":"%U", "%OV":"%V", "%Ow":"%w", "%OW":"%W", "%Oy":"%y",};
|
|
1419
1427
|
for (var r in n) {
|
|
1420
1428
|
c = c.replace(new RegExp(r, "g"), n[r]);
|
|
1421
1429
|
}
|
|
1422
|
-
var w = "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),
|
|
1423
|
-
n = {"%a":g => w[g.F].substring(0, 3), "%A":g => w[g.F], "%b":g =>
|
|
1430
|
+
var w = "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "), z = "January February March April May June July August September October November December".split(" ");
|
|
1431
|
+
n = {"%a":g => w[g.F].substring(0, 3), "%A":g => w[g.F], "%b":g => z[g.$].substring(0, 3), "%B":g => z[g.$], "%C":g => f((g.K + 1900) / 100 | 0, 2), "%d":g => f(g.ha, 2), "%e":g => e(g.ha, 2, " "), "%g":g => l(g).toString().substring(2), "%G":l, "%H":g => f(g.Z, 2), "%I":g => {
|
|
1424
1432
|
g = g.Z;
|
|
1425
1433
|
0 == g ? g = 12 : 12 < g && (g -= 12);
|
|
1426
1434
|
return f(g, 2);
|
|
1427
1435
|
}, "%j":g => {
|
|
1428
|
-
for (var t = 0, q = 0; q <= g.$ - 1; t += (
|
|
1436
|
+
for (var t = 0, q = 0; q <= g.$ - 1; t += (Lc(g.K + 1900) ? Mc : Nc)[q++]) {
|
|
1429
1437
|
}
|
|
1430
1438
|
return f(g.ha + t, 3);
|
|
1431
1439
|
}, "%m":g => f(g.$ + 1, 2), "%M":g => f(g.ib, 2), "%n":() => "\n", "%p":g => 0 <= g.Z && 12 > g.Z ? "AM" : "PM", "%S":g => f(g.jb, 2), "%t":() => "\t", "%u":g => g.F || 7, "%U":g => f(Math.floor((g.J + 7 - g.F) / 7), 2), "%V":g => {
|
|
1432
1440
|
var t = Math.floor((g.J + 7 - (g.F + 6) % 7) / 7);
|
|
1433
1441
|
2 >= (g.F + 371 - g.J - 2) % 7 && t++;
|
|
1434
1442
|
if (t) {
|
|
1435
|
-
53 == t && (q = (g.F + 371 - g.J) % 7, 4 == q || 3 == q &&
|
|
1443
|
+
53 == t && (q = (g.F + 371 - g.J) % 7, 4 == q || 3 == q && Lc(g.K) || (t = 1));
|
|
1436
1444
|
} else {
|
|
1437
1445
|
t = 52;
|
|
1438
1446
|
var q = (g.F + 7 - g.J - 1) % 7;
|
|
1439
|
-
(4 == q || 5 == q &&
|
|
1447
|
+
(4 == q || 5 == q && Lc(g.K % 400 - 1)) && t++;
|
|
1440
1448
|
}
|
|
1441
1449
|
return f(t, 2);
|
|
1442
1450
|
}, "%w":g => g.F, "%W":g => f(Math.floor((g.J + 7 - (g.F + 6) % 7) / 7), 2), "%y":g => (g.K + 1900).toString().substring(2), "%Y":g => g.K + 1900, "%z":g => {
|
|
@@ -1450,47 +1458,47 @@ var Mc = (b, a, c, d) => {
|
|
|
1450
1458
|
c.includes(r) && (c = c.replace(new RegExp(r, "g"), n[r](d)));
|
|
1451
1459
|
}
|
|
1452
1460
|
c = c.replace(/\0\0/g, "%");
|
|
1453
|
-
r =
|
|
1461
|
+
r = Oc(c);
|
|
1454
1462
|
if (r.length > a) {
|
|
1455
1463
|
return 0;
|
|
1456
1464
|
}
|
|
1457
|
-
|
|
1465
|
+
Ea.set(r, b);
|
|
1458
1466
|
return r.length - 1;
|
|
1459
1467
|
};
|
|
1460
|
-
|
|
1468
|
+
O = k.BindingError = class extends Error {
|
|
1461
1469
|
constructor(b) {
|
|
1462
1470
|
super(b);
|
|
1463
1471
|
this.name = "BindingError";
|
|
1464
1472
|
}
|
|
1465
1473
|
};
|
|
1466
|
-
|
|
1467
|
-
k.count_emval_handles = () =>
|
|
1468
|
-
|
|
1469
|
-
for (var
|
|
1470
|
-
|
|
1474
|
+
N.push(0, 1, void 0, 1, null, 1, !0, 1, !1, 1,);
|
|
1475
|
+
k.count_emval_handles = () => N.length / 2 - 5 - ab.length;
|
|
1476
|
+
db = k.PureVirtualError = cb("PureVirtualError");
|
|
1477
|
+
for (var Qc = Array(256), Rc = 0; 256 > Rc; ++Rc) {
|
|
1478
|
+
Qc[Rc] = String.fromCharCode(Rc);
|
|
1471
1479
|
}
|
|
1472
|
-
|
|
1473
|
-
k.getInheritedInstanceCount = () => Object.keys(
|
|
1480
|
+
eb = Qc;
|
|
1481
|
+
k.getInheritedInstanceCount = () => Object.keys(ib).length;
|
|
1474
1482
|
k.getLiveInheritedInstances = () => {
|
|
1475
1483
|
var b = [], a;
|
|
1476
|
-
for (a in
|
|
1477
|
-
|
|
1484
|
+
for (a in ib) {
|
|
1485
|
+
ib.hasOwnProperty(a) && b.push(ib[a]);
|
|
1478
1486
|
}
|
|
1479
1487
|
return b;
|
|
1480
1488
|
};
|
|
1481
|
-
k.flushPendingDeletes =
|
|
1489
|
+
k.flushPendingDeletes = gb;
|
|
1482
1490
|
k.setDelayFunction = b => {
|
|
1483
|
-
|
|
1484
|
-
|
|
1491
|
+
hb = b;
|
|
1492
|
+
fb.length && hb && hb(gb);
|
|
1485
1493
|
};
|
|
1486
|
-
|
|
1494
|
+
zb = k.InternalError = class extends Error {
|
|
1487
1495
|
constructor(b) {
|
|
1488
1496
|
super(b);
|
|
1489
1497
|
this.name = "InternalError";
|
|
1490
1498
|
}
|
|
1491
1499
|
};
|
|
1492
|
-
Object.assign(
|
|
1493
|
-
if (!(this instanceof
|
|
1500
|
+
Object.assign(Kb.prototype, {isAliasOf:function(b) {
|
|
1501
|
+
if (!(this instanceof Kb && b instanceof Kb)) {
|
|
1494
1502
|
return !1;
|
|
1495
1503
|
}
|
|
1496
1504
|
var a = this.g.j.h, c = this.g.i;
|
|
@@ -1504,21 +1512,21 @@ Object.assign(Hb.prototype, {isAliasOf:function(b) {
|
|
|
1504
1512
|
}
|
|
1505
1513
|
return a === d && c === b;
|
|
1506
1514
|
}, clone:function() {
|
|
1507
|
-
this.g.i ||
|
|
1515
|
+
this.g.i || Jb(this);
|
|
1508
1516
|
if (this.g.O) {
|
|
1509
1517
|
return this.g.count.value += 1, this;
|
|
1510
1518
|
}
|
|
1511
|
-
var b =
|
|
1519
|
+
var b = Ab, a = Object, c = a.create, d = Object.getPrototypeOf(this), e = this.g;
|
|
1512
1520
|
b = b(c.call(a, d, {g:{value:{count:e.count, M:e.M, O:e.O, i:e.i, j:e.j, s:e.s, A:e.A,},}}));
|
|
1513
1521
|
b.g.count.value += 1;
|
|
1514
1522
|
b.g.M = !1;
|
|
1515
1523
|
return b;
|
|
1516
1524
|
}, ["delete"]() {
|
|
1517
|
-
this.g.i ||
|
|
1525
|
+
this.g.i || Jb(this);
|
|
1518
1526
|
if (this.g.M && !this.g.O) {
|
|
1519
|
-
throw new
|
|
1527
|
+
throw new O("Object already scheduled for deletion");
|
|
1520
1528
|
}
|
|
1521
|
-
|
|
1529
|
+
pb(this);
|
|
1522
1530
|
var b = this.g;
|
|
1523
1531
|
--b.count.value;
|
|
1524
1532
|
0 === b.count.value && (b.s ? b.A.D(b.s) : b.j.h.D(b.i));
|
|
@@ -1526,29 +1534,29 @@ Object.assign(Hb.prototype, {isAliasOf:function(b) {
|
|
|
1526
1534
|
}, isDeleted:function() {
|
|
1527
1535
|
return !this.g.i;
|
|
1528
1536
|
}, deleteLater:function() {
|
|
1529
|
-
this.g.i ||
|
|
1537
|
+
this.g.i || Jb(this);
|
|
1530
1538
|
if (this.g.M && !this.g.O) {
|
|
1531
|
-
throw new
|
|
1539
|
+
throw new O("Object already scheduled for deletion");
|
|
1532
1540
|
}
|
|
1533
|
-
|
|
1534
|
-
1 ===
|
|
1541
|
+
fb.push(this);
|
|
1542
|
+
1 === fb.length && hb && hb(gb);
|
|
1535
1543
|
this.g.M = !0;
|
|
1536
1544
|
return this;
|
|
1537
1545
|
},});
|
|
1538
|
-
Object.assign(
|
|
1546
|
+
Object.assign(Ub.prototype, {Ra(b) {
|
|
1539
1547
|
this.xa && (b = this.xa(b));
|
|
1540
1548
|
return b;
|
|
1541
1549
|
}, pa(b) {
|
|
1542
1550
|
this.D?.(b);
|
|
1543
|
-
}, argPackAdvance:8, readValueFromPointer:
|
|
1551
|
+
}, argPackAdvance:8, readValueFromPointer:Eb, fromWireType:function(b) {
|
|
1544
1552
|
function a() {
|
|
1545
|
-
return this.V ?
|
|
1553
|
+
return this.V ? Bb(this.h.C, {j:this.ab, i:c, A:this, s:b,}) : Bb(this.h.C, {j:this, i:b,});
|
|
1546
1554
|
}
|
|
1547
1555
|
var c = this.Ra(b);
|
|
1548
1556
|
if (!c) {
|
|
1549
1557
|
return this.pa(b), null;
|
|
1550
1558
|
}
|
|
1551
|
-
var d =
|
|
1559
|
+
var d = tb(this.h, c);
|
|
1552
1560
|
if (void 0 !== d) {
|
|
1553
1561
|
if (0 === d.g.count.value) {
|
|
1554
1562
|
return d.g.i = c, d.g.s = b, d.clone();
|
|
@@ -1558,26 +1566,26 @@ Object.assign(Rb.prototype, {Ra(b) {
|
|
|
1558
1566
|
return d;
|
|
1559
1567
|
}
|
|
1560
1568
|
d = this.h.Qa(c);
|
|
1561
|
-
d =
|
|
1569
|
+
d = sb[d];
|
|
1562
1570
|
if (!d) {
|
|
1563
1571
|
return a.call(this);
|
|
1564
1572
|
}
|
|
1565
1573
|
d = this.U ? d.Ha : d.pointerType;
|
|
1566
|
-
var e =
|
|
1567
|
-
return null === e ? a.call(this) : this.V ?
|
|
1574
|
+
var e = rb(c, this.h, d.h);
|
|
1575
|
+
return null === e ? a.call(this) : this.V ? Bb(d.h.C, {j:d, i:e, A:this, s:b,}) : Bb(d.h.C, {j:d, i:e,});
|
|
1568
1576
|
},});
|
|
1569
|
-
|
|
1570
|
-
var
|
|
1577
|
+
ac = k.UnboundTypeError = cb("UnboundTypeError");
|
|
1578
|
+
var Tc = {_abort_js:() => {
|
|
1571
1579
|
Ra("");
|
|
1572
1580
|
}, _embind_create_inheriting_constructor:(b, a, c) => {
|
|
1573
|
-
b =
|
|
1574
|
-
a =
|
|
1575
|
-
c =
|
|
1581
|
+
b = S(b);
|
|
1582
|
+
a = ob(a, "wrapper");
|
|
1583
|
+
c = R(c);
|
|
1576
1584
|
var d = a.h, e = d.C, f = d.o.C, m = d.o.constructor;
|
|
1577
|
-
b =
|
|
1585
|
+
b = $a(b, function(...h) {
|
|
1578
1586
|
d.o.wa.forEach(function(l) {
|
|
1579
1587
|
if (this[l] === f[l]) {
|
|
1580
|
-
throw new
|
|
1588
|
+
throw new db(`Pure virtual function ${l} must be implemented in JavaScript`);
|
|
1581
1589
|
}
|
|
1582
1590
|
}.bind(this));
|
|
1583
1591
|
Object.defineProperty(this, "__parent", {value:e});
|
|
@@ -1585,50 +1593,50 @@ var Qc = {_abort_js:() => {
|
|
|
1585
1593
|
});
|
|
1586
1594
|
e.__construct = function(...h) {
|
|
1587
1595
|
if (this === e) {
|
|
1588
|
-
throw new
|
|
1596
|
+
throw new O("Pass correct 'this' to __construct");
|
|
1589
1597
|
}
|
|
1590
1598
|
h = m.implement(this, ...h);
|
|
1591
|
-
|
|
1599
|
+
pb(h);
|
|
1592
1600
|
var l = h.g;
|
|
1593
1601
|
h.notifyOnDestruction();
|
|
1594
1602
|
l.O = !0;
|
|
1595
1603
|
Object.defineProperties(this, {g:{value:l}});
|
|
1596
|
-
|
|
1604
|
+
Ab(this);
|
|
1597
1605
|
h = l.i;
|
|
1598
|
-
h =
|
|
1599
|
-
if (
|
|
1600
|
-
throw new
|
|
1606
|
+
h = jb(d, h);
|
|
1607
|
+
if (ib.hasOwnProperty(h)) {
|
|
1608
|
+
throw new O(`Tried to register registered instance: ${h}`);
|
|
1601
1609
|
}
|
|
1602
|
-
|
|
1610
|
+
ib[h] = this;
|
|
1603
1611
|
};
|
|
1604
1612
|
e.__destruct = function() {
|
|
1605
1613
|
if (this === e) {
|
|
1606
|
-
throw new
|
|
1614
|
+
throw new O("Pass correct 'this' to __destruct");
|
|
1607
1615
|
}
|
|
1608
|
-
|
|
1616
|
+
pb(this);
|
|
1609
1617
|
var h = this.g.i;
|
|
1610
|
-
h =
|
|
1611
|
-
if (
|
|
1612
|
-
delete
|
|
1618
|
+
h = jb(d, h);
|
|
1619
|
+
if (ib.hasOwnProperty(h)) {
|
|
1620
|
+
delete ib[h];
|
|
1613
1621
|
} else {
|
|
1614
|
-
throw new
|
|
1622
|
+
throw new O(`Tried to unregister unregistered instance: ${h}`);
|
|
1615
1623
|
}
|
|
1616
1624
|
};
|
|
1617
1625
|
b.prototype = Object.create(e);
|
|
1618
1626
|
Object.assign(b.prototype, c);
|
|
1619
|
-
return
|
|
1627
|
+
return bb(b);
|
|
1620
1628
|
}, _embind_finalize_value_object:b => {
|
|
1621
|
-
var a =
|
|
1622
|
-
delete
|
|
1629
|
+
var a = Cb[b];
|
|
1630
|
+
delete Cb[b];
|
|
1623
1631
|
var c = a.fa, d = a.D, e = a.sa, f = e.map(m => m.Ua).concat(e.map(m => m.eb));
|
|
1624
1632
|
X([b], f, m => {
|
|
1625
1633
|
var h = {};
|
|
1626
1634
|
e.forEach((l, n) => {
|
|
1627
|
-
var r = m[n], w = l.Sa,
|
|
1628
|
-
h[l.Oa] = {read:
|
|
1635
|
+
var r = m[n], w = l.Sa, z = l.Ta, g = m[n + e.length], t = l.cb, q = l.fb;
|
|
1636
|
+
h[l.Oa] = {read:G => r.fromWireType(w(z, G)), write:(G, F) => {
|
|
1629
1637
|
var v = [];
|
|
1630
|
-
t(q,
|
|
1631
|
-
|
|
1638
|
+
t(q, G, g.toWireType(v, F));
|
|
1639
|
+
Db(v);
|
|
1632
1640
|
}};
|
|
1633
1641
|
});
|
|
1634
1642
|
return [{name:a.name, fromWireType:l => {
|
|
@@ -1650,84 +1658,84 @@ var Qc = {_abort_js:() => {
|
|
|
1650
1658
|
}
|
|
1651
1659
|
null !== l && l.push(d, w);
|
|
1652
1660
|
return w;
|
|
1653
|
-
}, argPackAdvance:8, readValueFromPointer:
|
|
1661
|
+
}, argPackAdvance:8, readValueFromPointer:Eb, B:d,}];
|
|
1654
1662
|
});
|
|
1655
1663
|
}, _embind_register_bigint:() => {
|
|
1656
1664
|
}, _embind_register_bool:(b, a, c, d) => {
|
|
1657
|
-
a =
|
|
1658
|
-
|
|
1665
|
+
a = S(a);
|
|
1666
|
+
Hb(b, {name:a, fromWireType:function(e) {
|
|
1659
1667
|
return !!e;
|
|
1660
1668
|
}, toWireType:function(e, f) {
|
|
1661
1669
|
return f ? c : d;
|
|
1662
1670
|
}, argPackAdvance:8, readValueFromPointer:function(e) {
|
|
1663
1671
|
return this.fromWireType(J[e]);
|
|
1664
1672
|
}, B:null,});
|
|
1665
|
-
}, _embind_register_class:(b, a, c, d, e, f, m, h, l, n, r, w,
|
|
1666
|
-
r =
|
|
1673
|
+
}, _embind_register_class:(b, a, c, d, e, f, m, h, l, n, r, w, z) => {
|
|
1674
|
+
r = S(r);
|
|
1667
1675
|
f = Y(e, f);
|
|
1668
1676
|
h &&= Y(m, h);
|
|
1669
1677
|
n &&= Y(l, n);
|
|
1670
|
-
|
|
1671
|
-
var g =
|
|
1672
|
-
|
|
1673
|
-
|
|
1678
|
+
z = Y(w, z);
|
|
1679
|
+
var g = Nb(r);
|
|
1680
|
+
Mb(g, function() {
|
|
1681
|
+
bc(`Cannot construct ${r} due to unbound types`, [d]);
|
|
1674
1682
|
});
|
|
1675
1683
|
X([b, a, c], d ? [d] : [], t => {
|
|
1676
1684
|
t = t[0];
|
|
1677
1685
|
if (d) {
|
|
1678
1686
|
var q = t.h;
|
|
1679
|
-
var
|
|
1687
|
+
var G = q.C;
|
|
1680
1688
|
} else {
|
|
1681
|
-
|
|
1689
|
+
G = Kb.prototype;
|
|
1682
1690
|
}
|
|
1683
|
-
t =
|
|
1684
|
-
if (Object.getPrototypeOf(this) !==
|
|
1685
|
-
throw new
|
|
1691
|
+
t = $a(r, function(...L) {
|
|
1692
|
+
if (Object.getPrototypeOf(this) !== F) {
|
|
1693
|
+
throw new O("Use 'new' to construct " + r);
|
|
1686
1694
|
}
|
|
1687
1695
|
if (void 0 === v.I) {
|
|
1688
|
-
throw new
|
|
1696
|
+
throw new O(r + " has no accessible constructor");
|
|
1689
1697
|
}
|
|
1690
|
-
var
|
|
1691
|
-
if (void 0 ===
|
|
1692
|
-
throw new
|
|
1698
|
+
var Q = v.I[L.length];
|
|
1699
|
+
if (void 0 === Q) {
|
|
1700
|
+
throw new O(`Tried to invoke ctor of ${r} with invalid number of parameters (${L.length}) - expected (${Object.keys(v.I).toString()}) parameters instead!`);
|
|
1693
1701
|
}
|
|
1694
|
-
return
|
|
1702
|
+
return Q.apply(this, L);
|
|
1695
1703
|
});
|
|
1696
|
-
var
|
|
1697
|
-
t.prototype =
|
|
1698
|
-
var v = new
|
|
1704
|
+
var F = Object.create(G, {constructor:{value:t},});
|
|
1705
|
+
t.prototype = F;
|
|
1706
|
+
var v = new Ob(r, t, F, z, q, f, h, n);
|
|
1699
1707
|
if (v.o) {
|
|
1700
|
-
var
|
|
1701
|
-
(
|
|
1708
|
+
var H;
|
|
1709
|
+
(H = v.o).T ?? (H.T = []);
|
|
1702
1710
|
v.o.T.push(v);
|
|
1703
1711
|
}
|
|
1704
|
-
q = new
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
return [q,
|
|
1712
|
+
q = new Ub(r, v, !0, !1, !1);
|
|
1713
|
+
H = new Ub(r + "*", v, !1, !1, !1);
|
|
1714
|
+
G = new Ub(r + " const*", v, !1, !0, !1);
|
|
1715
|
+
sb[b] = {pointerType:H, Ha:G};
|
|
1716
|
+
Vb(g, t);
|
|
1717
|
+
return [q, H, G];
|
|
1710
1718
|
});
|
|
1711
1719
|
}, _embind_register_class_class_function:(b, a, c, d, e, f, m) => {
|
|
1712
|
-
var h =
|
|
1713
|
-
a =
|
|
1714
|
-
a =
|
|
1720
|
+
var h = ec(c, d);
|
|
1721
|
+
a = S(a);
|
|
1722
|
+
a = fc(a);
|
|
1715
1723
|
f = Y(e, f);
|
|
1716
1724
|
X([], [b], l => {
|
|
1717
1725
|
function n() {
|
|
1718
|
-
|
|
1726
|
+
bc(`Cannot call ${r} due to unbound types`, h);
|
|
1719
1727
|
}
|
|
1720
1728
|
l = l[0];
|
|
1721
1729
|
var r = `${l.name}.${a}`;
|
|
1722
1730
|
a.startsWith("@@") && (a = Symbol[a.substring(2)]);
|
|
1723
1731
|
var w = l.h.constructor;
|
|
1724
|
-
void 0 === w[a] ? (n.L = c - 1, w[a] = n) : (
|
|
1725
|
-
X([], h,
|
|
1726
|
-
|
|
1727
|
-
void 0 === w[a].l ? (
|
|
1732
|
+
void 0 === w[a] ? (n.L = c - 1, w[a] = n) : (Lb(w, a, r), w[a].l[c - 1] = n);
|
|
1733
|
+
X([], h, z => {
|
|
1734
|
+
z = dc(r, [z[0], null].concat(z.slice(1)), null, f, m);
|
|
1735
|
+
void 0 === w[a].l ? (z.L = c - 1, w[a] = z) : w[a].l[c - 1] = z;
|
|
1728
1736
|
if (l.h.T) {
|
|
1729
1737
|
for (const g of l.h.T) {
|
|
1730
|
-
g.constructor.hasOwnProperty(a) || (g.constructor[a] =
|
|
1738
|
+
g.constructor.hasOwnProperty(a) || (g.constructor[a] = z);
|
|
1731
1739
|
}
|
|
1732
1740
|
}
|
|
1733
1741
|
return [];
|
|
@@ -1735,100 +1743,100 @@ var Qc = {_abort_js:() => {
|
|
|
1735
1743
|
return [];
|
|
1736
1744
|
});
|
|
1737
1745
|
}, _embind_register_class_class_property:(b, a, c, d, e, f, m, h) => {
|
|
1738
|
-
a =
|
|
1746
|
+
a = S(a);
|
|
1739
1747
|
f = Y(e, f);
|
|
1740
1748
|
X([], [b], l => {
|
|
1741
1749
|
l = l[0];
|
|
1742
1750
|
var n = `${l.name}.${a}`, r = {get() {
|
|
1743
|
-
|
|
1751
|
+
bc(`Cannot access ${n} due to unbound types`, [c]);
|
|
1744
1752
|
}, enumerable:!0, configurable:!0};
|
|
1745
1753
|
r.set = h ? () => {
|
|
1746
|
-
|
|
1754
|
+
bc(`Cannot access ${n} due to unbound types`, [c]);
|
|
1747
1755
|
} : () => {
|
|
1748
|
-
throw new
|
|
1756
|
+
throw new O(`${n} is a read-only property`);
|
|
1749
1757
|
};
|
|
1750
1758
|
Object.defineProperty(l.h.constructor, a, r);
|
|
1751
1759
|
X([], [c], w => {
|
|
1752
1760
|
w = w[0];
|
|
1753
|
-
var
|
|
1761
|
+
var z = {get() {
|
|
1754
1762
|
return w.fromWireType(f(d));
|
|
1755
1763
|
}, enumerable:!0};
|
|
1756
|
-
h && (h = Y(m, h),
|
|
1764
|
+
h && (h = Y(m, h), z.set = g => {
|
|
1757
1765
|
var t = [];
|
|
1758
1766
|
h(d, w.toWireType(t, g));
|
|
1759
|
-
|
|
1767
|
+
Db(t);
|
|
1760
1768
|
});
|
|
1761
|
-
Object.defineProperty(l.h.constructor, a,
|
|
1769
|
+
Object.defineProperty(l.h.constructor, a, z);
|
|
1762
1770
|
return [];
|
|
1763
1771
|
});
|
|
1764
1772
|
return [];
|
|
1765
1773
|
});
|
|
1766
1774
|
}, _embind_register_class_constructor:(b, a, c, d, e, f) => {
|
|
1767
|
-
var m =
|
|
1775
|
+
var m = ec(a, c);
|
|
1768
1776
|
e = Y(d, e);
|
|
1769
1777
|
X([], [b], h => {
|
|
1770
1778
|
h = h[0];
|
|
1771
1779
|
var l = `constructor ${h.name}`;
|
|
1772
1780
|
void 0 === h.h.I && (h.h.I = []);
|
|
1773
1781
|
if (void 0 !== h.h.I[a - 1]) {
|
|
1774
|
-
throw new
|
|
1782
|
+
throw new O(`Cannot register multiple constructors with identical number of parameters (${a - 1}) for class '${h.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);
|
|
1775
1783
|
}
|
|
1776
1784
|
h.h.I[a - 1] = () => {
|
|
1777
|
-
|
|
1785
|
+
bc(`Cannot construct ${h.name} due to unbound types`, m);
|
|
1778
1786
|
};
|
|
1779
1787
|
X([], m, n => {
|
|
1780
1788
|
n.splice(1, 0, null);
|
|
1781
|
-
h.h.I[a - 1] =
|
|
1789
|
+
h.h.I[a - 1] = dc(l, n, null, e, f);
|
|
1782
1790
|
return [];
|
|
1783
1791
|
});
|
|
1784
1792
|
return [];
|
|
1785
1793
|
});
|
|
1786
1794
|
}, _embind_register_class_function:(b, a, c, d, e, f, m, h) => {
|
|
1787
|
-
var l =
|
|
1788
|
-
a =
|
|
1789
|
-
a =
|
|
1795
|
+
var l = ec(c, d);
|
|
1796
|
+
a = S(a);
|
|
1797
|
+
a = fc(a);
|
|
1790
1798
|
f = Y(e, f);
|
|
1791
1799
|
X([], [b], n => {
|
|
1792
1800
|
function r() {
|
|
1793
|
-
|
|
1801
|
+
bc(`Cannot call ${w} due to unbound types`, l);
|
|
1794
1802
|
}
|
|
1795
1803
|
n = n[0];
|
|
1796
1804
|
var w = `${n.name}.${a}`;
|
|
1797
1805
|
a.startsWith("@@") && (a = Symbol[a.substring(2)]);
|
|
1798
1806
|
h && n.h.wa.push(a);
|
|
1799
|
-
var
|
|
1800
|
-
void 0 === g || void 0 === g.l && g.className !== n.name && g.L === c - 2 ? (r.L = c - 2, r.className = n.name,
|
|
1807
|
+
var z = n.h.C, g = z[a];
|
|
1808
|
+
void 0 === g || void 0 === g.l && g.className !== n.name && g.L === c - 2 ? (r.L = c - 2, r.className = n.name, z[a] = r) : (Lb(z, a, w), z[a].l[c - 2] = r);
|
|
1801
1809
|
X([], l, t => {
|
|
1802
|
-
t =
|
|
1803
|
-
void 0 ===
|
|
1810
|
+
t = dc(w, t, n, f, m);
|
|
1811
|
+
void 0 === z[a].l ? (t.L = c - 2, z[a] = t) : z[a].l[c - 2] = t;
|
|
1804
1812
|
return [];
|
|
1805
1813
|
});
|
|
1806
1814
|
return [];
|
|
1807
1815
|
});
|
|
1808
1816
|
}, _embind_register_class_property:(b, a, c, d, e, f, m, h, l, n) => {
|
|
1809
|
-
a =
|
|
1817
|
+
a = S(a);
|
|
1810
1818
|
e = Y(d, e);
|
|
1811
1819
|
X([], [b], r => {
|
|
1812
1820
|
r = r[0];
|
|
1813
|
-
var w = `${r.name}.${a}`,
|
|
1814
|
-
|
|
1821
|
+
var w = `${r.name}.${a}`, z = {get() {
|
|
1822
|
+
bc(`Cannot access ${w} due to unbound types`, [c, m]);
|
|
1815
1823
|
}, enumerable:!0, configurable:!0};
|
|
1816
|
-
|
|
1817
|
-
throw new
|
|
1824
|
+
z.set = l ? () => bc(`Cannot access ${w} due to unbound types`, [c, m]) : () => {
|
|
1825
|
+
throw new O(w + " is a read-only property");
|
|
1818
1826
|
};
|
|
1819
|
-
Object.defineProperty(r.h.C, a,
|
|
1827
|
+
Object.defineProperty(r.h.C, a, z);
|
|
1820
1828
|
X([], l ? [c, m] : [c], g => {
|
|
1821
1829
|
var t = g[0], q = {get() {
|
|
1822
|
-
var
|
|
1823
|
-
return t.fromWireType(e(f,
|
|
1830
|
+
var F = gc(this, r, w + " getter");
|
|
1831
|
+
return t.fromWireType(e(f, F));
|
|
1824
1832
|
}, enumerable:!0};
|
|
1825
1833
|
if (l) {
|
|
1826
1834
|
l = Y(h, l);
|
|
1827
|
-
var
|
|
1828
|
-
q.set = function(
|
|
1829
|
-
var v =
|
|
1830
|
-
l(n, v,
|
|
1831
|
-
|
|
1835
|
+
var G = g[1];
|
|
1836
|
+
q.set = function(F) {
|
|
1837
|
+
var v = gc(this, r, w + " setter"), H = [];
|
|
1838
|
+
l(n, v, G.toWireType(H, F));
|
|
1839
|
+
Db(H);
|
|
1832
1840
|
};
|
|
1833
1841
|
}
|
|
1834
1842
|
Object.defineProperty(r.h.C, a, q);
|
|
@@ -1836,40 +1844,40 @@ var Qc = {_abort_js:() => {
|
|
|
1836
1844
|
});
|
|
1837
1845
|
return [];
|
|
1838
1846
|
});
|
|
1839
|
-
}, _embind_register_emval:b =>
|
|
1847
|
+
}, _embind_register_emval:b => Hb(b, ic), _embind_register_enum:(b, a, c, d) => {
|
|
1840
1848
|
function e() {
|
|
1841
1849
|
}
|
|
1842
|
-
a =
|
|
1850
|
+
a = S(a);
|
|
1843
1851
|
e.values = {};
|
|
1844
|
-
|
|
1852
|
+
Hb(b, {name:a, constructor:e, fromWireType:function(f) {
|
|
1845
1853
|
return this.constructor.values[f];
|
|
1846
|
-
}, toWireType:(f, m) => m.value, argPackAdvance:8, readValueFromPointer:
|
|
1847
|
-
|
|
1854
|
+
}, toWireType:(f, m) => m.value, argPackAdvance:8, readValueFromPointer:jc(a, c, d), B:null,});
|
|
1855
|
+
Mb(a, e);
|
|
1848
1856
|
}, _embind_register_enum_value:(b, a, c) => {
|
|
1849
|
-
var d =
|
|
1850
|
-
a =
|
|
1857
|
+
var d = ob(b, "enum");
|
|
1858
|
+
a = S(a);
|
|
1851
1859
|
b = d.constructor;
|
|
1852
|
-
d = Object.create(d.constructor.prototype, {value:{value:c}, constructor:{value
|
|
1860
|
+
d = Object.create(d.constructor.prototype, {value:{value:c}, constructor:{value:$a(`${d.name}_${a}`, function() {
|
|
1853
1861
|
})},});
|
|
1854
1862
|
b.values[c] = d;
|
|
1855
1863
|
b[a] = d;
|
|
1856
1864
|
}, _embind_register_float:(b, a, c) => {
|
|
1857
|
-
a =
|
|
1858
|
-
|
|
1865
|
+
a = S(a);
|
|
1866
|
+
Hb(b, {name:a, fromWireType:d => d, toWireType:(d, e) => e, argPackAdvance:8, readValueFromPointer:kc(a, c), B:null,});
|
|
1859
1867
|
}, _embind_register_function:(b, a, c, d, e, f) => {
|
|
1860
|
-
var m =
|
|
1861
|
-
b =
|
|
1862
|
-
b =
|
|
1868
|
+
var m = ec(a, c);
|
|
1869
|
+
b = S(b);
|
|
1870
|
+
b = fc(b);
|
|
1863
1871
|
e = Y(d, e);
|
|
1864
|
-
|
|
1865
|
-
|
|
1872
|
+
Mb(b, function() {
|
|
1873
|
+
bc(`Cannot call ${b} due to unbound types`, m);
|
|
1866
1874
|
}, a - 1);
|
|
1867
1875
|
X([], m, h => {
|
|
1868
|
-
|
|
1876
|
+
Vb(b, dc(b, [h[0], null].concat(h.slice(1)), null, e, f), a - 1);
|
|
1869
1877
|
return [];
|
|
1870
1878
|
});
|
|
1871
1879
|
}, _embind_register_integer:(b, a, c, d, e) => {
|
|
1872
|
-
a =
|
|
1880
|
+
a = S(a);
|
|
1873
1881
|
-1 === e && (e = 4294967295);
|
|
1874
1882
|
e = h => h;
|
|
1875
1883
|
if (0 === d) {
|
|
@@ -1881,24 +1889,24 @@ var Qc = {_abort_js:() => {
|
|
|
1881
1889
|
} : function(h, l) {
|
|
1882
1890
|
return l;
|
|
1883
1891
|
};
|
|
1884
|
-
|
|
1892
|
+
Hb(b, {name:a, fromWireType:e, toWireType:m, argPackAdvance:8, readValueFromPointer:lc(a, c, 0 !== d), B:null,});
|
|
1885
1893
|
}, _embind_register_memory_view:(b, a, c) => {
|
|
1886
1894
|
function d(f) {
|
|
1887
|
-
return new e(
|
|
1895
|
+
return new e(Ea.buffer, M[f + 4 >> 2], M[f >> 2]);
|
|
1888
1896
|
}
|
|
1889
1897
|
var e = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array,][a];
|
|
1890
|
-
c =
|
|
1891
|
-
|
|
1898
|
+
c = S(c);
|
|
1899
|
+
Hb(b, {name:c, fromWireType:d, argPackAdvance:8, readValueFromPointer:d,}, {Va:!0,});
|
|
1892
1900
|
}, _embind_register_std_string:(b, a) => {
|
|
1893
|
-
a =
|
|
1901
|
+
a = S(a);
|
|
1894
1902
|
var c = "std::string" === a;
|
|
1895
|
-
|
|
1896
|
-
var e =
|
|
1903
|
+
Hb(b, {name:a, fromWireType:function(d) {
|
|
1904
|
+
var e = M[d >> 2], f = d + 4;
|
|
1897
1905
|
if (c) {
|
|
1898
1906
|
for (var m = f, h = 0; h <= e; ++h) {
|
|
1899
1907
|
var l = f + h;
|
|
1900
1908
|
if (h == e || 0 == J[l]) {
|
|
1901
|
-
m = m ?
|
|
1909
|
+
m = m ? sc(J, m, l - m) : "";
|
|
1902
1910
|
if (void 0 === n) {
|
|
1903
1911
|
var n = m;
|
|
1904
1912
|
} else {
|
|
@@ -1914,25 +1922,25 @@ var Qc = {_abort_js:() => {
|
|
|
1914
1922
|
}
|
|
1915
1923
|
n = n.join("");
|
|
1916
1924
|
}
|
|
1917
|
-
|
|
1925
|
+
mb(d);
|
|
1918
1926
|
return n;
|
|
1919
1927
|
}, toWireType:function(d, e) {
|
|
1920
1928
|
e instanceof ArrayBuffer && (e = new Uint8Array(e));
|
|
1921
1929
|
var f = "string" == typeof e;
|
|
1922
1930
|
if (!(f || e instanceof Uint8Array || e instanceof Uint8ClampedArray || e instanceof Int8Array)) {
|
|
1923
|
-
throw new
|
|
1931
|
+
throw new O("Cannot pass non-string to std::string");
|
|
1924
1932
|
}
|
|
1925
|
-
var m = c && f ?
|
|
1926
|
-
var h =
|
|
1927
|
-
|
|
1933
|
+
var m = c && f ? nc(e) : e.length;
|
|
1934
|
+
var h = Sc(4 + m + 1), l = h + 4;
|
|
1935
|
+
M[h >> 2] = m;
|
|
1928
1936
|
if (c && f) {
|
|
1929
|
-
|
|
1937
|
+
mc(e, J, l, m + 1);
|
|
1930
1938
|
} else {
|
|
1931
1939
|
if (f) {
|
|
1932
1940
|
for (f = 0; f < m; ++f) {
|
|
1933
1941
|
var n = e.charCodeAt(f);
|
|
1934
1942
|
if (255 < n) {
|
|
1935
|
-
throw
|
|
1943
|
+
throw mb(l), new O("String has UTF-16 code units that do not fit in 8 bits");
|
|
1936
1944
|
}
|
|
1937
1945
|
J[l + f] = n;
|
|
1938
1946
|
}
|
|
@@ -1942,94 +1950,94 @@ var Qc = {_abort_js:() => {
|
|
|
1942
1950
|
}
|
|
1943
1951
|
}
|
|
1944
1952
|
}
|
|
1945
|
-
null !== d && d.push(
|
|
1953
|
+
null !== d && d.push(mb, h);
|
|
1946
1954
|
return h;
|
|
1947
|
-
}, argPackAdvance:8, readValueFromPointer:
|
|
1948
|
-
|
|
1955
|
+
}, argPackAdvance:8, readValueFromPointer:Eb, B(d) {
|
|
1956
|
+
mb(d);
|
|
1949
1957
|
},});
|
|
1950
1958
|
}, _embind_register_std_wstring:(b, a, c) => {
|
|
1951
|
-
c =
|
|
1959
|
+
c = S(c);
|
|
1952
1960
|
if (2 === a) {
|
|
1953
|
-
var d =
|
|
1954
|
-
var e =
|
|
1955
|
-
var f =
|
|
1956
|
-
var m = h =>
|
|
1961
|
+
var d = uc;
|
|
1962
|
+
var e = vc;
|
|
1963
|
+
var f = wc;
|
|
1964
|
+
var m = h => Ga[h >> 1];
|
|
1957
1965
|
} else {
|
|
1958
|
-
4 === a && (d =
|
|
1966
|
+
4 === a && (d = xc, e = yc, f = zc, m = h => M[h >> 2]);
|
|
1959
1967
|
}
|
|
1960
|
-
|
|
1961
|
-
for (var l =
|
|
1962
|
-
var
|
|
1963
|
-
if (w == l || 0 == m(
|
|
1964
|
-
r = d(r,
|
|
1968
|
+
Hb(b, {name:c, fromWireType:h => {
|
|
1969
|
+
for (var l = M[h >> 2], n, r = h + 4, w = 0; w <= l; ++w) {
|
|
1970
|
+
var z = h + 4 + w * a;
|
|
1971
|
+
if (w == l || 0 == m(z)) {
|
|
1972
|
+
r = d(r, z - r), void 0 === n ? n = r : (n += String.fromCharCode(0), n += r), r = z + a;
|
|
1965
1973
|
}
|
|
1966
1974
|
}
|
|
1967
|
-
|
|
1975
|
+
mb(h);
|
|
1968
1976
|
return n;
|
|
1969
1977
|
}, toWireType:(h, l) => {
|
|
1970
1978
|
if ("string" != typeof l) {
|
|
1971
|
-
throw new
|
|
1979
|
+
throw new O(`Cannot pass non-string to C++ string type ${c}`);
|
|
1972
1980
|
}
|
|
1973
|
-
var n = f(l), r =
|
|
1974
|
-
|
|
1981
|
+
var n = f(l), r = Sc(4 + n + a);
|
|
1982
|
+
M[r >> 2] = n / a;
|
|
1975
1983
|
e(l, r + 4, n + a);
|
|
1976
|
-
null !== h && h.push(
|
|
1984
|
+
null !== h && h.push(mb, r);
|
|
1977
1985
|
return r;
|
|
1978
|
-
}, argPackAdvance:8, readValueFromPointer:
|
|
1979
|
-
|
|
1986
|
+
}, argPackAdvance:8, readValueFromPointer:Eb, B(h) {
|
|
1987
|
+
mb(h);
|
|
1980
1988
|
}});
|
|
1981
1989
|
}, _embind_register_value_object:(b, a, c, d, e, f) => {
|
|
1982
|
-
|
|
1990
|
+
Cb[b] = {name:S(a), fa:Y(c, d), D:Y(e, f), sa:[],};
|
|
1983
1991
|
}, _embind_register_value_object_field:(b, a, c, d, e, f, m, h, l, n) => {
|
|
1984
|
-
|
|
1992
|
+
Cb[b].sa.push({Oa:S(a), Ua:c, Sa:Y(d, e), Ta:f, eb:m, cb:Y(h, l), fb:n,});
|
|
1985
1993
|
}, _embind_register_void:(b, a) => {
|
|
1986
|
-
a =
|
|
1987
|
-
|
|
1994
|
+
a = S(a);
|
|
1995
|
+
Hb(b, {mb:!0, name:a, argPackAdvance:0, fromWireType:() => {
|
|
1988
1996
|
}, toWireType:() => {
|
|
1989
1997
|
},});
|
|
1990
1998
|
}, _emscripten_get_now_is_monotonic:() => 1, _emscripten_memcpy_js:(b, a, c) => J.copyWithin(b, a, a + c), _emval_as:(b, a, c) => {
|
|
1991
|
-
b =
|
|
1992
|
-
a =
|
|
1993
|
-
return
|
|
1999
|
+
b = R(b);
|
|
2000
|
+
a = ob(a, "emval::as");
|
|
2001
|
+
return Ac(a, c, b);
|
|
1994
2002
|
}, _emval_call_method:(b, a, c, d, e) => {
|
|
1995
|
-
b =
|
|
1996
|
-
a =
|
|
1997
|
-
c =
|
|
2003
|
+
b = Dc[b];
|
|
2004
|
+
a = R(a);
|
|
2005
|
+
c = Cc(c);
|
|
1998
2006
|
return b(a, a[c], d, e);
|
|
1999
|
-
}, _emval_decref:
|
|
2000
|
-
var d =
|
|
2007
|
+
}, _emval_decref:hc, _emval_get_method_caller:(b, a, c) => {
|
|
2008
|
+
var d = Fc(b, a), e = d.shift();
|
|
2001
2009
|
b--;
|
|
2002
2010
|
var f = Array(b);
|
|
2003
2011
|
a = `methodCaller<(${d.map(m => m.name).join(", ")}) => ${e.name}>`;
|
|
2004
|
-
return
|
|
2012
|
+
return Ec($a(a, (m, h, l, n) => {
|
|
2005
2013
|
for (var r = 0, w = 0; w < b; ++w) {
|
|
2006
2014
|
f[w] = d[w].readValueFromPointer(n + r), r += d[w].argPackAdvance;
|
|
2007
2015
|
}
|
|
2008
|
-
m = 1 === c ?
|
|
2009
|
-
return
|
|
2016
|
+
m = 1 === c ? Gc(h, f) : h.apply(m, f);
|
|
2017
|
+
return Ac(e, l, m);
|
|
2010
2018
|
}));
|
|
2011
2019
|
}, _emval_get_module_property:b => {
|
|
2012
|
-
b =
|
|
2013
|
-
return
|
|
2020
|
+
b = Cc(b);
|
|
2021
|
+
return bb(k[b]);
|
|
2014
2022
|
}, _emval_get_property:(b, a) => {
|
|
2015
|
-
b =
|
|
2016
|
-
a =
|
|
2017
|
-
return
|
|
2023
|
+
b = R(b);
|
|
2024
|
+
a = R(a);
|
|
2025
|
+
return bb(b[a]);
|
|
2018
2026
|
}, _emval_incref:b => {
|
|
2019
|
-
9 < b && (
|
|
2020
|
-
}, _emval_new_array:() =>
|
|
2021
|
-
var a =
|
|
2022
|
-
|
|
2023
|
-
|
|
2027
|
+
9 < b && (N[b + 1] += 1);
|
|
2028
|
+
}, _emval_new_array:() => bb([]), _emval_new_cstring:b => bb(Cc(b)), _emval_new_object:() => bb({}), _emval_run_destructors:b => {
|
|
2029
|
+
var a = R(b);
|
|
2030
|
+
Db(a);
|
|
2031
|
+
hc(b);
|
|
2024
2032
|
}, _emval_set_property:(b, a, c) => {
|
|
2025
|
-
b =
|
|
2026
|
-
a =
|
|
2027
|
-
c =
|
|
2033
|
+
b = R(b);
|
|
2034
|
+
a = R(a);
|
|
2035
|
+
c = R(c);
|
|
2028
2036
|
b[a] = c;
|
|
2029
2037
|
}, _emval_take_value:(b, a) => {
|
|
2030
|
-
b =
|
|
2038
|
+
b = ob(b, "_emval_take_value");
|
|
2031
2039
|
b = b.readValueFromPointer(a);
|
|
2032
|
-
return
|
|
2040
|
+
return bb(b);
|
|
2033
2041
|
}, emscripten_date_now:() => Date.now(), emscripten_get_now:() => performance.now(), emscripten_resize_heap:b => {
|
|
2034
2042
|
var a = J.length;
|
|
2035
2043
|
b >>>= 0;
|
|
@@ -2042,9 +2050,9 @@ var Qc = {_abort_js:() => {
|
|
|
2042
2050
|
var e = Math;
|
|
2043
2051
|
d = Math.max(b, d);
|
|
2044
2052
|
a: {
|
|
2045
|
-
e = (e.min.call(e, 2147483648, d + (65536 - d % 65536) % 65536) -
|
|
2053
|
+
e = (e.min.call(e, 2147483648, d + (65536 - d % 65536) % 65536) - Ca.buffer.byteLength + 65535) / 65536;
|
|
2046
2054
|
try {
|
|
2047
|
-
|
|
2055
|
+
Ca.grow(e);
|
|
2048
2056
|
Ja();
|
|
2049
2057
|
var f = 1;
|
|
2050
2058
|
break a;
|
|
@@ -2059,79 +2067,79 @@ var Qc = {_abort_js:() => {
|
|
|
2059
2067
|
return !1;
|
|
2060
2068
|
}, environ_get:(b, a) => {
|
|
2061
2069
|
var c = 0;
|
|
2062
|
-
|
|
2070
|
+
Jc().forEach((d, e) => {
|
|
2063
2071
|
var f = a + c;
|
|
2064
|
-
e =
|
|
2072
|
+
e = M[b + 4 * e >> 2] = f;
|
|
2065
2073
|
for (f = 0; f < d.length; ++f) {
|
|
2066
|
-
|
|
2074
|
+
Ea[e++] = d.charCodeAt(f);
|
|
2067
2075
|
}
|
|
2068
|
-
|
|
2076
|
+
Ea[e] = 0;
|
|
2069
2077
|
c += d.length + 1;
|
|
2070
2078
|
});
|
|
2071
2079
|
return 0;
|
|
2072
2080
|
}, environ_sizes_get:(b, a) => {
|
|
2073
|
-
var c =
|
|
2074
|
-
|
|
2081
|
+
var c = Jc();
|
|
2082
|
+
M[b >> 2] = c.length;
|
|
2075
2083
|
var d = 0;
|
|
2076
2084
|
c.forEach(e => d += e.length + 1);
|
|
2077
|
-
|
|
2085
|
+
M[a >> 2] = d;
|
|
2078
2086
|
return 0;
|
|
2079
2087
|
}, fd_close:() => 52, fd_seek:function() {
|
|
2080
2088
|
return 70;
|
|
2081
2089
|
}, fd_write:(b, a, c, d) => {
|
|
2082
2090
|
for (var e = 0, f = 0; f < c; f++) {
|
|
2083
|
-
var m =
|
|
2091
|
+
var m = M[a >> 2], h = M[a + 4 >> 2];
|
|
2084
2092
|
a += 8;
|
|
2085
2093
|
for (var l = 0; l < h; l++) {
|
|
2086
|
-
var n = J[m + l], r =
|
|
2087
|
-
0 === n || 10 === n ? ((1 === b ?
|
|
2094
|
+
var n = J[m + l], r = Kc[b];
|
|
2095
|
+
0 === n || 10 === n ? ((1 === b ? za : Aa)(sc(r, 0)), r.length = 0) : r.push(n);
|
|
2088
2096
|
}
|
|
2089
2097
|
e += h;
|
|
2090
2098
|
}
|
|
2091
|
-
|
|
2099
|
+
M[d >> 2] = e;
|
|
2092
2100
|
return 0;
|
|
2093
|
-
}, strftime_l:(b, a, c, d) =>
|
|
2101
|
+
}, strftime_l:(b, a, c, d) => Pc(b, a, c, d)}, Z = function() {
|
|
2094
2102
|
function b(c) {
|
|
2095
2103
|
Z = c.exports;
|
|
2096
|
-
|
|
2104
|
+
Ca = Z.memory;
|
|
2097
2105
|
Ja();
|
|
2098
|
-
|
|
2106
|
+
Xb = Z.__indirect_function_table;
|
|
2099
2107
|
La.unshift(Z.__wasm_call_ctors);
|
|
2100
2108
|
Oa--;
|
|
2101
2109
|
k.monitorRunDependencies?.(Oa);
|
|
2102
2110
|
0 == Oa && (null !== Pa && (clearInterval(Pa), Pa = null), Qa && (c = Qa, Qa = null, c()));
|
|
2103
2111
|
return Z;
|
|
2104
2112
|
}
|
|
2105
|
-
var a = {env:
|
|
2113
|
+
var a = {env:Tc, wasi_snapshot_preview1:Tc,};
|
|
2106
2114
|
Oa++;
|
|
2107
2115
|
k.monitorRunDependencies?.(Oa);
|
|
2108
2116
|
if (k.instantiateWasm) {
|
|
2109
2117
|
try {
|
|
2110
2118
|
return k.instantiateWasm(a, b);
|
|
2111
2119
|
} catch (c) {
|
|
2112
|
-
|
|
2120
|
+
Aa(`Module.instantiateWasm callback failed with error: ${c}`), ba(c);
|
|
2113
2121
|
}
|
|
2114
2122
|
}
|
|
2115
|
-
Ta ||= Sa("canvas_advanced.wasm") ? "canvas_advanced.wasm" : k.locateFile ? k.locateFile("canvas_advanced.wasm",
|
|
2123
|
+
Ta ||= Sa("canvas_advanced.wasm") ? "canvas_advanced.wasm" : k.locateFile ? k.locateFile("canvas_advanced.wasm", y) : y + "canvas_advanced.wasm";
|
|
2116
2124
|
Xa(a, function(c) {
|
|
2117
2125
|
b(c.instance);
|
|
2118
2126
|
}).catch(ba);
|
|
2119
2127
|
return {};
|
|
2120
|
-
}(),
|
|
2128
|
+
}(), mb = b => (mb = Z.free)(b), Sc = b => (Sc = Z.malloc)(b), lb = b => (lb = Z.__getTypeName)(b);
|
|
2121
2129
|
k.dynCall_jiji = (b, a, c, d, e) => (k.dynCall_jiji = Z.dynCall_jiji)(b, a, c, d, e);
|
|
2122
2130
|
k.dynCall_viijii = (b, a, c, d, e, f, m) => (k.dynCall_viijii = Z.dynCall_viijii)(b, a, c, d, e, f, m);
|
|
2123
2131
|
k.dynCall_iiiiij = (b, a, c, d, e, f, m) => (k.dynCall_iiiiij = Z.dynCall_iiiiij)(b, a, c, d, e, f, m);
|
|
2124
2132
|
k.dynCall_iiiiijj = (b, a, c, d, e, f, m, h, l) => (k.dynCall_iiiiijj = Z.dynCall_iiiiijj)(b, a, c, d, e, f, m, h, l);
|
|
2125
2133
|
k.dynCall_iiiiiijj = (b, a, c, d, e, f, m, h, l, n) => (k.dynCall_iiiiiijj = Z.dynCall_iiiiiijj)(b, a, c, d, e, f, m, h, l, n);
|
|
2126
|
-
var
|
|
2127
|
-
Qa = function
|
|
2128
|
-
|
|
2129
|
-
|
|
2134
|
+
var Uc;
|
|
2135
|
+
Qa = function Vc() {
|
|
2136
|
+
Uc || Wc();
|
|
2137
|
+
Uc || (Qa = Vc);
|
|
2130
2138
|
};
|
|
2131
|
-
function
|
|
2139
|
+
function Wc() {
|
|
2132
2140
|
function b() {
|
|
2133
|
-
if (!
|
|
2134
|
-
|
|
2141
|
+
if (!Uc && (Uc = !0, k.calledRun = !0, !Da)) {
|
|
2142
|
+
Za(La);
|
|
2135
2143
|
aa(k);
|
|
2136
2144
|
if (k.onRuntimeInitialized) {
|
|
2137
2145
|
k.onRuntimeInitialized();
|
|
@@ -2142,7 +2150,7 @@ function Tc() {
|
|
|
2142
2150
|
Ma.unshift(a);
|
|
2143
2151
|
}
|
|
2144
2152
|
}
|
|
2145
|
-
|
|
2153
|
+
Za(Ma);
|
|
2146
2154
|
}
|
|
2147
2155
|
}
|
|
2148
2156
|
if (!(0 < Oa)) {
|
|
@@ -2151,7 +2159,7 @@ function Tc() {
|
|
|
2151
2159
|
Na();
|
|
2152
2160
|
}
|
|
2153
2161
|
}
|
|
2154
|
-
|
|
2162
|
+
Za(Ka);
|
|
2155
2163
|
0 < Oa || (k.setStatus ? (k.setStatus("Running..."), setTimeout(function() {
|
|
2156
2164
|
setTimeout(function() {
|
|
2157
2165
|
k.setStatus("");
|
|
@@ -2165,8 +2173,8 @@ if (k.preInit) {
|
|
|
2165
2173
|
k.preInit.pop()();
|
|
2166
2174
|
}
|
|
2167
2175
|
}
|
|
2168
|
-
|
|
2169
|
-
moduleRtn =
|
|
2176
|
+
Wc();
|
|
2177
|
+
moduleRtn = da;
|
|
2170
2178
|
|
|
2171
2179
|
|
|
2172
2180
|
|