// Generated by Construct 2, the HTML5 game and app creator :: http://www.scirra.com 'use strict';var aa,ba,ca,z,da,ea,D,O,fa,ga,ia,ja,na,oa,S,pa,ra,T,ua,va,wa,xa,U,ya,za,Aa,Ba,Ca,V,Da,Ea,Fa,Ga,Ha,Ia,Ja,Ka,La,Ma,Na,Oa,Pa,Qa,Ra,Sa,Ta,Ua,Va,Wa,Xa,Ya,Za,ab,bb,cb,db,eb,fb,gb,hb,ib,jb,kb,lb,mb,nb,ob,pb,qb,rb,sb,tb,ub,vb,wb,xb,yb,zb,Ab,Bb,Cb,Db,Eb,Fb,Gb,Hb,Ib,Jb,Kb,Lb,Mb,Nb,Ob,Pb,Qb,Rb,W,Sb,Tb={},Ub={};"function"!==typeof Object.getPrototypeOf&&(Object.getPrototypeOf="object"===typeof"test".__proto__?function(e){return e.__proto__}:function(e){return e.constructor.prototype}); (function(){function e(a,c,h,d){this.set(a,c,h,d)}function p(){this.pb=this.ob=this.sb=this.rb=this.Ab=this.zb=this.ab=this.$a=0}function l(a,c,h,d){ad?c:d):(v=ah?c:h):hd?a:d):(v=ch?a:h)}function q(){this.items=this.Zc=null;this.Fg=0;ka&&(this.Zc=new Set);this.Tf=[];this.Hd=!0}function t(a){E[la++]=a}function u(){this.oa=this.ej=this.y=this.zj=0}function b(a){this.Ja=[];this.yh=this.Ah=this.Bh=this.zh=0;this.gh(a)}function a(a,c){this.Dj= a;this.Cj=c;this.cells={}}function f(a,c){this.Dj=a;this.Cj=c;this.cells={}}function k(a,c,h){var d;return Q.length?(d=Q.pop(),d.hk=a,d.x=c,d.y=h,d):new aa(a,c,h)}function c(a,c,h){this.hk=a;this.x=c;this.y=h;this.Qa=new ba}function d(a,c,h){var d;return X.length?(d=X.pop(),d.hk=a,d.x=c,d.y=h,d):new ca(a,c,h)}function r(a,c,h){this.hk=a;this.x=c;this.y=h;this.Qa=[];this.of=!0;this.Xc=new ba;this.Zf=!1}function g(a,c){return a.Nc-c.Nc}z=function(a){window.console&&window.console.log&&window.console.log(a)}; da=function(a){window.console&&window.console.error&&window.console.error(a)};ea=function(a){return"undefined"===typeof a};D=function(a){return"number"===typeof a};O=function(a){return"string"===typeof a};fa=function(a){return 0c;c<<=1)a=a|a>>c;return a+1};ia=function(a){return 0>a?-a:a};ja=function(a,c){return a>c?a:c};na=function(a,c){return aA)return!1;cA)return!1;b=f-a+g-h;y=m-c+k-d;a=h-a;c=d-c;f=g-f;m=k-m;k=ia(c*f-m*a);return ia(f*y-m*b)>k?!1:ia(a*y-c*b)<=k};e.prototype.set=function(a,c,h,d){this.left=a;this.top=c;this.right=h;this.bottom=d};e.prototype.fg=function(a){this.left=a.left;this.top=a.top;this.right=a.right;this.bottom=a.bottom};e.prototype.width=function(){return this.right- this.left};e.prototype.height=function(){return this.bottom-this.top};e.prototype.offset=function(a,c){this.left+=a;this.top+=c;this.right+=a;this.bottom+=c;return this};e.prototype.normalize=function(){var a=0;this.left>this.right&&(a=this.left,this.left=this.right,this.right=a);this.top>this.bottom&&(a=this.top,this.top=this.bottom,this.bottom=a)};e.prototype.us=function(a){return!(a.rightthis.right||a.top>this.bottom)};e.prototype.vs=function(a,c,h){return!(a.right+ cthis.right||a.top+h>this.bottom)};e.prototype.eb=function(a,c){return a>=this.left&&a<=this.right&&c>=this.top&&c<=this.bottom};e.prototype.kg=function(a){return this.left===a.left&&this.top===a.top&&this.right===a.right&&this.bottom===a.bottom};T=e;p.prototype.fh=function(a){this.$a=a.left;this.ab=a.top;this.zb=a.right;this.Ab=a.top;this.rb=a.right;this.sb=a.bottom;this.ob=a.left;this.pb=a.bottom};p.prototype.yo=function(a,c){if(0===c)this.fh(a);else{var h= Math.sin(c),d=Math.cos(c),f=a.left*h,m=a.top*h,g=a.right*h,h=a.bottom*h,k=a.left*d,b=a.top*d,y=a.right*d,d=a.bottom*d;this.$a=k-m;this.ab=b+f;this.zb=y-m;this.Ab=b+g;this.rb=y-h;this.sb=d+g;this.ob=k-h;this.pb=d+f}};p.prototype.offset=function(a,c){this.$a+=a;this.ab+=c;this.zb+=a;this.Ab+=c;this.rb+=a;this.sb+=c;this.ob+=a;this.pb+=c;return this};var v=0,w=0;p.prototype.$l=function(a){l(this.$a,this.zb,this.rb,this.ob);a.left=v;a.right=w;l(this.ab,this.Ab,this.sb,this.pb);a.top=v;a.bottom=w};p.prototype.eb= function(a,c){var h=this.$a,d=this.ab,f=this.zb-h,m=this.Ab-d,g=this.rb-h,k=this.sb-d,b=a-h,y=c-d,A=f*f+m*m,B=f*g+m*k,m=f*b+m*y,r=g*g+k*k,e=g*b+k*y,n=1/(A*r-B*B),f=(r*m-B*e)*n,A=(A*e-B*m)*n;if(0<=f&&0f+A)return!0;f=this.ob-h;m=this.pb-d;A=f*f+m*m;B=f*g+m*k;m=f*b+m*y;n=1/(A*r-B*B);f=(r*m-B*e)*n;A=(A*e-B*m)*n;return 0<=f&&0f+A};p.prototype.Fd=function(a,c){if(c)switch(a){case 0:return this.$a;case 1:return this.zb;case 2:return this.rb;case 3:return this.ob;case 4:return this.$a;default:return this.$a}else switch(a){case 0:return this.ab; case 1:return this.Ab;case 2:return this.sb;case 3:return this.pb;case 4:return this.ab;default:return this.ab}};p.prototype.Gn=function(){return(this.$a+this.zb+this.rb+this.ob)/4};p.prototype.Hn=function(){return(this.ab+this.Ab+this.sb+this.pb)/4};p.prototype.Lm=function(a){var c=a.Gn(),h=a.Hn();if(this.eb(c,h))return!0;c=this.Gn();h=this.Hn();if(a.eb(c,h))return!0;var d,f,m,g,k,b,y,A;for(y=0;4>y;y++)for(A=0;4>A;A++)if(c=this.Fd(y,!0),h=this.Fd(y,!1),d=this.Fd(y+1,!0),f=this.Fd(y+1,!1),m=a.Fd(A, !0),g=a.Fd(A,!1),k=a.Fd(A+1,!0),b=a.Fd(A+1,!1),ra(c,h,d,f,m,g,k,b))return!0;return!1};ua=p;va=function(a,c){for(var h in c)c.hasOwnProperty(h)&&(a[h]=c[h]);return a};wa=function(a,c){var h,d;c=S(c);if(!(0>c||c>=a.length)){h=c;for(d=a.length-1;hh?h:a};V=function(a){return a/(180/oa)};Da=function(a){return 180/oa*a};Ea=function(a){a%=360;0>a&&(a+=360);return a};Fa=function(a){a%=2*oa;0>a&&(a+=2*oa);return a};Ga=function(a){return Ea(Da(a))};Ha=function(a){return Fa(V(a))};Ia=function(a,c,h,d){return Math.atan2(d-c,h-a)};Ja=function(a,c){if(a===c)return 0;var h=Math.sin(a),d=Math.cos(a),f=Math.sin(c),m=Math.cos(c),h=h*f+d*m;return 1<=h?0:-1>=h?oa:Math.acos(h)}; Ka=function(a,c,h){var d=Math.sin(a),f=Math.cos(a),m=Math.sin(c),g=Math.cos(c);return Math.acos(d*m+f*g)>h?0=d*f-h*m};Ma=function(a,c,h,d){a=h-a;c=d-c;return Math.sqrt(a*a+c*c)};Na=function(a,c){return!a!==!c};Oa=function(a){for(var c in a)if(a.hasOwnProperty(c))return!0;return!1};Pa=function(a){for(var c in a)a.hasOwnProperty(c)&&delete a[c]};var n=+new Date;Qa=function(){if("undefined"!== typeof window.performance){var a=window.performance;if("undefined"!==typeof a.now)return a.now();if("undefined"!==typeof a.webkitNow)return a.webkitNow();if("undefined"!==typeof a.mozNow)return a.mozNow();if("undefined"!==typeof a.msNow)return a.msNow()}return Date.now()-n};var h=!1,m=h=!1,x=!1;"undefined"!==typeof window&&(h=/chrome/i.test(navigator.userAgent)||/chromium/i.test(navigator.userAgent),h=!h&&/safari/i.test(navigator.userAgent),m=/(iphone|ipod|ipad)/i.test(navigator.userAgent),x=window.c2ejecta); var ka=!h&&!x&&!m&&"undefined"!==typeof Set&&"undefined"!==typeof Set.prototype.forEach;q.prototype.contains=function(a){return this.nd()?!1:ka?this.Zc.has(a):this.items&&this.items.hasOwnProperty(a)};q.prototype.add=function(a){if(ka)this.Zc.has(a)||(this.Zc.add(a),this.Hd=!1);else{var c=a.toString(),h=this.items;h?h.hasOwnProperty(c)||(h[c]=a,this.Fg++,this.Hd=!1):(this.items={},this.items[c]=a,this.Fg=1,this.Hd=!1)}};q.prototype.remove=function(a){if(!this.nd())if(ka)this.Zc.has(a)&&(this.Zc["delete"](a), this.Hd=!1);else if(this.items){a=a.toString();var c=this.items;c.hasOwnProperty(a)&&(delete c[a],this.Fg--,this.Hd=!1)}};q.prototype.clear=function(){this.nd()||(ka?this.Zc.clear():(this.items=null,this.Fg=0),U(this.Tf),this.Hd=!0)};q.prototype.nd=function(){return 0===this.count()};q.prototype.count=function(){return ka?this.Zc.size:this.Fg};var E=null,la=0;q.prototype.Qt=function(){if(!this.Hd){if(ka)U(this.Tf),E=this.Tf,la=0,this.Zc.forEach(t),E=null,la=0;else{var a=this.Tf;U(a);var c,h=0,d=this.items; if(d)for(c in d)d.hasOwnProperty(c)&&(a[h++]=d[c])}this.Hd=!0}};q.prototype.ge=function(){this.Qt();return this.Tf};ba=q;new ba;Ra=function(a,c){ka?Sa(a,c.Zc):Ta(a,c.ge())};Sa=function(a,c){var h,d,f,m;d=h=0;for(f=a.length;hh&&(h=m),gf&&(f=g);this.zh=c;this.Ah=h;this.Bh=d;this.yh=f};b.prototype.fh=function(a, c,h){this.Ja.length=8;this.Ic=4;var d=this.Ja;d[0]=a.left-c;d[1]=a.top-h;d[2]=a.right-c;d[3]=a.top-h;d[4]=a.right-c;d[5]=a.bottom-h;d[6]=a.left-c;d[7]=a.bottom-h;this.Eh=a.right-a.left;this.Dh=a.bottom-a.top;this.V()};b.prototype.Lf=function(a,c,h,d,f){this.Ja.length=8;this.Ic=4;var m=this.Ja;m[0]=a.$a-c;m[1]=a.ab-h;m[2]=a.zb-c;m[3]=a.Ab-h;m[4]=a.rb-c;m[5]=a.sb-h;m[6]=a.ob-c;m[7]=a.pb-h;this.Eh=d;this.Dh=f;this.V()};b.prototype.xo=function(a){this.Ic=a.Ic;ya(this.Ja,a.Ja);this.zh=a.zh;this.Bh-a.Bh; this.Ah=a.Ah;this.yh=a.yh};b.prototype.Xe=function(a,c,h){if(this.Eh!==a||this.Dh!==c||this.em!==h){this.Eh=a;this.Dh=c;this.em=h;var d,m,f,g,k,b=0,y=1,A=this.ho,B=this.Ja;0!==h&&(b=Math.sin(h),y=Math.cos(h));h=0;for(f=this.Ic;hQ.length&&Q.push(k),this.cells[d][f]=null);if(h)for(d=h.left,m=h.right;d<=m;++d)for(f=h.top,g=h.bottom;f<= g;++f)c&&c.eb(d,f)||this.Od(d,f,!0).mk(a)};a.prototype.Pi=function(a,c){var h,d,f,m,g,k;h=this.mb(a.left);f=this.nb(a.top);d=this.mb(a.right);for(g=this.nb(a.bottom);h<=d;++h)for(m=f;m<=g;++m)(k=this.Od(h,m,!1))&&k.dump(c)};Xa=a;f.prototype.Od=function(a,c,h){var f;f=this.cells[a];return f?(f=f[c])?f:h?(f=d(this,a,c),this.cells[a][c]=f):null:h?(f=d(this,a,c),this.cells[a]={},this.cells[a][c]=f):null};f.prototype.mb=function(a){return S(a/this.Dj)};f.prototype.nb=function(a){return S(a/this.Cj)};f.prototype.update= function(a,c,h){var d,f,m,g,k;if(c)for(d=c.left,f=c.right;d<=f;++d)for(m=c.top,g=c.bottom;m<=g;++m)if(!h||!h.eb(d,m))if(k=this.Od(d,m,!1))k.remove(a),k.nd()&&(k.reset(),1E3>X.length&&X.push(k),this.cells[d][m]=null);if(h)for(d=h.left,f=h.right;d<=f;++d)for(m=h.top,g=h.bottom;m<=g;++m)c&&c.eb(d,m)||this.Od(d,m,!0).mk(a)};f.prototype.Pi=function(a,c,h,d,f){var m,g;a=this.mb(a);c=this.nb(c);h=this.mb(h);for(m=this.nb(d);a<=h;++a)for(d=c;d<=m;++d)(g=this.Od(a,d,!1))&&g.dump(f)};f.prototype.Os=function(a){var c, h,d,f,m;c=a.left;d=a.top;h=a.right;for(f=a.bottom;c<=h;++c)for(a=d;a<=f;++a)if(m=this.Od(c,a,!1))m.of=!1};Ya=f;var Q=[];c.prototype.nd=function(){return this.Qa.nd()};c.prototype.mk=function(a){this.Qa.add(a)};c.prototype.remove=function(a){this.Qa.remove(a)};c.prototype.dump=function(a){za(a,this.Qa.ge())};aa=c;var X=[];r.prototype.nd=function(){if(!this.Qa.length)return!0;if(this.Qa.length>this.Xc.count())return!1;this.Uj();return!0};r.prototype.mk=function(a){this.Xc.contains(a)?(this.Xc.remove(a), this.Xc.nd()&&(this.Zf=!1)):this.Qa.length?(this.Qa[this.Qa.length-1].Tc()>a.Tc()&&(this.of=!1),this.Qa.push(a)):(this.Qa.push(a),this.of=!0)};r.prototype.remove=function(a){this.Xc.add(a);this.Zf=!0;30<=this.Xc.count()&&this.Uj()};r.prototype.Uj=function(){this.Zf&&(this.Xc.count()===this.Qa.length?this.reset():(Ra(this.Qa,this.Xc),this.Xc.clear(),this.Zf=!1))};r.prototype.Xq=function(){this.of||(this.Qa.sort(g),this.of=!0)};r.prototype.reset=function(){U(this.Qa);this.of=!0;this.Xc.clear();this.Zf= !1};r.prototype.dump=function(a){this.Uj();this.Xq();this.Qa.length&&a.push(this.Qa)};ca=r;var G="lighter xor copy destination-over source-in destination-in source-out destination-out source-atop destination-atop".split(" ");Za=function(a){return 0>=a||11<=a?"source-over":G[a-1]};ab=function(a,c,h){if(h)switch(a.jb=h.ONE,a.fb=h.ONE_MINUS_SRC_ALPHA,c){case 1:a.jb=h.ONE;a.fb=h.ONE;break;case 3:a.jb=h.ONE;a.fb=h.ZERO;break;case 4:a.jb=h.ONE_MINUS_DST_ALPHA;a.fb=h.ONE;break;case 5:a.jb=h.DST_ALPHA;a.fb= h.ZERO;break;case 6:a.jb=h.ZERO;a.fb=h.SRC_ALPHA;break;case 7:a.jb=h.ONE_MINUS_DST_ALPHA;a.fb=h.ZERO;break;case 8:a.jb=h.ZERO;a.fb=h.ONE_MINUS_SRC_ALPHA;break;case 9:a.jb=h.DST_ALPHA;a.fb=h.ONE_MINUS_SRC_ALPHA;break;case 10:a.jb=h.ONE_MINUS_DST_ALPHA,a.fb=h.SRC_ALPHA}};bb=function(a){return Math.round(1E6*a)/1E6};cb=function(a,c){return"string"!==typeof a||"string"!==typeof c||a.length!==c.length?!1:a===c?!0:a.toLowerCase()===c.toLowerCase()};db=function(a){a=a.target;return!a||a===document||a=== window||document&&document.body&&a===document.body||cb(a.tagName,"canvas")?!0:!1}})();var Vb="undefined"!==typeof Float32Array?Float32Array:Array;function Wb(e){var p=new Vb(3);e&&(p[0]=e[0],p[1]=e[1],p[2]=e[2]);return p}function Xb(e){var p=new Vb(16);e&&(p[0]=e[0],p[1]=e[1],p[2]=e[2],p[3]=e[3],p[4]=e[4],p[5]=e[5],p[6]=e[6],p[7]=e[7],p[8]=e[8],p[9]=e[9],p[10]=e[10],p[11]=e[11],p[12]=e[12],p[13]=e[13],p[14]=e[14],p[15]=e[15]);return p} function Yb(e,p){p[0]=e[0];p[1]=e[1];p[2]=e[2];p[3]=e[3];p[4]=e[4];p[5]=e[5];p[6]=e[6];p[7]=e[7];p[8]=e[8];p[9]=e[9];p[10]=e[10];p[11]=e[11];p[12]=e[12];p[13]=e[13];p[14]=e[14];p[15]=e[15]}function Zb(e,p){var l=p[0],q=p[1];p=p[2];e[0]*=l;e[1]*=l;e[2]*=l;e[3]*=l;e[4]*=q;e[5]*=q;e[6]*=q;e[7]*=q;e[8]*=p;e[9]*=p;e[10]*=p;e[11]*=p} function $b(e,p,l,q){q||(q=Xb());var t,u,b,a,f,k,c,d,r=e[0],g=e[1];e=e[2];u=l[0];b=l[1];t=l[2];l=p[1];k=p[2];r===p[0]&&g===l&&e===k?(e=q,e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1):(l=r-p[0],k=g-p[1],c=e-p[2],d=1/Math.sqrt(l*l+k*k+c*c),l*=d,k*=d,c*=d,p=b*c-t*k,t=t*l-u*c,u=u*k-b*l,(d=Math.sqrt(p*p+t*t+u*u))?(d=1/d,p*=d,t*=d,u*=d):u=t=p=0,b=k*u-c*t,a=c*p-l*u,f=l*t-k*p,(d=Math.sqrt(b*b+a*a+f*f))?(d=1/d,b*=d,a*=d,f*=d):f=a=b=0, q[0]=p,q[1]=b,q[2]=l,q[3]=0,q[4]=t,q[5]=a,q[6]=k,q[7]=0,q[8]=u,q[9]=f,q[10]=c,q[11]=0,q[12]=-(p*r+t*g+u*e),q[13]=-(b*r+a*g+f*e),q[14]=-(l*r+k*g+c*e),q[15]=1)} (function(){function e(a,f,k){this.Sd=/msie/i.test(navigator.userAgent)||/trident/i.test(navigator.userAgent);this.height=this.width=0;this.fa=!!k;this.gi=this.zg=!1;this.Kj=0;this.sj=1;this.Bl=1E3;this.Yt=(this.Bl-this.sj)/32768;this.Aj=Wb([0,0,100]);this.nn=Wb([0,0,0]);this.Uo=Wb([0,1,0]);this.rh=Wb([1,1,1]);this.mm=!0;this.Bi=Xb();this.Wb=Xb();this.yk=Xb();this.Jj=Xb();this.r=a;this.version=0===this.r.getParameter(this.r.VERSION).indexOf("WebGL 2")?2:1;this.Hm()}function p(a,f,k){this.r=a;this.hh= f;this.name=k;this.jc=a.getAttribLocation(f,"aPos");this.Zd=a.getAttribLocation(f,"aTex");this.ln=a.getUniformLocation(f,"matP");this.wi=a.getUniformLocation(f,"matMV");this.xf=a.getUniformLocation(f,"opacity");this.Fk=a.getUniformLocation(f,"colorFill");this.mn=a.getUniformLocation(f,"samplerFront");this.Og=a.getUniformLocation(f,"samplerBack");this.Ge=a.getUniformLocation(f,"destStart");this.Fe=a.getUniformLocation(f,"destEnd");this.Qg=a.getUniformLocation(f,"seconds");this.Hk=a.getUniformLocation(f, "pixelWidth");this.Gk=a.getUniformLocation(f,"pixelHeight");this.Ng=a.getUniformLocation(f,"layerScale");this.Mg=a.getUniformLocation(f,"layerAngle");this.Rg=a.getUniformLocation(f,"viewOrigin");this.Pg=a.getUniformLocation(f,"scrollPos");this.qs=!!(this.Hk||this.Gk||this.Qg||this.Og||this.Ge||this.Fe||this.Ng||this.Mg||this.Rg||this.Pg);this.wn=this.xn=-999;this.Ai=1;this.sn=this.rn=0;this.un=this.qn=this.pn=1;this.An=this.zn=this.yn=this.Cn=this.Bn=this.tn=0;this.xk=[];this.vn=Xb();this.xf&&a.uniform1f(this.xf, 1);this.Fk&&a.uniform4f(this.Fk,1,1,1,1);this.mn&&a.uniform1i(this.mn,0);this.Og&&a.uniform1i(this.Og,1);this.Ge&&a.uniform2f(this.Ge,0,0);this.Fe&&a.uniform2f(this.Fe,1,1);this.Ng&&a.uniform1f(this.Ng,1);this.Mg&&a.uniform1f(this.Mg,0);this.Rg&&a.uniform2f(this.Rg,0,0);this.Pg&&a.uniform2f(this.Pg,0,0);this.Qg&&a.uniform1f(this.Qg,0);this.ue=!1}function l(a,f){return a[0]===f[0]&&a[1]===f[1]&&a[2]===f[2]&&a[3]===f[3]&&a[4]===f[4]&&a[5]===f[5]&&a[6]===f[6]&&a[7]===f[7]&&a[8]===f[8]&&a[9]===f[9]&& a[10]===f[10]&&a[11]===f[11]&&a[12]===f[12]&&a[13]===f[13]&&a[14]===f[14]&&a[15]===f[15]}function q(a,f){this.type=a;this.u=f;this.r=f.r;this.Uc=this.lb=this.Wn=0;this.M=this.sc=null;this.zo=[]}var t=Xb();e.prototype.Hm=function(){var a=this.r,f;this.Zm=1;this.Ae=this.Vd=null;this.Kh=1;a.clearColor(0,0,0,0);a.clear(a.COLOR_BUFFER_BIT);a.enable(a.BLEND);a.blendFunc(a.ONE,a.ONE_MINUS_SRC_ALPHA);a.disable(a.CULL_FACE);a.disable(a.STENCIL_TEST);a.disable(a.DITHER);this.fa?(a.enable(a.DEPTH_TEST),a.depthFunc(a.LEQUAL)): a.disable(a.DEPTH_TEST);this.an=a.ONE;this.Xm=a.ONE_MINUS_SRC_ALPHA;this.qj=new Float32Array(8E3*(this.fa?3:2));this.gj=new Float32Array(16E3);this.ao=new Float32Array(32E3);this.Sk=a.createBuffer();a.bindBuffer(a.ARRAY_BUFFER,this.Sk);a.bufferData(a.ARRAY_BUFFER,this.ao.byteLength,a.DYNAMIC_DRAW);this.qh=Array(4);this.mh=Array(4);for(f=0;4>f;f++)this.qh[f]=a.createBuffer(),a.bindBuffer(a.ARRAY_BUFFER,this.qh[f]),a.bufferData(a.ARRAY_BUFFER,this.qj.byteLength,a.DYNAMIC_DRAW),this.mh[f]=a.createBuffer(), a.bindBuffer(a.ARRAY_BUFFER,this.mh[f]),a.bufferData(a.ARRAY_BUFFER,this.gj.byteLength,a.DYNAMIC_DRAW);this.fd=0;this.ss=a.createBuffer();a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.ss);for(var k=new Uint16Array(12E3),c=f=0;12E3>f;)k[f++]=c,k[f++]=c+1,k[f++]=c+2,k[f++]=c,k[f++]=c+2,k[f++]=c+3,c+=4;a.bufferData(a.ELEMENT_ARRAY_BUFFER,k,a.STATIC_DRAW);this.Tk=this.Of=this.xd=0;this.ua=[];f=this.fa?"attribute highp vec3 aPos;\nattribute mediump vec2 aTex;\nvarying mediump vec2 vTex;\nuniform highp mat4 matP;\nuniform highp mat4 matMV;\nvoid main(void) {\n\tgl_Position = matP * matMV * vec4(aPos.x, aPos.y, aPos.z, 1.0);\n\tvTex = aTex;\n}": "attribute highp vec2 aPos;\nattribute mediump vec2 aTex;\nvarying mediump vec2 vTex;\nuniform highp mat4 matP;\nuniform highp mat4 matMV;\nvoid main(void) {\n\tgl_Position = matP * matMV * vec4(aPos.x, aPos.y, 0.0, 1.0);\n\tvTex = aTex;\n}";k=this.gg({src:"varying mediump vec2 vTex;\nuniform lowp float opacity;\nuniform lowp sampler2D samplerFront;\nvoid main(void) {\n\tgl_FragColor = texture2D(samplerFront, vTex);\n\tgl_FragColor *= opacity;\n}"},f,"");this.ua.push(k);k=this.gg({src:"uniform mediump sampler2D samplerFront;\nvarying lowp float opacity;\nvoid main(void) {\n\tgl_FragColor = texture2D(samplerFront, gl_PointCoord);\n\tgl_FragColor *= opacity;\n}"}, "attribute vec4 aPos;\nvarying float opacity;\nuniform mat4 matP;\nuniform mat4 matMV;\nvoid main(void) {\n\tgl_Position = matP * matMV * vec4(aPos.x, aPos.y, 0.0, 1.0);\n\tgl_PointSize = aPos.z;\n\topacity = aPos.w;\n}","");this.ua.push(k);k=this.gg({src:"varying mediump vec2 vTex;\nuniform lowp sampler2D samplerFront;\nvoid main(void) {\n\tif (texture2D(samplerFront, vTex).a < 1.0)\n\t\tdiscard;\n}"},f,"");this.ua.push(k);k=this.gg({src:"uniform lowp vec4 colorFill;\nvoid main(void) {\n\tgl_FragColor = colorFill;\n}"}, f,"");this.ua.push(k);for(var d in ac)ac.hasOwnProperty(d)&&this.ua.push(this.gg(ac[d],f,d));a.activeTexture(a.TEXTURE0);a.bindTexture(a.TEXTURE_2D,null);this.Gd=[];this.dd=0;this.ib=!1;this.jm=this.Ig=-1;this.Ze=null;this.Tj=a.createFramebuffer();this.Mh=this.Qi=null;this.Yl=!1;this.fa&&(this.Mh=a.createRenderbuffer());this.fe=Wb([0,0,0]);this.Dn=a.getParameter(a.ALIASED_POINT_SIZE_RANGE)[1];2048"===b.name&&a.vertexAttribPointer(b.jc,4,a.FLOAT,!1,0,0));if(0"!==b.name&& a.vertexAttribPointer(b.jc,this.fa?3:2,a.FLOAT,!1,0,0);a.bindBuffer(a.ARRAY_BUFFER,this.mh[this.fd]);a.bufferSubData(a.ARRAY_BUFFER,0,this.gj.subarray(0,this.Of));b&&0<=b.Zd&&""!==b.name&&a.vertexAttribPointer(b.Zd,2,a.FLOAT,!1,0,0)}for(var e,a=0,b=this.dd;ae||0>c)){var d=this.Jb();d.type=7;d.lb=1;d.M||(d.M=Xb());d.M[0]=a;d.M[1]=b;d.M[2]=e;d.M[3]=c;this.ib=!1}};e.prototype.to=function(a){if(this.fa&&(a=!!a,this.zg!==a)){var b=this.Jb();b.type=14;b.lb=a?1:0;this.ib=!1;this.zg=a;this.Qi=null;this.zg?this.yb(2): this.yb(0)}};e.prototype.so=function(a){if(this.fa){var b=this.Jb();b.type=13;b.lb=a?1:0;this.ib=!1}};e.prototype.um=function(){Yb(this.yk,t);this.pc();this.Zb();var a=this.width/2,b=this.height/2;this.ah(-a,b,a,b,a,-b,-a,-b);Yb(t,this.Wb);this.Zb()};e.prototype.ro=function(a,b,e){this.yb(3);var c=this.Jb();c.type=12;c.M||(c.M=Xb());c.M[0]=a;c.M[1]=b;c.M[2]=e;c.M[3]=1;this.ib=!1};e.prototype.Ft=function(){this.yb(0)};e.prototype.ut=function(){this.yb(2)};e.prototype.mt=function(){this.Md();this.r.flush()}; var u=[],b={};e.prototype.pq=function(){U(u);b={}};e.prototype.kn=function(a,f,e){var c;c=!1;f=!!f;var d=a.src+","+c+","+f+(c?",undefined":""),r=null;if("undefined"!==typeof a.src&&b.hasOwnProperty(d))return r=b[d],r.Ch++,r;this.Md();var g=this.r,v=fa(a.width)&&fa(a.height),r=g.createTexture();g.bindTexture(g.TEXTURE_2D,r);g.pixelStorei(g.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0);var p=g.RGBA,n=g.RGBA,h=g.UNSIGNED_BYTE;if(e&&!this.Sd)switch(e){case 1:n=p=g.RGB;break;case 2:h=g.UNSIGNED_SHORT_4_4_4_4;break; case 3:h=g.UNSIGNED_SHORT_5_5_5_1;break;case 4:n=p=g.RGB,h=g.UNSIGNED_SHORT_5_6_5}if(1===this.version&&!v&&c){e=document.createElement("canvas");e.width=ga(a.width);e.height=ga(a.height);var m=e.getContext("2d");"undefined"!==typeof m.imageSmoothingEnabled?m.imageSmoothingEnabled=f:(m.webkitImageSmoothingEnabled=f,m.mozImageSmoothingEnabled=f,m.msImageSmoothingEnabled=f);m.drawImage(a,0,0,a.width,a.height,0,0,e.width,e.height);g.texImage2D(g.TEXTURE_2D,0,p,n,h,e)}else g.texImage2D(g.TEXTURE_2D,0, p,n,h,a);c?(g.texParameteri(g.TEXTURE_2D,g.TEXTURE_WRAP_S,g.REPEAT),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_WRAP_T,g.REPEAT)):(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));f?(g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MAG_FILTER,g.LINEAR),(v||2<=this.version)&&this.mm?(g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MIN_FILTER,g.LINEAR_MIPMAP_LINEAR),g.generateMipmap(g.TEXTURE_2D)):g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MIN_FILTER, g.LINEAR)):(g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MAG_FILTER,g.NEAREST),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MIN_FILTER,g.NEAREST));g.bindTexture(g.TEXTURE_2D,null);this.Vd=null;r.le=a.width;r.ke=a.height;r.Ch=1;r.dm=d;u.push(r);return b[d]=r};e.prototype.Qb=function(a,b,e,c){this.Md();var d=this.r;this.Sd&&(c=!1);var r=d.createTexture();d.bindTexture(d.TEXTURE_2D,r);d.texImage2D(d.TEXTURE_2D,0,d.RGBA,a,b,0,d.RGBA,c?d.UNSIGNED_SHORT_4_4_4_4:d.UNSIGNED_BYTE,null);d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_S, d.CLAMP_TO_EDGE);d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_T,d.CLAMP_TO_EDGE);d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,e?d.LINEAR:d.NEAREST);d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,e?d.LINEAR:d.NEAREST);d.bindTexture(d.TEXTURE_2D,null);this.Vd=null;r.le=a;r.ke=b;u.push(r);return r};e.prototype.Vt=function(a,b,e){this.Md();var c=this.r;this.Sd&&(e=!1);c.bindTexture(c.TEXTURE_2D,b);c.pixelStorei(c.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0);try{c.texImage2D(c.TEXTURE_2D,0,c.RGBA,c.RGBA, e?c.UNSIGNED_SHORT_4_4_4_4:c.UNSIGNED_BYTE,a)}catch(d){console&&console.error&&console.error("Error updating WebGL texture: ",d)}c.bindTexture(c.TEXTURE_2D,null);this.Vd=null};e.prototype.deleteTexture=function(a){a&&("undefined"!==typeof a.Ch&&1=c?a[3]:256>=c?a[2]:512>=c?a[1]:a[0]}function l(){try{return!!window.indexedDB}catch(a){return!1}}function q(a){a.target.result.createObjectStore("saves",{keyPath:"slot"})}function t(a,c,h,d){try{var b=indexedDB.open("_C2SaveStates"); b.onupgradeneeded=q;b.onerror=d;b.onsuccess=function(b){b=b.target.result;b.onerror=d;b.transaction(["saves"],"readwrite").objectStore("saves").put({slot:a,data:c}).onsuccess=h}}catch(m){d(m)}}function u(a,c,h){try{var d=indexedDB.open("_C2SaveStates");d.onupgradeneeded=q;d.onerror=h;d.onsuccess=function(d){d=d.target.result;d.onerror=h;var b=d.transaction(["saves"]).objectStore("saves").get(a);b.onsuccess=function(){b.result?c(b.result.data):c(null)}}}catch(b){h(b)}}function b(){z("Reloading for continuous preview"); window.c2cocoonjs?CocoonJS.App.reload():-1m?(m*=c,5===g?(f=m*h/this.Ia,1f&&(f=1/Math.ceil(1/f)),m=this.Ia*f/h,f=this.Ha*f/h,d=(a-m)/2,b=(c-f)/2,a=m,c=f):(d=(a-m)/2,a=m)):(f=a/m,5===g?(f=f*h/this.Ha,1f&&(f=1/Math.ceil(1/f)),m=this.Ia*f/h,f=this.Ha*f/h,d=(a-m)/2,b=(c-f)/2,a=m):b=(c-f)/2,c=f)):this.ji&&this.Bg&&0===this.vm&&(d=Math.floor((a- this.Ia)/2),b=Math.floor((c-this.Ha)/2),a=this.Ia,c=this.Ha),2>g&&(this.ag=h),this.Ih=Math.round(a),this.ig=Math.round(c),this.width=Math.round(a*h),this.height=Math.round(c*h),this.Z=!0,this.dp?(this.H=this.width,this.G=this.height,this.Tb=!0):this.widthm&&(this.G=this.H/g)):3===g&&(m=this.Ia/this.Ha,g=this.vf/ this.uf,g>m?this.H=this.G*g:gd;)d++,a=r.shift(),this.vo(a[0],a[1])};e.prototype.Wt=function(a,h){a.cocoonLazyLoad=!0;a.onerror=function(h){c=a.cm=!0;console&&console.error&&console.error("Error loading image '"+a.src+"': ",h)};this.Dc?a.src=h:a.src||("undefined"!==typeof XAPKReader?XAPKReader.get(h,function(c){a.src=c},function(d){c=a.cm=!0;console&&console.error&&console.error("Error extracting image '"+h+"' from expansion file: ", d)}):(a.crossOrigin="anonymous",this.pt(a,h)));this.Vf.push(a)};e.prototype.Ir=function(a){var c,h;c=0;for(h=this.Vf.length;c=f)f=5E4;a+=f;m.src&&(m.complete||m.loaded)&&!m.cm?c+=f:d=!1}d&&this.kt&&this.bg&&(v||(this.bg.Cv(),v=!0),h=this.bg.mv(),c+=h, hthis.Yd&&(this.gc||500<=d&&this.gn!=this.Hc)){a.clearRect(0,0,m,g);var d=m/2,g=g/2,m=0===this.Yd&&this.Xd.yi.complete, e=40*h,n=0,r=80*h,x;if(m){var v=this.Xd.yi,r=v.width*h;x=v.height*h;e=r/2;n=x/2;a.drawImage(v,S(d-e),S(g-n),r,x)}1>=this.Yd?(d=S(d-e)+.5,g=S(g+(n+(m?12*h:0)))+.5,a.fillStyle=c?"red":"DodgerBlue",a.fillRect(d,g,Math.floor(r*this.Hc),6*h),a.strokeStyle="black",a.strokeRect(d,g,r,6*h),a.strokeStyle="white",a.strokeRect(d-1*h,g-1*h,r+2*h,8*h)):2===this.Yd&&(a.font=this.Dc?"12pt ArialMT":"12pt Arial",a.fillStyle=c?"#f00":"#999",a.Ev="middle",h=Math.round(100*this.Hc)+"%",m=a.measureText?a.measureText(h): null,a.fillText(h,d-(m?m.width:0)/2,g));this.gn=this.Hc}else if(4===this.Yd){this.Tq(a);f?f(function(){b.go()}):setTimeout(function(){b.go()},16);return}}setTimeout(function(){b.go()},this.gc?10:100)}}};var n=-1,h="undefined"===typeof cr_is_preview?200:0,m=!0,x=!1,ka=0,E=0,la="undefined"===typeof cr_is_preview?3E3:0,Q=null,X=null,G=0;e.prototype.Tq=function(a){if(!w){for(var d=Math.ceil(this.width),b=Math.ceil(this.height),g=this.Xd.yi,f=this.Xd.jt,e=this.Xd.Xt,r=0;4>r;++r)if(!g[r].complete||!f[r].complete|| !e[r].complete)return;0===G&&(n=Date.now());var r=Date.now(),v=!1,k=a,l,t;m||x?(a.clearRect(0,0,d,b),Q&&Q.width===d&&Q.height===b||(Q=document.createElement("canvas"),Q.width=d,Q.height=b,X=Q.getContext("2d")),k=X,v=!0,m&&1===G&&(n=Date.now())):a.globalAlpha=1;k.fillStyle="#333333";k.fillRect(0,0,d,b);256=la&&!x&&1<=this.Hc&&(x=!0,E=r);if(x&&r-E>=300+h||"undefined"!==typeof cr_is_preview&&1<=this.Hc&&500>Date.now()-n)w=!0,x=m=!1,this.Xd=X=Q=null;++G}};e.prototype.ns=function(){this.Wa&&(this.canvas.parentNode.removeChild(this.Wa),this.Wa=this.Rk=null);this.$i=Date.now();this.Ce=Qa();var a,c,h;if(this.zl)for(a=0,c=this.n.length;aa||2===this.tb&&cc&&(c=0),this.oe=c/=1E3,.51/this.In&&(this.oe=1/this.In));this.ni=a;this.cf=this.oe*this.Qf;this.Vb.add(this.cf); this.rj.add(c);a=(document.mozFullScreen||document.webkitIsFullScreen||document.fullScreen||!!document.msFullscreenElement||this.Bg)&&!this.hc;2<=this.tb||a&&0c||2===d&&ha++;)this.lm(this.me);a=0;for(c=this.kd.length;a< c;a++)this.kd[a].jk=!1;this.S.re&&this.S.re.Ba();U(this.bh);this.Ec++;a=0;for(c=this.n.length;ac.Lh.length&&c.Lh.push(a)};e.prototype.hm=function(a,c,h,d){if(a.L){var b=S(Math.random()*a.Af.length);return this.hm(a.Af[b],c,h,d)}return a.ec?this.Kd(a.ec,c,!1,h,d,!1):null};var L=[];e.prototype.Kd=function(a,c,h,d,b,m){var g,f,e,n;if(!a)return null; var r=this.n[a[1]],x=r.ma.Ud;if(this.qf&&x&&!r.sk||x&&!this.u&&11===a[0][11])return null;var v=c;x||(c=null);var k;r.Lh.length?(k=r.Lh.pop(),k.Xb=!0,r.ma.wa.call(k,r)):(k=new r.ma.wa(r),k.Xb=!1);!h||m||this.rd.hasOwnProperty(a[2].toString())?k.uid=this.Ug++:k.uid=a[2];this.rd[k.uid.toString()]=k;k.io=this.Mn++;k.ve=r.i.length;g=0;for(f=this.Bc.length;ga&&(a=0);a>=this.S.K.length&&(a=this.S.K.length-1);return this.S.K[a]};e.prototype.Gj=function(a){var c,h;c=0;for(h=a.length;c=b;)g=1/b,b*=2,a.x+=c*g*(m?1:-1),a.y+=h*g*(m?1:-1),a.p(),this.Mb(a,d)?g=m=!0:(g=m=!1,f=a.x,e=a.y);g&&(a.x=f,a.y=e,a.p())};e.prototype.jo=function(a,c){var h=ea(c)?100:c,d=0,b=a.x,g=a.y,m=0,f=0,e=0,n=this.Za(a);if(!n)return!0;for(;d<=h;){switch(m){case 0:f= 0;e=-1;d++;break;case 1:f=1;e=-1;break;case 2:f=1;e=0;break;case 3:e=f=1;break;case 4:f=0;e=1;break;case 5:f=-1;e=1;break;case 6:f=-1;e=0;break;case 7:e=f=-1}m=(m+1)%8;a.x=S(b+f*d);a.y=S(g+e*d);a.p();if(!this.Mb(a,n)&&(n=this.Za(a),!n))return!0}a.x=b;a.y=g;a.p();return!1};e.prototype.Gf=function(a,c){a.ed&&c.ed&&this.bh.push([a,c])};e.prototype.nq=function(a,c){var h,d,b;h=0;for(d=this.bh.length;hn;n++)if(r=m-n*v,a.x=c+Math.cos(r)*g,a.y=h+Math.sin(r)*g,a.p(),!this.Mb(a,e)&&(e=this.Za(a),!e)){k=r;break}36===n&&(k=Fa(m+oa));e=f;for(n=1;36>n;n++)if(r=m+n*v,a.x=c+Math.cos(r)*g,a.y=h+Math.sin(r)*g,a.p(),!this.Mb(a,e)&&(e=this.Za(a),!e)){x=r;break}36===n&&(x=Fa(m+oa));a.x=d;a.y=b;a.p();if(x===k)return x;a=Ja(x,k)/2;a=La(x,k)?Fa(k+a+oa):Fa(x+a);k=Math.cos(m);m=Math.sin(m); x=Math.cos(a);a=Math.sin(a);c=k*x+m*a;return Ia(0,0,k-2*c*x,m-2*c*a)};var ha=-1;e.prototype.trigger=function(a,c,h){if(!this.S)return!1;var d=this.S.re;if(!d)return!1;var b=!1,g,m,f;ha++;var e=d.Mj;m=0;for(f=e.length;m=this.Ik.length&&this.Ik.push([])};e.prototype.ht= function(){this.xi--};e.prototype.ym=function(){return this.Ik[this.xi]};e.prototype.Oi=function(a){this.Oh++;this.Oh>=this.Pj.length&&this.Pj.push(new Gb);var c=this.hb();c.reset(a);return c};e.prototype.Li=function(){this.Oh--};e.prototype.hb=function(){return this.Pj[this.Oh]};e.prototype.zm=function(a,c){for(var h,d,b,g,m,f;c;){h=0;for(d=c.rc.length;hg||g>=a.Da.length||(m=b[d],null===m&&(m=NaN),a.Da[g]=m));if(e.Ud){g=c.w;a.j.P!==g.l&&(b=a.j,a.j=this.S.Zh(g.l),a.j?(b.Hf(a,!0),a.j.$f(a,!0),a.p(),a.j.eh(0)):(a.j=b,h||this.Te(a)));a.x=g.x;a.y=g.y;a.width=g.w;a.height=g.h;a.Nc=g.zi;a.k=g.hasOwnProperty("a")?g.a:0;a.opacity=g.hasOwnProperty("o")?g.o:1;a.Gb=g.hasOwnProperty("hX")? g.hX:.5;a.Hb=g.hasOwnProperty("hY")?g.hY:.5;a.visible=g.hasOwnProperty("v")?g.v:!0;a.ed=g.hasOwnProperty("ce")?g.ce:!0;a.Tg=g.hasOwnProperty("mts")?g.mts:-1;a.cb=g.hasOwnProperty("bm")?g.bm:0;a.eg=Za(a.cb);this.r&&ab(a,a.cb,this.r);a.p();if(g.hasOwnProperty("fx"))for(h=0,b=g.fx.length;hm||(a.Bd[m]=g.fx[h].active,a.ra[m]=g.fx[h].params);a.Mc()}if(f=c.behs)for(d in f)f.hasOwnProperty(d)&&(h=this.Lr(a,parseInt(d,10)),0>h||a.I[h].ic(f[d]));c.data&&a.ic(c.data)};e.prototype.qm= function(a,c,h){window.resolveLocalFileSystemURL(cordova.file.applicationDirectory+"www/"+a,function(a){a.file(c,h)},h)};e.prototype.Gr=function(a,c){this.qm("data.js",function(h){var d=new FileReader;d.onload=function(c){a(c.target.result)};d.onerror=c;d.readAsText(h)},c)};var qa=[],I=0;e.prototype.Jk=function(){if(qa.length&&!(8<=I)){I++;var a=qa.shift();this.Aq(a.filename,a.Kt,a.Yq)}};e.prototype.Fr=function(a,c,h){var d=this;qa.push({filename:a,Kt:function(a){I--;d.Jk();c(a)},Yq:function(a){I--; d.Jk();h(a)}});this.Jk()};e.prototype.Aq=function(a,c,h){this.qm(a,function(a){var h=new FileReader;h.onload=function(a){c(a.target.result)};h.readAsArrayBuffer(a)},h)};e.prototype.Hr=function(a,c,h){var d="",b=a.toLowerCase(),g=b.substr(b.length-4),b=b.substr(b.length-5);".mp4"===g?d="video/mp4":".webm"===b?d="video/webm":".m4a"===g?d="audio/mp4":".mp3"===g&&(d="audio/mpeg");this.Fr(a,function(a){a=URL.createObjectURL(new Blob([a],{type:d}));c(a)},h)};e.prototype.ws=function(a){return/^(?:[a-z]+:)?\/\//.test(a)|| "data:"===a.substr(0,5)||"blob:"===a.substr(0,5)};e.prototype.vo=function(a,c){this.Qm&&!this.ws(c)?this.Hr(c,function(c){a.src=c},function(a){alert("Failed to load image: "+a)}):a.src=c};e.prototype.Ui=function(a,c){"undefined"!==typeof a.imageSmoothingEnabled?a.imageSmoothingEnabled=c:(a.webkitImageSmoothingEnabled=c,a.mozImageSmoothingEnabled=c,a.msImageSmoothingEnabled=c)};Ib=function(a){return new e(document.getElementById(a))};Jb=function(a,c){return new e({dc:!0,width:a,height:c})};window.cr_createRuntime= Ib;window.cr_createDCRuntime=Jb;window.createCocoonJSRuntime=function(){window.c2cocoonjs=!0;var a=document.createElement("screencanvas")||document.createElement("canvas");a.xh=!0;document.body.appendChild(a);a=new e(a);window.c2runtime=a;window.addEventListener("orientationchange",function(){window.c2runtime.setSize(window.innerWidth,window.innerHeight)});window.c2runtime.setSize(window.innerWidth,window.innerHeight);return a};window.createEjectaRuntime=function(){var a=new e(document.getElementById("canvas")); window.c2runtime=a;window.c2runtime.setSize(window.innerWidth,window.innerHeight);return a}})();window.cr_getC2Runtime=function(){var e=document.getElementById("c2canvas");return e?e.c2runtime:window.c2runtime?window.c2runtime:null};window.cr_getSnapshot=function(e,p){var l=window.cr_getC2Runtime();l&&l.wq(e,p)};window.cr_sizeCanvas=function(e,p){if(0!==e&&0!==p){var l=window.cr_getC2Runtime();l&&l.setSize(e,p)}};window.cr_setSuspended=function(e){var p=window.cr_getC2Runtime();p&&p.setSuspended(e)}; (function(){function e(a,d){this.b=a;this.re=null;this.scrollX=this.b.Ia/2;this.scrollY=this.b.Ha/2;this.scale=1;this.k=0;this.gf=!0;this.name=d[0];this.dt=d[1];this.ct=d[2];this.width=d[1];this.height=d[2];this.So=d[3];this.Ao=d[4];this.P=d[5];var b=d[6],g,f;this.K=[];this.xg=[];g=0;for(f=b.length;g=this.K.length&&(h=this.K.length-1);k.j=this.K[h];-1===k.j.i.indexOf(k)&&k.j.i.push(k);k.j.Se=!0}if(!b)for(a=0,f=this.K.length;af?k.siblings.push(n.i[f]):n.ec&&(e=this.b.Kd(n.ec,k.j,!0,k.x,k.y,!0),this.b.bb(),n.mj(),k.siblings.push(e),u.push(e)));a=0;for(f=this.Qd.length;a< f;a++)k=this.Qd[a],d=this.b.n[k[1]],d.wb||this.b.Kd(this.Qd[a],null,!0);this.b.me=null;this.b.bb();if(this.b.qa&&!this.b.la)for(a=0,f=this.b.n.length;athis.width- d&&(a=this.width-d);athis.height-d&&(a=this.height-d);aA&&(A=0);0>F&&(F=0);R>H&&(R=H);N>M&&(N=M);0>B&&(B=0);0>C&&(C=0);sa>H&&(sa=H);ta>M&&(ta=M);I.left=A/H;I.top=1-F/M;I.right=R/H;I.bottom=1-N/M}else I.left=y.left=0,I.top=y.top=0,I.right=y.right=1,I.bottom=y.bottom=1;ma=b&&(a.Yg(f[0].Ca)||0!==u||0!==ma||1!==b.opacity||b.type.ma.Jn)||d&&!b&& 1!==d.opacity;a.qo();if(ma){l[J]||(l[J]=a.Qb(H,M,this.b.ya));if(l[J].le!==H||l[J].ke!==M)a.deleteTexture(l[J]),l[J]=a.Qb(H,M,this.b.ya);a.yb(0);a.qc(l[J]);P=ta-C;a.clearRect(B,M-C-P,sa-B,P);b?b.Sb(a):(a.Yb(this.b.Ea),a.Jf(d.opacity),a.pc(),a.translate(-ha,-qa),a.Zb(),a.ae(A,N,R,N,R,F,A,F,I));y.left=y.top=0;y.right=y.bottom=1;b&&(G=I.top,I.top=I.bottom,I.bottom=G);J=1;L=0}a.Jf(1);u=f.length-1;var $a=a.Wk(f[u].Ca)||!d&&!b&&!this.b.Tb;t=G=0;for(q=f.length;tb||(d&&this.$b&&a.xb&&a.xb.right>=a.xb.left&&(a.V(),this.Xa.update(a,a.xb,null),a.xb.set(0,0,-1,-1)),b===this.i.length-1?this.i.pop():(wa(this.i,b),this.eh(b)),this.Jc=!0)};l.prototype.$f=function(a,d){a.Nc= this.i.length;this.i.push(a);d&&this.$b&&a.xb&&a.p();this.Jc=!0};l.prototype.lt=function(a){this.i.unshift(a);this.eh(0)};l.prototype.Rs=function(a,d,b){var g=a.Tc();d=d.Tc();wa(this.i,g);gthis.ea||b.top>this.da||(d.globalCompositeOperation=a.eg,a.Rc(d))}};l.prototype.nj=function(){this.jd=!0;var a=this.Sa(0,0,!0,!0),d=this.Sa(0,0,!1,!0);this.jd=!1;this.b.sd&&(a=Math.round(a),d=Math.round(d));this.Ri(a, d,null)};l.prototype.Ri=function(a,d,b){var g=this.ub();this.W=a;this.X=d;this.ea=a+1/g*this.b.H;this.da=d+1/g*this.b.G;this.W>this.ea&&(a=this.W,this.W=this.ea,this.ea=a);this.X>this.da&&(a=this.X,this.X=this.da,this.da=a);a=this.Eb();0!==a&&(b&&(b.translate(this.b.H/2,this.b.G/2),b.rotate(-a),b.translate(this.b.H/-2,this.b.G/-2)),this.wd.set(this.W,this.X,this.ea,this.da),this.wd.offset((this.W+this.ea)/-2,(this.X+this.da)/-2),this.Oo.yo(this.wd,a),this.Oo.$l(this.wd),this.wd.offset((this.W+this.ea)/ 2,(this.X+this.da)/2),this.W=this.wd.left,this.X=this.wd.top,this.ea=this.wd.right,this.da=this.wd.bottom)};l.prototype.bf=function(a){if(this.Yc=this.Vh){this.b.Ea||(this.b.Ea=a.Qb(this.b.H,this.b.G,this.b.ya));if(this.b.Ea.le!==this.b.H||this.b.Ea.ke!==this.b.G)a.deleteTexture(this.b.Ea),this.b.Ea=a.Qb(this.b.H,this.b.G,this.b.ya);a.qc(this.b.Ea)}this.jd=!0;var d=this.Sa(0,0,!0,!0),b=this.Sa(0,0,!1,!0);this.jd=!1;this.b.sd&&(d=Math.round(d),b=Math.round(b));this.Ri(d,b,null);d=this.ub();a.pc(); a.scale(d,d);a.Si(-this.Eb());a.translate((this.W+this.ea)/-2,(this.X+this.da)/-2);a.Zb();this.$b?(this.Ua.left=this.Xa.mb(this.W),this.Ua.top=this.Xa.nb(this.X),this.Ua.right=this.Xa.mb(this.ea),this.Ua.bottom=this.Xa.nb(this.da),this.Jc||!this.Ua.kg(this.wf)?(t(this.pd),d=this.ek(),this.Jc=!1,this.wf.fg(this.Ua)):d=this.pd):d=this.i;for(var g,f=null,b=d.length-1;0<=b;--b)g=d[b],g!==f&&(this.Rq(d[b],a),f=g);this.$b&&(this.pd=d);this.Lc||(this.Hj=this.b.pe++,a.Vi(this.Hj),a.ro(1,1,1),a.um(),a.ut())}; l.prototype.Sb=function(a){var b=0,f=0;if(this.Yc=this.Vh||1!==this.opacity||0this.ea||f.top>this.da||(b.Vi(a.pe),a.bp?this.Sq(a,b):(b.yb(0),b.be(a.jb,a.fb),a.Sb(b)))}};l.prototype.Rq=function(a,b){if(a.visible&&0!==a.width&&0!==a.height){a.V();var f=a.ia;f.rightthis.ea||f.top>this.da||(a.pe=this.b.pe++,0===a.cb&&1===a.opacity&& a.td&&a.bf&&(b.Vi(a.pe),a.bf(b)))}};l.prototype.Sq=function(a,b){var f=a.R[0].Ca,g=a.R[0].index,e=this.ub();if(1!==a.R.length||b.Wk(f)||b.nt(f)||(a.k||a.j.Eb())&&b.Yg(f)||1!==a.opacity||a.type.ma.Jn)this.Fa.al(b,this,a,this.Yc?this.b.Ea:this.Fa.rg()),b.pc(),b.scale(e,e),b.Si(-this.Eb()),b.translate((this.W+this.ea)/-2,(this.X+this.da)/-2),b.Zb();else{b.yb(f);b.be(a.jb,a.fb);b.Mi(f)&&(this.b.Z=!0);var k=0,n=0,h=0,m=0;b.Yg(f)&&(m=a.ia,k=this.ba(m.left,m.top,!0,!0),n=this.ba(m.left,m.top,!1,!0),h=this.ba(m.right, m.bottom,!0,!0),m=this.ba(m.right,m.bottom,!1,!0),k=k/windowWidth,n=1-n/windowHeight,h=h/windowWidth,m=1-m/windowHeight);var x;a.Ta&&a.Ta.Ra?(x=a.Ta.Ra,f=1/x.width,x=1/x.height):(f=1/a.width,x=1/a.height);b.Kf(this.Yc?this.b.Ea:this.Fa.rg(),f,x,k,n,h,m,e,this.Eb(),this.W,this.X,(this.W+this.ea)/2,(this.X+this.da)/2,this.b.Vb.oa,a.ra[g]);a.Sb(b)}};l.prototype.Sa=function(a,b,f,g){var e=this.b.devicePixelRatio;this.b.xe&&(a*=e,b*=e);var e=this.b.Xn,k=this.b.Yn,e=(this.Fa.scrollX-e)*this.mc+e,k=(this.Fa.scrollY- k)*this.nc+k,n=e,h=k,m=1/this.ub(!g);g?(n-=this.b.H*m/2,h-=this.b.G*m/2):(n-=this.b.width*m/2,h-=this.b.height*m/2);n+=a*m;h+=b*m;b=this.Eb();0!==b&&(n-=e,h-=k,a=Math.cos(b),b=Math.sin(b),g=n*a-h*b,h=h*a+n*b,n=g+e,h+=k);return f?n:h};l.prototype.ba=function(a,b,f,g){var e=this.b.Xn,k=this.b.Yn,n=(this.Fa.scrollX-e)*this.mc+e,h=(this.Fa.scrollY-k)*this.nc+k,k=n,e=h,m=this.Eb();if(0!==m){a-=n;b-=h;var x=Math.cos(-m),m=Math.sin(-m),p=a*x-b*m;b=b*x+a*m;a=p+n;b+=h}n=1/this.ub(!g);g?(k-=this.b.H*n/2,e-= this.b.G*n/2):(k-=this.b.width*n/2,e-=this.b.height*n/2);k=(a-k)/n;e=(b-e)/n;a=this.b.devicePixelRatio;this.b.xe&&!g&&(k/=a,e/=a);return f?k:e};l.prototype.Kb=function(){var a,b,f,g={s:this.scale,a:this.k,vl:this.W,vt:this.X,vr:this.ea,vb:this.da,v:this.visible,bc:this.zc,t:this.Lc,px:this.mc,py:this.nc,o:this.opacity,zr:this.Oc,fx:[],cg:this.hg,instances:[]};a=0;for(b=this.J.length;aa[1].index&&(b=a[0],a[0]=a[1],a[1]=b):2=v.length&&(v.length=a.length+1);v[a.length]||(v[a.length]=[]);g=v[a.length];b=0;for(c=g.length;b=b.length&&(b.length=this.He+1),b[this.He]=a):this.data=a};d.prototype.bi=function(){var a=this.b.ym();return!this.parent||this.Eg||!a||this.ki?this.data:this.He>=a.length||"undefined"===typeof a[this.He]?this.ei:a[this.He]};d.prototype.Ba=function(){!this.parent||this.Eg||this.ki||this.Oe(this.ei)};Hb=d;r.prototype.toString=function(){return"include:"+this.wg.toString()};r.prototype.za=function(){this.wg=this.b.Qj[this.rs];this.sheet.Gm.add(this); this.na=l(this.na);for(var a=this.parent;a;)a.group&&a.Hh.push(this),a=a.parent;this.Vo()};r.prototype.Ba=function(){this.parent&&this.b.$g(this.b.n);this.wg.jk||this.wg.Ba(!0);this.parent&&this.b.Ke(this.b.n)};r.prototype.Vo=function(){for(var a=this.parent;a;){if(a.group&&!a.tg){this.Ob=!1;return}a=a.parent}this.Ob=!0};Rb=r;g.prototype.reset=function(a){this.Rb=a;this.ac=this.La=0;U(this.Ho);this.Nj=this.Be=!1};Gb=g})(); (function(){function e(b,a){this.lc=b;this.b=b.b;this.type=a[0];this.get=[this.or,this.kr,this.Ar,this.Dr,this.Zq,this.Br,this.sr,this.hr,this.rr,this.yr,this.$q,this.xr,this.ir,this.tr,this.pr,this.qr,this.lr,this.mr,this.gr,this.Cr,this.ur,this.nr,this.fr,this.jr][this.type];var f=null;this.qd=this.N=this.ta=this.Va=this.hj=this.second=this.first=this.value=null;this.Ac=-1;this.Cc=null;this.cp=-1;this.se=this.ph=null;this.If=!1;switch(this.type){case 0:case 1:case 2:this.value=a[1];break;case 3:this.first= new Pb(b,a[1]);break;case 18:this.first=new Pb(b,a[1]);this.second=new Pb(b,a[2]);this.hj=new Pb(b,a[3]);break;case 19:this.Va=this.b.Ad(a[1]);this.Va!==Y.prototype.gb.random&&this.Va!==Y.prototype.gb.oq||this.lc.wo();this.ta=[];this.N=[];3===a.length?(f=a[2],this.ta.length=f.length+1):this.ta.length=1;break;case 20:this.qd=this.b.n[a[1]];this.Ac=-1;this.Va=this.b.Ad(a[2]);this.If=a[3];Tb.Function&&this.Va===Tb.Function.prototype.gb.eu&&this.lc.wo();a[4]?this.Cc=new Pb(b,a[4]):this.Cc=null;this.ta= [];this.N=[];6===a.length?(f=a[5],this.ta.length=f.length+1):this.ta.length=1;break;case 21:this.qd=this.b.n[a[1]];this.If=a[2];a[3]?this.Cc=new Pb(b,a[3]):this.Cc=null;this.cp=a[4];break;case 22:this.qd=this.b.n[a[1]];this.qd.Xh(a[2]);this.Ac=this.qd.Yj(a[2]);this.Va=this.b.Ad(a[3]);this.If=a[4];a[5]?this.Cc=new Pb(b,a[5]):this.Cc=null;this.ta=[];this.N=[];7===a.length?(f=a[6],this.ta.length=f.length+1):this.ta.length=1;break;case 23:this.ph=a[1],this.se=null}this.lc.Qs(this.qd);4<=this.type&&17>= this.type&&(this.first=new Pb(b,a[1]),this.second=new Pb(b,a[2]));if(f){var e,c;e=0;for(c=f.length;e=a||t<=-a)t%=a;0>t&&(t+=a);d.apply(v[t],f)};e.prototype.fr=function(b){var a=this.qd,f=this.ta,e=this.N,c=this.Cc,d=this.Ac,t=this.Va,g=this.lc.ud,v=a.Q(),q=v.Fb();if(!q.length)if(v.O.length)q=v.O;else{this.If?b.Ya(""):b.ca(0);return}f[0]=b;b.Je=a;b=p();l(e,f,b);c&&(c.get(b),b.Pa()&&(g=b.data,q=a.i));--u;e=q.length;if(g>=e||g<=-e)g%=e;0>g&&(g+=e);g=q[g];q=0;a.L&&(q=g.type.ff[a.ld]);t.apply(g.I[d+q],f)};e.prototype.nr=function(b){var a=this.Cc,f=this.qd,e=this.cp,c=this.lc.ud, d=f.Q(),l=d.Fb();if(!l.length)if(d.O.length)l=d.O;else{this.If?b.Ya(""):b.ca(0);return}if(a){d=p();a.get(d);if(d.Pa()){c=d.data;l=f.i;0!==l.length&&(c%=l.length,0>c&&(c+=l.length));c=f.ck(c);f=c.Da[e];O(f)?b.Ya(f):b.F(f);--u;return}--u}a=l.length;if(c>=a||c<=-a)c%=a;0>c&&(c+=a);c=l[c];l=0;f.L&&(l=c.type.Ph[f.ld]);f=c.Da[e+l];O(f)?b.Ya(f):b.F(f)};e.prototype.or=function(b){b.type=W.Ve;b.data=this.value};e.prototype.kr=function(b){b.type=W.Ue;b.data=this.value};e.prototype.Ar=function(b){b.type=W.String; b.data=this.value};e.prototype.Dr=function(b){this.first.get(b);b.Pa()&&(b.data=-b.data)};e.prototype.Zq=function(b){this.first.get(b);var a=p();this.second.get(a);b.Pa()&&a.Pa()&&(b.data+=a.data,a.nf()&&b.yf());--u};e.prototype.Br=function(b){this.first.get(b);var a=p();this.second.get(a);b.Pa()&&a.Pa()&&(b.data-=a.data,a.nf()&&b.yf());--u};e.prototype.sr=function(b){this.first.get(b);var a=p();this.second.get(a);b.Pa()&&a.Pa()&&(b.data*=a.data,a.nf()&&b.yf());--u};e.prototype.hr=function(b){this.first.get(b); var a=p();this.second.get(a);b.Pa()&&a.Pa()&&(b.data/=a.data,b.yf());--u};e.prototype.rr=function(b){this.first.get(b);var a=p();this.second.get(a);b.Pa()&&a.Pa()&&(b.data%=a.data,a.nf()&&b.yf());--u};e.prototype.yr=function(b){this.first.get(b);var a=p();this.second.get(a);b.Pa()&&a.Pa()&&(b.data=Math.pow(b.data,a.data),a.nf()&&b.yf());--u};e.prototype.$q=function(b){this.first.get(b);var a=p();this.second.get(a);a.pf()||b.pf()?this.cr(b,a):this.br(b,a);--u};e.prototype.cr=function(b,a){b.pf()&& a.pf()?this.er(b,a):this.dr(b,a)};e.prototype.er=function(b,a){b.data+=a.data};e.prototype.dr=function(b,a){b.pf()?b.data+=(Math.round(1E10*a.data)/1E10).toString():b.Ya(b.data.toString()+a.data)};e.prototype.br=function(b,a){b.ca(b.data&&a.data?1:0)};e.prototype.xr=function(b){this.first.get(b);var a=p();this.second.get(a);b.Pa()&&a.Pa()&&(b.data||a.data?b.ca(1):b.ca(0));--u};e.prototype.gr=function(b){this.first.get(b);b.data?this.second.get(b):this.hj.get(b)};e.prototype.ir=function(b){this.first.get(b); var a=p();this.second.get(a);b.ca(b.data===a.data?1:0);--u};e.prototype.tr=function(b){this.first.get(b);var a=p();this.second.get(a);b.ca(b.data!==a.data?1:0);--u};e.prototype.pr=function(b){this.first.get(b);var a=p();this.second.get(a);b.ca(b.dataa.data?1:0);--u};e.prototype.mr=function(b){this.first.get(b); var a=p();this.second.get(a);b.ca(b.data>=a.data?1:0);--u};e.prototype.jr=function(b){var a=this.se.bi();D(a)?b.F(a):b.Ya(a)};Pb=e;q.prototype.nf=function(){return this.type===W.Ue};q.prototype.Pa=function(){return this.type===W.Ve||this.type===W.Ue};q.prototype.pf=function(){return this.type===W.String};q.prototype.yf=function(){this.nf()||(this.pf()&&(this.data=parseFloat(this.data)),this.type=W.Ue)};q.prototype.ca=function(b){this.type=W.Ve;this.data=Math.floor(b)};q.prototype.F=function(b){this.type= W.Ue;this.data=b};q.prototype.Ya=function(b){this.type=W.String;this.data=b};q.prototype.Gt=function(b){D(b)?(this.type=W.Ue,this.data=b):O(b)?(this.type=W.String,this.data=b.toString()):(this.type=W.Ve,this.data=0)};Ob=q;W={Ve:0,Ue:1,String:2}})();function Y(e){this.b=e;this.Nb=[]} Y.prototype.Kb=function(){var e={},p,l,q,t,u,b,a,f;e.waits=[];var k=e.waits,c;p=0;for(l=this.Nb.length;p=f+c)return a.C.Every_lastTime=f+c,e>=a.C.Every_lastTime+.04&&(a.C.Every_lastTime=e),a.C.Every_seconds= b,!0;eb&&(b=0);this.b.Qf=b};var t=[],u=[];p.prototype.Np=function(){var b,a,f;b=0;for(a=this.b.uj.length;bc&&(a=c);b.F(a)};l.prototype.cf=function(b){b.F(this.b.cf)};l.prototype.Qf=function(b){b.F(this.b.Qf)};l.prototype.time=function(b){b.F(this.b.Vb.oa)};l.prototype.ad=function(b){b.ca(this.b.ad)}; l.prototype.Fi=function(b){b.ca(this.b.Fi)};l.prototype.Vj=function(b){b.ca(this.b.Vj)};l.prototype.k=function(b,a,f,e,c){b.F(Da(Ia(a,f,e,c)))};l.prototype.Ks=function(b){b.ca(this.b.S.width)};l.prototype.Js=function(b){b.ca(this.b.S.height)};l.prototype.left=function(b,a,f){b.Ya(O(a)?a.substr(0,f):"")};l.prototype.right=function(b,a,f){b.Ya(O(a)?a.substr(a.length-f):"")};l.prototype.replace=function(b,a,f,e){O(a)&&O(f)&&O(e)?b.Ya(a.replace(new RegExp(Va(f),"gi"),e)):b.Ya(O(a)?a:"")};l.prototype.trim= function(b,a){b.Ya(O(a)?a.trim():"")};l.prototype.oq=function(b){var a=S(Math.random()*(arguments.length-1));b.Gt(arguments[a+1])};l.prototype.Ij=function(b){b.F(this.b.Ij/1E3)};l.prototype.vi=function(b){b.F(this.b.vi)};q.gb=new l;q.yt=function(){var b,a,f,e,c,d,l=this.b.hb();b=0;for(f=this.Nb.length;bthis.b.Vb.oa)continue;l.Rb=e.lg;l.ac=e.ac;l.La=0;for(a in e.Lb)e.Lb.hasOwnProperty(a)&&(c=this.b.n[parseInt(a,10)].Q(),d=e.Lb[a], c.aa=d.no,ya(c.i,d.we),c=d,U(c.we),u.push(c));e.lg.wt();this.b.Gj(e.na);e.km=!0}a=b=0;for(f=this.Nb.length;ba.ea||b.top>a.da)},c.su=function(){this.V();var a=this.ia,b=this.b.S;return 0>a.right||0>a.bottom||a.left>b.width||a.top>b.height},c.Eu=function(a,b,c){var d=this.Q(), h=d.Fb();if(!h.length)return!1;var f=h[0],e=f,k=Ma(f.x,f.y,b,c),l,p,t;l=1;for(p=h.length;lk)k=t,e=f;d.Xg(e);return!0},d.Xu=function(a){this.x!==a&&(this.x=a,this.p())},d.Yu=function(a){this.y!==a&&(this.y=a,this.p())},d.Tu=function(a,b){if(this.x!==a||this.y!==b)this.x=a,this.y=b,this.p()},d.Uu=function(a,b){var c=a.Sr(this);if(c){var d;c.bk?(d=c.bk(b,!0),c=c.bk(b,!1)):(d=c.x,c=c.y);if(this.x!==d||this.y!==c)this.x=d,this.y=c,this.p()}},d.xu= function(a){0!==a&&(this.x+=Math.cos(this.k)*a,this.y+=Math.sin(this.k)*a,this.p())},d.wu=function(a,b){0!==b&&(this.x+=Math.cos(V(a))*b,this.y+=Math.sin(V(a))*b,this.p())},r.Xp=function(a){a.F(this.x)},r.Yp=function(a){a.F(this.y)},r.cf=function(a){a.F(this.b.Yh(this))});u&&(c.iu=function(a,b){return Sb(this.width,a,b)},c.fu=function(a,b){return Sb(this.height,a,b)},d.Rp=function(a){this.width!==a&&(this.width=a,this.p())},d.Qu=function(a){this.height!==a&&(this.height=a,this.p())},d.Vu=function(a, b){if(this.width!==a||this.height!==b)this.width=a,this.height=b,this.p()},r.bv=function(a){a.F(this.width)},r.nu=function(a){a.F(this.height)},r.bu=function(a){this.V();a.F(this.ia.left)},r.du=function(a){this.V();a.F(this.ia.top)},r.cu=function(a){this.V();a.F(this.ia.right)},r.au=function(a){this.V();a.F(this.ia.bottom)});b&&(c.fp=function(a,b){return Ja(this.k,V(b))<=V(a)},c.op=function(a){return La(this.k,V(a))},c.np=function(a,b){var c=Ha(a),d=Ha(b),h=Fa(this.k);return La(d,c)?La(h,c)&&!La(h, d):!(!La(h,c)&&La(h,d))},d.Mu=function(a){a=V(Ea(a));isNaN(a)||this.k===a||(this.k=a,this.p())},d.Iu=function(a){0===a||isNaN(a)||(this.k+=V(a),this.k=Fa(this.k),this.p())},d.Ju=function(a){0===a||isNaN(a)||(this.k-=V(a),this.k=Fa(this.k),this.p())},d.Ku=function(a,b){var c=Ka(this.k,V(b),V(a));isNaN(c)||this.k===c||(this.k=c,this.p())},d.Lu=function(a,b,c){a=Ka(this.k,Math.atan2(c-this.y,b-this.x),V(a));isNaN(a)||this.k===a||(this.k=a,this.p())},d.Wu=function(a,b){var c=Math.atan2(b-this.y,a-this.x); isNaN(c)||this.k===c||(this.k=c,this.p())},r.$t=function(a){a.F(Ga(this.k))});q||(c.gu=function(a,b,c){return Sb(this.Da[a],b,c)},c.pu=function(a){return this.Da[a]},c.Fu=function(a,b){var c=this.Q(),d=c.Fb();if(!d.length)return!1;var h=d[0],f=h,e=h.Da[b],k,l,p;k=1;for(l=d.length;ke)e=p,f=h;c.Xg(f);return!0},c.Du=function(a){var b,c,d,f,e;if(this.b.Zj().ok){e=this.Q();if(e.aa)for(e.aa=!1,U(e.i),U(e.O),d=this.i,b=0,c=d.length;ba?a=0:1f.j.index||d.j.index===f.j.index&&d.Tc()>f.Tc())f=d}else if(d.j.indexc)){var d=1===a;this.Bd[c]!==d&&(this.Bd[c]=d,this.Mc(),this.b.Z=!0)}}},d.Pu=function(a,b,c){if(this.b.u){var d=this.type.ak(a);0>d||(a=this.type.J[d],d=this.ra[d],b=Math.floor(b),0>b||b>=d.length||(1===this.b.u.Vr(a.Ca,b)&&(c/=100),d[b]!==c&&(d[b]=c,a.Ob&&(this.b.Z=!0))))}})};yb=function(){this.Bj=this.xj=!0;this.type.vh=!0;this.b.Z=!0;var e,l,q=this.yj;e=0;for(l=q.length;eq;case 5:return e>=q;default:return!1}}})();var ac={};function ec(e){this.b=e} (function(){function e(){}function p(){}var l=ec.prototype;l.Ka=function(e){this.ma=e;this.b=e.b};l.Ka.prototype.Y=function(){};l.wa=function(e){this.type=e;this.b=e.b};var q=l.wa.prototype;q.Y=function(){this.b.la?z("[Construct 2] Button plugin not supported on this platform - the object will not be created"):(this.kf=1===this.D[0],this.fc=document.createElement("input"),this.U=this.kf?document.createElement("label"):this.fc,this.Hg=null,this.fc.type=this.kf?"checkbox":"button",this.fc.id=this.D[6], jQuery(this.U).appendTo(this.b.Fh?this.b.Fh:"body"),this.kf?(jQuery(this.fc).appendTo(this.U),this.Hg=document.createTextNode(this.D[1]),jQuery(this.U).append(this.Hg),this.fc.checked=0!==this.D[7],jQuery(this.U).css("font-family","sans-serif"),jQuery(this.U).css("display","inline-block"),jQuery(this.U).css("color","black")):this.fc.value=this.D[1],this.U.title=this.D[2],this.fc.disabled=0===this.D[4],this.fq=0!==this.D[5],this.qe=!1,0===this.D[3]&&(jQuery(this.U).hide(),this.visible=!1,this.qe=!0), this.fc.onclick=function(e){return function(l){l.stopPropagation();e.b.Vc=!0;e.b.trigger(ec.prototype.m.El,e);e.b.Vc=!1}}(this),this.U.addEventListener("touchstart",function(e){e.stopPropagation()},!1),this.U.addEventListener("touchmove",function(e){e.stopPropagation()},!1),this.U.addEventListener("touchend",function(e){e.stopPropagation()},!1),jQuery(this.U).mousedown(function(e){e.stopPropagation()}),jQuery(this.U).mouseup(function(e){e.stopPropagation()}),jQuery(this.U).keydown(function(e){e.stopPropagation()}), jQuery(this.U).keyup(function(e){e.stopPropagation()}),this.cn=this.dn=this.Wm=this.$m=this.bn=this.Ym=0,this.Zo(!0),this.b.nl(this))};q.Kb=function(){var e={tooltip:this.U.title,disabled:!!this.fc.disabled};this.kf?(e.checked=!!this.fc.checked,e.text=this.Hg.nodeValue):e.text=this.U.value;return e};q.ic=function(e){this.U.title=e.tooltip;this.fc.disabled=e.disabled;this.kf?(this.fc.checked=e.checked,this.Hg.nodeValue=e.text):this.U.value=e.text};q.Df=function(){this.b.la||(jQuery(this.U).remove(), this.U=null)};q.tc=function(){this.Zo()};q.Zo=function(e){if(!this.b.la){var l=this.j.ba(this.x,this.y,!0),b=this.j.ba(this.x,this.y,!1),a=this.j.ba(this.x+this.width,this.y+this.height,!0),f=this.j.ba(this.x+this.width,this.y+this.height,!1),k=this.b.width/this.b.devicePixelRatio,c=this.b.height/this.b.devicePixelRatio;!this.visible||!this.j.visible||0>=a||0>=f||l>=k||b>=c?(this.qe||jQuery(this.U).hide(),this.qe=!0):(1>l&&(l=1),1>b&&(b=1),a>=k&&(a=k-1),f>=c&&(f=c-1),k=window.innerWidth,c=window.innerHeight, e||this.Ym!==l||this.bn!==b||this.$m!==a||this.Wm!==f||this.dn!==k||this.cn!==c?(this.Ym=l,this.bn=b,this.$m=a,this.Wm=f,this.dn=k,this.cn=c,this.qe&&(jQuery(this.U).show(),this.qe=!1),e=Math.round(l)+jQuery(this.b.canvas).offset().left,k=Math.round(b)+jQuery(this.b.canvas).offset().top,jQuery(this.U).css("position","absolute"),jQuery(this.U).offset({left:e,top:k}),jQuery(this.U).width(Math.round(a-l)),jQuery(this.U).height(Math.round(f-b)),this.fq&&jQuery(this.U).css("font-size",this.j.ub(!0)/this.b.devicePixelRatio- .2+"em")):this.qe&&(jQuery(this.U).show(),this.qe=!1))}};q.Rc=function(){};q.Sb=function(){};e.prototype.El=function(){return!0};l.m=new e;p.prototype.Nl=function(e){this.b.la||(this.kf?this.Hg.nodeValue=e:this.U.value=e)};p.prototype.Ol=function(e){this.b.la||(this.visible=0!==e)};l.xa=new p;l.gb=new function(){}})();function dc(e){this.b=e} (function(){function e(){if(0===this.Lj.length){var a=document.createElement("canvas");a.width=this.width;a.height=this.height;var b=a.getContext("2d");this.Mf?b.drawImage(this.Ra,this.Bf,this.Cf,this.width,this.height,0,0,this.width,this.height):b.drawImage(this.Ra,0,0,this.width,this.height);this.Lj=a.toDataURL("image/png")}return this.Lj}function p(){}function l(a){a[0]=0;a[1]=0;a[2]=0;d.push(a)}function q(a,b){return athis.B&&(this.B=0);this.B>=this.ja.frames.length&&(this.B=this.ja.frames.length-1);var a=this.ja.frames[this.B];this.T.gh(a.Ki);this.Gb=a.Gb;this.Hb=a.Hb;this.Ye=this.ja.speed;this.Ld=this.ja.cl;1===this.type.Bb.length&&1===this.type.Bb[0].frames.length||0===this.Ye||this.b.nl(this);this.Xb?this.Pc.reset():this.Pc=new Ua;this.md=this.Pc.oa;this.ie=!0;this.cd=0;this.he=!0;this.Fj=this.Vl="";this.mq=0;this.Ej=-1;this.type.Ms();var b,c,d,f,e,g,k,a=0;for(b=this.type.Bb.length;athis.B&&(this.B=0);this.B>=this.ja.frames.length&&(this.B=this.ja.frames.length-1);this.Ye=a.cas;this.md=a.fs;this.cd=a.ar;this.Pc.reset();this.Pc.oa=a.at;this.ie=a.hasOwnProperty("ap")?a.ap:!0;this.he=a.hasOwnProperty("af")?a.af:!0;a.hasOwnProperty("rt")?this.Ld=a.rt:this.Ld=this.ja.cl;this.Ta=this.ja.frames[this.B];this.Jh=this.Ta.yd;this.T.gh(this.Ta.Ki);this.Gb=this.Ta.Gb;this.Hb=this.Ta.Hb};c.wj=function(a){this.B= a?0:this.ja.frames.length-1;this.ie=!1;this.Vl=this.ja.name;this.b.trigger(dc.prototype.m.vp,this);this.b.trigger(dc.prototype.m.up,this);this.cd=0};c.xh=function(){return this.Pc.oa};c.tc=function(){this.Pc.add(this.b.Yh(this));this.Fj.length&&this.xq();0<=this.Ej&&this.yq();var a=this.Pc.oa,b=this.ja,c=b.frames[this.B],d=c.duration/this.Ye;this.ie&&a>=this.md+d&&(this.he?this.B++:this.B--,this.md+=d,this.B>=b.frames.length&&(b.Zn?(this.he=!1,this.B=b.frames.length-2):b.loop?this.B=this.Ld:(this.cd++, this.cd>=b.bl?this.wj(!1):this.B=this.Ld)),0>this.B&&(b.Zn?(this.B=1,this.he=!0,b.loop||(this.cd++,this.cd>=b.bl&&this.wj(!0))):b.loop?this.B=this.Ld:(this.cd++,this.cd>=b.bl?this.wj(!0):this.B=this.Ld)),0>this.B?this.B=0:this.B>=b.frames.length&&(this.B=b.frames.length-1),a>this.md+b.frames[this.B].duration/this.Ye&&(this.md=a),a=b.frames[this.B],this.We(c,a),this.b.Z=!0)};c.wm=function(a){var b,c,d;b=0;for(c=this.type.Bb.length;bthis.B&&(this.B=0),this.B>=this.ja.frames.length&&(this.B=this.ja.frames.length-1),1===this.mq&&(this.B=0),this.ie=!0,this.md=this.Pc.oa,this.he=!0,this.We(a,this.ja.frames[this.B]),this.b.Z=!0)};c.yq=function(){var a=this.ja.frames[this.B], b=this.B;this.B=S(this.Ej);0>this.B&&(this.B=0);this.B>=this.ja.frames.length&&(this.B=this.ja.frames.length-1);b!==this.B&&(this.We(a,this.ja.frames[this.B]),this.md=this.Pc.oa,this.b.Z=!0);this.Ej=-1};c.We=function(a,b){var c=a.width,d=a.height,f=b.width,e=b.height;c!=f&&(this.width*=f/c);d!=e&&(this.height*=e/d);this.Gb=b.Gb;this.Hb=b.Hb;this.T.gh(b.Ki);this.p();this.Ta=b;this.Jh=b.yd;c=0;for(d=this.I.length;cf||f>=d.length)return b?this.x:this.y;var e=(d[f][1]-c.Gb)*this.width,d=d[f][2],d=(d-c.Hb)*this.height,c=Math.cos(this.k);f=Math.sin(this.k);var g=e*c-d*f,d=d*c+e*f,e=g+this.x,d=d+this.y;return b?e:d};var d=[],r=-2,g=[];p.prototype.xp=function(a){if(!a)return!1;var c=this.b,d=c.Zj(),f=d.type,e=null;d.C.collmemory?e=d.C.collmemory:(e={},d.C.collmemory=e); d.C.spriteCreatedDestroyCallback||(d.C.spriteCreatedDestroyCallback=!0,c.Tl(function(a){var b=d.C.collmemory;a=a.uid;var c,f;for(c in b)b.hasOwnProperty(c)&&(f=b[c],f[0]===a||f[1]===a)&&(l(b[c]),delete b[c])}));var k=f.Q(),p=a.Q(),k=k.Fb(),q,v,w,J,L,K,P,H=this.b.ad,M=H-1,ha=c.hb().Rb;for(v=0;va.ea||b.top>a.da)this.b.u.deleteTexture(this.Ib),this.Wc=this.Ie=this.Ib=null}};u.Df=function(){this.Wc=this.Ie=null;this.b.u&&this.Ib&& this.b.u.deleteTexture(this.Ib);this.Ib=null};u.xh=function(){this.font=this.Uh+" "+this.Zg.toString()+"pt "+this.df;this.Re=!0;this.b.Z=!0};u.Rc=function(a,b){a.font=this.font;a.textBaseline="top";a.fillStyle=this.color;a.globalAlpha=b?1:this.opacity;var c=1;b&&(c=Math.abs(this.j.ub()),a.save(),a.scale(c,c));if(this.Re||this.width!==this.Ak)this.type.ma.Vp(this.text,this.Wd,a,this.width,this.Al),this.Re=!1,this.Ak=this.width;this.V();var c=b?0:this.qb.$a,d=b?0:this.qb.ab;this.b.sd&&(c=c+.5|0,d=d+ .5|0);0===this.k||b||(a.save(),a.translate(c,d),a.rotate(this.k),d=c=0);var e=d+this.height,g=this.Yk,g=g+this.Ck,l,p;1===this.oj?d+=Math.max(this.height/2-this.Wd.length*g/2,0):2===this.oj&&(d+=Math.max(this.height-this.Wd.length*g-2,0));for(p=0;p=e-g);p++);(0!==this.k||b)&&a.restore();this.Jg=this.b.ad};u.Sb=function(a){if(!(1>this.width|| 1>this.height)){var b=this.Re||this.Ln;this.Ln=!1;var c=this.j.ub(),d=this.j.Eb(),e=this.Ff,g=c*this.width,l=c*this.height,p=Math.ceil(g),n=Math.ceil(l),h=Math.abs(p),m=Math.abs(n),t=this.b.H/2,q=this.b.G/2;this.Ie||(this.Wc=document.createElement("canvas"),this.Wc.width=h,this.Wc.height=m,this.pi=h,this.oi=m,b=!0,this.Ie=this.Wc.getContext("2d"));if(h!==this.pi||m!==this.oi)this.Wc.width=h,this.Wc.height=m,this.Ib&&(a.deleteTexture(this.Ib),this.Ib=null),b=!0;b&&(this.Ie.clearRect(0,0,h,m),this.Rc(this.Ie, !0),this.Ib||(this.Ib=a.Qb(h,m,this.b.ya,this.b.Td)),a.Vt(this.Wc,this.Ib,this.b.Td));this.pi=h;this.oi=m;a.Yb(this.Ib);a.Jf(this.opacity);a.pc();a.translate(-t,-q);a.Zb();var u=this.qb,b=this.j.ba(u.$a,u.ab,!0,!0),h=this.j.ba(u.$a,u.ab,!1,!0),m=this.j.ba(u.zb,u.Ab,!0,!0),t=this.j.ba(u.zb,u.Ab,!1,!0),q=this.j.ba(u.rb,u.sb,!0,!0),la=this.j.ba(u.rb,u.sb,!1,!0),Q=this.j.ba(u.ob,u.pb,!0,!0),u=this.j.ba(u.ob,u.pb,!1,!0);if(this.b.sd||0===this.k&&0===d)var X=(b+.5|0)-b,G=(h+.5|0)-h,b=b+X,h=h+G,m=m+X,t= t+G,q=q+X,la=la+G,Q=Q+X,u=u+G;0===this.k&&0===d?(m=b+p,t=h,q=m,la=h+n,Q=b,u=la,e.right=1,e.bottom=1):(e.right=g/p,e.bottom=l/n);a.ae(b,h,m,t,q,la,Q,u,e);a.pc();a.scale(c,c);a.Si(-this.j.Eb());a.translate((this.j.W+this.j.ea)/-2,(this.j.X+this.j.da)/-2);a.Zb();this.Jg=this.b.ad}};var b=[];t.Up=function(a){U(b);for(var e="",c,d=0;d=d)p(b);else{if(100>=a.length&&-1===a.indexOf("\n")){var g=c.measureText(a).width;if(g<=d){p(b);b.push(e());b[0].text=a;b[0].width=g;return}}this.Wp(a,b,c,d,l)}else p(b)};t.Wp=function(f,k,c,d,p){p&&(this.Up(f),f=b);var g="",t,q,n,h=0;for(n=0;n=k.length&&k.push(e()),g=l(g),q=k[h],q.text=g,q.width=c.measureText(g).width,h++,g=""):(t= g,g+=f[n],q=c.measureText(g).width,q>=d&&(h>=k.length&&k.push(e()),t=l(t),q=k[h],q.text=t,q.width=c.measureText(t).width,h++,g=f[n],p||" "!==g||(g="")));g.length&&(h>=k.length&&k.push(e()),g=l(g),q=k[h],q.text=g,q.width=c.measureText(g).width,h++);for(n=h;na&&(a=Math.round(1E10*a)/1E10);a=a.toString();this.text!==a&&(this.text=a,this.Re=!0,this.b.Z=!0)};t.xa=new q;t.gb=new function(){}})(); function Z(e){this.b=e} (function(){function e(a){k=a.x;c=a.y;d=a.z}function p(a,b,c,d){var e;e=r.length?r.pop():new l;e.init(a,b,c,d);return e}function l(){this.kh=this.id=this.Ee=this.De=this.y=this.x=this.bj=this.aj=this.zk=this.time=this.kl=0;this.nh=this.kj=!1}function q(a){return a.sourceCapabilities&&a.sourceCapabilities.firesTouchEvents||a.originalEvent&&a.originalEvent.sourceCapabilities&&a.originalEvent.sourceCapabilities.firesTouchEvents}function t(){}function u(){}var b=Z.prototype;b.Ka=function(a){this.ma=a; this.b=a.b};b.Ka.prototype.Y=function(){};b.wa=function(a){this.type=a;this.b=a.b;this.touches=[];this.Kk=!1};var a=b.wa.prototype,f={left:0,top:0};a.pg=function(a){var b,c;b=0;for(c=this.touches.length;bMa(this.aj,this.bj,this.x,this.y)&&(this.kj=!0,a.bd=this.kh,a.Rf=this.id,a.jf=b,a.b.trigger(Z.prototype.m.Cp,a),a.gd=this.x,a.hd=this.y,a.b.trigger(Z.prototype.m.Dp,a),a.jf=0)};var g=-1E3,v=-1E3,w=-1E4;l.prototype.Fn=function(a, b){if(!this.kj){var c=Qa();333>=c-this.kl&&!this.nh&&15>Ma(this.aj,this.bj,this.x,this.y)&&(a.bd=this.kh,a.Rf=this.id,a.jf=b,666>=c-w&&25>Ma(g,v,this.x,this.y)?(a.b.trigger(Z.prototype.m.zp,a),a.gd=this.x,a.hd=this.y,a.b.trigger(Z.prototype.m.Ap,a),v=g=-1E3,w=-1E4):(a.b.trigger(Z.prototype.m.Lp,a),a.gd=this.x,a.hd=this.y,a.b.trigger(Z.prototype.m.Mp,a),g=this.x,v=this.y,w=c),a.jf=0)}};a.Y=function(){this.Es=!("undefined"===typeof window.c2isWindows8||!window.c2isWindows8);this.jf=this.Rf=this.bd= this.hd=this.gd=this.Rl=this.Ql=this.Pl=this.aq=this.$p=this.Zp=this.Ji=this.Ii=this.Hi=0;this.Tt=0!==this.D[0];var a=0c-b.time||b.update(c,a.pageX-d.left,a.pageY-d.top,a.width||0,a.height||0,a.pressure||0)}}};a.Sn=function(a){if(a.pointerType!==a.MSPOINTER_TYPE_MOUSE&&"mouse"!==a.pointerType){a.preventDefault&&db(a)&&a.preventDefault();var b=this.b.la?f:jQuery(this.b.canvas).offset(),c=a.pageX-b.left,b=a.pageY-b.top;Qa(); this.bd=this.touches.length;this.Rf=a.pointerId;this.touches.push(p(c,b,a.pointerId,this.bd));this.b.Vc=!0;this.b.trigger(Z.prototype.m.Il,this);this.b.trigger(Z.prototype.m.Ml,this);this.gd=c;this.hd=b;this.b.trigger(Z.prototype.m.Ll,this);this.b.Vc=!1}};a.Gi=function(a,b){if(a.pointerType!==a.MSPOINTER_TYPE_MOUSE&&"mouse"!==a.pointerType){a.preventDefault&&db(a)&&a.preventDefault();var c=this.pg(a.pointerId);this.bd=0<=c?this.touches[c].kh:-1;this.Rf=0<=c?this.touches[c].id:-1;this.b.Vc=!0;this.b.trigger(Z.prototype.m.Hl, this);this.b.trigger(Z.prototype.m.Kl,this);0<=c&&(b||this.touches[c].Fn(this,c),100>r.length&&r.push(this.touches[c]),this.touches.splice(c,1));this.b.Vc=!1}};a.Un=function(a){a.preventDefault&&a.preventDefault();var b=Qa(),c,d,e,g;c=0;for(d=a.changedTouches.length;cb-g.time||g.update(b,e.pageX-k.left,e.pageY-k.top,2*(e.xv||e.Hv||e.rv||e.uv||0),2*(e.yv||e.Iv||e.sv||e.vv|| 0),e.jv||e.Gv||e.qv||e.tv||0)}};a.Vn=function(a){a.preventDefault&&db(a)&&a.preventDefault();var b=this.b.la?f:jQuery(this.b.canvas).offset();Qa();this.b.Vc=!0;var c,d,e,g;c=0;for(d=a.changedTouches.length;cr.length&&r.push(this.touches[e]),this.touches.splice(e,1));this.b.Vc=!1};a.xh=function(){return this.b.hc&&0===this.Hi&&0!==d?90*d:this.Hi}; a.iv=function(){return this.b.hc&&0===this.Ii&&0!==c?90*c:this.Ii};a.ov=function(){return this.b.hc&&0===this.Ji&&0!==k?90*k:this.Ji};a.Ys=function(a){q(a)||(this.Vn({changedTouches:[{pageX:a.pageX,pageY:a.pageY,identifier:0}]}),this.Kk=!0)};a.Zs=function(a){this.Kk&&!q(a)&&this.Un({changedTouches:[{pageX:a.pageX,pageY:a.pageY,identifier:0}]})};a.$s=function(a){a.preventDefault&&this.b.Dm&&!this.b.Td&&a.preventDefault();this.b.Dm=!0;q(a)||(this.Pk({changedTouches:[{pageX:a.pageX,pageY:a.pageY,identifier:0}]}), this.Kk=!1)};a.ml=function(){var a,b,c,d=Qa();a=0;for(b=this.touches.length;ac||c>=this.touches.length)a.F(0);else{var d,e,f,g,k;ea(b)?(d=this.b.qg(0),e=d.scale,f=d.Oc,g=d.mc,k=d.k,d.scale=1,d.Oc=1,d.mc=1,d.k=0,a.F(d.Sa(this.touches[c].x,this.touches[c].y,!0)),d.scale=e,d.Oc=f,d.mc=g,d.k=k):(d=D(b)?this.b.qg(b):this.b.dk(b))?a.F(d.Sa(this.touches[c].x,this.touches[c].y,!0)):a.F(0)}};u.prototype.Yp=function(a,b){var c=this.jf;if(0>c||c>=this.touches.length)a.F(0);else{var d,e,f,g,k;ea(b)?(d=this.b.qg(0), e=d.scale,f=d.Oc,g=d.nc,k=d.k,d.scale=1,d.Oc=1,d.nc=1,d.k=0,a.F(d.Sa(this.touches[c].x,this.touches[c].y,!1)),d.scale=e,d.Oc=f,d.nc=g,d.k=k):(d=D(b)?this.b.qg(b):this.b.dk(b))?a.F(d.Sa(this.touches[c].x,this.touches[c].y,!1)):a.F(0)}};b.gb=new u})();function gc(e){this.b=e} (function(){function e(){}function p(){}function l(){}var q=gc.prototype;q.Ka=function(a){this.ma=a;this.b=a.b};q.Ka.prototype.Y=function(){};q.wa=function(a){this.type=a;this.b=a.b};var t=q.wa.prototype,u="",b="undefined"!==typeof window.is_scirra_arcade;b&&(u="arcade"+window.scirra_arcade_id);var a=!1;try{localStorage.getItem("test"),a=!0}catch(f){a=!1}t.Y=function(){a||z("[Construct 2] Webstorage plugin: local storage is not supported on this platform.")};e.prototype.sp=function(b){return a?null!= localStorage.getItem(u+b):!1};e.prototype.Jp=function(){return!0};q.m=new e;p.prototype.Tp=function(b,c){if(a)try{localStorage.setItem(u+b,c)}catch(d){this.b.trigger(gc.prototype.m.Jp,this)}};q.xa=new p;l.prototype.tp=function(b,c){a?b.Ya(localStorage.getItem(u+c)||""):b.Ya("")};l.prototype.Cl=function(e){if(a){var c={},d,f,g;d=0;for(f=localStorage.length;dp&&(p=0),this.q=Math.cos(t)*p,this.A=Math.sin(t)*p);0!==this.Db&&(this.A+=this.Db*e);this.De=this.d.x;this.Ee=this.d.y;if(0!==this.q||0!==this.A)if(this.d.x+=this.q*e,this.d.y+=this.A*e,this.jj+=Ma(0,0,this.q*e,this.A*e),this.hl&&(this.d.k=Ia(0,0,this.q,this.A),this.d.p(),this.tf=this.d.k),this.d.p(),this.iq&&(p=this.b.Za(this.d)))this.b.Gf(this.d,p),p=Ma(0,0,this.q,this.A),t=this.b.lq(this.d,this.De,this.Ee),this.q=Math.cos(t)*p,this.A=Math.sin(t)*p,this.d.x+=this.q*e,this.d.y+=this.A* e,this.d.p(),this.hl&&(this.tf=this.d.k=t,this.d.p()),this.b.oc(this.d,this.q/p,this.A/p,Math.max(2.5*p*e,30))||this.b.jo(this.d,100)}};e.m=new function(){};e.xa=new function(){};e.gb=new function(){}})();function ic(e){this.b=e} (function(){function e(){}function p(){}var l=ic.prototype;l.Ka=function(e){this.behavior=e;this.b=e.b};l.Ka.prototype.Y=function(){};l.wa=function(e,l){this.type=e;this.behavior=e.behavior;this.d=l;this.b=e.b;this.ih=this.Yi=this.Xi=this.kk=this.dg=this.jg=this.rf=this.sf=this.dh=this.Kg=!1;this.kb=null;this.Dk=-1;this.ze=this.ye=0;this.Th=!1;this.ef=this.yc=0;this.Sh=!0;this.A=this.q=0};var q=l.wa.prototype;q.Yo=function(){this.Na=Math.cos(this.hf);this.Oa=Math.sin(this.hf);this.Le=Math.cos(this.hf- Math.PI/2);this.Me=Math.sin(this.hf-Math.PI/2);this.Na=bb(this.Na);this.Oa=bb(this.Oa);this.Le=bb(this.Le);this.Me=bb(this.Me);this.Xj=this.Db;0>this.Db&&(this.Na*=-1,this.Oa*=-1,this.Db=Math.abs(this.Db))};q.Y=function(){this.zf=this.D[0];this.vc=this.D[1];this.$e=this.D[2];this.Gg=this.D[3];this.Xj=this.Db=this.D[4];this.Ci=this.D[5];this.Oj=0!==this.D[6];this.wk=this.D[7]/1E3;this.uq=1===this.D[8];this.enabled=0!==this.D[9];this.Wf=!1;this.Xf=this.b.ee(this.d);this.Ek=-1;this.Qe=0;this.hf=V(90); this.Yo();var e=this;this.uq&&!this.b.la&&(jQuery(document).keydown(function(l){e.Ws(l)}),jQuery(document).keyup(function(l){e.Xs(l)}));this.Xb||(this.Kn=function(l){e.Vs(l)});this.b.Tl(this.Kn);this.d.C.isPlatformBehavior=!0};q.Kb=function(){return{ii:this.kk,lfx:this.ye,lfy:this.ze,lfo:this.kb?this.kb.uid:-1,am:this.yc,en:this.enabled,fall:this.ef,ft:this.Sh,dx:this.q,dy:this.A,ms:this.zf,acc:this.vc,dec:this.$e,js:this.Gg,g:this.Db,g1:this.Xj,mf:this.Ci,wof:this.Wf,woj:this.Xf?this.Xf.uid:-1,ga:this.hf, edj:this.Oj,cdj:this.dg,dj:this.jg,sus:this.wk}};q.ic=function(e){this.kk=e.ii;this.ye=e.lfx;this.ze=e.lfy;this.Dk=e.lfo;this.yc=e.am;this.enabled=e.en;this.ef=e.fall;this.Sh=e.ft;this.q=e.dx;this.A=e.dy;this.zf=e.ms;this.vc=e.acc;this.$e=e.dec;this.Gg=e.js;this.Db=e.g;this.Xj=e.g1;this.Ci=e.mf;this.Wf=e.wof;this.Ek=e.woj;this.hf=e.ga;this.Oj=e.edj;this.dg=e.cdj;this.jg=e.dj;this.wk=e.sus;this.ih=this.Yi=this.Xi=this.rf=this.sf=this.dh=this.Kg=!1;this.Qe=0;this.Yo()};q.Dd=function(){-1===this.Dk? this.kb=null:this.kb=this.b.$h(this.Dk);-1===this.Ek?this.Xf=null:this.Xf=this.b.$h(this.Ek)};q.Vs=function(e){this.kb==e&&(this.kb=null)};q.Df=function(){this.kb=null;this.b.qt(this.Kn)};q.Ws=function(e){switch(e.which){case 38:e.preventDefault();this.sf=!0;break;case 37:e.preventDefault();this.Kg=!0;break;case 39:e.preventDefault(),this.dh=!0}};q.Xs=function(e){switch(e.which){case 38:e.preventDefault();this.rf=this.sf=!1;break;case 37:e.preventDefault();this.Kg=!1;break;case 39:e.preventDefault(), this.dh=!1}};q.Ef=function(){this.sf=this.dh=this.Kg=!1};q.xh=function(){return 0>this.Db?-1:1};q.Om=function(){var e=null,l=null,b,a;b=this.d.x;a=this.d.y;this.d.x+=this.Na;this.d.y+=this.Oa;this.d.p();if(this.kb&&this.b.Mb(this.d,this.kb)&&(!this.b.sl(this.kb.type,cc)||this.kb.C.solidEnabled))return this.d.x=b,this.d.y=a,this.d.p(),this.kb;(e=this.b.Za(this.d))||0!==this.ef||(l=this.b.ee(this.d,!0));this.d.x=b;this.d.y=a;this.d.p();if(e){if(this.b.Mb(this.d,e))return null;this.Th=!1;return e}if(l&& l.length){a=e=0;for(b=l.length;ethis.Ci&&(this.A=this.Ci)),w&&(this.rf=!0));this.Wf=!!n;q==a&&(0>this.q?(this.q+=this.$e*e,0this.q&&(this.q=0)));q&&!a&&(this.q=0this.q?this.q+(this.vc+this.$e)*e:this.q+this.vc*e);this.q>this.zf?this.q=this.zf:this.q<-this.zf&&(this.q=-this.zf);q=!1;0!==this.q&& (p=this.d.x,g=this.d.y,l=this.q*e*this.Le,b=this.q*e*this.Me,this.d.x+=this.Le*(1this.q?1:-1),this.Me*(0>this.q?1:-1),l,!1)?!n||f||this.Th||(p=this.d.x,g=this.d.y,this.d.x+=this.Na,this.d.y+=this.Oa,this.b.Za(this.d)?this.b.oc(this.d,-this.Na,-this.Oa,3,!1)||(this.d.x=p,this.d.y=g,this.d.p()):(this.d.x=p,this.d.y=g,this.d.p())):(this.d.x=p,this.d.y=g,this.d.p()),f||(this.q=0)):!k&&!w&&Math.abs(this.A)this.A?1:-1),this.Oa*(0>this.A?1:-1),l,f,b)?(this.kb=b,this.ye=b.x,this.ze=b.y,(this.Th=f)&&(q=!0),this.A=0):(this.d.x=p,this.d.y=g,this.d.p(),this.Wf=!0,f||(this.A=0)))}3!==this.yc&&0b?(e.x=u+1-(l.right-e.x),e.p()):l.bottomf&& (e.y=a+1-(l.bottom-e.y),e.p())}})(); function bc(){return[ec,dc,Z,fc,gc,ic,jc,cc,hc,Y.prototype.m.kp,Y.prototype.xa.jp,Y.prototype.gb.random,Y.prototype.gb.Ks,Y.prototype.gb.Js,dc.prototype.m.xp,fc.prototype.xa.Ol,Y.prototype.xa.Pp,Y.prototype.m.ip,Y.prototype.xa.Qp,gc.prototype.xa.Tp,Z.prototype.m.pp,Y.prototype.xa.Np,Y.prototype.xa.Op,Y.prototype.xa.ep,fc.prototype.xa.Nl,Y.prototype.m.Fl,gc.prototype.m.sp,gc.prototype.gb.tp,Y.prototype.m.Dl,Y.prototype.m.lp,ic.prototype.xa.Sp,ec.prototype.m.El,Y.prototype.xa.mp]};