// Generated by Construct 2, the HTML5 game and app creator :: http://www.scirra.com 'use strict';var aa,ba,ca,A,da,ea,ja,K,ka,la,na,oa,pa,O,qa,ra,sa,va,wa,ya,za,R,Ba,Ca,Da,Fa,Ga,U,Ha,Ia,Ja,Ka,Na,Oa,Pa,Qa,Ra,Sa,Ta,Ya,Za,$a,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,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,$b,ac,bc,cc,dc,ec={},fc={};"function"!==typeof Object.getPrototypeOf&&(Object.getPrototypeOf="object"===typeof"test".__proto__?function(h){return h.__proto__}:function(h){return h.constructor.prototype}); (function(){function h(a,b,e,k){this.set(a,b,e,k)}function n(){this.xc=this.wc=this.zc=this.yc=this.Nc=this.Mc=this.tc=this.rc=0}function f(a,b,e,k){ak?b:k):(v=ae?b:e):ek?a:k):(v=be?a:e)}function q(){this.items=this.ud=null;this.gh=0;z&&(this.ud=new Set);this.rg=[];this.me=!0}function t(a){C[L++]=a}function p(){this.X=this.Uj=this.y=this.Ek=0}function c(a){this.ag=[];this.Vn=this.Xn=this.Yn=this.Wn=0;this.Jh(a)}function b(a,b){this.Kk= a;this.Jk=b;this.cells={}}function w(a,b){this.Kk=a;this.Jk=b;this.cells={}}function d(a,b,e){var k;return S.length?(k=S.pop(),k.sl=a,k.x=b,k.y=e,k):new aa(a,b,e)}function a(a,b,e){this.sl=a;this.x=b;this.y=e;this.fb=new ba}function e(a,b,e){var k;return F.length?(k=F.pop(),k.sl=a,k.x=b,k.y=e,k):new ca(a,b,e)}function l(a,b,e){this.sl=a;this.x=b;this.y=e;this.fb=[];this.Of=!0;this.sd=new ba;this.xg=!1}function g(a,b){return a.ed-b.ed}A=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};ja=function(a){return"number"===typeof a};K=function(a){return"string"===typeof a};ka=function(a){return 0b;b<<=1)a=a|a>>b;return a+1};na=function(a){return 0>a?-a:a};oa=function(a,b){return ar)return!1;br)return!1;c=g-a+d-e;w=l-b+m-k;a=e-a;b=k-b;g=d-g;l=m-l;m=na(b*g-l*a);return na(g*w-l*c)>m?!1:na(a*w-b*c)<=m};h.prototype.set=function(a,b,e,k){this.left=a;this.top=b;this.right=e;this.bottom=k};h.prototype.Dg=function(a){this.left=a.left;this.top=a.top;this.right=a.right;this.bottom=a.bottom};h.prototype.width=function(){return this.right-this.left};h.prototype.height= function(){return this.bottom-this.top};h.prototype.offset=function(a,b){this.left+=a;this.top+=b;this.right+=a;this.bottom+=b;return this};h.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)};h.prototype.Bc=function(a,b){return a>=this.left&&a<=this.right&&b>=this.top&&b<=this.bottom};h.prototype.Ig=function(a){return this.left===a.left&&this.top===a.top&&this.right=== a.right&&this.bottom===a.bottom};sa=h;n.prototype.Ih=function(a){this.rc=a.left;this.tc=a.top;this.Mc=a.right;this.Nc=a.top;this.yc=a.right;this.zc=a.bottom;this.wc=a.left;this.xc=a.bottom};n.prototype.nq=function(a,b){if(0===b)this.Ih(a);else{var e=Math.sin(b),k=Math.cos(b),g=a.left*e,l=a.top*e,d=a.right*e,e=a.bottom*e,m=a.left*k,c=a.top*k,w=a.right*k,k=a.bottom*k;this.rc=m-l;this.tc=c+g;this.Mc=w-l;this.Nc=c+d;this.yc=w-e;this.zc=k+d;this.wc=m-e;this.xc=k+g}};n.prototype.offset=function(a,b){this.rc+= a;this.tc+=b;this.Mc+=a;this.Nc+=b;this.yc+=a;this.zc+=b;this.wc+=a;this.xc+=b;return this};var v=0,m=0;n.prototype.$n=function(a){f(this.rc,this.Mc,this.yc,this.wc);a.left=v;a.right=m;f(this.tc,this.Nc,this.zc,this.xc);a.top=v;a.bottom=m};n.prototype.Bc=function(a,b){var e=this.rc,k=this.tc,g=this.Mc-e,l=this.Nc-k,d=this.yc-e,m=this.zc-k,c=a-e,w=b-k,r=g*g+l*l,v=g*d+l*m,l=g*c+l*w,f=d*d+m*m,h=d*c+m*w,u=1/(r*f-v*v),g=(f*l-v*h)*u,r=(r*h-v*l)*u;if(0<=g&&0g+r)return!0;g=this.wc-e;l=this.xc-k;r=g* g+l*l;v=g*d+l*m;l=g*c+l*w;u=1/(r*f-v*v);g=(f*l-v*h)*u;r=(r*h-v*l)*u;return 0<=g&&0g+r};va=n;wa=function(a,b){for(var e in b)b.hasOwnProperty(e)&&(a[e]=b[e]);return a};ya=function(a,b){var e,k;b=O(b);if(!(0>b||b>=a.length)){e=b;for(k=a.length-1;ee?e:a};U=function(a){return a/(180/pa)};Ha=function(a){return 180/pa*a};Ia=function(a){a%=360;0>a&&(a+=360);return a};Ja=function(a){a%=2*pa;0>a&&(a+=2*pa);return a};Ka=function(a){return Ia(Ha(a))};Na=function(a){return Ja(U(a))};Oa=function(a,b,e,k){return Math.atan2(k-b,e-a)};Pa=function(a,b){if(a===b)return 0;var e=Math.sin(a),k=Math.cos(a),g=Math.sin(b),l=Math.cos(b),e=e*g+k*l;return 1<=e?0:-1>=e?pa:Math.acos(e)}; Qa=function(a,b,e){var k=Math.sin(a),g=Math.cos(a),l=Math.sin(b),d=Math.cos(b);return Math.acos(k*l+g*d)>e?0=k*g-e*l};Sa=function(a,b,e,k,g,l){if(0===e)return l?a:b;var d=Math.sin(e);e=Math.cos(e);a-=k;b-=g;var m=a*d;a=a*e-b*d;b=b*e+m;return l?a+k:b+g};Ta=function(a,b,e,k){a=e-a;b=k-b;return Math.sqrt(a*a+b*b)};Ya=function(a,b){return!a!==!b};Za=function(a){for(var b in a)if(a.hasOwnProperty(b))return!0; return!1};$a=function(a){for(var b in a)a.hasOwnProperty(b)&&delete a[b]};var u=+new Date;ab=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()-u};var k=!1,r=k=!1,ia=!1;"undefined"!==typeof window&&(k=/chrome/i.test(navigator.userAgent)||/chromium/i.test(navigator.userAgent), k=!k&&/safari/i.test(navigator.userAgent),r=/(iphone|ipod|ipad)/i.test(navigator.userAgent),ia=window.c2ejecta);var z=!k&&!ia&&!r&&"undefined"!==typeof Set&&"undefined"!==typeof Set.prototype.forEach;q.prototype.contains=function(a){return this.Md()?!1:z?this.ud.has(a):this.items&&this.items.hasOwnProperty(a)};q.prototype.add=function(a){if(z)this.ud.has(a)||(this.ud.add(a),this.me=!1);else{var b=a.toString(),e=this.items;e?e.hasOwnProperty(b)||(e[b]=a,this.gh++,this.me=!1):(this.items={},this.items[b]= a,this.gh=1,this.me=!1)}};q.prototype.remove=function(a){if(!this.Md())if(z)this.ud.has(a)&&(this.ud["delete"](a),this.me=!1);else if(this.items){a=a.toString();var b=this.items;b.hasOwnProperty(a)&&(delete b[a],this.gh--,this.me=!1)}};q.prototype.clear=function(){this.Md()||(z?this.ud.clear():(this.items=null,this.gh=0),R(this.rg),this.me=!0)};q.prototype.Md=function(){return 0===this.count()};q.prototype.count=function(){return z?this.ud.size:this.gh};var C=null,L=0;q.prototype.$v=function(){if(!this.me){if(z)R(this.rg), C=this.rg,L=0,this.ud.forEach(t),C=null,L=0;else{var a=this.rg;R(a);var b,e=0,k=this.items;if(k)for(b in k)k.hasOwnProperty(b)&&(a[e++]=k[b])}this.me=!0}};q.prototype.Ke=function(){this.$v();return this.rg};ba=q;new ba;bb=function(a,b){z?cb(a,b.ud):db(a,b.Ke())};cb=function(a,b){var e,k,g,l;k=e=0;for(g=a.length;ee&&(e=l),dg&&(g=d);this.Wn=b;this.Xn=e;this.Yn=k;this.Vn=g};c.prototype.Ih=function(a,b,e){this.ag.length=8;this.Bj=4;var k=this.ag;k[0]=a.left-b;k[1]=a.top-e;k[2]=a.right-b;k[3]=a.top-e;k[4]=a.right-b;k[5]=a.bottom-e;k[6]=a.left-b;k[7]=a.bottom-e;this.Gk=a.right-a.left;this.Fk=a.bottom-a.top;this.Za()};c.prototype.Gs=function(a,b,e){if(this.Gk!==a||this.Fk!==b||this.co!==e){this.Gk=a;this.Fk=b;this.co=e;var k,g,l,d,m,c=0,w=1,r=this.aq,v=this.ag;0!==e&&(c=Math.sin(e),w=Math.cos(e));e=0;for(l=this.Bj;e< l;e++)k=2*e,g=k+1,d=r[k]*a,m=r[g]*b,v[k]=d*w-m*c,v[g]=m*w+d*c;this.Za()}};c.prototype.Bc=function(a,b){var e=this.ag;if(a===e[0]&&b===e[1])return!0;var k,g,l,d=this.Bj,m=this.Wn-110,c=this.Yn-101,w=this.Xn+131,r=this.Vn+120,v,f,h=0,u=0;for(k=0;kS.length&&S.push(m),this.cells[k][l]=null);if(e)for(k=e.left,g=e.right;k<=g;++k)for(l=e.top,d=e.bottom;l<=d;++l)b&&b.Bc(k,l)||this.re(k,l,!0).El(a)};b.prototype.cq= function(a,b){var e,k,l,g,d,m;e=this.Eb(a.left);l=this.Fb(a.top);k=this.Eb(a.right);for(d=this.Fb(a.bottom);e<=k;++e)for(g=l;g<=d;++g)(m=this.re(e,g,!1))&&m.dump(b)};hb=b;w.prototype.re=function(a,b,k){var g;g=this.cells[a];return g?(g=g[b])?g:k?(g=e(this,a,b),this.cells[a][b]=g):null:k?(g=e(this,a,b),this.cells[a]={},this.cells[a][b]=g):null};w.prototype.Eb=function(a){return O(a/this.Kk)};w.prototype.Fb=function(a){return O(a/this.Jk)};w.prototype.update=function(a,b,e){var k,g,l,d,m;if(b)for(k= b.left,g=b.right;k<=g;++k)for(l=b.top,d=b.bottom;l<=d;++l)if(!e||!e.Bc(k,l))if(m=this.re(k,l,!1))m.remove(a),m.Md()&&(m.reset(),1E3>F.length&&F.push(m),this.cells[k][l]=null);if(e)for(k=e.left,g=e.right;k<=g;++k)for(l=e.top,d=e.bottom;l<=d;++l)b&&b.Bc(k,l)||this.re(k,l,!0).El(a)};w.prototype.cq=function(a,b,e,k,g){var l,d;a=this.Eb(a);b=this.Fb(b);e=this.Eb(e);for(l=this.Fb(k);a<=e;++a)for(k=b;k<=l;++k)(d=this.re(a,k,!1))&&d.dump(g)};w.prototype.Wu=function(a){var b,e,k,g,l;b=a.left;k=a.top;e=a.right; for(g=a.bottom;b<=e;++b)for(a=k;a<=g;++a)if(l=this.re(b,a,!1))l.Of=!1};ib=w;var S=[];a.prototype.Md=function(){return this.fb.Md()};a.prototype.El=function(a){this.fb.add(a)};a.prototype.remove=function(a){this.fb.remove(a)};a.prototype.dump=function(a){Ca(a,this.fb.Ke())};aa=a;var F=[];l.prototype.Md=function(){if(!this.fb.length)return!0;if(this.fb.length>this.sd.count())return!1;this.bl();return!0};l.prototype.El=function(a){this.sd.contains(a)?(this.sd.remove(a),this.sd.Md()&&(this.xg=!1)):this.fb.length? (this.fb[this.fb.length-1].md()>a.md()&&(this.Of=!1),this.fb.push(a)):(this.fb.push(a),this.Of=!0)};l.prototype.remove=function(a){this.sd.add(a);this.xg=!0;30<=this.sd.count()&&this.bl()};l.prototype.bl=function(){this.xg&&(this.sd.count()===this.fb.length?this.reset():(bb(this.fb,this.sd),this.sd.clear(),this.xg=!1))};l.prototype.ot=function(){this.Of||(this.fb.sort(g),this.Of=!0)};l.prototype.reset=function(){R(this.fb);this.Of=!0;this.sd.clear();this.xg=!1};l.prototype.dump=function(a){this.bl(); this.ot();this.fb.length&&a.push(this.fb)};ca=l;var M="lighter xor copy destination-over source-in destination-in source-out destination-out source-atop destination-atop".split(" ");jb=function(a){return 0>=a||11<=a?"source-over":M[a-1]};kb=function(a,b,e){if(e)switch(a.yb=e.ONE,a.ub=e.ONE_MINUS_SRC_ALPHA,b){case 1:a.yb=e.ONE;a.ub=e.ONE;break;case 3:a.yb=e.ONE;a.ub=e.ZERO;break;case 4:a.yb=e.ONE_MINUS_DST_ALPHA;a.ub=e.ONE;break;case 5:a.yb=e.DST_ALPHA;a.ub=e.ZERO;break;case 6:a.yb=e.ZERO;a.ub=e.SRC_ALPHA; break;case 7:a.yb=e.ONE_MINUS_DST_ALPHA;a.ub=e.ZERO;break;case 8:a.yb=e.ZERO;a.ub=e.ONE_MINUS_SRC_ALPHA;break;case 9:a.yb=e.DST_ALPHA;a.ub=e.ONE_MINUS_SRC_ALPHA;break;case 10:a.yb=e.ONE_MINUS_DST_ALPHA,a.ub=e.SRC_ALPHA}};lb=function(a){return Math.round(1E6*a)/1E6};mb=function(a,b){return"string"!==typeof a||"string"!==typeof b||a.length!==b.length?!1:a===b?!0:a.toLowerCase()===b.toLowerCase()};nb=function(a){a=a.target;return!a||a===document||a===window||document&&document.body&&a===document.body|| mb(a.tagName,"canvas")?!0:!1}})();var gc="undefined"!==typeof Float32Array?Float32Array:Array;function hc(h){var n=new gc(3);h&&(n[0]=h[0],n[1]=h[1],n[2]=h[2]);return n}function ic(h){var n=new gc(16);h&&(n[0]=h[0],n[1]=h[1],n[2]=h[2],n[3]=h[3],n[4]=h[4],n[5]=h[5],n[6]=h[6],n[7]=h[7],n[8]=h[8],n[9]=h[9],n[10]=h[10],n[11]=h[11],n[12]=h[12],n[13]=h[13],n[14]=h[14],n[15]=h[15]);return n} function jc(h,n){n[0]=h[0];n[1]=h[1];n[2]=h[2];n[3]=h[3];n[4]=h[4];n[5]=h[5];n[6]=h[6];n[7]=h[7];n[8]=h[8];n[9]=h[9];n[10]=h[10];n[11]=h[11];n[12]=h[12];n[13]=h[13];n[14]=h[14];n[15]=h[15]}function kc(h,n){var f=n[0],q=n[1];n=n[2];h[0]*=f;h[1]*=f;h[2]*=f;h[3]*=f;h[4]*=q;h[5]*=q;h[6]*=q;h[7]*=q;h[8]*=n;h[9]*=n;h[10]*=n;h[11]*=n} function lc(h,n,f,q){q||(q=ic());var t,p,c,b,w,d,a,e,l=h[0],g=h[1];h=h[2];p=f[0];c=f[1];t=f[2];f=n[1];d=n[2];l===n[0]&&g===f&&h===d?(h=q,h[0]=1,h[1]=0,h[2]=0,h[3]=0,h[4]=0,h[5]=1,h[6]=0,h[7]=0,h[8]=0,h[9]=0,h[10]=1,h[11]=0,h[12]=0,h[13]=0,h[14]=0,h[15]=1):(f=l-n[0],d=g-n[1],a=h-n[2],e=1/Math.sqrt(f*f+d*d+a*a),f*=e,d*=e,a*=e,n=c*a-t*d,t=t*f-p*a,p=p*d-c*f,(e=Math.sqrt(n*n+t*t+p*p))?(e=1/e,n*=e,t*=e,p*=e):p=t=n=0,c=d*p-a*t,b=a*n-f*p,w=f*t-d*n,(e=Math.sqrt(c*c+b*b+w*w))?(e=1/e,c*=e,b*=e,w*=e):w=b=c=0, q[0]=n,q[1]=c,q[2]=f,q[3]=0,q[4]=t,q[5]=b,q[6]=d,q[7]=0,q[8]=p,q[9]=w,q[10]=a,q[11]=0,q[12]=-(n*l+t*g+p*h),q[13]=-(c*l+b*g+w*h),q[14]=-(f*l+d*g+a*h),q[15]=1)} (function(){function h(b,c,d){this.Nd=/msie/i.test(navigator.userAgent)||/trident/i.test(navigator.userAgent);this.height=this.width=0;this.na=!!d;this.Pi=this.Xg=!1;this.Pk=0;this.ik=1;this.qn=1E3;this.iw=(this.qn-this.ik)/32768;this.Hk=hc([0,0,100]);this.fp=hc([0,0,0]);this.Jq=hc([0,1,0]);this.Wh=hc([1,1,1]);this.qo=!0;this.jj=ic();this.oc=ic();this.Ql=ic();this.Ok=ic();this.q=b;this.Ko()}function n(b,c,d){this.q=b;this.Kh=c;this.name=d;this.Fc=b.getAttribLocation(c,"aPos");this.ze=b.getAttribLocation(c, "aTex");this.dp=b.getUniformLocation(c,"matP");this.fj=b.getUniformLocation(c,"matMV");this.Sf=b.getUniformLocation(c,"opacity");this.Xl=b.getUniformLocation(c,"colorFill");this.ep=b.getUniformLocation(c,"samplerFront");this.rh=b.getUniformLocation(c,"samplerBack");this.kf=b.getUniformLocation(c,"destStart");this.jf=b.getUniformLocation(c,"destEnd");this.uh=b.getUniformLocation(c,"seconds");this.Zl=b.getUniformLocation(c,"pixelWidth");this.Yl=b.getUniformLocation(c,"pixelHeight");this.qh=b.getUniformLocation(c, "layerScale");this.ph=b.getUniformLocation(c,"layerAngle");this.vh=b.getUniformLocation(c,"viewOrigin");this.sh=b.getUniformLocation(c,"scrollPos");this.Au=!!(this.Zl||this.Yl||this.uh||this.rh||this.kf||this.jf||this.qh||this.ph||this.vh||this.sh);this.np=this.op=-999;this.ij=1;this.jp=this.ip=0;this.lp=this.hp=this.gp=1;this.rp=this.qp=this.pp=this.tp=this.sp=this.kp=0;this.Pl=[];this.mp=ic();this.Sf&&b.uniform1f(this.Sf,1);this.Xl&&b.uniform4f(this.Xl,1,1,1,1);this.ep&&b.uniform1i(this.ep,0);this.rh&& b.uniform1i(this.rh,1);this.kf&&b.uniform2f(this.kf,0,0);this.jf&&b.uniform2f(this.jf,1,1);this.qh&&b.uniform1f(this.qh,1);this.ph&&b.uniform1f(this.ph,0);this.vh&&b.uniform2f(this.vh,0,0);this.sh&&b.uniform2f(this.sh,0,0);this.uh&&b.uniform1f(this.uh,0);this.$e=!1}function f(b,c){return b[0]===c[0]&&b[1]===c[1]&&b[2]===c[2]&&b[3]===c[3]&&b[4]===c[4]&&b[5]===c[5]&&b[6]===c[6]&&b[7]===c[7]&&b[8]===c[8]&&b[9]===c[9]&&b[10]===c[10]&&b[11]===c[11]&&b[12]===c[12]&&b[13]===c[13]&&b[14]===c[14]&&b[15]=== c[15]}function q(b,c){this.type=b;this.n=c;this.q=c.q;this.Dc=this.zb=this.Mp=0;this.N=this.Lc=null;this.oq=[]}var t=ic();h.prototype.Ko=function(){var b=this.q,c;this.Yo=1;this.ff=this.ue=null;this.ji=1;b.clearColor(0,0,0,0);b.clear(b.COLOR_BUFFER_BIT);b.enable(b.BLEND);b.blendFunc(b.ONE,b.ONE_MINUS_SRC_ALPHA);b.disable(b.CULL_FACE);b.disable(b.STENCIL_TEST);b.disable(b.DITHER);this.na?(b.enable(b.DEPTH_TEST),b.depthFunc(b.LEQUAL)):b.disable(b.DEPTH_TEST);this.Zo=b.ONE;this.Xo=b.ONE_MINUS_SRC_ALPHA; this.ek=new Float32Array(8E3*(this.na?3:2));this.Vj=new Float32Array(16E3);this.ym=new Float32Array(32E3);this.xm=b.createBuffer();b.bindBuffer(b.ARRAY_BUFFER,this.xm);b.bufferData(b.ARRAY_BUFFER,this.ym.byteLength,b.DYNAMIC_DRAW);this.Vh=Array(4);this.Qh=Array(4);for(c=0;4>c;c++)this.Vh[c]=b.createBuffer(),b.bindBuffer(b.ARRAY_BUFFER,this.Vh[c]),b.bufferData(b.ARRAY_BUFFER,this.ek.byteLength,b.DYNAMIC_DRAW),this.Qh[c]=b.createBuffer(),b.bindBuffer(b.ARRAY_BUFFER,this.Qh[c]),b.bufferData(b.ARRAY_BUFFER, this.Vj.byteLength,b.DYNAMIC_DRAW);this.zd=0;this.Du=b.createBuffer();b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,this.Du);for(var d=new Uint16Array(12E3),a=c=0;12E3>c;)d[c++]=a,d[c++]=a+1,d[c++]=a+2,d[c++]=a,d[c++]=a+2,d[c++]=a+3,a+=4;b.bufferData(b.ELEMENT_ARRAY_BUFFER,d,b.STATIC_DRAW);this.Zf=this.kg=this.Zd=0;this.Da=[];c=this.na?"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}";d=this.Eg({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}"},c,"");this.Da.push(d);d=this.Eg({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.Da.push(d);d=this.Eg({src:"varying mediump vec2 vTex;\nuniform lowp sampler2D samplerFront;\nvoid main(void) {\n\tif (texture2D(samplerFront, vTex).a < 1.0)\n\t\tdiscard;\n}"},c,"");this.Da.push(d);d=this.Eg({src:"uniform lowp vec4 colorFill;\nvoid main(void) {\n\tgl_FragColor = colorFill;\n}"}, c,"");this.Da.push(d);for(var e in mc)mc.hasOwnProperty(e)&&this.Da.push(this.Eg(mc[e],c,e));b.activeTexture(b.TEXTURE0);b.bindTexture(b.TEXTURE_2D,null);this.yd=[];this.gd=0;this.wb=this.lb=!1;this.mo=this.hh=-1;this.Af=null;this.$k=b.createFramebuffer();this.ni=this.Dj=null;this.Tn=!1;this.na&&(this.ni=b.createRenderbuffer());this.Je=hc([0,0,0]);b=b.getParameter(b.ALIASED_POINT_SIZE_RANGE);this.Zu=b[0];this.cm=b[1];2048"===c.name&&b.vertexAttribPointer(c.Fc,4,b.FLOAT,!1,0,0));if(0"!==c.name&&b.vertexAttribPointer(c.Fc,this.na?3:2,b.FLOAT,!1,0,0);b.bindBuffer(b.ARRAY_BUFFER,this.Qh[this.zd]);b.bufferSubData(b.ARRAY_BUFFER,0,this.Vj.subarray(0,this.kg));c&&0<=c.ze&&""!== c.name&&b.vertexAttribPointer(c.ze,2,b.FLOAT,!1,0,0)}for(var d,b=0,c=this.gd;bd||0>a)){var e=this.Kb();e.type=7;e.zb=1;e.N||(e.N=ic());e.N[0]=b;e.N[1]=c;e.N[2]=d;e.N[3]=a;this.wb=this.lb=!1}};h.prototype.kq=function(b){if(this.na&& (b=!!b,this.Xg!==b)){var c=this.Kb();c.type=14;c.zb=b?1:0;this.wb=this.lb=!1;this.Xg=b;this.Dj=null;this.Xg?this.Ob(2):this.Ob(0)}};h.prototype.jq=function(b){if(this.na){var c=this.Kb();c.type=13;c.zb=b?1:0;this.wb=this.lb=!1}};h.prototype.xo=function(){jc(this.Ql,t);this.Ic();this.uc();var b=this.width/2,c=this.height/2;this.bg(-b,c,b,c,b,-c,-b,-c);jc(t,this.oc);this.uc()};h.prototype.iq=function(b,c,d){this.Ob(3);var a=this.Kb();a.type=12;a.N||(a.N=ic());a.N[0]=b;a.N[1]=c;a.N[2]=d;a.N[3]=1;this.wb= this.lb=!1};h.prototype.Ov=function(){this.Ob(0)};h.prototype.Av=function(){this.Ob(2)};h.prototype.vv=function(){this.Ed();this.q.flush()};var p=[],c={};h.prototype.Js=function(){R(p);c={}};h.prototype.dj=function(b,f,d,a){f=!!f;d=!!d;var e=b.src+","+f+","+d+(f?",undefined":""),l=null;if("undefined"!==typeof b.src&&c.hasOwnProperty(e))return l=c[e],l.ci++,l;this.Ed();var g=this.q,v=ka(b.width)&&ka(b.height),l=g.createTexture();g.bindTexture(g.TEXTURE_2D,l);g.pixelStorei(g.UNPACK_PREMULTIPLY_ALPHA_WEBGL, !0);var m=g.RGBA,h=g.RGBA,k=g.UNSIGNED_BYTE;if(a&&!this.Nd)switch(a){case 1:h=m=g.RGB;break;case 2:k=g.UNSIGNED_SHORT_4_4_4_4;break;case 3:k=g.UNSIGNED_SHORT_5_5_5_1;break;case 4:h=m=g.RGB,k=g.UNSIGNED_SHORT_5_6_5}if(!v&&f){a=document.createElement("canvas");a.width=la(b.width);a.height=la(b.height);var r=a.getContext("2d");r.webkitImageSmoothingEnabled=d;r.mozImageSmoothingEnabled=d;r.msImageSmoothingEnabled=d;r.imageSmoothingEnabled=d;r.drawImage(b,0,0,b.width,b.height,0,0,a.width,a.height);g.texImage2D(g.TEXTURE_2D, 0,m,h,k,a)}else g.texImage2D(g.TEXTURE_2D,0,m,h,k,b);f?(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));d?(g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MAG_FILTER,g.LINEAR),v&&this.qo?(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.ue=null;l.Qe=b.width;l.Pe=b.height;l.ci=1;l.bo=e;p.push(l);return c[e]=l};h.prototype.ec=function(b,c,d,a){this.Ed();var e=this.q;this.Nd&&(a=!1);var l=e.createTexture();e.bindTexture(e.TEXTURE_2D,l);e.texImage2D(e.TEXTURE_2D,0,e.RGBA,b,c,0,e.RGBA,a?e.UNSIGNED_SHORT_4_4_4_4:e.UNSIGNED_BYTE,null);e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,d?e.LINEAR:e.NEAREST);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,d?e.LINEAR:e.NEAREST);e.bindTexture(e.TEXTURE_2D,null);this.ue=null;l.Qe=b;l.Pe=c;p.push(l);return l};h.prototype.ew=function(b,c,d){this.Ed();var a=this.q;this.Nd&&(d=!1);a.bindTexture(a.TEXTURE_2D,c);a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0);try{a.texImage2D(a.TEXTURE_2D, 0,a.RGBA,a.RGBA,d?a.UNSIGNED_SHORT_4_4_4_4:a.UNSIGNED_BYTE,b)}catch(e){console&&console.error&&console.error("Error updating WebGL texture: ",e)}a.bindTexture(a.TEXTURE_2D,null);this.ue=null};h.prototype.deleteTexture=function(b){b&&("undefined"!==typeof b.ci&&1=b?a[3]:256>=b?a[2]:512>=b?a[1]:a[0]}function t(a){a.target.result.createObjectStore("saves",{keyPath:"slot"})}function p(a,b,e,k){var c=indexedDB.open("_C2SaveStates");c.onupgradeneeded=t;c.onerror=k;c.onsuccess=function(c){c=c.target.result;c.onerror=k;c.transaction(["saves"],"readwrite").objectStore("saves").put({slot:a,data:b}).onsuccess=e}}function c(a,b,e){var k=indexedDB.open("_C2SaveStates");k.onupgradeneeded=t;k.onerror=e;k.onsuccess=function(k){k=k.target.result; k.onerror=e;var c=k.transaction(["saves"]).objectStore("saves").get(a);c.onsuccess=function(){c.result?b(c.result.data):b(null)}}}function b(){A("Reloading for continuous preview");window.c2cocoonjs?CocoonJS.App.reload():-1g?(g*=b,5===m?(l=g*e/this.Wa, 1l&&(l=1/Math.ceil(1/l)),g=this.Wa*l/e,l=this.Va*l/e,k=(a-g)/2,c=(b-l)/2,a=g,b=l):(k=(a-g)/2,a=g)):(l=a/g,5===m?(l=l*e/this.Va,1l&&(l=1/Math.ceil(1/l)),g=this.Wa*l/e,l=this.Va*l/e,k=(a-g)/2,c=(b-l)/2,a=g):c=(b-l)/2,b=l),r&&!this.nd&&(c=k=0)):this.nd&&this.Zg&&0===this.yo&&(k=Math.floor((a-this.Wa)/2),c=Math.floor((b-this.Va)/2),a=this.Wa,b=this.Va),2>m&&(this.zg=e),this.ef&&this.Wo&&1g&&(this.C=this.D/m)):3===m&&(g=this.Wa/this.Va,m=this.jh/this.ih,m>g?this.D=this.C*m:m=m)m=5E4;a+=m;d.src&&(d.complete||d.loaded)&&!d.ao?b+=m:k=!1}k&&this.tv&&this.yf&&(g||(this.yf.Rv(),g=!0),e=this.yf.hu(),b+=e,ethis.xe&& (this.kc||500<=k&&this.$o!=this.hb)){a.clearRect(0,0,c,l);var k=c/2,l=l/2,c=0===this.xe&&this.we.hj.complete,m=40*g,r=0,f=80*g,h;if(c){var u=this.we.hj,f=u.width*g;h=u.height*g;m=f/2;r=h/2;a.drawImage(u,O(k-m),O(l-r),f,h)}1>=this.xe?(k=O(k-m)+.5,l=O(l+(r+(c?12*g:0)))+.5,a.fillStyle=e?"red":"DodgerBlue",a.fillRect(k,l,Math.floor(f*this.hb),6*g),a.strokeStyle="black",a.strokeRect(k,l,f,6*g),a.strokeStyle="white",a.strokeRect(k-1*g,l-1*g,f+2*g,8*g)):2===this.xe&&(a.font=this.Vc?"12pt ArialMT":"12pt Arial", a.fillStyle=e?"#f00":"#999",a.nx="middle",g=Math.round(100*this.hb)+"%",c=a.measureText?a.measureText(g):null,a.fillText(g,k-(c?c.width:0)/2,l));this.$o=this.hb}else if(4===this.xe){this.kt(a);d?d(function(){b.go()}):setTimeout(function(){b.go()},16);return}}setTimeout(function(){b.go()},this.kc?10:100)}}};var m=-1,u="undefined"===typeof cr_is_preview?200:0,k=!0,r=!1,ia=0,z=0,C="undefined"===typeof cr_is_preview?3E3:0,L=null,S=null,F=0;f.prototype.kt=function(a){if(!v){for(var b=Math.ceil(this.width), c=Math.ceil(this.height),l=this.we.hj,g=this.we.sv,d=this.we.fw,f=0;4>f;++f)if(!l[f].complete||!g[f].complete||!d[f].complete)return;0===F&&(m=Date.now());var f=Date.now(),h=!1,n=a,p,t;k||r?(a.clearRect(0,0,b,c),L&&L.width===b&&L.height===c||(L=document.createElement("canvas"),L.width=b,L.height=c,S=L.getContext("2d")),n=S,h=!0,k&&1===F&&(m=Date.now())):a.globalAlpha=1;n.fillStyle="#333333";n.fillRect(0,0,b,c);256=C&&!r&&1<=this.hb&&(r=!0,z=f);if(r&&f-z>=300+u||"undefined"!==typeof cr_is_preview&&1<=this.hb&&500>Date.now()-m)v=!0,r=k=!1,this.we=S=L=null;++F}};f.prototype.yu=function(){this.pb&&(this.canvas.parentNode.removeChild(this.pb),this.pb=this.wm=null);this.Rj=Date.now();this.hf=ab();var a,b,e;if(this.ln)for(a=0,b=this.m.length;aa||2===this.Ab&&bb&&(b=0),this.pe=b/1E3,.51/this.wp&&(this.pe=1/this.wp));this.Wi=a;this.oe=this.pe*this.mg;this.nb.add(this.oe);this.$d.add(this.pe);a=(document.mozFullScreen||document.webkitIsFullScreen||document.fullScreen||!!document.msFullscreenElement||this.Zg)&& !this.lc;2<=this.Ab||a&&0b||2===k&&ea++;)this.po(this.Ag);a=0;for(b=this.Fd.length;ab.li.length&&b.li.push(a)};var x=[];f.prototype.Se=function(a,b,e,k,c,l){var g,d,m,r;if(!a)return null;var f=this.m[a[1]],v=f.ga.te;if(this.fh&&v&&!f.Kl||v&&!this.n&&11===a[0][11])return null;var h=b;v||(b=null);var u;f.li.length?(u=f.li.pop(),u.pc=!0,f.ga.da.call(u,f)):(u=new f.ga.da(f),u.pc= !1);!e||l||this.Td.hasOwnProperty(a[2].toString())?u.uid=this.zh++:u.uid=a[2];this.Td[u.uid.toString()]=u;u.bq=this.Bp++;u.bf=f.d.length;g=0;for(d=this.jd.length;ga&&(a=0);a>=this.U.K.length&&(a=this.U.K.length-1);return this.U.K[a]};f.prototype.Lk=function(a){var b,e;b=0;for(e=a.length;b=this.$l.length&& this.$l.push([])};f.prototype.pv=function(){this.gj--};f.prototype.Co=function(){return this.$l[this.gj]};f.prototype.Dm=function(a){this.qi++;this.qi>=this.Vk.length&&this.Vk.push(new Rb);var b=this.Ib();b.reset(a);return b};f.prototype.Yp=function(){this.qi--};f.prototype.Ib=function(){return this.Vk[this.qi]};f.prototype.Do=function(a,b){for(var e,k,c,g,l,d;b;){e=0;for(k=b.Kc.length;eg||g>=a.Ra.length||(a.Ra[g]=c[k]));if(l.te){g=b.w;a.j.V!==g.l&&(c=a.j,a.j=this.U.Di(g.l), a.j?(c.eg(a,!0),a.j.yg(a,!0),a.Ma(),a.j.Hh(0)):(a.j=c,e||this.be(a)));a.x=g.x;a.y=g.y;a.width=g.w;a.height=g.h;a.ed=g.zi;a.k=g.hasOwnProperty("a")?g.a:0;a.opacity=g.hasOwnProperty("o")?g.o:1;a.Vb=g.hasOwnProperty("hX")?g.hX:.5;a.Wb=g.hasOwnProperty("hY")?g.hY:.5;a.visible=g.hasOwnProperty("v")?g.v:!0;a.Bg=g.hasOwnProperty("ce")?g.ce:!0;a.yh=g.hasOwnProperty("mts")?g.mts:-1;a.sb=g.hasOwnProperty("bm")?g.bm:0;a.Cg=jb(a.sb);this.q&&kb(a,a.sb,this.q);a.Ma();if(g.hasOwnProperty("fx"))for(e=0,c=g.fx.length;e< c;e++)l=d.jl(g.fx[e].name),0>l||(a.ge[l]=g.fx[e].active,a.Aa[l]=g.fx[e].params);a.dd()}if(d=b.behs)for(k in d)d.hasOwnProperty(k)&&(e=this.au(a,parseInt(k,10)),0>e||a.L[e].nc(d[k]));b.data&&a.nc(b.data)};Tb=function(a){return new f(document.getElementById(a))};Ub=function(a,b){return new f({dc:!0,width:a,height:b})};window.cr_createRuntime=Tb;window.cr_createDCRuntime=Ub;window.createCocoonJSRuntime=function(){window.c2cocoonjs=!0;var a=document.createElement("screencanvas")||document.createElement("canvas"); a.Un=!0;document.body.appendChild(a);a=new f(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 f(document.getElementById("canvas"));window.c2runtime=a;window.c2runtime.setSize(window.innerWidth,window.innerHeight);return a}})(); window.cr_getC2Runtime=function(){var h=document.getElementById("c2canvas");return h?h.c2runtime:window.c2runtime?window.c2runtime:null};window.cr_getSnapshot=function(h,n){var f=window.cr_getC2Runtime();f&&f.Ps(h,n)};window.cr_sizeCanvas=function(h,n){if(0!==h&&0!==n){var f=window.cr_getC2Runtime();f&&f.setSize(h,n)}};window.cr_setSuspended=function(h){var n=window.cr_getC2Runtime();n&&n.setSuspended(h)}; (function(){function h(a,b){this.b=a;this.Ve=null;this.scrollX=this.b.Wa/2;this.scrollY=this.b.Va/2;this.scale=1;this.k=0;this.Ff=!0;this.name=b[0];this.width=b[1];this.height=b[2];this.Iq=b[3];this.pq=b[4];this.V=b[5];var c=b[6],g,d;this.K=[];this.Tg=[];g=0;for(d=c.length;g=this.K.length&&(k=this.K.length-1);m.j=this.K[k];-1===m.j.d.indexOf(m)&&m.j.d.push(m);m.j.sf=!0}if(!c)for(a=0,l=this.K.length;al?m.siblings.push(f.d[l]):f.kd&&(d=this.b.Se(f.kd,m.j,!0,m.x,m.y,!0),this.b.rb(),f.ak(),m.siblings.push(d),p.push(d)));a=0;for(l=this.cf.length;athis.width-b&&(a=this.width-b);athis.height-b&&(a=this.height-b);aI&&(I=0);0>E&&(E=0);N>Q&&(N=Q);P>J&&(P=J);0>T&&(T=0);0>D&&(D=0);ha>Q&&(ha=Q);ta>J&&(ta=J);G.left=I/Q;G.top=1-E/J;G.right=N/Q;G.bottom=1-P/J}else G.left=H.left=0,G.top=H.top=0,G.right=H.right=1,G.bottom=H.bottom=1;ma=c&&(a.Ch(d[0].Na)||0!==w||0!==ma||1!==c.opacity||c.type.ga.yp)||b&&!c&&1!==b.opacity;a.hq();if(ma){n[x]||(n[x]=a.ec(Q, J,this.b.R));if(n[x].Qe!==Q||n[x].Pe!==J)a.deleteTexture(n[x]),n[x]=a.ec(Q,J,this.b.R);a.Ob(0);a.Jc(n[x]);ga=ta-D;a.clearRect(T,J-D-ga,ha-T,ga);c?c.Hb(a):(a.$b(this.b.Ua),a.pf(b.opacity),a.Ic(),a.translate(-B,-Aa),a.uc(),a.De(I,P,N,P,N,E,I,E,G));H.left=H.top=0;H.right=H.bottom=1;c&&(M=G.top,G.top=G.bottom,G.bottom=M);x=1;fa=0}a.pf(1);w=d.length-1;var La=a.Bm(d[w].Na)||!b&&!c&&!this.b.hc,xa=0;t=0;for(q=d.length;tc||(b&&this.vc&&a.Lb&&a.Lb.right>=a.Lb.left&&(a.Za(),this.qb.update(a,a.Lb,null),a.Lb.set(0,0,-1,-1)),c===this.d.length-1?this.d.pop():(ya(this.d,c),this.Hh(c)),this.ad=!0)};f.prototype.yg=function(a,b){a.ed=this.d.length;this.d.push(a);b&&this.vc&&a.Lb&&a.Ma();this.ad=!0};f.prototype.uv=function(a){this.d.unshift(a);this.Hh(0)};f.prototype.$u= function(a,b,c){var g=a.md();b=b.md();ya(this.d,g);gthis.ta||c.top>this.ra||(b.globalCompositeOperation=a.Cg,a.gc(b))}};f.prototype.ck=function(){this.Dd=!0;var a=this.Pa(0,0,!0,!0),b=this.Pa(0,0,!1,!0);this.Dd=!1;this.b.Zc&&(a=Math.round(a),b=Math.round(b));this.Fj(a,b,null)};f.prototype.Fj= function(a,b,c){var g=this.Jb();this.ja=a;this.ka=b;this.ta=a+1/g*this.b.D;this.ra=b+1/g*this.b.C;a=this.Ea();0!==a&&(c&&(c.translate(this.b.D/2,this.b.C/2),c.rotate(-a),c.translate(this.b.D/-2,this.b.C/-2)),this.Yd.set(this.ja,this.ka,this.ta,this.ra),this.Yd.offset((this.ja+this.ta)/-2,(this.ka+this.ra)/-2),this.Cq.nq(this.Yd,a),this.Cq.$n(this.Yd),this.Yd.offset((this.ja+this.ta)/2,(this.ka+this.ra)/2),this.ja=this.Yd.left,this.ka=this.Yd.top,this.ta=this.Yd.right,this.ra=this.Yd.bottom)};f.prototype.Cf= function(a){if(this.td=this.yi){this.b.Ua||(this.b.Ua=a.ec(this.b.D,this.b.C,this.b.R));if(this.b.Ua.Qe!==this.b.D||this.b.Ua.Pe!==this.b.C)a.deleteTexture(this.b.Ua),this.b.Ua=a.ec(this.b.D,this.b.C,this.b.R);a.Jc(this.b.Ua)}this.Dd=!0;var b=this.Pa(0,0,!0,!0),c=this.Pa(0,0,!1,!0);this.Dd=!1;this.b.Zc&&(b=Math.round(b),c=Math.round(c));this.Fj(b,c,null);b=this.Jb();a.Ic();a.scale(b,b);a.Gj(-this.Ea());a.translate((this.ja+this.ta)/-2,(this.ka+this.ra)/-2);a.uc();this.vc?(this.jb.left=this.qb.Eb(this.ja), this.jb.top=this.qb.Fb(this.ka),this.jb.right=this.qb.Eb(this.ta),this.jb.bottom=this.qb.Fb(this.ra),this.ad||!this.jb.Ig(this.Rf)?(t(this.Rd),b=this.nl(),this.ad=!1,this.Rf.Dg(this.jb)):b=this.Rd):b=this.d;for(var g,d=null,c=b.length-1;0<=c;--c)g=b[c],g!==d&&(this.it(b[c],a),d=g);this.vc&&(this.Rd=b);this.cd||(this.Mk=this.b.Ue++,a.Kj(this.Mk),a.iq(1,1,1),a.xo(),a.Av())};f.prototype.Hb=function(a){var b=0,c=0;if(this.td=this.yi||1!==this.opacity||0this.ta||c.top>this.ra||(b.Kj(a.Ue),a.Oq?this.jt(a,b):(b.Ob(0),b.Ee(a.yb,a.ub),a.Hb(b)))}};f.prototype.it=function(a,b){if(a.visible&&0!==a.width&&0!==a.height){a.Za();var c=a.Oa;c.rightthis.ta||c.top>this.ra||(a.Ue=this.b.Ue++,0===a.sb&&1===a.opacity&&a.Wd&&a.Cf&&(b.Kj(a.Ue),a.Cf(b)))}};f.prototype.jt=function(a,b){var c=a.Z[0].Na,g=a.Z[0].index,d=this.Jb();if(1!==a.Z.length|| b.Bm(c)||b.wv(c)||(a.k||a.j.Ea())&&b.Ch(c)||1!==a.opacity||a.type.ga.yp)this.eb.Hm(b,this,a,this.td?this.b.Ua:this.eb.Ng()),b.Ic(),b.scale(d,d),b.Gj(-this.Ea()),b.translate((this.ja+this.ta)/-2,(this.ka+this.ra)/-2),b.uc();else{b.Ob(c);b.Ee(a.yb,a.ub);b.Aj(c)&&(this.b.ca=!0);var m=0,f=0,k=0,r=0;b.Ch(c)&&(c=a.Oa,m=this.Ta(c.left,c.top,!0),f=this.Ta(c.left,c.top,!1),k=this.Ta(c.right,c.bottom,!0),c=this.Ta(c.right,c.bottom,!1),m=m/windowWidth,f=1-f/windowHeight,k=k/windowWidth,r=1-c/windowHeight);b.gg(this.td? this.b.Ua:this.eb.Ng(),1/a.width,1/a.height,m,f,k,r,d,this.Ea(),this.ja,this.ka,(this.ja+this.ta)/2,(this.ka+this.ra)/2,this.b.nb.X,a.Aa[g]);a.Hb(b)}};f.prototype.Pa=function(a,b,c,g){var d=this.b.devicePixelRatio;this.b.ef&&(a*=d,b*=d);var d=this.b.Tp,m=this.b.Up,d=(this.eb.scrollX-d)*this.Gc+d,m=(this.eb.scrollY-m)*this.Hc+m,f=d,k=m,r=1/this.Jb(!g);g?(f-=this.b.D*r/2,k-=this.b.C*r/2):(f-=this.b.width*r/2,k-=this.b.height*r/2);f+=a*r;k+=b*r;b=this.Ea();0!==b&&(f-=d,k-=m,a=Math.cos(b),b=Math.sin(b), g=f*a-k*b,k=k*a+f*b,f=g+d,k+=m);return c?f:k};f.prototype.Ta=function(a,b,c){var g=this.b.Tp,d=this.b.Up,g=(this.eb.scrollX-g)*this.Gc+g,m=(this.eb.scrollY-d)*this.Hc+d,d=g,f=m,k=this.Ea();if(0!==k){a-=g;b-=m;var r=Math.cos(-k),k=Math.sin(-k),h=a*r-b*k;b=b*r+a*k;a=h+g;b+=m}g=1/this.Jb(!1);d-=this.b.D*g/2;f-=this.b.C*g/2;d=(a-d)/g;return c?d:(b-f)/g};f.prototype.Nb=function(){var a,b,c,g={s:this.scale,a:this.k,vl:this.ja,vt:this.ka,vr:this.ta,vb:this.ra,v:this.visible,bc:this.Rc,t:this.cd,px:this.Gc, py:this.Hc,o:this.opacity,zr:this.Qb,fx:[],cg:this.Fg,instances:[]};a=0;for(b=this.I.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.lf+1),b[this.lf]=a):this.data=a};e.prototype.Ze=function(){var a=this.b.Co();return!this.parent||this.eh||!a||this.Si?this.data:this.lf>=a.length||"undefined"===typeof a[this.lf]?this.Al:a[this.lf]};e.prototype.Xa=function(){!this.parent||this.eh||this.Si||this.Vd(this.Al)};Sb=e;l.prototype.toString=function(){return"include:"+this.Sg.toString()};l.prototype.Ha=function(){this.Sg=this.b.Wk[this.Cu];this.sheet.Jo.add(this);this.wa=f(this.wa);for(var a=this.parent;a;)a.group&& a.fi.push(this),a=a.parent;this.Kq()};l.prototype.Xa=function(){this.parent&&this.b.Eh(this.b.m);this.Sg.xl||this.Sg.Xa(!0);this.parent&&this.b.$f(this.b.m)};l.prototype.Kq=function(){for(var a=this.parent;a;){if(a.group&&!a.Hf){this.ab=!1;return}a=a.parent}this.ab=!0};bc=l;g.prototype.reset=function(a){this.fc=a;this.Rb=this.Sb=0;R(this.xq);this.Uk=this.gf=!1};Rb=g})(); (function(){function h(c,b){this.qa=c;this.b=c.b;this.type=b[0];this.get=[this.Ht,this.Dt,this.Qt,this.Tt,this.pt,this.Rt,this.Lt,this.At,this.Kt,this.Pt,this.qt,this.Ot,this.Bt,this.Mt,this.It,this.Jt,this.Et,this.Ft,this.zt,this.St,this.Nt,this.Gt,this.yt,this.Ct][this.type];var f=null;this.Sd=this.P=this.Ca=this.kb=this.Wj=this.second=this.first=this.value=null;this.Sc=-1;this.Uc=null;this.Pq=-1;this.We=this.Th=null;this.fg=!1;switch(this.type){case 0:case 1:case 2:this.value=b[1];break;case 3:this.first= new $b(c,b[1]);break;case 18:this.first=new $b(c,b[1]);this.second=new $b(c,b[2]);this.Wj=new $b(c,b[3]);break;case 19:this.kb=this.b.de(b[1]);this.kb!==V.prototype.M.random&&this.kb!==V.prototype.M.Is||this.qa.mq();this.Ca=[];this.P=[];3===b.length?(f=b[2],this.Ca.length=f.length+1):this.Ca.length=1;break;case 20:this.Sd=this.b.m[b[1]];this.Sc=-1;this.kb=this.b.de(b[2]);this.fg=b[3];ec.Function&&this.kb===ec.Function.prototype.M.ow&&this.qa.mq();b[4]?this.Uc=new $b(c,b[4]):this.Uc=null;this.Ca=[]; this.P=[];6===b.length?(f=b[5],this.Ca.length=f.length+1):this.Ca.length=1;break;case 21:this.Sd=this.b.m[b[1]];this.fg=b[2];b[3]?this.Uc=new $b(c,b[3]):this.Uc=null;this.Pq=b[4];break;case 22:this.Sd=this.b.m[b[1]];this.Sd.Ci(b[2]);this.Sc=this.Sd.gl(b[2]);this.kb=this.b.de(b[3]);this.fg=b[4];b[5]?this.Uc=new $b(c,b[5]):this.Uc=null;this.Ca=[];this.P=[];7===b.length?(f=b[6],this.Ca.length=f.length+1):this.Ca.length=1;break;case 23:this.Th=b[1],this.We=null}this.qa.Yu(this.Sd);4<=this.type&&17>=this.type&& (this.first=new $b(c,b[1]),this.second=new $b(c,b[2]));if(f){var d,a;d=0;for(a=f.length;d=b||l<=-b)l%=b;0>l&&(l+=b);e.apply(v[l],h)};h.prototype.yt=function(c){var b=this.Sd,h=this.Ca,d=this.P,a=this.Uc,e=this.Sc,l=this.kb,g=this.qa.Xd,v=b.ma(),m=v.Tc();if(!m.length)if(v.aa.length)m=v.aa;else{this.fg?c.za(""):c.fa(0);return}h[0]=c;c.nf=b;c=n();f(d,h,c);a&&(a.get(c),c.cb()&&(g=c.data,m=b.d));--p;d=m.length;if(g>=d||g<=-d)g%=d;0>g&&(g+=d);g=m[g];m=0;b.J&&(m=g.type.Ef[b.Hd]);l.apply(g.L[e+m],h)};h.prototype.Gt=function(c){var b=this.Uc,f=this.Sd,d=this.Pq,a=this.qa.Xd,e= f.ma(),l=e.Tc();if(!l.length)if(e.aa.length)l=e.aa;else{this.fg?c.za(""):c.fa(0);return}if(b){e=n();b.get(e);if(e.cb()){a=e.data;l=f.d;0!==l.length&&(a%=l.length,0>a&&(a+=l.length));a=f.ll(a);f=a.Ra[d];K(f)?c.za(f):c.u(f);--p;return}--p}b=l.length;if(a>=b||a<=-b)a%=b;0>a&&(a+=b);a=l[a];l=0;f.J&&(l=a.type.si[f.Hd]);f=a.Ra[d+l];K(f)?c.za(f):c.u(f)};h.prototype.Ht=function(c){c.type=cc.uf;c.data=this.value};h.prototype.Dt=function(c){c.type=cc.tf;c.data=this.value};h.prototype.Qt=function(c){c.type= cc.String;c.data=this.value};h.prototype.Tt=function(c){this.first.get(c);c.cb()&&(c.data=-c.data)};h.prototype.pt=function(c){this.first.get(c);var b=n();this.second.get(b);c.cb()&&b.cb()&&(c.data+=b.data,b.Mf()&&c.Tf());--p};h.prototype.Rt=function(c){this.first.get(c);var b=n();this.second.get(b);c.cb()&&b.cb()&&(c.data-=b.data,b.Mf()&&c.Tf());--p};h.prototype.Lt=function(c){this.first.get(c);var b=n();this.second.get(b);c.cb()&&b.cb()&&(c.data*=b.data,b.Mf()&&c.Tf());--p};h.prototype.At=function(c){this.first.get(c); var b=n();this.second.get(b);c.cb()&&b.cb()&&(c.data/=b.data,c.Tf());--p};h.prototype.Kt=function(c){this.first.get(c);var b=n();this.second.get(b);c.cb()&&b.cb()&&(c.data%=b.data,b.Mf()&&c.Tf());--p};h.prototype.Pt=function(c){this.first.get(c);var b=n();this.second.get(b);c.cb()&&b.cb()&&(c.data=Math.pow(c.data,b.data),b.Mf()&&c.Tf());--p};h.prototype.qt=function(c){this.first.get(c);var b=n();this.second.get(b);b.Pf()||c.Pf()?this.ut(c,b):this.tt(c,b);--p};h.prototype.ut=function(c,b){c.Pf()&& b.Pf()?this.xt(c,b):this.wt(c,b)};h.prototype.xt=function(c,b){c.data+=b.data};h.prototype.wt=function(c,b){c.Pf()?c.data+=(Math.round(1E10*b.data)/1E10).toString():c.za(c.data.toString()+b.data)};h.prototype.tt=function(c,b){c.fa(c.data&&b.data?1:0)};h.prototype.Ot=function(c){this.first.get(c);var b=n();this.second.get(b);c.cb()&&b.cb()&&(c.data||b.data?c.fa(1):c.fa(0));--p};h.prototype.zt=function(c){this.first.get(c);c.data?this.second.get(c):this.Wj.get(c)};h.prototype.Bt=function(c){this.first.get(c); var b=n();this.second.get(b);c.fa(c.data===b.data?1:0);--p};h.prototype.Mt=function(c){this.first.get(c);var b=n();this.second.get(b);c.fa(c.data!==b.data?1:0);--p};h.prototype.It=function(c){this.first.get(c);var b=n();this.second.get(b);c.fa(c.datab.data?1:0);--p};h.prototype.Ft=function(c){this.first.get(c); var b=n();this.second.get(b);c.fa(c.data>=b.data?1:0);--p};h.prototype.Ct=function(c){var b=this.We.Ze();ja(b)?c.u(b):c.za(b)};$b=h;q.prototype.Mf=function(){return this.type===cc.tf};q.prototype.cb=function(){return this.type===cc.uf||this.type===cc.tf};q.prototype.Pf=function(){return this.type===cc.String};q.prototype.Tf=function(){this.Mf()||(this.Pf()&&(this.data=parseFloat(this.data)),this.type=cc.tf)};q.prototype.fa=function(c){this.type=cc.uf;this.data=Math.floor(c)};q.prototype.u=function(c){this.type= cc.tf;this.data=c};q.prototype.za=function(c){this.type=cc.String;this.data=c};q.prototype.Pv=function(c){ja(c)?(this.type=cc.tf,this.data=c):K(c)?(this.type=cc.String,this.data=c.toString()):(this.type=cc.uf,this.data=0)};Zb=q;cc={uf:0,tf:1,String:2}})();function V(h){this.b=h;this.Pb=[]} V.prototype.Nb=function(){var h={},n,f,q,t,p,c,b,w;h.waits=[];var d=h.waits,a;n=0;for(f=this.Pb.length;nc)){var b,f,d,a=this.b.Ib(),e;t.length?e=t.pop():e={Db:{},wa:[]};e.Sk=!1;e.time= this.b.nb.X+c;e.sq="";e.Sm=!1;e.Df=a.fc;e.Rb=a.Rb+1;c=0;for(b=this.b.m.length;ca&&(b=a);c.u(b)};f.prototype.oe=function(c){c.u(this.b.oe)};f.prototype.mg=function(c){c.u(this.b.mg)};f.prototype.time=function(c){c.u(this.b.nb.X)};f.prototype.bd=function(c){c.fa(this.b.bd)};f.prototype.lj=function(c){c.fa(this.b.lj)};f.prototype.cl=function(c){c.fa(this.b.cl)};f.prototype.k=function(c, b,f,d,a){c.u(Ha(Oa(b,f,d,a)))};f.prototype.Tu=function(c){c.fa(this.b.U.width)};f.prototype.Su=function(c){c.fa(this.b.U.height)};f.prototype.left=function(c,b,f){c.za(K(b)?b.substr(0,f):"")};f.prototype.right=function(c,b,f){c.za(K(b)?b.substr(b.length-f):"")};f.prototype.Yv=function(c,b,f,d){K(b)&&K(d)?(b=b.split(d),f=O(f),0>f||f>=b.length?c.za(""):c.za(b[f])):c.za("")};f.prototype.replace=function(c,b,f,d){K(b)&&K(f)&&K(d)?c.za(b.replace(new RegExp(fb(f),"gi"),d)):c.za(K(b)?b:"")};f.prototype.trim= function(c,b){c.za(K(b)?b.trim():"")};f.prototype.Is=function(c){var b=O(Math.random()*(arguments.length-1));c.Pv(arguments[b+1])};f.prototype.Nk=function(c){c.u(this.b.Nk/1E3)};f.prototype.ye=function(c){c.u(this.b.ye)};q.M=new f;q.Dv=function(){var c,b,f,d,a,e,l=this.b.Ib();c=0;for(f=this.Pb.length;cthis.b.nb.X)continue;l.fc=d.Df;l.Rb=d.Rb;l.Sb=0;for(b in d.Db)d.Db.hasOwnProperty(b)&&(a=this.b.m[parseInt(b,10)].ma(),e=d.Db[b], a.ua=e.Hj,Ba(a.d,e.Ld),a=e,R(a.Ld),p.push(a));d.Df.Cv();this.b.Lk(d.wa);d.Sk=!0}b=c=0;for(f=this.Pb.length;ca.ta||b.top>a.ra)},a.zw=function(){this.Za();var a=this.Oa,b=this.b.U;return 0>a.right||0>a.bottom||a.left>b.width||a.top>b.height},a.Jw=function(a,b,c){var e=this.ma(),d= e.Tc();if(!d.length)return!1;var l=d[0],f=l,h=Ta(l.x,l.y,b,c),p,n,t;p=1;for(n=d.length;ph)h=t,f=l;e.Bh(f);return!0},e.Hn=function(a){this.x!==a&&(this.x=a,this.Ma())},e.In=function(a){this.y!==a&&(this.y=a,this.Ma())},e.Vw=function(a,b){if(this.x!==a||this.y!==b)this.x=a,this.y=b,this.Ma()},e.Ww=function(a,b){var c=a.gu(this);if(c){var e;c.kl?(e=c.kl(b,!0),c=c.kl(b,!1)):(e=c.x,c=c.y);if(this.x!==e||this.y!==c)this.x=e,this.y=c,this.Ma()}},e.Dw= function(a){0!==a&&(this.x+=Math.cos(this.k)*a,this.y+=Math.sin(this.k)*a,this.Ma())},e.Cw=function(a,b){0!==b&&(this.x+=Math.cos(U(a))*b,this.y+=Math.sin(U(a))*b,this.Ma())},l.uk=function(a){a.u(this.x)},l.vk=function(a){a.u(this.y)},l.oe=function(a){a.u(this.b.hl(this))});p&&(a.rw=function(a,b){return dc(this.width,a,b)},a.$q=function(a,b){return dc(this.height,a,b)},e.Gn=function(a){this.width!==a&&(this.width=a,this.Ma())},e.Yr=function(a){this.height!==a&&(this.height=a,this.Ma())},e.Xw=function(a, b){if(this.width!==a||this.height!==b)this.width=a,this.height=b,this.Ma()},l.ms=function(a){a.u(this.width)},l.fr=function(a){a.u(this.height)},l.lw=function(a){this.Za();a.u(this.Oa.left)},l.nw=function(a){this.Za();a.u(this.Oa.top)},l.mw=function(a){this.Za();a.u(this.Oa.right)},l.kw=function(a){this.Za();a.u(this.Oa.bottom)});c&&(a.Uq=function(a,b){return Pa(this.k,U(b))<=U(a)},a.jr=function(a){return Ra(this.k,U(a))},a.tn=function(a,b){var c=Na(a),e=Na(b),d=Ja(this.k);return Ra(e,c)?Ra(d,c)&& !Ra(d,e):!(!Ra(d,c)&&Ra(d,e))},e.Vr=function(a){a=U(Ia(a));isNaN(a)||this.k===a||(this.k=a,this.Ma())},e.Sr=function(a){0===a||isNaN(a)||(this.k+=U(a),this.k=Ja(this.k),this.Ma())},e.Ow=function(a){0===a||isNaN(a)||(this.k-=U(a),this.k=Ja(this.k),this.Ma())},e.Pw=function(a,b){var c=Qa(this.k,U(b),U(a));isNaN(c)||this.k===c||(this.k=c,this.Ma())},e.Qw=function(a,b,c){a=Qa(this.k,Math.atan2(c-this.y,b-this.x),U(a));isNaN(a)||this.k===a||(this.k=a,this.Ma())},e.Yw=function(a,b){var c=Math.atan2(b-this.y, a-this.x);isNaN(c)||this.k===c||(this.k=c,this.Ma())},l.Tq=function(a){a.u(Ka(this.k))});q||(a.pw=function(a,b,c){return dc(this.Ra[a],b,c)},a.ww=function(a){return this.Ra[a]},a.Kw=function(a,b){var c=this.ma(),e=c.Tc();if(!e.length)return!1;var d=e[0],l=d,f=d.Ra[b],h,p,n;h=1;for(p=e.length;hf)f=n,l=d;c.Bh(l);return!0},a.Iw=function(a){var b,c,e,d,l;if(this.b.Bo().Gl){l=this.ma();if(l.ua)for(l.ua=!1,R(l.d),R(l.aa),e=this.d,b=0,c=e.length;ba?a=0:1d.j.index||e.j.index===d.j.index&&e.md()>d.md())d=e}else if(e.j.indexc)){var e=1===a;this.ge[c]!==e&&(this.ge[c]=e,this.dd(),this.b.ca=!0)}}},e.Tw=function(a,b,c){if(this.b.n){var e=this.type.jl(a);0>e||(a=this.type.I[e],e=this.Aa[e],b=Math.floor(b),0>b||b>=e.length||(1===this.b.n.ku(a.Na,b)&&(c/=100),e[b]!==c&&(e[b]=c,a.ab&&(this.b.ca=!0))))}})};Jb=function(){this.Ik=this.bi=!0;this.type.Qn=!0;this.b.ca=!0;var h,f,q=this.Ck;h=0;for(f= q.length;hq;case 5:return h>=q;default:return!1}}})();var mc={};function pc(h){this.b=h} (function(){function h(){}function n(){}function f(){}var q=!1,t=null,p=null,c="",b=pc.prototype;b.la=function(a){this.ga=a;this.b=a.b};b.la.prototype.O=function(){};b.da=function(a){this.type=a;this.b=a.b;this.bb=this.ob="";this.hb=0;this.timeout=-1;if(q=this.b.nd)t=require("path"),p=require("fs"),c=t.dirname(process.execPath)+"\\"};var w=b.da.prototype,d=null;window.C2_AJAX_DCSide=function(a,b,c){d&&("success"===a?(d.bb=b,d.ob=c,d.b.trigger(pc.prototype.e.fe,d)):"error"===a?(d.bb=b,d.b.trigger(pc.prototype.e.vf, d)):"progress"===a&&(d.hb=c,d.bb=b,d.b.trigger(pc.prototype.e.Yh,d)))};w.O=function(){d=this};w.Nb=function(){return{lastData:this.ob}};w.nc=function(a){this.ob=a.lastData;this.bb="";this.hb=0};var a={},e="";w.oi=function(b,d,f,m){if(this.b.Sa)AppMobi.webview.execute('C2_AJAX_WebSide("'+b+'", "'+d+'", "'+f+'", '+(m?'"'+m+'"':"null")+");");else{var h=this,k=null,t=function(){h.bb=b;h.b.trigger(pc.prototype.e.vf,h)},n=function(){if(q){var a=c+d;p.existsSync(a)?p.readFile(a,{encoding:"utf8"},function(a, b){a?t():(h.ob=b.replace(/\r\n/g,"\n"),h.b.trigger(pc.prototype.e.fe,h))}):t()}else t()},w=function(a){a.lengthComputable&&(h.hb=a.loaded/a.total,h.bb=b,h.b.trigger(pc.prototype.e.Yh,h))};try{this.b.mc?k=new ActiveXObject("Microsoft.XMLHTTP"):k=new XMLHttpRequest;k.onreadystatechange=function(){4===k.readyState&&(h.bb=b,k.responseText?h.ob=k.responseText.replace(/\r\n/g,"\n"):h.ob="",400<=k.status?h.b.trigger(pc.prototype.e.vf,h):q&&!h.ob.length||!q&&0===k.status&&!h.ob.length||h.b.trigger(pc.prototype.e.fe, h))};this.b.mc||(k.onerror=n,k.ontimeout=n,k.onabort=n,k.onprogress=w);k.open(f,d);!this.b.mc&&0<=this.timeout&&"undefined"!==typeof k.timeout&&(k.timeout=this.timeout);try{k.responseType="text"}catch(C){}m&&k.setRequestHeader&&!a.hasOwnProperty("Content-Type")&&k.setRequestHeader("Content-Type","application/x-www-form-urlencoded");if(k.setRequestHeader){for(var L in a)if(a.hasOwnProperty(L))try{k.setRequestHeader(L,a[L])}catch(S){}a={}}if(e&&k.overrideMimeType){try{k.overrideMimeType(e)}catch(F){}e= ""}m?k.send(m):k.send()}catch(M){n()}}};h.prototype.fe=function(a){return mb(a,this.bb)};h.prototype.vf=function(a){return mb(a,this.bb)};h.prototype.Yh=function(a){return mb(a,this.bb)};b.e=new h;n.prototype.Qr=function(a,b){this.oi(a,b,"GET")};n.prototype.En=function(a,b,c,e){this.oi(a,b,e,c)};b.A=new n;f.prototype.un=function(a){a.za(this.ob)};b.M=new f})();function qc(h){this.b=h} (function(){function h(a){0>a&&(a=0);1a&&(a=.01);this.zj.gain.value=a;this.yj.gain.value=Math.pow(1/a,.6)*b};m.prototype.shape=function(a,b,c){var e=1.05*c*b-b;c=0>a?-1:1;a=0>a?-a:a;b=ag;++g)d=g/32768,d=this.shape(d,c,e),this.ki[32768+g]=d,this.ki[32768-g-1]=-d};m.prototype.Ac=function(a){this.H.disconnect();this.H.connect(a);this.F.disconnect();this.F.connect(a)};m.prototype.remove=function(){this.W.disconnect(); this.zj.disconnect();this.fk.disconnect();this.yj.disconnect();this.H.disconnect();this.F.disconnect()};m.prototype.ic=function(){return this.W};u.prototype.Ac=function(a){this.Y.disconnect();this.Y.connect(a)};u.prototype.remove=function(){this.Y.disconnect()};u.prototype.ic=function(){return this.Y};k.prototype.Ya=function(){this.Y.getFloatFrequencyData(this.Xt);this.Y.getByteTimeDomainData(this.qq);for(var a=this.Y.fftSize,b=0,c=this.Ah=0,e=0;be&&(e=-e),this.Ah< e&&(this.Ah=e),c+=e*e;this.Ah=h(this.Ah);h(Math.sqrt(c/a))};k.prototype.Ac=function(a){this.Y.disconnect();this.Y.connect(a)};k.prototype.remove=function(){this.Y.disconnect()};k.prototype.ic=function(){return this.Y};r.prototype.Gh=function(a){if(this.G=a)this.Ui=this.G.x,this.Vi=this.G.y;R(this.He)};r.prototype.Ki=function(){return!!this.G};r.prototype.Ya=function(a){this.G&&0!==a&&(this.gm=Oa(this.Ui,this.Vi,this.G.x,this.G.y),a=Ta(this.Ui,this.Vi,this.G.x,this.G.y)/a,4>this.He.length||this.He.shift(), this.He.push(a),this.Ui=this.G.x,this.Vi=this.G.y)};r.prototype.Go=function(){if(!this.He.length)return 0;var a,b,c=0;a=0;for(b=this.He.length;ab&&(c=b);return c};z.prototype.df=function(){return!this.Xb&&!this.Jd&&!this.ac&&!this.Jf()};z.prototype.Zv=function(){var a=this.volume*D;isFinite(a)||(a=0);switch(this.S){case 0:"undefined"!==typeof this.i.volume&&this.i.volume!==a&&(this.i.volume=a);break;case 1:1===this.buffer.S?this.Qa.gain.value=a*this.Uf:"undefined"!==typeof this.i.volume&&this.i.volume!==a&&(this.i.volume=a)}};z.prototype.pi= function(a){switch(this.S){case 0:this.i.muted!==!!a&&(this.i.muted=!!a);break;case 1:1===this.buffer.S?(this.Uf=a?0:1,this.Qa.gain.value=D*this.volume*this.Uf):this.i.muted!==!!a&&(this.i.muted=!!a)}};z.prototype.Lv=function(){this.Nf=!0;this.pi(this.Nf||this.dh)};z.prototype.Lj=function(a){this.dh=!!a;this.pi(this.Nf||this.dh)};z.prototype.bk=function(){var a=this.playbackRate;this.Lf&&(a*=x.mg);switch(this.S){case 0:this.i.playbackRate!==a&&(this.i.playbackRate=a);break;case 1:1===this.buffer.S? this.i.playbackRate.value!==a&&(this.i.playbackRate.value=a):this.i.playbackRate!==a&&(this.i.playbackRate=a)}};z.prototype.Nv=function(a){switch(this.S){case 0:a?this.df()?(this.qc=!0,this.i.pause()):this.qc=!1:this.qc&&(this.i.play(),this.qc=!1);break;case 1:a?this.df()?(this.qc=!0,1===this.buffer.S?(this.Mb=this.ml(!0),this.od&&(this.Mb=this.Mb%this.Ye()),c(this.i)):this.i.pause()):this.qc=!1:this.qc&&(1===this.buffer.S?(this.i=B.createBufferSource(),this.i.buffer=this.buffer.ba,this.i.connect(this.Qa), this.i.onended=this.tm,this.Zh=this.i,this.i.loop=this.od,this.Qa.gain.value=D*this.volume*this.Uf,this.bk(),this.startTime=(this.Lf?x.nb.X:x.$d.X)-this.Mb/(this.playbackRate||.001),p(this.i,this.Mb,this.Ye())):this.i.play(),this.qc=!1);break;case 2:a?this.df()?(this.i.pause(),this.qc=!0):this.qc=!1:this.qc&&(this.qc=!1,this.i.play())}};M.da=function(a){this.type=a;x=this.b=a.b;fa=this;this.Bb=null;this.oh=-600;!(this.b.Qf||this.b.Ug&&(this.b.Vg||this.b.Oi))||this.b.Wg||this.b.pa||this.b.Hl||(Ua= !0);B=null;"undefined"!==typeof AudioContext?(J=1,B=new AudioContext):"undefined"!==typeof webkitAudioContext&&(J=1,B=new webkitAudioContext);Ua&&document.addEventListener("touchend",function(){if(!wc&&B){var a=B.createBuffer(1,1,22050),b=B.createBufferSource();b.buffer=a;b.connect(B.destination);t(b);wc=!0}var c;if(Ua){if(!E)for(a=0,b=Va.length;a"!==b&&(a.wj=b,a.am=e,a.mn=d),null;l=new z(a,b);G.push(l);return l};var Ea=[];S.prototype.Xh=function(a){return mb(ga,a)};S.prototype.mr=function(a){C(a);var b;a=0;for(b=Ea.length;ac&&(c=0),1(f.wheelDelta?f.wheelDelta:f.detail?-f.detail: 0)?0:1;this.ul=!1;this.b.mb=!0;this.b.trigger(sc.prototype.e.Or,this);this.b.mb=!1;this.ul&&nb(f)&&f.preventDefault()};h.prototype.vn=function(f,c){return f===this.ng&&c===this.Yj};h.prototype.ur=function(){return!0};h.prototype.Lr=function(f){return f===this.ng};h.prototype.Cn=function(f,c,b){return f!==this.ng||c!==this.Yj?!1:this.b.Ph(b,this.Ae,this.Be)};h.prototype.Or=function(f){this.ul=!0;return f===this.Dq};f.e=new h;f.A=new function(){};n.prototype.uk=function(f,c){var b,h,d,a,e;ea(c)?(b= this.b.Kd(0),h=b.scale,d=b.Qb,a=b.Gc,e=b.k,b.scale=1,b.Qb=1,b.Gc=1,b.k=0,f.u(b.Pa(this.Ae,this.Be,!0)),b.scale=h,b.Qb=d,b.Gc=a,b.k=e):(b=ja(c)?this.b.Kd(c):this.b.Mg(c))?f.u(b.Pa(this.Ae,this.Be,!0)):f.u(0)};n.prototype.vk=function(f,c){var b,h,d,a,e;ea(c)?(b=this.b.Kd(0),h=b.scale,d=b.Qb,a=b.Hc,e=b.k,b.scale=1,b.Qb=1,b.Hc=1,b.k=0,f.u(b.Pa(this.Ae,this.Be,!1)),b.scale=h,b.Qb=d,b.Hc=a,b.k=e):(b=ja(c)?this.b.Kd(c):this.b.Mg(c))?f.u(b.Pa(this.Ae,this.Be,!1)):f.u(0)};f.M=new n})(); function tc(h){this.b=h} (function(){function h(f){this.qa=f;this.ab=!1;this.k=this.speed=this.y=this.x=0;this.opacity=1;this.ie=this.If=this.size=this.Gi=0}var n=tc.prototype;n.la=function(f){this.ga=f;this.b=f.b};var f=n.la.prototype;f.O=function(){this.J||(this.Ia=new Image,this.Ia.ko=this.Xm,this.ib=null,this.b.Qq(this.Ia,this.Wm))};f.mj=function(){this.J||(this.ib=null)};f.qm=function(){this.J||!this.d.length||this.ib||(this.ib=this.b.n.dj(this.Ia,!0,this.b.R,this.Ym))};f.Wl=function(){this.J||this.ib||!this.b.n||(this.ib= this.b.n.dj(this.Ia,!0,this.b.R,this.Ym))};f.gn=function(){this.J||this.d.length||!this.ib||(this.b.n.deleteTexture(this.ib),this.ib=null)};f.zm=function(f){f.drawImage(this.Ia,0,0)};h.prototype.init=function(){var f=this.qa;this.x=f.x-f.gk/2+Math.random()*f.gk;this.y=f.y-f.hk/2+Math.random()*f.hk;this.speed=f.Dl-f.Pj/2+Math.random()*f.Pj;this.k=f.k-f.Qj/2+Math.random()*f.Qj;this.opacity=f.Bl;this.size=f.Cl-f.Oj/2+Math.random()*f.Oj;this.Gi=f.tl-f.Hi/2+Math.random()*f.Hi;this.ie=this.If=0};h.prototype.Ya= function(f){var h=this.qa;this.x+=Math.cos(this.k)*this.speed*f;this.y+=Math.sin(this.k)*this.speed*f;this.y+=this.If*f;this.speed+=h.wk*f;this.size+=this.Gi*f;this.If+=h.fl*f;this.ie+=f;1>this.size?this.ab=!1:(0!==h.lh&&(this.k+=Math.random()*h.lh*f-h.lh*f/2),0!==h.nh&&(this.speed+=Math.random()*h.nh*f-h.nh*f/2),0!==h.mh&&(this.opacity+=Math.random()*h.mh*f-h.mh*f/2,0>this.opacity?this.opacity=0:1=h.Bf&&this.ie>=h.timeout&&(this.ab=!1),2===h.Bf&&0>=this.speed&& (this.ab=!1))};h.prototype.gc=function(f){var h=this.qa.opacity*this.opacity;if(0!==h){0===this.qa.Bf&&(h*=1-this.ie/this.qa.timeout);f.globalAlpha=h;var h=this.x-this.size/2,c=this.y-this.size/2;this.qa.b.Zc&&(h=h+.5|0,c=c+.5|0);f.drawImage(this.qa.type.Ia,h,c,this.size,this.size)}};h.prototype.Hb=function(f){var h=this.qa.opacity*this.opacity;0===this.qa.Bf&&(h*=1-this.ie/this.qa.timeout);var c=this.size,b=c*this.qa.Vp,n=this.x-c/2,d=this.y-c/2;this.qa.b.Zc&&(n=n+.5|0,d=d+.5|0);1>b||0===h||(bf.cm?(f.pf(h),f.bg(n,d,n+c,d,n+c,d+c,n,d+c)):f.ov(this.x,this.y,b,h))};h.prototype.left=function(){return this.x-this.size/2};h.prototype.right=function(){return this.x+this.size/2};h.prototype.top=function(){return this.y-this.size/2};h.prototype.bottom=function(){return this.y+this.size/2};n.da=function(f){this.type=f;this.b=f.b};var f=n.da.prototype,q=[];f.O=function(){var f=this.T;this.Cj=f[0];this.Qj=U(f[1]);this.hg=f[2];this.Tm=!0;this.Dl=f[3];this.Cl=f[4];this.Bl=f[5]/100;this.tl=f[6];this.gk= f[7];this.hk=f[8];this.Pj=f[9];this.Oj=f[10];this.Hi=f[11];this.wk=f[12];this.fl=f[13];this.lh=f[14];this.nh=f[15];this.mh=f[16];this.Bf=f[17];this.timeout=f[18];this.of=0;this.Vp=1;this.sj=this.x;this.uj=this.y;this.tj=this.x;this.rj=this.y;this.ws(function(f){f.Oa.set(f.sj,f.uj,f.tj,f.rj);f.le.Ih(f.Oa);f.bi=!1;f.aw();f.Nq()});this.pc||(this.Cb=[]);this.b.lg(this);this.type.Wl();if(1===this.hg)for(f=0;fthis.tj&&(this.tj=b.right()),b.top()this.rj&&(this.rj=b.bottom()),n++): q.push(b);za(this.Cb,n);this.Ma();this.wi=!1;1===this.hg&&0===this.Cb.length&&this.b.be(this)};f.gc=function(f){var h,c,b,n=this.j;h=0;for(c=this.Cb.length;h=n.ja&&b.bottom()>=n.ka&&b.left()<=n.ta&&b.top()<=n.ra&&b.gc(f)};f.Hb=function(f){this.Vp=this.j.Jb();f.$b(this.type.ib);var h,c,b,n=this.j;h=0;for(c=this.Cb.length;h=n.ja&&b.bottom()>=n.ka&&b.left()<=n.ta&&b.top()<=n.ra&&b.Hb(f)};n.e=new function(){};n.A=new function(){};n.M=new function(){}})(); function Y(h){this.b=h} (function(){function h(){}function n(){}function f(){}var q=!1,t=null,p=null,c="",b=Y.prototype;b.la=function(a){this.ga=a;this.b=a.b};b.la.prototype.O=function(){};b.da=function(a){this.type=a;this.b=a.b;this.bb=this.ob="";this.hb=0;this.timeout=-1;if(q=this.b.Lu)t=require("path"),p=require("fs"),c=t.dirname(process.execPath)+"\\"};var w=b.da.prototype,d=null;window.C2_AJAX_DCSide=function(a,b,c){d&&("success"===a?(d.bb=b,d.ob=c,d.b.trigger(Y.prototype.e.fe,d)):"error"===a?(d.bb=b,d.b.trigger(Y.prototype.e.vf, d)):"progress"===a&&(d.hb=c,d.bb=b,d.b.trigger(Y.prototype.e.Yh,d)))};w.O=function(){var a=this;d=this;window.addEventListener("resize",function(){a.b.trigger(Y.prototype.e.pk,a)});"undefined"!==typeof navigator.onLine&&(window.addEventListener("online",function(){a.b.trigger(Y.prototype.e.mk,a)}),window.addEventListener("offline",function(){a.b.trigger(Y.prototype.e.lk,a)}));"undefined"!==typeof window.applicationCache&&(window.applicationCache.addEventListener("updateready",function(){a.b.ye=1; a.b.trigger(Y.prototype.e.vg,a)}),window.applicationCache.addEventListener("progress",function(b){a.b.ye=b.loaded/b.total}));this.b.Sa||(document.addEventListener("appMobi.device.update.available",function(){a.b.trigger(Y.prototype.e.vg,a)}),document.addEventListener("backbutton",function(){a.b.trigger(Y.prototype.e.ee,a)}),document.addEventListener("menubutton",function(){a.b.trigger(Y.prototype.e.ug,a)}),document.addEventListener("searchbutton",function(){a.b.trigger(Y.prototype.e.rk,a)}),document.addEventListener("tizenhwkey", function(b){var c;switch(b.keyName){case "back":c=a.b.trigger(Y.prototype.e.ee,a);!c&&window.tizen&&window.tizen.application.getCurrentApplication().exit();break;case "menu":(c=a.b.trigger(Y.prototype.e.ug,a))||b.preventDefault()}}));this.b.bh&&(WinJS.Application.onbackclick=function(){return!!a.b.trigger(Y.prototype.e.ee,a)});this.b.xk(function(b){b?a.b.trigger(Y.prototype.e.nk,a):a.b.trigger(Y.prototype.e.ok,a)});this.Uo="undefined"!==typeof window.is_scirra_arcade};w.Nb=function(){return{lastData:this.ob}}; w.nc=function(a){this.ob=a.lastData;this.bb="";this.hb=0};var a={};w.oi=function(b,d,g,f){if(this.b.Sa)AppMobi.webview.execute('C2_AJAX_WebSide("'+b+'", "'+d+'", "'+g+'", '+(f?'"'+f+'"':"null")+");");else{var h=this,n=null,k=function(){h.bb=b;h.b.trigger(Y.prototype.e.vf,h)},r=function(){if(q){var a=c+d;p.existsSync(a)?p.readFile(a,{encoding:"utf8"},function(a,b){a?k():(h.ob=b.replace(/\r\n/g,"\n"),h.b.trigger(Y.prototype.e.fe,h))}):k()}else k()},t=function(a){a.lengthComputable&&(h.hb=a.loaded/a.total, h.bb=b,h.b.trigger(Y.prototype.e.Yh,h))};try{this.b.mc?n=new ActiveXObject("Microsoft.XMLHTTP"):n=new XMLHttpRequest;n.onreadystatechange=function(){4===n.readyState&&(h.bb=b,n.responseText?h.ob=n.responseText.replace(/\r\n/g,"\n"):h.ob="",400<=n.status?h.b.trigger(Y.prototype.e.vf,h):q&&!h.ob.length||h.b.trigger(Y.prototype.e.fe,h))};this.b.mc||(n.onerror=r,n.ontimeout=r,n.onabort=r,n.onprogress=t);n.open(g,d);!this.b.mc&&0<=this.timeout&&"undefined"!==typeof n.timeout&&(n.timeout=this.timeout); try{n.responseType="text"}catch(w){}f&&n.setRequestHeader&&n.setRequestHeader("Content-Type","application/x-www-form-urlencoded");if(n.setRequestHeader){for(var C in a)if(a.hasOwnProperty(C))try{n.setRequestHeader(C,a[C])}catch(L){}a={}}f?n.send(f):n.send()}catch(S){r()}}};h.prototype.fe=function(){return mb("shareplugin",this.bb)};h.prototype.mk=function(){return!0};h.prototype.lk=function(){return!0};h.prototype.vg=function(){return!0};h.prototype.ok=function(){return!0};h.prototype.nk=function(){return!0}; h.prototype.pk=function(){return!0};h.prototype.ee=function(){return!0};h.prototype.ug=function(){return!0};h.prototype.rk=function(){return!0};b.e=new h;n.prototype.En=function(a,b,c,d){this.oi("shareplugin",c,"POST","foto="+b+"&nome="+a+"&folder="+d)};b.A=new n;f.prototype.un=function(a){a.za(this.ob)};b.M=new f})();function X(h){this.b=h} (function(){function h(){if(0===this.Qk.length){var a=document.createElement("canvas");a.width=this.width;a.height=this.height;var b=a.getContext("2d");this.ig?b.drawImage(this.Ia,this.Vf,this.Wf,this.width,this.height,0,0,this.width,this.height):b.drawImage(this.Ia,0,0,this.width,this.height);this.Qk=a.toDataURL("image/png")}return this.Qk}function n(){}function f(){}function q(){}var t=X.prototype;t.la=function(a){this.ga=a;this.b=a.b};var p=t.la.prototype;p.O=function(){if(!this.J){var a,b,c,d, f,m,n,k,r;this.Qc=[];this.Rg=!1;a=0;for(b=this.Gb.length;athis.B&&(this.B=0);this.B>=this.xa.frames.length&&(this.B=this.xa.frames.length-1);var a=this.xa.frames[this.B];this.hd.Jh(a.xj);this.Vb=a.Vb;this.Wb=a.Wb;this.Hg=this.xa.speed;this.pc?this.fd.reset():this.fd= new eb;this.Id=this.fd.X;this.Me=!0;this.xd=0;this.Le=!0;this.ei=this.On="";this.fo=0;this.di=-1;this.type.Wl();var b,c,d,f,h,n,k,a=0;for(b=this.type.Gb.length;athis.B&&(this.B=0);this.B>=this.xa.frames.length&&(this.B=this.xa.frames.length-1);this.Hg=a.cas;this.Id=a.fs;this.xd=a.ar;this.fd.reset();this.fd.X=a.at;this.Me=a.hasOwnProperty("ap")?a.ap:!0;this.Le=a.hasOwnProperty("af")?a.af:!0;this.Ub=this.xa.frames[this.B];this.ii= this.Ub.ib;this.hd.Jh(this.Ub.xj);this.Vb=this.Ub.Vb;this.Wb=this.Ub.Wb};b.Bk=function(a){this.B=a?0:this.xa.frames.length-1;this.Me=!1;this.On=this.xa.name;this.Li=!0;this.b.trigger(X.prototype.e.tr,this);this.b.trigger(X.prototype.e.sr,this);this.Li=!1;this.xd=0};b.Un=function(){return this.fd.X};b.Ya=function(){this.fd.add(this.b.hl(this));this.ei.length&&this.no();0<=this.di&&this.oo();var a=this.fd.X,b=this.xa,c=b.frames[this.B],d=c.duration/this.Hg;this.Me&&a>=this.Id+d&&(this.Le?this.B++:this.B--, this.Id+=d,this.B>=b.frames.length&&(b.Wp?(this.Le=!1,this.B=b.frames.length-2):b.loop?this.B=b.Ej:(this.xd++,this.xd>=b.Im?this.Bk(!1):this.B=b.Ej)),0>this.B&&(b.Wp?(this.B=1,this.Le=!0,b.loop||(this.xd++,this.xd>=b.Im&&this.Bk(!0))):b.loop?this.B=b.Ej:(this.xd++,this.xd>=b.Im?this.Bk(!0):this.B=b.Ej)),0>this.B?this.B=0:this.B>=b.frames.length&&(this.B=b.frames.length-1),a>this.Id+b.frames[this.B].duration/this.Hg&&(this.Id=a),a=b.frames[this.B],this.wf(c,a),this.b.ca=!0)};b.zo=function(a){var b, c,d;b=0;for(c=this.type.Gb.length;bthis.B&&(this.B=0),this.B>=this.xa.frames.length&&(this.B=this.xa.frames.length-1),1===this.fo&&(this.B=0),this.Me=!0,this.Id=this.fd.X,this.Le=!0, this.wf(a,this.xa.frames[this.B]),this.b.ca=!0)};b.oo=function(){var a=this.xa.frames[this.B],b=this.B;this.B=O(this.di);0>this.B&&(this.B=0);this.B>=this.xa.frames.length&&(this.B=this.xa.frames.length-1);b!==this.B&&(this.wf(a,this.xa.frames[this.B]),this.Id=this.fd.X,this.b.ca=!0);this.di=-1};b.wf=function(a,b){var c=a.width,d=a.height,f=b.width,h=b.height;c!=f&&(this.width*=f/c);d!=h&&(this.height*=h/d);this.Vb=b.Vb;this.Wb=b.Wb;this.hd.Jh(b.xj);this.Ma();this.Ub=b;this.ii=b.ib;c=0;for(d=this.L.length;c< d;c++)f=this.L[c],f.iv&&f.iv(a,b);this.b.trigger(X.prototype.e.wf,this)};b.gc=function(a){a.globalAlpha=this.opacity;var b=this.Ub,c=b.ig,d=b.Ia,f=this.x,h=this.y,n=this.width,k=this.height;if(0===this.k&&0<=n&&0<=k)f-=this.Vb*n,h-=this.Wb*k,this.b.Zc&&(f=Math.round(f),h=Math.round(h)),c?a.drawImage(d,b.Vf,b.Wf,b.width,b.height,f,h,n,k):a.drawImage(d,f,h,n,k);else{this.b.Zc&&(f=Math.round(f),h=Math.round(h));a.save();var r=0f||f>=d.length)return b?this.x:this.y;var h=(d[f][1]-c.Vb)*this.width,d=d[f][2],d=(d-c.Wb)*this.height,c=Math.cos(this.k);f=Math.sin(this.k);var n=h*c-d*f,d=d*c+h*f,h=n+this.x,d=d+this.y;return b?h:d};var w=new ba,d=!1;new sa(0,0,0,0);p.finish=function(a){if(d){if(a){var b= this.b.Ib().fc.qd;a=null.ma();var c=w.Ke(),f,h;if(a.ua){a.ua=!1;R(a.d);f=0;for(h=c.length;fb.ta||a.top>b.ra)this.b.n.deleteTexture(this.Yb),this.pd=this.mf=this.Yb=null}};p.Xf=function(){this.pd= this.mf=null;this.b.n&&this.Yb&&this.b.n.deleteTexture(this.Yb);this.Yb=null};p.Mq=function(){this.font=this.xi+" "+this.Dh.toString()+"pt "+this.Gd;this.Ie=!0;this.b.ca=!0};p.gc=function(b,a){b.font=this.font;b.textBaseline="top";b.fillStyle=this.color;b.globalAlpha=a?1:this.opacity;var c=1;a&&(c=this.j.Jb(),b.save(),b.scale(c,c));if(this.Ie||this.width!==this.Sl)this.type.ga.ns(this.text,this.ve,b,this.width,this.pn),this.Ie=!1,this.Sl=this.width;this.Za();var c=a?0:this.le.rc,f=a?0:this.le.tc; this.b.Zc&&(c=c+.5|0,f=f+.5|0);0===this.k||a||(b.save(),b.translate(c,f),b.rotate(this.k),f=c=0);var g=f+this.height,h=this.Em,h=h+this.Vl,m,n;1===this.dk?f+=Math.max(this.height/2-this.ve.length*h/2,0):2===this.dk&&(f+=Math.max(this.height-this.ve.length*h-2,0));for(n=0;n=g-h);n++);(0!==this.k||a)&&b.restore();this.kh=this.b.bd};p.Hb=function(b){if(!(1> this.width||1>this.height)){var a=this.Ie||this.Ap;this.Ap=!1;var c=this.j.Jb(),f=this.j.Ea(),g=this.dg,h=c*this.width,m=c*this.height,n=Math.ceil(h),k=Math.ceil(m),r=this.b.D/2,p=this.b.C/2;this.mf||(this.pd=document.createElement("canvas"),this.pd.width=n,this.pd.height=k,this.Yi=n,this.Xi=k,a=!0,this.mf=this.pd.getContext("2d"));if(n!==this.Yi||k!==this.Xi)this.pd.width=n,this.pd.height=k,this.Yb&&(b.deleteTexture(this.Yb),this.Yb=null),a=!0;a&&(this.mf.clearRect(0,0,n,k),this.gc(this.mf,!0),this.Yb|| (this.Yb=b.ec(n,k,this.b.R,this.b.Pd)),b.ew(this.pd,this.Yb,this.b.Pd));this.Yi=n;this.Xi=k;b.$b(this.Yb);b.pf(this.opacity);b.Ic();b.translate(-r,-p);b.uc();var q=this.le,a=this.j.Ta(q.rc,q.tc,!0),r=this.j.Ta(q.rc,q.tc,!1),p=this.j.Ta(q.Mc,q.Nc,!0),t=this.j.Ta(q.Mc,q.Nc,!1),w=this.j.Ta(q.yc,q.zc,!0),S=this.j.Ta(q.yc,q.zc,!1),F=this.j.Ta(q.wc,q.xc,!0),q=this.j.Ta(q.wc,q.xc,!1);if(this.b.Zc||0===this.k&&0===f)var M=(a+.5|0)-a,x=(r+.5|0)-r,a=a+M,r=r+x,p=p+M,t=t+x,w=w+M,S=S+x,F=F+M,q=q+x;0===this.k&& 0===f?(p=a+n,t=r,w=p,S=r+k,F=a,q=S,g.right=1,g.bottom=1):(g.right=h/n,g.bottom=m/k);b.De(a,r,p,t,w,S,F,q,g);b.Ic();b.scale(c,c);b.Gj(-this.j.Ea());b.translate((this.j.ja+this.j.ta)/-2,(this.j.ka+this.j.ra)/-2);b.uc();this.kh=this.b.bd}};var b=[];t.js=function(c){R(b);for(var a="",e,f=0;f=f)n(a);else{if(100>=b.length&&-1===b.indexOf("\n")){var p=c.measureText(b).width;if(p<=f){n(a);a.push(h());a[0].text=b;a[0].width=p;return}}this.os(b,a,c,f,g)}else n(a)};t.os=function(c,a,e,l,g){g&&(this.js(c),c=b);var n="",m,p,k,r=0;for(k=0;k=a.length&&a.push(h()),n=f(n),p=a[r],p.text=n,p.width=e.measureText(n).width,r++,n=""):(m=n,n+=c[k],p=e.measureText(n).width,p>=l&&(r>= a.length&&a.push(h()),m=f(m),p=a[r],p.text=m,p.width=e.measureText(m).width,r++,n=c[k],g||" "!==n||(n="")));n.length&&(r>=a.length&&a.push(h()),n=f(n),p=a[r],p.text=n,p.width=e.measureText(n).width,r++);for(k=r;kb&&(b=Math.round(1E10*b)/1E10);b=b.toString();this.text!==b&&(this.text=b,this.Ie=!0,this.b.ca=!0)};q.prototype.cs=function(b,a){if(this.b.pa)A("[Construct 2] Text plugin: 'Set web font' not supported on this platform - the action has been ignored"); else{var e=this,f=function(){e.b.ca=!0;e.Ie=!0};if(c.hasOwnProperty(a)){var g="'"+b+"'";if(this.Gd!==g)for(this.Gd=g,this.Mq(),g=1;10>g;g++)setTimeout(f,100*g),setTimeout(f,1E3*g)}else for(g=document.createElement("link"),g.href=a,g.rel="stylesheet",g.type="text/css",g.onload=f,document.getElementsByTagName("head")[0].appendChild(g),c[a]=!0,this.Gd="'"+b+"'",this.Mq(),g=1;10>g;g++)setTimeout(f,100*g),setTimeout(f,1E3*g)}};t.A=new q;t.M=new function(){}})();function Z(h){this.b=h} (function(){function h(b){w=b.x;d=b.y;a=b.z}function n(a,b,c,d){var g;g=e.length?e.pop():new f;g.init(a,b,c,d);return g}function f(){this.Mh=this.id=this.y=this.x=this.Tj=this.Sj=this.Rl=this.time=this.Vm=0;this.Rh=this.Zj=!1}function q(){}function t(){}var p=Z.prototype;p.la=function(a){this.ga=a;this.b=a.b};p.la.prototype.O=function(){};p.da=function(a){this.type=a;this.b=a.b;this.touches=[];this.fm=!1};var c=p.da.prototype,b={left:0,top:0};c.Lg=function(a){var b,c;b=0;for(c=this.touches.length;b< c;b++)if(this.touches[b].id===a)return b;return-1};var w=0,d=0,a=0,e=[];f.prototype.init=function(a,b,c,d){var e=ab();this.Vm=this.Rl=this.time=e;this.Sj=a;this.Tj=b;this.x=a;this.y=b;this.id=c;this.Mh=d;this.Rh=this.Zj=!1};f.prototype.update=function(a,b,c){this.Rl=this.time;this.time=a;this.x=b;this.y=c;!this.Rh&&15<=Ta(this.Sj,this.Tj,this.x,this.y)&&(this.Rh=!0)};f.prototype.Xu=function(a,b){!this.Zj&&500<=ab()-this.Vm&&!this.Rh&&15>Ta(this.Sj,this.Tj,this.x,this.y)&&(this.Zj=!0,a.wd=this.Mh, a.pg=this.id,a.Gf=b,a.b.trigger(Z.prototype.e.Gr,a),a.Ad=this.x,a.Bd=this.y,a.b.trigger(Z.prototype.e.Hr,a),a.Gf=0)};var l=-1E3,g=-1E3,v=-1E4;f.prototype.up=function(a,b){if(!this.Zj){var c=ab();333>=c-this.Vm&&!this.Rh&&15>Ta(this.Sj,this.Tj,this.x,this.y)&&(a.wd=this.Mh,a.pg=this.id,a.Gf=b,666>=c-v&&25>Ta(l,g,this.x,this.y)?(a.b.trigger(Z.prototype.e.Er,a),a.Ad=this.x,a.Bd=this.y,a.b.trigger(Z.prototype.e.Fr,a),g=l=-1E3,v=-1E4):(a.b.trigger(Z.prototype.e.Mr,a),a.Ad=this.x,a.Bd=this.y,a.b.trigger(Z.prototype.e.Nr, a),l=this.x,g=this.y,v=c),a.Gf=0)}};c.O=function(){this.Nu=!("undefined"===typeof window.c2isWindows8||!window.c2isWindows8);this.Gf=this.pg=this.wd=this.Bd=this.Ad=this.Ln=this.Kn=this.Jn=this.ts=this.ss=this.rs=this.qj=this.pj=this.oj=0;this.cw=0!==this.T[0];var a=0d-c.time||c.update(d,a.pageX-e.left,a.pageY-e.top)}}};c.Jp=function(a){if(a.pointerType!==a.MSPOINTER_TYPE_MOUSE&&"mouse"!==a.pointerType){a.preventDefault&&nb(a)&&a.preventDefault();var c= this.b.pa?b:jQuery(this.b.canvas).offset(),d=a.pageX-c.left,c=a.pageY-c.top;ab();this.wd=this.touches.length;this.pg=a.pointerId;this.touches.push(n(d,c,a.pointerId,this.wd));this.b.mb=!0;this.b.trigger(Z.prototype.e.Bn,this);this.b.trigger(Z.prototype.e.Dn,this);this.Ad=d;this.Bd=c;this.b.trigger(Z.prototype.e.tk,this);this.b.mb=!1}};c.nj=function(a,b){if(a.pointerType!==a.MSPOINTER_TYPE_MOUSE&&"mouse"!==a.pointerType){a.preventDefault&&nb(a)&&a.preventDefault();var c=this.Lg(a.pointerId);this.wd= 0<=c?this.touches[c].Mh:-1;this.pg=0<=c?this.touches[c].id:-1;this.b.mb=!0;this.b.trigger(Z.prototype.e.An,this);this.b.trigger(Z.prototype.e.sk,this);0<=c&&(b||this.touches[c].up(this,c),100>e.length&&e.push(this.touches[c]),this.touches.splice(c,1));this.b.mb=!1}};c.Kp=function(a){a.preventDefault&&a.preventDefault();var c=ab(),d,e,f,g;d=0;for(e=a.changedTouches.length;dc-g.time||g.update(c,f.pageX-h.left,f.pageY-h.top)}};c.Lp=function(a){a.preventDefault&&nb(a)&&a.preventDefault();var c=this.b.pa?b:jQuery(this.b.canvas).offset();ab();this.b.mb=!0;var d,e,f,g;d=0;for(e=a.changedTouches.length;de.length&&e.push(this.touches[f]),this.touches.splice(f,1));this.b.mb=!1};c.Un=function(){return this.b.lc&& 0===this.oj&&0!==a?90*a:this.oj};c.gx=function(){return this.b.lc&&0===this.pj&&0!==d?90*d:this.pj};c.hx=function(){return this.b.lc&&0===this.qj&&0!==w?90*w:this.qj};c.nm=function(a){this.Lp({changedTouches:[{pageX:a.pageX,pageY:a.pageY,identifier:0}]});this.fm=!0};c.om=function(a){this.fm&&this.Kp({changedTouches:[{pageX:a.pageX,pageY:a.pageY,identifier:0}]})};c.pm=function(a){a.preventDefault&&this.b.Ii&&!this.b.Pd&&a.preventDefault();this.b.Ii=!0;this.rm({changedTouches:[{pageX:a.pageX,pageY:a.pageY, identifier:0}]});this.fm=!1};c.Zm=function(){var a,b,c,d=ab();a=0;for(b=this.touches.length;ac||c>=this.touches.length)a.u(0);else{var d,e,f,g,h;ea(b)?(d=this.b.Kd(0),e=d.scale,f=d.Qb,g=d.Gc,h=d.k,d.scale=1,d.Qb=1,d.Gc=1,d.k=0,a.u(d.Pa(this.touches[c].x,this.touches[c].y, !0)),d.scale=e,d.Qb=f,d.Gc=g,d.k=h):(d=ja(b)?this.b.Kd(b):this.b.Mg(b))?a.u(d.Pa(this.touches[c].x,this.touches[c].y,!0)):a.u(0)}};t.prototype.vk=function(a,b){var c=this.Gf;if(0>c||c>=this.touches.length)a.u(0);else{var d,e,f,g,h;ea(b)?(d=this.b.Kd(0),e=d.scale,f=d.Qb,g=d.Hc,h=d.k,d.scale=1,d.Qb=1,d.Hc=1,d.k=0,a.u(d.Pa(this.touches[c].x,this.touches[c].y,!1)),d.scale=e,d.Qb=f,d.Hc=g,d.k=h):(d=ja(b)?this.b.Kd(b):this.b.Mg(b))?a.u(d.Pa(this.touches[c].x,this.touches[c].y,!1)):a.u(0)}};p.M=new t})(); function vc(h){this.b=h} (function(){function h(){}function n(){}function f(){}var q=vc.prototype;q.la=function(b){this.ga=b;this.b=b.b};q.la.prototype.O=function(){};q.da=function(b){this.type=b;this.b=b.b};var t=q.da.prototype,p="",c="undefined"!==typeof window.is_scirra_arcade;c&&(p="arcade"+window.scirra_arcade_id);var b=!1;try{localStorage.getItem("test"),b=!0}catch(w){b=!1}t.O=function(){b||A("[Construct 2] Webstorage plugin: local storage is not supported on this platform.")};h.prototype.qr=function(c){return b?null!= localStorage.getItem(p+c):!1};h.prototype.Kr=function(){return!0};q.e=new h;n.prototype.gs=function(c,a){if(b)try{localStorage.setItem(p+c,a)}catch(e){this.b.trigger(vc.prototype.e.Kr,this)}};q.A=new n;f.prototype.rr=function(c,a){b?c.za(localStorage.getItem(p+a)||""):c.za("")};f.prototype.rn=function(d){if(b){var a={},e,f,g;e=0;for(f=localStorage.length;e