@rive-app/canvas-lite 2.21.6 → 2.22.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 +6 -2
- package/rive.js +509 -489
- package/rive.js.map +1 -1
- package/rive.wasm +0 -0
- package/rive_advanced.mjs.d.ts +26 -1
- package/rive_fallback.wasm +0 -0
package/rive.js
CHANGED
|
@@ -46,7 +46,7 @@ function ca() {
|
|
|
46
46
|
this.xa();
|
|
47
47
|
e && e.Ta();
|
|
48
48
|
}
|
|
49
|
-
let a = 0, c = 0, d = new Map(), e = null,
|
|
49
|
+
let a = 0, c = 0, d = new Map(), e = null, f = null;
|
|
50
50
|
this.requestAnimationFrame = function(m) {
|
|
51
51
|
a || (a = requestAnimationFrame(b.bind(this)));
|
|
52
52
|
const k = ++c;
|
|
@@ -58,10 +58,10 @@ function ca() {
|
|
|
58
58
|
a && 0 == d.size && (cancelAnimationFrame(a), a = 0);
|
|
59
59
|
};
|
|
60
60
|
this.Ra = function(m) {
|
|
61
|
-
|
|
62
|
-
m || (
|
|
63
|
-
|
|
64
|
-
}, document.body.appendChild(
|
|
61
|
+
f && (document.body.remove(f), f = null);
|
|
62
|
+
m || (f = document.createElement("div"), f.style.backgroundColor = "black", f.style.position = "fixed", f.style.right = 0, f.style.top = 0, f.style.color = "white", f.style.padding = "4px", f.innerHTML = "RIVE FPS", m = function(k) {
|
|
63
|
+
f.innerHTML = "RIVE FPS " + k.toFixed(1);
|
|
64
|
+
}, document.body.appendChild(f));
|
|
65
65
|
e = new function() {
|
|
66
66
|
let k = 0, n = 0;
|
|
67
67
|
this.Ta = function() {
|
|
@@ -71,7 +71,7 @@ function ca() {
|
|
|
71
71
|
}();
|
|
72
72
|
};
|
|
73
73
|
this.Oa = function() {
|
|
74
|
-
|
|
74
|
+
f && (document.body.remove(f), f = null);
|
|
75
75
|
e = null;
|
|
76
76
|
};
|
|
77
77
|
this.xa = function() {
|
|
@@ -96,144 +96,148 @@ const ea = h.onRuntimeInitialized;
|
|
|
96
96
|
h.onRuntimeInitialized = function() {
|
|
97
97
|
ea && ea();
|
|
98
98
|
let b = h.decodeAudio;
|
|
99
|
-
h.decodeAudio = function(
|
|
100
|
-
|
|
101
|
-
e
|
|
99
|
+
h.decodeAudio = function(e, f) {
|
|
100
|
+
e = b(e);
|
|
101
|
+
f(e);
|
|
102
102
|
};
|
|
103
103
|
let a = h.decodeFont;
|
|
104
|
-
h.decodeFont = function(
|
|
105
|
-
|
|
106
|
-
e
|
|
104
|
+
h.decodeFont = function(e, f) {
|
|
105
|
+
e = a(e);
|
|
106
|
+
f(e);
|
|
107
107
|
};
|
|
108
108
|
const c = h.FileAssetLoader;
|
|
109
|
-
h.ptrToAsset =
|
|
110
|
-
let
|
|
111
|
-
return
|
|
109
|
+
h.ptrToAsset = e => {
|
|
110
|
+
let f = h.ptrToFileAsset(e);
|
|
111
|
+
return f.isImage ? h.ptrToImageAsset(e) : f.isFont ? h.ptrToFontAsset(e) : f.isAudio ? h.ptrToAudioAsset(e) : f;
|
|
112
112
|
};
|
|
113
|
-
h.CustomFileAssetLoader = c.extend("CustomFileAssetLoader", {__construct:function({loadContents:
|
|
113
|
+
h.CustomFileAssetLoader = c.extend("CustomFileAssetLoader", {__construct:function({loadContents:e}) {
|
|
114
114
|
this.__parent.__construct.call(this);
|
|
115
|
-
this.Ha =
|
|
116
|
-
}, loadContents:function(
|
|
117
|
-
|
|
118
|
-
return this.Ha(
|
|
115
|
+
this.Ha = e;
|
|
116
|
+
}, loadContents:function(e, f) {
|
|
117
|
+
e = h.ptrToAsset(e);
|
|
118
|
+
return this.Ha(e, f);
|
|
119
119
|
},});
|
|
120
120
|
h.CDNFileAssetLoader = c.extend("CDNFileAssetLoader", {__construct:function() {
|
|
121
121
|
this.__parent.__construct.call(this);
|
|
122
|
-
}, loadContents:function(
|
|
123
|
-
let
|
|
124
|
-
|
|
125
|
-
if ("" ===
|
|
122
|
+
}, loadContents:function(e) {
|
|
123
|
+
let f = h.ptrToAsset(e);
|
|
124
|
+
e = f.cdnUuid;
|
|
125
|
+
if ("" === e) {
|
|
126
126
|
return !1;
|
|
127
127
|
}
|
|
128
|
-
(function(
|
|
129
|
-
var
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
4 ==
|
|
128
|
+
(function(m, k) {
|
|
129
|
+
var n = new XMLHttpRequest();
|
|
130
|
+
n.responseType = "arraybuffer";
|
|
131
|
+
n.onreadystatechange = function() {
|
|
132
|
+
4 == n.readyState && 200 == n.status && k(n);
|
|
133
133
|
};
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
})(
|
|
137
|
-
|
|
134
|
+
n.open("GET", m, !0);
|
|
135
|
+
n.send(null);
|
|
136
|
+
})(f.cdnBaseUrl + "/" + e, m => {
|
|
137
|
+
f.decode(new Uint8Array(m.response));
|
|
138
138
|
});
|
|
139
139
|
return !0;
|
|
140
140
|
},});
|
|
141
141
|
h.FallbackFileAssetLoader = c.extend("FallbackFileAssetLoader", {__construct:function() {
|
|
142
142
|
this.__parent.__construct.call(this);
|
|
143
143
|
this.wa = [];
|
|
144
|
-
}, addLoader:function(
|
|
145
|
-
this.wa.push(
|
|
146
|
-
}, loadContents:function(
|
|
147
|
-
for (let
|
|
148
|
-
if (
|
|
144
|
+
}, addLoader:function(e) {
|
|
145
|
+
this.wa.push(e);
|
|
146
|
+
}, loadContents:function(e, f) {
|
|
147
|
+
for (let m of this.wa) {
|
|
148
|
+
if (m.loadContents(e, f)) {
|
|
149
149
|
return !0;
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
return !1;
|
|
153
153
|
},});
|
|
154
|
+
let d = h.computeAlignment;
|
|
155
|
+
h.computeAlignment = function(e, f, m, k, n = 1.0) {
|
|
156
|
+
return d.call(this, e, f, m, k, n);
|
|
157
|
+
};
|
|
154
158
|
};
|
|
155
159
|
const fa = "createConicGradient createImageData createLinearGradient createPattern createRadialGradient getContextAttributes getImageData getLineDash getTransform isContextLost isPointInPath isPointInStroke measureText".split(" "), ha = new function() {
|
|
156
160
|
function b() {
|
|
157
161
|
if (!a) {
|
|
158
|
-
var
|
|
162
|
+
var g = 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,};
|
|
159
163
|
let q;
|
|
160
164
|
if (/iPhone|iPad|iPod/i.test(navigator.userAgent)) {
|
|
161
|
-
if (q =
|
|
165
|
+
if (q = g.getContext("webgl", r), c = 1, !q) {
|
|
162
166
|
return console.log("No WebGL support. Image mesh will not be drawn."), !1;
|
|
163
167
|
}
|
|
164
168
|
} else {
|
|
165
|
-
if (q =
|
|
169
|
+
if (q = g.getContext("webgl2", r)) {
|
|
166
170
|
c = 2;
|
|
167
171
|
} else {
|
|
168
|
-
if (q =
|
|
172
|
+
if (q = g.getContext("webgl", r)) {
|
|
169
173
|
c = 1;
|
|
170
174
|
} else {
|
|
171
175
|
return console.log("No WebGL support. Image mesh will not be drawn."), !1;
|
|
172
176
|
}
|
|
173
177
|
}
|
|
174
178
|
}
|
|
175
|
-
q = new Proxy(q, {get(D,
|
|
179
|
+
q = new Proxy(q, {get(D, v) {
|
|
176
180
|
if (D.isContextLost()) {
|
|
177
|
-
if (n || (console.error("Cannot render the mesh because the GL Context was lost. Tried to invoke ",
|
|
181
|
+
if (n || (console.error("Cannot render the mesh because the GL Context was lost. Tried to invoke ", v), n = !0), "function" === typeof D[v]) {
|
|
178
182
|
return function() {
|
|
179
183
|
};
|
|
180
184
|
}
|
|
181
185
|
} else {
|
|
182
|
-
return "function" === typeof D[
|
|
183
|
-
return D[
|
|
184
|
-
} : D[
|
|
186
|
+
return "function" === typeof D[v] ? function(...I) {
|
|
187
|
+
return D[v].apply(D, I);
|
|
188
|
+
} : D[v];
|
|
185
189
|
}
|
|
186
|
-
}, set(D,
|
|
190
|
+
}, set(D, v, I) {
|
|
187
191
|
if (D.isContextLost()) {
|
|
188
|
-
n || (console.error("Cannot render the mesh because the GL Context was lost. Tried to set property " +
|
|
192
|
+
n || (console.error("Cannot render the mesh because the GL Context was lost. Tried to set property " + v), n = !0);
|
|
189
193
|
} else {
|
|
190
|
-
return D[
|
|
194
|
+
return D[v] = I, !0;
|
|
191
195
|
}
|
|
192
196
|
},});
|
|
193
197
|
d = Math.min(q.getParameter(q.MAX_RENDERBUFFER_SIZE), q.getParameter(q.MAX_TEXTURE_SIZE));
|
|
194
|
-
function G(D,
|
|
195
|
-
|
|
196
|
-
q.shaderSource(
|
|
197
|
-
q.compileShader(
|
|
198
|
-
I = q.getShaderInfoLog(
|
|
198
|
+
function G(D, v, I) {
|
|
199
|
+
v = q.createShader(v);
|
|
200
|
+
q.shaderSource(v, I);
|
|
201
|
+
q.compileShader(v);
|
|
202
|
+
I = q.getShaderInfoLog(v);
|
|
199
203
|
if (0 < (I || "").length) {
|
|
200
204
|
throw I;
|
|
201
205
|
}
|
|
202
|
-
q.attachShader(D,
|
|
206
|
+
q.attachShader(D, v);
|
|
203
207
|
}
|
|
204
|
-
|
|
205
|
-
G(
|
|
206
|
-
G(
|
|
207
|
-
q.bindAttribLocation(
|
|
208
|
-
q.bindAttribLocation(
|
|
209
|
-
q.linkProgram(
|
|
210
|
-
r = q.getProgramInfoLog(
|
|
208
|
+
g = q.createProgram();
|
|
209
|
+
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 }");
|
|
210
|
+
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 }");
|
|
211
|
+
q.bindAttribLocation(g, 0, "vertex");
|
|
212
|
+
q.bindAttribLocation(g, 1, "uv");
|
|
213
|
+
q.linkProgram(g);
|
|
214
|
+
r = q.getProgramInfoLog(g);
|
|
211
215
|
if (0 < (r || "").trim().length) {
|
|
212
216
|
throw r;
|
|
213
217
|
}
|
|
214
|
-
e = q.getUniformLocation(
|
|
215
|
-
|
|
216
|
-
q.useProgram(
|
|
218
|
+
e = q.getUniformLocation(g, "mat");
|
|
219
|
+
f = q.getUniformLocation(g, "translate");
|
|
220
|
+
q.useProgram(g);
|
|
217
221
|
q.bindBuffer(q.ARRAY_BUFFER, q.createBuffer());
|
|
218
222
|
q.enableVertexAttribArray(0);
|
|
219
223
|
q.enableVertexAttribArray(1);
|
|
220
224
|
q.bindBuffer(q.ELEMENT_ARRAY_BUFFER, q.createBuffer());
|
|
221
|
-
q.uniform1i(q.getUniformLocation(
|
|
225
|
+
q.uniform1i(q.getUniformLocation(g, "image"), 0);
|
|
222
226
|
q.pixelStorei(q.UNPACK_PREMULTIPLY_ALPHA_WEBGL, !0);
|
|
223
227
|
a = q;
|
|
224
228
|
}
|
|
225
229
|
return !0;
|
|
226
230
|
}
|
|
227
|
-
let a = null, c = 0, d = 0, e = null,
|
|
231
|
+
let a = null, c = 0, d = 0, e = null, f = null, m = 0, k = 0, n = !1;
|
|
228
232
|
b();
|
|
229
233
|
this.eb = function() {
|
|
230
234
|
b();
|
|
231
235
|
return d;
|
|
232
236
|
};
|
|
233
|
-
this.Ma = function(
|
|
234
|
-
a.deleteTexture && a.deleteTexture(
|
|
237
|
+
this.Ma = function(g) {
|
|
238
|
+
a.deleteTexture && a.deleteTexture(g);
|
|
235
239
|
};
|
|
236
|
-
this.La = function(
|
|
240
|
+
this.La = function(g) {
|
|
237
241
|
if (!b()) {
|
|
238
242
|
return null;
|
|
239
243
|
}
|
|
@@ -242,40 +246,40 @@ const fa = "createConicGradient createImageData createLinearGradient createPatte
|
|
|
242
246
|
return null;
|
|
243
247
|
}
|
|
244
248
|
a.bindTexture(a.TEXTURE_2D, r);
|
|
245
|
-
a.texImage2D(a.TEXTURE_2D, 0, a.RGBA, a.RGBA, a.UNSIGNED_BYTE,
|
|
249
|
+
a.texImage2D(a.TEXTURE_2D, 0, a.RGBA, a.RGBA, a.UNSIGNED_BYTE, g);
|
|
246
250
|
a.texParameteri(a.TEXTURE_2D, a.TEXTURE_WRAP_S, a.CLAMP_TO_EDGE);
|
|
247
251
|
a.texParameteri(a.TEXTURE_2D, a.TEXTURE_WRAP_T, a.CLAMP_TO_EDGE);
|
|
248
252
|
a.texParameteri(a.TEXTURE_2D, a.TEXTURE_MAG_FILTER, a.LINEAR);
|
|
249
253
|
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);
|
|
250
254
|
return r;
|
|
251
255
|
};
|
|
252
|
-
const l = new da(8), t = new da(8),
|
|
253
|
-
this.Qa = function(
|
|
256
|
+
const l = new da(8), t = new da(8), w = new da(10), x = new da(10);
|
|
257
|
+
this.Qa = function(g, r, q, G, D) {
|
|
254
258
|
if (b()) {
|
|
255
|
-
var
|
|
259
|
+
var v = l.push(g), I = t.push(r);
|
|
256
260
|
if (a.canvas) {
|
|
257
|
-
if (a.canvas.width !=
|
|
258
|
-
a.canvas.width =
|
|
261
|
+
if (a.canvas.width != v || a.canvas.height != I) {
|
|
262
|
+
a.canvas.width = v, a.canvas.height = I;
|
|
259
263
|
}
|
|
260
|
-
a.viewport(0, I - r,
|
|
264
|
+
a.viewport(0, I - r, g, r);
|
|
261
265
|
a.disable(a.SCISSOR_TEST);
|
|
262
266
|
a.clearColor(0, 0, 0, 0);
|
|
263
267
|
a.clear(a.COLOR_BUFFER_BIT);
|
|
264
268
|
a.enable(a.SCISSOR_TEST);
|
|
265
|
-
q.sort((
|
|
266
|
-
|
|
267
|
-
m !=
|
|
268
|
-
|
|
269
|
+
q.sort((C, W) => W.Ba - C.Ba);
|
|
270
|
+
v = w.push(G);
|
|
271
|
+
m != v && (a.bufferData(a.ARRAY_BUFFER, 8 * v, a.DYNAMIC_DRAW), m = v);
|
|
272
|
+
v = 0;
|
|
269
273
|
for (var O of q) {
|
|
270
|
-
a.bufferSubData(a.ARRAY_BUFFER,
|
|
274
|
+
a.bufferSubData(a.ARRAY_BUFFER, v, O.ia), v += 4 * O.ia.length;
|
|
271
275
|
}
|
|
272
|
-
console.assert(
|
|
276
|
+
console.assert(v == 4 * G);
|
|
273
277
|
for (var X of q) {
|
|
274
|
-
a.bufferSubData(a.ARRAY_BUFFER,
|
|
278
|
+
a.bufferSubData(a.ARRAY_BUFFER, v, X.Ea), v += 4 * X.Ea.length;
|
|
275
279
|
}
|
|
276
|
-
console.assert(
|
|
277
|
-
|
|
278
|
-
k !=
|
|
280
|
+
console.assert(v == 8 * G);
|
|
281
|
+
v = x.push(D);
|
|
282
|
+
k != v && (a.bufferData(a.ELEMENT_ARRAY_BUFFER, 2 * v, a.DYNAMIC_DRAW), k = v);
|
|
279
283
|
O = 0;
|
|
280
284
|
for (var ia of q) {
|
|
281
285
|
a.bufferSubData(a.ELEMENT_ARRAY_BUFFER, O, ia.indices), O += 2 * ia.indices.length;
|
|
@@ -283,21 +287,21 @@ const fa = "createConicGradient createImageData createLinearGradient createPatte
|
|
|
283
287
|
console.assert(O == 2 * D);
|
|
284
288
|
ia = 0;
|
|
285
289
|
X = !0;
|
|
286
|
-
|
|
287
|
-
for (const
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
q = 2 /
|
|
290
|
+
v = O = 0;
|
|
291
|
+
for (const C of q) {
|
|
292
|
+
C.image.da != ia && (a.bindTexture(a.TEXTURE_2D, C.image.ca || null), ia = C.image.da);
|
|
293
|
+
C.hb ? (a.scissor(C.na, I - C.oa - C.va, C.sb, C.va), X = !0) : X && (a.scissor(0, I - r, g, r), X = !1);
|
|
294
|
+
q = 2 / g;
|
|
291
295
|
const W = -2 / r;
|
|
292
|
-
a.uniform4f(e,
|
|
293
|
-
a.uniform2f(
|
|
294
|
-
a.vertexAttribPointer(0, 2, a.FLOAT, !1, 0,
|
|
295
|
-
a.vertexAttribPointer(1, 2, a.FLOAT, !1, 0,
|
|
296
|
-
a.drawElements(a.TRIANGLES,
|
|
297
|
-
|
|
298
|
-
O += 2 *
|
|
296
|
+
a.uniform4f(e, C.N[0] * q * C.X, C.N[1] * W * C.Y, C.N[2] * q * C.X, C.N[3] * W * C.Y);
|
|
297
|
+
a.uniform2f(f, C.N[4] * q * C.X + q * (C.na - C.fb * C.X) - 1, C.N[5] * W * C.Y + W * (C.oa - C.gb * C.Y) + 1);
|
|
298
|
+
a.vertexAttribPointer(0, 2, a.FLOAT, !1, 0, v);
|
|
299
|
+
a.vertexAttribPointer(1, 2, a.FLOAT, !1, 0, v + 4 * G);
|
|
300
|
+
a.drawElements(a.TRIANGLES, C.indices.length, a.UNSIGNED_SHORT, O);
|
|
301
|
+
v += 4 * C.ia.length;
|
|
302
|
+
O += 2 * C.indices.length;
|
|
299
303
|
}
|
|
300
|
-
console.assert(
|
|
304
|
+
console.assert(v == 4 * G);
|
|
301
305
|
console.assert(O == 2 * D);
|
|
302
306
|
}
|
|
303
307
|
}
|
|
@@ -347,10 +351,10 @@ h.onRuntimeInitialized = function() {
|
|
|
347
351
|
return "rgba(" + ((16711680 & p) >>> 16) + "," + ((65280 & p) >>> 8) + "," + ((255 & p) >>> 0) + "," + ((4278190080 & p) >>> 24) / 255 + ")";
|
|
348
352
|
}
|
|
349
353
|
function c() {
|
|
350
|
-
0 < I.length && (ha.Qa(
|
|
354
|
+
0 < I.length && (ha.Qa(v.drawWidth(), v.drawHeight(), I, O, X), I = [], X = O = 0, v.reset(512, 512));
|
|
351
355
|
for (const p of D) {
|
|
352
|
-
for (const
|
|
353
|
-
|
|
356
|
+
for (const u of p.u) {
|
|
357
|
+
u();
|
|
354
358
|
}
|
|
355
359
|
p.u = [];
|
|
356
360
|
}
|
|
@@ -358,56 +362,56 @@ h.onRuntimeInitialized = function() {
|
|
|
358
362
|
}
|
|
359
363
|
la && la();
|
|
360
364
|
var d = h.RenderPaintStyle;
|
|
361
|
-
const e = h.RenderPath,
|
|
362
|
-
let
|
|
363
|
-
var r = h.RenderImage.extend("CanvasRenderImage", {__construct:function({R:p, W:
|
|
365
|
+
const e = h.RenderPath, f = h.RenderPaint, m = h.Renderer, k = h.StrokeCap, n = h.StrokeJoin, l = h.BlendMode, t = d.fill, w = d.stroke, x = h.FillRule.evenOdd;
|
|
366
|
+
let g = 1;
|
|
367
|
+
var r = h.RenderImage.extend("CanvasRenderImage", {__construct:function({R:p, W:u} = {}) {
|
|
364
368
|
this.__parent.__construct.call(this);
|
|
365
|
-
this.da =
|
|
366
|
-
|
|
369
|
+
this.da = g;
|
|
370
|
+
g = g + 1 & 2147483647 || 1;
|
|
367
371
|
this.R = p;
|
|
368
|
-
this.W =
|
|
372
|
+
this.W = u;
|
|
369
373
|
}, __destruct:function() {
|
|
370
374
|
this.ca && (ha.Ma(this.ca), URL.revokeObjectURL(this.la));
|
|
371
375
|
this.__parent.__destruct.call(this);
|
|
372
376
|
}, decode:function(p) {
|
|
373
|
-
var
|
|
374
|
-
|
|
375
|
-
var
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
377
|
+
var u = this;
|
|
378
|
+
u.W && u.W(u);
|
|
379
|
+
var A = new Image();
|
|
380
|
+
u.la = URL.createObjectURL(new Blob([p], {type:"image/png",}));
|
|
381
|
+
A.onload = function() {
|
|
382
|
+
u.Ga = A;
|
|
383
|
+
u.ca = ha.La(A);
|
|
384
|
+
u.size(A.width, A.height);
|
|
385
|
+
u.R && u.R(u);
|
|
382
386
|
};
|
|
383
|
-
|
|
387
|
+
A.src = u.la;
|
|
384
388
|
},}), q = e.extend("CanvasRenderPath", {__construct:function() {
|
|
385
389
|
this.__parent.__construct.call(this);
|
|
386
390
|
this.F = new Path2D();
|
|
387
391
|
}, rewind:function() {
|
|
388
392
|
this.F = new Path2D();
|
|
389
|
-
}, addPath:function(p,
|
|
393
|
+
}, addPath:function(p, u, A, B, y, E, F) {
|
|
390
394
|
var H = this.F, T = H.addPath;
|
|
391
395
|
p = p.F;
|
|
392
396
|
const K = new DOMMatrix();
|
|
393
|
-
K.a =
|
|
394
|
-
K.b =
|
|
395
|
-
K.c =
|
|
396
|
-
K.d =
|
|
397
|
+
K.a = u;
|
|
398
|
+
K.b = A;
|
|
399
|
+
K.c = B;
|
|
400
|
+
K.d = y;
|
|
397
401
|
K.e = E;
|
|
398
402
|
K.f = F;
|
|
399
403
|
T.call(H, p, K);
|
|
400
404
|
}, fillRule:function(p) {
|
|
401
405
|
this.ka = p;
|
|
402
|
-
}, moveTo:function(p,
|
|
403
|
-
this.F.moveTo(p,
|
|
404
|
-
}, lineTo:function(p,
|
|
405
|
-
this.F.lineTo(p,
|
|
406
|
-
}, cubicTo:function(p,
|
|
407
|
-
this.F.bezierCurveTo(p,
|
|
406
|
+
}, moveTo:function(p, u) {
|
|
407
|
+
this.F.moveTo(p, u);
|
|
408
|
+
}, lineTo:function(p, u) {
|
|
409
|
+
this.F.lineTo(p, u);
|
|
410
|
+
}, cubicTo:function(p, u, A, B, y, E) {
|
|
411
|
+
this.F.bezierCurveTo(p, u, A, B, y, E);
|
|
408
412
|
}, close:function() {
|
|
409
413
|
this.F.closePath();
|
|
410
|
-
},}), G =
|
|
414
|
+
},}), G = f.extend("CanvasRenderPaint", {color:function(p) {
|
|
411
415
|
this.ma = a(p);
|
|
412
416
|
}, thickness:function(p) {
|
|
413
417
|
this.Ja = p;
|
|
@@ -439,44 +443,44 @@ h.onRuntimeInitialized = function() {
|
|
|
439
443
|
this.Fa = b(p);
|
|
440
444
|
}, clearGradient:function() {
|
|
441
445
|
this.P = null;
|
|
442
|
-
}, linearGradient:function(p,
|
|
443
|
-
this.P = {Ca:p, Da:
|
|
444
|
-
}, radialGradient:function(p,
|
|
445
|
-
this.P = {Ca:p, Da:
|
|
446
|
-
}, addStop:function(p,
|
|
447
|
-
this.P.ga.push({color:p, stop:
|
|
446
|
+
}, linearGradient:function(p, u, A, B) {
|
|
447
|
+
this.P = {Ca:p, Da:u, qa:A, ra:B, ga:[],};
|
|
448
|
+
}, radialGradient:function(p, u, A, B) {
|
|
449
|
+
this.P = {Ca:p, Da:u, qa:A, ra:B, ga:[], bb:!0,};
|
|
450
|
+
}, addStop:function(p, u) {
|
|
451
|
+
this.P.ga.push({color:p, stop:u,});
|
|
448
452
|
}, completeGradient:function() {
|
|
449
|
-
}, draw:function(p,
|
|
450
|
-
let
|
|
451
|
-
var
|
|
453
|
+
}, draw:function(p, u, A) {
|
|
454
|
+
let B = this.Ia;
|
|
455
|
+
var y = this.ma, E = this.P;
|
|
452
456
|
p.globalCompositeOperation = this.Fa;
|
|
453
457
|
if (null != E) {
|
|
454
|
-
|
|
458
|
+
y = E.Ca;
|
|
455
459
|
var F = E.Da;
|
|
456
460
|
const T = E.qa;
|
|
457
461
|
var H = E.ra;
|
|
458
462
|
const K = E.ga;
|
|
459
|
-
E.bb ? (E = T -
|
|
463
|
+
E.bb ? (E = T - y, H -= F, y = p.createRadialGradient(y, F, 0, y, F, Math.sqrt(E * E + H * H))) : y = p.createLinearGradient(y, F, T, H);
|
|
460
464
|
for (let Y = 0, N = K.length; Y < N; Y++) {
|
|
461
|
-
F = K[Y],
|
|
465
|
+
F = K[Y], y.addColorStop(F.stop, a(F.color));
|
|
462
466
|
}
|
|
463
|
-
this.ma =
|
|
467
|
+
this.ma = y;
|
|
464
468
|
this.P = null;
|
|
465
469
|
}
|
|
466
|
-
switch(
|
|
467
|
-
case
|
|
468
|
-
p.strokeStyle =
|
|
470
|
+
switch(B) {
|
|
471
|
+
case w:
|
|
472
|
+
p.strokeStyle = y;
|
|
469
473
|
p.lineWidth = this.Ja;
|
|
470
474
|
p.lineCap = this.aa;
|
|
471
475
|
p.lineJoin = this.ba;
|
|
472
|
-
p.stroke(
|
|
476
|
+
p.stroke(u);
|
|
473
477
|
break;
|
|
474
478
|
case t:
|
|
475
|
-
p.fillStyle =
|
|
479
|
+
p.fillStyle = y, p.fill(u, A);
|
|
476
480
|
}
|
|
477
481
|
},});
|
|
478
482
|
const D = new Set();
|
|
479
|
-
let
|
|
483
|
+
let v = null, I = [], O = 0, X = 0;
|
|
480
484
|
var ia = h.CanvasRenderer = m.extend("Renderer", {__construct:function(p) {
|
|
481
485
|
this.__parent.__construct.call(this);
|
|
482
486
|
this.D = [1, 0, 0, 1, 0, 0];
|
|
@@ -493,33 +497,33 @@ h.onRuntimeInitialized = function() {
|
|
|
493
497
|
}
|
|
494
498
|
this.D.splice(p);
|
|
495
499
|
this.u.push(this.o.restore.bind(this.o));
|
|
496
|
-
}, transform:function(p,
|
|
500
|
+
}, transform:function(p, u, A, B, y, E) {
|
|
497
501
|
const F = this.D, H = F.length - 6;
|
|
498
|
-
F.splice(H, 6, F[H] * p + F[H + 2] *
|
|
499
|
-
this.u.push(this.o.transform.bind(this.o, p,
|
|
502
|
+
F.splice(H, 6, F[H] * p + F[H + 2] * u, F[H + 1] * p + F[H + 3] * u, F[H] * A + F[H + 2] * B, F[H + 1] * A + F[H + 3] * B, F[H] * y + F[H + 2] * E + F[H + 4], F[H + 1] * y + F[H + 3] * E + F[H + 5]);
|
|
503
|
+
this.u.push(this.o.transform.bind(this.o, p, u, A, B, y, E));
|
|
500
504
|
}, rotate:function(p) {
|
|
501
|
-
const
|
|
505
|
+
const u = Math.sin(p);
|
|
502
506
|
p = Math.cos(p);
|
|
503
|
-
this.transform(p,
|
|
504
|
-
}, _drawPath:function(p,
|
|
505
|
-
this.u.push(
|
|
506
|
-
}, _drawRiveImage:function(p,
|
|
507
|
-
var
|
|
508
|
-
if (
|
|
509
|
-
var
|
|
507
|
+
this.transform(p, u, -u, p, 0, 0);
|
|
508
|
+
}, _drawPath:function(p, u) {
|
|
509
|
+
this.u.push(u.draw.bind(u, this.o, p.F, p.ka === x ? "evenodd" : "nonzero"));
|
|
510
|
+
}, _drawRiveImage:function(p, u, A) {
|
|
511
|
+
var B = p.Ga;
|
|
512
|
+
if (B) {
|
|
513
|
+
var y = this.o, E = b(u);
|
|
510
514
|
this.u.push(function() {
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
+
y.globalCompositeOperation = E;
|
|
516
|
+
y.globalAlpha = A;
|
|
517
|
+
y.drawImage(B, 0, 0);
|
|
518
|
+
y.globalAlpha = 1;
|
|
515
519
|
});
|
|
516
520
|
}
|
|
517
521
|
}, _getMatrix:function(p) {
|
|
518
|
-
const
|
|
519
|
-
for (let
|
|
520
|
-
p[
|
|
522
|
+
const u = this.D, A = u.length - 6;
|
|
523
|
+
for (let B = 0; 6 > B; ++B) {
|
|
524
|
+
p[B] = u[A + B];
|
|
521
525
|
}
|
|
522
|
-
}, _drawImageMesh:function(p,
|
|
526
|
+
}, _drawImageMesh:function(p, u, A, B, y, E, F, H, T, K) {
|
|
523
527
|
var Y = this.o.canvas.width, N = this.o.canvas.height;
|
|
524
528
|
const tb = T - F, ub = K - H;
|
|
525
529
|
F = Math.max(F, 0);
|
|
@@ -536,19 +540,19 @@ h.onRuntimeInitialized = function() {
|
|
|
536
540
|
N = ha.eb();
|
|
537
541
|
ja > N && (K *= N / ja, ja = N);
|
|
538
542
|
ka > N && (Y *= N / ka, ka = N);
|
|
539
|
-
|
|
540
|
-
N =
|
|
541
|
-
0 > N && (c(), D.add(this), N =
|
|
543
|
+
v || (v = new h.DynamicRectanizer(N), v.reset(512, 512));
|
|
544
|
+
N = v.addRect(ja, ka);
|
|
545
|
+
0 > N && (c(), D.add(this), N = v.addRect(ja, ka), console.assert(0 <= N));
|
|
542
546
|
var vb = N & 65535, wb = N >> 16;
|
|
543
|
-
I.push({N:this.D.slice(this.D.length - 6), image:p, na:vb, oa:wb, fb:F, gb:H, sb:ja, va:ka, X:K, Y, ia:new Float32Array(
|
|
544
|
-
O +=
|
|
547
|
+
I.push({N:this.D.slice(this.D.length - 6), image:p, na:vb, oa:wb, fb:F, gb:H, sb:ja, va:ka, X:K, Y, ia:new Float32Array(B), Ea:new Float32Array(y), indices:new Uint16Array(E), hb:T, Ba:p.da << 1 | (T ? 1 : 0),});
|
|
548
|
+
O += B.length;
|
|
545
549
|
X += E.length;
|
|
546
|
-
var pa = this.o, oc = b(
|
|
550
|
+
var pa = this.o, oc = b(u);
|
|
547
551
|
this.u.push(function() {
|
|
548
552
|
pa.save();
|
|
549
553
|
pa.resetTransform();
|
|
550
554
|
pa.globalCompositeOperation = oc;
|
|
551
|
-
pa.globalAlpha =
|
|
555
|
+
pa.globalAlpha = A;
|
|
552
556
|
const xb = ha.canvas();
|
|
553
557
|
xb && pa.drawImage(xb, vb, wb, ja, ka, F, H, wa, xa);
|
|
554
558
|
pa.restore();
|
|
@@ -560,36 +564,36 @@ h.onRuntimeInitialized = function() {
|
|
|
560
564
|
D.add(this);
|
|
561
565
|
this.u.push(this.o.clearRect.bind(this.o, 0, 0, this.ja.width, this.ja.height));
|
|
562
566
|
}, flush:function() {
|
|
563
|
-
}, translate:function(p,
|
|
564
|
-
this.transform(1, 0, 0, 1, p,
|
|
567
|
+
}, translate:function(p, u) {
|
|
568
|
+
this.transform(1, 0, 0, 1, p, u);
|
|
565
569
|
},});
|
|
566
570
|
h.makeRenderer = function(p) {
|
|
567
|
-
const
|
|
568
|
-
return new Proxy(
|
|
569
|
-
if ("function" === typeof
|
|
571
|
+
const u = new ia(p), A = u.o;
|
|
572
|
+
return new Proxy(u, {get(B, y) {
|
|
573
|
+
if ("function" === typeof B[y]) {
|
|
570
574
|
return function(...E) {
|
|
571
|
-
return
|
|
575
|
+
return B[y].apply(B, E);
|
|
572
576
|
};
|
|
573
577
|
}
|
|
574
|
-
if ("function" === typeof
|
|
575
|
-
if (-1 < fa.indexOf(
|
|
576
|
-
throw Error("RiveException: Method call to '" +
|
|
578
|
+
if ("function" === typeof A[y]) {
|
|
579
|
+
if (-1 < fa.indexOf(y)) {
|
|
580
|
+
throw Error("RiveException: Method call to '" + y + "()' is not allowed, as the renderer cannot immediately pass through the return values of any canvas 2d context methods.");
|
|
577
581
|
}
|
|
578
582
|
return function(...E) {
|
|
579
|
-
|
|
583
|
+
u.u.push(A[y].bind(A, ...E));
|
|
580
584
|
};
|
|
581
585
|
}
|
|
582
|
-
return
|
|
583
|
-
}, set(
|
|
584
|
-
if (
|
|
585
|
-
return
|
|
586
|
-
|
|
586
|
+
return B[y];
|
|
587
|
+
}, set(B, y, E) {
|
|
588
|
+
if (y in A) {
|
|
589
|
+
return u.u.push(() => {
|
|
590
|
+
A[y] = E;
|
|
587
591
|
}), !0;
|
|
588
592
|
}
|
|
589
593
|
},});
|
|
590
594
|
};
|
|
591
|
-
h.decodeImage = function(p,
|
|
592
|
-
(new r({R:
|
|
595
|
+
h.decodeImage = function(p, u) {
|
|
596
|
+
(new r({R:u})).decode(p);
|
|
593
597
|
};
|
|
594
598
|
h.renderFactory = {makeRenderPaint:function() {
|
|
595
599
|
return new G();
|
|
@@ -602,25 +606,29 @@ h.onRuntimeInitialized = function() {
|
|
|
602
606
|
}, R:() => {
|
|
603
607
|
p.loaded++;
|
|
604
608
|
if (p.loaded === p.total) {
|
|
605
|
-
const
|
|
606
|
-
|
|
609
|
+
const u = p.ready;
|
|
610
|
+
u && (u(), p.ready = null);
|
|
607
611
|
}
|
|
608
612
|
},});
|
|
609
613
|
},};
|
|
610
|
-
let
|
|
611
|
-
h.load = function(p,
|
|
612
|
-
const
|
|
613
|
-
void 0 !==
|
|
614
|
-
|
|
615
|
-
return new Promise(function(
|
|
614
|
+
let C = h.load, W = null;
|
|
615
|
+
h.load = function(p, u, A = !0) {
|
|
616
|
+
const B = new h.FallbackFileAssetLoader();
|
|
617
|
+
void 0 !== u && B.addLoader(u);
|
|
618
|
+
A && (u = new h.CDNFileAssetLoader(), B.addLoader(u));
|
|
619
|
+
return new Promise(function(y) {
|
|
616
620
|
let E = null;
|
|
617
621
|
W = {total:0, loaded:0, ready:function() {
|
|
618
|
-
|
|
622
|
+
y(E);
|
|
619
623
|
},};
|
|
620
|
-
E =
|
|
621
|
-
0 == W.total &&
|
|
624
|
+
E = C(p, B);
|
|
625
|
+
0 == W.total && y(E);
|
|
622
626
|
});
|
|
623
627
|
};
|
|
628
|
+
let pc = h.RendererWrapper.prototype.align;
|
|
629
|
+
h.RendererWrapper.prototype.align = function(p, u, A, B, y = 1.0) {
|
|
630
|
+
pc.call(this, p, u, A, B, y);
|
|
631
|
+
};
|
|
624
632
|
d = new ca();
|
|
625
633
|
h.requestAnimationFrame = d.requestAnimationFrame.bind(d);
|
|
626
634
|
h.cancelAnimationFrame = d.cancelAnimationFrame.bind(d);
|
|
@@ -629,12 +637,12 @@ h.onRuntimeInitialized = function() {
|
|
|
629
637
|
d.xa = c;
|
|
630
638
|
h.resolveAnimationFrame = c;
|
|
631
639
|
h.cleanup = function() {
|
|
632
|
-
|
|
640
|
+
v && v.delete();
|
|
633
641
|
};
|
|
634
642
|
};
|
|
635
|
-
var ma = Object.assign({}, h), na = "./this.program", oa = "object" == typeof window, qa = "function" == typeof importScripts,
|
|
643
|
+
var ma = Object.assign({}, h), na = "./this.program", oa = "object" == typeof window, qa = "function" == typeof importScripts, z = "", ra, sa;
|
|
636
644
|
if (oa || qa) {
|
|
637
|
-
qa ?
|
|
645
|
+
qa ? z = self.location.href : "undefined" != typeof document && document.currentScript && (z = document.currentScript.src), _scriptDir && (z = _scriptDir), 0 !== z.indexOf("blob:") ? z = z.substr(0, z.replace(/[?#].*/, "").lastIndexOf("/") + 1) : z = "", qa && (sa = b => {
|
|
638
646
|
var a = new XMLHttpRequest();
|
|
639
647
|
a.open("GET", b, !1);
|
|
640
648
|
a.responseType = "arraybuffer";
|
|
@@ -695,7 +703,7 @@ var Qa;
|
|
|
695
703
|
Qa = "canvas_advanced.wasm";
|
|
696
704
|
if (!Pa(Qa)) {
|
|
697
705
|
var Ra = Qa;
|
|
698
|
-
Qa = h.locateFile ? h.locateFile(Ra,
|
|
706
|
+
Qa = h.locateFile ? h.locateFile(Ra, z) : z + Ra;
|
|
699
707
|
}
|
|
700
708
|
function Sa(b) {
|
|
701
709
|
if (b == Qa && va) {
|
|
@@ -901,15 +909,15 @@ function V(b, a, c) {
|
|
|
901
909
|
b.forEach(function(k) {
|
|
902
910
|
Hb[k] = a;
|
|
903
911
|
});
|
|
904
|
-
var e = Array(a.length),
|
|
912
|
+
var e = Array(a.length), f = [], m = 0;
|
|
905
913
|
a.forEach((k, n) => {
|
|
906
|
-
jb.hasOwnProperty(k) ? e[n] = jb[k] : (
|
|
914
|
+
jb.hasOwnProperty(k) ? e[n] = jb[k] : (f.push(k), Gb.hasOwnProperty(k) || (Gb[k] = []), Gb[k].push(() => {
|
|
907
915
|
e[n] = jb[k];
|
|
908
916
|
++m;
|
|
909
|
-
m ===
|
|
917
|
+
m === f.length && d(e);
|
|
910
918
|
}));
|
|
911
919
|
});
|
|
912
|
-
0 ===
|
|
920
|
+
0 === f.length && d(e);
|
|
913
921
|
}
|
|
914
922
|
function Jb(b) {
|
|
915
923
|
switch(b) {
|
|
@@ -963,13 +971,13 @@ function Nb(b, a, c) {
|
|
|
963
971
|
function Ob(b, a, c) {
|
|
964
972
|
h.hasOwnProperty(b) ? ((void 0 === c || void 0 !== h[b].m && void 0 !== h[b].m[c]) && R(`Cannot register public name '${b}' twice`), Nb(h, b, b), h.hasOwnProperty(c) && R(`Cannot register multiple overloads of a function with the same number of arguments (${c})!`), h[b].m[c] = a) : (h[b] = a, void 0 !== c && (h[b].tb = c));
|
|
965
973
|
}
|
|
966
|
-
function Pb(b, a, c, d, e,
|
|
974
|
+
function Pb(b, a, c, d, e, f, m, k) {
|
|
967
975
|
this.name = b;
|
|
968
976
|
this.constructor = a;
|
|
969
977
|
this.B = c;
|
|
970
978
|
this.H = d;
|
|
971
979
|
this.l = e;
|
|
972
|
-
this.Ua =
|
|
980
|
+
this.Ua = f;
|
|
973
981
|
this.S = m;
|
|
974
982
|
this.Pa = k;
|
|
975
983
|
this.ya = [];
|
|
@@ -1075,16 +1083,16 @@ function Z(b, a) {
|
|
|
1075
1083
|
}
|
|
1076
1084
|
var $b = void 0;
|
|
1077
1085
|
function ac(b, a) {
|
|
1078
|
-
function c(
|
|
1079
|
-
e[
|
|
1086
|
+
function c(f) {
|
|
1087
|
+
e[f] || jb[f] || (Hb[f] ? Hb[f].forEach(c) : (d.push(f), e[f] = !0));
|
|
1080
1088
|
}
|
|
1081
1089
|
var d = [], e = {};
|
|
1082
1090
|
a.forEach(c);
|
|
1083
1091
|
throw new $b(`${b}: ` + d.map(kb).join([", "]));
|
|
1084
1092
|
}
|
|
1085
1093
|
function bc(b, a, c, d, e) {
|
|
1086
|
-
var
|
|
1087
|
-
2 >
|
|
1094
|
+
var f = a.length;
|
|
1095
|
+
2 > f && R("argTypes array size mismatch! Must at least get return value and 'this' types!");
|
|
1088
1096
|
var m = null !== a[1] && null !== c, k = !1;
|
|
1089
1097
|
for (c = 1; c < a.length; ++c) {
|
|
1090
1098
|
if (null !== a[c] && void 0 === a[c].v) {
|
|
@@ -1092,30 +1100,30 @@ function bc(b, a, c, d, e) {
|
|
|
1092
1100
|
break;
|
|
1093
1101
|
}
|
|
1094
1102
|
}
|
|
1095
|
-
var n = "void" !== a[0].name, l =
|
|
1103
|
+
var n = "void" !== a[0].name, l = f - 2, t = Array(l), w = [], x = [];
|
|
1096
1104
|
return function() {
|
|
1097
1105
|
arguments.length !== l && R(`function ${b} called with ${arguments.length} arguments, expected ${l} args!`);
|
|
1098
1106
|
x.length = 0;
|
|
1099
|
-
|
|
1100
|
-
|
|
1107
|
+
w.length = m ? 2 : 1;
|
|
1108
|
+
w[0] = e;
|
|
1101
1109
|
if (m) {
|
|
1102
|
-
var
|
|
1103
|
-
|
|
1110
|
+
var g = a[1].toWireType(x, this);
|
|
1111
|
+
w[1] = g;
|
|
1104
1112
|
}
|
|
1105
1113
|
for (var r = 0; r < l; ++r) {
|
|
1106
|
-
t[r] = a[r + 2].toWireType(x, arguments[r]),
|
|
1114
|
+
t[r] = a[r + 2].toWireType(x, arguments[r]), w.push(t[r]);
|
|
1107
1115
|
}
|
|
1108
|
-
r = d.apply(null,
|
|
1116
|
+
r = d.apply(null, w);
|
|
1109
1117
|
if (k) {
|
|
1110
1118
|
Eb(x);
|
|
1111
1119
|
} else {
|
|
1112
1120
|
for (var q = m ? 1 : 2; q < a.length; q++) {
|
|
1113
|
-
var G = 1 === q ?
|
|
1121
|
+
var G = 1 === q ? g : t[q - 2];
|
|
1114
1122
|
null !== a[q].v && a[q].v(G);
|
|
1115
1123
|
}
|
|
1116
1124
|
}
|
|
1117
|
-
|
|
1118
|
-
return
|
|
1125
|
+
g = n ? a[0].fromWireType(r) : void 0;
|
|
1126
|
+
return g;
|
|
1119
1127
|
};
|
|
1120
1128
|
}
|
|
1121
1129
|
function cc(b, a) {
|
|
@@ -1200,38 +1208,38 @@ var ic = (b, a, c, d) => {
|
|
|
1200
1208
|
if (0 < d) {
|
|
1201
1209
|
d = c + d - 1;
|
|
1202
1210
|
for (var e = 0; e < b.length; ++e) {
|
|
1203
|
-
var
|
|
1204
|
-
if (55296 <=
|
|
1211
|
+
var f = b.charCodeAt(e);
|
|
1212
|
+
if (55296 <= f && 57343 >= f) {
|
|
1205
1213
|
var m = b.charCodeAt(++e);
|
|
1206
|
-
|
|
1214
|
+
f = 65536 + ((f & 1023) << 10) | m & 1023;
|
|
1207
1215
|
}
|
|
1208
|
-
if (127 >=
|
|
1216
|
+
if (127 >= f) {
|
|
1209
1217
|
if (c >= d) {
|
|
1210
1218
|
break;
|
|
1211
1219
|
}
|
|
1212
|
-
a[c++] =
|
|
1220
|
+
a[c++] = f;
|
|
1213
1221
|
} else {
|
|
1214
|
-
if (2047 >=
|
|
1222
|
+
if (2047 >= f) {
|
|
1215
1223
|
if (c + 1 >= d) {
|
|
1216
1224
|
break;
|
|
1217
1225
|
}
|
|
1218
|
-
a[c++] = 192 |
|
|
1226
|
+
a[c++] = 192 | f >> 6;
|
|
1219
1227
|
} else {
|
|
1220
|
-
if (65535 >=
|
|
1228
|
+
if (65535 >= f) {
|
|
1221
1229
|
if (c + 2 >= d) {
|
|
1222
1230
|
break;
|
|
1223
1231
|
}
|
|
1224
|
-
a[c++] = 224 |
|
|
1232
|
+
a[c++] = 224 | f >> 12;
|
|
1225
1233
|
} else {
|
|
1226
1234
|
if (c + 3 >= d) {
|
|
1227
1235
|
break;
|
|
1228
1236
|
}
|
|
1229
|
-
a[c++] = 240 |
|
|
1230
|
-
a[c++] = 128 |
|
|
1237
|
+
a[c++] = 240 | f >> 18;
|
|
1238
|
+
a[c++] = 128 | f >> 12 & 63;
|
|
1231
1239
|
}
|
|
1232
|
-
a[c++] = 128 |
|
|
1240
|
+
a[c++] = 128 | f >> 6 & 63;
|
|
1233
1241
|
}
|
|
1234
|
-
a[c++] = 128 |
|
|
1242
|
+
a[c++] = 128 | f & 63;
|
|
1235
1243
|
}
|
|
1236
1244
|
}
|
|
1237
1245
|
a[c] = 0;
|
|
@@ -1253,12 +1261,12 @@ var ic = (b, a, c, d) => {
|
|
|
1253
1261
|
for (d = ""; a < c;) {
|
|
1254
1262
|
var e = b[a++];
|
|
1255
1263
|
if (e & 128) {
|
|
1256
|
-
var
|
|
1264
|
+
var f = b[a++] & 63;
|
|
1257
1265
|
if (192 == (e & 224)) {
|
|
1258
|
-
d += String.fromCharCode((e & 31) << 6 |
|
|
1266
|
+
d += String.fromCharCode((e & 31) << 6 | f);
|
|
1259
1267
|
} else {
|
|
1260
1268
|
var m = b[a++] & 63;
|
|
1261
|
-
e = 224 == (e & 240) ? (e & 15) << 12 |
|
|
1269
|
+
e = 224 == (e & 240) ? (e & 15) << 12 | f << 6 | m : (e & 7) << 18 | f << 12 | m << 6 | b[a++] & 63;
|
|
1262
1270
|
65536 > e ? d += String.fromCharCode(e) : (e -= 65536, d += String.fromCharCode(55296 | e >> 10, 56320 | e & 1023));
|
|
1263
1271
|
}
|
|
1264
1272
|
} else {
|
|
@@ -1284,7 +1292,7 @@ var ic = (b, a, c, d) => {
|
|
|
1284
1292
|
c += String.fromCharCode(e);
|
|
1285
1293
|
}
|
|
1286
1294
|
return c;
|
|
1287
|
-
},
|
|
1295
|
+
}, qc = (b, a, c) => {
|
|
1288
1296
|
void 0 === c && (c = 2147483647);
|
|
1289
1297
|
if (2 > c) {
|
|
1290
1298
|
return 0;
|
|
@@ -1297,7 +1305,7 @@ var ic = (b, a, c, d) => {
|
|
|
1297
1305
|
}
|
|
1298
1306
|
Ca[a >> 1] = 0;
|
|
1299
1307
|
return a - d;
|
|
1300
|
-
},
|
|
1308
|
+
}, rc = b => 2 * b.length, sc = (b, a) => {
|
|
1301
1309
|
for (var c = 0, d = ""; !(c >= a / 4);) {
|
|
1302
1310
|
var e = M[b + 4 * c >> 2];
|
|
1303
1311
|
if (0 == e) {
|
|
@@ -1307,7 +1315,7 @@ var ic = (b, a, c, d) => {
|
|
|
1307
1315
|
65536 <= e ? (e -= 65536, d += String.fromCharCode(55296 | e >> 10, 56320 | e & 1023)) : d += String.fromCharCode(e);
|
|
1308
1316
|
}
|
|
1309
1317
|
return d;
|
|
1310
|
-
},
|
|
1318
|
+
}, tc = (b, a, c) => {
|
|
1311
1319
|
void 0 === c && (c = 2147483647);
|
|
1312
1320
|
if (4 > c) {
|
|
1313
1321
|
return 0;
|
|
@@ -1315,12 +1323,12 @@ var ic = (b, a, c, d) => {
|
|
|
1315
1323
|
var d = a;
|
|
1316
1324
|
c = d + c - 4;
|
|
1317
1325
|
for (var e = 0; e < b.length; ++e) {
|
|
1318
|
-
var
|
|
1319
|
-
if (55296 <=
|
|
1326
|
+
var f = b.charCodeAt(e);
|
|
1327
|
+
if (55296 <= f && 57343 >= f) {
|
|
1320
1328
|
var m = b.charCodeAt(++e);
|
|
1321
|
-
|
|
1329
|
+
f = 65536 + ((f & 1023) << 10) | m & 1023;
|
|
1322
1330
|
}
|
|
1323
|
-
M[a >> 2] =
|
|
1331
|
+
M[a >> 2] = f;
|
|
1324
1332
|
a += 4;
|
|
1325
1333
|
if (a + 4 > c) {
|
|
1326
1334
|
break;
|
|
@@ -1328,100 +1336,100 @@ var ic = (b, a, c, d) => {
|
|
|
1328
1336
|
}
|
|
1329
1337
|
M[a >> 2] = 0;
|
|
1330
1338
|
return a - d;
|
|
1331
|
-
},
|
|
1339
|
+
}, uc = b => {
|
|
1332
1340
|
for (var a = 0, c = 0; c < b.length; ++c) {
|
|
1333
1341
|
var d = b.charCodeAt(c);
|
|
1334
1342
|
55296 <= d && 57343 >= d && ++c;
|
|
1335
1343
|
a += 4;
|
|
1336
1344
|
}
|
|
1337
1345
|
return a;
|
|
1338
|
-
},
|
|
1339
|
-
function
|
|
1340
|
-
var a =
|
|
1346
|
+
}, vc = {};
|
|
1347
|
+
function wc(b) {
|
|
1348
|
+
var a = vc[b];
|
|
1341
1349
|
return void 0 === a ? U(b) : a;
|
|
1342
1350
|
}
|
|
1343
|
-
var
|
|
1344
|
-
function
|
|
1345
|
-
var a =
|
|
1346
|
-
|
|
1351
|
+
var xc = [];
|
|
1352
|
+
function yc(b) {
|
|
1353
|
+
var a = xc.length;
|
|
1354
|
+
xc.push(b);
|
|
1347
1355
|
return a;
|
|
1348
1356
|
}
|
|
1349
|
-
function
|
|
1357
|
+
function zc(b, a) {
|
|
1350
1358
|
for (var c = Array(b), d = 0; d < b; ++d) {
|
|
1351
1359
|
c[d] = nb(P[a + 4 * d >> 2], "parameter " + d);
|
|
1352
1360
|
}
|
|
1353
1361
|
return c;
|
|
1354
1362
|
}
|
|
1355
|
-
var
|
|
1356
|
-
if (!
|
|
1363
|
+
var Ac = [], Bc = {}, Dc = () => {
|
|
1364
|
+
if (!Cc) {
|
|
1357
1365
|
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", _:na || "./this.program"}, a;
|
|
1358
|
-
for (a in
|
|
1359
|
-
void 0 ===
|
|
1366
|
+
for (a in Bc) {
|
|
1367
|
+
void 0 === Bc[a] ? delete b[a] : b[a] = Bc[a];
|
|
1360
1368
|
}
|
|
1361
1369
|
var c = [];
|
|
1362
1370
|
for (a in b) {
|
|
1363
1371
|
c.push(`${a}=${b[a]}`);
|
|
1364
1372
|
}
|
|
1365
|
-
|
|
1373
|
+
Cc = c;
|
|
1366
1374
|
}
|
|
1367
|
-
return
|
|
1368
|
-
},
|
|
1369
|
-
function
|
|
1375
|
+
return Cc;
|
|
1376
|
+
}, Cc, Ec = [null, [], []], Fc = b => 0 === b % 4 && (0 !== b % 100 || 0 === b % 400), Gc = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Hc = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
1377
|
+
function Ic(b) {
|
|
1370
1378
|
var a = Array(jc(b) + 1);
|
|
1371
1379
|
ic(b, a, 0, a.length);
|
|
1372
1380
|
return a;
|
|
1373
1381
|
}
|
|
1374
|
-
var
|
|
1375
|
-
function e(
|
|
1376
|
-
for (
|
|
1377
|
-
|
|
1382
|
+
var Jc = (b, a, c, d) => {
|
|
1383
|
+
function e(g, r, q) {
|
|
1384
|
+
for (g = "number" == typeof g ? g.toString() : g || ""; g.length < r;) {
|
|
1385
|
+
g = q[0] + g;
|
|
1378
1386
|
}
|
|
1379
|
-
return
|
|
1387
|
+
return g;
|
|
1380
1388
|
}
|
|
1381
|
-
function g
|
|
1382
|
-
return e(
|
|
1389
|
+
function f(g, r) {
|
|
1390
|
+
return e(g, r, "0");
|
|
1383
1391
|
}
|
|
1384
|
-
function m(
|
|
1392
|
+
function m(g, r) {
|
|
1385
1393
|
function q(D) {
|
|
1386
1394
|
return 0 > D ? -1 : 0 < D ? 1 : 0;
|
|
1387
1395
|
}
|
|
1388
1396
|
var G;
|
|
1389
|
-
0 === (G = q(
|
|
1397
|
+
0 === (G = q(g.getFullYear() - r.getFullYear())) && 0 === (G = q(g.getMonth() - r.getMonth())) && (G = q(g.getDate() - r.getDate()));
|
|
1390
1398
|
return G;
|
|
1391
1399
|
}
|
|
1392
|
-
function k(
|
|
1393
|
-
switch(
|
|
1400
|
+
function k(g) {
|
|
1401
|
+
switch(g.getDay()) {
|
|
1394
1402
|
case 0:
|
|
1395
|
-
return new Date(
|
|
1403
|
+
return new Date(g.getFullYear() - 1, 11, 29);
|
|
1396
1404
|
case 1:
|
|
1397
|
-
return
|
|
1405
|
+
return g;
|
|
1398
1406
|
case 2:
|
|
1399
|
-
return new Date(
|
|
1407
|
+
return new Date(g.getFullYear(), 0, 3);
|
|
1400
1408
|
case 3:
|
|
1401
|
-
return new Date(
|
|
1409
|
+
return new Date(g.getFullYear(), 0, 2);
|
|
1402
1410
|
case 4:
|
|
1403
|
-
return new Date(
|
|
1411
|
+
return new Date(g.getFullYear(), 0, 1);
|
|
1404
1412
|
case 5:
|
|
1405
|
-
return new Date(
|
|
1413
|
+
return new Date(g.getFullYear() - 1, 11, 31);
|
|
1406
1414
|
case 6:
|
|
1407
|
-
return new Date(
|
|
1415
|
+
return new Date(g.getFullYear() - 1, 11, 30);
|
|
1408
1416
|
}
|
|
1409
1417
|
}
|
|
1410
|
-
function n(
|
|
1411
|
-
var r =
|
|
1412
|
-
for (
|
|
1413
|
-
var q =
|
|
1414
|
-
if (r > G -
|
|
1415
|
-
r -= G -
|
|
1418
|
+
function n(g) {
|
|
1419
|
+
var r = g.J;
|
|
1420
|
+
for (g = new Date((new Date(g.K + 1900, 0, 1)).getTime()); 0 < r;) {
|
|
1421
|
+
var q = g.getMonth(), G = (Fc(g.getFullYear()) ? Gc : Hc)[q];
|
|
1422
|
+
if (r > G - g.getDate()) {
|
|
1423
|
+
r -= G - g.getDate() + 1, g.setDate(1), 11 > q ? g.setMonth(q + 1) : (g.setMonth(0), g.setFullYear(g.getFullYear() + 1));
|
|
1416
1424
|
} else {
|
|
1417
|
-
|
|
1425
|
+
g.setDate(g.getDate() + r);
|
|
1418
1426
|
break;
|
|
1419
1427
|
}
|
|
1420
1428
|
}
|
|
1421
|
-
q = new Date(
|
|
1422
|
-
r = k(new Date(
|
|
1429
|
+
q = new Date(g.getFullYear() + 1, 0, 4);
|
|
1430
|
+
r = k(new Date(g.getFullYear(), 0, 4));
|
|
1423
1431
|
q = k(q);
|
|
1424
|
-
return 0 >= m(r,
|
|
1432
|
+
return 0 >= m(r, g) ? 0 >= m(q, g) ? g.getFullYear() + 1 : g.getFullYear() : g.getFullYear() - 1;
|
|
1425
1433
|
}
|
|
1426
1434
|
var l = M[d + 40 >> 2];
|
|
1427
1435
|
d = {qb:M[d >> 2], pb:M[d + 4 >> 2], Z:M[d + 8 >> 2], ha:M[d + 12 >> 2], $:M[d + 16 >> 2], K:M[d + 20 >> 2], C:M[d + 24 >> 2], J:M[d + 28 >> 2], ub:M[d + 32 >> 2], ob:M[d + 36 >> 2], rb:l ? l ? lc(L, l) : "" : ""};
|
|
@@ -1430,38 +1438,38 @@ var Ic = (b, a, c, d) => {
|
|
|
1430
1438
|
for (var t in l) {
|
|
1431
1439
|
c = c.replace(new RegExp(t, "g"), l[t]);
|
|
1432
1440
|
}
|
|
1433
|
-
var
|
|
1434
|
-
l = {"%a":
|
|
1435
|
-
|
|
1436
|
-
0 ==
|
|
1437
|
-
return g
|
|
1438
|
-
}, "%j":
|
|
1439
|
-
for (var r = 0, q = 0; q <=
|
|
1441
|
+
var w = "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "), x = "January February March April May June July August September October November December".split(" ");
|
|
1442
|
+
l = {"%a":g => w[g.C].substring(0, 3), "%A":g => w[g.C], "%b":g => x[g.$].substring(0, 3), "%B":g => x[g.$], "%C":g => f((g.K + 1900) / 100 | 0, 2), "%d":g => f(g.ha, 2), "%e":g => e(g.ha, 2, " "), "%g":g => n(g).toString().substring(2), "%G":g => n(g), "%H":g => f(g.Z, 2), "%I":g => {
|
|
1443
|
+
g = g.Z;
|
|
1444
|
+
0 == g ? g = 12 : 12 < g && (g -= 12);
|
|
1445
|
+
return f(g, 2);
|
|
1446
|
+
}, "%j":g => {
|
|
1447
|
+
for (var r = 0, q = 0; q <= g.$ - 1; r += (Fc(g.K + 1900) ? Gc : Hc)[q++]) {
|
|
1440
1448
|
}
|
|
1441
|
-
return g
|
|
1442
|
-
}, "%m":
|
|
1443
|
-
var r = Math.floor((
|
|
1444
|
-
2 >= (
|
|
1449
|
+
return f(g.ha + r, 3);
|
|
1450
|
+
}, "%m":g => f(g.$ + 1, 2), "%M":g => f(g.pb, 2), "%n":() => "\n", "%p":g => 0 <= g.Z && 12 > g.Z ? "AM" : "PM", "%S":g => f(g.qb, 2), "%t":() => "\t", "%u":g => g.C || 7, "%U":g => f(Math.floor((g.J + 7 - g.C) / 7), 2), "%V":g => {
|
|
1451
|
+
var r = Math.floor((g.J + 7 - (g.C + 6) % 7) / 7);
|
|
1452
|
+
2 >= (g.C + 371 - g.J - 2) % 7 && r++;
|
|
1445
1453
|
if (r) {
|
|
1446
|
-
53 == r && (q = (
|
|
1454
|
+
53 == r && (q = (g.C + 371 - g.J) % 7, 4 == q || 3 == q && Fc(g.K) || (r = 1));
|
|
1447
1455
|
} else {
|
|
1448
1456
|
r = 52;
|
|
1449
|
-
var q = (
|
|
1450
|
-
(4 == q || 5 == q &&
|
|
1457
|
+
var q = (g.C + 7 - g.J - 1) % 7;
|
|
1458
|
+
(4 == q || 5 == q && Fc(g.K % 400 - 1)) && r++;
|
|
1451
1459
|
}
|
|
1452
|
-
return
|
|
1453
|
-
}, "%w":
|
|
1454
|
-
|
|
1455
|
-
var r = 0 <=
|
|
1456
|
-
|
|
1457
|
-
return (r ? "+" : "-") + String("0000" + (
|
|
1458
|
-
}, "%Z":
|
|
1460
|
+
return f(r, 2);
|
|
1461
|
+
}, "%w":g => g.C, "%W":g => f(Math.floor((g.J + 7 - (g.C + 6) % 7) / 7), 2), "%y":g => (g.K + 1900).toString().substring(2), "%Y":g => g.K + 1900, "%z":g => {
|
|
1462
|
+
g = g.ob;
|
|
1463
|
+
var r = 0 <= g;
|
|
1464
|
+
g = Math.abs(g) / 60;
|
|
1465
|
+
return (r ? "+" : "-") + String("0000" + (g / 60 * 100 + g % 60)).slice(-4);
|
|
1466
|
+
}, "%Z":g => g.rb, "%%":() => "%"};
|
|
1459
1467
|
c = c.replace(/%%/g, "\x00\x00");
|
|
1460
1468
|
for (t in l) {
|
|
1461
1469
|
c.includes(t) && (c = c.replace(new RegExp(t, "g"), l[t](d)));
|
|
1462
1470
|
}
|
|
1463
1471
|
c = c.replace(/\0\0/g, "%");
|
|
1464
|
-
t =
|
|
1472
|
+
t = Ic(c);
|
|
1465
1473
|
if (t.length > a) {
|
|
1466
1474
|
return 0;
|
|
1467
1475
|
}
|
|
@@ -1495,10 +1503,10 @@ h.count_emval_handles = function() {
|
|
|
1495
1503
|
return b;
|
|
1496
1504
|
};
|
|
1497
1505
|
cb = h.PureVirtualError = bb("PureVirtualError");
|
|
1498
|
-
for (var
|
|
1499
|
-
|
|
1506
|
+
for (var Kc = Array(256), Lc = 0; 256 > Lc; ++Lc) {
|
|
1507
|
+
Kc[Lc] = String.fromCharCode(Lc);
|
|
1500
1508
|
}
|
|
1501
|
-
db =
|
|
1509
|
+
db = Kc;
|
|
1502
1510
|
h.getInheritedInstanceCount = function() {
|
|
1503
1511
|
return Object.keys(hb).length;
|
|
1504
1512
|
};
|
|
@@ -1603,22 +1611,22 @@ Vb.prototype.fromWireType = function(b) {
|
|
|
1603
1611
|
return null === e ? a.call(this) : this.V ? Bb(d.h.B, {j:d, i:e, A:this, s:b,}) : Bb(d.h.B, {j:d, i:e,});
|
|
1604
1612
|
};
|
|
1605
1613
|
$b = h.UnboundTypeError = bb("UnboundTypeError");
|
|
1606
|
-
var
|
|
1614
|
+
var Nc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
1607
1615
|
b = U(b);
|
|
1608
1616
|
a = nb(a, "wrapper");
|
|
1609
1617
|
c = S(c);
|
|
1610
|
-
var d = [].slice, e = a.h,
|
|
1618
|
+
var d = [].slice, e = a.h, f = e.B, m = e.l.B, k = e.l.constructor;
|
|
1611
1619
|
b = Ya(b, function() {
|
|
1612
1620
|
e.l.ya.forEach(function(l) {
|
|
1613
1621
|
if (this[l] === m[l]) {
|
|
1614
1622
|
throw new cb(`Pure virtual function ${l} must be implemented in JavaScript`);
|
|
1615
1623
|
}
|
|
1616
1624
|
}.bind(this));
|
|
1617
|
-
Object.defineProperty(this, "__parent", {value:
|
|
1625
|
+
Object.defineProperty(this, "__parent", {value:f});
|
|
1618
1626
|
this.__construct.apply(this, d.call(arguments));
|
|
1619
1627
|
});
|
|
1620
|
-
|
|
1621
|
-
this ===
|
|
1628
|
+
f.__construct = function() {
|
|
1629
|
+
this === f && R("Pass correct 'this' to __construct");
|
|
1622
1630
|
var l = k.implement.apply(void 0, [this].concat(d.call(arguments)));
|
|
1623
1631
|
ob(l);
|
|
1624
1632
|
var t = l.g;
|
|
@@ -1630,14 +1638,14 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1630
1638
|
l = ib(e, l);
|
|
1631
1639
|
hb.hasOwnProperty(l) ? R(`Tried to register registered instance: ${l}`) : hb[l] = this;
|
|
1632
1640
|
};
|
|
1633
|
-
|
|
1634
|
-
this ===
|
|
1641
|
+
f.__destruct = function() {
|
|
1642
|
+
this === f && R("Pass correct 'this' to __destruct");
|
|
1635
1643
|
ob(this);
|
|
1636
1644
|
var l = this.g.i;
|
|
1637
1645
|
l = ib(e, l);
|
|
1638
1646
|
hb.hasOwnProperty(l) ? delete hb[l] : R(`Tried to unregister unregistered instance: ${l}`);
|
|
1639
1647
|
};
|
|
1640
|
-
b.prototype = Object.create(
|
|
1648
|
+
b.prototype = Object.create(f);
|
|
1641
1649
|
for (var n in c) {
|
|
1642
1650
|
b.prototype[n] = c[n];
|
|
1643
1651
|
}
|
|
@@ -1645,15 +1653,15 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1645
1653
|
}, _embind_finalize_value_object:function(b) {
|
|
1646
1654
|
var a = Db[b];
|
|
1647
1655
|
delete Db[b];
|
|
1648
|
-
var c = a.fa, d = a.H, e = a.sa,
|
|
1649
|
-
V([b],
|
|
1656
|
+
var c = a.fa, d = a.H, e = a.sa, f = e.map(m => m.Ya).concat(e.map(m => m.lb));
|
|
1657
|
+
V([b], f, m => {
|
|
1650
1658
|
var k = {};
|
|
1651
1659
|
e.forEach((n, l) => {
|
|
1652
|
-
var t = m[l],
|
|
1653
|
-
k[n.Sa] = {read:G => t.fromWireType(
|
|
1654
|
-
var
|
|
1655
|
-
r(q, G,
|
|
1656
|
-
Eb(
|
|
1660
|
+
var t = m[l], w = n.Wa, x = n.Xa, g = m[l + e.length], r = n.kb, q = n.mb;
|
|
1661
|
+
k[n.Sa] = {read:G => t.fromWireType(w(x, G)), write:(G, D) => {
|
|
1662
|
+
var v = [];
|
|
1663
|
+
r(q, G, g.toWireType(v, D));
|
|
1664
|
+
Eb(v);
|
|
1657
1665
|
}};
|
|
1658
1666
|
});
|
|
1659
1667
|
return [{name:a.name, fromWireType:function(n) {
|
|
@@ -1669,17 +1677,17 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1669
1677
|
throw new TypeError(`Missing field: "${t}"`);
|
|
1670
1678
|
}
|
|
1671
1679
|
}
|
|
1672
|
-
var
|
|
1680
|
+
var w = c();
|
|
1673
1681
|
for (t in k) {
|
|
1674
|
-
k[t].write(
|
|
1682
|
+
k[t].write(w, l[t]);
|
|
1675
1683
|
}
|
|
1676
|
-
null !== n && n.push(d,
|
|
1677
|
-
return
|
|
1684
|
+
null !== n && n.push(d, w);
|
|
1685
|
+
return w;
|
|
1678
1686
|
}, argPackAdvance:8, readValueFromPointer:Fb, v:d,}];
|
|
1679
1687
|
});
|
|
1680
1688
|
}, _embind_register_bigint:function() {
|
|
1681
1689
|
}, _embind_register_bool:function(b, a, c, d, e) {
|
|
1682
|
-
var
|
|
1690
|
+
var f = Jb(c);
|
|
1683
1691
|
a = U(a);
|
|
1684
1692
|
Ib(b, {name:a, fromWireType:function(m) {
|
|
1685
1693
|
return !!m;
|
|
@@ -1695,16 +1703,16 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1695
1703
|
} else {
|
|
1696
1704
|
throw new TypeError("Unknown boolean type size: " + a);
|
|
1697
1705
|
}
|
|
1698
|
-
return this.fromWireType(k[m >>
|
|
1706
|
+
return this.fromWireType(k[m >> f]);
|
|
1699
1707
|
}, v:null,});
|
|
1700
|
-
}, _embind_register_class:function(b, a, c, d, e,
|
|
1708
|
+
}, _embind_register_class:function(b, a, c, d, e, f, m, k, n, l, t, w, x) {
|
|
1701
1709
|
t = U(t);
|
|
1702
|
-
|
|
1710
|
+
f = Z(e, f);
|
|
1703
1711
|
k && (k = Z(m, k));
|
|
1704
1712
|
l && (l = Z(n, l));
|
|
1705
|
-
x = Z(
|
|
1706
|
-
var
|
|
1707
|
-
Ob(
|
|
1713
|
+
x = Z(w, x);
|
|
1714
|
+
var g = Xa(t);
|
|
1715
|
+
Ob(g, function() {
|
|
1708
1716
|
ac(`Cannot construct ${t} due to unbound types`, [d]);
|
|
1709
1717
|
});
|
|
1710
1718
|
V([b, a, c], d ? [d] : [], function(r) {
|
|
@@ -1715,34 +1723,34 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1715
1723
|
} else {
|
|
1716
1724
|
G = Mb.prototype;
|
|
1717
1725
|
}
|
|
1718
|
-
r = Ya(
|
|
1726
|
+
r = Ya(g, function() {
|
|
1719
1727
|
if (Object.getPrototypeOf(this) !== D) {
|
|
1720
1728
|
throw new $a("Use 'new' to construct " + t);
|
|
1721
1729
|
}
|
|
1722
|
-
if (void 0 ===
|
|
1730
|
+
if (void 0 === v.I) {
|
|
1723
1731
|
throw new $a(t + " has no accessible constructor");
|
|
1724
1732
|
}
|
|
1725
|
-
var O =
|
|
1733
|
+
var O = v.I[arguments.length];
|
|
1726
1734
|
if (void 0 === O) {
|
|
1727
|
-
throw new $a(`Tried to invoke ctor of ${t} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(
|
|
1735
|
+
throw new $a(`Tried to invoke ctor of ${t} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(v.I).toString()}) parameters instead!`);
|
|
1728
1736
|
}
|
|
1729
1737
|
return O.apply(this, arguments);
|
|
1730
1738
|
});
|
|
1731
1739
|
var D = Object.create(G, {constructor:{value:r},});
|
|
1732
1740
|
r.prototype = D;
|
|
1733
|
-
var
|
|
1734
|
-
|
|
1735
|
-
q = new Vb(t,
|
|
1736
|
-
G = new Vb(t + "*",
|
|
1737
|
-
var I = new Vb(t + " const*",
|
|
1741
|
+
var v = new Pb(t, r, D, x, q, f, k, l);
|
|
1742
|
+
v.l && (void 0 === v.l.T && (v.l.T = []), v.l.T.push(v));
|
|
1743
|
+
q = new Vb(t, v, !0, !1);
|
|
1744
|
+
G = new Vb(t + "*", v, !1, !1);
|
|
1745
|
+
var I = new Vb(t + " const*", v, !1, !0);
|
|
1738
1746
|
sb[b] = {pointerType:G, Ka:I};
|
|
1739
|
-
Wb(
|
|
1747
|
+
Wb(g, r);
|
|
1740
1748
|
return [q, G, I];
|
|
1741
1749
|
});
|
|
1742
|
-
}, _embind_register_class_class_function:function(b, a, c, d, e,
|
|
1750
|
+
}, _embind_register_class_class_function:function(b, a, c, d, e, f, m) {
|
|
1743
1751
|
var k = cc(c, d);
|
|
1744
1752
|
a = U(a);
|
|
1745
|
-
|
|
1753
|
+
f = Z(e, f);
|
|
1746
1754
|
V([], [b], function(n) {
|
|
1747
1755
|
function l() {
|
|
1748
1756
|
ac(`Cannot call ${t} due to unbound types`, k);
|
|
@@ -1750,23 +1758,23 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1750
1758
|
n = n[0];
|
|
1751
1759
|
var t = `${n.name}.${a}`;
|
|
1752
1760
|
a.startsWith("@@") && (a = Symbol[a.substring(2)]);
|
|
1753
|
-
var
|
|
1754
|
-
void 0 ===
|
|
1761
|
+
var w = n.h.constructor;
|
|
1762
|
+
void 0 === w[a] ? (l.L = c - 1, w[a] = l) : (Nb(w, a, t), w[a].m[c - 1] = l);
|
|
1755
1763
|
V([], k, function(x) {
|
|
1756
|
-
x = bc(t, [x[0], null].concat(x.slice(1)), null,
|
|
1757
|
-
void 0 ===
|
|
1764
|
+
x = bc(t, [x[0], null].concat(x.slice(1)), null, f, m);
|
|
1765
|
+
void 0 === w[a].m ? (x.L = c - 1, w[a] = x) : w[a].m[c - 1] = x;
|
|
1758
1766
|
if (n.h.T) {
|
|
1759
|
-
for (const
|
|
1760
|
-
|
|
1767
|
+
for (const g of n.h.T) {
|
|
1768
|
+
g.constructor.hasOwnProperty(a) || (g.constructor[a] = x);
|
|
1761
1769
|
}
|
|
1762
1770
|
}
|
|
1763
1771
|
return [];
|
|
1764
1772
|
});
|
|
1765
1773
|
return [];
|
|
1766
1774
|
});
|
|
1767
|
-
}, _embind_register_class_class_property:function(b, a, c, d, e,
|
|
1775
|
+
}, _embind_register_class_class_property:function(b, a, c, d, e, f, m, k) {
|
|
1768
1776
|
a = U(a);
|
|
1769
|
-
|
|
1777
|
+
f = Z(e, f);
|
|
1770
1778
|
V([], [b], function(n) {
|
|
1771
1779
|
n = n[0];
|
|
1772
1780
|
var l = `${n.name}.${a}`, t = {get() {
|
|
@@ -1778,14 +1786,14 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1778
1786
|
R(`${l} is a read-only property`);
|
|
1779
1787
|
};
|
|
1780
1788
|
Object.defineProperty(n.h.constructor, a, t);
|
|
1781
|
-
V([], [c], function(
|
|
1782
|
-
|
|
1789
|
+
V([], [c], function(w) {
|
|
1790
|
+
w = w[0];
|
|
1783
1791
|
var x = {get() {
|
|
1784
|
-
return
|
|
1792
|
+
return w.fromWireType(f(d));
|
|
1785
1793
|
}, enumerable:!0};
|
|
1786
|
-
k && (k = Z(m, k), x.set =
|
|
1794
|
+
k && (k = Z(m, k), x.set = g => {
|
|
1787
1795
|
var r = [];
|
|
1788
|
-
k(d,
|
|
1796
|
+
k(d, w.toWireType(r, g));
|
|
1789
1797
|
Eb(r);
|
|
1790
1798
|
});
|
|
1791
1799
|
Object.defineProperty(n.h.constructor, a, x);
|
|
@@ -1793,7 +1801,7 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1793
1801
|
});
|
|
1794
1802
|
return [];
|
|
1795
1803
|
});
|
|
1796
|
-
}, _embind_register_class_constructor:function(b, a, c, d, e,
|
|
1804
|
+
}, _embind_register_class_constructor:function(b, a, c, d, e, f) {
|
|
1797
1805
|
var m = cc(a, c);
|
|
1798
1806
|
e = Z(d, e);
|
|
1799
1807
|
V([], [b], function(k) {
|
|
@@ -1808,57 +1816,57 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1808
1816
|
};
|
|
1809
1817
|
V([], m, function(l) {
|
|
1810
1818
|
l.splice(1, 0, null);
|
|
1811
|
-
k.h.I[a - 1] = bc(n, l, null, e,
|
|
1819
|
+
k.h.I[a - 1] = bc(n, l, null, e, f);
|
|
1812
1820
|
return [];
|
|
1813
1821
|
});
|
|
1814
1822
|
return [];
|
|
1815
1823
|
});
|
|
1816
|
-
}, _embind_register_class_function:function(b, a, c, d, e,
|
|
1824
|
+
}, _embind_register_class_function:function(b, a, c, d, e, f, m, k) {
|
|
1817
1825
|
var n = cc(c, d);
|
|
1818
1826
|
a = U(a);
|
|
1819
|
-
|
|
1827
|
+
f = Z(e, f);
|
|
1820
1828
|
V([], [b], function(l) {
|
|
1821
1829
|
function t() {
|
|
1822
|
-
ac(`Cannot call ${
|
|
1830
|
+
ac(`Cannot call ${w} due to unbound types`, n);
|
|
1823
1831
|
}
|
|
1824
1832
|
l = l[0];
|
|
1825
|
-
var
|
|
1833
|
+
var w = `${l.name}.${a}`;
|
|
1826
1834
|
a.startsWith("@@") && (a = Symbol[a.substring(2)]);
|
|
1827
1835
|
k && l.h.ya.push(a);
|
|
1828
|
-
var x = l.h.B,
|
|
1829
|
-
void 0 ===
|
|
1836
|
+
var x = l.h.B, g = x[a];
|
|
1837
|
+
void 0 === g || void 0 === g.m && g.className !== l.name && g.L === c - 2 ? (t.L = c - 2, t.className = l.name, x[a] = t) : (Nb(x, a, w), x[a].m[c - 2] = t);
|
|
1830
1838
|
V([], n, function(r) {
|
|
1831
|
-
r = bc(
|
|
1839
|
+
r = bc(w, r, l, f, m);
|
|
1832
1840
|
void 0 === x[a].m ? (r.L = c - 2, x[a] = r) : x[a].m[c - 2] = r;
|
|
1833
1841
|
return [];
|
|
1834
1842
|
});
|
|
1835
1843
|
return [];
|
|
1836
1844
|
});
|
|
1837
|
-
}, _embind_register_class_property:function(b, a, c, d, e,
|
|
1845
|
+
}, _embind_register_class_property:function(b, a, c, d, e, f, m, k, n, l) {
|
|
1838
1846
|
a = U(a);
|
|
1839
1847
|
e = Z(d, e);
|
|
1840
1848
|
V([], [b], function(t) {
|
|
1841
1849
|
t = t[0];
|
|
1842
|
-
var
|
|
1843
|
-
ac(`Cannot access ${
|
|
1850
|
+
var w = `${t.name}.${a}`, x = {get() {
|
|
1851
|
+
ac(`Cannot access ${w} due to unbound types`, [c, m]);
|
|
1844
1852
|
}, enumerable:!0, configurable:!0};
|
|
1845
1853
|
x.set = n ? () => {
|
|
1846
|
-
ac(`Cannot access ${
|
|
1854
|
+
ac(`Cannot access ${w} due to unbound types`, [c, m]);
|
|
1847
1855
|
} : () => {
|
|
1848
|
-
R(
|
|
1856
|
+
R(w + " is a read-only property");
|
|
1849
1857
|
};
|
|
1850
1858
|
Object.defineProperty(t.h.B, a, x);
|
|
1851
|
-
V([], n ? [c, m] : [c], function(
|
|
1852
|
-
var r =
|
|
1853
|
-
var D = dc(this, t,
|
|
1854
|
-
return r.fromWireType(e(
|
|
1859
|
+
V([], n ? [c, m] : [c], function(g) {
|
|
1860
|
+
var r = g[0], q = {get() {
|
|
1861
|
+
var D = dc(this, t, w + " getter");
|
|
1862
|
+
return r.fromWireType(e(f, D));
|
|
1855
1863
|
}, enumerable:!0};
|
|
1856
1864
|
if (n) {
|
|
1857
1865
|
n = Z(k, n);
|
|
1858
|
-
var G =
|
|
1866
|
+
var G = g[1];
|
|
1859
1867
|
q.set = function(D) {
|
|
1860
|
-
var
|
|
1861
|
-
n(l,
|
|
1868
|
+
var v = dc(this, t, w + " setter"), I = [];
|
|
1869
|
+
n(l, v, G.toWireType(I, D));
|
|
1862
1870
|
Eb(I);
|
|
1863
1871
|
};
|
|
1864
1872
|
}
|
|
@@ -1882,9 +1890,9 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1882
1890
|
c = Jb(c);
|
|
1883
1891
|
a = U(a);
|
|
1884
1892
|
e.values = {};
|
|
1885
|
-
Ib(b, {name:a, constructor:e, fromWireType:function(
|
|
1886
|
-
return this.constructor.values[
|
|
1887
|
-
}, toWireType:function(
|
|
1893
|
+
Ib(b, {name:a, constructor:e, fromWireType:function(f) {
|
|
1894
|
+
return this.constructor.values[f];
|
|
1895
|
+
}, toWireType:function(f, m) {
|
|
1888
1896
|
return m.value;
|
|
1889
1897
|
}, argPackAdvance:8, readValueFromPointer:fc(a, c, d), v:null,});
|
|
1890
1898
|
Ob(a, e);
|
|
@@ -1904,7 +1912,7 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1904
1912
|
}, toWireType:function(d, e) {
|
|
1905
1913
|
return e;
|
|
1906
1914
|
}, argPackAdvance:8, readValueFromPointer:gc(a, c), v:null,});
|
|
1907
|
-
}, _embind_register_function:function(b, a, c, d, e,
|
|
1915
|
+
}, _embind_register_function:function(b, a, c, d, e, f) {
|
|
1908
1916
|
var m = cc(a, c);
|
|
1909
1917
|
b = U(b);
|
|
1910
1918
|
e = Z(d, e);
|
|
@@ -1912,29 +1920,29 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1912
1920
|
ac(`Cannot call ${b} due to unbound types`, m);
|
|
1913
1921
|
}, a - 1);
|
|
1914
1922
|
V([], m, function(k) {
|
|
1915
|
-
Wb(b, bc(b, [k[0], null].concat(k.slice(1)), null, e,
|
|
1923
|
+
Wb(b, bc(b, [k[0], null].concat(k.slice(1)), null, e, f), a - 1);
|
|
1916
1924
|
return [];
|
|
1917
1925
|
});
|
|
1918
1926
|
}, _embind_register_integer:function(b, a, c, d, e) {
|
|
1919
1927
|
a = U(a);
|
|
1920
1928
|
-1 === e && (e = 4294967295);
|
|
1921
1929
|
e = Jb(c);
|
|
1922
|
-
var
|
|
1930
|
+
var f = k => k;
|
|
1923
1931
|
if (0 === d) {
|
|
1924
1932
|
var m = 32 - 8 * c;
|
|
1925
|
-
|
|
1933
|
+
f = k => k << m >>> m;
|
|
1926
1934
|
}
|
|
1927
1935
|
c = a.includes("unsigned") ? function(k, n) {
|
|
1928
1936
|
return n >>> 0;
|
|
1929
1937
|
} : function(k, n) {
|
|
1930
1938
|
return n;
|
|
1931
1939
|
};
|
|
1932
|
-
Ib(b, {name:a, fromWireType:
|
|
1940
|
+
Ib(b, {name:a, fromWireType:f, toWireType:c, argPackAdvance:8, readValueFromPointer:hc(a, e, 0 !== d), v:null,});
|
|
1933
1941
|
}, _embind_register_memory_view:function(b, a, c) {
|
|
1934
|
-
function d(
|
|
1935
|
-
|
|
1942
|
+
function d(f) {
|
|
1943
|
+
f >>= 2;
|
|
1936
1944
|
var m = P;
|
|
1937
|
-
return new e(m.buffer, m[
|
|
1945
|
+
return new e(m.buffer, m[f + 1], m[f]);
|
|
1938
1946
|
}
|
|
1939
1947
|
var e = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array,][a];
|
|
1940
1948
|
c = U(c);
|
|
@@ -1943,10 +1951,10 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1943
1951
|
a = U(a);
|
|
1944
1952
|
var c = "std::string" === a;
|
|
1945
1953
|
Ib(b, {name:a, fromWireType:function(d) {
|
|
1946
|
-
var e = P[d >> 2],
|
|
1954
|
+
var e = P[d >> 2], f = d + 4;
|
|
1947
1955
|
if (c) {
|
|
1948
|
-
for (var m =
|
|
1949
|
-
var n =
|
|
1956
|
+
for (var m = f, k = 0; k <= e; ++k) {
|
|
1957
|
+
var n = f + k;
|
|
1950
1958
|
if (k == e || 0 == L[n]) {
|
|
1951
1959
|
m = m ? lc(L, m, n - m) : "";
|
|
1952
1960
|
if (void 0 === l) {
|
|
@@ -1960,7 +1968,7 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1960
1968
|
} else {
|
|
1961
1969
|
l = Array(e);
|
|
1962
1970
|
for (k = 0; k < e; ++k) {
|
|
1963
|
-
l[k] = String.fromCharCode(L[
|
|
1971
|
+
l[k] = String.fromCharCode(L[f + k]);
|
|
1964
1972
|
}
|
|
1965
1973
|
l = l.join("");
|
|
1966
1974
|
}
|
|
@@ -1968,23 +1976,23 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1968
1976
|
return l;
|
|
1969
1977
|
}, toWireType:function(d, e) {
|
|
1970
1978
|
e instanceof ArrayBuffer && (e = new Uint8Array(e));
|
|
1971
|
-
var
|
|
1972
|
-
|
|
1973
|
-
var m = c &&
|
|
1974
|
-
var k =
|
|
1979
|
+
var f = "string" == typeof e;
|
|
1980
|
+
f || e instanceof Uint8Array || e instanceof Uint8ClampedArray || e instanceof Int8Array || R("Cannot pass non-string to std::string");
|
|
1981
|
+
var m = c && f ? jc(e) : e.length;
|
|
1982
|
+
var k = Mc(4 + m + 1), n = k + 4;
|
|
1975
1983
|
P[k >> 2] = m;
|
|
1976
|
-
if (c &&
|
|
1984
|
+
if (c && f) {
|
|
1977
1985
|
ic(e, L, n, m + 1);
|
|
1978
1986
|
} else {
|
|
1979
|
-
if (
|
|
1980
|
-
for (
|
|
1981
|
-
var l = e.charCodeAt(
|
|
1987
|
+
if (f) {
|
|
1988
|
+
for (f = 0; f < m; ++f) {
|
|
1989
|
+
var l = e.charCodeAt(f);
|
|
1982
1990
|
255 < l && (mb(n), R("String has UTF-16 code units that do not fit in 8 bits"));
|
|
1983
|
-
L[n +
|
|
1991
|
+
L[n + f] = l;
|
|
1984
1992
|
}
|
|
1985
1993
|
} else {
|
|
1986
|
-
for (
|
|
1987
|
-
L[n +
|
|
1994
|
+
for (f = 0; f < m; ++f) {
|
|
1995
|
+
L[n + f] = e[f];
|
|
1988
1996
|
}
|
|
1989
1997
|
}
|
|
1990
1998
|
}
|
|
@@ -1997,36 +2005,36 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1997
2005
|
c = U(c);
|
|
1998
2006
|
if (2 === a) {
|
|
1999
2007
|
var d = nc;
|
|
2000
|
-
var e =
|
|
2001
|
-
var
|
|
2008
|
+
var e = qc;
|
|
2009
|
+
var f = rc;
|
|
2002
2010
|
var m = () => Da;
|
|
2003
2011
|
var k = 1;
|
|
2004
2012
|
} else {
|
|
2005
|
-
4 === a && (d =
|
|
2013
|
+
4 === a && (d = sc, e = tc, f = uc, m = () => P, k = 2);
|
|
2006
2014
|
}
|
|
2007
2015
|
Ib(b, {name:c, fromWireType:function(n) {
|
|
2008
|
-
for (var l = P[n >> 2], t = m(),
|
|
2009
|
-
var r = n + 4 +
|
|
2010
|
-
if (
|
|
2011
|
-
x = d(x, r - x), void 0 ===
|
|
2016
|
+
for (var l = P[n >> 2], t = m(), w, x = n + 4, g = 0; g <= l; ++g) {
|
|
2017
|
+
var r = n + 4 + g * a;
|
|
2018
|
+
if (g == l || 0 == t[r >> k]) {
|
|
2019
|
+
x = d(x, r - x), void 0 === w ? w = x : (w += String.fromCharCode(0), w += x), x = r + a;
|
|
2012
2020
|
}
|
|
2013
2021
|
}
|
|
2014
2022
|
mb(n);
|
|
2015
|
-
return
|
|
2023
|
+
return w;
|
|
2016
2024
|
}, toWireType:function(n, l) {
|
|
2017
2025
|
"string" != typeof l && R(`Cannot pass non-string to C++ string type ${c}`);
|
|
2018
|
-
var t =
|
|
2019
|
-
P[
|
|
2020
|
-
e(l,
|
|
2021
|
-
null !== n && n.push(mb,
|
|
2022
|
-
return
|
|
2026
|
+
var t = f(l), w = Mc(4 + t + a);
|
|
2027
|
+
P[w >> 2] = t >> k;
|
|
2028
|
+
e(l, w + 4, t + a);
|
|
2029
|
+
null !== n && n.push(mb, w);
|
|
2030
|
+
return w;
|
|
2023
2031
|
}, argPackAdvance:8, readValueFromPointer:Fb, v:function(n) {
|
|
2024
2032
|
mb(n);
|
|
2025
2033
|
},});
|
|
2026
|
-
}, _embind_register_value_object:function(b, a, c, d, e,
|
|
2027
|
-
Db[b] = {name:U(a), fa:Z(c, d), H:Z(e,
|
|
2028
|
-
}, _embind_register_value_object_field:function(b, a, c, d, e,
|
|
2029
|
-
Db[b].sa.push({Sa:U(a), Ya:c, Wa:Z(d, e), Xa:
|
|
2034
|
+
}, _embind_register_value_object:function(b, a, c, d, e, f) {
|
|
2035
|
+
Db[b] = {name:U(a), fa:Z(c, d), H:Z(e, f), sa:[],};
|
|
2036
|
+
}, _embind_register_value_object_field:function(b, a, c, d, e, f, m, k, n, l) {
|
|
2037
|
+
Db[b].sa.push({Sa:U(a), Ya:c, Wa:Z(d, e), Xa:f, lb:m, kb:Z(k, n), mb:l,});
|
|
2030
2038
|
}, _embind_register_void:function(b, a) {
|
|
2031
2039
|
a = U(a);
|
|
2032
2040
|
Ib(b, {cb:!0, name:a, argPackAdvance:0, fromWireType:function() {
|
|
@@ -2039,42 +2047,42 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
2039
2047
|
P[c >> 2] = e;
|
|
2040
2048
|
return a.toWireType(d, b);
|
|
2041
2049
|
}, _emval_call_method:function(b, a, c, d, e) {
|
|
2042
|
-
b =
|
|
2050
|
+
b = xc[b];
|
|
2043
2051
|
a = S(a);
|
|
2044
|
-
c =
|
|
2045
|
-
var
|
|
2046
|
-
P[d >> 2] = ab(
|
|
2047
|
-
return b(a, c,
|
|
2052
|
+
c = wc(c);
|
|
2053
|
+
var f = [];
|
|
2054
|
+
P[d >> 2] = ab(f);
|
|
2055
|
+
return b(a, c, f, e);
|
|
2048
2056
|
}, _emval_call_void_method:function(b, a, c, d) {
|
|
2049
|
-
b =
|
|
2057
|
+
b = xc[b];
|
|
2050
2058
|
a = S(a);
|
|
2051
|
-
c =
|
|
2059
|
+
c = wc(c);
|
|
2052
2060
|
b(a, c, null, d);
|
|
2053
2061
|
}, _emval_decref:ec, _emval_get_method_caller:function(b, a) {
|
|
2054
|
-
var c =
|
|
2062
|
+
var c = zc(b, a), d = c[0];
|
|
2055
2063
|
a = d.name + "_$" + c.slice(1).map(function(m) {
|
|
2056
2064
|
return m.name;
|
|
2057
2065
|
}).join("_") + "$";
|
|
2058
|
-
var e =
|
|
2066
|
+
var e = Ac[a];
|
|
2059
2067
|
if (void 0 !== e) {
|
|
2060
2068
|
return e;
|
|
2061
2069
|
}
|
|
2062
|
-
var
|
|
2063
|
-
e =
|
|
2064
|
-
for (var t = 0,
|
|
2065
|
-
|
|
2070
|
+
var f = Array(b - 1);
|
|
2071
|
+
e = yc((m, k, n, l) => {
|
|
2072
|
+
for (var t = 0, w = 0; w < b - 1; ++w) {
|
|
2073
|
+
f[w] = c[w + 1].readValueFromPointer(l + t), t += c[w + 1].argPackAdvance;
|
|
2066
2074
|
}
|
|
2067
|
-
m = m[k].apply(m,
|
|
2068
|
-
for (
|
|
2069
|
-
c[
|
|
2075
|
+
m = m[k].apply(m, f);
|
|
2076
|
+
for (w = 0; w < b - 1; ++w) {
|
|
2077
|
+
c[w + 1].Na && c[w + 1].Na(f[w]);
|
|
2070
2078
|
}
|
|
2071
2079
|
if (!d.cb) {
|
|
2072
2080
|
return d.toWireType(n, m);
|
|
2073
2081
|
}
|
|
2074
2082
|
});
|
|
2075
|
-
return
|
|
2083
|
+
return Ac[a] = e;
|
|
2076
2084
|
}, _emval_get_module_property:function(b) {
|
|
2077
|
-
b =
|
|
2085
|
+
b = wc(b);
|
|
2078
2086
|
return ab(h[b]);
|
|
2079
2087
|
}, _emval_get_property:function(b, a) {
|
|
2080
2088
|
b = S(b);
|
|
@@ -2083,7 +2091,7 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
2083
2091
|
}, _emval_incref:function(b) {
|
|
2084
2092
|
4 < b && (Q.get(b).Aa += 1);
|
|
2085
2093
|
}, _emval_new_cstring:function(b) {
|
|
2086
|
-
return ab(
|
|
2094
|
+
return ab(wc(b));
|
|
2087
2095
|
}, _emval_new_object:function() {
|
|
2088
2096
|
return ab({});
|
|
2089
2097
|
}, _emval_run_destructors:function(b) {
|
|
@@ -2119,31 +2127,31 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
2119
2127
|
try {
|
|
2120
2128
|
za.grow(e);
|
|
2121
2129
|
Ga();
|
|
2122
|
-
var
|
|
2130
|
+
var f = 1;
|
|
2123
2131
|
break a;
|
|
2124
2132
|
} catch (m) {
|
|
2125
2133
|
}
|
|
2126
|
-
|
|
2134
|
+
f = void 0;
|
|
2127
2135
|
}
|
|
2128
|
-
if (
|
|
2136
|
+
if (f) {
|
|
2129
2137
|
return !0;
|
|
2130
2138
|
}
|
|
2131
2139
|
}
|
|
2132
2140
|
return !1;
|
|
2133
2141
|
}, environ_get:(b, a) => {
|
|
2134
2142
|
var c = 0;
|
|
2135
|
-
|
|
2136
|
-
var
|
|
2137
|
-
e = P[b + 4 * e >> 2] =
|
|
2138
|
-
for (
|
|
2139
|
-
Ba[e++ >> 0] = d.charCodeAt(
|
|
2143
|
+
Dc().forEach(function(d, e) {
|
|
2144
|
+
var f = a + c;
|
|
2145
|
+
e = P[b + 4 * e >> 2] = f;
|
|
2146
|
+
for (f = 0; f < d.length; ++f) {
|
|
2147
|
+
Ba[e++ >> 0] = d.charCodeAt(f);
|
|
2140
2148
|
}
|
|
2141
2149
|
Ba[e >> 0] = 0;
|
|
2142
2150
|
c += d.length + 1;
|
|
2143
2151
|
});
|
|
2144
2152
|
return 0;
|
|
2145
2153
|
}, environ_sizes_get:(b, a) => {
|
|
2146
|
-
var c =
|
|
2154
|
+
var c = Dc();
|
|
2147
2155
|
P[b >> 2] = c.length;
|
|
2148
2156
|
var d = 0;
|
|
2149
2157
|
c.forEach(function(e) {
|
|
@@ -2154,18 +2162,18 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
2154
2162
|
}, fd_close:() => 52, fd_seek:function() {
|
|
2155
2163
|
return 70;
|
|
2156
2164
|
}, fd_write:(b, a, c, d) => {
|
|
2157
|
-
for (var e = 0,
|
|
2165
|
+
for (var e = 0, f = 0; f < c; f++) {
|
|
2158
2166
|
var m = P[a >> 2], k = P[a + 4 >> 2];
|
|
2159
2167
|
a += 8;
|
|
2160
2168
|
for (var n = 0; n < k; n++) {
|
|
2161
|
-
var l = L[m + n], t =
|
|
2169
|
+
var l = L[m + n], t = Ec[b];
|
|
2162
2170
|
0 === l || 10 === l ? ((1 === b ? ta : ua)(lc(t, 0)), t.length = 0) : t.push(l);
|
|
2163
2171
|
}
|
|
2164
2172
|
e += k;
|
|
2165
2173
|
}
|
|
2166
2174
|
P[d >> 2] = e;
|
|
2167
2175
|
return 0;
|
|
2168
|
-
}, strftime_l:(b, a, c, d) =>
|
|
2176
|
+
}, strftime_l:(b, a, c, d) => Jc(b, a, c, d)};
|
|
2169
2177
|
(function() {
|
|
2170
2178
|
function b(c) {
|
|
2171
2179
|
J = c = c.exports;
|
|
@@ -2182,7 +2190,7 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
2182
2190
|
}
|
|
2183
2191
|
return c;
|
|
2184
2192
|
}
|
|
2185
|
-
var a = {env:
|
|
2193
|
+
var a = {env:Nc, wasi_snapshot_preview1:Nc,};
|
|
2186
2194
|
Ma++;
|
|
2187
2195
|
h.monitorRunDependencies && h.monitorRunDependencies(Ma);
|
|
2188
2196
|
if (h.instantiateWasm) {
|
|
@@ -2197,21 +2205,21 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
2197
2205
|
}).catch(ba);
|
|
2198
2206
|
return {};
|
|
2199
2207
|
})();
|
|
2200
|
-
var mb = b => (mb = J.free)(b),
|
|
2208
|
+
var mb = b => (mb = J.free)(b), Mc = b => (Mc = J.malloc)(b), lb = b => (lb = J.__getTypeName)(b);
|
|
2201
2209
|
h.__embind_initialize_bindings = () => (h.__embind_initialize_bindings = J._embind_initialize_bindings)();
|
|
2202
2210
|
h.dynCall_jiji = (b, a, c, d, e) => (h.dynCall_jiji = J.dynCall_jiji)(b, a, c, d, e);
|
|
2203
|
-
h.dynCall_viijii = (b, a, c, d, e,
|
|
2204
|
-
h.dynCall_iiiiij = (b, a, c, d, e,
|
|
2205
|
-
h.dynCall_iiiiijj = (b, a, c, d, e,
|
|
2206
|
-
h.dynCall_iiiiiijj = (b, a, c, d, e,
|
|
2207
|
-
var
|
|
2208
|
-
Oa = function
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
+
h.dynCall_viijii = (b, a, c, d, e, f, m) => (h.dynCall_viijii = J.dynCall_viijii)(b, a, c, d, e, f, m);
|
|
2212
|
+
h.dynCall_iiiiij = (b, a, c, d, e, f, m) => (h.dynCall_iiiiij = J.dynCall_iiiiij)(b, a, c, d, e, f, m);
|
|
2213
|
+
h.dynCall_iiiiijj = (b, a, c, d, e, f, m, k, n) => (h.dynCall_iiiiijj = J.dynCall_iiiiijj)(b, a, c, d, e, f, m, k, n);
|
|
2214
|
+
h.dynCall_iiiiiijj = (b, a, c, d, e, f, m, k, n, l) => (h.dynCall_iiiiiijj = J.dynCall_iiiiiijj)(b, a, c, d, e, f, m, k, n, l);
|
|
2215
|
+
var Oc;
|
|
2216
|
+
Oa = function Pc() {
|
|
2217
|
+
Oc || Qc();
|
|
2218
|
+
Oc || (Oa = Pc);
|
|
2211
2219
|
};
|
|
2212
|
-
function
|
|
2220
|
+
function Qc() {
|
|
2213
2221
|
function b() {
|
|
2214
|
-
if (!
|
|
2222
|
+
if (!Oc && (Oc = !0, h.calledRun = !0, !Aa)) {
|
|
2215
2223
|
Wa(Ja);
|
|
2216
2224
|
aa(h);
|
|
2217
2225
|
if (h.onRuntimeInitialized) {
|
|
@@ -2246,7 +2254,7 @@ if (h.preInit) {
|
|
|
2246
2254
|
h.preInit.pop()();
|
|
2247
2255
|
}
|
|
2248
2256
|
}
|
|
2249
|
-
|
|
2257
|
+
Qc();
|
|
2250
2258
|
|
|
2251
2259
|
|
|
2252
2260
|
|
|
@@ -2261,7 +2269,7 @@ Pc();
|
|
|
2261
2269
|
/* 2 */
|
|
2262
2270
|
/***/ ((module) => {
|
|
2263
2271
|
|
|
2264
|
-
module.exports = JSON.parse('{"name":"@rive-app/canvas-lite","version":"2.
|
|
2272
|
+
module.exports = JSON.parse('{"name":"@rive-app/canvas-lite","version":"2.22.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_fallback.wasm","rive.d.ts","rive_advanced.mjs.d.ts"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}');
|
|
2265
2273
|
|
|
2266
2274
|
/***/ }),
|
|
2267
2275
|
/* 3 */
|
|
@@ -2805,6 +2813,7 @@ var Fit;
|
|
|
2805
2813
|
Fit["FitHeight"] = "fitHeight";
|
|
2806
2814
|
Fit["None"] = "none";
|
|
2807
2815
|
Fit["ScaleDown"] = "scaleDown";
|
|
2816
|
+
Fit["Layout"] = "layout";
|
|
2808
2817
|
})(Fit || (Fit = {}));
|
|
2809
2818
|
// Alignment options for the canvas
|
|
2810
2819
|
var Alignment;
|
|
@@ -2822,13 +2831,14 @@ var Alignment;
|
|
|
2822
2831
|
// Alignment options for Rive animations in a HTML canvas
|
|
2823
2832
|
var Layout = /** @class */ (function () {
|
|
2824
2833
|
function Layout(params) {
|
|
2825
|
-
var _a, _b, _c, _d, _e, _f;
|
|
2834
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
2826
2835
|
this.fit = (_a = params === null || params === void 0 ? void 0 : params.fit) !== null && _a !== void 0 ? _a : Fit.Contain;
|
|
2827
2836
|
this.alignment = (_b = params === null || params === void 0 ? void 0 : params.alignment) !== null && _b !== void 0 ? _b : Alignment.Center;
|
|
2828
|
-
this.
|
|
2829
|
-
this.
|
|
2830
|
-
this.
|
|
2831
|
-
this.
|
|
2837
|
+
this.layoutScaleFactor = (_c = params === null || params === void 0 ? void 0 : params.layoutScaleFactor) !== null && _c !== void 0 ? _c : 1;
|
|
2838
|
+
this.minX = (_d = params === null || params === void 0 ? void 0 : params.minX) !== null && _d !== void 0 ? _d : 0;
|
|
2839
|
+
this.minY = (_e = params === null || params === void 0 ? void 0 : params.minY) !== null && _e !== void 0 ? _e : 0;
|
|
2840
|
+
this.maxX = (_f = params === null || params === void 0 ? void 0 : params.maxX) !== null && _f !== void 0 ? _f : 0;
|
|
2841
|
+
this.maxY = (_g = params === null || params === void 0 ? void 0 : params.maxY) !== null && _g !== void 0 ? _g : 0;
|
|
2832
2842
|
}
|
|
2833
2843
|
// Alternative constructor to build a Layout from an interface/object
|
|
2834
2844
|
Layout.new = function (_a) {
|
|
@@ -2840,10 +2850,11 @@ var Layout = /** @class */ (function () {
|
|
|
2840
2850
|
* Makes a copy of the layout, replacing any specified parameters
|
|
2841
2851
|
*/
|
|
2842
2852
|
Layout.prototype.copyWith = function (_a) {
|
|
2843
|
-
var fit = _a.fit, alignment = _a.alignment, minX = _a.minX, minY = _a.minY, maxX = _a.maxX, maxY = _a.maxY;
|
|
2853
|
+
var fit = _a.fit, alignment = _a.alignment, layoutScaleFactor = _a.layoutScaleFactor, minX = _a.minX, minY = _a.minY, maxX = _a.maxX, maxY = _a.maxY;
|
|
2844
2854
|
return new Layout({
|
|
2845
2855
|
fit: fit !== null && fit !== void 0 ? fit : this.fit,
|
|
2846
2856
|
alignment: alignment !== null && alignment !== void 0 ? alignment : this.alignment,
|
|
2857
|
+
layoutScaleFactor: layoutScaleFactor !== null && layoutScaleFactor !== void 0 ? layoutScaleFactor : this.layoutScaleFactor,
|
|
2847
2858
|
minX: minX !== null && minX !== void 0 ? minX : this.minX,
|
|
2848
2859
|
minY: minY !== null && minY !== void 0 ? minY : this.minY,
|
|
2849
2860
|
maxX: maxX !== null && maxX !== void 0 ? maxX : this.maxX,
|
|
@@ -2867,6 +2878,8 @@ var Layout = /** @class */ (function () {
|
|
|
2867
2878
|
fit = rive.Fit.fitHeight;
|
|
2868
2879
|
else if (this.fit === Fit.ScaleDown)
|
|
2869
2880
|
fit = rive.Fit.scaleDown;
|
|
2881
|
+
else if (this.fit === Fit.Layout)
|
|
2882
|
+
fit = rive.Fit.layout;
|
|
2870
2883
|
else
|
|
2871
2884
|
fit = rive.Fit.none;
|
|
2872
2885
|
this.cachedRuntimeFit = fit;
|
|
@@ -3985,6 +3998,7 @@ var Rive = /** @class */ (function () {
|
|
|
3985
3998
|
this.enableRiveAssetCDN = true;
|
|
3986
3999
|
// Keep a local value of the set volume to update it asynchronously
|
|
3987
4000
|
this._volume = 1;
|
|
4001
|
+
this._devicePixelRatioUsed = 1;
|
|
3988
4002
|
// Whether the canvas element's size is 0
|
|
3989
4003
|
this._hasZeroSize = false;
|
|
3990
4004
|
// Durations to generate a frame for the last second. Used for performance profiling.
|
|
@@ -4411,7 +4425,7 @@ var Rive = /** @class */ (function () {
|
|
|
4411
4425
|
minY: _layout.minY,
|
|
4412
4426
|
maxX: _layout.maxX,
|
|
4413
4427
|
maxY: _layout.maxY,
|
|
4414
|
-
}, artboard.bounds);
|
|
4428
|
+
}, artboard.bounds, this._devicePixelRatioUsed * _layout.layoutScaleFactor);
|
|
4415
4429
|
};
|
|
4416
4430
|
Object.defineProperty(Rive.prototype, "fps", {
|
|
4417
4431
|
get: function () {
|
|
@@ -4664,10 +4678,16 @@ var Rive = /** @class */ (function () {
|
|
|
4664
4678
|
if (this.canvas instanceof HTMLCanvasElement && !!window) {
|
|
4665
4679
|
var _a = this.canvas.getBoundingClientRect(), width = _a.width, height = _a.height;
|
|
4666
4680
|
var dpr = customDevicePixelRatio || window.devicePixelRatio || 1;
|
|
4681
|
+
this._devicePixelRatioUsed = dpr;
|
|
4667
4682
|
this.canvas.width = dpr * width;
|
|
4668
4683
|
this.canvas.height = dpr * height;
|
|
4669
4684
|
this.startRendering();
|
|
4670
4685
|
this.resizeToCanvas();
|
|
4686
|
+
if (this.layout.fit === Fit.Layout) {
|
|
4687
|
+
var scaleFactor = this._layout.layoutScaleFactor;
|
|
4688
|
+
this.artboard.width = width / scaleFactor;
|
|
4689
|
+
this.artboard.height = height / scaleFactor;
|
|
4690
|
+
}
|
|
4671
4691
|
}
|
|
4672
4692
|
};
|
|
4673
4693
|
Object.defineProperty(Rive.prototype, "source", {
|