-
Notifications
You must be signed in to change notification settings - Fork 0
/
canvaskit.js
281 lines (275 loc) · 123 KB
/
canvaskit.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
var CanvasKitInit = (function() {
var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined;
if (typeof __filename !== 'undefined') _scriptDir = _scriptDir || __filename;
return (
function(CanvasKitInit) {
CanvasKitInit = CanvasKitInit || {};
var t;t||(t=typeof CanvasKitInit !== 'undefined' ? CanvasKitInit : {});var aa,ca;t.ready=new Promise(function(a,b){aa=a;ca=b});
(function(a){a.Ud=a.Ud||[];a.Ud.push(function(){a.MakeSWCanvasSurface=function(b){var c=b;if("CANVAS"!==c.tagName&&(c=document.getElementById(b),!c))throw"Canvas with id "+b+" was not found";if(b=a.MakeSurface(c.width,c.height))b.Qd=c;return b};a.MakeCanvasSurface||(a.MakeCanvasSurface=a.MakeSWCanvasSurface);a.MakeSurface=function(b,c){var d={width:b,height:c,colorType:a.ColorType.RGBA_8888,alphaType:a.AlphaType.Unpremul,colorSpace:a.ColorSpace.SRGB},g=b*c*4,l=a._malloc(g);if(d=a.Surface._makeRasterDirect(d,
l,4*b))d.Qd=null,d.Of=b,d.Kf=c,d.Nf=g,d.jf=l,d.getCanvas().clear(a.TRANSPARENT);return d};a.MakeRasterDirectSurface=function(b,c,d){return a.Surface._makeRasterDirect(b,c.byteOffset,d)};a.Surface.prototype.flush=function(b){this._flush();if(this.Qd){var c=new Uint8ClampedArray(a.HEAPU8.buffer,this.jf,this.Nf);c=new ImageData(c,this.Of,this.Kf);b?this.Qd.getContext("2d").putImageData(c,0,0,b[0],b[1],b[2]-b[0],b[3]-b[1]):this.Qd.getContext("2d").putImageData(c,0,0)}};a.Surface.prototype.dispose=function(){this.jf&&
a._free(this.jf);this.delete()};a.currentContext=a.currentContext||function(){};a.setCurrentContext=a.setCurrentContext||function(){}})})(t);
(function(a){a.Ud=a.Ud||[];a.Ud.push(function(){function b(c,d,g){return c&&c.hasOwnProperty(d)?c[d]:g}a.GetWebGLContext=function(c,d){if(!c)throw"null canvas passed into makeWebGLContext";var g={alpha:b(d,"alpha",1),depth:b(d,"depth",1),stencil:b(d,"stencil",8),antialias:b(d,"antialias",0),premultipliedAlpha:b(d,"premultipliedAlpha",1),preserveDrawingBuffer:b(d,"preserveDrawingBuffer",0),preferLowPowerToHighPerformance:b(d,"preferLowPowerToHighPerformance",0),failIfMajorPerformanceCaveat:b(d,"failIfMajorPerformanceCaveat",
0),enableExtensionsByDefault:b(d,"enableExtensionsByDefault",1),explicitSwapControl:b(d,"explicitSwapControl",0),renderViaOffscreenBackBuffer:b(d,"renderViaOffscreenBackBuffer",0)};g.majorVersion=d&&d.majorVersion?d.majorVersion:"undefined"!==typeof WebGL2RenderingContext?2:1;if(g.explicitSwapControl)throw"explicitSwapControl is not supported";if(c=1<g.majorVersion?c.getContext("webgl2",g):c.getContext("webgl",g)){d=da(ia);var l={ag:d,attributes:g,version:g.majorVersion,yf:c};c.canvas&&(c.canvas.If=
l);ia[d]=l;("undefined"===typeof g.Tf||g.Tf)&&ja(l);g=d}else g=0;if(!g)return 0;ka(g);return g};a.MakeWebGLCanvasSurface=function(c,d,g){d=d||null;var l=c,n="undefined"!==typeof OffscreenCanvas&&l instanceof OffscreenCanvas;if(!("undefined"!==typeof HTMLCanvasElement&&l instanceof HTMLCanvasElement||n||(l=document.getElementById(c),l)))throw"Canvas with id "+c+" was not found";c=this.GetWebGLContext(l,g);g=l.If.version;if(!c||0>c)throw"failed to create webgl context: err "+c;n=this.MakeGrContext(c);
d=this.MakeOnScreenGLSurface(n,l.width,l.height,d);if(!d)return d=l.cloneNode(!0),l.parentNode.replaceChild(d,l),d.classList.add("ck-replaced"),a.MakeSWCanvasSurface(d);d.qe=c;d.grContext=n;d.openGLversion=g;return d};a.MakeCanvasSurface=a.MakeWebGLCanvasSurface})})(t);
(function(a){function b(f){return Math.round(Math.max(0,Math.min(f||0,255)))}function c(f){return f?f.constructor===Float32Array&&4===f.length:!1}function d(f){return(b(255*f[3])<<24|b(255*f[0])<<16|b(255*f[1])<<8|b(255*f[2])<<0)>>>0}function g(f){if(f instanceof Float32Array){for(var m=Math.floor(f.length/4),y=new Uint32Array(m),D=0;D<m;D++)y[D]=d(f.slice(4*D,4*(D+1)));return y}if(f instanceof Uint32Array)return f;if(f instanceof Array&&f[0]instanceof Float32Array)return f.map(d)}function l(f){if(void 0===
f)return 1;var m=parseFloat(f);return f&&-1!==f.indexOf("%")?m/100:m}function n(f,m,y){if(!f||!f.length)return 0;if(f._ck)return f.byteOffset;var D=a[m].BYTES_PER_ELEMENT;y||(y=a._malloc(f.length*D));a[m].set(f,y/D);return y}function u(f){var m={fe:0,count:f.length,Te:a.ColorType.RGBA_F32};if(f instanceof Float32Array)m.fe=n(f,"HEAPF32"),m.count=f.length/4;else if(f instanceof Uint32Array)m.fe=n(f,"HEAPU32"),m.Te=a.ColorType.RGBA_8888;else if(f instanceof Array){if(f&&f.length){for(var y=a._malloc(16*
f.length),D=0,L=y/4,U=0;U<f.length;U++)for(var V=0;4>V;V++)a.HEAPF32[L+D]=f[U][V],D++;f=y}else f=0;m.fe=f}else throw"Invalid argument to copyFlexibleColorArray, Not a color array "+typeof f;return m}function A(f){if(!f)return 0;if(f.length){if(6!==f.length&&9!==f.length)throw"invalid matrix size";var m=n(f,"HEAPF32",Ha);6===f.length&&a.HEAPF32.set(Db,6+m/4);return m}m=hc.toTypedArray();m[0]=f.m11;m[1]=f.m21;m[2]=f.m41;m[3]=f.m12;m[4]=f.m22;m[5]=f.m42;m[6]=f.m14;m[7]=f.m24;m[8]=f.m44;return Ha}function F(f){if(!f)return 0;
var m=ic.toTypedArray();if(f.length){if(16!==f.length&&6!==f.length&&9!==f.length)throw"invalid matrix size";if(16===f.length)return n(f,"HEAPF32",Ia);m.fill(0);m[0]=f[0];m[1]=f[1];m[3]=f[2];m[4]=f[3];m[5]=f[4];m[7]=f[5];m[12]=f[6];m[13]=f[7];m[15]=f[8];6===f.length&&(m[12]=0,m[13]=0,m[15]=1);return Ia}m[0]=f.m11;m[1]=f.m21;m[2]=f.m31;m[3]=f.m41;m[4]=f.m12;m[5]=f.m22;m[6]=f.m32;m[7]=f.m42;m[8]=f.m13;m[9]=f.m23;m[10]=f.m33;m[11]=f.m43;m[12]=f.m14;m[13]=f.m24;m[14]=f.m34;m[15]=f.m44;return Ia}function I(f){for(var m=
Array(16),y=0;16>y;y++)m[y]=a.HEAPF32[f/4+y];return m}function M(f,m){return n(f,"HEAPF32",m||mb)}function Q(f,m,y,D){var L=jc.toTypedArray();L[0]=f;L[1]=m;L[2]=y;L[3]=D;return mb}function B(f){for(var m=new Float32Array(4),y=0;4>y;y++)m[y]=a.HEAPF32[f/4+y];return m}function N(f,m){return n(f,"HEAPF32",m||Ga)}function W(f,m){return n(f,"HEAPF32",m||kc)}function ea(f,m){if(pa)require("fs").writeFile(m,new Buffer(f),function(D){if(D)throw D;});else{url=window.URL.createObjectURL(new Blob([f],{type:"application/octet-stream"}));
var y=document.createElement("a");document.body.appendChild(y);y.href=url;y.download=m;y.click();setTimeout(function(){URL.revokeObjectURL(url);y.remove()},50)}}function T(f,m){m&&!m._ck&&a._free(f)}a.Color=function(f,m,y,D){void 0===D&&(D=1);return a.Color4f(b(f)/255,b(m)/255,b(y)/255,D)};a.ColorAsInt=function(f,m,y,D){void 0===D&&(D=255);return(b(D)<<24|b(f)<<16|b(m)<<8|b(y)<<0&268435455)>>>0};a.Color4f=function(f,m,y,D){void 0===D&&(D=1);return Float32Array.of(f,m,y,D)};Object.defineProperty(a,
"TRANSPARENT",{get:function(){return a.Color4f(0,0,0,0)}});Object.defineProperty(a,"BLACK",{get:function(){return a.Color4f(0,0,0,1)}});Object.defineProperty(a,"WHITE",{get:function(){return a.Color4f(1,1,1,1)}});Object.defineProperty(a,"RED",{get:function(){return a.Color4f(1,0,0,1)}});Object.defineProperty(a,"GREEN",{get:function(){return a.Color4f(0,1,0,1)}});Object.defineProperty(a,"BLUE",{get:function(){return a.Color4f(0,0,1,1)}});Object.defineProperty(a,"YELLOW",{get:function(){return a.Color4f(1,
1,0,1)}});Object.defineProperty(a,"CYAN",{get:function(){return a.Color4f(0,1,1,1)}});Object.defineProperty(a,"MAGENTA",{get:function(){return a.Color4f(1,0,1,1)}});a.getColorComponents=function(f){return[Math.floor(255*f[0]),Math.floor(255*f[1]),Math.floor(255*f[2]),f[3]]};a.parseColorString=function(f,m){f=f.toLowerCase();if(f.startsWith("#")){m=255;switch(f.length){case 9:m=parseInt(f.slice(7,9),16);case 7:var y=parseInt(f.slice(1,3),16);var D=parseInt(f.slice(3,5),16);var L=parseInt(f.slice(5,
7),16);break;case 5:m=17*parseInt(f.slice(4,5),16);case 4:y=17*parseInt(f.slice(1,2),16),D=17*parseInt(f.slice(2,3),16),L=17*parseInt(f.slice(3,4),16)}return a.Color(y,D,L,m/255)}return f.startsWith("rgba")?(f=f.slice(5,-1),f=f.split(","),a.Color(+f[0],+f[1],+f[2],l(f[3]))):f.startsWith("rgb")?(f=f.slice(4,-1),f=f.split(","),a.Color(+f[0],+f[1],+f[2],l(f[3]))):f.startsWith("gray(")||f.startsWith("hsl")||!m||(f=m[f],void 0===f)?a.BLACK:f};a.multiplyByAlpha=function(f,m){f=f.slice();f[3]=Math.max(0,
Math.min(f[3]*m,1));return f};var pa=!(new Function("try {return this===window;}catch(e){ return false;}"))(),Db=Float32Array.of(0,0,1),Ha=0,hc,Ia=0,ic,mb=0,jc,Ja,Ga=0,Oc,Pc=0,Qc,lc=0,Rc,kc=0,Sc,Tc=0,mc={};a.ue=function(){this.pe=[];this.Yd=null;Object.defineProperty(this,"length",{enumerable:!0,get:function(){return this.pe.length/4}})};a.ue.prototype.push=function(f,m,y,D){this.Yd||this.pe.push(f,m,y,D)};a.ue.prototype.set=function(f,m,y,D,L){0>f||f>=this.pe.length/4||(f*=4,this.Yd?(f=this.Yd/4+
f,a.HEAPF32[f]=m,a.HEAPF32[f+1]=y,a.HEAPF32[f+2]=D,a.HEAPF32[f+3]=L):(this.pe[f]=m,this.pe[f+1]=y,this.pe[f+2]=D,this.pe[f+3]=L))};a.ue.prototype.build=function(){return this.Yd?this.Yd:this.Yd=n(this.pe,"HEAPF32")};a.ue.prototype.delete=function(){this.Yd&&(a._free(this.Yd),this.Yd=null)};a.Me=function(){this.Se=[];this.Yd=null;Object.defineProperty(this,"length",{enumerable:!0,get:function(){return this.Se.length}})};a.Me.prototype.push=function(f){this.Yd||this.Se.push(f)};a.Me.prototype.set=function(f,
m){0>f||f>=this.Se.length||(f*=4,this.Yd?a.HEAPU32[this.Yd/4+f]=m:this.Se[f]=m)};a.Me.prototype.build=function(){return this.Yd?this.Yd:this.Yd=n(this.Se,"HEAPU32")};a.Me.prototype.delete=function(){this.Yd&&(a._free(this.Yd),this.Yd=null)};a.RectBuilder=a.ue;a.RSXFormBuilder=a.ue;a.ColorBuilder=a.Me;a.Malloc=function(f,m){var y=a._malloc(m*f.BYTES_PER_ELEMENT);return{_ck:!0,length:m,byteOffset:y,te:null,subarray:function(D,L){D=this.toTypedArray().subarray(D,L);D._ck=!0;return D},toTypedArray:function(){if(this.te&&
this.te.length)return this.te;this.te=new f(a.HEAPU8.buffer,y,m);this.te._ck=!0;return this.te}}};a.Free=function(f){a._free(f.byteOffset);f.byteOffset=0;f.toTypedArray=null;f.te=null};a.onRuntimeInitialized=function(){function f(e,k,r,w,p){for(var x=0;x<e.length;x++)k[x*r+(x*p+w+r)%r]=e[x];return k}function m(e){for(var k=e*e,r=Array(k);k--;)r[k]=0==k%(e+1)?1:0;return r}function y(){for(var e=0,k=0;k<arguments.length-1;k+=2)e+=arguments[k]*arguments[k+1];return e}function D(e,k,r){for(var w=Array(e.length),
p=0;p<r;p++)for(var x=0;x<r;x++){for(var K=0,O=0;O<r;O++)K+=e[r*p+O]*k[r*O+x];w[p*r+x]=K}return w}function L(e,k){for(var r=D(k[0],k[1],e),w=2;w<k.length;)r=D(r,k[w],e),w++;return r}function U(e,k,r,w,p,x){x||(x=4*w.width,w.colorType===a.ColorType.RGBA_F16?x*=2:w.colorType===a.ColorType.RGBA_F32&&(x*=4));var K=x*w.height;var O=p?p.byteOffset:a._malloc(K);if(!e._readPixels(w,O,x,k,r))return p||a._free(O),null;if(p)return p.toTypedArray();switch(w.colorType){case a.ColorType.RGBA_8888:case a.ColorType.RGBA_F16:e=
(new Uint8Array(a.HEAPU8.buffer,O,K)).slice();break;case a.ColorType.RGBA_F32:e=(new Float32Array(a.HEAPU8.buffer,O,K)).slice();break;default:return null}a._free(O);return e}jc=a.Malloc(Float32Array,4);mb=jc.byteOffset;ic=a.Malloc(Float32Array,16);Ia=ic.byteOffset;hc=a.Malloc(Float32Array,9);Ha=hc.byteOffset;Rc=a.Malloc(Float32Array,12);kc=Rc.byteOffset;Sc=a.Malloc(Float32Array,12);Tc=Sc.byteOffset;Ja=a.Malloc(Float32Array,4);Ga=Ja.byteOffset;Oc=a.Malloc(Float32Array,4);Pc=Oc.byteOffset;Qc=a.Malloc(Int32Array,
4);lc=Qc.byteOffset;a.ColorSpace.SRGB=a.ColorSpace._MakeSRGB();a.ColorSpace.DISPLAY_P3=a.ColorSpace._MakeDisplayP3();a.ColorSpace.ADOBE_RGB=a.ColorSpace._MakeAdobeRGB();a.Matrix={};a.Matrix.identity=function(){return m(3)};a.Matrix.invert=function(e){var k=e[0]*e[4]*e[8]+e[1]*e[5]*e[6]+e[2]*e[3]*e[7]-e[2]*e[4]*e[6]-e[1]*e[3]*e[8]-e[0]*e[5]*e[7];return k?[(e[4]*e[8]-e[5]*e[7])/k,(e[2]*e[7]-e[1]*e[8])/k,(e[1]*e[5]-e[2]*e[4])/k,(e[5]*e[6]-e[3]*e[8])/k,(e[0]*e[8]-e[2]*e[6])/k,(e[2]*e[3]-e[0]*e[5])/k,
(e[3]*e[7]-e[4]*e[6])/k,(e[1]*e[6]-e[0]*e[7])/k,(e[0]*e[4]-e[1]*e[3])/k]:null};a.Matrix.mapPoints=function(e,k){for(var r=0;r<k.length;r+=2){var w=k[r],p=k[r+1],x=e[6]*w+e[7]*p+e[8],K=e[3]*w+e[4]*p+e[5];k[r]=(e[0]*w+e[1]*p+e[2])/x;k[r+1]=K/x}return k};a.Matrix.multiply=function(){return L(3,arguments)};a.Matrix.rotated=function(e,k,r){k=k||0;r=r||0;var w=Math.sin(e);e=Math.cos(e);return[e,-w,y(w,r,1-e,k),w,e,y(-w,k,1-e,r),0,0,1]};a.Matrix.scaled=function(e,k,r,w){r=r||0;w=w||0;var p=f([e,k],m(3),
3,0,1);return f([r-e*r,w-k*w],p,3,2,0)};a.Matrix.skewed=function(e,k,r,w){r=r||0;w=w||0;var p=f([e,k],m(3),3,1,-1);return f([-e*r,-k*w],p,3,2,0)};a.Matrix.translated=function(e,k){return f(arguments,m(3),3,2,0)};a.Vector={};a.Vector.dot=function(e,k){return e.map(function(r,w){return r*k[w]}).reduce(function(r,w){return r+w})};a.Vector.lengthSquared=function(e){return a.Vector.dot(e,e)};a.Vector.length=function(e){return Math.sqrt(a.Vector.lengthSquared(e))};a.Vector.mulScalar=function(e,k){return e.map(function(r){return r*
k})};a.Vector.add=function(e,k){return e.map(function(r,w){return r+k[w]})};a.Vector.sub=function(e,k){return e.map(function(r,w){return r-k[w]})};a.Vector.dist=function(e,k){return a.Vector.length(a.Vector.sub(e,k))};a.Vector.normalize=function(e){return a.Vector.mulScalar(e,1/a.Vector.length(e))};a.Vector.cross=function(e,k){return[e[1]*k[2]-e[2]*k[1],e[2]*k[0]-e[0]*k[2],e[0]*k[1]-e[1]*k[0]]};a.M44={};a.M44.identity=function(){return m(4)};a.M44.translated=function(e){return f(e,m(4),4,3,0)};a.M44.scaled=
function(e){return f(e,m(4),4,0,1)};a.M44.rotated=function(e,k){return a.M44.rotatedUnitSinCos(a.Vector.normalize(e),Math.sin(k),Math.cos(k))};a.M44.rotatedUnitSinCos=function(e,k,r){var w=e[0],p=e[1];e=e[2];var x=1-r;return[x*w*w+r,x*w*p-k*e,x*w*e+k*p,0,x*w*p+k*e,x*p*p+r,x*p*e-k*w,0,x*w*e-k*p,x*p*e+k*w,x*e*e+r,0,0,0,0,1]};a.M44.lookat=function(e,k,r){k=a.Vector.normalize(a.Vector.sub(k,e));r=a.Vector.normalize(r);r=a.Vector.normalize(a.Vector.cross(k,r));var w=a.M44.identity();f(r,w,4,0,0);f(a.Vector.cross(r,
k),w,4,1,0);f(a.Vector.mulScalar(k,-1),w,4,2,0);f(e,w,4,3,0);e=a.M44.invert(w);return null===e?a.M44.identity():e};a.M44.perspective=function(e,k,r){var w=1/(k-e);r/=2;r=Math.cos(r)/Math.sin(r);return[r,0,0,0,0,r,0,0,0,0,(k+e)*w,2*k*e*w,0,0,-1,1]};a.M44.rc=function(e,k,r){return e[4*k+r]};a.M44.multiply=function(){return L(4,arguments)};a.M44.invert=function(e){var k=e[0],r=e[4],w=e[8],p=e[12],x=e[1],K=e[5],O=e[9],S=e[13],Y=e[2],fa=e[6],ha=e[10],H=e[14],h=e[3],q=e[7],z=e[11];e=e[15];var C=k*K-r*x,
E=k*O-w*x,G=k*S-p*x,P=r*O-w*K,ba=r*S-p*K,la=w*S-p*O,ra=Y*q-fa*h,sa=Y*z-ha*h,Za=Y*e-H*h,$a=fa*z-ha*q,ab=fa*e-H*q,bb=ha*e-H*z,Uc=C*bb-E*ab+G*$a+P*Za-ba*sa+la*ra,ta=1/Uc;if(0===Uc||Infinity===ta)return null;C*=ta;E*=ta;G*=ta;P*=ta;ba*=ta;la*=ta;ra*=ta;sa*=ta;Za*=ta;$a*=ta;ab*=ta;bb*=ta;k=[K*bb-O*ab+S*$a,O*Za-x*bb-S*sa,x*ab-K*Za+S*ra,K*sa-x*$a-O*ra,w*ab-r*bb-p*$a,k*bb-w*Za+p*sa,r*Za-k*ab-p*ra,k*$a-r*sa+w*ra,q*la-z*ba+e*P,z*G-h*la-e*E,h*ba-q*G+e*C,q*E-h*P-z*C,ha*ba-fa*la-H*P,Y*la-ha*G+H*E,fa*G-Y*ba-H*
C,Y*P-fa*E+ha*C];return k.every(function(nc){return!isNaN(nc)&&Infinity!==nc&&-Infinity!==nc})?k:null};a.M44.transpose=function(e){return[e[0],e[4],e[8],e[12],e[1],e[5],e[9],e[13],e[2],e[6],e[10],e[14],e[3],e[7],e[11],e[15]]};a.M44.mustInvert=function(e){e=a.M44.invert(e);if(null===e)throw"Matrix not invertible";return e};a.M44.setupCamera=function(e,k,r){var w=a.M44.lookat(r.eye,r.coa,r.up);r=a.M44.perspective(r.near,r.far,r.angle);k=[(e[2]-e[0])/2,(e[3]-e[1])/2,k];e=a.M44.multiply(a.M44.translated([(e[0]+
e[2])/2,(e[1]+e[3])/2,0]),a.M44.scaled(k));return a.M44.multiply(e,r,w,a.M44.mustInvert(e))};a.ColorMatrix={};a.ColorMatrix.identity=function(){var e=new Float32Array(20);e[0]=1;e[6]=1;e[12]=1;e[18]=1;return e};a.ColorMatrix.scaled=function(e,k,r,w){var p=new Float32Array(20);p[0]=e;p[6]=k;p[12]=r;p[18]=w;return p};var V=[[6,7,11,12],[0,10,2,12],[0,1,5,6]];a.ColorMatrix.rotated=function(e,k,r){var w=a.ColorMatrix.identity();e=V[e];w[e[0]]=r;w[e[1]]=k;w[e[2]]=-k;w[e[3]]=r;return w};a.ColorMatrix.postTranslate=
function(e,k,r,w,p){e[4]+=k;e[9]+=r;e[14]+=w;e[19]+=p;return e};a.ColorMatrix.concat=function(e,k){for(var r=new Float32Array(20),w=0,p=0;20>p;p+=5){for(var x=0;4>x;x++)r[w++]=e[p]*k[x]+e[p+1]*k[x+5]+e[p+2]*k[x+10]+e[p+3]*k[x+15];r[w++]=e[p]*k[4]+e[p+1]*k[9]+e[p+2]*k[14]+e[p+3]*k[19]+e[p+4]}return r};a.Path.MakeFromCmds=function(e){for(var k=0,r=0;r<e.length;r++)k+=e[r].length;if(mc[k])var w=mc[k];else w=new Float32Array(k),mc[k]=w;var p=0;for(r=0;r<e.length;r++)for(var x=0;x<e[r].length;x++)w[p]=
e[r][x],p++;e=[n(w,"HEAPF32"),k];k=a.Path._MakeFromCmds(e[0],e[1]);a._free(e[0]);return k};a.Path.MakeFromVerbsPointsWeights=function(e,k,r){var w=n(e,"HEAPU8"),p=n(k,"HEAPF32"),x=n(r,"HEAPF32"),K=a.Path._MakeFromVerbsPointsWeights(w,e.length,p,k.length,x,r&&r.length||0);T(w,e);T(p,k);T(x,r);return K};a.Path.prototype.addArc=function(e,k,r){e=N(e);this._addArc(e,k,r);return this};a.Path.prototype.addOval=function(e,k,r){void 0===r&&(r=1);e=N(e);this._addOval(e,!!k,r);return this};a.Path.prototype.addPath=
function(){var e=Array.prototype.slice.call(arguments),k=e[0],r=!1;"boolean"===typeof e[e.length-1]&&(r=e.pop());if(1===e.length)this._addPath(k,1,0,0,0,1,0,0,0,1,r);else if(2===e.length)e=e[1],this._addPath(k,e[0],e[1],e[2],e[3],e[4],e[5],e[6]||0,e[7]||0,e[8]||1,r);else if(7===e.length||10===e.length)this._addPath(k,e[1],e[2],e[3],e[4],e[5],e[6],e[7]||0,e[8]||0,e[9]||1,r);else return null;return this};a.Path.prototype.addPoly=function(e,k){var r=n(e,"HEAPF32");this._addPoly(r,e.length/2,k);T(r,e);
return this};a.Path.prototype.addRect=function(e,k){e=N(e);this._addRect(e,!!k);return this};a.Path.prototype.addRRect=function(e,k){e=W(e);this._addRRect(e,!!k);return this};a.Path.prototype.addVerbsPointsWeights=function(e,k,r){var w=n(e,"HEAPU8"),p=n(k,"HEAPF32"),x=n(r,"HEAPF32");this._addVerbsPointsWeights(w,e.length,p,k.length,x,r&&r.length||0);T(w,e);T(p,k);T(x,r)};a.Path.prototype.arc=function(e,k,r,w,p,x){e=a.LTRBRect(e-r,k-r,e+r,k+r);p=(p-w)/Math.PI*180-360*!!x;x=new a.Path;x.addArc(e,w/
Math.PI*180,p);this.addPath(x,!0);x.delete();return this};a.Path.prototype.arcToOval=function(e,k,r,w){e=N(e);this._arcToOval(e,k,r,w);return this};a.Path.prototype.arcToRotated=function(e,k,r,w,p,x,K){this._arcToRotated(e,k,r,!!w,!!p,x,K);return this};a.Path.prototype.arcToTangent=function(e,k,r,w,p){this._arcToTangent(e,k,r,w,p);return this};a.Path.prototype.close=function(){this._close();return this};a.Path.prototype.conicTo=function(e,k,r,w,p){this._conicTo(e,k,r,w,p);return this};a.Path.prototype.computeTightBounds=
function(e){this._computeTightBounds(Ga);var k=Ja.toTypedArray();return e?(e.set(k),e):k.slice()};a.Path.prototype.cubicTo=function(e,k,r,w,p,x){this._cubicTo(e,k,r,w,p,x);return this};a.Path.prototype.dash=function(e,k,r){return this._dash(e,k,r)?this:null};a.Path.prototype.getBounds=function(e){this._getBounds(Ga);var k=Ja.toTypedArray();return e?(e.set(k),e):k.slice()};a.Path.prototype.lineTo=function(e,k){this._lineTo(e,k);return this};a.Path.prototype.moveTo=function(e,k){this._moveTo(e,k);return this};
a.Path.prototype.offset=function(e,k){this._transform(1,0,e,0,1,k,0,0,1);return this};a.Path.prototype.quadTo=function(e,k,r,w){this._quadTo(e,k,r,w);return this};a.Path.prototype.rArcTo=function(e,k,r,w,p,x,K){this._rArcTo(e,k,r,w,p,x,K);return this};a.Path.prototype.rConicTo=function(e,k,r,w,p){this._rConicTo(e,k,r,w,p);return this};a.Path.prototype.rCubicTo=function(e,k,r,w,p,x){this._rCubicTo(e,k,r,w,p,x);return this};a.Path.prototype.rLineTo=function(e,k){this._rLineTo(e,k);return this};a.Path.prototype.rMoveTo=
function(e,k){this._rMoveTo(e,k);return this};a.Path.prototype.rQuadTo=function(e,k,r,w){this._rQuadTo(e,k,r,w);return this};a.Path.prototype.stroke=function(e){e=e||{};e.width=e.width||1;e.miter_limit=e.miter_limit||4;e.cap=e.cap||a.StrokeCap.Butt;e.join=e.join||a.StrokeJoin.Miter;e.precision=e.precision||1;return this._stroke(e)?this:null};a.Path.prototype.transform=function(){if(1===arguments.length){var e=arguments[0];this._transform(e[0],e[1],e[2],e[3],e[4],e[5],e[6]||0,e[7]||0,e[8]||1)}else if(6===
arguments.length||9===arguments.length)e=arguments,this._transform(e[0],e[1],e[2],e[3],e[4],e[5],e[6]||0,e[7]||0,e[8]||1);else throw"transform expected to take 1 or 9 arguments. Got "+arguments.length;return this};a.Path.prototype.trim=function(e,k,r){return this._trim(e,k,!!r)?this:null};a.Image.prototype.encodeToData=function(){if(!arguments.length)return this._encodeToData();if(2===arguments.length){var e=arguments;return this._encodeToDataWithFormat(e[0],e[1])}throw"encodeToData expected to take 0 or 2 arguments. Got "+
arguments.length;};a.Image.prototype.makeShader=function(e,k,r){r=A(r);return this._makeShader(e,k,r)};a.Image.prototype.readPixels=function(e,k,r,w,p){return U(this,e,k,r,w,p)};a.Canvas.prototype.clear=function(e){e=M(e);this._clear(e)};a.Canvas.prototype.clipRRect=function(e,k,r){e=W(e);this._clipRRect(e,k,r)};a.Canvas.prototype.clipRect=function(e,k,r){e=N(e);this._clipRect(e,k,r)};a.Canvas.prototype.concat=function(e){e=F(e);this._concat(e)};a.Canvas.prototype.drawArc=function(e,k,r,w,p){e=N(e);
this._drawArc(e,k,r,w,p)};a.Canvas.prototype.drawAtlas=function(e,k,r,w,p,x){if(e&&w&&k&&r&&k.length===r.length){p||(p=a.BlendMode.SrcOver);var K;k.build?K=k.build():K=n(k,"HEAPF32");if(r.build){var O=r.build();var S=r.length}else O=n(r,"HEAPF32"),S=r.length/4;var Y=0;x&&(x.build?Y=x.build():Y=n(g(x),"HEAPU32"));this._drawAtlas(e,O,K,Y,S,p,w);K&&!k.build&&T(K,k);O&&!r.build&&T(O,r);Y&&!x.build&&T(Y,x)}};a.Canvas.prototype.drawColor=function(e,k){e=M(e);void 0!==k?this._drawColor(e,k):this._drawColor(e)};
a.Canvas.prototype.drawColorComponents=function(e,k,r,w,p){e=Q(e,k,r,w);void 0!==p?this._drawColor(e,p):this._drawColor(e)};a.Canvas.prototype.drawDRRect=function(e,k,r){e=W(e,kc);k=W(k,Tc);this._drawDRRect(e,k,r)};a.Canvas.prototype.drawImageNine=function(e,k,r,w){k=n(k,"HEAP32",lc);r=N(r);this._drawImageNine(e,k,r,w)};a.Canvas.prototype.drawImageRect=function(e,k,r,w,p){k=N(k,Ga);r=N(r,Pc);this._drawImageRect(e,k,r,w,!!p)};a.Canvas.prototype.drawOval=function(e,k){e=N(e);this._drawOval(e,k)};a.Canvas.prototype.drawPoints=
function(e,k,r){var w=n(k,"HEAPF32");this._drawPoints(e,w,k.length/2,r);T(w,k)};a.Canvas.prototype.drawRRect=function(e,k){e=W(e);this._drawRRect(e,k)};a.Canvas.prototype.drawRect=function(e,k){e=N(e);this._drawRect(e,k)};a.Canvas.prototype.drawShadow=function(e,k,r,w,p,x,K){var O=n(p,"HEAPF32"),S=n(x,"HEAPF32");this._drawShadow(e,k,r,w,O,S,K);T(O,p);T(S,x)};a.Canvas.prototype.getLocalToDevice=function(){this._getLocalToDevice(Ia);return I(Ia)};a.Canvas.prototype.findMarkedCTM=function(e){return this._findMarkedCTM(e,
Ia)?I(Ia):null};a.Canvas.prototype.getTotalMatrix=function(){this._getTotalMatrix(Ha);for(var e=Array(9),k=0;9>k;k++)e[k]=a.HEAPF32[Ha/4+k];return e};a.Canvas.prototype.readPixels=function(e,k,r,w,p){return U(this,e,k,r,w,p)};a.Canvas.prototype.saveLayer=function(e,k,r,w){k=N(k);return this._saveLayer(e||null,k,r||null,w||0)};a.Canvas.prototype.writePixels=function(e,k,r,w,p,x,K,O){if(e.byteLength%(k*r))throw"pixels length must be a multiple of the srcWidth * srcHeight";var S=e.byteLength/(k*r);x=
x||a.AlphaType.Unpremul;K=K||a.ColorType.RGBA_8888;O=O||a.ColorSpace.SRGB;var Y=S*k;S=n(e,"HEAPU8");k=this._writePixels({width:k,height:r,colorType:K,alphaType:x,colorSpace:O},S,Y,w,p);T(S,e);return k};a.ColorFilter.MakeBlend=function(e,k){e=M(e);return a.ColorFilter._MakeBlend(e,k)};a.ColorFilter.MakeMatrix=function(e){if(!e||20!==e.length)throw"invalid color matrix";var k=n(e,"HEAPF32"),r=a.ColorFilter._makeMatrix(k);T(k,e);return r};a.ImageFilter.MakeMatrixTransform=function(e,k,r){e=A(e);return a.ImageFilter._MakeMatrixTransform(e,
k,r)};a.Paint.prototype.getColor=function(){this._getColor(mb);return B(mb)};a.Paint.prototype.setColor=function(e,k){k=k||null;e=M(e);this._setColor(e,k)};a.Paint.prototype.setColorComponents=function(e,k,r,w,p){p=p||null;e=Q(e,k,r,w);this._setColor(e,p)};a.PictureRecorder.prototype.beginRecording=function(e){e=N(e);return this._beginRecording(e)};a.Surface.prototype.makeImageSnapshot=function(e){e=n(e,"HEAP32",lc);return this._makeImageSnapshot(e)};a.Surface.prototype.requestAnimationFrame=function(e,
k){this.Ne||(this.Ne=this.getCanvas());requestAnimationFrame(function(){void 0!==this.qe&&a.setCurrentContext(this.qe);e(this.Ne);this.flush(k)}.bind(this))};a.Surface.prototype.drawOnce=function(e,k){this.Ne||(this.Ne=this.getCanvas());requestAnimationFrame(function(){void 0!==this.qe&&a.setCurrentContext(this.qe);e(this.Ne);this.flush(k);this.dispose()}.bind(this))};a.PathEffect.MakeDash=function(e,k){k||(k=0);if(!e.length||1===e.length%2)throw"Intervals array must have even length";var r=n(e,"HEAPF32");
k=a.PathEffect._MakeDash(r,e.length,k);T(r,e);return k};a.Shader.MakeColor=function(e,k){k=k||null;e=M(e);return a.Shader._MakeColor(e,k)};a.Shader.Blend=a.Shader.MakeBlend;a.Shader.Color=a.Shader.MakeColor;a.Shader.Lerp=a.Shader.MakeLerp;a.Shader.MakeLinearGradient=function(e,k,r,w,p,x,K,O){O=O||null;var S=u(r),Y=n(w,"HEAPF32");K=K||0;x=A(x);e=a.Shader._MakeLinearGradient(e,k,S.fe,S.Te,Y,S.count,p,K,x,O);T(S.fe,r);w&&T(Y,w);return e};a.Shader.MakeRadialGradient=function(e,k,r,w,p,x,K,O){O=O||null;
var S=u(r),Y=n(w,"HEAPF32");K=K||0;x=A(x);e=a.Shader._MakeRadialGradient(e,k,S.fe,S.Te,Y,S.count,p,K,x,O);T(S.fe,r);w&&T(Y,w);return e};a.Shader.MakeSweepGradient=function(e,k,r,w,p,x,K,O,S,Y){Y=Y||null;var fa=u(r),ha=n(w,"HEAPF32");K=K||0;O=O||0;S=S||360;x=A(x);e=a.Shader._MakeSweepGradient(e,k,fa.fe,fa.Te,ha,fa.count,p,O,S,K,x,Y);T(fa.fe,r);w&&T(ha,w);return e};a.Shader.MakeTwoPointConicalGradient=function(e,k,r,w,p,x,K,O,S,Y){Y=Y||null;var fa=u(p),ha=n(x,"HEAPF32");S=S||0;O=A(O);e=a.Shader._MakeTwoPointConicalGradient(e,
k,r,w,fa.fe,fa.Te,ha,fa.count,K,S,O,Y);T(fa.fe,p);x&&T(ha,x);return e};a.Vertices.prototype.bounds=function(e){this._bounds(Ga);var k=Ja.toTypedArray();return e?(e.set(k),e):k.slice()};a.Ud&&a.Ud.forEach(function(e){e()})};a.computeTonalColors=function(f){var m=n(f.ambient,"HEAPF32"),y=n(f.spot,"HEAPF32");this._computeTonalColors(m,y);var D={ambient:B(m),spot:B(y)};T(m,f.ambient);T(y,f.spot);return D};a.LTRBRect=function(f,m,y,D){return Float32Array.of(f,m,y,D)};a.XYWHRect=function(f,m,y,D){return Float32Array.of(f,
m,f+y,m+D)};a.LTRBiRect=function(f,m,y,D){return Int32Array.of(f,m,y,D)};a.XYWHiRect=function(f,m,y,D){return Int32Array.of(f,m,f+y,m+D)};a.RRectXY=function(f,m,y){return Float32Array.of(f[0],f[1],f[2],f[3],m,y,m,y,m,y,m,y)};a.MakeAnimatedImageFromEncoded=function(f){f=new Uint8Array(f);var m=a._malloc(f.byteLength);a.HEAPU8.set(f,m);return(f=a._decodeAnimatedImage(m,f.byteLength))?f:null};a.MakeImageFromEncoded=function(f){f=new Uint8Array(f);var m=a._malloc(f.byteLength);a.HEAPU8.set(f,m);return(f=
a._decodeImage(m,f.byteLength))?f:null};var nb=null;a.MakeImageFromCanvasImageSource=function(f){var m=f.width,y=f.height;nb||(nb=document.createElement("canvas"));nb.width=m;nb.height=y;var D=nb.getContext("2d");D.drawImage(f,0,0);f=D.getImageData(0,0,m,y);return a.MakeImage({width:m,height:y,alphaType:a.AlphaType.Unpremul,colorType:a.ColorType.RGBA_8888,colorSpace:a.ColorSpace.SRGB},f.data,4*m)};a.MakeImage=function(f,m,y){var D=a._malloc(m.length);a.HEAPU8.set(m,D);return a._MakeImage(f,D,m.length,
y)};a.MakeVertices=function(f,m,y,D,L,U){var V=L&&L.length||0,e=0;y&&y.length&&(e|=1);D&&D.length&&(e|=2);void 0===U||U||(e|=4);f=new a._VerticesBuilder(f,m.length/2,V,e);n(m,"HEAPF32",f.positions());f.texCoords()&&n(y,"HEAPF32",f.texCoords());if(f.colors()){if(D.build)throw"Color builder not accepted by MakeVertices, use array of ints";n(g(D),"HEAPU32",f.colors())}f.indices()&&n(L,"HEAPU16",f.indices());return f.detach()};(function(f){f.Ud=f.Ud||[];f.Ud.push(function(){function m(p){if(!p||!p.length)return[];
for(var x=[],K=0;K<p.length;K+=5){var O=f.LTRBRect(p[K],p[K+1],p[K+2],p[K+3]);O.direction=0===p[K+4]?f.TextDirection.RTL:f.TextDirection.LTR;x.push(O)}f._free(p.byteOffset);return x}function y(p){p=p||{};void 0===p.weight&&(p.weight=f.FontWeight.Normal);p.width=p.width||f.FontWidth.Normal;p.slant=p.slant||f.FontSlant.Upright;return p}function D(p){if(!p||!p.length)return 0;for(var x=[],K=0;K<p.length;K++){var O=L(p[K]);x.push(O)}return n(x,"HEAPU32")}function L(p){if(e[p])return e[p];var x=ma(p)+
1,K=f._malloc(x);na(p,v,K,x);return e[p]=K}function U(p){p._colorPtr=M(p.color);p._foregroundColorPtr=0;p._backgroundColorPtr=0;p._decorationColorPtr=0;p.foregroundColor&&(p._foregroundColorPtr=M(p.foregroundColor,k));p.backgroundColor&&(p._backgroundColorPtr=M(p.backgroundColor,r));p.decorationColor&&(p._decorationColorPtr=M(p.decorationColor,w));Array.isArray(p.fontFamilies)&&p.fontFamilies.length?(p._fontFamiliesPtr=D(p.fontFamilies),p._fontFamiliesLen=p.fontFamilies.length):(p._fontFamiliesPtr=
0,p._fontFamiliesLen=0)}function V(p){f._free(p._fontFamiliesPtr)}f.Paragraph.prototype.getRectsForRange=function(p,x,K,O){p=this._getRectsForRange(p,x,K,O);return m(p)};f.Paragraph.prototype.getRectsForPlaceholders=function(){var p=this._getRectsForPlaceholders();return m(p)};f.TypefaceFontProvider.prototype.registerFont=function(p,x){p=f.FontMgr.RefDefault().MakeTypefaceFromData(p);if(!p)return null;x=L(x);this._registerFont(p,x)};f.ParagraphStyle=function(p){p.disableHinting=p.disableHinting||
!1;if(p.ellipsis){var x=p.ellipsis;p._ellipsisPtr=L(x);p._ellipsisLen=ma(x)+1}else p._ellipsisPtr=0,p._ellipsisLen=0;p.heightMultiplier=p.heightMultiplier||0;p.maxLines=p.maxLines||0;p.textAlign=p.textAlign||f.TextAlign.Start;p.textDirection=p.textDirection||f.TextDirection.LTR;p.textStyle=f.TextStyle(p.textStyle);x=(x=p.strutStyle)||{};x.strutEnabled=x.strutEnabled||!1;x.strutEnabled&&Array.isArray(x.fontFamilies)&&x.fontFamilies.length?(x._fontFamiliesPtr=D(x.fontFamilies),x._fontFamiliesLen=x.fontFamilies.length):
(x._fontFamiliesPtr=0,x._fontFamiliesLen=0);x.fontStyle=y(x.fontStyle);x.fontSize=x.fontSize||0;x.heightMultiplier=x.heightMultiplier||0;x.leading=x.leading||0;x.forceStrutHeight=x.forceStrutHeight||!1;p.strutStyle=x;return p};f.TextStyle=function(p){p.color||(p.color=f.BLACK);p.decoration=p.decoration||0;p.decorationThickness=p.decorationThickness||0;p.decorationStyle=p.decorationStyle||f.DecorationStyle.Solid;p.textBaseline=p.textBaseline||f.TextBaseline.Alphabetic;p.fontSize=p.fontSize||0;p.letterSpacing=
p.letterSpacing||0;p.wordSpacing=p.wordSpacing||0;p.heightMultiplier=p.heightMultiplier||0;if(p.locale){var x=p.locale;p._localePtr=L(x);p._localeLen=ma(x)+1}else p._localePtr=0,p._localeLen=0;p.fontStyle=y(p.fontStyle);if(p.shadows){x=p.shadows;var K=x.map(function(H){return H.color||f.BLACK}),O=x.map(function(H){return H.blurRadius||0});p._shadowLen=x.length;for(var S=f._malloc(2*x.length,"HEAPF32"),Y=S/4,fa=0;fa<x.length;fa++){var ha=x[fa].offset||[0,0];f.HEAPF32[Y]=ha[0];f.HEAPF32[Y+1]=ha[1];
Y+=2}p._shadowColorsPtr=u(K).fe;p._shadowOffsetsPtr=S;p._shadowBlurRadiiPtr=n(O,"HEAPF32")}else p._shadowLen=0,p._shadowColorsPtr=0,p._shadowOffsetsPtr=0,p._shadowBlurRadiiPtr=0;p.fontFeatures?(x=p.fontFeatures,K=x.map(function(H){return H.name}),O=x.map(function(H){return H.value}),p._fontFeatureLen=x.length,p._fontFeatureNamesPtr=D(K),p._fontFeatureValuesPtr=n(O,"HEAPU32")):(p._fontFeatureLen=0,p._fontFeatureNamesPtr=0,p._fontFeatureValuesPtr=0);return p};var e={},k=f._malloc(16),r=f._malloc(16),
w=f._malloc(16);f.ParagraphBuilder.Make=function(p,x){U(p.textStyle);x=f.ParagraphBuilder._Make(p,x);V(p.textStyle);return x};f.ParagraphBuilder.MakeFromFontProvider=function(p,x){U(p.textStyle);x=f.ParagraphBuilder._MakeFromFontProvider(p,x);V(p.textStyle);return x};f.ParagraphBuilder.prototype.pushStyle=function(p){U(p);this._pushStyle(p);V(p)};f.ParagraphBuilder.prototype.pushPaintStyle=function(p,x,K){U(p);this._pushPaintStyle(p,x,K);V(p)};f.ParagraphBuilder.prototype.addPlaceholder=function(p,
x,K,O,S){K=K||f.PlaceholderAlignment.Baseline;O=O||f.TextBaseline.Alphabetic;this._addPlaceholder(p||0,x||0,K,O,S||0)}})})(t);a.MakeManagedAnimation=function(f,m,y){if(!a._MakeManagedAnimation)throw"Not compiled with MakeManagedAnimation";y||(y="");if(!m)return a._MakeManagedAnimation(f,0,0,0,0,y);for(var D=[],L=[],U=[],V=Object.keys(m||{}),e=0;e<V.length;e++){var k=V[e],r=new Uint8Array(m[k]),w=a._malloc(r.byteLength);a.HEAPU8.set(r,w);L.push(w);U.push(r.byteLength);r=ma(k)+1;w=a._malloc(r);na(k,
v,w,r);D.push(w)}m=n(D,"HEAPU32");L=n(L,"HEAPU32");U=n(U,"HEAPU32");f=a._MakeManagedAnimation(f,V.length,m,L,U,y);a._free(m);a._free(L);a._free(U);return f};(function(f){f.Ud=f.Ud||[];f.Ud.push(function(){f.Animation.prototype.render=function(m,y){y=N(y);this._render(m,y)};f.ManagedAnimation&&(f.ManagedAnimation.prototype.render=function(m,y){y=N(y);this._render(m,y)},f.ManagedAnimation.prototype.seek=function(m,y){this._seek(m,Ga);m=Ja.toTypedArray();return y?(y.set(m),y):m.slice()},f.ManagedAnimation.prototype.seekFrame=
function(m,y){this._seekFrame(m,Ga);m=Ja.toTypedArray();return y?(y.set(m),y):m.slice()},f.ManagedAnimation.prototype.setColor=function(m,y){y=M(y);this._setColor(m,y)})})})(t);a.MakeParticles=function(f,m){if(!a._MakeParticles)throw"Not compiled with MakeParticles";if(!m)return a._MakeParticles(f,0,0,0,0);for(var y=[],D=[],L=[],U=Object.keys(m||{}),V=0;V<U.length;V++){var e=U[V],k=new Uint8Array(m[e]),r=a._malloc(k.byteLength);a.HEAPU8.set(k,r);D.push(r);L.push(k.byteLength);k=ma(e)+1;r=a._malloc(k);
na(e,v,r,k);y.push(r)}m=n(y,"HEAPU32");D=n(D,"HEAPU32");L=n(L,"HEAPU32");f=a._MakeParticles(f,U.length,m,D,L);a._free(m);a._free(D);a._free(L);return f};a.Ud=a.Ud||[];a.Ud.push(function(){a.ParticleEffect.prototype.effectUniforms=function(){var f=this._effectUniformPtr(),m=this.getEffectUniformFloatCount();return!f||0>=m?new Float32Array:new Float32Array(a.HEAPU8.buffer,f,m)};a.ParticleEffect.prototype.particleUniforms=function(){var f=this._particleUniformPtr(),m=this.getParticleUniformFloatCount();
return!f||0>=m?new Float32Array:new Float32Array(a.HEAPU8.buffer,f,m)}});a.Ud=a.Ud||[];a.Ud.push(function(){a.Path.prototype.op=function(f,m){return this._op(f,m)?this:null};a.Path.prototype.simplify=function(){return this._simplify()?this:null}});a.Ud=a.Ud||[];a.Ud.push(function(){a.Canvas.prototype.drawText=function(f,m,y,D,L){if("string"===typeof f){var U=ma(f),V=a._malloc(U+1);na(f,v,V,U+1);this._drawSimpleText(V,U,m,y,L,D);a._free(V)}else this._drawShapedText(f,m,y,D)};a.Font.prototype.getGlyphBounds=
function(f,m,y){var D=n(f,"HEAPU16"),L=a._malloc(16*f.length);this._getGlyphWidthBounds(D,f.length,0,L,m||null);m=new Float32Array(a.HEAPU8.buffer,L,4*f.length);T(D,f);if(y)return y.set(m),a._free(L),y;f=Float32Array.from(m);a._free(L);return f};a.Font.prototype.getGlyphIDs=function(f,m,y){m||(m=f.length);var D=ma(f)+1,L=a._malloc(D);na(f,v,L,D);f=a._malloc(2*m);m=this._getGlyphIDs(L,D-1,m,f);a._free(L);if(0>m)return a._free(f),null;L=new Uint16Array(a.HEAPU8.buffer,f,m);if(y)return y.set(L),a._free(f),
y;y=Uint32Array.from(L);a._free(f);return y};a.Font.prototype.getGlyphWidths=function(f,m,y){var D=n(f,"HEAPU16"),L=a._malloc(4*f.length);this._getGlyphWidthBounds(D,f.length,L,0,m||null);m=new Float32Array(a.HEAPU8.buffer,L,f.length);T(D,f);if(y)return y.set(m),a._free(L),y;f=Float32Array.from(m);a._free(L);return f};a.Font.prototype.getWidths=function(f){var m=f.length+1,y=ma(f)+1,D=a._malloc(y);na(f,v,D,y);f=a._malloc(4*m);if(!this._getWidths(D,y,m,f))return a._free(D),a._free(f),null;m=new Float32Array(a.HEAPU8.buffer,
f,m);m=Array.from(m);a._free(D);a._free(f);return m};a.FontMgr.FromData=function(){if(!arguments.length)return null;var f=arguments;1===f.length&&Array.isArray(f[0])&&(f=arguments[0]);if(!f.length)return null;for(var m=[],y=[],D=0;D<f.length;D++){var L=new Uint8Array(f[D]),U=n(L,"HEAPU8");m.push(U);y.push(L.byteLength)}m=n(m,"HEAPU32");y=n(y,"HEAPU32");f=a.FontMgr._fromData(m,y,f.length);a._free(m);a._free(y);return f};a.FontMgr.prototype.MakeTypefaceFromData=function(f){f=new Uint8Array(f);var m=
n(f,"HEAPU8");return(f=this._makeTypefaceFromData(m,f.byteLength))?f:null};a.ShapedText.prototype.getBounds=function(f){this._getBounds(Ga);var m=Ja.toTypedArray();return f?(f.set(m),f):m.slice()};a.TextBlob.MakeOnPath=function(f,m,y,D){if(f&&f.length&&m&&m.countPoints()){if(1===m.countPoints())return this.MakeFromText(f,y);D||(D=0);var L=y.getWidths(f),U=new a.RSXFormBuilder;m=new a.PathMeasure(m,!1,1);for(var V=0;V<f.length;V++){var e=L[V];D+=e/2;if(D>m.getLength()){if(!m.nextContour()){f=f.substring(0,
V);break}D=e/2}var k=m.getPosTan(D),r=k[2],w=k[3];U.push(r,w,k[0]-e/2*r,k[1]-e/2*w);D+=e/2}f=this.MakeFromRSXform(f,U,y);U.delete();m.delete();return f}};a.TextBlob.MakeFromRSXform=function(f,m,y){var D=ma(f)+1,L=a._malloc(D);na(f,v,L,D);f=0;m.build?f=m.build():f=n(m,"HEAPF32");m=a.TextBlob._MakeFromRSXform(L,D-1,f,y);a._free(L);return m?m:null};a.TextBlob.MakeFromRSXformGlyphs=function(f,m,y){var D=n(f,"HEAPU16"),L=0;m.build?L=m.build():L=n(m,"HEAPF32");m=a.TextBlob._MakeFromRSXformGlyphs(D,2*f.length,
L,y);T(D,f);return m?m:null};a.TextBlob.MakeFromGlyphs=function(f,m){var y=n(f,"HEAPU16");m=a.TextBlob._MakeFromGlyphs(y,2*f.length,m);T(y,f);return m?m:null};a.TextBlob.MakeFromText=function(f,m){var y=ma(f)+1,D=a._malloc(y);na(f,v,D,y);f=a.TextBlob._MakeFromText(D,y-1,m);a._free(D);return f?f:null};a.MallocGlyphIDs=function(f){return a.Malloc(Uint16Array,f)}});a.Ud=a.Ud||[];a.Ud.push(function(){a.MakePicture=function(f){f=new Uint8Array(f);var m=a._malloc(f.byteLength);a.HEAPU8.set(f,m);return(f=
a._MakePicture(m,f.byteLength))?f:null};a.Picture.prototype.saveAsFile=function(f){var m=this.serialize();if(m){var y=a.getDataBytes(m);ea(y,f);m.delete()}}});a.Ud=a.Ud||[];a.Ud.push(function(){a.RuntimeEffect.prototype.makeShader=function(f,m,y){var D=n(f,"HEAPF32");y=A(y);return this._makeShader(D,4*f.length,!!m,y)};a.RuntimeEffect.prototype.makeShaderWithChildren=function(f,m,y,D){var L=n(f,"HEAPF32");D=A(D);for(var U=[],V=0;V<y.length;V++)U.push(y[V].Pd.Td);y=n(U,"HEAPU32");return this._makeShaderWithChildren(L,
4*f.length,!!m,y,U.length,D)}});(function(){function f(H){for(var h=0;h<H.length;h++)if(void 0!==H[h]&&!Number.isFinite(H[h]))return!1;return!0}function m(H){var h=a.getColorComponents(H);H=h[0];var q=h[1],z=h[2];h=h[3];if(1===h)return H=H.toString(16).toLowerCase(),q=q.toString(16).toLowerCase(),z=z.toString(16).toLowerCase(),H=1===H.length?"0"+H:H,q=1===q.length?"0"+q:q,z=1===z.length?"0"+z:z,"#"+H+q+z;h=0===h||1===h?h:h.toFixed(8);return"rgba("+H+", "+q+", "+z+", "+h+")"}function y(H){return a.parseColorString(H,
Y)}function D(H){H=fa.exec(H);if(!H)return null;var h=parseFloat(H[4]),q=16;switch(H[5]){case "em":case "rem":q=16*h;break;case "pt":q=4*h/3;break;case "px":q=h;break;case "pc":q=16*h;break;case "in":q=96*h;break;case "cm":q=96*h/2.54;break;case "mm":q=96/25.4*h;break;case "q":q=96/25.4/4*h;break;case "%":q=16/75*h}return{style:H[1],variant:H[2],weight:H[3],sizePx:q,family:H[6].trim()}}function L(H){this.Qd=H;this.Sd=new a.Paint;this.Sd.setAntiAlias(!0);this.Sd.setStrokeMiter(10);this.Sd.setStrokeCap(a.StrokeCap.Butt);
this.Sd.setStrokeJoin(a.StrokeJoin.Miter);this.af="10px monospace";this.xe=new a.Font(null,10);this.xe.setSubpixel(!0);this.ee=this.le=a.BLACK;this.Ae=0;this.Qe=a.TRANSPARENT;this.Ce=this.Be=0;this.Re=this.ne=1;this.Pe=0;this.ze=[];this.Rd=a.BlendMode.SrcOver;this.re=a.FilterQuality.Low;this.Oe=!0;this.Sd.setStrokeWidth(this.Re);this.Sd.setBlendMode(this.Rd);this.Wd=new a.Path;this.Xd=a.Matrix.identity();this.zf=[];this.Ge=[];this.oe=function(){this.Wd.delete();this.Sd.delete();this.xe.delete();this.Ge.forEach(function(h){h.oe()})};
Object.defineProperty(this,"currentTransform",{enumerable:!0,get:function(){return{a:this.Xd[0],c:this.Xd[1],e:this.Xd[2],b:this.Xd[3],d:this.Xd[4],f:this.Xd[5]}},set:function(h){h.a&&this.setTransform(h.a,h.b,h.c,h.d,h.e,h.f)}});Object.defineProperty(this,"fillStyle",{enumerable:!0,get:function(){return c(this.ee)?m(this.ee):this.ee},set:function(h){"string"===typeof h?this.ee=y(h):h.ye&&(this.ee=h)}});Object.defineProperty(this,"font",{enumerable:!0,get:function(){return this.af},set:function(h){var q=
D(h),z=q.family;q.typeface=ha[z]?ha[z][(q.style||"normal")+"|"+(q.variant||"normal")+"|"+(q.weight||"normal")]||ha[z]["*"]:null;q&&(this.xe.setSize(q.sizePx),this.xe.setTypeface(q.typeface),this.af=h)}});Object.defineProperty(this,"globalAlpha",{enumerable:!0,get:function(){return this.ne},set:function(h){!isFinite(h)||0>h||1<h||(this.ne=h)}});Object.defineProperty(this,"globalCompositeOperation",{enumerable:!0,get:function(){switch(this.Rd){case a.BlendMode.SrcOver:return"source-over";case a.BlendMode.DstOver:return"destination-over";
case a.BlendMode.Src:return"copy";case a.BlendMode.Dst:return"destination";case a.BlendMode.Clear:return"clear";case a.BlendMode.SrcIn:return"source-in";case a.BlendMode.DstIn:return"destination-in";case a.BlendMode.SrcOut:return"source-out";case a.BlendMode.DstOut:return"destination-out";case a.BlendMode.SrcATop:return"source-atop";case a.BlendMode.DstATop:return"destination-atop";case a.BlendMode.Xor:return"xor";case a.BlendMode.Plus:return"lighter";case a.BlendMode.Multiply:return"multiply";case a.BlendMode.Screen:return"screen";
case a.BlendMode.Overlay:return"overlay";case a.BlendMode.Darken:return"darken";case a.BlendMode.Lighten:return"lighten";case a.BlendMode.ColorDodge:return"color-dodge";case a.BlendMode.ColorBurn:return"color-burn";case a.BlendMode.HardLight:return"hard-light";case a.BlendMode.SoftLight:return"soft-light";case a.BlendMode.Difference:return"difference";case a.BlendMode.Exclusion:return"exclusion";case a.BlendMode.Hue:return"hue";case a.BlendMode.Saturation:return"saturation";case a.BlendMode.Color:return"color";
case a.BlendMode.Luminosity:return"luminosity"}},set:function(h){switch(h){case "source-over":this.Rd=a.BlendMode.SrcOver;break;case "destination-over":this.Rd=a.BlendMode.DstOver;break;case "copy":this.Rd=a.BlendMode.Src;break;case "destination":this.Rd=a.BlendMode.Dst;break;case "clear":this.Rd=a.BlendMode.Clear;break;case "source-in":this.Rd=a.BlendMode.SrcIn;break;case "destination-in":this.Rd=a.BlendMode.DstIn;break;case "source-out":this.Rd=a.BlendMode.SrcOut;break;case "destination-out":this.Rd=
a.BlendMode.DstOut;break;case "source-atop":this.Rd=a.BlendMode.SrcATop;break;case "destination-atop":this.Rd=a.BlendMode.DstATop;break;case "xor":this.Rd=a.BlendMode.Xor;break;case "lighter":this.Rd=a.BlendMode.Plus;break;case "plus-lighter":this.Rd=a.BlendMode.Plus;break;case "plus-darker":throw"plus-darker is not supported";case "multiply":this.Rd=a.BlendMode.Multiply;break;case "screen":this.Rd=a.BlendMode.Screen;break;case "overlay":this.Rd=a.BlendMode.Overlay;break;case "darken":this.Rd=a.BlendMode.Darken;
break;case "lighten":this.Rd=a.BlendMode.Lighten;break;case "color-dodge":this.Rd=a.BlendMode.ColorDodge;break;case "color-burn":this.Rd=a.BlendMode.ColorBurn;break;case "hard-light":this.Rd=a.BlendMode.HardLight;break;case "soft-light":this.Rd=a.BlendMode.SoftLight;break;case "difference":this.Rd=a.BlendMode.Difference;break;case "exclusion":this.Rd=a.BlendMode.Exclusion;break;case "hue":this.Rd=a.BlendMode.Hue;break;case "saturation":this.Rd=a.BlendMode.Saturation;break;case "color":this.Rd=a.BlendMode.Color;
break;case "luminosity":this.Rd=a.BlendMode.Luminosity;break;default:return}this.Sd.setBlendMode(this.Rd)}});Object.defineProperty(this,"imageSmoothingEnabled",{enumerable:!0,get:function(){return this.Oe},set:function(h){this.Oe=!!h}});Object.defineProperty(this,"imageSmoothingQuality",{enumerable:!0,get:function(){switch(this.re){case a.FilterQuality.Low:return"low";case a.FilterQuality.Medium:return"medium";case a.FilterQuality.High:return"high"}},set:function(h){switch(h){case "low":this.re=a.FilterQuality.Low;
break;case "medium":this.re=a.FilterQuality.Medium;break;case "high":this.re=a.FilterQuality.High}}});Object.defineProperty(this,"lineCap",{enumerable:!0,get:function(){switch(this.Sd.getStrokeCap()){case a.StrokeCap.Butt:return"butt";case a.StrokeCap.Round:return"round";case a.StrokeCap.Square:return"square"}},set:function(h){switch(h){case "butt":this.Sd.setStrokeCap(a.StrokeCap.Butt);break;case "round":this.Sd.setStrokeCap(a.StrokeCap.Round);break;case "square":this.Sd.setStrokeCap(a.StrokeCap.Square)}}});
Object.defineProperty(this,"lineDashOffset",{enumerable:!0,get:function(){return this.Pe},set:function(h){isFinite(h)&&(this.Pe=h)}});Object.defineProperty(this,"lineJoin",{enumerable:!0,get:function(){switch(this.Sd.getStrokeJoin()){case a.StrokeJoin.Miter:return"miter";case a.StrokeJoin.Round:return"round";case a.StrokeJoin.Bevel:return"bevel"}},set:function(h){switch(h){case "miter":this.Sd.setStrokeJoin(a.StrokeJoin.Miter);break;case "round":this.Sd.setStrokeJoin(a.StrokeJoin.Round);break;case "bevel":this.Sd.setStrokeJoin(a.StrokeJoin.Bevel)}}});
Object.defineProperty(this,"lineWidth",{enumerable:!0,get:function(){return this.Sd.getStrokeWidth()},set:function(h){0>=h||!h||(this.Re=h,this.Sd.setStrokeWidth(h))}});Object.defineProperty(this,"miterLimit",{enumerable:!0,get:function(){return this.Sd.getStrokeMiter()},set:function(h){0>=h||!h||this.Sd.setStrokeMiter(h)}});Object.defineProperty(this,"shadowBlur",{enumerable:!0,get:function(){return this.Ae},set:function(h){0>h||!isFinite(h)||(this.Ae=h)}});Object.defineProperty(this,"shadowColor",
{enumerable:!0,get:function(){return m(this.Qe)},set:function(h){this.Qe=y(h)}});Object.defineProperty(this,"shadowOffsetX",{enumerable:!0,get:function(){return this.Be},set:function(h){isFinite(h)&&(this.Be=h)}});Object.defineProperty(this,"shadowOffsetY",{enumerable:!0,get:function(){return this.Ce},set:function(h){isFinite(h)&&(this.Ce=h)}});Object.defineProperty(this,"strokeStyle",{enumerable:!0,get:function(){return m(this.le)},set:function(h){"string"===typeof h?this.le=y(h):h.ye&&(this.le=
h)}});this.arc=function(h,q,z,C,E,G){p(this.Wd,h,q,z,z,0,C,E,G)};this.arcTo=function(h,q,z,C,E){k(this.Wd,h,q,z,C,E)};this.beginPath=function(){this.Wd.delete();this.Wd=new a.Path};this.bezierCurveTo=function(h,q,z,C,E,G){var P=this.Wd;f([h,q,z,C,E,G])&&(P.isEmpty()&&P.moveTo(h,q),P.cubicTo(h,q,z,C,E,G))};this.clearRect=function(h,q,z,C){this.Sd.setStyle(a.PaintStyle.Fill);this.Sd.setBlendMode(a.BlendMode.Clear);this.Qd.drawRect(a.XYWHRect(h,q,z,C),this.Sd);this.Sd.setBlendMode(this.Rd)};this.clip=
function(h,q){"string"===typeof h?(q=h,h=this.Wd):h&&h.hf&&(h=h.Zd);h||(h=this.Wd);h=h.copy();q&&"evenodd"===q.toLowerCase()?h.setFillType(a.FillType.EvenOdd):h.setFillType(a.FillType.Winding);this.Qd.clipPath(h,a.ClipOp.Intersect,!0);h.delete()};this.closePath=function(){r(this.Wd)};this.createImageData=function(){if(1===arguments.length){var h=arguments[0];return new V(new Uint8ClampedArray(4*h.width*h.height),h.width,h.height)}if(2===arguments.length){h=arguments[0];var q=arguments[1];return new V(new Uint8ClampedArray(4*
h*q),h,q)}throw"createImageData expects 1 or 2 arguments, got "+arguments.length;};this.createLinearGradient=function(h,q,z,C){if(f(arguments)){var E=new e(h,q,z,C);this.Ge.push(E);return E}};this.createPattern=function(h,q){h=new O(h,q);this.Ge.push(h);return h};this.createRadialGradient=function(h,q,z,C,E,G){if(f(arguments)){var P=new S(h,q,z,C,E,G);this.Ge.push(P);return P}};this.Mf=function(){var h=this.$e();this.Oe?h.setFilterQuality(this.re):h.setFilterQuality(a.FilterQuality.None);return h};
this.drawImage=function(h){var q=this.Mf();if(3===arguments.length||5===arguments.length)var z=a.XYWHRect(arguments[1],arguments[2],arguments[3]||h.width(),arguments[4]||h.height()),C=a.XYWHRect(0,0,h.width(),h.height());else if(9===arguments.length)z=a.XYWHRect(arguments[5],arguments[6],arguments[7],arguments[8]),C=a.XYWHRect(arguments[1],arguments[2],arguments[3],arguments[4]);else throw"invalid number of args for drawImage, need 3, 5, or 9; got "+arguments.length;this.Qd.drawImageRect(h,C,z,q,
!1);q.dispose()};this.ellipse=function(h,q,z,C,E,G,P,ba){p(this.Wd,h,q,z,C,E,G,P,ba)};this.$e=function(){var h=this.Sd.copy();h.setStyle(a.PaintStyle.Fill);if(c(this.ee)){var q=a.multiplyByAlpha(this.ee,this.ne);h.setColor(q)}else q=this.ee.ye(this.Xd),h.setColor(a.Color(0,0,0,this.ne)),h.setShader(q);h.dispose=function(){this.delete()};return h};this.fill=function(h,q){"string"===typeof h?(q=h,h=this.Wd):h&&h.hf&&(h=h.Zd);if("evenodd"===q)this.Wd.setFillType(a.FillType.EvenOdd);else{if("nonzero"!==
q&&q)throw"invalid fill rule";this.Wd.setFillType(a.FillType.Winding)}h||(h=this.Wd);q=this.$e();var z=this.De(q);z&&(this.Qd.save(),this.ve(),this.Qd.drawPath(h,z),this.Qd.restore(),z.dispose());this.Qd.drawPath(h,q);q.dispose()};this.fillRect=function(h,q,z,C){var E=this.$e(),G=this.De(E);G&&(this.Qd.save(),this.ve(),this.Qd.drawRect(a.XYWHRect(h,q,z,C),G),this.Qd.restore(),G.dispose());this.Qd.drawRect(a.XYWHRect(h,q,z,C),E);E.dispose()};this.fillText=function(h,q,z){var C=this.$e();h=a.TextBlob.MakeFromText(h,
this.xe);var E=this.De(C);E&&(this.Qd.save(),this.ve(),this.Qd.drawTextBlob(h,q,z,E),this.Qd.restore(),E.dispose());this.Qd.drawTextBlob(h,q,z,C);h.delete();C.dispose()};this.getImageData=function(h,q,z,C){return(h=this.Qd.readPixels(h,q,{width:z,height:C,colorType:a.ColorType.RGBA_8888,alphaType:a.AlphaType.Unpremul,colorSpace:a.ColorSpace.SRGB}))?new V(new Uint8ClampedArray(h.buffer),z,C):null};this.getLineDash=function(){return this.ze.slice()};this.Af=function(h){var q=a.Matrix.invert(this.Xd);
a.Matrix.mapPoints(q,h);return h};this.isPointInPath=function(h,q,z){var C=arguments;if(3===C.length)var E=this.Wd;else if(4===C.length)E=C[0],h=C[1],q=C[2],z=C[3];else throw"invalid arg count, need 3 or 4, got "+C.length;if(!isFinite(h)||!isFinite(q))return!1;z=z||"nonzero";if("nonzero"!==z&&"evenodd"!==z)return!1;C=this.Af([h,q]);h=C[0];q=C[1];E.setFillType("nonzero"===z?a.FillType.Winding:a.FillType.EvenOdd);return E.contains(h,q)};this.isPointInStroke=function(h,q){var z=arguments;if(2===z.length)var C=
this.Wd;else if(3===z.length)C=z[0],h=z[1],q=z[2];else throw"invalid arg count, need 2 or 3, got "+z.length;if(!isFinite(h)||!isFinite(q))return!1;z=this.Af([h,q]);h=z[0];q=z[1];C=C.copy();C.setFillType(a.FillType.Winding);C.stroke({width:this.lineWidth,miter_limit:this.miterLimit,cap:this.Sd.getStrokeCap(),join:this.Sd.getStrokeJoin(),precision:.3});z=C.contains(h,q);C.delete();return z};this.lineTo=function(h,q){x(this.Wd,h,q)};this.measureText=function(){throw Error("Clients wishing to properly measure text should use the Paragraph API");
};this.moveTo=function(h,q){var z=this.Wd;f([h,q])&&z.moveTo(h,q)};this.putImageData=function(h,q,z,C,E,G,P){if(f([q,z,C,E,G,P]))if(void 0===C)this.Qd.writePixels(h.data,h.width,h.height,q,z);else if(C=C||0,E=E||0,G=G||h.width,P=P||h.height,0>G&&(C+=G,G=Math.abs(G)),0>P&&(E+=P,P=Math.abs(P)),0>C&&(G+=C,C=0),0>E&&(P+=E,E=0),!(0>=G||0>=P)){h=a.MakeImage({width:h.width,height:h.height,alphaType:a.AlphaType.Unpremul,colorType:a.ColorType.RGBA_8888,colorSpace:a.ColorSpace.SRGB},h.data,4*h.width);var ba=
a.XYWHRect(C,E,G,P);q=a.XYWHRect(q+C,z+E,G,P);z=a.Matrix.invert(this.Xd);this.Qd.save();this.Qd.concat(z);this.Qd.drawImageRect(h,ba,q,null,!1);this.Qd.restore();h.delete()}};this.quadraticCurveTo=function(h,q,z,C){var E=this.Wd;f([h,q,z,C])&&(E.isEmpty()&&E.moveTo(h,q),E.quadTo(h,q,z,C))};this.rect=function(h,q,z,C){var E=this.Wd;h=a.XYWHRect(h,q,z,C);f(h)&&E.addRect(h)};this.resetTransform=function(){this.Wd.transform(this.Xd);var h=a.Matrix.invert(this.Xd);this.Qd.concat(h);this.Xd=this.Qd.getTotalMatrix()};
this.restore=function(){var h=this.zf.pop();if(h){var q=a.Matrix.multiply(this.Xd,a.Matrix.invert(h.Rf));this.Wd.transform(q);this.Sd.delete();this.Sd=h.lg;this.ze=h.hg;this.Re=h.Ag;this.le=h.zg;this.ee=h.fs;this.Be=h.xg;this.Ce=h.yg;this.Ae=h.pg;this.Qe=h.wg;this.ne=h.Xf;this.Rd=h.Yf;this.Pe=h.ig;this.Oe=h.fg;this.re=h.gg;this.af=h.Vf;this.Qd.restore();this.Xd=this.Qd.getTotalMatrix()}};this.rotate=function(h){if(isFinite(h)){var q=a.Matrix.rotated(-h);this.Wd.transform(q);this.Qd.rotate(h/Math.PI*
180,0,0);this.Xd=this.Qd.getTotalMatrix()}};this.save=function(){if(this.ee.we){var h=this.ee.we();this.Ge.push(h)}else h=this.ee;if(this.le.we){var q=this.le.we();this.Ge.push(q)}else q=this.le;this.zf.push({Rf:this.Xd.slice(),hg:this.ze.slice(),Ag:this.Re,zg:q,fs:h,xg:this.Be,yg:this.Ce,pg:this.Ae,wg:this.Qe,Xf:this.ne,ig:this.Pe,Yf:this.Rd,fg:this.Oe,gg:this.re,lg:this.Sd.copy(),Vf:this.af});this.Qd.save()};this.scale=function(h,q){if(f(arguments)){var z=a.Matrix.scaled(1/h,1/q);this.Wd.transform(z);
this.Qd.scale(h,q);this.Xd=this.Qd.getTotalMatrix()}};this.setLineDash=function(h){for(var q=0;q<h.length;q++)if(!isFinite(h[q])||0>h[q])return;1===h.length%2&&Array.prototype.push.apply(h,h);this.ze=h};this.setTransform=function(h,q,z,C,E,G){f(arguments)&&(this.resetTransform(),this.transform(h,q,z,C,E,G))};this.ve=function(){var h=a.Matrix.invert(this.Xd);this.Qd.concat(h);this.Qd.concat(a.Matrix.translated(this.Be,this.Ce));this.Qd.concat(this.Xd)};this.De=function(h){var q=a.multiplyByAlpha(this.Qe,
this.ne);if(!a.getColorComponents(q)[3]||!(this.Ae||this.Ce||this.Be))return null;h=h.copy();h.setColor(q);var z=a.MaskFilter.MakeBlur(a.BlurStyle.Normal,this.Ae/2,!1);h.setMaskFilter(z);h.dispose=function(){z.delete();this.delete()};return h};this.kf=function(){var h=this.Sd.copy();h.setStyle(a.PaintStyle.Stroke);if(c(this.le)){var q=a.multiplyByAlpha(this.le,this.ne);h.setColor(q)}else q=this.le.ye(this.Xd),h.setColor(a.Color(0,0,0,this.ne)),h.setShader(q);h.setStrokeWidth(this.Re);if(this.ze.length){var z=
a.PathEffect.MakeDash(this.ze,this.Pe);h.setPathEffect(z)}h.dispose=function(){z&&z.delete();this.delete()};return h};this.stroke=function(h){h=h?h.Zd:this.Wd;var q=this.kf(),z=this.De(q);z&&(this.Qd.save(),this.ve(),this.Qd.drawPath(h,z),this.Qd.restore(),z.dispose());this.Qd.drawPath(h,q);q.dispose()};this.strokeRect=function(h,q,z,C){var E=this.kf(),G=this.De(E);G&&(this.Qd.save(),this.ve(),this.Qd.drawRect(a.XYWHRect(h,q,z,C),G),this.Qd.restore(),G.dispose());this.Qd.drawRect(a.XYWHRect(h,q,z,
C),E);E.dispose()};this.strokeText=function(h,q,z){var C=this.kf();h=a.TextBlob.MakeFromText(h,this.xe);var E=this.De(C);E&&(this.Qd.save(),this.ve(),this.Qd.drawTextBlob(h,q,z,E),this.Qd.restore(),E.dispose());this.Qd.drawTextBlob(h,q,z,C);h.delete();C.dispose()};this.translate=function(h,q){if(f(arguments)){var z=a.Matrix.translated(-h,-q);this.Wd.transform(z);this.Qd.translate(h,q);this.Xd=this.Qd.getTotalMatrix()}};this.transform=function(h,q,z,C,E,G){h=[h,z,E,q,C,G,0,0,1];q=a.Matrix.invert(h);
this.Wd.transform(q);this.Qd.concat(h);this.Xd=this.Qd.getTotalMatrix()};this.addHitRegion=function(){};this.clearHitRegions=function(){};this.drawFocusIfNeeded=function(){};this.removeHitRegion=function(){};this.scrollPathIntoView=function(){};Object.defineProperty(this,"canvas",{value:null,writable:!1})}function U(H){this.lf=H;this.qe=new L(H.getCanvas());this.bf=[];this.Jf=a.FontMgr.RefDefault();this.decodeImage=function(h){h=a.MakeImageFromEncoded(h);if(!h)throw"Invalid input";this.bf.push(h);
return h};this.loadFont=function(h,q){h=this.Jf.MakeTypefaceFromData(h);if(!h)return null;this.bf.push(h);var z=(q.style||"normal")+"|"+(q.variant||"normal")+"|"+(q.weight||"normal");q=q.family;ha[q]||(ha[q]={"*":h});ha[q][z]=h};this.makePath2D=function(h){h=new K(h);this.bf.push(h.Zd);return h};this.getContext=function(h){return"2d"===h?this.qe:null};this.toDataURL=function(h,q){this.lf.flush();var z=this.lf.makeImageSnapshot();if(z){h=h||"image/png";var C=a.ImageFormat.PNG;"image/jpeg"===h&&(C=
a.ImageFormat.JPEG);if(q=z.encodeToData(C,q||.92)){q=a.getDataBytes(q);h="data:"+h+";base64,";if(pa)q=Buffer.from(q).toString("base64");else{z=0;C=q.length;for(var E="",G;z<C;)G=q.slice(z,Math.min(z+32768,C)),E+=String.fromCharCode.apply(null,G),z+=32768;q=btoa(E)}return h+q}}};this.dispose=function(){this.qe.oe();this.bf.forEach(function(h){h.delete()});this.lf.dispose()}}function V(H,h,q){if(!h||0===q)throw"invalid dimensions, width and height must be non-zero";if(H.length%4)throw"arr must be a multiple of 4";
q=q||H.length/(4*h);Object.defineProperty(this,"data",{value:H,writable:!1});Object.defineProperty(this,"height",{value:q,writable:!1});Object.defineProperty(this,"width",{value:h,writable:!1})}function e(H,h,q,z){this.ae=null;this.ie=[];this.ce=[];this.addColorStop=function(C,E){if(0>C||1<C||!isFinite(C))throw"offset must be between 0 and 1 inclusively";E=y(E);var G=this.ce.indexOf(C);if(-1!==G)this.ie[G]=E;else{for(G=0;G<this.ce.length&&!(this.ce[G]>C);G++);this.ce.splice(G,0,C);this.ie.splice(G,
0,E)}};this.we=function(){var C=new e(H,h,q,z);C.ie=this.ie.slice();C.ce=this.ce.slice();return C};this.oe=function(){this.ae&&(this.ae.delete(),this.ae=null)};this.ye=function(C){var E=[H,h,q,z];a.Matrix.mapPoints(C,E);C=E[0];var G=E[1],P=E[2];E=E[3];this.oe();return this.ae=a.Shader.MakeLinearGradient([C,G],[P,E],this.ie,this.ce,a.TileMode.Clamp)}}function k(H,h,q,z,C,E){if(f([h,q,z,C,E])){if(0>E)throw"radii cannot be negative";H.isEmpty()&&H.moveTo(h,q);H.arcToTangent(h,q,z,C,E)}}function r(H){if(!H.isEmpty()){var h=
H.getBounds();(h[3]-h[1]||h[2]-h[0])&&H.close()}}function w(H,h,q,z,C,E,G){G=(G-E)/Math.PI*180;E=E/Math.PI*180;h=a.LTRBRect(h-z,q-C,h+z,q+C);1E-5>Math.abs(Math.abs(G)-360)?(q=G/2,H.arcToOval(h,E,q,!1),H.arcToOval(h,E+q,q,!1)):H.arcToOval(h,E,G,!1)}function p(H,h,q,z,C,E,G,P,ba){if(f([h,q,z,C,E,G,P])){if(0>z||0>C)throw"radii cannot be negative";var la=2*Math.PI,ra=G%la;0>ra&&(ra+=la);var sa=ra-G;G=ra;P+=sa;!ba&&P-G>=la?P=G+la:ba&&G-P>=la?P=G-la:!ba&&G>P?P=G+(la-(G-P)%la):ba&&G<P&&(P=G-(la-(P-G)%la));
E?(ba=a.Matrix.rotated(E,h,q),E=a.Matrix.rotated(-E,h,q),H.transform(E),w(H,h,q,z,C,G,P),H.transform(ba)):w(H,h,q,z,C,G,P)}}function x(H,h,q){f([h,q])&&(H.isEmpty()&&H.moveTo(h,q),H.lineTo(h,q))}function K(H){this.Zd=null;"string"===typeof H?this.Zd=a.Path.MakeFromSVGString(H):H&&H.hf?this.Zd=H.Zd.copy():this.Zd=new a.Path;this.hf=function(){return this.Zd};this.addPath=function(h,q){q||(q={a:1,c:0,e:0,b:0,d:1,f:0});this.Zd.addPath(h.Zd,[q.a,q.c,q.e,q.b,q.d,q.f])};this.arc=function(h,q,z,C,E,G){p(this.Zd,
h,q,z,z,0,C,E,G)};this.arcTo=function(h,q,z,C,E){k(this.Zd,h,q,z,C,E)};this.bezierCurveTo=function(h,q,z,C,E,G){var P=this.Zd;f([h,q,z,C,E,G])&&(P.isEmpty()&&P.moveTo(h,q),P.cubicTo(h,q,z,C,E,G))};this.closePath=function(){r(this.Zd)};this.ellipse=function(h,q,z,C,E,G,P,ba){p(this.Zd,h,q,z,C,E,G,P,ba)};this.lineTo=function(h,q){x(this.Zd,h,q)};this.moveTo=function(h,q){var z=this.Zd;f([h,q])&&z.moveTo(h,q)};this.quadraticCurveTo=function(h,q,z,C){var E=this.Zd;f([h,q,z,C])&&(E.isEmpty()&&E.moveTo(h,
q),E.quadTo(h,q,z,C))};this.rect=function(h,q,z,C){var E=this.Zd;h=a.XYWHRect(h,q,z,C);f(h)&&E.addRect(h)}}function O(H,h){this.ae=null;this.Lf=H;this._transform=a.Matrix.identity();""===h&&(h="repeat");switch(h){case "repeat-x":this.Ee=a.TileMode.Repeat;this.Fe=a.TileMode.Decal;break;case "repeat-y":this.Ee=a.TileMode.Decal;this.Fe=a.TileMode.Repeat;break;case "repeat":this.Fe=this.Ee=a.TileMode.Repeat;break;case "no-repeat":this.Fe=this.Ee=a.TileMode.Decal;break;default:throw"invalid repetition mode "+
h;}this.setTransform=function(q){q=[q.a,q.c,q.e,q.b,q.d,q.f,0,0,1];f(q)&&(this._transform=q)};this.we=function(){var q=new O;q.Ee=this.Ee;q.Fe=this.Fe;return q};this.oe=function(){this.ae&&(this.ae.delete(),this.ae=null)};this.ye=function(){this.oe();return this.ae=this.Lf.makeShader(this.Ee,this.Fe,this._transform)}}function S(H,h,q,z,C,E){this.ae=null;this.ie=[];this.ce=[];this.addColorStop=function(G,P){if(0>G||1<G||!isFinite(G))throw"offset must be between 0 and 1 inclusively";P=y(P);var ba=this.ce.indexOf(G);
if(-1!==ba)this.ie[ba]=P;else{for(ba=0;ba<this.ce.length&&!(this.ce[ba]>G);ba++);this.ce.splice(ba,0,G);this.ie.splice(ba,0,P)}};this.we=function(){var G=new S(H,h,q,z,C,E);G.ie=this.ie.slice();G.ce=this.ce.slice();return G};this.oe=function(){this.ae&&(this.ae.delete(),this.ae=null)};this.ye=function(G){var P=[H,h,z,C];a.Matrix.mapPoints(G,P);var ba=P[0],la=P[1],ra=P[2];P=P[3];var sa=(Math.abs(G[0])+Math.abs(G[4]))/2;G=q*sa;sa*=E;this.oe();return this.ae=a.Shader.MakeTwoPointConicalGradient([ba,
la],G,[ra,P],sa,this.ie,this.ce,a.TileMode.Clamp)}}a._testing={};var Y={aliceblue:Float32Array.of(.941,.973,1,1),antiquewhite:Float32Array.of(.98,.922,.843,1),aqua:Float32Array.of(0,1,1,1),aquamarine:Float32Array.of(.498,1,.831,1),azure:Float32Array.of(.941,1,1,1),beige:Float32Array.of(.961,.961,.863,1),bisque:Float32Array.of(1,.894,.769,1),black:Float32Array.of(0,0,0,1),blanchedalmond:Float32Array.of(1,.922,.804,1),blue:Float32Array.of(0,0,1,1),blueviolet:Float32Array.of(.541,.169,.886,1),brown:Float32Array.of(.647,
.165,.165,1),burlywood:Float32Array.of(.871,.722,.529,1),cadetblue:Float32Array.of(.373,.62,.627,1),chartreuse:Float32Array.of(.498,1,0,1),chocolate:Float32Array.of(.824,.412,.118,1),coral:Float32Array.of(1,.498,.314,1),cornflowerblue:Float32Array.of(.392,.584,.929,1),cornsilk:Float32Array.of(1,.973,.863,1),crimson:Float32Array.of(.863,.078,.235,1),cyan:Float32Array.of(0,1,1,1),darkblue:Float32Array.of(0,0,.545,1),darkcyan:Float32Array.of(0,.545,.545,1),darkgoldenrod:Float32Array.of(.722,.525,.043,
1),darkgray:Float32Array.of(.663,.663,.663,1),darkgreen:Float32Array.of(0,.392,0,1),darkgrey:Float32Array.of(.663,.663,.663,1),darkkhaki:Float32Array.of(.741,.718,.42,1),darkmagenta:Float32Array.of(.545,0,.545,1),darkolivegreen:Float32Array.of(.333,.42,.184,1),darkorange:Float32Array.of(1,.549,0,1),darkorchid:Float32Array.of(.6,.196,.8,1),darkred:Float32Array.of(.545,0,0,1),darksalmon:Float32Array.of(.914,.588,.478,1),darkseagreen:Float32Array.of(.561,.737,.561,1),darkslateblue:Float32Array.of(.282,
.239,.545,1),darkslategray:Float32Array.of(.184,.31,.31,1),darkslategrey:Float32Array.of(.184,.31,.31,1),darkturquoise:Float32Array.of(0,.808,.82,1),darkviolet:Float32Array.of(.58,0,.827,1),deeppink:Float32Array.of(1,.078,.576,1),deepskyblue:Float32Array.of(0,.749,1,1),dimgray:Float32Array.of(.412,.412,.412,1),dimgrey:Float32Array.of(.412,.412,.412,1),dodgerblue:Float32Array.of(.118,.565,1,1),firebrick:Float32Array.of(.698,.133,.133,1),floralwhite:Float32Array.of(1,.98,.941,1),forestgreen:Float32Array.of(.133,
.545,.133,1),fuchsia:Float32Array.of(1,0,1,1),gainsboro:Float32Array.of(.863,.863,.863,1),ghostwhite:Float32Array.of(.973,.973,1,1),gold:Float32Array.of(1,.843,0,1),goldenrod:Float32Array.of(.855,.647,.125,1),gray:Float32Array.of(.502,.502,.502,1),green:Float32Array.of(0,.502,0,1),greenyellow:Float32Array.of(.678,1,.184,1),grey:Float32Array.of(.502,.502,.502,1),honeydew:Float32Array.of(.941,1,.941,1),hotpink:Float32Array.of(1,.412,.706,1),indianred:Float32Array.of(.804,.361,.361,1),indigo:Float32Array.of(.294,
0,.51,1),ivory:Float32Array.of(1,1,.941,1),khaki:Float32Array.of(.941,.902,.549,1),lavender:Float32Array.of(.902,.902,.98,1),lavenderblush:Float32Array.of(1,.941,.961,1),lawngreen:Float32Array.of(.486,.988,0,1),lemonchiffon:Float32Array.of(1,.98,.804,1),lightblue:Float32Array.of(.678,.847,.902,1),lightcoral:Float32Array.of(.941,.502,.502,1),lightcyan:Float32Array.of(.878,1,1,1),lightgoldenrodyellow:Float32Array.of(.98,.98,.824,1),lightgray:Float32Array.of(.827,.827,.827,1),lightgreen:Float32Array.of(.565,
.933,.565,1),lightgrey:Float32Array.of(.827,.827,.827,1),lightpink:Float32Array.of(1,.714,.757,1),lightsalmon:Float32Array.of(1,.627,.478,1),lightseagreen:Float32Array.of(.125,.698,.667,1),lightskyblue:Float32Array.of(.529,.808,.98,1),lightslategray:Float32Array.of(.467,.533,.6,1),lightslategrey:Float32Array.of(.467,.533,.6,1),lightsteelblue:Float32Array.of(.69,.769,.871,1),lightyellow:Float32Array.of(1,1,.878,1),lime:Float32Array.of(0,1,0,1),limegreen:Float32Array.of(.196,.804,.196,1),linen:Float32Array.of(.98,
.941,.902,1),magenta:Float32Array.of(1,0,1,1),maroon:Float32Array.of(.502,0,0,1),mediumaquamarine:Float32Array.of(.4,.804,.667,1),mediumblue:Float32Array.of(0,0,.804,1),mediumorchid:Float32Array.of(.729,.333,.827,1),mediumpurple:Float32Array.of(.576,.439,.859,1),mediumseagreen:Float32Array.of(.235,.702,.443,1),mediumslateblue:Float32Array.of(.482,.408,.933,1),mediumspringgreen:Float32Array.of(0,.98,.604,1),mediumturquoise:Float32Array.of(.282,.82,.8,1),mediumvioletred:Float32Array.of(.78,.082,.522,
1),midnightblue:Float32Array.of(.098,.098,.439,1),mintcream:Float32Array.of(.961,1,.98,1),mistyrose:Float32Array.of(1,.894,.882,1),moccasin:Float32Array.of(1,.894,.71,1),navajowhite:Float32Array.of(1,.871,.678,1),navy:Float32Array.of(0,0,.502,1),oldlace:Float32Array.of(.992,.961,.902,1),olive:Float32Array.of(.502,.502,0,1),olivedrab:Float32Array.of(.42,.557,.137,1),orange:Float32Array.of(1,.647,0,1),orangered:Float32Array.of(1,.271,0,1),orchid:Float32Array.of(.855,.439,.839,1),palegoldenrod:Float32Array.of(.933,
.91,.667,1),palegreen:Float32Array.of(.596,.984,.596,1),paleturquoise:Float32Array.of(.686,.933,.933,1),palevioletred:Float32Array.of(.859,.439,.576,1),papayawhip:Float32Array.of(1,.937,.835,1),peachpuff:Float32Array.of(1,.855,.725,1),peru:Float32Array.of(.804,.522,.247,1),pink:Float32Array.of(1,.753,.796,1),plum:Float32Array.of(.867,.627,.867,1),powderblue:Float32Array.of(.69,.878,.902,1),purple:Float32Array.of(.502,0,.502,1),rebeccapurple:Float32Array.of(.4,.2,.6,1),red:Float32Array.of(1,0,0,1),
rosybrown:Float32Array.of(.737,.561,.561,1),royalblue:Float32Array.of(.255,.412,.882,1),saddlebrown:Float32Array.of(.545,.271,.075,1),salmon:Float32Array.of(.98,.502,.447,1),sandybrown:Float32Array.of(.957,.643,.376,1),seagreen:Float32Array.of(.18,.545,.341,1),seashell:Float32Array.of(1,.961,.933,1),sienna:Float32Array.of(.627,.322,.176,1),silver:Float32Array.of(.753,.753,.753,1),skyblue:Float32Array.of(.529,.808,.922,1),slateblue:Float32Array.of(.416,.353,.804,1),slategray:Float32Array.of(.439,.502,
.565,1),slategrey:Float32Array.of(.439,.502,.565,1),snow:Float32Array.of(1,.98,.98,1),springgreen:Float32Array.of(0,1,.498,1),steelblue:Float32Array.of(.275,.51,.706,1),tan:Float32Array.of(.824,.706,.549,1),teal:Float32Array.of(0,.502,.502,1),thistle:Float32Array.of(.847,.749,.847,1),tomato:Float32Array.of(1,.388,.278,1),transparent:Float32Array.of(0,0,0,0),turquoise:Float32Array.of(.251,.878,.816,1),violet:Float32Array.of(.933,.51,.933,1),wheat:Float32Array.of(.961,.871,.702,1),white:Float32Array.of(1,
1,1,1),whitesmoke:Float32Array.of(.961,.961,.961,1),yellow:Float32Array.of(1,1,0,1),yellowgreen:Float32Array.of(.604,.804,.196,1)};a._testing.parseColor=y;a._testing.colorToString=m;var fa=/(italic|oblique|normal|)\s*(small-caps|normal|)\s*(bold|bolder|lighter|[1-9]00|normal|)\s*([\d\.]+)(px|pt|pc|in|cm|mm|%|em|ex|ch|rem|q)(.+)/,ha={"Noto Mono":{"*":null},monospace:{"*":null}};a._testing.parseFontString=D;a.MakeCanvas=function(H,h){return(H=a.MakeSurface(H,h))?new U(H):null};a.ImageData=function(){if(2===
arguments.length){var H=arguments[0],h=arguments[1];return new V(new Uint8ClampedArray(4*H*h),H,h)}if(3===arguments.length){var q=arguments[0];if(q.prototype.constructor!==Uint8ClampedArray)throw"bytes must be given as a Uint8ClampedArray";H=arguments[1];h=arguments[2];if(q%4)throw"bytes must be given in a multiple of 4";if(q%H)throw"bytes must divide evenly by width";if(h&&h!==q/(4*H))throw"invalid height given";return new V(q,H,q/(4*H))}throw"invalid number of arguments - takes 2 or 3, saw "+arguments.length;
}})()})(t);var oa={},qa;for(qa in t)t.hasOwnProperty(qa)&&(oa[qa]=t[qa]);var ua="./this.program";function va(a,b){throw b;}var wa=!1,xa=!1,ya=!1,za=!1;wa="object"===typeof window;xa="function"===typeof importScripts;ya="object"===typeof process&&"object"===typeof process.versions&&"string"===typeof process.versions.node;za=!wa&&!ya&&!xa;var Aa="",Ba,Ca,Da,Ea;
if(ya)Aa=xa?require("path").dirname(Aa)+"/":__dirname+"/",Ba=function(a,b){Da||(Da=require("fs"));Ea||(Ea=require("path"));a=Ea.normalize(a);return Da.readFileSync(a,b?null:"utf8")},Ca=function(a){a=Ba(a,!0);a.buffer||(a=new Uint8Array(a));assert(a.buffer);return a},1<process.argv.length&&(ua=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),process.on("uncaughtException",function(a){if(!(a instanceof Fa))throw a;}),process.on("unhandledRejection",Ka),va=function(a){process.exit(a)},t.inspect=
function(){return"[Emscripten Module object]"};else if(za)"undefined"!=typeof read&&(Ba=function(a){return read(a)}),Ca=function(a){if("function"===typeof readbuffer)return new Uint8Array(readbuffer(a));a=read(a,"binary");assert("object"===typeof a);return a},"function"===typeof quit&&(va=function(a){quit(a)}),"undefined"!==typeof print&&("undefined"===typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!==typeof printErr?printErr:print);else if(wa||xa)xa?Aa=self.location.href:
document.currentScript&&(Aa=document.currentScript.src),_scriptDir&&(Aa=_scriptDir),0!==Aa.indexOf("blob:")?Aa=Aa.substr(0,Aa.lastIndexOf("/")+1):Aa="",Ba=function(a){var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);return b.responseText},xa&&(Ca=function(a){var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)});var La=t.print||console.log.bind(console),Ma=t.printErr||console.warn.bind(console);
for(qa in oa)oa.hasOwnProperty(qa)&&(t[qa]=oa[qa]);oa=null;t.thisProgram&&(ua=t.thisProgram);t.quit&&(va=t.quit);var Na=0,Oa;t.wasmBinary&&(Oa=t.wasmBinary);var noExitRuntime;t.noExitRuntime&&(noExitRuntime=t.noExitRuntime);"object"!==typeof WebAssembly&&Ka("no native wasm support detected");var Pa,Qa,Ra=!1;function assert(a,b){a||Ka("Assertion failed: "+b)}var Sa="undefined"!==typeof TextDecoder?new TextDecoder("utf8"):void 0;
function Ta(a,b,c){var d=b+c;for(c=b;a[c]&&!(c>=d);)++c;if(16<c-b&&a.subarray&&Sa)return Sa.decode(a.subarray(b,c));for(d="";b<c;){var g=a[b++];if(g&128){var l=a[b++]&63;if(192==(g&224))d+=String.fromCharCode((g&31)<<6|l);else{var n=a[b++]&63;g=224==(g&240)?(g&15)<<12|l<<6|n:(g&7)<<18|l<<12|n<<6|a[b++]&63;65536>g?d+=String.fromCharCode(g):(g-=65536,d+=String.fromCharCode(55296|g>>10,56320|g&1023))}}else d+=String.fromCharCode(g)}return d}function Ua(a,b){return a?Ta(v,a,b):""}
function na(a,b,c,d){if(!(0<d))return 0;var g=c;d=c+d-1;for(var l=0;l<a.length;++l){var n=a.charCodeAt(l);if(55296<=n&&57343>=n){var u=a.charCodeAt(++l);n=65536+((n&1023)<<10)|u&1023}if(127>=n){if(c>=d)break;b[c++]=n}else{if(2047>=n){if(c+1>=d)break;b[c++]=192|n>>6}else{if(65535>=n){if(c+2>=d)break;b[c++]=224|n>>12}else{if(c+3>=d)break;b[c++]=240|n>>18;b[c++]=128|n>>12&63}b[c++]=128|n>>6&63}b[c++]=128|n&63}}b[c]=0;return c-g}
function ma(a){for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);55296<=d&&57343>=d&&(d=65536+((d&1023)<<10)|a.charCodeAt(++c)&1023);127>=d?++b:b=2047>=d?b+2:65535>=d?b+3:b+4}return b}var Va="undefined"!==typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function Wa(a,b){var c=a>>1;for(var d=c+b/2;!(c>=d)&&Xa[c];)++c;c<<=1;if(32<c-a&&Va)return Va.decode(v.subarray(a,c));c=0;for(d="";;){var g=Ya[a+2*c>>1];if(0==g||c==b/2)return d;++c;d+=String.fromCharCode(g)}}
function cb(a,b,c){void 0===c&&(c=2147483647);if(2>c)return 0;c-=2;var d=b;c=c<2*a.length?c/2:a.length;for(var g=0;g<c;++g)Ya[b>>1]=a.charCodeAt(g),b+=2;Ya[b>>1]=0;return b-d}function db(a){return 2*a.length}function eb(a,b){for(var c=0,d="";!(c>=b/4);){var g=J[a+4*c>>2];if(0==g)break;++c;65536<=g?(g-=65536,d+=String.fromCharCode(55296|g>>10,56320|g&1023)):d+=String.fromCharCode(g)}return d}
function fb(a,b,c){void 0===c&&(c=2147483647);if(4>c)return 0;var d=b;c=d+c-4;for(var g=0;g<a.length;++g){var l=a.charCodeAt(g);if(55296<=l&&57343>=l){var n=a.charCodeAt(++g);l=65536+((l&1023)<<10)|n&1023}J[b>>2]=l;b+=4;if(b+4>c)break}J[b>>2]=0;return b-d}function gb(a){for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);55296<=d&&57343>=d&&++c;b+=4}return b}var hb,ib,v,Ya,Xa,J,jb,R,kb;
function lb(a){hb=a;t.HEAP8=ib=new Int8Array(a);t.HEAP16=Ya=new Int16Array(a);t.HEAP32=J=new Int32Array(a);t.HEAPU8=v=new Uint8Array(a);t.HEAPU16=Xa=new Uint16Array(a);t.HEAPU32=jb=new Uint32Array(a);t.HEAPF32=R=new Float32Array(a);t.HEAPF64=kb=new Float64Array(a)}var ob=t.INITIAL_MEMORY||134217728;t.wasmMemory?Pa=t.wasmMemory:Pa=new WebAssembly.Memory({initial:ob/65536,maximum:32768});Pa&&(hb=Pa.buffer);ob=hb.byteLength;lb(hb);var pb=[],qb=[],rb=[],sb=[];
function tb(){var a=t.preRun.shift();pb.unshift(a)}var ub=0,vb=null,wb=null;t.preloadedImages={};t.preloadedAudios={};function Ka(a){if(t.onAbort)t.onAbort(a);Ma(a);Ra=!0;a=new WebAssembly.RuntimeError("abort("+a+"). Build with -s ASSERTIONS=1 for more info.");ca(a);throw a;}function xb(a){var b=yb;return String.prototype.startsWith?b.startsWith(a):0===b.indexOf(a)}function zb(){return xb("data:application/octet-stream;base64,")}var yb="canvaskit.wasm";
if(!zb()){var Ab=yb;yb=t.locateFile?t.locateFile(Ab,Aa):Aa+Ab}function Bb(){try{if(Oa)return new Uint8Array(Oa);if(Ca)return Ca(yb);throw"both async and sync fetching of the wasm failed";}catch(a){Ka(a)}}function Cb(){return Oa||!wa&&!xa||"function"!==typeof fetch||xb("file://")?Promise.resolve().then(Bb):fetch(yb,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+yb+"'";return a.arrayBuffer()}).catch(function(){return Bb()})}
function Eb(a){for(;0<a.length;){var b=a.shift();if("function"==typeof b)b(t);else{var c=b.Wf;"number"===typeof c?void 0===b.mf?Qa.get(c)():Qa.get(c)(b.mf):c(void 0===b.mf?null:b.mf)}}}function Fb(a){this.Td=a-16;this.ug=function(b){J[this.Td+8>>2]=b};this.rg=function(b){J[this.Td+0>>2]=b};this.sg=function(){J[this.Td+4>>2]=0};this.qg=function(){ib[this.Td+12>>0]=0};this.tg=function(){ib[this.Td+13>>0]=0};this.cg=function(b,c){this.ug(b);this.rg(c);this.sg();this.qg();this.tg()}}
function Gb(){return 0<Gb.Gf}var Hb={},Ib=[null,[],[]],Jb={},Kb={};function Lb(a){for(;a.length;){var b=a.pop();a.pop()(b)}}function Mb(a){return this.fromWireType(jb[a>>2])}var Nb={},Ob={},Pb={};function Qb(a){if(void 0===a)return"_unknown";a=a.replace(/[^a-zA-Z0-9_]/g,"$");var b=a.charCodeAt(0);return 48<=b&&57>=b?"_"+a:a}function Rb(a,b){a=Qb(a);return(new Function("body","return function "+a+'() {\n "use strict"; return body.apply(this, arguments);\n};\n'))(b)}
function Sb(a){var b=Error,c=Rb(a,function(d){this.name=a;this.message=d;d=Error(d).stack;void 0!==d&&(this.stack=this.toString()+"\n"+d.replace(/^Error(:[^\n]*)?\n/,""))});c.prototype=Object.create(b.prototype);c.prototype.constructor=c;c.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message};return c}var Tb=void 0;function Ub(a){throw new Tb(a);}
function Vb(a,b,c){function d(u){u=c(u);u.length!==a.length&&Ub("Mismatched type converter count");for(var A=0;A<a.length;++A)Wb(a[A],u[A])}a.forEach(function(u){Pb[u]=b});var g=Array(b.length),l=[],n=0;b.forEach(function(u,A){Ob.hasOwnProperty(u)?g[A]=Ob[u]:(l.push(u),Nb.hasOwnProperty(u)||(Nb[u]=[]),Nb[u].push(function(){g[A]=Ob[u];++n;n===l.length&&d(g)}))});0===l.length&&d(g)}var Xb={};
function Yb(a){switch(a){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+a);}}var Zb=void 0;function $b(a){for(var b="";v[a];)b+=Zb[v[a++]];return b}var ac=void 0;function bc(a){throw new ac(a);}
function Wb(a,b,c){c=c||{};if(!("argPackAdvance"in b))throw new TypeError("registerType registeredInstance requires argPackAdvance");var d=b.name;a||bc('type "'+d+'" must have a positive integer typeid pointer');if(Ob.hasOwnProperty(a)){if(c.bg)return;bc("Cannot register type '"+d+"' twice")}Ob[a]=b;delete Pb[a];Nb.hasOwnProperty(a)&&(b=Nb[a],delete Nb[a],b.forEach(function(g){g()}))}function cc(a){return{count:a.count,Je:a.Je,We:a.We,Td:a.Td,$d:a.$d,he:a.he,ke:a.ke}}
function dc(a){bc(a.Pd.$d.Vd.name+" instance already deleted")}var ec=!1;function fc(){}function oc(a){--a.count.value;0===a.count.value&&(a.he?a.ke.je(a.he):a.$d.Vd.je(a.Td))}
function pc(a){if("undefined"===typeof FinalizationGroup)return pc=function(b){return b},a;ec=new FinalizationGroup(function(b){for(var c=b.next();!c.done;c=b.next())c=c.value,c.Td?oc(c):console.warn("object already deleted: "+c.Td)});pc=function(b){ec.register(b,b.Pd,b.Pd);return b};fc=function(b){ec.unregister(b.Pd)};return pc(a)}var qc=void 0,rc=[];function sc(){for(;rc.length;){var a=rc.pop();a.Pd.Je=!1;a["delete"]()}}function tc(){}var uc={};
function vc(a,b,c){if(void 0===a[b].be){var d=a[b];a[b]=function(){a[b].be.hasOwnProperty(arguments.length)||bc("Function '"+c+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+a[b].be+")!");return a[b].be[arguments.length].apply(this,arguments)};a[b].be=[];a[b].be[d.He]=d}}
function wc(a,b,c){t.hasOwnProperty(a)?((void 0===c||void 0!==t[a].be&&void 0!==t[a].be[c])&&bc("Cannot register public name '"+a+"' twice"),vc(t,a,a),t.hasOwnProperty(c)&&bc("Cannot register multiple overloads of a function with the same number of arguments ("+c+")!"),t[a].be[c]=b):(t[a]=b,void 0!==c&&(t[a].Kg=c))}function xc(a,b,c,d,g,l,n,u){this.name=a;this.constructor=b;this.Ke=c;this.je=d;this.me=g;this.Zf=l;this.Ze=n;this.Sf=u;this.ng=[]}
function yc(a,b,c){for(;b!==c;)b.Ze||bc("Expected null or instance of "+c.name+", got an instance of "+b.name),a=b.Ze(a),b=b.me;return a}function zc(a,b){if(null===b)return this.sf&&bc("null is not a valid "+this.name),0;b.Pd||bc('Cannot pass "'+Ac(b)+'" as a '+this.name);b.Pd.Td||bc("Cannot pass deleted object as a pointer of type "+this.name);return yc(b.Pd.Td,b.Pd.$d.Vd,this.Vd)}
function Bc(a,b){if(null===b){this.sf&&bc("null is not a valid "+this.name);if(this.df){var c=this.Xe();null!==a&&a.push(this.je,c);return c}return 0}b.Pd||bc('Cannot pass "'+Ac(b)+'" as a '+this.name);b.Pd.Td||bc("Cannot pass deleted object as a pointer of type "+this.name);!this.cf&&b.Pd.$d.cf&&bc("Cannot convert argument of type "+(b.Pd.ke?b.Pd.ke.name:b.Pd.$d.name)+" to parameter type "+this.name);c=yc(b.Pd.Td,b.Pd.$d.Vd,this.Vd);if(this.df)switch(void 0===b.Pd.he&&bc("Passing raw pointer to smart pointer is illegal"),
this.vg){case 0:b.Pd.ke===this?c=b.Pd.he:bc("Cannot convert argument of type "+(b.Pd.ke?b.Pd.ke.name:b.Pd.$d.name)+" to parameter type "+this.name);break;case 1:c=b.Pd.he;break;case 2:if(b.Pd.ke===this)c=b.Pd.he;else{var d=b.clone();c=this.og(c,Cc(function(){d["delete"]()}));null!==a&&a.push(this.je,c)}break;default:bc("Unsupporting sharing policy")}return c}
function Dc(a,b){if(null===b)return this.sf&&bc("null is not a valid "+this.name),0;b.Pd||bc('Cannot pass "'+Ac(b)+'" as a '+this.name);b.Pd.Td||bc("Cannot pass deleted object as a pointer of type "+this.name);b.Pd.$d.cf&&bc("Cannot convert argument of type "+b.Pd.$d.name+" to parameter type "+this.name);return yc(b.Pd.Td,b.Pd.$d.Vd,this.Vd)}function Ec(a,b,c){if(b===c)return a;if(void 0===c.me)return null;a=Ec(a,b,c.me);return null===a?null:c.Sf(a)}var Fc={};
function Gc(a,b){for(void 0===b&&bc("ptr should not be undefined");a.me;)b=a.Ze(b),a=a.me;return Fc[b]}function Hc(a,b){b.$d&&b.Td||Ub("makeClassHandle requires ptr and ptrType");!!b.ke!==!!b.he&&Ub("Both smartPtrType and smartPtr must be specified");b.count={value:1};return pc(Object.create(a,{Pd:{value:b}}))}
function Ic(a,b,c,d,g,l,n,u,A,F,I){this.name=a;this.Vd=b;this.sf=c;this.cf=d;this.df=g;this.mg=l;this.vg=n;this.Ff=u;this.Xe=A;this.og=F;this.je=I;g||void 0!==b.me?this.toWireType=Bc:(this.toWireType=d?zc:Dc,this.ge=null)}function Jc(a,b,c){t.hasOwnProperty(a)||Ub("Replacing nonexistant public symbol");void 0!==t[a].be&&void 0!==c?t[a].be[c]=b:(t[a]=b,t[a].He=c)}
function Kc(a,b){assert(0<=a.indexOf("j"),"getDynCaller should only be called with i64 sigs");var c=[];return function(){c.length=arguments.length;for(var d=0;d<arguments.length;d++)c[d]=arguments[d];var g;-1!=a.indexOf("j")?g=c&&c.length?t["dynCall_"+a].apply(null,[b].concat(c)):t["dynCall_"+a].call(null,b):g=Qa.get(b).apply(null,c);return g}}
function Lc(a,b){a=$b(a);var c=-1!=a.indexOf("j")?Kc(a,b):Qa.get(b);"function"!==typeof c&&bc("unknown function pointer with signature "+a+": "+b);return c}var Mc=void 0;function Nc(a){a=Vc(a);var b=$b(a);Wc(a);return b}function Xc(a,b){function c(l){g[l]||Ob[l]||(Pb[l]?Pb[l].forEach(c):(d.push(l),g[l]=!0))}var d=[],g={};b.forEach(c);throw new Mc(a+": "+d.map(Nc).join([", "]));}
function Yc(a){var b=Function;if(!(b instanceof Function))throw new TypeError("new_ called with constructor type "+typeof b+" which is not a function");var c=Rb(b.name||"unknownFunctionName",function(){});c.prototype=b.prototype;c=new c;a=b.apply(c,a);return a instanceof Object?a:c}
function Zc(a,b,c,d,g){var l=b.length;2>l&&bc("argTypes array size mismatch! Must at least get return value and 'this' types!");var n=null!==b[1]&&null!==c,u=!1;for(c=1;c<b.length;++c)if(null!==b[c]&&void 0===b[c].ge){u=!0;break}var A="void"!==b[0].name,F="",I="";for(c=0;c<l-2;++c)F+=(0!==c?", ":"")+"arg"+c,I+=(0!==c?", ":"")+"arg"+c+"Wired";a="return function "+Qb(a)+"("+F+") {\nif (arguments.length !== "+(l-2)+") {\nthrowBindingError('function "+a+" called with ' + arguments.length + ' arguments, expected "+
(l-2)+" args!');\n}\n";u&&(a+="var destructors = [];\n");var M=u?"destructors":"null";F="throwBindingError invoker fn runDestructors retType classParam".split(" ");d=[bc,d,g,Lb,b[0],b[1]];n&&(a+="var thisWired = classParam.toWireType("+M+", this);\n");for(c=0;c<l-2;++c)a+="var arg"+c+"Wired = argType"+c+".toWireType("+M+", arg"+c+"); // "+b[c+2].name+"\n",F.push("argType"+c),d.push(b[c+2]);n&&(I="thisWired"+(0<I.length?", ":"")+I);a+=(A?"var rv = ":"")+"invoker(fn"+(0<I.length?", ":"")+I+");\n";if(u)a+=
"runDestructors(destructors);\n";else for(c=n?1:2;c<b.length;++c)l=1===c?"thisWired":"arg"+(c-2)+"Wired",null!==b[c].ge&&(a+=l+"_dtor("+l+"); // "+b[c].name+"\n",F.push(l+"_dtor"),d.push(b[c].ge));A&&(a+="var ret = retType.fromWireType(rv);\nreturn ret;\n");F.push(a+"}\n");return Yc(F).apply(null,d)}function $c(a,b){for(var c=[],d=0;d<a;d++)c.push(J[(b>>2)+d]);return c}var ad=[],bd=[{},{value:void 0},{value:null},{value:!0},{value:!1}];
function cd(a){4<a&&0===--bd[a].uf&&(bd[a]=void 0,ad.push(a))}function Cc(a){switch(a){case void 0:return 1;case null:return 2;case !0:return 3;case !1:return 4;default:var b=ad.length?ad.pop():bd.length;bd[b]={uf:1,value:a};return b}}
function dd(a,b,c){switch(b){case 0:return function(d){return this.fromWireType((c?ib:v)[d])};case 1:return function(d){return this.fromWireType((c?Ya:Xa)[d>>1])};case 2:return function(d){return this.fromWireType((c?J:jb)[d>>2])};default:throw new TypeError("Unknown integer type: "+a);}}function ed(a,b){var c=Ob[a];void 0===c&&bc(b+" has unknown type "+Nc(a));return c}function Ac(a){if(null===a)return"null";var b=typeof a;return"object"===b||"array"===b||"function"===b?a.toString():""+a}
function fd(a,b){switch(b){case 2:return function(c){return this.fromWireType(R[c>>2])};case 3:return function(c){return this.fromWireType(kb[c>>3])};default:throw new TypeError("Unknown float type: "+a);}}
function gd(a,b,c){switch(b){case 0:return c?function(d){return ib[d]}:function(d){return v[d]};case 1:return c?function(d){return Ya[d>>1]}:function(d){return Xa[d>>1]};case 2:return c?function(d){return J[d>>2]}:function(d){return jb[d>>2]};default:throw new TypeError("Unknown integer type: "+a);}}var hd={};function id(a){var b=hd[a];return void 0===b?$b(a):b}var jd=[];function kd(a){a||bc("Cannot use deleted val. handle = "+a);return bd[a].value}
function ld(a){var b=jd.length;jd.push(a);return b}function md(a,b){for(var c=Array(a),d=0;d<a;++d)c[d]=ed(J[(b>>2)+d],"parameter "+d);return c}var nd;ya?nd=function(){var a=process.hrtime();return 1E3*a[0]+a[1]/1E6}:"undefined"!==typeof dateNow?nd=dateNow:nd=function(){return performance.now()};
function od(a){var b=a.getExtension("ANGLE_instanced_arrays");b&&(a.vertexAttribDivisor=function(c,d){b.vertexAttribDivisorANGLE(c,d)},a.drawArraysInstanced=function(c,d,g,l){b.drawArraysInstancedANGLE(c,d,g,l)},a.drawElementsInstanced=function(c,d,g,l,n){b.drawElementsInstancedANGLE(c,d,g,l,n)})}
function pd(a){var b=a.getExtension("OES_vertex_array_object");b&&(a.createVertexArray=function(){return b.createVertexArrayOES()},a.deleteVertexArray=function(c){b.deleteVertexArrayOES(c)},a.bindVertexArray=function(c){b.bindVertexArrayOES(c)},a.isVertexArray=function(c){return b.isVertexArrayOES(c)})}function qd(a){var b=a.getExtension("WEBGL_draw_buffers");b&&(a.drawBuffers=function(c,d){b.drawBuffersWEBGL(c,d)})}
var rd=1,sd=[],td=[],ud=[],vd=[],wd=[],X=[],xd=[],yd=[],ia=[],zd=[],Ad=[],Bd={},Cd={},Dd={},Ed=4;function Fd(a){Gd||(Gd=a)}function da(a){for(var b=rd++,c=a.length;c<b;c++)a[c]=null;return b}function ka(a){Hd=ia[a];t.Fg=Z=Hd&&Hd.yf;return!(a&&!Z)}
function ja(a){a||(a=Hd);if(!a.dg){a.dg=!0;var b=a.yf;od(b);pd(b);qd(b);b.Cf=b.getExtension("WEBGL_draw_instanced_base_vertex_base_instance");b.Ef=b.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance");b.Gg=b.getExtension("EXT_disjoint_timer_query");b.Jg=b.getExtension("WEBGL_multi_draw");var c="OES_texture_float OES_texture_half_float OES_standard_derivatives OES_vertex_array_object WEBGL_compressed_texture_s3tc WEBGL_depth_texture OES_element_index_uint EXT_texture_filter_anisotropic EXT_frag_depth WEBGL_draw_buffers ANGLE_instanced_arrays OES_texture_float_linear OES_texture_half_float_linear EXT_blend_minmax EXT_shader_texture_lod EXT_texture_norm16 WEBGL_compressed_texture_pvrtc EXT_color_buffer_half_float WEBGL_color_buffer_float EXT_sRGB WEBGL_compressed_texture_etc1 EXT_disjoint_timer_query WEBGL_compressed_texture_etc WEBGL_compressed_texture_astc EXT_color_buffer_float WEBGL_compressed_texture_s3tc_srgb EXT_disjoint_timer_query_webgl2 WEBKIT_WEBGL_compressed_texture_pvrtc".split(" ");
(b.getSupportedExtensions()||[]).forEach(function(d){-1!=c.indexOf(d)&&b.getExtension(d)})}}var Gd,Hd,Id=[];function Jd(a,b,c,d){for(var g=0;g<a;g++){var l=Z[c](),n=l&&da(d);l?(l.name=n,d[n]=l):Fd(1282);J[b+4*g>>2]=n}}
function Kd(a,b){if(b){var c=void 0;switch(a){case 36346:c=1;break;case 36344:return;case 34814:case 36345:c=0;break;case 34466:var d=Z.getParameter(34467);c=d?d.length:0;break;case 33309:if(2>Hd.version){Fd(1282);return}c=2*(Z.getSupportedExtensions()||[]).length;break;case 33307:case 33308:if(2>Hd.version){Fd(1280);return}c=33307==a?3:0}if(void 0===c)switch(d=Z.getParameter(a),typeof d){case "number":c=d;break;case "boolean":c=d?1:0;break;case "string":Fd(1280);return;case "object":if(null===d)switch(a){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 36662:case 36663:case 35053:case 35055:case 36010:case 35097:case 35869:case 32874:case 36389:case 35983:case 35368:case 34068:c=
0;break;default:Fd(1280);return}else{if(d instanceof Float32Array||d instanceof Uint32Array||d instanceof Int32Array||d instanceof Array){for(a=0;a<d.length;++a)J[b+4*a>>2]=d[a];return}try{c=d.name|0}catch(g){Fd(1280);Ma("GL_INVALID_ENUM in glGet0v: Unknown object returned from WebGL getParameter("+a+")! (error: "+g+")");return}}break;default:Fd(1280);Ma("GL_INVALID_ENUM in glGet0v: Native code calling glGet0v("+a+") and it returns "+d+" of type "+typeof d+"!");return}J[b>>2]=c}else Fd(1281)}
function Ld(a){var b=ma(a)+1,c=Md(b);na(a,v,c,b);return c}function Nd(a){a-=5120;return 0==a?ib:1==a?v:2==a?Ya:4==a?J:6==a?R:5==a||28922==a||28520==a||30779==a||30782==a?jb:Xa}function Od(a,b,c,d,g){a=Nd(a);var l=31-Math.clz32(a.BYTES_PER_ELEMENT),n=Ed;return a.subarray(g>>l,g+d*(c*({5:3,6:4,8:2,29502:3,29504:4,26917:2,26918:2,29846:3,29847:4}[b-6402]||1)*(1<<l)+n-1&-n)>>l)}var Pd=[],Qd=[],Rd={};
function Sd(){if(!Td){var a={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",_:ua||"./this.program"},b;for(b in Rd)a[b]=Rd[b];var c=[];for(b in a)c.push(b+"="+a[b]);Td=c}return Td}var Td;function Ud(a){return 0===a%4&&(0!==a%100||0===a%400)}function Vd(a,b){for(var c=0,d=0;d<=b;c+=a[d++]);return c}
var Wd=[31,29,31,30,31,30,31,31,30,31,30,31],Xd=[31,28,31,30,31,30,31,31,30,31,30,31];function Yd(a,b){for(a=new Date(a.getTime());0<b;){var c=a.getMonth(),d=(Ud(a.getFullYear())?Wd:Xd)[c];if(b>d-a.getDate())b-=d-a.getDate()+1,a.setDate(1),11>c?a.setMonth(c+1):(a.setMonth(0),a.setFullYear(a.getFullYear()+1));else{a.setDate(a.getDate()+b);break}}return a}
function Zd(a,b,c,d){function g(B,N,W){for(B="number"===typeof B?B.toString():B||"";B.length<N;)B=W[0]+B;return B}function l(B,N){return g(B,N,"0")}function n(B,N){function W(T){return 0>T?-1:0<T?1:0}var ea;0===(ea=W(B.getFullYear()-N.getFullYear()))&&0===(ea=W(B.getMonth()-N.getMonth()))&&(ea=W(B.getDate()-N.getDate()));return ea}function u(B){switch(B.getDay()){case 0:return new Date(B.getFullYear()-1,11,29);case 1:return B;case 2:return new Date(B.getFullYear(),0,3);case 3:return new Date(B.getFullYear(),
0,2);case 4:return new Date(B.getFullYear(),0,1);case 5:return new Date(B.getFullYear()-1,11,31);case 6:return new Date(B.getFullYear()-1,11,30)}}function A(B){B=Yd(new Date(B.de+1900,0,1),B.gf);var N=new Date(B.getFullYear()+1,0,4),W=u(new Date(B.getFullYear(),0,4));N=u(N);return 0>=n(W,B)?0>=n(N,B)?B.getFullYear()+1:B.getFullYear():B.getFullYear()-1}var F=J[d+40>>2];d={Dg:J[d>>2],Cg:J[d+4>>2],ef:J[d+8>>2],Ye:J[d+12>>2],Le:J[d+16>>2],de:J[d+20>>2],ff:J[d+24>>2],gf:J[d+28>>2],Mg:J[d+32>>2],Bg:J[d+
36>>2],Eg:F?Ua(F):""};c=Ua(c);F={"%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"};for(var I in F)c=c.replace(new RegExp(I,"g"),F[I]);var M="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),
Q="January February March April May June July August September October November December".split(" ");F={"%a":function(B){return M[B.ff].substring(0,3)},"%A":function(B){return M[B.ff]},"%b":function(B){return Q[B.Le].substring(0,3)},"%B":function(B){return Q[B.Le]},"%C":function(B){return l((B.de+1900)/100|0,2)},"%d":function(B){return l(B.Ye,2)},"%e":function(B){return g(B.Ye,2," ")},"%g":function(B){return A(B).toString().substring(2)},"%G":function(B){return A(B)},"%H":function(B){return l(B.ef,
2)},"%I":function(B){B=B.ef;0==B?B=12:12<B&&(B-=12);return l(B,2)},"%j":function(B){return l(B.Ye+Vd(Ud(B.de+1900)?Wd:Xd,B.Le-1),3)},"%m":function(B){return l(B.Le+1,2)},"%M":function(B){return l(B.Cg,2)},"%n":function(){return"\n"},"%p":function(B){return 0<=B.ef&&12>B.ef?"AM":"PM"},"%S":function(B){return l(B.Dg,2)},"%t":function(){return"\t"},"%u":function(B){return B.ff||7},"%U":function(B){var N=new Date(B.de+1900,0,1),W=0===N.getDay()?N:Yd(N,7-N.getDay());B=new Date(B.de+1900,B.Le,B.Ye);return 0>
n(W,B)?l(Math.ceil((31-W.getDate()+(Vd(Ud(B.getFullYear())?Wd:Xd,B.getMonth()-1)-31)+B.getDate())/7),2):0===n(W,N)?"01":"00"},"%V":function(B){var N=new Date(B.de+1901,0,4),W=u(new Date(B.de+1900,0,4));N=u(N);var ea=Yd(new Date(B.de+1900,0,1),B.gf);return 0>n(ea,W)?"53":0>=n(N,ea)?"01":l(Math.ceil((W.getFullYear()<B.de+1900?B.gf+32-W.getDate():B.gf+1-W.getDate())/7),2)},"%w":function(B){return B.ff},"%W":function(B){var N=new Date(B.de,0,1),W=1===N.getDay()?N:Yd(N,0===N.getDay()?1:7-N.getDay()+1);
B=new Date(B.de+1900,B.Le,B.Ye);return 0>n(W,B)?l(Math.ceil((31-W.getDate()+(Vd(Ud(B.getFullYear())?Wd:Xd,B.getMonth()-1)-31)+B.getDate())/7),2):0===n(W,N)?"01":"00"},"%y":function(B){return(B.de+1900).toString().substring(2)},"%Y":function(B){return B.de+1900},"%z":function(B){B=B.Bg;var N=0<=B;B=Math.abs(B)/60;return(N?"+":"-")+String("0000"+(B/60*100+B%60)).slice(-4)},"%Z":function(B){return B.Eg},"%%":function(){return"%"}};for(I in F)0<=c.indexOf(I)&&(c=c.replace(new RegExp(I,"g"),F[I](d)));
I=$d(c);if(I.length>b)return 0;ib.set(I,a);return I.length-1}Tb=t.InternalError=Sb("InternalError");for(var ae=Array(256),be=0;256>be;++be)ae[be]=String.fromCharCode(be);Zb=ae;ac=t.BindingError=Sb("BindingError");tc.prototype.isAliasOf=function(a){if(!(this instanceof tc&&a instanceof tc))return!1;var b=this.Pd.$d.Vd,c=this.Pd.Td,d=a.Pd.$d.Vd;for(a=a.Pd.Td;b.me;)c=b.Ze(c),b=b.me;for(;d.me;)a=d.Ze(a),d=d.me;return b===d&&c===a};
tc.prototype.clone=function(){this.Pd.Td||dc(this);if(this.Pd.We)return this.Pd.count.value+=1,this;var a=pc(Object.create(Object.getPrototypeOf(this),{Pd:{value:cc(this.Pd)}}));a.Pd.count.value+=1;a.Pd.Je=!1;return a};tc.prototype["delete"]=function(){this.Pd.Td||dc(this);this.Pd.Je&&!this.Pd.We&&bc("Object already scheduled for deletion");fc(this);oc(this.Pd);this.Pd.We||(this.Pd.he=void 0,this.Pd.Td=void 0)};tc.prototype.isDeleted=function(){return!this.Pd.Td};
tc.prototype.deleteLater=function(){this.Pd.Td||dc(this);this.Pd.Je&&!this.Pd.We&&bc("Object already scheduled for deletion");rc.push(this);1===rc.length&&qc&&qc(sc);this.Pd.Je=!0;return this};Ic.prototype.$f=function(a){this.Ff&&(a=this.Ff(a));return a};Ic.prototype.Bf=function(a){this.je&&this.je(a)};Ic.prototype.argPackAdvance=8;Ic.prototype.readValueFromPointer=Mb;Ic.prototype.deleteObject=function(a){if(null!==a)a["delete"]()};
Ic.prototype.fromWireType=function(a){function b(){return this.df?Hc(this.Vd.Ke,{$d:this.mg,Td:c,ke:this,he:a}):Hc(this.Vd.Ke,{$d:this,Td:a})}var c=this.$f(a);if(!c)return this.Bf(a),null;var d=Gc(this.Vd,c);if(void 0!==d){if(0===d.Pd.count.value)return d.Pd.Td=c,d.Pd.he=a,d.clone();d=d.clone();this.Bf(a);return d}d=this.Vd.Zf(c);d=uc[d];if(!d)return b.call(this);d=this.cf?d.Qf:d.pointerType;var g=Ec(c,this.Vd,d.Vd);return null===g?b.call(this):this.df?Hc(d.Vd.Ke,{$d:d,Td:g,ke:this,he:a}):Hc(d.Vd.Ke,
{$d:d,Td:g})};t.getInheritedInstanceCount=function(){return Object.keys(Fc).length};t.getLiveInheritedInstances=function(){var a=[],b;for(b in Fc)Fc.hasOwnProperty(b)&&a.push(Fc[b]);return a};t.flushPendingDeletes=sc;t.setDelayFunction=function(a){qc=a;rc.length&&qc&&qc(sc)};Mc=t.UnboundTypeError=Sb("UnboundTypeError");t.count_emval_handles=function(){for(var a=0,b=5;b<bd.length;++b)void 0!==bd[b]&&++a;return a};
t.get_first_emval=function(){for(var a=5;a<bd.length;++a)if(void 0!==bd[a])return bd[a];return null};for(var Z,ce=0;32>ce;++ce)Id.push(Array(ce));var de=new Float32Array(288);for(ce=0;288>ce;++ce)Pd[ce]=de.subarray(0,ce+1);var ee=new Int32Array(288);for(ce=0;288>ce;++ce)Qd[ce]=ee.subarray(0,ce+1);function $d(a){var b=Array(ma(a)+1);na(a,b,0,b.length);return b}qb.push({Wf:function(){fe()}});
var ze={N:function(a){return Md(a+16)+16},M:function(a,b,c){(new Fb(a)).cg(b,c);"uncaught_exception"in Gb?Gb.Gf++:Gb.Gf=1;throw a;},P:function(){return 0},yb:function(){},Ab:function(){return 0},xb:function(a,b,c,d,g,l){l<<=12;0!==(d&16)&&0!==a%16384?b=-28:0!==(d&32)?(a=ge(16384,b))?(he(a,0,b),Hb[a]={kg:a,jg:b,Pf:!0,fd:g,Lg:c,flags:d,offset:l},b=a):b=-48:b=-52;return b},wb:function(a,b){if(-1===(a|0)||0===b)a=-28;else{var c=Hb[a];c&&b===c.jg&&(Hb[a]=null,c.Pf&&Wc(c.kg));a=0}return a},R:function(){},
Bb:function(){},O:function(){},E:function(a){var b=Kb[a];delete Kb[a];var c=b.elements,d=c.length,g=c.map(function(u){return u.rf}).concat(c.map(function(u){return u.wf})),l=b.Xe,n=b.je;Vb([a],g,function(u){c.forEach(function(A,F){var I=u[F],M=A.pf,Q=A.qf,B=u[F+d],N=A.vf,W=A.xf;A.read=function(ea){return I.fromWireType(M(Q,ea))};A.write=function(ea,T){var pa=[];N(W,ea,B.toWireType(pa,T));Lb(pa)}});return[{name:b.name,fromWireType:function(A){for(var F=Array(d),I=0;I<d;++I)F[I]=c[I].read(A);n(A);return F},
toWireType:function(A,F){if(d!==F.length)throw new TypeError("Incorrect number of tuple elements for "+b.name+": expected="+d+", actual="+F.length);for(var I=l(),M=0;M<d;++M)c[M].write(I,F[M]);null!==A&&A.push(n,I);return I},argPackAdvance:8,readValueFromPointer:Mb,ge:n}]})},w:function(a){var b=Xb[a];delete Xb[a];var c=b.Xe,d=b.je,g=b.Df,l=g.map(function(n){return n.rf}).concat(g.map(function(n){return n.wf}));Vb([a],l,function(n){var u={};g.forEach(function(A,F){var I=n[F],M=A.pf,Q=A.qf,B=n[F+g.length],
N=A.vf,W=A.xf;u[A.Uf]={read:function(ea){return I.fromWireType(M(Q,ea))},write:function(ea,T){var pa=[];N(W,ea,B.toWireType(pa,T));Lb(pa)}}});return[{name:b.name,fromWireType:function(A){var F={},I;for(I in u)F[I]=u[I].read(A);d(A);return F},toWireType:function(A,F){for(var I in u)if(!(I in F))throw new TypeError('Missing field: "'+I+'"');var M=c();for(I in u)u[I].write(M,F[I]);null!==A&&A.push(d,M);return M},argPackAdvance:8,readValueFromPointer:Mb,ge:d}]})},Eb:function(a,b,c,d,g){var l=Yb(c);b=
$b(b);Wb(a,{name:b,fromWireType:function(n){return!!n},toWireType:function(n,u){return u?d:g},argPackAdvance:8,readValueFromPointer:function(n){if(1===c)var u=ib;else if(2===c)u=Ya;else if(4===c)u=J;else throw new TypeError("Unknown boolean type size: "+b);return this.fromWireType(u[n>>l])},ge:null})},j:function(a,b,c,d,g,l,n,u,A,F,I,M,Q){I=$b(I);l=Lc(g,l);u&&(u=Lc(n,u));F&&(F=Lc(A,F));Q=Lc(M,Q);var B=Qb(I);wc(B,function(){Xc("Cannot construct "+I+" due to unbound types",[d])});Vb([a,b,c],d?[d]:[],
function(N){N=N[0];if(d){var W=N.Vd;var ea=W.Ke}else ea=tc.prototype;N=Rb(B,function(){if(Object.getPrototypeOf(this)!==T)throw new ac("Use 'new' to construct "+I);if(void 0===pa.se)throw new ac(I+" has no accessible constructor");var Ha=pa.se[arguments.length];if(void 0===Ha)throw new ac("Tried to invoke ctor of "+I+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(pa.se).toString()+") parameters instead!");return Ha.apply(this,arguments)});var T=Object.create(ea,
{constructor:{value:N}});N.prototype=T;var pa=new xc(I,N,T,Q,W,l,u,F);W=new Ic(I,pa,!0,!1,!1);ea=new Ic(I+"*",pa,!1,!1,!1);var Db=new Ic(I+" const*",pa,!1,!0,!1);uc[a]={pointerType:ea,Qf:Db};Jc(B,N);return[W,ea,Db]})},g:function(a,b,c,d,g,l,n){var u=$c(c,d);b=$b(b);l=Lc(g,l);Vb([],[a],function(A){function F(){Xc("Cannot call "+I+" due to unbound types",u)}A=A[0];var I=A.name+"."+b,M=A.Vd.constructor;void 0===M[b]?(F.He=c-1,M[b]=F):(vc(M,b,I),M[b].be[c-1]=F);Vb([],u,function(Q){Q=[Q[0],null].concat(Q.slice(1));
Q=Zc(I,Q,null,l,n);void 0===M[b].be?(Q.He=c-1,M[b]=Q):M[b].be[c-1]=Q;return[]});return[]})},v:function(a,b,c,d,g,l){assert(0<b);var n=$c(b,c);g=Lc(d,g);var u=[l],A=[];Vb([],[a],function(F){F=F[0];var I="constructor "+F.name;void 0===F.Vd.se&&(F.Vd.se=[]);if(void 0!==F.Vd.se[b-1])throw new ac("Cannot register multiple constructors with identical number of parameters ("+(b-1)+") for class '"+F.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");
F.Vd.se[b-1]=function(){Xc("Cannot construct "+F.name+" due to unbound types",n)};Vb([],n,function(M){F.Vd.se[b-1]=function(){arguments.length!==b-1&&bc(I+" called with "+arguments.length+" arguments, expected "+(b-1));A.length=0;u.length=b;for(var Q=1;Q<b;++Q)u[Q]=M[Q].toWireType(A,arguments[Q-1]);Q=g.apply(null,u);Lb(A);return M[0].fromWireType(Q)};return[]});return[]})},e:function(a,b,c,d,g,l,n,u){var A=$c(c,d);b=$b(b);l=Lc(g,l);Vb([],[a],function(F){function I(){Xc("Cannot call "+M+" due to unbound types",
A)}F=F[0];var M=F.name+"."+b;u&&F.Vd.ng.push(b);var Q=F.Vd.Ke,B=Q[b];void 0===B||void 0===B.be&&B.className!==F.name&&B.He===c-2?(I.He=c-2,I.className=F.name,Q[b]=I):(vc(Q,b,M),Q[b].be[c-2]=I);Vb([],A,function(N){N=Zc(M,N,F,l,n);void 0===Q[b].be?(N.He=c-2,Q[b]=N):Q[b].be[c-2]=N;return[]});return[]})},X:function(a,b,c){a=$b(a);Vb([],[b],function(d){d=d[0];t[a]=d.fromWireType(c);return[]})},Db:function(a,b){b=$b(b);Wb(a,{name:b,fromWireType:function(c){var d=bd[c].value;cd(c);return d},toWireType:function(c,
d){return Cc(d)},argPackAdvance:8,readValueFromPointer:Mb,ge:null})},o:function(a,b,c,d){function g(){}c=Yb(c);b=$b(b);g.values={};Wb(a,{name:b,constructor:g,fromWireType:function(l){return this.constructor.values[l]},toWireType:function(l,n){return n.value},argPackAdvance:8,readValueFromPointer:dd(b,c,d),ge:null});wc(b,g)},n:function(a,b,c){var d=ed(a,"enum");b=$b(b);a=d.constructor;d=Object.create(d.constructor.prototype,{value:{value:c},constructor:{value:Rb(d.name+"_"+b,function(){})}});a.values[c]=
d;a[b]=d},S:function(a,b,c){c=Yb(c);b=$b(b);Wb(a,{name:b,fromWireType:function(d){return d},toWireType:function(d,g){if("number"!==typeof g&&"boolean"!==typeof g)throw new TypeError('Cannot convert "'+Ac(g)+'" to '+this.name);return g},argPackAdvance:8,readValueFromPointer:fd(b,c),ge:null})},s:function(a,b,c,d,g,l){var n=$c(b,c);a=$b(a);g=Lc(d,g);wc(a,function(){Xc("Cannot call "+a+" due to unbound types",n)},b-1);Vb([],n,function(u){u=[u[0],null].concat(u.slice(1));Jc(a,Zc(a,u,null,g,l),b-1);return[]})},
A:function(a,b,c,d,g){function l(F){return F}b=$b(b);-1===g&&(g=4294967295);var n=Yb(c);if(0===d){var u=32-8*c;l=function(F){return F<<u>>>u}}var A=-1!=b.indexOf("unsigned");Wb(a,{name:b,fromWireType:l,toWireType:function(F,I){if("number"!==typeof I&&"boolean"!==typeof I)throw new TypeError('Cannot convert "'+Ac(I)+'" to '+this.name);if(I<d||I>g)throw new TypeError('Passing a number "'+Ac(I)+'" from JS side to C/C++ side to an argument of type "'+b+'", which is outside the valid range ['+d+", "+g+
"]!");return A?I>>>0:I|0},argPackAdvance:8,readValueFromPointer:gd(b,n,0!==d),ge:null})},y:function(a,b,c){function d(l){l>>=2;var n=jb;return new g(hb,n[l+1],n[l])}var g=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][b];c=$b(c);Wb(a,{name:c,fromWireType:d,argPackAdvance:8,readValueFromPointer:d},{bg:!0})},p:function(a,b,c,d,g,l,n,u,A,F,I,M){c=$b(c);l=Lc(g,l);u=Lc(n,u);F=Lc(A,F);M=Lc(I,M);Vb([a],[b],function(Q){Q=Q[0];return[new Ic(c,Q.Vd,!1,!1,!0,Q,
d,l,u,F,M)]})},T:function(a,b){b=$b(b);var c="std::string"===b;Wb(a,{name:b,fromWireType:function(d){var g=jb[d>>2];if(c)for(var l=d+4,n=0;n<=g;++n){var u=d+4+n;if(n==g||0==v[u]){l=Ua(l,u-l);if(void 0===A)var A=l;else A+=String.fromCharCode(0),A+=l;l=u+1}}else{A=Array(g);for(n=0;n<g;++n)A[n]=String.fromCharCode(v[d+4+n]);A=A.join("")}Wc(d);return A},toWireType:function(d,g){g instanceof ArrayBuffer&&(g=new Uint8Array(g));var l="string"===typeof g;l||g instanceof Uint8Array||g instanceof Uint8ClampedArray||
g instanceof Int8Array||bc("Cannot pass non-string to std::string");var n=(c&&l?function(){return ma(g)}:function(){return g.length})(),u=Md(4+n+1);jb[u>>2]=n;if(c&&l)na(g,v,u+4,n+1);else if(l)for(l=0;l<n;++l){var A=g.charCodeAt(l);255<A&&(Wc(u),bc("String has UTF-16 code units that do not fit in 8 bits"));v[u+4+l]=A}else for(l=0;l<n;++l)v[u+4+l]=g[l];null!==d&&d.push(Wc,u);return u},argPackAdvance:8,readValueFromPointer:Mb,ge:function(d){Wc(d)}})},I:function(a,b,c){c=$b(c);if(2===b){var d=Wa;var g=
cb;var l=db;var n=function(){return Xa};var u=1}else 4===b&&(d=eb,g=fb,l=gb,n=function(){return jb},u=2);Wb(a,{name:c,fromWireType:function(A){for(var F=jb[A>>2],I=n(),M,Q=A+4,B=0;B<=F;++B){var N=A+4+B*b;if(B==F||0==I[N>>u])Q=d(Q,N-Q),void 0===M?M=Q:(M+=String.fromCharCode(0),M+=Q),Q=N+b}Wc(A);return M},toWireType:function(A,F){"string"!==typeof F&&bc("Cannot pass non-string to C++ string type "+c);var I=l(F),M=Md(4+I+b);jb[M>>2]=I>>u;g(F,M+4,I+b);null!==A&&A.push(Wc,M);return M},argPackAdvance:8,
readValueFromPointer:Mb,ge:function(A){Wc(A)}})},G:function(a,b,c,d,g,l){Kb[a]={name:$b(b),Xe:Lc(c,d),je:Lc(g,l),elements:[]}},F:function(a,b,c,d,g,l,n,u,A){Kb[a].elements.push({rf:b,pf:Lc(c,d),qf:g,wf:l,vf:Lc(n,u),xf:A})},x:function(a,b,c,d,g,l){Xb[a]={name:$b(b),Xe:Lc(c,d),je:Lc(g,l),Df:[]}},h:function(a,b,c,d,g,l,n,u,A,F){Xb[a].Df.push({Uf:$b(b),rf:c,pf:Lc(d,g),qf:l,wf:n,vf:Lc(u,A),xf:F})},Fb:function(a,b){b=$b(b);Wb(a,{eg:!0,name:b,argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},
C:function(a,b,c,d){a=jd[a];b=kd(b);c=id(c);a(b,c,null,d)},ha:cd,B:function(a,b){b=md(a,b);for(var c=b[0],d=c.name+"_$"+b.slice(1).map(function(F){return F.name}).join("_")+"$",g=["retType"],l=[c],n="",u=0;u<a-1;++u)n+=(0!==u?", ":"")+"arg"+u,g.push("argType"+u),l.push(b[1+u]);d="return function "+Qb("methodCaller_"+d)+"(handle, name, destructors, args) {\n";var A=0;for(u=0;u<a-1;++u)d+=" var arg"+u+" = argType"+u+".readValueFromPointer(args"+(A?"+"+A:"")+");\n",A+=b[u+1].argPackAdvance;d+=" var rv = handle[name]("+
n+");\n";for(u=0;u<a-1;++u)b[u+1].deleteObject&&(d+=" argType"+u+".deleteObject(arg"+u+");\n");c.eg||(d+=" return retType.toWireType(destructors, rv);\n");g.push(d+"};\n");a=Yc(g).apply(null,l);return ld(a)},nb:function(a){4<a&&(bd[a].uf+=1)},sa:function(){return Cc([])},Da:function(a){return Cc(id(a))},mb:function(){return Cc({})},z:function(a,b,c){a=kd(a);b=kd(b);c=kd(c);a[b]=c},u:function(a,b){a=ed(a,"_emval_take_value");a=a.readValueFromPointer(b);return Cc(a)},d:function(){Ka()},sb:function(a,
b){if(0===a)a=Date.now();else if(1===a||4===a)a=nd();else return J[ie()>>2]=28,-1;J[b>>2]=a/1E3|0;J[b+4>>2]=a%1E3*1E6|0;return 0},Zc:function(a){Z.activeTexture(a)},_c:function(a,b){Z.attachShader(td[a],xd[b])},$c:function(a,b,c){Z.bindAttribLocation(td[a],b,Ua(c))},ad:function(a,b){35051==a?Z.nf=b:35052==a&&(Z.Ie=b);Z.bindBuffer(a,sd[b])},ac:function(a,b){Z.bindFramebuffer(a,ud[b])},bc:function(a,b){Z.bindRenderbuffer(a,vd[b])},Ob:function(a,b){Z.bindSampler(a,zd[b])},bd:function(a,b){Z.bindTexture(a,
wd[b])},vc:function(a){Z.bindVertexArray(yd[a])},yc:function(a){Z.bindVertexArray(yd[a])},cd:function(a,b,c,d){Z.blendColor(a,b,c,d)},dd:function(a){Z.blendEquation(a)},ed:function(a,b){Z.blendFunc(a,b)},Vb:function(a,b,c,d,g,l,n,u,A,F){Z.blitFramebuffer(a,b,c,d,g,l,n,u,A,F)},Z:function(a,b,c,d){2<=Hd.version?c?Z.bufferData(a,v,d,c,b):Z.bufferData(a,b,d):Z.bufferData(a,c?v.subarray(c,c+b):b,d)},_:function(a,b,c,d){2<=Hd.version?Z.bufferSubData(a,b,v,d,c):Z.bufferSubData(a,b,v.subarray(d,d+c))},cc:function(a){return Z.checkFramebufferStatus(a)},
$:function(a){Z.clear(a)},aa:function(a,b,c,d){Z.clearColor(a,b,c,d)},ba:function(a){Z.clearStencil(a)},fb:function(a,b,c,d){return Z.clientWaitSync(Ad[a],b,(c>>>0)+4294967296*d)},ca:function(a,b,c,d){Z.colorMask(!!a,!!b,!!c,!!d)},da:function(a){Z.compileShader(xd[a])},ea:function(a,b,c,d,g,l,n,u){2<=Hd.version?Z.Ie?Z.compressedTexImage2D(a,b,c,d,g,l,n,u):Z.compressedTexImage2D(a,b,c,d,g,l,v,u,n):Z.compressedTexImage2D(a,b,c,d,g,l,u?v.subarray(u,u+n):null)},fa:function(a,b,c,d,g,l,n,u,A){2<=Hd.version?
Z.Ie?Z.compressedTexSubImage2D(a,b,c,d,g,l,n,u,A):Z.compressedTexSubImage2D(a,b,c,d,g,l,n,v,A,u):Z.compressedTexSubImage2D(a,b,c,d,g,l,n,A?v.subarray(A,A+u):null)},ga:function(a,b,c,d,g,l,n,u){Z.copyTexSubImage2D(a,b,c,d,g,l,n,u)},ia:function(){var a=da(td),b=Z.createProgram();b.name=a;td[a]=b;return a},ja:function(a){var b=da(xd);xd[b]=Z.createShader(a);return b},ka:function(a){Z.cullFace(a)},la:function(a,b){for(var c=0;c<a;c++){var d=J[b+4*c>>2],g=sd[d];g&&(Z.deleteBuffer(g),g.name=0,sd[d]=null,
d==Z.nf&&(Z.nf=0),d==Z.Ie&&(Z.Ie=0))}},dc:function(a,b){for(var c=0;c<a;++c){var d=J[b+4*c>>2],g=ud[d];g&&(Z.deleteFramebuffer(g),g.name=0,ud[d]=null)}},ma:function(a){if(a){var b=td[a];b?(Z.deleteProgram(b),b.name=0,td[a]=null,Bd[a]=null):Fd(1281)}},ec:function(a,b){for(var c=0;c<a;c++){var d=J[b+4*c>>2],g=vd[d];g&&(Z.deleteRenderbuffer(g),g.name=0,vd[d]=null)}},Pb:function(a,b){for(var c=0;c<a;c++){var d=J[b+4*c>>2],g=zd[d];g&&(Z.deleteSampler(g),g.name=0,zd[d]=null)}},na:function(a){if(a){var b=
xd[a];b?(Z.deleteShader(b),xd[a]=null):Fd(1281)}},Xb:function(a){if(a){var b=Ad[a];b?(Z.deleteSync(b),b.name=0,Ad[a]=null):Fd(1281)}},oa:function(a,b){for(var c=0;c<a;c++){var d=J[b+4*c>>2],g=wd[d];g&&(Z.deleteTexture(g),g.name=0,wd[d]=null)}},wc:function(a,b){for(var c=0;c<a;c++){var d=J[b+4*c>>2];Z.deleteVertexArray(yd[d]);yd[d]=null}},zc:function(a,b){for(var c=0;c<a;c++){var d=J[b+4*c>>2];Z.deleteVertexArray(yd[d]);yd[d]=null}},pa:function(a){Z.depthMask(!!a)},qa:function(a){Z.disable(a)},ra:function(a){Z.disableVertexAttribArray(a)},
ta:function(a,b,c){Z.drawArrays(a,b,c)},tc:function(a,b,c,d){Z.drawArraysInstanced(a,b,c,d)},rc:function(a,b,c,d,g){Z.Cf.drawArraysInstancedBaseInstanceWEBGL(a,b,c,d,g)},pc:function(a,b){for(var c=Id[a],d=0;d<a;d++)c[d]=J[b+4*d>>2];Z.drawBuffers(c)},ua:function(a,b,c,d){Z.drawElements(a,b,c,d)},uc:function(a,b,c,d,g){Z.drawElementsInstanced(a,b,c,d,g)},sc:function(a,b,c,d,g,l,n){Z.Cf.drawElementsInstancedBaseVertexBaseInstanceWEBGL(a,b,c,d,g,l,n)},jc:function(a,b,c,d,g,l){Z.drawElements(a,d,g,l)},
va:function(a){Z.enable(a)},wa:function(a){Z.enableVertexAttribArray(a)},Tb:function(a,b){return(a=Z.fenceSync(a,b))?(b=da(Ad),a.name=b,Ad[b]=a,b):0},xa:function(){Z.finish()},ya:function(){Z.flush()},fc:function(a,b,c,d){Z.framebufferRenderbuffer(a,b,c,vd[d])},gc:function(a,b,c,d,g){Z.framebufferTexture2D(a,b,c,wd[d],g)},za:function(a){Z.frontFace(a)},Aa:function(a,b){Jd(a,b,"createBuffer",sd)},hc:function(a,b){Jd(a,b,"createFramebuffer",ud)},ic:function(a,b){Jd(a,b,"createRenderbuffer",vd)},Qb:function(a,
b){Jd(a,b,"createSampler",zd)},Ba:function(a,b){Jd(a,b,"createTexture",wd)},xc:function(a,b){Jd(a,b,"createVertexArray",yd)},Ac:function(a,b){Jd(a,b,"createVertexArray",yd)},Yb:function(a){Z.generateMipmap(a)},Ca:function(a,b,c){c?J[c>>2]=Z.getBufferParameter(a,b):Fd(1281)},Ea:function(){var a=Z.getError()||Gd;Gd=0;return a},Zb:function(a,b,c,d){a=Z.getFramebufferAttachmentParameter(a,b,c);if(a instanceof WebGLRenderbuffer||a instanceof WebGLTexture)a=a.name|0;J[d>>2]=a},db:function(a,b){Kd(a,b)},
Fa:function(a,b,c,d){a=Z.getProgramInfoLog(td[a]);null===a&&(a="(unknown error)");b=0<b&&d?na(a,v,d,b):0;c&&(J[c>>2]=b)},Ga:function(a,b,c){if(c)if(a>=rd)Fd(1281);else{var d=Bd[a];if(d)if(35716==b)a=Z.getProgramInfoLog(td[a]),null===a&&(a="(unknown error)"),J[c>>2]=a.length+1;else if(35719==b)J[c>>2]=d.tf;else if(35722==b){if(-1==d.Ue){a=td[a];var g=Z.getProgramParameter(a,35721);for(b=d.Ue=0;b<g;++b)d.Ue=Math.max(d.Ue,Z.getActiveAttrib(a,b).name.length+1)}J[c>>2]=d.Ue}else if(35381==b){if(-1==d.Ve)for(a=
td[a],g=Z.getProgramParameter(a,35382),b=d.Ve=0;b<g;++b)d.Ve=Math.max(d.Ve,Z.getActiveUniformBlockName(a,b).length+1);J[c>>2]=d.Ve}else J[c>>2]=Z.getProgramParameter(td[a],b);else Fd(1282)}else Fd(1281)},_b:function(a,b,c){c?J[c>>2]=Z.getRenderbufferParameter(a,b):Fd(1281)},Ha:function(a,b,c,d){a=Z.getShaderInfoLog(xd[a]);null===a&&(a="(unknown error)");b=0<b&&d?na(a,v,d,b):0;c&&(J[c>>2]=b)},Lb:function(a,b,c,d){a=Z.getShaderPrecisionFormat(a,b);J[c>>2]=a.rangeMin;J[c+4>>2]=a.rangeMax;J[d>>2]=a.precision},
Ia:function(a,b,c){c?35716==b?(a=Z.getShaderInfoLog(xd[a]),null===a&&(a="(unknown error)"),J[c>>2]=a?a.length+1:0):35720==b?(a=Z.getShaderSource(xd[a]),J[c>>2]=a?a.length+1:0):J[c>>2]=Z.getShaderParameter(xd[a],b):Fd(1281)},K:function(a){if(Cd[a])return Cd[a];switch(a){case 7939:var b=Z.getSupportedExtensions()||[];b=b.concat(b.map(function(d){return"GL_"+d}));b=Ld(b.join(" "));break;case 7936:case 7937:case 37445:case 37446:(b=Z.getParameter(a))||Fd(1280);b=Ld(b);break;case 7938:b=Z.getParameter(7938);
b=2<=Hd.version?"OpenGL ES 3.0 ("+b+")":"OpenGL ES 2.0 ("+b+")";b=Ld(b);break;case 35724:b=Z.getParameter(35724);var c=b.match(/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/);null!==c&&(3==c[1].length&&(c[1]+="0"),b="OpenGL ES GLSL ES "+c[1]+" ("+b+")");b=Ld(b);break;default:return Fd(1280),0}return Cd[a]=b},eb:function(a,b){if(2>Hd.version)return Fd(1282),0;var c=Dd[a];if(c)return 0>b||b>=c.length?(Fd(1281),0):c[b];switch(a){case 7939:return c=Z.getSupportedExtensions()||[],c=c.concat(c.map(function(d){return"GL_"+
d})),c=c.map(function(d){return Ld(d)}),c=Dd[a]=c,0>b||b>=c.length?(Fd(1281),0):c[b];default:return Fd(1280),0}},Ja:function(a,b){b=Ua(b);var c=0;if("]"==b[b.length-1]){var d=b.lastIndexOf("[");c="]"!=b[d+1]?parseInt(b.slice(d+1)):0;b=b.slice(0,d)}return(a=Bd[a]&&Bd[a].Hf[b])&&0<=c&&c<a[0]?a[1]+c:-1},Mb:function(a,b,c){for(var d=Id[b],g=0;g<b;g++)d[g]=J[c+4*g>>2];Z.invalidateFramebuffer(a,d)},Nb:function(a,b,c,d,g,l,n){for(var u=Id[b],A=0;A<b;A++)u[A]=J[c+4*A>>2];Z.invalidateSubFramebuffer(a,u,d,
g,l,n)},Ub:function(a){return Z.isSync(Ad[a])},Ka:function(a){return(a=wd[a])?Z.isTexture(a):0},La:function(a){Z.lineWidth(a)},Ma:function(a){Z.linkProgram(td[a]);var b=td[a];a=Bd[a]={Hf:{},tf:0,Ue:-1,Ve:-1};for(var c=a.Hf,d=Z.getProgramParameter(b,35718),g=0;g<d;++g){var l=Z.getActiveUniform(b,g),n=l.name;a.tf=Math.max(a.tf,n.length+1);"]"==n.slice(-1)&&(n=n.slice(0,n.lastIndexOf("[")));var u=Z.getUniformLocation(b,n);if(u){var A=da(X);c[n]=[l.size,A];X[A]=u;for(var F=1;F<l.size;++F)u=Z.getUniformLocation(b,
n+"["+F+"]"),A=da(X),X[A]=u}}},nc:function(a,b,c,d,g,l){Z.Ef.multiDrawArraysInstancedBaseInstanceWEBGL(a,J,b>>2,J,c>>2,J,d>>2,jb,g>>2,l)},oc:function(a,b,c,d,g,l,n,u){Z.Ef.multiDrawElementsInstancedBaseVertexBaseInstanceWEBGL(a,J,b>>2,c,J,d>>2,J,g>>2,J,l>>2,jb,n>>2,u)},Na:function(a,b){3317==a&&(Ed=b);Z.pixelStorei(a,b)},qc:function(a){Z.readBuffer(a)},Oa:function(a,b,c,d,g,l,n){if(2<=Hd.version)if(Z.nf)Z.readPixels(a,b,c,d,g,l,n);else{var u=Nd(l);Z.readPixels(a,b,c,d,g,l,u,n>>31-Math.clz32(u.BYTES_PER_ELEMENT))}else(n=
Od(l,g,c,d,n))?Z.readPixels(a,b,c,d,g,l,n):Fd(1280)},$b:function(a,b,c,d){Z.renderbufferStorage(a,b,c,d)},Wb:function(a,b,c,d,g){Z.renderbufferStorageMultisample(a,b,c,d,g)},Rb:function(a,b,c){Z.samplerParameteri(zd[a],b,c)},Sb:function(a,b,c){Z.samplerParameteri(zd[a],b,J[c>>2])},Pa:function(a,b,c,d){Z.scissor(a,b,c,d)},Qa:function(a,b,c,d){for(var g="",l=0;l<b;++l){var n=d?J[d+4*l>>2]:-1;g+=Ua(J[c+4*l>>2],0>n?void 0:n)}Z.shaderSource(xd[a],g)},Ra:function(a,b,c){Z.stencilFunc(a,b,c)},Sa:function(a,
b,c,d){Z.stencilFuncSeparate(a,b,c,d)},Ta:function(a){Z.stencilMask(a)},Ua:function(a,b){Z.stencilMaskSeparate(a,b)},Va:function(a,b,c){Z.stencilOp(a,b,c)},Wa:function(a,b,c,d){Z.stencilOpSeparate(a,b,c,d)},Xa:function(a,b,c,d,g,l,n,u,A){if(2<=Hd.version)if(Z.Ie)Z.texImage2D(a,b,c,d,g,l,n,u,A);else if(A){var F=Nd(u);Z.texImage2D(a,b,c,d,g,l,n,u,F,A>>31-Math.clz32(F.BYTES_PER_ELEMENT))}else Z.texImage2D(a,b,c,d,g,l,n,u,null);else Z.texImage2D(a,b,c,d,g,l,n,u,A?Od(u,n,d,g,A):null)},Ya:function(a,b,
c){Z.texParameterf(a,b,c)},Za:function(a,b,c){Z.texParameterf(a,b,R[c>>2])},_a:function(a,b,c){Z.texParameteri(a,b,c)},$a:function(a,b,c){Z.texParameteri(a,b,J[c>>2])},kc:function(a,b,c,d,g){Z.texStorage2D(a,b,c,d,g)},ab:function(a,b,c,d,g,l,n,u,A){if(2<=Hd.version)if(Z.Ie)Z.texSubImage2D(a,b,c,d,g,l,n,u,A);else if(A){var F=Nd(u);Z.texSubImage2D(a,b,c,d,g,l,n,u,F,A>>31-Math.clz32(F.BYTES_PER_ELEMENT))}else Z.texSubImage2D(a,b,c,d,g,l,n,u,null);else F=null,A&&(F=Od(u,n,g,l,A)),Z.texSubImage2D(a,b,
c,d,g,l,n,u,F)},bb:function(a,b){Z.uniform1f(X[a],b)},cb:function(a,b,c){if(2<=Hd.version)Z.uniform1fv(X[a],R,c>>2,b);else{if(288>=b)for(var d=Pd[b-1],g=0;g<b;++g)d[g]=R[c+4*g>>2];else d=R.subarray(c>>2,c+4*b>>2);Z.uniform1fv(X[a],d)}},Vc:function(a,b){Z.uniform1i(X[a],b)},Wc:function(a,b,c){if(2<=Hd.version)Z.uniform1iv(X[a],J,c>>2,b);else{if(288>=b)for(var d=Qd[b-1],g=0;g<b;++g)d[g]=J[c+4*g>>2];else d=J.subarray(c>>2,c+4*b>>2);Z.uniform1iv(X[a],d)}},Xc:function(a,b,c){Z.uniform2f(X[a],b,c)},Yc:function(a,
b,c){if(2<=Hd.version)Z.uniform2fv(X[a],R,c>>2,2*b);else{if(144>=b)for(var d=Pd[2*b-1],g=0;g<2*b;g+=2)d[g]=R[c+4*g>>2],d[g+1]=R[c+(4*g+4)>>2];else d=R.subarray(c>>2,c+8*b>>2);Z.uniform2fv(X[a],d)}},Uc:function(a,b,c){Z.uniform2i(X[a],b,c)},Tc:function(a,b,c){if(2<=Hd.version)Z.uniform2iv(X[a],J,c>>2,2*b);else{if(144>=b)for(var d=Qd[2*b-1],g=0;g<2*b;g+=2)d[g]=J[c+4*g>>2],d[g+1]=J[c+(4*g+4)>>2];else d=J.subarray(c>>2,c+8*b>>2);Z.uniform2iv(X[a],d)}},Sc:function(a,b,c,d){Z.uniform3f(X[a],b,c,d)},Rc:function(a,
b,c){if(2<=Hd.version)Z.uniform3fv(X[a],R,c>>2,3*b);else{if(96>=b)for(var d=Pd[3*b-1],g=0;g<3*b;g+=3)d[g]=R[c+4*g>>2],d[g+1]=R[c+(4*g+4)>>2],d[g+2]=R[c+(4*g+8)>>2];else d=R.subarray(c>>2,c+12*b>>2);Z.uniform3fv(X[a],d)}},Qc:function(a,b,c,d){Z.uniform3i(X[a],b,c,d)},Pc:function(a,b,c){if(2<=Hd.version)Z.uniform3iv(X[a],J,c>>2,3*b);else{if(96>=b)for(var d=Qd[3*b-1],g=0;g<3*b;g+=3)d[g]=J[c+4*g>>2],d[g+1]=J[c+(4*g+4)>>2],d[g+2]=J[c+(4*g+8)>>2];else d=J.subarray(c>>2,c+12*b>>2);Z.uniform3iv(X[a],d)}},
Oc:function(a,b,c,d,g){Z.uniform4f(X[a],b,c,d,g)},Nc:function(a,b,c){if(2<=Hd.version)Z.uniform4fv(X[a],R,c>>2,4*b);else{if(72>=b){var d=Pd[4*b-1],g=R;c>>=2;for(var l=0;l<4*b;l+=4){var n=c+l;d[l]=g[n];d[l+1]=g[n+1];d[l+2]=g[n+2];d[l+3]=g[n+3]}}else d=R.subarray(c>>2,c+16*b>>2);Z.uniform4fv(X[a],d)}},Bc:function(a,b,c,d,g){Z.uniform4i(X[a],b,c,d,g)},Cc:function(a,b,c){if(2<=Hd.version)Z.uniform4iv(X[a],J,c>>2,4*b);else{if(72>=b)for(var d=Qd[4*b-1],g=0;g<4*b;g+=4)d[g]=J[c+4*g>>2],d[g+1]=J[c+(4*g+4)>>
2],d[g+2]=J[c+(4*g+8)>>2],d[g+3]=J[c+(4*g+12)>>2];else d=J.subarray(c>>2,c+16*b>>2);Z.uniform4iv(X[a],d)}},Dc:function(a,b,c,d){if(2<=Hd.version)Z.uniformMatrix2fv(X[a],!!c,R,d>>2,4*b);else{if(72>=b)for(var g=Pd[4*b-1],l=0;l<4*b;l+=4)g[l]=R[d+4*l>>2],g[l+1]=R[d+(4*l+4)>>2],g[l+2]=R[d+(4*l+8)>>2],g[l+3]=R[d+(4*l+12)>>2];else g=R.subarray(d>>2,d+16*b>>2);Z.uniformMatrix2fv(X[a],!!c,g)}},Ec:function(a,b,c,d){if(2<=Hd.version)Z.uniformMatrix3fv(X[a],!!c,R,d>>2,9*b);else{if(32>=b)for(var g=Pd[9*b-1],l=
0;l<9*b;l+=9)g[l]=R[d+4*l>>2],g[l+1]=R[d+(4*l+4)>>2],g[l+2]=R[d+(4*l+8)>>2],g[l+3]=R[d+(4*l+12)>>2],g[l+4]=R[d+(4*l+16)>>2],g[l+5]=R[d+(4*l+20)>>2],g[l+6]=R[d+(4*l+24)>>2],g[l+7]=R[d+(4*l+28)>>2],g[l+8]=R[d+(4*l+32)>>2];else g=R.subarray(d>>2,d+36*b>>2);Z.uniformMatrix3fv(X[a],!!c,g)}},Fc:function(a,b,c,d){if(2<=Hd.version)Z.uniformMatrix4fv(X[a],!!c,R,d>>2,16*b);else{if(18>=b){var g=Pd[16*b-1],l=R;d>>=2;for(var n=0;n<16*b;n+=16){var u=d+n;g[n]=l[u];g[n+1]=l[u+1];g[n+2]=l[u+2];g[n+3]=l[u+3];g[n+4]=
l[u+4];g[n+5]=l[u+5];g[n+6]=l[u+6];g[n+7]=l[u+7];g[n+8]=l[u+8];g[n+9]=l[u+9];g[n+10]=l[u+10];g[n+11]=l[u+11];g[n+12]=l[u+12];g[n+13]=l[u+13];g[n+14]=l[u+14];g[n+15]=l[u+15]}}else g=R.subarray(d>>2,d+64*b>>2);Z.uniformMatrix4fv(X[a],!!c,g)}},Gc:function(a){Z.useProgram(td[a])},Hc:function(a,b){Z.vertexAttrib1f(a,b)},Ic:function(a,b){Z.vertexAttrib2f(a,R[b>>2],R[b+4>>2])},Jc:function(a,b){Z.vertexAttrib3f(a,R[b>>2],R[b+4>>2],R[b+8>>2])},Kc:function(a,b){Z.vertexAttrib4f(a,R[b>>2],R[b+4>>2],R[b+8>>2],
R[b+12>>2])},lc:function(a,b){Z.vertexAttribDivisor(a,b)},mc:function(a,b,c,d,g){Z.vertexAttribIPointer(a,b,c,d,g)},Lc:function(a,b,c,d,g,l){Z.vertexAttribPointer(a,b,c,!!d,g,l)},Mc:function(a,b,c,d){Z.viewport(a,b,c,d)},hb:function(a,b,c,d){Z.waitSync(Ad[a],b,(c>>>0)+4294967296*d)},f:function(a,b){je(a,b||1);throw"longjmp";},pb:function(a,b,c){v.copyWithin(a,b,b+c)},qb:function(a){a>>>=0;var b=v.length;if(2147483648<a)return!1;for(var c=1;4>=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,a+100663296);d=Math.max(16777216,
a,d);0<d%65536&&(d+=65536-d%65536);a:{try{Pa.grow(Math.min(2147483648,d)-hb.byteLength+65535>>>16);lb(Pa.buffer);var g=1;break a}catch(l){}g=void 0}if(g)return!0}return!1},fd:function(){return Hd?Hd.ag:0},Y:function(a){return ka(a)?0:-5},ub:function(a,b){var c=0;Sd().forEach(function(d,g){var l=b+c;g=J[a+4*g>>2]=l;for(l=0;l<d.length;++l)ib[g++>>0]=d.charCodeAt(l);ib[g>>0]=0;c+=d.length+1});return 0},vb:function(a,b){var c=Sd();J[a>>2]=c.length;var d=0;c.forEach(function(g){d+=g.length+1});J[b>>2]=
d;return 0},Gb:function(a){if(!noExitRuntime){if(t.onExit)t.onExit(a);Ra=!0}va(a,new Fa(a))},H:function(){return 0},tb:function(a,b){a=1==a||2==a?2:Ka();ib[b>>0]=a;return 0},zb:function(a,b,c,d){a=Jb.Ig(a);b=Jb.Hg(a,b,c);J[d>>2]=b;return 0},ob:function(){},Q:function(a,b,c,d){for(var g=0,l=0;l<c;l++){for(var n=J[b+8*l>>2],u=J[b+(8*l+4)>>2],A=0;A<u;A++){var F=v[n+A],I=Ib[a];0===F||10===F?((1===a?La:Ma)(Ta(I,0)),I.length=0):I.push(F)}g+=u}J[d>>2]=g;return 0},b:function(){return Na|0},gd:function(a,
b){Z.bindFramebuffer(a,ud[b])},gb:function(a){Z.clear(a)},Cb:function(a,b,c,d){Z.clearColor(a,b,c,d)},lb:function(a){Z.clearStencil(a)},J:function(a,b){Kd(a,b)},m:ke,t:le,i:me,D:ne,Kb:oe,W:pe,V:qe,U:re,k:se,r:te,l:ue,q:ve,Jb:we,Hb:xe,Ib:ye,a:Pa,kb:function(){},L:function(){},jb:function(){},ib:function(){},c:function(a){Na=a|0},rb:function(a,b,c,d){return Zd(a,b,c,d)}};
(function(){function a(g){t.asm=g.exports;Qa=t.asm.hd;ub--;t.monitorRunDependencies&&t.monitorRunDependencies(ub);0==ub&&(null!==vb&&(clearInterval(vb),vb=null),wb&&(g=wb,wb=null,g()))}function b(g){a(g.instance)}function c(g){return Cb().then(function(l){return WebAssembly.instantiate(l,d)}).then(g,function(l){Ma("failed to asynchronously prepare wasm: "+l);Ka(l)})}var d={a:ze};ub++;t.monitorRunDependencies&&t.monitorRunDependencies(ub);if(t.instantiateWasm)try{return t.instantiateWasm(d,a)}catch(g){return Ma("Module.instantiateWasm callback failed with error: "+
g),!1}(function(){if(Oa||"function"!==typeof WebAssembly.instantiateStreaming||zb()||xb("file://")||"function"!==typeof fetch)return c(b);fetch(yb,{credentials:"same-origin"}).then(function(g){return WebAssembly.instantiateStreaming(g,d).then(b,function(l){Ma("wasm streaming compile failed: "+l);Ma("falling back to ArrayBuffer instantiation");return c(b)})})})();return{}})();
var fe=t.___wasm_call_ctors=function(){return(fe=t.___wasm_call_ctors=t.asm.id).apply(null,arguments)},he=t._memset=function(){return(he=t._memset=t.asm.jd).apply(null,arguments)},Md=t._malloc=function(){return(Md=t._malloc=t.asm.kd).apply(null,arguments)},Wc=t._free=function(){return(Wc=t._free=t.asm.ld).apply(null,arguments)},ie=t.___errno_location=function(){return(ie=t.___errno_location=t.asm.md).apply(null,arguments)},Vc=t.___getTypeName=function(){return(Vc=t.___getTypeName=t.asm.nd).apply(null,
arguments)};t.___embind_register_native_and_builtin_types=function(){return(t.___embind_register_native_and_builtin_types=t.asm.od).apply(null,arguments)};var Ae=t.stackSave=function(){return(Ae=t.stackSave=t.asm.pd).apply(null,arguments)},Be=t.stackRestore=function(){return(Be=t.stackRestore=t.asm.qd).apply(null,arguments)},je=t._setThrew=function(){return(je=t._setThrew=t.asm.rd).apply(null,arguments)},ge=t._memalign=function(){return(ge=t._memalign=t.asm.sd).apply(null,arguments)};
t.dynCall_ji=function(){return(t.dynCall_ji=t.asm.td).apply(null,arguments)};t.dynCall_iiji=function(){return(t.dynCall_iiji=t.asm.ud).apply(null,arguments)};t.dynCall_iijjiii=function(){return(t.dynCall_iijjiii=t.asm.vd).apply(null,arguments)};t.dynCall_iij=function(){return(t.dynCall_iij=t.asm.wd).apply(null,arguments)};t.dynCall_vijjjii=function(){return(t.dynCall_vijjjii=t.asm.xd).apply(null,arguments)};t.dynCall_viji=function(){return(t.dynCall_viji=t.asm.yd).apply(null,arguments)};
t.dynCall_vijiii=function(){return(t.dynCall_vijiii=t.asm.zd).apply(null,arguments)};t.dynCall_viiiiij=function(){return(t.dynCall_viiiiij=t.asm.Ad).apply(null,arguments)};t.dynCall_viijii=function(){return(t.dynCall_viijii=t.asm.Bd).apply(null,arguments)};t.dynCall_jii=function(){return(t.dynCall_jii=t.asm.Cd).apply(null,arguments)};t.dynCall_iiij=function(){return(t.dynCall_iiij=t.asm.Dd).apply(null,arguments)};t.dynCall_viij=function(){return(t.dynCall_viij=t.asm.Ed).apply(null,arguments)};
t.dynCall_iiiij=function(){return(t.dynCall_iiiij=t.asm.Fd).apply(null,arguments)};t.dynCall_viiij=function(){return(t.dynCall_viiij=t.asm.Gd).apply(null,arguments)};t.dynCall_vij=function(){return(t.dynCall_vij=t.asm.Hd).apply(null,arguments)};t.dynCall_jiiii=function(){return(t.dynCall_jiiii=t.asm.Id).apply(null,arguments)};t.dynCall_jiiiiii=function(){return(t.dynCall_jiiiiii=t.asm.Jd).apply(null,arguments)};t.dynCall_iijj=function(){return(t.dynCall_iijj=t.asm.Kd).apply(null,arguments)};
t.dynCall_jiji=function(){return(t.dynCall_jiji=t.asm.Ld).apply(null,arguments)};t.dynCall_iiiiij=function(){return(t.dynCall_iiiiij=t.asm.Md).apply(null,arguments)};t.dynCall_iiiiijj=function(){return(t.dynCall_iiiiijj=t.asm.Nd).apply(null,arguments)};t.dynCall_iiiiiijj=function(){return(t.dynCall_iiiiiijj=t.asm.Od).apply(null,arguments)};function ke(a,b){var c=Ae();try{return Qa.get(a)(b)}catch(d){Be(c);if(d!==d+0&&"longjmp"!==d)throw d;je(1,0)}}
function le(a,b,c){var d=Ae();try{return Qa.get(a)(b,c)}catch(g){Be(d);if(g!==g+0&&"longjmp"!==g)throw g;je(1,0)}}function ue(a,b,c,d){var g=Ae();try{Qa.get(a)(b,c,d)}catch(l){Be(g);if(l!==l+0&&"longjmp"!==l)throw l;je(1,0)}}function me(a,b,c,d){var g=Ae();try{return Qa.get(a)(b,c,d)}catch(l){Be(g);if(l!==l+0&&"longjmp"!==l)throw l;je(1,0)}}function se(a,b){var c=Ae();try{Qa.get(a)(b)}catch(d){Be(c);if(d!==d+0&&"longjmp"!==d)throw d;je(1,0)}}
function te(a,b,c){var d=Ae();try{Qa.get(a)(b,c)}catch(g){Be(d);if(g!==g+0&&"longjmp"!==g)throw g;je(1,0)}}function oe(a,b,c,d,g,l){var n=Ae();try{return Qa.get(a)(b,c,d,g,l)}catch(u){Be(n);if(u!==u+0&&"longjmp"!==u)throw u;je(1,0)}}function ve(a,b,c,d,g){var l=Ae();try{Qa.get(a)(b,c,d,g)}catch(n){Be(l);if(n!==n+0&&"longjmp"!==n)throw n;je(1,0)}}function pe(a,b,c,d,g,l,n){var u=Ae();try{return Qa.get(a)(b,c,d,g,l,n)}catch(A){Be(u);if(A!==A+0&&"longjmp"!==A)throw A;je(1,0)}}
function we(a,b,c,d,g,l){var n=Ae();try{Qa.get(a)(b,c,d,g,l)}catch(u){Be(n);if(u!==u+0&&"longjmp"!==u)throw u;je(1,0)}}function ne(a,b,c,d,g){var l=Ae();try{return Qa.get(a)(b,c,d,g)}catch(n){Be(l);if(n!==n+0&&"longjmp"!==n)throw n;je(1,0)}}function ye(a,b,c,d,g,l,n,u,A,F){var I=Ae();try{Qa.get(a)(b,c,d,g,l,n,u,A,F)}catch(M){Be(I);if(M!==M+0&&"longjmp"!==M)throw M;je(1,0)}}function xe(a,b,c,d,g,l,n){var u=Ae();try{Qa.get(a)(b,c,d,g,l,n)}catch(A){Be(u);if(A!==A+0&&"longjmp"!==A)throw A;je(1,0)}}
function qe(a,b,c,d,g,l,n,u,A,F){var I=Ae();try{return Qa.get(a)(b,c,d,g,l,n,u,A,F)}catch(M){Be(I);if(M!==M+0&&"longjmp"!==M)throw M;je(1,0)}}function re(a){var b=Ae();try{Qa.get(a)()}catch(c){Be(b);if(c!==c+0&&"longjmp"!==c)throw c;je(1,0)}}var Ce;function Fa(a){this.name="ExitStatus";this.message="Program terminated with exit("+a+")";this.status=a}wb=function De(){Ce||Ee();Ce||(wb=De)};
function Ee(){function a(){if(!Ce&&(Ce=!0,t.calledRun=!0,!Ra)){Eb(qb);Eb(rb);aa(t);if(t.onRuntimeInitialized)t.onRuntimeInitialized();if(t.postRun)for("function"==typeof t.postRun&&(t.postRun=[t.postRun]);t.postRun.length;){var b=t.postRun.shift();sb.unshift(b)}Eb(sb)}}if(!(0<ub)){if(t.preRun)for("function"==typeof t.preRun&&(t.preRun=[t.preRun]);t.preRun.length;)tb();Eb(pb);0<ub||(t.setStatus?(t.setStatus("Running..."),setTimeout(function(){setTimeout(function(){t.setStatus("")},1);a()},1)):a())}}
t.run=Ee;if(t.preInit)for("function"==typeof t.preInit&&(t.preInit=[t.preInit]);0<t.preInit.length;)t.preInit.pop()();noExitRuntime=!0;Ee();
return CanvasKitInit.ready
}
);
})();
if (typeof exports === 'object' && typeof module === 'object')
module.exports = CanvasKitInit;
else if (typeof define === 'function' && define['amd'])
define([], function() { return CanvasKitInit; });
else if (typeof exports === 'object')
exports["CanvasKitInit"] = CanvasKitInit;