diff --git a/Platformer template/appmanifest.json b/Platformer template/appmanifest.json new file mode 100755 index 0000000..863720d --- /dev/null +++ b/Platformer template/appmanifest.json @@ -0,0 +1,36 @@ +{ + "name": "Platformer template", + "short_name": "Platformer template", + "description": "", + "start_url": "index.html", + "display": "fullscreen", + "orientation": "any", + "background_color": "#ffffff", + "icons": [ + { + "src": "icons/icon-16.png", + "sizes": "16x16", + "type": "image/png" + }, + { + "src": "icons/icon-32.png", + "sizes": "32x32", + "type": "image/png" + }, + { + "src": "icons/icon-114.png", + "sizes": "114x114", + "type": "image/png" + }, + { + "src": "icons/icon-128.png", + "sizes": "128x128", + "type": "image/png" + }, + { + "src": "icons/icon-256.png", + "sizes": "256x256", + "type": "image/png" + } + ] +} \ No newline at end of file diff --git a/Platformer template/data.json b/Platformer template/data.json new file mode 100755 index 0000000..a9df9c0 --- /dev/null +++ b/Platformer template/data.json @@ -0,0 +1 @@ +{"project":["Platformer template",null,[[0,false,true,true,true,true,true,true,true,true],[1,false,true,true,true,true,true,true,true,false],[7,true,false,false,false,false,false,false,false,false],[8,false,true,true,true,true,true,true,true,false]],[["BackgroundTile",0,false,[],0,0,["images/backgroundtile-sheet0.png",138,0,0,0,32,32],null,[],false,false,689896111384873,[],null],["Player",1,false,[],2,0,null,[["Default",5,false,1,0,false,734810610482486,[["images/shared-0-sheet0.png",224,0,0,32,32,1,0.5,1,[],[],0]]]],[["Platform",2,102058207846856],["ScrollTo",3,280961176510301]],false,false,826610325620297,[],null],["SolidTile",0,false,[],1,0,["images/solidtile-sheet0.png",144,0,0,0,32,32],null,[["Solid",4,605929759072641]],false,false,463285828161762,[],null],["MovingSolidTile",0,false,[],2,0,["images/solidtile-sheet0.png",144,0,0,0,32,32],null,[["Solid",4,475853687276520],["Sine",5,406072062097919]],false,false,885053456940033,[],null],["JumpThruTile",0,false,[],1,0,["images/jumpthrutile-sheet0.png",140,0,0,0,32,32],null,[["Jumpthru",6,609014660854342]],false,false,515236225826519,[],null],["Keyboard",7,false,[],0,0,null,null,[],false,false,372854524738558,[],null,[]],["Text",8,false,[],0,0,null,null,[],false,false,395520036116606,[],null]],[],[["Layout 1",1280,1024,false,"Event sheet 1",195586522291231,[["Background",0,835917738008775,true,[255,255,255],false,0.5,0.5,1,false,false,1,0,0,[[[2,-27,0,1280,1024,0,0,[1,1,1,1],0,0,0,0,[]],0,0,[],[],[true,0,0,0,1,1,0]]],[]],["Game",1,628603958392595,true,[255,255,255],true,1,1,1,false,false,1,0,0,[[[138.5,684,0,51,46,0,0,[1,1,1,1],0.5,1,0,0,[]],1,1,[],[[330,1500,1500,650,1500,1000,false,0,true,true],[true]],[true,"Default",0,true]],[[64,768,0,320,128,0,0,[1,1,1,1],0,0,0,0,[]],2,2,[],[[true,""]],[true,0,0,0,1,1,0]],[[864,800,0,96,32,0,0,[1,1,1,1],0,0,0,0,[]],2,3,[],[[true,""]],[true,0,0,0,1,1,0]],[[1088,736,0,96,32,0,0,[1,1,1,1],0,0,0,0,[]],2,4,[],[[true,""]],[true,0,0,0,1,1,0]],[[992,928,0,128,32,0,0,[1,1,1,1],0,0,0,0,[]],2,5,[],[[true,""]],[true,0,0,0,1,1,0]],[[544,800,0,128,32,0,0,[1,1,1,1],0,0,0,0,[]],3,6,[],[[true,""],[0,0,4,0,0,0,50,0,true]],[true,0,0,0,1,1,0]],[[1056,624,0,160,16,0,0,[1,1,1,0.800000012],0,0,0,0,[]],4,7,[],[[true]],[true,0,0,0,1,1,0]],[[1056,528,0,160,16,0,0,[1,1,1,0.800000012],0,0,0,0,[]],4,8,[],[[true]],[true,0,0,0,1,1,0]],[[624.159057617,432.067077637,0,372.034545898,32,0,0.17453292,[1,1,1,1],0,0,0,0,[]],2,9,[],[[true,""]],[true,0,0,0,1,1,0]],[[528,432,0,96,32,0,0,[1,1,1,1],0,0,0,0,[]],2,10,[],[[true,""]],[true,0,0,0,1,1,0]],[[346,339,0,219,32,0,0.453596234,[1,1,1,1],0,0,0,0,[]],2,11,[],[[true,""]],[true,0,0,0,1,1,0]],[[160,224,0,96,16,0,0,[1,1,1,0.800000012],0,0,0,0,[]],4,12,[],[[true]],[true,0,0,0,1,1,0]],[[160,336,0,96,32,0,0,[1,1,1,1],0,0,0,0,[]],2,13,[],[[true,""]],[true,0,0,0,1,1,0]],[[320,160,0,96,16,0,0,[1,1,1,0.800000012],0,0,0,0,[]],4,14,[],[[true]],[true,0,0,0,1,1,0]],[[512,128,0,96,16,0,0,[1,1,1,0.800000012],0,0,0,0,[]],4,15,[],[[true]],[true,0,0,0,1,1,0]],[[752,160,0,128,32,0,0,[1,1,1,1],0,0,0,0,[]],3,16,[],[[true,""],[0,0,4,0,0,0,50,0,true]],[true,0,0,0,1,1,0]],[[1056,192,0,96,16,0,0,[1,1,1,0.800000012],0,0,0,0,[]],4,17,[],[[true]],[true,0,0,0,1,1,0]],[[928,288,0,96,16,0,0,[1,1,1,1],0,0,0,0,[]],3,18,[],[[true,""],[1,0,4,0,0,0,50,0,true]],[true,0,0,0,1,1,0]],[[65,900,0,352,32,0,0,[1,1,1,1],0,0,0,0,[]],6,19,[],[],["Arrow keys or WASD to move",false,"Arial",12,0,false,false,[0,0,0],0,0,0,true,0]]],[]]],[],[]]],[["Event sheet 1",[[0,null,false,null,128459781631962,[[5,9,null,1,false,false,false,305389046261418,null,[[9,40]]]],[[1,10,"Platform",892367029867673,null]]],[0,null,false,null,645292426100724,[[5,11,null,0,false,false,false,632243729452326,null,[[9,87]]]],[[1,12,"Platform",920742090584576,null,[[3,2]]]]],[0,null,false,null,242167283932481,[[5,11,null,0,false,false,false,483950024948899,null,[[9,65]]]],[[1,12,"Platform",775074611847897,null,[[3,0]]]]],[0,null,false,null,539757104898646,[[5,11,null,0,false,false,false,606056445084855,null,[[9,83]]]],[[1,10,"Platform",704843732518047,null]]],[0,null,false,null,591315574743711,[[5,11,null,0,false,false,false,248839217420683,null,[[9,68]]]],[[1,12,"Platform",700473221744042,null,[[3,1]]]]],[0,null,true,null,636041846004128,[[5,9,null,1,false,false,false,528722391729597,null,[[9,37]]],[5,9,null,1,false,false,false,146542714002785,null,[[9,65]]]],[[1,13,null,132393308998210,null,[[3,0]]]]],[0,null,true,null,141520300585655,[[5,9,null,1,false,false,false,711168855441086,null,[[9,39]]],[5,9,null,1,false,false,false,981994648819837,null,[[9,68]]]],[[1,13,null,834972848466442,null,[[3,1]]]]],[0,null,false,null,301769199928821,[[1,14,null,0,false,false,false,564820914778219,null,[[8,4],[0,[0,[4,15]]]]]],[[-1,16,null,541417716131689,null]]]]]],[],"media/",false,640,480,4,true,true,true,"1.0",true,false,4,0,22,false,true,1,true,false,[],"icons/",[],true,"wp0gaqujt24","fonts/",[],"high-performance"]} \ No newline at end of file diff --git a/Platformer template/icons/icon-114.png b/Platformer template/icons/icon-114.png new file mode 100755 index 0000000..42b1a39 Binary files /dev/null and b/Platformer template/icons/icon-114.png differ diff --git a/Platformer template/icons/icon-128.png b/Platformer template/icons/icon-128.png new file mode 100755 index 0000000..e782d90 Binary files /dev/null and b/Platformer template/icons/icon-128.png differ diff --git a/Platformer template/icons/icon-16.png b/Platformer template/icons/icon-16.png new file mode 100755 index 0000000..47d4f73 Binary files /dev/null and b/Platformer template/icons/icon-16.png differ diff --git a/Platformer template/icons/icon-256.png b/Platformer template/icons/icon-256.png new file mode 100755 index 0000000..fe22ecc Binary files /dev/null and b/Platformer template/icons/icon-256.png differ diff --git a/Platformer template/icons/icon-32.png b/Platformer template/icons/icon-32.png new file mode 100755 index 0000000..4300c36 Binary files /dev/null and b/Platformer template/icons/icon-32.png differ diff --git a/Platformer template/icons/loading-logo.png b/Platformer template/icons/loading-logo.png new file mode 100755 index 0000000..434c22e Binary files /dev/null and b/Platformer template/icons/loading-logo.png differ diff --git a/Platformer template/images/backgroundtile-sheet0.png b/Platformer template/images/backgroundtile-sheet0.png new file mode 100755 index 0000000..760542d Binary files /dev/null and b/Platformer template/images/backgroundtile-sheet0.png differ diff --git a/Platformer template/images/jumpthrutile-sheet0.png b/Platformer template/images/jumpthrutile-sheet0.png new file mode 100755 index 0000000..b344af4 Binary files /dev/null and b/Platformer template/images/jumpthrutile-sheet0.png differ diff --git a/Platformer template/images/shared-0-sheet0.png b/Platformer template/images/shared-0-sheet0.png new file mode 100755 index 0000000..bf1f48f Binary files /dev/null and b/Platformer template/images/shared-0-sheet0.png differ diff --git a/Platformer template/images/solidtile-sheet0.png b/Platformer template/images/solidtile-sheet0.png new file mode 100755 index 0000000..ecde66a Binary files /dev/null and b/Platformer template/images/solidtile-sheet0.png differ diff --git a/Platformer template/index.html b/Platformer template/index.html new file mode 100755 index 0000000..33dfc23 --- /dev/null +++ b/Platformer template/index.html @@ -0,0 +1,31 @@ + + + + +Platformer template + + + + + + + + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/Platformer template/offline.json b/Platformer template/offline.json new file mode 100755 index 0000000..e4cdd62 --- /dev/null +++ b/Platformer template/offline.json @@ -0,0 +1 @@ +{"version":1548962929375,"fileList":["scripts/c3runtime.js","data.json","style.css","scripts/offlineClient.js","images/shared-0-sheet0.png","images/backgroundtile-sheet0.png","images/solidtile-sheet0.png","images/jumpthrutile-sheet0.png","scripts/main.js","scripts/dispatchWorker.js","scripts/jobWorker.js","scripts/supportCheck.js","icons/icon-16.png","icons/icon-32.png","icons/icon-114.png","icons/icon-128.png","icons/loading-logo.png","icons/icon-256.png","scripts/register-sw.js"]} \ No newline at end of file diff --git a/Platformer template/scripts/c3runtime.js b/Platformer template/scripts/c3runtime.js new file mode 100755 index 0000000..858125e --- /dev/null +++ b/Platformer template/scripts/c3runtime.js @@ -0,0 +1,2 @@ +// Generated by Construct 3, the game and app creator :: https://www.construct.net +"use strict";(function(g,_){if("object"==typeof exports&&"object"==typeof module)module.exports=_();else if("function"==typeof define&&define.g_a)define([],_);else{var e=_();for(var n in e)("object"==typeof exports?exports:g)[n]=e[n]}})(this,function(){var g=Math.acos,_=Math.round,f=Math.min,a=Math.floor,o=Math.ceil,z=Math.sqrt,n=Math.pow,C=Math.cos,w=Math.sin,B=Math.max,j=Math.abs,p=Math.PI;return function(g){function _(a){if(e[a])return e[a].exports;var n=e[a]={g_b:a,g_c:!1,exports:{}};return g[a].call(n.exports,n,n.exports,_),n.g_c=!0,n.exports}var e={};return _.g_d=g,_.c=e,_.d=function(g,e,a){_.g_e(g,e)||Object.defineProperty(g,e,{g_f:!1,g_g:!0,get:a})},_.n=function(g){var e=g&&g.g_h?function(){return g["default"]}:function(){return g};return _.d(e,"a",e),e},_.g_e=function(g,_){return Object.prototype.hasOwnProperty.call(g,_)},_.g_i="",_(_.g_j=4)}([function(g,_){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.g_k=function(g){_.g_l=t=g},_.g_m=function(g){return g*i},_.g_n=function(g,_){return j(g-_)<=n*B(1,j(g),j(_))};var n=_.EPSILON=1e-6,t=_.g_l="undefined"==typeof Float32Array?Array:Float32Array,e=_.g_o=Math.random,i=p/180},function(g,_,e){"use strict";function a(g,_,e){var a=_[0],t=_[1],o=_[2],r=_[3],s=_[4],n=_[5],d=_[6],u=_[7],i=_[8],l=e[0],c=e[1],f=e[2],h=e[3],p=e[4],M=e[5],b=e[6],m=e[7],T=e[8];return g[0]=l*a+c*r+f*d,g[1]=l*t+c*s+f*u,g[2]=l*o+c*n+f*i,g[3]=h*a+p*r+M*d,g[4]=h*t+p*s+M*u,g[5]=h*o+p*n+M*i,g[6]=b*a+m*r+T*d,g[7]=b*t+m*s+T*u,g[8]=b*o+m*n+T*i,g}function t(g,_,e){return g[0]=_[0]-e[0],g[1]=_[1]-e[1],g[2]=_[2]-e[2],g[3]=_[3]-e[3],g[4]=_[4]-e[4],g[5]=_[5]-e[5],g[6]=_[6]-e[6],g[7]=_[7]-e[7],g[8]=_[8]-e[8],g}Object.defineProperty(_,"__esModule",{value:!0}),_.sub=_.g_p=void 0,_.create=function(){var g=new h.g_l(9);return g[0]=1,g[1]=0,g[2]=0,g[3]=0,g[4]=1,g[5]=0,g[6]=0,g[7]=0,g[8]=1,g},_.g_q=function(g,_){return g[0]=_[0],g[1]=_[1],g[2]=_[2],g[3]=_[4],g[4]=_[5],g[5]=_[6],g[6]=_[8],g[7]=_[9],g[8]=_[10],g},_.clone=function(g){var _=new h.g_l(9);return _[0]=g[0],_[1]=g[1],_[2]=g[2],_[3]=g[3],_[4]=g[4],_[5]=g[5],_[6]=g[6],_[7]=g[7],_[8]=g[8],_},_.g_r=function(g,_){return g[0]=_[0],g[1]=_[1],g[2]=_[2],g[3]=_[3],g[4]=_[4],g[5]=_[5],g[6]=_[6],g[7]=_[7],g[8]=_[8],g},_.g_s=function(g,_,e,a,t,i,o,r,n){var d=new h.g_l(9);return d[0]=g,d[1]=_,d[2]=e,d[3]=a,d[4]=t,d[5]=i,d[6]=o,d[7]=r,d[8]=n,d},_.set=function(g,_,e,a,t,i,o,r,n,d){return g[0]=_,g[1]=e,g[2]=a,g[3]=t,g[4]=i,g[5]=o,g[6]=r,g[7]=n,g[8]=d,g},_.identity=function(g){return g[0]=1,g[1]=0,g[2]=0,g[3]=0,g[4]=1,g[5]=0,g[6]=0,g[7]=0,g[8]=1,g},_.g_t=function(g,_){if(g===_){var e=_[1],a=_[2],n=_[5];g[1]=_[3],g[2]=_[6],g[3]=e,g[5]=_[7],g[6]=a,g[7]=n}else g[0]=_[0],g[1]=_[3],g[2]=_[6],g[3]=_[1],g[4]=_[4],g[5]=_[7],g[6]=_[2],g[7]=_[5],g[8]=_[8];return g},_.g_u=function(g,_){var e=_[0],a=_[1],t=_[2],o=_[3],r=_[4],s=_[5],n=_[6],d=_[7],u=_[8],i=u*r-s*d,l=-u*o+s*n,c=d*o-r*n,f=e*i+a*l+t*c;return f?(f=1/f,g[0]=i*f,g[1]=(-u*a+t*d)*f,g[2]=(s*a-t*r)*f,g[3]=l*f,g[4]=(u*e-t*n)*f,g[5]=(-s*e+t*o)*f,g[6]=c*f,g[7]=(-d*e+a*n)*f,g[8]=(r*e-a*o)*f,g):null},_.g_v=function(g,_){var e=_[0],a=_[1],t=_[2],o=_[3],r=_[4],s=_[5],n=_[6],d=_[7],u=_[8];return g[0]=r*u-s*d,g[1]=t*d-a*u,g[2]=a*s-t*r,g[3]=s*n-o*u,g[4]=e*u-t*n,g[5]=t*o-e*s,g[6]=o*d-r*n,g[7]=a*n-e*d,g[8]=e*r-a*o,g},_.g_w=function(g){var _=g[0],e=g[1],a=g[2],t=g[3],i=g[4],o=g[5],r=g[6],n=g[7],d=g[8];return _*(d*i-o*n)+e*(-d*t+o*r)+a*(n*t-i*r)},_.multiply=a,_.translate=function(g,_,e){var a=_[0],t=_[1],o=_[2],r=_[3],s=_[4],n=_[5],d=_[6],u=_[7],i=_[8],l=e[0],c=e[1];return g[0]=a,g[1]=t,g[2]=o,g[3]=r,g[4]=s,g[5]=n,g[6]=l*a+c*r+d,g[7]=l*t+c*s+u,g[8]=l*o+c*n+i,g},_.rotate=function(g,_,e){var a=_[0],t=_[1],o=_[2],r=_[3],n=_[4],i=_[5],d=_[6],u=_[7],l=_[8],c=w(e),f=C(e);return g[0]=f*a+c*r,g[1]=f*t+c*n,g[2]=f*o+c*i,g[3]=f*r-c*a,g[4]=f*n-c*t,g[5]=f*i-c*o,g[6]=d,g[7]=u,g[8]=l,g},_.scale=function(g,_,e){var a=e[0],n=e[1];return g[0]=a*_[0],g[1]=a*_[1],g[2]=a*_[2],g[3]=n*_[3],g[4]=n*_[4],g[5]=n*_[5],g[6]=_[6],g[7]=_[7],g[8]=_[8],g},_.g_x=function(g,_){return g[0]=1,g[1]=0,g[2]=0,g[3]=0,g[4]=1,g[5]=0,g[6]=_[0],g[7]=_[1],g[8]=1,g},_.g_y=function(g,_){var e=w(_),a=C(_);return g[0]=a,g[1]=e,g[2]=0,g[3]=-e,g[4]=a,g[5]=0,g[6]=0,g[7]=0,g[8]=1,g},_.g_z=function(g,_){return g[0]=_[0],g[1]=0,g[2]=0,g[3]=0,g[4]=_[1],g[5]=0,g[6]=0,g[7]=0,g[8]=1,g},_.g_A=function(g,_){return g[0]=_[0],g[1]=_[1],g[2]=0,g[3]=_[2],g[4]=_[3],g[5]=0,g[6]=_[4],g[7]=_[5],g[8]=1,g},_.g_B=function(g,_){var e=_[0],a=_[1],t=_[2],o=_[3],r=e+e,s=a+a,n=t+t,d=e*r,u=a*r,i=a*s,l=t*r,c=t*s,f=t*n,h=o*r,p=o*s,M=o*n;return g[0]=1-i-f,g[3]=u-M,g[6]=l+p,g[1]=u+M,g[4]=1-d-f,g[7]=c-h,g[2]=l-p,g[5]=c+h,g[8]=1-d-i,g},_.g_C=function(h,e){var t=e[0],a=e[1],r=e[2],o=e[3],l=e[4],s=e[5],n=e[6],d=e[7],u=e[8],i=e[9],c=e[10],b=e[11],f=e[12],m=e[13],p=e[14],T=e[15],E=t*s-a*l,y=t*n-r*l,z=t*d-o*l,C=a*n-r*s,O=a*d-o*s,w=r*d-o*n,_=u*m-i*f,N=u*p-c*f,I=u*T-b*f,L=i*p-c*m,R=i*T-b*m,g=c*T-b*p,M=E*g-y*R+z*L+C*I-O*N+w*_;return M?(M=1/M,h[0]=(s*g-n*R+d*L)*M,h[1]=(n*I-l*g-d*N)*M,h[2]=(l*R-s*I+d*_)*M,h[3]=(r*R-a*g-o*L)*M,h[4]=(t*g-r*I+o*N)*M,h[5]=(a*I-t*R-o*_)*M,h[6]=(m*w-p*O+T*C)*M,h[7]=(p*z-f*w-T*y)*M,h[8]=(f*O-m*z+T*E)*M,h):null},_.g_D=function(g,_,e){return g[0]=2/_,g[1]=0,g[2]=0,g[3]=0,g[4]=-2/e,g[5]=0,g[6]=-1,g[7]=1,g[8]=1,g},_.g_E=function(g){return"mat3("+g[0]+", "+g[1]+", "+g[2]+", "+g[3]+", "+g[4]+", "+g[5]+", "+g[6]+", "+g[7]+", "+g[8]+")"},_.g_F=function(g){return z(n(g[0],2)+n(g[1],2)+n(g[2],2)+n(g[3],2)+n(g[4],2)+n(g[5],2)+n(g[6],2)+n(g[7],2)+n(g[8],2))},_.add=function(g,_,e){return g[0]=_[0]+e[0],g[1]=_[1]+e[1],g[2]=_[2]+e[2],g[3]=_[3]+e[3],g[4]=_[4]+e[4],g[5]=_[5]+e[5],g[6]=_[6]+e[6],g[7]=_[7]+e[7],g[8]=_[8]+e[8],g},_.g_G=t,_.g_H=function(g,_,e){return g[0]=_[0]*e,g[1]=_[1]*e,g[2]=_[2]*e,g[3]=_[3]*e,g[4]=_[4]*e,g[5]=_[5]*e,g[6]=_[6]*e,g[7]=_[7]*e,g[8]=_[8]*e,g},_.g_I=function(g,_,e,a){return g[0]=_[0]+e[0]*a,g[1]=_[1]+e[1]*a,g[2]=_[2]+e[2]*a,g[3]=_[3]+e[3]*a,g[4]=_[4]+e[4]*a,g[5]=_[5]+e[5]*a,g[6]=_[6]+e[6]*a,g[7]=_[7]+e[7]*a,g[8]=_[8]+e[8]*a,g},_.g_J=function(g,_){return g[0]===_[0]&&g[1]===_[1]&&g[2]===_[2]&&g[3]===_[3]&&g[4]===_[4]&&g[5]===_[5]&&g[6]===_[6]&&g[7]===_[7]&&g[8]===_[8]},_.g_n=function(g,_){var e=g[0],a=g[1],t=g[2],i=g[3],o=g[4],r=g[5],n=g[6],d=g[7],u=g[8],s=_[0],l=_[1],c=_[2],f=_[3],p=_[4],M=_[5],b=_[6],m=_[7],T=_[8];return j(e-s)<=h.EPSILON*B(1,j(e),j(s))&&j(a-l)<=h.EPSILON*B(1,j(a),j(l))&&j(t-c)<=h.EPSILON*B(1,j(t),j(c))&&j(i-f)<=h.EPSILON*B(1,j(i),j(f))&&j(o-p)<=h.EPSILON*B(1,j(o),j(p))&&j(r-M)<=h.EPSILON*B(1,j(r),j(M))&&j(n-b)<=h.EPSILON*B(1,j(n),j(b))&&j(d-m)<=h.EPSILON*B(1,j(d),j(m))&&j(u-T)<=h.EPSILON*B(1,j(u),j(T))};var i=e(0),h=function(g){if(g&&g.g_h)return g;var _={};if(null!=g)for(var e in g)Object.prototype.hasOwnProperty.call(g,e)&&(_[e]=g[e]);return _.default=g,_}(i),o=_.g_p=a,r=_.sub=t},function(e,n,t){"use strict";function i(){var g=new I.g_l(3);return g[0]=0,g[1]=0,g[2]=0,g}function r(g){var _=g[0],e=g[1],a=g[2];return z(_*_+e*e+a*a)}function d(g,_,e){var a=new I.g_l(3);return a[0]=g,a[1]=_,a[2]=e,a}function u(g,_,e){return g[0]=_[0]-e[0],g[1]=_[1]-e[1],g[2]=_[2]-e[2],g}function s(g,_,e){return g[0]=_[0]*e[0],g[1]=_[1]*e[1],g[2]=_[2]*e[2],g}function l(g,_,e){return g[0]=_[0]/e[0],g[1]=_[1]/e[1],g[2]=_[2]/e[2],g}function c(g,_){var e=_[0]-g[0],a=_[1]-g[1],n=_[2]-g[2];return z(e*e+a*a+n*n)}function m(g,_){var e=_[0]-g[0],a=_[1]-g[1],n=_[2]-g[2];return e*e+a*a+n*n}function E(g){var _=g[0],e=g[1],a=g[2];return _*_+e*e+a*a}function y(g,_){var e=_[0],a=_[1],n=_[2],t=e*e+a*a+n*n;return 0t?p:g(t)},n.g_E=function(g){return"vec3("+g[0]+", "+g[1]+", "+g[2]+")"},n.g_J=function(g,_){return g[0]===_[0]&&g[1]===_[1]&&g[2]===_[2]},n.g_n=function(g,_){var e=g[0],a=g[1],t=g[2],i=_[0],o=_[1],r=_[2];return j(e-i)<=I.EPSILON*B(1,j(e),j(i))&&j(a-o)<=I.EPSILON*B(1,j(a),j(o))&&j(t-r)<=I.EPSILON*B(1,j(t),j(r))};var N=t(0),I=function(g){if(g&&g.g_h)return g;var _={};if(null!=g)for(var e in g)Object.prototype.hasOwnProperty.call(g,e)&&(_[e]=g[e]);return _.default=g,_}(N),L=n.sub=u,R=n.g_p=s,S=n.g_O=l,M=n.g_N=c,v=n.g_M=m,h=n.g_L=r,T=n.g_K=E,b=n.forEach=function(){var g=i();return function(_,e,t,r,s,n){var d,l;for(e||(e=3),t||(t=0),l=r?f(r*e+t,_.length):_.length,d=t;d_[5]&_[0]>_[10]?(a=2*z(1+_[0]-_[5]-_[10]),g[3]=(_[6]-_[9])/a,g[0]=.25*a,g[1]=(_[1]+_[4])/a,g[2]=(_[8]+_[2])/a):_[5]>_[10]?(a=2*z(1+_[5]-_[0]-_[10]),g[3]=(_[8]-_[2])/a,g[0]=(_[1]+_[4])/a,g[1]=.25*a,g[2]=(_[6]+_[9])/a):(a=2*z(1+_[10]-_[0]-_[5]),g[3]=(_[1]-_[4])/a,g[0]=(_[8]+_[2])/a,g[1]=(_[6]+_[9])/a,g[2]=.25*a),g},_.g_am=function(g,_,e,a){var t=_[0],o=_[1],r=_[2],s=_[3],n=t+t,d=o+o,u=r+r,i=t*n,l=t*d,c=t*u,f=o*d,h=o*u,p=r*u,M=s*n,b=s*d,m=s*u,T=a[0],E=a[1],N=a[2];return g[0]=(1-(f+p))*T,g[1]=(l+m)*T,g[2]=(c-b)*T,g[3]=0,g[4]=(l-m)*E,g[5]=(1-(i+p))*E,g[6]=(h+M)*E,g[7]=0,g[8]=(c+b)*N,g[9]=(h-M)*N,g[10]=(1-(i+f))*N,g[11]=0,g[12]=e[0],g[13]=e[1],g[14]=e[2],g[15]=1,g},_.g_an=function(g,e,t,a,r){var l=e[0],o=e[1],s=e[2],n=e[3],d=l+l,u=o+o,i=s+s,c=l*d,h=l*u,f=l*i,M=o*u,p=o*i,b=s*i,m=n*d,T=n*u,E=n*i,y=a[0],z=a[1],C=a[2],_=r[0],N=r[1],I=r[2];return g[0]=(1-(M+b))*y,g[1]=(h+E)*y,g[2]=(f-T)*y,g[3]=0,g[4]=(h-E)*z,g[5]=(1-(c+b))*z,g[6]=(p+m)*z,g[7]=0,g[8]=(f+T)*C,g[9]=(p-m)*C,g[10]=(1-(c+M))*C,g[11]=0,g[12]=t[0]+_-(g[0]*_+g[4]*N+g[8]*I),g[13]=t[1]+N-(g[1]*_+g[5]*N+g[9]*I),g[14]=t[2]+I-(g[2]*_+g[6]*N+g[10]*I),g[15]=1,g},_.g_B=function(g,_){var e=_[0],a=_[1],t=_[2],o=_[3],r=e+e,s=a+a,n=t+t,d=e*r,u=a*r,i=a*s,l=t*r,c=t*s,f=t*n,h=o*r,p=o*s,M=o*n;return g[0]=1-i-f,g[1]=u+M,g[2]=l-p,g[3]=0,g[4]=u-M,g[5]=1-d-f,g[6]=c+h,g[7]=0,g[8]=l+p,g[9]=c-h,g[10]=1-d-i,g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g},_.g_ao=function(g,_,e,a,t,i,o){var r=1/(e-_),n=1/(t-a),d=1/(i-o);return g[0]=2*i*r,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=2*i*n,g[6]=0,g[7]=0,g[8]=(e+_)*r,g[9]=(t+a)*n,g[10]=(o+i)*d,g[11]=-1,g[12]=0,g[13]=0,g[14]=2*(o*i)*d,g[15]=0,g},_.perspective=function(g,_,e,a,t){var i=1/c(_/2),o=1/(a-t);return g[0]=i/e,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=i,g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=(t+a)*o,g[11]=-1,g[12]=0,g[13]=0,g[14]=2*t*a*o,g[15]=0,g},_.g_ap=function(g,_,e,a){var t=c(_.g_aq*p/180),o=c(_.g_ar*p/180),r=c(_.g_as*p/180),n=c(_.g_at*p/180),d=2/(r+n),u=2/(t+o);return g[0]=d,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=u,g[6]=0,g[7]=0,g[8]=-(.5*((r-n)*d)),g[9]=.5*((t-o)*u),g[10]=a/(e-a),g[11]=-1,g[12]=0,g[13]=0,g[14]=a*e/(e-a),g[15]=0,g},_.g_au=function(g,_,e,a,t,i,o){var r=1/(_-e),n=1/(a-t),d=1/(i-o);return g[0]=-2*r,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=-2*n,g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=2*d,g[11]=0,g[12]=(_+e)*r,g[13]=(t+a)*n,g[14]=(o+i)*d,g[15]=1,g},_.g_av=function(g,e,n,a){var t=e[0],r=e[1],h=e[2],M=a[0],b=a[1],m=a[2],T=n[0],_=n[1],N=n[2],y,I,C,O,w,v,L,R,B,S;return j(t-T)b&&(b=-b,d=-d,s=-s,l=-l,h=-h),1e-6<1-b?(M=g(b),T=w(M),N=w((1-a)*M)/T,I=w(a*M)/T):(N=1-a,I=a),_[0]=N*r+I*d,_[1]=N*t+I*s,_[2]=N*u+I*l,_[3]=N*n+I*h,_}function u(g,_){var e=_[0]+_[4]+_[8],a;if(0_[0]&&(n=1),_[8]>_[3*n+n]&&(n=2);var t=(n+1)%3,i=(n+2)%3;a=z(_[3*n+n]-_[3*t+t]-_[3*i+i]+1),g[n]=.5*a,a=.5/a,g[3]=(_[3*t+i]-_[3*i+t])*a,g[t]=(_[3*t+n]+_[3*n+t])*a,g[i]=(_[3*i+n]+_[3*n+i])*a}return g}Object.defineProperty(n,"__esModule",{value:!0}),n.g_ax=n.g_ay=n.g_az=n.g_n=n.g_J=n.normalize=n.g_K=n.g_T=n.g_L=n.length=n.g_X=n.g_V=n.scale=n.g_p=n.add=n.set=n.g_r=n.g_s=n.clone=void 0,n.create=o,n.identity=function(g){return g[0]=0,g[1]=0,g[2]=0,g[3]=1,g},n.g_aA=d,n.g_aB=function(_,e){var a=2*g(e[3]),n=w(a/2);return 0==n?(_[0]=1,_[1]=0,_[2]=0):(_[0]=e[0]/n,_[1]=e[1]/n,_[2]=e[2]/n),a},n.multiply=r,n.g_ab=function(g,_,e){e*=.5;var t=_[0],r=_[1],o=_[2],d=_[3],u=w(e),n=C(e);return g[0]=t*n+d*u,g[1]=r*n+o*u,g[2]=o*n-r*u,g[3]=d*n-t*u,g},n.g_ac=function(g,_,e){e*=.5;var t=_[0],r=_[1],o=_[2],d=_[3],u=w(e),n=C(e);return g[0]=t*n-o*u,g[1]=r*n+d*u,g[2]=o*n+t*u,g[3]=d*n-r*u,g},n.g_ad=function(g,_,e){e*=.5;var t=_[0],r=_[1],o=_[2],d=_[3],u=w(e),n=C(e);return g[0]=t*n+r*u,g[1]=r*n-t*u,g[2]=o*n+d*u,g[3]=d*n-o*u,g},n.g_aC=function(g,_){var e=_[0],a=_[1],n=_[2];return g[0]=e,g[1]=a,g[2]=n,g[3]=z(j(1-e*e-a*a-n*n)),g},n.g_aD=i,n.g_u=function(g,_){var e=_[0],a=_[1],t=_[2],i=_[3],o=e*e+a*a+t*t+i*i,r=o?1/o:0;return g[0]=-e*r,g[1]=-a*r,g[2]=-t*r,g[3]=i*r,g},n.g_aE=function(g,_){return g[0]=-_[0],g[1]=-_[1],g[2]=-_[2],g[3]=_[3],g},n.g_aF=u,n.g_aG=function(g,_,e,d){var u=.5*p/180;_*=u,e*=u,d*=u;var o=w(_),l=C(_),s=w(e),n=C(e),i=w(d),c=C(d);return g[0]=o*n*c-l*s*i,g[1]=l*s*c+o*n*i,g[2]=l*n*i-o*s*c,g[3]=l*n*c+o*s*i,g},n.g_E=function(g){return"quat("+g[0]+", "+g[1]+", "+g[2]+", "+g[3]+")"};var s=a(0),l=t(s),c=a(1),f=t(c),m=a(2),E=t(m),y=a(3),O=t(y),L=n.clone=O.clone,_=n.g_s=O.g_s,N=n.g_r=O.g_r,I=n.set=O.set,R=n.add=O.add,B=n.g_p=r,S=n.scale=O.scale,M=n.g_V=O.g_V,v=n.g_X=O.g_X,h=n.length=O.length,T=n.g_L=h,b=n.g_T=O.g_T,x=n.g_K=b,D=n.normalize=O.normalize,A=n.g_J=O.g_J,F=n.g_n=O.g_n,k=n.g_az=function(){var g=E.create(),_=E.g_s(1,0,0),e=E.g_s(0,1,0);return function(t,i,o){var a=E.g_V(i,o);return-.999999>a?(E.g_W(g,_,i),1e-6>E.g_L(g)&&E.g_W(g,e,i),E.normalize(g,g),d(t,g,Math.PI),t):.999999=d&&0<=i&&1>=i}function T(g,_,e){return(_[0]-g[0])*(e[1]-g[1])-(e[0]-g[0])*(_[1]-g[1])}function E(g,_,e){return 0T(g,_,e)}function f(g,_,e){return 0>=T(g,_,e)}function g(_,e,a,n){var t=Math.sqrt;if(!n)return 0===T(_,e,a);var o=tmpPoint1,g=tmpPoint2;o[0]=e[0]-_[0],o[1]=e[1]-_[1],g[0]=a[0]-e[0],g[1]=a[1]-e[1];var r=o[0]*g[0]+o[1]*g[1],i=t(o[0]*o[0]+o[1]*o[1]),d=t(g[0]*g[0]+g[1]*g[1]),u=Math.acos(r/(i*d));return u_?_%e+e:_%e]}function l(g){g.length=0}function a(g,_,a,n){for(var t=a;tI.length)return _;if(c++,c>l)return console.warn("quickDecomp: max level ("+l+") reached."),_;for(var J=0;JQ&&(Q+=g.length),j=M,Qa[_][0])&&(_=t);return!E(z(g,_-1),z(g,_),z(g,_+1))&&(n(g),!0)}}}!function(g){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=g();else if("function"==typeof define&&define.g_a)define([],g);else{var _;_="undefined"==typeof window?"undefined"==typeof global?"undefined"==typeof self?this:self:global:window,_.localforage=g()}}(function(){return function _(n,t,a){function g(r,e){if(!t[r]){if(!n[r]){var d="function"==typeof require&&require;if(!e&&d)return d(r,!0);if(o)return o(r,!0);var u=new Error("Cannot find module '"+r+"'");throw u.code="MODULE_NOT_FOUND",u}var i=t[r]={exports:{}};n[r][0].call(i.exports,function(_){var e=n[r][1][_];return g(e||_)},i,i.exports,_,n,t,a)}return t[r].exports}for(var o="function"==typeof require&&require,i=0;i=g.oldVersion&&e.createObjectStore(N)}catch(e){if("ConstraintError"!==e.name)throw e;console.warn("The database \""+_.name+"\" has been upgraded from version "+g.oldVersion+" to version "+g.newVersion+", but the storage \""+_.g_aV+"\" already exists.")}}),o.onerror=function(g){g.preventDefault(),n(o.error)},o.onsuccess=function(){a(o.result),b(_)}})}function m(g){return l(g,!1)}function n(g){return l(g,!0)}function o(_,g){if(!_.db)return!0;var a=!_.db.objectStoreNames.contains(_.g_aV),n=_.version<_.db.version,t=_.version>_.db.version;if(n&&(_.version!==g&&console.warn("The database \""+_.name+"\" can't be downgraded from version "+_.db.version+" to version "+_.version+"."),_.version=_.db.version),t||a){if(a){var i=_.db.version+1;i>_.version&&(_.version=i)}return!0}return!1}function p(g){return new I(function(_,e){var a=new FileReader;a.onerror=e,a.onloadend=function(e){var a=btoa(e.target.result||"");_({g_aW:!0,data:a,type:g.type})},a.readAsBinaryString(g)})}function B(g){return L([e(atob(g.data))],{type:g.type})}function r(g){return g&&g.g_aW}function s(g){var _=this,e=_.g_aX().then(function(){var g=ag[_.g_aY.name];if(g&&g.g_aU)return g.g_aU});return Q(e,g,g),e}function t(g){i(g);for(var _=ag[g.name],e=_.g_aZ,a=0;a>4,i[g++]=(15&u)<<4|s>>2,i[g++]=(3&s)<<6|63&l;return p}function x(g){var _=new Uint8Array(g),e="",n;for(n=0;n<_.length;n+=3)e+=S[_[n]>>2],e+=S[(3&_[n])<<4|_[n+1]>>4],e+=S[(15&_[n+1])<<2|_[n+2]>>6],e+=S[63&_[n+2]];return 2==_.length%3?e=e.substring(0,e.length-1)+"=":1==_.length%3&&(e=e.substring(0,e.length-2)+"=="),e}function y(_,n,t,i){var o=this;_=g(_);var e=new I(function(r,e){o.ready().then(function(){void 0===n&&(n=null);var d=n,g=o.g_aY;g.g_a$.serialize(n,function(n,a){a?e(a):g.db.transaction(function(a){a.g_ba("INSERT OR REPLACE INTO "+g.g_aV+" (key, value) VALUES (?, ?)",[_,n],function(){r(d)},function(g,_){e(_)})},function(g){if(g.code===g.QUOTA_ERR){if(0_?void n(null):void e.ready().then(function(){u(e.g_aY,"readonly",function(t,i){if(t)return a(t);try{var o=i.objectStore(e.g_aY.g_aV),r=!1,d=o.openCursor();d.onsuccess=function(){var g=d.result;return g?void(0===_?n(g.key):r?n(g.key):(r=!0,g.advance(_))):void n(null)},d.onerror=function(){a(d.error)}}catch(g){a(g)}})}).catch(a)});return A(a,g),a},keys:function(g){var _=this,e=new I(function(e,n){_.ready().then(function(){u(_.g_aY,"readonly",function(t,a){if(t)return n(t);try{var i=a.objectStore(_.g_aY.g_aV),o=i.openCursor(),r=[];o.onsuccess=function(){var g=o.result;return g?void(r.push(g.key),g.continue()):void e(r)},o.onerror=function(){n(o.error)}}catch(g){n(g)}})}).catch(n)});return A(e,g),e}},S="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",T=/^~~local_forage_type~([^~]+)~/,U=Object.prototype.toString,Y={serialize:function(_,g){var a="";if(_&&(a=U.call(_)),_&&("[object ArrayBuffer]"===a||_.buffer&&"[object ArrayBuffer]"===U.call(_.buffer))){var n="__lfsc__:",t;_ instanceof ArrayBuffer?(t=_,n+="arbf"):(t=_.buffer,"[object Int8Array]"===a?n+="si08":"[object Uint8Array]"===a?n+="ui08":"[object Uint8ClampedArray]"===a?n+="uic8":"[object Int16Array]"===a?n+="si16":"[object Uint16Array]"===a?n+="ur16":"[object Int32Array]"===a?n+="si32":"[object Uint32Array]"===a?n+="ui32":"[object Float32Array]"===a?n+="fl32":"[object Float64Array]"===a?n+="fl64":g(new Error("Failed to get type for BinaryArray"))),g(n+x(t))}else if("[object Blob]"===a){var i=new FileReader;i.onload=function(){var e="~~local_forage_type~"+_.type+"~"+x(this.result);g("__lfsc__:blob"+e)},i.readAsArrayBuffer(_)}else try{g(JSON.stringify(_))}catch(e){console.error("Couldn't convert value into a JSON string: ",_),g(null,e)}},g_be:function(_){if(_.substring(0,9)!=="__lfsc__:")return JSON.parse(_);var g=_.substring(13),e=_.substring(9,13),n;if(e==="blob"&&T.test(g)){var t=g.match(T);n=t[1],g=g.substring(t[0].length)}var o=w(g);switch(e){case"arbf":return o;case"blob":return L([o],{type:n});case"si08":return new Int8Array(o);case"ui08":return new Uint8Array(o);case"uic8":return new Uint8ClampedArray(o);case"si16":return new Int16Array(o);case"ur16":return new Uint16Array(o);case"si32":return new Int32Array(o);case"ui32":return new Uint32Array(o);case"fl32":return new Float32Array(o);case"fl64":return new Float64Array(o);default:throw new Error("Unkown type: "+e);}},g_bf:w,g_bg:x},K={g_bc:"webSQLStorage",_initStorage:function(_){var e=this,g={db:null};if(_)for(var n in _)g[n]="string"==typeof _[n]?_[n]:_[n].toString();var a=new I(function(_,n){try{g.db=openDatabase(g.name,g.version+"",g.description,g.size)}catch(g){return n(g)}g.db.transaction(function(t){t.g_ba("CREATE TABLE IF NOT EXISTS "+g.g_aV+" (id INTEGER PRIMARY KEY, key unique, value)",[],function(){e.g_aY=g,_()},function(g,_){n(_)})})});return g.g_a$=Y,a},g_bd:function(){return"function"==typeof openDatabase}(),iterate:function(_,g){var e=this,a=new I(function(n,g){e.ready().then(function(){var a=e.g_aY;a.db.transaction(function(e){e.g_ba("SELECT * FROM "+a.g_aV,[],function(t,e){for(var o=e.rows,r=o.length,d=0;d{d="Windows";const _=g.split(" ")[2];_&&("5.0"===_?e="2000":"5.1"===_?e="XP":"5.2"===_?e="XP":"6.0"===_?e="Vista":"6.1"===_?e="7":"6.2"===_?e="8":"6.3"===_?e="8.1":"10.0"===_?e="10":void 0)}),_("isOSX",r.g_cj,g=>{d="Mac OS X";const _=g.split(" ")[3];_&&(e=_.replace("_","."))}),_("isLinux",a.g_bV,()=>{d="Linux"}),_("isChromeOS",a.g_bW,()=>{d="Chrome OS"}),_("isAndroid",!a.g_bX&&r.g_cg,g=>{d="Android";const _=g.split(" ")[1];_&&(e=_)}),_("isTizen",r.g_ck,g=>{d="Tizen";const _=g.split(" ")[1];_&&(e=_)}),_("isIPhone",!a.g_bX&&r.g_cl,g=>{d="iOS";const _=g.split(" ")[2];_&&(e=_.replace("_","."))}),_("isIPad",!a.g_bX&&r.g_cm,g=>{d="iOS";const _=g.split(" ")[3];_&&(e=_.replace("_","."))}),_("isWindowsPhone",r.g_cn,g=>{d="Windows Phone";const _=g.split(" ")[2];_&&(e=_)}),_("isWindowsPhoneOS",r.g_co,g=>{d="Windows Phone";const _=g.split(" ")[3];_&&(e=_)}),_("isBlackberry",a.g_bZ,()=>{d="Blackberry",e="10",g="stock",f="webkit"}),_("isChrome",!a.g_b_&&!a.opera&&r.chrome,_=>{g="Chrome",f="Blink";const e=_.split("/")[1];e&&(s=e)}),_("isOpera",r.opera,_=>{g="Opera",f="Blink";const e=_.split("/")[1];e&&(s=e)}),_("isChromium",r.g_cb,_=>{g="Chromium",f="Blink";const e=_.split("/")[1];e&&(s=e)}),_("isFirefox",r.g_cp,_=>{g="Firefox",f="Gecko";const e=_.split("/")[1];e&&(s=e)}),_("isInternetExplorer",r.g_cq,_=>{g="Internet Explorer",f="Trident";const e=_.split(" ")[1];e&&(s=e)}),_("isTrident","Internet Explorer"!=g&&a.g_b$,()=>{f="Trident";const _=/rv:[0-9.]+/i.exec(t);if(_&&_.length){g="Internet Explorer";const e=_[0].split(":")[1];e&&(s=e)}}),_("isEdge",r.g_b_,_=>{g="Edge",f="Edge";const e=_.split("/")[1];e&&(s=e)}),_("isSafari",a.safari&&!a.g_ch&&!a.chrome&&!a.g_cb&&!a.g_cs&&!a.g_bZ,()=>{g="Safari",f="WebKit";const _=/version\/[0-9.]+/i.exec(t),e=/crios\/[0-9.]+/i.exec(t),n=/fxios\/[0-9.]+/i.exec(t);if(_&&_.length){const g=_[0].split("/")[1];g&&(s=g)}if(e&&e.length){g="Chrome for iOS";const _=e[0].split("/")[1];_&&(s=_)}if(n&&n.length){g="Firefox for iOS";const _=n[0].split("/")[1];_&&(s=_)}}),_("isSilk",r.g_cr,_=>{g="Silk";const e=_.split("/")[1];e&&(s=e)}),_("isCrosswalk",a.g_cc,()=>c="crosswalk"),_("isCordova",self.device&&(self.device.cordova||self.device.phonegap),()=>c="cordova"),_("isNWJS",r.g_cd,_=>{c="nwjs",g="NW.js",f="Chromium";const e=_.split("/")[1];e&&(s=e)}),_("isAmazonWebApp",a.g_ce,()=>c="webapp"),_("isHomeScreenWebApp","nwjs"!=c&&"undefined"!=typeof window&&(window.matchMedia&&window.matchMedia("(display-mode: standalone)").matches||navigator.standalone),()=>c="webapp"),_("isFalseSafari","Safari"==g&&("Android"==d||"Tizen"==d||"Blackberry"==d),()=>g="stock"),_("isAndroidWebview","Chrome"==g&&"browser"==c&&a.g_cf,()=>c="webview"),_("isFirefoxOS","Firefox"==g&&"(unknown)"==d,()=>d="Firefox OS"),_("isAndroidFallback","(unknown)"==d&&!a.g_bX&&a.g_cg,()=>d="Android"),_("isTridentFallback","(unknown)"==d&&a.g_b$,()=>f="Trident"),_("isWebkitFallback","(unknown)"==d&&a.g_ca,()=>f="WebKit"),_("is64Bit",(g=>g.test(t)||g.test(navigator.platform)||"x64"===navigator.cpuClass)(/x86_64|x86-64|win64|x64;|x64\)|x64_|amd64|wow64|ia64|arm64|arch64|sparc64|ppc64|irix64/i),()=>u="64-bit"),_("is32Bit",(g=>g.test(t)||g.test(navigator.platform)||"x86"===navigator.cpuClass)(/x86;|x86\)|i86|i386|i486|i586|i686|armv1|armv2|armv3|armv4|armv5|armv6|armv7/i),()=>u="32-bit"),_("is64BitFallback","(unknown)"==u&&"Mac OS X"==d&&10.7<=parseFloat(e),()=>u="64-bit"),_("is32BitFallback","(unknown)"==u&&"Windows"==d||"Android"==d&&5>parseFloat(e),()=>u="32-bit"),_("is32BitBrowser","32-bit"==u||/wow64/i.test(t),()=>i="32-bit"),_("is64BitBrowser",/win64/i.test(t),()=>i="64-bit"),_("isDesktop",(()=>"Windows"==d||"Mac OS X"==d||"Linux"==d||"Chrome OS"==d||"nwjs"==c)(),()=>l=!0),"Edge"==f&&"undefined"!=typeof Windows&&"undefined"!=typeof Windows.System&&(c="windows-store"),p="nwjs"==c||"windows-store"==c,g_bz.g_ct={g_cu:d,g_cv:e,g_cw:u,g_cx:g,g_cy:s,g_cz:parseFloat(s),g_cA:i,g_cB:f,g_cC:c,g_cD:l,g_cE:!l,g_cF:p,g_cG:!!(self.chrome&&self.chrome.runtime&&self.chrome.runtime.id),g_cH:"Mac OS X"==d||"iOS"==d}}{if(g_bz.g_cI={},g_bz.g_cI.g_cJ=(()=>{try{if("undefined"==typeof document)return!1;const g=document.createElement("div");if("undefined"==typeof g.animate)return!1;const _=g.animate([{opacity:"0"},{opacity:"1"}],1e3);return"undefined"!=typeof _.reverse}catch(g){return!1}})(),g_bz.g_cI.g_cK="undefined"!=typeof HTMLDialogElement,g_bz.g_cI.g_cL=!!self.g_cM,g_bz.g_cI.ImageBitmap="Safari"!==g_bz.g_ct.g_cx&&"Firefox"!==g_bz.g_ct.g_cx&&!!self.createImageBitmap,g_bz.g_cI.g_cN=!1,g_bz.g_cI.ImageBitmap)try{self.createImageBitmap(new ImageData(32,32),{g_cO:"none"}).then(()=>{g_bz.g_cI.g_cN=!0}).catch(()=>{g_bz.g_cI.g_cN=!1})}catch(g){g_bz.g_cI.g_cN=!1}g_bz.g_cI.g_cP=!!(navigator.clipboard&&navigator.clipboard.readText&&"Firefox"!==g_bz.g_ct.g_cx),g_bz.g_cI.g_cQ="undefined"!=typeof Proxy,g_bz.g_cI.g_cR=(()=>{if("undefined"==typeof document)return!1;const g=document.createElement("a");return"undefined"!=typeof g.download})(),g_bz.g_cI.g_cS=(()=>"undefined"!=typeof HTMLCanvasElement&&HTMLCanvasElement.prototype.toBlob)(),g_bz.g_cI.g_cT="undefined"!=typeof CSS&&CSS.supports("background","element(#test)"),g_bz.g_cI.g_cU="function"==typeof fetch,g_bz.g_cI.g_cV=!!(self.isSecureContext&&"Opera"!==g_bz.g_ct.g_cx&&navigator.storage&&navigator.storage.persist),g_bz.g_cI.g_cW=!!(self.isSecureContext&&navigator.storage&&navigator.storage.estimate),g_bz.g_cI.g_cX=()=>{if("undefined"==typeof document)return!1;const g=document.documentElement;return!!(g.requestFullscreen||g.msRequestFullscreen||g.mozRequestFullScreen||g.webkitRequestFullscreen)};const g=[{name:"A",value:12},{name:"B",value:13},{name:"C",value:13},{name:"D",value:13},{name:"E",value:13},{name:"F",value:13},{name:"G",value:14},{name:"H",value:12},{name:"I",value:12},{name:"J",value:13},{name:"K",value:14}],_=Math.ceil(496/g.length),n=(_+"").length,t=[];for(const i of g)for(let g=0;g<=_;g++)t.push({name:i.name+(g+"").padStart(n,"0"),value:i.value});t.sort((g,_)=>_.value-g.value);const a=t.reduce((g,_)=>{const e=_.name.slice(0,1),a=g.slice(-1);return a===e?g:g+e},"");g_bz.g_cI.g_cY="GKBCDEFJAHI"===a}{if(!String.prototype.trimStart){const g=/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]*/;String.prototype.trimStart=function(){return this.replace(g,"")}}if(!String.prototype.trimEnd){const g=/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]*$/;String.prototype.trimEnd=function(){return this.replace(g,"")}}if(Array.prototype.values||(Array.prototype.values=function*(){for(const g of this)yield g}),!Array.prototype.g_cZ){function g(_,e){return _.reduce((_,a)=>0navigator.webkitTemporaryStorage.queryUsageAndQuota((_,e)=>g({usage:_,quota:e}),_))}),"undefined"==typeof HTMLCollection||HTMLCollection.prototype[Symbol.iterator]||(HTMLCollection.prototype[Symbol.iterator]=function(){let g=0;return{next:()=>g>=this.length?{done:!0}:{value:this.item(g++),done:!1}}}),"undefined"==typeof NodeList||NodeList.prototype[Symbol.iterator]||(NodeList.prototype[Symbol.iterator]=function(){let g=0;return{next:()=>g>=this.length?{done:!0}:{value:this.item(g++),done:!1}}}),"undefined"==typeof DOMTokenList||DOMTokenList.prototype[Symbol.iterator]||(DOMTokenList.prototype[Symbol.iterator]=function(){let g=0;return{next:()=>g>=this.length?{done:!0}:{value:this.item(g++),done:!1}}}),("undefined"==typeof FileList||FileList.prototype[Symbol.iterator]||(FileList.prototype[Symbol.iterator]=function(){let g=0;return{next:()=>g>=this.length?{done:!0}:{value:this.item(g++),done:!1}}}),"undefined"==typeof TextEncoder&&(self.TextEncoder=class{constructor(){Object.defineProperty(this,"encoding",{value:"utf-8",writable:!1})}encode(_){for(var a=_.length,n=-1,t=new Uint8Array(3*a),i=0,o=0,r=0;r!==a;){if(i=_.charCodeAt(r),r+=1,55296<=i&&56319>=i){if(r===a){t[n+=1]=239,t[n+=1]=191,t[n+=1]=189;break}if(o=_.charCodeAt(r),!(56320<=o&&57343>=o)){t[n+=1]=239,t[n+=1]=191,t[n+=1]=189;continue}else if(i=1024*(i-55296)+o-56320+65536,r+=1,65535>>18,t[n+=1]=128|63&i>>>12,t[n+=1]=128|63&i>>>6,t[n+=1]=128|63&i;continue}}127>=i?t[n+=1]=0|i:2047>=i?(t[n+=1]=192|i>>>6,t[n+=1]=128|63&i):(t[n+=1]=224|i>>>12,t[n+=1]=128|63&i>>>6,t[n+=1]=128|63&i)}return new Uint8Array(t.buffer.slice(0,n+1))}toString(){return"[object TextEncoder]"}},TextEncoder[Symbol.toStringTag]="TextEncoder"),"undefined"==typeof TextDecoder)){function _(g){const _=g[Symbol.iterator]();return{next:()=>_.next(),[Symbol.iterator](){return this}}}function e(g){const _=g.next();if(_.done)throw new Error("unexpected end of input");if(0!=(128^192&_.value))throw new Error("invalid byte");return 63&_.value}const g=new Map;g.set("utf-8",(a,n)=>{let t;if(a.buffer)t=new Uint8Array(a.buffer,a.byteOffset,a.byteLength);else if(t instanceof ArrayBuffer)t=new Uint8Array(a);else throw new Error("Invalid parameter");const i=_(t),o=[];try{for(const g of i){let _;if(127>g)_=127&g;else if(223>g)_=(31&g)<<6|e(i);else if(239>g)_=(15&g)<<12|e(i)<<6|e(i);else if(247>g)_=(7&g)<<18|e(i)<<12|e(i)<<6|e(i);else throw new Error("Invalid character");o.push(String.fromCodePoint(_))}}catch(g){if(n)throw g;o.push("\uFFFD")}return o.join("")}),g.set("utf8",g.get("utf-8")),g.set("utf-16le",()=>{throw new Error("utf-16le decoder not implemented")}),self.TextDecoder=class{constructor(_="utf-8",e={}){const a=g.get(_);if(!a)throw new Error(`TextDecoder polyfill does not support "${_}"`);Object.defineProperty(this,"fatal",{value:!0===e.fatal,writable:!1}),Object.defineProperty(this,"_decoder",{value:a,writable:!1}),Object.defineProperty(this,"encoding",{value:_,writable:!1})}decode(g){return this._decoder(g,this.fatal)}toString(){return"[object TextDecoder]"}},TextDecoder[Symbol.toStringTag]="TextDecoder"}"undefined"==typeof self.isSecureContext&&(self.isSecureContext="https:"===location.protocol)}{function g(g){let _=g_bz.g_c$();console.error("Assertion failure: "+g+"\n\nStack trace:\n"+_)}self.assert=function(_,e){_||g(e)}}"use strict",g_bz.g_da=function(g){return"number"==typeof g},g_bz.g_db=function(g){return g_bz.g_da(g)&&isFinite(g)},g_bz.g_dc=function(g){if(!g_bz.g_da(g))throw new TypeError("expected number")},g_bz.g_dd=function(g){g_bz.g_de(g)},g_bz.g_df=function(g,_,e){if(!g_bz.g_da(g)||isNaN(g)||_>g||eg_bz.g_eB(g))),_=[...g].join(",");console.warn(`An object derived from DefendedBase was not protected with debugDefend(). This will disable some checks. See the coding guidelines! Possible affected class names: ${_}`),u.clear(),e.clear()}}function o(g){let _=new Set;for(let e in g)_.add(e);return _}function r(g,_){let n=o(_),t=d.get(g);if(t){let _=[];for(let g of t.values())n.has(g)?n.delete(g):_.push(g);g_bz.g_eC(_,[...n]),_.length&&console.warn(`[Defence] '${g_bz.g_eB(g)}' constructor creates inconsistent properties: ${_.join(", ")}`)}else d.set(g,n)}g_bz.g_c$=function(){return new Error().stack},g_bz.g_eD=function(){debugger},g_bz.cast=function(g,_){return g&&g instanceof _?g:null},g_bz.g_eB=function(g){return"undefined"==typeof g?"undefined":null===g?"null":"boolean"==typeof g?"":g_bz.g_da(g)?"":g_bz.g_dk(g)?"":g_bz.g_dB(g)?"":"symbol"==typeof g?"<"+g.toString()+">":g_bz.g_dI(g)?g.name&&"Function"!==g.name?g.name:"":"object"==typeof g?g.constructor&&g.constructor.name&&"Object"!==g.constructor.name?g.constructor.name:"":""},g_bz.g_eA=function(g){return null===g?"null":Array.isArray(g)?"array":typeof g};let u=new Map,e=new Map,g=new WeakMap,s=new WeakMap;g_bz.g_eE={};const i=new Set(["then","splice"]);g_bz.g_eE.get=function(g,_){return _ in g||"symbol"==typeof _||i.has(_)||n(`Accessed missing property '${_}' from defended object '${g_bz.g_eB(g)}', returning undefined`),s.has(g)&&"symbol"!=typeof _&&!i.has(_)&&n(`Accessed property '${_}' on a released object '${g_bz.g_eB(g)}'\nObject was originally released at: ${s.get(g)})\nCall stack at access: `),g[_]},g_bz.g_eE.set=function(g,a,t){return a in g||u.has(g)||n(`Set non-existent property '${a}' to '${t}' on defended object '${g_bz.g_eB(g)}'`),_(g[a],t)||u.has(g)||n(`Set '${g_bz.g_eA(g[a])}' property '${a}' to type '${g_bz.g_eA(t)}' on defended object '${g_bz.g_eB(g)}'`),s.has(g)&&n(`Set property '${a}' on a released object '${g_bz.g_eB(g)}'\nObject was originally released at: ${s.get(g)})\nCall stack at access: `),g[a]=t,!0},g_bz.g_eE.g_eF=function(g,_){throw new ReferenceError(`Cannot delete property '${_}' from defended object '${g_bz.g_eB(g)}'`)},g_bz.g_eE.defineProperty=function(g,_){throw new ReferenceError(`Cannot define property '${_}' on defended object '${g_bz.g_eB(g)}'`)},g_bz.g_eE.enumerate=function(g){throw new ReferenceError(`Cannot enumerate defended object '${g_bz.g_eB(g)}'`)};let c=-1;g_bz.g_eG=class{constructor(){if(g_bz.g_bI&&g_bz.g_cI.g_cQ){let _=new.target,a=Object.create(_.prototype),n=new Proxy(a,g_bz.g_eE);return u.set(a,n),e.set(n,a),g.set(n,a),-1===c&&(c=requestAnimationFrame(t)),n}}},g_bz.g_eH=function(g){if(g_bz.g_bI&&g_bz.g_cI.g_cQ&&g instanceof g_bz.g_eG){if(!e.has(g))return g;let _=e.get(g);return e.delete(g),u.delete(_),g}return g_bz.g_bH?Object.seal(g):g},g_bz.g_eI=function(g,..._){let a;try{a=new g(..._)}catch(g){throw e.clear(),u.clear(),g}return g_bz.g_bI&&r(g,a),g_bz.g_eH(a)},g_bz.g_eJ=function(_){let e=g.get(_);e&&s.set(e,g_bz.g_c$())},g_bz.g_eK=function(_){let e=g.get(_);return!!e&&!!s.get(e)};let d=new Map}{function g(g){return 0===g&&0>1/g}const _=2*Math.PI,n=Math.PI/180,t=180/Math.PI;g_bz.wrap=function(g,_,e){var n=Math.floor;if(g=n(g),_=n(_),e=n(e),g<_){let a=e-(_-g)%(e-_);return a===e?0:a}return _+(g-_)%(e-_)},g_bz.g_eL=function(g,_,a,n,t){return(g-_)*(t-n)/(a-_)+n},g_bz.normalize=function(g,_,e){return(g-_)/(e-_)},g_bz.g_eM=function(g,_,e){return g<_?_:g>e?e:g},g_bz.g_eN=function(g){return g%=_,0>g&&(g+=_),g},g_bz.g_eO=function(g){return g*n},g_bz.g_eP=function(g){return g*t},g_bz.g_eQ=function(g,_,e,a){return Math.hypot(e-g,a-_)},g_bz.g_eR=function(g,_,a,n){const t=a-g,e=n-_;return t*t+e*e},g_bz.g_eS=function(g,_,e,a){return Math.atan2(a-_,e-g)},g_bz.g_eT=function(_,a){var n=Math.cos,t=Math.sin;if(_===a)return 0;let o=t(_),e=n(_),r=t(a),g=n(a),d=o*r+e*g;return 1<=d?0:-1>=d?Math.PI:Math.acos(d)},g_bz.g_eU=function(_,a,n){var t=Math.cos,o=Math.sin;let e=o(_),r=t(_),g=o(a),d=t(a);return Math.acos(e*g+r*d)>n?0=e*o-i*g},g_bz.g_eW=function(g,_,e){let a=g_bz.g_eT(g,_);return g_bz.g_eV(_,g)?g_bz.g_eN(g+a*e):g_bz.g_eN(g-a*e)},g_bz.g_X=function(g,_,e){return g+e*(_-g)},g_bz.g_eX=function(g,_,e){return g===_?0:(e-g)/(_-g)},g_bz.g_eY=function(g,_,e,a,n){return g_bz.g_X(a,n,g_bz.g_eX(g,_,e))},g_bz.g_eZ=function(g,_,e,a){return g_bz.g_X(g_bz.g_X(g,_,a),g_bz.g_X(_,e,a),a)},g_bz.g_e_=function(g,_,e,a,n){return g_bz.g_X(g_bz.g_eZ(g,_,e,n),g_bz.g_eZ(_,e,a,n),n)},g_bz.g_e$=function(g,_,e){return(g+_+(g-_)*Math.cos(e*Math.PI))/2},g_bz.g_fa=function(g){return 0_;_<<=1)g|=g>>_;return g+1},g_bz.g_fc=function(g,_){return Math.round(g*_)/_},g_bz.g_fd=function(g,_){return Math.floor(g*_)/_},g_bz.g_fe=function(g){return Math.round(1e6*g)/1e6},g_bz.toFixed=function(g,_){let e=g.toFixed(_),a=e.length-1;for(;0<=a&&"0"===e.charAt(a);--a);return 0<=a&&"."===e.charAt(a)&&--a,0>a?e:e.substr(0,a+1)},g_bz.g_ff=function(g,_,e){return g_bz.g_eM(g,0,255)|g_bz.g_eM(_,0,255)<<8|g_bz.g_eM(e,0,255)<<16};const i=1024;g_bz.g_fg=function(g,_,e,n){var t=Math.floor;return g=g_bz.g_eM(t(1024*g),-8192,8191),_=g_bz.g_eM(t(1024*_),-8192,8191),e=g_bz.g_eM(t(1024*e),-8192,8191),n=g_bz.g_eM(t(1023*n),0,1023),0>g&&(g+=16384),0>_&&(_+=16384),0>e&&(e+=16384),-(16384*(16384*g)*i+16384*_*i+e*i+n)},g_bz.g_fh=function(g,_,e){return g_bz.g_fg(g,_,e,1)},g_bz.g_fi=function(g){if(0<=g)return(255&g)/255;else{let _=Math.floor(-g/274877906944);return 8191<_&&(_-=16384),_/1024}},g_bz.g_fj=function(g){if(0<=g)return((65280&g)>>8)/255;else{let _=Math.floor(-g%274877906944/16777216);return 8191<_&&(_-=16384),_/1024}},g_bz.g_fk=function(g){if(0<=g)return((16711680&g)>>16)/255;else{let _=Math.floor(-g%16777216/i);return 8191<_&&(_-=16384),_/1024}},g_bz.g_fl=function(_){if(g(_))return 0;if(0<=_)return 1;else{const g=Math.floor(-_%i);return g/1023}},g_bz.g_fm=function(g,_){var e=Math.floor;for(g=e(g),_=e(_);0!==_;){let e=_;_=g%_,g=e}return g};const e=[[3,2],[4,3],[5,4],[5,3],[6,5],[14,9],[16,9],[16,10],[21,9]];g_bz.g_fn=function(g,_){var n=Math.abs,t=Math.floor;if(g=t(g),_=t(_),g===_)return[1,1];for(let a of e){let t=g/a[0]*a[1];if(1>n(_-t))return a.slice(0);if(t=g/a[1]*a[0],1>n(_-t))return[a[1],a[0]]}let i=g_bz.g_fm(g,_);return[g/i,_/i]},g_bz.g_fo=function(_,a,d,c,e,f,g,h){var i=Math.abs;let M=0,b=0,T=0,E=0,N=0,I=0,z=0,C=0;if(_N)return!1;if(az)return!1;let O=e-_+g-d,s=f-a+h-c,t=d-_,u=c-a,v=g-e,w=h-f,L=i(u*v-w*t);return!(i(v*s-w*O)>L)&&i(t*s-u*O)<=L},g_bz.g_fp=function(_,a,d,c,e,f,g,h,i,M,b,l){var m=Math.abs;let n=0,T=0,E=0,N=0;if(in)return!1;if(ME)return!1;let I=i-_+b-d,s=M-a+l-c,t=d-_,u=c-a,z=b-i,C=l-M,O=m(u*z-C*t);return!(m(z*s-C*I)>O)&&m(t*s-u*I)<=O},g_bz.g_fq=function(_,a,t,r,d){let e=0,u=0,s=0,c=0;__?"":g.substr(_)},g_bz.g_fH=function(g){let _=g.lastIndexOf(".");return 1>_?g:g.substr(0,_)},g_bz.g_fI=function(g){return g.replace(/\\/g,"/")},g_bz.g_fJ=function(_){_=g_bz.g_fI(_);let n=/^\w\:\//.exec(_);n?(n=n[0],_=_.slice(3)):n="";const t=_.lastIndexOf("/")+1;let i="",o=_,r="",u;0!=t&&(i=_.slice(0,t-1),o=_.slice(t)),u=o;const s=o.lastIndexOf(".");return 0{self.setTimeout(e,g,_)})},g_bz.g_fN=function(g){try{g()}catch(g){g_bz.g_bH&&console.warn("Swallowed exception: ",g)}},g_bz.noop=function(){},g_bz.g_d$=function(g,_){return"string"==typeof g&&"string"==typeof _&&g.length===_.length&&(g===_||g.toLowerCase()===_.toLowerCase())},g_bz.g_fO=function(g,_){const a=g.map((g,_)=>[g,_]);a.sort((g,e)=>{const a=_(g[0],e[0]);return 0===a?g[1]-e[1]:a});for(let n=0,t=g.length;na&&g_bz.g_fT(g,_,e)},g_bz.g_fV=function(g,_){g_bz.g_fR(g),g_bz.g_eC(g,_)},g_bz.g_eC=function(g,_){for(let e=0,a=_.length;e_||_>=g.length)){let e=g.length-1;for(let a=_;ae:5==_&&g>=e},g_bz.g_gh=function(g){for(let _ in g)if(g.hasOwnProperty(_))return!0;return!1},g_bz.g_gi=function(_,a){return _.length?new Promise((n,t)=>{const o=[];let e=0,i=!1;for(let g=0,r=_.length;g{i||(o[g]=t,++e,e===_.length?n(o):a(e,_.length))}).catch(g=>{i=!0,t(g)})}):Promise.resolve([])};let e=[];g_bz.g_gj=function(g){e.push(g)},g_bz.g_gk=function(){let g=0;for(let _ of e){let e=_();g+=e}return Math.floor(g)}}"use strict",g_bz.g_gl=function(g){return /^(?:[a-z]+:)?\/\//.test(g)||"data:"===g.substr(0,5)||"blob:"===g.substr(0,5)},g_bz.g_gm=function(g){return!g_bz.g_gl(g)},g_bz.g_gn=function(g){if(!g.ok)throw new Error(`fetch '${g.url}' response returned ${g.status} ${g.statusText}`)},g_bz.g_go=function(g,_){return fetch(g,_).then(g=>(g_bz.g_gn(g),g))},g_bz.g_gp=function(g){return g_bz.g_go(g).then(g=>g.text())},g_bz.g_gq=function(g){return g_bz.g_go(g).then(g=>g.json())},g_bz.g_gr=function(g){return g_bz.g_go(g).then(g=>g.blob())},g_bz.g_gs=function(g){return g_bz.g_go(g).then(g=>g.arrayBuffer())},g_bz.g_gt=function(g){return new Promise((_,e)=>{const a=new Image;a.onload=()=>_(a),a.onerror=g=>e(g),a.src=g})},g_bz.g_gu=function(g){return new Promise((_,e)=>{const a=new FileReader;a.onload=()=>_(a.result),a.onerror=()=>e(a.error),a.readAsArrayBuffer(g)})},g_bz.g_gv=function(g){return new Promise((_,e)=>{const a=new FileReader;a.onload=()=>_(a.result),a.onerror=()=>e(a.error),a.readAsText(g)})},g_bz.g_gw=function(g){return g_bz.g_gv(g).then(g=>JSON.parse(g))},g_bz.g_gx=async function(g,_){let e=URL.createObjectURL(g);try{const g=await g_bz.g_gt(e);return URL.revokeObjectURL(e),e="",_&&"function"==typeof g.decode&&(await g.decode()),g}finally{e&&URL.revokeObjectURL(e)}},g_bz.g_gy=function(g,_){if("undefined"!=typeof document&&"function"==typeof document.createElement){const e=document.createElement("canvas");return e.width=g,e.height=_,e}return new OffscreenCanvas(g,_)},g_bz.g_cS=function(g,_,e){return"number"!=typeof e&&(e=1),_=_||"image/png",e=g_bz.g_eM(e,0,1),g.toBlob?new Promise(a=>g.toBlob(a,_,e)):g.convertToBlob?g.convertToBlob({type:_,quality:e}):g_bz.g_gz(()=>g_bz.g_gA(g,_,e))},g_bz.g_gA=function(g,_,e){return"number"!=typeof e&&(e=1),_=_||"image/png",e=g_bz.g_eM(e,0,1),g_bz.g_gB(g.toDataURL(_,e))},g_bz.g_gB=function(g){const _=g_bz.g_gC(g);return g_bz.g_gD(_.data,_.g_gE)},g_bz.g_gC=function(_){if("data:"!==_.substr(0,5))throw new URIError("expected data: uri");let a=_.indexOf(",");if(0>a)throw new URIError("expected comma in data: uri");let n=_.substring(5,a),t=_.substring(a+1),e=n.split(";"),o=e[0]||"",g=e[1],r=e[2],i;return i="base64"===g||"base64"===r?atob(t):decodeURIComponent(t),{g_gE:o,data:i}},g_bz.g_gD=function(_,a){let n=_.length,e=n>>2,t=new Uint8Array(n),g=new Uint32Array(t.buffer,0,e),i,o;for(i=0,o=0;ig_bz.g_gF(g,_,n));if(g_bz.g_cI.ImageBitmap)return createImageBitmap(g).then(g=>g_bz.g_gF(g,_,n));else{const a=g_bz.g_gy(g.width,g.height),t=a.getContext("2d");return t.putImageData(g,0,0),g_bz.g_cS(a,_,n)}},g_bz.g_gI=function(g,_){g.clear();for(const e of _)g.add(e)},g_bz.g_gJ=function(g){const _=Object.create(null);for(const[e,a]of g.entries())_[e]=a;return _},g_bz.g_gK=function(g,_){_.clear();for(const[e,a]of Object.entries(g))_.set(e,a)},g_bz.g_gL=function g(_){if("object"==typeof _&&null!==_){if(_ instanceof Set)return{_c3type_:"set",data:[..._].map(_=>g(_))};if(_ instanceof Map)return{_c3type_:"map",data:[..._].map(_=>[_[0],g(_[1])])};else{const a=Object.create(null);for(const[n,t]of Object.entries(_))a[n]=g(t);return a}}return _},g_bz.g_gM=function g(_){if("object"==typeof _&null!==_){if("set"===_._c3type_)return new Set(_.data.map(_=>g(_)));if("map"===_._c3type_)return new Map(_.data.map(_=>[_[0],g(_[1])]));else{const a=Object.create(null);for(const[n,t]of Object.entries(_))a[n]=g(t);return a}}return _},g_bz.g_gN=function(g){let _="",e=!1;for(const a of g)"-"===a?e=!0:e?(_+=a.toUpperCase(),e=!1):_+=a;return _},g_bz.g_gO=function(g){return"object"==typeof g&&"function"==typeof g.next},"use strict";{function g(g){return 0===g.length?"00":1===g.length?"0"+g:g}function _(g,_,e){return 0>e&&(e+=1),1_.length)return!1;const n=parseInt(_[0].trim(),10)/255,t=parseInt(_[1].trim(),10)/255,i=parseInt(_[2].trim(),10)/255;return isFinite(n)&&this.g_gX(n),isFinite(t)&&this.g_gY(t),isFinite(i)&&this.g_gZ(i),this.g_g_(1),!0}g_hu(g){if("string"!=typeof g)return!1;g=g.replace(/^rgb\(|\)|%/,"");const _=g.split(",");if(3>_.length)return!1;const n=parseInt(_[0].trim(),10)/100,t=parseInt(_[1].trim(),10)/100,i=parseInt(_[2].trim(),10)/100;return isFinite(n)&&this.g_gX(n),isFinite(t)&&this.g_gY(t),isFinite(i)&&this.g_gZ(i),this.g_g_(1),!0}g_hv(g){if("string"!=typeof g)return!1;g=g.replace(/^rgba\(|\)|%/,"");const _=g.split(",");if(4>_.length)return!1;const n=parseInt(_[0].trim(),10)/255,t=parseInt(_[1].trim(),10)/255,i=parseInt(_[2].trim(),10)/255,e=parseFloat(_[3].trim());return isFinite(n)&&this.g_gX(n),isFinite(t)&&this.g_gY(t),isFinite(i)&&this.g_gZ(i),isFinite(e)&&this.g_g_(e),!0}g_hw(g){if("string"!=typeof g)return!1;g=g.replace(/^rgba\(|\)|%/,"");const _=g.split(",");if(4>_.length)return!1;const n=parseInt(_[0].trim(),10)/100,t=parseInt(_[1].trim(),10)/100,i=parseInt(_[2].trim(),10)/100,e=parseFloat(_[3].trim());return isFinite(n)&&this.g_gX(n),isFinite(t)&&this.g_gY(t),isFinite(i)&&this.g_gZ(i),isFinite(e)&&this.g_g_(e),!0}g_hx(g){if("string"!=typeof g)return!1;if(g=g.replace(/\s+/,""),g.includes(",")){if(g.startsWith("rgb("))return g.includes("%")?this.g_hu(g):this.g_ht(g);if(g.startsWith("rgba("))return g.includes("%")?this.g_hw(g):this.g_hv(g);if(g.startsWith("hsl(")||g.startsWith("hsla("))return this.g_hy(g);else{const _=g.split(",");return g.includes("%")?3===_.length?this.g_hu(g):4===_.length&&this.g_hw(g):3===_.length?this.g_ht(g):4===_.length&&this.g_hv(g)}}else return this.g_hq(g)}toJSON(){return[this.g_gQ,this.g_gR,this.g_gS,this.g_gT]}g_hz(n,t,o,r){let u,s,l;if(n%=360,t=g_bz.g_eM(t,0,100),o=g_bz.g_eM(o,0,100),r=g_bz.g_eM(r,0,1),n/=360,t/=100,o/=100,0===t)u=s=l=o;else{const g=.5>o?o*(1+t):o+t-o*t,e=2*o-g;u=_(e,g,n+1/3),s=_(e,g,n),l=_(e,g,n-1/3)}return this.g_gX(u),this.g_gY(s),this.g_gZ(l),this.g_g_(r),this}g_hy(g){const _=g.replace(/ |hsl|hsla|\(|\)|;/gi,""),a=n.exec(_),e=t.exec(_);return a&&4===a.length?(this.g_hz(+a[1],+a[2],+a[3],1),!0):!!(e&&5===e.length)&&(this.g_hz(+a[1],+a[2],+a[3],+a[4]),!0)}g_hA(){var _=Math.round;const n=this.g_gQ,e=this.g_gR,t=this.g_gS,g=this.g_gT,o=Math.max(n,e,t),a=Math.min(n,e,t);let i=(o+a)/2,r,d;if(o===a)r=d=0;else{const g=o-a;d=.5g.length||(this.g_gQ=g[0],this.g_gR=g[1],this.g_gS=g[2],this.g_gT=4<=g.length?g[3]:1)}set r(g){this.g_gX(g)}get r(){return this.g_ha()}set g_hC(g){this.g_gY(g)}get g_hC(){return this.g_hb()}set b(g){this.g_gZ(g)}get b(){return this.g_hc()}set a(g){this.g_g_(g)}get a(){return this.g_hd()}g_hD(g,_){switch(g){case 0:this.g_gX(_);break;case 1:this.g_gY(_);break;case 2:this.g_gZ(_);break;case 3:this.g_g_(_);break;default:throw new RangeError("invalid color index");}}g_hE(g){switch(g){case 0:return this.g_ha();case 1:return this.g_hb();case 2:return this.g_hc();case 3:return this.g_hd();default:throw new RangeError("invalid color index");}}static g_hF(g,_){var a=Math.min,n=Math.max;const t=new g_bz.g_gP;return t.g_gX(n(g.g_gQ,_.g_gQ)-a(g.g_gQ,_.g_gQ)),t.g_gY(n(g.g_gR,_.g_gR)-a(g.g_gR,_.g_gR)),t.g_gZ(n(g.g_gS,_.g_gS)-a(g.g_gS,_.g_gS)),t.g_g_(n(g.g_gT,_.g_gT)-a(g.g_gT,_.g_gT)),t}},g_bz.g_gP.g_hG=Object.freeze(g_bz.g_eI(g_bz.g_gP,1,1,1,1)),g_bz.g_gP.g_hH=Object.freeze(g_bz.g_eI(g_bz.g_gP,0,0,0,1)),g_bz.g_gP.g_hI=Object.freeze(g_bz.g_eI(g_bz.g_gP,0,0,0,0))}"use strict",g_bz.g_hJ=class{constructor(g,_){this.g_hK=0,this.g_hL=0,g instanceof g_bz.g_hJ?this.g_r(g):this.set(g||0,_||0)}set(g,_){this.g_hK=+g,this.g_hL=+_}g_r(g){this.g_hK=g.g_hK,this.g_hL=g.g_hL}g_n(g){return this.g_hK===g.g_hK&&this.g_hL===g.g_hL}g_hM(g){this.g_hK=+g}g_hN(){return this.g_hK}g_hO(g){this.g_hL=+g}g_hP(){return this.g_hL}toArray(){return[this.g_hK,this.g_hL]}g_he(){return new Float64Array(this.toArray())}g_hf(g,_){g[_++]=this.g_hK,g[_]=this.g_hL}offset(g,_){this.g_hK+=+g,this.g_hL+=+_}scale(g,_){this.g_hK*=g,this.g_hL*=_}round(){var g=Math.round;this.g_hK=g(this.g_hK),this.g_hL=g(this.g_hL)}floor(){var g=Math.floor;this.g_hK=g(this.g_hK),this.g_hL=g(this.g_hL)}ceil(){var g=Math.ceil;this.g_hK=g(this.g_hK),this.g_hL=g(this.g_hL)}angle(){return g_bz.g_eS(0,0,this.g_hK,this.g_hL)}g_hQ(){return this.g_hK*this.g_hK+this.g_hL*this.g_hL}length(){return Math.sqrt(this.g_hQ())}g_hR(g,_){const e=this.g_hK*_-this.g_hL*g;this.g_hL=this.g_hL*_+this.g_hK*g,this.g_hK=e}rotate(g){0===g||this.g_hR(Math.sin(g),Math.cos(g))}g_hS(g,_,e){0===g||_===this.g_hK&&e===this.g_hL||(this.g_hK-=_,this.g_hL-=e,this.g_hR(Math.sin(g),Math.cos(g)),this.g_hK+=+_,this.g_hL+=+e)}move(g,_){0===_||(this.g_hK+=Math.cos(g)*_,this.g_hL+=Math.sin(g)*_)}normalize(){const g=this.length();0!==g&&1!==g&&(this.g_hK/=g,this.g_hL/=g)}g_eM(g,_){this.g_hK=g_bz.g_eM(this.g_hK,g,_),this.g_hL=g_bz.g_eM(this.g_hL,g,_)}},"use strict",g_bz.Rect=class{constructor(g,_,e,a){this.g_hT=0,this.g_hU=0,this.g_hV=0,this.g_hW=0,g instanceof g_bz.Rect?this.g_r(g):this.set(g||0,_||0,e||0,a||0)}set(g,_,e,a){this.g_hT=+g,this.g_hU=+_,this.g_hV=+e,this.g_hW=+a}g_hX(g,_,e,n){g=+g,_=+_,this.g_hT=g,this.g_hU=_,this.g_hV=g+ +e,this.g_hW=_+ +n}g_r(g){this.g_hT=+g.g_hT,this.g_hU=+g.g_hU,this.g_hV=+g.g_hV,this.g_hW=+g.g_hW}clone(){return new g_bz.Rect(this.g_hT,this.g_hU,this.g_hV,this.g_hW)}static g_hY(g,_){var a=Math.max,n=Math.min;const t=new g_bz.Rect;return t.g_hZ(n(g.g_hT,_.g_hT)),t.g_h_(n(g.g_hU,_.g_hU)),t.g_h$(a(g.g_hV,_.g_hV)),t.g_ia(a(g.g_hW,_.g_hW)),t}static g_ib(g){return new g_bz.Rect(g.left,g.top,g.right,g.bottom)}g_n(g){return this.g_hT===g.g_hT&&this.g_hU===g.g_hU&&this.g_hV===g.g_hV&&this.g_hW===g.g_hW}g_hZ(g){this.g_hT=+g}g_ic(){return this.g_hT}g_h_(g){this.g_hU=+g}g_id(){return this.g_hU}g_h$(g){this.g_hV=+g}g_ie(){return this.g_hV}g_ia(g){this.g_hW=+g}g_if(){return this.g_hW}toArray(){return[this.g_hT,this.g_hU,this.g_hV,this.g_hW]}g_he(){return new Float64Array(this.toArray())}g_hf(g,_){g[_++]=this.g_hT,g[_++]=this.g_hU,g[_++]=this.g_hV,g[_]=this.g_hW}g_ig(g,_){g[_++]=this.g_hT,g[_++]=this.g_hU,g[_++]=this.g_hV,g[_++]=this.g_hU,g[_++]=this.g_hV,g[_++]=this.g_hW,g[_++]=this.g_hT,g[_]=this.g_hW}width(){return this.g_hV-this.g_hT}height(){return this.g_hW-this.g_hU}g_ih(){return(this.g_hT+this.g_hV)/2}g_ii(){return(this.g_hU+this.g_hW)/2}offset(g,_){this.g_hT+=+g,this.g_hU+=+_,this.g_hV+=+g,this.g_hW+=+_}offsetLeft(g){this.g_hT+=+g}offsetTop(g){this.g_hU+=+g}g_ij(g){this.g_hV+=+g}g_ik(g){this.g_hW+=+g}g_il(g){if("x"!==g)throw new Error("invalid axis, only 'x' supported");this.g_hW=this.g_hUa&&(this.g_hV=+a),this.g_hW>n&&(this.g_hW=+n)}g_iv(g,_,a,n){this.g_hT_&&(this.g_hU=+_),this.g_hV>a&&(this.g_hV=+a),this.g_hWthis.g_hV&&this.g_iq(),this.g_hU>this.g_hW&&this.g_ir()}g_iw(g){return!(g.g_hVthis.g_hV||g.g_hU>this.g_hW)}g_ix(g,_,e){return!(g.g_hV+_this.g_hV||g.g_hU+e>this.g_hW)}g_iy(g,_){return g>=this.g_hT&&g<=this.g_hV&&_>=this.g_hU&&_<=this.g_hW}g_iz(g){return g.g_hT>=this.g_hT&&g.g_hU>=this.g_hU&&g.g_hV<=this.g_hV&&g.g_hW<=this.g_hW}g_iA(g){g.g_hTthis.g_hV&&(this.g_hV=+g.g_hV),g.g_hW>this.g_hW&&(this.g_hW=+g.g_hW)}g_iB(g){this.g_hT=g_bz.g_X(g.g_hT,g.g_hV,this.g_hT),this.g_hU=g_bz.g_X(g.g_hU,g.g_hW,this.g_hU),this.g_hV=g_bz.g_X(g.g_hT,g.g_hV,this.g_hV),this.g_hW=g_bz.g_X(g.g_hU,g.g_hW,this.g_hW)}},"use strict";{function g(n,g,a,t){nt?g:t):(_=na?g:a):at?n:t):(_=ga?n:a)}let _=0,e=0;g_bz.g_iC=class{constructor(_,a,n,t,i,e,o,g){this.g_iD=0,this.g_iE=0,this.g_iF=0,this.g_iG=0,this.g_iH=0,this.g_iI=0,this.g_iJ=0,this.g_iK=0,_ instanceof g_bz.g_iC?this.g_r(_):this.set(_||0,a||0,n||0,t||0,i||0,e||0,o||0,g||0)}set(_,a,n,t,i,e,o,g){this.g_iD=+_,this.g_iE=+a,this.g_iF=+n,this.g_iG=+t,this.g_iH=+i,this.g_iI=+e,this.g_iJ=+o,this.g_iK=+g}g_iL(g,_,e,a){this.set(g,_,e,_,e,a,g,a)}g_r(g){this.g_iD=g.g_iD,this.g_iE=g.g_iE,this.g_iF=g.g_iF,this.g_iG=g.g_iG,this.g_iH=g.g_iH,this.g_iI=g.g_iI,this.g_iJ=g.g_iJ,this.g_iK=g.g_iK}g_n(g){return this.g_iD===g.g_iD&&this.g_iE===g.g_iE&&this.g_iF===g.g_iF&&this.g_iG===g.g_iG&&this.g_iH===g.g_iH&&this.g_iI===g.g_iI&&this.g_iJ===g.g_iJ&&this.g_iK===g.g_iK}g_iM(g){this.g_iD=+g}g_fr(){return this.g_iD}g_iN(g){this.g_iE=+g}g_fs(){return this.g_iE}g_iO(g){this.g_iF=+g}g_ft(){return this.g_iF}g_iP(g){this.g_iG=+g}g_fu(){return this.g_iG}g_iQ(g){this.g_iH=+g}g_fv(){return this.g_iH}g_iR(g){this.g_iI=+g}g_fw(){return this.g_iI}g_iS(g){this.g_iJ=+g}g_fx(){return this.g_iJ}g_iT(g){this.g_iK=+g}g_fy(){return this.g_iK}toArray(){return[this.g_iD,this.g_iE,this.g_iF,this.g_iG,this.g_iH,this.g_iI,this.g_iJ,this.g_iK]}g_he(){return new Float64Array(this.toArray())}g_hf(g,_){g[_++]=this.g_iD,g[_++]=this.g_iE,g[_++]=this.g_iF,g[_++]=this.g_iG,g[_++]=this.g_iH,g[_++]=this.g_iI,g[_++]=this.g_iJ,g[_]=this.g_iK}g_iU(g,_,e){g[_++]=this.g_iD,g[_++]=this.g_iE,g[_++]=e,g[_++]=this.g_iF,g[_++]=this.g_iG,g[_++]=e,g[_++]=this.g_iH,g[_++]=this.g_iI,g[_++]=e,g[_++]=this.g_iJ,g[_++]=this.g_iK,g[_]=e}offset(g,_){this.g_iD+=+g,this.g_iE+=+_,this.g_iF+=+g,this.g_iG+=+_,this.g_iH+=+g,this.g_iI+=+_,this.g_iJ+=+g,this.g_iK+=+_}round(){var g=Math.round;this.g_iD=g(this.g_iD),this.g_iE=g(this.g_iE),this.g_iF=g(this.g_iF),this.g_iG=g(this.g_iG),this.g_iH=g(this.g_iH),this.g_iI=g(this.g_iI),this.g_iJ=g(this.g_iJ),this.g_iK=g(this.g_iK)}floor(){var g=Math.floor;this.g_iD=g(this.g_iD),this.g_iE=g(this.g_iE),this.g_iF=g(this.g_iF),this.g_iG=g(this.g_iG),this.g_iH=g(this.g_iH),this.g_iI=g(this.g_iI),this.g_iJ=g(this.g_iJ),this.g_iK=g(this.g_iK)}ceil(){var g=Math.ceil;this.g_iD=g(this.g_iD),this.g_iE=g(this.g_iE),this.g_iF=g(this.g_iF),this.g_iG=g(this.g_iG),this.g_iH=g(this.g_iH),this.g_iI=g(this.g_iI),this.g_iJ=g(this.g_iJ),this.g_iK=g(this.g_iK)}g_iV(g){this.g_iD=g.g_hT,this.g_iE=g.g_hU,this.g_iF=g.g_hV,this.g_iG=g.g_hU,this.g_iH=g.g_hV,this.g_iI=g.g_hW,this.g_iJ=g.g_hT,this.g_iK=g.g_hW}g_iW(g,_){0===_?this.g_iV(g):this.g_iX(g,Math.sin(_),Math.cos(_))}g_iX(_,a,n){const t=_.g_hT*a,o=_.g_hU*a,e=_.g_hV*a,r=_.g_hW*a,g=_.g_hT*n,d=_.g_hU*n,i=_.g_hV*n,u=_.g_hW*n;this.g_iD=g-o,this.g_iE=d+t,this.g_iF=i-o,this.g_iG=d+e,this.g_iH=i-r,this.g_iI=u+e,this.g_iJ=g-r,this.g_iK=u+t}g_iY(a){g(this.g_iD,this.g_iF,this.g_iH,this.g_iJ),a.g_hT=_,a.g_hV=e,g(this.g_iE,this.g_iG,this.g_iI,this.g_iK),a.g_hU=_,a.g_hW=e}g_iy(_,a){let t=this.g_iF-this.g_iD,r=this.g_iG-this.g_iE;const u=this.g_iH-this.g_iD,e=this.g_iI-this.g_iE,s=_-this.g_iD,g=a-this.g_iE;let f=t*t+r*r,h=t*u+r*e,M=t*s+r*g;const b=u*u+e*e,l=u*s+e*g;let m=1/(f*b-h*h),T=(b*M-h*l)*m,E=(f*l-h*M)*m;return!!(0<=T&&0T+E)||(t=this.g_iJ-this.g_iD,r=this.g_iK-this.g_iE,f=t*t+r*r,h=t*u+r*e,M=t*s+r*g,m=1/(f*b-h*h),T=(b*M-h*l)*m,E=(f*l-h*M)*m,0<=T&&0T+E)}g_ih(){return(this.g_iD+this.g_iF+this.g_iH+this.g_iJ)/4}g_ii(){return(this.g_iE+this.g_iG+this.g_iI+this.g_iK)/4}g_iZ(g,_,e,a){return!!(this.g_iy(g,_)||this.g_iy(e,a))||g_bz.g_fq(g,_,e,a,this)}g_i_(_){let a=_.g_ih(),n=_.g_ii();if(this.g_iy(a,n))return!0;if(a=this.g_ih(),n=this.g_ii(),_.g_iy(a,n))return!0;const t=this.g_iD,o=this.g_iE,e=this.g_iF,r=this.g_iG,g=this.g_iH,d=this.g_iI,i=this.g_iJ,u=this.g_iK;return g_bz.g_fq(t,o,e,r,_)||g_bz.g_fq(e,r,g,d,_)||g_bz.g_fq(g,d,i,u,_)||g_bz.g_fq(i,u,t,o,_)}g_i$(){this.g_ja(0,2),this.g_ja(1,3),this.g_ja(6,4),this.g_ja(7,5)}g_jb(){this.g_ja(0,6),this.g_ja(1,7),this.g_ja(2,4),this.g_ja(3,5)}g_jc(){this.g_ja(2,6),this.g_ja(3,7)}g_ja(g,_){const e=this.g_jd(g);this.g_je(g,this.g_jd(_)),this.g_je(_,e)}g_jd(g){switch(g){case 0:return this.g_iD;case 1:return this.g_iE;case 2:return this.g_iF;case 3:return this.g_iG;case 4:return this.g_iH;case 5:return this.g_iI;case 6:return this.g_iJ;case 7:return this.g_iK;default:throw new RangeError("invalid quad point index");}}g_je(g,_){switch(_=+_,g){case 0:this.g_iD=_;break;case 1:this.g_iE=_;break;case 2:this.g_iF=_;break;case 3:this.g_iG=_;break;case 4:this.g_iH=_;break;case 5:this.g_iI=_;break;case 6:this.g_iJ=_;break;case 7:this.g_iK=_;break;default:throw new RangeError("invalid quad point index");}}}}{const g=[0,0,1,0,1,1,0,1],_=g_bz.g_eI(g_bz.g_iC);g_bz.g_jf=class extends g_bz.g_eG{constructor(_){super(),_||(_=g),this.g_jg=Float64Array.from(_),this.g_jh=new g_bz.Rect,this.g_ji=!0}g_eJ(){}g_jj(){return this.g_jg}g_jk(){return this.g_jg.length/2}g_jl(g){this.g_jg.length===g.length?this.g_jg.set(g):this.g_jg=Float64Array.from(g),this.g_ji=!0}g_r(g){this.g_jl(g.g_jg)}g_jm(){this.g_ji=!0}g_jn(){if(!this.g_ji)return;const _=this.g_jg;let a=_[0],n=_[1],t=a,i=n;for(let e=0,o=_.length;et&&(t=o),gi&&(i=g)}this.g_jh.set(a,n,t,i),this.g_ji=!1}g_iV(g,_,e){let a=this.g_jg;8!==a.length&&(a=new Float64Array(8),this.g_jg=a),a[0]=g.g_ic()-_,a[1]=g.g_id()-e,a[2]=g.g_ie()-_,a[3]=g.g_id()-e,a[4]=g.g_ie()-_,a[5]=g.g_if()-e,a[6]=g.g_ic()-_,a[7]=g.g_if()-e,this.g_jh.g_r(g),(0!==_||0!==e)&&this.g_jh.offset(-_,-e),this.g_ji=!1}g_jo(g,e,a){_.g_r(g),_.offset(e,a),this.g_jl(_.toArray()),this.g_ji=!0}transform(g,_,n){let t=0,i=1;0!==n&&(t=Math.sin(n),i=Math.cos(n)),this.g_jp(g,_,t,i)}g_jp(_,a,n,t){const o=this.g_jg;for(let e=0,i=o.length;e(g/=n/2)?e/2*g*g+_:-e/2*(--g*(g-2)-1)+_}static g_ka(g,_,e,n){return e*(g/=n)*g*g+_}static g_kb(g,_,e,n){return e*((g=g/n-1)*g*g+1)+_}static g_kc(g,_,e,n){return 1>(g/=n/2)?e/2*g*g*g+_:e/2*((g-=2)*g*g+2)+_}static g_kg(g,_,e,n){return e*(g/=n)*g*g*g+_}static g_kh(g,_,e,n){return-e*((g=g/n-1)*g*g*g-1)+_}static g_ki(g,_,e,n){return 1>(g/=n/2)?e/2*g*g*g*g+_:-e/2*((g-=2)*g*g*g-2)+_}static g_kj(g,_,e,n){return e*(g/=n)*g*g*g*g+_}static g_kk(g,_,e,n){return e*((g=g/n-1)*g*g*g*g+1)+_}static g_kl(g,_,e,n){return 1>(g/=n/2)?e/2*g*g*g*g*g+_:e/2*((g-=2)*g*g*g*g+2)+_}static g_jQ(g,_,e,a){return-e*o(g/a*(r/2))+e+_}static g_jR(_,a,e,n){return e*g(_/n*(r/2))+a}static g_jS(g,_,e,a){return-e/2*(o(r*g/a)-1)+_}static g_kp(g,_,e,a){return 0===g?_:e*t(2,10*(g/a-1))+_}static g_kq(g,_,e,a){return g===a?_+e:e*(-t(2,-10*g/a)+1)+_}static g_kr(g,_,e,n){return 0===g?_:g===n?_+e:1>(g/=n/2)?e/2*t(2,10*(g-1))+_:e/2*(-t(2,-10*--g)+2)+_}static g_km(_,a,t,i){return-t*(n(1-(_/=i)*_)-1)+a}static g_kn(g,_,a,t){return a*n(1-(g=g/t-1)*g)+_}static g_ko(_,a,t,i){return 1>(_/=i/2)?-t/2*(n(1-_*_)-1)+a:t/2*(n(1-(_-=2)*_)+1)+a}static g_jT(a,n,o,u){let s=1.70158,c=0,f=o;return 0===a?n:1===(a/=u)?n+o:(c||(c=.3*u),fa?-.5*(f*t(2,10*(a-=1))*g((a*u-s)*(2*r)/c))+n:.5*(f*t(2,-10*(a-=1))*g((a*u-s)*(2*r)/c))+o+n)}static g_jW(g,_,e,n,t){return void 0===t&&(t=1.70158),e*(g/=n)*g*((t+1)*g-t)+_}static g_jX(g,_,e,n,t){return void 0===t&&(t=1.70158),e*((g=g/n-1)*g*((t+1)*g+t)+1)+_}static g_jY(g,_,e,n,t){return void 0===t&&(t=1.70158),1>(g/=n/2)?e/2*(g*g*(((t*=1.525)+1)*g-t))+_:e/2*((g-=2)*g*(((t*=1.525)+1)*g+t)+2)+_}static g_jZ(g,_,e,a){return e-d.g_j_(a-g,0,e,a)+_}static g_j_(g,_,e,n){return(g/=n)<1/2.75?e*(7.5625*g*g)+_:g<2/2.75?e*(7.5625*(g-=1.5/2.75)*g+.75)+_:g<2.5/2.75?e*(7.5625*(g-=2.25/2.75)*g+.9375)+_:e*(7.5625*(g-=2.625/2.75)*g+.984375)+_}static g_j$(g,_,e,a){return ge(g)));for(let a=0,n=this.g_ky.length,e;ae(g)));return Promise.all(_).then(()=>!g.defaultPrevented)}async g_kP(g){const _=[];this.g_kK();for(let e=0,a=this.g_kw.length;e(g.push({g_lb:n,resolve:i,reject:e,stack:t}),s?void a(g.pop()):void(-1===u&&_(16))))},g_bz.g_gz.g_lc=function(g){if(g)++i;else if(--i,0>i)throw new Error("already turned off high throughput mode")}}{function _(){a=-1}function n(){o=-1,r=-1;let _=Date.now();for(let e of g)if(e.g_ld(_)){let g=e.g_le();(-1===r||g_+t&&(self.clearTimeout(o),r=this.g_lj,o=self.setTimeout(n,this.g_li+100))}g_ld(g){return!(g>=this.g_lj)||(this.g_lh()?(this.g_lj=g+this.g_li,!0):(this.g_lk=!1,!1))}g_le(){return this.g_lj}g_lm(){this.g_lk&&(g.delete(this),this.g_lk=!1,0===g.size&&-1!==o&&(self.clearTimeout(o),o=-1,r=-1))}g_eJ(){this.g_lm(),this.g_lh=null}}}"use strict",g_bz.g_ln=class g{constructor(g){this.g_lo=!1,this.g_lp=g}g_lq(){this.g_lo||(this.g_lo=!0,this.g_lp&&(this.g_lp(),this.g_lp=null))}g_lr(){return this.g_lo}g_eJ(){this.g_lq()}static g_eJ(_){return new g(()=>_.g_eJ())}static g_ls(g,_,a,n,t){if("undefined"==typeof n||null===n)n=!1;else if("boolean"!=typeof n&&"object"!=typeof n)throw new TypeError("invalid event listener options");if(t&&(a=a.bind(t)),_.includes(" ")){_=_.split(" ");const t=new g_bz.g_lt;for(let e of _)g.addEventListener(e,a,n),t.g_jG(g_bz.g_eI(g_bz.g_ln,()=>g.removeEventListener(e,a,n)));return t}return g.addEventListener(_,a,n),g_bz.g_eI(g_bz.g_ln,()=>g.removeEventListener(_,a,n))}},g_bz.g_lu=class extends g_bz.g_ln{g_lv(g){this.g_lp=g}},g_bz.g_lt=class extends g_bz.g_ln{constructor(...g){super(),this.g_lw=new Set;for(let _ of g)this.g_jG(_)}g_jG(...g){if(this.g_lo)throw new Error("already disposed");for(let _ of g)this.g_lw.add(_)}g_lx(g){if(this.g_lo)throw new Error("already disposed");this.g_lw.delete(g)}g_ly(){if(this.g_lo)throw new Error("already disposed");if(this.g_lw){for(let g of this.g_lw)g.g_lq();this.g_lw.clear()}}g_lr(){return this.g_lo}g_lq(){if(this.g_lo)throw new Error("already disposed");this.g_lo=!0;for(let g of this.g_lw)g.g_lq();this.g_lw.clear(),this.g_lw=null}g_eJ(){this.g_lq()}},"use strict",g_bz.g_lz=class extends g_bz.g_eG{constructor(){super(),this.g_lA=0,this.g_hL=0,this.g_lB=0,this.g_lC=0}g_jG(g){g=+g,this.g_hL=g-this.g_lA,this.g_lB=this.g_lC+this.g_hL,this.g_lA=this.g_lB-this.g_lC-this.g_hL,this.g_lC=this.g_lB}g_lD(g){this.g_lC-=+g}g_bQ(){return this.g_lC}g_ll(){this.g_lA=0,this.g_hL=0,this.g_lB=0,this.g_lC=0}Set(g){this.g_lA=0,this.g_hL=0,this.g_lB=0,this.g_lC=+g}g_eJ(){}},"use strict";{const g={};g.g_lE=function(g){this.g_lF=g,this.right=this.g_lF.g_lG,this.left=this.g_lF.g_lG,this.parent=null,this.color=!1,this.key=null},g.g_lH=function(_){this.size=0,this.g_lG=new g.g_lE(this),this.g_lG.color=!1,this.root=this.g_lG,this.root.parent=this.g_lG,this.g_gg=_||this.g_lI},g.g_lH.prototype.g_lI=function(g,_){return g<_?-1:_this.g_gg(a.key,t.key)?t.left:t.right;a.parent=n,n==this.g_lG?this.root=a:0>this.g_gg(a.key,n.key)?n.left=a:n.right=a,a.left=this.g_lG,a.right=this.g_lG,a.color=!0,this.g_lN(a),this.size++}else{var i=this.g_lO(_);i.key=_}},g.g_lH.prototype.g_lN=function(g){for(;g!=this.g_lG&&g!=this.root&&!0==g.parent.color;)if(g.parent==g.parent.parent.left){var _=g.parent.parent.right;!0==_.color?(g.parent.color=!1,_.color=!1,g.parent.parent.color=!0,g=g.parent.parent):(g==g.parent.right&&(g=g.parent,this.g_lK(g)),g.parent.color=!1,g.parent.parent.color=!0,g.parent.parent!=this.g_lG&&this.g_lL(g.parent.parent))}else{var _=g.parent.parent.left;!0==_.color?(g.parent.color=!1,_.color=!1,g.parent.parent.color=!0,g=g.parent.parent):(g==g.parent.left&&(g=g.parent,this.g_lL(g)),g.parent.color=!1,g.parent.parent.color=!0,g.parent.parent!=this.g_lG&&this.g_lK(g.parent.parent))}this.root.color=!1},g.g_lH.prototype.g_lP=function(g){var _,e;_=g.left==this.g_lG||g.right==this.g_lG?g:this.g_lQ(g),e=_.left==this.g_lG?_.right:_.left,e.parent=_.parent,_.parent==this.g_lG?this.root=e:_==_.parent.left?_.parent.left=e:_.parent.right=e,_!=g&&(g.key=_.key),!1==_.color&&this.g_lR(e),this.size--},g.g_lH.prototype.g_lR=function(g){for(;g!=this.root&&!1==g.color;)if(g==g.parent.left){var _=g.parent.right;!0==_.color&&(_.color=!1,g.parent.color=!0,this.g_lK(g.parent),_=g.parent.right),!1==_.left.color&&!1==_.right.color?(_.color=!0,g=g.parent):(!1==_.right.color&&(_.left.color=!1,_.color=!0,this.g_lL(_),_=g.parent.right),_.color=g.parent.color,g.parent.color=!1,_.right.color=!1,this.g_lK(g.parent),g=this.root)}else{var _=g.parent.left;!0==_.color&&(_.color=!1,g.parent.color=!0,this.g_lL(g.parent),_=g.parent.left),!1==_.right.color&&!1==_.left.color?(_.color=!0,g=g.parent):(!1==_.left.color&&(_.right.color=!1,_.color=!0,this.g_lK(_),_=g.parent.left),_.color=g.parent.color,g.parent.color=!1,_.left.color=!1,this.g_lL(g.parent),g=this.root)}g.color=!1},g.g_lH.prototype.remove=function(g){var _=this.g_lO(g);if(_!=this.g_lG){var e=_.key;return this.g_lP(_),e}return null},g.g_lH.prototype.g_lS=function(g,_){this.remove(_)},g.g_lH.prototype.min=function(g){for(;g.left!=this.g_lG;)g=g.left;return g},g.g_lH.prototype.max=function(g){for(;g.right!=this.g_lG;)g=g.right;return g},g.g_lH.prototype.g_lQ=function(g){if(g.right!=this.g_lG)return this.min(g.right);for(var _=g.parent;_!=this.g_lG&&g==_.right;)g=_,_=_.parent;return _},g.g_lH.prototype.g_lT=function(g){if(g.left!=this.g_lG)return this.max(g.left);for(var _=g.parent;_!=this.g_lG&&g==_.left;)g=_,_=_.parent;return _},g.g_lH.prototype.g_lU=function(g){if(0this.g_gg(g,_.key)?_.left:_.right;return _},g.g_lH.prototype.contains=function(g){return null!=this.g_lO(g).key},g.g_lH.prototype.getValues=function(){var g=[];return this.forEach(function(_){g.push(_)}),g},g.g_lH.prototype.g_lJ=function(_){if("array"==g.g_lY(_))for(var a=0;a<_.length;a++)this.g_lM(_[a]);else if("function"==g.g_lY(_.forEach))_.forEach(this.g_lM,this);else if("function"==g.g_lY(_.getValues))for(var n=_.getValues(),a=0;aa)return!1;var n=0;if(this.g_mb())return!0;for(var t=this.min(this.root);t!=this.g_lG;t=this.g_lQ(t))g.contains.call(_,_,t.key)&&n++;return n==this.g_mf()},g.g_lH.prototype.g_mh=function(_){var e=new g.g_lH(this.g_gg);if(this.g_mb())return e;for(var a=this.min(this.root);a!=this.g_lG;a=this.g_lQ(a))_.contains.call(_,a.key,a.key,this)&&e.g_lM(a.key);return e},g_bz.g_lH=class extends g_bz.g_eG{constructor(_){super(),this.g_mi=new g.g_lH(_)}g_jG(g){this.g_mi.g_lM(g)}g_lx(g){this.g_mi.remove(g)}g_bP(g){return this.g_mi.contains(g)}g_jx(){this.g_mi.clear()}toArray(){return this.g_mi.getValues()}g_jA(){return this.g_mi.g_mf()}g_jH(){return this.g_mi.g_mb()}g_mj(g){this.g_mi.forEach(g)}g_mk(){if(this.g_jH())throw new Error("empty set");const g=this.g_mi,_=g.min(g.root);return _.key}g_ml(){if(this.g_jH())throw new Error("empty set");const g=this.g_mk();return this.g_lx(g),g}*values(){if(!this.g_jH()){const g=this.g_mi;for(let _=g.min(g.root);_!=g.g_lG;_=g.g_lQ(_))yield _.key}}[Symbol.iterator](){return this.values()}}}"use strict",g_bz.g_mm=class{constructor(g=g_bz.hardwareConcurrency){this.g_mn=g,this.g_mo=[],this.g_mp=0}g_jG(g){return new Promise((_,e)=>{this.g_mo.push({g_lb:g,resolve:_,reject:e}),this.g_mq()})}g_mr(g){for(let _=0,e=this.g_mo.length;_=this.g_mn)return;this.g_mp++;const g=this.g_mo.shift();g.g_lb().then(_=>{g.resolve(_),this.g_mp--,this.g_mq()}).catch(_=>{g.reject(_),this.g_mp--,this.g_mq()})}static async g_mu(g,_){const n=[];let t=!1;const i=async()=>{for(let g;g=_.pop();){if(t)return;try{n.push((await g()))}catch(g){throw t=!0,g}}},e=[];for(;g--;)e.push(i());return await Promise.all(e),n}},"use strict",g_bz.g_mv=class{constructor(g,_,e){this.g_lh=g,this.g_mw=_,this.g_mx=e||2*_,this.g_my=-1,this.g_mz=-Infinity,this.g_mA=()=>this.g_mB(),this.g_mC=!1,this.g_mD=!1,this.g_mE=null}g_mF(g){this.g_mD=!!g}g_mG(){return"undefined"!=typeof g_bz.g_mH&&g_bz.g_mH.g_mI()?this.g_mx:this.g_mw}g_mJ(...g){if(-1===this.g_my){this.g_mE=g;let _=g_bz.g_lf(),e=_-this.g_mz,a=this.g_mG();e>=a&&this.g_mD?(this.g_mz=_,this.g_mK()):this.g_my=self.setTimeout(this.g_mA,Math.max(a-e,4))}}g_mK(){this.g_mC=!0,this.g_lh(...this.g_mE),this.g_mC=!1}g_ll(){this.g_mC||(this.g_mL(),this.g_mz=g_bz.g_lf())}g_mB(){this.g_my=-1,this.g_mz=g_bz.g_lf(),this.g_mK()}g_mL(){-1!==this.g_my&&(self.clearTimeout(this.g_my),this.g_my=-1)}g_eJ(){this.g_mL(),this.g_lh=null,this.g_mE=null,this.g_mA=null}},"use strict";{function _(g){return r.get(g)}g_bz.g_mM="\uFEFF";const n=new Set([..."0123456789"]);g_bz.g_mN=function(g){return n.has(g)};const t=new Set([..." \t\n\r\xA0\x85\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u200B\u2028\u2029\u202F\u205F\u3000"]);g_bz.g_mO=function(g){return t.has(g)},g_bz.g_mP=function(g){return[...g].filter(g=>!g_bz.g_mO(g)).join("")},g_bz.g_mQ=function(g){for(const _ of g)if(!g_bz.g_mO(_))return!1;return!0},g_bz.g_mR=function(g){return 1===g.length&&32>g.charCodeAt(0)},g_bz.g_mS=function(g){return[...g].filter(g=>!g_bz.g_mR(g)).join("")};const o=new Set([..."0123456789.+-e"]);g_bz.g_mT=function(g){if(g=g.trim(),!g.length)return!1;let _=g.charAt(0);if("-"!==_&&!n.has(_))return!1;for(let _ of g)if(!o.has(_))return!1;return!0},g_bz.g_mU=function(g){let _=g.length;for(;0<_;){let e=g.charAt(_-1);if(!g_bz.g_mN(e))break;--_}return g.substr(0,_)},g_bz.g_mV=function(g){let _=g_bz.g_mU(g),e=g.substr(_.length);return e=e?(parseInt(e,10)+1).toString():"2",_+e};const r=new Map([["&","&"],["<","<"],[">",">"],["\"","""],["'","'"]]),e=/[&<>"']/g;g_bz.g_mW=function(g){return g.replace(e,_)},g_bz.g_mX=function(g){let _=g_bz.g_mY(g,"\\","\\\\");return _=g_bz.g_mY(_,"\"","\\\""),_=g_bz.g_mY(_,"\t","\\t"),_=g_bz.g_mY(_,"\r",""),g_bz.g_mY(_,"\n","\\n")},g_bz.g_mZ=function(g){let _=g_bz.g_mY(g,"&","&");return _=g_bz.g_mY(_,"<","<"),_=g_bz.g_mY(_,">",">"),g_bz.g_mY(_,"\"",""")};const d=/[-[\]{}()*+?.,\\^$|#\s]/g;g_bz.g_m_=function(g){return g.replace(d,"\\$&")},g_bz.g_m$=function(_,n,t=!1){if(!n)return[];t||(_=_.toLowerCase(),n=n.toLowerCase());const i=n.length;let o=0,r=0,d=[];for(;-1<(r=_.indexOf(n,o));)d.push(r),o=r+i;return d},g_bz.g_mY=function(g,_,e){return g.replace(new RegExp(g_bz.g_m_(_),"g"),e)},g_bz.g_na=function(g,_,e){return g.replace(new RegExp(g_bz.g_m_(_),"gi"),e)};let g=new WeakMap;g_bz.g_nb=function(_,e,a){let n=g.get(_);if("string"==typeof e){if(!a&&e===n)return;_.textContent=e,g.set(_,e)}else{if(!a&&e.g_n(n))return;if(e.g_nc()){let a=e.toString();_.textContent=a,g.set(_,a)}else _.innerHTML=e.g_nd(),e instanceof g_bz.g_en&&e.g_ne(_),g.set(_,e.toString())}},g_bz.g_nf=function(g,_){return g instanceof g_bz.g_em||g instanceof g_bz.g_en?g.g_n(_):_ instanceof g_bz.g_em||_ instanceof g_bz.g_en?_.g_n(g):g===_},g_bz.g_ng=function(g,..._){let a=g;for(let n=0,t=_.length;na?1:eg){let _=g/u;return _=10>_?e(10*_)/10:e(_),g_nl(a+"kilobytes",_)}if(1073741824>g){let _=g/1048576;return _=10>_?e(10*_)/10:e(_),g_nl(a+"megabytes",_)}if(1099511627776>g){let _=g/1073741824;return _=10>_?e(10*_)/10:e(_),g_nl(a+"gigabytes",_)}else{let _=g/1099511627776;return _=10>_?e(10*_)/10:e(_),g_nl(a+"terabytes",_)}};const i={g_nm:!1,g_nn:!0,g_no:!0,g_np:!0,g_nq:!0};g_bz.g_nr=function(g,_){var n=Math.floor;_=Object.assign({},i,_),g_bz.g_nt.g_ns("common.time");const t=[];if(_.g_nn){const _=n(g/86400);0<_&&(g-=3600*(24*_),t.push(g_nu(".days",null,_)))}if(_.g_no){const _=n(g/3600);(0<_||t.length)&&(g-=3600*_,t.push(g_nu(".hours",null,_)))}if(_.g_np){const a=n(g/60);(0g?"-":"";g=Math.abs(g);let t=g.toString(),i=_-t.length;for(let e=0;eg.toUpperCase())},g_bz.g_ny=function(g,_){let n=g.split(".").map(g=>g.trim()),t=_.split(".").map(g=>g.trim());g_bz.g_fU(n,4,"0"),g_bz.g_fU(t,4,"0"),n=n.map(g=>parseInt(g,10)),t=t.map(g=>parseInt(g,10));for(let i=0;4>i;++i){const g=n[i]-t[i];if(0!=g)return 0>g?-1:1}return 0},g_bz.g_nz=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,g=>{const _=Math.floor(16*Math.random()),e="x"===g?_:8|3&_;return e.toString(16)})},g_bz.g_nA=function(g,_){if(g.length!==_.length)throw new Error("strings must be same length");let a=0;for(let n=0,t=g.length;n":`<${g} class="${_}">`}}else if("a"===i&&!e){const g=parseInt(n.substring(1),10)-1;if(0>g||g>=t.length)throw new Error("invalid bbcode link substitution");const _=t[g];if("string"==typeof _)return``;if("function"==typeof _)return``;throw new TypeError("invalid bbcode link action")}else return"<"+e+i+">"}const _=new Map([["b","strong"],["i","em"],["s","s"],["u","u"],["sub","sub"],["sup","sup"],["small","small"],["mark","mark"],["a1","a"],["a2","a"],["a3","a"],["a4","a"],["a5","a"],["a6","a"],["a7","a"],["a8","a"],["a9","a"],["bad",["span","bbCodeBad"]],["good",["span","bbCodeGood"]],["info",["span","bbCodeInfo"]],["h1",["span","bbCodeH1"]],["h2",["span","bbCodeH2"]],["h3",["span","bbCodeH3"]],["h4",["span","bbCodeH4"]],["item",["span","bbCodeItem"]]]),a=/\[(\/?)([a-zA-Z0-9]+)\]/g,n=/\[(\/?)(.*?)\]/g;let t=null;const e=/\n/g;g_bz.g_en=class{constructor(g,_){if(this.g_nB=_&&_.g_nC?g:g_bz.g_mW(g),this.g_nD="",this.g_nE=!1,this.g_nF=[],_&&(this.g_nE=!!_.g_nG,_.links)){if(9<_.links.length)throw new Error("too many links");this.g_nF=_.links}this.g_nH=this.g_nB.includes("["),this.g_nI=this.g_nE&&this.g_nB.includes("\n"),this.g_nJ=!this.g_nH&&!this.g_nI&&!this.g_nB.includes("&"),this.g_nK=!1,this.g_nL=[]}toString(){return this.g_nB}valueOf(){return this.g_nB}g_nc(){return this.g_nJ}g_nM(){return this.g_nH?this.g_nB.replace(a,""):this.g_nB}g_nd(){if(this.g_nJ)return this.g_nB;if(!this.g_nD&&this.g_nB){let _=this.g_nB;this.g_nH&&(t=this.g_nF,_=_.replace(a,g),t=null),this.g_nI&&(_=_.replace(e,"
")),this.g_nD=_}return this.g_nD}g_ne(g){if(this.g_nF.length)for(let _=0,e=this.g_nF.length;_n)return;if(1===g.length){const a=g[0],t=a.text,e=a.g_nO;if(100>=t.length&&!t.includes("\n")){const g=_(t,e);if(g.width<=n){const _=[];return this.g_nY(_,t,e,g.width,g.height),void this.g_nW(_,g.width,g.height)}}}let i;i="word"===t?g.map(g=>({g_nZ:this.g_n_(g.text),g_nO:g.g_nO})):g.map(g=>({g_nZ:[...g.text],g_nO:g.g_nO})),this.g_n$(i,_,n)}g_n_(g){const _=[...g],n=[];let t="",i=!1;for(const e of _)if("\n"===e)t&&n.push(t),n.push("\n"),t="";else if(!t)t=e,i=g_bz.g_mO(e);else{const g=g_bz.g_mO(e);g===i?t+=e:(n.push(t),t=e,i=g)}return t&&n.push(t),n}g_n$(_,t,r){var u=Math.max;let d="",s=0,p=0,M=0,c=0,b=[];for(const g of _){const _=g.g_nO,e=g.g_nZ;for(const g of e){if("\n"===g){0===M&&(M=t(" ",_).height),d&&this.g_nY(b,d,_,s,p||M),this.g_nW(b,c+s,M),b=[],d="",s=0,p=0,c=0,M=0;continue}const e=d+g,a=t(e,_),i=a.width,n=a.height;if(!(c+i>=r))d=e,s=i,p=u(p,n),M=u(M,n);else if(d&&this.g_nY(b,d,_,s,p),b.length&&(this.g_nW(b,c+s,M),b=[]),c=0,g_bz.g_mQ(g))d="",s=0,p=0,M=0;else{d=g;const e=t(g,_);s=e.width,p=e.height,M=e.height}}d&&(this.g_nY(b,d,_,s,p),c+=s,d="",s=0,p=0)}b.length&&this.g_nW(b,c+s,M);for(const g of this.g_nT){const _=g.g_nX;if(!_.length)continue;const n=_[_.length-1],a=n.text,i=a.trimEnd();if(!i)g.width-=n.width,_.pop();else if(i.length=this.g_oo||0>=this.g_op)throw new Error("invalid texture data size");if(d.g_ok){const g=document.createElement("canvas");g.width=this.g_oo,g.height=this.g_op;const _=g.getContext("2d");_.drawImage(o,0,0,this.g_oo,this.g_op),o=g}const u=g_bz.g_fa(this.g_oo)&&g_bz.g_fa(this.g_op),s=this.g_om.g_oz();if(this.g_oo>s||this.g_op>s)throw new Error("texture data exceeds maximum texture size");const i=this.g_om.g_oA(),c=this.g_om.g_oB();this.g_on=i.createTexture(),i.bindTexture(i.TEXTURE_2D,this.g_on),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,d.g_cO);const f=_(this.g_ou,i);if(!this.g_om.g_oC()&&!u&&this.g_or){if(null===o)throw new Error("cannot pass null data when creating a NPOT tiled texture without NPOT support");if(o instanceof ArrayBuffer&&(o=new ImageData(new Uint8ClampedArray(o),this.g_oo,this.g_op)),o instanceof ImageData){const g=document.createElement("canvas");g.width=this.g_oo,g.height=this.g_op;const _=g.getContext("2d");_.putImageData(o,0,0),o=g}const g=document.createElement("canvas");g.width=g_bz.g_fb(this.g_oo),g.height=g_bz.g_fb(this.g_op);const _=g.getContext("2d");_.g_oD=this.g_ot,_.drawImage(o,0,0,this.g_oo,this.g_op,0,0,g.width,g.height),i.texImage2D(i.TEXTURE_2D,0,f.g_od,f.format,f.type,g)}else if(2<=c){let g;g=this.g_ov?Math.floor(Math.log2(Math.max(this.g_oo,this.g_op))+1):1,i.texStorage2D(i.TEXTURE_2D,g,f.g_oc,this.g_oo,this.g_op),o instanceof ArrayBuffer?i.texSubImage2D(i.TEXTURE_2D,0,0,0,this.g_oo,this.g_op,f.format,f.type,new Uint8Array(o)):null!==o&&i.texSubImage2D(i.TEXTURE_2D,0,0,0,f.format,f.type,o)}else o instanceof ArrayBuffer?i.texImage2D(i.TEXTURE_2D,0,f.g_od,this.g_oo,this.g_op,0,f.format,f.type,new Uint8Array(o)):null===o?i.texImage2D(i.TEXTURE_2D,0,f.g_od,this.g_oo,this.g_op,0,f.format,f.type,null):i.texImage2D(i.TEXTURE_2D,0,f.g_od,f.format,f.type,o);null!==o&&this.g_oE(i),i.bindTexture(i.TEXTURE_2D,null),this.g_om.g_oF(),this.g_ox=1,r.add(this)}g_oG(o,d,e){var u=Math.floor;if(e=Object.assign({},t,e),this.g_on)throw new Error("already created texture");if(this.g_or=!!e.g_oe,this.g_os=e.g_of,this.g_ot=!!e.g_og,this.g_ou=e.g_oh,this.g_ov=!!e.g_oi,!a.has(this.g_ou))throw new Error("invalid pixel format");this.g_oq=!1,this.g_oo=u(o),this.g_op=u(d);const s=g_bz.g_fa(this.g_oo)&&g_bz.g_fa(this.g_op),i=this.g_om.g_oz();if(0>=this.g_oo||0>=this.g_op)throw new Error("invalid texture size");if(this.g_oo>i||this.g_op>i)throw new Error("texture exceeds maximum texture size");if(!this.g_om.g_oC()&&this.g_or&&!s)throw new Error("non-power-of-two tiled textures not supported");const c=this.g_om.g_oA(),f=this.g_om.g_oB();this.g_on=c.createTexture(),c.bindTexture(c.TEXTURE_2D,this.g_on),c.pixelStorei(c.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.g_cO);const l=_(this.g_ou,c),p=2<=f?l.g_oc:l.g_od;c.texImage2D(c.TEXTURE_2D,0,p,this.g_oo,this.g_op,0,l.format,l.type,null),this.g_oE(c),c.bindTexture(c.TEXTURE_2D,null),this.g_om.g_oF(),this.g_ox=1,r.add(this)}g_oH(g){if("default"===this.g_ow)return this.g_oq?g.NICEST:g.FASTEST;if("low"===this.g_ow)return g.FASTEST;if("high"===this.g_ow)return g.NICEST;throw new Error("invalid mipmap quality")}g_oE(g){const _=g_bz.g_fa(this.g_oo)&&g_bz.g_fa(this.g_op);if(!this.g_or)g.texParameteri(g.TEXTURE_2D,g.TEXTURE_WRAP_S,g.CLAMP_TO_EDGE),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_WRAP_T,g.CLAMP_TO_EDGE);else if("repeat-x"===this.g_os)g.texParameteri(g.TEXTURE_2D,g.TEXTURE_WRAP_S,g.REPEAT),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_WRAP_T,g.CLAMP_TO_EDGE);else if("repeat-y"===this.g_os)g.texParameteri(g.TEXTURE_2D,g.TEXTURE_WRAP_S,g.CLAMP_TO_EDGE),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_WRAP_T,g.REPEAT);else if("repeat"===this.g_os)g.texParameteri(g.TEXTURE_2D,g.TEXTURE_WRAP_S,g.REPEAT),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_WRAP_T,g.REPEAT);else throw new Error("invalid tile type");this.g_ot?(g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MAG_FILTER,g.LINEAR),(_||this.g_om.g_oC())&&this.g_ov?(g.hint(g.GENERATE_MIPMAP_HINT,this.g_oH(g)),g.generateMipmap(g.TEXTURE_2D),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MIN_FILTER,this.g_om.g_oI()?g.LINEAR_MIPMAP_NEAREST:g.LINEAR_MIPMAP_LINEAR)):(g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MIN_FILTER,g.LINEAR),this.g_ov=!1)):(g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MAG_FILTER,g.NEAREST),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MIN_FILTER,g.NEAREST),this.g_ov=!1)}g_oJ(e,a){if(("undefined"==typeof HTMLImageElement||!(e instanceof HTMLImageElement))&&("undefined"==typeof HTMLVideoElement||!(e instanceof HTMLVideoElement))&&("undefined"==typeof HTMLCanvasElement||!(e instanceof HTMLCanvasElement))&&("undefined"==typeof ImageBitmap||!(e instanceof ImageBitmap))&&("undefined"==typeof OffscreenCanvas||!(e instanceof OffscreenCanvas))&&!(e instanceof ImageData))throw new Error("invalid texture source");if(!this.g_on||0>=this.g_ox)throw new Error("texture not created");if(this.g_oq)throw new Error("cannot update static texture");a=Object.assign({},o,a);const n=e.width||e.videoWidth,t=e.height||e.videoHeight,r=this.g_om.g_oB(),g=this.g_om.g_oA();g.bindTexture(g.TEXTURE_2D,this.g_on),g.pixelStorei(g.UNPACK_PREMULTIPLY_ALPHA_WEBGL,a.g_cO);const d=_(this.g_ou,g),i=2<=r?d.g_oc:d.g_od;try{if(this.g_oo===n&&this.g_op===t){const _=g_bz.g_fa(this.g_oo)&&g_bz.g_fa(this.g_op);g.texSubImage2D(g.TEXTURE_2D,0,0,0,d.format,d.type,e),(_||this.g_om.g_oC())&&this.g_ov&&(g.hint(g.GENERATE_MIPMAP_HINT,this.g_oH(g)),g.generateMipmap(g.TEXTURE_2D))}else{this.g_oo=n,this.g_op=t;const _=g_bz.g_fa(this.g_oo)&&g_bz.g_fa(this.g_op);if(!this.g_om.g_oC()&&this.g_or&&!_)throw new Error("non-power-of-two tiled textures not supported");g.texImage2D(g.TEXTURE_2D,0,i,d.format,d.type,e),(_||this.g_om.g_oC())&&this.g_ov&&(g.hint(g.GENERATE_MIPMAP_HINT,this.g_oH(g)),g.generateMipmap(g.TEXTURE_2D))}}catch(g){console.error("Error updating WebGL texture: ",g)}g.bindTexture(g.TEXTURE_2D,null),this.g_om.g_oF()}g_oK(){if(0=this.g_ox)throw new Error("no more references");this.g_ox--}g_oQ(){return this.g_ox}g_oR(){return this.g_oo}g_oS(){return this.g_op}g_oT(){return this.g_oq}g_oU(){let g=this.g_oo*this.g_op;switch(this.g_ou){case"rgba8":g*=4;break;case"rgb8":g*=3;break;case"rgba4":case"rgb5_a1":case"rgb565":g*=2;}return this.g_ov&&(g+=Math.floor(g/3)),g}static g_oV(){r.clear()}static g_oW(){return r.values()}}}{const _={g_og:!0,alpha:!0,g_oX:!0,g_oY:!0,g_oZ:0},n=new Set;g_bz.g_ob.g_o_=class{constructor(g){this.g_om=g,this.g_o$=null,this.g_on=null,this.g_pa=null,this.g_oo=0,this.g_op=0,this.g_pb=!0,this.g_ot=!0,this.g_pc=!0,this.g_pd=!0,this.g_pe=0}g_pf(a,t,i){i=Object.assign({},_,i);const o=this.g_om.g_oB();if(this.g_on||this.g_pa)throw new Error("already created render target");if(this.g_ot=!!i.g_og,this.g_pc=!!i.alpha,this.g_pd=!!i.g_oX,this.g_pb=!!i.g_oY,this.g_pe=i.g_oZ,0o||this.g_pd))throw new Error("invalid use of multisampling");if(2>o&&(this.g_pd=!0),this.g_oo=a,this.g_op=t,0>=this.g_oo||0>=this.g_op)throw new Error("invalid render target size");const r=this.g_om.g_oA();if(this.g_o$=r.createFramebuffer(),r.bindFramebuffer(r.FRAMEBUFFER,this.g_o$),this.g_pd){this.g_on=this.g_om.g_pg(this.g_oo,this.g_op,{g_og:this.g_ot,g_oh:this.g_pc?"rgba8":"rgb8",g_oi:!1});const g=this.g_on.g_oM();r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,g,0)}else{this.g_pa=r.createRenderbuffer(),r.bindRenderbuffer(r.RENDERBUFFER,this.g_pa);const g=this.g_pc?r.RGBA8:r.RGB8;if(0g&&(this.g_pe=g)}else this.g_pe=0}0===this.g_pe?r.renderbufferStorage(r.RENDERBUFFER,g,this.g_oo,this.g_op):r.g_pi(r.RENDERBUFFER,this.g_pe,g,this.g_oo,this.g_op),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.RENDERBUFFER,this.g_pa),r.bindRenderbuffer(r.RENDERBUFFER,null)}r.bindFramebuffer(r.FRAMEBUFFER,null),n.add(this)}g_pj(g,_){if(this.g_oo!==g||this.g_op!==_){this.g_oo=g,this.g_op=_;const e=this.g_om.g_oA();e.bindFramebuffer(e.FRAMEBUFFER,this.g_o$),this.g_on?this.g_on.g_oJ(new ImageData(this.g_oo,this.g_op)):(e.bindRenderbuffer(e.RENDERBUFFER,this.g_pa),e.renderbufferStorage(e.RENDERBUFFER,this.g_pc?e.RGBA8:e.RGB8,this.g_oo,this.g_op),e.bindRenderbuffer(e.RENDERBUFFER,null)),e.bindFramebuffer(e.FRAMEBUFFER,null)}}g_oK(){if(!this.g_on&&!this.g_pa)throw new Error("already deleted render target");n.delete(this);const g=this.g_om.g_oA();g.bindFramebuffer(g.FRAMEBUFFER,this.g_o$),this.g_on?(g.framebufferTexture2D(g.FRAMEBUFFER,g.COLOR_ATTACHMENT0,g.TEXTURE_2D,null,0),this.g_om.g_pk(this.g_on),this.g_on=null):this.g_pa&&(g.framebufferRenderbuffer(g.FRAMEBUFFER,g.COLOR_ATTACHMENT0,g.RENDERBUFFER,null),g.deleteRenderbuffer(this.g_pa),this.g_pa=null),g.bindFramebuffer(g.FRAMEBUFFER,null),2<=this.g_om.g_oB()&&(g.bindFramebuffer(g.READ_FRAMEBUFFER,null),g.bindFramebuffer(g.DRAW_FRAMEBUFFER,null)),g.deleteFramebuffer(this.g_o$),this.g_om.g_pm().g_pl=null,this.g_o$=null}g_pn(){return this.g_o$}g_po(){return this.g_om}g_pp(){return this.g_on}g_pq(){return this.g_ot}g_pr(){return this.g_pc}g_ps(){return this.g_pd}g_oR(){return this.g_oo}g_oS(){return this.g_op}g_pt(){return this.g_pb}g_pu(){return this.g_pe}g_pv(){const g={g_og:this.g_ot,alpha:this.g_pc,g_oX:this.g_pd};return this.g_pb||(g.width=this.g_oo,g.height=this.g_op),g}g_pw(g){return g=Object.assign({},_,g),!!g.g_og===this.g_pq()&&!!g.alpha===this.g_pr()&&!(2<=this.g_om.g_oB()&&!!g.g_oX!==this.g_ps())&&("number"==typeof g.width||"number"==typeof g.height?!this.g_pt()&&this.g_oR()===g.width&&this.g_oS()===g.height:this.g_pt())}g_px(){return this.g_on?this.g_on.g_oM():null}g_oU(){return this.g_on?this.g_on.g_oU():this.g_oo*this.g_op*(this.g_pc?4:3)}static async g_py(g,_){const e=await g.g_pz(_,!0);return await g_bz.g_gH(e)}static g_oV(){n.clear()}static g_pA(){return n.values()}static g_pB(g,_){for(const e of n)e.g_pt()&&e.g_pj(g,_)}}}"use strict",g_bz.g_ob.g_pC=class{static async g_pD(_,a,n,t){const o=_.g_oA(),e=o.createShader(o.FRAGMENT_SHADER);o.shaderSource(e,a),o.compileShader(e);const r=o.createShader(o.VERTEX_SHADER);o.shaderSource(r,n),o.compileShader(r);const g=o.createProgram();o.attachShader(g,e),o.attachShader(g,r),o.bindAttribLocation(g,0,"aPos"),o.bindAttribLocation(g,1,"aTex"),o.bindAttribLocation(g,2,"aPoints"),o.linkProgram(g);const d=_.g_pE();if(d?await _.g_pF(()=>o.getProgramParameter(g,d.COMPLETION_STATUS_KHR)):await g_bz.g_fM(5),!o.getShaderParameter(e,o.COMPILE_STATUS)){const _=o.getShaderInfoLog(e);throw o.deleteShader(e),o.deleteShader(r),o.deleteProgram(g),new Error("Error compiling fragment shader: ",_)}if(!o.getShaderParameter(r,o.COMPILE_STATUS)){const _=o.getShaderInfoLog(r);throw o.deleteShader(e),o.deleteShader(r),o.deleteProgram(g),new Error("Error compiling vertex shader: ",_)}if(!o.getProgramParameter(g,o.LINK_STATUS)){const _=o.getProgramInfoLog(g);throw o.deleteShader(e),o.deleteShader(r),o.deleteProgram(g),new Error("Error linking shader program: ",_)}const i=g_bz.g_mS(o.getProgramInfoLog(g)||"").trim();return i&&!g_bz.g_mQ(i)&&console.info(`[WebGL] Shader program '${t}' compilation log: `,i),o.deleteShader(e),o.deleteShader(r),g}static async g_pG(g,_,a,n){const t=await g_bz.g_ob.g_pC.g_pD(g,_.src,a,n);return new g_bz.g_ob.g_pC(g,t,_,n)}constructor(_,a,n,t){const o=_.g_oA(),e=_.g_pm();_.g_pH(),o.useProgram(a),this.g_pI=o,this.g_om=_,this.g_pJ=t,this.g_pK=a,this.g_pL=""===t;const r=o.getAttribLocation(a,"aPos"),g=o.getAttribLocation(a,"aTex"),d=o.getAttribLocation(a,"aPoints");-1!==r&&(o.bindBuffer(o.ARRAY_BUFFER,_.g_pM),o.vertexAttribPointer(r,_.g_pN(),o.FLOAT,!1,0,0),o.enableVertexAttribArray(r)),-1!==g&&(o.bindBuffer(o.ARRAY_BUFFER,_.g_pO),o.vertexAttribPointer(g,2,o.FLOAT,!1,0,0),o.enableVertexAttribArray(g)),-1!==d&&(o.bindBuffer(o.ARRAY_BUFFER,_.g_pP),o.vertexAttribPointer(d,4,o.FLOAT,!1,0,0),o.enableVertexAttribArray(d)),o.bindBuffer(o.ARRAY_BUFFER,null),this.g_pQ=new g_bz.g_ob.g_pR(this,"matP","mat4"),this.g_pS=new g_bz.g_ob.g_pR(this,"matMV","mat4"),this.g_pT=new g_bz.g_ob.g_pR(this,"color","vec4"),this.g_pU=new g_bz.g_ob.g_pR(this,"samplerFront","sampler"),this.g_pV=new g_bz.g_ob.g_pR(this,"pointTexStart","vec2"),this.g_pW=new g_bz.g_ob.g_pR(this,"pointTexEnd","vec2"),this.g_pX=new g_bz.g_ob.g_pR(this,"tileSize","vec2"),this.g_pY=new g_bz.g_ob.g_pR(this,"tileSpacing","vec2"),this.g_pZ=new g_bz.g_ob.g_pR(this,"color2","vec4"),this.g_p_=new g_bz.g_ob.g_pR(this,"outlineThickness","float"),this.g_p$=new g_bz.g_ob.g_pR(this,"samplerBack","sampler"),this.g_qa=new g_bz.g_ob.g_pR(this,"destStart","vec2"),this.g_qb=new g_bz.g_ob.g_pR(this,"destEnd","vec2"),this.g_qc=new g_bz.g_ob.g_pR(this,"srcStart","vec2"),this.g_qd=new g_bz.g_ob.g_pR(this,"srcEnd","vec2"),this.g_qe=new g_bz.g_ob.g_pR(this,"srcOriginStart","vec2"),this.g_qf=new g_bz.g_ob.g_pR(this,"srcOriginEnd","vec2"),this.g_qg=new g_bz.g_ob.g_pR(this,"pixelSize","vec2"),this.g_qh=new g_bz.g_ob.g_pR(this,"seconds","float"),this.g_qi=new g_bz.g_ob.g_pR(this,"layerScale","float"),this.g_qj=new g_bz.g_ob.g_pR(this,"layerAngle","float"),this.g_qk=new g_bz.g_ob.g_pR(this,"layoutStart","vec2"),this.g_ql=new g_bz.g_ob.g_pR(this,"layoutEnd","vec2"),this.g_qm=!!(this.g_qg.g_qn()||this.g_qh.g_qn()||this.g_p$.g_qn()||this.g_qa.g_qn()||this.g_qb.g_qn()||this.g_qc.g_qn()||this.g_qd.g_qn()||this.g_qe.g_qn()||this.g_qf.g_qn()||this.g_qi.g_qn()||this.g_qj.g_qn()||this.g_qk.g_qn()||this.g_ql.g_qn()),this.g_qo=n.g_qp||0,this.g_qq=n.g_qr||0,this.g_qs=!!n.g_qt,this.g_qu=!!n.g_qv,this.g_qw=!!n.g_qx,this.g_qy=!!n.g_qz;const i=n.g_qA||[];this.g_qB=[],this.g_qC=this.g_qa.g_qn()||this.g_qb.g_qn(),this.g_qD=this.g_qg.g_qn()||this.g_qc.g_qn()||this.g_qd.g_qn()||this.g_qe.g_qn()||this.g_qf.g_qn(),this.g_qE=this.g_qs||this.g_qC||0!==this.g_qo||0!==this.g_qq,this.g_qF=!1,this.g_qG=!1,this.g_pT.g_qH(1,1,1,1),this.g_pZ.g_qH(1,1,1,1),this.g_pU.g_qI(0),this.g_p$.g_qI(1),this.g_pV.g_qJ(0,0),this.g_pW.g_qJ(1,1),this.g_pX.g_qJ(0,0),this.g_pY.g_qJ(0,0),this.g_qa.g_qJ(0,0),this.g_qb.g_qJ(1,1),this.g_qc.g_qJ(0,0),this.g_qd.g_qJ(0,0),this.g_qe.g_qJ(0,0),this.g_qf.g_qJ(0,0),this.g_qg.g_qJ(0,0),this.g_qi.g_qK(1),this.g_qj.g_qK(0),this.g_qh.g_qK(0),this.g_qk.g_qJ(0,0),this.g_ql.g_qJ(0,0),this.g_p_.g_qK(1);for(const g of i){const _=g[0],e=g[2],a=new g_bz.g_ob.g_pR(this,_,e);"color"===e?a.g_qL(0,0,0):a.g_qK(0),this.g_qB.push(a)}this.g_pL?this.g_qM(e.g_qN):(this.g_qO(e.g_qN,!0),this.g_qP(e.g_qQ,!0));const u=e.g_qR;o.useProgram(u?u.g_pK:null)}g_eJ(){this.g_pI.deleteProgram(this.g_pK),this.g_pK=null,this.g_om.g_qS(this),this.g_pI=null,this.g_om=null}g_qT(){return this.g_pJ}g_qU(){return this.g_pI}g_qV(){return this.g_pK}g_qW(){return this.g_qC}g_qX(){return this.g_qs}g_qY(){return this.g_qu}g_qZ(){return this.g_qw}g_q_(){return 0!==this.g_qo||0!==this.g_qq}g_q$(){return this.g_qo}g_ra(){return this.g_qq}g_rb(){return this.g_qD}g_rc(){return this.g_qE}g_rd(){return this.g_qB.length}g_re(g){return this.g_qB[g].g_rf()}g_rg(g){for(let _=0,e=g.length;_{const _=g.font.g_qT();for(const e of d)(e.g_tg()||g_bz.g_d$(e.g_th(),_))&&e.g_ti()}),g_bz.g_ob.g_tj=class{constructor(g,_){_=Object.assign({},t,_),this.g_om=g,this.g_tk="Arial",this.g_tl=16,this.g_tm=0,this.g_tn=!1,this.g_to=!1,this.g_tp="black",this.g_tq=!1,this.g_tr=null,this.g_ts=new Set,this.g_tt="left",this.g_tu="top",this.g_tv="",this.g_tw=null,this.g_tx=g_bz.g_eI(g_bz.g_nS),this.g_ty="word",this.g_tz=!1,this.g_tA=!1,this.g_tB=!0,this.g_tC=-1,this.g_tD=0,this.g_tE=0,this.g_tF=0,this.g_oo=0,this.g_op=0,this.g_tG=1,this.g_tH=!1,this.g_tI=null,this.g_tJ=null,this.g_tK=null,this.g_tL=-1,this.g_tM=-1,this.g_tN="",this.g_tO="",this.g_tP="",this.g_tQ=1,this.g_tR=1,this.g_tS=(g,_)=>this.g_tT(g,_),this.g_on=null,this.g_tU=0,this.g_tV=0,this.g_tW=new g_bz.Rect,this.g_tX=1,this.g_tY=!1,this.g_tZ=new g_bz.g_lg(()=>{this.g_t_(),this.g_t$(8,8)},_.timeout),this.g_ua=null,this.g_ub=!1,d.add(this)}g_eJ(){this.g_tr=null,this.g_ts.clear(),this.g_tw=null,this.g_tI=null,this.g_tJ=null,this.g_tK=null,this.g_tS=null,this.g_tZ.g_eJ(),this.g_ua=null,this.g_t_(),this.g_tx.g_jx(),this.g_tx=null,this.g_om=null,this.g_ub=!0,d.delete(this)}g_uc(){this.g_tH=!0}g_ti(){this.g_uc(),this.g_tx.g_jx(),this.g_tz=!0}g_ud(g){this.g_tB=!!g}g_ue(){return this.g_tB}g_uf(g){g=!!g,this.g_tq===g||(this.g_tq=g,this.g_tJ&&(this.g_tJ.textBaseline=this.g_tq?"alphabetic":"top"),this.g_ti())}g_tg(){return this.g_tq}g_ug(g){g||(g="serif"),this.g_tk===g||(this.g_tk=g,this.g_ti())}g_th(){return this.g_tk}g_uh(g){.1>g&&(g=.1),this.g_tl===g||(this.g_tl=g,this.g_ti())}g_ui(g){this.g_tm===g||(this.g_tm=g,this.g_uc())}g_uj(g){g=!!g,this.g_tn===g||(this.g_tn=g,this.g_ti())}g_uk(g){g=!!g,this.g_to===g||(this.g_to=g,this.g_ti())}g_ul(g){g=Math.floor(g),this.g_tC===g||(this.g_tC=g,this.g_uc())}g_um(){return this.g_tC}g_un(g,_){for(let e=g.length-1;0<=e;--e){const a=g[e];if(a.tag===_)return a}return null}g_uo(g,_){return!!this.g_un(g,_)}g_up(_,a){let n="";(this.g_tn||this.g_uo(a,"b"))&&(n+="bold"),(this.g_to||this.g_uo(a,"i"))&&(n+=" italic");const t=this.g_un(a,"size"),i=t?parseFloat(t.param):this.g_tl;n+=_?" "+i+"pt":" "+i*this.g_tX*this.g_tG*self.devicePixelRatio+"pt";let e=this.g_tk;const o=this.g_un(a,"font");return o&&o.param&&(e=o.param,this.g_tr&&!this.g_ts.has(e)&&(this.g_tr(e),this.g_ts.add(e))),e&&(n+=" \""+e+"\""),n}g_uq(g){g instanceof g_bz.g_gP&&(g=g.g_hn()),this.g_tp===g||(this.g_tp=g,this.g_uc())}g_ur(g,_,e){o.g_gV(g,_,e),this.g_uq(o)}g_us(g){if(!e.has(g))throw new Error("invalid horizontal alignment");this.g_tt===g||(this.g_tt=g,this.g_uc())}g_ut(g){if(!r.has(g))throw new Error("invalid vertical alignment");this.g_tu===g||(this.g_tu=g,this.g_uc())}g_uu(_){if(!g.has(_))throw new Error("invalid word wrap mode");this.g_ty===_||(this.g_ty=_,this.g_ti())}g_uv(g){this.g_tv===g||(this.g_tv=g,this.g_ti())}g_uw(_,a,n){var t=Math.min;if("undefined"==typeof n&&(n=1),0>=_||0>=_)return;if(this.g_tE===_&&this.g_tF===a&&this.g_tG===n)return;1===this.g_tG!=(1===n)&&(this.g_tY=!0);const o=this.g_tE,e=this.g_tG;this.g_tE=_,this.g_tF=a,this.g_tG=n;const r=self.devicePixelRatio;this.g_oo=this.g_tE*this.g_tG*r,this.g_op=this.g_tF*this.g_tG*r;const g=Math.max(this.g_oo,this.g_op),d=t(this.g_om.g_oz(),2048);let i=1;g>d&&(i=d/g,this.g_oo=t(this.g_oo*i,d),this.g_op=t(this.g_op*i,d)),this.g_tX=i,0=this.g_oo||0>=this.g_op||(this.g_tH=!1,this.g_tA=!0,this.g_tB?g_bz.g_gz(()=>this.g_uB()):this.g_uB())}g_uB(){var g=Math.ceil;this.g_ub||(this.g_t$(g(this.g_oo),g(this.g_op)),this.g_uy(),this.g_uC(),this.g_uD(),this.g_tZ.g_ll(),this.g_tA=!1)}g_t$(g,_){this.g_tI||(this.g_tI=g_bz.g_gy(16,16));let e=!1;(this.g_tL!==g||this.g_tM!==_)&&(this.g_tL=g,this.g_tM=_,this.g_tI.width=g,this.g_tI.height=_,e=!0),this.g_tJ||(this.g_tJ=this.g_tI.getContext("2d"),e=!0),e?(this.g_tJ.textBaseline=this.g_tq?"alphabetic":"top",this.g_tJ.font=this.g_tN,this.g_tJ.fillStyle=this.g_tP,this.g_tJ.strokeStyle=this.g_tP):this.g_tJ.clearRect(0,0,g,_)}g_uE(){this.g_tK||(this.g_tK=g_bz.g_gy(16,16).getContext("2d"))}g_uF(g){this.g_tO===g||(this.g_tO=g,this.g_tK.font=g)}g_uy(){this.g_tz&&(this.g_uE(),this.g_tq&&(!this.g_tw||this.g_tw.toString()!==this.g_tv)&&(this.g_tw=new g_bz.g_en(this.g_tv,{g_nC:!0})),this.g_tx.g_nS(this.g_tq?this.g_tw.g_nN():this.g_tv,this.g_tS,this.g_tE,this.g_ty),this.g_tz=!1)}g_tT(g,_){this.g_uF(this.g_up(!0,_));const a=this.g_un(_,"size"),t=a?parseFloat(a.param):this.g_tl;return{width:this.g_tK.measureText(g).width,height:n(t)}}g_uG(g){this.g_tN===g||(this.g_tN=g,this.g_tJ.font=g)}g_uH(g){this.g_tP===g||(this.g_tP=g,this.g_tJ.fillStyle=g,this.g_tJ.strokeStyle=g)}g_uI(g){this.g_tQ===g||(this.g_tQ=g,this.g_tJ.globalAlpha=g)}g_uJ(g){this.g_tR===g||(this.g_tR=g,this.g_tJ.lineWidth=g)}g_uC(){var _=Math.max;this.g_tD=0;const t=this.g_tX*this.g_tG*self.devicePixelRatio,a=n(this.g_tl)*t,i=(4+this.g_tm)*t,e=a+i;let o=0;const r=this.g_tx.g_nU();"center"===this.g_tu?o=_(this.g_op/2-r.length*e/2,0):"bottom"===this.g_tu&&(o=_(this.g_op-r.length*e-2,0));for(let g=0,_=r.length;g<_;++g){const _=r[g],e=_.height*t;if(this.g_tq){if(o+=e,0this.g_op-i)break;}else if(0=this.g_op-(e+i))break;let a=0;"center"===this.g_tt?a=(this.g_oo-_.width*t)/2:"right"===this.g_tt&&(a=this.g_oo-_.width*t),this.g_uK(_,a,o,t),this.g_tq||(o+=e),o+=i}}g_uK(g,_,a,n){for(const t of g.g_nX)this.g_uL(t,_,a,n,g.height),_+=t.width*n}g_uL(t,M,T,b,u){const f=this.g_tJ,h=u/16;let i=t.width*b;const E=t.height*b,N=t.height/16,l=(4+this.g_tm)*b,m=t.g_nO;let n=t.text;if(-1!==this.g_tC){if(this.g_tD>=this.g_tC)return;this.g_tD+n.length>this.g_tC&&(n=n.substr(0,this.g_tC-this.g_tD),i=this.g_tT(n,m).width*b),this.g_tD+=n.length}const y=this.g_un(m,"background"),p=this.g_uo(m,"u"),I=this.g_uo(m,"s");if((!g_bz.g_mQ(n)||y||p||I)&&!this.g_uo(m,"hide")){const e=this.g_un(m,"offsetx");M+=e?parseFloat(e.param)*b:0;const o=this.g_un(m,"offsety");T+=o?parseFloat(o.param)*b:0,y&&(this.g_uH(y.param),f.fillRect(M,T-E,i,E+l));const g=this.g_un(m,"color");this.g_uH(g?g.param:this.g_tp);const r=this.g_un(m,"opacity");this.g_uI(r?parseFloat(r.param)/100:1);const t=this.g_uo(m,"stroke");if(t&&this.g_uJ(N*this.g_tX*this.g_tG),p&&a(f,t,M,T+b*h,i,b*h),I&&a(f,t,M,T-E/4,i,b*N),this.g_uG(this.g_up(!1,m)),_(f,t,n,M,T,i),!t){this.g_uJ(N*this.g_tX*this.g_tG);const g=this.g_un(m,"outline");g&&(this.g_uH(g.param),_(f,!0,n,M,T,i))}}}g_uD(){var g=Math.ceil;this.g_om.g_uM()||(this.g_tU=g(this.g_oo),this.g_tV=g(this.g_op),this.g_tW.set(0,0,this.g_oo/this.g_tU,this.g_op/this.g_tV),this.g_tY&&(this.g_t_(),this.g_tY=!1),!this.g_on&&(this.g_on=this.g_om.g_pg(this.g_tU,this.g_tV,{g_oi:1===this.g_tG,g_oj:"high"})),this.g_om.g_uN(this.g_tI,this.g_on),this.g_ua&&this.g_ua())}g_uO(){return this.g_tW}g_t_(){this.g_on&&(!this.g_om.g_uM()&&this.g_om.g_pk(this.g_on),this.g_on=null)}static g_oV(){for(const g of d)g.g_t_()}static g_uP(){return d.values()}}}{class g{constructor(g){this.g_pI=g.g_oA(),this.g_uQ=g.g_oB(),this.g_uR=g.g_uS(),this.g_uT=null,this.g_lk=!1,this.g_uU=!1,this.g_uV=0,this.g_uT=1===this.g_uQ?this.g_uR.createQueryEXT():this.g_pI.createQuery()}g_eJ(){this.g_uW(),this.g_pI=null,this.g_uR=null,this.g_uU=!1}g_uW(){this.g_uT&&(1===this.g_uQ?this.g_uR.deleteQueryEXT(this.g_uT):this.g_pI.deleteQuery(this.g_uT),this.g_uT=null)}g_sY(){if(this.g_lk)throw new Error("query already active");1===this.g_uQ?this.g_uR.beginQueryEXT(this.g_uR.TIME_ELAPSED_EXT,this.g_uT):this.g_pI.beginQuery(this.g_uR.TIME_ELAPSED_EXT,this.g_uT),this.g_lk=!0}g_s$(){if(!this.g_lk)throw new Error("query not active");1===this.g_uQ?this.g_uR.endQueryEXT(this.g_uR.TIME_ELAPSED_EXT):this.g_pI.endQuery(this.g_uR.TIME_ELAPSED_EXT),this.g_lk=!1}g_uX(){if(!this.g_uT||this.g_uU||this.g_lk)return;let g=!1;g=1===this.g_uQ?this.g_uR.getQueryObjectEXT(this.g_uT,this.g_uR.QUERY_RESULT_AVAILABLE_EXT):this.g_pI.getQueryParameter(this.g_uT,this.g_pI.QUERY_RESULT_AVAILABLE);const _=this.g_pI.getParameter(this.g_uR.GPU_DISJOINT_EXT);g&&!_&&(this.g_uV=1===this.g_uQ?this.g_uR.getQueryObjectEXT(this.g_uT,this.g_uR.QUERY_RESULT_EXT):this.g_pI.getQueryParameter(this.g_uT,this.g_pI.QUERY_RESULT),this.g_uV/=1e9,this.g_uU=!0),(g||_)&&this.g_uW()}g_uY(){return this.g_uU}g_uZ(){if(!this.g_uU)throw new Error("no result available");return this.g_uV}}g_bz.g_ob.g_u_=class{constructor(g){this.g_om=g,this.g_u$=g.g_va(),this.g_lk=!1,this.g_vb=null,this.g_vc=!1,this.g_vd=null,this.g_ve=[]}g_eJ(){for(const _ of this.g_ve)_ instanceof g&&_.g_eJ();g_bz.g_fR(this.g_ve),this.g_vb=null,this.g_vd=null,this.g_om=null}g_sY(){if(this.g_lk)throw new Error("query already active");const g=this.g_om.g_vf();0g.g_uY())}g_uZ(){return this.g_ve.reduce((g,_)=>g+_.g_uZ(),0)}g_va(){return this.g_u$}}}"use strict",g_bz.g_ob.g_vj=class{constructor(g,_=1e3){this.g_om=g,this.g_vk=_,this.g_vl=[],this.g_om.g_vm(this)}g_eJ(){this.g_jx(),this.g_om.g_vn(this),this.g_om=null}g_jx(){for(const g of this.g_vl)g.g_eJ();g_bz.g_fR(this.g_vl)}g_vo(){const g=new g_bz.g_ob.g_u_(this.g_om);if(this.g_vl.push(g),this.g_vl.length>this.g_vk){const g=this.g_vl.shift();g.g_eJ()}return g}g_vp(g){for(const _ of this.g_vl){if(_.g_va()>=g)return;if(_.g_vi())return;_.g_uX()}}g_vq(g,_){if(_<=g)return NaN;let e=0;for(const a of this.g_vl){if(a.g_va()>=_)break;if(!(a.g_va()"],[_.g_rz(),u,""],[_.g_rC(),_.g_rB(),""],[_.g_rD(),u,""],[_.g_rE(),u,""],[_.g_rG(),u,""],[_.g_rH(),u,""],[_.g_rI(),u,""],[_.g_rJ(),u,""],[_.g_rF(),u,""],[_.g_rA(),_.g_ry(this.g_vS,!0),""]],s=await Promise.all(o.map(g=>this.g_w_({src:g[0]},g[1],g[2])));this.g_wj=s[0],this.g_wk=s[1],this.g_sK=s[2],this.g_wl=s[3],this.g_wm=s[4],this.g_wn=s[5],this.g_wo=s[6],this.g_wp=s[7],this.g_wq=s[8],this.g_wr=s[9],this.g_ws=s[10],this.g_wJ.clear(),this.g_wK=null,this.g_w$()}g_wY(){const g=this.g_wa;for(let _=0,e=0;12e3>_;)g[_++]=e,g[_++]=e+1,g[_++]=e+2,g[_++]=e,g[_++]=e+2,g[_++]=e+3,e+=4}g_pN(){return this.g_vS?3:2}g_vA(g){this.g_wx=g,this.g_wK=null}g_xa(){return this.g_wx}async g_w_(g,_,e){const n=await g_bz.g_ob.g_pC.g_pG(this,g,_,e);return this.g_ss.push(n),this.g_wh.set(n.g_qT(),n),n}g_xb(g){return this.g_wh.get(g)||null}g_xc(){return this.g_wj}g_xd(){this.g_wi=null}g_qS(g){const _=this.g_ss.indexOf(g);-1!==_&&this.g_ss.splice(_,1),this.g_wh.delete(g.g_qT())}g_xe(g,_,e,t,a){const i=this.g_vY,n=this.g_vX;for(let i=0,n=m.length;i=this.g_wg&&(this.g_pH(),g=0),1===this.g_wv)this.g_wt[this.g_wu-1].g_sa+=6;else{const _=this.g_xp();_.g_sg(this.g_vS?g:3*(g/2),6),this.g_wv=1}}g_xI(g){g.g_iU(this.g_v$,this.g_wd,this.g_wx),this.g_wd+=12}g_iC(g){this.g_xH(),this.g_xI(g),b.g_hf(this.g_wb,this.g_we),this.g_we+=8}g_xG(g,e,n,t,a,i,_,r){this.g_xH();const o=this.g_v$;let s=this.g_wd;const l=this.g_wx;this.g_vS?(o[s++]=g,o[s++]=e,o[s++]=l,o[s++]=n,o[s++]=t,o[s++]=l,o[s++]=a,o[s++]=i,o[s++]=l,o[s++]=_,o[s++]=r,o[s++]=l):(o[s++]=g,o[s++]=e,o[s++]=n,o[s++]=t,o[s++]=a,o[s++]=i,o[s++]=_,o[s++]=r),this.g_wd=s,b.g_hf(this.g_wb,this.g_we),this.g_we+=8}g_xJ(g,_){this.g_xH(),this.g_xI(g),_.g_ig(this.g_wb,this.g_we),this.g_we+=8}g_xK(g,_){this.g_xH(),this.g_xI(g),_.g_hf(this.g_wb,this.g_we),this.g_we+=8}g_xL(g,c){var t=Math.max,r=Math.min;if(mat4.g_r(i,this.g_vZ),vec3.g_r(_,this.g_vV),vec3.g_r(n,this.g_vW),this.g_vV[0]=0,this.g_vV[1]=0,this.g_vV[2]=100*self.devicePixelRatio,this.g_vW[0]=0,this.g_vW[1]=0,this.g_vW[2]=0,this.g_xk(),this.g_xo(),this.g_sB){const g=this.g_sE/2,_=this.g_sF/2;d.set(-g,_,-g+this.g_sE,_-this.g_sF),T.g_iV(d),d.set(0,0,this.g_sE/this.g_oo,this.g_sF/this.g_op),this.g_xJ(T,d)}else if("crop"===g&&this.g_ww&&c){const g=this.g_oo/2,e=this.g_op/2,a=c.g_oR(),n=c.g_oS(),_=this.g_ww.g_oR(),i=this.g_ww.g_oS(),o=r(_,a),s=r(i,n),u=t(n-i,0),l=t(i-n,0);d.set(-g,e-l,-g+o,e-s-l),T.g_iV(d),d.set(0,u,o,s+u),d.g_P(a,n),this.g_xJ(T,d)}else{let[g,_]=this.g_xM(this.g_ww);const e=g/2,n=_/2;this.g_xF(-e,n,e,-n)}mat4.g_r(this.g_vY,i),vec3.g_r(this.g_vV,_),vec3.g_r(this.g_vW,n),this.g_xo()}g_xN(g){const _=g.length/2;if(3>_)throw new Error("need at least 3 points");const e=_-2,d=g[0],a=g[1];for(let n=0;n=this.g_wD.length)throw new Error("cannot pop last line width - check push/pop pairs");this.g_wD.pop(),this.g_wC=this.g_wD[this.g_wD.length-1]}g_yh(){this.g_wE=0,this.g_wF[this.g_wF.length-1]=0}g_yi(){this.g_wE=1,this.g_wF[this.g_wF.length-1]=0}g_yj(){this.g_wE=2,this.g_wF[this.g_wF.length-1]=0}g_yk(g){if("butt"===g)this.g_yl();else if("square"===g)this.g_ym();else if("zag"===g)this.g_yn();else throw new Error("invalid line cap")}g_yl(){if(100<=this.g_wF.length)throw new Error("pushed too many line caps - check push/pop pairs");this.g_wF.push(0),this.g_wE=0}g_ym(){if(100<=this.g_wF.length)throw new Error("pushed too many line caps - check push/pop pairs");this.g_wF.push(1),this.g_wE=1}g_yn(){if(100<=this.g_wF.length)throw new Error("pushed too many line caps - check push/pop pairs");this.g_wF.push(2),this.g_wE=2}g_yo(){if(1>=this.g_wF.length)throw new Error("cannot pop last line cap - check push/pop pairs");this.g_wF.pop(),this.g_wE=this.g_wF[this.g_wF.length-1]}g_yp(g){this.g_wG=g,this.g_wH[this.g_wH.length-1]=g}g_yq(){return this.g_wG}g_yr(g){if(100<=this.g_wH.length)throw new Error("pushed too many line offsets - check push/pop pairs");this.g_wH.push(g),this.g_wG=g}g_ys(){if(1>=this.g_wH.length)throw new Error("cannot pop last line offset - check push/pop pairs");this.g_wH.pop(),this.g_wG=this.g_wH[this.g_wH.length-1]}g_yt(g){if(!this.g_wI.g_n(g)){this.g_wI.g_r(g);const _=this.g_xp();_.g_sG(g),this.g_wv=0}}g_yu(g,_,e,t){7996<=this.g_wf&&this.g_pH();let a=this.g_wf;if(2===this.g_wv)this.g_wt[this.g_wu-1].g_sa++;else{const g=this.g_xp();g.g_sI(a),this.g_wv=2}const o=this.g_wc;o[a++]=g,o[a++]=_,o[a++]=e,o[a++]=t,this.g_wf=a}g_vy(g){if(this.g_wi!==g){const _=this.g_xp();_.g_sL(g),this.g_wi=g,this.g_wv=0,this.g_wK=null}}g_w$(){this.g_vy(this.g_wj)}g_yv(){this.g_vy(this.g_wk)}g_yw(){this.g_vy(this.g_wl)}g_yx(){this.g_vy(this.g_wm)}g_yy(g){const _=this.g_xp();_.g_sm(g),this.g_wv=0}g_yz(){this.g_vy(this.g_wn)}g_yA(){this.g_vy(this.g_wo)}g_yB(){this.g_vy(this.g_wp)}g_yC(){this.g_vy(this.g_wq)}g_yD(g,_,e=1){const n=this.g_xp();n.g_ta(g,_,e),this.g_wv=0}g_yE(){this.g_vy(this.g_wr)}g_yF(){this.g_vy(this.g_ws)}g_yG(g,e,t,o,a,i,n){if(this.g_wi!==this.g_ws)throw new Error("must set tilemap fill mode first");const _=this.g_xp();_.g_tc(g,e,t,o,a,i,n),this.g_wv=0}g_yH(g,e,t,r,a,i,n,_,l,o,d){const h=this.g_wi,u=h.g_qm,s=!!d.length;if(u&&!h.g_rk(e,t,r,a,i,n,_,l,o)||s&&!h.g_rg(d)){const c=this.g_xp();if(c.g_sN(),u){h.g_rn(e,t,r,a,i,n,_,l,o);const d=c.g_sc;d[0]=i,d[1]=n,e.g_hf(d,2),d[6]=_,d[7]=l,t.g_hf(d,12);const s=c.g_sd;a.g_hf(s,0);const u=s[1];s[1]=s[3],s[3]=u,r.g_hf(c.g_se,0),c.g_r$=o,c.g_sb=h.g_p$.g_qn()?g?g.g_pp():null:null}s&&(h.g_ri(d),g_bz.g_fV(c.g_sf,d)),this.g_wv=0}}g_yI(g,_,e,n){const t=this.g_xp();t.g_sz(g,_,e,n),this.g_wv=0}g_jx(g){const _=this.g_xp();_.g_sy(g),this.g_wv=0}g_yJ(g,_,e,n){this.g_yK(g,_,e,n,0,0,0,0)}g_yL(g){this.g_yK(g.g_ic(),g.g_id(),g.width(),g.height(),0,0,0,0)}g_yM(g,_){this.g_yK(g.g_ic(),g.g_id(),g.width(),g.height(),_.g_ha(),_.g_hb(),_.g_hc(),_.g_hd())}g_yK(g,e,t,i,n,_,r,d){if(!(0>t||0>i)){const o=this.g_xp();o.g_sC(g,e,t,i,n,_,r,d),this.g_wv=0}}g_yN(){this.g_pH(),this.g_pI.flush(),this.g_u$++}g_yO(){for(const g of this.g_wW)g.g_vp(this.g_u$)}g_uM(){return!this.g_pI||this.g_pI.isContextLost()||this.g_wT}g_oV(){g_bz.g_ob.g_ol.g_oV(),g_bz.g_ob.g_o_.g_oV(),g_bz.g_ob.g_tj.g_oV();for(const g of this.g_wW)g.g_jx();this.g_wR=[],this.g_uR=null,this.g_wU=null,this.g_wP="(unavailable)",this.g_wQ="(unavailable)",this.g_wi=null,this.g_wj=null,this.g_wk=null,this.g_wl=null,this.g_wm=null,this.g_wn=null,this.g_wo=null,this.g_wp=null,this.g_wq=null,this.g_wr=null,this.g_sK=null,this.g_ws=null;for(const g of this.g_ss)g.g_eJ();g_bz.g_fR(this.g_ss),this.g_wh.clear()}async g_yP(){this.g_wT=!0,await this.g_wZ(),this.g_wT=!1,this.g_uw(this.g_oo,this.g_op,!0)}g_yQ(g,_){if(this.g_uM())throw new Error("context lost");this.g_pH();const e=g_bz.g_eI(g_bz.g_ob.g_ol,this);return e.g_oy(g,_),e}g_yR(g,_){return this.g_uM()?Promise.reject("context lost"):(_=Object.assign({},_),g_bz.g_cI.g_cN&&(this.g_oC()||!_.g_oe)?(_.g_cO=!1,createImageBitmap(g,{premultiplyAlpha:"premultiply"}).then(g=>g_bz.g_gz(()=>this.g_yQ(g,_)))):g_bz.g_cI.ImageBitmap?createImageBitmap(g).then(g=>g_bz.g_gz(()=>this.g_yQ(g,_))):g instanceof Blob?g_bz.g_gx(g,!0).then(g=>this.g_yR(g,_)):"undefined"!=typeof HTMLImageElement&&g instanceof HTMLImageElement&&"function"==typeof g.decode?g.decode().then(()=>g_bz.g_gz(()=>this.g_yQ(g,_))):g_bz.g_gz(()=>this.g_yQ(g,_)))}g_pg(g,_,e){this.g_pH();const n=g_bz.g_eI(g_bz.g_ob.g_ol,this);return n.g_oG(g,_,e),n}g_uN(g,_,e){this.g_pH(),_.g_oJ(g,e)}g_pk(g){g&&(g.g_oP(),0=_||0>=e)throw new Error("invalid size");this.g_pH();const o=g_bz.g_eI(g_bz.g_ob.g_o_,this);return o.g_pf(_,e,Object.assign({g_oY:n},g)),this.g_ww=null,this.g_r_.g_pl=null,o}g_yT(g){if(g===this.g_ww)return;let e,o,d,u;g?(g.g_pt()&&g.g_pj(this.g_oo,this.g_op),d=g.g_oR(),u=g.g_oS(),e=d,o=u):(d=this.g_oo,u=this.g_op,e=this.g_sv(),o=this.g_sw());const s=this.g_vT!==d||this.g_vU!==u;s&&this.g_xf(e,o,d,u);const n=this.g_xp();n.g_st(g,s,this.g_vX),this.g_ww=g,this.g_wv=0}g_yU(){return this.g_ww}g_xM(g){return g?[g.g_oR(),g.g_oS()]:[this.g_oo,this.g_op]}g_yV(g,_="stretch"){if(2>this.g_uQ||this.g_ww&&0this.g_uQ)){const _=this.g_xp();_.g_sS(g.g_pn()),this.g_wv=0}}g_yY(g){this.g_yT(null),this.g_pH();const _=g.g_pp();_===this.g_wz&&(this.g_pI.bindTexture(this.g_pI.TEXTURE_2D,null),this.g_wz=null),_===this.g_sR&&(this.g_pI.activeTexture(this.g_pI.TEXTURE1),this.g_pI.bindTexture(this.g_pI.TEXTURE_2D,null),this.g_pI.activeTexture(this.g_pI.TEXTURE0),this.g_sR=null),g.g_oK()}async g_pz(g,e){this.g_pH();const t=this.g_ww;let d,u,c;g?(d=g.g_oR(),u=g.g_oS(),c=g.g_pn()):(d=this.g_oR(),u=this.g_oS(),c=null);const f=this.g_pI;f.bindFramebuffer(f.FRAMEBUFFER,c);const _=()=>{f.bindFramebuffer(f.FRAMEBUFFER,null),this.g_ww=null,this.g_r_.g_pl=null,this.g_yT(t)};let l;if(!e&&2<=this.g_oB()){f.bindFramebuffer(f.READ_FRAMEBUFFER,c);const g=f.createBuffer(),e=4*(d*u),a=f.PIXEL_PACK_BUFFER;f.bindBuffer(a,g),f.bufferData(a,e,f.STREAM_READ),f.readPixels(0,0,d,u,f.RGBA,f.UNSIGNED_BYTE,0),f.bindFramebuffer(f.READ_FRAMEBUFFER,null),f.bindBuffer(a,null),_();const n=f.fenceSync(f.SYNC_GPU_COMMANDS_COMPLETE,0);await this.g_pF(()=>f.getSyncParameter(n,f.SYNC_STATUS)===f.SIGNALED),f.deleteSync(n),l=new ImageData(d,u),f.bindBuffer(a,g),f.getBufferSubData(a,0,new Uint8Array(l.data.buffer),0,e),f.bindBuffer(a,null),f.deleteBuffer(g)}else l=new ImageData(d,u),f.readPixels(0,0,d,u,f.RGBA,f.UNSIGNED_BYTE,new Uint8Array(l.data.buffer)),_();return l}g_yZ(g){if(this.g_y_()){const _=this.g_xp();_.g_sW(g),this.g_wv=0}}g_y$(g){if(this.g_y_()){const _=this.g_xp();_.g_sZ(g),this.g_wv=0}}g_pF(g){const _=new Promise(_=>o.add({resolve:_,g_vH:g}));return-1===t&&(t=self.requestAnimationFrame(h)),_}g_za(){return this.g_oo*this.g_op*(this.g_vQ.alpha?4:3)}g_zb(){let g=0;for(const _ of g_bz.g_ob.g_o_.g_pA())_.g_pp()||(g+=_.g_oU());return g}g_zc(){let g=0;for(const _ of g_bz.g_ob.g_ol.g_oW())g+=_.g_oU();return g}g_zd(){return this.g_za()+this.g_zb()+this.g_zc()}g_ze(){return this.g_vR}g_oB(){return this.g_uQ}g_oC(){return 2<=this.g_oB()}g_oz(){return this.g_wL}g_zf(){return this.g_wM}g_zg(){return this.g_wN}g_zh(){return 0!==this.g_wO}g_zi(){return this.g_wO}g_zj(){return this.g_wP}g_zk(){return this.g_wQ}g_zl(){return this.g_wR}g_oI(){return this.g_wS}g_y_(){return!!this.g_uR}g_uS(){return this.g_uR}g_pE(){return this.g_wU}g_vm(g){this.g_wW.add(g)}g_vn(g){this.g_wW.delete(g)}g_vf(){return this.g_wX}g_va(){return this.g_u$}g_zm(){this.g_u$++}g_oA(){return this.g_pI}g_zn(g){const _=this.g_pI;let e=_.ONE,n=_.ONE_MINUS_SRC_ALPHA;switch(g){case"normal":e=_.ONE,n=_.ONE_MINUS_SRC_ALPHA;break;case"additive":e=_.ONE,n=_.ONE;break;case"copy":e=_.ONE,n=_.ZERO;break;case"destination-over":e=_.ONE_MINUS_DST_ALPHA,n=_.ONE;break;case"source-in":e=_.DST_ALPHA,n=_.ZERO;break;case"destination-in":e=_.ZERO,n=_.SRC_ALPHA;break;case"source-out":e=_.ONE_MINUS_DST_ALPHA,n=_.ZERO;break;case"destination-out":e=_.ZERO,n=_.ONE_MINUS_SRC_ALPHA;break;case"source-atop":e=_.DST_ALPHA,n=_.ONE_MINUS_SRC_ALPHA;break;case"destination-atop":e=_.ONE_MINUS_DST_ALPHA,n=_.SRC_ALPHA;break;default:throw new Error("invalid blend name");}return{g_zo:e,g_zp:n}}g_zq(g){const _=this.g_pI;let e=_.ONE,n=_.ONE_MINUS_SRC_ALPHA;switch(g){case 0:e=_.ONE,n=_.ONE_MINUS_SRC_ALPHA;break;case 1:e=_.ONE,n=_.ONE;break;case 3:e=_.ONE,n=_.ZERO;break;case 4:e=_.ONE_MINUS_DST_ALPHA,n=_.ONE;break;case 5:e=_.DST_ALPHA,n=_.ZERO;break;case 6:e=_.ZERO,n=_.SRC_ALPHA;break;case 7:e=_.ONE_MINUS_DST_ALPHA,n=_.ZERO;break;case 8:e=_.ZERO,n=_.ONE_MINUS_SRC_ALPHA;break;case 9:e=_.DST_ALPHA,n=_.ONE_MINUS_SRC_ALPHA;break;case 10:e=_.ONE_MINUS_DST_ALPHA,n=_.SRC_ALPHA;break;default:throw new Error("invalid blend index");}return{g_zo:e,g_zp:n}}g_zr(){return g_bz.g_eI(g_bz.g_ob.g_tj,this)}}}{const g=new Set(["local","remote"]);g_bz.g_zs=class extends g_bz.g_eG{constructor(_,e){if(super(),!g.has(e.g_zt))throw new Error("invalid load policy");if(this.g_zu=_,this.g_zv=new Map,this.g_zw=new Map,this.g_zx=!!e.g_zy,this.g_zz=!!e.g_zA,this.g_zB=e.g_zC||{},this.g_zD=new Map,this.g_zE=!1,this.g_zF="",this.g_zG="",this.g_zH="",this.g_zI=e.g_zt,this.g_zJ=[],this.g_zK=new Map,this.g_zL=[],this.g_zM=[],this.g_zN=!1,this.g_zO=0,this.g_zP=0,this.g_zQ=0,this.g_zR=!1,this.g_zS=g_bz.g_eI(g_bz.g_mv,()=>this.g_zT(),50),this.g_zU=new g_bz.g_mm(Math.max(g_bz.hardwareConcurrency,8)),e.g_zV)for(const[g,_]of Object.entries(e.g_zV))this.g_zv.set(g,_)}g_eJ(){this.g_zv.clear();for(const g of this.g_zw.values())URL.revokeObjectURL(g);this.g_zw.clear();for(const g of this.g_zJ)g.g_eJ();g_bz.g_fR(this.g_zJ),this.g_zK.clear(),g_bz.g_fR(this.g_zM),this.g_zu=null}g_zW(){return this.g_zu}g_zX(g){this.g_zF=g}g_zY(){return this.g_zF}g_zZ(g){this.g_zG=g}g_z_(){return this.g_zG}g_z$(g){this.g_zH=g}g_Aa(){return this.g_zH}g_gq(g){return this.g_gr(g,this.g_zI).then(g=>g_bz.g_gw(g))}g_gr(g,_){_=_||this.g_zI;const e=this.g_zv.get(g);return e?Promise.resolve(e):this.g_zx&&g_bz.g_gm(g)?this.g_Ab(g):"local"===_?this.g_zU.g_jG(()=>g_bz.g_gr(g)):g_bz.g_gr(g)}g_Ac(g){return this.g_zv.has(g)}g_Ad(g,_){return this.g_zu.g_Ae("runtime","cordova-fetch-local-file",{filename:g,as:_})}g_Af(g){return this.g_Ad(g,"text")}g_Ab(g){return this.g_Ad(g,"blob")}g_Ag(g){return this.g_Ad(g,"blob-url")}g_Ah(g){return this.g_Ad(g,"buffer")}g_Ai(g){const _=this.g_zv.get(g);if(!_)return g;let e=this.g_zw.get(_);return e||(e=URL.createObjectURL(_),this.g_zw.set(_,e)),e}g_Aj(g){return this.g_zu.g_Ak()?this.g_Ai(g.toLowerCase()):this.g_zF+g}g_Al(g){return this.g_zu.g_Ak()?this.g_Ai(g.toLowerCase()):g}g_Am(g){return this.g_zu.g_Ak()?Promise.resolve(this.g_Ai(g.toLowerCase())):this.g_zx?this.g_Ag(g.toLowerCase()):Promise.resolve(g.toLowerCase())}g_An(_){if(_.g_Ao&&!g.has(_.g_Ao))throw new Error("invalid load policy");let e=this.g_zK.get(_.url);return e?e:(e=g_bz.g_eI(g_bz.g_Ap,this,{url:_.url,size:_.size||0,g_Ao:_.g_Ao||this.g_zI}),this.g_zJ.push(e),this.g_zK.set(e.g_Aq(),e),this.g_zN||(this.g_zO+=e.g_jA(),this.g_zM.push(e.g_Ar().then(()=>this.g_As(e.g_jA())))),e)}async g_At(){try{await Promise.all(this.g_zM),this.g_zQ=1}catch(g){console.error("Error loading: ",g),this.g_zR=!0,this.g_zT()}}g_Au(){this.g_zN=!0}g_Av(){return this.g_zR}g_As(g){this.g_zP+=g,this.g_zS.g_mJ()}g_zT(){const g=g_bz.g_eI(g_bz.Event,"loadingprogress");this.g_zQ=g_bz.g_eM(this.g_zP/this.g_zO,0,1),g.g_Aw=this.g_zQ,this.g_zu.g_kS().dispatchEvent(g)}g_Ax(){return this.g_zQ}g_Ay(g){g_bz.g_fV(this.g_zL,g),this.g_zL.length&&this.g_zM.push(this.g_Az())}g_Az(){const g=[];for(const[_,e,a]of this.g_zL)this.g_zO+=a,g.push(this.g_AA(_,e).then(()=>this.g_As(a)));return Promise.all(g)}async g_AA(g,_){const e=await this.g_Am(this.g_zG+_),a=new FontFace(g,`url(${e})`);this.g_zu.g_AB()?self.fonts.add(a):document.fonts.add(a),await a.load()}g_AC(g){return!!this.g_zB[g]}g_AD(g,_){this.g_zE=!!_;for(const[n,a,t]of g)this.g_zD.set(n,{fileName:n,g_AE:a.map(g=>({type:g[0],g_AF:g[1],g_AG:n+g[1],fileSize:g[2]})),g_AH:t})}g_AI(g){const _=this.g_zD.get(g.toLowerCase());if(!_)return null;let e=null;for(const a of _.g_AE)if(e||"audio/webm; codecs=opus"!==a.type||(e=a),this.g_AC(a.type))return a;return e}g_AJ(g){const _=this.g_AI(g);return _?{url:this.g_Aj(_.g_AG),type:_.type}:null}g_AK(){if(this.g_zE){const g=[];for(const _ of this.g_zD.values()){if(_.g_AH)continue;const e=this.g_AI(_.fileName);e&&g.push({g_AL:_.fileName,url:this.g_Aj(e.g_AG),type:e.type,fileSize:e.fileSize})}return g}return[]}}}"use strict",g_bz.g_AM=class extends g_bz.g_eG{constructor(g,_){super(),this.g_AN=g,this.g_zu=g.g_zW(),this.g_AO=_.url,this.g_AP=_.size,this.g_AQ=_.g_Ao,this.g_AR=null,this.g_AS=!1,this.g_AT=null}g_eJ(){this.g_AT=null,this.g_AN=null,this.g_zu=null,this.g_AR=null}g_Aq(){return this.g_AO}g_jA(){return this.g_AP}g_Ar(){return"local"===this.g_AQ||this.g_AR?(this.g_AS=!0,Promise.resolve()):this.g_AT?this.g_AT:(this.g_AT=this.g_AN.g_gr(this.g_AO,this.g_AQ).then(g=>{this.g_AS=!0,this.g_AT=null,this.g_AR=g}).catch(g=>console.error("Error loading resource: ",g)),this.g_AT)}g_AU(){return this.g_AS}g_AV(){return this.g_AR?Promise.resolve(this.g_AR):this.g_AN.g_gr(this.g_AO,this.g_AQ)}},"use strict";{const g=new g_bz.g_mm,_=new Set;g_bz.g_Ap=class extends g_bz.g_AM{constructor(g,e){super(g,e),this.g_AW=null,this.g_AX=null,this.g_ox=0,this.g_AY=-1,this.g_AZ=-1,_.add(this)}g_eJ(){if(this.g_t_(),0!==this.g_ox)throw new Error("released image asset which still has texture references");this.g_AW=null,_.delete(this),super.g_eJ()}static g_A_(){for(const g of _)g.g_AW=null,g.g_AX=null,g.g_ox=0}g_A$(_,e){return(this.g_ox++,this.g_AX)?Promise.resolve(this.g_AX):this.g_AW?this.g_AW:(this.g_AW=this.g_AV().then(a=>g.g_jG(()=>_.g_yR(a,e).then(g=>(this.g_AW=null,0===this.g_ox)?(_.g_pk(g),null):(this.g_AX=g,this.g_AY=g.g_oR(),this.g_AZ=g.g_oS(),this.g_AX)))).catch(g=>{throw console.error("Failed to load texture: ",g),g}),this.g_AW)}g_t_(){if(0>=this.g_ox)throw new Error("texture released too many times");if(this.g_ox--,0===this.g_ox&&this.g_AX){const g=this.g_AX.g_oN();g.g_pk(this.g_AX),this.g_AX=null}}g_pp(){return this.g_AX}g_oR(){return this.g_AY}g_oS(){return this.g_AZ}async g_Ba(){const g=await this.g_AV();return g_bz.g_cI.g_cN?await createImageBitmap(g,{premultiplyAlpha:"none"}):g_bz.g_cI.ImageBitmap?await createImageBitmap(g):await g_bz.g_gx(g)}}}{function g(g,_){return g.g_Bc().g_Bb()-_.g_Bc().g_Bb()}g_bz.g_Bd=class extends g_bz.g_eG{constructor(g,_,e){super(),this.g_Be=g,this.g_hK=_,this.g_hL=e,this.g_Bf=[],this.g_Bg=!0,this.g_Bh=new Set,this.g_Bi=!1}g_eJ(){g_bz.g_fR(this.g_Bf),this.g_Bh.clear(),this.g_Be=null}g_ll(){g_bz.g_fR(this.g_Bf),this.g_Bg=!0,this.g_Bh.clear(),this.g_Bi=!1}g_Bj(){this.g_Bg=!1}g_jH(){return!this.g_Bf.length||!(this.g_Bf.length>this.g_Bh.size)&&(this.g_Bk(),!0)}g_Bl(g){return this.g_Bh.has(g)?(this.g_Bh.delete(g),void(0===this.g_Bh.size&&(this.g_Bi=!1))):void(this.g_Bf.push(g),this.g_Bg=1===this.g_Bf.length)}g_lx(g){this.g_Bh.add(g),this.g_Bi=!0,50<=this.g_Bh.size&&this.g_Bk()}g_Bk(){return this.g_Bi?this.g_Bf.length===this.g_Bh.size?void this.g_ll():void(g_bz.g_f_(this.g_Bf,this.g_Bh),this.g_Bh.clear(),this.g_Bi=!1):void 0}g_Bm(){this.g_Bg||(this.g_Bf.sort(g),this.g_Bg=!0)}g_Bn(g){this.g_Bk(),this.g_Bm(),this.g_Bf.length&&g.push(this.g_Bf)}}}"use strict",g_bz.g_Bo=class extends g_bz.g_eG{constructor(g,_){super(),this.g_Bp=g,this.g_Bq=_,this.g_Br=g_bz.g_eI(g_bz.g_jv)}g_eJ(){this.g_Br.g_eJ(),this.g_Br=null}g_Bs(g,_,e){let a=this.g_Br.g_bQ(g,_);return a?a:e?(a=g_bz.g_eI(g_bz.g_Bd,this,g,_),this.g_Br.Set(g,_,a),a):null}g_Bt(g){return Math.floor(g/this.g_Bp)}g_Bu(g){return Math.floor(g/this.g_Bq)}g_Bv(g,_,a){if(_)for(let n=_.g_ic(),t=_.g_ie();n<=t;++n)for(let t=_.g_id(),e=_.g_if();t<=e;++t){if(a&&a.g_iy(n,t))continue;const _=this.g_Bs(n,t,!1);_&&(_.g_lx(g),_.g_jH()&&this.g_Br.g_jy(n,t))}if(a)for(let n=a.g_ic(),t=a.g_ie();n<=t;++n)for(let t=a.g_id(),e=a.g_if();t<=e;++t)_&&_.g_iy(n,t)||this.g_Bs(n,t,!0).g_Bl(g)}g_Bw(g,_){let n=this.g_Bt(g.g_ic());for(const t=this.g_Bu(g.g_id()),a=this.g_Bt(g.g_ie()),e=this.g_Bu(g.g_if());n<=a;++n)for(let g=t;g<=e;++g){const e=this.g_Bs(n,g,!1);e&&e.g_Bn(_)}}g_Bx(g){let _=g.g_ic();for(const n=g.g_id(),a=g.g_ie(),t=g.g_if();_<=a;++_)for(let g=n;g<=t;++g){const e=this.g_Bs(_,g,!1);e&&e.g_Bj()}}},"use strict";{function g(g,_){return g.g_Bc().g_Bb()-_.g_Bc().g_Bb()}const _=new g_bz.Rect,n=new g_bz.g_iC,a=[],t=new g_bz.Rect,e=new g_bz.Rect;g_bz.g_By=class extends g_bz.g_eG{constructor(g,_,e){super(),this.g_Bz=g,this.g_zu=g.g_zW(),this.g_pJ=e[0],this.g_BA=_,this.g_BB=e[2],this.g_BC=!!e[3],this.g_BD=g_bz.g_eI(g_bz.g_gP),this.g_BD.g_hB(e[4].map(g=>g/255)),this.g_BE=!!e[5],this.g_BF=e[6],this.g_BG=e[7],this.g_vv=g_bz.g_eI(g_bz.g_gP,1,1,1,e[8]),this.g_BH=g_bz.g_eI(g_bz.g_gP),this.g_BI=e[9],this.g_BJ=e[10],this.g_BK=e[11],this.g_BL=e[12],this.g_vt=0,this.g_vu=0,this.g_BM=null,this.g_BN=1,this.g_vw=0,this.g_BO=0,this.g_BP=!0,this.g_BQ=g_bz.g_eI(g_bz.Rect),this.g_BR=[],this.g_BS=[],this.g_BT=[],this.g_Bf=[],this.g_BU=!1,this.g_BV=-1,this.g_BW=g_bz.g_eI(g_bz.g_BX,this,e[15]),this.g_BY=null,this.g_BZ=[],this.g_B_=!0,this.g_B$=g_bz.g_eI(g_bz.Rect,0,0,-1,-1),this.g_Ca=g_bz.g_eI(g_bz.Rect,0,0,-1,-1),this.g_Cb(),this.g_BJ&&(this.g_BY=g_bz.g_eI(g_bz.g_Bo,this.g_zu.g_Cc(),this.g_zu.g_Cd()));for(const n of e[14]){const g=this.g_zu.g_Ce(n[1]);this.g_Bz.g_Cf(g),g.g_Cg()||(g.g_Ch(n),g.g_Ci(this.g_BA)),this.g_BS.push(n)}g_bz.g_fV(this.g_BR,this.g_BS)}static g_pG(g,_,e){return g_bz.g_eI(g_bz.g_By,g,_,e)}g_eJ(){this.g_Bz=null,this.g_zu=null}g_Cj(_){const a=this.g_Bz.g_Ck();let n=0;const t=this.g_BS;for(let i=0,g=t.length;ie||(_&&this.g_BJ&&g.g_Bc().g_Cy(),e===this.g_Bf.length-1?this.g_Bf.pop():(this.g_Bf.splice(e,1),this.g_Cv(e)),this.g_B_=!0)}g_Cz(){this.g_Bf.sort(g)}g_CA(){this.g_CB(this.g_CC(),!0)}g_CD(){for(const g of this.g_Bf)g.g_CE().g_Cn()||this.g_zu.g_CF(g);this.g_zu.g_Cp(),g_bz.g_fR(this.g_Bf),this.g_Cv(0)}g_CG(_,a){const n=this.g_zu.g_CH(),t=this.g_zu.g_CI(),o=_.g_CJ();for(const e of this.g_BS){const r=e[0],g=r[0],d=r[1];if(!a.g_iy(g,d))continue;const i=t[e[1]];if(i!==_)if(!o)continue;else if(!_.g_CK(i))continue;const u=this.g_zu.g_Cm(e,this,!1);if(n.g_CL(!0),u.g_CM(),u.g_CN())for(const g of u.siblings())g.g_CM();n.g_CL(!1)}}g_CO(){return this.g_Bf.length}g_CP(){return this.g_Bz}g_qT(){return this.g_pJ}g_CQ(){return this.g_BA}g_CR(){return this.g_BB}g_zW(){return this.g_zu}g_CS(){return this.g_BW}g_CT(){return this.g_BJ}g_CU(){return this.g_BY}g_CV(){this.g_B_=!0}g_CW(){return this.g_BC}g_CX(g){g=!!g,this.g_BC===g||(this.g_BC=g,this.g_zu.g_CY())}g_CZ(){return this.g_BQ}g_xv(){return this.g_vv.g_hd()}g_xx(g){g=g_bz.g_eM(g,0,1),this.g_vv.g_hd()===g||(this.g_vv.g_g_(g),this.g_Cb(),this.g_zu.g_CY())}g_Cb(){this.g_BH.g_r(this.g_vv),this.g_BH.g_hk()}g_C_(){return this.g_BH}g_C$(){return this.g_vv.g_hi(1,1,1,1)}g_Da(){return this.g_BK}g_Db(g){this.g_BK===g||(this.g_BK=g,this.g_zu.g_CY())}g_Dc(){return this.g_BF}g_Dd(){return this.g_BG}g_De(g,_){if((this.g_BF!==g||this.g_BG!==_)&&(this.g_BF=g,this.g_BG=_,this.g_zu.g_CY(),1!==this.g_BF||1!==this.g_BG))for(const g of this.g_Bf)g.g_CE().g_Df(!0)}g_Dg(g){this.g_De(g,this.g_Dd())}g_Dh(g){this.g_De(this.g_Dc(),g)}g_Di(g){this.g_vw=+g}g_Dj(){return this.g_vw}g_Dk(g){this.g_BO=g_bz.g_eN(g)}g_Dl(){return this.g_BP?g_bz.g_eN(this.g_Bz.g_Dl()+this.g_BO):0}g_Dm(){return this.g_BO}g_Dn(){return 0this.g_oo-_&&(g=this.g_oo-_),g<_&&(g=_)}this.g_EO!==g&&(this.g_EO=g,this.g_zu.g_CY())}g_Ex(){return this.g_EO}g_E$(g){if(!this.g_EL){const _=this.g_zu.g_Es()*(1/this.g_EZ())/2;g>this.g_op-_&&(g=this.g_op-_),g<_&&(g=_)}this.g_EP!==g&&(this.g_EP=g,this.g_zu.g_CY())}g_Ey(){return this.g_EP}g_El(){this.g_E_(this.g_Ex()),this.g_E$(this.g_Ey())}g_En(){return this.g_BN}g_Fa(g){g=+g,this.g_BN===g||(this.g_BN=g,this.g_El())}g_Dk(g){this.g_BO=g_bz.g_eN(g)}g_Dl(){return this.g_BO}g_oR(){return this.g_oo}g_Fb(g){!isFinite(g)||1>g||(this.g_oo=g)}g_oS(){return this.g_op}g_Fc(g){!isFinite(g)||1>g||(this.g_op=g)}g_Fd(){return this.g_EN}g_Fe(){return this.g_EU}g_Ff(){return this.g_EU.length}g_Cr(g){return"number"==typeof g?this.g_Fg(g):this.g_Fh(g.toString())}g_Fg(g){return g=g_bz.g_eM(Math.floor(g),0,this.g_EU.length-1),this.g_EU[g]}g_Fh(g){return this.g_EV.get(g.toLowerCase())||null}g_Fi(g){return this.g_EW.get(g)||null}g_Fj(){for(const g of this.g_EU)if(g.g_DI())return g.g_DG();return!1}g_Ck(){return this.g_EY}g_Fk(){return[...this.g_EQ]}g_Cf(g){if(g.g_CN())for(const _ of g.g_Fm().g_Fl())this.g_EQ.add(_);else this.g_EQ.add(g)}g_Fn(){return[...this.g_ER]}g_Fo(g,_){if(g===this||!_)return Promise.resolve();g&&(g_bz.g_gI(this.g_ER,g.g_ER),g.g_ER.clear());const e=[];for(const a of this.g_EQ)this.g_ER.has(a)||(e.push(a.g_Fp(_)),this.g_ER.add(a));return Promise.all(e)}async g_Fq(g){if(g.g_CJ())throw new Error("cannot load textures for family");const _=this.g_zu.g_po();!_||this.g_ER.has(g)||(this.g_ER.add(g),await g.g_Fp(_),g.g_Fr(),this.g_zu.g_CY())}g_Fs(g){if(g.g_CJ()||0n)_.g_FV(e[n]);else{let e;e=a?this.g_zu.g_Cm(t,a.g_Cr(),!0,a.g_FW(),a.g_FX(),!0):this.g_zu.g_Cm(t,null,!0,0,0,!0),this.g_zu.g_Cp(),t.g_FY(),_.g_FV(e),g.push(e)}}}}g_FE(){for(const g of this.g_ET){const _=this.g_zu.g_Ce(g[1]);_.g_CN()||this.g_zu.g_Cm(g,null,!0)}}g_FZ(){const g=[],_=this.g_ET;let a=0;for(let n=0,t=_.length;n=this.g_Gu)throw new Error("already unset");this.g_Gu--}}g_GG(){return 0=_||_>=this.g_GP)&&(this.g_G_=!0)}g_HQ(){return this.g_G_}g_Ho(){return this.g_G$}g_HR(g){this.g_Ha=g}g_HS(){return this.g_Ha}g_HH(g){this.g_Hb=g}g_HT(){return this.g_Hb}g_HU(){return this.g_GZ}g_HV(g){for(const _ of this.g_GT)for(const e of _.g_HW())if(e.g_HX()===g)return e}g_HI(g){const _=this.g_GO.g_HY();this.g_zW().g_HI(g,_)}g_HZ(g){this.g_He=g}g_H_(g){this.g_Hf=g}g_HP(){return this.g_GW}g_H$(g){if(this.g_GW=g,0>this.g_GW&&(this.g_GW=0),this.g_GW>=this.g_GP&&(this.g_GW=this.g_GP),!this.g_HL()&&!this.g_HN()&&this.g_GZ)this.g_HO(!1);else if(!this.g_HL()&&!this.g_HN()&&!this.g_GZ){this.g_GZ=!0;for(const g of this.g_GT)g.g_Ia()}else this.g_HL()?this.g_Ib():this.g_HN()&&(this.g_GO.g_Hp(this),this.g_HO(!1));let _=!1;for(const e of this.g_GT){e.g_Ic();const g=e.g_Id(this.g_GW);!_&&g&&(_=!0)}_&&this.g_zW().g_CY()}g_Hy(g){this.g_GS=g;for(const _ of this.g_GT)_.g_Hy(g)}g_Ie(g){this.g_If=g;for(const _ of this.g_GT)_.g_Ie(g_Ig)}g_Ih(g){return this.g_GV=g}g_Ii(){return 0=this.g_GP)return;}else if(0>=this.g_GW)return;this.g_Ik()}}g_Ik(){this.g_Ho()||this.g_HN()||this.g_HL()||this.g_GO.g_Il(this)}g_Ib(g=!1){this.g_Ho()||(this.g_HO(g),this.g_GO.g_Hq(this))}g_ll(){if(this.g_Ho())return;if(!this.g_HL()&&this.g_HN())return this.g_GO.g_Hp(this);this.g_Ib(!0),this.g_GW=0;let g=!1;for(const _ of this.g_GT){const e=_.g_Id(this.g_GW);!g&&e&&(g=!0)}g&&this.g_zW().g_CY()}g_Ia(){if(this.g_HK(!0),this.g_HM(!1),this.g_HG(),this.g_HQ()){this.g_GZ=!0,this.g_GW=this.g_Ii()?0:this.g_GP;for(const g of this.g_GT)g.g_Ia()}else for(const g of this.g_GT)g.g_Ic()}g_Im(g,_){if(this.g_HT())return this.g_Ib(!0),void this.g_HJ();this.g_GW+=g*_*this.g_GV;let e;if(e=this.g_Ii()?this.g_GW>=this.g_GP:0>=this.g_GW,e){this.g_GW=this.g_Ii()?this.g_GP:0;for(const g of this.g_GT)g.g_In();return this.g_HH(!0),!0}else{let g=!1;for(const _ of this.g_GT){const e=_.g_Id(this.g_GW);!g&&e&&(g=!0)}return g}}}}{const g=0;g_bz.g_GU=class extends g_bz.g_eG{constructor(_,e){super(),this.g_Io=_,this.g_Ip=e[g][2],this.g_GR=e[1],this.g_GS=e[2],this.g_Iq=!!e[3],this.g_Ir=[];for(const g of e[4]){const _=g_bz.g_Is.g_pG(this,g);this.g_It(_)&&this.g_Ir.push(_)}this.g_Iu=[];for(const g of e[5]){const _=g_bz.g_Iv.g_pG(this,g);_.g_Iw()&&this.g_Iu.push(_)}this.g_Ix=null,this.g_Iy=null,this.g_Iz=!1}static g_pG(g,_){return g_bz.g_eI(g_bz.g_GU,g,_)}static g_Hl(_){const e=[];return e[g]=[],e[g][2]=-1,e[1]="default",e[2]="default",e[3]=1,e[4]=[],e[5]=[],this.g_pG(_,e)}g_eJ(){this.g_Io=null,this.g_Ix=null,this.g_Iy=null;for(const g of this.g_Ir)g.g_eJ();g_bz.g_fR(this.g_Ir),this.g_Ir=null;for(const g of this.g_Iu)g.g_eJ();g_bz.g_fR(this.g_Iu),this.g_Iu=null}g_IA(){return this.g_Io}g_zW(){return this.g_Io.g_zW()}g_IB(){this.g_Ix||this.g_IC()}g_ID(){return!!this.g_Ix&&!this.g_Ix.g_IE()}g_IF(g){this.g_Ip=g}g_IC(){return this.g_Ix&&this.g_ID()?this.g_Ix:(this.g_Ix=this.g_zW().g_IG(this.g_Ip),this.g_Ix)}g_Bc(){return this.g_Iy&&this.g_ID()?this.g_Iy:(this.g_Iy=this.g_IC().g_Bc(),this.g_Iy)}g_Hw(g){this.g_GR=g}g_Hx(){return this.g_GR}g_Hy(g){this.g_GS=g;for(const _ of this.g_Iu)_.g_Hy(g)}g_Hz(){return this.g_GS}g_Ie(){for(const g of this.g_Ir)g.g_Ie(g_Ig);for(const g of this.g_Iu)g.g_Ie(g_Ig)}g_IH(g){this.g_Iq=!!g}g_Iw(){return this.g_Iq}g_II(){const g=g_bz.g_Is.g_Hl(this);return this.g_Ir.push(g),g}g_IJ(){return this.g_Ir}g_IK(){this.g_Ir.sort((g,_)=>g.g_HP()-_.g_HP())}g_IL(g){const _=g_bz.g_Iv.g_Hl(this,g);return this.g_Iu.push(_),_}g_HW(){return this.g_Iu}g_Ia(){if(this.g_IB(),!!this.g_ID()){this.g_Iz=!1;for(const g of this.g_Iu)g.g_Ia();this.g_IA().g_Ii()?this.g_Id(0):this.g_Id(this.g_IA().g_Ht())}}g_Ic(){if(this.g_IB(),!!this.g_ID())for(const g of this.g_Iu)g.g_Ic()}g_In(){if((this.g_IB(),!!this.g_ID())&&!this.g_Iz){this.g_Iz=!0;const g=this.g_Io.g_HP(),_=this.g_Io.g_Ht();g>=_?this.g_Id(_):0>=g&&this.g_Id(0)}}g_IM(g){for(const _ of this.g_Ir){if(!g(_))continue;const e=this.g_Ir.indexOf(_);-1!==e&&(_.g_eJ(),this.g_Ir.splice(e,1))}this.g_IK()}g_IN(g){for(const _ of this.g_Iu)_.g_IN(g)}g_Id(g){if(this.g_IB(),!this.g_ID())return!1;let _=!1,a=!1;for(const n of this.g_Iu){const t=n.g_Id(g);_||0==(t&g_bz.g_GN.g_Hm)||(_=!0),a||0==(t&g_bz.g_GN.g_Hn)||(a=!0)}return _&&this.g_Bc().g_Ct(),a}g_IO(){for(const g of this.g_Iu)g.g_IO()}g_IP(){if(this.g_IB(),!!this.g_ID())for(const g of this.g_Iu)g.g_IP()}g_IQ(){if(this.g_IB(),!this.g_ID())return;let g=!1;for(const _ of this.g_Iu){const e=_.g_IQ();!g&&e&&(g=!0)}if(g){const g=this.g_II();g.g_H$(this.g_IA().g_HP()),g.g_Ie("noease"),g.g_IH(!0)}}g_It(g){return!!this.g_Iw()&&!!g.g_Iw()}}}{const g=0;g_bz.g_Is=class extends g_bz.g_eG{constructor(_,e){super(),this.g_IR=_,this.g_IS=e[g],this.g_If=e[1],this.g_IT=!!e[2]}static g_pG(g,_){return g_bz.g_eI(g_bz.g_Is,g,_)}static g_Hl(_){const e=[];return e[g]=0,e[1]="linear",e[2]=1,this.g_pG(_,e)}g_eJ(){this.g_IR=null}g_zW(){return this.g_IR.g_zW()}g_H$(g){this.g_IS=g,this.g_IR.g_IK()}g_HP(){return this.g_IS}g_Ie(g){this.g_If=g}g_jO(){return this.g_If}g_IH(g){this.g_IT=!!g}g_Iw(){return this.g_IT}}}{const g=0;g_bz.g_Iv=class extends g_bz.g_eG{constructor(_,e){super(),this.g_IR=_,this.g_IU=g_bz.g_Iv.g_IV(this,e[g]),this.g_IW=e[1],this.g_kv=e[2],this.g_IX=e[3],this.g_IY=e[4],this.g_GR=e[5],this.g_GS=e[6],this.g_Iq=!!e[7],this.g_IZ=[];for(const g of e[8]){const _=g_bz.g_I_.g_pG(this,g);this.g_I$(_)&&this.g_IZ.push(_)}this.g_Ja()}static g_pG(g,_){return g_bz.g_eI(g_bz.g_Iv,g,_)}static g_Hl(_,e){const a=[];return a[g]=[],a[g][0]=e,a[1]="",a[2]="",a[3]=NaN,a[4]=NaN,a[5]="default",a[6]="default",a[7]=1,a[8]=[],this.g_pG(_,a)}static g_IV(g,_){const e=_[0];return"behavior"===e?g_bz.g_eI(g_bz.g_Iv.g_Jb,g,_):"effect"===e?g_bz.g_eI(g_bz.g_Iv.g_Jc,g,_):"instance-variable"===e?g_bz.g_eI(g_bz.g_Iv.g_Jd,g,_):"plugin"===e?g_bz.g_eI(g_bz.g_Iv.g_Je,g,_):"world-instance"===e?g_bz.g_eI(g_bz.g_Iv.g_Jf,g,_):"value"===e?g_bz.g_eI(g_bz.g_Iv.g_Jg,g,_):void 0}g_eJ(){this.g_IR=null,this.g_IU.g_eJ(),this.g_IU=null;for(const g of this.g_IZ)g.g_eJ();g_bz.g_fR(this.g_IZ),this.g_IZ=null,this.g_Jh.clear(),this.g_Jh=null}g_Ji(){return this.g_IR}g_IA(){return this.g_IR.g_IA()}g_zW(){return this.g_IR.g_zW()}g_Jj(){return this.g_IU}g_Jk(){return this.g_IU.g_Jl()}g_Jm(g){this.g_IW=g}g_HX(){return this.g_IW}g_Jn(g){this.g_kv=g}g_Jo(){return this.g_kv}g_Jp(){return this.g_Jq().g_rf()}g_Jr(g){this.g_IX=g}g_Js(){return this.g_IX}g_Jt(g){this.g_IY=g}g_Ju(){return this.g_IY}g_IH(g){this.g_Iq=!!g}g_Iw(){return this.g_Iq}g_Hw(g){this.g_GR=g}g_Hx(){return this.g_GR}g_Hy(g){this.g_GS=g}g_Hz(){return this.g_GS}g_Ie(g){for(const _ of this.g_IZ)_.g_Ie(g)}g_Jv(){const g=g_bz.g_I_.g_Hl(this);return this.g_IZ.push(g),this.g_Ja(),g}g_Jw(){return this.g_IZ}g_Ja(){this.g_Jh||(this.g_Jh=new Map),this.g_Jx();for(const g of this.g_IR.g_IJ()){const _=g.g_HP(),e=this.g_Jy(_);e&&this.g_Jh.set(_,e)}}g_Jx(){this.g_IZ.sort((g,_)=>g.g_HP()-_.g_HP())}g_I$(g){if(!this.g_Iw())return!1;if(!g.g_Iw())return!1;const _=g.g_Jz();if(!_)return!1;const e=this.g_Ji();return!!e.g_It(_)}g_Jy(g){for(const _ of this.g_IZ)if(_.g_HP()===g)return _}g_JA(g){return this.g_Jh.get(g)}g_Jq(){return this.g_IZ[0]}g_JB(){return this.g_IZ[this.g_IZ.length-1]}g_JC(g){for(const _ of this.g_IZ)if(_.g_HP()>g)return _}g_JD(g){for(const _ of this.g_IZ)if(_.g_HP()>=g)return _}g_JE(g){for(let _=this.g_IZ.length-1;0<=_;_--){const e=this.g_IZ[_];if(e.g_HP()<=g)return e}}g_Ia(){this.g_IU.g_Ia()}g_Ic(){this.g_IU.g_Ic()}g_JF(g){let _=this.g_JA(g);return _||(_=this.g_JE(g)),_}g_JG(g){const _=this.g_JA(g);return _?this.g_JC(g):this.g_JD(g)}g_Id(g){let _=this.g_JA(g),e;return _?e=this.g_JC(g):(_=this.g_JE(g),e=this.g_JD(g)),this.g_IU.g_Id(g,_,e)}g_IN(g){for(const _ of this.g_IZ){if(!g(_))continue;const e=this.g_IZ.indexOf(_);-1!==e&&(_.g_eJ(),this.g_IZ.splice(e,1))}this.g_Jx()}g_IO(){this.g_IU.g_IO()}g_IP(){const g=this.g_IU.g_IP();if(g){const g=this.g_Jq(),_=this.g_IU.g_JH();g.g_JI(_)}}g_IQ(){const g=this.g_IU.g_IQ();return g&&this.g_JJ(),this.g_IU.g_JK(),g}g_JJ(){const g=this.g_IA().g_HP(),_=this.g_JF(g),e=this.g_Jv(),a=this.g_Jj();e.g_JL(a.g_JM()),e.g_JI(a.g_JH()),e.g_JN(_.g_rf()),e.g_H$(g),e.g_Ie(_.g_jO()),e.g_IH(!0)}}}{const g=0;g_bz.g_I_=class extends g_bz.g_eG{constructor(_,e){super(),this.g_JO=_,this.g_JP=e[g][0],this.g_JQ=e[g][1],this.g_kv=e[g][2],this.g_IS=e[1],this.g_If=e[2],this.g_IT=!!e[3],this.g_JR=null;for(let g of this.g_JO.g_Ji().g_IJ())if(g.g_HP()===this.g_IS){this.g_JR=g;break}}static g_pG(g,_){return g_bz.g_eI(g_bz.g_I_,g,_)}static g_Hl(_){const e=[];return e[g]=[],e[g][0]=0,e[g][1]=0,e[g][2]="",e[1]=0,e[2]="linear",e[3]=1,this.g_pG(_,e)}g_eJ(){this.g_JO=null,this.g_JR=null}g_zW(){return this.g_JO.g_zW()}g_H$(g){this.g_IS=g,this.g_JO.g_Ja()}g_HP(){return this.g_IS}g_JL(g){"color"===this.g_kv&&g_bz.g_db(g)?(this.g_JP[0]=g_bz.g_fi(g),this.g_JP[1]=g_bz.g_fj(g),this.g_JP[2]=g_bz.g_fk(g)):this.g_JP=g}g_Jl(){return this.g_JP}g_JI(g){"color"===this.g_kv&&g_bz.g_db(g)?(this.g_JQ[0]=g_bz.g_fi(g),this.g_JQ[1]=g_bz.g_fj(g),this.g_JQ[2]=g_bz.g_fk(g)):this.g_JQ=g}g_JS(){return this.g_JQ}g_JT(){const g=this.g_JO.g_Hz();return"relative"===g?this.g_Jl():"absolute"===g?this.g_JS():void 0}g_Ie(g){this.g_If=g}g_jO(){return this.g_If}g_IH(g){this.g_IT=!!g}g_Iw(){return this.g_IT}g_JN(g){this.g_kv=g}g_rf(){return this.g_kv}g_Jz(){return this.g_JR}}}"use strict",g_bz.g_JU=class extends g_bz.g_eG{constructor(g){super(),this.g_zu=g,this.g_JV=null,this.g_JW=[],this.g_JX=new Map,this.g_JY=[],this.g_JZ=[],this.g_J_=!1,this.g_J$=!1,this.g_Ka=!1,this.g_Kb=()=>this.g_Kc(),this.g_Kd=()=>this.g_Ke(),this.g_Kf=()=>this.g_Kg()}g_eJ(){this.g_zu.g_kS().removeEventListener("pretick",this.g_Kb),this.g_Kb=null,this.g_zu.g_kS().removeEventListener("beforelayoutchange",this.g_Kd),this.g_Kd=null,this.g_zu.g_kS().removeEventListener("layoutchange",this.g_Kf),this.g_Kf=null,this.g_zu=null;for(const g of this.g_JW)g.g_Ib(),g.g_eJ();g_bz.g_fR(this.g_JW),this.g_JW=null,g_bz.g_fR(this.g_JY),this.g_JY=null,g_bz.g_fR(this.g_JZ),this.g_JZ=null,this.g_JX.clear(),this.g_JX=null}g_pG(g){this.g_jG(g_bz.g_GN.g_pG(g,this))}g_jG(g){this.g_JW.push(g),this.g_JX.set(g.g_qT(),g)}g_zW(){return this.g_zu}g_Kh(g){this.g_JV=g}g_HY(){return this.g_JV}g_Ki(){return this.g_JW}g_Kj(g){const _=g_bz.g_eM(Math.floor(g),0,this.g_JW.length-1);return this.g_JW[_]?this.g_JW[_]:void 0}g_Kk(g){return this.g_JX.has(g)?this.g_JX.get(g):void 0}g_Il(g){g.g_HK(!1),g.g_HM(!0),g.g_HR(!1),this.g_JY.push(g),this.g_Kl()}g_Hp(g){const _=this.g_JY.indexOf(g);g.g_HK(!1),g.g_HM(!1),-1===_||(this.g_JY.splice(_,1),this.g_Km())}g_Hq(g){g.g_HK(!1),g.g_HM(!1),g.g_HR(!0)}g_Kc(){if(this.g_J$)return;const g=this.g_zu.g_Kn(),_=this.g_zu.g_Ko();let a=!1;this.g_Ka=!0;for(const n of this.g_JZ){if(n.g_HS())continue;const t=n.g_Im(g,_);!a&&t&&(a=!0)}for(this.g_Ka=!1,a&&this.g_zW().g_CY();this.g_JY.length;){const g=this.g_JY.pop();g.g_Ia(),this.g_JZ.push(g)}for(const g of this.g_JZ){if(!g.g_HS())continue;const _=this.g_JZ.indexOf(g);-1===_||this.g_JZ.splice(_,1)}this.g_Km()}g_Kl(){if(!this.g_J_){const g=this.g_zu.g_kS();g.addEventListener("pretick",this.g_Kb),g.addEventListener("beforelayoutchange",this.g_Kd),g.addEventListener("layoutchange",this.g_Kf),this.g_J_=!0}}g_Km(){if(!this.g_JZ.length&&!this.g_JY.length&&!this.g_Ka){const g=this.g_zu.g_kS();g.removeEventListener("pretick",this.g_Kb),g.removeEventListener("beforelayoutchange",this.g_Kd),g.removeEventListener("layoutchange",this.g_Kf),this.g_J_=!1}}g_Ke(){this.g_J$=!0}g_Kg(){this.g_J$=!1}},"use strict",g_bz.g_Iv.g_Kp=class{constructor(){}static g_JM(_){const a=_.g_Ji(),n=a.g_IA().g_HP(),t=_.g_JF(n),i=_.g_JG(n),e=g_bz.g_Iv.g_Kp,o=e.g_Kq(_);return o(n,t,i,_)}static g_Jl(g,_,e){let a=g.g_Hz();return"combo"===g.g_Jo()&&(a="absolute"),"relative"===a?_+e:"absolute"===a?e:void 0}static g_Kq(g){const _=g.g_Jp();return"numeric"===_?g_bz.g_Iv.g_Kr.g_Id:"angle"===_?g_bz.g_Iv.g_Ks.g_Id:"boolean"===_?g_bz.g_Iv.g_Kt.g_Id:"color"===_?g_bz.g_Iv.g_Ku.g_Id:"text"===_?g_bz.g_Iv.g_Kv.g_Id:void 0}static g_Kw(g){const _=g.g_Jp();return"numeric"===_?g_bz.g_Iv.g_Kr.g_Kx:"angle"===_?g_bz.g_Iv.g_Ks.g_Kx:"boolean"===_?g_bz.g_Iv.g_Kt.g_Kx:"color"===_?g_bz.g_Iv.g_Ku.g_Kx:"text"===_?g_bz.g_Iv.g_Kv.g_Kx:void 0}},"use strict";{const g=g_bz.g_eI(g_bz.g_gP),_=[0,0,0];g_bz.g_Iv.g_Jb=class{constructor(g,_){this.g_JO=g,this.g_IR=g.g_Ji(),this.g_BB=_[1],this.g_BA=_[2],this.g_Ky=null,this.g_Kz="",this.g_KA=null}g_eJ(){this.g_JO=null,this.g_IR=null,this.g_KA=null,this.g_Ky=null}g_Ia(){var _=Math.floor;const a=this.g_KB(),n=this.g_JO.g_Jp(),t=this.g_JO.g_Hz();let e;"relative"===t?e=a.g_KC(this.g_BA):"absolute"===t&&(e=this.g_JO.g_Jq().g_JS()),"color"===n?e instanceof g_bz.g_gP?(this.g_Ky=[],this.g_Ky[0]=_(255*e.g_ha()),this.g_Ky[1]=_(255*e.g_hb()),this.g_Ky[2]=_(255*e.g_hc()),this.g_Kz="color-object"):Array.isArray(e)?(this.g_Ky[0]=_(255*e[0]),this.g_Ky[1]=_(255*e[1]),this.g_Ky[2]=_(255*e[2]),this.g_Kz="color-object"):(g.g_ht(e),this.g_Ky=[],this.g_Ky[0]=_(255*g.g_ha()),this.g_Ky[1]=_(255*g.g_hb()),this.g_Ky[2]=_(255*g.g_hc()),this.g_Kz="color-string"):(this.g_Ky=e,this.g_Kz="other")}g_Ic(){}g_Id(a,n,t){const e=this.g_KB(),o=this.g_JO.g_Jp(),r=g_bz.g_Iv.g_Kp,d=r.g_Jl,i=r.g_Kq(this.g_JO),u=r.g_Kw(this.g_JO);let s;switch(o){case"numeric":if(s=i(a,n,t,this.g_JO),s=d(this.g_JO,this.g_Ky,s),!u(this.g_BA,e,s))return;e.g_KD(this.g_BA,s);break;case"boolean":if(s=i(a,n,t,this.g_JO),!u(this.g_BA,e,s))return;e.g_KD(this.g_BA,s);break;case"color":if(s=i(a,n,t,this.g_JO),_[0]=d(this.g_JO,this.g_Ky[0],s[0]),_[1]=d(this.g_JO,this.g_Ky[1],s[1]),_[2]=d(this.g_JO,this.g_Ky[2],s[2]),!u(this.g_BA,e,_))return;switch(this.g_Kz){case"color-object":e.g_KD(this.g_BA,_);break;case"color-string":g.g_gV(_[0],_[1],_[2]);const a=`rgb(${g.g_hr()})`;e.g_KD(this.g_BA,a);}break;case"text":if(s=i(a,n,t,this.g_JO),!u(this.g_BA,e,s))return;e.g_KD(this.g_BA,s);}}g_JM(){return g_bz.g_Iv.g_Kp.g_JM(this.g_JO)}g_KB(){if(this.g_KA)return this.g_KA;const g=this.g_IR.g_IC(),_=g.g_KE(this.g_BB),e=g.g_KF()[_];return this.g_KA=e.g_KG(),this.g_KA}}}"use strict",g_bz.g_Iv.g_Jc=class{constructor(g,_){this.g_JO=g,this.g_IR=g.g_Ji(),this.g_pJ=_[1],this.g_BA=_[2],this.g_Ky=null,this.g_KH=null}g_eJ(){this.g_JO=null,this.g_IR=null,this.g_Ky=null,this.g_KH=null}g_Ia(){const g=this.g_KI(),_=this.g_JO.g_Jp(),e=this.g_JO.g_Hz();let a;"relative"===e?a=g[this.g_BA]:"absolute"===e&&(a=this.g_JO.g_Jq().g_JS()),"color"===_?a instanceof g_bz.g_gP?this.g_Ky=a.clone():Array.isArray(a)&&(this.g_Ky=new g_bz.g_gP,this.g_Ky.g_gX(a[0]),this.g_Ky.g_gY(a[1]),this.g_Ky.g_gZ(a[2])):this.g_Ky=a}g_Ic(){}g_Id(_,a,n){const t=this.g_JO.g_Jp(),o=this.g_KI();if(!o)return;const e=g_bz.g_Iv.g_Kp,r=e.g_Jl,g=e.g_Kq(this.g_JO);let d;return"numeric"===t?(d=g(_,a,n,this.g_JO),d=r(this.g_JO,this.g_Ky,d),o[this.g_BA]=d,g_bz.g_GN.g_Hn):"boolean"===t?(d=g(_,a,n,this.g_JO),o[this.g_BA]=d,g_bz.g_GN.g_Hn):"color"===t?(d=g(_,a,n,this.g_JO),o[this.g_BA].g_gV(r(this.g_JO,this.g_Ky.g_ha(),d[0]),r(this.g_JO,this.g_Ky.g_hb(),d[1]),r(this.g_JO,this.g_Ky.g_hc(),d[2])),g_bz.g_GN.g_Hn):"text"===t?(d=g(_,a,n,this.g_JO),o[this.g_BA]=d,g_bz.g_GN.g_Hn):void 0}g_JM(){return g_bz.g_Iv.g_Kp.g_JM(this.g_JO)}g_KI(){if(this.g_KH)return this.g_KH;const g=this.g_IR.g_Bc(),_=g.g_Eb(),a=_.g_CS(),n=a.g_KJ(this.g_pJ),t=n.g_CQ();return this.g_KH=_.g_KK(t)?_.g_Ef(t):null,this.g_KH}},"use strict",g_bz.g_Iv.g_Jd=class{constructor(g,_){this.g_JO=g,this.g_IR=g.g_Ji(),this.g_BA=_[1],this.g_Ky}g_eJ(){this.g_JO=null,this.g_IR=null}g_Ia(){const g=this.g_JO.g_Hz();if("relative"===g){const g=this.g_IR.g_IC();this.g_Ky=g.g_KL(this.g_BA)}else"absolute"===g&&(this.g_Ky=this.g_JO.g_Jq().g_JS())}g_Ic(){}g_Id(_,a,n){const t=this.g_IR.g_IC(),o=this.g_JO.g_Jp(),e=g_bz.g_Iv.g_Kp,r=e.g_Jl,g=e.g_Kq(this.g_JO);let d;"numeric"===o?(d=g(_,a,n,this.g_JO),d=r(this.g_JO,this.g_Ky,d),t.g_KM(this.g_BA,d)):"boolean"===o?(d=g(_,a,n,this.g_JO),t.g_KM(this.g_BA,d)):"text"===o?(d=g(_,a,n,this.g_JO),t.g_KM(this.g_BA,d)):void 0}g_JM(){return g_bz.g_Iv.g_Kp.g_JM(this.g_JO)}},"use strict";{const _=[0,0,0];g_bz.g_Iv.g_Je=class{constructor(g,_){this.g_JO=g,this.g_IR=this.g_JO.g_Ji(),this.g_BA=_[1],this.g_Ky,this.g_KN=null}g_eJ(){this.g_JO=null,this.g_IR=null,this.g_Ky=null,this.g_KN=null}g_Ia(){const g=this.g_KO(),_=this.g_JO.g_Jp(),e=this.g_JO.g_Hz();let a;"relative"===e?a=g.g_KC(this.g_BA):"absolute"===e&&(a=this.g_JO.g_Jq().g_JS()),"color"===_?(this.g_Ky=[],this.g_Ky[0]=a[0],this.g_Ky[1]=a[1],this.g_Ky[2]=a[2]):this.g_Ky=a}g_Ic(){}g_Id(a,n,t){const o=this.g_KO(),e=this.g_JO.g_Jp(),r=g_bz.g_Iv.g_Kp,g=r.g_Jl,d=r.g_Kq(this.g_JO),i=r.g_Kw(this.g_JO);let u;return"numeric"===e?(u=d(a,n,t,this.g_JO),u=g(this.g_JO,this.g_Ky,u),!i(this.g_BA,o,u))?void 0:(o.g_KD(this.g_BA,u),g_bz.g_GN.g_Hn):"boolean"===e?(u=d(a,n,t,this.g_JO),!i(this.g_BA,o,u))?void 0:(o.g_KD(this.g_BA,u),g_bz.g_GN.g_Hn):"color"===e?(u=d(a,n,t,this.g_JO),_[0]=g(this.g_JO,this.g_Ky[0],u[0]),_[1]=g(this.g_JO,this.g_Ky[1],u[1]),_[2]=g(this.g_JO,this.g_Ky[2],u[2]),!i(this.g_BA,o,_))?void 0:(o.g_KD(this.g_BA,_),g_bz.g_GN.g_Hn):"text"===e?(u=d(a,n,t,this.g_JO),!i(this.g_BA,o,u))?void 0:(o.g_KD(this.g_BA,u),g_bz.g_GN.g_Hn):void 0}g_JM(){return g_bz.g_Iv.g_Kp.g_JM(this.g_JO)}g_KO(){if(this.g_KN)return this.g_KN;else{const g=this.g_IR.g_IC();return this.g_KN=g.g_KG(),this.g_KN}}}}const NAMESPACE=g_bz.g_Iv.g_Jf=class{constructor(g){this.g_JO=g,this.g_IR=g.g_Ji(),this.g_KP=null}g_eJ(){this.g_KP&&(this.g_KP.g_eJ(),this.g_KP=null),this.g_JO=null,this.g_IR=null}g_KQ(){if(this.g_KP)return this.g_KP;const g=this.g_JO.g_HX();return this.g_KP="offsetColor"===g?g_bz.g_eI(NAMESPACE.g_KR,this.g_JO):g_bz.g_eI(NAMESPACE.g_KS,this.g_JO),this.g_KP}g_Ia(){this.g_KQ().g_Ia()}g_Ic(){this.g_KQ().g_Ic()}g_Id(g,_,a){const n=g_bz.g_Iv.g_Kp,t=n.g_Kq(this.g_JO),e=t(g,_,a,this.g_JO);return this.g_KQ().g_KT(e)}g_IO(){this.g_KQ().g_KU()}g_JK(){this.g_KQ().g_JK()}g_JH(){return this.g_KQ().g_JH()}g_IP(){return this.g_KQ().g_IP()}g_IQ(){return this.g_KQ().g_IQ()}g_JM(){return g_bz.g_Iv.g_Kp.g_JM(this.g_JO)}};"use strict",g_bz.g_Iv.g_KV=class{constructor(g){this.g_JO=g,this.g_Iy=g.g_Ji().g_Bc(),this.g_IW=g.g_HX(),this.g_KW=!1,this.g_KX=null}g_eJ(){this.g_Iy=null,this.g_JO=null,this.g_KX=null}g_KY(g){this.g_KW=!!g}g_KZ(){return this.g_KW}g_Ia(){}g_Ic(){}g_KU(){}g_JK(){this.g_KX=null}g_JH(){}g_IP(){}g_IQ(){}g_KT(){}g_K_(){const g=this.g_K$(()=>this.g_JO.g_Jq(),()=>this.g_JO.g_JB());return g.g_JS()}g_La(){const g=this.g_JO.g_IA(),_=g.g_HP(),e=this.g_K$(()=>this.g_JO.g_JE(_),()=>this.g_JO.g_JD(_));return e.g_JS()}g_K$(g,_){const e=this.g_JO.g_IA();return e.g_Ii()?g():_()}g_Lb(g,_){const e=this.g_JO.g_Hz();return"relative"===e?g():_()}g_Lc(g,_){return this.g_KZ()?(this.g_KY(!1),g()):_()}g_Ld(){}},"use strict";{const g=new Map,_=(_,e,a)=>g.set(_,{g_Le:e,g_Lf:a});_("offsetX",(g,_)=>g.g_Lg(_),g=>g.g_FW()),_("offsetY",(g,_)=>g.g_Lh(_),g=>g.g_FX()),_("offsetWidth",(g,_)=>g.g_Li(_),g=>g.g_oR()),_("offsetHeight",(g,_)=>g.g_Lj(_),g=>g.g_oS()),_("offsetAngle",(g,_)=>g.g_Lk(_),g=>g.g_Dl()),_("offsetOpacity",(g,_)=>g.g_Ll(_),g=>g.g_xv()),_("offsetOriginX",(g,_)=>g.g_Lm(_),g=>g.g_Ln()),_("offsetOriginY",(g,_)=>g.g_Lo(_),g=>g.g_Lp());class e extends g_bz.g_Iv.g_KV{constructor(_){super(_);const e=_.g_HX();this.g_Lq=g.get(e).g_Lf,this.g_Lr=g.get(e).g_Le,this.g_rO=0,this.g_Ls=!0}g_eJ(){super.g_eJ(),this.g_Lq=null,this.g_Lr=null}g_Ia(){this.g_rO=this.g_Lb(()=>this.g_K$(()=>0,()=>g_bz.g_Iv.g_Kp.g_JM(this.g_JO)),()=>(this.g_KY(!0),this.g_Ld(this.g_K_())))}g_Ic(){this.g_K_()===this.g_La()||this.g_Lb(()=>{},()=>{this.g_KY(!0),this.g_rO=this.g_Ld(this.g_La())})}g_KU(){this.g_KX=this.g_JH()}g_JH(){return this.g_Lq(this.g_Iy)}g_IP(){const g=this.g_K_();return g!==this.g_JH()}g_IQ(){return!g_bz.g_de(this.g_KX)&&this.g_KX!==this.g_JH()}g_KT(g){const _=this.g_rO;return this.g_Lb(()=>this.g_Lr(this.g_Iy,g-_),()=>{this.g_Lc(()=>this.g_Lr(this.g_Iy,_),()=>this.g_Lr(this.g_Iy,g-_))}),this.g_rO=g,g_bz.g_GN.g_Hm}g_Ld(g){return g-this.g_JH()}}g_bz.g_Iv.g_Jf.g_KS=e}{const _=0;class g extends g_bz.g_Iv.g_KV{constructor(g){super(g),this.g_Lt=0,this.g_Lu=0,this.g_Lv=0}g_eJ(){super.g_eJ()}g_Ia(){const g=this.g_Lb(()=>{const g=this.g_K$(()=>[0,0,0],()=>g_bz.g_Iv.g_Kp.g_JM(this.g_JO));return this.g_Lw(g)},()=>(this.g_KY(!0),this.g_Ld(this.g_K_())));this.g_Lt=g.g_ha(),this.g_Lu=g.g_hb(),this.g_Lv=g.g_hc()}g_Ic(){this.g_Lx(this.g_K_(),this.g_La())||this.g_Lb(()=>{},()=>{this.g_KY(!0);const g=this.g_Ld(this.g_La());this.g_Lt=g.g_ha(),this.g_Lu=g.g_hb(),this.g_Lv=g.g_hc()})}g_KU(){this.g_KX=this.g_Ly()}g_JH(){return this.g_Ly().toArray().slice(0,3)}g_IP(){const g=this.g_K_();return!this.g_Lx(g,this.g_Ly())}g_IQ(){return!g_bz.g_de(this.g_KX)&&!this.g_Lx(this.g_KX,this.g_Ly())}g_KT(a){const n=a[_],t=a[1],e=a[2],i=this.g_Lt,o=this.g_Lu,g=this.g_Lv;return this.g_Lb(()=>this.g_Lz(i-n,o-t,g-e),()=>{this.g_Lc(()=>this.g_Lz(-i,-o,-g),()=>this.g_Lz(-i+n,-o+t,-g+e))}),this.g_Lt=n,this.g_Lu=t,this.g_Lv=e,g_bz.g_GN.g_Hn}g_Ly(){return this.g_Iy.g_LA().clone()}g_Lz(g,_,e){this.g_Iy.g_LB(g,_,e)}g_Lx(g,_){return g.g_hg(_)}g_K_(){const g=super.g_K_();return this.g_Lw(g)}g_La(){const g=super.g_La();return this.g_Lw(g)}g_Ld(g){const _=this.g_Lw(g);return g_bz.g_gP.g_hF(_,this.g_Ly())}g_Lw(g){return g_bz.g_dw(g,g_bz.g_gP)?g:new g_bz.g_gP(g[_],g[1],g[2])}}g_bz.g_Iv.g_Jf.g_KR=g}"use strict",g_bz.g_Iv.g_Jg=class{constructor(g){this.g_JO=g,this.g_IR=g.g_Ji(),this.g_JP=0}g_eJ(){this.g_JO=null,this.g_IR=null}g_Ia(){this.g_JP=this.g_JO.g_Jq().g_JT()}g_Ic(){}g_Jl(){return this.g_JP}g_Id(g,_,e){const a=g_bz.g_Iv.g_Kr.g_Id;this.g_JP=a(g,_,e,this.g_JO)}g_IO(){}g_JK(){}g_JH(){return this.g_JP}g_IP(){return!1}g_IQ(){return!1}g_JM(){return g_bz.g_Iv.g_Kp.g_JM(this.g_JO)}},"use strict",g_bz.g_Iv.g_Kr=class{constructor(){}static g_Kx(g,_,e){const a=_.g_KC(g);return a!==e}static g_Id(_,n,t,o){var r=Math.floor;if(!t)return o.g_JB().g_JT();let d=o.g_Hx();if("default"===d&&(d="continuous"),"combo"===o.g_Jo()&&(d="discrete"),"discrete"===d)return n.g_JT();if("continuous"===d||"step"===d){if("step"===d){const g=1/o.g_IA().g_Hv();_=r(_*g)/g}const g=n.g_HP(),a=t.g_HP(),i=n.g_JT(),u=t.g_JT();if(i===u)return i;const s=g_bz.normalize(_,g,a),l=n.g_jO(),c=g_jK.g_jO(l)((a-g)*s,i,u-i,a-g);return"integer"===o.g_Jo()?r(c):c}}},"use strict",g_bz.g_Iv.g_Ks=class{constructor(){}static g_Kx(g,_,e){const a=_.g_KC(g);return a!==e}static g_Id(_,n,t,g){if(!t)return g.g_JB().g_JT();let o=g.g_Hx();if("default"===o&&(o="continuous"),"combo"===g.g_Jo()&&(o="discrete"),"discrete"===o)return n.g_JT();if("continuous"===o||"step"===o){if("step"===o){const e=1/g.g_IA().g_Hv();_=Math.floor(_*e)/e}const e=n.g_HP(),a=t.g_HP(),r=n.g_JT(),d=t.g_JT();if(r===d)return r;let i=g_bz.normalize(_,e,a);const u=g_jK.g_jO(n.g_jO());return g_bz.g_eW(r,d,u(i,0,1,1))}}},"use strict",g_bz.g_Iv.g_Kt=class{constructor(){}static g_Kx(g,_,e){const a=_.g_KC(g);return a!==e}static g_Id(g,_,e,a){return e?_.g_JT()?1:0:a.g_JB().g_JT()?1:0}},"use strict";{const _=[0,0,0],a=[0,0,0];g_bz.g_Iv.g_Ku=class{constructor(){}static g_Kx(n,t,i){var e=Math.floor;const o=t.g_KC(n);return Array.isArray(i)?(_[0]=i[0],_[1]=i[1],_[2]=i[2]):(g_LC.g_ht(i),_[0]=e(255*g_LC.g_ha()),_[1]=e(255*g_LC.g_hb()),_[2]=e(255*g_LC.g_hc())),Array.isArray(o)?(a[0]=o[0],a[1]=o[1],a[2]=o[2]):(g_LC.g_ht(o),a[0]=e(255*g_LC.g_ha()),a[1]=e(255*g_LC.g_hb()),a[2]=e(255*g_LC.g_hc())),_[0]!==a[0]||_[1]!==a[1]||_[2]!==a[2]}static g_Id(M,a,c,e){if(!c){const g=e.g_JB().g_JT();return _[0]=g[0],_[1]=g[1],_[2]=g[2],_}let d=e.g_Hx();if("default"===d&&(d="continuous"),"discrete"===d){const g=a.g_JT();return _[0]=g[0],_[1]=g[1],_[2]=g[2],_}if("continuous"===d||"step"===d){if("step"===d){const g=1/e.g_IA().g_Hv();M=Math.floor(M*g)/g}const g=a.g_HP(),f=c.g_HP(),i=a.g_JT(),h=c.g_JT(),b=g_bz.normalize(M,g,f),l=a.g_jO(),m=i[0],T=i[1],n=i[2],o=h[0],p=h[1],E=h[2],r=g_jK.g_jO(l),s=f-g,t=s*b;return _[0]=m===o?m:r(t,m,o-m,s),_[1]=T===p?T:r(t,T,p-T,s),_[2]=n===E?n:r(t,n,E-n,s),_}}}}"use strict",g_bz.g_Iv.g_Kv=class{constructor(){}static g_Kx(g,_,e){const a=_.g_KC(g);return a!==e}static g_Id(g,_,e,a){return e?_.g_JT():a.g_JB().g_JT()}},"use strict",g_bz.Tween=class g extends g_bz.g_GN{constructor(g,_){super(g,_),this.g_LD=[""],this.g_LE="",this.g_LF=!1,this.g_LG=!1,this.g_LH="start-value",this.g_Hu(0),this.g_Hw("default"),this.g_HZ(null),this.g_H_(null)}g_eJ(){g_bz.g_fR(this.g_LD),this.g_LD=null,super.g_eJ()}g_LI(g,_){for(const e of this.g_GT)for(const a of e.g_Iu){if(a.g_HX()!==_)continue;const e=a.g_Jq();e.g_JL(g),e.g_JI(g)}}g_LJ(g,_){for(const e of this.g_GT)for(const a of e.g_Iu){if(a.g_HX()!==_)continue;const e=a.g_JB();e.g_JL(g),e.g_JI(g),(this.g_HL()||!this.g_HQ())&&a.g_JJ()}}g_LK(_){if(!this.g_LD)return!1;if(!this.g_LD.length)return!1;const e=g.g_LL(_);return!!e&&!!e.length&&e.every(g.g_LM,this)}g_LN(_){this.g_LD=g.g_LL(_),this.g_LF=!0}g_LO(){return this.g_LD}g_LP(){return this.g_LF&&(this.g_LE=this.g_LD.join(" ")),this.g_LF=!1,this.g_LE}g_LQ(g){this.g_LH=g}g_LR(){return this.g_LH}g_LS(g){this.g_LG=g}g_LT(){return this.g_LG}g_HG(){if(super.g_HG(),!this.g_HQ())for(const g of this.g_GT)g.g_IQ()}g_H$(g){this.g_LU(),super.g_H$(g)}g_Ia(){if(!this.g_HU()&&"current-state"===this.g_LR())for(const g of this.g_GT)g.g_IP();super.g_Ia()}g_Ib(g=!1){if(super.g_Ib(g),!this.g_HQ())for(const g of this.g_GT)g.g_IO()}g_ll(){this.g_LU(),super.g_ll()}g_LU(){for(const g of this.g_GT){const _=g=>{const _=g.g_HP(),e=this.g_Ht();return 0!==_&&_!==e};g.g_IM(_),g.g_IN(_)}}static g_HL(g){return g.g_HL()}static g_LM(g){const _=this.g_LO();return""===g?1===_.length&&""===_[0]:_.includes(g)}static g_LL(g){return g_bz.g_dB(g)?g.slice(0):g_bz.g_dk(g)?g.split(" "):void 0}static g_LV(_){const a=g_bz.g_GN.g_Hk(),n=_.g_LX.g_LW(),t=g_bz.g_eI(g_bz.Tween,a,n);g_bz.g_dB(_.g_LY)||(_.g_LY=[_.g_LY]),t.g_LN(_.tags),t.g_LQ(_.g_LZ),t.g_Hs(_.time),t.g_Hy(_.g_LY[0].g_Ig),t.g_LS(_.g_L_);const i=t.g_HA();i.g_IF(_.g_L$.g_Co()),i.g_Hw("default"),i.g_Hy(_.g_LY[0].g_Ig),i.g_IH(!0);const e=i.g_II();e.g_H$(0),e.g_Ie("noease"),e.g_IH(!0);const o=i.g_II();o.g_H$(_.time),o.g_Ie("noease"),o.g_IH(!0);for(const g of _.g_LY){const e=i.g_IL(g.g_Ma);e.g_Jm(g.g_Mb),e.g_Jn(g.type),e.g_Jr(NaN),e.g_Jt(NaN),e.g_Hw("default"),e.g_Hy(g.g_Ig),e.g_IH(!0);const a=e.g_Jv();a.g_JL(g.g_Mc),a.g_JI(g.g_Mc),a.g_JN(g.valueType),a.g_H$(0),a.g_Ie(g.g_Md),a.g_IH(!0);const n=e.g_Jv();n.g_JL(g.g_Me),n.g_JI(g.g_Me),n.g_JN(g.valueType),n.g_H$(_.time),n.g_Ie(g.g_Md),n.g_IH(!0)}return t}},"use strict",g_bz.g_Mf=class extends g_bz.g_eG{constructor(g){super(),this.g_Mg=g,this.g_Mh=[],this.g_Mh.push(g_bz.g_eI(g_bz.g_Mi,this)),this.g_BA=0}g_eJ(){for(const g of this.g_Mh)g.g_eJ();g_bz.g_fR(this.g_Mh),this.g_Mg=null}g_CE(){return this.g_Mg}g_Mj(){return this.g_Mh[this.g_BA]}g_jx(){this.g_Mj().g_jx()}g_Mk(){const g=this.g_Mh,_=++this.g_BA;_===g.length?g.push(g_bz.g_eI(g_bz.g_Mi,this)):g[_].g_ll()}g_Ml(){const g=this.g_Mh,_=++this.g_BA;_===g.length&&g.push(g_bz.g_eI(g_bz.g_Mi,this)),g[_].g_Mm(g[_-1])}g_Mn(){--this.g_BA}},"use strict",g_bz.g_Mi=class extends g_bz.g_eG{constructor(g){super(),this.g_Mh=g,this.g_Mg=this.g_Mh.g_CE(),this.g_Mo=this.g_Mg.g_zW().g_Mp(),this.g_Mq=!0,this.g_Bf=[],this.g_Mr=[]}g_eJ(){this.g_Ms(),this.g_Mh=null,this.g_Mg=null,this.g_Mo=null}g_Ms(){g_bz.g_fR(this.g_Bf),g_bz.g_fR(this.g_Mr)}g_CE(){return this.g_Mg}g_Mt(){return this.g_Mq}g_Mu(){return this.g_Mq?!!this.g_Mg.g_CO():!!this.g_Bf.length}g_FP(){return this.g_Mq?this.g_Mg.g_FP():this.g_Bf}g_Mv(){return!!this.g_Mr.length}g_Mw(){return this.g_Mr}g_Mx(){const g=this.g_FP();return g.length?g:this.g_Mr}g_ll(){this.g_Mq=!0,g_bz.g_fR(this.g_Mr)}g_jx(){this.g_Mq=!0}g_Mm(g){g.g_Mt()?this.g_ll():(this.g_Mq=!1,g_bz.g_fV(this.g_Bf,g.g_Bf),g_bz.g_fR(this.g_Mr))}g_My(g){this.g_Bf.push(g)}g_Mz(g){this.g_Mr.push(g)}g_MA(g){this.g_Mq=!!g}g_MB(){return this.g_Bf}g_MC(){return this.g_Mr}g_MD(g){this.g_Mq=!1,g_bz.g_fR(this.g_Bf),this.g_Bf.push(g)}g_ME(g){this.g_Mq=!1,g_bz.g_fV(this.g_Bf,g)}g_MF(g){if(g)if(this.g_Mo.g_MI().g_MH().g_MG()){this.g_Mt()&&(g_bz.g_fR(this.g_Bf),g_bz.g_fV(this.g_Mr,g.g_CE().g_FP()),this.g_Mq=!1);const _=this.g_Mr.indexOf(g);-1!==_&&(this.g_Bf.push(this.g_Mr[_]),this.g_Mr.splice(_,1))}else this.g_MD(g)}},"use strict",g_bz.g_MJ=class extends g_bz.g_eG{constructor(g){super(),this.g_MK=g,this.g_zu=this.g_MK.g_zW(),this.g_Mh=[],this.g_Mh.push(g_bz.g_eI(g_bz.g_ML,this,null)),this.g_BA=0}g_eJ(){for(const g of this.g_Mh)g.g_eJ();g_bz.g_fR(this.g_Mh),this.g_MK=null,this.g_zu=null}g_CH(){return this.g_MK}g_zW(){return this.g_zu}g_MI(){return this.g_Mh[this.g_BA]}g_MM(g){const _=this.g_Mh,e=++this.g_BA;if(e===_.length){const e=g_bz.g_eI(g_bz.g_ML,this,g);return _.push(e),e}else{const a=_[e];return a.g_ll(g),a}}g_Mn(){--this.g_BA}},"use strict",g_bz.g_ML=class extends g_bz.g_eG{constructor(g,_){super(),this.g_Mh=g,this.g_zu=this.g_Mh.g_zW(),this.g_MN=_,this.g_MO=0,this.g_MP=0,this.g_MQ=!1,this.g_MR=!1,this.g_MS=null}g_eJ(){this.g_ll(null),this.g_Mh=null,this.g_zu=null}g_ll(g){this.g_MN=g,this.g_MO=0,this.g_MP=0,this.g_MQ=!1,this.g_MR=!1}g_MT(g,_){this.g_MN=g,this.g_MO=0,this.g_MP=_}g_MU(){this.g_MO=0,this.g_MP=0}g_MH(){return this.g_MN}g_MV(g){this.g_MN=g}g_MW(){return this.g_MO}g_MX(g){this.g_MO=g}g_MY(){return this.g_MP}g_MZ(g){this.g_MP=g}g_M_(g){this.g_MQ=!!g}g_M$(){return this.g_MQ}g_Na(g){this.g_MR=!!g}g_Nb(){return this.g_MR}g_Nc(g){this.g_MS=g}g_Nd(){return this.g_MS}g_Ne(){const g=this.g_MN;return!!g.g_Nf()||!!(this.g_MOe=g);return this.g_NN.push([g,_,e]),a}*g_OO(){if(this.g_zu.g_OP())throw new Error("should not be in breakpoint");for(const g=this.g_zu.g_OQ();this.g_NN.length;){const[_,a,n]=this.g_NN.shift(),t=yield*this.g_OM(g,_,a);n(t)}}async g_OR(){for(const g of this.g_OO())await this.g_zu.g_OH(g)}g_OS(_,n,t,i){let o=!1;const r=_.g_Gg(),d=r.g_Fd();if(d){this.g_NP++,this.g_zu.g_OD(r);const _=d.g_OL();for(let e=0,a=_.length;eg.g_Ph());for(const _ of g)_.g_eJ()}g_Gc(){for(const g of this.g_NR)g.g_eJ();g_bz.g_fR(this.g_NR)}g_Pl(g){for(const _ of this.g_NR)_.g_Pm(g)}g_ED(){return{groups:this.g_Pn(),cnds:this.g_Po(),acts:this.g_Pp(),vars:this.g_Pq(),waits:this.g_Pr()}}g_EF(g){this.g_Ps(g.groups),this.g_Pt(g.cnds),this.g_Pu(g.acts),this.g_Pv(g.vars),this.g_Pw(g.waits)}g_Pn(){const g={};for(const _ of this.g_Ox())g[_.g_CR().toString()]=_.g_Px();return g}g_Ps(g){for(const[_,e]of Object.entries(g)){const g=parseInt(_,10),a=this.g_Ov(g);a&&a.g_Py(e)}}g_Po(){const g={};for(const[_,e]of this.g_ND){const a=e.g_ED();a&&(g[_.toString()]=a)}return g}g_Pt(g){for(const[_,e]of Object.entries(g)){const g=parseInt(_,10),a=this.g_Oo(g);a&&a.g_EF(e)}}g_Pp(){const g={};for(const[_,e]of this.g_NE){const a=e.g_ED();a&&(g[_.toString()]=a)}return g}g_Pu(g){for(const[_,e]of Object.entries(g)){const g=parseInt(_,10),a=this.g_Op(g);a&&a.g_EF(e)}}g_Pq(){const g={};for(const[_,e]of this.g_NG)!e.g_Pz()&&(e.g_Cn()||e.g_oT())&&(g[_.toString()]=e.g_Jl());return g}g_Pv(g){for(const[_,e]of Object.entries(g)){const g=parseInt(_,10),a=this.g_Om(g);a&&a.g_JL(e)}}g_Pr(){return this.g_NR.map(g=>g.g_ED())}g_Pw(g){this.g_Gc();for(const _ of g){const g=g_bz.g_Pc.g_PA(this,_);g&&this.g_NR.push(g)}}g_PB(){return[...this.g_zu.g_OQ().g_GE()].map(g=>g.g_Fd()).filter(g=>g).map(g=>g.g_PC())}}}"use strict",g_bz.g_NS=class extends g_bz.g_eG{constructor(g,_){super(),this.g_MK=g,this.g_zu=g.g_zW(),this.g_pJ=_[0],this.g_PD=[],this.g_PE=new Map,this.g_PF=new Map,this.g_PG=new Map,this.g_PH=!1,this.g_PI=[],this.g_PJ=[],this.g_PK=new Set;for(const e of _[1])this.g_PL(e,null,this.g_PD);this.g_PM=this.g_zu.g_PN()?{type:"sheet",name:this.g_pJ,g_PO:0,children:[]}:null}g_eJ(){this.g_MK=null,this.g_zu=null}g_PL(g,_,e){switch(g[0]){case 0:this.g_PP(g,_,e);break;case 1:this.g_PQ(g,_,e);break;case 2:this.g_PR(g,_,e);break;default:throw new Error("invalid event type");}}g_PP(g,_,e){const n=g_bz.g_PS.g_pG(this,_,g);if(n.g_MG()){e.push(n);const g=n.g_PT();for(let _=0,e=g.length;_g.g_Qk()),g.g_QS=this.g_QF.every(g=>g.g_Qk()),g.g_QT=this.g_QG.every(g=>g.g_Qk()),g.g_QU=g.g_QR&&g.g_QS&&g.g_QT}g_Rk(){let g=this;do g.g_Ri(),g=g.g_Ol();while(g)}g_Re(){if(!this.g_Ow())return;let g=this.g_Ol();for(this.g_Qz=!0;g;){if(!g.g_Ow()){this.g_Qz=!1;break}g=g.g_Ol()}}g_Rf(){const g=this.g_zu.g_CI();if(this.g_Qv===g)this.g_Qw=g;else{this.g_Qw=g_bz.g_gb(this.g_Qv);for(let g=this.g_Ol();g;){for(const _ of g.g_Qv)this.g_Rc(_);g=g.g_Ol()}const g=this.g_CH();this.g_Qv=g.g_N$(this.g_Qv),this.g_Qw=g.g_N$(this.g_Qw)}}g_Rg(){if(this.g_Rl()){this.g_QD=[];for(let g=this.g_Ol();g;)this.g_QD.push(g),g=g.g_Ol();this.g_QD.reverse()}}g_Rm(){this.g_Qx=!0,this.g_Qu&&this.g_Qu.g_Rm()}g_Nf(){return this.g_Qx}g_Nh(){return this.g_Qv}g_Qm(){return this.g_Qw}g_Rn(g){return this.g_Qv.includes(g)}g_Qo(){return this.g_QD}g_Fd(){return this.g_EN}g_CH(){return this.g_EN.g_CH()}g_zW(){return this.g_zu}g_Ol(){return this.g_Qu}g_Ro(){return this.g_QN?this.g_QN.g_QP:-1}g_Rp(){return this.g_QN&&this.g_QN.g_QQ}g_Rq(){return this.g_Rp()&&this.g_QN.g_QO}g_Rr(g){this.g_QN.g_QO=!!g,this.g_Rk()}g_Ow(){return this.g_QI}g_Rh(){return this.g_Qz}g_P_(){return this.g_QC}g_Rs(){return this.g_QA}g_NW(){return this.g_QK}g_Px(){return this.g_QL}g_Oz(){this.g_Py(this.g_QJ)}g_Py(g){if(g=!!g,!this.g_QI)throw new Error("not a group");if(this.g_QL!==g){this.g_QL=g;for(const g of this.g_QM)g.g_Rt();if(this.g_QM.length){const g=this.g_zu.g_Ru(),_=g.g_Fd();_&&_.g_Fy()}}}g_CR(){return this.g_BB}g_MG(){return this.g_QB}g_PU(){return this.g_QE.length&&this.g_QE[0].g_PU()}g_Rl(){return this.g_QE.some(g=>g.g_PU())}g_PT(){return this.g_QE}g_Ng(){return this.g_QE.length}g_Od(g){if(g=Math.floor(g),0>g||g>=this.g_QE.length)throw new RangeError("invalid condition index");return this.g_QE[g]}g_Rv(g){let _=g.g_CQ();if(0===_)return!0;for(;0<=_;--_)if(this.g_QE[_].g_CE()===g.g_CE())return!1;return!0}g_Rw(){return this.g_QF}g_Rx(){return this.g_QF.length}g_Of(g){if(g=Math.floor(g),0>g||g>=this.g_QF.length)throw new RangeError("invalid action index");return this.g_QF[g]}g_Ry(g){return g=Math.floor(g),0<=g&&g=g.length?this.g_Ky:g[_]}g_R$(){let g=this.g_Jl();return this.g_RY()&&(g=!!g),g}g_Ot(){this.g_JP=this.g_Ky}}}{const g=[];g_bz.g_PW=class extends g_bz.g_eG{constructor(g,_,e){super();const a=g.g_CH();this.g_EN=g,this.g_MK=a,this.g_zu=g.g_zW(),this.g_Qu=_,this.g_Sa=null,this.g_Sb=e[1],this.g_lk=!0}static g_pG(g,_,e){return g_bz.g_eI(g_bz.g_PW,g,_,e)}g_eJ(){}g_NU(){this.g_Sa=this.g_MK.g_Fx(this.g_Sb),this.g_EN.g_P$(this);for(let g=this.g_Ol();g;)g instanceof g_bz.g_PS&&g.g_Ow()&&g.g_Q_(this),g=g.g_Ol();this.g_Rt(),this.g_zu.g_PN()&&this.g_EN.g_PC().children.push(this.g_Sa.g_PC())}g_Ol(){return this.g_Qu}g_Nh(){return g}g_Qb(){return this.g_Sa}g_te(){const g=!!this.g_Ol(),_=this.g_zu.g_CI();g&&this.g_MK.g_O_(_),this.g_Sa.g_te(),g&&this.g_MK.g_Pa(_)}*g_OI(){const g=!!this.g_Ol(),_=this.g_zu.g_CI();g&&this.g_MK.g_O_(_),yield*this.g_Sa.g_OI(),g&&this.g_MK.g_Pa(_)}g_Qk(){return!1}g_Qc(){return this.g_lk}g_Rt(){for(let g=this.g_Ol();g;){if(g instanceof g_bz.g_PS&&g.g_Ow()&&!g.g_Px())return void(this.g_lk=!1);g=g.g_Ol()}this.g_lk=!0}}}{function _(g,_){return g>=_?g%_:0>g?(g<=-_&&(g%=_),0>g&&(g+=_),g):g}g_bz.g_Sc=class extends g_bz.g_eG{constructor(g){super(),this.g_rK=g,this.g_zu=g.g_zW()}g_NU(){}static g_Sd(_,a){const g=a[0];return g_bz.g_eI([o,t,i,e,n][g],_,a)}};class n extends g_bz.g_Sc{constructor(g,_){super(g),this.g_Se=this.g_zu.g_Sf(),this.g_Sg=this.g_zu.g_Sh(_[1]),(this.g_Sg===g_bz.g_FM.g_FL.g_Si.random||this.g_Sg===g_bz.g_FM.g_FL.g_Si.g_Sj)&&this.g_rK.g_Sk()}g_Sl(){return this.g_Se.g_Sm(this.g_Sg,this.g_Se)}}class t extends g_bz.g_Sc{constructor(g,_){super(g),this.g_Mg=this.g_zu.g_Ce(_[1]),this.g_Sg=this.g_zu.g_Sh(_[2]),this.g_Sn=!!_[3],this.g_Mo=this.g_zu.g_CH().g_Mp(),this.g_rK.g_So(this.g_Mg)}g_Sl(){return this.g_Mg.g_Gf().g_Sm(this.g_Sg,this.g_Mg.g_Sp().g_KG())}g_Sq(...g){const a=this.g_Mg,n=a.g_Mj().g_Mx(),t=n.length;if(0===t)return this.g_Sn?"":0;const e=_(this.g_rK.g_Sr(),t);return this.g_Mo.g_MI().g_Nc(a),this.g_Sg.apply(n[e].g_KG(),g)}g_Ss(a,...n){const t=this.g_Mg,i=t.g_FP(),e=i.length;if(0===e)return this.g_Sn?"":0;const o=_(a,e);return this.g_Mo.g_MI().g_Nc(t),this.g_Sg.apply(i[o].g_KG(),n)}}class i extends g_bz.g_Sc{constructor(g,_){super(g),this.g_Mg=this.g_zu.g_Ce(_[1]),this.g_St=_[3],this.g_Sn=!!_[2],this.g_rK.g_So(this.g_Mg)}g_Su(){const g=this.g_Mg.g_Mj().g_Mx(),e=g.length;if(0===e)return this.g_Sn?"":0;const a=_(this.g_rK.g_Sr(),e);return g[a].g_Sv(this.g_St)}g_Sw(){const a=this.g_Mg,n=a.g_Mj().g_Mx(),t=n.length;if(0===t)return this.g_Sn?"":0;const i=_(this.g_rK.g_Sr(),t),e=n[i],o=e.g_CE().g_Sx(a.g_Sy());return e.g_Sv(this.g_St+o)}g_Sz(a){const n=this.g_Mg,t=n.g_FP(),i=t.length;if(0===i)return this.g_Sn?"":0;const e=_(a,i),o=t[e];let g=0;return n.g_CJ()&&(g=o.g_CE().g_Sx(n.g_Sy())),o.g_Sv(this.g_St+g)}}class o extends g_bz.g_Sc{constructor(g,_){super(g),this.g_Mg=this.g_zu.g_Ce(_[1]),this.g_SA=this.g_Mg.g_SB(_[2]),this.g_SC=this.g_Mg.g_SD(_[2]),this.g_Sg=this.g_zu.g_Sh(_[3]),this.g_Sn=!!_[4],this.g_Mo=this.g_zu.g_CH().g_Mp(),this.g_rK.g_So(this.g_Mg)}g_SE(...a){const n=this.g_Mg,t=n.g_Mj().g_Mx(),i=t.length;if(0===i)return this.g_Sn?"":0;const e=_(this.g_rK.g_Sr(),i);this.g_Mo.g_MI().g_Nc(n);const o=t[e];let g=0;return n.g_CJ()&&(g=o.g_CE().g_SF(n.g_Sy())),this.g_Sg.apply(o.g_KF()[this.g_SC+g].g_KG(),a)}g_SG(a,...n){const t=this.g_Mg,o=t.g_FP(),e=o.length;if(0===e)return this.g_Sn?"":0;const r=_(a,e);this.g_Mo.g_MI().g_Nc(t);const g=o[r];let d=0;return t.g_CJ()&&(d=g.g_CE().g_SF(t.g_Sy())),this.g_Sg.apply(g.g_KF()[this.g_SC+d].g_KG(),n)}}class e extends g_bz.g_Sc{constructor(g,_){super(g),this.g_SH=null,this.g_SI=_[1]}g_NU(){this.g_SH=this.g_zu.g_CH().g_Oi(this.g_SI,this.g_rK.g_SJ().g_Ol()),this.g_SI=null}g_SK(){return this.g_SH}}}{function _(g){const _=self.g_SL[g];if(!_)throw new Error("invalid expression number");return _}g_bz.g_SM=class extends g_bz.g_eG{constructor(g,_,e){super(),this.g_rK=g,this.g_BA=e,this.g_kv=_,this.g_bQ=null,this.g_SN=!1,this.g_RV=!1}static g_pG(_,a,l){const n=a[0];return g_bz.g_eI([t,r,c,d,e,u,s,t,d,d,i,f,c,p,r,g][n],_,n,l,a)}g_NU(){}g_Sk(){this.g_SN=!0}g_So(g){!this.g_SN&&g&&(g.g_Gf().g_Ge()||(this.g_SN=!0))}g_SO(){return this.g_SN}g_CQ(){return this.g_BA}g_zW(){return this.g_rK.g_zW()}g_SJ(){return this.g_rK.g_SJ()}g_Pz(){return this.g_RV}};class t extends g_bz.g_SM{constructor(g,a,n,t){super(g,a,n),this.g_SP=0;const e=t[1];this.g_SQ=e[0],this.g_SR=[],this.g_SS=null;for(let _=1,i=e.length;_g||g>=this.g_SR.length)throw new RangeError("invalid numbered node");return this.g_SR[g]}g_NU(){for(const g of this.g_SR)g.g_NU();const g=_(this.g_SQ);this.g_SS=this.g_SR.length?g(this):g}g_Sr(){return this.g_SP}g_ST(g){return this.g_SP=g,this.g_SS()}}class r extends t{constructor(g,_,e,a){super(g,_,e,a),this.g_bQ=this.g_SV,14===_&&(this.g_SJ().g_Rd(),this.g_rK instanceof g_bz.g_QY&&this.g_SJ().g_Rm())}g_SV(g){this.g_SP=g;const _=this.g_SS();return"string"==typeof _?_:""}g_SW(){return _(this.g_SQ)()}}class u extends t{constructor(g,_,e,a){super(g,_,e,a),this.g_bQ=this.g_Cr,this.g_RV=!1}g_Cr(g){this.g_SP=g;const _=this.g_SS(),e=this.g_zW().g_Ru();return e.g_Cr(_)}}class d extends g_bz.g_SM{constructor(g,_,e,a){super(g,_,e),this.g_SX=a[1],this.g_bQ=this.g_SY,this.g_RV=!0}g_SY(){return this.g_SX}}class e extends g_bz.g_SM{constructor(g,_,a,n){super(g,_,a),this.g_Mg=this.g_zW().g_Ce(n[1]),this.g_bQ=this.g_CE;const t=this.g_SJ();t.g_QX(this.g_Mg),this.g_rK instanceof g_bz.g_QY?t.g_Rm():t.g_Ol()&&t.g_Ol().g_Rm(),this.g_RV=!0}g_CE(){return this.g_Mg}}class s extends g_bz.g_SM{constructor(g,_,e,a){super(g,_,e),this.g_Bz=this.g_zW().g_OQ().g_Gy(a[1]),this.g_bQ=this.g_CP,this.g_RV=!0}g_CP(){return this.g_Bz}}class g extends g_bz.g_SM{constructor(g,_,e,a){super(g,_,e),this.g_Io=this.g_zW().g_LW().g_Kk(a[1]),this.g_bQ=this.g_IA,this.g_RV=!0}g_IA(){return this.g_Io}}class c extends g_bz.g_SM{constructor(g,_,e,a){super(g,_,e),this.g_SZ=a[1],this.g_bQ=this.g_S_,this.g_RV=!0}g_S_(){return this.g_SZ}}class i extends g_bz.g_SM{constructor(g,_,a,n){super(g,_,a),this.g_S$=n[1];const t=this.g_rK.g_CE();t&&t.g_CJ()?(this.g_bQ=this.g_Ta,this.g_Sk()):(this.g_bQ=this.g_Tb,this.g_RV=!0)}g_Tb(){return this.g_S$}g_Ta(g){g=g||0;const _=this.g_rK.g_CE(),n=_.g_Mj(),t=n.g_FP();let i=null;if(t.length)i=t[g%t.length].g_CE();else if(n.g_Mv()){const _=n.g_Mw();i=_[g%_.length].g_CE()}else if(0<_.g_CO()){const e=_.g_FP();i=e[g%e.length].g_CE()}else return 0;return this.g_S$+i.g_Sx(_.g_Sy())}}class f extends g_bz.g_SM{constructor(g,_,e,a){super(g,_,e),this.g_SI=a[1],this.g_SH=null,this.g_bQ=this.g_Tc,this.g_RV=!0}g_NU(){this.g_SH=this.g_zW().g_CH().g_Oi(this.g_SI,this.g_SJ().g_Ol()),this.g_SI=null}g_Tc(){return this.g_SH}}class p extends g_bz.g_SM{constructor(g,_,e,n){super(g,_,e),this.g_Td=[],this.g_Te=[],this.g_RV=!0;for(let t=1,a=n.length;t[g[0].g_Co(),g[1].g_Co(),g[2]])),g[_]=a}return{ex:g}}g_EF(g){const _=this.g_zu,n=g.ex;if(n){const g=this.g_TL();g.clear();for(const[a,t]of Object.entries(n)){let e=t;"collmemory"===a&&(e=g_bz.g_eI(g_bz.g_jv,t.map(g=>[_.g_IG(g[0]),_.g_IG(g[1]),g[2]]).filter(g=>g[0]&&g[1]))),g.set(a,e)}}else this.g_To&&(this.g_To.clear(),this.g_To=null)}}}{function g(g,_){for(let e=0,a=g.length;eg.g_SO())?(this.g_te=this.g_T$,this.g_OI=this.g_Ua):this.g_Tn?(this.g_te=this.g_Ub,this.g_OI=this.g_Uc):this.g_bL.every(g=>g.g_Pz())?(g(this.g_bL,this.g_Tm),this.g_te=this.g_Ud,this.g_OI=this.g_Ue):(this.g_te=this.g_Uf,this.g_OI=this.g_Ug):(this.g_te=this.g_Ud,this.g_OI=this.g_Ue)}g_Tt(){const g=this.g_Se,_=this.g_Se;this.g_TB(g,_,this.g_TC)}g_Tv(){const g=this.g_Mg.g_Gf(),_=this.g_Mg.g_Sp().g_KG();this.g_TB(g,_,this.g_TD)}g_TB(_,a,g){const n=this.g_Sg,t=this.g_bL;if(0===t.length)this.g_te=_.g_Sm(n,a);else if(1===t.length){const g=t[0];if(g.g_Pz())this.g_te=_.g_TE(n,a,g.g_bQ(0));else{const t=_.g_Sm(n,a);this.g_te=function(){return t(g.g_bQ(0))}}}else if(2===t.length){const g=t[0],i=t[1];if(g.g_Pz()&&i.g_Pz())this.g_te=_.g_TF(n,a,g.g_bQ(0),i.g_bQ(0));else{const t=_.g_Sm(n,a);this.g_te=function(){return t(g.g_bQ(0),i.g_bQ(0))}}}else if(3===t.length){const i=t[0],o=t[1],r=t[2];if(i.g_Pz()&&o.g_Pz()&&r.g_Pz())this.g_te=_.g_TG(n,a,i.g_bQ(0),o.g_bQ(0),r.g_bQ(0));else{const g=_.g_Sm(n,a);this.g_te=function(){return g(i.g_bQ(0),o.g_bQ(0),r.g_bQ(0))}}}else this.g_te=g}g_CR(){return this.g_BB}g_CE(){return this.g_Mg}g_SJ(){return this.g_Tg}g_zW(){return this.g_zu}g_CQ(){return this.g_BA}g_TI(){return this.g_QN.g_QO}g_TJ(g){this.g_QN.g_QO=!!g,this.g_Tg.g_Rk()}g_TK(){return this.g_QN.g_Tq}g_Qk(){return!this.g_TI()&&!this.g_zu.g_RK()&&!this.g_TK()}g_TL(){return this.g_To||(this.g_To=new Map),this.g_To}g_TM(){return this.g_Tp||(this.g_Tp=new Map),this.g_Tp}g_TC(){const _=this.g_Tm;return g(this.g_bL,_),this.g_Sg.apply(this.g_Se,_)}*g_Tu(){if((this.g_TI()||this.g_zu.g_RK())&&(yield this),this.g_TK()){const _=this.g_Tm;g(this.g_bL,_);const e=yield*this.g_Sg.apply(this.g_Se,_);return e}return this.g_te()}g_TD(){const _=this.g_Tm;return g(this.g_bL,_),this.g_Sg.apply(this.g_Mg.g_Sp().g_KG(),_)}*g_Tw(){if((this.g_TI()||this.g_zu.g_RK())&&(yield this),this.g_TK()){const _=this.g_Tm;g(this.g_bL,_);const e=yield*this.g_Sg.apply(this.g_Mg.g_Sp().g_KG(),_);return e}return this.g_te()}g_Ud(){const g=this.g_Tm,_=this.g_Mg.g_Mj().g_FP();for(let e=0,a=_.length;ee.g_ie()||0>e.g_if()||e.g_ic()>_.g_oR()||e.g_id()>_.g_oS()}function d(_,a,n){const t=this.g_Mj(),o=t.g_FP();if(!o.length)return!1;let e=o[0],r=e.g_Bc(),u=e,s=g_bz.g_eR(r.g_FW(),r.g_FX(),a,n);for(let g=1,t=o.length;gs)&&(s=t,u=e)}return t.g_MF(u),!0}function e(g){const _=this.g_Bc();_.g_FW()===g||(_.g_Uh(g),_.g_Ct())}function f(g){const _=this.g_Bc();_.g_FX()===g||(_.g_Ui(g),_.g_Ct())}function g(g,_){const e=this.g_Bc();e.g_Uj(g,_)||(e.g_Uk(g,_),e.g_Ct())}function h(g,_){if(g){const n=g.g_Ul(this.g_Um);if(n){const[g,a]=n.g_Un(_),t=this.g_Bc();t.g_FW()===g&&t.g_FX()===a||(t.g_Uk(g,a),t.g_Ct())}}}function i(g){if(0!==g){const _=this.g_Bc();_.g_Uo(_.g_Up()*g,_.g_Uq()*g),_.g_Ct()}}function j(g,_){if(0!==_){const e=this.g_Bc();g=g_bz.g_eO(g),e.g_Uo(Math.cos(g)*_,Math.sin(g)*_),e.g_Ct()}}function k(){return this.g_Bc().g_FW()}function l(){return this.g_Bc().g_FX()}function m(){return this.g_zu.g_Kn(this.g_Um)}function n(g,_){return g_bz.g_gg(this.g_Bc().g_oR(),g,_)}function o(g,_){return g_bz.g_gg(this.g_Bc().g_oS(),g,_)}function p(g){const _=this.g_Bc();_.g_oR()===g||(_.g_Fb(g),_.g_Ct())}function q(g){const _=this.g_Bc();_.g_oS()===g||(_.g_Fc(g),_.g_Ct())}function r(g,_){const e=this.g_Bc();e.g_oR()===g&&e.g_oS()===_||(e.g_uw(g,_),e.g_Ct())}function s(){return this.g_Bc().g_oR()}function t(){return this.g_Bc().g_oS()}function u(){return this.g_Bc().g_DY().g_ic()}function v(){return this.g_Bc().g_DY().g_id()}function w(){return this.g_Bc().g_DY().g_ie()}function x(){return this.g_Bc().g_DY().g_if()}function y(g,_){return g_bz.g_eT(this.g_Bc().g_Dl(),g_bz.g_eO(_))<=g_bz.g_eO(g)}function z(g){return g_bz.g_eV(this.g_Bc().g_Dl(),g_bz.g_eO(g))}function A(g,_){const a=g_bz.g_eO(g),n=g_bz.g_eO(_),t=this.g_Bc().g_Dl(),e=!g_bz.g_eV(n,a);return e?g_bz.g_eV(t,a)||!g_bz.g_eV(t,n):g_bz.g_eV(t,a)&&!g_bz.g_eV(t,n)}function B(g){const _=this.g_Bc(),e=g_bz.g_eN(g_bz.g_eO(g));isNaN(e)||_.g_Dl()===e||(_.g_Dk(e),_.g_Ct())}function C(g){if(!(isNaN(g)||0===g)){const _=this.g_Bc();_.g_Dk(_.g_Dl()+g_bz.g_eO(g)),_.g_Ct()}}function D(g){if(!(isNaN(g)||0===g)){const _=this.g_Bc();_.g_Dk(_.g_Dl()-g_bz.g_eO(g)),_.g_Ct()}}function E(g,_){const n=this.g_Bc(),t=n.g_Dl(),e=g_bz.g_eU(t,g_bz.g_eO(_),g_bz.g_eO(g));isNaN(e)||t===e||(n.g_Dk(e),n.g_Ct())}function F(_,n,t){const o=this.g_Bc(),e=o.g_Dl(),r=n-o.g_FW(),a=t-o.g_FX(),g=Math.atan2(a,r),d=g_bz.g_eU(e,g,g_bz.g_eO(_));isNaN(d)||e===d||(o.g_Dk(d),o.g_Ct())}function G(_,n){const t=this.g_Bc(),i=t.g_Dl(),e=_-t.g_FW(),a=n-t.g_FX(),o=Math.atan2(a,e);isNaN(o)||i===o||(t.g_Dk(o),t.g_Ct())}function H(){return g_bz.g_eP(this.g_Bc().g_Dl())}function I(g,_){return g_bz.g_gg(g_bz.g_fe(100*this.g_Bc().g_xv()),g,_)}function J(){return this.g_Bc().g_CW()}function K(g){g=!!g;const _=this.g_Bc();_.g_CW()===g||(_.g_CX(g),this.g_zu.g_CY())}function L(g){const _=g_bz.g_eM(g/100,0,1),e=this.g_Bc();e.g_xv()===_||(e.g_xx(_),this.g_zu.g_CY())}function M(g){bg.g_hm(g);const _=this.g_Bc();_.g_LA().g_hg(bg)||(_.g_Ur(bg),this.g_zu.g_CY())}function N(){return g_bz.g_fe(100*this.g_Bc().g_xv())}function O(g){return!!g&&this.g_Bc().g_Cr()===g}function P(_){const g=this.g_Mj(),a=g.g_FP();if(!a.length)return!1;let n=a[0],t=n;for(let e=1,g=a.length;ed||g===d&&o.g_DB()>r.g_DB())&&(t=n):(g_||_>=i.length)){const o=n.g_qV().g_re(_);if("color"===o){bg.g_hm(e);const g=i[_];if(bg.g_hg(g))return;g.g_g$(bg)}else{if("percent"===o&&(e/=100),i[_]===e)return;i[_]=e}a.g_KK(t)&&this.g_zu.g_CY()}}}function Z(g,_,e){return g_bz.g_gg(this.g_IC().g_KL(g),_,e)}function $(g){return!!this.g_IC().g_KL(g)}function _(_,a){const n=this.g_Mj(),t=n.g_FP();if(!t.length)return!1;let i=t[0],o=i,r=i.g_KL(a);for(let g=1,e=t.length;gr)&&(r=e,o=i)}return n.g_MF(o),!0}function _g(g){return this.g_zu.g_Oc().g_TH()?ag(this,g):eg(this,g)}function eg(g,_){const e=g.g_zW().g_IG(_);if(!e)return!1;const a=g.g_Mj();if(!a.g_Mt()&&!a.g_MB().includes(e))return!1;if(g.g_CJ()){if(e.g_CE().g_Uv(g))return a.g_MF(e),g.g_TN(),!0;}else if(e.g_CE()===g)return a.g_MF(e),g.g_TN(),!0;return!1}function ag(g,_){const n=g.g_Mj();if(n.g_Mt()){n.g_MA(!1),n.g_Ms();const t=g.g_FP();for(let g=0,a=t.length;gthis.g_MK.g_zW().g_Eh())return!1;return!0}g_Pg(g){g.g_MT(this.g_VI,this.g_MP);for(const[_,e]of this.g_VJ.entries()){const g=_.g_Mj();e.g_MT(g)}this.g_VI.g_RN(g),this.g_MK.g_OY(this.g_Qv),this.g_VK=!0}async g_Pk(g){g.g_MT(this.g_VI,this.g_MP);for(const[_,e]of this.g_VJ.entries()){const g=_.g_Mj();e.g_MT(g)}for(const _ of this.g_VI.g_RO(g))await this.g_MK.g_zW().g_OH(_);this.g_MK.g_OY(this.g_Qv),this.g_VK=!0}g_Ph(){return this.g_VK}g_Pm(g){for(const _ of this.g_VJ.values())_.g_Pm(g)}g_ED(){const g={},_={t:this.g_IS,st:this.g_VG,s:this.g_VH,ev:this.g_VI.g_CR(),sm:this.g_Qv.map(g=>g.g_CR()),sols:g};this.g_VI.g_Ry(this.g_MP)&&(_.act=this.g_VI.g_Of(this.g_MP).g_CR());for(const[_,e]of this.g_VJ)g[_.g_CR().toString()]=e.g_ED();return _}static g_PA(_,g){const n=_.g_zW(),a=_.g_On(g.ev);if(!a)return null;let t=0;if(g.hasOwnProperty("act")){const e=_.g_Op(g.act);if(!e)return null;t=e.g_CQ()}const i=g_bz.g_eI(g_bz.g_Pc,_);i.g_IS=g.t,i.g_VG=g.st,i.g_VH=g.s,i.g_VI=a,i.g_MP=t;for(const e of g.sm){const g=n.g_FR(e);g&&i.g_Qv.push(g)}for(const[a,t]of Object.entries(g.sols)){const e=parseInt(a,10),o=n.g_FR(e);if(!o)continue;const g=g_bz.g_eI(g_bz.g_VM,null);g.g_EF(_,t),i.g_VJ.set(o,g)}return i}},"use strict",g_bz.g_VM=class extends g_bz.g_eG{constructor(g){super(),this.g_Mg=null,this.g_VU=!0,this.g_Bf=[],g&&(this.g_Mg=g.g_CE(),this.g_VU=g.g_Mt(),g_bz.g_fV(this.g_Bf,g.g_MB()))}g_eJ(){this.g_Mg=null,g_bz.g_fR(this.g_Bf)}g_MT(g){g.g_MA(this.g_VU),g_bz.g_fV(g.g_MB(),this.g_Bf)}g_Pm(g){g_bz.g_f_(this.g_Bf,g)}g_ED(){return{sa:this.g_VU,insts:this.g_Bf.map(g=>g.g_Co())}}g_EF(g,_){const e=g.g_zW();this.g_VU=!!_.sa,g_bz.g_fR(this.g_Bf);for(const n of _.insts){const g=e.g_IG(n);g&&this.g_Bf.push(g)}}},"use strict";{function _(g,_){let e=g.get(_);return e||(e=new Map,g.set(_,e)),e}g_bz.g_VV=class extends g_bz.g_eG{constructor(g){super(),this.g_zu=g.g_LX,this.g_VW=!!g.g_VX,this.g_VY=!!g.g_VZ,this.g_V_=!!g.g_V$,this.g_Wa=!!g.g_Wb,this.g_Wc=!!g.g_Wd,this.g_We=null,this.g_Wf=new Map,this.g_Wg=new Map,this.g_Wh=new Map,this.g_Wi=new Map}g_eJ(){this.g_zu=null}g_zW(){return this.g_zu}g_Wj(){}g_Ge(){return this.g_VW}g_FO(){return this.g_VY}g_Wk(){return this.g_V_}g_qY(){return this.g_Wa}g_Wl(){return this.g_Wc}g_Sm(g,_){if(!_)throw new Error("missing 'this' binding");let e=this.g_Wf.get(g);return e?e:(e=g.bind(_),this.g_Wf.set(g,e),e)}g_TE(g,a,n){if(!a)throw new Error("missing 'this' binding");const t=_(this.g_Wg,g);let e=t.get(n);return e?e:(e=g.bind(a,n),t.set(n,e),e)}g_TF(a,n,t,i){if(!n)throw new Error("missing 'this' binding");const e=_(this.g_Wh,a),o=_(e,t);let g=o.get(i);return g?g:(g=a.bind(n,t,i),o.set(i,g),g)}g_TG(a,n,t,o,e){if(!n)throw new Error("missing 'this' binding");const r=_(this.g_Wi,a),g=_(r,t),d=_(g,o);let i=d.get(e);return i?i:(i=a.bind(n,t,o,e),d.set(e,i),i)}g_Wm(g){if(!this.g_Ge())throw new Error("must be single-global plugin");this.g_We=g}g_Wn(){if(!this.g_Ge())throw new Error("must be single-global plugin");return this.g_We}g_Sp(){if(!this.g_Ge())throw new Error("must be single-global plugin");return this.g_We.g_Sp()}}}"use strict",g_bz.g_Wo=class extends g_bz.g_VV{constructor(g,_){super(g),this.g_Wp=_,this.g_Wq=0,this.g_Wr=new Map}g_eJ(){super.g_eJ()}g_Ws(g){const _=this.g_Wq++;return this.g_Wr.set(_,g),_}g_Wt(g){this.g_Wr.delete(g)}g_Wu(g,_){this.g_zu.g_Wv(this.g_Wp,g,g=>{const e=this.g_Wr.get(g.elementId);_(e,g)})}},"use strict",g_bz.g_Ww=class extends g_bz.g_eG{constructor(g){super(),this.g_Mg=g,this.g_zu=g.g_zW(),this.g_Wx=g.g_Gf()}g_eJ(){this.g_Mg=null,this.g_zu=null,this.g_Wx=null}g_CE(){return this.g_Mg}g_zW(){return this.g_zu}g_Gf(){return this.g_Wx}g_Wy(){return this.g_Mg.g_Wy()}g_TR(){}g_Fp(){}g_Ft(){}g_Fr(){}g_Wz(){}},"use strict",g_bz.g_WA=class extends g_bz.g_eG{constructor(g,_){super(),this.g_Um=g,this.g_Wp=_,this.g_zu=g.g_zW(),this.g_Mg=this.g_Um.g_CE(),this.g_WB=this.g_Mg.g_WC(),this.g_WD=null,this.g_WE=null,this.g_WF=!1,this.g_WG=!1,this.g_lw=null,this.g_ub=!1}g_eJ(){this.g_ub=!0,this.g_WH(),this.g_WI(),this.g_WD=null,this.g_WE=null,this.g_lw&&(this.g_lw.g_eJ(),this.g_lw=null),this.g_Um=null,this.g_zu=null,this.g_Mg=null,this.g_WB=null}g_eK(){return this.g_ub}g_IC(){return this.g_Um}g_zW(){return this.g_zu}g_CE(){return this.g_Mg}g_Gf(){return this.g_WB.g_Gf()}g_WC(){return this.g_WB}g_HI(g){return this.g_zu.g_HI(g,this.g_Um)}g_WJ(g){return this.g_zu.g_WJ(g,this.g_Um)}g_FI(g){return this.g_zu.g_FI(g,this.g_Um)}g_WK(g,_){return this.g_zu.g_WK(g,this.g_Um,_)}g_WL(g,_){return this.g_zu.g_WL(g,this.g_Um,_)}g_WM(g,_){this.g_zu.g_Wv(this.g_Wp,g,_)}g_WN(g){for(const[_,e]of g)this.g_WM(_,e)}g_WO(g,_){this.g_zu.g_WP(this.g_Wp,g,_)}g_WQ(g,_){return this.g_zu.g_Ae(this.g_Wp,g,_)}g_WR(g,_){this.g_zu.g_AB()?this.g_WO(g,_):window.c3_runtimeInterface._OnMessageFromRuntime({type:"event",component:this.g_Wp,handler:g,data:_,responseId:null})}g_Ee(){return null}g_Un(){const g=this.g_Um.g_Bc();return[g.g_FW(),g.g_FX()]}g_Im(){}g_WS(){}g_WT(){this.g_WF||(!this.g_WD&&(this.g_WD=()=>this.g_Im()),this.g_zu.g_kS().addEventListener("tick",this.g_WD),this.g_WF=!0)}g_WH(){this.g_WF&&(this.g_zu.g_kS().removeEventListener("tick",this.g_WD),this.g_WF=!1)}g_WU(){return this.g_WF}g_WV(){this.g_WG||(!this.g_WE&&(this.g_WE=()=>this.g_WS()),this.g_zu.g_kS().addEventListener("tick2",this.g_WE),this.g_WG=!0)}g_WI(){this.g_WG&&(this.g_zu.g_kS().removeEventListener("tick2",this.g_WE),this.g_WG=!1)}g_WW(){return this.g_WG}g_WX(){return[]}g_EE(){return null}g_EG(){}g_WY(){}g_WZ(){}g_KC(){}g_KD(){}g_W_(g,..._){g.call(this,..._)}g_W$(g,..._){return g.call(this,..._)}},"use strict",g_bz.g_Xa=class extends g_bz.g_WA{constructor(g,_){super(g,_),this.g_Iy=g.g_Bc(),this.g_Xb=null,this.g_Xc=null}g_eJ(){if(this.g_Xb){const g=this.g_zu.g_kS();g.removeEventListener("webglcontextlost",this.g_Xb),g.removeEventListener("webglcontextrestored",this.g_Xc),this.g_Xb=null,this.g_Xc=null}this.g_Iy=null,super.g_eJ()}g_Xd(){if(!this.g_Xb){this.g_Xb=()=>this.g_A_(),this.g_Xc=()=>this.g_Xe();const g=this.g_zu.g_kS();g.addEventListener("webglcontextlost",this.g_Xb),g.addEventListener("webglcontextrestored",this.g_Xc)}}g_A_(){}g_Xe(){}g_Bc(){return this.g_Iy}},"use strict";{const _=g_bz.g_eI(g_bz.Rect);g_bz.g_Xf=class extends g_bz.g_Xa{constructor(g,_){super(g,_),this.g_Xg=this.g_Gf().g_Ws(this),this.g_Xh=!0,this.g_Xi=!1,this.g_Xj=g_bz.g_eI(g_bz.Rect,0,0,-1,-1);const e=this.g_zu.g_DO();this.g_Xk=e.g_Xl(),this.g_Xm=e.g_Xn(),this.g_Xo=!1,this.g_WT()}g_eJ(){this.g_Gf().g_Wt(this.g_Xg),this.g_Xp("destroy"),this.g_Xg=-1,super.g_eJ()}g_Xp(g,_){_||(_={}),_.elementId=this.g_Xg,this.g_WO(g,_)}g_Xq(g,_){return _||(_={}),_.elementId=this.g_Xg,this.g_WQ(g,_)}g_Xr(g){g||(g={});const _=this.g_Bc().g_CW();g.elementId=this.g_Xg,g.isVisible=_,Object.assign(g,this.g_Xs()),this.g_Xh=!!g.isVisible,this.g_WO("create",g),this.g_Xt(!0)}g_Xu(g){g=!!g,this.g_Xh===g||(this.g_Xh=g,this.g_Xp("set-visible",{isVisible:g}))}g_Im(){this.g_Xt(!1)}g_Xt(a){var t=Math.round;const r=this.g_Bc(),d=r.g_Cr(),e=r.g_FW(),u=r.g_FX();let[g,s]=d.g_EA(e,u),[c,f]=d.g_EA(e+r.g_oR(),u+r.g_oS());const M=this.g_zu.g_DO(),l=M.g_Xv(),b=M.g_Xw();if(!r.g_CW()||!d.g_CW()||0>=c||0>=f||g>=l||s>=b)return void this.g_Xu(!1);1>g&&(g=1),1>s&&(s=1),c>=l&&(c=l-1),f>=b&&(f=b-1),_.set(g,s,c,f);const n=M.g_Xl(),o=M.g_Xn();if(!a&&_.g_n(this.g_Xj)&&this.g_Xk===n&&this.g_Xm===o)return void this.g_Xu(!0);this.g_Xj.g_r(_),this.g_Xk=n,this.g_Xm=o,this.g_Xu(!0);let p=null;this.g_Xi&&(p=d.g_Em()-.2),this.g_Xp("update-position",{left:t(this.g_Xj.g_ic())+M.g_Xx(),top:t(this.g_Xj.g_id())+M.g_Xy(),width:t(this.g_Xj.width()),height:t(this.g_Xj.height()),fontSize:p})}g_Xz(){this.g_Xp("focus",{focus:!0})}g_XA(){this.g_Xp("focus",{focus:!1})}g_XB(g,_){this.g_Xp("set-css-style",{prop:g_bz.g_gN(g),val:_})}g_XC(){this.g_Xo||(this.g_Xo=!0,Promise.resolve().then(()=>{this.g_Xo=!1,this.g_Xp("update-state",this.g_Xs())}))}g_Xs(){}g_XD(){return this.g_Xg}}}"use strict",g_bz.g_XE=class extends g_bz.g_eG{constructor(g){super(),this.g_zu=g.g_LX,this.g_XF=g_bz.g_eI(g_bz.g_jC),this.g_XG=g_bz.g_eI(g_bz.g_jC)}g_eJ(){this.g_XG.g_eJ(),this.g_XF.g_eJ(),this.g_zu=null}g_zW(){return this.g_zu}g_Wj(){}g_XH(g){this.g_XF.g_jG(g)}g_XI(){return this.g_XF.g_jI()}g_Cq(g){this.g_XG.g_jG(g)}g_Cx(g){this.g_XG.g_jy(g)}g_FP(){return this.g_XG.g_jI()}},"use strict",g_bz.g_XJ=class extends g_bz.g_eG{constructor(g){super(),this.g_zu=g.g_zW(),this.g_SA=g,this.g_Mg=g.g_CE(),this.g_XK=g.g_XL(),this.g_XK.g_XH(this.g_Mg)}g_eJ(){this.g_zu=null,this.g_SA=null,this.g_Mg=null,this.g_XK=null}g_XM(){return this.g_SA}g_CE(){return this.g_Mg}g_zW(){return this.g_zu}g_XL(){return this.g_XK}},"use strict",g_bz.g_XN=class extends g_bz.g_eG{constructor(g,_){super(),this.g_XO=g,this.g_Wp=_,this.g_Um=g.g_XP(),this.g_zu=g.g_zW(),this.g_SA=g.g_XM(),this.g_WB=this.g_SA.g_WC(),this.g_WF=!1,this.g_WG=!1,this.g_XQ=!1,this.g_lw=null}g_eJ(){this.g_WH(),this.g_WI(),this.g_XR(),this.g_lw&&(this.g_lw.g_eJ(),this.g_lw=null),this.g_XO=null,this.g_Um=null,this.g_zu=null,this.g_SA=null,this.g_WB=null}g_XL(){return this.g_SA.g_XL()}g_XS(){return this.g_XO}g_XP(){return this.g_Um}g_CE(){return this.g_Um.g_CE()}g_Bc(){return this.g_Um.g_Bc()}g_zW(){return this.g_zu}g_XM(){return this.g_SA}g_WC(){return this.g_WB}g_HI(g){return this.g_zu.g_HI(g,this.g_Um)}g_WJ(g){return this.g_zu.g_WJ(g,this.g_Um)}g_FI(g){return this.g_zu.g_FI(g,this.g_Um)}g_XT(){}g_Im(){}g_WS(){}g_XU(){}g_WT(){this.g_WF||(this.g_zu.g_XV(this),this.g_WF=!0)}g_WH(){this.g_WF&&(this.g_zu.g_XW(this),this.g_WF=!1)}g_WU(){return this.g_WF}g_WV(){this.g_WG||(this.g_zu.g_XX(this),this.g_WG=!0)}g_WI(){this.g_WG&&(this.g_zu.g_XY(this),this.g_WG=!1)}g_WW(){return this.g_WG}g_XZ(){this.g_XQ||(this.g_zu.g_X_(this),this.g_XQ=!0)}g_XR(){this.g_XQ&&(this.g_zu.g_X$(this),this.g_XQ=!1)}g_Ya(){return this.g_XQ}g_WX(){return[]}g_WM(g,_){this.g_zu.g_Wv(this.g_Wp,g,_)}g_Yb(){}g_EE(){return null}g_EG(){}g_KC(){}g_KD(){}g_W_(g,..._){g.call(this,..._)}g_W$(g,..._){return g.call(this,..._)}},"use strict",g_bz.g_FM={},g_bz.g_Yc={},g_bz.g_Yd=class extends g_bz.g_eG{constructor(g){super(),this.g_zu=g,this.g_Ye=[],this.g_Yf=new Map,this.g_Se=null,this.g_Yg=[],this.g_Yh=new Map,this.g_Yi=null,this.g_Yj=null}g_Yk(g){const _=this.g_zu.g_Sh(g[0]);if(!_)throw new Error("missing plugin");g_bz.g_Ux(g,_);const e=g_bz.g_eI(_,{g_LX:this.g_zu,g_VX:g[1],g_VZ:g[2],g_V$:g[5],g_Wd:g[8],g_Wb:g[9]});e.g_Wj(),this.g_Ye.push(e),this.g_Yf.set(_,e)}g_Yl(){this.g_Se=g_bz.g_eI(g_bz.g_FM.g_FL,{g_LX:this.g_zu,g_VX:!0}),this.g_Se.g_Wj()}g_Ym(g){const _=this.g_zu.g_Sh(g[1]);if(!_)throw new Error("missing behavior");const e=g_bz.g_eI(_,{g_LX:this.g_zu});e.g_Wj(),this.g_Yg.push(e),this.g_Yh.set(_,e),!this.g_Yi&&g_bz.g_Yc.g_Yn&&e instanceof g_bz.g_Yc.g_Yn?this.g_Yi=e:!this.g_Yj&&g_bz.g_Yc.g_Yo&&e instanceof g_bz.g_Yc.g_Yo&&(this.g_Yj=e)}g_Yp(g){return this.g_Yf.get(g)||null}g_Yq(g){return this.g_Yh.has(g)}g_Yr(g){return this.g_Yh.get(g)||null}g_Sf(){return this.g_Se}g_Ys(){return this.g_Yi}g_Yt(){return this.g_Yj}},"use strict";{const g=new Set;g_bz.g_Yu=class extends g_bz.g_eG{constructor(){super(),this.g_AO="",this.g_AP=0,this.g_ou=0,this.g_Yv=0,this.g_Yw=0,this.g_oo=0,this.g_op=0,this.g_Yx=!1,this.g_Yy=null,this.g_Yz="",this.g_tW=g_bz.g_eI(g_bz.Rect),g.add(this)}g_eJ(){this.g_t_(),this.g_Yy=null,g.delete(this)}static g_A_(){for(const _ of g)_.g_Yz="",_.g_tW.set(0,0,0,0)}g_YA(g){this.g_AO=g[0],this.g_AP=g[1],this.g_ou=g[2],this.g_Yv=g[3],this.g_Yw=g[4],this.g_oo=g[5],this.g_op=g[6],this.g_Yx=!0}g_YB(g){this.g_AO=g[0],this.g_AP=g[1],this.g_Yv=g[2],this.g_Yw=g[3],this.g_oo=g[4],this.g_op=g[5],this.g_ou=g[11],this.g_Yx=!0}g_YC(g,_){if(this.g_Yy)throw new Error("already loaded asset");this.g_AO=_;const e={};return g_bz.g_gl(_)&&(e.g_Ao="remote"),this.g_YD(g,e),this.g_Yy.g_Ar()}g_YE(g){if(g===this)throw new Error("cannot replace with self");this.g_t_(),this.g_AO=g.g_AO,this.g_AP=g.g_AP,this.g_ou=g.g_ou,this.g_Yv=g.g_Yv,this.g_Yw=g.g_Yw,this.g_oo=g.g_oo,this.g_op=g.g_op,this.g_Yx=g.g_Yx,this.g_Yy=g.g_Yy,this.g_Yz=g.g_Yz,this.g_tW=g.g_tW}g_Aq(){return this.g_AO}g_jA(){return this.g_AP}g_YF(){return this.g_ou}g_YG(){return this.g_Yv}g_YH(){return this.g_Yw}g_oR(){return this.g_oo}g_oS(){return this.g_op}g_YI(){return this.g_Yy.g_oR()}g_YJ(){return this.g_Yy.g_oS()}g_YD(g,_){if(this.g_Yy)throw new Error("already got asset");_=Object.assign({},_,{url:this.g_Aq(),size:this.g_jA()}),this.g_Yy=g.g_An(_)}async g_A$(g,_){if(!this.g_Yy)throw new Error("no asset");if(this.g_Yz)throw new Error("already loaded texture");this.g_Yz="loading";const e=await this.g_Yy.g_A$(g,_);return e?(this.g_Yz="loaded",this.g_Yx||(this.g_oo=e.g_oR(),this.g_op=e.g_oS(),this.g_Yx=!0),this.g_tW.set(this.g_Yv,this.g_Yw,this.g_Yv+this.g_oo,this.g_Yw+this.g_op),this.g_tW.g_P(e.g_oR(),e.g_oS()),e):(this.g_Yz="",null)}g_t_(){this.g_Yz&&(this.g_Yy&&this.g_Yy.g_t_(),this.g_Yz="",this.g_tW.set(0,0,0,0))}g_pp(){return this.g_Yy?this.g_Yy.g_pp():null}g_uO(){return this.g_tW}async g_YK(){const g=await this.g_Yy.g_Ba(),_=g_bz.g_gy(this.g_oo,this.g_op),e=_.getContext("2d");return e.drawImage(g,this.g_Yv,this.g_Yw,this.g_oo,this.g_op,0,0,this.g_oo,this.g_op),_}}}"use strict",g_bz.g_YL=class extends g_bz.g_eG{constructor(g){super(),this.g_pJ=g[0],this.g_YM=g[1],this.g_Tj=!!g[2],this.g_YN=g[3],this.g_YO=g[4],this.g_YP=!!g[5],this.g_BB=g[6],this.g_YQ=g[7].map(g=>g_bz.g_eI(g_bz.g_YR,g))}g_eJ(){for(const g of this.g_YQ)g.g_eJ();g_bz.g_fR(this.g_YQ)}g_YS(g){for(const _ of this.g_YQ)_.g_Wy().g_YD(g)}g_YT(g,_){return Promise.all(this.g_YQ.map(e=>e.g_Wy().g_A$(g,_)))}g_YU(){for(const g of this.g_YQ)g.g_Wy().g_t_()}g_qT(){return this.g_pJ}g_CR(){return this.g_BB}g_YV(){return this.g_YQ.length}g_YW(){return this.g_YQ}g_YX(g){if(g=Math.floor(g),0>g||g>=this.g_YQ.length)throw new RangeError("invalid frame");return this.g_YQ[g]}g_YY(){return this.g_YM}g_RA(){return this.g_Tj}g_YZ(){return this.g_YN}g_Y_(){return this.g_YO}g_Y$(){return this.g_YP}},"use strict",g_bz.g_YR=class extends g_bz.g_eG{constructor(g){super(),this.g_Za=g_bz.g_eI(g_bz.g_Yu),this.g_Za.g_YB(g),this.g_Zb=g[6],this.g_Zc=g_bz.g_eI(g_bz.g_hJ,g[7],g[8]),this.g_Zd=g[9].map(g=>g_bz.g_eI(g_bz.g_Ze,this,g)),this.g_Zf=new Map;for(const _ of this.g_Zd)this.g_Zf.set(_.g_qT().toLowerCase(),_);this.g_Zg=null;const _=g[10];6<=_.length&&(this.g_Zg=g_bz.g_eI(g_bz.g_jf,_))}g_eJ(){this.g_Zg&&(this.g_Zg.g_eJ(),this.g_Zg=null),this.g_Za.g_eJ(),this.g_Za=null}g_Wy(){return this.g_Za}g_Zh(){return this.g_Zb}g_Ln(){return this.g_Zc.g_hN()}g_Lp(){return this.g_Zc.g_hP()}g_Zi(){return this.g_Zg}g_Zj(g){return this.g_Zf.get(g.toLowerCase())||null}g_Zk(g){return g=Math.floor(g),0>g||g>=this.g_Zd.length?null:this.g_Zd[g]}g_Zl(){return this.g_Zd.length}},"use strict",g_bz.g_Ze=class extends g_bz.g_eG{constructor(g,_){super(),this.g_Zm=g,this.g_pJ=_[0],this.g_Zn=g_bz.g_eI(g_bz.g_hJ,_[1],_[2])}g_eJ(){}g_qT(){return this.g_pJ}g_FW(){return this.g_Zn.g_hN()}g_FX(){return this.g_Zn.g_hP()}g_Zo(){return this.g_Zn}},"use strict",g_bz.g_Zp=class extends g_bz.g_eG{constructor(g,_,e){super();const a=g.g_Sh(e[1]);if(this.g_zu=g,this.g_Wx=g.g_Zq().g_Yp(a),this.g_WB=null,this.g_Zr=a.g_GM,this.g_BA=_,this.g_BB=e[11],this.g_pJ=e[0],this.g_Zs=!!e[9],this.g_Zt=!!e[2],this.g_Zu=!!e[10],this.g_Zv=e[3].map(g=>g[0]),this.g_Zw=e[3].map(g=>g[1]),this.g_Zx=e[4],this.g_Zy=e[5],this.g_VY=this.g_Wx.g_FO(),this.g_BW=null,this.g_Zz=g_bz.g_eI(g_bz.g_ZA,g.g_Cc(),g.g_Cd()),this.g_ZB=!0,this.g_ZC=!1,this.g_ZD=null,this.g_ZE=null,this.g_ZF=-1,this.g_ZG=null,this.g_ZH=null,this.g_ZI=null,this.g_ZJ=null,this.g_ZK=null,this.g_ZL=!1,this.g_ZM=null,this.g_ZN=e[8].map(g=>g_bz.g_ZO.g_pG(this,g)),this.g_ZP=[],this.g_ZQ=new Map,this.g_ZR=new Map,this.g_ZS=new Set,this.g_ZT=g_bz.g_eI(g_bz.g_Mf,this),this.g_ZU=null,this.g_ZV=0,this.g_ZW=!1,this.g_ZM=null,this.g_Za=null,this.g_ZX=null,this.g_ZY=null,this.g_ZZ=null,this.g_Z_=0,this.g_To=new Map,this.g_Tp=new Map,this.g_Bf=[],this.g_Z$=!0,this.g_Wx.g_Wl()&&(this.g_BW=g_bz.g_eI(g_bz.g_BX,this,e[12])),e[6]&&(this.g_Za=g_bz.g_eI(g_bz.g_Yu),this.g_Za.g_YA(e[6])),e[7]){this.g_ZX=e[7].map(g=>g_bz.g_eI(g_bz.g_YL,g)),this.g_ZY=new Map,this.g_ZZ=new Map;for(const g of this.g_ZX)this.g_ZY.set(g.g_qT().toLowerCase(),g),this.g_ZZ.set(g.g_CR(),g)}this.g_Zt?(this.g_ZD=[],this.g_ZE=new Set,this.g_ZF=this.g_zu.g__a()):(this.g_ZG=[],this.g_ZH=new Set,this.g_ZI=[],this.g_ZJ=[],this.g_ZK=[]),this.g_WB=g_bz.g_eI(a.g__b,this),e[13]&&e[13].length&&this.g_WB.g_Wz(e[13]),(!this.g_zu.g__c()||this.g_Zt||this.g_Zu||!this.g_VY)&&this.g_Wj(),this.g_Wx.g_Ge()&&(this.g_Wx.g_Wm(this),this.g__d(e))}static g_pG(g,_,e){return g_bz.g_eI(g_bz.g_Zp,g,_,e)}g_eJ(){if(this.g_Za&&(this.g_Za.g_eJ(),this.g_Za=null),this.g_ZX){for(const g of this.g_ZX)g.g_eJ();g_bz.g_fR(this.g_ZX),this.g_ZY.clear(),this.g_ZZ.clear()}this.g_ZT.g_eJ(),this.g_ZT=null,this.g_To.clear(),this.g_Tp.clear(),this.g_ZM=null,this.g_zu=null}g__e(g){for(let _=1,e=g.length;_this.g_Z_)throw new Error("released textures too many times");0===this.g_Z_&&this.g_WB.g_Ft()}}g_Fr(){if(this.g_Zt)throw new Error("not applicable to family");this.g_WB.g_Fr()}g_zW(){return this.g_zu}g_Gf(){return this.g_Wx}g__w(){return this.g_Zr}g_qT(){return this.g_pJ}g_CQ(){return this.g_BA}g_CR(){return this.g_BB}g_CJ(){return this.g_Zt}g_Cn(){return this.g_Zs}g_FO(){return this.g_VY}g_Sy(){return this.g_ZF}g__h(){return this.g_ZN}g__k(){return this.g_Zx}g__x(g){return g&&this.g_ZS.has(g)}g__j(){return this.g_Zv.length}g__y(){return this.g_Zv}g__z(g){return this.g_Zv.indexOf(g)}g__A(g){if(g=Math.floor(g),0>g||g>=this.g_Zw.length)throw new RangeError("invalid instance variable index");return this.g_Zw[g]}g__l(){return this.g_Zy}g__B(){return this.g_ZP}g_SB(g){return this.g_ZQ.get(g.toLowerCase())||null}g_SD(g){const _=this.g_ZR.get(g.toLowerCase());return"undefined"==typeof _?-1:_}g_CS(){return this.g_BW}g_Wl(){return this.g_Wx.g_Wl()}g_OZ(){return this.g_ZT}g_Mj(){return this.g_ZT.g_Mj()}g_Wy(){return this.g_Za}g_Ch(g){this.g_ZU=g}g_Cg(){return this.g_ZU}g_Ci(g){this.g_ZV=g}g__C(){return this.g_ZV}g__D(){return this.g_ZX}g__E(){return this.g_ZX.length}g_Qh(){return this.g_ZG}g_Uv(g){return this.g_ZH.has(g)}g_Rb(){return this.g_ZD}g_CK(g){return this.g_ZE.has(g)}g_SF(g){return this.g_ZJ[g]}g_Sx(g){return this.g_ZI[g]}g__F(g){if(!this.g_ZX)throw new Error("no animations");return this.g_ZY.get(g.toLowerCase())||null}g__G(g){if(!this.g_ZX)throw new Error("no animations");return this.g_ZZ.get(g)||null}g__H(){if(!this.g_ZX)throw new Error("no animations");return this.g_ZX[0].g_YX(0)}g__I(){if(this.g_ZX){const g=this.g__H().g_Wy();return[g.g_oR(),g.g_oS()]}return this.g_Za?[this.g_Za.g_oR(),this.g_Za.g_oS()]:[100,100]}g_Sp(){if(!this.g_Wx.g_Ge())throw new Error("not a single-global plugin");return this.g_Bf[0]}g_FP(){return this.g_Bf}g_CO(){return this.g_Bf.length}g_Cq(g){this.g_Bf.push(g)}g__J(){this.g_Z$=!0}g_FY(){if(this.g_Z$&&!this.g_Zt){const g=this.g_Bf;let _=0;for(let e=g.length;_g.g_EE())};return this.g_To&&this.g_To.size&&(g.ex=g_bz.g_gL(this.g_To)),g}g_EF(g){this.g_To&&(this.g_To.clear(),this.g_To=null);const _=g.ex;_&&(this.g_To=g_bz.g_gM(_));const a=this.g_Bf,n=g.instances;for(let _=0,t=Math.min(a.length,n.length);_g.g_FO())}},"use strict";{let g=0;g_bz.g_GM=class extends g_bz.g_eG{constructor(_){if(super(),this.g_zu=_.g_LX,this.g__X=_.g__q,this.g_Wx=this.g__X.g_Gf(),this.g_qu=this.g_Wx.g_qY(),this.g__Y=0,this.g__Z=_.g__r,this.g___=0,this.g__$=g++,this.g_$a=!1,this.g_$b=[],this.g_$c=null,this.g_$d=this.g__X.g__B().map((g,_)=>g_bz.g_eI(g_bz.g_$e,{g_LX:this.g_zu,g_$f:g,g_L$:this,index:_})),this.g_Iy=null,this.g_$g=-1,this.g_$h=null,this.g_To=null,this.g_Tp=null,this.g_$i=!1,this.g_ZL=this.g__X.g_CN(),this.g_$j=this.g_ZL?[]:null,this.g_$k=null,this.g_Wx.g_FO())if(this.g_Iy=g_bz.g_eI(g_bz.g_$l,this,_.g_$m),_.g_$n)this.g_Iy.g_$o(_.g_$n);else{const[g,_]=this.g__X.g__I();this.g_Iy.g_uw(g,_),this.g_Iy.g_Eb().g_$p()}_.g_$q?this.g_$r(_.g_$q):this.g_$s()}g_eJ(){for(const g of this.g_$d)g.g_eJ();g_bz.g_fR(this.g_$d),this.g_$h.g_eJ(),this.g_$h=null,this.g_To&&this.g_To.clear(),this.g_Tp&&this.g_Tp.clear(),this.g_$j&&g_bz.g_fR(this.g_$j),this.g_$k&&(this.g_$k.g_eJ(),this.g_$k=null),this.g_zu=null,this.g__X=null,this.g_Wx=null,g_bz.g_fR(this.g_$b),this.g_Iy&&(this.g_Iy.g_eJ(),this.g_Iy=null)}g_$r(g){if(this.g_zu.g_Ak()){this.g_$c=[];for(const _ of g)this.g_$c.push(_[1])}for(const _ of g)this.g_$b.push(_[0])}g_$s(){const g=[!1,0,""];for(let _=0,e=this.g__X.g__j();_g||!isFinite(g))&&(g=0),this.g_$g=g}g_$u(){this.g_$g=-1}g_qY(){return this.g_qu}g_kS(){return this.g_$k||(this.g_$k=g_bz.g_eI(g_bz.Event.g_kS)),this.g_$k}g_DN(g){this.g_$h.g_DN(g)}g_Wj(g){this.g_$h.g_Wj(g)}g_$v(){this.g_$i=!0}g_$w(){return this.g_$i}g_Ee(){return this.g_$h.g_Ee()}g_Un(g){return this.g_$h.g_Un(g)}g_CE(){return this.g__X}g_$x(g){return g.g_CJ()?g.g_CK(this.g_CE()):this.g_CE()===g}g_CN(){return this.g_ZL}g_FV(g){this.g_$j.push(g)}g_$y(){return this.g_$j}siblings(){return this.g_$j}g_Qn(){for(const g of this.siblings())g.g_CE().g_Mj().g_MD(g)}g_TS(){for(const g of this.siblings())g.g_CE().g_Mj().g_My(g)}g_TT(g){for(const _ of this.siblings())_.g_CE().g_Mj().g_MB()[g]=_}g_TV(){for(const g of this.siblings())g.g_CE().g_Mj().g_Mz(g)}g_TU(g){for(const _ of this.siblings())_.g_CE().g_Mj().g_MC()[g]=_}g_Gf(){return this.g_Wx}g__K(g){this.g__Y=g}g_FT(){return this.g__X.g_FY(),this.g__Y}g_Co(){return this.g__Z}g_$z(){return this.g__$}g_KF(){return this.g_$d}g_$A(g){if(!g)return null;for(const _ of this.g_$d)if(_.g_XL()instanceof g)return _;return null}g_$B(g){if(!g)return null;const _=this.g_$A(g);return _?_.g_KG():null}g_KE(g){const _=this.g_$d;for(let e=0,a=_.length;eg||g>=_.length)throw new RangeError("invalid instance variable");return _[g]}g_Sv(g){return this.g_$b[g]}g_KM(g,_){g|=0;const e=this.g_$b;if(0>g||g>=e.length)throw new RangeError("invalid instance variable");const n=e[g];if("number"==typeof n)e[g]="number"==typeof _?_:parseFloat(_);else if("string"==typeof n)e[g]="string"==typeof _?_:_.toString();else throw new Error("unknown instance variable type")}g_TL(){return this.g_To||(this.g_To=new Map),this.g_To}g_TM(){return this.g_Tp||(this.g_Tp=new Map),this.g_Tp}g_CM(){this.g_zu.g_HI(this.g_Gf().constructor.g_FK.g_Vx,this)}g_$F(){this.g_zu.g_HI(this.g_Gf().constructor.g_FK.g_Vy,this)}g_$G(){this.g_$a=!0}g_IE(){return this.g_$a}g_$H(){return this.g_$h.g_WX()}g_EE(g){const _={};if(g?_.c3=!0:_.uid=this.g_Co(),this.g_To&&this.g_To.size&&(_.ex=g_bz.g_gL(this.g_To)),-1!==this.g_Ko()&&(_.mts=this.g_Ko()),0n||n>=this.g_$b.length)continue;let t=_;null===t&&(t=NaN),this.g_$b[n]=t}if(this.g_Wx.g_FO()){const e=g.w,n=e.l;if(this.g_Iy.g_Cr().g_CR()!==n){const g=this.g_Iy.g_Cr(),e=g.g_CP().g_Fi(n);e?(this.g_Iy.g_FQ(e),g.g_Cx(this,!0),e.g_Cq(this,!0),e.g_Cv(0),this.g_Iy.g_Ct()):!_&&this.g_zu.g_CF(this)}this.g_Iy.g_EF(e)}const t=g.behs;if(t)for(const[g,_]of Object.entries(t)){const e=parseInt(g,10),a=this.g_KE(e);0>a||a>=this.g_$d.length||this.g_$d[a].g_EG(_)}const e=g.data;e&&this.g_$h.g_EG(e)}}}{const g=g_bz.g_eI(g_bz.Rect),_=g_bz.g_eI(g_bz.Event,"bboxchange",!1);g_bz.g_$l=class extends g_bz.g_eG{constructor(g,_){super(),this.g_Um=g,this.g_Mg=g.g_CE(),this.g_zu=g.g_zW(),this.g_$I=_,this.g_$J=-1,this.g_BC=!0,this.g_hK=0,this.g_hL=0,this.g_vw=0,this.g_$K=0,this.g_$L=0,this.g_gT=0,this.g_$M=0,this.g_$N=1,this.g_$O=0,this.g_$P=0,this.g_$Q=!0,this.g_$R=new g_bz.Rect,this.g_$S=new g_bz.g_iC,this.g_$T=!1,this.g_$U=!0,this.g_$V=!0,this.g_$W=g_bz.g_eI(g_bz.Rect,0,0,-1,-1),this.g_$X=g_bz.g_eI(g_bz.Rect,0,0,-1,-1),this.g_$Y=null,this.g_$Z=g_bz.g_eI(g_bz.g_jf),this.g_$_=-1,this.g_$$=-1,this.g_aaa=0,this.g_aab=!1,this.g_aac=null,this.g_vv=g_bz.g_eI(g_bz.g_gP,1,1,1,1),this.g_aad=g_bz.g_eI(g_bz.g_gP,1,1,1,1),this.g_aae=!0,this.g_BL=-1,this.g_vt=0,this.g_vu=0,this.g_aaf=null,this.g_aag=null,this.g_aah=!1,this.g_Um.g_CE().g_Wl()&&(this.g_aag=g_bz.g_eI(g_bz.g_aai,this.g_Um,this)),this.g_CB(0)}g_eJ(){this.g_aaf&&(this.g_zu.g_po().g_xs(this.g_aaf),this.g_aaf=null),this.g_$Y=null,this.g_$Z.g_eJ(),this.g_$Z=null,this.g_aac&&(this.g_aac.clear(),this.g_aac=null),this.g_Um=null,this.g_Mg=null,this.g_zu=null,this.g_$I=null}g_$o(g){this.g_Uh(g[0]),this.g_Ui(g[1]),this.g_Fb(g[3]),this.g_Fc(g[4]),this.g_Dk(g[6]),this.g_vv.g_hB(g[7]),this.g_aaj(g[8]),this.g_aak(g[9]),this.g_CB(g[10]),this.g_aag&&this.g_aag.g_aal(g[12]),this.g_Cb(),this.g_aam()}g_IC(){return this.g_Um}g_Uh(g){this.g_hK=+g}g_Lg(g){this.g_hK+=+g}g_FW(){return this.g_hK}g_Ui(g){this.g_hL=+g}g_Lh(g){this.g_hL+=+g}g_FX(){return this.g_hL}g_Uk(g,_){this.g_hK=+g,this.g_hL=+_}g_Uo(g,_){this.g_hK+=+g,this.g_hL+=+_}g_Uj(g,_){return this.g_hK===g&&this.g_hL===_}g_Di(g){g=+g,this.g_vw===g||(this.g_vw=g,this.g_aam())}g_Dj(){return this.g_vw}g_Fb(g){this.g_$K=+g}g_Li(g){this.g_$K+=+g}g_oR(){return this.g_$K}g_Fc(g){this.g_$L=+g}g_Lj(g){this.g_$L+=+g}g_oS(){return this.g_$L}g_uw(g,_){this.g_$K=+g,this.g_$L=+_}g_Dk(g){g=g_bz.g_eN(+g),this.g_gT===g||(this.g_gT=g,this.g_$M=Math.sin(g),this.g_$N=Math.cos(g))}g_Lk(g){g=+g,0===g||this.g_Dk(this.g_gT+g)}g_Dl(){return this.g_gT}g_Uq(){return this.g_$M}g_Up(){return this.g_$N}g_aaj(g){this.g_$O=+g}g_Lm(g){this.g_$O+=+g}g_Ln(){return this.g_$O}g_aak(g){this.g_$P=+g}g_Lo(g){this.g_$P+=+g}g_Lp(){return this.g_$P}g_xx(g){g=g_bz.g_eM(g,0,1),this.g_vv.a===g||(this.g_vv.a=g,this.g_Cb(),this.g_aam())}g_Ll(g){if(0!==g){const _=this.g_vv.a;this.g_vv.a+=g,this.g_vv.a===_||(this.g_Cb(),this.g_aam())}}g_xv(){return this.g_vv.a}g_Ur(g){this.g_vv.g_hg(g)||(this.g_vv.g_g$(g),this.g_Cb(),this.g_aam())}g_aan(g,_,e){const a=this.g_vv;a.r===g&&a.g_hC===_&&a.b===e||(a.r=g,a.g_hC=_,a.b=e,this.g_Cb(),this.g_aam())}g_LB(_,a,n){if(0!==_||0!==a||0!==n){const t=this.g_vv,i=t.r,e=t.g_hC,o=t.b;t.r+=_,t.g_hC+=a,t.b+=n,t.r===i&&t.g_hC===e&&t.b===o||(this.g_Cb(),this.g_aam())}}g_LA(){return this.g_vv}g_Cb(){const g=this.g_vv,_=this.g_aad;this.g_aae=g.g_hi(1,1,1,1),_.set(g),_.g_hk()}g_C_(){return this.g_aad}g_aam(){}g_aao(){return this.g_aaf}g_C$(){return this.g_aae}g_CB(g){if(this.g_BL!==g){this.g_BL=g;const _=this.g_zu.g_po();if(_){const e=_.g_zq(g);this.g_vt=e.g_zo,this.g_vu=e.g_zp}this.g_aam()}}g_CC(){return this.g_BL}g_Du(){return this.g_vt}g_Dv(){return this.g_vu}g_FQ(g){this.g_$I=g}g_Cr(){return this.g_$I}g_CP(){return this.g_Cr().g_CP()}g_Cs(g){this.g_$J=0|g}g_DB(){return this.g_$I.g_Dy(),this.g_$J}g_Bb(){return this.g_$J}g_CW(){return this.g_BC}g_CX(g){this.g_BC=!!g}g_aap(){return this.g_$U}g_aaq(g){g=!!g,this.g_$U===g||(this.g_$U=g,g?this.g_Ct():this.g_aar())}g_aas(g,_){if(this.g_aab=!!g,this.g_aac&&this.g_aac.clear(),!_.trim())return void(this.g_aac=null);this.g_aac||(this.g_aac=new Set);for(const e of _.split(" "))e&&this.g_aac.add(e.toLowerCase())}g_aat(g){const _=this.g_aab,e=this.g_aac;if(!g||!e)return!_;for(const a of e)if(g.has(a))return _;return!_}g_Ct(){this.g_$Q=!0,this.g_$V=!0,this.g_Mg.g__N(!0),this.g_zu.g_CY(),this.g_$I.g_CT()&&(this.g_aau(),this.g_aav()),this.g_$T&&this.g_Um.g_kS().dispatchEvent(_)}g_aau(){const g=this.g_$R,_=this.g_$S,a=this.g_hK,n=this.g_hL,t=this.g_$K,e=this.g_$L;g.g_hX(a-this.g_$O*t,n-this.g_$P*e,t,e),0===this.g_gT?_.g_iV(g):(g.offset(-a,-n),_.g_iX(g,this.g_$M,this.g_$N),_.offset(a,n),_.g_iY(g)),g.normalize(),this.g_$Q=!1}g_aaw(){this.g_$Q&&this.g_aau()}g_DY(){return this.g_aaw(),this.g_$R}g_aax(){return this.g_aaw(),this.g_$S}g_aay(g){this.g_$R.g_r(g),this.g_$S.g_iV(this.g_$R),this.g_$Q=!1,this.g__Q(),this.g_aav()}g_aaz(g){this.g_$T=!!g}g_aaA(){return this.g_$T}g_aaB(g){this.g_$Y=g,this.g_$_=-1,this.g_$$=-1,this.g_aaa=0}g_aaC(){return this.g_$Y}g_aaD(){return!!this.g_$Y}g_aaE(){return this.g_aaF(this.g_oR(),this.g_oS(),this.g_Dl(),this.g_Uq(),this.g_Up())}g_aaG(g,_,n){let t=0,i=1;return 0!==n&&(t=Math.sin(n),i=Math.cos(n)),this.g_aaF(g,_,n,t,i)}g_aaF(g,_,n,t,a){return this.g_$_===g&&this.g_$$===_&&this.g_aaa===n?this.g_$Z:(this.g_$Y?(this.g_$Z.g_r(this.g_$Y),this.g_$Z.g_jp(g,_,t,a)):this.g_$Z.g_jo(this.g_aax(),-this.g_FW(),-this.g_FX()),this.g_$_=g,this.g_$$=_,this.g_aaa=n,this.g_$Z)}g_$w(){return this.g_Um.g_$w()}g_aaH(g,_){return!!this.g_DY().g_iy(g,_)&&!!this.g_aax().g_iy(g,_)&&(this.g_$w()?this.g_Um.g_KG().g_WZ(g,_):!this.g_aaD()||this.g_aaE().g_iy(g-this.g_FW(),_-this.g_FX()))}g__Q(){if(this.g_$V&&this.g_$U){const _=this.g_DY(),e=this.g_Mg.g__M(),a=this.g_$W;if(g.set(e.g_Bt(_.g_ic()),e.g_Bu(_.g_id()),e.g_Bt(_.g_ie()),e.g_Bu(_.g_if())),!a.g_n(g)){const _=this.g_Um;a.g_ie()=this.g_$X.g_ic()}g_Dz(){return this.g_$X}g_Eb(){return this.g_aag}g_aaK(g){this.g_aah=!!g}g_DJ(){return this.g_aah}g_aaL(){this.g_aaw();const g=this.g_$R,_=this.g_$S;return[this.g_hK,this.g_hL,this.g_$K,this.g_$L,this.g_gT,this.g_$O,this.g_$P,g.g_ic(),g.g_id(),g.g_ie(),g.g_if(),_.g_fr(),_.g_fs(),_.g_ft(),_.g_fu(),_.g_fv(),_.g_fw(),_.g_fx(),_.g_fy()]}g_aaM(g){this.g_hK=g[0],this.g_hL=g[1],this.g_$K=g[2],this.g_$L=g[3],this.g_Dk(g[4]),this.g_$O=g[5],this.g_$P=g[6],this.g_$R.set(g[7],g[8],g[9],g[10]),this.g_$S.set(g[11],g[12],g[13],g[14],g[15],g[16],g[17],g[18]),this.g_$Q=!1}g_ED(){const g={x:this.g_FW(),y:this.g_FX(),w:this.g_oR(),h:this.g_oS(),l:this.g_Cr().g_CR(),zi:this.g_DB()};return 0!==this.g_Dj()&&(g.ze=this.g_Dj()),0!==this.g_Dl()&&(g.a=this.g_Dl()),1!==this.g_xv()&&(g.o=this.g_xv()),.5!==this.g_Ln()&&(g.oX=this.g_Ln()),.5!==this.g_Lp()&&(g.oY=this.g_Lp()),0!==this.g_CC()&&(g.bm=this.g_CC()),this.g_CW()||(g.v=this.g_CW()),this.g_aap()||(g.ce=this.g_aap()),this.g_aaA()&&(g.be=this.g_aaA()),this.g_aag&&(g.fx=this.g_aag.g_ED()),this.g_aab&&(g.sfi=this.g_aab),this.g_aac&&(g.sft=[...this.g_aac].join(" ")),g}g_EF(g){this.g_Uh(g.x),this.g_Ui(g.y),this.g_Fb(g.w),this.g_Fc(g.h),this.g_Cs(g.zi),this.g_Di(g.hasOwnProperty("ze")?g.ze:0),this.g_Dk(g.hasOwnProperty("a")?g.a:0),this.g_xx(g.hasOwnProperty("o")?g.o:1),this.g_aaj(g.hasOwnProperty("oX")?g.oX:.5),this.g_aak(g.hasOwnProperty("oY")?g.oY:.5),this.g_CB(g.hasOwnProperty("bm")?g.bm:0),this.g_CX(!g.hasOwnProperty("v")||g.v),this.g_aaq(!g.hasOwnProperty("ce")||g.ce),this.g_aaz(!!g.hasOwnProperty("be")&&g.be),this.g_aas(!!g.hasOwnProperty("sfi")&&g.sfi,g.hasOwnProperty("sft")?g.sft:""),this.g_aag&&g.hasOwnProperty("fx")&&this.g_aag.g_EF(g.fx),this.g_Ct()}}}"use strict",g_bz.g_ZO=class extends g_bz.g_eG{constructor(g,_){super();const a=g.g_zW(),n=a.g_Zq(),t=a.g_Sh(_[1]);n.g_Yq(t)||n.g_Ym(_),this.g_zu=a,this.g_Mg=g,this.g_XK=n.g_Yr(t),this.g_WB=null,this.g_Zr=t.g_GM,this.g_BB=_[2],this.g_pJ=_[0],this.g_WB=g_bz.g_eI(t.g__b,this),this.g_Wj()}static g_pG(g,_){return g_bz.g_eI(g_bz.g_ZO,g,_)}g_eJ(){this.g_zu=null,this.g_XK=null,this.g_WB.g_eJ(),this.g_WB=null,this.g_Zr=null}g_WC(){return this.g_WB}g_Wj(){this.g_WB.g_Wj()}g_zW(){return this.g_zu}g_CE(){return this.g_Mg}g_XL(){return this.g_XK}g__w(){return this.g_Zr}g_qT(){return this.g_pJ}g_CR(){return this.g_BB}},"use strict",g_bz.g_$e=class extends g_bz.g_eG{constructor(g){super(),this.g_zu=g.g_LX,this.g_SA=g.g_$f,this.g_XK=this.g_SA.g_XL(),this.g_Um=g.g_L$,this.g_BA=g.index,this.g_$h=null,this.g_XK.g_Cq(this.g_Um)}g_eJ(){this.g_XK.g_Cx(this.g_Um),this.g_$h.g_eJ(),this.g_$h=null,this.g_zu=null,this.g_SA=null,this.g_XK=null,this.g_Um=null}g__s(g){if(this.g_$h)throw new Error("already got sdk instance");this.g_$h=g_bz.g_eI(this.g_SA.g__w(),this,g)}g_KG(){return this.g_$h}g_XP(){return this.g_Um}g_zW(){return this.g_zu}g_XM(){return this.g_SA}g_XL(){return this.g_XK}g_aaN(){return this.g_BA}g_XT(){this.g_$h.g_XT()}g_Yb(g,_){this.g_$h.g_Yb(g,_)}g_$H(){return this.g_$h.g_WX()}g_EE(){return this.g_$h.g_EE()}g_EG(g){return this.g_$h.g_EG(g)}static g_aaO(_,n){const a=_.g_XP(),t=n.g_XP(),i=a.g_CE().g_CQ(),e=t.g_CE().g_CQ();if(i!==e)return i-e;const o=a.g_$z(),g=t.g_$z();return o===g?_.g_XS().g_aaN()-n.g_XS().g_aaN():o-g}},"use strict",g_bz.g_BX=class extends g_bz.g_eG{constructor(g,_){super(),this.g_rK=g,this.g_aaP=[],this.g_aaQ=[],this.g_aaR=new Map,this.g_KH=[],this.g_qw=!0;for(const e of _){const g=g_bz.g_eI(g_bz.g_aaS,this,e,this.g_aaP.length);this.g_aaP.push(g),this.g_aaR.set(g.g_qT().toLowerCase(),g),3<=e.length&&this.g_KH.push(this.g_aaT(e[2]))}this.g_zW().g_aaU(this)}g_eJ(){g_bz.g_fR(this.g_aaP),g_bz.g_fR(this.g_aaQ),this.g_aaR.clear(),g_bz.g_fR(this.g_KH),this.g_rK=null}g__o(g){if(g.length){this.g_aaP=g.concat(this.g_aaP);for(const _ of g)this.g_aaR.set(_.g_qT().toLowerCase(),_);for(let g=0,_=this.g_aaP.length;g<_;++g)this.g_aaP[g].g_aaV(g)}}g_aaT(g){const _=g.slice(0);for(let n=0,e=_.length;n({name:g.g_qT(),active:g.g_Qc(),params:g_bz.g_BX.g_aaZ(this.g_KH[g.g_CQ()])}))}g_EG(g){for(const _ of g){const g=this.g_KJ(_.name);g&&(g.g_aa$(_.active),this.g_KH[g.g_CQ()]=g_bz.g_BX.g_aa_(_.params))}this.g_Uu()}},"use strict",g_bz.g_aaS=class extends g_bz.g_eG{constructor(g,_,e){super(),this.g_BW=g,this.g_aba=_[0],this.g_pJ=_[1],this.g_BA=e,this.g_pK=null,this.g_lk=!0}g_eJ(){this.g_BW=null,this.g_pK=null}g__n(g){const _=g_bz.g_eI(g_bz.g_aaS,g,[this.g_aba,this.g_pJ],-1);return _.g_pK=this.g_pK,_.g_lk=this.g_lk,_}g_abb(g){const _=g.g_xb(this.g_aba);if(!_)throw new Error("failed to find shader program '"+this.g_aba+"'");this.g_pK=_}g_CS(){return this.g_BW}g_qT(){return this.g_pJ}g_aaV(g){this.g_BA=g}g_CQ(){return this.g_BA}g_aaW(){return this.g_BW.g_aaW()}g_zW(){return this.g_BW.g_zW()}g_aa$(g){this.g_lk=!!g}g_Qc(){return this.g_lk}g_qV(){return this.g_pK}g_abc(){const g=[];for(let _=0,e=this.g_pK.g_rd();_g.g_qV().g_qW())}g_KK(g){return this.g_abe[g]}g_Ut(g,_){this.g_abe[g]=!!_}g_ED(){return this.g_BW.g__m().map(g=>({name:g.g_qT(),active:this.g_abe[g.g_CQ()],params:g_bz.g_BX.g_aaZ(this.g_KH[g.g_CQ()])}))}g_EF(g){for(const _ of g){const g=this.g_BW.g_KJ(_.name);g&&(this.g_abe[g.g_CQ()]=_.active,this.g_KH[g.g_CQ()]=g_bz.g_BX.g_aa_(_.params))}this.g_Uu()}},"use strict";{const _=[],t=[],a=[],o=g_bz.g_eI(g_bz.g_jf),n=g_bz.g_eI(g_bz.g_jf),r=g_bz.g_eI(g_bz.g_iC),u=g_bz.g_eI(g_bz.Rect),g=g_bz.g_eI(g_bz.Rect);g_bz.g_abg=class extends g_bz.g_eG{constructor(g){super(),this.g_zu=g,this.g_abh=[],this.g_abi=0,this.g_abj=0,this.g_abk=0,this.g_abl=0}g_eJ(){this.g_zu=null}g_abm(){this.g_abj=this.g_abi,this.g_abi=0,this.g_abl=this.g_abk,this.g_abk=0}g_abn(){return this.g_abj}g_abo(){return this.g_abl}g_abp(g,_){const e=g.g_Bc(),a=_.g_Bc();e&&a&&e.g_aap()&&a.g_aap()&&this.g_abh.push([g,_])}g_abq(g,_,n){for(const[e,t]of this.g_abh){let a=null;if(g===e)a=t;else if(g===t)a=e;else continue;a.g_$x(_)&&!n.includes(a)&&n.push(a)}}g_abr(g,_){if(!this.g_abh.length)return!1;for(const[e,a]of this.g_abh)if(g===e&&_===a||g===a&&_===e)return!0;return!1}g_abs(){g_bz.g_fR(this.g_abh)}g_abt(_,a){if(!_||!a||_===a)return!1;const n=_.g_Bc(),e=a.g_Bc();if(!n.g_aap()||!e.g_aap())return!1;this.g_abi++;const t=n.g_Cr(),g=e.g_Cr(),o=t!==g&&!t.g_Dw(g);return o?this.g_abu(n,e):this.g_abv(n,e)}g_abv(g,_){if(!g.g_DY().g_iw(_.g_DY()))return!1;if(this.g_abk++,!g.g_aax().g_i_(_.g_aax()))return!1;if(g.g_$w()&&_.g_$w())return!1;if(g.g_$w())return this.g_abw(g,_);if(_.g_$w())return this.g_abw(_,g);if(!g.g_aaD()&&!_.g_aaD())return!0;const e=g.g_aaE(),a=_.g_aaE();return e.g_jq(a,_.g_FW()-g.g_FW(),_.g_FX()-g.g_FX())}g_abu(_,t){const a=_.g_Cr(),r=t.g_Cr();o.g_r(_.g_aaE()),n.g_r(t.g_aaE());const u=o.g_jj();for(let g=0,n=u.length;gt;++t){const d=2*t-1;if(o.g_Uk(e+a*s*d,r+n*s*d),o.g_Ct(),!this.g_abt(_,g))if(g=this.g_abF(_),g)u=g;else return u&&this.g_abL(_,a*d,n*d,u,16),!0}return o.g_Uk(e,r),o.g_Ct(),!1}g_abL(_,a,n,t,o){let r=2,d=!1,u=!1;const s=_.g_Bc();let i=s.g_FW(),l=s.g_FX();for(;r<=o;){const g=1/r;r*=2,s.g_Uo(a*g*(d?1:-1),n*g*(d?1:-1)),s.g_Ct(),this.g_abt(_,t)?(d=!0,u=!0):(d=!1,u=!1,i=s.g_FW(),l=s.g_FX())}u&&(s.g_Uk(i,l),s.g_Ct())}g_abN(_,a=100){var n=Math.floor;let t=0;const o=_.g_Bc(),e=o.g_FW(),r=o.g_FX();let g=0,u=this.g_abF(_);if(!u)return!0;for(;t<=a;){let a=0,i=0;if(0==g?(a=0,i=-1,t++):1==g?(a=1,i=-1):2==g?(a=1,i=0):3==g?(a=1,i=1):4==g?(a=0,i=1):5==g?(a=-1,i=1):6==g?(a=-1,i=0):7==g?(a=-1,i=-1):void 0,g=(g+1)%8,o.g_Uk(n(e+a*t),n(r+i*t)),o.g_Ct(),!this.g_abt(_,u)&&(u=this.g_abF(_),!u))return!0}return o.g_Uk(e,r),o.g_Ct(),!1}g_abO(_,a,M,c){var d=Math.sin,e=Math.cos,f=Math.PI;const b=_.g_Bc(),g=b.g_FW(),h=b.g_FX(),T=Math.max(10,g_bz.g_eQ(a,M,g,h)),l=g_bz.g_eS(a,M,g,h),m=c||this.g_abF(_);if(!m)return g_bz.g_eN(l+f);let n=m,E=0,N=0;const I=g_bz.g_eO(5);let r;for(r=1;36>r;++r){const t=l-r*I;if(b.g_Uk(a+e(t)*T,M+d(t)*T),b.g_Ct(),!this.g_abt(_,n)&&(n=c?null:this.g_abF(_),!n)){E=t;break}}for(36===r&&(E=g_bz.g_eN(l+f)),n=m,r=1;36>r;++r){const t=l+r*I;if(b.g_Uk(a+e(t)*T,M+d(t)*T),b.g_Ct(),!this.g_abt(_,n)&&(n=c?null:this.g_abF(_),!n)){N=t;break}}if(36===r&&(N=g_bz.g_eN(l+f)),b.g_Uk(g,h),b.g_Ct(),N===E)return N;const z=g_bz.g_eT(N,E)/2;let i=g_bz.g_eV(N,E)?g_bz.g_eN(E+z+f):g_bz.g_eN(N+z);const t=e(l),u=d(l),C=e(i),O=d(i),w=t*C+u*O;return g_bz.g_eS(0,0,t-2*w*C,u-2*w*O)}g_abP(g,_,a,n,t){var e=Math.min,o=Math.max;if(!t)return!1;const r=t.g_Bc();if(!r.g_aap())return!1;if(this.g_abi++,u.set(e(g,a),e(_,n),o(g,a),o(_,n)),!r.g_DY().g_iw(u))return!1;if(t.g_$w())return this.g_abQ(g,_,a,n,t,r);if(this.g_abk++,!r.g_aax().g_iZ(g,_,a,n))return!1;if(!r.g_aaD())return!0;const i=r.g_aaE();return i.g_iZ(r.g_FW(),r.g_FX(),g,_,a,n)}g_abQ(_,a,o,e,d,s){const i=s.g_FW(),f=s.g_FX(),l=d.g_KG(),p=t;g.set(_,a,o,e),g.normalize(),l.g_abx(g,p);for(let g=0,n=p.length;gthis.g_acD=g.g_Aw,this.g_acF=null,this.g_acG=null,this.g_acH={g_acI:null,g_acJ:null,g_acK:null},this.g_acL=0,this.g_acM=0,this.g_acN=0,this.g_acO="fade-in",this.g_acP=null,this.g_acQ=new Promise(g=>this.g_acP=g)}g_acR(g){this.g_abW=g}async g_gy(g){this.g_abU=g.canvas,this.g_abU.addEventListener("webglcontextlost",g=>this.g_Fv(g)),this.g_abU.addEventListener("webglcontextrestored",g=>this.g_acS(g)),this.g_abV=g_bz.g_eI(g_bz.g_ob.g_vP,this.g_abU,{g_vJ:this.g_abW,g_vK:!0,alpha:!0}),await this.g_abV.g_wZ(),this.g_abV.g_y_()||(this.g_acu=NaN),this.g_zu.g_Wv("runtime","window-resize",g=>this.g_acT(g)),this.g_zu.g_Wv("runtime","fullscreenchange",g=>this.g_acU(g)),this.g_zu.g_Wv("runtime","fullscreenerror",g=>this.g_acV(g)),this.g_acl=!!g.isFullscreen,this.g_uw(g.windowInnerWidth,g.windowInnerHeight,!0),this.g_acp=g.shaders||self.C3_Shaders,await this.g_acW();let _=!1;for(const e of this.g_zu.g_acX()){for(const g of e.g__m())g.g_abb(this.g_abV),g.g_qV().g_qW()&&(_=!0);e.g_Uu()}this.g_zu.g_acY(_),this.g_abV.g_y_()&&(this.g_acq=g_bz.g_eI(g_bz.g_ob.g_vj,this.g_abV))}async g_acW(){if(this.g_acp){const g=[];for(const[_,e]of Object.entries(this.g_acp))g.push(this.g_abV.g_w_(e,g_bz.g_ob.g_pC.g_ry(),_));await Promise.all(g),this.g_abV.g_xd(),this.g_abV.g_w$()}}g_eJ(){this.g_zu=null,this.g_abV=null,this.g_abU=null}g_acT(g){this.g_zu.g_AB()&&(self.devicePixelRatio=g.devicePixelRatio),this.g_uw(g.innerWidth,g.innerHeight),this.g_zu.g_CY()}g_acU(g){this.g_acl=!!g.isFullscreen,this.g_uw(g.innerWidth,g.innerHeight,!0),this.g_zu.g_CY()}g_acV(g){this.g_acl=!!g.isFullscreen,this.g_uw(g.innerWidth,g.innerHeight,!0),this.g_zu.g_CY()}g_uw(g,_,e=!1){var n=Math.floor;if(g=n(g),_=n(_),0>=g||0>=_)throw new Error("invalid size");if(this.g_abX!==g||this.g_abY!==_||e){this.g_abX=g,this.g_abY=_;const e=this.g_acZ();"letterbox-scale"===e?this.g_ac_(g,_):"letterbox-integer-scale"===e?this.g_ac$(g,_):"off"===e?this.g_ada(g,_):this.g_adb(g,_),this.g_adc(e),this.g_abU.width=this.g_ab$,this.g_abU.height=this.g_aca,this.g_zu.g_WP("canvas","update-size",{marginLeft:this.g_acb,marginTop:this.g_acc,styleWidth:this.g_abZ,styleHeight:this.g_ab_}),this.g_abV.g_uw(this.g_ab$,this.g_aca,!0)}}g_ac_(_,a){var n=Math.round,t=Math.floor;const i=self.devicePixelRatio,e=this.g_zu.g_Cc(),o=this.g_zu.g_Cd(),g=e/o;_/a>g?(this.g_abZ=n(a*g),this.g_ab_=a,this.g_acb=t((_-this.g_abZ)/2),this.g_acc=0):(this.g_abZ=_,this.g_ab_=n(_/g),this.g_acb=0,this.g_acc=t((a-this.g_ab_)/2)),this.g_ab$=n(this.g_abZ*i),this.g_aca=n(this.g_ab_*i),this.g_zu.g_add(e,o)}g_ac$(_,n){var t=Math.max,o=Math.round,r=Math.floor;const e=self.devicePixelRatio;1!==e&&(_+=1,n+=1);const d=this.g_zu.g_Cc(),g=this.g_zu.g_Cd(),u=d/g,i=_/n;let s;if(i>u){const g=n*u;s=g*e/d}else{const a=_/u;s=a*e/g}1s&&(s=1/Math.ceil(1/s)),this.g_ab$=o(d*s),this.g_aca=o(g*s),this.g_abZ=this.g_ab$/e,this.g_ab_=this.g_aca/e,this.g_acb=t(r((_-this.g_abZ)/2),0),this.g_acc=t(r((n-this.g_ab_)/2),0),this.g_zu.g_add(d,g)}g_adb(g,_){var a=Math.round;const n=self.devicePixelRatio;this.g_abZ=g,this.g_ab_=_,this.g_ab$=a(this.g_abZ*n),this.g_aca=a(this.g_ab_*n),this.g_acb=0,this.g_acc=0;const t=this.g_Em();this.g_zu.g_add(this.g_abZ/t,this.g_ab_/t)}g_ada(g,_){var a=Math.round,n=Math.floor;const t=self.devicePixelRatio;this.g_abZ=this.g_zu.g_Er(),this.g_ab_=this.g_zu.g_Es(),this.g_ab$=a(this.g_abZ*t),this.g_aca=a(this.g_ab_*t),this.g_ade()?(this.g_acb=n((g-this.g_abZ)/2),this.g_acc=n((_-this.g_ab_)/2)):(this.g_acb=0,this.g_acc=0),this.g_zu.g_add(this.g_zu.g_Er(),this.g_zu.g_Es())}g_adc(g){if("high"===this.g_acj)this.g_acd=this.g_ab$,this.g_ace=this.g_aca,this.g_ack="high";else{let _,e;if("off"===this.g_acZ()?(_=this.g_zu.g_Er(),e=this.g_zu.g_Es()):(_=this.g_zu.g_Cc(),e=this.g_zu.g_Cd()),this.g_ab$<_&&this.g_acag&&(this.g_ace=this.g_acd/a)}else if("scale-outer"===g){const g=_/e,a=this.g_abX/this.g_abY;a>g?this.g_acd=this.g_ace*a:an||"scale-inner"===g&&t_.g_pw(g));let a;return-1===e?a=this.g_abV.g_yS(g):(a=_[e],_.splice(e,1)),this.g_acn.add(a),a}g_Ej(g){if(!this.g_acn.has(g))throw new Error("render target not in use");this.g_acn.delete(g),this.g_acm.push(g)}*g_ads(){for(const g of this.g_zu.g_OQ().g_GE())for(const _ of g.g_Fe()){const g=this.g_acv.get(_);g&&(yield g)}}g_DQ(g){if(!this.g_abV.g_y_())return null;let _=this.g_acv.get(g);return _||(_={name:g.g_qT(),g_adt:g_bz.g_eI(g_bz.g_ob.g_vj,this.g_abV),g_adu:0,g_adv:0},this.g_acv.set(g,_)),_.g_adt}g_adw(){if(this.g_abV.g_y_()&&0===this.g_acs){this.g_acs=this.g_abV.g_va(),this.g_act=NaN;for(const g of this.g_ads())g.g_adu=NaN}}g_adx(){var g=Math.min;if(this.g_abV.g_y_()&&isNaN(this.g_act)&&(this.g_act=this.g_acq.g_vq(this.g_acr,this.g_acs),!isNaN(this.g_act))){if(this.g_zu.g_PN())for(const g of this.g_ads())if(g.g_adu=g.g_adt.g_vq(this.g_acr,this.g_acs),isNaN(g.g_adu))return;if(this.g_acq.g_vr(this.g_acs),this.g_acu=g(this.g_act,1),this.g_zu.g_PN()){for(const _ of this.g_ads())_.g_adt.g_vr(this.g_acs),_.g_adv=g(_.g_adu,1);g_adz.g_ady(this.g_acu,[...this.g_ads()])}this.g_acr=this.g_acs,this.g_acs=0}}g_adA(){return this.g_acq}g_adB(){return this.g_acu}g_adC(g,_){return(this.g_acw=g,this.g_acx=_,this.g_acz)?this.g_acz:(this.g_acz=new Promise(g=>{this.g_acA=g}),this.g_acz)}g_adD(){this.g_acw&&(g_bz.g_cS(this.g_abU,this.g_acw,this.g_acx).then(g=>{this.g_acy=URL.createObjectURL(g),this.g_acz=null,this.g_acA(this.g_acy)}),this.g_acw="",this.g_acx=1)}g_adE(){return this.g_acy}g_adF(g){if(2===g)this.g_acF=g_bz.g_eI(g_bz.g_ob.g_tj,this.g_abV),this.g_acF.g_ud(!1),this.g_acF.g_ug("Arial"),this.g_acF.g_uh(16),this.g_acF.g_us("center"),this.g_acF.g_ut("center"),this.g_acF.g_uw(300,200);else if(0===g){const g=this.g_zu.g_adG();let _;if(this.g_zu.g_Ak()){if(!g.g_Ac("loading-logo.png"))return;_=g.g_Ai("loading-logo.png")}else _=g.g_Aa()+"loading-logo.png";this.g_acG=g.g_An({url:_}),this.g_acG.g_A$(this.g_abV).catch(()=>console.warn(`[C3 runtime] Failed to load 'loading-logo.png' for loading screen. Check the project has an icon with that name.`))}else 4==g&&(this.g_adH("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNi4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHdpZHRoPSIxNzAwLjc5MDA0cHgiIGhlaWdodD0iMTcwMC43OTAwNHB4IiB2aWV3Qm94PSIyODcgMzE3IDExMjUgMTEyNSINCgkgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMTcwMC43OTAwNCAxNzAwLjc5MDA0IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxnIGlkPSJsb2dvIj4NCgk8Zz4NCgkJPGc+DQoJCQk8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZmlsbD0iI0ZGRkZGRiIgZD0iTTM1NC45Nzc1NCwxMTk1LjYyMzA1DQoJCQkJYzExLjM4NDc3LDAsMjIuMDEyNywzLjIzNzMsMzEuMDE3NTgsOC44Mzc4OWMxLjk0NjI5LDEuMjEwOTQsMi41ODQ5NiwzLjc0OTAyLDEuNDM4NDgsNS43MzQzOGwtNC45MzI2Miw4LjU0MTk5DQoJCQkJYy0zLjI3ODMyLDUuNjc5NjktMTAuMDMzMiw4LjM3Njk1LTE2LjMxNzM4LDYuNTAwOThjLTIuNzY0NjUtMC44MjUyLTUuNjkzMzYtMS4yNjg1NS04LjcyNjU2LTEuMjY4NTUNCgkJCQljLTE2LjgyOTEsMC0zMC40NzI2NiwxMy42NDM1NS0zMC40NzI2NiwzMC40NzI2NmMwLDE2LjgyODEzLDEzLjY0MzU1LDMwLjQ3MjY2LDMwLjQ3MjY2LDMwLjQ3MjY2DQoJCQkJYzMuMDMzMiwwLDUuOTYxOTEtMC40NDMzNiw4LjcyNjU2LTEuMjY4NTVjNi4yOTQ5Mi0xLjg3OTg4LDEzLjAzMzIsMC44MTE1MiwxNi4zMTczOCw2LjUwMDk4bDQuOTMxNjQsOC41NDE5OQ0KCQkJCWMxLjE0NzQ2LDEuOTg4MjgsMC41MTA3NCw0LjUyMzQ0LTEuNDM4NDgsNS43MzQzOGMtOS4wMDM5MSw1LjYwMTU2LTE5LjYzMTg0LDguODM3ODktMzEuMDE2Niw4LjgzNzg5DQoJCQkJYy0zMi40ODUzNSwwLTU4LjgxOTM0LTI2LjMzNDk2LTU4LjgxOTM0LTU4LjgxOTM0QzI5Ni4xNTgyLDEyMjEuOTU3MDMsMzIyLjQ5MjE5LDExOTUuNjIzMDUsMzU0Ljk3NzU0LDExOTUuNjIzMDUNCgkJCQlMMzU0Ljk3NzU0LDExOTUuNjIzMDV6IE03MDMuMjE0ODQsMTI1OS4xNzU3OGMtMTQuNTU5NTctOS44MTczOC0yMC4yMDMxMy0yMC4wMzIyMy0yMC4yMDMxMy0zMy4wODAwOA0KCQkJCWMwLTE4LjQ4OTI2LDE1LjcxNDg0LTI5Ljc2MzY3LDM4LjI2NjYtMjkuNzYzNjdjOS42NTcyMywwLDE4LjcyMTY4LDIuNTQyOTcsMjYuNTU5NTcsNi45OTQxNA0KCQkJCWMyLjA0OTgsMS4xNjQwNiwyLjc2MTcyLDMuNzgzMiwxLjU4MzAxLDUuODI0MjJsLTMuNDE3OTcsNS45MTk5MmMtMy4yNDcwNyw1LjYyNDAyLTkuOTA4Miw4LjMzMTA1LTE2LjE1MzMyLDYuNTQ4ODMNCgkJCQljLTIuNzIzNjMtMC43NzYzNy01LjU5ODYzLTEuMTkyMzgtOC41NzEyOS0xLjE5MjM4Yy0xMC40OTAyMywwLTExLjU5ODYzLDkuNTc2MTctNC44NTc0MiwxNC4xMjMwNWwyMy42ODY1MiwxNS45NzY1Ng0KCQkJCWM5Ljk5MDIzLDYuNzM4MjgsMTUuODk1NTEsMTcuMDY2NDEsMTUuODk1NTEsMjguNzE4NzVjMCwxOC43ODYxMy0xNS4wMDY4NCwzMy4zMDc2Mi0zOC4yNjc1OCwzMy4zMDc2Mg0KCQkJCWMtOS41MjI0NiwwLTE4LjU4Nzg5LTEuOTU3MDMtMjYuODE1NDMtNS40OTAyM2MtNy43ODEyNS0zLjMzOTg0LTEwLjkzMzU5LTEyLjc4MjIzLTYuNjk3MjctMjAuMTE4MTZsMy40ODczLTYuMDQxOTkNCgkJCQljMS4yMTM4Ny0yLjA5OTYxLDMuOTMxNjQtMi43NTk3Nyw1Ljk3NDYxLTEuNDU2MDVjNi44NTkzOCw0LjM4MjgxLDE2LjQ5MDIzLDcuNTk0NzMsMjQuNzU4NzksNy41OTQ3Mw0KCQkJCWMxMC41NDU5LDAsMTEuMzI4MTMtOS45NTg5OCwzLjc2NzU4LTE1LjA1NzYyTDcwMy4yMTQ4NCwxMjU5LjE3NTc4TDcwMy4yMTQ4NCwxMjU5LjE3NTc4eiBNOTg0LjYzMDg2LDEyMDIuMDAwOTgNCgkJCQljMC0yLjM0NzY2LDEuOTAzMzItNC4yNTE5NSw0LjI1MTk1LTQuMjUxOTVoOS45MjE4OGM3LjgyNzE1LDAsMTQuMTcyODUsNi4zNDU3LDE0LjE3Mjg1LDE0LjE3MzgzdjU3LjQwMTM3DQoJCQkJYzAsOC42MTAzNSw2Ljk4MDQ3LDE1LjU5MDgyLDE1LjU5MDgyLDE1LjU5MDgyczE1LjU5MDgyLTYuOTgwNDcsMTUuNTkwODItMTUuNTkwODJ2LTU3LjQwMTM3DQoJCQkJYzAtNy44MjgxMyw2LjM0NTctMTQuMTczODMsMTQuMTcyODUtMTQuMTczODNoOS45MjA5YzIuMzQ4NjMsMCw0LjI1MTk1LDEuOTA0Myw0LjI1MTk1LDQuMjUxOTV2NjcuMzIzMjQNCgkJCQljMCwyNC4yNjU2My0xOS42NzA5LDQzLjkzNzUtNDMuOTM2NTIsNDMuOTM3NXMtNDMuOTM3NS0xOS42NzE4OC00My45Mzc1LTQzLjkzNzVWMTIwMi4wMDA5OEw5ODQuNjMwODYsMTIwMi4wMDA5OHoNCgkJCQkgTTQ2Ni44NjkxNCwxMTk1LjYyMzA1YzMyLjQ4NDM4LDAsNTguODE4MzYsMjYuMzMzOTgsNTguODE4MzYsNTguODE5MzRjMCwzMi40ODQzOC0yNi4zMzM5OCw1OC44MTkzNC01OC44MTgzNiw1OC44MTkzNA0KCQkJCWMtMzIuNDg2MzMsMC01OC44MTkzNC0yNi4zMzQ5Ni01OC44MTkzNC01OC44MTkzNEM0MDguMDQ5OCwxMjIxLjk1NzAzLDQzNC4zODI4MSwxMTk1LjYyMzA1LDQ2Ni44NjkxNCwxMTk1LjYyMzA1DQoJCQkJTDQ2Ni44NjkxNCwxMTk1LjYyMzA1eiBNNDY2Ljg2OTE0LDEyMjUuMDMzMmMtMTYuMjQzMTYsMC0yOS40MTAxNiwxMy4xNjY5OS0yOS40MTAxNiwyOS40MDkxOA0KCQkJCXMxMy4xNjY5OSwyOS40MDgyLDI5LjQxMDE2LDI5LjQwODJjMTYuMjQxMjEsMCwyOS40MDgyLTEzLjE2NjAyLDI5LjQwODItMjkuNDA4MlM0ODMuMTEwMzUsMTIyNS4wMzMyLDQ2Ni44NjkxNCwxMjI1LjAzMzINCgkJCQlMNDY2Ljg2OTE0LDEyMjUuMDMzMnogTTU1Ni43MzI0MiwxMzExLjEzNDc3Yy0yLjM0NzY2LDAtNC4yNTE5NS0xLjkwMjM0LTQuMjUxOTUtNC4yNXYtOTQuOTYxOTENCgkJCQljMC03LjgyODEzLDYuMzQ1Ny0xNC4xNzM4MywxNC4xNzM4My0xNC4xNzM4M2gzLjk1ODk4YzQuNjI1LDAsOC45NTg5OCwyLjI1Njg0LDExLjYxMTMzLDYuMDQ1OWw0MS4xMjIwNyw1OC43NDcwN3YtNTAuNjE5MTQNCgkJCQljMC03LjgyODEzLDYuMzQ1Ny0xNC4xNzM4MywxNC4xNzI4NS0xNC4xNzM4M2g5LjkyMTg4YzIuMzQ3NjYsMCw0LjI1MTk1LDEuOTA0Myw0LjI1MTk1LDQuMjUxOTV2OTQuOTYwOTQNCgkJCQljMCw3LjgyOTEtNi4zNDU3LDE0LjE3Mjg1LTE0LjE3MzgzLDE0LjE3Mjg1aC0zLjk1ODk4Yy00LjYyNSwwLTguOTU4OTgtMi4yNTU4Ni0xMS42MTEzMy02LjA0NDkybC00MS4xMjIwNy01OC43NDYwOXY1MC42MTgxNg0KCQkJCWMwLDcuODI5MS02LjM0NTcsMTQuMTcyODUtMTQuMTcyODUsMTQuMTcyODVINTU2LjczMjQyTDU1Ni43MzI0MiwxMzExLjEzNDc3eiBNMTIxNS4wMjA1MSwxMjExLjkyMjg1DQoJCQkJYzAtNy44MjgxMyw2LjM0NTctMTQuMTczODMsMTQuMTcyODUtMTQuMTczODNoNTAuMzE1NDNjMi4zNDg2MywwLDQuMjUxOTUsMS45MDQzLDQuMjUxOTUsNC4yNTE5NXY1LjY2OTkyDQoJCQkJYzAsNy44MjcxNS02LjM0NTcsMTQuMTcyODUtMTQuMTcyODUsMTQuMTcyODVoLTYuMDI0NDF2NzUuMTE4MTZjMCw3LjgyOTEtNi4zNDU3LDE0LjE3Mjg1LTE0LjE3Mjg1LDE0LjE3Mjg1aC05LjkyMTg4DQoJCQkJYy0yLjM0ODYzLDAtNC4yNTE5NS0xLjkwMjM0LTQuMjUxOTUtNC4yNXYtODUuMDQxMDJoLTE1Ljk0NDM0Yy0yLjM0ODYzLDAtNC4yNTE5NS0xLjkwMzMyLTQuMjUxOTUtNC4yNTE5NVYxMjExLjkyMjg1DQoJCQkJTDEyMTUuMDIwNTEsMTIxMS45MjI4NXogTTc3Ni40NDkyMiwxMjExLjkyMjg1YzAtNy44MjgxMyw2LjM0NTctMTQuMTczODMsMTQuMTczODMtMTQuMTczODNoNTAuMzE0NDUNCgkJCQljMi4zNDk2MSwwLDQuMjUxOTUsMS45MDQzLDQuMjUxOTUsNC4yNTE5NXY1LjY2OTkyYzAsNy44MjcxNS02LjM0NTcsMTQuMTcyODUtMTQuMTcxODgsMTQuMTcyODVoLTYuMDI1Mzl2NzUuMTE4MTYNCgkJCQljMCw3LjgyOTEtNi4zNDU3LDE0LjE3Mjg1LTE0LjE3Mjg1LDE0LjE3Mjg1aC05LjkyMDljLTIuMzQ5NjEsMC00LjI1MTk1LTEuOTAyMzQtNC4yNTE5NS00LjI1di04NS4wNDEwMmgtMTUuOTQ1MzENCgkJCQljLTIuMzQ3NjYsMC00LjI1MTk1LTEuOTAzMzItNC4yNTE5NS00LjI1MTk1VjEyMTEuOTIyODVMNzc2LjQ0OTIyLDEyMTEuOTIyODV6IE05MjkuNjA0NDksMTI3Mi4wMjI0NmwyNi45NTgwMSwzMi4xMjc5Mw0KCQkJCWMyLjMxNDQ1LDIuNzU3ODEsMC4zNDM3NSw2Ljk4NDM4LTMuMjU2ODQsNi45ODQzOGgtMTkuNzA1MDhjLTQuMTg5NDUsMC04LjE2NTA0LTEuODUxNTYtMTAuODU3NDItNS4wNjA1NWwtMjIuNjgxNjQtMjcuMDMxMjUNCgkJCQl2MjcuODQxOGMwLDIuMzQ3NjYtMS45MDMzMiw0LjI1LTQuMjUxOTUsNC4yNWgtOS45MjA5Yy03LjgyNzE1LDAtMTQuMTcyODUtNi4zNDM3NS0xNC4xNzI4NS0xNC4xNzI4NXYtODUuMDM5MDYNCgkJCQljMC03LjgyODEzLDYuMzQ1Ny0xNC4xNzM4MywxNC4xNzI4NS0xNC4xNzM4M2gyOS43NjM2N2MyMi43MDAyLDAsNDEuMTAyNTQsMTcuMTMzNzksNDEuMTAyNTQsMzguMjY4NTUNCgkJCQlDOTU2Ljc1NDg4LDEyNTIuNTkwODIsOTQ1LjQzNjUyLDEyNjYuNzAyMTUsOTI5LjYwNDQ5LDEyNzIuMDIyNDZMOTI5LjYwNDQ5LDEyNzIuMDIyNDZ6IE05MDAuMDYxNTIsMTIyMS44NDM3NXYzMi41OTg2M2g4LjUwMzkxDQoJCQkJYzEwLjk1ODk4LDAsMTkuODQyNzctNy4yOTc4NSwxOS44NDI3Ny0xNi4yOTg4M2MwLTkuMDAxOTUtOC44ODM3OS0xNi4yOTk4LTE5Ljg0Mjc3LTE2LjI5OThIOTAwLjA2MTUyTDkwMC4wNjE1MiwxMjIxLjg0Mzc1eg0KCQkJCSBNMTE1OC4zNTkzOCwxMTk1LjYyMzA1YzExLjM4NDc3LDAsMjIuMDEyNywzLjIzNzMsMzEuMDE3NTgsOC44Mzc4OWMxLjk0NzI3LDEuMjEwOTQsMi41ODQ5NiwzLjc0OTAyLDEuNDM4NDgsNS43MzQzOA0KCQkJCWwtNC45MzI2Miw4LjU0MTk5Yy0zLjI3ODMyLDUuNjc5NjktMTAuMDMzMiw4LjM3Njk1LTE2LjMxNzM4LDYuNTAwOThjLTIuNzY0NjUtMC44MjUyLTUuNjkzMzYtMS4yNjg1NS04LjcyNTU5LTEuMjY4NTUNCgkJCQljLTE2LjgyOTEsMC0zMC40NzI2NiwxMy42NDM1NS0zMC40NzI2NiwzMC40NzI2NmMwLDE2LjgyODEzLDEzLjY0MzU1LDMwLjQ3MjY2LDMwLjQ3MjY2LDMwLjQ3MjY2DQoJCQkJYzMuMDMyMjMsMCw1Ljk2MDk0LTAuNDQzMzYsOC43MjU1OS0xLjI2ODU1YzYuMjk1OS0xLjg3OTg4LDEzLjAzMzIsMC44MTE1MiwxNi4zMTgzNiw2LjUwMDk4bDQuOTMwNjYsOC41NDE5OQ0KCQkJCWMxLjE0NzQ2LDEuOTg4MjgsMC41MTA3NCw0LjUyMzQ0LTEuNDM3NSw1LjczNDM4Yy05LjAwNDg4LDUuNjAxNTYtMTkuNjMyODEsOC44Mzc4OS0zMS4wMTc1OCw4LjgzNzg5DQoJCQkJYy0zMi40ODUzNSwwLTU4LjgxOTM0LTI2LjMzNDk2LTU4LjgxOTM0LTU4LjgxOTM0QzEwOTkuNTQwMDQsMTIyMS45NTcwMywxMTI1Ljg3NDAyLDExOTUuNjIzMDUsMTE1OC4zNTkzOCwxMTk1LjYyMzA1eiIvPg0KCQkJPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGZpbGw9IiMwMEZGREEiIGQ9Ik0xMzE4LjE5NzI3LDEyMDYuMDMyMjMNCgkJCQljMC03LjgyODEzLDYuMzQ1Ny0xNC4xNzM4MywxNC4xNzI4NS0xNC4xNzM4M2MyMC42NTYyNSwwLDQxLjMxMjUsMCw2MS45Njg3NSwwYzMuNDI5NjksMCw1LjQ1MDIsMy44ODA4NiwzLjQ4MzQsNi42OTA0Mw0KCQkJCWwtMTkuMjk2ODgsMjcuNTY3MzhjMTUuNTQyOTcsOC4zNzU5OCwyNi4xMDY0NSwyNC44MDA3OCwyNi4xMDY0NSw0My42OTUzMWMwLDI3LjM5NzQ2LTIyLjIwODk4LDQ5LjYwNjQ1LTQ5LjYwNjQ1LDQ5LjYwNjQ1DQoJCQkJYy0xNi42ODg0OCwwLTMxLjQ1MTE3LTguMjQwMjMtNDAuNDQzMzYtMjAuODc1OThjLTEuNDUwMi0yLjAzOTA2LTAuODMxMDUtNC44OTk0MSwxLjMzNTk0LTYuMTUyMzRsMTAuOTc3NTQtNi4zMzc4OQ0KCQkJCWM0Ljg4MTg0LTIuODE4MzYsMTAuOTc5NDktMi40NzU1OSwxNS41MTQ2NSwwLjg3MzA1YzMuNTI4MzIsMi42MDU0Nyw3Ljg5MTYsNC4xNDY0OCwxMi42MTUyMyw0LjE0NjQ4DQoJCQkJYzExLjc0MjE5LDAsMjEuMjU5NzctOS41MTg1NSwyMS4yNTk3Ny0yMS4yNTk3N3MtOS41MTc1OC0yMS4yNTk3Ny0yMS4yNTk3Ny0yMS4yNTk3N2gtMTUuMjE3NzcNCgkJCQljLTMuNDI5NjksMC01LjQ1MDItMy44ODA4Ni0zLjQ4NDM4LTYuNjkwNDNsMTguMTM1NzQtMjUuOTA4MmgtMzIuMDA5NzdjLTIuMzQ4NjMsMC00LjI1MTk1LTEuOTAzMzItNC4yNTE5NS00LjI1MTk1VjEyMDYuMDMyMjN6DQoJCQkJIi8+DQoJCTwvZz4NCgkJPGc+DQoJCQk8Zz4NCgkJCQk8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZmlsbD0iI0RBRThGNyIgZD0iTTg1MC4zOTU1MSw4NTcuNTkxOA0KCQkJCQljLTUwLjM1NjQ1LDAtOTQuMzI1Mi0yNy4zNTY0NS0xMTcuODUyNTQtNjguMDIwNTFsLTgwLjAzMDI3LDQ2LjIwNDFjLTQuNjU1MjcsMi42ODk0NS02LjEzMTg0LDguNzE4NzUtMy4yNDkwMiwxMy4yNTU4Ng0KCQkJCQljNDIuMjM3Myw2Ni40ODYzMywxMTYuNTMzMiwxMTAuNjA3NDIsMjAxLjEzMTg0LDExMC42MDc0MmM4OC4xMjU5OCwwLDE2NS4wNzEyOS00Ny44NzUsMjA2LjI0MzE2LTExOS4wMzYxM2wtODAuNDg3My00Ni40Njk3Mw0KCQkJCQljLTQuMzEzNDgtMi40OTAyMy05LjgwMTc2LTEuMjA1MDgtMTIuNTcwMzEsMi45MzU1NUM5MzkuMTc1NzgsODMzLjU2MjUsODk3LjU5MTgsODU3LjU5MTgsODUwLjM5NTUxLDg1Ny41OTE4DQoJCQkJCUw4NTAuMzk1NTEsODU3LjU5MTh6IE0xMTM2LjcyMTY4LDU1Ni4yMTc3N2M0LjYxNDI2LTIuNjYzMDksNi4xMTAzNS04LjYxOTE0LDMuMzEyNS0xMy4xNTEzNw0KCQkJCQljLTU5LjkxNTA0LTk3LjAzMDI3LTE2Ny4yMjQ2MS0xNjEuNjk0MzQtMjg5LjYzODY3LTE2MS42OTQzNGMtMTI1Ljg5MzU1LDAtMjM1LjgxMzQ4LDY4LjM5MjU4LTI5NC42MzM3OSwxNzAuMDQ5OA0KCQkJCQlsODAuMzc2OTUsNDYuNDA2MjVjNC4zOTc0NiwyLjUzOTA2LDEwLjAwMTk1LDEuMTQ5NDEsMTIuNzEwOTQtMy4xNDU1MQ0KCQkJCQljNDIuMTY0MDYtNjYuODUxNTYsMTE2LjY2ODk1LTExMS4yNjM2NywyMDEuNTQ1OS0xMTEuMjYzNjdjODguMTI1OTgsMCwxNjUuMDcxMjksNDcuODc1OTgsMjA2LjI0MzE2LDExOS4wMzYxMw0KCQkJCQlMMTEzNi43MjE2OCw1NTYuMjE3Nzd6Ii8+DQoJCQkJPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGZpbGw9IiNBNUJBQzgiIGQ9Ik04NTAuMzk1NTEsOTU5LjYzODY3DQoJCQkJCWMtODQuNTk4NjMsMC0xNTguODk0NTMtNDQuMTIxMDktMjAxLjEzMTg0LTExMC42MDc0MmMtMi44NzY5NS00LjUzMDI3LTEuMzk5NDEtMTAuNTcwMzEsMy4yNDkwMi0xMy4yNTU4Nmw4MC4wMzAyNy00Ni4yMDQxDQoJCQkJCWMtMTEuNTgxMDUtMjAuMDE2Ni0xOC4yMDk5Ni00My4yNTQ4OC0xOC4yMDk5Ni02OC4wNDE5OWMwLTc0Ljc4NTE2LDYwLjU1NzYyLTEzNi4wNjI1LDEzNi4wNjI1LTEzNi4wNjI1DQoJCQkJCWM0Ny4xOTYyOSwwLDg4Ljc4MDI3LDI0LjAyOTMsMTEzLjE4NTU1LDYwLjUyMjQ2YzIuNzY0NjUsNC4xMzM3OSw4LjI2MzY3LDUuNDIxODgsMTIuNTcwMzEsMi45MzU1NWw4MC40ODczLTQ2LjQ2OTczDQoJCQkJCWMtNDEuMTcxODgtNzEuMTYwMTYtMTE4LjExNzE5LTExOS4wMzYxMy0yMDYuMjQzMTYtMTE5LjAzNjEzYy04NC44NzY5NSwwLTE1OS4zODE4NCw0NC40MTIxMS0yMDEuNTQ1OSwxMTEuMjYzNjcNCgkJCQkJYy0yLjcwNjA1LDQuMjkxMDItOC4zMTgzNiw1LjY4MTY0LTEyLjcxMDk0LDMuMTQ1NTFsLTgwLjM3Njk1LTQ2LjQwNjI1DQoJCQkJCWMtMjguOTUyMTUsNTAuMDQwMDQtNDUuNTIzNDQsMTA4LjEzOTY1LTQ1LjUyMzQ0LDE3MC4xMDc0MmMwLDE4Ni45NjM4NywxNTEuMzk0NTMsMzQwLjE1NzIzLDM0MC4xNTcyMywzNDAuMTU3MjMNCgkJCQkJYzEyMi40MTQwNiwwLDIyOS43MjM2My02NC42NjQwNiwyODkuNjM4NjctMTYxLjY5NTMxYzIuNzk0OTItNC41MjYzNywxLjI5NDkyLTEwLjQ5MDIzLTMuMzEyNS0xMy4xNTEzN2wtODAuMDgzMDEtNDYuMjM3Mw0KCQkJCQlDMTAxNS40NjY4LDkxMS43NjM2Nyw5MzguNTIxNDgsOTU5LjYzODY3LDg1MC4zOTU1MSw5NTkuNjM4Njd6Ii8+DQoJCQk8L2c+DQoJCQk8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZmlsbD0iIzAwRkZEQSIgZD0iTTExMzcuMTg1NTUsNzU4LjExMzI4di03My4xNjc5N2wtNjMuMzY1MjMsMzYuNTgzOTgNCgkJCQlMMTEzNy4xODU1NSw3NTguMTEzMjhMMTEzNy4xODU1NSw3NTguMTEzMjh6IE0xMDI2LjU3NjE3LDcwNS4xNjQwNmwxMjAuMDU4NTktNjkuMzE2NDENCgkJCQljMTIuNTY4MzYtNy4yNTU4NiwyOC4zNDQ3MywxLjg1MjU0LDI4LjM0NTcsMTYuMzY2MjF2MTM4LjYzMDg2Yy0wLjAwMDk4LDE0LjUxMjctMTUuNzc3MzQsMjMuNjIyMDctMjguMzQ1NywxNi4zNjYyMQ0KCQkJCWwtMTIwLjA1ODU5LTY5LjMxNjQxQzEwMTQuMDI4MzIsNzMwLjY0OTQxLDEwMTQuMDI4MzIsNzEyLjQwOTE4LDEwMjYuNTc2MTcsNzA1LjE2NDA2eiIvPg0KCQk8L2c+DQoJPC9nPg0KPC9nPg0KPC9zdmc+DQo=").then(g=>{"done"===this.g_acO?this.g_abV.g_pk(g):this.g_acH.g_acI=g}).catch(g=>console.warn("Failed to load splash image: ",g)),this.g_adI("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAABABAMAAACekdKMAAAAMFBMVEUAAAByfYZyfYZyfYZyfYZyfYZyfYZyfYZyfYZyfYZyfYZyfYZyfYZyfYZyfYZyfYYgo7vbAAAAD3RSTlMAmd137hFVqjO7zCKIRGZ881JRAAAFY0lEQVR42u2aPW/bVhSGn1iiPizZ8D+QgSJBNglFmiboQA0NUKAD1XotYA0BOspAkZnqx24vnTrIQNCpg4QkQMcYKDoW9j9w5y6qLNqWFDlvh3tJUa6ddHBhAuS7SKBIQffhuee851CQKVOmTJkyZcqUKXmqa8O+uyNlABKsFRmdP0o5AOle2gHoWdoBzFrpBHACwPeetJNmAFSlt6kGwGH0LqUAVqRuqgHkpEaqAVRkfvOWr+Dh9Rc4j6VvwnrhPNAbgK2ezj+yx7Z6GjUuASi4Ch4lHQAGwBeRK1rROQAdUx5K0hE4NUkaAdS02ZEuoms2wkCSgvYSgFJfkn6CobkSPG0mEcAOrHnGFOxAToHNjk/MygLgO/PxL0BN9yRdQKlufMQAoCdJGi8BOJYknXTJ269cu9HtdqNb4Ni6oimUbFb0dAZQ1DmULJ+TFtT0qQHwg73mLlCMfFUMQPR5VWrbmttNHICC1KDiSZ+w3pMOwFPDhP4IYFtv4ZX0nIorbUBNmjWAiqdZg5fmNFd6jvPhJQDjAV9LI0r28IpmycsBZalNWfoRWJcuoKY9c7cCkwpOwdcIqNT1BmrSgQkNbQAvpAGOF+aHOIBpCxhKR/TVBNjVOHkAOgrg2N6aoU7sklmVidtD7bNm/fIrjaBmk+Sxea142iBnTyguAfjZZscNXLOdXFM8EgVgXRpDz/6yonTEts6AXdV1APTVoKigFSXEmj3XN0kSV01WFQwAHC8O4Mhagye8NgHS137SALzsS3dxwhtXkQ4oaw64eqomOFKXbc2xJbFLTX8DOHYnsKsJu2Gdu8IIuTqjrMB8eyM5ACIFXQo2S5t7lNMM6AdFTaCgADqahHW8EQIohBk9rzEdE+JXAtjVmHWpDTmplUAA96Ea/bJDnVKSWjgaFTSHqubgmjVDXQchgFy4wBXNcXV6LYC8RjbEypomcCAyBopRShxqAn21yenM8WawqjOoKVbmLYBFndeImsnyVwJY1RR8NW1FTRiA6UNTCsP6fKwLONQBZTXx1WVbT0KbtwygvAxg81oAZU0xe2QYxkmyrDDx2DzWBXTUZFs7dNQwHUEMwN4VAKb47wOQ1wj8Gx0+/Y8A8powVJtt7XOoxn8A8N4IqCrA8cJUmzgAl3JAUWN8tSjqDX0NwI/XbwugGLe178oBK7bBaBesm0gggOUqwLrOHe8c1jV2NAMOw/XFAFRth2dr/burANS1cSc0C8kDsB7zAZvgKCjoLTiaFqwpmvwLQC7e2b3PB4CrZj48KXkAKktOEPr6VqeAr680udzEWACluK0LreJ1ThBe6+w4HkfJAhD1AtbAu3qgPcDVX2oCK9bqxwFQ1+fRsVW7va/uBZpAWaND652TCGBoM1rHHN6VmQlsq6cdE+4mC75oLAC49prKB1zTDd6NukHIKahbIkkEsGrmAQWZbZqXNLClrg04dTP4KnjnCwBfmgkZT7WD45k94C8BmA3MPGBgeqcbfQBxwwDsRMi3N7Iqc3dzsuVhV5ofkevpJOoGKUn6Ax5L92F49USoayZCls08uQDiM0ETCWPb8k7DMmH02SICGC7ayVhnsABwEpsZQkfxUpI4ALGpsFn4xCbHcVjnwgnvAkBh0U6CbzqrXgzA1E6FB9YOJGcacgUAfl36t0Ro/SIDUDEL/D1WBcJr5q0oRoJ2LQZgZJ4LPIu2RCPJAJafDLm2Yr2OHmQ4H0vzBksA2PKl38L3fY0aLAFYejK0ZpJhelVKzkj8dlRNzkj8dpRP0DTkVjTUXroB9PVnqtefS9I05BZU8NOdAyUl5q8RtwUg6KYcwP1Up8CanpMpU6ZMmTLdgP4BRYsi23xEdOAAAAAASUVORK5CYII=").then(g=>{"done"===this.g_acO?this.g_abV.g_pk(g):this.g_acH.g_acJ=g}).catch(g=>console.warn("Failed to load splash image: ",g)),this.g_adI("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAABABAMAAACekdKMAAAAMFBMVEUAAAByfYZyfYZyfYZyfYZyfYZyfYZyfYZyfYZyfYZyfYZyfYZyfYZyfYZyfYZyfYYgo7vbAAAAD3RSTlMAdxHdu4hmVZnuRMwzqiLYE4y2AAAF2klEQVR42u2Yv28jaRnHP/bG8SVxvA4ncRw6sCVoVlc4R8FJCOHlGkq7olrJy18QFzRUWSqkE1KibZAQOkc6Ua+5htJGW12BEihpHAqKE0XWcZzEcXIfinf8a8zunsTNoZPmW80zfsbvzGfmfX5BqlSpUqVKlSpVqlSpUqVKlSrV/1EHPv4SfN7wMgWQAkgBpABSAF+2HngOsG8PyDpsWwHy3gJU/UHM3o0uyxw4/G44zJf1LQC8INP3ugXAejOcrqn6EIf80puiQwDqHgF8S987nfsAcN+HfEd/M/v34TtwT9WLBABsewXQtAHkHfVtATlHAUsjboer1lX9O8BmV/V9AIf5tnpRATZrqj9aBLBmHMCe6l0lDmD3V6ofABS6YaHkAOTDo7XtADmvwjNuOAlYWnE7XNVXdXgKlFW1BDjcU7UzP/14AUA/DmA7+PwkDuCHqmHFvWih5ABknQAFvQW2fFq1AxxrD+iOK3E72o8+ItP2E8joz8jXHQDqnyj0vYRN/ZBMzdvZ/lYfwRKAA0c93nZSWYoB93VS4q/6GPL6WzJtOwkGwboVyOkAqHqy5jnQ1BJkvSNuE7bC74F/O4BjB0BGj0DvgJwTWHMAvOvFAoAblgHkHR9BsWspDuAEaNqBz7wB3nWQIICyLdiyPQH2LWW8ArpjO5B3QNwGoGYLKDquUA9hoekuhDvPaoWqh0BRK3MApRiAeyH8nPk0BuAuBNxzOIgWGiYI4NgGHLtnBZqeFhxBwUvPIefnxO0QNy6i3NUqGHbFPW9ATwG69jgL+aIbvvQAgBiA/bDr3/AqBuBzgC1vKUYL9e0lB+CeHShPNixBdwK1CWTstAewZWfVBnLRl7BvKUoPZBxNn5G6R+H9wS92Tl8OoGkp4BzEALwAWPOGTLRQ2VJyAHLeQnew7UOyjqBpjy1L/Quo2li1o5cD8M+d1lb4jCk4WQKw5qS3XOSsAujaAyjuvPUyANvRQs98khyAvAOK3uY9D+XOviXO7O1bCdVR3AY2wusNh2FXoEsACjr59msAhBprpRJcABCSn+pJcgCy7TsydrLtS3IewgNPKE944GOaY1bt+S0uHdY8XQTAx+rwnVcCiNxfAeD+DMDDBHuB/pg1G/Tv2PIEtj2kPmLbE7p3rNpfEABvq/756wCgbK9qj71xpWoLMt5mvWXdp1mvWLW/KAD+0jfkxf8FwIuvoBs8s7Q3hKqtfStQdLDuLlmv8p6zagMb8/uahYNYDAhBsub1K2PA6wAsBJsEAWx50h/Btk+aE4Du3bYN6F/nQtaL2/MsAGx5E2WB4SoAMtp7bRZ4BYBpjkkWQM6P2jew7mF7ANAcf+YR7I03Qp6O2/M64JmNeR1wvQRgZyc6LC0DyK7WAZuOXgYg5/VXAKDgtYeQdRBe7LEHY6BqObyhuD2vBMuW5pXg1RKAWvAtxwFMc99CJZh5eSGUj2rLhCdCbX0C1MehfN3Qa2DN9pD/Zs96gWzNWS9QDr3ADMCBT0KLUILmIoCurdB9znqB73k+9YkDoBYx+gByyQHoayt08I0wIomif/R1L9vPhz3Y9w/A9x1Nu8H1qBucATj2Eii07UHZxhxA2Q7wqaEb7EG2bmPq83zYWwawHxqj5rAXiu1ktB8+42rgQF6fhqbuilW7HnpzH5Gp2ZnOA/qOWAKQ039QLHsHPPN3VKY/nnlxxB91Ng9408nMp25nGUBO3yO4bDpuZZMBUA2Y16LtnA3Zm7pPWbVrvphNhCaV+einsQyAg3D6E8I8b3f6Yyac7y5MhOY+NV8sA6A5d6npMKk8eBluLSr0umE/lsNzx+y6u7OZYIPZ8O99YgDW2xptokJ7AUAA9uOD+UxwwafubgxAvjZz+TQxAJlQbhSn445yCNRn06y3ZD8fHkVT4YtvzKfC3yQOgExT/xa6nX9pYwag+Kb+nOZsKvzTBZ/nw6MYAPJl/XW4sJlcFEiVKlWqVKlSpUqVKlWqVKlSpUqV6uuu/wDv59f7eYDABQAAAABJRU5ErkJggg==").then(g=>{"done"===this.g_acO?this.g_abV.g_pk(g):this.g_acH.g_acK=g}).catch(g=>console.warn("Failed to load splash image: ",g)))}async g_adH(g){g=new URL(g,this.g_zu.g_fA()).toString();const _=await g_bz.g_gr(g),e=await this.g_zu.g_adJ(_,2048,2048);return await this.g_abV.g_yR(e,{g_oj:"high"})}async g_adI(g){g=new URL(g,this.g_zu.g_fA()).toString();const _=await g_bz.g_gr(g);return await this.g_abV.g_yR(_,{g_oj:"high"})}g_adK(){this.g_acB=Date.now(),this.g_zu.g_kS().addEventListener("loadingprogress",this.g_acE),this.g_adL(),this.g_acC=requestAnimationFrame(()=>this.g_adL())}async g_adM(){this.g_acD=1,4===this.g_zu.g_adN()&&(await this.g_acQ),this.g_acP=null,this.g_acQ=null,-1!==this.g_acC&&(cancelAnimationFrame(this.g_acC),this.g_acC=-1),this.g_zu.g_kS().removeEventListener("loadingprogress",this.g_acE),this.g_acE=null,this.g_acF&&(this.g_acF.g_eJ(),this.g_acF=null),this.g_acG&&(this.g_acG.g_eJ(),this.g_acG=null),this.g_acH.g_acI&&(this.g_abV.g_pk(this.g_acH.g_acI),this.g_acH.g_acI=null),this.g_acH.g_acJ&&(this.g_abV.g_pk(this.g_acH.g_acJ),this.g_acH.g_acJ=null),this.g_acH.g_acK&&(this.g_abV.g_pk(this.g_acH.g_acK),this.g_acH.g_acK=null),this.g_abV.g_yI(0,0,0,0),this.g_abV.g_yN(),this.g_acO="done",this.g_acr=this.g_abV.g_va()}g_adL(){if(-1!==this.g_acC){const g=this.g_abV;this.g_acC=-1;const _=this.g_zu.g_adG().g_Av(),e=this.g_zu.g_adN();if(3!==e&&(this.g_adp(g),g.g_yI(0,0,0,0),g.g_xy(),g.g_w$(),g.g_xA(null)),0===e)this.g_adO(_);else if(1===e)this.g_adP(_,120,0);else if(2===e)this.g_adQ(_);else if(3===e)g_bz.noop();else if(4===e)this.g_adR(_);else throw new Error("invalid loader style");g.g_yN(),this.g_acC=requestAnimationFrame(()=>this.g_adL())}}g_adQ(g){g?this.g_acF.g_ur(1,0,0):this.g_acF.g_ur(.6,.6,.6),this.g_acF.g_uv(Math.round(100*this.g_acD)+"%");const _=this.g_abZ/2,e=this.g_ab_/2;n.g_iL(_-150,e-100,_+150,e+100),this.g_abV.g_xA(this.g_acF.g_pp()),this.g_abV.g_xJ(n,this.g_acF.g_uO())}g_adP(_,a,n){const i=this.g_abV;i.g_yw(),_?i.g_xw(1,0,0,1):i.g_xw(.118,.565,1,1);const e=this.g_abZ/2,o=this.g_ab_/2,g=a/2;t.g_hX(e-g,o-4+n,Math.floor(a*this.g_acD),8),i.Rect(t),t.g_hX(e-g,o-4+n,a,8),t.offset(-.5,-.5),t.g_im(.5,.5),i.g_xw(0,0,0,1),i.g_x_(t),t.g_im(1,1),i.g_xw(1,1,1,1),i.g_x_(t)}g_adO(_){if(!this.g_acG)return void this.g_adP(_,120,0);const a=this.g_acG.g_pp();if(!a)return void this.g_adP(_,120,0);const t=a.g_oR(),o=a.g_oS(),e=this.g_abZ/2,r=this.g_ab_/2,g=t/2,d=o/2;n.g_iL(e-g,r-d,e+g,r+d),this.g_abV.g_xA(a),this.g_abV.g_iC(n),this.g_adP(_,t,d+16)}g_adR(_){var d=Math.min,u=Math.max,e=Math.ceil;const s=this.g_abV,g=this.g_acH.g_acI,i=this.g_acH.g_acJ,c=this.g_acH.g_acK,f=Date.now();0===this.g_acL&&(this.g_acB=f);const l=this.g_zu.g_Ak()||this.g_zu.g_adS()&&!this.g_zu.g_adT(),M=l?0:200,n=l?0:3e3;let o=1;"fade-in"===this.g_acO?o=d((f-this.g_acB)/300,1):"fade-out"===this.g_acO&&(o=u(1-(f-this.g_acN)/300,0)),s.g_yw(),s.g_xw(.231*o,.251*o,.271*o,o),t.set(0,0,this.g_abZ,this.g_ab_),s.Rect(t);const b=e(this.g_abZ),a=e(this.g_ab_);let m,T;256=n&&1<=this.g_acD&&(this.g_acO="fade-out",this.g_acN=f),("fade-out"===this.g_acO&&f-this.g_acN>=300+M||l&&1<=this.g_acD&&500>f-this.g_acB)&&this.g_acP()}}}{const g={messagePort:null,baseUrl:"",headless:!1,hasDom:!0,isInWorker:!1,useAudio:!0,projectData:"",exportType:""};let _=!0;g_bz.g_adU=class extends g_bz.g_eG{constructor(e){e=Object.assign({},g,e),super(),this.g_adV=e.messagePort,this.g_adW=e.baseUrl,this.g_adX=!!e.headless,this.g_adY=!!e.hasDom,this.g_adZ=!!e.isInWorker,_=e.ife,this.g_ad_=!!e.useAudio,this.g_ad$=e.exportType,this.g_zz=!!e.isWKWebView,this.g_aea=!!e.isFBInstantAvailable,this.g_aeb=e.opusWasmScriptUrl,this.g_aec=e.opusWasmBinaryUrl,this.g_aed="data.json",this.g_aee=!!("preview"===this.g_ad$&&e.isDebug),this.g_aef=this.g_aee,this.g_aeg=this.g_aee,this.g_aeh=0;const a=e.previewImageBlobs,t=e.previewProjectFileBlobs;t&&Object.assign(a,t);const o=e.projectData;o&&(a[this.g_aed]=o),this.g_aei=[],this.g_aej="",this.g_aek="",this.g_ael="",this.g_aem=0,this.g_aen=0,this.g_aeo=0,this.g_aep=0,this.g_aeq=0,this.g_aer=0,this.g_aes=0,this.g_aet=!1,this.g_aeu=!0,this.g_aev=!1;const i="html5"===this.g_ad$||"scirra-arcade"===this.g_ad$;this.g_AN=g_bz.g_eI(g_bz.g_zs,this,{g_zt:i?"remote":"local",g_zV:a,g_zy:"cordova"===this.g_ad$,g_zA:this.g_zz,g_zC:e.supportedAudioFormats}),this.g_EI=g_bz.g_eI(g_bz.g_Gn,this),this.g_MK=g_bz.g_eI(g_bz.g_Nx,this),this.g_aew=g_bz.g_eI(g_bz.g_Yd,this),this.g_aex=g_bz.g_eI(g_bz.g_abg,this),this.g_GO=g_bz.g_eI(g_bz.g_JU,this),this.g_aey=[],this.g_aez=new Map,this.g_aeA=new Map,this.g_aeB=0,this.g_aeC=[],this.g_aeD=[],this.g_aeE=[],this.g_aeF=[],this.g_aeG=new Map,this.g_aeH=!1,this.g_aeI=!1,this.g_aeJ=0,this.g_aeK=0,this.g_aeL=new Map,this.g_aeM=new Set,this.g_aeN=[],this.g_aeO=null,this.g_ot=!0,this.g_aeP=!1,this.g_aeQ=!0,this.g_aeR=!1,this.g_aeS=!1,this.g_aeT=g=>this.g_Im(g),this.g_acC=-1,this.g_aeU=0,this.g_aeV=0,this.g_aeW=0,this.g_aeX=!1,this.g_aeY=!1,this.g_aeZ=!1,this.g_ae_=!0,this.g_ae$=0,this.g_afa=()=>Math.random(),this.g_afb=0,this.g_afc=0,this.g_afd=0,this.g_afe=0,this.g_$g=1,this.g_aff=30,this.g_afg=g_bz.g_eI(g_bz.g_lz),this.g_afh=g_bz.g_eI(g_bz.g_lz),this.g_afi=-1,this.g_afj=0,this.g_afk=0,this.g_afl=0,this.g_afm=0,this.g_afn=!1,this.g_afo="",this.g_afp="",this.g_afq=null,this.g_afr="",this.g_afs=[],this.g_aft=null,this.g_$k=g_bz.g_eI(g_bz.Event.g_kS),this.g_afu=new Map,this.g_afv=new Map,this.g_afw=0,this.g_afx=!1,this.g_afy=[],this.g_afz={pretick:g_bz.g_eI(g_bz.Event,"pretick",!1),tick:g_bz.g_eI(g_bz.Event,"tick",!1),tick2:g_bz.g_eI(g_bz.Event,"tick2",!1),instancedestroy:g_bz.g_eI(g_bz.Event,"instancedestroy",!1),beforelayoutchange:g_bz.g_eI(g_bz.Event,"beforelayoutchange",!1),layoutchange:g_bz.g_eI(g_bz.Event,"layoutchange",!1)},this.g_afz.instancedestroy.g_L$=null,this.g_afA=g_bz.g_eI(g_bz.g_lH,g_bz.g_$e.g_aaO),this.g_afB=g_bz.g_eI(g_bz.g_lH,g_bz.g_$e.g_aaO),this.g_afC=g_bz.g_eI(g_bz.g_lH,g_bz.g_$e.g_aaO),this.g_afD=g_bz.g_eI(g_bz.g_afE,this,e.jobScheduler),e.canvas&&(this.g_aeO=g_bz.g_eI(g_bz.g_abT,this)),this.g_adV.onmessage=g=>this._OnMessageFromDOM(g.data),this.g_Wv("runtime","visibilitychange",g=>this.g_afF(g)),this.g_Wv("runtime","opus-decode",g=>this.g_afG(g.arrayBuffer)),this.g_$k.addEventListener("window-blur",g=>this.g_afH(g)),this.g_$k.addEventListener("window-focus",()=>this.g_afI())}static g_pG(g){return g_bz.g_eI(g_bz.g_adU,g)}g_eJ(){g_bz.g_fR(this.g_aey),this.g_aez.clear(),this.g_aeA.clear(),this.g_EI.g_eJ(),this.g_EI=null,this.g_MK.g_eJ(),this.g_MK=null,this.g_aew.g_eJ(),this.g_aew=null,this.g_AN.g_eJ(),this.g_AN=null,this.g_aex.g_eJ(),this.g_aex=null,this.g_GO.g_eJ(),this.g_GO=null,this.g_aeO&&(this.g_aeO.g_eJ(),this.g_aeO=null),this.g_$k.g_eJ(),this.g_$k=null,this.g_afJ=null,this.g_aeT=null}["_OnMessageFromDOM"](g){const _=g.type;if("event"===_)this.g_afK(g);else if("result"===_)this.g_afL(g);else throw new Error(`unknown message '${_}'`)}g_afK(g){if(!this.g_afx)return void this.g_afy.push(g);const _=g.component,u=g.handler,a=g.data,e=g.dispatchRuntimeEvent,n=g.responseId;if("runtime"===_&&e){const g=new g_bz.Event(u);g.data=a,this.g_$k.g_k_(g)}const t=this.g_afu.get(_);if(!t)return void(e||console.warn(`[Runtime] No DOM event handlers for component '${_}'`));const i=t.get(u);if(!i)return void(e||console.warn(`[Runtime] No DOM handler '${u}' for component '${_}'`));let o=null;try{o=i(a)}catch(g){return console.error(`Exception in '${_}' handler '${u}':`,g),void(null!==n&&this.g_afM(n,!1,g.toString()))}null!==n&&(o&&o.then?o.then(g=>this.g_afM(n,!0,g)).catch(g=>{console.error(`Rejection from '${_}' handler '${u}':`,g),this.g_afM(n,!1,g.toString())}):this.g_afM(n,!0,o))}g_afM(g,_,e){this.g_adV.postMessage({type:"result",responseId:g,isOk:_,result:e})}g_afL(g){const _=g.responseId,e=g.isOk,a=g.result,n=this.g_afv.get(_);e?n.resolve(a):n.reject(a),this.g_afv.delete(_)}g_Wv(g,_,e){let a=this.g_afu.get(g);if(a||(a=new Map,this.g_afu.set(g,a)),a.has(_))throw new Error(`[Runtime] Component '${g}' already has handler '${_}'`);a.set(_,e)}g_WP(g,_,e){this.g_adV.postMessage({type:"event",component:g,handler:_,data:e,responseId:null})}g_Ae(g,_,e){const n=this.g_afw++,a=new Promise((g,_)=>{this.g_afv.set(n,{resolve:g,reject:_})});return this.g_adV.postMessage({type:"event",component:g,handler:_,data:e,responseId:n}),a}g_afN(g){if(!this.g_PN())throw new Error("not in debug mode");this.g_WP("runtime","post-to-debugger",g)}async g_$o(g){this.g_PN()&&g_adz.g_$o(this);const[_]=await Promise.all([this.g_AN.g_gq(this.g_aed),this.g_afO(),this.g_afD.g_$o()]);this.g_afP(_),await this.g_afQ(g),this.g_Ak()||console.info("Made with Construct 3, the game and app creator :: https://www.construct.net");const e=this.g_po();e?(console.info(`[C3 runtime] Hosted in ${this.g_AB()?"worker":"DOM"}, rendering with WebGL ${e.g_oB()} [${e.g_zk()}]`),e.g_oI()&&console.warn("[C3 runtime] WebGL indicates a major performance caveat. Software rendering may be in use. This can result in significantly degraded performance.")):console.info(`[C3 runtime] Hosted in ${this.g_AB()?"worker":"DOM"}, headless`),this.g_afx=!0;for(const _ of this.g_afy)this.g_afK(_);if(g_bz.g_fR(this.g_afy),this.g_aeO&&this.g_aeO.g_adK(),await Promise.all([this.g_AN.g_At(),...this.g_aei]),!this.g_AN.g_Av())return this.g_aeO&&(await this.g_aeO.g_adM()),await this.g_$k.g_kZ(new g_bz.Event("beforeruntimestart")),await this.g_afR(),this.g_adV.postMessage({type:"runtime-ready"}),this}g_afP(g){const _=g.project;this.g_aej=_[0],this.g_aek=_[16],this.g_ael=_[31],this.g_aeP=!!_[9],this.g_aem=this.g_aeq=_[10],this.g_aen=this.g_aer=_[11],this.g_aeo=this.g_aem/2,this.g_aep=this.g_aen/2,this.g_ot=!!_[14],this.g_aet=!!_[18],this.g_aes=_[19],this.g_aeK=_[21],this.g_aeR=_[22],this.g_AN.g_AD(_[7],_[25]),this.g_AN.g_zX(_[8]),this.g_AN.g_zZ(_[32]),this.g_AN.g_z$(_[28]),this.g_AN.g_Ay(_[29]),this.g_aeO&&(this.g_aeO.g_adf(g_bz.g_abT.g_adl(_[12])),this.g_aeO.g_adj(_[23]?"high":"low"),this.g_aeO.g_adm(_[15]),this.g_aeO.g_acR(_[34])),this.g_aew.g_Yl(),this.g_aeN=self.g_afS();for(const e of _[2])this.g_aew.g_Yk(e);this.g_aeN=self.g_afS();for(const a of _[3]){const g=g_bz.g_Zp.g_pG(this,this.g_aey.length,a);this.g_aey.push(g),this.g_aez.set(g.g_qT().toLowerCase(),g),this.g_aeA.set(g.g_CR(),g)}for(const a of _[4]){const g=this.g_aey[a[0]];g.g__e(a)}for(const a of _[27]){const g=a.map(g=>this.g_aey[g]);this.g_aeC.push(g_bz.g_eI(g_bz.g__V,this,g))}for(const _ of this.g_aey)_.g__g();for(const e of _[5])this.g_EI.g_pG(e);const a=_[1];if(a){const g=this.g_EI.g_Gy(a);g&&this.g_EI.g_Gw(g)}for(const e of _[33])this.g_GO.g_pG(e);for(const e of _[6])this.g_MK.g_pG(e);this.g_MK.g_NU(),g_bz.g_fR(this.g_aeN),this.g_Cp();let e="any";const n=_[20];1===n?e="portrait":2===n&&(e="landscape"),this.g_WP("runtime","set-target-orientation",{targetOrientation:e})}g_adN(){return this.g_aes}g_adS(){return this.g_aea}g_afT(){return this.g_aeu}g_afU(g){this.g_aei.push(g)}g__a(){return this.g_aeB++}g__i(){return this.g_aeB}g_aaU(g){this.g_aeD.push(g)}g_acX(){return this.g_aeD}async g_afQ(g){this.g_aeO&&(await this.g_aeO.g_gy(g),this.g_aeO.g_adF(this.g_aes))}async g_afO(){if(this.g_AN.g_AC("audio/webm; codecs=opus"))return;let g=null,_=null;try{this.g_afV()?_=await this.g_AN.g_Ah(this.g_aec):g=await this.g_AN.g_gr(this.g_aec)}catch(g){return void console.info("Failed to fetch Opus decoder WASM; assuming project has no Opus audio.",g)}_?this.g_afW(_,"opus-decoder-wasm"):this.g_afX(g,"opus-decoder-wasm"),await this.g_afY([this.g_aeb])}async g_afG(g){const _=await this.g_afZ("OpusDecode",{arrayBuffer:g},[g]);return _}async g_afR(){if(this.g_aeX=!0,this.g_afb=Date.now(),this.g_aet){for(const g of this.g_aey)g.g_CJ()||g.g__u()||!g.g_FO()||g.g_Wj();this.g_AN.g_At().then(()=>{this.g_aeu=!1,this.g_af_()})}else this.g_aeu=!1;this.g_AN.g_Au(),this.g_PN()&&g_adz.g_af$(_);for(const g of this.g_EI.g_GB())g.g_FZ();const g=this.g_EI.g_Gx();await g.g_Fo(null,this.g_po()),await g.g_Fw(!0),this.g_afj=performance.now(),this.g_aet||this.g_af_();const e=await this.g_Ae("runtime","before-start-ticking");e.isSuspended?this.g_ae$++:this.g_Im()}g_af_(){this.g_HI(g_bz.g_FM.g_FL.g_FK.g_aga,null),this.g_WP("runtime","register-sw")}g_Sh(g){if(g=Math.floor(g),0>g||g>=this.g_aeN.length)throw new Error("invalid object reference");return this.g_aeN[g]}g_agb(){return this.g_adY}g_agc(){return this.g_adX}g_AB(){return this.g_adZ}g_fA(){return this.g_adW}g_CH(){return this.g_MK}g_Mp(){return this.g_MK.g_Mp()}g_Ob(){return this.g_MK.g_Ob()}g_MH(){return this.g_MK.g_MH()}g_Oc(){return this.g_MK.g_Oc()}g_agd(){return 0===this.g_Ob().g_MW()}g_Oe(){return this.g_MK.g_Oe()}g_Zq(){return this.g_aew}g_Sf(){return this.g_aew.g_Sf()}g_Ce(g){if(g=Math.floor(g),0>g||g>=this.g_aey.length)throw new RangeError("invalid index");return this.g_aey[g]}g_age(g){return this.g_aez.get(g.toLowerCase())||null}g_FR(g){return this.g_aeA.get(g)||null}g_agf(g){const _=this.g_aew.g_Yp(g);return _?_.g_Wn():null}g_CI(){return this.g_aey}g_kS(){return this.g_$k}g_Cc(){return this.g_aem}g_Cd(){return this.g_aen}g_agg(g,_){this.g_aem=g,this.g_aen=_}g_Er(){return this.g_aeq}g_Es(){return this.g_aer}g_add(g,_){this.g_aeq=g,this.g_aer=_}g_Ev(){return this.g_aeo}g_Ew(){return this.g_aep}g_DO(){return this.g_aeO}g_DS(){return this.g_aeO?this.g_aeO.g_DS():this.g_aeq}g_DT(){return this.g_aeO?this.g_aeO.g_DT():this.g_aer}g_DM(){return this.g_aeO?this.g_aeO.g_DM():1}g_Em(){return this.g_aeO?this.g_aeO.g_Em():1}g_Xx(){return this.g_aeO?this.g_aeO.g_Xx():0}g_Xy(){return this.g_aeO?this.g_aeO.g_Xy():0}g_agh(){return this.g_aeO?this.g_aeO.g_Xv():0}g_agi(){return this.g_aeO?this.g_aeO.g_Xw():0}g_adg(){return this.g_aeO?this.g_aeO.g_adg():"off"}g_DU(g){return this.g_aeO?this.g_aeO.g_DU(g):null}g_Ej(g){this.g_aeO&&this.g_aeO.g_Ej(g)}g_acY(g){this.g_aev=!!g}g_Gj(){return this.g_aev}g_adB(){return this.g_aeO?this.g_aeO.g_adB():NaN}g_pq(){return this.g_ot}g__c(){return this.g_aet}g_OQ(){return this.g_EI}g_Gg(){return this.g_EI.g_Gg()}g_LW(){return this.g_GO}g_adG(){return this.g_AN}g_An(g){return this.g_AN.g_An(g)}g_agj(g,_,e,a){return this.g_Cm(g,_,!1,e,a)}g_Cm(f,e,h,n,t,s){let i=null,M=null;if(f instanceof g_bz.g_Zp){if(M=f,M.g_CJ()){const g=M.g_Rb(),_=Math.floor(this.g_agk()*g.length);M=g[_]}i=M.g_Cg()}else i=f,M=this.g_Ce(i[1]);const b=M.g_Gf().g_FO();if(this.g_aeu&&b&&!M.g__u())return null;const d=e;b||(e=null);let _=h&&!s&&i&&!this.g_aeL.has(i[2])?i[2]:this.g_aeK++;const l=i?i[0]:null,g=g_bz.g_eI(g_bz.g_GM,{g_LX:this,g__q:M,g_$m:e,g_$n:l,g_$q:i?i[3]:null,g__r:_});this.g_aeL.set(_,g);let u=null;if(b&&(u=g.g_Bc(),"undefined"!=typeof n&&"undefined"!=typeof t&&(u.g_Uh(n),u.g_Ui(t)),M.g__N(!0)),e&&(e.g_Cq(g,!0),(1!==e.g_Dc()||1!==e.g_Dd())&&M.g_Df(!0),e.g_CP().g_Fq(M)),this.g_aeJ++,M.g_CN()&&!h&&!s){for(const _ of M.g_Fm().g_FU()){if(_===M)continue;const e=this.g_Cm(_,d,!1,u?u.g_FW():n,u?u.g_FX():t,!0);g.g_FV(e)}for(const _ of g.siblings()){_.g_FV(g);for(const e of g.siblings())_!==e&&_.g_FV(e)}}M.g__J();const T=i?g_bz.g_gb(i[5]):null,m=i?i[4].map(g=>g_bz.g_gb(g)):null;if(g.g__s(T,m),b&&l&&14===l.length){const _=l[13];g.g_$v(),g.g_KG().g_WY(_[2],_[0],_[1])}return this.g_aeF.push(g),this.g_aeH=!0,this.g_PN()&&g_adz.g_agl(g),g}g_CF(g){if(this.g_aeM.has(g))return;const _=g.g_CE();let e=this.g_aeG.get(_);if(e){if(e.has(g))return;e.add(g)}else e=new Set,e.add(g),this.g_aeG.set(_,e);if(this.g_PN()&&g_adz.g_agm(g),g.g_$G(),this.g_aeH=!0,g.g_CN())for(const _ of g.siblings())this.g_CF(_);if(this.g_aeI&&g_bz.g_es(),!this.g_EI.g_GG()){const _=this.g_CH();_.g_CL(!0),g.g_$F(),_.g_CL(!1)}}g_Cp(){this.g_aeH&&(this.g_aeI=!0,this.g_agn(),this.g_ago(),this.g_aeI=!1,this.g_aeH=!1,this.g_CY())}g_agn(){for(const g of this.g_aeF){const _=g.g_CE();_.g_Cq(g);for(const e of _.g_Qh())e.g_Cq(g),e.g__J()}g_bz.g_fR(this.g_aeF)}g_ago(){this.g_$k.g_kN(!0);for(const[g,_]of this.g_aeG.entries())this.g_agp(g,_),_.clear();this.g_aeG.clear(),this.g_$k.g_kN(!1)}g_agp(g,_){g_bz.g_f_(g.g_FP(),_),g.g__J(),0===g.g_FP().length&&g.g_Df(!1);for(const e of g.g_Qh())g_bz.g_f_(e.g_FP(),_),e.g__J();if(g.g_Gf().g_FO()){const g=new Set([..._].map(g=>g.g_Bc().g_Cr()));for(const e of g)e.g_Dx(_)}for(const t of _){const g=this.g_afz.instancedestroy;g.g_L$=t,this.g_$k.dispatchEvent(g),this.g_aeL.delete(t.g_Co());const _=t.g_Bc();_&&(_.g_aar(),_.g_Cy()),this.g_aeM.add(t),this.g_aeJ--}}g_Uw(){return this.g_aeF}g__p(){return this.g_aeK++}g__t(g,_){this.g_aeL.set(g,_)}g_Fv(){this.g_$k.dispatchEvent(g_bz.g_eI(g_bz.Event,"webglcontextlost")),this.g_agq(!0);for(const g of this.g_aey)!g.g_CJ()&&g.g__v()&&g.g_Ft();this.g_Gg().g_Fv(),g_bz.g_Yu.g_A_(),g_bz.g_Ap.g_A_()}async g_acS(){await this.g_Gg().g_Fo(null,this.g_po()),this.g_$k.dispatchEvent(g_bz.g_eI(g_bz.Event,"webglcontextrestored")),this.g_agq(!1),this.g_CY()}g_afF(g){this.g_agq(g.hidden)}g_afH(g){this.g_Ak()&&this.g_aeR&&!g_bz.g_ct.g_cE&&(g.data.parentHasFocus||(this.g_agq(!0),this.g_aeS=!0))}g_afI(){this.g_aeS&&(this.g_agq(!1),this.g_aeS=!1)}g_agr(){return 0this.g_ae$&&(this.g_ae$=0),!_&&e)console.log("[Construct 3] Suspending"),-1!==this.g_acC&&(cancelAnimationFrame(this.g_acC),this.g_acC=-1),this.g_$k.dispatchEvent(g_bz.g_eI(g_bz.Event,"suspend")),this.g_HI(g_bz.g_FM.g_FL.g_FK.g_ags,null);else if(_&&!e){console.log("[Construct 3] Resuming");const g=performance.now();this.g_afc=g,this.g_afj=g,this.g_afi=0,this.g_afk=0,this.g_afm=0,this.g_afl=0,this.g_$k.dispatchEvent(g_bz.g_eI(g_bz.Event,"resume")),this.g_HI(g_bz.g_FM.g_FL.g_FK.g_agt,null),this.g_OP()||this.g_Im(g)}}g_XV(g){this.g_afA.g_jG(g)}g_X_(g){this.g_afB.g_jG(g)}g_XX(g){this.g_afC.g_jG(g)}g_XW(g){this.g_afA.g_lx(g)}g_X$(g){this.g_afB.g_lx(g)}g_XY(g){this.g_afC.g_lx(g)}g_agu(){for(const g of this.g_afA)g.g_Im()}g_agv(){for(const g of this.g_afB)g.g_XU()}g_agw(){for(const g of this.g_afC)g.g_WS()}*g_agx(){for(const g of this.g_afA){const _=g.g_Im();g_bz.g_gO(_)&&(yield*_)}}*g_agy(){for(const g of this.g_afB){const _=g.g_XU();g_bz.g_gO(_)&&(yield*_)}}*g_agz(){for(const g of this.g_afC){const _=g.g_WS();g_bz.g_gO(_)&&(yield*_)}}async g_Im(g,_){if(this.g_acC=-1,this.g_aeZ=!0,this.g_aeX&&(!this.g_agr()||_)){const _=performance.now();this.g_aeY=!0,g||(g=_),await this.g_agA(g),this.g_agB(),this.g_agr()||(this.g_acC=self.requestAnimationFrame(this.g_aeT)),this.g_aeU++,this.g_aeV++,this.g_aeW++,this.g_aeY=!1,this.g_afl+=performance.now()-_}}async g_agA(g){const _=this.g_MK,e=this.g_$k,a=this.g_afz,n=this.g_PN(),t=this.g_agC();if(this.g_agD(g),this.g_Cp(),_.g_CL(!0),this.g_OD(this.g_Gg()),n&&g_adz.g_agE(),t?await _.g_Pj():_.g_Pe(),n&&g_adz.g_agF(),this.g_OE(),_.g_CL(!1),this.g_Cp(),_.g_CL(!0),await e.g_kZ(a.pretick),n&&g_adz.g_agE(),t?await this.g_agG(this.g_agx()):this.g_agu(),t?await this.g_agG(this.g_agy()):this.g_agv(),n&&g_adz.g_agH(),n&&g_adz.g_agE(),t?await this.g_agI(a.tick):e.dispatchEvent(a.tick),n&&g_adz.g_agJ(),_.g_CL(!1),this.g_agK()&&(await this.g_agL()),this.g_OQ().g_GI()&&(await this.g_agM()),n&&g_adz.g_agE(),t?await _.g_OF(this.g_EI):_.g_OC(this.g_EI),n&&g_adz.g_agF(),this.g_aex.g_abs(),0_++;)await this.g_agN(g.g_GJ())}g_agD(g){if(0!==this.g_afc){const _=Math.max(g-this.g_afc,0);this.g_afd=_/1e3;const e=1/this.g_aff;.5e&&(this.g_afd=e)}this.g_afc=g,this.g_afe=this.g_afd*this.g_$g,this.g_afg.g_jG(this.g_afe),this.g_afh.g_jG(this.g_afd),this.g_aeO&&this.g_aeO.g_adx(),1e3<=g-this.g_afj&&(this.g_afj+=1e3,1e3<=g-this.g_afj&&(this.g_afj=g),this.g_afk=this.g_afi,this.g_afi=0,this.g_afm=Math.min(this.g_afl/1e3,1),this.g_afl=0,this.g_aeO&&this.g_aeO.g_adw(),this.g_aex.g_abm(),this.g_PN()&&g_adz.g_agO()),this.g_afi++}async g_agN(g){const _=this.g_$k,e=this.g_OQ(),a=e.g_Gg();await a.g_F$(),a.g_Fu(g,this.g_po()),a===g&&this.g_MK.g_Gc(),this.g_aex.g_abs(),_.dispatchEvent(this.g_afz.beforelayoutchange),await g.g_Fo(a,this.g_po()),await g.g_Fw(!1),_.dispatchEvent(this.g_afz.layoutchange),this.g_CY(),this.g_ae_=!0,this.g_Cp()}g_CY(){this.g_aeQ=!0}g_po(){return this.g_aeO?this.g_aeO.g_po():null}g_agB(){if(!this.g_aeO||this.g_aeO.g_adn())return;const g=this.g_po();if(g.g_yO(),!this.g_aeQ)return void g.g_zm();const _=this.g_PN();_&&g_adz.g_agE(),this.g_aeQ=!1;let e=null;g.g_y_()&&(e=this.g_aeO.g_adA().g_vo(),g.g_yZ(e)),g.g_w$(),g.g_xC(),g.g_xw(1,1,1,1),g.g_yT(null),g.g_xA(null);const a=this.g_EI.g_Gg();a.g_DN(g),e&&g.g_y$(e),g.g_yN(),_&&(g_adz.g_agP(),g_adz.g_agQ()),this.g_aeO&&this.g_aeO.g_adD()}g_HI(g,_){if(!this.g_aeX)return!1;const e=!this.g_aeY&&!this.g_MK.g_OV();let a=0;e&&(a=performance.now());const n=this.g_PN();n&&this.g_agR(!1);const o=this.g_MK.g_OJ(this.g_EI,g,_);if(e){const g=performance.now()-a;this.g_afl+=g,n&&g_adz.g_agS(g)}return n&&this.g_agR(!0),o}g_WJ(g,_){if(!this.g_PN())return this.g_HI(g,_);if(this.g_OP())throw new Error("called DebugTrigger() while stopped on breakpoint");if(!this.g_aeY&&!this.g_MK.g_OV())throw new Error("called DebugTrigger() outside of event code - use TriggerAsync() instead");return this.g_MK.g_OM(this.g_EI,g,_)}async g_FI(g,_){if(!this.g_agC())return this.g_HI(g,_);if(!this.g_aeX)return!1;if(this.g_OP())return this.g_MK.g_ON(g,_);if(!this.g_Gg())return this.g_MK.g_OK(g,_);const e=performance.now(),a=this.g_MK.g_OM(this.g_EI,g,_);let n=a.next();for(;!n.done;)await this.g_OH(n.value),n=a.next();return this.g_agr()||this.g_MK.g_OV()||(await this.g_MK.g_OR(),this.g_aeZ&&-1===this.g_acC&&!this.g_aeY&&(this.g_acC=self.requestAnimationFrame(this.g_aeT))),this.g_afl+=performance.now()-e,n.value}g_WK(g,_,e){const a=this.g_PN();a&&this.g_agR(!1);const n=this.g_MK.g_OS(this.g_EI,g,_,e);return a&&this.g_agR(!0),n}g_WL(g,_,e){return this.g_MK.g_OT(this.g_EI,g,_,e)}g_OD(g){this.g_aeE.push(g)}g_OE(){if(!this.g_aeE.length)throw new Error("layout stack empty");this.g_aeE.pop()}g_Ru(){if(!this.g_aeE.length)throw new Error("no current layout");return this.g_aeE[this.g_aeE.length-1]}g_Kn(g){return g&&-1!==g.g_Ko()?this.g_afd*g.g_Ko():this.g_afe}g_agT(){return this.g_afe}g_agU(){return this.g_afd}g_Ko(){return this.g_$g}g_$t(g){(isNaN(g)||0>g)&&(g=0),this.g_$g=g}g_agV(g){this.g_aff=g_bz.g_eM(g,1,120)}g_agW(){return this.g_aff}g_agX(){return this.g_afk}g_agY(){return this.g_afm}g_agZ(){return this.g_afb}g_Eh(){return this.g_afg.g_bQ()}g_ag_(){return this.g_afh.g_bQ()}g_ag$(){return this.g_aeU}g_aha(){return this.g_aeV}g_Qq(){++this.g_aeW}g_ahb(){return this.g_aeW}g_ahc(){return this.g_aeJ}g_ahd(){return this.g_aej}g_ahe(){return this.g_aek}g_ahf(){return this.g_ael}g_IG(g){if(this.g_afn)throw new Error("cannot call while loading state - wait until afterload event");return this.g_aeL.get(g)||null}g_FS(){this.g_aeL.clear();for(const g of this.g_aey)if(!g.g_CJ())for(const _ of g.g_FP())this.g_aeL.set(_.g_Co(),_)}g_Ak(){return"preview"===this.g_ad$}g_PN(){return this.g_aee}g_ahg(){return this.g_ad$}g_adT(){return"cordova"===this.g_ad$}g_afV(){return this.g_zz}g_ahh(){return this.g_aex}g_Ys(){return this.g_aew.g_Ys()}g_Yt(){return this.g_aew.g_Yt()}g_ahi(){return this.g_ae_}g_ahj(g){g=!!g,this.g_aeP===g||(this.g_aeP=g,this.g_CY())}g_Eq(){return this.g_aeP}g_ahk(g){this.g_afo=g}g_ahl(g){this.g_afp=g}g_VA(g){this.g_afq=g}g_ahm(){return this.g_afr}g_agK(){return!!(this.g_afo||this.g_afp||null!==this.g_afq)}async g_agL(){if(this.g_afo&&(this.g_Cp(),await this.g_ahn(this.g_afo),this.g_aho()),this.g_afp&&(await this.g_ahp(this.g_afp),this.g_aho(),this.g_PN()&&g_adz.g_ahq()),null!==this.g_afq){this.g_Cp();try{await this.g_ahr(this.g_afq),this.g_afr=this.g_afq,await this.g_FI(g_bz.g_FM.g_FL.g_FK.g_ahs,null),this.g_afr=""}catch(g){console.error("[Construct 3] Failed to load state from JSON string: ",g),await this.g_FI(g_bz.g_FM.g_FL.g_FK.g_aht,null)}this.g_aho()}}g_aho(){this.g_afo="",this.g_afp="",this.g_afq=null}g_ahu(){return this.g_aft||(this.g_aft=localforage.g_by({name:"c3-savegames-"+this.g_ahf(),description:this.g_ahd()})),this.g_aft}async g_ahn(g){const _=this.g_ahv();try{await this.g_ahu().setItem(g,_),console.log("[Construct 3] Saved state to storage ("+_.length+" chars)"),this.g_afr=_,await this.g_FI(g_bz.g_FM.g_FL.g_FK.g_ahw,null),this.g_afr=""}catch(g){console.error("[Construct 3] Failed to save state to storage: ",g),await this.g_FI(g_bz.g_FM.g_FL.g_FK.g_ahx,null)}}async g_ahp(g){try{const _=await this.g_ahu().getItem(g);if(!_)throw new Error("empty slot");console.log("[Construct 3] Loaded state from storage ("+_.length+" chars)"),await this.g_ahr(_),this.g_afr=_,await this.g_FI(g_bz.g_FM.g_FL.g_FK.g_ahs,null),this.g_afr=""}catch(g){console.error("[Construct 3] Failed to load state from storage: ",g),await this.g_FI(g_bz.g_FM.g_FL.g_FK.g_aht,null)}}g_ahv(){const g={c3save:!0,version:1,rt:{time:this.g_Eh(),walltime:this.g_ag_(),timescale:this.g_Ko(),tickcount:this.g_ag$(),execcount:this.g_ahb(),next_uid:this.g_aeK,running_layout:this.g_Gg().g_CR(),start_time_offset:Date.now()-this.g_afb},types:{},layouts:{},events:this.g_MK.g_ED()};for(const _ of this.g_aey)_.g_CJ()||_.g__S()||(g.types[_.g_CR().toString()]=_.g_ED());for(const _ of this.g_EI.g_GB())g.layouts[_.g_CR().toString()]=_.g_ED();return JSON.stringify(g)}g_FG(){return this.g_afn}g_FH(g){g_bz.g_fV(this.g_afs,g)}async g_ahr(g){const _=JSON.parse(g);if(_.c2save)throw new Error("C2 saves are incompatible with C3 runtime");if(!_.c3save)throw new Error("not valid C3 save data");if(1<_.version)throw new Error("C3 save data from future version");this.g_afn=!0;const e=_.rt;this.g_afg.Set(e.time),this.g_afh.Set(e.walltime),this.g_$g=e.timescale,this.g_aeU=e.tickcount,this.g_aeW=e.execcount,this.g_afb=Date.now()-e.start_time_offset;const a=e.running_layout;if(a!==this.g_Gg().g_CR()){const g=this.g_EI.g_Gz(a);if(g)await this.g_agN(g);else return}for(const[i,n]of Object.entries(_.types)){const g=parseInt(i,10),_=this.g_FR(g);!_||_.g_CJ()||_.g__S()||_.g_EF(n)}this.g_Cp(),this.g_FS(),this.g_afn=!1,this.g_aeK=e.next_uid;for(const[i,n]of Object.entries(_.layouts)){const g=parseInt(i,10),_=this.g_EI.g_Gz(g);_&&_.g_EF(n)}this.g_MK.g_EF(_.events);for(const _ of this.g_afs)_.g_CM();g_bz.g_fR(this.g_afs);for(const _ of this.g_aey)if(!_.g_CJ()&&_.g_CN())for(const g of _.g_FP()){const e=g.g_FT();for(const a of _.g_Fm().g_FU()){if(a===_)continue;const n=a.g_FP();if(0>e||e>=n.length)throw new Error("missing sibling instance");g.g_FV(n[e])}}this.g_$k.dispatchEvent(g_bz.g_eI(g_bz.Event,"afterload")),this.g_CY()}async g_afY(g){const _=await Promise.all(g.map(g=>this.g_AN.g_gr(g))),e=_.map(g=>URL.createObjectURL(g));this.g_afD.g_ahy(e)}g_afX(g,_){this.g_afD.g_ahz(g,_)}g_afW(g,_){this.g_afD.g_ahA(g,_)}g_afZ(g,_,e){return this.g_afD.g_afZ(g,_,e)}g_ahB(g,_,e){return this.g_afD.g_ahB(g,_,e)}g_ahC(g,_){this.g_WP("runtime","invoke-download",{url:g,filename:_})}async g_adJ(g,_,e){if(this.g_AB())return await this.g_Ae("runtime","raster-svg-image",{blob:g,width:_,height:e});else{const a=await g_bz.g_gx(g);return await self.C3_RasterSvgImage(a,_,e)}}g_agk(){return this.g_afa()}g_ahD(g){this.g_afa=g}g_OP(){return!!this.g_PN()&&g_adz.g_OP()}g_OH(g){return this.g_agC()?g_adz.g_OH(g):Promise.resolve()}g_RK(){return!!this.g_agC()&&g_adz.g_ahE()}g_ahF(g){this.g_aef=!!g,this.g_ahG()}g_ahH(){return this.g_aef}g_agC(){return this.g_aeg}g_agR(g){g?this.g_aeh--:this.g_aeh++,this.g_ahG()}g_ahG(){this.g_aeg=this.g_PN()&&this.g_aef&&0===this.g_aeh}g_Qf(){return this.g_PN()&&g_adz.g_Qf()}g_DP(){return this.g_PN()&&this.g_po().g_y_()&&g_adz.g_DP()}async g_agG(g){if(g)for(const _ of g)await this.g_OH(_)}g_agI(g){return this.g_agG(this.g_$k.g_k$(g))}},self.C3_CreateRuntime=g_bz.g_adU.g_pG,self.C3_InitRuntime=(g,_)=>g.g_$o(_)}"use strict",g_bz.g_afE=class extends g_bz.g_eG{constructor(g,_){super(),this.g_zu=g,this.g_ahI=new Map,this.g_ahJ=0,this.g_ahK=_.inputPort,_.outputPort.onmessage=g=>this.g_ahL(g),this.g_ahM=_.maxNumWorkers,this.g_ahN=1,this.g_ahO=!1,this.g_ahP=!1,this.g_ahQ=!1,this.g_ahR=null}async g_$o(){await this.g_ahS()}g_ahy(g){this.g_ahQ||this.g_ahK.postMessage({type:"_import_scripts",scripts:g})}g_ahz(g,_){this.g_ahQ||this.g_ahK.postMessage({type:"_send_blob",blob:g,id:_})}g_ahA(g,_){this.g_ahQ||this.g_ahK.postMessage({type:"_send_buffer",buffer:g,id:_},[g])}g_afZ(_,a,n,t,i){if(this.g_ahQ)return Promise.reject("messagechannels broken");n||(n=[]);const e=this.g_ahJ++,o={type:_,isBroadcast:!1,jobId:e,params:a,transferables:n},g=new Promise((g,_)=>{this.g_ahI.set(e,{resolve:g,g_Aw:t,reject:_,g_ahT:!1})});return i&&i.g_lv(()=>this.g_ahU(e)),this.g_ahK.postMessage(o,n),this.g_ahV(),g}g_ahB(g,_,a){if(!this.g_ahQ){a||(a=[]);const n=this.g_ahJ++,t={type:g,isBroadcast:!0,jobId:n,params:_,transferables:a};this.g_ahK.postMessage(t,a)}}g_ahU(g){const _=this.g_ahI.get(g);_&&(_.g_ahT=!0,_.resolve=null,_.g_Aw=null,_.reject=null,this.g_ahK.postMessage({type:"_cancel",jobId:g}))}g_ahL(g){const _=g.data,e=_.type,a=_.jobId;switch(e){case"result":this.g_ahW(a,_.result);break;case"progress":this.g_ahX(a,_.progress);break;case"error":this.g_ahY(a,_.error);break;case"ready":this.g_ahZ();break;case"_testMessageChannelOk":this.g_ah_();break;default:throw new Error(`unknown message from worker '${e}'`);}}g_ahW(g,_){const e=this.g_ahI.get(g);if(!e)throw new Error("invalid job ID");e.g_ahT||e.resolve(_),this.g_ahI.delete(g)}g_ahX(g,_){const e=this.g_ahI.get(g);if(!e)throw new Error("invalid job ID");!e.g_ahT&&e.g_Aw&&e.g_Aw(_)}g_ahY(g,_){const e=this.g_ahI.get(g);if(!e)throw new Error("invalid job ID");e.g_ahT||e.reject(_),this.g_ahI.delete(g)}g_ahZ(){this.g_ahO&&(this.g_ahO=!1,this.g_ahN++,this.g_ahN=this.g_ahM||this.g_ahO||this.g_ahP||this.g_ahI.size<=this.g_ahN))try{this.g_ahO=!0;const g=await this.g_zu.g_Ae("runtime","create-job-worker");g.outputPort.onmessage=g=>this.g_ahL(g)}catch(g){this.g_ahP=!0,this.g_ahO=!1,console.error(`[Construct 3] Failed to create job worker; stopping creating any more (created ${this.g_ahN} so far)`,g)}}g_ahS(){return this.g_ahK.postMessage({type:"_testMessageChannel"}),self.setTimeout(()=>this.g_ah$(),2e3),new Promise(g=>this.g_ahR=g)}g_ah_(){this.g_ahR(),this.g_ahR=null}g_ah$(){this.g_ahR&&(console.warn("MessageChannel determined to be broken. Job scheduler disabled."),this.g_ahQ=!0,this.g_ahR(),this.g_ahR=null)}},self.C3_Shaders={},"use strict";{function _(g,_){const e=g[1],n=_[1];if("number"==typeof e&&"number"==typeof n)return e-n;else{const g=""+e,_=""+n;return g<_?-1:g>_?1:0}}let n=null,t="",o="",r=[],e="",u="",g="";const s=g_bz.g_eI(g_bz.g_Nw);g_bz.g_FM.g_FL=class extends g_bz.g_VV{constructor(g){super(g),this.g_Np=this.g_zu.g_CH().g_Oh(),this.g_aia=0,this.g_aib=0}g_eJ(){super.g_eJ()}g_CY(){this.g_zu.g_CY()}g_HI(g){this.g_zu.g_HI(g,null)}g_aic(g,_){return n&&g===t&&_===o||(n=new RegExp(g,_),t=g,o=_),n.lastIndex=0,n}g_aid(_,a,n){if(_===e&&a===u&&n===g)return r;const t=this.g_aic(a,n);return r=_.match(t),e=_,u=a,g=n,r}async g_aie(g,_){if(_.length){this.g_aia+=_.length;const e=[];for(const a of _)e.push(g.g_Fq(a));await g_bz.g_gi(e,()=>{this.g_aib++}),this.g_aib++,this.g_aib===this.g_aia&&(this.g_zu.g_HI(g_bz.g_FM.g_FL.g_FK.g_aif,null),this.g_aib=0,this.g_aia=0)}}g_aig(g,_){for(const e of _)0===e.g_CO()&&g.g_Fs(e)}g_aih(){return s}g_aii(_){const a=this.g_zu.g_CH(),n=a.g_Mp(),t=n.g_MI(),o=t.g_MH(),e=o.g_Nh(),r=t.g_Ne(),g=n.g_MM(o),d=a.g_Oh(),i=d.g_MM();if(i.g_Nu(_),r)for(let n=0;n<_&&!i.g_Nt();++n)a.g_O$(e),i.g_Ns(n),o.g_RT(t,g),a.g_Pa(e);else for(let e=0;e<_&&!i.g_Nt();++e)i.g_Ns(e),o.g_RT(t,g);return n.g_Mn(),d.g_Mn(),!1}*g_aij(_){const a=this.g_zu.g_CH(),n=a.g_Mp(),t=n.g_MI(),o=t.g_MH(),e=o.g_Nh(),r=t.g_Ne(),g=n.g_MM(o),d=a.g_Oh(),i=d.g_MM();if(i.g_Nu(_),r)for(let n=0;n<_&&!i.g_Nt();++n)a.g_O$(e),i.g_Ns(n),yield*o.g_RU(t,g),a.g_Pa(e);else for(let e=0;e<_&&!i.g_Nt();++e)i.g_Ns(e),yield*o.g_RU(t,g);return n.g_Mn(),d.g_Mn(),!1}g_aik(){const _=this.g_zu.g_CH(),a=_.g_Mp(),n=a.g_MI(),t=n.g_MH(),i=t.g_Nh(),e=n.g_Ne(),o=a.g_MM(t),g=_.g_Oh(),r=g.g_MM();if(e)for(let g=0;!r.g_Nt();++g)_.g_O$(i),r.g_Ns(g),t.g_RT(n,o)||r.g_Ib(),_.g_Pa(i);else for(let g=0;!r.g_Nt();++g)r.g_Ns(g),t.g_RT(n,o)||r.g_Ib();return a.g_Mn(),g.g_Mn(),!1}*g_ail(){const _=this.g_zu.g_CH(),a=_.g_Mp(),n=a.g_MI(),t=n.g_MH(),i=t.g_Nh(),e=n.g_Ne(),o=a.g_MM(t),g=_.g_Oh(),r=g.g_MM();if(e)for(let g=0;!r.g_Nt();++g){_.g_O$(i),r.g_Ns(g);const e=yield*t.g_RU(n,o);e||r.g_Ib(),_.g_Pa(i)}else for(let g=0;!r.g_Nt();++g){r.g_Ns(g);const _=yield*t.g_RU(n,o);_||r.g_Ib()}return a.g_Mn(),g.g_Mn(),!1}g_aim(_,n,t){const o=this.g_zu.g_CH(),a=o.g_Mp(),e=a.g_MI(),r=e.g_MH(),g=r.g_Nh(),d=e.g_Ne(),i=a.g_MM(r),u=o.g_Oh(),s=u.g_MM();if(s.g_Hr(_),s.g_Nu(t),t=t&&!s.g_Nt();--_)o.g_O$(g),s.g_Ns(_),r.g_RT(e,i),o.g_Pa(g);else for(let g=n;g>=t&&!s.g_Nt();--g)s.g_Ns(g),r.g_RT(e,i);}else if(d)for(let _=n;_<=t&&!s.g_Nt();++_)o.g_O$(g),s.g_Ns(_),r.g_RT(e,i),o.g_Pa(g);else for(let g=n;g<=t&&!s.g_Nt();++g)s.g_Ns(g),r.g_RT(e,i);return a.g_Mn(),u.g_Mn(),!1}*g_ain(_,n,t){const o=this.g_zu.g_CH(),a=o.g_Mp(),e=a.g_MI(),r=e.g_MH(),g=r.g_Nh(),d=e.g_Ne(),i=a.g_MM(r),u=o.g_Oh(),s=u.g_MM();if(s.g_Hr(_),s.g_Nu(t),t=t&&!s.g_Nt();--_)o.g_O$(g),s.g_Ns(_),yield*r.g_RU(e,i),o.g_Pa(g);else for(let g=n;g>=t&&!s.g_Nt();--g)s.g_Ns(g),yield*r.g_RU(e,i);}else if(d)for(let _=n;_<=t&&!s.g_Nt();++_)o.g_O$(g),s.g_Ns(_),yield*r.g_RU(e,i),o.g_Pa(g);else for(let g=n;g<=t&&!s.g_Nt();++g)s.g_Ns(g),yield*r.g_RU(e,i);return a.g_Mn(),u.g_Mn(),!1}g_aio(_){const a=this.g_zu.g_CH(),t=a.g_Mp(),i=t.g_MI(),o=i.g_MH(),e=o.g_Nh(),r=i.g_Ne(),d=t.g_MM(o),g=a.g_Oh(),u=g.g_MM(),f=_.g_CN(),l=_.g_Mj(),p=s.g_MM();if(g_bz.g_fV(p,l.g_FP()),u.g_Nu(p.length),r)for(let n=0,t=p.length;n=n+e?(a.set("Every_lastTime",n+e),t>=a.get("Every_lastTime")+.04&&a.set("Every_lastTime",t),a.set("Every_seconds",g),!0):(t=_&&g<=e},g_aiC(g,_,e){return g_bz.g_gg(g.g_Jl(),_,e)},g_aiD(g){return!!g.g_Jl()},g_aiE(g,_){const e=this.g_zu.g_Eh();if(0===g){const g=this.g_zu.g_Oc(),a=g.g_TL();return!a.get("CompareTime_executed")&&e>=_&&(a.set("CompareTime_executed",!0),!0)}return g_bz.g_gg(e,g,_)},g_aiF(g){return isNaN(g)},g_UT(g,_,e){return g_bz.g_eT(g_bz.g_eO(g),g_bz.g_eO(e))<=g_bz.g_eO(_)},g_UU(g,_){return g_bz.g_eV(g_bz.g_eO(g),g_bz.g_eO(_))},g_UV(_,n,a){let t=g_bz.g_eO(_),i=g_bz.g_eO(n),e=g_bz.g_eO(a),o=!g_bz.g_eV(e,i);return o?g_bz.g_eV(t,i)||!g_bz.g_eV(t,e):g_bz.g_eV(t,i)&&!g_bz.g_eV(t,e)},g_aiG(g,_){return"number"==typeof g?0===_:1===_},g_aiH(_,n,t,o){if(!_)return!1;const a=this.g_aih(),r=a.g_MM(),u=_.g_Mj();g_bz.g_fV(r,u.g_FP()),u.g_Mt()&&g_bz.g_fR(u.g_MC());const g=this.g_zu.g_Oc();let s=0;for(let d=0,e=r.length;d=n.length)return!1;const t=n[_];return a.g_MF(t),g.g_TN(),!0},g_aiK(g){if(!g)return!1;const _=g.g_Mj(),a=_.g_FP(),n=Math.floor(this.g_zu.g_agk()*a.length);if(n>=a.length)return!1;const t=a[n];return _.g_MF(t),g.g_TN(),!0},g_aiL(g){if(!g)return!1;if(!g.g_CO())return!1;const _=g.g_Mj();return _.g_MA(!0),g.g_TN(),!0},g_aiM(a,n,t){if(!a)return!1;const i=a.g_Mj(),e=i.g_FP(),o=this.g_zu.g_MH(),g=o.g_MG(),r=this.g_zu.g_Oc().g_TH();i.g_Mt()?(g_bz.g_fV(_,e),i.g_Ms(),i.g_MA(!1)):g?(g_bz.g_fV(_,i.g_MC()),g_bz.g_fR(i.g_MC())):(g_bz.g_fV(_,i.g_MB()),g_bz.g_fR(i.g_MB()));for(let e=0,o=_.length;e_&&(_=0),!!g){const e=g.g_Mj(),n=e.g_FP();for(const g of n)g.g_$t(_)}},g_ajf(g){if(g){const _=g.g_Mj(),e=_.g_FP();for(const g of e)g.g_$u()}},g_fM(g){if(!(0>g))return this.g_zu.g_CH().g_Pb().g_VN(g),!0},g_ajg(g){return this.g_zu.g_CH().g_Pb().g_VO(g),!0},g_ajh(g){const _=g.toLowerCase();for(const e of this.g_zu.g_CH().g_Pd())e.g_VQ()&&e.g_VR()===_&&e.g_VT()},g_adC(g,_){const e=this.g_zu.g_DO();e&&(e.g_adC(0===g?"image/png":"image/jpeg",_/100).then(()=>this.g_zu.g_FI(g_bz.g_FM.g_FL.g_FK.g_aiv,null)),this.g_CY())},g_aji(g,_){if(!(0>=g||0>=_)){this.g_zu.g_add(g,_);const e=this.g_zu.g_DO();e&&("off"===e.g_acZ()?e.g_uw(e.g_Xl(),e.g_Xn(),!0):(this.g_zu.g_agg(g,_),e.g_uw(e.g_Xl(),e.g_Xn(),!0)),this.g_zu.g_CY())}},g_ajj(g){const _=this.g_zu.g_DO();_&&"off"!==_.g_acZ()&&(_.g_adj(0===g?"low":"high"),_.g_uw(_.g_Xl(),_.g_Xn(),!0))},g_IO(g){this.g_zu.g_ahk(g)},g_ajk(g){this.g_zu.g_ahl(g)},g_ajl(g){this.g_zu.g_VA(g)},g_ajm(){},g_ajn(){for(const g of this.g_zu.g_OQ().g_GB())g.g_Gi()},g_ajo(g){this.g_zu.g_ahj(0!==g)},g_agV(g){this.g_zu.g_agV(g)},g_ajp(i,e){if(i){const o=i.g_Mj(),r=o.g_FP(),u=a,s=t,f=this.g_zu.g_Ru(),l=i.g_CJ(),p=i.g_Sy();for(let g=0,_=r.length;g<_;++g){const _=r[g],a=_.g_Bc();if(!a)continue;let n;n=l?_.g_KL(e+_.g_CE().g_Sx(p)):_.g_KL(e),u.push([a.g_Cr().g_CQ(),a.g_DB()]),s.push([_,n])}if(u.length){u.sort(g),s.sort(_);for(let g=0,_=u.length;g<_;++g){const _=s[g][0],a=f.g_Fg(u[g][0]),n=u[g][1],t=a.g_Do();t[n]!==_&&(t[n]=_,_.g_Bc().g_FQ(a),a.g_Cv(n))}g_bz.g_fR(a),g_bz.g_fR(t)}}},g_ajq(g){if(!this.g_zu.g_afT()){const _=this.g_zu.g_OQ();_.g_GI()||_.g_GH(g)}},g_ajr(g){if(!this.g_zu.g_afT()){const _=this.g_zu.g_OQ();if(!_.g_GI()){const e=_.g_Gy(g);e&&_.g_GH(e)}}},g_ajs(g){if(!this.g_zu.g_afT()){const _=this.g_zu.g_OQ();if(!_.g_GI()){const a=_.g_GB(),n=a.indexOf(_.g_Gg());if(!(g&&0===n)&&(g||n!==a.length-1)){const t=a[n+(g?-1:1)];_.g_GH(t)}}}},g_ajt(){if(!this.g_zu.g_afT()){const g=this.g_zu.g_OQ();g.g_GI()||(g.g_GH(g.g_Gg()),this.g_zu.g_CH().g_Oy())}},g_aju(g,_){g&&g.g_CX(_)},g_ajv(g,_){g&&g.g_xx(_/100)},g_ajw(g,_){g&&g.g_Ek(_)},g_ajx(g,_){g&&g.g_Db(_)},g_ajy(g,_){g&&(_=g_bz.g_eN(g_bz.g_eO(+_)),g.g_Dm()===_||(g.g_Dk(_),this.g_CY()))},g_ajz(g,_,e){g&&g.g_De(_/100,e/100)},g_ajA(g,_){if(g){n.g_hm(_),n.g_eM();const e=g.g_Dp();e.g_hg(n)||(e.g_g$(n),this.g_CY())}},g_ajB(g,_){g&&(_=!!_,g.g_Dq()===_||(g.g_Dr(_),this.g_CY()))},g_ajC(g,_){g&&g.g_CC()!==_&&(g.g_CB(_),this.g_CY())},g_ajD(g,_,e){if(g){const n=g.g_CS(),t=n.g_KJ(e);if(t){const g=1===_;t.g_Qc()===g||(t.g_aa$(g),n.g_Uu(),this.g_zu.g_CY())}}},g_ajE(_,e,t,g){if(_){const i=_.g_CS(),o=i.g_KJ(e);if(o){const _=o.g_CQ(),e=i.g_Ef(_);if(t=Math.floor(t),!(0>t||t>=e.length)){const _=o.g_qV().g_re(t);if("color"===_){n.g_hm(g);const _=e[t];if(n.g_hg(_))return;_.g_g$(n)}else{if("percent"===_&&(g/=100),e[t]===g)return;e[t]=g}o.g_Qc()&&this.g_zu.g_CY()}}}},g_ajF(g,_){g&&(_=!!_,g.g_Ds()===_||(g.g_Dt(_),this.g_CY()))},g_ajG(g){const _=this.g_zu.g_Ru();_.g_En()===g||(_.g_Fa(g),this.g_CY())},g_ajH(g){g=g_bz.g_eN(g_bz.g_eO(+g));const _=this.g_zu.g_Ru();_.g_Dl()===g||(_.g_Dk(g),this.g_CY())},g_ajI(g,_){const e=this.g_zu.g_Ru(),a=e.g_CS(),n=a.g_KJ(_);if(n){const _=1===g;n.g_Qc()===_||(n.g_aa$(_),a.g_Uu(),this.g_zu.g_CY())}},g_ajJ(_,e,t){const a=this.g_zu.g_Ru(),i=a.g_CS(),o=i.g_KJ(_);if(o){const g=o.g_CQ(),_=i.g_Ef(g);if(e=Math.floor(e),!(0>e||e>=_.length)){const g=o.g_qV().g_re(e);if("color"===g){n.g_hm(t);const g=_[e];if(n.g_hg(g))return;g.g_g$(n)}else{if("percent"===g&&(t/=100),_[e]===t)return;_[e]=t}o.g_Qc()&&this.g_zu.g_CY()}}},g_ajK(g){const _=this.g_zu.g_Ru();_.g_E_(g)},g_ajL(g){const _=this.g_zu.g_Ru();_.g_E$(g)},g_ajM(g,_){const e=this.g_zu.g_Ru();e.g_E_(g),e.g_E$(_)},g_ajN(g){if(g){const _=g.g_Us();if(_){const g=_.g_Bc();if(g){const _=this.g_zu.g_Ru();_.g_E_(g.g_FW()),_.g_E$(g.g_FX())}}}},g_ajO(g){const _=this.g_zu.g_Gg();if(_&&g&&!this.g_zu.g_afT()){const e=g.g_CJ()?g.g_Rb():[g];this.g_aie(_,e)}},g_ajP(g){g_bz.g_FM.g_FL.g_Uy.g_ajO.call(this,this.g_zu.g_age(g))},g_ajQ(g){const _=this.g_zu.g_Gg();if(_&&g){const e=g.g_CJ()?g.g_Rb():[g];this.g_aig(_,e)}},g_ajR(g){g_bz.g_FM.g_FL.g_Uy.g_ajR.call(this,this.g_zu.g_age(g))},g_ajS(){const g=this.g_zu.g_Gg();if(g){const _=g.g_Fn();this.g_aig(g,_)}},g_ajT(g){const _=this.g_zu.g_Gg();g&&_&&!this.g_zu.g_afT()&&this.g_aie(_,g.g_Fk())},g_ajU(g){const _=this.g_zu.g_Gg(),e=this.g_zu.g_OQ().g_Gy(g);e&&_&&!this.g_zu.g_afT()&&this.g_aie(_,e.g_Fk())}}}"use strict",g_bz.g_FM.g_FL.g_Si={g_ajV:function(g){return"string"==typeof g&&(g=parseInt(g,10),isNaN(g)&&(g=0)),Math.floor(g)},float:function(g){return"string"==typeof g&&(g=parseFloat(g),isNaN(g)&&(g=0)),g},g_E(g){return g.toString()},g_L(g){return"string"==typeof g?g.length:0},random(g,_){return"undefined"==typeof _?this.g_zu.g_agk()*g:this.g_zu.g_agk()*(_-g)+g},g_Sj(...g){const _=Math.floor(this.g_zu.g_agk()*g.length);return g[_]},g_ajW(){return Math.PI},g_ajX(){return 1/0},sqrt(g){return Math.sqrt(g)},abs(g){return Math.abs(g)},round(g){return Math.round(g)},floor(g){return Math.floor(g)},ceil(g){return Math.ceil(g)},sign(g){return Math.sign(g)},sin(g){return Math.sin(g_bz.g_eO(g))},cos(g){return Math.cos(g_bz.g_eO(g))},tan(g){return Math.tan(g_bz.g_eO(g))},asin(g){return g_bz.g_eP(Math.asin(g))},acos(g){return g_bz.g_eP(Math.acos(g))},atan(g){return g_bz.g_eP(Math.atan(g))},exp(g){return Math.exp(g)},g_ajY(g){return Math.log(g)},log10(g){return Math.log(g)/Math.LN10},max(...g){let _=g[0];"number"!=typeof _&&(_=0);for(let a=1,n=g.length,e;ae&&(_=e);return _},g_eM(g,_,e){return g_bz.g_eM(g,_,e)},g_R(g,_,e,a){return g_bz.g_eQ(g,_,e,a)},angle(g,_,e,a){return g_bz.g_eP(g_bz.g_eS(g,_,e,a))},g_X(g,_,e){return g_bz.g_X(g,_,e)},g_eX(g,_,e){return g_bz.g_eX(g,_,e)},g_eZ(g,_,e,a){return g_bz.g_eZ(g,_,e,a)},g_e_(g,_,e,a,n){return g_bz.g_e_(g,_,e,a,n)},g_e$(g,_,e){return g_bz.g_e$(g,_,e)},g_ajZ(g,_){return g_bz.g_eP(g_bz.g_eT(g_bz.g_eO(g),g_bz.g_eO(_)))},g_aj_(g,_,e){return g_bz.g_eP(g_bz.g_eW(g_bz.g_eO(g),g_bz.g_eO(_),e))},g_aj$(g,_,e){return g_bz.g_eP(g_bz.g_eU(g_bz.g_eO(g),g_bz.g_eO(_),g_bz.g_eO(e)))},g_aka(g,_,e){return g|=0,_|=0,e=0===e?0:1,g&~(1<<_)|e<<_},g_akb(g,_){return g|=0,_|=0,g^1<<_},g_akc(g,_){return g|=0,_|=0,g&1<<_?1:0},g_akd(){return"\n"},g_ake(g){return"string"==typeof g?g.toUpperCase():""},g_akf(g){return"string"==typeof g?g.toLowerCase():""},left(g,_){return"string"==typeof g?g.substr(0,_):""},g_akg(g,_,e){return"string"==typeof g?g.substr(_,e):""},right(g,_){return"string"==typeof g?g.substr(g.length-_):""},trim(g){return"string"==typeof g?g.trim():""},g_akh(g,_,e){if("string"!=typeof g||"string"!=typeof e)return"";let a=g.split(e);return _=Math.floor(_),0>_||_>=a.length?"":a[_]},g_aki(g,_){return"string"==typeof g&&"string"==typeof _&&g.length?g.split(_).length:0},find(g,_){return"string"==typeof g&&"string"==typeof _?g.search(new RegExp(g_bz.g_m_(_),"i")):-1},g_akj(g,_){return"string"==typeof g&&"string"==typeof _?g.search(new RegExp(g_bz.g_m_(_),"")):-1},replace(g,_,e){return"string"==typeof g&&"string"==typeof _&&"string"==typeof e?g.replace(new RegExp(g_bz.g_m_(_),"gi"),e):"string"==typeof g?g:""},g_akk(g,_,e){const a=this.g_aic(_,e);return g?g.search(a):-1},g_akl(g,_,a,n){const t=this.g_aic(_,a);return g?g.replace(t,n):""},g_akm(g,_,e){const a=this.g_aid(g.toString(),_,e);return a?a.length:0},g_akn(g,_,a,n){n=Math.floor(n);const t=this.g_aid(g.toString(),_,a);return!t||0>n||n>=t.length?"":t[n]},g_ako(g,_){let e=0>g?"-":"";0>g&&(g=-g);const n=_-g.toString().length;return e+="0".repeat(Math.max(n,0)),e+g.toString()},g_akp(g){return encodeURIComponent(g)},g_akq(g){return decodeURIComponent(g)},g_UK(){return this.g_zu.g_agT()},g_akr(){return this.g_zu.g_Ko()},g_aks(){return(Date.now()-this.g_zu.g_agZ())/1e3},g_akt(){return Date.now()},time(){return this.g_zu.g_Eh()},g_aku(){return this.g_zu.g_ag$()},g_akv(){return this.g_zu.g_ahc()},g_akw(){return this.g_zu.g_agX()},g_akx(){return this.g_zu.g_agY()},g_aky(){return this.g_zu.g_adB()},g_akz(){return this.g_zu.g_DO().g_adq()},g_akA(){return this.g_zu.g_DO().g_adr()},g_akB(){return this.g_zu.g_Cc()},g_akC(){return this.g_zu.g_Cd()},g_akD(){return this.g_zu.g_Cc()},g_akE(){return this.g_zu.g_Cd()},g_akF(){return this.g_zu.g_Ru().g_Ex()},g_akG(){return this.g_zu.g_Ru().g_Ey()},g_akH(){return this.g_zu.g_Ru().g_qT()},g_akI(){return this.g_zu.g_Ru().g_En()},g_akJ(){return g_bz.g_eP(this.g_zu.g_Ru().g_Dl())},g_akK(){return this.g_zu.g_Ru().g_oR()},g_akL(){return this.g_zu.g_Ru().g_oS()},g_akM(g){const _=this.g_zu.g_Ru().g_Cr(g);return _?_.g_CZ().g_ic():0},g_akN(g){const _=this.g_zu.g_Ru().g_Cr(g);return _?_.g_CZ().g_id():0},g_akO(g){const _=this.g_zu.g_Ru().g_Cr(g);return _?_.g_CZ().g_ie():0},g_akP(g){const _=this.g_zu.g_Ru().g_Cr(g);return _?_.g_CZ().g_if():0},g_akQ(g){const _=this.g_zu.g_Ru().g_Cr(g);return _?_.g_CZ().width():0},g_akR(g){const _=this.g_zu.g_Ru().g_Cr(g);return _?_.g_CZ().height():0},g_akS(g,_,e){const a=this.g_zu.g_Ru().g_Cr(g);return a?a.g_Ep(_,e)[0]:0},g_akT(g,_,e){const a=this.g_zu.g_Ru().g_Cr(g);return a?a.g_Ep(_,e)[1]:0},g_akU(g,_,e){const a=this.g_zu.g_Ru().g_Cr(g);return a?a.g_EA(_,e)[0]:0},g_akV(g,_,e){const a=this.g_zu.g_Ru().g_Cr(g);return a?a.g_EA(_,e)[1]:0},g_akW(g){const _=this.g_zu.g_Ru().g_Cr(g);return _?_.g_Eg():0},g_akX(g){const _=this.g_zu.g_Ru().g_Cr(g);return _?g_bz.g_eP(_.g_Dm()):0},g_akY(g){const _=this.g_zu.g_Ru().g_Cr(g);return _?100*_.g_xv():0},g_akZ(g){const _=this.g_zu.g_Ru().g_Cr(g);return _?_.g_Da():0},g_ak_(g){const _=this.g_zu.g_Ru().g_Cr(g);return _?100*_.g_Dc():0},g_ak$(g){const _=this.g_zu.g_Ru().g_Cr(g);return _?100*_.g_Dd():0},g_ala(g){const _=this.g_zu.g_Ru().g_Cr(g);return _?_.g_CQ():-1},g_alb(){const g=this.g_zu.g_DO();return g?g.g_adE():""},g_alc(g){const _=this.g_Np;if(!_.g_Nl())return 0;if(g){const e=_.g_Nn(g);return e?e.g_CQ():0}return _.g_Nj().g_CQ()},g_ald(){return this.g_zu.g_ahm()},g_ale(){return this.g_zu.g_adG().g_Ax()},g_alf(){return 0===this.g_aia?1:this.g_aib/this.g_aia},g_rW(){return"webgl"},g_alg(){return this.g_zu.g_po().g_zk()},g_alh(){let g=this.g_zu.g_po().g_zc();return Math.round(100*g/1048576)/100},g_ali(g,_,e){return g_bz.g_ff(g,_,e)},g_alj(g,_,e){return g_bz.g_fh(g/100,_/100,e/100)},g_alk(g,_,a,e){return g_bz.g_fg(g/100,_/100,a/100,e/100)},g_all(g,_,e){return g_bz.g_fh(g/255,_/255,e/255)},g_alm(g,_,a,e){return g_bz.g_fg(g/255,_/255,a/255,e/255)},g_aln(){return this.g_zu.g_ahd()},g_alo(){return this.g_zu.g_ahe()}},"use strict",g_bz.g_FM.g_alp=class extends g_bz.g_VV{constructor(g){super(g)}g_eJ(){super.g_eJ()}},"use strict",g_bz.g_FM.g_alp.g__b=class extends g_bz.g_Ww{constructor(g){super(g)}g_eJ(){super.g_eJ()}g_Wj(){this.g_Wy().g_YD(this.g_zu)}g_Fp(g){return this.g_Wy().g_A$(g,{g_og:this.g_zu.g_pq(),g_oe:!0})}g_Ft(){this.g_Wy().g_t_()}},"use strict";{const g=g_bz.g_eI(g_bz.g_iC),_=g_bz.g_eI(g_bz.Rect),a=g_bz.g_eI(g_bz.g_iC);g_bz.g_FM.g_alp.g_GM=class extends g_bz.g_Xa{constructor(g,_){super(g),this.g_alq=0,this.g_alr=0,this.g_als=1,this.g_alt=1,this.g_alu=0,this.g_alv=null,_&&(this.g_Bc().g_CX(!!_[0]),this.g_alq=_[2],this.g_alr=_[3],this.g_als=_[4],this.g_alt=_[5],this.g_alu=g_bz.g_eO(_[6]))}g_eJ(){this.g_alw(),super.g_eJ()}g_alw(){this.g_alv&&(this.g_alv.g_eJ(),this.g_alv=null)}g_DN(n){var t=Math.round;const e=this.g_Ee(),o=e.g_pp();if(!o)return;const r=this.g_Bc();let d=r.g_aax();n.g_xA(o);const u=e.g_oR(),s=e.g_oS(),c=this.g_alq/u,l=this.g_alr/s;if(_.set(0,0,r.g_oR()/(u*this.g_als),r.g_oS()/(s*this.g_alt)),_.offset(-c,-l),this.g_zu.g_Eq()){const _=t(r.g_FW())-r.g_FW(),e=t(r.g_FX())-r.g_FX();g.g_r(d),g.offset(_,e),d=g}0===this.g_alu?n.g_xJ(d,_):(a.g_iW(_,-this.g_alu),n.g_xK(d,a))}g_Ee(){return this.g_alv||this.g_Mg.g_Wy()}}}"use strict",g_bz.g_FM.g_alp.g_FK={g_alx(){return!0}},"use strict",g_bz.g_FM.g_alp.g_Uy={g_aly(g){this.g_alq===g||(this.g_alq=g,this.g_zu.g_CY())},g_alz(g){this.g_alr===g||(this.g_alr=g,this.g_zu.g_CY())},g_alA(g){g/=100,this.g_als===g||(this.g_als=g,this.g_zu.g_CY())},g_alB(g){g/=100,this.g_alt===g||(this.g_alt=g,this.g_zu.g_CY())},g_alC(g){g=g_bz.g_eO(g),this.g_alu===g||(this.g_alu=g,this.g_zu.g_CY())},g_alD(g){this.g_Bc().g_CB(g),this.g_zu.g_CY()},g_alE(g){this.g_alv&&this.g_alv.g_Aq()===g||(async()=>{const _=this.g_zu,e=g_bz.g_eI(g_bz.g_Yu);if(await e.g_YC(_,g),this.g_eK())return e.g_eJ(),null;const a=await e.g_A$(_.g_po(),{g_og:_.g_pq(),g_oe:!0});return a?this.g_eK()?void e.g_eJ():void(this.g_alw(),this.g_alv=e,_.g_CY(),await this.g_FI(g_bz.g_FM.g_alp.g_FK.g_alx)):void 0})()}},"use strict",g_bz.g_FM.g_alp.g_Si={g_alF(){return this.g_Ee().g_oR()},g_alG(){return this.g_Ee().g_oS()},g_alH(){return this.g_alq},g_alI(){return this.g_alr},g_alJ(){return 100*this.g_als},g_alK(){return 100*this.g_alt},g_alL(){return g_bz.g_eP(this.g_alu)}},"use strict",g_bz.g_FM.g_alM=class extends g_bz.g_VV{constructor(g){super(g)}g_eJ(){super.g_eJ()}},"use strict",g_bz.g_FM.g_alM.g__b=class extends g_bz.g_Ww{constructor(g){super(g),this.g_ZX=g.g__D()}g_eJ(){g_bz.g_fR(this.g_ZX),super.g_eJ()}g_Wj(){for(const g of this.g_ZX)g.g_YS(this.g_zu)}g_Fp(g){const _={g_og:this.g_zu.g_pq()};return Promise.all(this.g_ZX.map(e=>e.g_YT(g,_)))}g_Ft(){for(const g of this.g_ZX)g.g_YU()}g_Fr(){this.g_alN()}g_alN(){for(const g of this.g_Mg.g_FP())g.g_KG().g_alO()}g_TR(g){g_bz.g_FM.g_alM.g_alP(this,g)}},"use strict";{const _=g_bz.g_eI(g_bz.g_iC),g=g_bz.g_eI(g_bz.g_hJ);g_bz.g_FM.g_alM.g_GM=class extends g_bz.g_Xa{constructor(_,a){super(_);let n=!0,t="",i=0,o=!0;a&&(n=!!a[0],t=a[1],i=a[2],o=a[3]),this.g_alQ=this.g_Mg.g__F(t)||this.g_Mg.g__D()[0],this.g_alR=g_bz.g_eM(i,0,this.g_alQ.g_YV()-1),this.g_alS=this.g_alQ.g_YX(this.g_alR);const r=this.g_alS.g_Wy();this.g_alT=r.g_pp(),this.g_alU=r.g_uO(),this.g_Xd(),this.g_alV=0<=this.g_alQ.g_YY(),this.g_alW=Math.abs(this.g_alQ.g_YY()),this.g_alX=this.g_alQ.g_Y_(),this.g_alY=g_bz.g_eI(g_bz.g_lz),this.g_alZ=0,this.g_al_=!0,this.g_al$=0,this.g_ama="",this.g_amb=!1,this.g_amc=-1,this.g_amd="",this.g_ame=0;const g=this.g_Bc();this.g_amf=g.g_aax(),g.g_CX(n),g.g_aaq(o),g.g_aaj(this.g_alS.g_Ln()),g.g_aak(this.g_alS.g_Lp()),g.g_aaB(this.g_alS.g_Zi()),(1!==this.g_Mg.g__E()||1!==this.g_Mg.g__D()[0].g_YV())&&0!==this.g_alW&&this.g_WT()}g_eJ(){this.g_alQ=null,this.g_alS=null,this.g_alT=null,this.g_alY=null,super.g_eJ()}g_Ee(){return this.g_alS.g_Wy()}g_A_(){this.g_alT=null}g_Xe(){this.g_alO()}g_DN(a){var n=Math.round;const g=this.g_alT;if(null!==g){const t=this.g_amf,e=this.g_alU;if(a.g_xA(g),this.g_zu.g_Eq()){const i=this.g_Bc(),o=n(i.g_FW())-i.g_FW(),g=n(i.g_FX())-i.g_FX();_.g_r(t),_.offset(o,g),a.g_xJ(_,e)}else a.g_xJ(t,e)}}g_amg(_){const g=this.g_Bc(),a=g.g_aaE();_.g_yw(),_.g_xw(1,0,0,1);const n=a.g_jj(),t=g.g_FW(),e=g.g_FX();for(let a=0,o=n.length;a=r&&(i?(this.g_alV=!1,this.g_alR=r-2):d?this.g_alR=o:(this.g_al$++,this.g_al$>=g?this.g_amk(!1):this.g_alR=o)),0>this.g_alR&&(i?(this.g_alR=1,this.g_alV=!0,!d&&(this.g_al$++,this.g_al$>=g&&this.g_amk(!0))):d?this.g_alR=o:(this.g_al$++,this.g_al$>=g?this.g_amk(!0):this.g_alR=o)),this.g_alR=g_bz.g_eM(this.g_alR,0,r-1);const u=e.g_YX(this.g_alR);a>this.g_alZ+u.g_Zh()/_&&(this.g_alZ=a),this.g_aml(n,u)}}g_amk(g){this.g_alR=g?0:this.g_alQ.g_YV()-1,this.g_al_=!1,this.g_ama=this.g_alQ.g_qT(),this.g_amb=!0,this.g_HI(g_bz.g_FM.g_alM.g_FK.g_amm),this.g_HI(g_bz.g_FM.g_alM.g_FK.g_amn),this.g_amb=!1,this.g_al$=0}g_aml(_,a){const n=this.g_Bc(),t=_.g_Wy(),o=a.g_Wy(),e=t.g_oR(),r=t.g_oS(),g=o.g_oR(),d=o.g_oS();e!==g&&n.g_Fb(n.g_oR()*(g/e)),r!==d&&n.g_Fc(n.g_oS()*(d/r)),n.g_aaj(a.g_Ln()),n.g_aak(a.g_Lp()),n.g_aaB(a.g_Zi()),n.g_Ct(),this.g_alS=a,this.g_alT=o.g_pp(),this.g_alU=o.g_uO();const i=this.g_IC().g_KF();for(let g=0,e=i.length;gthis.g_W_(g.g_amq,_,0)},{name:"plugins.sprite.debugger.animation-properties.current-frame",value:this.g_alR,g_amp:_=>this.g_W_(g.g_amr,_)},{name:"plugins.sprite.debugger.animation-properties.is-playing",value:this.g_al_,g_amp:_=>_?this.g_W_(g.g_ams,0):this.g_W_(g.g_amt)},{name:"plugins.sprite.debugger.animation-properties.speed",value:this.g_alW,g_amp:_=>this.g_W_(g.g_amu,_)},{name:"plugins.sprite.debugger.animation-properties.repeats",value:this.g_al$,g_amp:g=>this.g_al$=g}]}]}g_EE(){const g={a:this.g_alQ.g_CR()};0!==this.g_alZ&&(g.fs=this.g_alZ);const _=this.g_amh();0!==_&&(g.at=_),0!==this.g_alR&&(g.f=this.g_alR),0!==this.g_alW&&(g.cas=this.g_alW),1!==this.g_al$&&(g.ar=this.g_al$),0!==this.g_alX&&(g.rt=this.g_alX),this.g_al_||(g.ap=this.g_al_),this.g_alV||(g.af=this.g_alV);const e=this.g_Bc();return e.g_aap()&&(g.ce=e.g_aap()),g}g_EG(_){const a=this.g_CE().g__G(_.a);a&&(this.g_alQ=a),this.g_alZ=_.hasOwnProperty("fs")?_.fs:0,this.g_alY.Set(_.hasOwnProperty("at")?_.at:0);const n=_.hasOwnProperty("f")?_.f:0;this.g_alR=g_bz.g_eM(n,0,this.g_alQ.g_YV()-1),this.g_alW=_.hasOwnProperty("cas")?_.cas:0,this.g_al$=_.hasOwnProperty("ar")?_.ar:1;const t=_.hasOwnProperty("rt")?_.rt:0;this.g_alX=g_bz.g_eM(t,0,this.g_alQ.g_YV()-1),this.g_al_=!_.hasOwnProperty("ap")||!!_.ap,this.g_alV=!_.hasOwnProperty("af")||!!_.af;const i=this.g_alQ.g_YX(this.g_alR),e=i.g_Wy();this.g_alS=i,this.g_alT=e.g_pp(),this.g_alU=e.g_uO();const o=this.g_Bc();o.g_aaj(i.g_Ln()),o.g_aak(i.g_Lp()),o.g_aaB(i.g_Zi()),o.g_aaq(!!_.ce)}g_KC(g){const _=this.g_Bc();return 3===g?_.g_aap():void 0}g_KD(g,_){const e=this.g_Bc();3===g?e.g_aaq(!!_):void 0}}}{function _(g,_,n,a){const t=_.g_Co(),e=n.g_Co();tn(s,g.g_L$)));const N=p.g_Mj(),u=M.g_Mj(),y=N.g_FP();let I=null;for(let e=0;en(s,g.g_L$)));const N=p.g_Mj(),u=M.g_Mj(),y=N.g_FP();let I=null;for(let e=0;ethis.g_Bc().g_oR()},g_amD(){return 0>this.g_Bc().g_oS()},g_alx(){return!0},g_aap(){return this.g_Bc().g_aap()}}}"use strict",g_bz.g_FM.g_alM.g_Uy={g_amE(_,a,n){if(!_||!a)return;const[t,o]=this.g_Un(n),e=this.g_zu.g_agj(_,a,t,o);if(!e)return;if(_.g_Gf().g_Wk()){const g=e.g_Bc();g.g_Dk(this.g_Bc().g_Dl()),g.g_Ct()}const r=this.g_zu.g_CH();if(r.g_CL(!0),e.g_CM(),e.g_CN())for(const g of e.siblings())g.g_CM();r.g_CL(!1);const g=this.g_zu.g_Oe(),d=g.g_TL();let i=!1;if((!d.has("Spawn_LastExec")||d.get("Spawn_LastExec")t.g_oR()?-1:1,e=0>t.g_oS()?-1:1,o=n.g_oR()*_*i,g=n.g_oS()*_*e;(t.g_oR()!==o||t.g_oS()!==g)&&(t.g_uw(o,g),t.g_Ct())},g_alE(g,_){const a=this.g_alS,n=a.g_Wy(),t=this.g_Bc(),e=this.g_zu;return n.g_Aq()===g?(0===_&&(t.g_uw(n.g_oR(),n.g_oS()),t.g_Ct()),void this.g_HI(g_bz.g_FM.g_alM.g_FK.g_alx)):void(async()=>{const a=g_bz.g_eI(g_bz.g_Yu);await a.g_YC(e,g),await a.g_A$(e.g_po(),{g_og:e.g_pq()}),n.g_YE(a),this.g_WB.g_alN(),this.g_eK()||0!==_||(t.g_uw(n.g_oR(),n.g_oS()),t.g_Ct()),e.g_CY(),this.g_eK()||(await this.g_FI(g_bz.g_FM.g_alM.g_FK.g_alx))})()},g_amI(g){this.g_Bc().g_aaq(g)},g_aas(g,_){this.g_Bc().g_aas(0===g,_)},g_alD(g){this.g_Bc().g_CB(g),this.g_zu.g_CY()}},"use strict",g_bz.g_FM.g_alM.g_Si={g_amJ(){return this.g_alR},g_amK(){return this.g_alQ.g_YV()},g_amL(){return this.g_alQ.g_qT()},g_amM(){return this.g_alV?this.g_alW:-this.g_alW},g_amN(g){return this.g_Un(g)[0]},g_amO(g){return this.g_Un(g)[1]},g_amP(){return this.g_alS.g_Zl()},g_alF(){return this.g_Ee().g_oR()},g_alG(){return this.g_Ee().g_oS()}},"use strict",g_bz.g_FM.g_amQ=class extends g_bz.g_VV{constructor(g){super(g)}g_eJ(){super.g_eJ()}},"use strict",g_bz.g_FM.g_amQ.g__b=class extends g_bz.g_Ww{constructor(g){super(g)}g_eJ(){super.g_eJ()}g_Wj(){}},"use strict",g_bz.g_FM.g_amQ.g_GM=class extends g_bz.g_WA{constructor(g){super(g),this.g_amR=Array(256),this.g_amS=Array(256),this.g_amT=0;const _=this.g_zW().g_kS();this.g_lw=new g_bz.g_lt(g_bz.g_ln.g_ls(_,"keydown",g=>this.g_amU(g.data)),g_bz.g_ln.g_ls(_,"keyup",g=>this.g_amV(g.data)),g_bz.g_ln.g_ls(_,"window-blur",()=>this.g_afH()))}g_eJ(){super.g_eJ()}async g_amU(g){const _=g.which;this.g_amR[_]||(this.g_amR[_]=!0,this.g_amS[_]=g.key,this.g_amT=_,await this.g_FI(g_bz.g_FM.g_amQ.g_FK.g_amW),await this.g_FI(g_bz.g_FM.g_amQ.g_FK.g_amX),await this.g_FI(g_bz.g_FM.g_amQ.g_FK.g_amY))}async g_amV(g){const _=g.which;this.g_amR[_]=!1,this.g_amS[_]=g.key,this.g_amT=_,await this.g_FI(g_bz.g_FM.g_amQ.g_FK.g_amZ),await this.g_FI(g_bz.g_FM.g_amQ.g_FK.g_am_),await this.g_FI(g_bz.g_FM.g_amQ.g_FK.g_am$)}async g_afH(){for(let g=0,_=this.g_amR.length;g<_;++g)this.g_amR[g]&&(this.g_amR[g]=!1,this.g_amT=g,await this.g_FI(g_bz.g_FM.g_amQ.g_FK.g_amZ),await this.g_FI(g_bz.g_FM.g_amQ.g_FK.g_am_),await this.g_FI(g_bz.g_FM.g_amQ.g_FK.g_am$))}g_EE(){return{tk:this.g_amT}}g_EG(g){this.g_amT=g.tk}g_WX(){return[{title:"plugins.keyboard.name",properties:[{name:"plugins.keyboard.debugger.last-key-code",value:this.g_amT},{name:"plugins.keyboard.debugger.last-key-string",value:g_bz.g_FM.g_amQ.g_Si.g_ana(this.g_amT)},{name:"plugins.keyboard.debugger.last-typed-key",value:this.g_amS[this.g_amT]||""}]}]}},"use strict",g_bz.g_FM.g_amQ.g_FK={g_anb(g){return!!this.g_amR[g]},g_amX(g){return this.g_amT===g},g_amW(){return!0},g_amZ(){return!0},g_am_(g){return this.g_amT===g},g_anc(g){return g=Math.floor(g),!(0>g||g>=this.g_amR.length)&&!!this.g_amR[g]},g_amY(g){return this.g_amT===g},g_am$(g){return this.g_amT===g}},"use strict",g_bz.g_FM.g_amQ.g_Uy={},"use strict";{function g(g){return g=Math.floor(g),8===g?"backspace":9===g?"tab":13===g?"enter":16===g?"shift":17===g?"control":18===g?"alt":19===g?"pause":20===g?"capslock":27===g?"esc":33===g?"pageup":34===g?"pagedown":35===g?"end":36===g?"home":37===g?"\u2190":38===g?"\u2191":39===g?"\u2192":40===g?"\u2193":45===g?"insert":46===g?"del":91===g?"left window key":92===g?"right window key":93===g?"select":96===g?"numpad 0":97===g?"numpad 1":98===g?"numpad 2":99===g?"numpad 3":100===g?"numpad 4":101===g?"numpad 5":102===g?"numpad 6":103===g?"numpad 7":104===g?"numpad 8":105===g?"numpad 9":106===g?"numpad *":107===g?"numpad +":109===g?"numpad -":110===g?"numpad .":111===g?"numpad /":112===g?"F1":113===g?"F2":114===g?"F3":115===g?"F4":116===g?"F5":117===g?"F6":118===g?"F7":119===g?"F8":120===g?"F9":121===g?"F10":122===g?"F11":123===g?"F12":144===g?"numlock":145===g?"scroll lock":186===g?";":187===g?"=":188===g?",":189===g?"-":190===g?".":191===g?"/":192===g?"'":219===g?"[":220===g?"\\":221===g?"]":222===g?"#":223===g?"`":String.fromCharCode(g)}g_bz.g_FM.g_amQ.g_Si={g_and(){return this.g_amT},g_ana(_){return g(_)},g_ane(){return this.g_amS[this.g_amT]||""}}}"use strict",g_bz.g_FM.Text=class extends g_bz.g_VV{constructor(g){super(g)}g_eJ(){super.g_eJ()}},"use strict",g_bz.g_FM.Text.g__b=class extends g_bz.g_Ww{constructor(g){super(g)}g_eJ(){super.g_eJ()}g_Wj(){}g_Fp(){}g_Ft(){}},"use strict";{const g=[0,0,0],_=["left","center","right"],n=["top","center","bottom"],t=new g_bz.Rect,r=new g_bz.g_iC;g_bz.g_FM.Text.g_GM=class extends g_bz.g_Xa{constructor(g,_){if(super(g),this.g_tv="",this.g_anf=!0,this.g_ang="Arial",this.g_anh=12,this.g_ani=0,this.g_tn=!1,this.g_to=!1,this.g_vv=g_bz.g_eI(g_bz.g_gP),this.g_tt=0,this.g_tu=0,this.g_anj=!0,this.g_ank=-1,this.g_anl=-1,this.g_anm=0,this.g_ann=g_bz.g_eI(g_bz.g_ob.g_tj,this.g_zu.g_po(),{timeout:5}),this.g_ann.g_ua=()=>this.g_zu.g_CY(),this.g_ann.g_ud(!1),_){this.g_tv=_[0],this.g_anf=!!_[1],this.g_ang=_[2],this.g_anh=_[3],this.g_ani=_[4],this.g_tn=!!_[5],this.g_to=!!_[6],this.g_tt=_[8],this.g_tu=_[9],this.g_anj=0===_[10];const g=_[7];this.g_vv.g_gV(g[0],g[1],g[2]),this.g_Bc().g_CX(_[11])}this.g_ano()}g_eJ(){this.g_anp(),this.g_ann.g_eJ(),this.g_ann=null,super.g_eJ()}g_ano(){const g=this.g_ann;g.g_uv(this.g_tv),g.g_uf(this.g_anf),g.g_ug(this.g_ang),g.g_uh(this.g_anh),g.g_ui(this.g_ani),g.g_uj(this.g_tn),g.g_uk(this.g_to),g.g_uq(this.g_vv),g.g_us(_[this.g_tt]),g.g_ut(n[this.g_tu]),g.g_uu(this.g_anj?"word":"character")}g_anq(){const g=this.g_Bc(),_=g.g_Cr().g_DM();this.g_ann.g_uw(g.g_oR(),g.g_oS(),_)}g_DN(_){var e=Math.round;const a=this.g_Bc();this.g_anq();const u=this.g_ann.g_pp();if(!u)return;const d=a.g_Cr();let g=a.g_aax();if(0===a.g_Dl()&&0===a.g_Cr().g_Dl()){const[a,s]=d.g_EC(g.g_fr(),g.g_fs()),[i,c]=d.g_EC(g.g_fv(),g.g_fw()),f=a-e(a),l=s-e(s);t.set(a,s,i,c),t.offset(-f,-l),r.g_iV(t);const[p,n]=_.g_xM(_.g_yU());this.g_zu.g_DO().g_GL(_,p,n),_.g_xA(u),_.g_xJ(r,this.g_ann.g_uO()),d.g_DL(_)}else{let a=0,n=0;this.g_zu.g_Eq()&&(a=g.g_fr()-e(g.g_fr()),n=g.g_fs()-e(g.g_fs())),(0!=a||0!=n)&&(r.g_r(g),r.offset(-a,-n),g=r),_.g_xA(u),_.g_xJ(g,this.g_ann.g_uO())}}g_EE(){const g={t:this.g_tv,c:this.g_vv.toJSON(),fn:this.g_ang,ps:this.g_anh};return this.g_anf&&(g.bbc=this.g_anf),0!==this.g_tt&&(g.ha=this.g_tt),0!==this.g_tu&&(g.va=this.g_tu),this.g_anj||(g.wr=this.g_anj),0!==this.g_ani&&(g.lho=this.g_ani),this.g_tn&&(g.b=this.g_tn),this.g_to&&(g.i=this.g_to),-1!==this.g_anl&&(g.tw={st:this.g_ank,en:this.g_anl,l:this.g_anm}),g}g_EG(g){if(this.g_anp(),this.g_tv=g.t,this.g_vv.g_hB(g.c),this.g_ang=g.fn,this.g_anh=g.ps,this.g_anf=!!g.hasOwnProperty("bbc")&&g.bbc,this.g_tt=g.hasOwnProperty("ha")?g.ha:0,this.g_tu=g.hasOwnProperty("va")?g.va:0,this.g_anj=!g.hasOwnProperty("wr")||g.wr,this.g_ani=g.hasOwnProperty("lho")?g.lho:0,this.g_tn=!!g.hasOwnProperty("b")&&g.b,this.g_to=!!g.hasOwnProperty("i")&&g.i,g.hasOwnProperty("tw")){const _=g.tw;this.g_ank=_.st,this.g_anl=_.en,this.g_anm=_.l}this.g_ano(),-1!==this.g_anl&&this.g_WT()}g_KC(_){return 0===_?this.g_tv:1===_?this.g_anf:2===_?this.g_ang:3===_?this.g_anh:4===_?this.g_ani:5===_?this.g_tn:6===_?this.g_to:7===_?(g[0]=this.g_vv.g_ha(),g[1]=this.g_vv.g_hb(),g[2]=this.g_vv.g_hc(),g):8===_?this.g_tt:9===_?this.g_tu:10===_?this.g_anj?1:0:void 0}g_KD(g,_){switch(g){case 0:if(this.g_tv===_)return;this.g_tv=_,this.g_ano();break;case 1:if(this.g_anf===!!_)return;this.g_anf=!!_,this.g_ano();break;case 2:if(this.g_ang===_)return;this.g_ang=_,this.g_ano();break;case 3:if(this.g_anh===_)return;this.g_anh=_,this.g_ano();break;case 4:if(this.g_ani===_)return;this.g_ani=_,this.g_ano();break;case 5:if(this.g_tn===!!_)return;this.g_tn=!!_,this.g_ano();break;case 6:if(this.g_to===!!_)return;this.g_to=!!_,this.g_ano();break;case 7:const e=this.g_vv,a=_;if(e.g_ha()===a[0]&&e.g_hb()===a[1]&&e.g_hc()===a[2])return;this.g_vv.g_gV(a[0],a[1],a[2]),this.g_ano();break;case 8:if(this.g_tt===_)return;this.g_tt=_,this.g_ano();break;case 9:if(this.g_tu===_)return;this.g_tu=_,this.g_ano();break;case 10:if(this.g_anj===(0===_))return;this.g_anj=0===_,this.g_ano();}}g_anr(g){this.g_tv===g||(this.g_tv=g,this.g_ann.g_uv(g),this.g_zu.g_CY())}g_ans(g,_){this.g_anr(g),this.g_ank=this.g_zu.g_Eh(),this.g_anl=this.g_ank+_,this.g_anm=g_bz.g_en.g_nR(g).length,this.g_ann.g_ul(0),this.g_WT()}g_anp(){this.g_ank=-1,this.g_anl=-1,this.g_anm=0,this.g_ann.g_ul(-1),this.g_WH()}g_Im(){const g=this.g_zu.g_Eh();if(g>=this.g_anl)this.g_anp(),this.g_HI(g_bz.g_FM.Text.g_FK.g_ant),this.g_zu.g_CY();else{let _=g_bz.g_eY(this.g_ank,this.g_anl,g,0,this.g_anm);_=Math.floor(_),_!==this.g_ann.g_um()&&(this.g_ann.g_ul(_),this.g_zu.g_CY())}}g_WX(){return[{title:"plugins.text.name",properties:[{name:"plugins.text.properties.text.name",value:this.g_tv,g_amp:g=>this.g_anr(g)}]}]}}}"use strict",g_bz.g_FM.Text.g_FK={g_anu(g,_){return _?this.g_tv===g:g_bz.g_d$(this.g_tv,g)},g_anv(){return-1!==this.g_anl},g_ant(){return!0}},"use strict";{const g=g_bz.g_eI(g_bz.g_gP);g_bz.g_FM.Text.g_Uy={g_uv(g){this.g_anp(),"number"==typeof g&&1e9>g&&(g=Math.round(1e10*g)/1e10),this.g_anr(g.toString())},g_anw(g){this.g_anp(),"number"==typeof g&&1e9>g&&(g=Math.round(1e10*g)/1e10),g=g.toString(),g&&this.g_anr(this.g_tv+g)},g_anx(g,_){this.g_anp(),"number"==typeof g&&1e9>g&&(g=Math.round(1e10*g)/1e10),this.g_ans(g.toString(),_)},g_any(g,_){let a=!1,n=!1;if(1===_?a=!0:2===_?n=!0:3===_?(a=!0,n=!0):void 0,g===this.g_ang&&a===this.g_tn&&n===this.g_to)return!1;this.g_ang=g,this.g_tn=a,this.g_to=n;const t=this.g_ann;t.g_ug(this.g_ang),t.g_uj(this.g_tn),t.g_uk(this.g_to),this.g_zu.g_CY()},g_uh(g){this.g_anh===g||(this.g_anh=g,this.g_ann.g_uh(this.g_anh),this.g_zu.g_CY())},g_anz(_){g.g_hm(_),g.g_eM(),this.g_vv.g_hg(g)||(this.g_vv.g_g$(g),this.g_ann.g_uq(this.g_vv),this.g_zu.g_CY())},g_anA(){console.warn("[Text] 'Set web font' action is deprecated and no longer has any effect")},g_alD(g){this.g_Bc().g_CB(g),this.g_zu.g_CY()},g_anB(){-1===this.g_anl||(this.g_anp(),this.g_HI(g_bz.g_FM.Text.g_FK.g_ant),this.g_zu.g_CY())}}}"use strict",g_bz.g_FM.Text.g_Si={Text(){return this.g_tv},g_anC(){return g_bz.g_en.g_nR(this.g_tv)},g_anD(){return this.g_ang},g_anE(){return this.g_anh},g_anF(){return this.g_anq(),this.g_ann.g_ux()},g_anG(){return this.g_anq(),this.g_ann.g_uz()}},"use strict",g_bz.g_Yc.g_ct=class extends g_bz.g_XE{constructor(g){super(g)}g_eJ(){super.g_eJ()}},"use strict",g_bz.g_Yc.g_ct.g__b=class extends g_bz.g_XJ{constructor(g){super(g)}g_eJ(){super.g_eJ()}g_Wj(){}},"use strict";{function _(g,_,a,n,t){return g_bz.g_eM(g*t+.5*n*t*t,_*t,a*t)}const g=0;g_bz.g_Yc.g_ct.g_GM=class extends g_bz.g_XN{constructor(_,e){super(_),this.g_anH=null,this.g_anI=!1,this.g_anJ=!1,this.g_anK=!1,this.g_anL=!1,this.g_anM=!1,this.g_anN=!1,this.g_anO=!1,this.g_anP=!1,this.g_anQ=!1,this.g_anR=!1,this.g_anS=null,this.g_anT=-1,this.g_anU=0,this.g_anV=0,this.g_anW=!1,this.g_anX=!1,this.g_anY=!!this.g_zu.g_ahh().g_abI(this.g_Um),this.g_anZ=-1,this.g_an_="stopped",this.g_an$=0,this.g_aoa=!0,this.g_aob=0,this.g_aoc=0,this.g_aod=0,this.g_aoe=0,this.g_aof=0,this.g_aog=0,this.g_gR=0,this.g_aoh=0,this.g_aoi=g_bz.g_eO(90),this.g_aoj=330,this.g_aok=1500,this.g_aol=1500,this.g_aom=650,this.g_aon=1e3,this.g_aoo=!1,this.g_aop=0,this.g_aoq=0,this.g_aor=!0,this.g_aos=0,this.g_aot=!0,e&&(this.g_aoj=e[g],this.g_aok=e[1],this.g_aol=e[2],this.g_aom=e[3],this.g_gR=e[4],this.g_aon=e[5],this.g_aoo=!!e[6],this.g_aop=e[7]/1e3,this.g_aor=!!e[8],this.g_aot=!!e[9]);const a=this.g_zu.g_kS();this.g_lw=new g_bz.g_lt(g_bz.g_ln.g_ls(a,"instancedestroy",g=>this.g_aou(g.g_L$)),g_bz.g_ln.g_ls(a,"afterload",()=>this.g_aov())),this.g_aor&&this.g_aow(),this.g_aot&&this.g_XZ(),this.g_aox(),this.g_Um.g_TM().set("isPlatformBehavior",!0)}g_eJ(){this.g_anH&&(this.g_anH.g_eJ(),this.g_anH=null),this.g_anS=null,this.g_anY=null,super.g_eJ()}g_aow(){if(!this.g_anH){const g=this.g_zu.g_kS();this.g_anH=new g_bz.g_lt(g_bz.g_ln.g_ls(g,"keydown",g=>this.g_amU(g.data)),g_bz.g_ln.g_ls(g,"keyup",g=>this.g_amV(g.data)),g_bz.g_ln.g_ls(g,"window-blur",()=>this.g_afH()))}}g_aoy(){this.g_anH&&(this.g_anH.g_eJ(),this.g_anH=null)}g_aou(g){this.g_anS===g&&(this.g_anS=null),this.g_anY===g&&(this.g_anY=null)}g_amU(g){switch(g.key){case"ArrowLeft":this.g_anI=!0;break;case"ArrowRight":this.g_anJ=!0;break;case"ArrowUp":this.g_anK=!0;}}g_amV(g){switch(g.key){case"ArrowLeft":this.g_anI=!1;break;case"ArrowRight":this.g_anJ=!1;break;case"ArrowUp":this.g_anK=!1,this.g_anL=!1;}}g_afH(){this.g_anI=!1,this.g_anJ=!1,this.g_anK=!1,this.g_anL=!1}g_EE(){return{ii:this.g_anO,lfx:this.g_anU,lfy:this.g_anV,lfo:this.g_anS?this.g_anS.g_Co():-1,am:this.g_an_,en:this.g_aot,fall:this.g_an$,ft:this.g_aoa,dx:this.g_aob,dy:this.g_aoc,ms:this.g_aoj,acc:this.g_aok,dec:this.g_aol,js:this.g_aom,g:this.g_gR,g1:this.g_aoh,mf:this.g_aon,wof:this.g_anX,woj:this.g_anY?this.g_anY.g_Co():-1,ga:this.g_aoi,edj:this.g_aoo,cdj:this.g_anN,dj:this.g_anM,sus:this.g_aop,dc:this.g_aor,cc:this.g_aos}}g_EG(g){this.g_anO=g.ii,this.g_anU=g.lfx,this.g_anV=g.lfy,this.g_anT=g.lfo,this.g_an_=g.am;const _=g.en;this.g_an$=g.fall,this.g_aoa=g.ft,this.g_aob=g.dx,this.g_aoc=g.dy,this.g_aoj=g.ms,this.g_aok=g.acc,this.g_aol=g.dec,this.g_aom=g.js,this.g_gR=g.g,this.g_aoh=g.g1,this.g_aon=g.mf,this.g_anX=g.wof,this.g_anZ=g.woj,this.g_aoi=g.ga,this.g_aoo=g.edj,this.g_anN=g.cdj,this.g_anM=g.dj,this.g_aop=g.sus,this.g_aor=g.dc,this.g_aos=g.cc||0,this.g_anI=!1,this.g_anJ=!1,this.g_anK=!1,this.g_anL=!1,this.g_anP=!1,this.g_anQ=!1,this.g_anR=!1,this.g_aoq=0,this.g_aor?this.g_aow():this.g_aoy(),this.g_aoz(_),this.g_aox()}g_aov(){this.g_anS=-1===this.g_anT?null:this.g_zu.g_IG(this.g_anT),this.g_anY=-1===this.g_anZ?null:this.g_zu.g_IG(this.g_anZ)}g_aox(){var g=Math.PI,_=Math.sin,e=Math.cos;this.g_aod=e(this.g_aoi),this.g_aoe=_(this.g_aoi),this.g_aof=e(this.g_aoi-g/2),this.g_aog=_(this.g_aoi-g/2),this.g_aod=g_bz.g_fe(this.g_aod),this.g_aoe=g_bz.g_fe(this.g_aoe),this.g_aof=g_bz.g_fe(this.g_aof),this.g_aog=g_bz.g_fe(this.g_aog),this.g_aoh=this.g_gR,0>this.g_gR&&(this.g_aod*=-1,this.g_aoe*=-1,this.g_gR=Math.abs(this.g_gR))}g_aoA(){return 0>this.g_gR?-1:1}g_aoB(){const _=this.g_Um.g_Bc(),n=this.g_zu.g_ahh(),t=this.g_Um,g=this.g_anS,a=_.g_FW(),e=_.g_FX();if(_.g_Uo(this.g_aod,this.g_aoe),_.g_Ct(),g&&n.g_abt(t,g)&&(!g.g_CE().g__R()||n.g_aat(g,t)))return _.g_Uk(a,e),_.g_Ct(),g;else{let i=n.g_abF(t),o=null;if(i||0!==this.g_an$||(o=n.g_abI(t,!0)),_.g_Uk(a,e),_.g_Ct(),i)return n.g_abt(t,i)?null:(this.g_anW=!1,i);if(o&&o.length){let g=0;for(let _=0,a=o.length;_this.g_aon&&(this.g_aoc=this.g_aon)),g&&(this.g_anL=!0)}g_aoI(g,_,a){const n=this.g_aok,t=this.g_aol;g===_&&(0>this.g_aob?(this.g_aob+=t*a,0this.g_aob&&(this.g_aob=0)));let e=0;return g&&!_&&(0this.g_aob?e=n+t:e=n),this.g_aob+=e*a,this.g_aob=g_bz.g_eM(this.g_aob,-this.g_aoj,this.g_aoj),e}g_aoJ(M,a,c,d){var e=Math.abs;const f=this.g_Um,g=f.g_Bc(),h=this.g_zu.g_ahh(),i=this.g_aod,b=this.g_aoe,T=this.g_aof,l=this.g_aog,m=this.g_aoj;let n=!1,E=g.g_FW(),N=g.g_FX();const y=_(this.g_aob,-m,m,a,M)*T,r=_(this.g_aob,-m,m,a,M)*l;g.g_Uo(T*(1this.g_aob?1:-1),l*(0>this.g_aob?1:-1),_,!1)?c&&!s&&!this.g_anW&&(E=g.g_FW(),N=g.g_FX(),g.g_Uo(i,b),h.g_abF(f)?!h.g_abK(f,-i,-b,3,!1)&&(g.g_Uk(E,N),g.g_Ct()):(g.g_Uk(E,N),g.g_Ct())):(g.g_Uk(E,N),g.g_Ct()),!s&&(this.g_aob=0)):!I&&!d&&e(this.g_aoc)this.g_aoc?1:-1),d*(0>this.g_aoc?1:-1),_,M,n))e.g_Uk(c,f),e.g_Ct(),this.g_anX=!0,M||(this.g_aoc=0);else{this.g_anS=n;const _=n.g_Bc();this.g_anU=_.g_FW(),this.g_anV=_.g_FX(),this.g_anW=M,M&&(i=!0),(0this.g_aoc&&1===this.g_aos&&s.g_abL(u,g,d,n,32)}}return i}g_aoL(g,_,e){"falling"!==this.g_an_&&0this.g_aob=g},{name:"behaviors.platform.debugger.vector-y",value:this.g_aoc,g_amp:g=>this.g_aoc=g},{name:"behaviors.platform.properties.max-speed.name",value:this.g_aoj,g_amp:g=>this.g_aoj=g},{name:"behaviors.platform.properties.acceleration.name",value:this.g_aok,g_amp:g=>this.g_aok=g},{name:"behaviors.platform.properties.deceleration.name",value:this.g_aol,g_amp:g=>this.g_aol=g},{name:"behaviors.platform.properties.jump-strength.name",value:this.g_aom,g_amp:g=>this.g_aom=g},{name:"behaviors.platform.properties.gravity.name",value:this.g_gR,g_amp:g=>this.g_gR=g},{name:"behaviors.platform.debugger.gravity-angle",value:g_bz.g_eP(this.g_aoi),g_amp:g=>this.g_aoi=g_bz.g_eO(g)},{name:"behaviors.platform.properties.max-fall-speed.name",value:this.g_aon,g_amp:g=>this.g_aon=g},{name:"behaviors.platform.debugger.animation-mode",value:["behaviors.platform.debugger.anim-"+this.g_an_]},{name:"behaviors.platform.properties.enabled.name",value:this.g_aot,g_amp:g=>this.g_aoz(g)}]}]}}}"use strict",g_bz.g_Yc.g_ct.g_FK={g_aoR(){return 0!==this.g_aob||0!==this.g_aoc},g_aoS(g,_){return g_bz.g_gg(Math.hypot(this.g_aob,this.g_aoc),g,_)},g_aoT(){if(0!==this.g_aoc)return!1;const _=this.g_Um,a=this.g_Bc(),n=this.g_zu.g_ahh(),t=a.g_FW(),i=a.g_FX();a.g_Uo(this.g_aod,this.g_aoe),a.g_Ct();const e=n.g_abF(_);let o=null;if(e||0!==this.g_an$||(o=n.g_abI(_,!0)),a.g_Uk(t,i),a.g_Ct(),e)return!n.g_abt(_,e);if(o&&o.length){let g=0;for(let a=0,t=o.length;athis.g_aoc},g_aoW(){return 0=n.g_apH()&&gthis.g_api(g)}]}]}}}"use strict",g_bz.g_Yc.g_Yn.g_FK={g_aoY(){return this.g_aoY()}},"use strict",g_bz.g_Yc.g_Yn.g_Uy={g_api(g){this.g_api(g)}},"use strict",g_bz.g_Yc.g_Yn.g_Si={},"use strict",g_bz.g_Yc.g_apN=class extends g_bz.g_XE{constructor(g){super(g)}g_eJ(){super.g_eJ()}},"use strict",g_bz.g_Yc.g_apN.g__b=class extends g_bz.g_XJ{constructor(g){super(g)}g_eJ(){super.g_eJ()}g_Wj(){}},"use strict";{const g=2*Math.PI,_=Math.PI/2,a=3*Math.PI/2,e=[0,1,8,3,4,2,5,6,7];g_bz.g_Yc.g_apN.g_GM=class extends g_bz.g_XN{constructor(_,a){super(_),this.g_apO=0,this.g_apP=0,this.g_apQ=0,this.g_apR=0,this.g_apS=0,this.g_aot=!0,this.g_Ky=0,this.g_apT=0,this.g_apU=0,this.g_apV=0,this.g_apW=0,a&&(this.g_apP=e[a[0]],this.g_apQ=a[1],this.g_apR=a[2],this.g_apR+=this.g_zu.g_agk()*a[3],0!==this.g_apR&&(this.g_apO=a[4]/this.g_apR*g,this.g_apO+=this.g_zu.g_agk()*a[5]/this.g_apR*g),this.g_apS=a[6],this.g_apS+=this.g_zu.g_agk()*a[7],this.g_aot=!!a[8]),5===this.g_apP&&(this.g_apS=g_bz.g_eO(this.g_apS)),this.g_$o(),this.g_aot&&this.g_WT()}g_eJ(){super.g_eJ()}g_EE(){return{i:this.g_apO,e:this.g_aot,mv:this.g_apP,w:this.g_apQ,p:this.g_apR,mag:this.g_apS,iv:this.g_Ky,iv2:this.g_apT,r:this.g_apW,lkv:this.g_apU,lkv2:this.g_apV}}g_EG(g){this.g_apO=g.i,this.g_aoz(g.e),this.g_apP=g.mv,this.g_apQ=g.w,this.g_apR=g.p,this.g_apS=g.mag,this.g_Ky=g.iv,this.g_apT=g.iv2,this.g_apW=g.r,this.g_apU=g.lkv,this.g_apV=g.lkv2}g_$o(){const g=this.g_Um.g_Bc();switch(this.g_apP){case 0:this.g_Ky=g.g_FW();break;case 1:this.g_Ky=g.g_FX();break;case 2:this.g_Ky=g.g_oR(),this.g_apW=g.g_oS()/g.g_oR();break;case 3:this.g_Ky=g.g_oR();break;case 4:this.g_Ky=g.g_oS();break;case 5:this.g_Ky=g.g_Dl();break;case 6:this.g_Ky=g.g_xv();break;case 7:this.g_Ky=0;break;case 8:this.g_Ky=g.g_FW(),this.g_apT=g.g_FX();break;default:;}this.g_apU=this.g_Ky,this.g_apV=this.g_apT}g_apX(n){var t=Math.PI;switch(n%=g,this.g_apQ){case 0:return Math.sin(n);case 1:return n<=_?n/_:n<=a?1-2*(n-_)/t:(n-a)/_-1;case 2:return 2*n/g-1;case 3:return-2*n/g+1;case 4:return nthis.g_aoz(g)},{name:"behaviors.sin.properties.period.name",value:this.g_apR,g_amp:g=>this.g_apR=g},{name:"behaviors.sin.properties.magnitude.name",value:this.g_apS,g_amp:g=>this.g_apS=g},{name:"behaviors.sin.debugger.value",value:this.g_apX(this.g_apO)*this.g_apS}]}]}}}"use strict",g_bz.g_Yc.g_apN.g_FK={g_aoY(){return this.g_aot},g_ap_(g){return this.g_apP===g},g_ap$(g,_){return g_bz.g_gg(this.g_apR,g,_)},g_aqa(g,_){return 5===this.g_apP?g_bz.g_gg(this.g_apS,g,g_bz.g_eO(_)):g_bz.g_gg(this.g_apS,g,_)},g_aqb(g){return this.g_apQ===g}},"use strict",g_bz.g_Yc.g_apN.g_Uy={g_api(g){this.g_aoz(0!==g)},g_aqc(g){this.g_apR=g},g_aqd(g){this.g_apS=g,5===this.g_apP&&(this.g_apS=g_bz.g_eO(this.g_apS))},g_aqe(g){5===this.g_apP&&5!==g&&(this.g_apS=g_bz.g_eP(this.g_apS)),this.g_apP=g,this.g_$o()},g_aqf(g){this.g_apQ=g},g_aqg(g){const _=2*Math.PI;this.g_apO=g*_%_,this.g_apY()},g_aqh(){this.g_$o()}},"use strict",g_bz.g_Yc.g_apN.g_Si={g_aqi(){return this.g_apO/(2*Math.PI)},g_aqj(){return this.g_apR},g_aqk(){return 5===this.g_apP?g_bz.g_eP(this.g_apS):this.g_apS},g_aql(){return this.g_apX(this.g_apO)*this.g_apS}},"use strict",g_bz.g_Yc.g_Yo=class extends g_bz.g_XE{constructor(g){super(g)}g_eJ(){super.g_eJ()}},"use strict",g_bz.g_Yc.g_Yo.g__b=class extends g_bz.g_XJ{constructor(g){super(g)}g_eJ(){super.g_eJ()}g_Wj(){}},"use strict",g_bz.g_Yc.g_Yo.g_GM=class extends g_bz.g_XN{constructor(g,_){super(g),this.g_api(!0),_&&this.g_api(_[0])}g_eJ(){super.g_eJ()}g_api(g){this.g_Um.g_TL().set("jumpthruEnabled",!!g)}g_aoY(){return this.g_Um.g_TL().get("jumpthruEnabled")}g_EE(){return{e:this.g_aoY()}}g_EG(g){this.g_api(g.e)}g_KC(g){return 0===g?this.g_aoY():void 0}g_KD(g,_){0===g?this.g_api(_):void 0}g_WX(){return[{title:"$"+this.g_XM().g_qT(),properties:[{name:"behaviors.jumpthru.properties.enabled.name",value:this.g_aoY(),g_amp:g=>this.g_api(g)}]}]}},"use strict",g_bz.g_Yc.g_Yo.g_FK={g_aoY(){return this.g_aoY()}},"use strict",g_bz.g_Yc.g_Yo.g_Uy={g_api(g){this.g_api(g)}},"use strict",g_bz.g_Yc.g_Yo.g_Si={},"use strict",self.g_afS=function(){return[g_bz.g_FM.g_alp,g_bz.g_FM.g_alM,g_bz.g_Yc.g_ct,g_bz.g_Yc.g_apz,g_bz.g_Yc.g_Yn,g_bz.g_Yc.g_apN,g_bz.g_Yc.g_Yo,g_bz.g_FM.g_amQ,g_bz.g_FM.Text,g_bz.g_FM.g_amQ.g_FK.g_amX,g_bz.g_Yc.g_ct.g_Uy.g_apj,g_bz.g_FM.g_amQ.g_FK.g_anb,g_bz.g_Yc.g_ct.g_Uy.g_ape,g_bz.g_FM.g_alM.g_Uy.g_amG,g_bz.g_FM.g_alM.g_FK.g_UA,g_bz.g_FM.g_FL.g_Si.g_akL,g_bz.g_FM.g_FL.g_Uy.g_ajt]},"use strict";{self.g_SL=[g=>{const _=g.g_SU(0).g_Sl();return()=>_()}]} \ No newline at end of file diff --git a/Platformer template/scripts/dispatchWorker.js b/Platformer template/scripts/dispatchWorker.js new file mode 100755 index 0000000..8f92f7b --- /dev/null +++ b/Platformer template/scripts/dispatchWorker.js @@ -0,0 +1 @@ +"use strict";self.inputPort=null,self.jobQueue=[],self.jobWorkers=[],self.sentBlobs=[],self.sentBuffers=[],self.importedScripts=[],self.lastBroadcasts=new Map;class JobWorker{constructor(a,b){this._port=a,this._number=b,this._isReady=!1,this._isBusy=!1,this._port.onmessage=(a)=>this._OnMessage(a.data)}ImportScripts(a){this._port.postMessage({"type":"_import_scripts","scripts":a})}SendBlob(a,b){this._port.postMessage({"type":"_send_blob","blob":a,"id":b})}SendBuffer(a,b){this._port.postMessage({"type":"_send_buffer","buffer":a,"id":b})}SendJob(a){if(this._isBusy||!this._isReady)throw new Error("cannot take job");this._isBusy=!0,this._port.postMessage(a,a["transferables"])}_InitBroadcast(a){this._port.postMessage(a,a["transferables"])}SendReady(){this._port.postMessage({"type":"_ready"})}IsReady(){return this._isReady}_OnReady(){this._isReady=!0,this.MaybeStartNextJob()}IsBusy(){return this._isBusy}GetNumber(){return this._number}_OnMessage(a){const b=a["type"];return"ready"===b?void this._OnReady():"done"===b?void this._OnJobDone():void console.error("unknown message from worker '"+b+"'")}_OnJobDone(){this._isBusy=!1,this.MaybeStartNextJob()}MaybeStartNextJob(){if(!this._isBusy&&this._isReady){const a=this._FindAvailableJob();if(-1!==a){const b=self.jobQueue[a],c=b["isBroadcast"];c?(b["doneFlags"][this._number]=!0,b["doneFlags"].every((a)=>a)&&self.jobQueue.splice(a,1)):self.jobQueue.splice(a,1),this.SendJob(b)}}}_FindAvailableJob(){for(let a=0,b=self.jobQueue.length;a{const b=a.data,c=b["type"];"_init"===c?(self.inputPort=b["in-port"],self.inputPort.onmessage=OnInputPortMessage):"_addJobWorker"===c&&AddJobWorker(b["port"])});function OnInputPortMessage(a){const b=a.data,c=b["type"];if("_cancel"===c)return void CancelJob(b.jobId);if("_import_scripts"===c){const a=b["scripts"];for(const b of self.jobWorkers)b.ImportScripts(a);return void self.importedScripts.push(a)}if("_send_blob"===c){const a=b["blob"],c=b["id"];for(const b of self.jobWorkers)b.SendBlob(a,c);return void self.sentBlobs.push([a,c])}if("_send_buffer"===c){const a=b["buffer"],c=b["id"];for(const b of self.jobWorkers)b.SendBuffer(a,c);return void self.sentBuffers.push([a,c])}if("_no_more_workers"===c)return self.sentBlobs.length=0,self.sentBuffers.length=0,self.importedScripts.length=0,void self.lastBroadcasts.clear();if("_testMessageChannel"===c)return void self.jobWorkers[0].TestMessageChannel();self.jobQueue.push(b),b["isBroadcast"]&&(b["doneFlags"]=Array(self.jobWorkers.length).fill(!1),b["transferables"]=[],self.lastBroadcasts.set(b["type"],b));for(const b of self.jobWorkers)b.MaybeStartNextJob()} \ No newline at end of file diff --git a/Platformer template/scripts/jobWorker.js b/Platformer template/scripts/jobWorker.js new file mode 100755 index 0000000..936a7ef --- /dev/null +++ b/Platformer template/scripts/jobWorker.js @@ -0,0 +1 @@ +"use strict";self.dispatchPort=null,self.outputPort=null,self.workerNumber=-1,self.activeJobId=null,self.sentBlobs=new Map,self.sentBuffers=new Map,self.JobHandlers={};function FlipImageData(a,b,c){const d=4*b,e=new Uint8Array(d),f=a.buffer;for(let g=0,h=Math.floor(c/2);g{const b=a.data,c=b["type"];return"init"===c?(self.workerNumber=b["number"],self.dispatchPort=b["dispatch-port"],self.dispatchPort.onmessage=OnDispatchWorkerMessage,void(self.outputPort=b["output-port"])):"terminate"===c?void self.close():void console.error("unknown message '"+c+"'")});function SendReady(){self.dispatchPort.postMessage({"type":"ready"}),self.outputPort.postMessage({"type":"ready"})}function SendError(a,b){a||self.outputPort.postMessage({"type":"error","jobId":self.activeJobId,"error":b.toString()}),SendDone()}function SendResult(a,b){if(!a){const a=b.transferables||[];self.outputPort.postMessage({"type":"result","jobId":self.activeJobId,"result":b.result},a)}SendDone()}function SendDone(){self.activeJobId=null,self.dispatchPort.postMessage({"type":"done"})}function SendProgress(a){self.outputPort.postMessage({"type":"progress","jobId":self.activeJobId,"progress":a})}function OnDispatchWorkerMessage(a){const b=a.data,c=b["type"];if("_import_scripts"===c)return void importScripts(...b["scripts"]);if("_send_blob"===c)return void self.sentBlobs.set(b["id"],b["blob"]);if("_send_buffer"===c)return void self.sentBuffers.set(b["id"],b["buffer"]);if("_testMessageChannel"===c)return void self.outputPort.postMessage({"type":"_testMessageChannelOk"});if("_ready"===c)return void SendReady();const d=b["jobId"],f=b["isBroadcast"],e=b["params"];let g;if(self.activeJobId=d,!self.JobHandlers.hasOwnProperty(c))return void console.error(`no handler for message type '${c}'`);try{g=self.JobHandlers[c](e)}catch(a){return void SendError(f,"Exception in job handler: "+a)}g&&g.then?g.then((a)=>SendResult(f,a)).catch((a)=>SendError(f,"Rejection in job handler: "+a)):SendResult(f,g)} \ No newline at end of file diff --git a/Platformer template/scripts/main.js b/Platformer template/scripts/main.js new file mode 100755 index 0000000..db75ee5 --- /dev/null +++ b/Platformer template/scripts/main.js @@ -0,0 +1 @@ +"use strict";window.g_a=class{constructor(c,a){this.g_b=c,this.g_c=a,this.g_d=!1,this.g_e=()=>this.g_f()}g_g(){}g_h(e,a,b,c){this.g_b.g_i(this.g_c,e,a,!!b,c)}g_j(e,a,b,c){return this.g_b.g_k(this.g_c,e,a,!!b,c)}g_l(d,a,b){this.g_b.g_m()?this.g_h(d,a,b):this.g_b.g_n()._OnMessageFromDOM({type:"event",component:this.g_c,handler:d,dispatchRuntimeEvent:b,data:a,responseId:null})}g_o(c,a){this.g_b.g_p(this.g_c,c,a)}g_q(d){for(const[a,b]of d)this.g_o(a,b)}g_r(){return this.g_b}g_s(){return this.g_c}g_t(){this.g_d||(this.g_b.g_u(this.g_e),this.g_d=!0)}g_v(){this.g_d&&(this.g_b.g_w(this.g_e),this.g_d=!1)}g_f(){}},"use strict",window.g_x=class extends g_a{constructor(c,a){super(c,a),this.g_y=new Map,this.g_z=!0,this.g_o("create",b=>this.g_A(b)),this.g_o("destroy",b=>this.g_B(b)),this.g_o("set-visible",b=>this.g_C(b)),this.g_o("update-position",b=>this.g_D(b)),this.g_o("update-state",b=>this.g_E(b)),this.g_o("focus",b=>this.g_F(b)),this.g_o("set-css-style",b=>this.g_G(b))}g_H(b){this.g_z=!!b}g_I(c,e){this.g_o(c,b=>{const a=b.elementId,c=this.g_y.get(a);return e(c,b)})}g_A(d){const a=d.elementId,b=this.g_J(a,d);this.g_y.set(a,b),this.g_z&&document.body.appendChild(b)}g_J(){throw new Error("required override")}g_K(){}g_B(d){const a=d.elementId,b=this.g_y.get(a);this.g_K(b),this.g_z&&b.parentElement.removeChild(b),this.g_y.delete(a)}g_L(d,a,b){b||(b={}),b.elementId=a,this.g_h(d,b)}g_M(d,a,b){b||(b={}),b.elementId=a,this.g_l(d,b)}g_C(c){if(this.g_z){const a=this.g_y.get(c.elementId);a.style.display=c.isVisible?"":"none"}}g_D(d){if(this.g_z){const a=this.g_y.get(d.elementId);a.style.left=d.left+"px",a.style.top=d.top+"px",a.style.width=d.width+"px",a.style.height=d.height+"px";const b=d.fontSize;null!==b&&(a.style.fontSize=b+"em")}}g_E(c){const a=this.g_y.get(c.elementId);this.g_N(a,c)}g_N(){throw new Error("required override")}g_F(c){const a=this.g_y.get(c.elementId);c.focus?a.focus():a.blur()}g_G(c){const a=this.g_y.get(c.elementId);a.style[c.prop]=c.val}g_O(b){return this.g_y.get(b)}},"use strict";{function p(e){return new Promise((a,b)=>{const c=document.createElement("script");c.onload=a,c.onerror=b,c.async=!1,c.src=e,document.head.appendChild(c)})}function q(e){return new Promise((f,b)=>{const a=new FileReader;a.onload=b=>f(b.target.result),a.onerror=c=>b(c),a.readAsText(e)})}function r(e){return new Promise((f,b)=>{const a=new FileReader;a.onload=b=>f(b.target.result),a.onerror=c=>b(c),a.readAsArrayBuffer(e)})}function s(d){if(!d)return"";const a=d.split(".");if(2>a.length)return"";const b=a[a.length-1].toLowerCase();return g.get(b)||""}const a=/(iphone|ipod|ipad)/i.test(navigator.userAgent);let b=new Audio;const c={"audio/webm; codecs=opus":!!b.canPlayType("audio/webm; codecs=opus"),"audio/ogg; codecs=opus":!!b.canPlayType("audio/ogg; codecs=opus"),"audio/webm; codecs=vorbis":!!b.canPlayType("audio/webm; codecs=vorbis"),"audio/ogg; codecs=vorbis":!!b.canPlayType("audio/ogg; codecs=vorbis"),"audio/mp4":!!b.canPlayType("audio/mp4"),"audio/mpeg":!!b.canPlayType("audio/mpeg")};b=null;const d=[];let e=0;const f=Math.max(navigator.hardwareConcurrency||0,8),g=new Map([["mp4","video/mp4"],["webm","video/webm"],["m4a","audio/mp4"],["mp3","audio/mpeg"],["js","application/javascript"],["wasm","application/wasm"]]),h=[],i=new Map,j=new Map;let k=0;window.g_P=class b{constructor(b){this.g_Q=b.g_R,this.g_S=null,this.g_T="",this.g_U={},this.g_V=null,this.g_W=null,this.g_X=[],this.g_Y=null,this.g_Z=null,this.g__=null,this.g_$=-1,this.g_aa=()=>this.g_ab(),this.g_ac=[],this.g_ad=b.g_ae,this.g_af=!1,"html5"===this.g_ad&&"file"===location.protocol.substr(0,4)&&alert("Exported games won't work until you upload them. (When running on the file: protocol, browsers block many features from working for security reasons.)"),this.g_p("runtime","cordova-fetch-local-file",b=>this.g_ag(b)),this.g_p("runtime","create-job-worker",b=>this.g_ah(b)),"cordova"===this.g_ad?document.addEventListener("deviceready",()=>this.g_ai(b)):this.g_ai(b)}g_aj(){this.g_ak(),this.g_S&&(this.g_S.onmessage=null,this.g_S=null),this.g_V&&(this.g_V.terminate(),this.g_V=null),this.g_W&&(this.g_W.g_aj(),this.g_W=null),this.g_Z&&(this.g_Z.parentElement.removeChild(this.g_Z),this.g_Z=null)}g_al(){return this.g_Z}g_am(){return this.g_T}g_m(){return this.g_Q}g_an(){return this.g_ad}g_ao(){return"cordova"===this.g_ad&&a}g_ap(){if(!this.g_ao())return!1;const d=window.devicePixelRatio,a=window.screen.width*d,b=window.screen.height*d;return 1125==a&&2436==b}async g_ai(d){if(d.g_aq)this.g_T=d.g_aq;else{this.g_T=location.origin+location.pathname;const b=this.g_T.lastIndexOf("/");-1!==b&&(this.g_T=this.g_T.substr(0,b+1))}if(d.g_ar)for(const[a,b]of Object.entries(d.g_ar))this.g_U[a]=URL.createObjectURL(b);const a=new MessageChannel;this.g_S=a.port1,this.g_S.onmessage=b=>this._OnMessageFromRuntime(b.data),window.c3_addPortMessageHandler&&window.c3_addPortMessageHandler(b=>this.g_as(b)),this.g__=new self.g_at(this),await this.g__.g_au(),this.g_av(),"object"==typeof window.StatusBar&&window.StatusBar.hide(),await this.g_aw(),this.g_Q?await this.g_ax(d,a.port2):await this.g_ay(d,a.port2)}g_az(b){return this.g_U.hasOwnProperty(b)?this.g_U[b]:b}async g_aA(f,a,g){if(f.startsWith("blob:"))return new Worker(f,g);if(this.g_ao()){const a=await this.g_aB("scripts/"+f);return new Worker(URL.createObjectURL(a),g)}const c=new URL(f,a),b=location.origin!==c.origin;if(b){const d=await fetch(c);if(!d.ok)throw new Error("failed to fetch worker script");const a=await d.blob();return new Worker(URL.createObjectURL(a),g)}return new Worker(c,g)}g_av(){if(this.g_ap()){const d=window.innerWidth>window.innerHeight,a=document.documentElement.style,b=document.body.style;d?(b.height=a.height="375px",b.width=a.width="812px"):(b.width=a.width="375px",b.height=a.height="812px")}}g_aC(d){return{baseUrl:this.g_T,windowInnerWidth:window.innerWidth,windowInnerHeight:window.innerHeight,devicePixelRatio:window.devicePixelRatio,isFullscreen:b.g_aD(),projectData:d.g_aE,previewImageBlobs:window.cr_previewImageBlobs,previewProjectFileBlobs:window.cr_previewProjectFileBlobs,shaders:self.C3_Shaders,exportType:d.g_ae,isDebug:-1new b(this)),this.g_aL()}async g_ay(a,b){this.g_Z=document.createElement("canvas"),this.g_Z.style.display="none",document.body.appendChild(this.g_Z),this.g_X=h.map(b=>new b(this)),this.g_aL();const c=a.g_aJ.map(b=>new URL(b,this.g_T).toString());await Promise.all(c.map(a=>p(a)));const d=Object.assign(this.g_aC(a),{isInWorker:!1,messagePort:b,canvas:this.g_Z});this.g_W=self.C3_CreateRuntime(d),await self.C3_InitRuntime(this.g_W,d)}async g_ah(){const b=await this.g__.g_aM();return{outputPort:b,transferables:[b]}}g_n(){if(this.g_Q)throw new Error("not available in worker mode");return this.g_W}g_i(f,a,b,c,d){this.g_S.postMessage({type:"event",component:f,handler:a,dispatchRuntimeEvent:c,data:b,responseId:null},this.g_af?void 0:d)}g_k(h,a,b,c,d){const e=k++,f=new Promise((c,a)=>{j.set(e,{resolve:c,reject:a})});return this.g_S.postMessage({type:"event",component:h,handler:a,dispatchRuntimeEvent:c,data:b,responseId:e},this.g_af?void 0:d),f}["_OnMessageFromRuntime"](c){const a=c.type;if("event"===a)this.g_aO(c);else if("result"===a)this.g_aP(c);else if("runtime-ready"===a)this.g_aQ();else throw new Error(`unknown message '${a}'`)}g_aO(j){const k=j.component,b=j.handler,a=j.data,c=j.responseId,d=i.get(k);if(!d)return void console.warn(`[DOM] No event handlers for component '${k}'`);const e=d.get(b);if(!e)return void console.warn(`[DOM] No handler '${b}' for component '${k}'`);let f=null;try{f=e(a)}catch(d){return console.error(`Exception in '${k}' handler '${b}':`,d),void(null!==c&&this.g_aR(c,!1,d.toString()))}null!==c&&(f&&f.then?f.then(b=>this.g_aR(c,!0,b)).catch(d=>{console.error(`Rejection from '${k}' handler '${b}':`,d),this.g_aR(c,!1,d.toString())}):this.g_aR(c,!0,f))}g_aR(e,a,b){let c;b&&b.transferables&&(c=b.transferables),this.g_S.postMessage({type:"result",responseId:e,isOk:a,result:b},c)}g_aP(f){const a=f.responseId,b=f.isOk,c=f.result,d=j.get(a);b?d.resolve(c):d.reject(c),j.delete(a)}g_p(e,a,b){let c=i.get(e);if(c||(c=new Map,i.set(e,c)),c.has(a))throw new Error(`[DOM] Component '${e}' already has handler '${a}'`);c.set(a,b)}static g_aS(b){if(h.includes(b))throw new Error("DOM handler already added");h.push(b)}g_aL(){for(const b of this.g_X)if("runtime"===b.g_s())return void(this.g_Y=b);throw new Error("cannot find runtime DOM handler")}g_as(b){this.g_i("debugger","message",b)}g_aQ(){for(const b of this.g_X)b.g_g()}static g_aD(){return!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement)}g_u(b){this.g_ac.push(b),this.g_aT()}g_w(c){const a=this.g_ac.indexOf(c);if(-1===a)throw new Error("invalid callback");this.g_ac.splice(a,1),this.g_ac.length||this.g_ak()}g_aT(){-1===this.g_$&&this.g_ac.length&&(this.g_$=requestAnimationFrame(this.g_aa))}g_ak(){-1!==this.g_$&&(cancelAnimationFrame(this.g_$),this.g_$=-1)}g_ab(){this.g_$=-1;for(const b of this.g_ac)b();this.g_aT()}g_aU(b){this.g_Y.g_aU(b)}g_aV(b){this.g_Y.g_aV(b)}g_aW(){this.g_Y.g_aW()}g_aX(b){this.g_Y.g_aX(b)}g_aY(b){return!!c[b]}async g_aZ(c){const a=await this.g_k("runtime","opus-decode",{arrayBuffer:c},!1,[c]);return new Float32Array(a)}g_a_(b){return /^(?:[a-z]+:)?\/\//.test(b)||"data:"===b.substr(0,5)||"blob:"===b.substr(0,5)}g_a$(b){return!this.g_a_(b)}async g_ag(c){const a=c.filename;switch(c.as){case"text":return await this.g_ba(a);case"blob":return await this.g_aB(a);case"blob-url":return await this.g_bb(a);case"buffer":return await this.g_bc(a);default:throw new Error("unsupported type");}}g_bd(c){const d=window.cordova.file.applicationDirectory+"www/"+c;return new Promise((e,a)=>{window.resolveLocalFileSystemURL(d,c=>{c.file(e,a)},a)})}async g_ba(b){const a=await this.g_bd(b);return await q(a)}g_be(){if(d.length&&!(e>=f)){e++;const b=d.shift();this.g_bf(b.filename,b.g_bg,b.g_bh)}}g_bc(f){return new Promise((g,b)=>{d.push({filename:f,g_bg:b=>{e--,this.g_be(),g(b)},g_bh:c=>{e--,this.g_be(),b(c)}}),this.g_be()})}async g_bf(c,a,b){try{const b=await this.g_bd(c),d=await r(b);a(d)}catch(c){b(c)}}async g_aB(d,a){a||(a=s(d));const e=await this.g_bc(d);return new Blob([e],{type:a})}async g_bb(c){const a=await this.g_aB(c);return URL.createObjectURL(a)}g_aw(){let e=null;const f=new Promise(a=>e=a),b=new ArrayBuffer(1),c=new MessageChannel;return c.port2.onmessage=a=>{a.data&&a.data.arrayBuffer||(this.g_af=!0,console.warn("MessageChannel transfers determined to be broken. Disabling transferables.")),e()},c.port1.postMessage({arrayBuffer:b},[b]),f}}}{function g(b){return b.sourceCapabilities&&b.sourceCapabilities.firesTouchEvents||b.originalEvent&&b.originalEvent.sourceCapabilities&&b.originalEvent.sourceCapabilities.firesTouchEvents}function a(e){return new Promise((a,b)=>{const c=new Image;c.onload=()=>a(c),c.onerror=c=>b(c),c.src=e})}async function h(b){const d=URL.createObjectURL(b);try{return await a(d)}finally{URL.revokeObjectURL(d)}}function b(){return window.parent&&window.parent.document.hasFocus()}self.C3_RasterSvgImage=async function(f,a,b){const c=document.createElement("canvas");c.width=a,c.height=b;const d=c.getContext("2d");return d.drawImage(f,0,0,a,b),c};let c=!1;document.addEventListener("pause",()=>c=!0),document.addEventListener("resume",()=>c=!1);const d=class extends g_a{constructor(c){super(c,"runtime"),this.g_bi=!0,this.g_bj="any",this.g_bk=null,c.g_p("canvas","update-size",b=>this.g_bl(b)),c.g_p("runtime","invoke-download",b=>this.g_bm(b)),c.g_p("runtime","raster-svg-image",b=>this.g_bn(b)),c.g_p("runtime","set-target-orientation",b=>this.g_bo(b)),c.g_p("runtime","register-sw",()=>this.g_bp()),c.g_p("runtime","post-to-debugger",b=>this.g_bq(b)),c.g_p("runtime","before-start-ticking",()=>this.g_br()),c.g_p("runtime","debug-highlight",b=>this.g_bs(b));const a=c.g_al();a.addEventListener("contextmenu",b=>b.preventDefault()),a.addEventListener("selectstart",b=>b.preventDefault()),a.addEventListener("gesturehold",b=>b.preventDefault()),a.addEventListener("touchstart",b=>b.preventDefault()),window.addEventListener("mousedown",b=>{1===b.button&&b.preventDefault()}),window.addEventListener("resize",()=>this.g_bt()),this.g_bu=new Set,this.g_bv=new WeakSet,this.g_bw=!1}g_br(){return window.addEventListener("visibilitychange",()=>this.g_bx(document.hidden)),document.addEventListener("pause",()=>this.g_bx(!0)),document.addEventListener("resume",()=>this.g_bx(!1)),{isSuspended:!!(document.hidden||c)}}g_g(){window.addEventListener("focus",()=>this.g_by("window-focus")),window.addEventListener("blur",()=>this.g_by("window-blur",{parentHasFocus:b()})),window.addEventListener("fullscreenchange",()=>this.g_bz()),window.addEventListener("webkitfullscreenchange",()=>this.g_bz()),window.addEventListener("mozfullscreenchange",()=>this.g_bz()),window.addEventListener("fullscreenerror",b=>this.g_bA(b)),window.addEventListener("webkitfullscreenerror",b=>this.g_bA(b)),window.addEventListener("mozfullscreenerror",b=>this.g_bA(b)),window.addEventListener("keydown",b=>this.g_bB("keydown",b)),window.addEventListener("keyup",b=>this.g_bB("keyup",b)),window.addEventListener("mousemove",b=>this.g_bC("mousemove",b)),window.addEventListener("mousedown",b=>this.g_bC("mousedown",b)),window.addEventListener("mouseup",b=>this.g_bC("mouseup",b)),window.addEventListener("dblclick",b=>this.g_bC("dblclick",b)),window.addEventListener("wheel",b=>this.g_bD("wheel",b)),"undefined"==typeof g_bE?(window.addEventListener("touchstart",b=>this.g_bF("pointerdown",b)),window.addEventListener("touchmove",b=>this.g_bF("pointermove",b)),window.addEventListener("touchend",b=>this.g_bF("pointerup",b)),window.addEventListener("touchcancel",b=>this.g_bF("pointercancel",b))):(window.addEventListener("pointerdown",b=>this.g_bG("pointerdown",b)),window.addEventListener("pointermove",b=>this.g_bG("pointermove",b)),window.addEventListener("pointerup",b=>this.g_bG("pointerup",b)),window.addEventListener("pointercancel",b=>this.g_bG("pointercancel",b))),window.addEventListener("deviceorientation",b=>this.g_bH(b)),window.addEventListener("devicemotion",b=>this.g_bI(b));const c=()=>this.g_aW();window.addEventListener("pointerup",c,!0),window.addEventListener("touchend",c,!0),window.addEventListener("click",c,!0),window.addEventListener("keydown",c,!0),window.addEventListener("gamepadconnected",c,!0)}g_by(c,a){this.g_h(c,a||null,!0)}g_bt(){this.g_h("window-resize",{innerWidth:window.innerWidth,innerHeight:window.innerHeight,devicePixelRatio:window.devicePixelRatio},!0)}g_bo(b){this.g_bj=b.targetOrientation}g_bJ(){const c=this.g_bj;if(screen.orientation&&screen.orientation.lock)screen.orientation.lock(c).catch(b=>console.warn("[Construct 3] Failed to lock orientation: ",b));else try{let a=!1;screen.lockOrientation?a=screen.lockOrientation(c):screen.webkitLockOrientation?a=screen.webkitLockOrientation(c):screen.mozLockOrientation?a=screen.mozLockOrientation(c):screen.msLockOrientation&&(a=screen.msLockOrientation(c)),a||console.warn("[Construct 3] Failed to lock orientation")}catch(b){console.warn("[Construct 3] Failed to lock orientation: ",b)}}g_bz(){const b=g_P.g_aD();b&&"any"!==this.g_bj&&this.g_bJ(),this.g_h("fullscreenchange",{isFullscreen:b,innerWidth:window.innerWidth,innerHeight:window.innerHeight})}g_bA(b){console.warn("[Construct 3] Fullscreen request failed: ",b),this.g_h("fullscreenerror",{isFullscreen:g_P.g_aD(),innerWidth:window.innerWidth,innerHeight:window.innerHeight})}g_bx(b){b?this.g_b.g_ak():this.g_b.g_aT(),this.g_h("visibilitychange",{hidden:b})}g_bB(c,a){this.g_l(c,{code:a.code,key:a.key,which:a.which,repeat:a.repeat,altKey:a.altKey,ctrlKey:a.ctrlKey,metaKey:a.metaKey,shiftKey:a.shiftKey,timeStamp:a.timeStamp},!0)}g_bC(a,b){g(b)||("mousedown"===a&&window!==window.top&&window.focus(),this.g_l(a,{button:b.button,clientX:b.clientX,clientY:b.clientY,timeStamp:b.timeStamp},!0))}g_bD(c,a){this.g_h(c,{clientX:a.clientX,clientY:a.clientY,deltaX:a.deltaX,deltaY:a.deltaY,deltaZ:a.deltaZ,deltaMode:a.deltaMode,timeStamp:a.timeStamp},!0)}g_bG(c,a){"pointerdown"===c&&window!==window.top&&window.focus(),this.g_l(c,{pointerId:a.pointerId,pointerType:a.pointerType,clientX:a.clientX,clientY:a.clientY,width:a.width||0,height:a.height||0,pressure:a.pressure||0,tangentialPressure:a.tangentialPressure||0,tiltX:a.tiltX||0,tiltY:a.tiltY||0,twist:a.twist||0,timeStamp:a.timeStamp},!0)}g_bF(e,a){"pointerdown"===e&&window!==window.top&&window.focus();for(let b=0,c=a.changedTouches.length;b{this.g_bv.has(d)||this.g_bu.add(d)})}}g_aU(c){if("function"!=typeof c.play)throw new Error("missing play function");this.g_bv.delete(c);let a;try{a=c.play()}catch(a){return void this.g_bu.add(c)}a&&a.catch(()=>{this.g_bv.has(c)||this.g_bu.add(c)})}g_aV(b){this.g_bu.delete(b),this.g_bv.add(b)}g_aX(b){this.g_bw=!!b}g_bs(d){const a=d.show;if(!a)return void(this.g_bk&&(this.g_bk.style.display="none"));this.g_bk||(this.g_bk=document.createElement("div"),this.g_bk.id="inspectOutline",document.body.appendChild(this.g_bk));const b=this.g_bk;b.style.display="",b.style.left=d.left-1+"px",b.style.top=d.top-1+"px",b.style.width=d.width+2+"px",b.style.height=d.height+2+"px",b.textContent=d.name}g_bp(){window.C3_RegisterSW&&window.C3_RegisterSW()}g_bq(b){window.c3_postToMessagePort&&(b.from="runtime",window.c3_postToMessagePort(b))}};g_P.g_aS(d)}{const c=document.currentScript.src;self.g_at=class{constructor(a){this.g_bK=a,this.g_T=c.substr(0,c.lastIndexOf("/")+1),this.g_bL=Math.min(navigator.hardwareConcurrency||2,16),this.g_bM=null,this.g_bN=[],this.g_bO=null,this.g_bP=null}async g_au(){if(this.g_bQ)throw new Error("already initialised");this.g_bQ=!0;const c=this.g_bK.g_az("dispatchWorker.js");this.g_bM=await this.g_bK.g_aA(c,this.g_T,{name:"DispatchWorker"});const a=new MessageChannel;this.g_bO=a.port1,this.g_bM.postMessage({type:"_init","in-port":a.port2},[a.port2]),this.g_bP=await this.g_aM()}async g_aM(){const f=this.g_bN.length,a=this.g_bK.g_az("jobWorker.js"),b=await this.g_bK.g_aA(a,this.g_T,{name:"JobWorker"+f}),c=new MessageChannel,d=new MessageChannel;return this.g_bM.postMessage({type:"_addJobWorker",port:c.port1},[c.port1]),b.postMessage({type:"init",number:f,"dispatch-port":c.port2,"output-port":d.port2},[c.port2,d.port2]),this.g_bN.push(b),d.port1}g_aG(){return{inputPort:this.g_bO,outputPort:this.g_bP,maxNumWorkers:this.g_bL}}g_aK(){return[this.g_bO,this.g_bP]}}}if("use strict",window.C3_IsSupported){"undefined"!=typeof OffscreenCanvas;window.c3_runtimeInterface=new g_P({g_R:!1,g_aH:"workerMain.js",g_aJ:["scripts/c3runtime.js"],g_ae:"html5"})} \ No newline at end of file diff --git a/Platformer template/scripts/offlineClient.js b/Platformer template/scripts/offlineClient.js new file mode 100755 index 0000000..d8c3274 --- /dev/null +++ b/Platformer template/scripts/offlineClient.js @@ -0,0 +1 @@ +"use strict";{window.OfflineClientInfo=new class{constructor(){if(this._broadcastChannel="undefined"==typeof BroadcastChannel?null:new BroadcastChannel("offline"),this._queuedMessages=[],this._onMessageCallback=null,this._broadcastChannel){var a=this;this._broadcastChannel.onmessage=function(b){a._OnBroadcastChannelMessage(b)}}}_OnBroadcastChannelMessage(a){return this._onMessageCallback?void this._onMessageCallback(a):void this._queuedMessages.push(a)}SetMessageCallback(a){this._onMessageCallback=a;for(let b of this._queuedMessages)this._onMessageCallback(b);this._queuedMessages.length=0}}} \ No newline at end of file diff --git a/Platformer template/scripts/register-sw.js b/Platformer template/scripts/register-sw.js new file mode 100755 index 0000000..aeb70f5 --- /dev/null +++ b/Platformer template/scripts/register-sw.js @@ -0,0 +1 @@ +"use strict";window.C3_RegisterSW=async function(){if(navigator.serviceWorker)try{const a=await navigator.serviceWorker.register("sw.js",{scope:"./"});console.info("Registered service worker on "+a.scope)}catch(a){console.warn("Failed to register service worker: ",a)}}; \ No newline at end of file diff --git a/Platformer template/scripts/supportCheck.js b/Platformer template/scripts/supportCheck.js new file mode 100755 index 0000000..0a3ae9d --- /dev/null +++ b/Platformer template/scripts/supportCheck.js @@ -0,0 +1 @@ +"use strict";(function(){var a=document.createElement("canvas"),b=!!(a.getContext("webgl")||a.getContext("experimental-webgl")),c=[];if(b||c.push("WebGL"),"undefined"==typeof WebAssembly&&c.push("WebAssembly"),0===c.length)window["C3_IsSupported"]=!0;else{var d=document.createElement("div");d.id="notSupportedWrap",document.body.appendChild(d);var e=document.createElement("h2");e.id="notSupportedTitle",e.textContent="Software update needed",d.appendChild(e);var f=document.createElement("p");f.id="notSupportedMessage";var g="This content is not supported because your device's software is out-of-date. Try installing any available software updates. Alternatively try on a different device.",h=navigator.userAgent;/android/i.test(h)?g+="

On Android, make sure the Android System Webview and Chrome apps have updates enabled and are up-to-date.":/iphone|ipad|ipod/i.test(h)&&(g+="

Note: the iOS simulator is not currently supported due to an
Apple bug. If you are using the simulator, try testing on a real device instead."),g+="

Missing features: "+c.join(", ")+"",f.innerHTML=g,d.appendChild(f)}})(); \ No newline at end of file diff --git a/Platformer template/style.css b/Platformer template/style.css new file mode 100755 index 0000000..4fd3df5 --- /dev/null +++ b/Platformer template/style.css @@ -0,0 +1,34 @@ +html, body { + padding: 0; + margin: 0; + overflow: hidden; + + background: #000000; + color: white; +} + +html, body, canvas { + touch-action: none; + touch-action-delay: none; +} + +#notSupportedWrap { + margin: 2em auto 1em auto; + width: 75%; + max-width: 45em; + border: 2px solid #aaa; + border-radius: 1em; + padding: 2em; + background-color: #f0f0f0; + font-family: "Segoe UI", Frutiger, "Frutiger Linotype", "Dejavu Sans", "Helvetica Neue", Arial, sans-serif; + color: black; +} + +#notSupportedTitle { + font-size: 1.8em; +} + +#notSupportedMessage { + font-size: 1.2em; +} + diff --git a/Platformer template/sw.js b/Platformer template/sw.js new file mode 100755 index 0000000..4366997 --- /dev/null +++ b/Platformer template/sw.js @@ -0,0 +1 @@ +"use strict";const OFFLINE_DATA_FILE="offline.json",CACHE_NAME_PREFIX="c3offline",BROADCASTCHANNEL_NAME="offline",CONSOLE_PREFIX="[SW] ",LAZYLOAD_KEYNAME="",broadcastChannel="undefined"==typeof BroadcastChannel?null:new BroadcastChannel("offline");function PostBroadcastMessage(a){broadcastChannel&&setTimeout(()=>broadcastChannel.postMessage(a),3e3)}function Broadcast(a){PostBroadcastMessage({"type":a})}function BroadcastDownloadingUpdate(a){PostBroadcastMessage({"type":"downloading-update","version":a})}function BroadcastUpdateReady(a){PostBroadcastMessage({"type":"update-ready","version":a})}function IsUrlInLazyLoadList(a,b){if(!b)return!1;try{for(const c of b)if(new RegExp(c).test(a))return!0}catch(a){console.error("[SW] Error matching in lazy-load list: ",a)}return!1}function WriteLazyLoadListToStorage(a){return"undefined"==typeof localforage?Promise.resolve():localforage.setItem(LAZYLOAD_KEYNAME,a)}function ReadLazyLoadListFromStorage(){return"undefined"==typeof localforage?Promise.resolve([]):localforage.getItem(LAZYLOAD_KEYNAME)}function GetCacheBaseName(){return"c3offline-"+self.registration.scope}function GetCacheVersionName(a){return GetCacheBaseName()+"-v"+a}async function GetAvailableCacheNames(){const a=await caches.keys(),b=GetCacheBaseName();return a.filter((a)=>a.startsWith(b))}async function IsUpdatePending(){const a=await GetAvailableCacheNames();return 2<=a.length}async function GetMainPageUrl(){const a=await clients.matchAll({includeUncontrolled:!0,type:"window"});for(const b of a){let a=b.url;if(a.startsWith(self.registration.scope)&&(a=a.substring(self.registration.scope.length)),a&&"/"!==a)return a.startsWith("?")&&(a="/"+a),a}return""}function fetchWithBypass(a,b){return"string"==typeof a&&(a=new Request(a)),b?fetch(a.url,{headers:a.headers,mode:a.mode,credentials:a.credentials,redirect:a.redirect,cache:"no-store"}):fetch(a)}async function CreateCacheFromFileList(a,b,c){const d=await Promise.all(b.map((a)=>fetchWithBypass(a,c)));let e=!0;for(const f of d)f.ok||(e=!1,console.error("[SW] Error fetching '"+f.url+"' ("+f.status+" "+f.statusText+")"));if(!e)throw new Error("not all resources were fetched successfully");const f=await caches.open(a);try{return await Promise.all(d.map((a,c)=>f.put(b[c],a)))}catch(b){throw console.error("[SW] Error writing cache entries: ",b),caches.delete(a),b}}async function UpdateCheck(a){try{const b=await fetchWithBypass(OFFLINE_DATA_FILE,!0);if(!b.ok)throw new Error("offline.json responded with "+b.status+" "+b.statusText);const c=await b.json(),d=c.version,e=c.fileList,f=c.lazyLoad,g=GetCacheVersionName(d),h=await caches.has(g);if(h){const a=await IsUpdatePending();return void(a?(console.log("[SW] Update pending"),Broadcast("update-pending")):(console.log("[SW] Up to date"),Broadcast("up-to-date")))}const i=await GetMainPageUrl();e.unshift("./"),i&&-1===e.indexOf(i)&&e.unshift(i),console.log("[SW] Caching "+e.length+" files for offline use"),a?Broadcast("downloading"):BroadcastDownloadingUpdate(d),f&&(await WriteLazyLoadListToStorage(f)),await CreateCacheFromFileList(g,e,!a);const j=await IsUpdatePending();j?(console.log("[SW] All resources saved, update ready"),BroadcastUpdateReady(d)):(console.log("[SW] All resources saved, offline support ready"),Broadcast("offline-ready"))}catch(a){console.warn("[SW] Update check failed: ",a)}}self.addEventListener("install",(a)=>{a.waitUntil(UpdateCheck(!0).catch(()=>null))});async function GetCacheNameToUse(a,b){if(1===a.length||!b)return a[0];const c=await clients.matchAll();if(1caches.delete(a))),d}async function HandleFetch(a,b){const c=await GetAvailableCacheNames();if(!c.length)return fetch(a.request);const d=await GetCacheNameToUse(c,b),e=await caches.open(d),f=await e.match(a.request);if(f)return f;const g=await Promise.all([fetch(a.request),ReadLazyLoadListFromStorage()]),h=g[0],i=g[1];if(IsUrlInLazyLoadList(a.request.url,i))try{await e.put(a.request,h.clone())}catch(b){console.warn("[SW] Error caching '"+a.request.url+"': ",b)}return h}self.addEventListener("fetch",(a)=>{if(new URL(a.request.url).origin===location.origin){const b="navigate"===a.request.mode,c=HandleFetch(a,b);b&&a.waitUntil(c.then(()=>UpdateCheck(!1))),a.respondWith(c)}}); \ No newline at end of file diff --git a/platformertest.c3p b/platformertest.c3p new file mode 100644 index 0000000..d9ef5ce Binary files /dev/null and b/platformertest.c3p differ