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