// Generated by Construct 2, the HTML5 game and app creator :: http://www.scirra.com 'use strict';var aa,ba,ca,da,ea,fa,ha,ia,z,ja,ka,la,ma,na,pa,M,qa,ra,ta,ua,xa,ya,za,S,Aa,Ca,Da,Ea,Fa,W,Ga,Ha,Ia,La,Ma,Na,Oa,Pa,Qa,Ra,Sa,Ta,Ua,Va,Wa,Xa,cb,db,eb,fb,gb,hb,ib,jb,kb,lb,mb,nb,ob,qb,rb,sb,tb,ub,vb,wb,xb,yb,zb,Ab,Bb,Cb,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(e){return e.__proto__}:function(e){return e.constructor.prototype}); (function(){function e(a,b,f,c){this.set(a,b,f,c)}function r(){this.Ta=this.Sa=this.Va=this.Ua=this.Za=this.Ya=this.Ga=this.Fa=0}function h(a,b,f,c){ac?b:c):(y=af?b:f):fc?a:c):(y=bf?a:f)}function q(){this.items=this.Pd=null;this.ji=0;G&&(this.Pd=new Set);this.uh=[];this.Le=!0}function t(a){C[E++]=a}function p(){this.T=this.nl=this.y=this.Yl=0}function g(a){this.qb=[];this.rj=this.tj=this.uj=this.sj=0;this.Ti(a)}function b(a,b){this.cm= a;this.am=b;this.cells={}}function d(a,b){this.cm=a;this.am=b;this.cells={}}function c(a,b,f){var c;return L.length?(c=L.pop(),c.Jm=a,c.x=b,c.y=f,c):new ba(a,b,f)}function a(a,b,f){this.Jm=a;this.x=b;this.y=f;this.wb=new ca}function f(a,b,f){var c;return A.length?(c=A.pop(),c.Jm=a,c.x=b,c.y=f,c):new da(a,b,f)}function m(a,b,f){this.Jm=a;this.x=b;this.y=f;this.wb=[];this.Kg=!0;this.Nd=new ca;this.xh=!1}function l(a,b){return a.Cd-b.Cd}ea=function(a){window.console&&window.console.log&&window.console.log(a)}; fa=function(a){window.console&&window.console.error&&window.console.error(a)};aa=function(a){return a};ha=function(a){return"undefined"===typeof a};ia=function(a){return"number"===typeof a};z=function(a){return"string"===typeof a};ja=function(a){return 0b;b<<=1)a=a|a>>b;return a+1};la=function(a){return 0>a?-a:a};ma=function(a,b){return a>b?a:b};na=function(a,b){return ag)return!1;bg)return!1;m=l-a+x-f;k=d-b+B-c;a=f-a;b=c-b;l=x-l;d=B-d;B=la(b*l-d*a);return la(l*k-d*m)>B?!1:la(a*k-b*m)<=B};e.prototype.set=function(a,b,f,c){this.left=a;this.top=b;this.right=f;this.bottom=c};e.prototype.Dh=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,b){this.left+=a;this.top+=b;this.right+=a;this.bottom+=b;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.lw=function(a){return!(a.rightthis.right||a.top>this.bottom)};e.prototype.mw= function(a,b,f){return!(a.right+bthis.right||a.top+f>this.bottom)};e.prototype.Yb=function(a,b){return a>=this.left&&a<=this.right&&b>=this.top&&b<=this.bottom};e.prototype.Hh=function(a){return this.left===a.left&&this.top===a.top&&this.right===a.right&&this.bottom===a.bottom};ta=e;r.prototype.ih=function(a){this.Fa=a.left;this.Ga=a.top;this.Ya=a.right;this.Za=a.top;this.Ua=a.right;this.Va=a.bottom;this.Sa=a.left;this.Ta=a.bottom};r.prototype.Or=function(a, b){if(0===b)this.ih(a);else{var f=Math.sin(b),c=Math.cos(b),l=a.left*f,d=a.top*f,x=a.right*f,f=a.bottom*f,B=a.left*c,m=a.top*c,k=a.right*c,c=a.bottom*c;this.Fa=B-d;this.Ga=m+l;this.Ya=k-d;this.Za=m+x;this.Ua=k-f;this.Va=c+x;this.Sa=B-f;this.Ta=c+l}};r.prototype.offset=function(a,b){this.Fa+=a;this.Ga+=b;this.Ya+=a;this.Za+=b;this.Ua+=a;this.Va+=b;this.Sa+=a;this.Ta+=b;return this};var y=0,n=0;r.prototype.pp=function(a){h(this.Fa,this.Ya,this.Ua,this.Sa);a.left=y;a.right=n;h(this.Ga,this.Za,this.Va, this.Ta);a.top=y;a.bottom=n};r.prototype.Yb=function(a,b){var f=this.Fa,c=this.Ga,l=this.Ya-f,d=this.Za-c,x=this.Ua-f,B=this.Va-c,m=a-f,k=b-c,g=l*l+d*d,n=l*x+d*B,d=l*m+d*k,y=x*x+B*B,e=x*m+B*k,u=1/(g*y-n*n),l=(y*d-n*e)*u,g=(g*e-n*d)*u;if(0<=l&&0l+g)return!0;l=this.Sa-f;d=this.Ta-c;g=l*l+d*d;n=l*x+d*B;d=l*m+d*k;u=1/(g*y-n*n);l=(y*d-n*e)*u;g=(g*e-n*d)*u;return 0<=l&&0l+g};r.prototype.kd=function(a,b){if(b)switch(a){case 0:return this.Fa;case 1:return this.Ya;case 2:return this.Ua;case 3:return this.Sa; case 4:return this.Fa;default:return this.Fa}else switch(a){case 0:return this.Ga;case 1:return this.Za;case 2:return this.Va;case 3:return this.Ta;case 4:return this.Ga;default:return this.Ga}};r.prototype.Lq=function(){return(this.Fa+this.Ya+this.Ua+this.Sa)/4};r.prototype.Mq=function(){return(this.Ga+this.Za+this.Va+this.Ta)/4};r.prototype.gq=function(a){var b=a.Lq(),f=a.Mq();if(this.Yb(b,f))return!0;b=this.Lq();f=this.Mq();if(a.Yb(b,f))return!0;var c,l,d,x,B,m,k,g;for(k=0;4>k;k++)for(g=0;4>g;g++)if(b= this.kd(k,!0),f=this.kd(k,!1),c=this.kd(k+1,!0),l=this.kd(k+1,!1),d=a.kd(g,!0),x=a.kd(g,!1),B=a.kd(g+1,!0),m=a.kd(g+1,!1),ra(b,f,c,l,d,x,B,m))return!0;return!1};ua=r;xa=function(a,b){for(var f in b)b.hasOwnProperty(f)&&(a[f]=b[f]);return a};ya=function(a,b){var f,c;b=M(b);if(!(0>b||b>=a.length)){f=b;for(c=a.length-1;ff?f:a};W=function(a){return a/(180/pa)};Ga=function(a){return 180/pa*a};Ha=function(a){a%=360;0>a&&(a+=360);return a};Ia=function(a){a%=2*pa;0>a&&(a+=2*pa);return a};La=function(a){return Ha(Ga(a))};Ma=function(a){return Ia(W(a))};Na=function(a,b,f,c){return Math.atan2(c-b,f-a)};Oa=function(a,b){if(a===b)return 0;var f=Math.sin(a),c=Math.cos(a), l=Math.sin(b),d=Math.cos(b),f=f*l+c*d;return 1<=f?0:-1>=f?pa:Math.acos(f)};Pa=function(a,b,f){var c=Math.sin(a),l=Math.cos(a),d=Math.sin(b),x=Math.cos(b);return Math.acos(c*d+l*x)>f?0=c*l-f*d};Ra=function(a,b,f,c,l,d){if(0===f)return d?a:b;var x=Math.sin(f);f=Math.cos(f);a-=c;b-=l;var B=a*x;a=a*f-b*x;b=b*f+B;return d?a+c:b+l};Sa=function(a,b,f,c){a=f-a;b=c-b;return Math.sqrt(a*a+b* b)};Ta=function(a,b){return!a!==!b};Ua=function(a){for(var b in a)if(a.hasOwnProperty(b))return!0;return!1};Va=function(a){for(var b in a)a.hasOwnProperty(b)&&delete a[b]};var P=+new Date;Wa=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()-P};var k=!1, u=k=!1,ga=!1;"undefined"!==typeof window&&(k=/chrome/i.test(navigator.userAgent)||/chromium/i.test(navigator.userAgent),k=!k&&/safari/i.test(navigator.userAgent),u=/(iphone|ipod|ipad)/i.test(navigator.userAgent),ga=window.c2ejecta);var G=!k&&!ga&&!u&&"undefined"!==typeof Set&&"undefined"!==typeof Set.prototype.forEach;q.prototype.contains=function(a){return this.ne()?!1:G?this.Pd.has(a):this.items&&this.items.hasOwnProperty(a)};q.prototype.add=function(a){if(G)this.Pd.has(a)||(this.Pd.add(a),this.Le= !1);else{var b=a.toString(),f=this.items;f?f.hasOwnProperty(b)||(f[b]=a,this.ji++,this.Le=!1):(this.items={},this.items[b]=a,this.ji=1,this.Le=!1)}};q.prototype.remove=function(a){if(!this.ne())if(G)this.Pd.has(a)&&(this.Pd["delete"](a),this.Le=!1);else if(this.items){a=a.toString();var b=this.items;b.hasOwnProperty(a)&&(delete b[a],this.ji--,this.Le=!1)}};q.prototype.clear=function(){this.ne()||(G?this.Pd.clear():(this.items=null,this.ji=0),S(this.uh),this.Le=!0)};q.prototype.ne=function(){return 0=== this.count()};q.prototype.count=function(){return G?this.Pd.size:this.ji};var C=null,E=0;q.prototype.Vx=function(){if(!this.Le){if(G)S(this.uh),C=this.uh,E=0,this.Pd.forEach(t),C=null,E=0;else{var a=this.uh;S(a);var b,f=0,c=this.items;if(c)for(b in c)c.hasOwnProperty(b)&&(a[f++]=c[b])}this.Le=!0}};q.prototype.nf=function(){this.Vx();return this.uh};ca=q;new ca;Xa=function(a,b){G?cb(a,b.Pd):db(a,b.nf())};cb=function(a,b){var f,c,l,d;c=f=0;for(l=a.length;ff&&(f=d),xl&&(l=x);this.sj=b;this.tj=f;this.uj=c;this.rj=l};g.prototype.ih=function(a,b,f){this.qb.length=8;this.wd=4;var c=this.qb;c[0]=a.left-b;c[1]=a.top-f;c[2]=a.right-b;c[3]=a.top-f;c[4]=a.right-b;c[5]=a.bottom-f;c[6]=a.left-b;c[7]=a.bottom-f;this.yj=a.right-a.left;this.xj=a.bottom-a.top;this.Ca()};g.prototype.hh=function(a,b,f,c,l){this.qb.length=8;this.wd= 4;var d=this.qb;d[0]=a.Fa-b;d[1]=a.Ga-f;d[2]=a.Ya-b;d[3]=a.Za-f;d[4]=a.Ua-b;d[5]=a.Va-f;d[6]=a.Sa-b;d[7]=a.Ta-f;this.yj=c;this.xj=l;this.Ca()};g.prototype.Nr=function(a){this.wd=a.wd;Aa(this.qb,a.qb);this.sj=a.sj;this.uj-a.uj;this.tj=a.tj;this.rj=a.rj};g.prototype.rg=function(a,b,f){if(this.yj!==a||this.xj!==b||this.sp!==f){this.yj=a;this.xj=b;this.sp=f;var c,l,d,x,m,k=0,g=1,n=this.tr,y=this.qb;0!==f&&(k=Math.sin(f),g=Math.cos(f));f=0;for(d=this.wd;fL.length&&L.push(m),this.cells[c][d]=null);if(f)for(c=f.left,l=f.right;c<=l;++c)for(d=f.top,x=f.bottom;d<=x;++d)b&&b.Yb(c,d)||this.Ue(c,d,!0).Um(a)};b.prototype.Wk=function(a,b){var f,c,l,d,x,m;f=this.jc(a.left);l=this.kc(a.top);c=this.jc(a.right);for(x=this.kc(a.bottom);f<=c;++f)for(d=l;d<=x;++d)(m=this.Ue(f,d,!1))&&m.dump(b)};hb=b;d.prototype.Ue=function(a,b,c){var l;l= this.cells[a];return l?(l=l[b])?l:c?(l=f(this,a,b),this.cells[a][b]=l):null:c?(l=f(this,a,b),this.cells[a]={},this.cells[a][b]=l):null};d.prototype.jc=function(a){return M(a/this.cm)};d.prototype.kc=function(a){return M(a/this.am)};d.prototype.update=function(a,b,f){var c,l,d,x,m;if(b)for(c=b.left,l=b.right;c<=l;++c)for(d=b.top,x=b.bottom;d<=x;++d)if(!f||!f.Yb(c,d))if(m=this.Ue(c,d,!1))m.remove(a),m.ne()&&(m.reset(),1E3>A.length&&A.push(m),this.cells[c][d]=null);if(f)for(c=f.left,l=f.right;c<=l;++c)for(d= f.top,x=f.bottom;d<=x;++d)b&&b.Yb(c,d)||this.Ue(c,d,!0).Um(a)};d.prototype.Wk=function(a,b,f,c,l){var d,x;a=this.jc(a);b=this.kc(b);f=this.jc(f);for(d=this.kc(c);a<=f;++a)for(c=b;c<=d;++c)(x=this.Ue(a,c,!1))&&x.dump(l)};d.prototype.Ew=function(a){var b,f,c,l,d;b=a.left;c=a.top;f=a.right;for(l=a.bottom;b<=f;++b)for(a=c;a<=l;++a)if(d=this.Ue(b,a,!1))d.Kg=!1};ib=d;var L=[];a.prototype.ne=function(){return this.wb.ne()};a.prototype.Um=function(a){this.wb.add(a)};a.prototype.remove=function(a){this.wb.remove(a)}; a.prototype.dump=function(a){Ca(a,this.wb.nf())};ba=a;var A=[];m.prototype.ne=function(){if(!this.wb.length)return!0;if(this.wb.length>this.Nd.count())return!1;this.xm();return!0};m.prototype.Um=function(a){this.Nd.contains(a)?(this.Nd.remove(a),this.Nd.ne()&&(this.xh=!1)):this.wb.length?(this.wb[this.wb.length-1].Jd()>a.Jd()&&(this.Kg=!1),this.wb.push(a)):(this.wb.push(a),this.Kg=!0)};m.prototype.remove=function(a){this.Nd.add(a);this.xh=!0;30<=this.Nd.count()&&this.xm()};m.prototype.xm=function(){this.xh&& (this.Nd.count()===this.wb.length?this.reset():(Xa(this.wb,this.Nd),this.Nd.clear(),this.xh=!1))};m.prototype.Ku=function(){this.Kg||(this.wb.sort(l),this.Kg=!0)};m.prototype.reset=function(){S(this.wb);this.Kg=!0;this.Nd.clear();this.xh=!1};m.prototype.dump=function(a){this.xm();this.Ku();this.wb.length&&a.push(this.wb)};da=m;var D="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": D[a-1]};kb=function(a,b,f){if(f)switch(a.Vb=f.ONE,a.Pb=f.ONE_MINUS_SRC_ALPHA,b){case 1:a.Vb=f.ONE;a.Pb=f.ONE;break;case 3:a.Vb=f.ONE;a.Pb=f.ZERO;break;case 4:a.Vb=f.ONE_MINUS_DST_ALPHA;a.Pb=f.ONE;break;case 5:a.Vb=f.DST_ALPHA;a.Pb=f.ZERO;break;case 6:a.Vb=f.ZERO;a.Pb=f.SRC_ALPHA;break;case 7:a.Vb=f.ONE_MINUS_DST_ALPHA;a.Pb=f.ZERO;break;case 8:a.Vb=f.ZERO;a.Pb=f.ONE_MINUS_SRC_ALPHA;break;case 9:a.Vb=f.DST_ALPHA;a.Pb=f.ONE_MINUS_SRC_ALPHA;break;case 10:a.Vb=f.ONE_MINUS_DST_ALPHA,a.Pb=f.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(e){var r=new gc(3);e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]);return r} function ic(e){var r=new gc(16);e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r[6]=e[6],r[7]=e[7],r[8]=e[8],r[9]=e[9],r[10]=e[10],r[11]=e[11],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15]);return r}function jc(e,r){r[0]=e[0];r[1]=e[1];r[2]=e[2];r[3]=e[3];r[4]=e[4];r[5]=e[5];r[6]=e[6];r[7]=e[7];r[8]=e[8];r[9]=e[9];r[10]=e[10];r[11]=e[11];r[12]=e[12];r[13]=e[13];r[14]=e[14];r[15]=e[15]} function kc(e,r){var h=r[0],q=r[1];r=r[2];e[0]*=h;e[1]*=h;e[2]*=h;e[3]*=h;e[4]*=q;e[5]*=q;e[6]*=q;e[7]*=q;e[8]*=r;e[9]*=r;e[10]*=r;e[11]*=r} function lc(e,r,h,q){q||(q=ic());var t,p,g,b,d,c,a,f,m=e[0],l=e[1];e=e[2];p=h[0];g=h[1];t=h[2];h=r[1];c=r[2];m===r[0]&&l===h&&e===c?(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):(h=m-r[0],c=l-r[1],a=e-r[2],f=1/Math.sqrt(h*h+c*c+a*a),h*=f,c*=f,a*=f,r=g*a-t*c,t=t*h-p*a,p=p*c-g*h,(f=Math.sqrt(r*r+t*t+p*p))?(f=1/f,r*=f,t*=f,p*=f):p=t=r=0,g=c*p-a*t,b=a*r-h*p,d=h*t-c*r,(f=Math.sqrt(g*g+b*b+d*d))?(f=1/f,g*=f,b*=f,d*=f):d=b=g=0, q[0]=r,q[1]=g,q[2]=h,q[3]=0,q[4]=t,q[5]=b,q[6]=c,q[7]=0,q[8]=p,q[9]=d,q[10]=a,q[11]=0,q[12]=-(r*m+t*l+p*e),q[13]=-(g*m+b*l+d*e),q[14]=-(h*m+c*l+a*e),q[15]=1)} (function(){function e(b,d,c){this.oe=/msie/i.test(navigator.userAgent)||/trident/i.test(navigator.userAgent);this.height=this.width=0;this.Da=!!c;this.nk=this.$h=!1;this.km=0;this.Fl=1;this.Jo=1E3;this.ay=(this.Jo-this.Fl)/32768;this.Zl=hc([0,0,100]);this.vq=hc([0,0,0]);this.ls=hc([0,1,0]);this.ij=hc([1,1,1]);this.Cp=!0;this.Dk=ic();this.Nc=ic();this.hn=ic();this.jm=ic();this.D=b;this.bq()}function r(b,d,c){this.D=b;this.Ui=d;this.name=c;this.ad=b.getAttribLocation(d,"aPos");this.cf=b.getAttribLocation(d, "aTex");this.tq=b.getUniformLocation(d,"matP");this.yk=b.getUniformLocation(d,"matMV");this.Tg=b.getUniformLocation(d,"opacity");this.nn=b.getUniformLocation(d,"colorFill");this.uq=b.getUniformLocation(d,"samplerFront");this.ti=b.getUniformLocation(d,"samplerBack");this.Uf=b.getUniformLocation(d,"destStart");this.Tf=b.getUniformLocation(d,"destEnd");this.wi=b.getUniformLocation(d,"seconds");this.qn=b.getUniformLocation(d,"pixelWidth");this.pn=b.getUniformLocation(d,"pixelHeight");this.si=b.getUniformLocation(d, "layerScale");this.ri=b.getUniformLocation(d,"layerAngle");this.xi=b.getUniformLocation(d,"viewOrigin");this.vi=b.getUniformLocation(d,"scrollPos");this.fw=!!(this.qn||this.pn||this.wi||this.ti||this.Uf||this.Tf||this.si||this.ri||this.xi||this.vi);this.Dq=this.Eq=-999;this.Ck=1;this.zq=this.yq=0;this.Bq=this.xq=this.wq=1;this.Hq=this.Gq=this.Fq=this.Jq=this.Iq=this.Aq=0;this.gn=[];this.Cq=ic();this.Tg&&b.uniform1f(this.Tg,1);this.nn&&b.uniform4f(this.nn,1,1,1,1);this.uq&&b.uniform1i(this.uq,0);this.ti&& b.uniform1i(this.ti,1);this.Uf&&b.uniform2f(this.Uf,0,0);this.Tf&&b.uniform2f(this.Tf,1,1);this.si&&b.uniform1f(this.si,1);this.ri&&b.uniform1f(this.ri,0);this.xi&&b.uniform2f(this.xi,0,0);this.vi&&b.uniform2f(this.vi,0,0);this.wi&&b.uniform1f(this.wi,0);this.Gf=!1}function h(b,d){return b[0]===d[0]&&b[1]===d[1]&&b[2]===d[2]&&b[3]===d[3]&&b[4]===d[4]&&b[5]===d[5]&&b[6]===d[6]&&b[7]===d[7]&&b[8]===d[8]&&b[9]===d[9]&&b[10]===d[10]&&b[11]===d[11]&&b[12]===d[12]&&b[13]===d[13]&&b[14]===d[14]&&b[15]=== d[15]}function q(b,d){this.type=b;this.u=d;this.D=d.D;this.Yc=this.Wb=this.er=0;this.U=this.gd=null;this.Pr=[]}var t=ic();e.prototype.bq=function(){var b=this.D,d;this.oq=1;this.Mf=this.Ye=null;this.Jj=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.Da?(b.enable(b.DEPTH_TEST),b.depthFunc(b.LEQUAL)):b.disable(b.DEPTH_TEST);this.pq=b.ONE;this.nq=b.ONE_MINUS_SRC_ALPHA; this.Bl=new Float32Array(8E3*(this.Da?3:2));this.ol=new Float32Array(16E3);this.On=new Float32Array(32E3);this.Nn=b.createBuffer();b.bindBuffer(b.ARRAY_BUFFER,this.Nn);b.bufferData(b.ARRAY_BUFFER,this.On.byteLength,b.DYNAMIC_DRAW);this.gj=Array(4);this.$i=Array(4);for(d=0;4>d;d++)this.gj[d]=b.createBuffer(),b.bindBuffer(b.ARRAY_BUFFER,this.gj[d]),b.bufferData(b.ARRAY_BUFFER,this.Bl.byteLength,b.DYNAMIC_DRAW),this.$i[d]=b.createBuffer(),b.bindBuffer(b.ARRAY_BUFFER,this.$i[d]),b.bufferData(b.ARRAY_BUFFER, this.ol.byteLength,b.DYNAMIC_DRAW);this.be=0;this.jw=b.createBuffer();b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,this.jw);for(var c=new Uint16Array(12E3),a=d=0;12E3>d;)c[d++]=a,c[d++]=a+1,c[d++]=a+2,c[d++]=a,c[d++]=a+2,c[d++]=a+3,a+=4;b.bufferData(b.ELEMENT_ARRAY_BUFFER,c,b.STATIC_DRAW);this.bh=this.oh=this.De=0;this.Qa=[];d=this.Da?"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}";c=this.Eh({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}"},d,"");this.Qa.push(c);c=this.Eh({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.Qa.push(c);c=this.Eh({src:"varying mediump vec2 vTex;\nuniform lowp sampler2D samplerFront;\nvoid main(void) {\n\tif (texture2D(samplerFront, vTex).a < 1.0)\n\t\tdiscard;\n}"},d,"");this.Qa.push(c);c=this.Eh({src:"uniform lowp vec4 colorFill;\nvoid main(void) {\n\tgl_FragColor = colorFill;\n}"}, d,"");this.Qa.push(c);for(var f in mc)mc.hasOwnProperty(f)&&this.Qa.push(this.Eh(mc[f],d,f));b.activeTexture(b.TEXTURE0);b.bindTexture(b.TEXTURE_2D,null);this.$d=[];this.Ed=0;this.Qb=this.Gb=!1;this.xp=this.li=-1;this.ug=null;this.vm=b.createFramebuffer();this.Nj=this.Yk=null;this.np=!1;this.Da&&(this.Nj=b.createRenderbuffer());this.mf=hc([0,0,0]);b=b.getParameter(b.ALIASED_POINT_SIZE_RANGE);this.Hw=b[0];this.un=b[1];2048"===d.name&&b.vertexAttribPointer(d.ad,4,b.FLOAT,!1,0,0));if(0"!==d.name&&b.vertexAttribPointer(d.ad,this.Da?3:2,b.FLOAT,!1,0,0);b.bindBuffer(b.ARRAY_BUFFER,this.$i[this.be]);b.bufferSubData(b.ARRAY_BUFFER,0,this.ol.subarray(0,this.oh));d&&0<=d.cf&&""!== d.name&&b.vertexAttribPointer(d.cf,2,b.FLOAT,!1,0,0)}for(var c,b=0,d=this.Ed;bc||0>a)){var f=this.rc();f.type=7;f.Wb=1;f.U||(f.U=ic());f.U[0]=b;f.U[1]=d;f.U[2]=c;f.U[3]=a;this.Qb=this.Gb=!1}};e.prototype.Jr=function(b){if(this.Da&& (b=!!b,this.$h!==b)){var d=this.rc();d.type=14;d.Wb=b?1:0;this.Qb=this.Gb=!1;this.$h=b;this.Yk=null;this.$h?this.vc(2):this.vc(0)}};e.prototype.Ir=function(b){if(this.Da){var d=this.rc();d.type=13;d.Wb=b?1:0;this.Qb=this.Gb=!1}};e.prototype.Op=function(){jc(this.hn,t);this.cd();this.Rc();var b=this.width/2,d=this.height/2;this.dh(-b,d,b,d,b,-d,-b,-d);jc(t,this.Nc);this.Rc()};e.prototype.Hr=function(b,d,c){this.vc(3);var a=this.rc();a.type=12;a.U||(a.U=ic());a.U[0]=b;a.U[1]=d;a.U[2]=c;a.U[3]=1;this.Qb= this.Gb=!1};e.prototype.Jx=function(){this.vc(0)};e.prototype.ux=function(){this.vc(2)};e.prototype.cx=function(){this.ge();this.D.flush()};var p=[],g={};e.prototype.eu=function(){S(p);g={}};e.prototype.Ze=function(b,d,c,a){d=!!d;c=!!c;var f=b.src+","+d+","+c+(d?",undefined":""),m=null;if("undefined"!==typeof b.src&&g.hasOwnProperty(f))return m=g[f],m.wj++,m;this.ge();var l=this.D,e=ja(b.width)&&ja(b.height),m=l.createTexture();l.bindTexture(l.TEXTURE_2D,m);l.pixelStorei(l.UNPACK_PREMULTIPLY_ALPHA_WEBGL, !0);var n=l.RGBA,h=l.RGBA,k=l.UNSIGNED_BYTE;if(a&&!this.oe)switch(a){case 1:h=n=l.RGB;break;case 2:k=l.UNSIGNED_SHORT_4_4_4_4;break;case 3:k=l.UNSIGNED_SHORT_5_5_5_1;break;case 4:h=n=l.RGB,k=l.UNSIGNED_SHORT_5_6_5}if(!e&&d){a=document.createElement("canvas");a.width=ka(b.width);a.height=ka(b.height);var u=a.getContext("2d");"undefined"!==typeof u.imageSmoothingEnabled?u.imageSmoothingEnabled=c:(u.webkitImageSmoothingEnabled=c,u.mozImageSmoothingEnabled=c,u.msImageSmoothingEnabled=c);u.drawImage(b, 0,0,b.width,b.height,0,0,a.width,a.height);l.texImage2D(l.TEXTURE_2D,0,n,h,k,a)}else l.texImage2D(l.TEXTURE_2D,0,n,h,k,b);d?(l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_S,l.REPEAT),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_T,l.REPEAT)):(l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_S,l.CLAMP_TO_EDGE),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_T,l.CLAMP_TO_EDGE));c?(l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MAG_FILTER,l.LINEAR),e&&this.Cp?(l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MIN_FILTER,l.LINEAR_MIPMAP_LINEAR), l.generateMipmap(l.TEXTURE_2D)):l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MIN_FILTER,l.LINEAR)):(l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MAG_FILTER,l.NEAREST),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MIN_FILTER,l.NEAREST));l.bindTexture(l.TEXTURE_2D,null);this.Ye=null;m.sf=b.width;m.rf=b.height;m.wj=1;m.rp=f;p.push(m);return g[f]=m};e.prototype.Ic=function(b,d,c,a){this.ge();var f=this.D;this.oe&&(a=!1);var m=f.createTexture();f.bindTexture(f.TEXTURE_2D,m);f.texImage2D(f.TEXTURE_2D,0,f.RGBA,b,d,0,f.RGBA, a?f.UNSIGNED_SHORT_4_4_4_4:f.UNSIGNED_BYTE,null);f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_S,f.CLAMP_TO_EDGE);f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_T,f.CLAMP_TO_EDGE);f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MAG_FILTER,c?f.LINEAR:f.NEAREST);f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MIN_FILTER,c?f.LINEAR:f.NEAREST);f.bindTexture(f.TEXTURE_2D,null);this.Ye=null;m.sf=b;m.rf=d;p.push(m);return m};e.prototype.Zx=function(b,d,c){this.ge();var a=this.D;this.oe&&(c=!1);a.bindTexture(a.TEXTURE_2D,d);a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL, !0);try{a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,c?a.UNSIGNED_SHORT_4_4_4_4:a.UNSIGNED_BYTE,b)}catch(f){console&&console.error&&console.error("Error updating WebGL texture: ",f)}a.bindTexture(a.TEXTURE_2D,null);this.Ye=null};e.prototype.deleteTexture=function(b){b&&("undefined"!==typeof b.wj&&1=b?a[3]:256>=b?a[2]:512>=b?a[1]:a[0]}function h(){try{return!!window.indexedDB}catch(a){return!1}}function q(a){a.target.result.createObjectStore("saves",{keyPath:"slot"})}function t(a,b,f,c){try{var l=indexedDB.open("_C2SaveStates");l.onupgradeneeded=q;l.onerror=c;l.onsuccess=function(l){l=l.target.result;l.onerror=c;l.transaction(["saves"],"readwrite").objectStore("saves").put({slot:a,data:b}).onsuccess=f}}catch(d){c(d)}}function p(a,b,f){try{var c=indexedDB.open("_C2SaveStates"); c.onupgradeneeded=q;c.onerror=f;c.onsuccess=function(c){c=c.target.result;c.onerror=f;var l=c.transaction(["saves"]).objectStore("saves").get(a);l.onsuccess=function(){l.result?b(l.result.data):b(null)}}}catch(l){f(l)}}function g(){ea("Reloading for continuous preview");window.c2cocoonjs?CocoonJS.App.reload():-1d?(d*=b,5===k?(m=d*f/this.pb,1m&&(m=1/Math.ceil(1/m)),d=this.pb*m/f,m=this.ob*m/f,c=(a-d)/2,l=(b-m)/2,a=d,b=m):(c=(a-d)/2,a=d)):(m=a/d,5===k?(m=m*f/this.ob,1m&&(m=1/Math.ceil(1/m)),d=this.pb*m/f,m=this.ob*m/f,c=(a-d)/2,l=(b-m)/2,a=d):l=(b-m)/2,b=m),g&&!this.We&&(l=c=0)):this.We&&this.ci&&0===this.Pp&&(c=Math.floor((a-this.pb)/ 2),l=Math.floor((b-this.ob)/2),a=this.pb,b=this.ob),2>k&&(this.zh=f),this.Hj=Math.round(a),this.Gh=Math.round(b),this.width=Math.round(a*f),this.height=Math.round(b*f),this.W=!0,this.us?(this.L=this.width,this.K=this.height,this.Jc=!0):this.widthd&&(this.K=this.L/k)):3===k&&(d=this.pb/this.ob,k=this.Pg/this.Og, k>d?this.L=this.K*k:k=g)g=5E4;a+=g;k.src&&(k.complete||k.loaded)&&!k.qp?b+=g:d=!1}d&&this.ax&&this.ng&&(m||(this.ng.Nx(),m=!0),c=this.ng.Kv(),b+=c,cthis.bf&&(this.Zc||500<=c&&this.qq!=this.vd)){b.clearRect(0,0,m,g);var c=m/2,g=g/2,m=0===this.bf&&this.$e.Ak.complete,n=40*f,e=0,u=80*f,y;if(m){var p=this.$e.Ak,u=p.width*f;y=p.height*f;n=u/2;e=y/2;b.drawImage(p,M(c-n),M(g-e),u,y)}1>=this.bf?(c=M(c-n)+.5,g=M(g+(e+(m?12*f:0)))+.5,b.fillStyle=a?"red":"DodgerBlue",b.fillRect(c,g,Math.floor(u*this.vd),6*f),b.strokeStyle="black",b.strokeRect(c,g,u,6*f),b.strokeStyle= "white",b.strokeRect(c-1*f,g-1*f,u+2*f,8*f)):2===this.bf&&(b.font=this.sd?"12pt ArialMT":"12pt Arial",b.fillStyle=a?"#f00":"#999",b.qz="middle",f=Math.round(100*this.vd)+"%",m=b.measureText?b.measureText(f):null,b.fillText(f,c-(m?m.width:0)/2,g));this.qq=this.vd}else if(4===this.bf){this.Gu(b);d?d(function(){k.go()}):setTimeout(function(){k.go()},16);return}}setTimeout(function(){k.go()},this.Zc?10:100)}}};var y=-1,n="undefined"===typeof cr_is_preview?200:0,P=!0,k=!1,u=0,ga=0,G="undefined"===typeof cr_is_preview? 3E3:0,C=null,E=null,L=0;e.prototype.Gu=function(b){if(!l){for(var f=Math.ceil(this.width),c=Math.ceil(this.height),d=this.$e.Ak,m=this.$e.$w,g=this.$e.$x,e=0;4>e;++e)if(!d[e].complete||!m[e].complete||!g[e].complete)return;0===L&&(y=Date.now());var e=Date.now(),p=!1,h=b,t,q;P||k?(b.clearRect(0,0,f,c),C&&C.width===f&&C.height===c||(C=document.createElement("canvas"),C.width=f,C.height=c,E=C.getContext("2d")),h=E,p=!0,P&&1===L&&(y=Date.now())):b.globalAlpha=1;h.fillStyle="#333333";h.fillRect(0,0,f, c);256=G&&!k&&1<=this.vd&&(k=!0,ga=e);if(k&&e-ga>=300+n||"undefined"!==typeof cr_is_preview&&1<=this.vd&&500>Date.now()-y)l=!0,k=P=!1,this.$e=E=C=null;++L}};e.prototype.dw=function(){this.Kb&&(this.canvas.parentNode.removeChild(this.Kb),this.Kb=this.Mn=null);this.kl= Date.now();this.Of=Wa();var a,b,f;if(this.Eo)for(a=0,b=this.B.length;aa||2===this.Zb&&bb&&(b=0),this.xf=b/=1E3,.51/this.Nq&&(this.xf=1/this.Nq));this.qk=a;this.wf=this.xf*this.qh;this.Ib.add(this.wf); this.Ee.add(b);a=(document.mozFullScreen||document.webkitIsFullScreen||document.fullScreen||!!document.msFullscreenElement||this.ci)&&!this.Ac;2<=this.Zb||a&&0b||2===c&&fa++;)this.Bp(this.Ah);a=0;for(b=this.he.length;a< b;a++)this.he[a].Mm=!1;this.Aa.zf&&this.Aa.zf.cb();S(this.Vn);this.kn=!1;this.Mc++;a=0;for(b=this.B.length;ab.Lj.length&&b.Lj.push(a)};e.prototype.im=function(a,b,f,c){if(a.F){var d=M(Math.random()*a.Vg.length);return this.im(a.Vg[d],b,f,c)}return a.Wc?this.Qe(a.Wc,b,!1,f,c,!1):null};var D=[];e.prototype.Qe=function(a,b,f,c,d,l){var k,m,g,n;if(!a)return null;var e= this.B[a[1]],u=e.ea.Xe;if(this.ii&&u&&!e.$m||u&&!this.u&&11===a[0][11])return null;var y=b;u||(b=null);var h;e.Lj.length?(h=e.Lj.pop(),h.gc=!0,e.ea.Y.call(h,e)):(h=new e.ea.Y(e),h.gc=!1);!f||l||this.te.hasOwnProperty(a[2].toString())?h.uid=this.Di++:h.uid=a[2];this.te[h.uid.toString()]=h;h.ur=this.Sq++;h.If=e.d.length;k=0;for(m=this.od.length;ka&&(a=0);a>=this.Aa.S.length&&(a=this.Aa.S.length-1);return this.Aa.S[a]};e.prototype.em=function(a){var b,f;b=0;for(f=a.length;b=d;)k=1/d,d*=2,a.x+=b*k*(l?1:-1),a.y+=f*k*(l?1:-1),a.X(),this.nh(a,c)?k= l=!0:(k=l=!1,m=a.x,g=a.y);k&&(a.x=m,a.y=g,a.X())};e.prototype.mx=function(a){var b=0,f=a.x,c=a.y,d=0,k=0,l=0,m=this.bg(a);if(m){for(;100>=b;){switch(d){case 0:k=0;l=-1;b++;break;case 1:k=1;l=-1;break;case 2:k=1;l=0;break;case 3:l=k=1;break;case 4:k=0;l=1;break;case 5:k=-1;l=1;break;case 6:k=-1;l=0;break;case 7:l=k=-1}d=(d+1)%8;a.x=M(f+k*b);a.y=M(c+l*b);a.X();if(!this.nh(a,m)&&(m=this.bg(a),!m))return}a.x=f;a.y=c;a.X()}};e.prototype.ox=function(a,b){a.ae&&b.ae&&this.Vn.push([a,b])};e.prototype.bu= function(a,b,f){var c=a.x,d=a.y,k=ma(10,Sa(b,f,c,d)),l=Na(b,f,c,d),m=this.bg(a);if(!m)return Ia(l+pa);var g=m,n,e,u,h,y=W(5);for(n=1;36>n;n++)if(e=l-n*y,a.x=b+Math.cos(e)*k,a.y=f+Math.sin(e)*k,a.X(),!this.nh(a,g)&&(g=this.bg(a),!g)){u=e;break}36===n&&(u=Ia(l+pa));g=m;for(n=1;36>n;n++)if(e=l+n*y,a.x=b+Math.cos(e)*k,a.y=f+Math.sin(e)*k,a.X(),!this.nh(a,g)&&(g=this.bg(a),!g)){h=e;break}36===n&&(h=Ia(l+pa));a.x=c;a.y=d;a.X();if(h===u)return h;a=Oa(h,u)/2;a=Qa(h,u)?Ia(u+a+pa):Ia(h+a);u=Math.cos(l);l=Math.sin(l); h=Math.cos(a);a=Math.sin(a);b=u*h+l*a;return Na(0,0,u-2*b*h,l-2*b*a)};var V=-1;e.prototype.trigger=function(a,b,f){if(!this.Aa)return!1;var c=this.Aa.zf;if(!c)return!1;var d=!1,k,l,m;V++;var g=c.mm;l=0;for(m=g.length;l=this.rn.length&&this.rn.push([])};e.prototype.Ww=function(){this.zk--};e.prototype.Tp=function(){return this.rn[this.zk]};e.prototype.Vk=function(a){this.Pj++;this.Pj>=this.qm.length&&this.qm.push(new Sb);var b=this.sb();b.reset(a);return b};e.prototype.Rk=function(){this.Pj--};e.prototype.sb=function(){return this.qm[this.Pj]};e.prototype.jx=function(){this.Bk++;this.Bk>=this.tn.length&&this.tn.push(aa({name:void 0,index:0,zb:!1}));var a=this.Dv();a.name=void 0;a.index=0;a.zb=!1;return a}; e.prototype.Xw=function(){this.Bk--};e.prototype.Dv=function(){return this.tn[this.Bk]};e.prototype.Up=function(a,b){for(var f,c,d,k,l,m;b;){f=0;for(c=b.fd.length;fk||k>=a.mb.length||(a.mb[k]=d[c]));if(l.Xe){k=b.w;a.q.ba!==k.l&&(d=a.q, a.q=this.Aa.bk(k.l),a.q?(d.eh(a,!0),a.q.yh(a,!0),a.X(),a.q.Si(0)):(a.q=d,f||this.Ud(a)));a.x=k.x;a.y=k.y;a.width=k.w;a.height=k.h;a.Cd=k.zi;a.k=k.hasOwnProperty("a")?k.a:0;a.opacity=k.hasOwnProperty("o")?k.o:1;a.$b=k.hasOwnProperty("hX")?k.hX:.5;a.ac=k.hasOwnProperty("hY")?k.hY:.5;a.visible=k.hasOwnProperty("v")?k.v:!0;a.ae=k.hasOwnProperty("ce")?k.ce:!0;a.Ci=k.hasOwnProperty("mts")?k.mts:-1;a.Ob=k.hasOwnProperty("bm")?k.bm:0;a.Ch=jb(a.Ob);this.D&&kb(a,a.Ob,this.D);a.X();if(k.hasOwnProperty("fx"))for(f= 0,d=k.fx.length;fl||(a.Ie[l]=k.fx[f].active,a.Oa[l]=k.fx[f].params);a.Bd()}if(m=b.behs)for(c in m)m.hasOwnProperty(c)&&(f=this.Av(a,parseInt(c,10)),0>f||a.P[f].Sb(m[c]));b.data&&a.Sb(b.data)};e.prototype.Gp=function(a,b,f){window.resolveLocalFileSystemURL(cordova.file.applicationDirectory+"www/"+a,function(a){a.file(b,f)},f)};e.prototype.Ip=function(a,b){this.Gp("data.js",function(f){var c=new FileReader;c.onload=function(b){a(b.target.result)};c.onerror=b;c.readAsText(f)}, b)};var J=[],w=0;e.prototype.vn=function(){if(J.length&&!(8<=w)){w++;var a=J.shift();this.nu(a.filename,a.Px,a.Lu)}};e.prototype.Hp=function(a,b,f){var c=this;J.push({filename:a,Px:function(a){w--;c.vn();b(a)},Lu:function(a){w--;c.vn();f(a)}});this.vn()};e.prototype.nu=function(a,b,f){this.Gp(a,function(a){var f=new FileReader;f.onload=function(a){b(a.target.result)};f.readAsArrayBuffer(a)},f)};e.prototype.sv=function(a,b,f){this.Hp(a,function(a){a=URL.createObjectURL(new Blob([a]));b(a)},f)};e.prototype.ow= function(a){return/^(?:[a-z]+:)?\/\//.test(a)||"data:"===a.substr(0,5)||"blob:"===a.substr(0,5)};e.prototype.Kr=function(a,b){this.fi&&!this.ow(b)?this.sv(b,function(b){a.src=b},function(a){alert("Failed to load image: "+a)}):a.src=b};e.prototype.dl=function(a,b){"undefined"!==typeof a.imageSmoothingEnabled?a.imageSmoothingEnabled=b:(a.webkitImageSmoothingEnabled=b,a.mozImageSmoothingEnabled=b,a.msImageSmoothingEnabled=b)};Ub=function(a){return new e(document.getElementById(a))};Vb=function(a,b){return new e({dc:!0, width:a,height:b})};window.cr_createRuntime=Ub;window.cr_createDCRuntime=Vb;window.createCocoonJSRuntime=function(){window.c2cocoonjs=!0;var a=document.createElement("screencanvas")||document.createElement("canvas");a.pg=!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,r){var h=window.cr_getC2Runtime();h&&h.lu(e,r)};window.cr_sizeCanvas=function(e,r){if(0!==e&&0!==r){var h=window.cr_getC2Runtime();h&&h.setSize(e,r)}}; window.cr_setSuspended=function(e){var r=window.cr_getC2Runtime();r&&r.setSuspended(e)}; (function(){function e(a,b){this.b=a;this.zf=null;this.scrollX=this.b.pb/2;this.scrollY=this.b.ob/2;this.scale=1;this.k=0;this.zg=!0;this.name=b[0];this.Rw=b[1];this.Qw=b[2];this.width=b[1];this.height=b[2];this.ks=b[3];this.Qr=b[4];this.ba=b[5];var c=b[6],d,g;this.S=[];this.Wh=[];d=0;for(g=c.length;d=this.S.length&&(k=this.S.length-1);n.q=this.S[k];-1===n.q.d.indexOf(n)&&n.q.d.push(n);n.q.hg=!0}if(!g)for(a=0,c=this.S.length;ac?n.siblings.push(h.d[c]):h.Wc&&(e=this.b.Qe(h.Wc,n.q,!0,n.x,n.y,!0),this.b.Nb(),h.xl(),n.siblings.push(e),p.push(e)));a=0;for(c= this.Kf.length;athis.width-b&&(a=this.width-b);a< b&&(a=b)}this.scrollX!==a&&(this.scrollX=a,this.b.W=!0)};e.prototype.Fr=function(a){if(!this.ks){var b=1/this.Wp()*this.b.K/2;a>this.height-b&&(a=this.height-b);aO&&(O=0);0>F&&(F=0);R>J&&(R=J);T>w&&(T=w);0>Q&&(Q=0);0>I&&(I=0);va>J&&(va=J);wa>w&&(wa=w);H.left=O/J;H.top=1-F/w;H.right=R/J;H.bottom=1-T/w}else H.left=K.left=0,H.top=K.top=0,H.right=K.right=1,H.bottom=K.bottom=1;oa=c&&(a.Ki(g[0].eb)||0!==A||0!==oa||1!==c.opacity||c.type.ea.Pq)||b&&!c&&1!==b.opacity;a.Gr(); if(oa){t[v]||(t[v]=a.Ic(J,w,this.b.za));if(t[v].sf!==J||t[v].rf!==w)a.deleteTexture(t[v]),t[v]=a.Ic(J,w,this.b.za);a.vc(0);a.dd(t[v]);V=wa-I;a.clearRect(Q,w-I-V,va-Q,V);c?c.Db(a):(a.hc(this.b.nb),a.we(b.opacity),a.cd(),a.translate(-x,-B),a.Rc(),a.xd(O,T,R,T,R,F,O,F,H));K.left=K.top=0;K.right=K.bottom=1;c&&(D=H.top,H.top=H.bottom,H.bottom=D);v=1;N=0}a.we(1);A=g.length-1;var Ja=a.Rn(g[A].eb)||!b&&!c&&!this.b.Jc;q=D=0;for(r=g.length;qc||(b&&this.Sc&&a.tc&&a.tc.right>=a.tc.left&&(a.Ca(),this.Mb.update(a,a.tc,null),a.tc.set(0,0,-1,-1)),c===this.d.length-1?this.d.pop():(ya(this.d,c),this.Si(c)),this.yd=!0)};h.prototype.yh=function(a,b){a.Cd=this.d.length;this.d.push(a); b&&this.Sc&&a.tc&&a.X();this.yd=!0};h.prototype.bx=function(a){this.d.unshift(a);this.Si(0)};h.prototype.Iw=function(a,b,c){var d=a.Jd();b=b.Jd();ya(this.d,d);dthis.ya||c.top>this.xa||(b.globalCompositeOperation=a.Ch,a.zc(b))}};h.prototype.zl=function(){this.fe=!0;var a=this.fb(0,0,!0,!0),b=this.fb(0,0,!1,!0);this.fe=!1;this.b.qc&&(a=Math.round(a),b=Math.round(b));this.Zk(a,b,null)};h.prototype.Zk= function(a,b,c){var d=this.mc();this.pa=a;this.qa=b;this.ya=a+1/d*this.b.L;this.xa=b+1/d*this.b.K;this.pa>this.ya&&(a=this.pa,this.pa=this.ya,this.ya=a);this.qa>this.xa&&(a=this.qa,this.qa=this.xa,this.xa=a);a=this.kb();0!==a&&(c&&(c.translate(this.b.L/2,this.b.K/2),c.rotate(-a),c.translate(this.b.L/-2,this.b.K/-2)),this.Ce.set(this.pa,this.qa,this.ya,this.xa),this.Ce.offset((this.pa+this.ya)/-2,(this.qa+this.xa)/-2),this.cs.Or(this.Ce,a),this.cs.pp(this.Ce),this.Ce.offset((this.pa+this.ya)/2,(this.qa+ this.xa)/2),this.pa=this.Ce.left,this.qa=this.Ce.top,this.ya=this.Ce.right,this.xa=this.Ce.bottom)};h.prototype.vf=function(a){if(this.Od=this.Yj){this.b.nb||(this.b.nb=a.Ic(this.b.L,this.b.K,this.b.za));if(this.b.nb.sf!==this.b.L||this.b.nb.rf!==this.b.K)a.deleteTexture(this.b.nb),this.b.nb=a.Ic(this.b.L,this.b.K,this.b.za);a.dd(this.b.nb)}this.fe=!0;var b=this.fb(0,0,!0,!0),c=this.fb(0,0,!1,!0);this.fe=!1;this.b.qc&&(b=Math.round(b),c=Math.round(c));this.Zk(b,c,null);b=this.mc();a.cd();a.scale(b, b);a.$k(-this.kb());a.translate((this.pa+this.ya)/-2,(this.qa+this.xa)/-2);a.Rc();this.Sc?(this.Cb.left=this.Mb.jc(this.pa),this.Cb.top=this.Mb.kc(this.qa),this.Cb.right=this.Mb.jc(this.ya),this.Cb.bottom=this.Mb.kc(this.xa),this.yd||!this.Cb.Hh(this.Qg)?(t(this.re),b=this.Gm(),this.yd=!1,this.Qg.Dh(this.Cb)):b=this.re):b=this.d;for(var d,g=null,c=b.length-1;0<=c;--c)d=b[c],d!==g&&(this.Eu(b[c],a),g=d);this.Sc&&(this.re=b);this.Ad||(this.fm=this.b.yf++,a.el(this.fm),a.Hr(1,1,1),a.Op(),a.ux())};h.prototype.Db= function(a){var b=0,c=0;if(this.Od=this.Yj||1!==this.opacity||0this.ya||c.top>this.xa||(b.el(a.yf),a.rs?this.Fu(a,b):(b.vc(0),b.kf(a.Vb,a.Pb),a.Db(b)))}};h.prototype.Eu=function(a,b){if(a.visible&&0!==a.width&&0!==a.height){a.Ca();var c=a.Ia;c.rightthis.ya||c.top>this.xa||(a.yf=this.b.yf++,0===a.Ob&&1===a.opacity&& a.ye&&a.vf&&(b.el(a.yf),a.vf(b)))}};h.prototype.Fu=function(a,b){var c=a.ja[0].eb,d=a.ja[0].index,g=this.mc();if(1!==a.ja.length||b.Rn(c)||b.gx(c)||(a.k||a.q.kb())&&b.Ki(c)||1!==a.opacity||a.type.ea.Pq)this.ub.Wn(b,this,a,this.Od?this.b.nb:this.ub.Ph()),b.cd(),b.scale(g,g),b.$k(-this.kb()),b.translate((this.pa+this.ya)/-2,(this.qa+this.xa)/-2),b.Rc();else{b.vc(c);b.kf(a.Vb,a.Pb);b.Uk(c)&&(this.b.W=!0);var e=0,h=0,k=0,u=0;b.Ki(c)&&(u=a.Ia,e=this.La(u.left,u.top,!0,!0),h=this.La(u.left,u.top,!1,!0), k=this.La(u.right,u.bottom,!0,!0),u=this.La(u.right,u.bottom,!1,!0),e=e/windowWidth,h=1-h/windowHeight,k=k/windowWidth,u=1-u/windowHeight);var p;a.Bb&&a.Bb.C?(p=a.Bb.C,c=1/p.width,p=1/p.height):(c=1/a.width,p=1/a.height);b.gh(this.Od?this.b.nb:this.ub.Ph(),c,p,e,h,k,u,g,this.kb(),this.pa,this.qa,(this.pa+this.ya)/2,(this.qa+this.xa)/2,this.b.Ib.T,a.Oa[d]);a.Db(b)}};h.prototype.fb=function(a,b,c,d){var g=this.b.devicePixelRatio;this.b.Lf&&(a*=g,b*=g);var g=this.b.mr,e=this.b.nr,g=(this.ub.scrollX- g)*this.oc+g,e=(this.ub.scrollY-e)*this.pc+e,h=g,k=e,u=1/this.mc(!d);d?(h-=this.b.L*u/2,k-=this.b.K*u/2):(h-=this.b.width*u/2,k-=this.b.height*u/2);h+=a*u;k+=b*u;b=this.kb();0!==b&&(h-=g,k-=e,a=Math.cos(b),b=Math.sin(b),d=h*a-k*b,k=k*a+h*b,h=d+g,k+=e);return c?h:k};h.prototype.La=function(a,b,c,d){var g=this.b.mr,e=this.b.nr,h=(this.ub.scrollX-g)*this.oc+g,k=(this.ub.scrollY-e)*this.pc+e,e=h,g=k,u=this.kb();if(0!==u){a-=h;b-=k;var p=Math.cos(-u),u=Math.sin(-u),t=a*p-b*u;b=b*p+a*u;a=t+h;b+=k}h=1/this.mc(!d); d?(e-=this.b.L*h/2,g-=this.b.K*h/2):(e-=this.b.width*h/2,g-=this.b.height*h/2);e=(a-e)/h;g=(b-g)/h;a=this.b.devicePixelRatio;this.b.Lf&&!d&&(e/=a,g/=a);return c?e:g};h.prototype.yb=function(){var a,b,c,d={s:this.scale,a:this.k,vl:this.pa,vt:this.qa,vr:this.ya,vb:this.xa,v:this.visible,bc:this.ld,t:this.Ad,px:this.oc,py:this.pc,o:this.opacity,zr:this.Xb,fx:[],cg:this.Fh,instances:[]};a=0;for(b=this.R.length;aa[1].index&&(b=a[0],a[0]=a[1],a[1]=b):2=y.length&&(y.length=a.length+1);y[a.length]||(y[a.length]=[]);f=y[a.length];b=0;for(c=f.length;b=b.length&&(b.length=this.Vf+1),b[this.Vf]=a):this.data=a};f.prototype.Qh=function(){var a=this.b.Tp();return!this.parent||this.hi||!a||this.ok?this.data:this.Vf>=a.length||"undefined"===typeof a[this.Vf]?this.kk:a[this.Vf]};f.prototype.cb=function(){!this.parent||this.hi||this.ok||this.$f(this.kk)};Tb=f;m.prototype.toString=function(){return"include:"+ this.Vh.toString()};m.prototype.Xa=function(){this.Vh=this.b.rm[this.iw];this.sheet.aq.add(this);this.ua=h(this.ua);for(var a=this.parent;a;)a.group&&a.Fj.push(this),a=a.parent;this.ms()};m.prototype.cb=function(){this.parent&&this.b.Mi(this.b.B);this.Vh.Mm||this.Vh.cb(!0);this.parent&&this.b.hf(this.b.B)};m.prototype.ms=function(){for(var a=this.parent;a;){if(a.group&&!a.Bg){this.Ma=!1;return}a=a.parent}this.Ma=!0};cc=m;l.prototype.reset=function(a){this.rb=a;this.lc=this.gb=0;S(this.Zr);this.pm= this.Nf=!1};l.prototype.uw=function(){return this.rb.no?!0:this.gb=this.type&&(this.first= new ac(g,b[1]),this.second=new ac(g,b[2]));if(d){var c,a;c=0;for(a=d.length;c=b|| e<=-b)e%=b;0>e&&(e+=b);f.apply(t[e],d)};e.prototype.Su=function(g){var b=this.se,d=this.Pa,c=this.V,a=this.rd,f=this.md,e=this.Fb,l=this.Ea.ze,t=b.la(),n=t.qd();if(!n.length)if(t.Z.length)n=t.Z;else{this.fh?g.Ub(""):g.Ba(0);return}d[0]=g;g.Yf=b;g=r();h(c,d,g);a&&(a.get(g),g.tb()&&(l=g.data,n=b.d));--p;c=n.length;if(l>=c||l<=-c)l%=c;0>l&&(l+=c);l=n[l];n=0;b.F&&(n=l.type.yg[b.ie]);e.apply(l.P[f+n],d)};e.prototype.$u=function(g){var b=this.rd,d=this.se,c=this.ss,a=this.Ea.ze,f=d.la(),e=f.qd();if(!e.length)if(f.Z.length)e= f.Z;else{this.fh?g.Ub(""):g.Ba(0);return}if(b){f=r();b.get(f);if(f.tb()){a=f.data;e=d.d;0!==e.length&&(a%=e.length,0>a&&(a+=e.length));a=d.Em(a);d=a.mb[c];z(d)?g.Ub(d):g.G(d);--p;return}--p}b=e.length;if(a>=b||a<=-b)a%=b;0>a&&(a+=b);a=e[a];e=0;d.F&&(e=a.type.Sj[d.ie]);d=a.mb[c+e];z(d)?g.Ub(d):g.G(d)};e.prototype.av=function(g){g.type=dc.jg;g.data=this.value};e.prototype.Xu=function(g){g.type=dc.ig;g.data=this.value};e.prototype.nv=function(g){g.type=dc.String;g.data=this.value};e.prototype.qv=function(g){this.first.get(g); g.tb()&&(g.data=-g.data)};e.prototype.Mu=function(g){this.first.get(g);var b=r();this.second.get(b);g.tb()&&b.tb()&&(g.data+=b.data,b.Ig()&&g.Ug());--p};e.prototype.ov=function(g){this.first.get(g);var b=r();this.second.get(b);g.tb()&&b.tb()&&(g.data-=b.data,b.Ig()&&g.Ug());--p};e.prototype.gv=function(g){this.first.get(g);var b=r();this.second.get(b);g.tb()&&b.tb()&&(g.data*=b.data,b.Ig()&&g.Ug());--p};e.prototype.Uu=function(g){this.first.get(g);var b=r();this.second.get(b);g.tb()&&b.tb()&&(g.data/= b.data,g.Ug());--p};e.prototype.dv=function(g){this.first.get(g);var b=r();this.second.get(b);g.tb()&&b.tb()&&(g.data%=b.data,b.Ig()&&g.Ug());--p};e.prototype.lv=function(g){this.first.get(g);var b=r();this.second.get(b);g.tb()&&b.tb()&&(g.data=Math.pow(g.data,b.data),b.Ig()&&g.Ug());--p};e.prototype.Nu=function(g){this.first.get(g);var b=r();this.second.get(b);b.Lg()||g.Lg()?this.Pu(g,b):this.Ou(g,b);--p};e.prototype.Pu=function(g,b){g.Lg()&&b.Lg()?this.Ru(g,b):this.Qu(g,b)};e.prototype.Ru=function(g, b){g.data+=b.data};e.prototype.Qu=function(g,b){g.Lg()?g.data+=(Math.round(1E10*b.data)/1E10).toString():g.Ub(g.data.toString()+b.data)};e.prototype.Ou=function(g,b){g.Ba(g.data&&b.data?1:0)};e.prototype.kv=function(g){this.first.get(g);var b=r();this.second.get(b);g.tb()&&b.tb()&&(g.data||b.data?g.Ba(1):g.Ba(0));--p};e.prototype.Tu=function(g){this.first.get(g);g.data?this.second.get(g):this.ql.get(g)};e.prototype.Vu=function(g){this.first.get(g);var b=r();this.second.get(b);g.Ba(g.data===b.data? 1:0);--p};e.prototype.hv=function(g){this.first.get(g);var b=r();this.second.get(b);g.Ba(g.data!==b.data?1:0);--p};e.prototype.bv=function(g){this.first.get(g);var b=r();this.second.get(b);g.Ba(g.datab.data?1:0);--p};e.prototype.Zu=function(g){this.first.get(g);var b=r();this.second.get(b);g.Ba(g.data>= b.data?1:0);--p};e.prototype.Wu=function(g){var b=this.Af.Qh();ia(b)?g.G(b):g.Ub(b)};ac=e;q.prototype.Ig=function(){return this.type===dc.ig};q.prototype.tb=function(){return this.type===dc.jg||this.type===dc.ig};q.prototype.Lg=function(){return this.type===dc.String};q.prototype.Ug=function(){this.Ig()||(this.Lg()&&(this.data=parseFloat(this.data)),this.type=dc.ig)};q.prototype.Ba=function(g){this.type=dc.jg;this.data=Math.floor(g)};q.prototype.G=function(g){this.type=dc.ig;this.data=g};q.prototype.Ub= function(g){this.type=dc.String;this.data=g};q.prototype.jo=function(g){ia(g)?(this.type=dc.ig,this.data=g):z(g)?(this.type=dc.String,this.data=g.toString()):(this.type=dc.jg,this.data=0)};$b=q;dc={jg:0,ig:1,String:2}})();function Y(e){this.b=e;this.wc=[]} Y.prototype.yb=function(){var e={},r,h,q,t,p,g,b,d;e.waits=[];var c=e.waits,a;r=0;for(h=this.wc.length;rg)){var b,d,c,a=this.b.sb(),f;t.length?f=t.pop():f={ic:{},ua:[]};f.nm=!1;f.time=this.b.Ib.T+g;f.Tr="";f.lo=!1;f.wg=a.rb;f.lc=a.lc+1;g=0;for(b=this.b.B.length;ga&&(b=a);g.G(b)};h.prototype.wf=function(g){g.G(this.b.wf)};h.prototype.qh=function(g){g.G(this.b.qh)};h.prototype.time= function(g){g.G(this.b.Ib.T)};h.prototype.Sd=function(g){g.Ba(this.b.Sd)};h.prototype.Fk=function(g){g.Ba(this.b.Fk)};h.prototype.ym=function(g){g.Ba(this.b.ym)};h.prototype.k=function(g,b,d,c,a){g.G(Ga(Na(b,d,c,a)))};h.prototype.left=function(g,b,d){g.Ub(z(b)?b.substr(0,d):"")};h.prototype.right=function(g,b,d){g.Ub(z(b)?b.substr(b.length-d):"")};h.prototype.replace=function(g,b,d,c){z(b)&&z(d)&&z(c)?g.Ub(b.replace(new RegExp(fb(d),"gi"),c)):g.Ub(z(b)?b:"")};h.prototype.trim=function(g,b){g.Ub(z(b)? b.trim():"")};h.prototype.du=function(g){var b=M(Math.random()*(arguments.length-1));g.jo(arguments[b+1])};h.prototype.gm=function(g){g.G(this.b.gm/1E3)};h.prototype.Sg=function(g){g.G(this.b.Sg)};q.ra=new h;q.xx=function(){var g,b,d,c,a,f,e=this.b.sb();g=0;for(d=this.wc.length;gthis.b.Ib.T)continue;e.rb=c.wg;e.lc=c.lc;e.gb=0;for(b in c.ic)c.ic.hasOwnProperty(b)&&(a=this.b.B[parseInt(b,10)].la(),f=c.ic[b],a.ta=f.bl,Aa(a.d,f.me), a=f,S(a.me),p.push(a));c.wg.wx();this.b.em(c.ua);c.nm=!0}b=g=0;for(d=this.wc.length;ga.ya||b.top>a.xa)},a.ry=function(){this.Ca();var a=this.Ia,b=this.b.Aa;return 0>a.right||0>a.bottom||a.left>b.width||a.top>b.height},a.Ey=function(a,b,c){var d=this.la(), f=d.qd();if(!f.length)return!1;var g=f[0],e=g,m=Sa(g.x,g.y,b,c),h,p,t;h=1;for(p=f.length;hm)m=t,e=g;d.Ii(e);return!0},f.Ml=function(a){this.x!==a&&(this.x=a,this.X())},f.Ty=function(a){this.y!==a&&(this.y=a,this.X())},f.Qy=function(a,b){if(this.x!==a||this.y!==b)this.x=a,this.y=b,this.X()},f.Ry=function(a,b){var c=a.Jv(this);if(c){var d;c.Nh?(d=c.Nh(b,!0),c=c.Nh(b,!1)):(d=c.x,c=c.y);if(this.x!==d||this.y!==c)this.x=d,this.y=c,this.X()}},f.xy= function(a){0!==a&&(this.x+=Math.cos(this.k)*a,this.y+=Math.sin(this.k)*a,this.X())},f.wy=function(a,b){0!==b&&(this.x+=Math.cos(W(a))*b,this.y+=Math.sin(W(a))*b,this.X())},m.Rl=function(a){a.G(this.x)},m.cp=function(a){a.G(this.y)},m.wf=function(a){a.G(this.b.Df(this))});p&&(a.jy=function(a,b){return ec(this.width,a,b)},a.iy=function(a,b){return ec(this.height,a,b)},f.Gt=function(a){this.width!==a&&(this.width=a,this.X())},f.Py=function(a){this.height!==a&&(this.height=a,this.X())},f.Kl=function(a, b){if(this.width!==a||this.height!==b)this.width=a,this.height=b,this.X()},m.Ol=function(a){a.G(this.width)},m.No=function(a){a.G(this.height)},m.fy=function(a){this.Ca();a.G(this.Ia.left)},m.hy=function(a){this.Ca();a.G(this.Ia.top)},m.gy=function(a){this.Ca();a.G(this.Ia.right)},m.ey=function(a){this.Ca();a.G(this.Ia.bottom)});g&&(a.ws=function(a,b){return Oa(this.k,W(b))<=W(a)},a.Ms=function(a){return Qa(this.k,W(a))},a.Ks=function(a,b){var c=Ma(a),d=Ma(b),f=Ia(this.k);return Qa(d,c)?Qa(f,c)&& !Qa(f,d):!(!Qa(f,c)&&Qa(f,d))},f.My=function(a){a=W(Ha(a));isNaN(a)||this.k===a||(this.k=a,this.X())},f.Iy=function(a){0===a||isNaN(a)||(this.k+=W(a),this.k=Ia(this.k),this.X())},f.Jy=function(a){0===a||isNaN(a)||(this.k-=W(a),this.k=Ia(this.k),this.X())},f.Ky=function(a,b){var c=Pa(this.k,W(b),W(a));isNaN(c)||this.k===c||(this.k=c,this.X())},f.Ly=function(a,b,c){a=Pa(this.k,Math.atan2(c-this.y,b-this.x),W(a));isNaN(a)||this.k===a||(this.k=a,this.X())},f.Sy=function(a,b){var c=Math.atan2(b-this.y, a-this.x);isNaN(c)||this.k===c||(this.k=c,this.X())},m.cy=function(a){a.G(La(this.k))});q||(a.Ko=function(a,b,c){return ec(this.mb[a],b,c)},a.Ls=function(a){return this.mb[a]},a.Fy=function(a,b){var c=this.la(),d=c.qd();if(!d.length)return!1;var f=d[0],g=f,e=f.mb[b],m,h,p;m=1;for(h=d.length;me)e=p,g=f;c.Ii(g);return!0},a.Dy=function(a){var b,c,d,f,g;if(this.b.Sp().Wm){g=this.la();if(g.ta)for(g.ta=!1,S(g.d),S(g.Z),d=this.d,b=0,c=d.length;ba?a=0:1f.q.index||d.q.index===f.q.index&&d.Jd()>f.Jd())f=d}else if(d.q.indexc)){var d=1===a;this.Ie[c]!==d&&(this.Ie[c]=d,this.Bd(),this.b.W=!0)}}},f.Oy=function(a,b,c){if(this.b.u){var d=this.type.Dm(a);0>d||(a=this.type.R[d],d=this.Oa[d],b=Math.floor(b),0>b||b>=d.length||(1===this.b.u.Nv(a.eb,b)&&(c/=100),d[b]!==c&&(d[b]=c,a.Ma&&(this.b.W=!0))))}})};Kb=function(){this.$l=this.vj=!0;this.type.pj=!0;this.b.W=!0;var e,h,q=this.Xl;e=0;for(h=q.length;eq;case 5:return e>=q;default:return!1}}})();var mc={};function pc(e){this.b=e} (function(){function e(){return b.length?b.pop():[]}function r(d){var c,a;c=0;for(a=d.length;cb||b>this.Vc-1||isNaN(c)||0>c||c>this.pd-1||isNaN(a)||0>a||a>this.Gd- 1?0:this.Yd[b][c][a]};g.set=function(b,c,a,f){b=Math.floor(b);c=Math.floor(c);a=Math.floor(a);isNaN(b)||0>b||b>this.Vc-1||isNaN(c)||0>c||c>this.pd-1||isNaN(a)||0>a||a>this.Gd-1||(this.Yd[b][c][a]=f)};g.zv=function(){return JSON.stringify({c2array:!0,size:[this.Vc,this.pd,this.Gd],data:this.Yd})};g.yb=function(){return{size:[this.Vc,this.pd,this.Gd],data:this.Yd}};g.Sb=function(b){var c=b.size;this.Vc=c[0];this.pd=c[1];this.Gd=c[2];this.Yd=b.data};g.xe=function(b,c,a){0>b&&(b=0);0>c&&(c=0);0>a&&(a= 0);if(this.Vc!==b||this.pd!==c||this.Gd!==a){this.Vc=b;this.pd=c;this.Gd=a;var f,g,l=this.Yd;l.length=b;for(b=0;ba&&(a=0);1a&&(a=.01);this.Tk.gain.value=a;this.Sk.gain.value=Math.pow(1/a,.6)*b};n.prototype.shape=function(a,b,c){var d=1.05*c*b-b;c=0>a?-1:1;a=0>a?-a:a;b=ag;++g)f=g/32768,f=this.shape(f,c,d),this.Kj[32768+g]=f,this.Kj[32768- g-1]=-f};n.prototype.Uc=function(a){this.O.disconnect();this.O.connect(a);this.N.disconnect();this.N.connect(a)};n.prototype.remove=function(){this.da.disconnect();this.Tk.disconnect();this.Cl.disconnect();this.Sk.disconnect();this.O.disconnect();this.N.disconnect()};n.prototype.Kc=function(){return this.da};P.prototype.Uc=function(a){this.ga.disconnect();this.ga.connect(a)};P.prototype.remove=function(){this.ga.disconnect()};P.prototype.Kc=function(){return this.ga};k.prototype.Ra=function(){this.ga.getFloatFrequencyData(this.vv); this.ga.getByteTimeDomainData(this.Rr);for(var a=this.ga.fftSize,b=0,c=this.Hi=0,d=0;bd&&(d=-d),this.Hib&&(c=b);return c};G.prototype.Eg=function(){return!this.Bc&&!this.Id&&!this.zb&&!this.Hf()};G.prototype.Kx=function(){return!this.Id&&!this.zb&&!this.Hf()};G.prototype.Ux=function(){var a=this.volume*F;isFinite(a)||(a=0); switch(this.aa){case 0:"undefined"!==typeof this.n.volume&&this.n.volume!==a&&(this.n.volume=a);break;case 1:1===this.buffer.aa?this.jb.gain.value=a*this.Wg:"undefined"!==typeof this.n.volume&&this.n.volume!==a&&(this.n.volume=a)}};G.prototype.Oj=function(a){switch(this.aa){case 0:this.n.muted!==!!a&&(this.n.muted=!!a);break;case 1:1===this.buffer.aa?(this.Wg=a?0:1,this.jb.gain.value=F*this.volume*this.Wg):this.n.muted!==!!a&&(this.n.muted=!!a)}};G.prototype.Gx=function(){this.Jg=!0;this.Oj(this.Jg|| this.gi)};G.prototype.Lr=function(a){this.gi=!!a;this.Oj(this.Jg||this.gi)};G.prototype.yl=function(){var a=this.playbackRate;this.Fg&&(a*=v.qh);switch(this.aa){case 0:this.n.playbackRate!==a&&(this.n.playbackRate=a);break;case 1:1===this.buffer.aa?this.n.playbackRate.value!==a&&(this.n.playbackRate.value=a):this.n.playbackRate!==a&&(this.n.playbackRate=a)}};G.prototype.Ix=function(a){switch(this.aa){case 0:a?this.Eg()?(this.Oc=!0,this.n.pause()):this.Oc=!1:this.Oc&&(this.n.play(),this.Oc=!1);break; case 1:a?this.Eg()?(this.Oc=!0,1===this.buffer.aa?(this.uc=this.Fm(!0),this.Kd&&(this.uc=this.uc%this.Ef()),g(this.n)):this.n.pause()):this.Oc=!1:this.Oc&&(1===this.buffer.aa?(this.n=w.createBufferSource(),this.n.buffer=this.buffer.ka,this.n.connect(this.jb),this.n.onended=this.Jn,this.nj=this.n,this.n.loop=this.Kd,this.jb.gain.value=F*this.volume*this.Wg,this.yl(),this.startTime=(this.Fg?v.Ib.T:v.Ee.T)-this.uc/(this.playbackRate||.001),p(this.n,this.uc,this.Ef())):this.n.play(),this.Oc=!1);break; case 2:a?this.Eg()?(this.n.pause(),this.Oc=!0):this.Oc=!1:this.Oc&&(this.Oc=!1,this.n.play())}};D.Y=function(a){function b(){if(!va&&w.createBuffer){var a=w.createBuffer(1,220,22050),c=w.createBufferSource();c.buffer=a;c.connect(w.destination);t(c)}}this.type=a;v=this.b=a.b;N=this;this.Dc=null;this.pi=-600;this.b.fi&&(Ya=!0);!(this.b.Mg||this.b.lk&&(this.b.Yh||this.b.mk))||this.b.Zh||this.b.Wa||this.b.Xm||Ya||(Za=!0);w=null;"undefined"!==typeof AudioContext?(J=1,w=new AudioContext):"undefined"!== typeof webkitAudioContext&&(J=1,w=new webkitAudioContext);this.b.Mg&&w&&(w.close&&w.close(),"undefined"!==typeof AudioContext?w=new AudioContext:"undefined"!==typeof webkitAudioContext&&(w=new webkitAudioContext));Za?document.addEventListener("touchend",function(){!pb&&w&&(b(),pb=!0);var a,c,d;if(Za){if(!Q)for(a=0,c=$a.length;a"!==b&&(a.Pk=b,a.sn=d,a.Fo=f),null;k=new G(a,b);B.push(k);return k};var Ba=[];L.prototype.lj=function(a){return mb(U,a)};L.prototype.Os=function(a){C(a);var b;a=0;for(b=Ba.length;ac&& (c=0),1b?null:g[b];return c?mb(d,c.name):!1};p.j=new h;q.prototype.CallFunction=function(d,c){var a=r();a.name=d.toLowerCase();a.Pi=0;Aa(a.Lb,c);this.b.trigger(oc.prototype.j.mj,this,a.name);b--};p.I=new q;t.prototype.ys=function(d,c){var a=r();a.name=c.toLowerCase();a.Pi=0;S(a.Lb);var f,g;f=2;for(g=arguments.length;f(e.wheelDelta?e.wheelDelta:e.detail?-e.detail: 0)?0:1;this.hk=!1;this.b.Hb=!0;this.b.trigger(sc.prototype.j.qt,this);this.b.Hb=!1;this.hk&&nb(e)&&e.preventDefault()};q.$g=function(){var e,g;e=0;for(g=this.qg.length;ethis.size?this.Ma=!1:(0!==h.mi&&(this.k+=Math.random()*h.mi*e-h.mi*e/2),0!==h.oi&&(this.speed+=Math.random()*h.oi*e-h.oi*e/2),0!==h.ni&&(this.opacity+=Math.random()*h.ni*e-h.ni*e/2,0>this.opacity?this.opacity=0:1=h.vg&&this.Ke>=h.timeout&&(this.Ma=!1),2===h.vg&&0>=this.speed&&(this.Ma=!1))};e.prototype.zc= function(e){var h=this.Ea.opacity*this.opacity;if(0!==h){0===this.Ea.vg&&(h*=1-this.Ke/this.Ea.timeout);e.globalAlpha=h;var h=this.x-this.size/2,g=this.y-this.size/2;this.Ea.b.qc&&(h=h+.5|0,g=g+.5|0);e.drawImage(this.Ea.type.C,h,g,this.size,this.size)}};e.prototype.Db=function(e){var h=this.Ea.opacity*this.opacity;0===this.Ea.vg&&(h*=1-this.Ke/this.Ea.timeout);var g=this.size,b=g*this.Ea.or,d=this.x-g/2,c=this.y-g/2;this.Ea.b.qc&&(d=d+.5|0,c=c+.5|0);1>b||0===h||(be.un?(e.we(h),e.dh(d,c,d+ g,c,d+g,c+g,d,c+g)):e.Vw(this.x,this.y,b,h))};e.prototype.left=function(){return this.x-this.size/2};e.prototype.right=function(){return this.x+this.size/2};e.prototype.top=function(){return this.y-this.size/2};e.prototype.bottom=function(){return this.y+this.size/2};r.Y=function(e){this.type=e;this.b=e.b};var h=r.Y.prototype,q=[];h.M=function(){var e=this.A;this.Xk=e[0];this.jl=W(e[1]);this.jh=e[2];this.oo=!0;this.Tm=e[3];this.Sm=e[4];this.Rm=e[5]/100;this.Km=e[6];this.Dl=e[7];this.El=e[8];this.il= e[9];this.hl=e[10];this.fk=e[11];this.Gc=e[12];this.Te=e[13];this.mi=e[14];this.oi=e[15];this.ni=e[16];this.vg=e[17];this.timeout=e[18];this.Zf=0;this.or=1;this.Lk=this.x;this.Nk=this.y;this.Mk=this.x;this.Kk=this.y;this.Ut(function(e){e.Ia.set(e.Lk,e.Nk,e.Mk,e.Kk);e.Ab.ih(e.Ia);e.vj=!1;e.Do();e.qs()});this.gc||(this.fc=[]);this.b.ph(this);this.type.qi();if(1===this.jh)for(e=0;ethis.Mk&&(this.Mk=b.right()),b.top()this.Kk&&(this.Kk=b.bottom()),d++):q.push(b);za(this.fc,d);this.X();this.Wj= !1;1===this.jh&&0===this.fc.length&&this.b.Ud(this)};h.zc=function(e){var h,g,b,d=this.q;h=0;for(g=this.fc.length;h=d.pa&&b.bottom()>=d.qa&&b.left()<=d.ya&&b.top()<=d.xa&&b.zc(e)};h.Db=function(e){this.or=this.q.mc();e.hc(this.type.H);var h,g,b,d=this.q;h=0;for(g=this.fc.length;h=d.pa&&b.bottom()>=d.qa&&b.left()<=d.ya&&b.top()<=d.xa&&b.Db(e)};r.j=new function(){};r.I=new function(){};r.ra=new function(){}})();function Z(e){this.b=e} (function(){function e(){if(0===this.lm.length){var b=document.createElement("canvas");b.width=this.width;b.height=this.height;var a=b.getContext("2d");this.kh?a.drawImage(this.C,this.Xg,this.Yg,this.width,this.height,0,0,this.width,this.height):a.drawImage(this.C,0,0,this.width,this.height);this.lm=b.toDataURL("image/png")}return this.lm}function r(){}function h(){}var q=Z.prototype;q.fa=function(b){this.ea=b;this.b=b.b};var t=q.fa.prototype;t.M=function(){if(!this.F){var b,a,d,g,h,q,n,p,k;this.jd= [];this.Uh=!1;b=0;for(a=this.xc.length;bthis.J&&(this.J=0);this.J>=this.Ha.frames.length&&(this.J=this.Ha.frames.length-1);var b=this.Ha.frames[this.J];this.ma.Ti(b.Qk);this.$b=b.$b;this.ac=b.ac;this.tg=this.Ha.speed;this.Re=this.Ha.Yn;1===this.type.xc.length&&1===this.type.xc[0].frames.length||0===this.tg||(this.b.ph(this),this.ei=!0);this.gc?this.Dd.reset():this.Dd=new eb;this.ke=this.Dd.T; this.pf=!0;this.Wd=0;this.of=!0;this.Aj=this.kp="";this.up=0;this.zj=-1;this.type.qi();var a,d,e,g,h,n,q,b=0;for(a=this.type.xc.length;bthis.J&&(this.J=0);this.J>=this.Ha.frames.length&&(this.J=this.Ha.frames.length-1);this.tg=b.cas;this.ke=b.fs;this.Wd=b.ar;this.Dd.reset();this.Dd.T=b.at;this.pf=b.hasOwnProperty("ap")?b.ap:!0;this.of=b.hasOwnProperty("af")?b.af:!0;b.hasOwnProperty("rt")?this.Re=b.rt:this.Re= this.Ha.Yn;this.Bb=this.Ha.frames[this.J];this.Ij=this.Bb.H;this.ma.Ti(this.Bb.Qk);this.$b=this.Bb.$b;this.ac=this.Bb.ac};g.Wl=function(b){this.J=b?0:this.Ha.frames.length-1;this.pf=!1;this.kp=this.Ha.name;this.jk=!0;this.b.trigger(Z.prototype.j.Us,this);this.b.trigger(Z.prototype.j.Ts,this);this.jk=!1;this.Wd=0};g.pg=function(){return this.Dd.T};g.Ra=function(){this.Dd.add(this.b.Df(this));this.Aj.length&&this.zp();0<=this.zj&&this.Ap();var b=this.Dd.T,a=this.Ha,d=a.frames[this.J],e=d.duration/this.tg; this.pf&&b>=this.ke+e&&(this.of?this.J++:this.J--,this.ke+=e,this.J>=a.frames.length&&(a.pr?(this.of=!1,this.J=a.frames.length-2):a.loop?this.J=this.Re:(this.Wd++,this.Wd>=a.Xn?this.Wl(!1):this.J=this.Re)),0>this.J&&(a.pr?(this.J=1,this.of=!0,a.loop||(this.Wd++,this.Wd>=a.Xn&&this.Wl(!0))):a.loop?this.J=this.Re:(this.Wd++,this.Wd>=a.Xn?this.Wl(!0):this.J=this.Re)),0>this.J?this.J=0:this.J>=a.frames.length&&(this.J=a.frames.length-1),b>this.ke+a.frames[this.J].duration/this.tg&&(this.ke=b),b=a.frames[this.J], this.lg(d,b),this.b.W=!0)};g.Qp=function(b){var a,d,e;a=0;for(d=this.type.xc.length;athis.J&&(this.J=0),this.J>=this.Ha.frames.length&&(this.J=this.Ha.frames.length-1), 1===this.up&&(this.J=0),this.pf=!0,this.ke=this.Dd.T,this.of=!0,this.lg(b,this.Ha.frames[this.J]),this.b.W=!0)};g.Ap=function(){var b=this.Ha.frames[this.J],a=this.J;this.J=M(this.zj);0>this.J&&(this.J=0);this.J>=this.Ha.frames.length&&(this.J=this.Ha.frames.length-1);a!==this.J&&(this.lg(b,this.Ha.frames[this.J]),this.ke=this.Dd.T,this.b.W=!0);this.zj=-1};g.lg=function(b,a){var d=b.width,e=b.height,g=a.width,h=a.height;d!=g&&(this.width*=g/d);e!=h&&(this.height*=h/e);this.$b=a.$b;this.ac=a.ac;this.ma.Ti(a.Qk); this.X();this.Bb=a;this.Ij=a.H;d=0;for(e=this.P.length;dg||g>=e.length)return a?this.x:this.y;var h=(e[g][1]-d.$b)*this.width,e=e[g][2],e=(e-d.ac)*this.height,d=Math.cos(this.k);g=Math.sin(this.k);var n=h*d-e*g,e=e*d+h*g,h=n+this.x,e=e+this.y;return a? h:e};var b=new ca,d=!1;new ta(0,0,0,0);t.finish=function(c){if(d){if(c){var a=this.b.sb().rb.bd;c=null.la();var f=b.nf(),e,g;if(c.ta){c.ta=!1;S(c.d);e=0;for(g=f.length;e=f.length&&f.push(e(b,Object));c=f[c];c.text=d;c.width=a.wn(d);a.Be=ma(a.Be,c.width)}function q(){}var t=uc.prototype;t.M=function(){};t.fa=function(a){this.ea=a;this.b=a.b};var p=t.fa.prototype;p.M= function(){this.F||(this.C=new Image,this.C.crossOrigin="anonymous",this.C.idtkLoadDisposed=!0,this.C.src=this.aj,this.b.gg.push(this.C),this.H=null)};p.Zg=function(){this.F||(this.H=null)};p.Gi=function(){if(!this.F&&this.d.length){this.H||(this.H=this.b.u.Ze(this.C,!1,this.b.za,this.dg));var a,b;a=0;for(b=this.d.length;a=b*f);p++){var t=p%b,r=Math.floor(p/b),E=q.charAt(p);if(this.b.u){var L=this.Dj,A=t*h,D=r*k,t=(t+1)*h,r=(r+1)*k;void 0===L[E]&&(L[E]=e(c,ta));L[E].left=A;L[E].top=D;L[E].right=t;L[E].bottom=r}else L=this.Cj,t=t*a,r=r*g,A=a,D=g,void 0===L[E]&&(L[E]=e(d,Object)),L[E].x=t,L[E].y=r,L[E].ts=A,L[E].Xp=D}};var a=[];t.Nl=function(b){a.length= 0;for(var c="",d,f=0;f=f)r(b,d,!0);else{var g=a.Ne,h=a.sg;if(c.length*(a.Bj*g+h)-h<=f&&-1===c.indexOf("\n")&&(h=a.wn(c),h<=f)){r(b,d,!0);d.push(e(b,Object));d[0].text= c;d[0].width=h;a.Be=h;a.Rd=a.Me*g+a.lineHeight;return}this.Ql(a);a.Rd=d.length*(a.Me*g+a.lineHeight)}}else r(b,d,!0)};t.Ql=function(c){var d=c.jj,f=c.text,e=c.ec,q=c.width;d&&(this.Nl(f),f=a);var k="",p,t,r,C=0,E=!1;for(r=0;rq&&(""===p?(h(c,C,k),k="",E=!0):(h(c,C,p),k=f[r]),C++,d||" "!==k||(k="")));k.replace(/\s\s*$/,"").length&&(h(c,C,k),C++);for(r=C;rthis.width+1E-5)break;void 0!==v&&a.drawImage(this.C,v.x,v.y,v.ts,v.Xp,Math.round(h),Math.round(p),v.ts*c,v.Xp*c);h+=this.Mh(D)* c+e}p+=d;if(p+d+f>this.height)break}a.restore()}};var f=new ua;p.Db=function(a){a.hc(this.H);a.we(this.opacity);if(""!==this.text&&(this.Ar(),!(this.heightthis.width+1E-5)break;if(void 0!==J){var w=this.Bj*q,x=this.Me*q;f.Fa=N;f.Ga=h;f.Ya=N+w;f.Za=h;f.Sa=N;f.Ta=h+x;f.Ua=N+w;f.Va=h+x;if(0!==e){var w=f,x=D,B=v,H=void 0,H=w.Fa*x-w.Ga*B;w.Ga=w.Ga*x+w.Fa*B;w.Fa=H;H=w.Ya*x-w.Za*B;w.Za=w.Za*x+w.Ya*B;w.Ya=H;H=w.Sa*x-w.Ta*B;w.Ta=w.Ta*x+w.Sa*B;w.Sa=H;H=w.Ua*x-w.Va*B;w.Va=w.Va*x+w.Ua*B;w.Ua=H}f.offset(c,b);a.xd(f.Fa,f.Ga,f.Ya,f.Za,f.Ua,f.Va,f.Sa, f.Ta,J)}N+=this.Mh(V)*q+r}h+=p;if(h+p+t>this.height)break}}};t.j=new function(){};q.prototype.bp=function(a){ia(a)&&1E9>a&&(a=Math.round(1E10*a)/1E10);a=a.toString();this.text!==a&&(this.text=a,this.Qc=!0,this.b.W=!0)};p.pg=function(a,b){var c=parseInt(b,10);this.nd[a]!==c&&(this.nd[a]=c,this.Qc=!0,this.b.W=!0)};t.I=new q;t.ra=new function(){}})();function vc(e){this.b=e} (function(){function e(){return b.length?b.pop():{}}function r(d){var c,a;c=0;for(a=d.length;cb.ya||c.top>b.xa)this.b.u.deleteTexture(this.Ec),this.Ld=this.Xf=this.Ec=null}};p.ff=function(){this.Ld=this.Xf=null;this.b.u&& this.Ec&&this.b.u.deleteTexture(this.Ec);this.Ec=null};p.pg=function(){this.font=this.Xj+" "+this.Li.toString()+"pt "+this.xg;this.Qc=!0;this.b.W=!0};p.zc=function(b,c){b.font=this.font;b.textBaseline="top";b.fillStyle=this.color;b.globalAlpha=c?1:this.opacity;var a=1;c&&(a=Math.abs(this.q.mc()),b.save(),b.scale(a,a));if(this.Qc||this.width!==this.Qf)this.type.ea.Pl(this.text,this.ec,b,this.width,this.jj),this.Qc=!1,this.Qf=this.width;this.Ca();var a=c?0:this.Ab.Fa,f=c?0:this.Ab.Ga;this.b.qc&&(a= a+.5|0,f=f+.5|0);0===this.k||c||(b.save(),b.translate(a,f),b.rotate(this.k),f=a=0);var e=f+this.height,g=this.Sn,g=g+this.mn,h,n;1===this.fg?f+=Math.max(this.height/2-this.ec.length*g/2,0):2===this.fg&&(f+=Math.max(this.height-this.ec.length*g-2,0));for(n=0;n=e-g);n++);(0!==this.k||c)&&b.restore();this.Pf=this.b.Sd};p.Db=function(b){if(!(1> this.width||1>this.height)){var c=this.Qc||this.Qq;this.Qq=!1;var a=this.q.mc(),f=this.q.kb(),e=this.jf,g=a*this.width,h=a*this.height,n=Math.ceil(g),q=Math.ceil(h),k=Math.abs(n),p=Math.abs(q),t=this.b.L/2,r=this.b.K/2;this.Xf||(this.Ld=document.createElement("canvas"),this.Ld.width=k,this.Ld.height=p,this.sk=k,this.rk=p,c=!0,this.Xf=this.Ld.getContext("2d"));if(k!==this.sk||p!==this.rk)this.Ld.width=k,this.Ld.height=p,this.Ec&&(b.deleteTexture(this.Ec),this.Ec=null),c=!0;c&&(this.Xf.clearRect(0, 0,k,p),this.zc(this.Xf,!0),this.Ec||(this.Ec=b.Ic(k,p,this.b.za,this.b.pe)),b.Zx(this.Ld,this.Ec,this.b.pe));this.sk=k;this.rk=p;b.hc(this.Ec);b.we(this.opacity);b.cd();b.translate(-t,-r);b.Rc();var C=this.Ab,c=this.q.La(C.Fa,C.Ga,!0,!0),k=this.q.La(C.Fa,C.Ga,!1,!0),p=this.q.La(C.Ya,C.Za,!0,!0),t=this.q.La(C.Ya,C.Za,!1,!0),r=this.q.La(C.Ua,C.Va,!0,!0),E=this.q.La(C.Ua,C.Va,!1,!0),L=this.q.La(C.Sa,C.Ta,!0,!0),C=this.q.La(C.Sa,C.Ta,!1,!0);if(this.b.qc||0===this.k&&0===f)var A=(c+.5|0)-c,D=(k+.5|0)- k,c=c+A,k=k+D,p=p+A,t=t+D,r=r+A,E=E+D,L=L+A,C=C+D;0===this.k&&0===f?(p=c+n,t=k,r=p,E=k+q,L=c,C=E,e.right=1,e.bottom=1):(e.right=g/n,e.bottom=h/q);b.xd(c,k,p,t,r,E,L,C,e);b.cd();b.scale(a,a);b.$k(-this.q.kb());b.translate((this.q.pa+this.q.ya)/-2,(this.q.qa+this.q.xa)/-2);b.Rc();this.Pf=this.b.Sd}};var g=[];t.Nl=function(b){S(g);for(var c="",a,f=0;f=f)r(c);else{if(100>=b.length&&-1===b.indexOf("\n")){var h=a.measureText(b).width;if(h<=f){r(c);c.push(e());c[0].text=b;c[0].width=h;return}}this.Ql(b,c,a,f,g)}else r(c)};t.Ql=function(d,c,a,f,m){m&&(this.Nl(d),d=g);var l="",p,n,q,k=0;for(q=0;q=c.length&&c.push(e()),l=h(l),n=c[k],n.text=l,n.width=a.measureText(l).width, k++,l=""):(p=l,l+=d[q],n=a.measureText(l).width,n>=f&&(k>=c.length&&c.push(e()),p=h(p),n=c[k],n.text=p,n.width=a.measureText(p).width,k++,l=d[q],m||" "!==l||(l="")));l.length&&(k>=c.length&&c.push(e()),l=h(l),n=c[k],n.text=l,n.width=a.measureText(l).width,k++);for(q=k;qb&&(b=Math.round(1E10*b)/1E10);b=b.toString();this.text!==b&&(this.text=b,this.Qc=!0,this.b.W=!0)};t.I=new q;t.ra=new function(){}})(); function wc(e){this.b=e} (function(){var e=wc.prototype;e.fa=function(e){this.ea=e;this.b=e.b};var r=e.fa.prototype;r.M=function(){this.F||(this.C=new Image, this.C.crossOrigin="anonymous",this.C.hm=this.pl,this.b.Go(this.C,this.aj),this.H=this.pattern=null)};r.Zg=function(){this.F||(this.H=null)};r.Gi=function(){if(!this.F&&this.d.length){this.H||(this.H=this.b.u.Ze(this.C,!0,this.b.za,this.dg));var e,q;e=0;for(q=this.d.length;eb&&(b+=this.C.width);0>d&&(d+=this.C.height);e.translate(q,t);e.rotate(this.k);e.translate(b,d);e.fillRect(p-b,g-d,this.width,this.height);e.restore()};r.vf=function(e){this.Db(e)};r.Db=function(e){e.hc(this.H); e.we(this.opacity);var q=this.jf;q.right=this.width/this.C.width;q.bottom=this.height/this.C.height;var t=this.Ab;if(this.b.qc){var p=Math.round(this.x)-this.x,g=Math.round(this.y)-this.y;e.xd(t.Fa+p,t.Ga+g,t.Ya+p,t.Za+g,t.Ua+p,t.Va+g,t.Sa+p,t.Ta+g,q)}else e.xd(t.Fa,t.Ga,t.Ya,t.Za,t.Ua,t.Va,t.Sa,t.Ta,q)};e.j=new function(){};e.I=new function(){};e.ra=new function(){}})();function xc(e){this.b=e} (function(){function e(b){d=b.x;c=b.y;a=b.z}function r(a,b,c,d){var e;e=f.length?f.pop():new h;e.init(a,b,c,d);return e}function h(){this.Wi=this.id=this.Sf=this.Rf=this.y=this.x=this.ml=this.ll=this.jn=this.time=this.qo=0;this.cj=this.ul=!1}function q(){}function t(){}var p=xc.prototype;p.fa=function(a){this.ea=a;this.b=a.b};p.fa.prototype.M=function(){};p.Y=function(a){this.type=a;this.b=a.b;this.touches=[];this.yn=!1};var g=p.Y.prototype,b={left:0,top:0};g.Lh=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 d=0,c=0,a=0,f=[];h.prototype.init=function(a,b,c,d){var f=Wa();this.qo=this.jn=this.time=f;this.ll=a;this.ml=b;this.x=a;this.y=b;this.Rf=a;this.Sf=b;this.pressure=this.height=this.width=0;this.id=c;this.Wi=d;this.cj=this.ul=!1};h.prototype.update=function(a,b,c,d,f,e){this.jn=this.time;this.time=a;this.Rf=this.x;this.Sf=this.y;this.x=b;this.y=c;this.width=d;this.height=f;this.pressure=e;!this.cj&&15<=Sa(this.ll,this.ml,this.x,this.y)&&(this.cj= !0)};h.prototype.Fw=function(a,b){!this.ul&&500<=Wa()-this.qo&&!this.cj&&15>Sa(this.ll,this.ml,this.x,this.y)&&(this.ul=!0,a.Td=this.Wi,a.rh=this.id,a.Ag=b,a.b.trigger(xc.prototype.j.bt,a),a.de=this.x,a.ee=this.y,a.b.trigger(xc.prototype.j.ct,a),a.Ag=0)};var m=-1E3,l=-1E3,y=-1E4;h.prototype.Kq=function(a,b){if(!this.ul){var c=Wa();333>=c-this.qo&&!this.cj&&15>Sa(this.ll,this.ml,this.x,this.y)&&(a.Td=this.Wi,a.rh=this.id,a.Ag=b,666>=c-y&&25>Sa(m,l,this.x,this.y)?(a.b.trigger(xc.prototype.j.Ys,a),a.de= this.x,a.ee=this.y,a.b.trigger(xc.prototype.j.Zs,a),l=m=-1E3,y=-1E4):(a.b.trigger(xc.prototype.j.nt,a),a.de=this.x,a.ee=this.y,a.b.trigger(xc.prototype.j.ot,a),m=this.x,l=this.y,y=c),a.Ag=0)}};g.M=function(){this.xw=!("undefined"===typeof window.c2isWindows8||!window.c2isWindows8);this.Ag=this.rh=this.Td=this.ee=this.de=this.fp=this.ep=this.dp=this.Rt=this.Qt=this.Pt=this.Jk=this.Ik=this.Hk=0;this.Xx=0!==this.A[0];var a=0d-c.time||c.update(d,a.pageX-f.left,a.pageY-f.top, a.width||0,a.height||0,a.pressure||0)}}};g.$q=function(a){if(a.pointerType!==a.MSPOINTER_TYPE_MOUSE&&"mouse"!==a.pointerType){a.preventDefault&&nb(a)&&a.preventDefault();var c=this.b.Wa?b:jQuery(this.b.canvas).offset(),d=a.pageX-c.left,c=a.pageY-c.top;Wa();this.Td=this.touches.length;this.rh=a.pointerId;this.touches.push(r(d,c,a.pointerId,this.Td));this.b.Hb=!0;this.b.trigger(xc.prototype.j.Uo,this);this.b.trigger(xc.prototype.j.Zo,this);this.de=d;this.ee=c;this.b.trigger(xc.prototype.j.Jl,this); this.b.Hb=!1}};g.Gk=function(a,b){if(a.pointerType!==a.MSPOINTER_TYPE_MOUSE&&"mouse"!==a.pointerType){a.preventDefault&&nb(a)&&a.preventDefault();var c=this.Lh(a.pointerId);this.Td=0<=c?this.touches[c].Wi:-1;this.rh=0<=c?this.touches[c].id:-1;this.b.Hb=!0;this.b.trigger(xc.prototype.j.To,this);this.b.trigger(xc.prototype.j.Yo,this);0<=c&&(b||this.touches[c].Kq(this,c),100>f.length&&f.push(this.touches[c]),this.touches.splice(c,1));this.b.Hb=!1}};g.cr=function(a){a.preventDefault&&a.preventDefault(); var c=Wa(),d,f,e,g;d=0;for(f=a.changedTouches.length;dc-g.time||g.update(c,e.pageX-h.left,e.pageY-h.top,2*(e.mz||e.uz||e.fz||e.iz||0),2*(e.nz||e.vz||e.gz||e.jz||0),e.$y||e.sz||e.ez||e.hz||0)}};g.dr=function(a){a.preventDefault&&nb(a)&&a.preventDefault();var c=this.b.Wa?b:jQuery(this.b.canvas).offset();Wa();this.b.Hb=!0;var d,f,e,g;d=0;for(f=a.changedTouches.length;df.length&&f.push(this.touches[e]),this.touches.splice(e,1));this.b.Hb=!1};g.pg=function(){return this.b.Ac&&0===this.Hk&&0!==a?90*a:this.Hk};g.iu=function(){return this.b.Ac&&0===this.Ik&&0!==c?90*c:this.Ik};g.Bw=function(){return this.b.Ac&&0===this.Jk&&0!==d?90*d:this.Jk};g.Fn=function(a){this.dr({changedTouches:[{pageX:a.pageX, pageY:a.pageY,identifier:0}]});this.yn=!0};g.Gn=function(a){this.yn&&this.cr({changedTouches:[{pageX:a.pageX,pageY:a.pageY,identifier:0}]})};g.Hn=function(a){a.preventDefault&&this.b.gk&&!this.b.pe&&a.preventDefault();this.b.gk=!0;this.In({changedTouches:[{pageX:a.pageX,pageY:a.pageY,identifier:0}]});this.yn=!1};g.so=function(){var a,b,c,d=Wa();a=0;for(b=this.touches.length;ac||c>=this.touches.length)a.G(0);else{var d,f,e,g,h;ha(b)?(d=this.b.le(0),f=d.scale,e=d.Xb,g=d.oc,h=d.k,d.scale=1,d.Xb=1,d.oc=1,d.k=0,a.G(d.fb(this.touches[c].x,this.touches[c].y,!0)),d.scale=f,d.Xb=e,d.oc=g,d.k=h):(d=ia(b)?this.b.le(b):this.b.Oh(b))?a.G(d.fb(this.touches[c].x,this.touches[c].y,!0)):a.G(0)}};t.prototype.cp=function(a,b){var c=this.Ag;if(0>c||c>=this.touches.length)a.G(0);else{var d,f,e,g,h;ha(b)?(d=this.b.le(0),f=d.scale, e=d.Xb,g=d.pc,h=d.k,d.scale=1,d.Xb=1,d.pc=1,d.k=0,a.G(d.fb(this.touches[c].x,this.touches[c].y,!1)),d.scale=f,d.Xb=e,d.pc=g,d.k=h):(d=ia(b)?this.b.le(b):this.b.Oh(b))?a.G(d.fb(this.touches[c].x,this.touches[c].y,!1)):a.G(0)}};p.ra=new t})();function yc(e){this.b=e} (function(){function e(){}function r(){}function h(){}var q=yc.prototype;q.fa=function(b){this.ea=b;this.b=b.b};q.fa.prototype.M=function(){};q.Y=function(b){this.type=b;this.b=b.b};var t=q.Y.prototype,p="",g="undefined"!==typeof window.is_scirra_arcade;g&&(p="arcade"+window.scirra_arcade_id);var b=!1;try{localStorage.getItem("test"),b=!0}catch(d){b=!1}t.M=function(){b||ea("[Construct 2] Webstorage plugin: local storage is not supported on this platform.")};e.prototype.Ss=function(c){return b?null!= localStorage.getItem(p+c):!1};e.prototype.kt=function(){return!0};e.prototype.Ds=function(c,a,d){if(!b)return!1;c=localStorage.getItem(p+c)||"";return ec(parseFloat(c),a,d)};q.j=new e;r.prototype.Lt=function(c,a){if(b)try{localStorage.setItem(p+c,a)}catch(d){this.b.trigger(yc.prototype.j.kt,this)}};q.I=new r;h.prototype.Gl=function(c){if(b){var a={},d,e,h;d=0;for(e=localStorage.length;dh&&(h=0),this.Eb=Math.cos(p)*h,this.ib=Math.sin(p)*h);0!==this.Te&&(this.ib+=this.Te*e);this.Rf=this.m.x;this.Sf=this.m.y;if(0!==this.Eb||0!==this.ib)if(this.m.x+=this.Eb*e,this.m.y+=this.ib*e,this.sl+=Sa(0,0,this.Eb*e,this.ib*e),this.eo&&(this.m.k=Na(0,0,this.Eb,this.ib),this.m.X(),this.Ng=this.m.k),this.m.X(),this.Zt&&(h=this.b.bg(this.m)))this.b.ox(this.m,h),h=Sa(0,0,this.Eb,this.ib),p=this.b.bu(this.m,this.Rf,this.Sf),this.Eb=Math.cos(p)*h,this.ib=Math.sin(p)* h,this.m.x+=this.Eb*e,this.m.y+=this.ib*e,this.m.X(),this.eo&&(this.Ng=this.m.k=p,this.m.X()),this.b.kx(this.m,this.Eb/h,this.ib/h,Math.max(2.5*h*e,30))||this.b.mx(this.m)}};r.j=new function(){};e.prototype.yt=function(e){e=W(e);var h=Sa(0,0,this.Eb,this.ib);this.Eb=Math.cos(e)*h;this.ib=Math.sin(e)*h};r.I=new e;r.ra=new function(){}})();function Bc(e){this.b=e} (function(){function e(){}var r=Bc.prototype;r.fa=function(e){this.behavior=e;this.b=e.b};r.fa.prototype.M=function(){};r.Y=function(e,h){this.type=e;this.behavior=e.behavior;this.m=h;this.b=e.b};var h=r.Y.prototype;h.M=function(){this.gp=1===this.A[0];this.Jh=this.A[1];this.hj=this.A[2];this.Qj=this.A[3];this.ku=this.A[4];this.Pc=this.gp?0:3;this.gc?this.ed.reset():this.ed=new eb;this.Wf=this.m.opacity?this.m.opacity:1;this.gp&&(0===this.Jh?(this.Pc=1,0===this.hj&&(this.Pc=2)):(this.m.opacity=0, this.b.W=!0))};h.yb=function(){return{fit:this.Jh,wt:this.hj,fot:this.Qj,s:this.Pc,st:this.ed.T,mo:this.Wf}};h.Sb=function(e){this.Jh=e.fit;this.hj=e.wt;this.Qj=e.fot;this.Pc=e.s;this.ed.reset();this.ed.T=e.st;this.Wf=e.mo};h.Ra=function(){this.ed.add(this.b.Df(this.m));0===this.Pc&&(this.m.opacity=this.ed.T/this.Jh*this.Wf,this.b.W=!0,this.m.opacity>=this.Wf&&(this.m.opacity=this.Wf,this.Pc=1,this.ed.reset(),this.b.trigger(Bc.prototype.j.$s,this.m)));1===this.Pc&&this.ed.T>=this.hj&&(this.Pc=2,this.ed.reset(), this.b.trigger(Bc.prototype.j.pt,this.m));2===this.Pc&&0!==this.Qj&&(this.m.opacity=this.Wf-this.ed.T/this.Qj*this.Wf,this.b.W=!0,0>this.m.opacity&&(this.m.opacity=0,this.Pc=3,this.ed.reset(),this.b.trigger(Bc.prototype.j.Po,this.m),1===this.ku&&this.b.Ud(this.m)))};h.pg=function(){this.Pc=0;this.ed.reset();0===this.Jh?(this.Pc=1,0===this.hj&&(this.Pc=2)):(this.m.opacity=0,this.b.W=!0)};e.prototype.Po=function(){return!0};e.prototype.$s=function(){return!0};e.prototype.pt=function(){return!0};r.j= new e;r.I=new function(){};r.ra=new function(){}})();function Cc(e){this.b=e} (function(){var e=Cc.prototype;e.fa=function(e){this.behavior=e;this.b=e.b};e.fa.prototype.M=function(){};e.Y=function(e,q){this.type=e;this.behavior=e.behavior;this.m=q;this.b=e.b};var r=e.Y.prototype;r.M=function(){this.speed=W(this.A[0]);this.Gc=W(this.A[1])};r.yb=function(){return{speed:this.speed,acc:this.Gc}};r.Sb=function(e){this.speed=e.speed;this.Gc=e.acc};r.Ra=function(){var e=this.b.Df(this.m);0!==e&&(0!==this.Gc&&(this.speed+=this.Gc*e),0!==this.speed&&(this.m.k=Ia(this.m.k+this.speed* e),this.m.X()))};e.j=new function(){};e.I=new function(){};e.ra=new function(){}})();function Dc(e){this.b=e} (function(){var e=Dc.prototype;e.fa=function(e){this.behavior=e;this.b=e.b};e.fa.prototype.M=function(){};e.Y=function(e,g){this.type=e;this.behavior=e.behavior;this.m=g;this.b=e.b;this.lb=0};var r=e.Y.prototype,h=2*Math.PI,q=Math.PI/2,t=3*Math.PI/2;r.M=function(){this.Ma=1===this.A[0];this.Bi=this.A[1];this.Io=this.A[2];this.ue=this.A[3];this.ue+=Math.random()*this.A[4];0===this.ue?this.lb=0:(this.lb=this.A[5]/this.ue*h,this.lb+=Math.random()*this.A[6]/this.ue*h);this.nc=this.A[7];this.nc+=Math.random()* this.A[8];this.Oi=this.Jf=this.ca=0;this.init()};r.yb=function(){return{i:this.lb,a:this.Ma,mv:this.Bi,w:this.Io,p:this.ue,mag:this.nc,iv:this.ca,iv2:this.Jf,r:this.Oi,lkv:this.Cc,lkv2:this.ki}};r.Sb=function(e){this.lb=e.i;this.Ma=e.a;this.Bi=e.mv;this.Io=e.w;this.ue=e.p;this.nc=e.mag;this.ca=e.iv;this.Jf=e.iv2||0;this.Oi=e.r;this.Cc=e.lkv;this.ki=e.lkv2||0};r.init=function(){switch(this.Bi){case 0:this.ca=this.m.x;break;case 1:this.ca=this.m.y;break;case 2:this.ca=this.m.width;this.Oi=this.m.height/ this.m.width;break;case 3:this.ca=this.m.width;break;case 4:this.ca=this.m.height;break;case 5:this.ca=this.m.k;this.nc=W(this.nc);break;case 6:this.ca=this.m.opacity;break;case 7:this.ca=0;break;case 8:this.ca=this.m.x,this.Jf=this.m.y}this.Cc=this.ca;this.ki=this.Jf};r.Fe=function(e){e=e%h;switch(this.Io){case 0:return Math.sin(e);case 1:return e<=q?e/q:e<=t?1-2*(e-q)/Math.PI:(e-t)/q-1;case 2:return 2*e/h-1;case 3:return-2*e/h+1;case 4:return ethis.m.opacity?this.m.opacity=0:1