// Generated by Construct 2, the HTML5 game and app creator :: http://www.scirra.com
'use strict';var x,ba,da,ea,fa,ia,ka,ma,na,oa,pa,qa,ra,sa,ta,ua,xa,ya,za,Aa,Ba,Da,Fa,Ha,E,Ia,Ja,Ka,Ma,Na,I,Pa,Ra,Sa,Ta,Ua,Va,Wa,Xa,Ya,ab,bb,gb,ib,jb,mb,tb,ub,vb,wb,xb,yb,Bb,Cb,Db,Gb,Hb,Ib,Nb,Qb,Wb,Xb,Yb,Zb,ac,dc,ec,fc,gc,hc,ic,jc,kc,lc,mc,nc,pc,qc,rc,sc,tc,uc,vc,wc,xc,yc,zc,Ac,Bc,Cc,Dc,Gc,Oc,Pc,Qc,Rc,Sc,Tc,Uc,Vc,Wc,Xc={};"function"!==typeof Object.getPrototypeOf&&(Object.getPrototypeOf="object"===typeof"test".__proto__?function(a){return a.__proto__}:function(a){return a.constructor.prototype});
(function(){function a(a,g,b,c){this.set(a,g,b,c)}function c(){this.Hd=this.Gd=this.Jd=this.Id=this.Vd=this.Ud=this.bd=this.$c=0}function b(a,g,b,c){a<g?b<c?(u=a<b?a:b,t=g>c?g:c):(u=a<c?a:c,t=g>b?g:b):b<c?(u=g<b?g:b,t=a>c?a:c):(u=g<c?g:c,t=a>b?a:b)}function e(){this.items=this.ec=null;this.vm=0;F&&(this.ec=new Set);this.ol=[];this.Vh=!0}function d(a){D[G++]=a}function k(){this.ib=this.Aq=this.y=this.I=0}function f(a){this.zc=[];this.Zn=this.ao=this.bo=this.$n=0;this.oo=null;this.pn(a)}function g(a,
g){this.rr=a;this.qr=g;this.cells={}}function h(a,g){this.rr=a;this.qr=g;this.cells={}}function l(a,g,b){var c;return z.length?(c=z.pop(),c.rs=a,c.x=g,c.y=b,c):new da(a,g,b)}function m(a,g,b){this.rs=a;this.x=g;this.y=b;this.jd=new ea}function n(a,g,b){var c;return w.length?(c=w.pop(),c.rs=a,c.x=g,c.y=b,c):new fa(a,g,b)}function q(a,g,b){this.rs=a;this.x=g;this.y=b;this.jd=[];this.Dk=!0;this.Fg=new ea;this.Dl=!1}function p(a,g){return a.gg-g.gg}ia=function(a){window.console&&window.console.log&&window.console.log(a)};
ka=function(a){window.console&&window.console.error&&window.console.error(a)};ba=function(a){return a};ma=function(a){return"undefined"===typeof a};na=function(a){return"number"===typeof a};oa=function(a){return"string"===typeof a};pa=function(a){return 0<a&&0===(a-1&a)};qa=function(a){--a;for(var g=1;32>g;g<<=1)a=a|a>>g;return a+1};ra=function(a){return 0>a?-a:a};sa=function(a,g){return a>g?a:g};ta=function(a,g){return a<g?a:g};ua=Math.PI;xa=function(a){return 0<=a?a|0:(a|0)-1};ya=function(a){var g=
a|0;return g===a?g:g+1};za=function(a,g,b,c,h,f,d,m){var e,k,l,n;a<b?(k=a,e=b):(k=b,e=a);h<d?(n=h,l=d):(n=d,l=h);if(e<n||k>l)return!1;g<c?(k=g,e=c):(k=c,e=g);f<m?(n=f,l=m):(n=m,l=f);if(e<n||k>l)return!1;e=h-a+d-b;k=f-g+m-c;a=b-a;g=c-g;h=d-h;f=m-f;m=ra(g*h-f*a);return ra(h*k-f*e)>m?!1:ra(a*k-g*e)<=m};a.prototype.set=function(a,g,b,c){this.left=a;this.top=g;this.right=b;this.bottom=c};a.prototype.Il=function(a){this.left=a.left;this.top=a.top;this.right=a.right;this.bottom=a.bottom};a.prototype.width=
function(){return this.right-this.left};a.prototype.height=function(){return this.bottom-this.top};a.prototype.offset=function(a,g){this.left+=a;this.top+=g;this.right+=a;this.bottom+=g;return this};a.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)};a.prototype.yw=function(a){return!(a.right<this.left||a.bottom<this.top||a.left>this.right||a.top>this.bottom)};a.prototype.zw=
function(a,g,b){return!(a.right+g<this.left||a.bottom+b<this.top||a.left+g>this.right||a.top+b>this.bottom)};a.prototype.Kd=function(a,g){return a>=this.left&&a<=this.right&&g>=this.top&&g<=this.bottom};a.prototype.Pl=function(a){return this.left===a.left&&this.top===a.top&&this.right===a.right&&this.bottom===a.bottom};Aa=a;c.prototype.Ii=function(a){this.$c=a.left;this.bd=a.top;this.Ud=a.right;this.Vd=a.top;this.Id=a.right;this.Jd=a.bottom;this.Gd=a.left;this.Hd=a.bottom};c.prototype.yy=function(a,
g){if(0===g)this.Ii(a);else{var b=Math.sin(g),c=Math.cos(g),h=a.left*b,f=a.top*b,d=a.right*b,b=a.bottom*b,m=a.left*c,e=a.top*c,k=a.right*c,c=a.bottom*c;this.$c=m-f;this.bd=e+h;this.Ud=k-f;this.Vd=e+d;this.Id=k-b;this.Jd=c+d;this.Gd=m-b;this.Hd=c+h}};c.prototype.offset=function(a,g){this.$c+=a;this.bd+=g;this.Ud+=a;this.Vd+=g;this.Id+=a;this.Jd+=g;this.Gd+=a;this.Hd+=g;return this};var u=0,t=0;c.prototype.Av=function(a){b(this.$c,this.Ud,this.Id,this.Gd);a.left=u;a.right=t;b(this.bd,this.Vd,this.Jd,
this.Hd);a.top=u;a.bottom=t};c.prototype.Kd=function(a,g){var b=this.$c,c=this.bd,h=this.Ud-b,f=this.Vd-c,d=this.Id-b,m=this.Jd-c,e=a-b,k=g-c,l=h*h+f*f,n=h*d+f*m,f=h*e+f*k,v=d*d+m*m,p=d*e+m*k,q=1/(l*v-n*n),h=(v*f-n*p)*q,l=(l*p-n*f)*q;if(0<=h&&0<l&&1>h+l)return!0;h=this.Gd-b;f=this.Hd-c;l=h*h+f*f;n=h*d+f*m;f=h*e+f*k;q=1/(l*v-n*n);h=(v*f-n*p)*q;l=(l*p-n*f)*q;return 0<=h&&0<l&&1>h+l};c.prototype.pg=function(a,g){if(g)switch(a){case 0:return this.$c;case 1:return this.Ud;case 2:return this.Id;case 3:return this.Gd;
case 4:return this.$c;default:return this.$c}else switch(a){case 0:return this.bd;case 1:return this.Vd;case 2:return this.Jd;case 3:return this.Hd;case 4:return this.bd;default:return this.bd}};c.prototype.ri=function(){return(this.$c+this.Ud+this.Id+this.Gd)/4};c.prototype.si=function(){return(this.bd+this.Vd+this.Jd+this.Hd)/4};c.prototype.Hs=function(a){var g=a.ri(),b=a.si();if(this.Kd(g,b))return!0;g=this.ri();b=this.si();if(a.Kd(g,b))return!0;var c,h,f,d,m,e,k,l;for(k=0;4>k;k++)for(l=0;4>l;l++)if(g=
this.pg(k,!0),b=this.pg(k,!1),c=this.pg(k+1,!0),h=this.pg(k+1,!1),f=a.pg(l,!0),d=a.pg(l,!1),m=a.pg(l+1,!0),e=a.pg(l+1,!1),za(g,b,c,h,f,d,m,e))return!0;return!1};Ba=c;Da=function(a,g){for(var b in g)g.hasOwnProperty(b)&&(a[b]=g[b]);return a};Fa=function(a,g){var b,c;g=xa(g);if(!(0>g||g>=a.length)){b=g;for(c=a.length-1;b<c;b++)a[b]=a[b+1];Ha(a,c)}};Ha=function(a,g){a.length=g};E=function(a){Ha(a,0)};Ia=function(a,g){E(a);var b,c;b=0;for(c=g.length;b<c;++b)a[b]=g[b]};Ja=function(a,g){a.push.apply(a,
g)};Ka=function(a,g){var b,c;b=0;for(c=a.length;b<c;++b)if(a[b]===g)return b;return-1};Ma=function(a,g){var b=Ka(a,g);-1!==b&&Fa(a,b)};Na=function(a,g,b){return a<g?g:a>b?b:a};I=function(a){return a/(180/ua)};Pa=function(a){return 180/ua*a};Ra=function(a){a%=360;0>a&&(a+=360);return a};Sa=function(a){a%=2*ua;0>a&&(a+=2*ua);return a};Ta=function(a){return Ra(Pa(a))};Ua=function(a){return Sa(I(a))};Va=function(a,g,b,c){return Math.atan2(c-g,b-a)};Wa=function(a,g){if(a===g)return 0;var b=Math.sin(a),
c=Math.cos(a),h=Math.sin(g),f=Math.cos(g),b=b*h+c*f;return 1<=b?0:-1>=b?ua:Math.acos(b)};Xa=function(a,g,b){var c=Math.sin(a),h=Math.cos(a),f=Math.sin(g),d=Math.cos(g);return Math.acos(c*f+h*d)>b?0<h*f-c*d?Sa(a+b):Sa(a-b):Sa(g)};Ya=function(a,g){var b=Math.sin(a),c=Math.cos(a),h=Math.sin(g),f=Math.cos(g);return 0>=c*h-b*f};ab=function(a,g,b,c,h,f){if(0===b)return f?a:g;var d=Math.sin(b);b=Math.cos(b);a-=c;g-=h;var m=a*d;a=a*b-g*d;g=g*b+m;return f?a+c:g+h};bb=function(a,g,b,c){a=b-a;g=c-g;return Math.sqrt(a*
a+g*g)};gb=function(a,g){return!a!==!g};ib=function(a){for(var g in a)if(a.hasOwnProperty(g))return!0;return!1};jb=function(a){for(var g in a)a.hasOwnProperty(g)&&delete a[g]};var r=+new Date;mb=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()-r};var v=
!1,y=v=!1,A=!1;"undefined"!==typeof window&&(v=/chrome/i.test(navigator.userAgent)||/chromium/i.test(navigator.userAgent),v=!v&&/safari/i.test(navigator.userAgent),y=/(iphone|ipod|ipad)/i.test(navigator.userAgent),A=window.c2ejecta);var F=!v&&!A&&!y&&"undefined"!==typeof Set&&"undefined"!==typeof Set.prototype.forEach;e.prototype.contains=function(a){return this.gh()?!1:F?this.ec.has(a):this.items&&this.items.hasOwnProperty(a)};e.prototype.add=function(a){if(F)this.ec.has(a)||(this.ec.add(a),this.Vh=
!1);else{var g=a.toString(),b=this.items;b?b.hasOwnProperty(g)||(b[g]=a,this.vm++,this.Vh=!1):(this.items={},this.items[g]=a,this.vm=1,this.Vh=!1)}};e.prototype.remove=function(a){if(!this.gh())if(F)this.ec.has(a)&&(this.ec["delete"](a),this.Vh=!1);else if(this.items){a=a.toString();var g=this.items;g.hasOwnProperty(a)&&(delete g[a],this.vm--,this.Vh=!1)}};e.prototype.clear=function(){this.gh()||(F?this.ec.clear():(this.items=null,this.vm=0),E(this.ol),this.Vh=!0)};e.prototype.gh=function(){return 0===
this.count()};e.prototype.count=function(){return F?this.ec.size:this.vm};var D=null,G=0;e.prototype.zF=function(){if(!this.Vh){if(F)E(this.ol),D=this.ol,G=0,this.ec.forEach(d),D=null,G=0;else{var a=this.ol;E(a);var g,b=0,c=this.items;if(c)for(g in c)c.hasOwnProperty(g)&&(a[b++]=c[g])}this.Vh=!0}};e.prototype.Se=function(){this.zF();return this.ol};ea=e;new ea;tb=function(a,g){F?ub(a,g.ec):vb(a,g.Se())};ub=function(a,g){var b,c,h,f;c=b=0;for(h=a.length;b<h;++b)f=a[b],g.has(f)||(a[c++]=f);Ha(a,c)};
vb=function(a,g){var b,c,h,f;c=b=0;for(h=a.length;b<h;++b)f=a[b],-1===Ka(g,f)&&(a[c++]=f);Ha(a,c)};k.prototype.add=function(a){this.y=a-this.I;this.Aq=this.ib+this.y;this.I=this.Aq-this.ib-this.y;this.ib=this.Aq};k.prototype.reset=function(){this.ib=this.Aq=this.y=this.I=0};wb=k;xb=function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")};f.prototype.pn=function(a){this.$x=a;this.jf=a.length/2;this.zc.length=a.length;this.jo=this.ko=-1;this.Dv=0};f.prototype.ji=function(){return!this.$x.length};
f.prototype.Ua=function(){for(var a=this.zc,g=a[0],b=g,c=a[1],h=c,f,d,m=1,e=this.jf;m<e;++m)d=2*m,f=a[d],d=a[d+1],f<g&&(g=f),f>b&&(b=f),d<c&&(c=d),d>h&&(h=d);this.$n=g;this.ao=b;this.bo=c;this.Zn=h};f.prototype.Ii=function(a,g,b){this.zc.length=8;this.jf=4;var c=this.zc;c[0]=a.left-g;c[1]=a.top-b;c[2]=a.right-g;c[3]=a.top-b;c[4]=a.right-g;c[5]=a.bottom-b;c[6]=a.left-g;c[7]=a.bottom-b;this.ko=a.right-a.left;this.jo=a.bottom-a.top;this.Ua()};f.prototype.Qj=function(a,g,b,c,h){this.zc.length=8;this.jf=
4;var f=this.zc;f[0]=a.$c-g;f[1]=a.bd-b;f[2]=a.Ud-g;f[3]=a.Vd-b;f[4]=a.Id-g;f[5]=a.Jd-b;f[6]=a.Gd-g;f[7]=a.Hd-b;this.ko=c;this.jo=h;this.Ua()};f.prototype.xy=function(a){this.jf=a.jf;Ia(this.zc,a.zc);this.$n=a.$n;this.bo-a.bo;this.ao=a.ao;this.Zn=a.Zn};f.prototype.Uh=function(a,g,b){if(this.ko!==a||this.jo!==g||this.Dv!==b){this.ko=a;this.jo=g;this.Dv=b;var c,h,f,d,m,e=0,k=1,l=this.$x,n=this.zc;0!==b&&(e=Math.sin(b),k=Math.cos(b));b=0;for(f=this.jf;b<f;b++)c=2*b,h=c+1,d=l[c]*a,m=l[h]*g,n[c]=d*k-m*
e,n[h]=m*k+d*e;this.Ua()}};f.prototype.Kd=function(a,g){var b=this.zc;if(a===b[0]&&g===b[1])return!0;var c,h,f,d=this.jf,m=this.$n-110,e=this.bo-101,k=this.ao+131,l=this.Zn+120,n,v,p=0,q=0;for(c=0;c<d;c++)h=2*c,f=(c+1)%d*2,n=b[h],h=b[h+1],v=b[f],f=b[f+1],za(m,e,a,g,n,h,v,f)&&p++,za(k,l,a,g,n,h,v,f)&&q++;return 1===p%2||1===q%2};f.prototype.qj=function(a,g,b){var c=a.zc,h=this.zc;if(this.Kd(c[0]+g,c[1]+b)||a.Kd(h[0]-g,h[1]-b))return!0;var f,d,m,e,k,l,n,v,p,q,y,r;f=0;for(e=this.jf;f<e;f++)for(d=2*f,
m=(f+1)%e*2,v=h[d],d=h[d+1],p=h[m],q=h[m+1],m=0,n=a.jf;m<n;m++)if(k=2*m,l=(m+1)%n*2,y=c[k]+g,k=c[k+1]+b,r=c[l]+g,l=c[l+1]+b,za(v,d,p,q,y,k,r,l))return!0;return!1};yb=f;g.prototype.ei=function(a,g,b){var c;c=this.cells[a];return c?(c=c[g])?c:b?(c=l(this,a,g),this.cells[a][g]=c):null:b?(c=l(this,a,g),this.cells[a]={},this.cells[a][g]=c):null};g.prototype.ee=function(a){return xa(a/this.rr)};g.prototype.fe=function(a){return xa(a/this.qr)};g.prototype.update=function(a,g,b){var c,h,f,d,m;if(g)for(c=
g.left,h=g.right;c<=h;++c)for(f=g.top,d=g.bottom;f<=d;++f)if(!b||!b.Kd(c,f))if(m=this.ei(c,f,!1))m.remove(a),m.gh()&&(m.jd.clear(),1E3>z.length&&z.push(m),this.cells[c][f]=null);if(b)for(c=b.left,h=b.right;c<=h;++c)for(f=b.top,d=b.bottom;f<=d;++f)g&&g.Kd(c,f)||this.ei(c,f,!0).Fs(a)};g.prototype.bq=function(a,g){var b,c,h,f,d,m;b=this.ee(a.left);h=this.fe(a.top);c=this.ee(a.right);for(d=this.fe(a.bottom);b<=c;++b)for(f=h;f<=d;++f)(m=this.ei(b,f,!1))&&m.dump(g)};Bb=g;h.prototype.ei=function(a,g,b){var c;
c=this.cells[a];return c?(c=c[g])?c:b?(c=n(this,a,g),this.cells[a][g]=c):null:b?(c=n(this,a,g),this.cells[a]={},this.cells[a][g]=c):null};h.prototype.ee=function(a){return xa(a/this.rr)};h.prototype.fe=function(a){return xa(a/this.qr)};h.prototype.update=function(a,g,b){var c,h,f,d,m;if(g)for(c=g.left,h=g.right;c<=h;++c)for(f=g.top,d=g.bottom;f<=d;++f)if(!b||!b.Kd(c,f))if(m=this.ei(c,f,!1))m.remove(a),m.gh()&&(m.reset(),1E3>w.length&&w.push(m),this.cells[c][f]=null);if(b)for(c=b.left,h=b.right;c<=
h;++c)for(f=b.top,d=b.bottom;f<=d;++f)g&&g.Kd(c,f)||this.ei(c,f,!0).Fs(a)};h.prototype.bq=function(a,g,b,c,h){var f,d;a=this.ee(a);g=this.fe(g);b=this.ee(b);for(f=this.fe(c);a<=b;++a)for(c=g;c<=f;++c)(d=this.ei(a,c,!1))&&d.dump(h)};h.prototype.eE=function(a){var g,b,c,h,f;g=a.left;c=a.top;b=a.right;for(h=a.bottom;g<=b;++g)for(a=c;a<=h;++a)if(f=this.ei(g,a,!1))f.Dk=!1};Cb=h;var z=[];m.prototype.gh=function(){return this.jd.gh()};m.prototype.Fs=function(a){this.jd.add(a)};m.prototype.remove=function(a){this.jd.remove(a)};
m.prototype.dump=function(a){Ja(a,this.jd.Se())};da=m;var w=[];q.prototype.gh=function(){if(!this.jd.length)return!0;if(this.jd.length>this.Fg.count())return!1;this.Xr();return!0};q.prototype.Fs=function(a){this.Fg.contains(a)?(this.Fg.remove(a),this.Fg.gh()&&(this.Dl=!1)):this.jd.length?(this.jd[this.jd.length-1].Af()>a.Af()&&(this.Dk=!1),this.jd.push(a)):(this.jd.push(a),this.Dk=!0)};q.prototype.remove=function(a){this.Fg.add(a);this.Dl=!0;30<=this.Fg.count()&&this.Xr()};q.prototype.Xr=function(){this.Dl&&
(this.Fg.count()===this.jd.length?this.reset():(tb(this.jd,this.Fg),this.Fg.clear(),this.Dl=!1))};q.prototype.rC=function(){this.Dk||(this.jd.sort(p),this.Dk=!0)};q.prototype.reset=function(){E(this.jd);this.Dk=!0;this.Fg.clear();this.Dl=!1};q.prototype.dump=function(a){this.Xr();this.rC();this.jd.length&&a.push(this.jd)};fa=q;var B="lighter xor copy destination-over source-in destination-in source-out destination-out source-atop destination-atop".split(" ");Db=function(a){return 0>=a||11<=a?"source-over":
B[a-1]};Gb=function(a,g,b){if(b)switch(a.Rd=b.ONE,a.Ld=b.ONE_MINUS_SRC_ALPHA,g){case 1:a.Rd=b.ONE;a.Ld=b.ONE;break;case 3:a.Rd=b.ONE;a.Ld=b.ZERO;break;case 4:a.Rd=b.ONE_MINUS_DST_ALPHA;a.Ld=b.ONE;break;case 5:a.Rd=b.DST_ALPHA;a.Ld=b.ZERO;break;case 6:a.Rd=b.ZERO;a.Ld=b.SRC_ALPHA;break;case 7:a.Rd=b.ONE_MINUS_DST_ALPHA;a.Ld=b.ZERO;break;case 8:a.Rd=b.ZERO;a.Ld=b.ONE_MINUS_SRC_ALPHA;break;case 9:a.Rd=b.DST_ALPHA;a.Ld=b.ONE_MINUS_SRC_ALPHA;break;case 10:a.Rd=b.ONE_MINUS_DST_ALPHA,a.Ld=b.SRC_ALPHA}};
Hb=function(a){return Math.round(1E6*a)/1E6};Ib=function(a,g){return"string"!==typeof a||"string"!==typeof g||a.length!==g.length?!1:a===g?!0:a.toLowerCase()===g.toLowerCase()};Nb=function(a){a=a.target;return!a||a===document||a===window||document&&document.body&&a===document.body||Ib(a.tagName,"canvas")?!0:!1}})();var Yc="undefined"!==typeof Float32Array?Float32Array:Array;function $c(a){var c=new Yc(3);a&&(c[0]=a[0],c[1]=a[1],c[2]=a[2]);return c}
function bd(a){var c=new Yc(16);a&&(c[0]=a[0],c[1]=a[1],c[2]=a[2],c[3]=a[3],c[4]=a[4],c[5]=a[5],c[6]=a[6],c[7]=a[7],c[8]=a[8],c[9]=a[9],c[10]=a[10],c[11]=a[11],c[12]=a[12],c[13]=a[13],c[14]=a[14],c[15]=a[15]);return c}function cd(a,c){c[0]=a[0];c[1]=a[1];c[2]=a[2];c[3]=a[3];c[4]=a[4];c[5]=a[5];c[6]=a[6];c[7]=a[7];c[8]=a[8];c[9]=a[9];c[10]=a[10];c[11]=a[11];c[12]=a[12];c[13]=a[13];c[14]=a[14];c[15]=a[15]}
function dd(a,c){var b=c[0],e=c[1];c=c[2];a[0]*=b;a[1]*=b;a[2]*=b;a[3]*=b;a[4]*=e;a[5]*=e;a[6]*=e;a[7]*=e;a[8]*=c;a[9]*=c;a[10]*=c;a[11]*=c}
function ed(a,c,b,e){e||(e=bd());var d,k,f,g,h,l,m,n,q=a[0],p=a[1];a=a[2];k=b[0];f=b[1];d=b[2];b=c[1];l=c[2];q===c[0]&&p===b&&a===l?(a=e,a[0]=1,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=1,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=1,a[11]=0,a[12]=0,a[13]=0,a[14]=0,a[15]=1):(b=q-c[0],l=p-c[1],m=a-c[2],n=1/Math.sqrt(b*b+l*l+m*m),b*=n,l*=n,m*=n,c=f*m-d*l,d=d*b-k*m,k=k*l-f*b,(n=Math.sqrt(c*c+d*d+k*k))?(n=1/n,c*=n,d*=n,k*=n):k=d=c=0,f=l*k-m*d,g=m*c-b*k,h=b*d-l*c,(n=Math.sqrt(f*f+g*g+h*h))?(n=1/n,f*=n,g*=n,h*=n):h=g=f=0,
e[0]=c,e[1]=f,e[2]=b,e[3]=0,e[4]=d,e[5]=g,e[6]=l,e[7]=0,e[8]=k,e[9]=h,e[10]=m,e[11]=0,e[12]=-(c*q+d*p+k*a),e[13]=-(f*q+g*p+h*a),e[14]=-(b*q+l*p+m*a),e[15]=1)}
(function(){function a(a,b,c){this.hh=/msie/i.test(navigator.userAgent)||/trident/i.test(navigator.userAgent);this.height=this.width=0;this.Sb=!!c;this.bp=this.km=!1;this.Fr=0;this.Vq=1;this.Lu=1E3;this.FF=(this.Lu-this.Vq)/32768;this.nr=$c([0,0,100]);this.Uw=$c([0,0,0]);this.Wy=$c([0,1,0]);this.In=$c([1,1,1]);this.Tv=!0;this.Ap=bd();this.ff=bd();this.Ws=bd();this.Er=bd();this.za=a;this.version=0===this.za.getParameter(this.za.VERSION).indexOf("WebGL 2")?2:1;this.uw()}function c(a,b,c){this.za=a;
this.qn=b;this.name=c;this.Cf=a.getAttribLocation(b,"aPos");this.pi=a.getAttribLocation(b,"aTex");this.Sw=a.getUniformLocation(b,"matP");this.vp=a.getUniformLocation(b,"matMV");this.Mk=a.getUniformLocation(b,"opacity");this.lt=a.getUniformLocation(b,"colorFill");this.Tw=a.getUniformLocation(b,"samplerFront");this.Jm=a.getUniformLocation(b,"samplerBack");this.Cj=a.getUniformLocation(b,"destStart");this.Bj=a.getUniformLocation(b,"destEnd");this.Lm=a.getUniformLocation(b,"seconds");this.nt=a.getUniformLocation(b,
"pixelWidth");this.mt=a.getUniformLocation(b,"pixelHeight");this.Im=a.getUniformLocation(b,"layerScale");this.Hm=a.getUniformLocation(b,"layerAngle");this.Mm=a.getUniformLocation(b,"viewOrigin");this.Km=a.getUniformLocation(b,"scrollPos");this.ID=!!(this.nt||this.mt||this.Lm||this.Jm||this.Cj||this.Bj||this.Im||this.Hm||this.Mm||this.Km);this.bx=this.cx=-999;this.zp=1;this.Yw=this.Xw=0;this.$w=this.Ww=this.Vw=1;this.ix=this.hx=this.gx=this.kx=this.jx=this.Zw=0;this.Us=[];this.ax=bd();this.Mk&&a.uniform1f(this.Mk,
1);this.lt&&a.uniform4f(this.lt,1,1,1,1);this.Tw&&a.uniform1i(this.Tw,0);this.Jm&&a.uniform1i(this.Jm,1);this.Cj&&a.uniform2f(this.Cj,0,0);this.Bj&&a.uniform2f(this.Bj,1,1);this.Im&&a.uniform1f(this.Im,1);this.Hm&&a.uniform1f(this.Hm,0);this.Mm&&a.uniform2f(this.Mm,0,0);this.Km&&a.uniform2f(this.Km,0,0);this.Lm&&a.uniform1f(this.Lm,0);this.lj=!1}function b(a,b){return a[0]===b[0]&&a[1]===b[1]&&a[2]===b[2]&&a[3]===b[3]&&a[4]===b[4]&&a[5]===b[5]&&a[6]===b[6]&&a[7]===b[7]&&a[8]===b[8]&&a[9]===b[9]&&
a[10]===b[10]&&a[11]===b[11]&&a[12]===b[12]&&a[13]===b[13]&&a[14]===b[14]&&a[15]===b[15]}function e(a,b){this.type=a;this.ta=b;this.za=b.za;this.Bf=this.Sd=this.Ix=0;this.Xa=this.Mf=null;this.zy=[]}var d=bd();a.prototype.uw=function(){var a=this.za,b;this.Nw=1;this.uj=this.li=null;this.so=1;a.clearColor(0,0,0,0);a.clear(a.COLOR_BUFFER_BIT);a.enable(a.BLEND);a.blendFunc(a.ONE,a.ONE_MINUS_SRC_ALPHA);a.disable(a.CULL_FACE);a.disable(a.STENCIL_TEST);a.disable(a.DITHER);this.Sb?(a.enable(a.DEPTH_TEST),
a.depthFunc(a.LEQUAL)):a.disable(a.DEPTH_TEST);this.Ow=a.ONE;this.Mw=a.ONE_MINUS_SRC_ALPHA;this.Qq=new Float32Array(8E3*(this.Sb?3:2));this.Bq=new Float32Array(16E3);this.Lt=new Float32Array(32E3);this.Kt=a.createBuffer();a.bindBuffer(a.ARRAY_BUFFER,this.Kt);a.bufferData(a.ARRAY_BUFFER,this.Lt.byteLength,a.DYNAMIC_DRAW);this.Hn=Array(4);this.yn=Array(4);for(b=0;4>b;b++)this.Hn[b]=a.createBuffer(),a.bindBuffer(a.ARRAY_BUFFER,this.Hn[b]),a.bufferData(a.ARRAY_BUFFER,this.Qq.byteLength,a.DYNAMIC_DRAW),
this.yn[b]=a.createBuffer(),a.bindBuffer(a.ARRAY_BUFFER,this.yn[b]),a.bufferData(a.ARRAY_BUFFER,this.Bq.byteLength,a.DYNAMIC_DRAW);this.Vg=0;this.LD=a.createBuffer();a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.LD);for(var c=new Uint16Array(12E3),f=b=0;12E3>b;)c[b++]=f,c[b++]=f+1,c[b++]=f+2,c[b++]=f,c[b++]=f+2,c[b++]=f+3,f+=4;a.bufferData(a.ELEMENT_ARRAY_BUFFER,c,a.STATIC_DRAW);this.$k=this.jl=this.Hh=0;this.pc=[];b=this.Sb?"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.Jl({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}"},b,"<default>");this.pc.push(c);c=this.Jl({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}","<point>");this.pc.push(c);c=this.Jl({src:"varying mediump vec2 vTex;\nuniform lowp sampler2D samplerFront;\nvoid main(void) {\n\tif (texture2D(samplerFront, vTex).a < 1.0)\n\t\tdiscard;\n}"},b,"<earlyz>");this.pc.push(c);c=this.Jl({src:"uniform lowp vec4 colorFill;\nvoid main(void) {\n\tgl_FragColor = colorFill;\n}"},
b,"<fill>");this.pc.push(c);for(var d in fd)fd.hasOwnProperty(d)&&this.pc.push(this.Jl(fd[d],b,d));a.activeTexture(a.TEXTURE0);a.bindTexture(a.TEXTURE_2D,null);this.Ug=[];this.qg=0;this.Nd=this.wd=!1;this.Ov=this.zm=-1;this.lk=null;this.Vr=a.createFramebuffer();this.xo=this.dq=null;this.xv=!1;this.Sb&&(this.xo=a.createRenderbuffer());this.Li=$c([0,0,0]);a=a.getParameter(a.ALIASED_POINT_SIZE_RANGE);this.hE=a[0];this.ut=a[1];2048<this.ut&&(this.ut=2048);this.xe(0)};c.prototype.Cu=function(a){b(this.ax,
a)||(cd(a,this.ax),this.za.uniformMatrix4fv(this.vp,!1,a))};a.prototype.Jl=function(a,b,f){var d=this.za,e=d.createShader(d.FRAGMENT_SHADER);d.shaderSource(e,a.src);d.compileShader(e);if(!d.getShaderParameter(e,d.COMPILE_STATUS))throw a=d.getShaderInfoLog(e),d.deleteShader(e),Error("error compiling fragment shader: "+a);var k=d.createShader(d.VERTEX_SHADER);d.shaderSource(k,b);d.compileShader(k);if(!d.getShaderParameter(k,d.COMPILE_STATUS))throw a=d.getShaderInfoLog(k),d.deleteShader(e),d.deleteShader(k),
Error("error compiling vertex shader: "+a);b=d.createProgram();d.attachShader(b,e);d.attachShader(b,k);d.linkProgram(b);if(!d.getProgramParameter(b,d.LINK_STATUS))throw a=d.getProgramInfoLog(b),d.deleteShader(e),d.deleteShader(k),d.deleteProgram(b),Error("error linking shader program: "+a);d.useProgram(b);d.deleteShader(e);d.deleteShader(k);e=new c(d,b,f);e.Tr=a.Tr||0;e.Ur=a.Ur||0;e.Mv=!!a.Mv;e.$f=!!a.$f;e.vv=!!a.vv;e.Ya=a.Ya||[];a=0;for(k=e.Ya.length;a<k;a++)e.Ya[a][1]=d.getUniformLocation(b,e.Ya[a][0]),
e.Us.push(0),d.uniform1f(e.Ya[a][1],0);return e};a.prototype.ns=function(a){var b,c;b=0;for(c=this.pc.length;b<c;b++)if(this.pc[b].name===a)return b;return-1};a.prototype.Zx=function(a,b,c){var f=this.ff,d=this.Ap,e=[0,0,0,0,0,0,0,0];e[0]=f[0]*a+f[4]*b+f[12];e[1]=f[1]*a+f[5]*b+f[13];e[2]=f[2]*a+f[6]*b+f[14];e[3]=f[3]*a+f[7]*b+f[15];e[4]=d[0]*e[0]+d[4]*e[1]+d[8]*e[2]+d[12]*e[3];e[5]=d[1]*e[0]+d[5]*e[1]+d[9]*e[2]+d[13]*e[3];e[6]=d[2]*e[0]+d[6]*e[1]+d[10]*e[2]+d[14]*e[3];e[7]=-e[2];0!==e[7]&&(e[7]=1/
e[7],e[4]*=e[7],e[5]*=e[7],e[6]*=e[7],c[0]=(.5*e[4]+.5)*this.width,c[1]=(.5*e[5]+.5)*this.height)};a.prototype.zh=function(a,b,c){if(this.width!==a||this.height!==b||c){this.Zg();c=this.za;this.width=a;this.height=b;c.viewport(0,0,a,b);ed(this.nr,this.Uw,this.Wy,this.ff);if(this.Sb){var f=-a/2;a=a/2;var d=b/2;b=-b/2;var e=this.Vq,k=this.Lu,u=this.Ap;u||(u=bd());var t=a-f,r=b-d,v=k-e;u[0]=2/t;u[1]=0;u[2]=0;u[3]=0;u[4]=0;u[5]=2/r;u[6]=0;u[7]=0;u[8]=0;u[9]=0;u[10]=-2/v;u[11]=0;u[12]=-(f+a)/t;u[13]=-(b+
d)/r;u[14]=-(k+e)/v;u[15]=1;this.In[0]=1;this.In[1]=1}else b=a/b,f=this.Vq,a=this.Lu,u=this.Ap,k=f*Math.tan(45*Math.PI/360),b*=k,d=-b,e=-k,u||(u=bd()),t=b-d,r=k-e,v=a-f,u[0]=2*f/t,u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=2*f/r,u[6]=0,u[7]=0,u[8]=(b+d)/t,u[9]=(k+e)/r,u[10]=-(a+f)/v,u[11]=-1,u[12]=0,u[13]=0,u[14]=-(a*f*2)/v,u[15]=0,f=[0,0],a=[0,0],this.Zx(0,0,f),this.Zx(1,1,a),this.In[0]=1/(a[0]-f[0]),this.In[1]=-1/(a[1]-f[1]);f=0;for(a=this.pc.length;f<a;f++)d=this.pc[f],d.lj=!1,d.Sw&&(c.useProgram(d.qn),
c.uniformMatrix4fv(d.Sw,!1,this.Ap));c.useProgram(this.pc[this.zm].qn);c.bindTexture(c.TEXTURE_2D,null);c.activeTexture(c.TEXTURE1);c.bindTexture(c.TEXTURE_2D,null);c.activeTexture(c.TEXTURE0);this.uj=this.li=null;this.xo&&(c.bindFramebuffer(c.FRAMEBUFFER,this.Vr),c.bindRenderbuffer(c.RENDERBUFFER,this.xo),c.renderbufferStorage(c.RENDERBUFFER,c.DEPTH_COMPONENT16,this.width,this.height),this.xv||(c.framebufferRenderbuffer(c.FRAMEBUFFER,c.DEPTH_ATTACHMENT,c.RENDERBUFFER,this.xo),this.xv=!0),c.bindRenderbuffer(c.RENDERBUFFER,
null),c.bindFramebuffer(c.FRAMEBUFFER,null),this.dq=null)}};a.prototype.Jf=function(){ed(this.nr,this.Uw,this.Wy,this.ff);dd(this.ff,this.In)};a.prototype.translate=function(a,b){if(0!==a||0!==b){this.Li[0]=a;this.Li[1]=b;this.Li[2]=0;var c=this.ff,f=this.Li,d=f[0],e=f[1],f=f[2];c[12]=c[0]*d+c[4]*e+c[8]*f+c[12];c[13]=c[1]*d+c[5]*e+c[9]*f+c[13];c[14]=c[2]*d+c[6]*e+c[10]*f+c[14];c[15]=c[3]*d+c[7]*e+c[11]*f+c[15]}};a.prototype.scale=function(a,b){if(1!==a||1!==b)this.Li[0]=a,this.Li[1]=b,this.Li[2]=
1,dd(this.ff,this.Li)};a.prototype.jq=function(a){if(0!==a){var b=this.ff,c,f=Math.sin(a);a=Math.cos(a);var d=b[0],e=b[1],k=b[2],u=b[3],t=b[4],r=b[5],v=b[6],y=b[7];c?b!==c&&(c[8]=b[8],c[9]=b[9],c[10]=b[10],c[11]=b[11],c[12]=b[12],c[13]=b[13],c[14]=b[14],c[15]=b[15]):c=b;c[0]=d*a+t*f;c[1]=e*a+r*f;c[2]=k*a+v*f;c[3]=u*a+y*f;c[4]=d*-f+t*a;c[5]=e*-f+r*a;c[6]=k*-f+v*a;c[7]=u*-f+y*a}};a.prototype.nf=function(){if(!b(this.Ws,this.ff)){var a=this.te();a.type=5;a.Xa?cd(this.ff,a.Xa):a.Xa=bd(this.ff);cd(this.ff,
this.Ws);this.Nd=this.wd=!1}};a.prototype.pq=function(a){this.Sb&&(32760<a&&(a=32760),this.Fr=this.nr[2]-this.Vq-a*this.FF)};e.prototype.bC=function(){var a=this.za,b=this.ta;0!==this.Sd?(a.depthMask(!0),a.colorMask(!1,!1,!1,!1),a.disable(a.BLEND),a.bindFramebuffer(a.FRAMEBUFFER,b.Vr),a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,null,0),a.clear(a.DEPTH_BUFFER_BIT),a.bindFramebuffer(a.FRAMEBUFFER,null),b.bp=!0):(a.depthMask(!1),a.colorMask(!0,!0,!0,!0),a.enable(a.BLEND),b.bp=
!1)};e.prototype.fC=function(){this.za.bindTexture(this.za.TEXTURE_2D,this.Mf)};e.prototype.gC=function(){var a=this.za;a.activeTexture(a.TEXTURE1);a.bindTexture(a.TEXTURE_2D,this.Mf);a.activeTexture(a.TEXTURE0)};e.prototype.cC=function(){var a=this.Ix,b=this.ta;b.so=a;b=b.lk;b.Mk&&b.zp!==a&&(b.zp=a,this.za.uniform1f(b.Mk,a))};e.prototype.XB=function(){this.za.drawElements(this.za.TRIANGLES,this.Bf,this.za.UNSIGNED_SHORT,this.Sd)};e.prototype.ZB=function(){this.za.blendFunc(this.Sd,this.Bf)};e.prototype.hC=
function(){var a,b,c,f=this.ta.pc,d=this.ta.Ov;a=0;for(b=f.length;a<b;a++)c=f[a],a===d&&c.vp?(c.Cu(this.Xa),c.lj=!0):c.lj=!1;cd(this.Xa,this.ta.Er)};e.prototype.YB=function(){var a=this.za,b=this.ta;this.Mf?(b.uj===this.Mf&&(a.activeTexture(a.TEXTURE1),a.bindTexture(a.TEXTURE_2D,null),b.uj=null,a.activeTexture(a.TEXTURE0)),a.bindFramebuffer(a.FRAMEBUFFER,b.Vr),b.bp||a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,this.Mf,0)):(b.Sb||a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,
a.TEXTURE_2D,null,0),a.bindFramebuffer(a.FRAMEBUFFER,null))};e.prototype.QB=function(){var a=this.za,b=this.Sd;0===b?(a.clearColor(this.Xa[0],this.Xa[1],this.Xa[2],this.Xa[3]),a.clear(a.COLOR_BUFFER_BIT)):1===b?(a.enable(a.SCISSOR_TEST),a.scissor(this.Xa[0],this.Xa[1],this.Xa[2],this.Xa[3]),a.clearColor(0,0,0,0),a.clear(a.COLOR_BUFFER_BIT),a.disable(a.SCISSOR_TEST)):a.clear(a.DEPTH_BUFFER_BIT)};e.prototype.aC=function(){var a=this.za;0!==this.Sd?a.enable(a.DEPTH_TEST):a.disable(a.DEPTH_TEST)};e.prototype.WB=
function(){var a=this.za,b=this.ta;b.Sb&&a.disable(a.DEPTH_TEST);var c=b.pc[1];a.useProgram(c.qn);!c.lj&&c.vp&&(c.Cu(b.Er),c.lj=!0);a.enableVertexAttribArray(c.Cf);a.bindBuffer(a.ARRAY_BUFFER,b.Kt);a.vertexAttribPointer(c.Cf,4,a.FLOAT,!1,0,0);a.drawArrays(a.POINTS,this.Sd/4,this.Bf);c=b.lk;a.useProgram(c.qn);0<=c.Cf&&(a.enableVertexAttribArray(c.Cf),a.bindBuffer(a.ARRAY_BUFFER,b.Hn[b.Vg]),a.vertexAttribPointer(c.Cf,b.Sb?3:2,a.FLOAT,!1,0,0));0<=c.pi&&(a.enableVertexAttribArray(c.pi),a.bindBuffer(a.ARRAY_BUFFER,
b.yn[b.Vg]),a.vertexAttribPointer(c.pi,2,a.FLOAT,!1,0,0));b.Sb&&a.enable(a.DEPTH_TEST)};e.prototype.dC=function(){var a=this.za,b=this.ta,c=b.pc[this.Sd];b.Ov=this.Sd;b.lk=c;a.useProgram(c.qn);!c.lj&&c.vp&&(c.Cu(b.Er),c.lj=!0);c.Mk&&c.zp!==b.so&&(c.zp=b.so,a.uniform1f(c.Mk,b.so));0<=c.Cf&&(a.enableVertexAttribArray(c.Cf),a.bindBuffer(a.ARRAY_BUFFER,b.Hn[b.Vg]),a.vertexAttribPointer(c.Cf,b.Sb?3:2,a.FLOAT,!1,0,0));0<=c.pi&&(a.enableVertexAttribArray(c.pi),a.bindBuffer(a.ARRAY_BUFFER,b.yn[b.Vg]),a.vertexAttribPointer(c.pi,
2,a.FLOAT,!1,0,0))};e.prototype.$B=function(){var a=this.Xa;this.za.uniform4f(this.ta.lk.lt,a[0],a[1],a[2],a[3])};e.prototype.eC=function(){var a,b,c=this.ta.lk,f=this.za;a=this.Xa;c.Jm&&this.ta.uj!==this.Mf&&(f.activeTexture(f.TEXTURE1),f.bindTexture(f.TEXTURE_2D,this.Mf),this.ta.uj=this.Mf,f.activeTexture(f.TEXTURE0));var d=a[0];c.nt&&d!==c.cx&&(c.cx=d,f.uniform1f(c.nt,d));d=a[1];c.mt&&d!==c.bx&&(c.bx=d,f.uniform1f(c.mt,d));d=a[2];b=a[3];!c.Cj||d===c.Xw&&b===c.Yw||(c.Xw=d,c.Yw=b,f.uniform2f(c.Cj,
d,b));d=a[4];b=a[5];!c.Bj||d===c.Vw&&b===c.Ww||(c.Vw=d,c.Ww=b,f.uniform2f(c.Bj,d,b));d=a[6];c.Im&&d!==c.$w&&(c.$w=d,f.uniform1f(c.Im,d));d=a[7];c.Hm&&d!==c.Zw&&(c.Zw=d,f.uniform1f(c.Hm,d));d=a[8];b=a[9];!c.Mm||d===c.jx&&b===c.kx||(c.jx=d,c.kx=b,f.uniform2f(c.Mm,d,b));d=a[10];b=a[11];!c.Km||d===c.gx&&b===c.hx||(c.gx=d,c.hx=b,f.uniform2f(c.Km,d,b));d=a[12];c.Lm&&d!==c.ix&&(c.ix=d,f.uniform1f(c.Lm,d));if(c.Ya.length)for(a=0,b=c.Ya.length;a<b;a++)d=this.zy[a],d!==c.Us[a]&&(c.Us[a]=d,f.uniform1f(c.Ya[a][1],
d))};a.prototype.te=function(){this.qg===this.Ug.length&&this.Ug.push(new e(0,this));return this.Ug[this.qg++]};a.prototype.Zg=function(){if(0!==this.qg&&!this.za.isContextLost()){var a=this.za;0<this.$k&&(a.bindBuffer(a.ARRAY_BUFFER,this.Kt),a.bufferSubData(a.ARRAY_BUFFER,0,this.Lt.subarray(0,this.$k)),b&&0<=b.Cf&&"<point>"===b.name&&a.vertexAttribPointer(b.Cf,4,a.FLOAT,!1,0,0));if(0<this.Hh){var b=this.lk;a.bindBuffer(a.ARRAY_BUFFER,this.Hn[this.Vg]);a.bufferSubData(a.ARRAY_BUFFER,0,this.Qq.subarray(0,
this.Hh));b&&0<=b.Cf&&"<point>"!==b.name&&a.vertexAttribPointer(b.Cf,this.Sb?3:2,a.FLOAT,!1,0,0);a.bindBuffer(a.ARRAY_BUFFER,this.yn[this.Vg]);a.bufferSubData(a.ARRAY_BUFFER,0,this.Bq.subarray(0,this.jl));b&&0<=b.pi&&"<point>"!==b.name&&a.vertexAttribPointer(b.pi,2,a.FLOAT,!1,0,0)}for(var c,a=0,b=this.qg;a<b;a++)switch(c=this.Ug[a],c.type){case 1:c.XB();break;case 2:c.fC();break;case 3:c.cC();break;case 4:c.ZB();break;case 5:c.hC();break;case 6:c.YB();break;case 7:c.QB();break;case 8:c.WB();break;
case 9:c.dC();break;case 10:c.eC();break;case 11:c.gC();break;case 12:c.$B();break;case 13:c.aC();break;case 14:c.bC()}this.$k=this.jl=this.Hh=this.qg=0;this.bp=this.Nd=this.wd=!1;this.Vg++;4<=this.Vg&&(this.Vg=0)}};a.prototype.Hi=function(a){if(a!==this.Nw&&!this.km){var b=this.te();b.type=3;this.Nw=b.Ix=a;this.Nd=this.wd=!1}};a.prototype.we=function(a){if(a!==this.li){var b=this.te();b.type=2;this.li=b.Mf=a;this.Nd=this.wd=!1}};a.prototype.Gi=function(a,b){if((a!==this.Ow||b!==this.Mw)&&!this.km){var c=
this.te();c.type=4;c.Sd=a;c.Bf=b;this.Ow=a;this.Mw=b;this.Nd=this.wd=!1}};a.prototype.jy=function(){this.Gi(this.za.ONE,this.za.ONE_MINUS_SRC_ALPHA)};a.prototype.bl=function(a,b,c,f,d,e,k,u){15992<=this.Hh&&this.Zg();var t=this.Hh,r=this.jl,v=this.Qq,y=this.Bq,A=this.Fr;if(this.wd)this.Ug[this.qg-1].Bf+=6;else{var F=this.te();F.type=1;F.Sd=this.Sb?t:t/2*3;F.Bf=6;this.wd=!0;this.Nd=!1}this.Sb?(v[t++]=a,v[t++]=b,v[t++]=A,v[t++]=c,v[t++]=f,v[t++]=A,v[t++]=d,v[t++]=e,v[t++]=A,v[t++]=k,v[t++]=u,v[t++]=
A):(v[t++]=a,v[t++]=b,v[t++]=c,v[t++]=f,v[t++]=d,v[t++]=e,v[t++]=k,v[t++]=u);y[r++]=0;y[r++]=0;y[r++]=1;y[r++]=0;y[r++]=1;y[r++]=1;y[r++]=0;y[r++]=1;this.Hh=t;this.jl=r};a.prototype.Gg=function(a,b,c,f,d,e,k,u,t){15992<=this.Hh&&this.Zg();var r=this.Hh,v=this.jl,y=this.Qq,A=this.Bq,F=this.Fr;if(this.wd)this.Ug[this.qg-1].Bf+=6;else{var D=this.te();D.type=1;D.Sd=this.Sb?r:r/2*3;D.Bf=6;this.wd=!0;this.Nd=!1}var D=t.left,G=t.top,z=t.right;t=t.bottom;this.Sb?(y[r++]=a,y[r++]=b,y[r++]=F,y[r++]=c,y[r++]=
f,y[r++]=F,y[r++]=d,y[r++]=e,y[r++]=F,y[r++]=k,y[r++]=u,y[r++]=F):(y[r++]=a,y[r++]=b,y[r++]=c,y[r++]=f,y[r++]=d,y[r++]=e,y[r++]=k,y[r++]=u);A[v++]=D;A[v++]=G;A[v++]=z;A[v++]=G;A[v++]=z;A[v++]=t;A[v++]=D;A[v++]=t;this.Hh=r;this.jl=v};a.prototype.EE=function(a,b,c,f){7996<=this.$k&&this.Zg();var d=this.$k,e=this.Lt;if(this.Nd)this.Ug[this.qg-1].Bf++;else{var k=this.te();k.type=8;k.Sd=d;k.Bf=1;this.Nd=!0;this.wd=!1}e[d++]=a;e[d++]=b;e[d++]=c;e[d++]=f;this.$k=d};a.prototype.xe=function(a){if(this.zm!==
a){if(!this.pc[a]){if(0===this.zm)return;a=0}var b=this.te();b.type=9;this.zm=b.Sd=a;this.Nd=this.wd=!1}};a.prototype.cn=function(a){a=this.pc[a];return!(!a.Cj&&!a.Bj)};a.prototype.Ot=function(a){a=this.pc[a];return!!(a.Cj||a.Bj||a.Mv)};a.prototype.Nt=function(a){return this.pc[a].$f};a.prototype.LE=function(a){a=this.pc[a];return 0!==a.Tr||0!==a.Ur};a.prototype.qD=function(a){return this.pc[a].Tr};a.prototype.rD=function(a){return this.pc[a].Ur};a.prototype.sD=function(a,b){return this.pc[a].Ya[b][2]};
a.prototype.Zp=function(a){return this.pc[a].vv};a.prototype.el=function(a,b,c,f,d,e,k,u,t,r,v,y,A,F,D){var G=this.pc[this.zm],z,w;if(G.ID||D.length){z=this.te();z.type=10;z.Xa?cd(this.ff,z.Xa):z.Xa=bd();w=z.Xa;w[0]=b;w[1]=c;w[2]=f;w[3]=d;w[4]=e;w[5]=k;w[6]=u;w[7]=t;w[8]=r;w[9]=v;w[10]=y;w[11]=A;w[12]=F;G.Jm?z.Mf=a:z.Mf=null;if(D.length)for(c=z.zy,c.length=D.length,a=0,b=D.length;a<b;a++)c[a]=D[a];this.Nd=this.wd=!1}};a.prototype.clear=function(a,b,c,f){var d=this.te();d.type=7;d.Sd=0;d.Xa||(d.Xa=
bd());d.Xa[0]=a;d.Xa[1]=b;d.Xa[2]=c;d.Xa[3]=f;this.Nd=this.wd=!1};a.prototype.clearRect=function(a,b,c,f){if(!(0>c||0>f)){var d=this.te();d.type=7;d.Sd=1;d.Xa||(d.Xa=bd());d.Xa[0]=a;d.Xa[1]=b;d.Xa[2]=c;d.Xa[3]=f;this.Nd=this.wd=!1}};a.prototype.ny=function(a){if(this.Sb&&(a=!!a,this.km!==a)){var b=this.te();b.type=14;b.Sd=a?1:0;this.Nd=this.wd=!1;this.km=a;this.dq=null;this.km?this.xe(2):this.xe(0)}};a.prototype.my=function(a){if(this.Sb){var b=this.te();b.type=13;b.Sd=a?1:0;this.Nd=this.wd=!1}};
a.prototype.fw=function(){cd(this.Ws,d);this.Jf();this.nf();var a=this.width/2,b=this.height/2;this.bl(-a,b,a,b,a,-b,-a,-b);cd(d,this.ff);this.nf()};a.prototype.ky=function(a,b,c){this.xe(3);var f=this.te();f.type=12;f.Xa||(f.Xa=bd());f.Xa[0]=a;f.Xa[1]=b;f.Xa[2]=c;f.Xa[3]=1;this.Nd=this.wd=!1};a.prototype.gF=function(){this.xe(0)};a.prototype.TE=function(){this.xe(2)};a.prototype.KE=function(){this.Zg();this.za.flush()};var k=[],f={};a.prototype.GB=function(){E(k);f={}};a.prototype.Lk=function(a,
b,c,d){b=!!b;c=!!c;var e=a.src+","+b+","+c+(b?",undefined":""),q=null;if("undefined"!==typeof a.src&&f.hasOwnProperty(e))return q=f[e],q.ho++,q;this.Zg();var p=this.za,u=pa(a.width)&&pa(a.height),q=p.createTexture();p.bindTexture(p.TEXTURE_2D,q);p.pixelStorei(p.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0);var t=p.RGBA,r=p.RGBA,v=p.UNSIGNED_BYTE;if(d&&!this.hh)switch(d){case 1:r=t=p.RGB;break;case 2:v=p.UNSIGNED_SHORT_4_4_4_4;break;case 3:v=p.UNSIGNED_SHORT_5_5_5_1;break;case 4:r=t=p.RGB,v=p.UNSIGNED_SHORT_5_6_5}if(1===
this.version&&!u&&b){d=document.createElement("canvas");d.width=qa(a.width);d.height=qa(a.height);var y=d.getContext("2d");"undefined"!==typeof y.imageSmoothingEnabled?y.imageSmoothingEnabled=c:(y.webkitImageSmoothingEnabled=c,y.mozImageSmoothingEnabled=c,y.msImageSmoothingEnabled=c);y.drawImage(a,0,0,a.width,a.height,0,0,d.width,d.height);p.texImage2D(p.TEXTURE_2D,0,t,r,v,d)}else p.texImage2D(p.TEXTURE_2D,0,t,r,v,a);b?(p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_S,p.REPEAT),p.texParameteri(p.TEXTURE_2D,
p.TEXTURE_WRAP_T,p.REPEAT)):(p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_S,p.CLAMP_TO_EDGE),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_T,p.CLAMP_TO_EDGE));c?(p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MAG_FILTER,p.LINEAR),(u||2<=this.version)&&this.Tv?(p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MIN_FILTER,p.LINEAR_MIPMAP_LINEAR),p.generateMipmap(p.TEXTURE_2D)):p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MIN_FILTER,p.LINEAR)):(p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MAG_FILTER,p.NEAREST),p.texParameteri(p.TEXTURE_2D,
p.TEXTURE_MIN_FILTER,p.NEAREST));p.bindTexture(p.TEXTURE_2D,null);this.li=null;q.Yi=a.width;q.Xi=a.height;q.ho=1;q.Cv=e;k.push(q);return f[e]=q};a.prototype.We=function(a,b,c,f){this.Zg();var d=this.za;this.hh&&(f=!1);var e=d.createTexture();d.bindTexture(d.TEXTURE_2D,e);d.texImage2D(d.TEXTURE_2D,0,d.RGBA,a,b,0,d.RGBA,f?d.UNSIGNED_SHORT_4_4_4_4:d.UNSIGNED_BYTE,null);d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_S,d.CLAMP_TO_EDGE);d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_T,d.CLAMP_TO_EDGE);d.texParameteri(d.TEXTURE_2D,
d.TEXTURE_MAG_FILTER,c?d.LINEAR:d.NEAREST);d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,c?d.LINEAR:d.NEAREST);d.bindTexture(d.TEXTURE_2D,null);this.li=null;e.Yi=a;e.Xi=b;k.push(e);return e};a.prototype.DF=function(a,b,c){this.Zg();var d=this.za;this.hh&&(c=!1);d.bindTexture(d.TEXTURE_2D,b);d.pixelStorei(d.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0);try{d.texImage2D(d.TEXTURE_2D,0,d.RGBA,d.RGBA,c?d.UNSIGNED_SHORT_4_4_4_4:d.UNSIGNED_BYTE,a)}catch(f){console&&console.error&&console.error("Error updating WebGL texture: ",
f)}d.bindTexture(d.TEXTURE_2D,null);this.li=null};a.prototype.deleteTexture=function(a){a&&("undefined"!==typeof a.ho&&1<a.ho?a.ho--:(this.Zg(),a===this.li&&(this.za.bindTexture(this.za.TEXTURE_2D,null),this.li=null),a===this.uj&&(this.za.activeTexture(this.za.TEXTURE1),this.za.bindTexture(this.za.TEXTURE_2D,null),this.za.activeTexture(this.za.TEXTURE0),this.uj=null),Ma(k,a),"undefined"!==typeof a.Cv&&delete f[a.Cv],this.za.deleteTexture(a)))};a.prototype.Kf=function(a){if(a!==this.dq){var b=this.te();
b.type=6;this.dq=b.Mf=a;this.Nd=this.wd=!1}};Qb=a})();
(function(){function a(a){if(a&&(a.getContext||a.dc)&&!a.c2runtime){a.c2runtime=this;var b=this;this.cf=(this.dp=/crosswalk/i.test(navigator.userAgent)||/xwalk/i.test(navigator.userAgent)||!("undefined"===typeof window.c2isCrosswalk||!window.c2isCrosswalk))||"undefined"!==typeof window.device&&("undefined"!==typeof window.device.cordova||"undefined"!==typeof window.device.phonegap)||"undefined"!==typeof window.c2iscordova&&window.c2iscordova;this.fd=!!a.dc;this.Cw="undefined"!==typeof window.AppMobi||
this.fd;this.Od=!!window.c2cocoonjs;this.Xf=!!window.c2ejecta;this.Od&&(CocoonJS.App.onSuspended.addEventListener(function(){b.setSuspended(!0)}),CocoonJS.App.onActivated.addEventListener(function(){b.setSuspended(!1)}));this.Xf&&(document.addEventListener("pagehide",function(){b.setSuspended(!0)}),document.addEventListener("pageshow",function(){b.setSuspended(!1)}),document.addEventListener("resize",function(){b.setSize(window.innerWidth,window.innerHeight)}));this.Kb=this.fd||this.Od||this.Xf;this.mm=
/edge\//i.test(navigator.userAgent);this.hh=(/msie/i.test(navigator.userAgent)||/trident/i.test(navigator.userAgent)||/iemobile/i.test(navigator.userAgent))&&!this.mm;this.Gw=/tizen/i.test(navigator.userAgent);this.jm=/android/i.test(navigator.userAgent)&&!this.Gw&&!this.hh&&!this.mm;this.Kw=(/iphone/i.test(navigator.userAgent)||/ipod/i.test(navigator.userAgent))&&!this.hh&&!this.mm;this.YD=/ipad/i.test(navigator.userAgent);this.Fk=this.Kw||this.YD||this.Xf;this.Js=(/chrome/i.test(navigator.userAgent)||
/chromium/i.test(navigator.userAgent))&&!this.hh&&!this.mm;this.Bw=/amazonwebappplatform/i.test(navigator.userAgent);this.OD=/firefox/i.test(navigator.userAgent);this.SD=/safari/i.test(navigator.userAgent)&&!this.Js&&!this.hh&&!this.mm;this.UD=/windows/i.test(navigator.userAgent);this.ep="undefined"!==typeof window.c2nodewebkit||"undefined"!==typeof window.c2nwjs||/nodewebkit/i.test(navigator.userAgent)||/nwjs/i.test(navigator.userAgent);this.Iw=!("undefined"===typeof window.c2isWindows8||!window.c2isWindows8);
this.WD=!("undefined"===typeof window.c2isWindows8Capable||!window.c2isWindows8Capable);this.hi=!("undefined"===typeof window.c2isWindowsPhone8||!window.c2isWindowsPhone8);this.Ps=!("undefined"===typeof window.c2isWindowsPhone81||!window.c2isWindowsPhone81);this.fp=!!window.cr_windows10;this.Hw=this.Iw||this.WD||this.Ps||this.fp;this.ND=!("undefined"===typeof window.c2isBlackberry10||!window.c2isBlackberry10);this.$o=this.jm&&!this.Js&&!this.dp&&!this.OD&&!this.Bw&&!this.Kb;this.devicePixelRatio=
1;this.ih=this.cf||this.dp||this.Cw||this.Od||this.jm||this.Fk||this.hi||this.Ps||this.ND||this.Gw||this.Xf;this.ih||(this.ih=/(blackberry|bb10|playbook|palm|symbian|nokia|windows\s+ce|phone|mobile|tablet|kindle|silk)/i.test(navigator.userAgent));this.rm=!!(this.Fk&&this.cf&&window.webkit);"undefined"===typeof cr_is_preview||this.ep||"?nw"!==window.location.search&&!/nodewebkit/i.test(navigator.userAgent)&&!/nwjs/i.test(navigator.userAgent)||(this.ep=!0);this.canvas=a;this.Gv=document.getElementById("c2canvasdiv");
this.ta=this.za=null;this.qs="(unavailable)";this.Sb=!1;this.gj=0;this.$b=null;this.Ho=!1;this.Dx=this.Ex=0;this.canvas.oncontextmenu=function(a){a.preventDefault&&a.preventDefault();return!1};this.canvas.onselectstart=function(a){a.preventDefault&&a.preventDefault();return!1};this.canvas.ontouchstart=function(a){a.preventDefault&&a.preventDefault();return!1};this.fd&&(window.c2runtime=this);this.ep&&(window.ondragover=function(a){a.preventDefault();return!1},window.ondrop=function(a){a.preventDefault();
return!1},window.nwgui&&window.nwgui.App.clearCache&&window.nwgui.App.clearCache());this.$o&&"undefined"!==typeof jQuery&&jQuery("canvas").parents("*").css("overflow","visible");this.width=a.width;this.height=a.height;this.Ia=this.width;this.Ha=this.height;this.qo=this.width;this.Ll=this.height;this.wj=window.innerWidth;this.vj=window.innerHeight;this.yb=!0;this.qm=!1;Date.now||(Date.now=function(){return+new Date});this.plugins=[];this.types={};this.ua=[];this.fc=[];this.ht={};this.Yf=[];this.Sr=
{};this.$g=[];this.ql=[];this.Jq=[];this.sB=[];this.tB=[];this.Lw=this.Fy=null;this.bj={};this.Ls=this.fi=!1;this.df=0;this.Ks=this.Ns=!1;this.Uf=[];this.lm=!1;this.rp=this.bu="";this.Yc=null;this.lh="";this.vn=this.Cy=!1;this.Go=[];this.fj=this.Pa=0;this.qx=30;this.Ar=this.Nm=0;this.Ng=1;this.Wc=new wb;this.Ih=new wb;this.Fp=this.Oo=this.jj=this.Ae=this.yj=this.Yr=this.mp=0;this.$i=null;this.zo=[];this.Rr=[];this.Co=-1;this.ot=[[]];this.xu=this.wp=0;this.$p(null);this.qt=[];this.yp=-1;this.Rl=this.yx=
this.Rm=0;this.wn=[];this.uu=this.St=-1;this.Gk=!0;this.up=0;this.nm=!1;this.iF=0;this.hk=null;this.Vb=this.Wo=!1;this.Cx=new ea;this.zt=new ea;this.At=new ea;this.Oj=[];this.ye=new yb([]);this.ru=new yb([]);this.Th=[];this.cm={};this.Wh={};this.Rh={};this.pl={};this.zv={};this.Rw=this.qp=this.Fc=this.Xc=this.Qw=this.pp=this.$a=null;this.nl=this.Qs=!1;this.Zr=[null,null];this.di=0;this.Wr="";this.ph={};this.sn=this.ni=null;this.Ey="";this.Ep=[];this.SE()}}function c(a,b){return 128>=b?a[3]:256>=b?
a[2]:512>=b?a[1]:a[0]}function b(){try{return!!window.indexedDB}catch(a){return!1}}function e(a){a.target.result.createObjectStore("saves",{keyPath:"slot"})}function d(a,b,c,d){try{var f=indexedDB.open("_C2SaveStates");f.onupgradeneeded=e;f.onerror=d;f.onsuccess=function(f){f=f.target.result;f.onerror=d;f.transaction(["saves"],"readwrite").objectStore("saves").put({slot:a,data:b}).onsuccess=c}}catch(g){d(g)}}function k(a,b,c){try{var d=indexedDB.open("_C2SaveStates");d.onupgradeneeded=e;d.onerror=
c;d.onsuccess=function(d){d=d.target.result;d.onerror=c;var f=d.transaction(["saves"]).objectStore("saves").get(a);f.onsuccess=function(){f.result?b(f.result.data):b(null)}}}catch(f){c(f)}}function f(){ia("Reloading for continuous preview");window.c2cocoonjs?CocoonJS.App.reload():-1<window.location.search.indexOf("continuous")?window.location.reload(!0):window.location=window.location+"?continuous"}function g(a){var b,c={};for(b in a)!a.hasOwnProperty(b)||a[b]instanceof ea||a[b]&&"undefined"!==typeof a[b].rg||
"spriteCreatedDestroyCallback"!==b&&(c[b]=a[b]);return c}var h=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame;a.prototype.SE=function(){var a=this;if(this.rm)this.Zv("data.js",function(b){a.Fm(JSON.parse(b))},function(){alert("Error fetching data.js")});else{var b;this.hi?b=new ActiveXObject("Microsoft.XMLHTTP"):b=new XMLHttpRequest;var c="data.js";if(this.Iw||this.hi||this.Ps||this.fp)c=
"data.json";b.open("GET",c,!0);var d=!1;if(!this.Kb&&"response"in b&&"responseType"in b)try{b.responseType="json",d="json"===b.responseType}catch(f){d=!1}if(!d&&"responseType"in b)try{b.responseType="text"}catch(g){}if("overrideMimeType"in b)try{b.overrideMimeType("application/json; charset=utf-8")}catch(e){}this.hi?b.onreadystatechange=function(){4===b.readyState&&a.Fm(JSON.parse(b.responseText))}:(b.onload=function(){if(d)a.Fm(b.response);else if(a.Xf){var c=b.responseText,c=c.substr(c.indexOf("{"));
a.Fm(JSON.parse(c))}else a.Fm(JSON.parse(b.responseText))},b.onerror=function(a){ka("Error requesting "+c+":");ka(a)});b.send()}};a.prototype.MD=function(){var a=this,b,c,d,f,g,e,h,k,m;this.rj=(!this.Kb||this.Xf||this.cf)&&this.AF&&!this.$o;0===this.td&&this.Fk&&(this.rj=!1);this.devicePixelRatio=this.rj?window.devicePixelRatio||window.webkitDevicePixelRatio||window.mozDevicePixelRatio||window.msDevicePixelRatio||1:1;this.Dd();0<this.td&&this.setSize(window.innerWidth,window.innerHeight,!0);this.canvas.addEventListener("webglcontextlost",
function(b){b.preventDefault();a.lE();ia("[Construct 2] WebGL context lost");window.cr_setSuspended(!0)},!1);this.canvas.addEventListener("webglcontextrestored",function(){a.ta.uw();a.ta.zh(a.ta.width,a.ta.height,!0);a.Xc=null;a.Fc=null;a.Zr[0]=null;a.Zr[1]=null;a.mE();a.yb=!0;ia("[Construct 2] WebGL context restored");window.cr_setSuspended(!1)},!1);try{this.pC&&(this.Od||this.Xf||!this.Kb)&&(b={alpha:!0,depth:!1,antialias:!1,powerPreference:"high-performance",failIfMajorPerformanceCaveat:!0},this.jm||
(this.za=this.canvas.getContext("webgl2",b)),this.za||(this.za=this.canvas.getContext("webgl",b)||this.canvas.getContext("experimental-webgl",b)))}catch(n){}if(this.za){if(b=this.za.getExtension("WEBGL_debug_renderer_info"))this.qs=this.za.getParameter(b.UNMASKED_RENDERER_WEBGL)+" ["+this.za.getParameter(b.UNMASKED_VENDOR_WEBGL)+"]";this.Sb&&(this.qs+=" [front-to-back enabled]");this.Kb||(this.yd=document.createElement("canvas"),jQuery(this.yd).appendTo(this.canvas.parentNode),this.yd.oncontextmenu=
function(){return!1},this.yd.onselectstart=function(){return!1},this.yd.width=Math.round(this.qo*this.devicePixelRatio),this.yd.height=Math.round(this.Ll*this.devicePixelRatio),jQuery(this.yd).css({width:this.qo+"px",height:this.Ll+"px"}),this.Vx(),this.Jt=this.yd.getContext("2d"));this.ta=new Qb(this.za,this.ih,this.Sb);this.ta.zh(this.canvas.width,this.canvas.height);this.ta.Tv=0!==this.iC;this.$b=null;b=0;for(c=this.ua.length;b<c;b++)for(g=this.ua[b],d=0,f=g.Qa.length;d<f;d++)h=g.Qa[d],h.Kc=this.ta.ns(h.id),
h.$f=this.ta.Nt(h.Kc),this.nl=this.nl||this.ta.cn(h.Kc);b=0;for(c=this.Yf.length;b<c;b++){k=this.Yf[b];d=0;for(f=k.Qa.length;d<f;d++)h=k.Qa[d],h.Kc=this.ta.ns(h.id),h.$f=this.ta.Nt(h.Kc);k.fg();d=0;for(f=k.Ta.length;d<f;d++){m=k.Ta[d];g=0;for(e=m.Qa.length;g<e;g++)h=m.Qa[g],h.Kc=this.ta.ns(h.id),h.$f=this.ta.Nt(h.Kc),this.nl=this.nl||this.ta.cn(h.Kc);m.fg()}}}else{if(0<this.td&&this.fd){this.canvas=null;document.oncontextmenu=function(){return!1};document.onselectstart=function(){return!1};this.$b=
AppMobi.canvas.getContext("2d");try{this.$b.samplingMode=this.Tb?"smooth":"sharp",this.$b.globalScale=1,this.$b.HTML5CompatibilityMode=!0,this.$b.imageSmoothingEnabled=this.Tb}catch(l){}0!==this.width&&0!==this.height&&(this.$b.width=this.width,this.$b.height=this.height)}this.$b||(this.Od?(b={antialias:!!this.Tb,alpha:!0},this.$b=this.canvas.getContext("2d",b)):(b={alpha:!0},this.$b=this.canvas.getContext("2d",b)),this.oq(this.$b,this.Tb));this.Jt=this.yd=null}this.Py=function(b){a.bb(!1,b)};window==
window.top||this.Kb||this.Hw||this.hi||(document.addEventListener("mousedown",function(){window.focus()},!0),document.addEventListener("touchstart",function(){window.focus()},!0));"undefined"!==typeof cr_is_preview&&(this.Od&&console.log("[Construct 2] In preview-over-wifi via CocoonJS mode"),-1<window.location.search.indexOf("continuous")&&(ia("Reloading for continuous preview"),this.rp="__c2_continuouspreview",this.vn=!0),this.CE&&!this.ih&&(jQuery(window).focus(function(){a.setSuspended(!1)}),
jQuery(window).blur(function(){var b=window.parent;b&&b.document.hasFocus()||a.setSuspended(!0)})));window.addEventListener("blur",function(){a.rh()});this.Kb||(b=function(a){if(Nb(a)&&document.activeElement&&document.activeElement!==document.getElementsByTagName("body")[0]&&document.activeElement.blur)try{document.activeElement.blur()}catch(b){}},"undefined"!==typeof PointerEvent?document.addEventListener("pointerdown",b):window.navigator.msPointerEnabled?document.addEventListener("MSPointerDown",
b):document.addEventListener("touchstart",b),document.addEventListener("mousedown",b));0===this.td&&this.rj&&1<this.devicePixelRatio&&this.setSize(this.Hc,this.Gc,!0);this.Uy();this.FD();this.go();this.na={}};a.prototype.setSize=function(a,b,c){var d=0,f=0,g=0,e=0,e=0;if(this.wj!==a||this.vj!==b||c){this.wj=a;this.vj=b;var h=this.td;if((g=(document.mozFullScreen||document.webkitIsFullScreen||!!document.msFullscreenElement||document.fullScreen||this.nm)&&!this.cf)||0!==this.td||c)g&&(h=this.di),c=
this.devicePixelRatio,4<=h?(g=this.Hc/this.Gc,a/b>g?(g*=b,5===h?(e=g*c/this.Hc,1<e?e=Math.floor(e):1>e&&(e=1/Math.ceil(1/e)),g=this.Hc*e/c,e=this.Gc*e/c,d=(a-g)/2,f=(b-e)/2,a=g,b=e):(d=(a-g)/2,a=g)):(e=a/g,5===h?(e=e*c/this.Gc,1<e?e=Math.floor(e):1>e&&(e=1/Math.ceil(1/e)),g=this.Hc*e/c,e=this.Gc*e/c,d=(a-g)/2,f=(b-e)/2,a=g):f=(b-e)/2,b=e)):g&&0===h&&(d=Math.floor((a-this.Hc)/2),f=Math.floor((b-this.Gc)/2),a=this.Hc,b=this.Gc),2>h&&(this.Fl=c),this.qo=Math.round(a),this.Ll=Math.round(b),this.width=
Math.round(a*c),this.height=Math.round(b*c),this.yb=!0,this.dz?(this.Ia=this.width,this.Ha=this.height,this.Ze=!0):this.width<this.Hc&&this.height<this.Gc||1===h?(this.Ia=this.width,this.Ha=this.height,this.Ze=!0):(this.Ia=this.Hc,this.Ha=this.Gc,this.Ze=!1,2===h?(g=this.Hc/this.Gc,h=this.wj/this.vj,h<g?this.Ia=this.Ha*h:h>g&&(this.Ha=this.Ia/h)):3===h&&(g=this.Hc/this.Gc,h=this.wj/this.vj,h>g?this.Ia=this.Ha*h:h<g&&(this.Ha=this.Ia/h))),this.Gv&&!this.Kb&&(jQuery(this.Gv).css({width:Math.round(a)+
"px",height:Math.round(b)+"px","margin-left":Math.floor(d)+"px","margin-top":Math.floor(f)+"px"}),"undefined"!==typeof cr_is_preview&&jQuery("#borderwrap").css({width:Math.round(a)+"px",height:Math.round(b)+"px"})),this.canvas&&(this.canvas.width=Math.round(a*c),this.canvas.height=Math.round(b*c),this.Xf?(this.canvas.style.left=Math.floor(d)+"px",this.canvas.style.top=Math.floor(f)+"px",this.canvas.style.width=Math.round(a)+"px",this.canvas.style.height=Math.round(b)+"px"):this.rj&&!this.Kb&&(this.canvas.style.width=
Math.round(a)+"px",this.canvas.style.height=Math.round(b)+"px")),this.yd&&(this.yd.width=Math.round(a*c),this.yd.height=Math.round(b*c),this.yd.style.width=this.qo+"px",this.yd.style.height=this.Ll+"px"),this.ta&&this.ta.zh(Math.round(a*c),Math.round(b*c)),this.fd&&this.$b&&(this.$b.width=Math.round(a),this.$b.height=Math.round(b)),this.$b&&this.oq(this.$b,this.Tb),this.Uy(),this.Kw&&!this.cf&&window.scrollTo(0,0)}};a.prototype.Uy=function(){if(this.vB&&0!==this.It){var a="portrait";2===this.It&&
(a="landscape");try{screen.orientation&&screen.orientation.lock?screen.orientation.lock(a).catch(function(){}):screen.lockOrientation?screen.lockOrientation(a):screen.webkitLockOrientation?screen.webkitLockOrientation(a):screen.mozLockOrientation?screen.mozLockOrientation(a):screen.msLockOrientation&&screen.msLockOrientation(a)}catch(b){console&&console.warn&&console.warn("Failed to lock orientation: ",b)}}};a.prototype.lE=function(){this.ta.GB();this.Qs=!0;var a,b,c;a=0;for(b=this.ua.length;a<b;a++)c=
this.ua[a],c.Vm&&c.Vm()};a.prototype.mE=function(){this.Qs=!1;var a,b,c;a=0;for(b=this.ua.length;a<b;a++)c=this.ua[a],c.Gp&&c.Gp()};a.prototype.Vx=function(){if(!this.Kb){var a=(document.mozFullScreen||document.webkitIsFullScreen||document.fullScreen||document.msFullscreenElement||this.nm)&&!this.cf?jQuery(this.canvas).offset():jQuery(this.canvas).position();a.position="absolute";jQuery(this.yd).css(a)}};var l=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||
window.msCancelAnimationFrame||window.oCancelAnimationFrame;a.prototype.setSuspended=function(a){var b;if(a&&!this.qm)for(ia("[Construct 2] Suspending"),this.qm=!0,-1!==this.St&&l&&l(this.St),-1!==this.uu&&clearTimeout(this.uu),a=0,b=this.wn.length;a<b;a++)this.wn[a](!0);else if(!a&&this.qm){ia("[Construct 2] Resuming");this.qm=!1;this.mp=mb();this.yj=mb();a=this.Nm=this.Oo=0;for(b=this.wn.length;a<b;a++)this.wn[a](!1);this.bb(!1)}};a.prototype.tv=function(a){this.wn.push(a)};a.prototype.Oh=function(a){return this.Ep[a]};
a.prototype.Fm=function(a){a&&a.project||ka("Project model unavailable");a=a.project;this.name=a[0];this.bw=a[1];this.td=a[12];this.Hc=a[10];this.Gc=a[11];this.Px=this.Hc/2;this.Qx=this.Gc/2;this.Kb&&!this.Xf&&(4<=a[12]||0===a[12])&&(ia("[Construct 2] Letterbox scale fullscreen modes are not supported on this platform - falling back to 'Scale outer'"),this.td=3);this.Fu=a[18];this.oi=a[19];if(0===this.oi){var b=new Image;b.crossOrigin="anonymous";this.qy(b,"loading-logo.png");this.ni={xp:b}}else if(4===
this.oi){b=new Image;b.src="";var c=new Image;c.src="";var d=new Image;d.src="";var f=new Image;f.src="";var g=new Image;g.src="";var e=new Image;e.src="";var h=new Image;h.src="";var k=new Image;k.src="";var m=new Image;m.src="";var n=new Image;n.src="";var l=new Image;l.src="";var v=new Image;v.src="";this.ni={xp:[b,c,d,f],HE:[g,e,h,k],EF:[m,n,l,v]}}this.Rm=a[21];this.Ep=gd();this.Lg=new R(this);b=0;for(c=a[2].length;b<c;b++)h=a[2][b],d=this.Oh(h[0]),Wb(h,d.prototype),k=new d(this),k.tq=h[1],k.ki=
h[2],k.XD=h[5],k.ux=h[9],k.da&&k.da(),this.plugins.push(k);this.Ep=gd();b=0;for(c=a[3].length;b<c;b++){h=a[3][b];g=this.Oh(h[1]);k=null;d=0;for(f=this.plugins.length;d<f;d++)if(this.plugins[d]instanceof g){k=this.plugins[d];break}m=new k.ma(k);m.name=h[0];m.Da=h[2];m.Gs=h[3].slice(0);m.CF=h[3].length;m.wB=h[4];m.$C=h[5];m.ab=h[11];m.Da?(m.Gj=[],m.ah=this.Rl++,m.ac=null):(m.Gj=null,m.ah=-1,m.ac=[]);m.Eo=null;m.qk=null;m.Uv=null;m.Pd=!1;m.Ge=null;h[6]?(m.Cq=h[6][0],m.Dq=h[6][1],m.zn=h[6][2]):(m.Cq=
null,m.Dq=0,m.zn=0);h[7]?m.Fe=h[7]:m.Fe=null;m.index=b;m.J=[];m.vo=[];m.Ch=[new Xb(m)];m.ug=0;m.wf=null;m.MB=0;m.hl=!0;m.Lq=Yb;m.iD=Zb;m.oD=ac;m.gb=dc;m.gn=ec;m.al=fc;m.uh=gc;m.Qo=hc;m.as=ic;m.gs=jc;m.sf=kc;m.hs=lc;m.mo=new Bb(this.Hc,this.Gc);m.Wn=!0;m.Xn=!1;m.na={};m.toString=mc;m.fc=[];d=0;for(f=h[8].length;d<f;d++){n=h[8][d];l=this.Oh(n[1]);v=null;g=0;for(e=this.fc.length;g<e;g++)if(this.fc[g]instanceof l){v=this.fc[g];break}v||(v=new l(this),v.Dp=[],v.Ij=new ea,v.da&&v.da(),this.fc.push(v),hd&&
v instanceof hd&&(this.Fy=v),id&&v instanceof id&&(this.Lw=v));-1===v.Dp.indexOf(m)&&v.Dp.push(m);g=new v.ma(v,m);g.name=n[0];g.ab=n[2];g.da();m.fc.push(g)}m.global=h[9];m.Ms=h[10];m.Qa=[];d=0;for(f=h[12].length;d<f;d++)m.Qa.push({id:h[12][d][0],name:h[12][d][1],Kc:-1,$f:!1,Pb:!0,index:d});m.PG=h[13];this.Fu&&!m.Da&&!m.Ms&&k.ki||m.da();m.name&&(this.types[m.name]=m);this.ua.push(m);k.tq&&(d=new k.la(m),d.uid=this.Rm++,d.ay=this.yx++,d.oj=0,d.Zl=nc,d.toString=pc,d.X=h[14],d.da(),m.J.push(d),this.ph[d.uid.toString()]=
d)}b=0;for(c=a[4].length;b<c;b++)for(g=a[4][b],e=this.ua[g[0]],d=1,f=g.length;d<f;d++)h=this.ua[g[d]],h.ac.push(e),e.Gj.push(h);b=0;for(c=a[28].length;b<c;b++){g=a[28][b];e=[];d=0;for(f=g.length;d<f;d++)e.push(this.ua[g[d]]);d=0;for(f=e.length;d<f;d++)e[d].Pd=!0,e[d].Ge=e}if(0<this.Rl)for(b=0,c=this.ua.length;b<c;b++)if(h=this.ua[b],!h.Da&&h.ac.length){h.Eo=Array(this.Rl);h.qk=Array(this.Rl);h.Uv=Array(this.Rl);m=[];d=v=l=n=0;for(f=h.ac.length;d<f;d++)for(k=h.ac[d],h.Eo[k.ah]=n,n+=k.CF,h.qk[k.ah]=
l,l+=k.wB,h.Uv[k.ah]=v,v+=k.$C,g=0,e=k.Qa.length;g<e;g++)m.push(Da({},k.Qa[g]));h.Qa=m.concat(h.Qa);d=0;for(f=h.Qa.length;d<f;d++)h.Qa[d].index=d}b=0;for(c=a[5].length;b<c;b++)h=a[5][b],d=new qc(this,h),this.ht[d.name]=d,this.Yf.push(d);b=0;for(c=a[6].length;b<c;b++)h=a[6][b],d=new rc(this,h),this.Sr[d.name]=d,this.$g.push(d);b=0;for(c=this.$g.length;b<c;b++)this.$g[b].yc();b=0;for(c=this.$g.length;b<c;b++)this.$g[b].Bu();b=0;for(c=this.Jq.length;b<c;b++)this.Jq[b].yc();E(this.Jq);this.uB=a[7];this.Wr=
a[8];this.hf=a[9];this.Fl=1;this.pC=a[13];this.Tb=a[14];this.Hv=a[15];this.AF=a[17];this.It=a[20];this.vB=0<this.It;this.CE=a[22];this.Ze=this.dz=a[23];this.iC=a[24];this.IE=a[25];this.Sb=a[27]&&!this.hh;this.xq=Date.now();E(this.Ep);this.MD()};var m=!1,n=0,q=[];a.prototype.OE=function(a,b){function c(){n--;d.nx()}var d=this;a.addEventListener("load",c);a.addEventListener("error",c);q.push([a,b]);this.nx()};a.prototype.nx=function(){for(var a;q.length&&100>n;)n++,a=q.shift(),this.qy(a[0],a[1])};a.prototype.Hu=
function(a,b){a.cocoonLazyLoad=!0;a.onerror=function(b){m=a.Bv=!0;console&&console.error&&console.error("Error loading image '"+a.src+"': ",b)};this.Xf?a.src=b:a.src||("undefined"!==typeof XAPKReader?XAPKReader.get(b,function(b){a.src=b},function(c){m=a.Bv=!0;console&&console.error&&console.error("Error extracting image '"+b+"' from expansion file: ",c)}):(a.crossOrigin="anonymous",this.OE(a,b)));this.ql.push(a)};a.prototype.YC=function(a){var b,c;b=0;for(c=this.ql.length;b<c;b++)if(this.ql[b].JB===
a)return this.ql[b];return null};var p=0,u=!1;a.prototype.FD=function(){this.hk&&(p=this.hk.eF(this.uB))};a.prototype.wv=function(){var a=p,b=0,c=0,d=!0,f,g,c=0;for(f=this.ql.length;c<f;c++){g=this.ql[c];var e=g.Br;if(!e||0>=e)e=5E4;a+=e;g.src&&(g.complete||g.loaded)&&!g.Bv?b+=e:d=!1}d&&this.IE&&this.hk&&(u||(this.hk.jF(),u=!0),c=this.hk.pD(),b+=c,c<p&&(d=!1));this.qe=0==a?1:b/a;return d};var t=!1;a.prototype.go=function(){if(this.$b||this.ta){var a=this.$b||this.Jt;this.yd&&this.Vx();var b=window.innerWidth,
c=window.innerHeight;this.wj===b&&this.vj===c||this.setSize(b,c);this.qe=0;this.Pw=-1;var d=this;if(this.wv()&&(4!==this.oi||t))this.GD();else{c=Date.now()-this.xq;if(a){var f=this.width,g=this.height,b=this.devicePixelRatio;if(3>this.oi&&(this.Od||500<=c&&this.Pw!=this.qe)){a.clearRect(0,0,f,g);var c=f/2,g=g/2,f=0===this.oi&&this.ni.xp.complete,e=40*b,k=0,n=80*b,l;if(f){var v=this.ni.xp,n=v.width*b;l=v.height*b;e=n/2;k=l/2;a.drawImage(v,xa(c-e),xa(g-k),n,l)}1>=this.oi?(c=xa(c-e)+.5,g=xa(g+(k+(f?
12*b:0)))+.5,a.fillStyle=m?"red":"DodgerBlue",a.fillRect(c,g,Math.floor(n*this.qe),6*b),a.strokeStyle="black",a.strokeRect(c,g,n,6*b),a.strokeStyle="white",a.strokeRect(c-1*b,g-1*b,n+2*b,8*b)):2===this.oi&&(a.font=this.Xf?"12pt ArialMT":"12pt Arial",a.fillStyle=m?"#f00":"#999",a.OG="middle",b=Math.round(100*this.qe)+"%",f=a.measureText?a.measureText(b):null,a.fillText(b,c-(f?f.width:0)/2,g));this.Pw=this.qe}else if(4===this.oi){this.nC(a);h?h(function(){d.go()}):setTimeout(function(){d.go()},16);
return}}setTimeout(function(){d.go()},this.Od?10:100)}}};var r=-1,v="undefined"===typeof cr_is_preview?200:0,y=!0,A=!1,F=0,D=0,G="undefined"===typeof cr_is_preview?3E3:0,z=null,w=null,B=0;a.prototype.nC=function(a){if(!t){for(var b=Math.ceil(this.width),d=Math.ceil(this.height),f=this.ni.xp,g=this.ni.HE,e=this.ni.EF,h=0;4>h;++h)if(!f[h].complete||!g[h].complete||!e[h].complete)return;0===B&&(r=Date.now());var h=Date.now(),k=!1,n=a,l,p;y||A?(a.clearRect(0,0,b,d),z&&z.width===b&&z.height===d||(z=document.createElement("canvas"),
z.width=b,z.height=d,w=z.getContext("2d")),n=w,k=!0,y&&1===B&&(r=Date.now())):a.globalAlpha=1;n.fillStyle="#333333";n.fillRect(0,0,b,d);256<this.Ll?(l=Na(.22*d,105,.6*b),p=.25*l,n.drawImage(c(g,l),.5*b-l/2,.2*d-p/2,l,p),p=l=Math.min(.395*d,.95*b),n.drawImage(c(f,l),.5*b-l/2,.485*d-p/2,l,p),l=Na(.22*d,105,.6*b),p=.25*l,n.drawImage(c(e,l),.5*b-l/2,.868*d-p/2,l,p),n.fillStyle="#3C3C3C",l=b,p=Math.max(.005*d,2),n.fillRect(0,.8*d-p/2,l,p),n.fillStyle=m?"red":"#E0FF65",l=b*this.qe,n.fillRect(.5*b-l/2,.8*
d-p/2,l,p)):(p=l=.55*d,n.drawImage(c(f,l),.5*b-l/2,.45*d-p/2,l,p),n.fillStyle="#3C3C3C",l=b,p=Math.max(.005*d,2),n.fillRect(0,.85*d-p/2,l,p),n.fillStyle=m?"red":"#E0FF65",l=b*this.qe,n.fillRect(.5*b-l/2,.85*d-p/2,l,p));k&&(y?a.globalAlpha=0===B?0:Math.min((h-r)/300,1):A&&(a.globalAlpha=Math.max(1-(h-D)/300,0)),a.drawImage(z,0,0,b,d));y&&300<=h-r&&2<=B&&(y=!1,F=h);!y&&h-F>=G&&!A&&1<=this.qe&&(A=!0,D=h);if(A&&h-D>=300+v||"undefined"!==typeof cr_is_preview&&1<=this.qe&&500>Date.now()-r)t=!0,A=y=!1,this.ni=
w=z=null;++B}};a.prototype.GD=function(){this.yd&&(this.canvas.parentNode.removeChild(this.yd),this.yd=this.Jt=null);this.xq=Date.now();this.yj=mb();var a,b,c;if(this.Fu)for(a=0,b=this.ua.length;a<b;a++)c=this.ua[a],c.Da||c.Ms||!c.Za.ki||c.da();else this.Gk=!1;a=0;for(b=this.Yf.length;a<b;a++)this.Yf[a].KB();2<=this.td&&(a=this.Hc/this.Gc,b=this.width/this.height,this.Fl=2!==this.td&&b>a||2===this.td&&b<a?this.height/this.Gc:this.width/this.Hc);this.bw?this.ht[this.bw].pu():this.Yf[0].pu();this.Fu||
(this.up=1,this.trigger(R.prototype.G.Vu,null),window.C2_RegisterSW&&window.C2_RegisterSW());navigator.splashscreen&&navigator.splashscreen.hide&&navigator.splashscreen.hide();a=0;for(b=this.ua.length;a<b;a++)c=this.ua[a],c.Fx&&c.Fx();document.hidden||document.webkitHidden||document.mozHidden||document.msHidden?window.cr_setSuspended(!0):this.bb(!1);this.fd&&AppMobi.webview.execute("onGameReady();")};a.prototype.bb=function(a,b,c){if(this.$a){var d=mb();if(c||!this.qm||a){a||(h?this.St=h(this.Py):
this.uu=setTimeout(this.Py,this.ih?1:16));b=b||d;var f=this.td;((c=(document.mozFullScreen||document.webkitIsFullScreen||document.fullScreen||!!document.msFullscreenElement)&&!this.cf)||this.nm)&&0<this.di&&(f=this.di);if(0<f){var f=window.innerWidth,g=window.innerHeight;this.wj===f&&this.vj===g||this.setSize(f,g)}this.Kb||(c?this.Ho||(this.Ho=!0):this.Ho?(this.Ho=!1,0===this.td&&this.setSize(Math.round(this.Ex/this.devicePixelRatio),Math.round(this.Dx/this.devicePixelRatio),!0)):(this.Ex=this.width,
this.Dx=this.height));this.Gk&&(c=this.wv(),this.up=this.qe,c&&(this.Gk=!1,this.qe=1,this.trigger(R.prototype.G.Vu,null),window.C2_RegisterSW&&window.C2_RegisterSW()));this.cE(b);!this.yb&&!this.Od||this.Qs||this.vn||a||(this.yb=!1,this.ta?this.Md():this.Ye(),this.sn&&(this.canvas&&this.canvas.toDataURL&&(this.Ey=this.canvas.toDataURL(this.sn[0],this.sn[1]),window.cr_onSnapshot&&window.cr_onSnapshot(this.Ey),this.trigger(R.prototype.G.Oz,null)),this.sn=null));this.BG||(this.Ae++,this.jj++,this.Oo++);
this.Nm+=mb()-d}}};a.prototype.cE=function(a){var b,c,d,f,g,e,h,k;1E3<=a-this.yj&&(this.yj+=1E3,1E3<=a-this.yj&&(this.yj=a),this.Yr=this.Oo,this.Oo=0,this.Ar=this.Nm,this.Nm=0);b=0;0!==this.mp&&(b=a-this.mp,0>b&&(b=0),this.fj=b/=1E3,.5<this.fj?this.fj=0:this.fj>1/this.qx&&(this.fj=1/this.qx));this.mp=a;this.Pa=this.fj*this.Ng;this.Wc.add(this.Pa);this.Ih.add(b);a=(document.mozFullScreen||document.webkitIsFullScreen||document.fullScreen||!!document.msFullscreenElement||this.nm)&&!this.cf;2<=this.td||
a&&0<this.di?(b=this.Hc/this.Gc,c=this.width/this.height,d=this.td,a&&0<this.di&&(d=this.di),this.Fl=2!==d&&c>b||2===d&&c<b?this.height/this.Gc:this.width/this.Hc,this.$a&&(this.$a.cu(this.$a.scrollX),this.$a.du(this.$a.scrollY))):this.Fl=this.rj?this.devicePixelRatio:1;this.Dd();this.df++;this.Lg.WE();this.df--;this.Dd();this.df++;c=this.Cx.Se();a=0;for(b=c.length;a<b;a++)c[a].JG();a=0;for(b=this.ua.length;a<b;a++)if(e=this.ua[a],!e.Da&&(e.fc.length||e.ac.length))for(c=0,d=e.J.length;c<d;c++)for(h=
e.J[c],f=0,g=h.Ea.length;f<g;f++)h.Ea[f].bb();a=0;for(b=this.ua.length;a<b;a++)if(e=this.ua[a],!e.Da&&(e.fc.length||e.ac.length))for(c=0,d=e.J.length;c<d;c++)for(h=e.J[c],f=0,g=h.Ea.length;f<g;f++)k=h.Ea[f],k.Xx&&k.Xx();c=this.zt.Se();a=0;for(b=c.length;a<b;a++)c[a].bb();this.df--;this.HD();for(a=0;this.$i&&10>a++;)this.Rv(this.$i);a=0;for(b=this.$g.length;a<b;a++)this.$g[a].ws=!1;this.$a.hj&&this.$a.hj.Jc();E(this.Oj);this.df++;a=0;for(b=this.ua.length;a<b;a++)if(e=this.ua[a],!e.Da&&(e.fc.length||
e.ac.length))for(c=0,d=e.J.length;c<d;c++)for(h=e.J[c],f=0,g=h.Ea.length;f<g;f++)k=h.Ea[f],k.Wj&&k.Wj();c=this.At.Se();a=0;for(b=c.length;a<b;a++)c[a].Wj();this.df--};a.prototype.rh=function(){var a,b,c,d,f,g,e,h,k;a=0;for(b=this.ua.length;a<b;a++)if(e=this.ua[a],!e.Da)for(c=0,d=e.J.length;c<d;c++)if(h=e.J[c],h.rh&&h.rh(),h.Ea)for(f=0,g=h.Ea.length;f<g;f++)k=h.Ea[f],k.rh&&k.rh()};a.prototype.Rv=function(a){var b=this.$a;this.$a.lF();var c,d,f;if(this.ta)for(c=0,d=this.ua.length;c<d;c++)f=this.ua[c],
f.Da||!f.Kq||f.global&&0!==f.J.length||-1!==a.hm.indexOf(f)||f.Kq();b==a&&E(this.Lg.Be);E(this.Oj);this.hy(!0);a.pu();this.hy(!1);this.yb=!0;this.Dd()};a.prototype.hy=function(a){var b,c,d,f,g,e,h,k,m;b=0;for(c=this.fc.length;b<c;b++)d=this.fc[b],a?d.Uk&&d.Uk():d.Vk&&d.Vk();b=0;for(c=this.ua.length;b<c;b++)if(d=this.ua[b],d.global||d.Za.tq)for(f=0,g=d.J.length;f<g;f++)if(e=d.J[f],a?e.Uk&&e.Uk():e.Vk&&e.Vk(),e.Ea)for(h=0,k=e.Ea.length;h<k;h++)m=e.Ea[h],a?m.Uk&&m.Uk():m.Vk&&m.Vk()};a.prototype.kl=function(a){this.zt.add(a)};
a.prototype.sF=function(a){this.At.add(a)};a.prototype.yf=function(a){return a&&-1!==a.Qm?this.fj*a.Qm:this.Pa};a.prototype.Ye=function(){this.$a.Ye(this.$b);this.fd&&this.$b.present()};a.prototype.Md=function(){this.Sb&&(this.gj=1,this.$a.ej(this.ta));this.$a.Md(this.ta);this.ta.KE()};a.prototype.Bl=function(a){a&&this.zo.push(a)};a.prototype.Vt=function(a){Ma(this.zo,a)};a.prototype.zg=function(a){a=a.toString();return this.ph.hasOwnProperty(a)?this.ph[a]:null};var L=[];a.prototype.Pg=function(a){var b,
c;b=a.type.name;var d=null;if(this.bj.hasOwnProperty(b)){if(d=this.bj[b],d.contains(a))return}else d=L.length?L.pop():new ea,this.bj[b]=d;d.add(a);this.fi=!0;if(a.Pd)for(b=0,c=a.siblings.length;b<c;b++)this.Pg(a.siblings[b]);this.Ls&&d.ol.push(a);this.Ks||(this.df++,this.trigger(Object.getPrototypeOf(a.type.Za).G.Qz,a),this.df--)};a.prototype.Dd=function(){if(this.fi){var a,b,c,d,f,g;this.Ls=!0;c=0;for(f=this.Uf.length;c<f;++c)for(a=this.Uf[c],b=a.type,b.J.push(a),d=0,g=b.ac.length;d<g;++d)b.ac[d].J.push(a),
b.ac[d].hl=!0;E(this.Uf);this.Az();jb(this.bj);this.fi=this.Ls=!1}};a.prototype.Az=function(){for(var a in this.bj)this.bj.hasOwnProperty(a)&&this.iz(this.bj[a])};a.prototype.iz=function(a){var b=a.Se(),c=b[0].type,d,f,g,e,h,k;tb(c.J,a);c.hl=!0;0===c.J.length&&(c.Xn=!1);d=0;for(f=c.ac.length;d<f;++d)k=c.ac[d],tb(k.J,a),k.hl=!0;d=0;for(f=this.Lg.Be.length;d<f;++d)if(h=this.Lg.Be[d],h.be.hasOwnProperty(c.index)&&tb(h.be[c.index].fh,a),!c.Da)for(g=0,e=c.ac.length;g<e;++g)k=c.ac[g],h.be.hasOwnProperty(k.index)&&
tb(h.be[k.index].fh,a);if(h=b[0].V){if(h.of)for(g=h.J,d=0,f=g.length;d<f;++d)e=g[d],a.contains(e)&&(e.Ua(),h.Bd.update(e,e.ue,null),e.ue.set(0,0,-1,-1));tb(h.J,a);h.nn(0)}for(d=0;d<b.length;++d)this.hz(b[d],c);a.clear();L.push(a);this.yb=!0};a.prototype.hz=function(a,b){var c,d,f;c=0;for(d=this.zo.length;c<d;++c)this.zo[c](a);a.Xh&&b.mo.update(a,a.Xh,null);(c=a.V)&&c.cl(a,!0);if(a.Ea)for(c=0,d=a.Ea.length;c<d;++c)f=a.Ea[c],f.Gf&&f.Gf(),f.behavior.Ij.remove(a);this.Cx.remove(a);this.zt.remove(a);this.At.remove(a);
a.Gf&&a.Gf();this.ph.hasOwnProperty(a.uid.toString())&&delete this.ph[a.uid.toString()];this.Fp--;100>b.vo.length&&b.vo.push(a)};a.prototype.Dr=function(a,b,c,d){if(a.Da){var f=xa(Math.random()*a.Gj.length);return this.Dr(a.Gj[f],b,c,d)}return a.wf?this.Zh(a.wf,b,!1,c,d,!1):null};var W=[];a.prototype.Zh=function(a,b,c,d,f,g){var e,h,k,m;if(!a)return null;var l=this.ua[a[1]],n=l.Za.ki;if(this.Gk&&n&&!l.Ms||n&&!this.ta&&11===a[0][11])return null;var v=b;n||(b=null);var p;l.vo.length?(p=l.vo.pop(),p.zd=
!0,l.Za.la.call(p,l)):(p=new l.Za.la(l),p.zd=!1);!c||g||this.ph.hasOwnProperty(a[2].toString())?p.uid=this.Rm++:p.uid=a[2];this.ph[p.uid.toString()]=p;p.ay=this.yx++;p.oj=l.J.length;e=0;for(h=this.Uf.length;e<h;++e)this.Uf[e].type===l&&p.oj++;p.Zl=nc;p.toString=pc;k=a[3];if(p.zd)jb(p.na);else{p.na={};if("undefined"!==typeof cr_is_preview)for(p.xw=[],p.xw.length=k.length,e=0,h=k.length;e<h;e++)p.xw[e]=k[e][1];p.Vc=[];p.Vc.length=k.length}e=0;for(h=k.length;e<h;e++)p.Vc[e]=k[e][0];if(n){var q=a[0];
p.x=ma(d)?q[0]:d;p.y=ma(f)?q[1]:f;p.z=q[2];p.width=q[3];p.height=q[4];p.depth=q[5];p.M=q[6];p.opacity=q[7];p.je=q[8];p.ke=q[9];p.Fd=q[10];e=q[11];!this.ta&&l.Qa.length&&(p.Fd=e);p.Hl=Db(p.Fd);this.za&&Gb(p,p.Fd,this.za);if(p.zd){e=0;for(h=q[12].length;e<h;e++)for(k=0,m=q[12][e].length;k<m;k++)p.hc[e][k]=q[12][e][k];p.Eb.set(0,0,0,0);p.Xh.set(0,0,-1,-1);p.ue.set(0,0,-1,-1);p.Fb.Ii(p.Eb);E(p.mr)}else{p.hc=q[12].slice(0);e=0;for(h=p.hc.length;e<h;e++)p.hc[e]=q[12][e].slice(0);p.xb=[];p.Qh=[];p.Qh.length=
l.Qa.length;p.Eb=new Aa(0,0,0,0);p.Xh=new Aa(0,0,-1,-1);p.ue=new Aa(0,0,-1,-1);p.Fb=new Ba;p.mr=[];p.ba=sc;p.qB=tc;p.Kd=uc;p.Ua=vc;p.az=wc;p.Eu=xc;p.Af=yc}p.dg=!1;p.vF=0;p.uF=0;p.tF=null;14===q.length&&(p.dg=!0,p.vF=q[13][0],p.uF=q[13][1],p.tF=q[13][2]);e=0;for(h=l.Qa.length;e<h;e++)p.Qh[e]=!0;p.Ah=!0;p.fg=zc;p.fg();p.bz=!!p.xb.length;p.co=!0;p.or=!0;l.Wn=!0;p.visible=!0;p.Qm=-1;p.V=b;p.gg=b.J.length;p.gj=0;"undefined"===typeof p.Oa&&(p.Oa=null);this.yb=p.tg=!0}var y;E(W);e=0;for(h=l.ac.length;e<
h;e++)W.push.apply(W,l.ac[e].fc);W.push.apply(W,l.fc);if(p.zd)for(e=0,h=W.length;e<h;e++){var r=W[e];y=p.Ea[e];y.zd=!0;r.behavior.la.call(y,r,p);q=a[4][e];k=0;for(m=q.length;k<m;k++)y.X[k]=q[k];y.da();r.behavior.Ij.add(p)}else for(p.Ea=[],e=0,h=W.length;e<h;e++)r=W[e],y=new r.behavior.la(r,p),y.zd=!1,y.X=a[4][e].slice(0),y.da(),p.Ea.push(y),r.behavior.Ij.add(p);q=a[5];if(p.zd)for(e=0,h=q.length;e<h;e++)p.X[e]=q[e];else p.X=q.slice(0);this.Uf.push(p);this.fi=!0;b&&(b.El(p,!0),1!==b.oe||1!==b.pe)&&
(l.Xn=!0);this.Fp++;if(l.Pd){if(p.Pd=!0,p.zd?E(p.siblings):p.siblings=[],!c&&!g){e=0;for(h=l.Ge.length;e<h;e++)if(l.Ge[e]!==l){if(!l.Ge[e].wf)return null;p.siblings.push(this.Zh(l.Ge[e].wf,v,!1,n?p.x:d,n?p.y:f,!0))}e=0;for(h=p.siblings.length;e<h;e++)for(p.siblings[e].siblings.push(p),k=0;k<h;k++)e!==k&&p.siblings[e].siblings.push(p.siblings[k])}}else p.Pd=!1,p.siblings=null;p.da();e=0;for(h=p.Ea.length;e<h;e++)p.Ea[e].Wx&&p.Ea[e].Wx();return p};a.prototype.Wl=function(a){var b,c;b=0;for(c=this.$a.Ta.length;b<
c;b++){var d=this.$a.Ta[b];if(Ib(d.name,a))return d}return null};a.prototype.eh=function(a){a=xa(a);0>a&&(a=0);a>=this.$a.Ta.length&&(a=this.$a.Ta.length-1);return this.$a.Ta[a]};a.prototype.tr=function(a){var b,c;b=0;for(c=a.length;b<c;b++)a[b].gb().zb=!0};a.prototype.gn=function(a){var b,c;b=0;for(c=a.length;b<c;b++)a[b].gn()};a.prototype.al=function(a){var b,c;b=0;for(c=a.length;b<c;b++)a[b].al()};a.prototype.uh=function(a){var b,c;b=0;for(c=a.length;b<c;b++)a[b].uh()};a.prototype.Yy=function(a){if(a.Wn){var b,
c,d=a.J;b=0;for(c=d.length;b<c;++b)d[b].Eu();d=this.Uf;b=0;for(c=d.length;b<c;++b)d[b].type===a&&d[b].Eu();a.Wn=!1}};a.prototype.bs=function(a,b,c,d){var f,g,e=a?1!==a.oe||1!==a.pe:!1;if(b.Da)for(a=0,f=b.Gj.length;a<f;++a)g=b.Gj[a],e||g.Xn?Ja(d,g.J):(this.Yy(g),g.mo.bq(c,d));else e||b.Xn?Ja(d,b.J):(this.Yy(b),b.mo.bq(c,d))};a.prototype.os=function(a,b,c,d){var f,g;f=0;for(g=b.length;f<g;++f)this.bs(a,b[f],c,d)};a.prototype.mw=function(a,b,c){var d=this.Fy;d&&this.os(a,d.Dp,b,c)};a.prototype.mD=function(a,
b,c){var d=this.Lw;d&&this.os(a,d.Dp,b,c)};a.prototype.xn=function(a,b,c){var d=a.gb(),f,g,e,h,k=this.Tc().Pc.Hf,m,l,n;if(d.zb)for(d.zb=!1,E(d.J),f=0,h=a.J.length;f<h;f++)e=a.J[f],e.Ua(),m=e.V.Zb(b,c,!0),l=e.V.Zb(b,c,!1),e.Kd(m,l)?d.J.push(e):k&&d.lb.push(e);else{g=0;n=k?d.lb:d.J;f=0;for(h=n.length;f<h;f++)e=n[f],e.Ua(),m=e.V.Zb(b,c,!0),l=e.V.Zb(b,c,!1),e.Kd(m,l)&&(k?d.J.push(e):(d.J[g]=d.J[f],g++));n.length=g}a.sf();return d.vs()};a.prototype.ze=function(a,b){if(!(a&&b&&a!==b&&a.tg&&b.tg))return!1;
a.Ua();b.Ua();var c=a.V,d=b.V,f,g,e,h,k,m,l,n;if(c===d||c.oe===d.oe&&d.pe===d.pe&&c.scale===d.scale&&c.M===d.M&&c.Wd===d.Wd){if(!a.Eb.yw(b.Eb)||!a.Fb.Hs(b.Fb)||a.dg&&b.dg)return!1;if(a.dg)return this.Ly(a,b);if(b.dg)return this.Ly(b,a);l=a.Oa&&!a.Oa.ji();f=b.Oa&&!b.Oa.ji();if(!l&&!f)return!0;l?(a.Oa.Uh(a.width,a.height,a.M),l=a.Oa):(this.ye.Qj(a.Fb,a.x,a.y,a.width,a.height),l=this.ye);f?(b.Oa.Uh(b.width,b.height,b.M),n=b.Oa):(this.ye.Qj(b.Fb,b.x,b.y,b.width,b.height),n=this.ye);return l.qj(n,b.x-
a.x,b.y-a.y)}l=a.Oa&&!a.Oa.ji();f=b.Oa&&!b.Oa.ji();l?(a.Oa.Uh(a.width,a.height,a.M),this.ye.xy(a.Oa)):this.ye.Qj(a.Fb,a.x,a.y,a.width,a.height);l=this.ye;f?(b.Oa.Uh(b.width,b.height,b.M),this.ru.xy(b.Oa)):this.ru.Qj(b.Fb,b.x,b.y,b.width,b.height);n=this.ru;f=0;for(g=l.jf;f<g;f++)e=2*f,h=e+1,k=l.zc[e],m=l.zc[h],l.zc[e]=c.cc(k+a.x,m+a.y,!0),l.zc[h]=c.cc(k+a.x,m+a.y,!1);l.Ua();f=0;for(g=n.jf;f<g;f++)e=2*f,h=e+1,k=n.zc[e],m=n.zc[h],n.zc[e]=d.cc(k+b.x,m+b.y,!0),n.zc[h]=d.cc(k+b.x,m+b.y,!1);n.Ua();return l.qj(n,
0,0)};var O=new Ba;new Aa(0,0,0,0);var H=[];a.prototype.Ly=function(a,b){var c,d,f,g,e=b.Eb,h=a.x,k=a.y;a.fD(e,H);var m=b.Oa&&!b.Oa.ji();c=0;for(d=H.length;c<d;++c)if(f=H[c],g=f.ey,e.zw(g,h,k)&&(O.Ii(g),O.offset(h,k),O.Hs(b.Fb)))if(m)if(b.Oa.Uh(b.width,b.height,b.M),f.If){if(f.If.qj(b.Oa,b.x-(h+g.left),b.y-(k+g.top)))return E(H),!0}else{if(this.ye.Qj(O,0,0,g.right-g.left,g.bottom-g.top),this.ye.qj(b.Oa,b.x,b.y))return E(H),!0}else if(f.If){if(this.ye.Qj(b.Fb,0,0,b.width,b.height),f.If.qj(this.ye,
-(h+g.left),-(k+g.top)))return E(H),!0}else return E(H),!0;E(H);return!1};a.prototype.su=function(a,b){if(!b||!b.tg)return!1;b.Ua();if(!b.Eb.yw(a))return!1;if(b.dg){b.fD(a,H);var c,d,f,g,e=b.x,h=b.y;c=0;for(d=H.length;c<d;++c)if(f=H[c],g=f.ey,a.zw(g,e,h))if(f.If){if(this.ye.Ii(a,0,0),f.If.qj(this.ye,-(e+g.left),-(h+g.top)))return E(H),!0}else return E(H),!0;E(H);return!1}O.Ii(a);if(!b.Fb.Hs(O))return!1;if(!b.Oa||b.Oa.ji())return!0;b.Oa.Uh(b.width,b.height,b.M);O.offset(-a.left,-a.top);this.ye.Qj(O,
0,0,1,1);return b.Oa.qj(this.ye,a.left-b.x,a.top-b.y)};a.prototype.yu=function(a,b){if(!b)return!1;var c,d,f,g,e;c=0;for(d=a.fc.length;c<d;c++)if(a.fc[c].behavior instanceof b)return!0;if(!a.Da)for(c=0,d=a.ac.length;c<d;c++)for(e=a.ac[c],f=0,g=e.fc.length;f<g;f++)if(e.fc[f].behavior instanceof b)return!0;return!1};a.prototype.zu=function(a){return this.yu(a,Xc.aG)};a.prototype.Au=function(a){return this.yu(a,Xc.bG)};var K=[];a.prototype.qc=function(a){var b,c,d;a.Ua();this.mw(a.V,a.Eb,K);b=0;for(c=
K.length;b<c;++b)if(d=K[b],d.na.solidEnabled&&this.ze(a,d))return E(K),d;E(K);return null};a.prototype.rF=function(a){var b,c,d;this.mw(null,a,K);b=0;for(c=K.length;b<c;++b)if(d=K[b],d.na.solidEnabled&&this.su(a,d))return E(K),d;E(K);return null};var M=[];a.prototype.Ki=function(a,b){var c=null;b&&(c=M,E(c));a.Ua();this.mD(a.V,a.Eb,K);var d,f,g;d=0;for(f=K.length;d<f;++d)if(g=K[d],g.na.jumpthruEnabled&&this.ze(a,g))if(b)c.push(g);else return E(K),g;E(K);return c};a.prototype.Re=function(a,b,c,d,f,
g){d=d||50;var e=a.x,h=a.y,k,m=null,l=null;for(k=0;k<d;k++)if(a.x=e+b*k,a.y=h+c*k,a.ba(),!this.ze(a,m)&&((m=this.qc(a))&&(l=m),!m&&(f&&(g?m=this.ze(a,g)?g:null:m=this.Ki(a),m&&(l=m)),!m)))return l&&this.aq(a,b,c,l),!0;a.x=e;a.y=h;a.ba();return!1};a.prototype.by=function(a,b,c,d){d=d||50;var f=a.x,g=a.y,e=null,h=null,k,m,l;for(k=0;k<d;++k)for(m=0;2>m;++m)if(l=2*m-1,a.x=f+b*k*l,a.y=g+c*k*l,a.ba(),!this.ze(a,e))if(e=this.qc(a))h=e;else return h&&this.aq(a,b*l,c*l,h),!0;a.x=f;a.y=g;a.ba();return!1};a.prototype.aq=
function(a,b,c,d){var f=2,g,e=!1;g=!1;for(var h=a.x,k=a.y;16>=f;)g=1/f,f*=2,a.x+=b*g*(e?1:-1),a.y+=c*g*(e?1:-1),a.ba(),this.ze(a,d)?g=e=!0:(g=e=!1,h=a.x,k=a.y);g&&(a.x=h,a.y=k,a.ba())};a.prototype.Pt=function(a,b){var c=ma(b)?100:b,d=0,f=a.x,g=a.y,e=0,h=0,k=0,m=this.qc(a);if(!m)return!0;for(;d<=c;){switch(e){case 0:h=0;k=-1;d++;break;case 1:h=1;k=-1;break;case 2:h=1;k=0;break;case 3:k=h=1;break;case 4:h=0;k=1;break;case 5:h=-1;k=1;break;case 6:h=-1;k=0;break;case 7:k=h=-1}e=(e+1)%8;a.x=xa(f+h*d);
a.y=xa(g+k*d);a.ba();if(!this.ze(a,m)&&(m=this.qc(a),!m))return!0}a.x=f;a.y=g;a.ba();return!1};a.prototype.kf=function(a,b){a.tg&&b.tg&&this.Oj.push([a,b])};a.prototype.pB=function(a,b,c){var d,f,g;d=0;for(f=this.Oj.length;d<f;++d){g=this.Oj[d];if(g[0]===a)g=g[1];else if(g[1]===a)g=g[0];else continue;if(b.Da){if(-1===b.Gj.indexOf(b))continue}else if(g.type!==b)continue;-1===c.indexOf(g)&&c.push(g)}};a.prototype.DB=function(a,b){var c,d,f;c=0;for(d=this.Oj.length;c<d;c++)if(f=this.Oj[c],f[0]===a&&
f[1]===b||f[0]===b&&f[1]===a)return!0;return!1};a.prototype.AB=function(a,b,c){var d=a.x,f=a.y,g=sa(10,bb(b,c,d,f)),e=Va(b,c,d,f),h=this.qc(a);if(!h)return Sa(e+ua);var k=h,m,l,n,p,v=I(5);for(m=1;36>m;m++)if(l=e-m*v,a.x=b+Math.cos(l)*g,a.y=c+Math.sin(l)*g,a.ba(),!this.ze(a,k)&&(k=this.qc(a),!k)){n=l;break}36===m&&(n=Sa(e+ua));k=h;for(m=1;36>m;m++)if(l=e+m*v,a.x=b+Math.cos(l)*g,a.y=c+Math.sin(l)*g,a.ba(),!this.ze(a,k)&&(k=this.qc(a),!k)){p=l;break}36===m&&(p=Sa(e+ua));a.x=d;a.y=f;a.ba();if(p===n)return p;
a=Wa(p,n)/2;a=Ya(p,n)?Sa(n+a+ua):Sa(p+a);n=Math.cos(e);e=Math.sin(e);p=Math.cos(a);a=Math.sin(a);b=n*p+e*a;return Va(0,0,n-2*b*p,e-2*b*a)};var ca=-1;a.prototype.trigger=function(a,b,c){if(!this.$a)return!1;var d=this.$a.hj;if(!d)return!1;var f=!1,g,e,h;ca++;var k=d.Hr;e=0;for(h=k.length;e<h;++e)g=this.Sy(a,b,k[e],c),f=f||g;g=this.Sy(a,b,d,c);ca--;return f||g};a.prototype.Sy=function(a,b,c,d){var f=!1,g,e,h,k;if(b)for(h=this.wu(a,b,b.type.name,c,d),f=f||h,k=b.type.ac,g=0,e=k.length;g<e;++g)h=this.wu(a,
b,k[g].name,c,d),f=f||h;else h=this.wu(a,b,"system",c,d),f=f||h;return f};a.prototype.wu=function(a,b,c,d,f){var g,e=!1,h=!1,h="undefined"!==typeof f,k=(h?d.Wv:d.Ty)[c];if(!k)return e;var m=null;d=0;for(g=k.length;d<g;++d)if(k[d].method==a){m=k[d].Ql;break}if(!m)return e;var l;h?l=m[f]:l=m;if(!l)return null;d=0;for(g=l.length;d<g;d++)a=l[d][0],f=l[d][1],h=this.WC(b,c,a,f),e=e||h;return e};a.prototype.WC=function(a,b,c,d){var f,g,e=!1;this.xu++;var h=this.Tc().Pc;h&&this.gn(h.Ji);var k=1<this.xu;this.gn(c.Ji);
k&&this.ME();var m=this.$p(c);m.Pc=c;a&&(f=this.types[b].gb(),f.zb=!1,E(f.J),f.J[0]=a,this.types[b].sf());a=!0;if(c.parent){b=m.Ky;for(f=c.parent;f;)b.push(f),f=f.parent;b.reverse();f=0;for(g=b.length;f<g;f++)if(!b[f].YE()){a=!1;break}}a&&(this.jj++,c.Hf?c.XE(d):c.Jc(),e=e||m.xj);this.Vp();k&&this.FE();this.uh(c.Ji);h&&this.uh(h.Ji);this.fi&&0===this.df&&0===ca&&!this.Ns&&this.Dd();this.xu--;return e};a.prototype.ds=function(){var a=this.Tc();return a.Pc.Oc[a.Nc]};a.prototype.gD=function(){var a=
this.Tc();return a.Pc.rf[a.ge]};a.prototype.ME=function(){this.wp++;this.wp>=this.ot.length&&this.ot.push([])};a.prototype.FE=function(){this.wp--};a.prototype.iw=function(){return this.ot[this.wp]};a.prototype.$p=function(a){this.Co++;this.Co>=this.Rr.length&&this.Rr.push(new Ac);var b=this.Tc();b.reset(a);return b};a.prototype.Vp=function(){this.Co--};a.prototype.Tc=function(){return this.Rr[this.Co]};a.prototype.NE=function(){this.yp++;this.yp>=this.qt.length&&this.qt.push(ba({name:void 0,index:0,
nd:!1}));var a=this.hD();a.name=void 0;a.index=0;a.nd=!1;return a};a.prototype.GE=function(){this.yp--};a.prototype.hD=function(){return this.qt[this.yp]};a.prototype.jw=function(a,b){for(var c,d,f,g,e,h;b;){c=0;for(d=b.Lf.length;c<d;c++)if(h=b.Lf[c],h instanceof Bc&&Ib(a,h.name))return h;b=b.parent}c=0;for(d=this.$g.length;c<d;c++)for(e=this.$g[c],f=0,g=e.bi.length;f<g;f++)if(h=e.bi[f],h instanceof Bc&&Ib(a,h.name))return h;return null};a.prototype.kw=function(a){var b,c;b=0;for(c=this.Yf.length;b<
c;b++)if(this.Yf[b].ab===a)return this.Yf[b];return null};a.prototype.uk=function(a){var b,c;b=0;for(c=this.ua.length;b<c;b++)if(this.ua[b].ab===a)return this.ua[b];return null};a.prototype.jD=function(a){var b,c;b=0;for(c=this.Th.length;b<c;b++)if(this.Th[b].ab===a)return this.Th[b];return null};a.prototype.OB=function(a,b){this.sn=[a,b];this.yb=!0};a.prototype.HD=function(){var a=this,c=this.bu,g=this.lh,e=this.rp,h=!1;this.Cy&&(h=!0,c="__c2_continuouspreview",this.Cy=!1);if(c.length){this.Dd();
g=this.bF();if(b()&&!this.Od)d(c,g,function(){ia("Saved state to IndexedDB storage ("+g.length+" bytes)");a.lh=g;a.trigger(R.prototype.G.Zq,null);a.lh="";h&&f()},function(b){try{localStorage.setItem("__c2save_"+c,g),ia("Saved state to WebStorage ("+g.length+" bytes)"),a.lh=g,a.trigger(R.prototype.G.Zq,null),a.lh="",h&&f()}catch(d){ia("Failed to save game state: "+b+"; "+d),a.trigger(R.prototype.G.cv,null)}});else try{localStorage.setItem("__c2save_"+c,g),ia("Saved state to WebStorage ("+g.length+
" bytes)"),a.lh=g,this.trigger(R.prototype.G.Zq,null),a.lh="",h&&f()}catch(m){ia("Error saving to WebStorage: "+m),a.trigger(R.prototype.G.cv,null)}this.rp=this.bu="";this.Yc=null}if(e.length){if(b()&&!this.Od)k(e,function(b){b?(a.Yc=b,ia("Loaded state from IndexedDB storage ("+a.Yc.length+" bytes)")):(a.Yc=localStorage.getItem("__c2save_"+e)||"",ia("Loaded state from WebStorage ("+a.Yc.length+" bytes)"));a.vn=!1;a.Yc||(a.Yc=null,a.trigger(R.prototype.G.Pn,null))},function(){a.Yc=localStorage.getItem("__c2save_"+
e)||"";ia("Loaded state from WebStorage ("+a.Yc.length+" bytes)");a.vn=!1;a.Yc||(a.Yc=null,a.trigger(R.prototype.G.Pn,null))});else{try{this.Yc=localStorage.getItem("__c2save_"+e)||"",ia("Loaded state from WebStorage ("+this.Yc.length+" bytes)")}catch(l){this.Yc=null}this.vn=!1;a.Yc||(a.Yc=null,a.trigger(R.prototype.G.Pn,null))}this.bu=this.rp=""}null!==this.Yc&&(this.Dd(),this.bE(this.Yc)?(this.lh=this.Yc,this.trigger(R.prototype.G.rA,null),this.lh=""):a.trigger(R.prototype.G.Pn,null),this.Yc=null)};
a.prototype.bF=function(){var a,b,c,d,f,e,h,k={c2save:!0,version:1,rt:{time:this.Wc.ib,walltime:this.Ih.ib,timescale:this.Ng,tickcount:this.Ae,execcount:this.jj,next_uid:this.Rm,running_layout:this.$a.ab,start_time_offset:Date.now()-this.xq},types:{},layouts:{},events:{groups:{},cnds:{},acts:{},vars:{}}};a=0;for(b=this.ua.length;a<b;a++)if(f=this.ua[a],!f.Da&&!this.zu(f)){e={instances:[]};ib(f.na)&&(e.ex=g(f.na));c=0;for(d=f.J.length;c<d;c++)e.instances.push(this.au(f.J[c]));k.types[f.ab.toString()]=
e}a=0;for(b=this.Yf.length;a<b;a++)c=this.Yf[a],k.layouts[c.ab.toString()]=c.Nb();d=k.events.groups;a=0;for(b=this.Th.length;a<b;a++)c=this.Th[a],d[c.ab.toString()]=this.cm[c.$l].wk;b=k.events.cnds;for(h in this.Wh)this.Wh.hasOwnProperty(h)&&(a=this.Wh[h],ib(a.na)&&(b[h]={ex:g(a.na)}));b=k.events.acts;for(h in this.Rh)this.Rh.hasOwnProperty(h)&&(a=this.Rh[h],ib(a.na)&&(b[h]={ex:g(a.na)}));b=k.events.vars;for(h in this.pl)this.pl.hasOwnProperty(h)&&(a=this.pl[h],a.gp||a.parent&&!a.um||(b[h]=a.data));
k.system=this.Lg.Nb();return JSON.stringify(k)};a.prototype.gy=function(){var a,b,c,d,f,g;this.ph={};a=0;for(b=this.ua.length;a<b;a++)if(c=this.ua[a],!c.Da)for(d=0,f=c.J.length;d<f;d++)g=c.J[d],this.ph[g.uid.toString()]=g};a.prototype.bE=function(a){var b;try{b=JSON.parse(a)}catch(c){return!1}if(!b.c2save||1<b.version)return!1;this.lm=!0;a=b.rt;this.Wc.reset();this.Wc.ib=a.time;this.Ih.reset();this.Ih.ib=a.walltime||0;this.Ng=a.timescale;this.Ae=a.tickcount;this.jj=a.execcount;this.xq=Date.now()-
a.start_time_offset;var d=a.running_layout;if(d!==this.$a.ab)if(d=this.kw(d))this.Rv(d);else return;var f,g,e,h,k,m,l;m=b.types;for(g in m)if(m.hasOwnProperty(g)&&(h=this.uk(parseInt(g,10)))&&!h.Da&&!this.zu(h)){m[g].ex?h.na=m[g].ex:jb(h.na);k=h.J;e=m[g].instances;d=0;for(f=ta(k.length,e.length);d<f;d++)this.sp(k[d],e[d]);d=e.length;for(f=k.length;d<f;d++)this.Pg(k[d]);d=k.length;for(f=e.length;d<f;d++){k=null;if(h.Za.ki&&(k=this.$a.To(e[d].w.l),!k))continue;k=this.Zh(h.wf,k,!1,0,0,!0);this.sp(k,
e[d])}h.hl=!0}this.Dd();this.gy();f=b.layouts;for(g in f)f.hasOwnProperty(g)&&(d=this.kw(parseInt(g,10)))&&d.Qb(f[g]);f=b.events.groups;for(g in f)f.hasOwnProperty(g)&&(d=this.jD(parseInt(g,10)))&&this.cm[d.$l]&&this.cm[d.$l].oy(f[g]);d=b.events.cnds;for(g in this.Wh)this.Wh.hasOwnProperty(g)&&(d.hasOwnProperty(g)?this.Wh[g].na=d[g].ex:this.Wh[g].na={});d=b.events.acts;for(g in this.Rh)this.Rh.hasOwnProperty(g)&&(d.hasOwnProperty(g)?this.Rh[g].na=d[g].ex:this.Rh[g].na={});d=b.events.vars;for(g in d)d.hasOwnProperty(g)&&
this.pl.hasOwnProperty(g)&&(this.pl[g].data=d[g]);this.Rm=a.next_uid;this.lm=!1;d=0;for(f=this.Go.length;d<f;++d)k=this.Go[d],this.trigger(Object.getPrototypeOf(k.type.Za).G.ck,k);E(this.Go);this.Lg.Qb(b.system);d=0;for(f=this.ua.length;d<f;d++)if(h=this.ua[d],!h.Da&&!this.zu(h))for(b=0,g=h.J.length;b<g;b++){k=h.J[b];if(h.Pd)for(m=k.Zl(),E(k.siblings),a=0,e=h.Ge.length;a<e;a++)l=h.Ge[a],h!==l&&k.siblings.push(l.J[m]);k.Ue&&k.Ue();if(k.Ea)for(a=0,e=k.Ea.length;a<e;a++)m=k.Ea[a],m.Ue&&m.Ue()}return this.yb=
!0};a.prototype.au=function(a,b){var c,d,f,e,h;e=a.type;f=e.Za;var k={};b?k.c2=!0:k.uid=a.uid;ib(a.na)&&(k.ex=g(a.na));if(a.Vc&&a.Vc.length)for(k.ivs={},c=0,d=a.Vc.length;c<d;c++)k.ivs[a.type.Gs[c].toString()]=a.Vc[c];if(f.ki){f={x:a.x,y:a.y,w:a.width,h:a.height,l:a.V.ab,zi:a.Af()};0!==a.M&&(f.a=a.M);1!==a.opacity&&(f.o=a.opacity);.5!==a.je&&(f.hX=a.je);.5!==a.ke&&(f.hY=a.ke);0!==a.Fd&&(f.bm=a.Fd);a.visible||(f.v=a.visible);a.tg||(f.ce=a.tg);-1!==a.Qm&&(f.mts=a.Qm);if(e.Qa.length)for(f.fx=[],c=0,
d=e.Qa.length;c<d;c++)h=e.Qa[c],f.fx.push({name:h.name,active:a.Qh[h.index],params:a.hc[h.index]});k.w=f}if(a.Ea&&a.Ea.length)for(k.behs={},c=0,d=a.Ea.length;c<d;c++)e=a.Ea[c],e.Nb&&(k.behs[e.type.ab.toString()]=e.Nb());a.Nb&&(k.data=a.Nb());return k};a.prototype.lD=function(a,b){var c,d;c=0;for(d=a.Gs.length;c<d;c++)if(a.Gs[c]===b)return c;return-1};a.prototype.eD=function(a,b){var c,d;c=0;for(d=a.Ea.length;c<d;c++)if(a.Ea[c].type.ab===b)return c;return-1};a.prototype.sp=function(a,b,c){var d,f,
g,e,h;h=a.type;var k=h.Za;if(c){if(!b.c2)return}else a.uid=b.uid;b.ex?a.na=b.ex:jb(a.na);if(f=b.ivs)for(d in f)f.hasOwnProperty(d)&&(g=this.lD(h,parseInt(d,10)),0>g||g>=a.Vc.length||(e=f[d],null===e&&(e=NaN),a.Vc[g]=e));if(k.ki){g=b.w;a.V.ab!==g.l&&(f=a.V,a.V=this.$a.To(g.l),a.V?(f.cl(a,!0),a.V.El(a,!0),a.ba(),a.V.nn(0)):(a.V=f,c||this.Pg(a)));a.x=g.x;a.y=g.y;a.width=g.w;a.height=g.h;a.gg=g.zi;a.M=g.hasOwnProperty("a")?g.a:0;a.opacity=g.hasOwnProperty("o")?g.o:1;a.je=g.hasOwnProperty("hX")?g.hX:.5;
a.ke=g.hasOwnProperty("hY")?g.hY:.5;a.visible=g.hasOwnProperty("v")?g.v:!0;a.tg=g.hasOwnProperty("ce")?g.ce:!0;a.Qm=g.hasOwnProperty("mts")?g.mts:-1;a.Fd=g.hasOwnProperty("bm")?g.bm:0;a.Hl=Db(a.Fd);this.za&&Gb(a,a.Fd,this.za);a.ba();if(g.hasOwnProperty("fx"))for(c=0,f=g.fx.length;c<f;c++)e=h.gs(g.fx[c].name),0>e||(a.Qh[e]=g.fx[c].active,a.hc[e]=g.fx[c].params);a.fg()}if(h=b.behs)for(d in h)h.hasOwnProperty(d)&&(c=this.eD(a,parseInt(d,10)),0>c||a.Ea[c].Qb(h[d]));b.data&&a.Qb(b.data)};a.prototype.Xv=
function(a,b,c){window.resolveLocalFileSystemURL(cordova.file.applicationDirectory+"www/"+a,function(a){a.file(b,c)},c)};a.prototype.Zv=function(a,b,c){this.Xv(a,function(a){var d=new FileReader;d.onload=function(a){b(a.target.result)};d.onerror=c;d.readAsText(a)},c)};var X=[],C=0;a.prototype.wt=function(){if(X.length&&!(8<=C)){C++;var a=X.shift();this.UB(a.filename,a.pF,a.tC)}};a.prototype.Yv=function(a,b,c){var d=this;X.push({filename:a,pF:function(a){C--;d.wt();b(a)},tC:function(a){C--;d.wt();
c(a)}});this.wt()};a.prototype.UB=function(a,b,c){this.Xv(a,function(a){var c=new FileReader;c.onload=function(a){b(a.target.result)};c.readAsArrayBuffer(a)},c)};a.prototype.XC=function(a,b,c){var d="",f=a.toLowerCase(),g=f.substr(f.length-4),f=f.substr(f.length-5);".mp4"===g?d="video/mp4":".webm"===f?d="video/webm":".m4a"===g?d="audio/mp4":".mp3"===g&&(d="audio/mpeg");this.Yv(a,function(a){a=URL.createObjectURL(new Blob([a],{type:d}));b(a)},c)};a.prototype.Aw=function(a){return/^(?:[a-z]+:)?\/\//.test(a)||
"data:"===a.substr(0,5)||"blob:"===a.substr(0,5)};a.prototype.qy=function(a,b){this.rm&&!this.Aw(b)?this.XC(b,function(b){a.src=b},function(a){alert("Failed to load image: "+a)}):a.src=b};a.prototype.oq=function(a,b){"undefined"!==typeof a.imageSmoothingEnabled?a.imageSmoothingEnabled=b:(a.webkitImageSmoothingEnabled=b,a.mozImageSmoothingEnabled=b,a.msImageSmoothingEnabled=b)};Cc=function(b){return new a(document.getElementById(b))};Dc=function(b,c){return new a({dc:!0,width:b,height:c})};window.cr_createRuntime=
Cc;window.cr_createDCRuntime=Dc;window.createCocoonJSRuntime=function(){window.c2cocoonjs=!0;var b=document.createElement("screencanvas")||document.createElement("canvas");b.k=!0;document.body.appendChild(b);b=new a(b);window.c2runtime=b;window.addEventListener("orientationchange",function(){window.c2runtime.setSize(window.innerWidth,window.innerHeight)});window.c2runtime.setSize(window.innerWidth,window.innerHeight);return b};window.createEjectaRuntime=function(){var b=new a(document.getElementById("canvas"));
window.c2runtime=b;window.c2runtime.setSize(window.innerWidth,window.innerHeight);return b}})();window.cr_getC2Runtime=function(){var a=document.getElementById("c2canvas");return a?a.c2runtime:window.c2runtime?window.c2runtime:null};window.cr_getSnapshot=function(a,c){var b=window.cr_getC2Runtime();b&&b.OB(a,c)};window.cr_sizeCanvas=function(a,c){if(0!==a&&0!==c){var b=window.cr_getC2Runtime();b&&b.setSize(a,c)}};window.cr_setSuspended=function(a){var c=window.cr_getC2Runtime();c&&c.setSuspended(a)};
(function(){function a(a,b){this.j=a;this.hj=null;this.scrollX=this.j.Hc/2;this.scrollY=this.j.Gc/2;this.scale=1;this.M=0;this.rk=!0;this.name=b[0];this.yE=b[1];this.xE=b[2];this.width=b[1];this.height=b[2];this.Vy=b[3];this.Ay=b[4];this.ab=b[5];var c=b[6],d,f;this.Ta=[];this.hm=[];d=0;for(f=c.length;d<f;d++){var g=new Gc(this,c[d]);g.Ax=d;this.Ta.push(g)}c=b[7];this.gi=[];d=0;for(f=c.length;d<f;d++){var g=c[d],e=this.j.ua[g[1]];e.wf||(e.wf=g);this.gi.push(g);-1===this.hm.indexOf(e)&&this.hm.push(e)}this.Qa=
[];this.xb=[];this.Ah=!0;this.hc=[];d=0;for(f=b[8].length;d<f;d++)this.Qa.push({id:b[8][d][0],name:b[8][d][1],Kc:-1,$f:!1,Pb:!0,index:d}),this.hc.push(b[8][d][2].slice(0));this.fg();this.Ci=new Aa(0,0,1,1);this.Tt=new Aa(0,0,1,1);this.Ai={}}function c(a,b){return a.gg-b.gg}function b(a,b){this.ic=a;this.j=a.j;this.J=[];this.scale=1;this.M=0;this.Yg=!1;this.Fh=new Aa(0,0,0,0);this.Qy=new Ba;this.Hb=this.Cb=this.Ib=this.Bb=0;this.Zj=!1;this.Lh=-1;this.ur=0;this.name=b[0];this.index=b[1];this.ab=b[2];
this.visible=b[3];this.Rf=b[4];this.eg=b[5];this.oe=b[6];this.pe=b[7];this.opacity=b[8];this.No=b[9];this.of=b[10];this.Wd=b[11];this.Fd=b[12];this.oC=b[13];this.Hl="source-over";this.Ld=this.Rd=0;this.Bd=null;this.mh=e();this.ag=!0;this.Jk=new Aa(0,0,-1,-1);this.sd=new Aa(0,0,-1,-1);this.of&&(this.Bd=new Cb(this.j.Hc,this.j.Gc));this.Jg=!1;var c=b[14],d,f;this.Gy=[];this.bf=[];this.Kl=[];d=0;for(f=c.length;d<f;d++){var g=c[d],h=this.j.ua[g[1]];h.wf||(h.wf=g,h.MB=this.index);this.bf.push(g);-1===
this.ic.hm.indexOf(h)&&this.ic.hm.push(h)}Ia(this.Gy,this.bf);this.Qa=[];this.xb=[];this.Ah=!0;this.hc=[];d=0;for(f=b[15].length;d<f;d++)this.Qa.push({id:b[15][d][0],name:b[15][d][1],Kc:-1,$f:!1,Pb:!0,index:d}),this.hc.push(b[15][d][2].slice(0));this.fg();this.Ci=new Aa(0,0,1,1);this.Tt=new Aa(0,0,1,1)}function e(){return g.length?g.pop():[]}function d(a){E(a);g.push(a)}a.prototype.aF=function(a){var b=a.type.ab.toString();this.Ai.hasOwnProperty(b)||(this.Ai[b]=[]);this.Ai[b].push(this.j.au(a))};
a.prototype.pw=function(){var a=this.Ta[0];return!a.eg&&1===a.opacity&&!a.No&&a.visible};a.prototype.fg=function(){E(this.xb);this.Ah=!0;var a,b,c;a=0;for(b=this.Qa.length;a<b;a++)c=this.Qa[a],c.Pb&&(this.xb.push(c),c.$f||(this.Ah=!1))};a.prototype.es=function(a){var b,c,d;b=0;for(c=this.Qa.length;b<c;b++)if(d=this.Qa[b],d.name===a)return d;return null};var k=[],f=!0;a.prototype.pu=function(){this.Ay&&(this.hj=this.j.Sr[this.Ay],this.hj.Bu());this.j.$a=this;this.width=this.yE;this.height=this.xE;
this.scrollX=this.j.Hc/2;this.scrollY=this.j.Gc/2;var a,b,d,g,e,h,l;a=0;for(d=this.j.ua.length;a<d;a++)if(b=this.j.ua[a],!b.Da)for(e=b.J,b=0,g=e.length;b<g;b++)if(h=e[b],h.V){var v=h.V.Ax;v>=this.Ta.length&&(v=this.Ta.length-1);h.V=this.Ta[v];-1===h.V.J.indexOf(h)&&h.V.J.push(h);h.V.Zj=!0}if(!f)for(a=0,d=this.Ta.length;a<d;++a)this.Ta[a].J.sort(c);E(k);this.yB();a=0;for(d=this.Ta.length;a<d;a++)h=this.Ta[a],h.LB(),h.Nq();e=!1;if(!this.rk){for(l in this.Ai)if(this.Ai.hasOwnProperty(l)&&(b=this.j.uk(parseInt(l,
10)))&&!b.Da&&this.j.Au(b)){g=this.Ai[l];a=0;for(d=g.length;a<d;a++){h=null;if(b.Za.ki&&(h=this.To(g[a].w.l),!h))continue;h=this.j.Zh(b.wf,h,!1,0,0,!0);this.j.sp(h,g[a]);e=!0;k.push(h)}E(g)}a=0;for(d=this.Ta.length;a<d;a++)this.Ta[a].J.sort(c),this.Ta[a].Zj=!0}e&&(this.j.Dd(),this.j.gy());for(a=0;a<k.length;a++)if(h=k[a],h.type.Pd)for(d=h.Zl(),b=0,g=h.type.Ge.length;b<g;b++)l=h.type.Ge[b],h.type!==l&&(l.J.length>d?h.siblings.push(l.J[d]):l.wf&&(e=this.j.Zh(l.wf,h.V,!0,h.x,h.y,!0),this.j.Dd(),l.Lq(),
h.siblings.push(e),k.push(e)));a=0;for(d=this.gi.length;a<d;a++)h=this.gi[a],b=this.j.ua[h[1]],b.Pd||this.j.Zh(this.gi[a],null,!0);this.j.$i=null;this.j.Dd();if(this.j.$b&&!this.j.Kb)for(a=0,d=this.j.ua.length;a<d;a++)l=this.j.ua[a],!l.Da&&l.J.length&&l.Yp&&l.Yp(this.j.$b);if(this.j.lm)Ia(this.j.Go,k);else for(a=0,d=k.length;a<d;a++)h=k[a],this.j.trigger(Object.getPrototypeOf(h.type.Za).G.ck,h);E(k);this.j.lm||this.j.trigger(R.prototype.G.Uu,null);this.rk=!1};a.prototype.KB=function(){var a,b,c,d,
f;b=a=0;for(c=this.gi.length;a<c;a++)d=this.gi[a],f=this.j.ua[d[1]],f.global?f.Pd||this.j.Zh(d,null,!0):(this.gi[b]=d,b++);Ha(this.gi,b)};a.prototype.lF=function(){this.j.lm||this.j.trigger(R.prototype.G.qA,null);this.j.Ks=!0;E(this.j.Lg.Be);var a,b,c,d,g,e;if(!this.rk)for(a=0,b=this.Ta.length;a<b;a++)for(this.Ta[a].Du(),g=this.Ta[a].J,c=0,d=g.length;c<d;c++)e=g[c],e.type.global||this.j.Au(e.type)&&this.aF(e);a=0;for(b=this.Ta.length;a<b;a++){g=this.Ta[a].J;c=0;for(d=g.length;c<d;c++)e=g[c],e.type.global||
this.j.Pg(e);this.j.Dd();E(g);this.Ta[a].Zj=!0}a=0;for(b=this.j.ua.length;a<b;a++)if(g=this.j.ua[a],!(g.global||g.Za.ki||g.Za.tq||g.Da)){c=0;for(d=g.J.length;c<d;c++)this.j.Pg(g.J[c]);this.j.Dd()}f=!1;this.j.Ks=!1};new Aa(0,0,0,0);a.prototype.Ye=function(a){var b,c=a,d=!1,f=!this.j.Ze;f&&(this.j.qp||(this.j.qp=document.createElement("canvas"),b=this.j.qp,b.width=this.j.Ia,b.height=this.j.Ha,this.j.Rw=b.getContext("2d"),d=!0),b=this.j.qp,c=this.j.Rw,b.width!==this.j.Ia&&(b.width=this.j.Ia,d=!0),b.height!==
this.j.Ha&&(b.height=this.j.Ha,d=!0),d&&this.j.oq(c,this.j.Tb));c.globalAlpha=1;c.globalCompositeOperation="source-over";this.j.Hv&&!this.pw()&&c.clearRect(0,0,this.j.Ia,this.j.Ha);var g,e,d=0;for(g=this.Ta.length;d<g;d++)e=this.Ta[d],e.visible&&0<e.opacity&&11!==e.Fd&&(e.J.length||!e.eg)?e.Ye(c):e.Nq();f&&a.drawImage(b,0,0,this.j.width,this.j.height)};a.prototype.ej=function(a){a.ny(!0);this.j.Fc||(this.j.Fc=a.We(this.j.Ia,this.j.Ha,this.j.Tb));if(this.j.Fc.Yi!==this.j.Ia||this.j.Fc.Xi!==this.j.Ha)a.deleteTexture(this.j.Fc),
this.j.Fc=a.We(this.j.Ia,this.j.Ha,this.j.Tb);a.Kf(this.j.Fc);this.j.Ze||a.zh(this.j.Ia,this.j.Ha);var b,c;for(b=this.Ta.length-1;0<=b;--b)c=this.Ta[b],c.visible&&1===c.opacity&&c.Ah&&0===c.Fd&&(c.J.length||!c.eg)?c.ej(a):c.Nq();a.ny(!1)};a.prototype.Md=function(a){var b=0<this.xb.length||this.j.nl||!this.j.Ze||this.j.Sb;if(b){this.j.Fc||(this.j.Fc=a.We(this.j.Ia,this.j.Ha,this.j.Tb));if(this.j.Fc.Yi!==this.j.Ia||this.j.Fc.Xi!==this.j.Ha)a.deleteTexture(this.j.Fc),this.j.Fc=a.We(this.j.Ia,this.j.Ha,
this.j.Tb);a.Kf(this.j.Fc);this.j.Ze||a.zh(this.j.Ia,this.j.Ha)}else this.j.Fc&&(a.Kf(null),a.deleteTexture(this.j.Fc),this.j.Fc=null);this.j.Hv&&!this.pw()&&a.clear(0,0,0,0);var c,d,f;c=0;for(d=this.Ta.length;c<d;c++)f=this.Ta[c],f.visible&&0<f.opacity&&(f.J.length||!f.eg)?f.Md(a):f.Nq();b&&(0===this.xb.length||1===this.xb.length&&this.j.Ze?(1===this.xb.length?(b=this.xb[0].index,a.xe(this.xb[0].Kc),a.el(null,1/this.j.Ia,1/this.j.Ha,0,0,1,1,this.scale,this.M,0,0,this.j.Ia/2,this.j.Ha/2,this.j.Wc.ib,
this.hc[b]),a.Zp(this.xb[0].Kc)&&(this.j.yb=!0)):a.xe(0),this.j.Ze||a.zh(this.j.width,this.j.height),a.Kf(null),a.my(!1),a.Hi(1),a.we(this.j.Fc),a.jy(),a.Jf(),a.nf(),b=this.j.width/2,c=this.j.height/2,a.bl(-b,c,b,c,b,-c,-b,-c),a.we(null),a.my(!0)):this.Wt(a,null,null,null))};a.prototype.Xl=function(){return 0<this.xb.length||this.j.nl||!this.j.Ze||this.j.Sb?this.j.Fc:null};a.prototype.lw=function(){var a=this.Ta[0].ie(),b,c,d;b=1;for(c=this.Ta.length;b<c;b++)d=this.Ta[b],(0!==d.oe||0!==d.pe)&&d.ie()<
a&&(a=d.ie());return a};a.prototype.cu=function(a){if(!this.Vy){var b=1/this.lw()*this.j.Ia/2;a>this.width-b&&(a=this.width-b);a<b&&(a=b)}this.scrollX!==a&&(this.scrollX=a,this.j.yb=!0)};a.prototype.du=function(a){if(!this.Vy){var b=1/this.lw()*this.j.Ha/2;a>this.height-b&&(a=this.height-b);a<b&&(a=b)}this.scrollY!==a&&(this.scrollY=a,this.j.yb=!0)};a.prototype.yB=function(){this.cu(this.scrollX);this.du(this.scrollY)};a.prototype.Wt=function(a,b,c,d){var f=c?c.xb:b?b.xb:this.xb,g=1,e=0,h=0,k=0,l=
this.j.Ia,F=this.j.Ha;c?(g=c.V.ie(),e=c.V.tc(),h=c.V.Bb,k=c.V.Cb,l=c.V.Ib,F=c.V.Hb):b&&(g=b.ie(),e=b.tc(),h=b.Bb,k=b.Cb,l=b.Ib,F=b.Hb);var D=this.j.Zr,G,z,w,B,L=0,W=1,O,H,K=this.j.Ia,M=this.j.Ha,ca=K/2,X=M/2,C=b?b.Ci:this.Ci,P=b?b.Tt:this.Tt,J=0,Y=0,N=0,Q=0,Z=K,la=K,aa=M,va=M,wa=w=0;B=c?c.V.tc():0;if(c){G=0;for(z=f.length;G<z;G++)w+=a.qD(f[G].Kc),wa+=a.rD(f[G].Kc);Q=c.Eb;J=b.cc(Q.left,Q.top,!0,!0);N=b.cc(Q.left,Q.top,!1,!0);Z=b.cc(Q.right,Q.bottom,!0,!0);aa=b.cc(Q.right,Q.bottom,!1,!0);0!==B&&(G=
b.cc(Q.right,Q.top,!0,!0),z=b.cc(Q.right,Q.top,!1,!0),Y=b.cc(Q.left,Q.bottom,!0,!0),Q=b.cc(Q.left,Q.bottom,!1,!0),B=Math.min(J,Z,G,Y),Z=Math.max(J,Z,G,Y),J=B,B=Math.min(N,aa,z,Q),aa=Math.max(N,aa,z,Q),N=B);J-=w;N-=wa;Z+=w;aa+=wa;P.left=J/K;P.top=1-N/M;P.right=Z/K;P.bottom=1-aa/M;Y=J=xa(J);Q=N=xa(N);la=Z=ya(Z);va=aa=ya(aa);Y-=w;Q-=wa;la+=w;va+=wa;0>J&&(J=0);0>N&&(N=0);Z>K&&(Z=K);aa>M&&(aa=M);0>Y&&(Y=0);0>Q&&(Q=0);la>K&&(la=K);va>M&&(va=M);C.left=J/K;C.top=1-N/M;C.right=Z/K;C.bottom=1-aa/M}else C.left=
P.left=0,C.top=P.top=0,C.right=P.right=1,C.bottom=P.bottom=1;wa=c&&(a.cn(f[0].Kc)||0!==w||0!==wa||1!==c.opacity||c.type.Za.ux)||b&&!c&&1!==b.opacity;a.jy();if(wa){D[L]||(D[L]=a.We(K,M,this.j.Tb));if(D[L].Yi!==K||D[L].Xi!==M)a.deleteTexture(D[L]),D[L]=a.We(K,M,this.j.Tb);a.xe(0);a.Kf(D[L]);H=va-Q;a.clearRect(Y,M-Q-H,la-Y,H);c?c.Md(a):(a.we(this.j.Xc),a.Hi(b.opacity),a.Jf(),a.translate(-ca,-X),a.nf(),a.Gg(J,aa,Z,aa,Z,N,J,N,C));P.left=P.top=0;P.right=P.bottom=1;c&&(B=C.top,C.top=C.bottom,C.bottom=B);
L=1;W=0}a.Hi(1);w=f.length-1;var zb=a.Ot(f[w].Kc)||!b&&!c&&!this.j.Ze;G=B=0;for(z=f.length;G<z;G++){D[L]||(D[L]=a.We(K,M,this.j.Tb));if(D[L].Yi!==K||D[L].Xi!==M)a.deleteTexture(D[L]),D[L]=a.We(K,M,this.j.Tb);a.xe(f[G].Kc);B=f[G].index;a.Zp(f[G].Kc)&&(this.j.yb=!0);0!=G||wa?(a.el(d,1/K,1/M,P.left,P.top,P.right,P.bottom,g,e,h,k,(h+l)/2,(k+F)/2,this.j.Wc.ib,c?c.hc[B]:b?b.hc[B]:this.hc[B]),a.we(null),G!==w||zb?(a.Kf(D[L]),H=va-Q,O=M-Q-H,a.clearRect(Y,O,la-Y,H)):(c?a.Gi(c.Rd,c.Ld):b&&a.Gi(b.Rd,b.Ld),a.Kf(d)),
a.we(D[W]),a.Jf(),a.translate(-ca,-X),a.nf(),a.Gg(J,aa,Z,aa,Z,N,J,N,C),G!==w||zb||a.we(null)):(a.Kf(D[L]),H=va-Q,O=M-Q-H,a.clearRect(Y,O,la-Y,H),c?(c.ed&&c.ed.Ka?(O=c.ed.Ka,W=1/O.width,O=1/O.height):(W=1/c.width,O=1/c.height),a.el(d,W,O,P.left,P.top,P.right,P.bottom,g,e,h,k,(h+l)/2,(k+F)/2,this.j.Wc.ib,c.hc[B]),c.Md(a)):(a.el(d,1/K,1/M,0,0,1,1,g,e,h,k,(h+l)/2,(k+F)/2,this.j.Wc.ib,b?b.hc[B]:this.hc[B]),a.we(b?this.j.Xc:this.j.Fc),a.Jf(),a.translate(-ca,-X),a.nf(),a.Gg(J,aa,Z,aa,Z,N,J,N,C)),P.left=
P.top=0,P.right=P.bottom=1,c&&!zb&&(B=aa,aa=N,N=B));L=0===L?1:0;W=0===L?1:0}zb&&(a.xe(0),c?a.Gi(c.Rd,c.Ld):b?a.Gi(b.Rd,b.Ld):this.j.Ze||(a.zh(this.j.width,this.j.height),ca=this.j.width/2,X=this.j.height/2,N=J=0,Z=this.j.width,aa=this.j.height),a.Kf(d),a.we(D[W]),a.Jf(),a.translate(-ca,-X),a.nf(),c&&1===f.length&&!wa?a.Gg(J,N,Z,N,Z,aa,J,aa,C):a.Gg(J,aa,Z,aa,Z,N,J,N,C),a.we(null))};a.prototype.To=function(a){var b,c;b=0;for(c=this.Ta.length;b<c;b++)if(this.Ta[b].ab===a)return this.Ta[b];return null};
a.prototype.Nb=function(){var a,b,c,d={sx:this.scrollX,sy:this.scrollY,s:this.scale,a:this.M,w:this.width,h:this.height,fv:this.rk,persist:this.Ai,fx:[],layers:{}};a=0;for(b=this.Qa.length;a<b;a++)c=this.Qa[a],d.fx.push({name:c.name,active:c.Pb,params:this.hc[c.index]});a=0;for(b=this.Ta.length;a<b;a++)c=this.Ta[a],d.layers[c.ab.toString()]=c.Nb();return d};a.prototype.Qb=function(a){var b,c,d,f;this.scrollX=a.sx;this.scrollY=a.sy;this.scale=a.s;this.M=a.a;this.width=a.w;this.height=a.h;this.Ai=a.persist;
"undefined"!==typeof a.fv&&(this.rk=a.fv);var g=a.fx;b=0;for(c=g.length;b<c;b++)if(d=this.es(g[b].name))d.Pb=g[b].active,this.hc[d.index]=g[b].params;this.fg();b=a.layers;for(f in b)b.hasOwnProperty(f)&&(a=this.To(parseInt(f,10)))&&a.Qb(b[f])};qc=a;b.prototype.fg=function(){E(this.xb);this.Ah=!0;var a,b,c;a=0;for(b=this.Qa.length;a<b;a++)c=this.Qa[a],c.Pb&&(this.xb.push(c),c.$f||(this.Ah=!1))};b.prototype.es=function(a){var b,c,d;b=0;for(c=this.Qa.length;b<c;b++)if(d=this.Qa[b],d.name===a)return d;
return null};b.prototype.LB=function(){var a,b,c,d,f,g;b=a=0;for(c=this.bf.length;a<c;a++){d=this.bf[a];f=this.j.ua[d[1]];g=this.j.Au(f);f=!0;if(!g||this.ic.rk){d=this.j.Zh(d,this,!0);if(!d)continue;k.push(d);d.type.global&&(f=!1,this.Kl.push(d.uid))}f&&(this.bf[b]=this.bf[a],b++)}this.bf.length=b;this.j.Dd();!this.j.ta&&this.Qa.length&&(this.Fd=this.oC);this.Hl=Db(this.Fd);this.j.za&&Gb(this,this.Fd,this.j.za);this.ag=!0};b.prototype.cl=function(a,b){var c=Ka(this.J,a);0>c||(b&&this.of&&a.ue&&a.ue.right>=
a.ue.left&&(a.Ua(),this.Bd.update(a,a.ue,null),a.ue.set(0,0,-1,-1)),c===this.J.length-1?this.J.pop():(Fa(this.J,c),this.nn(c)),this.ag=!0)};b.prototype.El=function(a,b){a.gg=this.J.length;this.J.push(a);b&&this.of&&a.ue&&a.ba();this.ag=!0};b.prototype.JE=function(a){this.J.unshift(a);this.nn(0)};b.prototype.iE=function(a,b,c){var d=a.Af();b=b.Af();Fa(this.J,d);d<b&&b--;c&&b++;b===this.J.length?this.J.push(a):this.J.splice(b,0,a);this.nn(d<b?d:b)};b.prototype.nn=function(a){-1===this.Lh?this.Lh=a:
a<this.Lh&&(this.Lh=a);this.ag=this.Zj=!0};b.prototype.Du=function(){if(this.Zj){-1===this.Lh&&(this.Lh=0);var a,b,c;if(this.of)for(a=this.Lh,b=this.J.length;a<b;++a)c=this.J[a],c.gg=a,this.Bd.eE(c.ue);else for(a=this.Lh,b=this.J.length;a<b;++a)this.J[a].gg=a;this.Zj=!1;this.Lh=-1}};b.prototype.ie=function(a){return this.nD()*(this.j.Ze||a?this.j.Fl:1)};b.prototype.nD=function(){return(this.scale*this.ic.scale-1)*this.Wd+1};b.prototype.tc=function(){return this.Yg?0:Sa(this.ic.M+this.M)};var g=[],
h=[],l=[];b.prototype.ls=function(){this.Du();this.Bd.bq(this.Bb,this.Cb,this.Ib,this.Hb,l);if(!l.length)return e();if(1===l.length){var a=e();Ia(a,l[0]);E(l);return a}for(var b=!0;1<l.length;){for(var a=l,c=void 0,f=void 0,g=void 0,k=void 0,r=void 0,c=0,f=a.length;c<f-1;c+=2){var g=a[c],k=a[c+1],r=e(),v=g,y=k,A=r,F=0,D=0,G=0,z=v.length,w=y.length,B=void 0,L=void 0;for(A.length=z+w;F<z&&D<w;++G)B=v[F],L=y[D],B.gg<L.gg?(A[G]=B,++F):(A[G]=L,++D);for(;F<z;++F,++G)A[G]=v[F];for(;D<w;++D,++G)A[G]=y[D];
b||(d(g),d(k));h.push(r)}1===f%2&&(b?(g=e(),Ia(g,a[f-1]),h.push(g)):h.push(a[f-1]));Ia(a,h);E(h);b=!1}a=l[0];E(l);return a};b.prototype.Ye=function(a){this.Jg=this.No||1!==this.opacity||0!==this.Fd;var b=this.j.canvas,c=a,f=!1;this.Jg&&(this.j.pp||(this.j.pp=document.createElement("canvas"),b=this.j.pp,b.width=this.j.Ia,b.height=this.j.Ha,this.j.Qw=b.getContext("2d"),f=!0),b=this.j.pp,c=this.j.Qw,b.width!==this.j.Ia&&(b.width=this.j.Ia,f=!0),b.height!==this.j.Ha&&(b.height=this.j.Ha,f=!0),f&&this.j.oq(c,
this.j.Tb),this.eg&&c.clearRect(0,0,this.j.Ia,this.j.Ha));c.globalAlpha=1;c.globalCompositeOperation="source-over";this.eg||(c.fillStyle="rgb("+this.Rf[0]+","+this.Rf[1]+","+this.Rf[2]+")",c.fillRect(0,0,this.j.Ia,this.j.Ha));c.save();this.Yg=!0;var f=this.Zb(0,0,!0,!0),g=this.Zb(0,0,!1,!0);this.Yg=!1;this.j.hf&&(f=Math.round(f),g=Math.round(g));this.iq(f,g,c);var e=this.ie();c.scale(e,e);c.translate(-f,-g);this.of?(this.sd.left=this.Bd.ee(this.Bb),this.sd.top=this.Bd.fe(this.Cb),this.sd.right=this.Bd.ee(this.Ib),
this.sd.bottom=this.Bd.fe(this.Hb),this.ag||!this.sd.Pl(this.Jk)?(d(this.mh),f=this.ls(),this.ag=!1,this.Jk.Il(this.sd)):f=this.mh):f=this.J;for(var h,k=null,g=0,e=f.length;g<e;++g)h=f[g],h!==k&&(this.jC(h,c),k=h);this.of&&(this.mh=f);c.restore();this.Jg&&(a.globalCompositeOperation=this.Hl,a.globalAlpha=this.opacity,a.drawImage(b,0,0))};b.prototype.jC=function(a,b){if(a.visible&&0!==a.width&&0!==a.height){a.Ua();var c=a.Eb;c.right<this.Bb||c.bottom<this.Cb||c.left>this.Ib||c.top>this.Hb||(b.globalCompositeOperation=
a.Hl,a.Ye(b))}};b.prototype.Nq=function(){this.Yg=!0;var a=this.Zb(0,0,!0,!0),b=this.Zb(0,0,!1,!0);this.Yg=!1;this.j.hf&&(a=Math.round(a),b=Math.round(b));this.iq(a,b,null)};b.prototype.iq=function(a,b,c){var d=this.ie();this.Bb=a;this.Cb=b;this.Ib=a+1/d*this.j.Ia;this.Hb=b+1/d*this.j.Ha;this.Bb>this.Ib&&(a=this.Bb,this.Bb=this.Ib,this.Ib=a);this.Cb>this.Hb&&(a=this.Cb,this.Cb=this.Hb,this.Hb=a);a=this.tc();0!==a&&(c&&(c.translate(this.j.Ia/2,this.j.Ha/2),c.rotate(-a),c.translate(this.j.Ia/-2,this.j.Ha/
-2)),this.Fh.set(this.Bb,this.Cb,this.Ib,this.Hb),this.Fh.offset((this.Bb+this.Ib)/-2,(this.Cb+this.Hb)/-2),this.Qy.yy(this.Fh,a),this.Qy.Av(this.Fh),this.Fh.offset((this.Bb+this.Ib)/2,(this.Cb+this.Hb)/2),this.Bb=this.Fh.left,this.Cb=this.Fh.top,this.Ib=this.Fh.right,this.Hb=this.Fh.bottom)};b.prototype.ej=function(a){if(this.Jg=this.No){this.j.Xc||(this.j.Xc=a.We(this.j.Ia,this.j.Ha,this.j.Tb));if(this.j.Xc.Yi!==this.j.Ia||this.j.Xc.Xi!==this.j.Ha)a.deleteTexture(this.j.Xc),this.j.Xc=a.We(this.j.Ia,
this.j.Ha,this.j.Tb);a.Kf(this.j.Xc)}this.Yg=!0;var b=this.Zb(0,0,!0,!0),c=this.Zb(0,0,!1,!0);this.Yg=!1;this.j.hf&&(b=Math.round(b),c=Math.round(c));this.iq(b,c,null);b=this.ie();a.Jf();a.scale(b,b);a.jq(-this.tc());a.translate((this.Bb+this.Ib)/-2,(this.Cb+this.Hb)/-2);a.nf();this.of?(this.sd.left=this.Bd.ee(this.Bb),this.sd.top=this.Bd.fe(this.Cb),this.sd.right=this.Bd.ee(this.Ib),this.sd.bottom=this.Bd.fe(this.Hb),this.ag||!this.sd.Pl(this.Jk)?(d(this.mh),b=this.ls(),this.ag=!1,this.Jk.Il(this.sd)):
b=this.mh):b=this.J;for(var f,g=null,c=b.length-1;0<=c;--c)f=b[c],f!==g&&(this.lC(b[c],a),g=f);this.of&&(this.mh=b);this.eg||(this.ur=this.j.gj++,a.pq(this.ur),a.ky(1,1,1),a.fw(),a.TE())};b.prototype.Md=function(a){var b=0,c=0;if(this.Jg=this.No||1!==this.opacity||0<this.xb.length||0!==this.Fd){this.j.Xc||(this.j.Xc=a.We(this.j.Ia,this.j.Ha,this.j.Tb));if(this.j.Xc.Yi!==this.j.Ia||this.j.Xc.Xi!==this.j.Ha)a.deleteTexture(this.j.Xc),this.j.Xc=a.We(this.j.Ia,this.j.Ha,this.j.Tb);a.Kf(this.j.Xc);this.eg&&
a.clear(0,0,0,0)}this.eg||(this.j.Sb?(a.pq(this.ur),a.ky(this.Rf[0]/255,this.Rf[1]/255,this.Rf[2]/255),a.fw(),a.gF()):a.clear(this.Rf[0]/255,this.Rf[1]/255,this.Rf[2]/255,1));this.Yg=!0;var f=this.Zb(0,0,!0,!0),b=this.Zb(0,0,!1,!0);this.Yg=!1;this.j.hf&&(f=Math.round(f),b=Math.round(b));this.iq(f,b,null);f=this.ie();a.Jf();a.scale(f,f);a.jq(-this.tc());a.translate((this.Bb+this.Ib)/-2,(this.Cb+this.Hb)/-2);a.nf();this.of?(this.sd.left=this.Bd.ee(this.Bb),this.sd.top=this.Bd.fe(this.Cb),this.sd.right=
this.Bd.ee(this.Ib),this.sd.bottom=this.Bd.fe(this.Hb),this.ag||!this.sd.Pl(this.Jk)?(d(this.mh),b=this.ls(),this.ag=!1,this.Jk.Il(this.sd)):b=this.mh):b=this.J;var g,e,h=null,c=0;for(g=b.length;c<g;++c)e=b[c],e!==h&&(this.kC(b[c],a),h=e);this.of&&(this.mh=b);this.Jg&&(b=this.xb.length?this.xb[0].Kc:0,c=this.xb.length?this.xb[0].index:0,0===this.xb.length||1===this.xb.length&&!a.Ot(b)&&1===this.opacity?(1===this.xb.length?(a.xe(b),a.el(this.ic.Xl(),1/this.j.Ia,1/this.j.Ha,0,0,1,1,f,this.tc(),this.Bb,
this.Cb,(this.Bb+this.Ib)/2,(this.Cb+this.Hb)/2,this.j.Wc.ib,this.hc[c]),a.Zp(b)&&(this.j.yb=!0)):a.xe(0),a.Kf(this.ic.Xl()),a.Hi(this.opacity),a.we(this.j.Xc),a.Gi(this.Rd,this.Ld),a.Jf(),a.nf(),f=this.j.Ia/2,b=this.j.Ha/2,a.bl(-f,b,f,b,f,-b,-f,-b),a.we(null)):this.ic.Wt(a,this,null,this.ic.Xl()))};b.prototype.kC=function(a,b){if(a.visible&&0!==a.width&&0!==a.height){a.Ua();var c=a.Eb;c.right<this.Bb||c.bottom<this.Cb||c.left>this.Ib||c.top>this.Hb||(b.pq(a.gj),a.bz?this.mC(a,b):(b.xe(0),b.Gi(a.Rd,
a.Ld),a.Md(b)))}};b.prototype.lC=function(a,b){if(a.visible&&0!==a.width&&0!==a.height){a.Ua();var c=a.Eb;c.right<this.Bb||c.bottom<this.Cb||c.left>this.Ib||c.top>this.Hb||(a.gj=this.j.gj++,0===a.Fd&&1===a.opacity&&a.Ah&&a.ej&&(b.pq(a.gj),a.ej(b)))}};b.prototype.mC=function(a,b){var c=a.xb[0].Kc,d=a.xb[0].index,f=this.ie();if(1!==a.xb.length||b.Ot(c)||b.LE(c)||(a.M||a.V.tc())&&b.cn(c)||1!==a.opacity||a.type.Za.ux)this.ic.Wt(b,this,a,this.Jg?this.j.Xc:this.ic.Xl()),b.Jf(),b.scale(f,f),b.jq(-this.tc()),
b.translate((this.Bb+this.Ib)/-2,(this.Cb+this.Hb)/-2),b.nf();else{b.xe(c);b.Gi(a.Rd,a.Ld);b.Zp(c)&&(this.j.yb=!0);var g=0,e=0,h=0,k=0;b.cn(c)&&(k=a.Eb,g=this.cc(k.left,k.top,!0,!0),e=this.cc(k.left,k.top,!1,!0),h=this.cc(k.right,k.bottom,!0,!0),k=this.cc(k.right,k.bottom,!1,!0),g=g/windowWidth,e=1-e/windowHeight,h=h/windowWidth,k=1-k/windowHeight);var l;a.ed&&a.ed.Ka?(l=a.ed.Ka,c=1/l.width,l=1/l.height):(c=1/a.width,l=1/a.height);b.el(this.Jg?this.j.Xc:this.ic.Xl(),c,l,g,e,h,k,f,this.tc(),this.Bb,
this.Cb,(this.Bb+this.Ib)/2,(this.Cb+this.Hb)/2,this.j.Wc.ib,a.hc[d]);a.Md(b)}};b.prototype.Zb=function(a,b,c,d){var f=this.j.devicePixelRatio;this.j.rj&&(a*=f,b*=f);var f=this.j.Px,g=this.j.Qx,f=(this.ic.scrollX-f)*this.oe+f,g=(this.ic.scrollY-g)*this.pe+g,e=f,h=g,k=1/this.ie(!d);d?(e-=this.j.Ia*k/2,h-=this.j.Ha*k/2):(e-=this.j.width*k/2,h-=this.j.height*k/2);e+=a*k;h+=b*k;b=this.tc();0!==b&&(e-=f,h-=g,a=Math.cos(b),b=Math.sin(b),d=e*a-h*b,h=h*a+e*b,e=d+f,h+=g);return c?e:h};b.prototype.cc=function(a,
b,c,d){var f=this.j.Px,g=this.j.Qx,e=(this.ic.scrollX-f)*this.oe+f,h=(this.ic.scrollY-g)*this.pe+g,g=e,f=h,k=this.tc();if(0!==k){a-=e;b-=h;var l=Math.cos(-k),k=Math.sin(-k),F=a*l-b*k;b=b*l+a*k;a=F+e;b+=h}e=1/this.ie(!d);d?(g-=this.j.Ia*e/2,f-=this.j.Ha*e/2):(g-=this.j.width*e/2,f-=this.j.height*e/2);g=(a-g)/e;f=(b-f)/e;a=this.j.devicePixelRatio;this.j.rj&&!d&&(g/=a,f/=a);return c?g:f};b.prototype.Nb=function(){var a,b,c,d={s:this.scale,a:this.M,vl:this.Bb,vt:this.Cb,vr:this.Ib,vb:this.Hb,v:this.visible,
bc:this.Rf,t:this.eg,px:this.oe,py:this.pe,o:this.opacity,zr:this.Wd,fx:[],cg:this.Kl,instances:[]};a=0;for(b=this.Qa.length;a<b;a++)c=this.Qa[a],d.fx.push({name:c.name,active:c.Pb,params:this.hc[c.index]});return d};b.prototype.Qb=function(a){var b,d,f;this.scale=a.s;this.M=a.a;this.Bb=a.vl;this.Cb=a.vt;this.Ib=a.vr;this.Hb=a.vb;this.visible=a.v;this.Rf=a.bc;this.eg=a.t;this.oe=a.px;this.pe=a.py;this.opacity=a.o;this.Wd=a.zr;this.Kl=a.cg||[];Ia(this.bf,this.Gy);var g=new ea;b=0;for(f=this.Kl.length;b<
f;++b)g.add(this.Kl[b]);d=b=0;for(f=this.bf.length;b<f;++b)g.contains(this.bf[b][2])||(this.bf[d]=this.bf[b],++d);Ha(this.bf,d);d=a.fx;b=0;for(f=d.length;b<f;b++)if(a=this.es(d[b].name))a.Pb=d[b].active,this.hc[a.index]=d[b].params;this.fg();this.J.sort(c);this.Zj=!0};Gc=b})();
(function(){function a(a,b){var c,d=a.length;switch(d){case 0:return!0;case 1:return a[0]===b[0];case 2:return a[0]===b[0]&&a[1]===b[1];default:for(c=0;c<d;c++)if(a[c]!==b[c])return!1;return!0}}function c(a,b){return a.index-b.index}function b(b){var d,f,g,e;2===b.length?b[0].index>b[1].index&&(d=b[0],b[0]=b[1],b[1]=d):2<b.length&&b.sort(c);b.length>=u.length&&(u.length=b.length+1);u[b.length]||(u[b.length]=[]);e=u[b.length];d=0;for(f=e.length;d<f;d++)if(g=e[d],a(b,g))return g;e.push(b);return b}
function e(a,b){this.j=a;this.Ty={};this.Wv={};this.ws=!1;this.sw=new ea;this.Hr=[];this.ir=[];this.name=b[0];var c=b[1];this.bi=[];var d,f;d=0;for(f=c.length;d<f;d++)this.vw(c[d],null,this.bi)}function d(a){this.type=a;this.J=[];this.lb=[];this.zb=!0}function k(a,b,c){this.sheet=a;this.parent=b;this.j=a.j;this.Ab=[];this.Ji=[];this.qw=this.Fq=this.vu=this.Zo=this.group=this.nu=!1;this.Oc=[];this.rf=[];this.Lf=[];this.$l="";this.wk=this.Zo=this.group=!1;this.no=null;c[1]&&(this.$l=c[1][1].toLowerCase(),
this.group=!0,this.Zo=!!c[1][0],this.no=[],this.wk=this.Zo,this.j.Th.push(this),this.j.cm[this.$l]=this);this.Hf=c[2];this.ab=c[4];this.group||(this.j.zv[this.ab.toString()]=this);var d=c[5];a=0;for(b=d.length;a<b;a++){var f=new Oc(this,d[a]);f.index=a;this.Oc.push(f);this.sv(f.type)}d=c[6];a=0;for(b=d.length;a<b;a++)f=new Pc(this,d[a]),f.index=a,this.rf.push(f);if(8===c.length)for(c=c[7],a=0,b=c.length;a<b;a++)this.sheet.vw(c[a],this,this.Lf);this.jp=!1;this.Oc.length&&(this.jp=null==this.Oc[0].type&&
this.Oc[0].ud==R.prototype.G.pz)}function f(a,b){var c,d,f;if(a&&(-1===b.indexOf(a)&&b.push(a),a.Pd))for(c=0,d=a.Ge.length;c<d;c++)f=a.Ge[c],a!==f&&-1===b.indexOf(f)&&b.push(f)}function g(a,b){this.Ve=a;this.sheet=a.sheet;this.j=a.j;this.Ya=[];this.oc=[];this.na={};this.index=-1;this.Cl=!1;this.ud=this.j.Oh(b[1]);this.trigger=0<b[3];this.Vv=2===b[3];this.Cg=b[4];this.Is=b[5];this.ZD=b[6];this.ab=b[7];this.j.Wh[this.ab.toString()]=this;-1===b[0]?(this.type=null,this.Jc=this.$t,this.Wi=null,this.Sf=
-1):(this.type=this.j.ua[b[0]],this.Jc=this.ZD?this.ZE:this.Zt,b[2]?(this.Wi=this.type.Qo(b[2]),this.Sf=this.type.as(b[2])):(this.Wi=null,this.Sf=-1),this.Ve.parent&&this.Ve.parent.qq());this.Vv&&(this.Jc=this.$E);if(10===b.length){var c,d,f=b[9];c=0;for(d=f.length;c<d;c++){var g=new Qc(this,f[c]);this.Ya.push(g)}this.oc.length=f.length}}function h(a,b){this.Ve=a;this.sheet=a.sheet;this.j=a.j;this.Ya=[];this.oc=[];this.na={};this.index=-1;this.Cl=!1;this.ud=this.j.Oh(b[1]);-1===b[0]?(this.type=null,
this.Jc=this.$t,this.Wi=null,this.Sf=-1):(this.type=this.j.ua[b[0]],this.Jc=this.Zt,b[2]?(this.Wi=this.type.Qo(b[2]),this.Sf=this.type.as(b[2])):(this.Wi=null,this.Sf=-1));this.ab=b[3];this.j.Rh[this.ab.toString()]=this;if(6===b.length){var c,d,f=b[5];c=0;for(d=f.length;c<d;c++){var g=new Qc(this,f[c]);this.Ya.push(g)}this.oc.length=f.length}}function l(){r++;t.length===r&&t.push(new Rc);return t[r]}function m(a,b){this.Ub=a;this.Ve=a.Ve;this.sheet=a.sheet;this.j=a.j;this.type=b[0];this.xg=null;this.Bh=
0;this.get=null;this.Kv=0;this.ic=null;this.key=0;this.object=null;this.index=0;this.Dn=this.Tj=this.Dn=this.Tj=this.$v=this.ij=this.En=null;this.Nf=!1;var c,d,f;switch(b[0]){case 0:case 7:this.xg=new Sc(this,b[1]);this.Bh=0;this.get=this.wD;break;case 1:this.xg=new Sc(this,b[1]);this.Bh=0;this.get=this.xD;break;case 5:this.xg=new Sc(this,b[1]);this.Bh=0;this.get=this.BD;break;case 3:case 8:this.Kv=b[1];this.get=this.uD;break;case 6:this.ic=this.j.ht[b[1]];this.get=this.CD;break;case 9:this.key=b[1];
this.get=this.AD;break;case 4:this.object=this.j.ua[b[1]];this.get=this.DD;this.Ve.sv(this.object);this.Ub instanceof Pc?this.Ve.qq():this.Ve.parent&&this.Ve.parent.qq();break;case 10:this.index=b[1];a.type&&a.type.Da?(this.get=this.yD,this.Nf=!0):this.get=this.zD;break;case 11:this.En=b[1];this.ij=null;this.get=this.vD;break;case 2:case 12:this.$v=b[1];this.get=this.tD;break;case 13:for(this.get=this.ED,this.Tj=[],this.Dn=[],c=1,d=b.length;c<d;c++)f=new Qc(this.Ub,b[c]),this.Tj.push(f),this.Dn.push(0)}}
function n(a,b,c){this.sheet=a;this.parent=b;this.j=a.j;this.Ab=[];this.name=c[1];this.Pq=c[2];this.Bs=c[3];this.um=!!c[4];this.gp=!!c[5];this.ab=c[6];this.j.pl[this.ab.toString()]=this;this.data=this.Bs;this.parent?(this.Dj=this.um||this.gp?-1:this.j.iF++,this.j.tB.push(this)):(this.Dj=-1,this.j.sB.push(this))}function q(a,b,c){this.sheet=a;this.parent=b;this.j=a.j;this.Ab=[];this.gm=null;this.KD=c[1];this.Pb=!0}function p(){this.Ky=[];this.reset(null)}var u=[];e.prototype.toString=function(){return this.name};
e.prototype.vw=function(a,b,c){switch(a[0]){case 0:a=new Tc(this,b,a);if(a.Hf)for(c.push(a),c=0,b=a.Oc.length;c<b;c++)a.Oc[c].trigger&&this.ww(a,c);else a.Jw()?this.ww(a,0):c.push(a);break;case 1:a=new Bc(this,b,a);c.push(a);break;case 2:a=new Uc(this,b,a),c.push(a)}};e.prototype.yc=function(){var a,b;a=0;for(b=this.bi.length;a<b;a++)this.bi[a].yc(a<b-1&&this.bi[a+1].jp)};e.prototype.Bu=function(){E(this.Hr);E(this.ir);this.rv(this);E(this.ir)};e.prototype.rv=function(a){var b,c,d,f,g=a.Hr,e=a.ir,
h=this.sw.Se();b=0;for(c=h.length;b<c;++b)d=h[b],f=d.gm,!d.Pb||a===f||-1<e.indexOf(f)||(e.push(f),f.rv(a),g.push(f))};e.prototype.Jc=function(a){this.j.MG||(this.ws=!0,a||(this.j.Ns=!0));var b,c;b=0;for(c=this.bi.length;b<c;b++){var d=this.bi[b];d.Jc();this.j.tr(d.Ab);this.j.fi&&this.j.Dd()}a||(this.j.Ns=!1)};e.prototype.ww=function(a,b){a.Hf||this.j.Jq.push(a);var c,d,f=a.Oc[b],g;f.type?g=f.type.name:g="system";var e=(c=f.Vv)?this.Wv:this.Ty;e[g]||(e[g]=[]);g=e[g];e=f.ud;if(c){if(f.Ya.length&&(f=
f.Ya[0],1===f.type&&2===f.xg.type)){f=f.xg.value.toLowerCase();c=0;for(d=g.length;c<d;c++)if(g[c].method==e){c=g[c].Ql;c[f]?c[f].push([a,b]):c[f]=[[a,b]];return}c={};c[f]=[[a,b]];g.push({method:e,Ql:c})}}else{c=0;for(d=g.length;c<d;c++)if(g[c].method==e){g[c].Ql.push([a,b]);return}jd&&e===jd.prototype.G.ek?g.unshift({method:e,Ql:[[a,b]]}):g.push({method:e,Ql:[[a,b]]})}};rc=e;d.prototype.vs=function(){return this.zb?this.type.J.length:this.J.length};d.prototype.Ie=function(){return this.zb?this.type.J:
this.J};d.prototype.Zk=function(a){a&&(a.j.Tc().Pc.Hf?(this.zb&&(E(this.J),Ia(this.lb,a.type.J),this.zb=!1),a=this.lb.indexOf(a),-1!==a&&(this.J.push(this.lb[a]),this.lb.splice(a,1))):(this.zb=!1,E(this.J),this.J[0]=a))};Xb=d;window._c2hh_="3456979AD7B7212F8A7ADFAE3EDE2ACA61174C6E";k.prototype.yc=function(a){var c,d=this.parent;if(this.group)for(this.Fq=!0;d;){if(!d.group){this.Fq=!1;break}d=d.parent}this.vu=!this.Jw()&&(!this.parent||this.parent.group&&this.parent.Fq);this.qw=!!a;this.Ji=this.Ab.slice(0);
for(d=this.parent;d;){a=0;for(c=d.Ab.length;a<c;a++)this.oB(d.Ab[a]);d=d.parent}this.Ab=b(this.Ab);this.Ji=b(this.Ji);a=0;for(c=this.Oc.length;a<c;a++)this.Oc[a].yc();a=0;for(c=this.rf.length;a<c;a++)this.rf[a].yc();a=0;for(c=this.Lf.length;a<c;a++)this.Lf[a].yc(a<c-1&&this.Lf[a+1].jp)};k.prototype.oy=function(a){if(this.wk!==!!a){this.wk=!!a;var b;a=0;for(b=this.no.length;a<b;++a)this.no[a].Xy();0<b&&this.j.$a.hj&&this.j.$a.hj.Bu()}};k.prototype.sv=function(a){f(a,this.Ab)};k.prototype.oB=function(a){f(a,
this.Ji)};k.prototype.qq=function(){this.nu=!0;this.parent&&this.parent.qq()};k.prototype.Jw=function(){return this.Oc.length?this.Oc[0].trigger:!1};k.prototype.Jc=function(){var a,b,c=!1,d=this.j,f=this.j.Tc();f.Pc=this;var g=this.Oc;this.jp||(f.Pr=!1);if(this.Hf){0===g.length&&(c=!0);f.Nc=0;for(a=g.length;f.Nc<a;f.Nc++)b=g[f.Nc],b.trigger||(b=b.Jc())&&(c=!0);(f.xj=c)&&this.kq()}else{f.Nc=0;for(a=g.length;f.Nc<a;f.Nc++)if(b=g[f.Nc].Jc(),!b){f.xj=!1;this.vu&&d.fi&&d.Dd();return}f.xj=!0;this.kq()}this.qC(f)};
k.prototype.qC=function(a){a.xj&&this.qw&&(a.Pr=!0);this.vu&&this.j.fi&&this.j.Dd()};k.prototype.XE=function(a){this.j.Tc().Pc=this;this.Oc[a].Jc()&&(this.kq(),this.j.Tc().xj=!0)};k.prototype.kq=function(){var a=this.j.Tc(),b;a.ge=0;for(b=this.rf.length;a.ge<b;a.ge++)if(this.rf[a.ge].Jc())return;this.iy()};k.prototype.VE=function(){var a=this.j.Tc(),b;for(b=this.rf.length;a.ge<b;a.ge++)if(this.rf[a.ge].Jc())return;this.iy()};k.prototype.iy=function(){if(this.Lf.length){var a,b,c,d,f=this.Lf.length-
1;this.j.$p(this);if(this.nu)for(a=0,b=this.Lf.length;a<b;a++)c=this.Lf[a],(d=!this.Fq||!this.group&&a<f)&&this.j.al(c.Ab),c.Jc(),d?this.j.uh(c.Ab):this.j.tr(c.Ab);else for(a=0,b=this.Lf.length;a<b;a++)this.Lf[a].Jc();this.j.Vp()}};k.prototype.YE=function(){var a=this.j.Tc();a.Pc=this;var b=!1,c;a.Nc=0;for(c=this.Oc.length;a.Nc<c;a.Nc++)if(this.Oc[a.Nc].Jc())b=!0;else if(!this.Hf)return!1;return this.Hf?b:!0};k.prototype.gq=function(){this.j.jj++;var a=this.j.Tc().Nc,b=this.j.$p(this);if(!this.Hf)for(b.Nc=
a+1,a=this.Oc.length;b.Nc<a;b.Nc++)if(!this.Oc[b.Nc].Jc()){this.j.Vp();return}this.kq();this.j.Vp()};k.prototype.PD=function(a){var b=a.index;if(0===b)return!0;for(--b;0<=b;--b)if(this.Oc[b].type===a.type)return!1;return!0};Tc=k;g.prototype.yc=function(){var a,b,c;a=0;for(b=this.Ya.length;a<b;a++)c=this.Ya[a],c.yc(),c.Nf&&(this.Cl=!0)};g.prototype.$E=function(){return!0};g.prototype.$t=function(){var a,b;a=0;for(b=this.Ya.length;a<b;a++)this.oc[a]=this.Ya[a].get();return gb(this.ud.apply(this.j.Lg,
this.oc),this.Is)};g.prototype.ZE=function(){var a,b;a=0;for(b=this.Ya.length;a<b;a++)this.oc[a]=this.Ya[a].get();a=this.ud.apply(this.Wi?this.Wi:this.type,this.oc);this.type.sf();return a};g.prototype.Zt=function(){var a,b,c,d,f,g,e,h,k=this.type,l=k.gb(),m=this.Ve.Hf&&!this.trigger;b=0;var p=k.Pd,n=k.Da,r=k.ah,q=this.Sf,u=-1<q,t=this.Cl,C=this.Ya,P=this.oc,J=this.Is,Y=this.ud,N;if(t)for(b=0,f=C.length;b<f;++b)g=C[b],g.Nf||(P[b]=g.get(0));else for(b=0,f=C.length;b<f;++b)P[b]=C[b].get(0);if(l.zb){E(l.J);
E(l.lb);N=k.J;a=0;for(d=N.length;a<d;++a){h=N[a];if(t)for(b=0,f=C.length;b<f;++b)g=C[b],g.Nf&&(P[b]=g.get(a));u?(b=0,n&&(b=h.type.qk[r]),b=Y.apply(h.Ea[q+b],P)):b=Y.apply(h,P);(e=gb(b,J))?l.J.push(h):m&&l.lb.push(h)}k.finish&&k.finish(!0);l.zb=!1;k.sf();return l.vs()}c=0;N=(e=m&&!this.Ve.PD(this))?l.lb:l.J;var Q=!1;a=0;for(d=N.length;a<d;++a){h=N[a];if(t)for(b=0,f=C.length;b<f;++b)g=C[b],g.Nf&&(P[b]=g.get(a));u?(b=0,n&&(b=h.type.qk[r]),b=Y.apply(h.Ea[q+b],P)):b=Y.apply(h,P);if(gb(b,J))if(Q=!0,e){if(l.J.push(h),
p)for(b=0,f=h.siblings.length;b<f;b++)g=h.siblings[b],g.type.gb().J.push(g)}else{N[c]=h;if(p)for(b=0,f=h.siblings.length;b<f;b++)g=h.siblings[b],g.type.gb().J[c]=g;c++}else if(e){N[c]=h;if(p)for(b=0,f=h.siblings.length;b<f;b++)g=h.siblings[b],g.type.gb().lb[c]=g;c++}else if(m&&(l.lb.push(h),p))for(b=0,f=h.siblings.length;b<f;b++)g=h.siblings[b],g.type.gb().lb.push(g)}Ha(N,c);if(p)for(n=k.Ge,a=0,d=n.length;a<d;a++)h=n[a].gb(),e?Ha(h.lb,c):Ha(h.J,c);c=Q;if(e&&!Q)for(a=0,d=l.J.length;a<d;a++){h=l.J[a];
if(t)for(b=0,f=C.length;b<f;b++)g=C[b],g.Nf&&(P[b]=g.get(a));b=u?Y.apply(h.Ea[q],P):Y.apply(h,P);if(gb(b,J)){Q=!0;break}}k.finish&&k.finish(c||m);return m?Q:l.vs()};Oc=g;h.prototype.yc=function(){var a,b,c;a=0;for(b=this.Ya.length;a<b;a++)c=this.Ya[a],c.yc(),c.Nf&&(this.Cl=!0)};h.prototype.$t=function(){var a=this.j,b,c,d=this.Ya,f=this.oc;b=0;for(c=d.length;b<c;++b)f[b]=d[b].get();return this.ud.apply(a.Lg,f)};h.prototype.Zt=function(){var a=this.type,b=this.Sf,c=a.ah,d=this.Cl,f=this.Ya,g=this.oc,
e=this.ud,h=a.gb().Ie(),a=a.Da,k=-1<b,l,m,p,n,r,q;if(d)for(m=0,n=f.length;m<n;++m)r=f[m],r.Nf||(g[m]=r.get(0));else for(m=0,n=f.length;m<n;++m)g[m]=f[m].get(0);l=0;for(p=h.length;l<p;++l){q=h[l];if(d)for(m=0,n=f.length;m<n;++m)r=f[m],r.Nf&&(g[m]=r.get(l));k?(m=0,a&&(m=q.type.qk[c]),e.apply(q.Ea[b+m],g)):e.apply(q,g)}return!1};Pc=h;var t=[],r=-1;m.prototype.yc=function(){var a,b;if(11===this.type)this.ij=this.j.jw(this.En,this.Ve.parent);else if(13===this.type)for(a=0,b=this.Tj.length;a<b;a++)this.Tj[a].yc();
this.xg&&this.xg.yc()};m.prototype.gE=function(a){this.Nf||!a||a.Za.tq||(this.Nf=!0)};m.prototype.uy=function(){this.Nf=!0};m.prototype.wD=function(a){this.Bh=a||0;a=l();this.xg.get(a);r--;return a.data};m.prototype.xD=function(a){this.Bh=a||0;a=l();this.xg.get(a);r--;return oa(a.data)?a.data:""};m.prototype.DD=function(){return this.object};m.prototype.uD=function(){return this.Kv};m.prototype.BD=function(a){this.Bh=a||0;a=l();this.xg.get(a);r--;return a.gd()?this.j.eh(a.data):this.j.Wl(a.data)};
m.prototype.CD=function(){return this.ic};m.prototype.AD=function(){return this.key};m.prototype.zD=function(){return this.index};m.prototype.yD=function(a){a=a||0;var b=this.Ub.type,c=null,c=b.gb(),d=c.Ie();if(d.length)c=d[a%d.length].type;else if(c.lb.length)c=c.lb[a%c.lb.length].type;else if(b.J.length)c=b.J[a%b.J.length].type;else return 0;return this.index+c.Eo[b.ah]};m.prototype.vD=function(){return this.ij};m.prototype.tD=function(){return this.$v};m.prototype.ED=function(){var a,b;a=0;for(b=
this.Tj.length;a<b;a++)this.Dn[a]=this.Tj[a].get();return this.Dn};Qc=m;n.prototype.yc=function(){this.Ab=b(this.Ab)};n.prototype.Pj=function(a){var b=this.j.iw();this.parent&&!this.um&&b?(this.Dj>=b.length&&(b.length=this.Dj+1),b[this.Dj]=a):this.data=a};n.prototype.Yl=function(){var a=this.j.iw();return!this.parent||this.um||!a||this.gp?this.data:this.Dj>=a.length||"undefined"===typeof a[this.Dj]?this.Bs:a[this.Dj]};n.prototype.Jc=function(){!this.parent||this.um||this.gp||this.Pj(this.Bs)};Bc=
n;q.prototype.toString=function(){return"include:"+this.gm.toString()};q.prototype.yc=function(){this.gm=this.j.Sr[this.KD];this.sheet.sw.add(this);this.Ab=b(this.Ab);for(var a=this.parent;a;)a.group&&a.no.push(this),a=a.parent;this.Xy()};q.prototype.Jc=function(){this.parent&&this.j.gn(this.j.ua);this.gm.ws||this.gm.Jc(!0);this.parent&&this.j.uh(this.j.ua)};q.prototype.Xy=function(){for(var a=this.parent;a;){if(a.group&&!a.wk){this.Pb=!1;return}a=a.parent}this.Pb=!0};Uc=q;p.prototype.reset=function(a){this.Pc=
a;this.ge=this.Nc=0;E(this.Ky);this.Pr=this.xj=!1};p.prototype.RD=function(){return this.Pc.nu?!0:this.Nc<this.Pc.Oc.length-1?!!this.Pc.Ab.length:!1};Ac=p})();
(function(){function a(a,b){this.Ub=a;this.j=a.j;this.type=b[0];this.get=[this.JC,this.FC,this.SC,this.VC,this.uC,this.TC,this.NC,this.CC,this.MC,this.RC,this.vC,this.QC,this.DC,this.OC,this.KC,this.LC,this.GC,this.HC,this.BC,this.UC,this.PC,this.IC,this.AC,this.EC][this.type];var c=null;this.oh=this.Ya=this.oc=this.ud=this.Eq=this.second=this.first=this.value=null;this.Sf=-1;this.Wf=null;this.cz=-1;this.ij=this.En=null;this.dl=!1;switch(this.type){case 0:case 1:case 2:this.value=b[1];break;case 3:this.first=
new Sc(a,b[1]);break;case 18:this.first=new Sc(a,b[1]);this.second=new Sc(a,b[2]);this.Eq=new Sc(a,b[3]);break;case 19:this.ud=this.j.Oh(b[1]);this.ud!==R.prototype.Fa.random&&this.ud!==R.prototype.Fa.EB||this.Ub.uy();this.oc=[];this.Ya=[];3===b.length?(c=b[2],this.oc.length=c.length+1):this.oc.length=1;break;case 20:this.oh=this.j.ua[b[1]];this.Sf=-1;this.ud=this.j.Oh(b[2]);this.dl=b[3];ud&&this.ud===ud.prototype.Fa.gz&&this.Ub.uy();b[4]?this.Wf=new Sc(a,b[4]):this.Wf=null;this.oc=[];this.Ya=[];
6===b.length?(c=b[5],this.oc.length=c.length+1):this.oc.length=1;break;case 21:this.oh=this.j.ua[b[1]];this.dl=b[2];b[3]?this.Wf=new Sc(a,b[3]):this.Wf=null;this.cz=b[4];break;case 22:this.oh=this.j.ua[b[1]];this.oh.Qo(b[2]);this.Sf=this.oh.as(b[2]);this.ud=this.j.Oh(b[3]);this.dl=b[4];b[5]?this.Wf=new Sc(a,b[5]):this.Wf=null;this.oc=[];this.Ya=[];7===b.length?(c=b[6],this.oc.length=c.length+1):this.oc.length=1;break;case 23:this.En=b[1],this.ij=null}this.Ub.gE(this.oh);4<=this.type&&17>=this.type&&
(this.first=new Sc(a,b[1]),this.second=new Sc(a,b[2]));if(c){var d,e;d=0;for(e=c.length;d<e;d++)this.Ya.push(new Sc(a,c[d]))}}function c(){++k;d.length===k&&d.push(new Rc);return d[k]}function b(a,b,c){var d,e;d=0;for(e=a.length;d<e;++d)a[d].get(c),b[d+1]=c.data}function e(a,b){this.type=a||Vc.bk;this.data=b||0;this.Kj=null;this.type==Vc.bk&&(this.data=Math.floor(this.data))}a.prototype.yc=function(){23===this.type&&(this.ij=this.Ub.j.jw(this.En,this.Ub.Ve.parent));this.first&&this.first.yc();this.second&&
this.second.yc();this.Eq&&this.Eq.yc();this.Wf&&this.Wf.yc();if(this.Ya){var a,b;a=0;for(b=this.Ya.length;a<b;a++)this.Ya[a].yc()}};var d=[],k=-1;a.prototype.UC=function(a){var d=this.Ya,e=this.oc;e[0]=a;a=c();b(d,e,a);--k;this.ud.apply(this.j.Lg,e)};a.prototype.PC=function(a){var d=this.oh,e=this.oc,l=this.Ya,m=this.Wf,n=this.ud,q=this.Ub.Bh,p=d.gb(),u=p.Ie();if(!u.length)if(p.lb.length)u=p.lb;else{this.dl?a.Zc(""):a.Gb(0);return}e[0]=a;a.Kj=d;a=c();b(l,e,a);m&&(m.get(a),a.gd()&&(q=a.data,u=d.J));
--k;d=u.length;if(q>=d||q<=-d)q%=d;0>q&&(q+=d);n.apply(u[q],e)};a.prototype.AC=function(a){var d=this.oh,e=this.oc,l=this.Ya,m=this.Wf,n=this.Sf,q=this.ud,p=this.Ub.Bh,u=d.gb(),t=u.Ie();if(!t.length)if(u.lb.length)t=u.lb;else{this.dl?a.Zc(""):a.Gb(0);return}e[0]=a;a.Kj=d;a=c();b(l,e,a);m&&(m.get(a),a.gd()&&(p=a.data,t=d.J));--k;l=t.length;if(p>=l||p<=-l)p%=l;0>p&&(p+=l);p=t[p];t=0;d.Da&&(t=p.type.qk[d.ah]);q.apply(p.Ea[n+t],e)};a.prototype.IC=function(a){var b=this.Wf,d=this.oh,e=this.cz,m=this.Ub.Bh,
n=d.gb(),q=n.Ie();if(!q.length)if(n.lb.length)q=n.lb;else{this.dl?a.Zc(""):a.Gb(0);return}if(b){n=c();b.get(n);if(n.gd()){m=n.data;q=d.J;0!==q.length&&(m%=q.length,0>m&&(m+=q.length));m=d.hs(m);d=m.Vc[e];oa(d)?a.Zc(d):a.wa(d);--k;return}--k}b=q.length;if(m>=b||m<=-b)m%=b;0>m&&(m+=b);m=q[m];q=0;d.Da&&(q=m.type.Eo[d.ah]);d=m.Vc[e+q];oa(d)?a.Zc(d):a.wa(d)};a.prototype.JC=function(a){a.type=Vc.bk;a.data=this.value};a.prototype.FC=function(a){a.type=Vc.ak;a.data=this.value};a.prototype.SC=function(a){a.type=
Vc.String;a.data=this.value};a.prototype.VC=function(a){this.first.get(a);a.gd()&&(a.data=-a.data)};a.prototype.uC=function(a){this.first.get(a);var b=c();this.second.get(b);a.gd()&&b.gd()&&(a.data+=b.data,b.Bk()&&a.Ok());--k};a.prototype.TC=function(a){this.first.get(a);var b=c();this.second.get(b);a.gd()&&b.gd()&&(a.data-=b.data,b.Bk()&&a.Ok());--k};a.prototype.NC=function(a){this.first.get(a);var b=c();this.second.get(b);a.gd()&&b.gd()&&(a.data*=b.data,b.Bk()&&a.Ok());--k};a.prototype.CC=function(a){this.first.get(a);
var b=c();this.second.get(b);a.gd()&&b.gd()&&(a.data/=b.data,a.Ok());--k};a.prototype.MC=function(a){this.first.get(a);var b=c();this.second.get(b);a.gd()&&b.gd()&&(a.data%=b.data,b.Bk()&&a.Ok());--k};a.prototype.RC=function(a){this.first.get(a);var b=c();this.second.get(b);a.gd()&&b.gd()&&(a.data=Math.pow(a.data,b.data),b.Bk()&&a.Ok());--k};a.prototype.vC=function(a){this.first.get(a);var b=c();this.second.get(b);b.Ek()||a.Ek()?this.xC(a,b):this.wC(a,b);--k};a.prototype.xC=function(a,b){a.Ek()&&
b.Ek()?this.zC(a,b):this.yC(a,b)};a.prototype.zC=function(a,b){a.data+=b.data};a.prototype.yC=function(a,b){a.Ek()?a.data+=(Math.round(1E10*b.data)/1E10).toString():a.Zc(a.data.toString()+b.data)};a.prototype.wC=function(a,b){a.Gb(a.data&&b.data?1:0)};a.prototype.QC=function(a){this.first.get(a);var b=c();this.second.get(b);a.gd()&&b.gd()&&(a.data||b.data?a.Gb(1):a.Gb(0));--k};a.prototype.BC=function(a){this.first.get(a);a.data?this.second.get(a):this.Eq.get(a)};a.prototype.DC=function(a){this.first.get(a);
var b=c();this.second.get(b);a.Gb(a.data===b.data?1:0);--k};a.prototype.OC=function(a){this.first.get(a);var b=c();this.second.get(b);a.Gb(a.data!==b.data?1:0);--k};a.prototype.KC=function(a){this.first.get(a);var b=c();this.second.get(b);a.Gb(a.data<b.data?1:0);--k};a.prototype.LC=function(a){this.first.get(a);var b=c();this.second.get(b);a.Gb(a.data<=b.data?1:0);--k};a.prototype.GC=function(a){this.first.get(a);var b=c();this.second.get(b);a.Gb(a.data>b.data?1:0);--k};a.prototype.HC=function(a){this.first.get(a);
var b=c();this.second.get(b);a.Gb(a.data>=b.data?1:0);--k};a.prototype.EC=function(a){var b=this.ij.Yl();na(b)?a.wa(b):a.Zc(b)};Sc=a;e.prototype.Bk=function(){return this.type===Vc.ak};e.prototype.gd=function(){return this.type===Vc.bk||this.type===Vc.ak};e.prototype.Ek=function(){return this.type===Vc.String};e.prototype.Ok=function(){this.Bk()||(this.Ek()&&(this.data=parseFloat(this.data)),this.type=Vc.ak)};e.prototype.Gb=function(a){this.type=Vc.bk;this.data=Math.floor(a)};e.prototype.wa=function(a){this.type=
Vc.ak;this.data=a};e.prototype.Zc=function(a){this.type=Vc.String;this.data=a};e.prototype.wy=function(a){na(a)?(this.type=Vc.ak,this.data=a):oa(a)?(this.type=Vc.String,this.data=a.toString()):(this.type=Vc.bk,this.data=0)};Rc=e;Vc={bk:0,ak:1,String:2}})();function R(a){this.j=a;this.Be=[]}
R.prototype.Nb=function(){var a={},c,b,e,d,k,f,g,h;a.waits=[];var l=a.waits,m;c=0;for(b=this.Be.length;c<b;c++){f=this.Be[c];m={t:f.time,st:f.Dy,s:f.ku,ev:f.nk.ab,sm:[],sols:{}};f.nk.rf[f.ge]&&(m.act=f.nk.rf[f.ge].ab);e=0;for(d=f.Ab.length;e<d;e++)m.sm.push(f.Ab[e].ab);for(k in f.be)if(f.be.hasOwnProperty(k)){g=this.j.ua[parseInt(k,10)];h={sa:f.be[k].lq,insts:[]};e=0;for(d=f.be[k].fh.length;e<d;e++)h.insts.push(f.be[k].fh[e].uid);m.sols[g.ab.toString()]=h}l.push(m)}return a};
R.prototype.Qb=function(a){a=a.waits;var c,b,e,d,k,f,g,h,l,m,n;E(this.Be);c=0;for(b=a.length;c<b;c++)if(f=a[c],h=this.j.zv[f.ev.toString()]){l=-1;e=0;for(d=h.rf.length;e<d;e++)if(h.rf[e].ab===f.act){l=e;break}if(-1!==l){g={be:{},Ab:[],Lr:!1};g.time=f.t;g.Dy=f.st||"";g.ku=!!f.s;g.nk=h;g.ge=l;e=0;for(d=f.sm.length;e<d;e++)(h=this.j.uk(f.sm[e]))&&g.Ab.push(h);for(k in f.sols)if(f.sols.hasOwnProperty(k)&&(h=this.j.uk(parseInt(k,10)))){l=f.sols[k];m={lq:l.sa,fh:[]};e=0;for(d=l.insts.length;e<d;e++)(n=
this.j.zg(l.insts[e]))&&m.fh.push(n);g.be[h.index.toString()]=m}this.Be.push(g)}}};
(function(){function a(){}function c(){}function b(){}var e=R.prototype;a.prototype.rz=function(){return!0};a.prototype.Uu=function(){return!0};a.prototype.qA=function(){return!0};a.prototype.jz=function(a,b,c){return Wc(a,b,c)};a.prototype.NA=function(a){var b=this.j.Tc(),c=b.Pc,d=b.RD(),b=this.j.NE();if(d)for(d=0;d<a&&!b.nd;d++)this.j.al(c.Ab),b.index=d,c.gq(),this.j.uh(c.Ab);else for(d=0;d<a&&!b.nd;d++)b.index=d,c.gq();this.j.GE();return!1};a.prototype.qz=function(a){var b=this.j.ds(),c=b.na.Every_lastTime||
0,d=this.j.Wc.ib;"undefined"===typeof b.na.Every_seconds&&(b.na.Every_seconds=a);var e=b.na.Every_seconds;if(d>=c+e)return b.na.Every_lastTime=c+e,d>=b.na.Every_lastTime+.04&&(b.na.Every_lastTime=d),b.na.Every_seconds=a,!0;d<c-.1&&(b.na.Every_lastTime=d);return!1};a.prototype.LA=function(a){if(!a)return!1;var b=a.gb(),c=b.Ie(),d=xa(Math.random()*c.length);if(d>=c.length)return!1;b.Zk(c[d]);a.sf();return!0};a.prototype.lz=function(a,b,c){return Wc(a.Yl(),b,c)};a.prototype.xz=function(a){return(a=this.j.cm[a.toLowerCase()])&&
a.wk};a.prototype.pz=function(){var a=this.j.Tc();return a.Pr?!1:!a.xj};a.prototype.Vu=function(){return!0};a.prototype.Oz=function(){return!0};a.prototype.Zq=function(){return!0};a.prototype.cv=function(){return!0};a.prototype.rA=function(){return!0};a.prototype.Pn=function(){return!0};a.prototype.fz=function(a,b,c){return Wa(I(a),I(c))<=I(b)};a.prototype.wz=function(a,b){return Ya(I(a),I(b))};a.prototype.vz=function(a,b,c){a=Ua(a);b=Ua(b);c=Ua(c);return Ya(c,b)?Ya(a,b)&&!Ya(a,c):!(!Ya(a,b)&&Ya(a,
c))};e.G=new a;c.prototype.sz=function(a){this.j.Gk||this.j.$i||(this.j.$i=a)};c.prototype.oz=function(a,b,c,d){if(b&&a&&(b=this.j.Dr(a,b,c,d))){this.j.df++;var e;this.j.trigger(Object.getPrototypeOf(a.Za).G.ck,b);if(b.Pd)for(c=0,d=b.siblings.length;c<d;c++)e=b.siblings[c],this.j.trigger(Object.getPrototypeOf(e.type.Za).G.ck,e);this.j.df--;a=a.gb();a.zb=!1;E(a.J);a.J[0]=b;if(b.Pd)for(c=0,d=b.siblings.length;c<d;c++)e=b.siblings[c],a=e.type.gb(),a.zb=!1,E(a.J),a.J[0]=e}};c.prototype.XA=function(a,
b){0===a.Pq?na(b)?a.Pj(b):a.Pj(parseFloat(b)):1===a.Pq&&a.Pj(b.toString())};c.prototype.ez=function(a,b){0===a.Pq?na(b)?a.Pj(a.Yl()+b):a.Pj(a.Yl()+parseFloat(b)):1===a.Pq&&a.Pj(a.Yl()+b.toString())};c.prototype.WA=function(a){0>a&&(a=0);this.j.Ng=a};var d=[],k=[];c.prototype.hB=function(a){if(!(0>a)){var b,c,e,m=this.j.Tc(),n;d.length?n=d.pop():n={be:{},Ab:[]};n.Lr=!1;n.time=this.j.Wc.ib+a;n.Dy="";n.ku=!1;n.nk=m.Pc;n.ge=m.ge+1;a=0;for(b=this.j.ua.length;a<b;a++)e=this.j.ua[a],c=e.gb(),c.zb&&-1===
m.Pc.Ab.indexOf(e)||(n.Ab.push(e),e=void 0,k.length?e=k.pop():e={fh:[]},e.lq=!1,e.lq=c.zb,Ia(e.fh,c.J),n.be[a.toString()]=e);this.Be.push(n);return!0}};c.prototype.PA=function(){if(!this.j.Gk&&!this.j.$i&&this.j.$a){this.j.$i=this.j.$a;var a,b,c;a=0;for(b=this.j.Th.length;a<b;a++)c=this.j.Th[a],c.oy(c.Zo)}};c.prototype.RA=function(a,b){if(!(0>=a||0>=b)){var c=this.j.td;(document.mozFullScreen||document.webkitIsFullScreen||document.msFullscreenElement||document.fullScreen||this.j.nm)&&0<this.j.di&&
(c=this.j.di);0===c?this.j.setSize(a,b,!0):(this.j.Hc=a,this.j.Gc=b,this.j.setSize(this.j.wj,this.j.vj,!0))}};e.ya=new c;b.prototype["int"]=function(a,b){oa(b)?(a.Gb(parseInt(b,10)),isNaN(a.data)&&(a.data=0)):a.Gb(b)};b.prototype["float"]=function(a,b){oa(b)?(a.wa(parseFloat(b)),isNaN(a.data)&&(a.data=0)):a.wa(b)};b.prototype.random=function(a,b,c){void 0===c?a.wa(Math.random()*b):a.wa(Math.random()*(c-b)+b)};b.prototype.sqrt=function(a,b){a.wa(Math.sqrt(b))};b.prototype.abs=function(a,b){a.wa(Math.abs(b))};
b.prototype.round=function(a,b){a.Gb(Math.round(b))};b.prototype.floor=function(a,b){a.Gb(Math.floor(b))};b.prototype.ceil=function(a,b){a.Gb(Math.ceil(b))};b.prototype.sin=function(a,b){a.wa(Math.sin(I(b)))};b.prototype.cos=function(a,b){a.wa(Math.cos(I(b)))};b.prototype.tan=function(a,b){a.wa(Math.tan(I(b)))};b.prototype.asin=function(a,b){a.wa(Pa(Math.asin(b)))};b.prototype.acos=function(a,b){a.wa(Pa(Math.acos(b)))};b.prototype.atan=function(a,b){a.wa(Pa(Math.atan(b)))};b.prototype.exp=function(a,
b){a.wa(Math.exp(b))};b.prototype.log10=function(a,b){a.wa(Math.log(b)/Math.LN10)};b.prototype.max=function(a){var b=arguments[1];"number"!==typeof b&&(b=0);var c,d,e;c=2;for(d=arguments.length;c<d;c++)e=arguments[c],"number"===typeof e&&b<e&&(b=e);a.wa(b)};b.prototype.min=function(a){var b=arguments[1];"number"!==typeof b&&(b=0);var c,d,e;c=2;for(d=arguments.length;c<d;c++)e=arguments[c],"number"===typeof e&&b>e&&(b=e);a.wa(b)};b.prototype.Pa=function(a){a.wa(this.j.Pa)};b.prototype.Ng=function(a){a.wa(this.j.Ng)};
b.prototype.time=function(a){a.wa(this.j.Wc.ib)};b.prototype.Ae=function(a){a.Gb(this.j.Ae)};b.prototype.Fp=function(a){a.Gb(this.j.Fp)};b.prototype.Yr=function(a){a.Gb(this.j.Yr)};b.prototype.wg=function(a,b,c,d,e){a.wa(bb(b,c,d,e))};b.prototype.M=function(a,b,c,d,e){a.wa(Pa(Va(b,c,d,e)))};b.prototype.aE=function(a){a.Gb(this.j.$a.width)};b.prototype.$D=function(a){a.Gb(this.j.$a.height)};b.prototype.left=function(a,b,c){a.Zc(oa(b)?b.substr(0,c):"")};b.prototype.right=function(a,b,c){a.Zc(oa(b)?
b.substr(b.length-c):"")};b.prototype.replace=function(a,b,c,d){oa(b)&&oa(c)&&oa(d)?a.Zc(b.replace(new RegExp(xb(c),"gi"),d)):a.Zc(oa(b)?b:"")};b.prototype.trim=function(a,b){a.Zc(oa(b)?b.trim():"")};b.prototype.EB=function(a){var b=xa(Math.random()*(arguments.length-1));a.wy(arguments[b+1])};b.prototype.Ar=function(a){a.wa(this.j.Ar/1E3)};b.prototype.up=function(a){a.wa(this.j.up)};e.Fa=new b;e.WE=function(){var a,b,c,e,m,n,q=this.j.Tc();a=0;for(c=this.Be.length;a<c;a++){e=this.Be[a];if(-1===e.time){if(!e.ku)continue}else if(e.time>
this.j.Wc.ib)continue;q.Pc=e.nk;q.ge=e.ge;q.Nc=0;for(b in e.be)e.be.hasOwnProperty(b)&&(m=this.j.ua[parseInt(b,10)].gb(),n=e.be[b],m.zb=n.lq,Ia(m.J,n.fh),m=n,E(m.fh),k.push(m));e.nk.VE();this.j.tr(e.Ab);e.Lr=!0}b=a=0;for(c=this.Be.length;a<c;a++)e=this.Be[a],this.Be[b]=e,e.Lr?(jb(e.be),E(e.Ab),d.push(e)):b++;Ha(this.Be,b)}})();
(function(){Wb=function(a,b){var e=a[1],d=a[3],k=a[4],f=a[5],g=a[6],h=a[7],l=a[8];b.G||(b.G={});b.ya||(b.ya={});b.Fa||(b.Fa={});var m=b.G,n=b.ya,q=b.Fa;d&&(m.mz=function(a,b){return Wc(this.x,a,b)},m.nz=function(a,b){return Wc(this.y,a,b)},m.TF=function(){var a=this.V;this.Ua();var b=this.Eb;return!(b.right<a.Bb||b.bottom<a.Cb||b.left>a.Ib||b.top>a.Hb)},m.zz=function(){this.Ua();var a=this.Eb,b=this.j.$a;return 0>a.right||0>a.bottom||a.left>b.width||a.top>b.height},m.dG=function(a,b,c){var d=this.gb(),
e=d.Ie();if(!e.length)return!1;var f=e[0],g=f,h=bb(f.x,f.y,b,c),k,l,m;k=1;for(l=e.length;k<l;k++)if(f=e[k],m=bb(f.x,f.y,b,c),0===a&&m<h||1===a&&m>h)h=m,g=f;d.Zk(g);return!0},n.$A=function(a){this.x!==a&&(this.x=a,this.ba())},n.tG=function(a){this.y!==a&&(this.y=a,this.ba())},n.qG=function(a,b){if(this.x!==a||this.y!==b)this.x=a,this.y=b,this.ba()},n.rG=function(a,b){var c=a.oD(this);if(c){var d;c.zf?(d=c.zf(b,!0),c=c.zf(b,!1)):(d=c.x,c=c.y);if(this.x!==d||this.y!==c)this.x=d,this.y=c,this.ba()}},
n.XF=function(a){0!==a&&(this.x+=Math.cos(this.M)*a,this.y+=Math.sin(this.M)*a,this.ba())},n.Fz=function(a,b){0!==b&&(this.x+=Math.cos(I(a))*b,this.y+=Math.sin(I(a))*b,this.ba())},q.Sn=function(a){a.wa(this.x)},q.Tn=function(a){a.wa(this.y)},q.Pa=function(a){a.wa(this.j.yf(this))});k&&(m.OF=function(a,b){return Wc(this.width,a,b)},m.MF=function(a,b){return Wc(this.height,a,b)},n.ZA=function(a){this.width!==a&&(this.width=a,this.ba())},n.oG=function(a){this.height!==a&&(this.height=a,this.ba())},n.UA=
function(a,b){if(this.width!==a||this.height!==b)this.width=a,this.height=b,this.ba()},q.iB=function(a){a.wa(this.width)},q.uz=function(a){a.wa(this.height)},q.JF=function(a){this.Ua();a.wa(this.Eb.left)},q.LF=function(a){this.Ua();a.wa(this.Eb.top)},q.KF=function(a){this.Ua();a.wa(this.Eb.right)},q.IF=function(a){this.Ua();a.wa(this.Eb.bottom)});f&&(m.fz=function(a,b){return Wa(this.M,I(b))<=I(a)},m.wz=function(a){return Ya(this.M,I(a))},m.vz=function(a,b){var c=Ua(a),d=Ua(b),e=Sa(this.M);return Ya(d,
c)?Ya(e,c)&&!Ya(e,d):!(!Ya(e,c)&&Ya(e,d))},n.kv=function(a){a=I(Ra(a));isNaN(a)||this.M===a||(this.M=a,this.ba())},n.hG=function(a){0===a||isNaN(a)||(this.M+=I(a),this.M=Sa(this.M),this.ba())},n.iG=function(a){0===a||isNaN(a)||(this.M-=I(a),this.M=Sa(this.M),this.ba())},n.jG=function(a,b){var c=Xa(this.M,I(b),I(a));isNaN(c)||this.M===c||(this.M=c,this.ba())},n.kG=function(a,b,c){a=Xa(this.M,Math.atan2(c-this.y,b-this.x),I(a));isNaN(a)||this.M===a||(this.M=a,this.ba())},n.sG=function(a,b){var c=Math.atan2(b-
this.y,a-this.x);isNaN(c)||this.M===c||(this.M=c,this.ba())},q.HF=function(a){a.wa(Ta(this.M))});e||(m.kz=function(a,b,c){return Wc(this.Vc[a],b,c)},m.RF=function(a){return this.Vc[a]},m.eG=function(a,b){var c=this.gb(),d=c.Ie();if(!d.length)return!1;var e=d[0],f=e,g=e.Vc[b],h,k,l;h=1;for(k=d.length;h<k;h++)if(e=d[h],l=e.Vc[b],0===a&&l<g||1===a&&l>g)g=l,f=e;c.Zk(f);return!0},m.cG=function(a){var b,c,d,e,f;if(this.j.ds().Is){f=this.gb();if(f.zb)for(f.zb=!1,E(f.J),E(f.lb),d=this.J,b=0,c=d.length;b<
c;b++)e=d[b],e.uid===a?f.lb.push(e):f.J.push(e);else{d=b=0;for(c=f.J.length;b<c;b++)e=f.J[b],f.J[d]=e,e.uid===a?f.lb.push(e):d++;Ha(f.J,d)}this.sf();return!!f.J.length}e=this.j.zg(a);if(!e)return!1;f=this.gb();if(!f.zb&&-1===f.J.indexOf(e))return!1;if(this.Da)for(a=e.type.ac,b=0,c=a.length;b<c;b++){if(a[b]===this)return f.Zk(e),this.sf(),!0}else if(e.type===this)return f.Zk(e),this.sf(),!0;return!1},m.ck=function(){return!0},m.Qz=function(){return!0},n.pG=function(a,b){var c=this.Vc;na(c[a])?c[a]=
na(b)?b:parseFloat(b):oa(c[a])&&(c[a]=oa(b)?b:b.toString())},n.GF=function(a,b){var c=this.Vc;na(c[a])?c[a]=na(b)?c[a]+b:c[a]+parseFloat(b):oa(c[a])&&(c[a]=oa(b)?c[a]+b:c[a]+b.toString())},n.eB=function(a,b){var c=this.Vc;na(c[a])&&(c[a]=na(b)?c[a]-b:c[a]-parseFloat(b))},n.lG=function(a,b){this.Vc[a]=b?1:0},n.uG=function(a){this.Vc[a]=1-this.Vc[a]},n.Ed=function(){this.j.Pg(this)},n.Cz||(n.Cz=function(a){var b,c;try{b=JSON.parse(a)}catch(d){return}this.j.sp(this,b,!0);this.Ue&&this.Ue();if(this.Ea)for(a=
0,b=this.Ea.length;a<b;++a)c=this.Ea[a],c.Ue&&c.Ue()}),q.PF=function(a){var b=a.Kj.J.length,c,d,e;c=0;for(d=this.j.Uf.length;c<d;c++)e=this.j.Uf[c],a.Kj.Da?0<=e.type.ac.indexOf(a.Kj)&&b++:e.type===a.Kj&&b++;a.Gb(b)},q.gG=function(a){a.Gb(a.Kj.gb().Ie().length)},q.vG=function(a){a.Gb(this.uid)},q.QF=function(a){a.Gb(this.Zl())},q.Xq||(q.Xq=function(a){a.Zc(JSON.stringify(this.j.au(this,!0)))}));g&&(m.UF=function(){return this.visible},n.YA=function(a){!a!==!this.visible&&(this.visible=!!a,this.j.yb=
!0)},m.NF=function(a,b){return Wc(Hb(100*this.opacity),a,b)},n.SA=function(a){a=a/100;0>a?a=0:1<a&&(a=1);a!==this.opacity&&(this.opacity=a,this.j.yb=!0)},q.Opacity=function(a){a.wa(Hb(100*this.opacity))});h&&(m.SF=function(a){return a?this.V===a:!1},m.fG=function(a){var b=this.gb(),c=b.Ie();if(!c.length)return!1;var d=c[0],e=d,f,g;f=1;for(g=c.length;f<g;f++)if(d=c[f],0===a){if(d.V.index>e.V.index||d.V.index===e.V.index&&d.Af()>e.Af())e=d}else if(d.V.index<e.V.index||d.V.index===e.V.index&&d.Af()<
e.Af())e=d;b.Zk(e);return!0},n.$F=function(){var a=this.V,b=a.J;b.length&&b[b.length-1]===this||(a.cl(this,!1),a.El(this,!1),this.j.yb=!0)},n.YF=function(){var a=this.V,b=a.J;b.length&&b[0]===this||(a.cl(this,!1),a.JE(this),this.j.yb=!0)},n.ZF=function(a){a&&a!=this.V&&(this.V.cl(this,!0),this.V=a,a.El(this,!0),this.j.yb=!0)},n.xG=function(a,b){var c=0===a;if(b){var d=b.iD(this);d&&d.uid!==this.uid&&(this.V.index!==d.V.index&&(this.V.cl(this,!0),this.V=d.V,d.V.El(this,!0)),this.V.iE(this,d,c),this.j.yb=
!0)}},q.WF=function(a){a.Gb(this.V.Ax)},q.VF=function(a){a.Zc(this.V.name)},q.wG=function(a){a.Gb(this.Af())});l&&(n.mG=function(a,b){if(this.j.ta){var c=this.type.gs(b);if(!(0>c)){var d=1===a;this.Qh[c]!==d&&(this.Qh[c]=d,this.fg(),this.j.yb=!0)}}},n.nG=function(a,b,c){if(this.j.ta){var d=this.type.gs(a);0>d||(a=this.type.Qa[d],d=this.hc[d],b=Math.floor(b),0>b||b>=d.length||(1===this.j.ta.sD(a.Kc,b)&&(c/=100),d[b]!==c&&(d[b]=c,a.Pb&&(this.j.yb=!0))))}})};sc=function(){this.or=this.co=!0;this.type.Wn=
!0;this.j.yb=!0;var a,b,e=this.mr;a=0;for(b=e.length;a<b;++a)e[a](this);this.V.of&&this.Ua()};tc=function(a){a&&this.mr.push(a)};vc=function(){if(this.co){var a=this.Eb,b=this.Fb;a.set(this.x,this.y,this.x+this.width,this.y+this.height);a.offset(-this.je*this.width,-this.ke*this.height);this.M?(a.offset(-this.x,-this.y),b.yy(a,this.M),b.offset(this.x,this.y),b.Av(a)):b.Ii(a);a.normalize();this.co=!1;this.az()}};var a=new Aa(0,0,0,0);wc=function(){if(this.V.of){var c=this.V.Bd,b=this.Eb;a.set(c.ee(b.left),
c.fe(b.top),c.ee(b.right),c.fe(b.bottom));this.ue.Pl(a)||(this.ue.right<this.ue.left?c.update(this,null,a):c.update(this,this.ue,a),this.ue.Il(a),this.V.ag=!0)}};xc=function(){if(this.or&&this.tg){this.Ua();var c=this.type.mo,b=this.Eb;a.set(c.ee(b.left),c.fe(b.top),c.ee(b.right),c.fe(b.bottom));this.Xh.Pl(a)||(this.Xh.right<this.Xh.left?c.update(this,null,a):c.update(this,this.Xh,a),this.Xh.Il(a),this.or=!1)}};uc=function(a,b){return this.Eb.Kd(a,b)&&this.Fb.Kd(a,b)?this.dg?this.NG(a,b):this.Oa&&
!this.Oa.ji()?(this.Oa.Uh(this.width,this.height,this.M),this.Oa.Kd(a-this.x,b-this.y)):!0:!1};nc=function(){this.type.Lq();return this.oj};yc=function(){this.V.Du();return this.gg};zc=function(){E(this.xb);var a,b,e,d=!0;a=0;for(b=this.Qh.length;a<b;a++)this.Qh[a]&&(e=this.type.Qa[a],this.xb.push(e),e.$f||(d=!1));this.bz=!!this.xb.length;this.Ah=d};pc=function(){return"Inst"+this.ay};Zb=function(a){if(a&&a.Pd&&a.type!=this){var b,e,d;b=0;for(e=a.siblings.length;b<e;b++)if(d=a.siblings[b],d.type==
this)return d}a=this.gb().Ie();return a.length?a[0]:null};ac=function(a){var b=this.gb().Ie();return b.length?b[a.Zl()%b.length]:null};Yb=function(){if(this.hl&&!this.Da){var a,b;a=0;for(b=this.J.length;a<b;a++)this.J[a].oj=a;var e=a,d=this.j.Uf;a=0;for(b=d.length;a<b;++a)d[a].type===this&&(d[a].oj=e++);this.hl=!1}};lc=function(a){if(a<this.J.length)return this.J[a];a-=this.J.length;var b=this.j.Uf,e,d;e=0;for(d=b.length;e<d;++e)if(b[e].type===this){if(0===a)return b[e];--a}return null};dc=function(){return this.Ch[this.ug]};
ec=function(){this.ug++;this.ug===this.Ch.length?this.Ch.push(new Xb(this)):(this.Ch[this.ug].zb=!0,E(this.Ch[this.ug].lb))};fc=function(){this.ug++;this.ug===this.Ch.length&&this.Ch.push(new Xb(this));var a=this.Ch[this.ug],b=this.Ch[this.ug-1];b.zb?a.zb=!0:(a.zb=!1,Ia(a.J,b.J));E(a.lb)};gc=function(){this.ug--};hc=function(a){var b,e,d,k,f,g=0;if(!this.Da)for(b=0,e=this.ac.length;b<e;b++)for(f=this.ac[b],d=0,k=f.fc.length;d<k;d++){if(a===f.fc[d].name)return this.na.lastBehIndex=g,f.fc[d];g++}b=
0;for(e=this.fc.length;b<e;b++){if(a===this.fc[b].name)return this.na.lastBehIndex=g,this.fc[b];g++}return null};ic=function(a){return this.Qo(a)?this.na.lastBehIndex:-1};jc=function(a){var b,e;b=0;for(e=this.Qa.length;b<e;b++)if(this.Qa[b].name===a)return b;return-1};kc=function(){if(this.Pd&&!this.Da){var a,b,e,d,k,f,g;this.Lq();f=this.gb();var h=f.zb,l=(a=this.j.Tc())&&a.Pc&&a.Pc.Hf;a=0;for(b=this.Ge.length;a<b;a++)if(k=this.Ge[a],k!==this&&(k.Lq(),g=k.gb(),g.zb=h,!h)){E(g.J);e=0;for(d=f.J.length;e<
d;++e)g.J[e]=k.hs(f.J[e].oj);if(l)for(E(g.lb),e=0,d=f.lb.length;e<d;++e)g.lb[e]=k.hs(f.lb[e].oj)}}};mc=function(){return"Type"+this.ab};Wc=function(a,b,e){if("undefined"===typeof a||"undefined"===typeof e)return!1;switch(b){case 0:return a===e;case 1:return a!==e;case 2:return a<e;case 3:return a<=e;case 4:return a>e;case 5:return a>=e;default:return!1}}})();var fd={};function vd(a){this.j=a}
(function(){function a(){}function c(){}function b(){}var e=!1,d=null,k=null,f="",g=vd.prototype;g.ma=function(a){this.Za=a;this.j=a.j};g.ma.prototype.da=function(){};g.la=function(a){this.type=a;this.j=a.j;this.Xe=this.Bg="";this.qe=0;this.timeout=-1;if(e=this.j.ep)d=require("path"),k=require("fs"),f=d.dirname((window.process||nw.process).execPath)+"\\"};var h=g.la.prototype,l=null;window.C2_AJAX_DCSide=function(a,b,c){l&&("success"===a?(l.Xe=b,l.Bg=c,l.j.trigger(vd.prototype.G.Ln,l),l.j.trigger(vd.prototype.G.xl,
l)):"error"===a?(l.Xe=b,l.j.trigger(vd.prototype.G.Mn,l),l.j.trigger(vd.prototype.G.dk,l)):"progress"===a&&(l.qe=c,l.Xe=b,l.j.trigger(vd.prototype.G.$u,l)))};h.da=function(){l=this};h.Nb=function(){return{lastData:this.Bg}};h.Qb=function(a){this.Bg=a.lastData;this.Xe="";this.qe=0};var m={},n="";h.Sv=function(a,b,c,d){if(this.j.fd)AppMobi.webview.execute('C2_AJAX_WebSide("'+a+'", "'+b+'", "'+c+'", '+(d?'"'+d+'"':"null")+");");else{var g=this,h=null,l=function(){g.Xe=a;g.j.trigger(vd.prototype.G.Mn,
g);g.j.trigger(vd.prototype.G.dk,g)},A=function(){if(e){var c=f+b;k.existsSync(c)?k.readFile(c,{encoding:"utf8"},function(b,c){b?l():(g.Xe=a,g.Bg=c.replace(/\r\n/g,"\n"),g.j.trigger(vd.prototype.G.Ln,g),g.j.trigger(vd.prototype.G.xl,g))}):l()}else l()},F=function(b){b.lengthComputable&&(g.qe=b.loaded/b.total,g.Xe=a,g.j.trigger(vd.prototype.G.$u,g))};try{this.j.hi?h=new ActiveXObject("Microsoft.XMLHTTP"):h=new XMLHttpRequest;h.onreadystatechange=function(){4===h.readyState&&(g.Xe=a,h.responseText?
g.Bg=h.responseText.replace(/\r\n/g,"\n"):g.Bg="",400<=h.status?(g.j.trigger(vd.prototype.G.Mn,g),g.j.trigger(vd.prototype.G.dk,g)):e&&!g.Bg.length||!e&&0===h.status&&!g.Bg.length||(g.j.trigger(vd.prototype.G.Ln,g),g.j.trigger(vd.prototype.G.xl,g)))};this.j.hi||(h.onerror=A,h.ontimeout=A,h.onabort=A,h.onprogress=F);h.open(c,b);!this.j.hi&&0<=this.timeout&&"undefined"!==typeof h.timeout&&(h.timeout=this.timeout);try{h.responseType="text"}catch(D){}d&&h.setRequestHeader&&!m.hasOwnProperty("Content-Type")&&
h.setRequestHeader("Content-Type","application/x-www-form-urlencoded");if(h.setRequestHeader){for(var G in m)if(m.hasOwnProperty(G))try{h.setRequestHeader(G,m[G])}catch(z){}m={}}if(n&&h.overrideMimeType){try{h.overrideMimeType(n)}catch(w){}n=""}d?h.send(d):h.send()}catch(B){A()}}};a.prototype.xl=function(a){return Ib(a,this.Xe)};a.prototype.Ln=function(){return!0};a.prototype.dk=function(a){return Ib(a,this.Xe)};a.prototype.Mn=function(){return!0};a.prototype.$u=function(a){return Ib(a,this.Xe)};
g.G=new a;c.prototype.OA=function(a,b){var c=this;this.j.rm&&!this.j.Aw(b)?this.j.Zv(b,function(b){c.Xe=a;c.Bg=b.replace(/\r\n/g,"\n");c.j.trigger(vd.prototype.G.Ln,c);c.j.trigger(vd.prototype.G.xl,c)},function(){c.Xe=a;c.j.trigger(vd.prototype.G.Mn,c);c.j.trigger(vd.prototype.G.dk,c)}):this.Sv(a,b,"GET")};c.prototype.MA=function(a,b,c,d){this.Sv(a,b,d,c)};g.ya=new c;b.prototype.Bz=function(a){a.Zc(this.Bg)};g.Fa=new b})();function wd(a){this.j=a}
(function(){function a(){return g.length?g.pop():[]}function c(a){var b,d;b=0;for(d=a.length;b<d;b++)Array.isArray(a[b])&&c(a[b]);E(a);g.push(a)}function b(){}function e(){}function d(){}var k=wd.prototype;k.ma=function(a){this.Za=a;this.j=a.j};k.ma.prototype.da=function(){};k.la=function(a){this.type=a;this.j=a.j};var f=k.la.prototype,g=[];Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)});f.da=function(){this.vf=this.X[0];this.Vf=this.X[1];this.vg=
this.X[2];this.zd||(this.Sg=a());var b=this.Sg;b.length=this.vf;var c,d,e;for(c=0;c<this.vf;c++)for(b[c]||(b[c]=a()),b[c].length=this.Vf,d=0;d<this.Vf;d++)for(b[c][d]||(b[c][d]=a()),b[c][d].length=this.vg,e=0;e<this.vg;e++)b[c][d][e]=0;this.cw=[];this.dw=[];this.ew=[];this.bh=-1};f.Gf=function(){var a;for(a=0;a<this.vf;a++)c(this.Sg[a]);E(this.Sg)};f.pg=function(a,b,c){a=Math.floor(a);b=Math.floor(b);c=Math.floor(c);return isNaN(a)||0>a||a>this.vf-1||isNaN(b)||0>b||b>this.Vf-1||isNaN(c)||0>c||c>this.vg-
1?0:this.Sg[a][b][c]};f.set=function(a,b,c,d){a=Math.floor(a);b=Math.floor(b);c=Math.floor(c);isNaN(a)||0>a||a>this.vf-1||isNaN(b)||0>b||b>this.Vf-1||isNaN(c)||0>c||c>this.vg-1||(this.Sg[a][b][c]=d)};f.dD=function(){return JSON.stringify({c2array:!0,size:[this.vf,this.Vf,this.vg],data:this.Sg})};f.Nb=function(){return{size:[this.vf,this.Vf,this.vg],data:this.Sg}};f.Qb=function(a){var b=a.size;this.vf=b[0];this.Vf=b[1];this.vg=b[2];this.Sg=a.data};f.zh=function(b,c,d){0>b&&(b=0);0>c&&(c=0);0>d&&(d=
0);if(this.vf!==b||this.Vf!==c||this.vg!==d){this.vf=b;this.Vf=c;this.vg=d;var e,f,g=this.Sg;g.length=b;for(b=0;b<this.vf;b++)for(ma(g[b])&&(g[b]=a()),g[b].length=c,e=0;e<this.Vf;e++)for(ma(g[b][e])&&(g[b][e]=a()),g[b][e].length=d,f=0;f<this.vg;f++)ma(g[b][e][f])&&(g[b][e][f]=0)}};f.n=function(){return 0<=this.bh&&this.bh<this.cw.length?this.cw[this.bh]:0};f.C=function(){return 0<=this.bh&&this.bh<this.dw.length?this.dw[this.bh]:0};f.H=function(){return 0<=this.bh&&this.bh<this.ew.length?this.ew[this.bh]:
0};b.prototype.mz=function(a,b,c){return Wc(this.pg(a,0,0),b,c)};f.k=function(a){this.j.al(a.Ab);a.gq();this.j.uh(a.Ab)};k.G=new b;e.prototype.UA=function(a,b,c){this.zh(a,b,c)};e.prototype.$A=function(a,b){this.set(a,0,0,b)};k.ya=new e;d.prototype.iB=function(a){a.Gb(this.vf)};d.prototype.uz=function(a){a.Gb(this.Vf)};d.prototype.Xq=function(a){a.Zc(this.dD())};k.Fa=new d})();function xd(a){this.j=a}
(function(){function a(a){-1===Pb.indexOf(a)&&Pb.push(a)}function c(b){var c=b.aa,d;try{d=c.play()}catch(e){a(b);return}d?d.catch(function(){a(b)}):ad&&!H.Vb&&a(b)}function b(){var b,c,d,f;oc||wa||!C||(e(),"running"===C.state&&(oc=!0));var g=Pb.slice(0);E(Pb);if(!Z)for(b=0,c=g.length;b<c;++b)d=g[b],d.nd||d.Je||(f=d.aa.play())&&f.catch(function(){a(d)})}function e(){"suspended"===C.state&&C.resume&&C.resume();if(C.createBuffer){var a=C.createBuffer(1,220,22050),b=C.createBufferSource();b.buffer=a;
b.connect(C.destination);h(b)}}function d(a){0>a&&(a=0);1<a&&(a=1);return Math.log(a)/Math.log(10)*20}function k(a){a=a.toLowerCase();return ga.hasOwnProperty(a)&&ga[a].length?ga[a][0].$e():C.destination}function f(){return C.createGain?C.createGain():C.createGainNode()}function g(a){return C.createDelay?C.createDelay(a):C.createDelayNode(a)}function h(a,b){a.start?a.start(b||0):a.noteOn(b||0)}function l(a,b,c,d){a.start?a.start(d||0,b):a.noteGrainOn(d||0,b,c-b)}function m(a){try{a.stop?a.stop(0):
a.noteOff(0)}catch(b){}}function n(a,b,c,d,e,g){this.type="filter";this.Mb=[a,b,c,d,e,g];this.nb=f();this.Na=f();this.Na.gain.value=g;this.La=f();this.La.gain.value=1-g;this.Dc=C.createBiquadFilter();this.Dc.type="number"===typeof this.Dc.type?a:Pd[a];this.Dc.frequency.value=b;this.Dc.detune&&(this.Dc.detune.value=c);this.Dc.Q.value=d;this.Dc.gain.value=e;this.nb.connect(this.Dc);this.nb.connect(this.La);this.Dc.connect(this.Na)}function q(a,b,c){this.type="delay";this.Mb=[a,b,c];this.nb=f();this.Na=
f();this.Na.gain.value=c;this.La=f();this.La.gain.value=1-c;this.Om=f();this.xf=g(a);this.xf.delayTime.value=a;this.wo=f();this.wo.gain.value=b;this.nb.connect(this.Om);this.nb.connect(this.La);this.Om.connect(this.Na);this.Om.connect(this.xf);this.xf.connect(this.wo);this.wo.connect(this.Om)}function p(a,b,c,d){this.type="convolve";this.Mb=[b,c,d];this.nb=f();this.Na=f();this.Na.gain.value=c;this.La=f();this.La.gain.value=1-c;this.aj=C.createConvolver();a&&(this.aj.normalize=b,this.aj.buffer=a);
this.nb.connect(this.aj);this.nb.connect(this.La);this.aj.connect(this.Na)}function u(a,b,c,d,e){this.type="flanger";this.Mb=[a,b,c,d,e];this.nb=f();this.La=f();this.La.gain.value=1-e/2;this.Na=f();this.Na.gain.value=e/2;this.Fo=f();this.Fo.gain.value=d;this.xf=g(a+b);this.xf.delayTime.value=a;this.kd=C.createOscillator();this.kd.frequency.value=c;this.Qe=f();this.Qe.gain.value=b;this.nb.connect(this.xf);this.nb.connect(this.La);this.xf.connect(this.Na);this.xf.connect(this.Fo);this.Fo.connect(this.xf);
this.kd.connect(this.Qe);this.Qe.connect(this.xf.delayTime);h(this.kd)}function t(a,b,c,d,e,g){this.type="phaser";this.Mb=[a,b,c,d,e,g];this.nb=f();this.La=f();this.La.gain.value=1-g/2;this.Na=f();this.Na.gain.value=g/2;this.Dc=C.createBiquadFilter();this.Dc.type="number"===typeof this.Dc.type?7:"allpass";this.Dc.frequency.value=a;this.Dc.detune&&(this.Dc.detune.value=b);this.Dc.Q.value=c;this.kd=C.createOscillator();this.kd.frequency.value=e;this.Qe=f();this.Qe.gain.value=d;this.nb.connect(this.Dc);
this.nb.connect(this.La);this.Dc.connect(this.Na);this.kd.connect(this.Qe);this.Qe.connect(this.Dc.frequency);h(this.kd)}function r(a){this.type="gain";this.Mb=[a];this.wb=f();this.wb.gain.value=a}function v(a,b){this.type="tremolo";this.Mb=[a,b];this.wb=f();this.wb.gain.value=1-b/2;this.kd=C.createOscillator();this.kd.frequency.value=a;this.Qe=f();this.Qe.gain.value=b/2;this.kd.connect(this.Qe);this.Qe.connect(this.wb.gain);h(this.kd)}function y(a,b){this.type="ringmod";this.Mb=[a,b];this.nb=f();
this.Na=f();this.Na.gain.value=b;this.La=f();this.La.gain.value=1-b;this.kn=f();this.kn.gain.value=0;this.kd=C.createOscillator();this.kd.frequency.value=a;this.kd.connect(this.kn.gain);h(this.kd);this.nb.connect(this.kn);this.nb.connect(this.La);this.kn.connect(this.Na)}function A(a,b,c,d,e){this.type="distortion";this.Mb=[a,b,c,d,e];this.nb=f();this.Xp=f();this.Wp=f();this.cF(c,Math.pow(10,d/20));this.Na=f();this.Na.gain.value=e;this.La=f();this.La.gain.value=1-e;this.Rq=C.createWaveShaper();this.uo=
new Float32Array(65536);this.aD(a,b);this.Rq.uo=this.uo;this.nb.connect(this.Xp);this.nb.connect(this.La);this.Xp.connect(this.Rq);this.Rq.connect(this.Wp);this.Wp.connect(this.Na)}function F(a,b,c,d,e){this.type="compressor";this.Mb=[a,b,c,d,e];this.wb=C.createDynamicsCompressor();try{this.wb.threshold.value=a,this.wb.knee.value=b,this.wb.ratio.value=c,this.wb.attack.value=d,this.wb.release.value=e}catch(f){}}function D(a,b){this.type="analyser";this.Mb=[a,b];this.wb=C.createAnalyser();this.wb.fftSize=
a;this.wb.smoothingTimeConstant=b;this.ZC=new Float32Array(this.wb.frequencyBinCount);this.By=new Uint8Array(a);this.an=0}function G(){this.qb=null;this.tp=0}function z(a,b){this.src=a;this.hb=X;this.Ag=b;this.Vn=!1;var c=this;this.Pk=this.Xk=null;this.Yk=[];this.mq=0;this.Iu=this.Do=this.Hy=this.Qp=!1;1===X&&b&&!bc&&(this.hb=0,this.Xk=f());this.Tg=this.tb=null;var d;switch(this.hb){case 0:this.tb=new Audio;this.tb.crossOrigin="anonymous";this.tb.addEventListener("canplaythrough",function(){c.Iu=
!0});1===X&&C.createMediaElementSource&&!/wiiu/i.test(navigator.userAgent)&&(this.Hy=!0,this.tb.addEventListener("canplay",function(){!c.Pk&&c.tb&&(c.Pk=C.createMediaElementSource(c.tb),c.Pk.connect(c.Xk))}));this.tb.autoplay=!1;this.tb.IG="auto";this.tb.src=a;break;case 1:H.rm?H.Yv(a,function(a){c.Tg=a;c.Pv()},function(){c.Do=!0}):(d=new XMLHttpRequest,d.open("GET",a,!0),d.responseType="arraybuffer",d.onload=function(){c.Tg=d.response;c.Pv()},d.onerror=function(){c.Do=!0},d.send());break;case 2:this.tb=
!0;break;case 3:this.tb=!0}}function w(a,b){var c=this;this.tag=b;this.nd=this.yg=!0;this.src=a.src;this.buffer=a;this.hb=X;this.Ag=a.Ag;this.playbackRate=1;this.yk=!0;this.Je=this.lf=!1;this.ve=0;this.tm=this.Ck=this.Cg=!1;this.volume=1;this.Gt=function(a){if(!c.Je&&!c.lf){var b=this;b||(b=a.target);b===c.Un&&(c.yk=!0,c.nd=!0,M=c.tag,H.trigger(xd.prototype.G.On,K))}};this.Un=null;this.Ak=1===Q&&!this.Ag||2===Q;this.Rk=1;this.startTime=this.Ak?H.Wc.ib:H.Ih.ib;this.Ic=this.Sc=null;this.Eg=!1;this.xd=
null;this.Mx=this.Lx=this.Kx=this.Jx=this.Ox=this.Nx=0;this.aa=null;var d=!1;1!==this.hb||0!==this.buffer.hb||this.buffer.Hy||(this.hb=0);switch(this.hb){case 0:this.Ag?(this.aa=a.tb,d=!a.Vn,a.Vn=!0):(this.aa=new Audio,this.aa.crossOrigin="anonymous",this.aa.autoplay=!1,this.aa.src=a.tb.src,d=!0);d&&this.aa.addEventListener("ended",function(){M=c.tag;c.nd=!0;H.trigger(xd.prototype.G.On,K)});break;case 1:this.Sc=f();this.Sc.connect(k(b));1===this.buffer.hb?a.tb&&(this.aa=C.createBufferSource(),this.aa.buffer=
a.tb,this.aa.connect(this.Sc)):(this.aa=this.buffer.tb,this.buffer.Xk.connect(this.Sc),this.buffer.Vn||(this.buffer.Vn=!0,this.buffer.tb.addEventListener("ended",function(){M=c.tag;c.nd=!0;H.trigger(xd.prototype.G.On,K)})));break;case 2:this.aa=new window.Media(ca+this.src,null,null,function(a){a===window.Media.MEDIA_STOPPED&&(c.yk=!0,c.nd=!0,M=c.tag,H.trigger(xd.prototype.G.On,K))});break;case 3:this.aa=!0}}function B(a,b){ga.hasOwnProperty(a)?ga[a].push(b):ga[a]=[b];var c,d,e,f,g=C.destination;
if(ga.hasOwnProperty(a)&&(e=ga[a],e.length))for(g=e[0].$e(),c=0,d=e.length;c<d;c++)f=e[c],c+1===d?f.uf(C.destination):f.uf(e[c+1].$e());E(lb);if(a.length)for(c=0,d=J.length;c<d;c++)e=J[c],Ib(a,e.tag)&&lb.push(e);else Y&&!Y.mj()&&(E(lb),lb[0]=Y);c=0;for(d=lb.length;c<d;c++)lb[c].PE(g);hb&&Ob===a&&(hb.disconnect(),hb.connect(g))}function L(){}function W(){}var O=xd.prototype;O.ma=function(a){this.Za=a;this.j=a.j};O.ma.prototype.da=function(){};var H=null,K=null,M="",ca="",X=0,C=null,P=[],J=[],Y=null,
N=!1,Q=0,Z=!1,la=1,aa=0,va=0,wa=!1,zb=1,Zc=1,kb=10,$b=1E4,Oa=1,hb=null,Ob="",ad=!1,Pb=[],bc=!1,oc=!1;document.addEventListener("pointerup",b,!0);document.addEventListener("touchend",b,!0);document.addEventListener("click",b,!0);document.addEventListener("keydown",b,!0);document.addEventListener("gamepadconnected",b,!0);var ga={},Pd="lowpass highpass bandpass lowshelf highshelf peaking notch allpass".split(" ");n.prototype.uf=function(a){this.Na.disconnect();this.Na.connect(a);this.La.disconnect();
this.La.connect(a)};n.prototype.remove=function(){this.nb.disconnect();this.Dc.disconnect();this.Na.disconnect();this.La.disconnect()};n.prototype.$e=function(){return this.nb};q.prototype.uf=function(a){this.Na.disconnect();this.Na.connect(a);this.La.disconnect();this.La.connect(a)};q.prototype.remove=function(){this.nb.disconnect();this.Om.disconnect();this.xf.disconnect();this.wo.disconnect();this.Na.disconnect();this.La.disconnect()};q.prototype.$e=function(){return this.nb};p.prototype.uf=function(a){this.Na.disconnect();
this.Na.connect(a);this.La.disconnect();this.La.connect(a)};p.prototype.remove=function(){this.nb.disconnect();this.aj.disconnect();this.Na.disconnect();this.La.disconnect()};p.prototype.$e=function(){return this.nb};u.prototype.uf=function(a){this.La.disconnect();this.La.connect(a);this.Na.disconnect();this.Na.connect(a)};u.prototype.remove=function(){this.nb.disconnect();this.xf.disconnect();this.kd.disconnect();this.Qe.disconnect();this.La.disconnect();this.Na.disconnect();this.Fo.disconnect()};
u.prototype.$e=function(){return this.nb};t.prototype.uf=function(a){this.La.disconnect();this.La.connect(a);this.Na.disconnect();this.Na.connect(a)};t.prototype.remove=function(){this.nb.disconnect();this.Dc.disconnect();this.kd.disconnect();this.Qe.disconnect();this.La.disconnect();this.Na.disconnect()};t.prototype.$e=function(){return this.nb};r.prototype.uf=function(a){this.wb.disconnect();this.wb.connect(a)};r.prototype.remove=function(){this.wb.disconnect()};r.prototype.$e=function(){return this.wb};
v.prototype.uf=function(a){this.wb.disconnect();this.wb.connect(a)};v.prototype.remove=function(){this.kd.disconnect();this.Qe.disconnect();this.wb.disconnect()};v.prototype.$e=function(){return this.wb};y.prototype.uf=function(a){this.Na.disconnect();this.Na.connect(a);this.La.disconnect();this.La.connect(a)};y.prototype.remove=function(){this.kd.disconnect();this.kn.disconnect();this.nb.disconnect();this.Na.disconnect();this.La.disconnect()};y.prototype.$e=function(){return this.nb};A.prototype.cF=
function(a,b){.01>a&&(a=.01);this.Xp.gain.value=a;this.Wp.gain.value=Math.pow(1/a,.6)*b};A.prototype.shape=function(a,b,c){var d=1.05*c*b-b;c=0>a?-1:1;a=0>a?-a:a;b=a<b?a:b+d*(1-Math.exp(-(1/d)*(a-b)));return b*c};A.prototype.aD=function(a,b){for(var c=Math.pow(10,a/20),d=Math.pow(10,b/20),e=0,f=0;32768>f;++f)e=f/32768,e=this.shape(e,c,d),this.uo[32768+f]=e,this.uo[32768-f-1]=-e};A.prototype.uf=function(a){this.Na.disconnect();this.Na.connect(a);this.La.disconnect();this.La.connect(a)};A.prototype.remove=
function(){this.nb.disconnect();this.Xp.disconnect();this.Rq.disconnect();this.Wp.disconnect();this.Na.disconnect();this.La.disconnect()};A.prototype.$e=function(){return this.nb};F.prototype.uf=function(a){this.wb.disconnect();this.wb.connect(a)};F.prototype.remove=function(){this.wb.disconnect()};F.prototype.$e=function(){return this.wb};D.prototype.bb=function(){this.wb.getFloatFrequencyData(this.ZC);this.wb.getByteTimeDomainData(this.By);for(var a=this.wb.fftSize,b=0,c=this.an=0,e=0;b<a;b++)e=
(this.By[b]-128)/128,0>e&&(e=-e),this.an<e&&(this.an=e),c+=e*e;this.an=d(this.an);d(Math.sqrt(c/a))};D.prototype.uf=function(a){this.wb.disconnect();this.wb.connect(a)};D.prototype.remove=function(){this.wb.disconnect()};D.prototype.$e=function(){return this.wb};G.prototype.ln=function(a){this.qb=a};G.prototype.Yo=function(){return!!this.qb};G.prototype.bb=function(){};z.prototype.QE=function(){var a,b,c,d;c=a=0;for(b=J.length;a<b;++a)d=J[a],J[c]=d,d.buffer===this?d.stop():++c;J.length=c;this.Pk&&
(this.Pk.disconnect(),this.Pk=null);this.Xk&&(this.Xk.disconnect(),this.Xk=null);this.Tg=this.tb=null};z.prototype.Pv=function(){if(!this.tb&&this.Tg){var a=this;if(C.decodeAudioData)C.decodeAudioData(this.Tg,function(b){a.tb=b;a.Tg=null;var c,d,e;if(ma(a.Tp)||Z)ma(a.po)||(c=a.po.aj,c.normalize=a.zx,c.buffer=b);else if(a.Yk.length){c=0;for(d=a.Yk.length;c<d;c++){b=a.Yk[c];e=new w(a,b.Oy);e.gu(!0);if("undefined"!==typeof b.Bx&&(b.qb=H.zg(b.Bx),!b.qb))continue;if(b.qb){var f=ab(b.qb.x,b.qb.y,-b.qb.V.tc(),
aa,va,!0),g=ab(b.qb.x,b.qb.y,-b.qb.V.tc(),aa,va,!1);e.fu(f,g,Pa(b.qb.M-b.qb.V.tc()),b.xs,b.yt,b.Ct);e.ln(b.qb)}else e.fu(b.x,b.y,b.R,b.xs,b.yt,b.Ct);e.play(a.pt,a.Gu,a.mq);a.Qp&&e.pause();J.push(e)}E(a.Yk)}else e=new w(a,a.Tp||""),e.play(a.pt,a.Gu,a.mq),a.Qp&&e.pause(),J.push(e)},function(){a.Do=!0});else if(this.tb=C.createBuffer(this.Tg,!1),this.Tg=null,ma(this.Tp)||Z)ma(this.po)||(b=this.po.aj,b.normalize=this.zx,b.buffer=this.tb);else{var b=new w(this,this.Tp);b.play(this.pt,this.Gu,this.mq);
this.Qp&&b.pause();J.push(b)}}};z.prototype.Dw=function(){switch(this.hb){case 0:var a=4<=this.tb.readyState;a&&(this.Iu=!0);return a||this.Iu;case 1:return!!this.Tg||!!this.tb;case 2:return!0;case 3:return!0}return!1};z.prototype.QD=function(){switch(this.hb){case 0:return this.Dw();case 1:return!!this.tb;case 2:return!0;case 3:return!0}return!1};z.prototype.JD=function(){switch(this.hb){case 0:return!!this.tb.error;case 1:return this.Do}return!1};w.prototype.mj=function(){switch(this.hb){case 0:return this.aa.ended;
case 1:return 1===this.buffer.hb?!this.yg&&!this.nd&&this.aa.loop||this.Je?!1:this.yk:this.aa.ended;case 2:return this.yk;case 3:!0}return!0};w.prototype.BB=function(){return this.yg||this.nd?!0:this.mj()};w.prototype.gu=function(a){1===X&&(!this.Eg&&a?this.Sc&&(this.Ic||(this.Ic=C.createPanner(),this.Ic.panningModel="number"===typeof this.Ic.panningModel?zb:["equalpower","HRTF","soundfield"][zb],this.Ic.distanceModel="number"===typeof this.Ic.distanceModel?Zc:["linear","inverse","exponential"][Zc],
this.Ic.refDistance=kb,this.Ic.maxDistance=$b,this.Ic.rolloffFactor=Oa),this.Sc.disconnect(),this.Sc.connect(this.Ic),this.Ic.connect(k(this.tag)),this.Eg=!0):this.Eg&&!a&&this.Sc&&(this.Ic.disconnect(),this.Sc.disconnect(),this.Sc.connect(k(this.tag)),this.Eg=!1))};w.prototype.fu=function(a,b,c,d,e,f){this.Eg&&1===X&&(this.Ic.setPosition(a,b,0),this.Ic.setOrientation(Math.cos(I(c)),Math.sin(I(c)),0),this.Ic.coneInnerAngle=d,this.Ic.coneOuterAngle=e,this.Ic.coneOuterGain=f,this.Nx=a,this.Ox=b,this.Jx=
c,this.Kx=d,this.Lx=e,this.Mx=f)};w.prototype.ln=function(a){this.Eg&&1===X&&(this.xd||(this.xd=new G),this.xd.ln(a))};w.prototype.bb=function(a){if(this.Eg&&1===X&&this.xd&&this.xd.Yo()&&this.pm()){this.xd.bb(a);a=this.xd.qb;var b=ab(a.x,a.y,-a.V.tc(),aa,va,!0),c=ab(a.x,a.y,-a.V.tc(),aa,va,!1);this.Ic.setPosition(b,c,0);b=0;"undefined"!==typeof this.xd.qb.M&&(b=a.M-a.V.tc(),this.Ic.setOrientation(Math.cos(b),Math.sin(b),0))}};w.prototype.play=function(a,b,d,e){var f=this.aa;this.Cg=a;this.volume=
b;d=d||0;e=e||0;switch(this.hb){case 0:1!==f.playbackRate&&(f.playbackRate=1);f.volume!==b*la&&(f.volume=b*la);f.loop!==a&&(f.loop=a);f.muted&&(f.muted=!1);if(f.currentTime!==d)try{f.currentTime=d}catch(g){}c(this);break;case 1:this.muted=!1;this.Rk=1;if(1===this.buffer.hb)this.Sc.gain.value=b*la,this.yg||(this.aa=C.createBufferSource(),this.aa.buffer=this.buffer.tb,this.aa.connect(this.Sc)),this.aa.onended=this.Gt,this.Un=this.aa,this.aa.loop=a,this.yk=!1,0===d?h(this.aa,e):l(this.aa,d,this.kj(),
e);else{1!==f.playbackRate&&(f.playbackRate=1);f.loop!==a&&(f.loop=a);f.volume=b*la;if(f.currentTime!==d)try{f.currentTime=d}catch(k){}c(this)}break;case 2:(!this.yg&&this.nd||0!==d)&&f.seekTo(d);f.play();this.yk=!1;break;case 3:H.fd?AppMobi.context.playSound(this.src,a):AppMobi.player.playSound(this.src,a)}this.playbackRate=1;this.startTime=(this.Ak?H.Wc.ib:H.Ih.ib)-d;this.Je=this.nd=this.yg=!1};w.prototype.stop=function(){switch(this.hb){case 0:this.aa.paused||this.aa.pause();break;case 1:1===this.buffer.hb?
m(this.aa):this.aa.paused||this.aa.pause();break;case 2:this.aa.stop();break;case 3:H.fd&&AppMobi.context.stopSound(this.src)}this.nd=!0;this.Je=!1};w.prototype.pause=function(){if(!(this.yg||this.nd||this.mj()||this.Je)){switch(this.hb){case 0:this.aa.paused||this.aa.pause();break;case 1:1===this.buffer.hb?(this.ve=this.ks(!0),this.Cg&&(this.ve=this.ve%this.kj()),this.Je=!0,m(this.aa)):this.aa.paused||this.aa.pause();break;case 2:this.aa.pause();break;case 3:H.fd&&AppMobi.context.stopSound(this.src)}this.Je=
!0}};w.prototype.UE=function(){if(!(this.yg||this.nd||this.mj())&&this.Je){switch(this.hb){case 0:c(this);break;case 1:1===this.buffer.hb?(this.aa=C.createBufferSource(),this.aa.buffer=this.buffer.tb,this.aa.connect(this.Sc),this.aa.onended=this.Gt,this.Un=this.aa,this.aa.loop=this.Cg,this.Sc.gain.value=la*this.volume*this.Rk,this.Mq(),this.startTime=(this.Ak?H.Wc.ib:H.Ih.ib)-this.ve/(this.playbackRate||.001),l(this.aa,this.ve,this.kj())):c(this);break;case 2:this.aa.play();break;case 3:H.fd&&AppMobi.context.resumeSound(this.src)}this.Je=
!1}};w.prototype.seek=function(a){if(!(this.yg||this.nd||this.mj()))switch(this.hb){case 0:try{this.aa.currentTime=a}catch(b){}break;case 1:if(1===this.buffer.hb)this.Je?this.ve=a:(this.pause(),this.ve=a,this.UE());else try{this.aa.currentTime=a}catch(c){}break;case 3:H.fd&&AppMobi.context.seekSound(this.src,a)}};w.prototype.PE=function(a){1===this.hb&&(this.Eg?(this.Ic.disconnect(),this.Ic.connect(a)):(this.Sc.disconnect(),this.Sc.connect(a)))};w.prototype.kj=function(){var a=0;switch(this.hb){case 0:"undefined"!==
typeof this.aa.duration&&(a=this.aa.duration);break;case 1:a=this.buffer.tb.duration;break;case 2:a=this.aa.getDuration();break;case 3:H.fd&&(a=AppMobi.context.getDurationSound(this.src))}return a};w.prototype.ks=function(a){var b=this.kj(),c=0;switch(this.hb){case 0:"undefined"!==typeof this.aa.currentTime&&(c=this.aa.currentTime);break;case 1:if(1===this.buffer.hb){if(this.Je)return this.ve;c=(this.Ak?H.Wc.ib:H.Ih.ib)-this.startTime}else"undefined"!==typeof this.aa.currentTime&&(c=this.aa.currentTime);
break;case 3:H.fd&&(c=AppMobi.context.getPlaybackTimeSound(this.src))}a&&(c*=this.playbackRate);!this.Cg&&c>b&&(c=b);return c};w.prototype.pm=function(){return!this.Je&&!this.yg&&!this.nd&&!this.mj()};w.prototype.hF=function(){return!this.yg&&!this.nd&&!this.mj()};w.prototype.yF=function(){var a=this.volume*la;isFinite(a)||(a=0);switch(this.hb){case 0:"undefined"!==typeof this.aa.volume&&this.aa.volume!==a&&(this.aa.volume=a);break;case 1:1===this.buffer.hb?this.Sc.gain.value=a*this.Rk:"undefined"!==
typeof this.aa.volume&&this.aa.volume!==a&&(this.aa.volume=a)}};w.prototype.Bo=function(a){switch(this.hb){case 0:this.aa.muted!==!!a&&(this.aa.muted=!!a);break;case 1:1===this.buffer.hb?(this.Rk=a?0:1,this.Sc.gain.value=la*this.volume*this.Rk):this.aa.muted!==!!a&&(this.aa.muted=!!a)}};w.prototype.dF=function(){this.Ck=!0;this.Bo(this.Ck||this.tm)};w.prototype.ty=function(a){this.tm=!!a;this.Bo(this.Ck||this.tm)};w.prototype.Mq=function(){var a=this.playbackRate;this.Ak&&(a*=H.Ng);switch(this.hb){case 0:this.aa.playbackRate!==
a&&(this.aa.playbackRate=a);break;case 1:1===this.buffer.hb?this.aa.playbackRate.value!==a&&(this.aa.playbackRate.value=a):this.aa.playbackRate!==a&&(this.aa.playbackRate=a)}};w.prototype.fF=function(a){switch(this.hb){case 0:a?this.pm()?(this.lf=!0,this.aa.pause()):this.lf=!1:this.lf&&(this.aa.play(),this.lf=!1);break;case 1:a?this.pm()?(this.lf=!0,1===this.buffer.hb?(this.ve=this.ks(!0),this.Cg&&(this.ve=this.ve%this.kj()),m(this.aa)):this.aa.pause()):this.lf=!1:this.lf&&(1===this.buffer.hb?(this.aa=
C.createBufferSource(),this.aa.buffer=this.buffer.tb,this.aa.connect(this.Sc),this.aa.onended=this.Gt,this.Un=this.aa,this.aa.loop=this.Cg,this.Sc.gain.value=la*this.volume*this.Rk,this.Mq(),this.startTime=(this.Ak?H.Wc.ib:H.Ih.ib)-this.ve/(this.playbackRate||.001),l(this.aa,this.ve,this.kj())):this.aa.play(),this.lf=!1);break;case 2:a?this.pm()?(this.aa.pause(),this.lf=!0):this.lf=!1:this.lf&&(this.lf=!1,this.aa.play())}};O.la=function(a){this.type=a;H=this.j=a.j;K=this;this.Le=null;this.Em=-600;
this.j.rm&&(bc=!0);!(this.j.Fk||this.j.jm&&(this.j.Js||this.j.$o))||this.j.dp||this.j.Kb||this.j.Bw||bc||(ad=!0);C=null;"undefined"!==typeof AudioContext?(X=1,C=new AudioContext):"undefined"!==typeof webkitAudioContext&&(X=1,C=new webkitAudioContext);this.j.Fk&&C&&(C.close&&C.close(),"undefined"!==typeof AudioContext?C=new AudioContext:"undefined"!==typeof webkitAudioContext&&(C=new webkitAudioContext));1!==X&&(this.j.cf&&"undefined"!==typeof window.Media?X=2:this.j.Cw&&(X=3));2===X&&(ca=location.href,
a=ca.lastIndexOf("/"),-1<a&&(ca=ca.substr(0,a+1)),ca=ca.replace("file://",""));if(this.j.SD&&this.j.UD&&"undefined"===typeof Audio)alert("It looks like you're using Safari for Windows without Quicktime.  Audio cannot be played until Quicktime is installed."),this.j.Pg(this);else{if(this.j.fd)N=this.j.jm;else try{N=!!(new Audio).canPlayType('audio/ogg; codecs="vorbis"')&&!this.j.fp}catch(b){N=!1}this.j.kl(this)}};var Ea=O.la.prototype;Ea.da=function(){this.j.hk=this;Q=this.X[0];this.yh=this.X[1];this.DE=
0!==this.X[2];this.xx=0;zb=this.X[3];Zc=this.X[4];this.Em=-this.X[5];kb=this.X[6];$b=this.X[7];Oa=this.X[8];this.Le=new G;var a=this.j.Ia||this.j.width,b=this.j.Ha||this.j.height;1===X&&(C.listener.setPosition(a/2,b/2,this.Em),C.listener.setOrientation(0,0,1,0,-1,0),window.c2OnAudioMicStream=function(a,b){hb&&hb.disconnect();Ob=b.toLowerCase();hb=C.createMediaStreamSource(a);hb.connect(k(Ob))});this.j.tv(function(a){K.uE(a)});var c=this;this.j.Bl(function(a){c.Lj(a)})};Ea.Lj=function(a){var b,c,d;
b=0;for(c=J.length;b<c;b++)d=J[b],d.xd&&d.xd.qb===a&&(d.xd.qb=null,d.Eg&&d.pm()&&d.Cg&&d.stop());this.Le.qb===a&&(this.Le.qb=null)};Ea.Nb=function(){var a={silent:Z,masterVolume:la,listenerZ:this.Em,listenerUid:this.Le.Yo()?this.Le.qb.uid:-1,playing:[],effects:{}},b=a.playing,c,d,e,f,g,h;c=0;for(d=J.length;c<d;c++)e=J[c],!e.hF()||3===this.yh||e.Ag&&1===this.yh||!e.Ag&&2===this.yh||(f=e.ks(),e.Cg&&(f=f%e.kj()),f={tag:e.tag,buffersrc:e.buffer.src,is_music:e.Ag,playbackTime:f,volume:e.volume,looping:e.Cg,
muted:e.Ck,playbackRate:e.playbackRate,paused:e.Je,resume_position:e.ve},e.Eg&&(f.pan={},h=f.pan,e.xd&&e.xd.Yo()?h.objUid=e.xd.qb.uid:(h.x=e.Nx,h.y=e.Ox,h.a=e.Jx),h.ia=e.Kx,h.oa=e.Lx,h.og=e.Mx),b.push(f));b=a.effects;for(g in ga)if(ga.hasOwnProperty(g)){e=[];c=0;for(d=ga[g].length;c<d;c++)e.push({type:ga[g][c].type,params:ga[g][c].Mb});b[g]=e}return a};var Fb=[];Ea.Qb=function(a){var b=a.silent;la=a.masterVolume;this.Em=a.listenerZ;this.Le.ln(null);var c=a.listenerUid;-1!==c&&(this.Le.tp=c,Fb.push(this.Le));
var c=a.playing,d,e,f,g,h,k,l,m,w,z,C;if(3!==this.yh)for(d=0,e=J.length;d<e;d++)w=J[d],w.Ag&&1===this.yh||(w.Ag||2!==this.yh)&&w.stop();for(h in ga)if(ga.hasOwnProperty(h))for(d=0,e=ga[h].length;d<e;d++)ga[h][d].remove();jb(ga);for(h in a.effects)if(a.effects.hasOwnProperty(h))for(k=a.effects[h],d=0,e=k.length;d<e;d++)switch(f=k[d].type,z=k[d].params,f){case "filter":B(h,new n(z[0],z[1],z[2],z[3],z[4],z[5]));break;case "delay":B(h,new q(z[0],z[1],z[2]));break;case "convolve":f=z[2];w=this.Po(f,!1);
w.tb?f=new p(w.tb,z[0],z[1],f):(f=new p(null,z[0],z[1],f),w.zx=z[0],w.po=f);B(h,f);break;case "flanger":B(h,new u(z[0],z[1],z[2],z[3],z[4]));break;case "phaser":B(h,new t(z[0],z[1],z[2],z[3],z[4],z[5]));break;case "gain":B(h,new r(z[0]));break;case "tremolo":B(h,new v(z[0],z[1]));break;case "ringmod":B(h,new y(z[0],z[1]));break;case "distortion":B(h,new A(z[0],z[1],z[2],z[3],z[4]));break;case "compressor":B(h,new F(z[0],z[1],z[2],z[3],z[4]));break;case "analyser":B(h,new D(z[0],z[1]))}d=0;for(e=c.length;d<
e;d++)3===this.yh||(a=c[d],f=a.buffersrc,g=a.is_music,h=a.tag,k=a.playbackTime,l=a.looping,m=a.volume,C=(z=a.pan)&&z.hasOwnProperty("objUid")?z.objUid:-1,g&&1===this.yh)||!g&&2===this.yh||((w=this.hw(f,h,g,l,m))?(w.ve=a.resume_position,w.gu(!!z),w.play(l,m,k),w.Mq(),w.yF(),w.Bo(w.Ck||w.tm),a.paused&&w.pause(),a.muted&&w.dF(),w.Bo(w.Ck||w.tm),z&&(-1!==C?(w.xd=w.xd||new G,w.xd.tp=C,Fb.push(w.xd)):w.fu(z.x,z.y,z.a,z.ia,z.oa,z.og))):(w=this.Po(f,g),w.mq=k,w.Qp=a.paused,z&&(-1!==C?w.Yk.push({Bx:C,xs:z.ia,
yt:z.oa,Ct:z.og,Oy:h}):w.Yk.push({x:z.x,y:z.y,R:z.a,xs:z.ia,yt:z.oa,Ct:z.og,Oy:h}))));if(b&&!Z){d=0;for(e=J.length;d<e;d++)J[d].ty(!0);Z=!0}else if(!b&&Z){d=0;for(e=J.length;d<e;d++)J[d].ty(!1);Z=!1}};Ea.Ue=function(){var a,b,c,d;a=0;for(b=Fb.length;a<b;a++)c=Fb[a],d=this.j.zg(c.tp),c.ln(d),c.tp=-1,d&&(aa=d.x,va=d.y);E(Fb)};Ea.uE=function(a){if(!this.DE){!a&&C&&C.resume&&(C.resume(),wa=!1);var b,c;b=0;for(c=J.length;b<c;b++)J[b].fF(a);a&&C&&C.suspend&&(C.suspend(),wa=!0)}};Ea.bb=function(){var a=
this.j.Pa,b,c,d;b=0;for(c=J.length;b<c;b++)d=J[b],d.bb(a),0!==Q&&d.Mq();var e,f;for(e in ga)if(ga.hasOwnProperty(e))for(d=ga[e],b=0,c=d.length;b<c;b++)f=d[b],f.bb&&f.bb();1===X&&this.Le.Yo()&&(this.Le.bb(a),aa=this.Le.qb.x,va=this.Le.qb.y,C.listener.setPosition(this.Le.qb.x,this.Le.qb.y,this.Em))};var cc=[];Ea.eF=function(a){var b,c,d,e,f,g=0;b=0;for(c=a.length;b<c;++b)if(d=a[b],e=d[0],d=2*d[1],(f=4<e.length&&".ogg"===e.substr(e.length-4))&&N||!f&&!N)cc.push({filename:e,size:d,qb:null}),g+=d;return g};
Ea.jF=function(){var a,b,c,d;a=0;for(b=cc.length;a<b;++a)c=cc[a],d=this.j.Wr+c.filename,c.qb=this.Po(d,!1)};Ea.pD=function(){var a=0,b,c,d;b=0;for(c=cc.length;b<c;++b)d=cc[b],d.qb.QD()||d.qb.JD()||this.j.Kb||this.j.$o?a+=d.size:d.qb.Dw()&&(a+=Math.floor(d.size/2));return a};Ea.RE=function(){var a,b,c,d;c=a=0;for(b=P.length;a<b;++a)d=P[a],P[c]=d,d.Ag?d.QE():++c;P.length=c};Ea.Po=function(a,b){var c,d,e,f=null;c=0;for(d=P.length;c<d;c++)if(e=P[c],e.src===a){f=e;break}f||(bc&&b&&this.RE(),f=new z(a,
b),P.push(f));return f};Ea.hw=function(a,b,c,d,e){var f,g,h;f=0;for(g=J.length;f<g;f++)if(h=J[f],h.src===a&&(h.BB()||c))return h.tag=b,h;a=this.Po(a,c);if(!a.tb)return"<preload>"!==b&&(a.Tp=b,a.pt=d,a.Gu=e),null;h=new w(a,b);J.push(h);return h};var lb=[];L.prototype.On=function(a){return Ib(M,a)};O.G=new L;W.prototype.Play=function(a,b,c,d){!Z&&(c=Math.pow(10,c/20),isFinite(c)||(c=0),0>c&&(c=0),1<c&&(c=1),Y=this.hw(this.j.Wr+a[0]+(N?".ogg":".m4a"),d,a[1],0!==b,c))&&(Y.gu(!1),Y.play(0!==b,c,0,this.xx),
this.xx=0)};O.ya=new W;O.Fa=new function(){}})();function yd(a){this.j=a}
(function(){function a(){d&&k&&window.OfflineClientInfo&&window.OfflineClientInfo.SetMessageCallback(function(a){f.tE(a)})}function c(){}var b=yd.prototype;b.ma=function(a){this.Za=a;this.j=a.j};var e=b.ma.prototype;e.da=function(){};var d=!1,k=!1;document.addEventListener("DOMContentLoaded",function(){if(window.C2_RegisterSW&&navigator.serviceWorker){var b=document.createElement("script");b.onload=function(){d=!0;a()};b.src="offlineClient.js";document.head.appendChild(b)}});var f=null;e.Fx=function(){k=
!0;a()};b.la=function(a){this.type=a;this.j=a.j};e=b.la.prototype;e.da=function(){var a=this;window.addEventListener("resize",function(){a.j.trigger(yd.prototype.G.DA,a)});f=this;"undefined"!==typeof navigator.onLine&&(window.addEventListener("online",function(){a.j.trigger(yd.prototype.G.vA,a)}),window.addEventListener("offline",function(){a.j.trigger(yd.prototype.G.tA,a)}));this.j.fd||(document.addEventListener("appMobi.device.update.available",function(){a.j.trigger(yd.prototype.G.br,a)}),document.addEventListener("backbutton",
function(){a.j.trigger(yd.prototype.G.Nn,a)}),document.addEventListener("menubutton",function(){a.j.trigger(yd.prototype.G.Wu,a)}),document.addEventListener("searchbutton",function(){a.j.trigger(yd.prototype.G.EA,a)}),document.addEventListener("tizenhwkey",function(b){var c;switch(b.keyName){case "back":c=a.j.trigger(yd.prototype.G.Nn,a);!c&&window.tizen&&window.tizen.application.getCurrentApplication().exit();break;case "menu":(c=a.j.trigger(yd.prototype.G.Wu,a))||b.preventDefault()}}));this.j.fp&&
"undefined"!==typeof Windows?Windows.UI.Core.SystemNavigationManager.getForCurrentView().addEventListener("backrequested",function(b){a.j.trigger(yd.prototype.G.Nn,a)&&(b.handled=!0)}):this.j.Hw&&WinJS.Application&&(WinJS.Application.onbackclick=function(){return!!a.j.trigger(yd.prototype.G.Nn,a)});this.j.tv(function(b){b?a.j.trigger(yd.prototype.G.wA,a):a.j.trigger(yd.prototype.G.xA,a)})};e.tE=function(a){a=a.data.type;"downloading-update"===a?this.j.trigger(yd.prototype.G.JA,this):"update-ready"===
a||"update-pending"===a?this.j.trigger(yd.prototype.G.br,this):"offline-ready"===a&&this.j.trigger(yd.prototype.G.uA,this)};c.prototype.vA=function(){return!0};c.prototype.tA=function(){return!0};c.prototype.br=function(){return!0};c.prototype.xA=function(){return!0};c.prototype.wA=function(){return!0};c.prototype.DA=function(){return!0};c.prototype.Nn=function(){return!0};c.prototype.Wu=function(){return!0};c.prototype.EA=function(){return!0};c.prototype.JA=function(){return!0};c.prototype.br=function(){return!0};
c.prototype.uA=function(){return!0};b.G=new c;b.ya=new function(){};b.Fa=new function(){}})();function zd(a){this.j=a}
(function(){function a(){}function c(){}var b=0,e=!1,d=!1,k=!1,f=zd.prototype;f.ma=function(a){this.Za=a;this.j=a.j};f.ma.prototype.da=function(){};f.la=function(a){this.type=a;this.j=a.j};f.la.prototype.da=function(){this.Fw=this.TD=!1;this.ll="";this.Kg=null;this.oF=this.j.Od&&"undefined"!==typeof CocoonJS.Store.nativeExtensionObjectAvailable;this.mF=1!==this.X[0];this.nF=0!==this.X[1];this.Gx="";var a=this;this.j.Od&&(CocoonJS.App.onTextDialogFinished.addEventListener(function(){a.j.trigger(zd.prototype.G.oA,
a)}),CocoonJS.App.onTextDialogCancelled.addEventListener(function(){a.j.trigger(zd.prototype.G.nA,a)}),CocoonJS.Ad.onBannerShown.addEventListener(function(){a.TD=!0;a.j.trigger(zd.prototype.G.Mz,a)}),CocoonJS.Ad.onBannerReady.addEventListener(function(){d=!0;e||(CocoonJS.Ad.setBannerLayout(b),CocoonJS.Ad.showBanner())}),CocoonJS.Ad.onFullScreenShown.addEventListener(function(){a.Fw=!0;a.j.trigger(zd.prototype.G.Zz,a)}),CocoonJS.Ad.onFullScreenHidden.addEventListener(function(){a.Fw=!1;a.j.trigger(zd.prototype.G.Yz,
a)}),CocoonJS.Ad.onFullScreenReady.addEventListener(function(){k=!0;preloadFullScreen||CocoonJS.Ad.showFullScreen()}),this.oF&&(CocoonJS.Store.onProductPurchaseCompleted.addEventListener(function(b){a.ll=b.productId;a.j.trigger(zd.prototype.G.zA,a);CocoonJS.Store.addPurchase(b);CocoonJS.Store.consumePurchase(b.transactionId,b.productId);CocoonJS.Store.finishPurchase(b.transactionId)}),CocoonJS.Store.onConsumePurchaseFailed.addEventListener(function(){a.j.trigger(zd.prototype.G.kE,a)}),CocoonJS.Store.onConsumePurchaseCompleted.addEventListener(function(b){this.Gx=
b;a.j.trigger(zd.prototype.G.Gx,a)}),CocoonJS.Store.onProductPurchaseFailed.addEventListener(function(b){a.ll=b;a.j.trigger(zd.prototype.G.AA,a)}),CocoonJS.Store.onProductPurchaseStarted.addEventListener(function(b){a.ll=b.productId;a.j.trigger(zd.prototype.G.BA,a)}),CocoonJS.Store.onProductsFetchStarted.addEventListener(function(){a.j.trigger(zd.prototype.G.sE,a)}),CocoonJS.Store.onProductsFetchFailed.addEventListener(function(){a.j.trigger(zd.prototype.G.rE,a)}),CocoonJS.Store.onProductsFetchCompleted.addEventListener(function(){a.j.trigger(zd.prototype.G.qE,
a)}),CocoonJS.Store.requestInitialization({managed:this.mF,sandbox:this.nF}),CocoonJS.Store.start()),this.Kg=CocoonJS.SocialGaming.GameCenter,this.Kg.onRequestLoginSucceed.addEventListener(function(){a.j.trigger(zd.prototype.G.cA,a)}),this.Kg.onRequestLoginFailed.addEventListener(function(){a.j.trigger(zd.prototype.G.bA,a)}),this.Kg.onLogout.addEventListener(function(){a.j.trigger(zd.prototype.G.dA,a)}),this.Kg.onRequestUserScoreSucceed.addEventListener(function(){a.j.trigger(zd.prototype.G.eA,a)}),
this.Kg.onRequestUserScoreFailed.addEventListener(function(){a.j.trigger(zd.prototype.G.hA,a)}),this.Kg.onSubmitUserScoreSucceed.addEventListener(function(){a.j.trigger(zd.prototype.G.gA,a)}),this.Kg.onSubmitUserScoreFailed.addEventListener(function(){a.j.trigger(zd.prototype.G.fA,a)}),this.Kg.onLeaderboardViewSucceed.addEventListener(function(){a.j.trigger(zd.prototype.G.aA,a)}),this.Kg.onLeaderboardViewClosed.addEventListener(function(){a.j.trigger(zd.prototype.G.$z,a)}))};a.prototype.Mz=function(){return!0};
a.prototype.Zz=function(){return!0};a.prototype.Yz=function(){return!0};a.prototype.BA=function(a){return this.ll===a};a.prototype.zA=function(a){return this.ll===a};a.prototype.AA=function(a){return this.ll===a};a.prototype.sE=function(){return!0};a.prototype.kE=function(){return!0};a.prototype.qE=function(){return!0};a.prototype.rE=function(){return!0};a.prototype.nA=function(){return!0};a.prototype.oA=function(){return!0};a.prototype.cA=function(){return!0};a.prototype.bA=function(){return!0};
a.prototype.dA=function(){return!0};a.prototype.eA=function(){return!0};a.prototype.hA=function(){return!0};a.prototype.gA=function(){return!0};a.prototype.fA=function(){return!0};a.prototype.aA=function(){return!0};a.prototype.$z=function(){return!0};f.G=new a;c.prototype.aB=function(a){this.j.Od&&(b=0===a?CocoonJS.Ad.BannerLayout.TOP_CENTER:CocoonJS.Ad.BannerLayout.BOTTOM_CENTER,e=!1,d?(CocoonJS.Ad.setBannerLayout(b),CocoonJS.Ad.showBanner()):CocoonJS.Ad.preloadBanner())};c.prototype.bB=function(){this.j.Od&&
(k?CocoonJS.Ad.showFullScreen():CocoonJS.Ad.preloadFullScreen())};f.ya=new c;f.Fa=new function(){}})();function ud(a){this.j=a}
(function(){function a(){this.name="";this.fq=0;this.Mb=[]}function c(){f++;f===k.length&&k.push(new a);return k[f]}function b(){}function e(){}var d=ud.prototype;d.ma=function(a){this.Za=a;this.j=a.j};d.ma.prototype.da=function(){};d.la=function(a){this.type=a;this.j=a.j};var k=[],f=-1;d.la.prototype.da=function(){var a=this;window.c2_callFunction=function(b,d){var e,k,q,p=c();p.name=b.toLowerCase();p.fq=0;if(d)for(p.Mb.length=d.length,e=0,k=d.length;e<k;++e)q=d[e],p.Mb[e]="number"===typeof q||"string"===
typeof q?q:"boolean"===typeof q?q?1:0:0;else E(p.Mb);a.j.trigger(ud.prototype.G.Ru,a,p.name);f--;return p.fq}};b.prototype.Ru=function(a){var b=0>f?null:k[f];return b?Ib(a,b.name):!1};d.G=new b;d.ya=new function(){};e.prototype.gz=function(a,b){var d=c();d.name=b.toLowerCase();d.fq=0;E(d.Mb);var e,k;e=2;for(k=arguments.length;e<k;e++)d.Mb.push(arguments[e]);this.j.trigger(ud.prototype.G.Ru,this,d.name);f--;a.wy(d.fq)};d.Fa=new e})();function Ad(a){this.j=a}
(function(){function a(){}var c=Ad.prototype;c.ma=function(a){this.Za=a;this.j=a.j};c.ma.prototype.da=function(){};c.la=function(a){this.type=a;this.j=a.j;this.xm=Array(256);this.Cn=Array(256);this.Gh=0};var b=c.la.prototype;b.da=function(){var a=this;this.j.Kb||(jQuery(document).keydown(function(b){a.Tm(b)}),jQuery(document).keyup(function(b){a.Um(b)}))};var e=[32,33,34,35,36,37,38,39,40,44];b.Tm=function(a){var b=!1;window!=window.top&&-1<e.indexOf(a.which)&&(a.preventDefault(),b=!0,a.stopPropagation());
if(this.xm[a.which])this.Cn[a.which]&&!b&&a.preventDefault();else{this.xm[a.which]=!0;this.Gh=a.which;this.j.Vb=!0;this.j.trigger(Ad.prototype.G.Jz,this);var c=this.j.trigger(Ad.prototype.G.lA,this),g=this.j.trigger(Ad.prototype.G.mA,this);this.j.Vb=!1;if(c||g)this.Cn[a.which]=!0,b||a.preventDefault()}};b.Um=function(a){this.xm[a.which]=!1;this.Gh=a.which;this.j.Vb=!0;this.j.trigger(Ad.prototype.G.Nu,this);var b=this.j.trigger(Ad.prototype.G.Tu,this),c=this.j.trigger(Ad.prototype.G.Su,this);this.j.Vb=
!1;if(b||c||this.Cn[a.which])this.Cn[a.which]=!0,a.preventDefault()};b.rh=function(){var a;for(a=0;256>a;++a)if(this.xm[a]){this.xm[a]=!1;this.Gh=a;this.j.trigger(Ad.prototype.G.Nu,this);var b=this.j.trigger(Ad.prototype.G.Tu,this),c=this.j.trigger(Ad.prototype.G.Su,this);if(b||c)this.Cn[a]=!0}};b.Nb=function(){return{triggerKey:this.Gh}};b.Qb=function(a){this.Gh=a.triggerKey};a.prototype.lA=function(a){return a===this.Gh};a.prototype.Jz=function(){return!0};a.prototype.Nu=function(){return!0};a.prototype.Tu=
function(a){return a===this.Gh};a.prototype.mA=function(a){return a===this.Gh};a.prototype.Su=function(a){return a===this.Gh};c.G=new a;c.ya=new function(){};c.Fa=new function(){}})();function Bd(a){this.j=a}
(function(){function a(){}function c(){}var b=Bd.prototype;b.ma=function(a){this.Za=a;this.j=a.j};b.ma.prototype.da=function(){};b.la=function(a){this.type=a;this.j=a.j;this.jk=Array(4);this.Ry=this.Hq=this.Yj=this.vi=this.ti=0;this.us=!1};var e=b.la.prototype;e.da=function(){var a=this;if(!this.j.Kb){jQuery(document).mousemove(function(b){a.Xm(b)});jQuery(document).mousedown(function(b){a.Wm(b)});jQuery(document).mouseup(function(b){a.Ym(b)});jQuery(document).dblclick(function(b){a.nE(b)});var b=
function(b){a.wE(b)};document.addEventListener("mousewheel",b,!1);document.addEventListener("DOMMouseScroll",b,!1)}};var d={left:0,top:0};e.Xm=function(a){var b=this.j.Kb?d:jQuery(this.j.canvas).offset();this.ti=a.pageX-b.left;this.vi=a.pageY-b.top};e.tx=function(){return 0<this.j.td?!0:0<=this.ti&&0<=this.vi&&this.ti<this.j.width&&this.vi<this.j.height};e.Wm=function(a){this.tx()&&(this.jk[a.which]=!0,this.j.Vb=!0,this.j.trigger(Bd.prototype.G.Iz,this),this.Yj=a.which-1,this.Hq=0,this.j.trigger(Bd.prototype.G.Qu,
this),this.j.trigger(Bd.prototype.G.Zu,this),this.j.Vb=!1)};e.Ym=function(a){this.jk[a.which]&&(this.j.Wo&&!this.j.ih&&a.preventDefault(),this.j.Wo=!0,this.jk[a.which]=!1,this.j.Vb=!0,this.Yj=a.which-1,this.j.trigger(Bd.prototype.G.bv,this),this.j.Vb=!1)};e.nE=function(a){this.tx()&&(a.preventDefault(),this.j.Vb=!0,this.Yj=a.which-1,this.Hq=1,this.j.trigger(Bd.prototype.G.Qu,this),this.j.trigger(Bd.prototype.G.Zu,this),this.j.Vb=!1)};e.wE=function(a){this.Ry=0>(a.wheelDelta?a.wheelDelta:a.detail?
-a.detail:0)?0:1;this.us=!1;this.j.Vb=!0;this.j.trigger(Bd.prototype.G.KA,this);this.j.Vb=!1;this.us&&Nb(a)&&a.preventDefault()};e.rh=function(){var a,b;a=0;for(b=this.jk.length;a<b;++a)this.jk[a]&&(this.jk[a]=!1,this.Yj=a-1,this.j.trigger(Bd.prototype.G.bv,this))};a.prototype.Qu=function(a,b){return a===this.Yj&&b===this.Hq};a.prototype.Iz=function(){return!0};a.prototype.bv=function(a){return a===this.Yj};a.prototype.Zu=function(a,b,c){return a!==this.Yj||b!==this.Hq?!1:this.j.xn(c,this.ti,this.vi)};
a.prototype.KA=function(a){this.us=!0;return a===this.Ry};b.G=new a;b.ya=new function(){};c.prototype.Sn=function(a,b){var c,d,e,m,n;ma(b)?(c=this.j.eh(0),d=c.scale,e=c.Wd,m=c.oe,n=c.M,c.scale=1,c.Wd=1,c.oe=1,c.M=0,a.wa(c.Zb(this.ti,this.vi,!0)),c.scale=d,c.Wd=e,c.oe=m,c.M=n):(c=na(b)?this.j.eh(b):this.j.Wl(b))?a.wa(c.Zb(this.ti,this.vi,!0)):a.wa(0)};c.prototype.Tn=function(a,b){var c,d,e,m,n;ma(b)?(c=this.j.eh(0),d=c.scale,e=c.Wd,m=c.pe,n=c.M,c.scale=1,c.Wd=1,c.pe=1,c.M=0,a.wa(c.Zb(this.ti,this.vi,
!1)),c.scale=d,c.Wd=e,c.pe=m,c.M=n):(c=na(b)?this.j.eh(b):this.j.Wl(b))?a.wa(c.Zb(this.ti,this.vi,!1)):a.wa(0)};b.Fa=new c})();function Cd(a){this.j=a}
(function(){function a(a){this.Ub=a;this.Pb=!1;this.M=this.speed=this.y=this.x=0;this.opacity=1;this.Sh=this.xk=this.size=this.Uo=0}var c=Cd.prototype;c.ma=function(a){this.Za=a;this.j=a.j};var b=c.ma.prototype;b.da=function(){this.Da||(this.Ka=new Image,this.Ka.Br=this.Dq,this.jb=null,this.j.Hu(this.Ka,this.Cq))};b.Vm=function(){this.Da||(this.jb=null)};b.Gp=function(){this.Da||!this.J.length||this.jb||(this.jb=this.j.ta.Lk(this.Ka,!0,this.j.Tb,this.zn))};b.Gm=function(){this.Da||this.jb||!this.j.ta||
(this.jb=this.j.ta.Lk(this.Ka,!0,this.j.Tb,this.zn))};b.Kq=function(){this.Da||this.J.length||!this.jb||(this.j.ta.deleteTexture(this.jb),this.jb=null)};b.Yp=function(a){a.drawImage(this.Ka,0,0)};a.prototype.init=function(){var a=this.Ub;this.x=a.x-a.Tq/2+Math.random()*a.Tq;this.y=a.y-a.Uq/2+Math.random()*a.Uq;this.speed=a.Es-a.vq/2+Math.random()*a.vq;this.M=a.M-a.wq/2+Math.random()*a.wq;this.opacity=a.Cs;this.size=a.Ds-a.uq/2+Math.random()*a.uq;this.Uo=a.ts-a.Vo/2+Math.random()*a.Vo;this.Sh=this.xk=
0};a.prototype.bb=function(a){var b=this.Ub;this.x+=Math.cos(this.M)*this.speed*a;this.y+=Math.sin(this.M)*this.speed*a;this.y+=this.xk*a;this.speed+=b.kb*a;this.size+=this.Uo*a;this.xk+=b.vd*a;this.Sh+=a;1>this.size?this.Pb=!1:(0!==b.Bm&&(this.M+=Math.random()*b.Bm*a-b.Bm*a/2),0!==b.Dm&&(this.speed+=Math.random()*b.Dm*a-b.Dm*a/2),0!==b.Cm&&(this.opacity+=Math.random()*b.Cm*a-b.Cm*a/2,0>this.opacity?this.opacity=0:1<this.opacity&&(this.opacity=1)),1>=b.mk&&this.Sh>=b.timeout&&(this.Pb=!1),2===b.mk&&
0>=this.speed&&(this.Pb=!1))};a.prototype.Ye=function(a){var b=this.Ub.opacity*this.opacity;if(0!==b){0===this.Ub.mk&&(b*=1-this.Sh/this.Ub.timeout);a.globalAlpha=b;var b=this.x-this.size/2,c=this.y-this.size/2;this.Ub.j.hf&&(b=b+.5|0,c=c+.5|0);a.drawImage(this.Ub.type.Ka,b,c,this.size,this.size)}};a.prototype.Md=function(a){var b=this.Ub.opacity*this.opacity;0===this.Ub.mk&&(b*=1-this.Sh/this.Ub.timeout);var c=this.size,e=c*this.Ub.Rx,h=this.x-c/2,l=this.y-c/2;this.Ub.j.hf&&(h=h+.5|0,l=l+.5|0);1>
e||0===b||(e<a.hE||e>a.ut?(a.Hi(b),a.bl(h,l,h+c,l,h+c,l+c,h,l+c)):a.EE(this.x,this.y,e,b))};a.prototype.left=function(){return this.x-this.size/2};a.prototype.right=function(){return this.x+this.size/2};a.prototype.top=function(){return this.y-this.size/2};a.prototype.bottom=function(){return this.y+this.size/2};c.la=function(a){this.type=a;this.j=a.j};var b=c.la.prototype,e=[];b.da=function(){var a=this.X;this.cq=a[0];this.wq=I(a[1]);this.fl=a[2];this.ou=!0;this.Es=a[3];this.Ds=a[4];this.Cs=a[5]/
100;this.ts=a[6];this.Tq=a[7];this.Uq=a[8];this.vq=a[9];this.uq=a[10];this.Vo=a[11];this.kb=a[12];this.vd=a[13];this.Bm=a[14];this.Dm=a[15];this.Cm=a[16];this.mk=a[17];this.timeout=a[18];this.Mj=0;this.Rx=1;this.Np=this.x;this.Pp=this.y;this.Op=this.x;this.Mp=this.y;this.qB(function(a){a.Eb.set(a.Np,a.Pp,a.Op,a.Mp);a.Fb.Ii(a.Eb);a.co=!1;a.Eu();a.az()});this.zd||(this.ae=[]);this.j.kl(this);this.type.Gm();if(1===this.fl)for(a=0;a<this.cq;a++)this.hr().opacity=0;this.Ko=!0};b.Nb=function(){var a={r:this.cq,
sc:this.wq,st:this.fl,s:this.ou,isp:this.Es,isz:this.Ds,io:this.Cs,gr:this.ts,xr:this.Tq,yr:this.Uq,spr:this.vq,szr:this.uq,grnd:this.Vo,acc:this.kb,g:this.vd,lar:this.Bm,lsr:this.Dm,lor:this.Cm,dm:this.mk,to:this.timeout,pcc:this.Mj,ft:this.Ko,p:[]},b,c,e,h=a.p;b=0;for(c=this.ae.length;b<c;b++)e=this.ae[b],h.push([e.x,e.y,e.speed,e.M,e.opacity,e.Uo,e.size,e.xk,e.Sh]);return a};b.Qb=function(a){this.cq=a.r;this.wq=a.sc;this.fl=a.st;this.ou=a.s;this.Es=a.isp;this.Ds=a.isz;this.Cs=a.io;this.ts=a.gr;
this.Tq=a.xr;this.Uq=a.yr;this.vq=a.spr;this.uq=a.szr;this.Vo=a.grnd;this.kb=a.acc;this.vd=a.g;this.Bm=a.lar;this.Dm=a.lsr;this.Cm=a.lor;this.mk=a.dm;this.timeout=a.to;this.Mj=a.pcc;this.Ko=a.ft;e.push.apply(e,this.ae);E(this.ae);var b,c,g,h=a.p;a=0;for(b=h.length;a<b;a++)c=this.hr(),g=h[a],c.x=g[0],c.y=g[1],c.speed=g[2],c.M=g[3],c.opacity=g[4],c.Uo=g[5],c.size=g[6],c.xk=g[7],c.Sh=g[8]};b.Gf=function(){e.push.apply(e,this.ae);E(this.ae)};b.hr=function(){var b;e.length?(b=e.pop(),b.Ub=this):b=new a(this);
this.ae.push(b);b.Pb=!0;return b};b.bb=function(){var a=this.j.yf(this),b,c,g,h;if(0===this.fl&&this.ou)for(this.Mj+=a*this.cq,c=xa(this.Mj),this.Mj-=c,b=0;b<c;b++)g=this.hr(),g.init();this.Np=this.x;this.Pp=this.y;this.Op=this.x;this.Mp=this.y;h=b=0;for(c=this.ae.length;b<c;b++)g=this.ae[b],this.ae[h]=g,this.j.yb=!0,1===this.fl&&this.Ko&&g.init(),g.bb(a),g.Pb?(g.left()<this.Np&&(this.Np=g.left()),g.right()>this.Op&&(this.Op=g.right()),g.top()<this.Pp&&(this.Pp=g.top()),g.bottom()>this.Mp&&(this.Mp=
g.bottom()),h++):e.push(g);Ha(this.ae,h);this.ba();this.Ko=!1;1===this.fl&&0===this.ae.length&&this.j.Pg(this)};b.Ye=function(a){var b,c,e,h=this.V;b=0;for(c=this.ae.length;b<c;b++)e=this.ae[b],e.right()>=h.Bb&&e.bottom()>=h.Cb&&e.left()<=h.Ib&&e.top()<=h.Hb&&e.Ye(a)};b.Md=function(a){this.Rx=this.V.ie();a.we(this.type.jb);var b,c,e,h=this.V;b=0;for(c=this.ae.length;b<c;b++)e=this.ae[b],e.right()>=h.Bb&&e.bottom()>=h.Cb&&e.left()<=h.Ib&&e.top()<=h.Hb&&e.Md(a)};c.G=new function(){};c.ya=new function(){};
c.Fa=new function(){}})();function jd(a){this.j=a}
(function(){function a(){if(0===this.Gr.length){var a=document.createElement("canvas");a.width=this.width;a.height=this.height;var b=a.getContext("2d");this.gl?b.drawImage(this.Ka,this.Sk,this.Tk,this.width,this.height,0,0,this.width,this.height):b.drawImage(this.Ka,0,0,this.width,this.height);this.Gr=a.toDataURL("image/png")}return this.Gr}function c(){}function b(a){a[0]=0;a[1]=0;a[2]=0;q.push(a)}function e(a,b){return a<b?""+a+","+b:""+b+","+a}function d(a,b,c,d){b=b.uid;c=c.uid;var f=e(b,c);if(a.hasOwnProperty(f))a[f][2]=
d;else{var g=q.length?q.pop():[0,0,0];g[0]=b;g[1]=c;g[2]=d;a[f]=g}}function k(a,c,d){c=e(c.uid,d.uid);a.hasOwnProperty(c)&&(b(a[c]),delete a[c])}function f(a,b,c){b=e(b.uid,c.uid);if(a.hasOwnProperty(b))return p=a[b][2],!0;p=-2;return!1}function g(){}var h=jd.prototype;h.ma=function(a){this.Za=a;this.j=a.j};var l=h.ma.prototype;l.da=function(){if(!this.Da){var b,c,d,e,f,g,h,k,l;this.Pf=[];this.fm=!1;b=0;for(c=this.Fe.length;b<c;b++){f=this.Fe[b];h={};h.name=f[0];h.speed=f[1];h.loop=f[2];h.Xt=f[3];
h.Yt=f[4];h.Tx=f[5];h.ab=f[6];h.frames=[];d=0;for(e=f[7].length;d<e;d++)g=f[7][d],k={},k.Cq=g[0],k.Dq=g[1],k.Sk=g[2],k.Tk=g[3],k.width=g[4],k.height=g[5],k.duration=g[6],k.je=g[7],k.ke=g[8],k.ys=g[9],k.Up=g[10],k.Ux=g[11],k.gl=0!==k.width,k.Gr="",k.AG=a,l={left:0,top:0,right:1,bottom:1},k.ju=l,k.jb=null,(l=this.j.YC(g[0]))?k.Ka=l:(k.Ka=new Image,k.Ka.JB=g[0],k.Ka.Br=g[1],k.Ka.zB=null,this.j.Hu(k.Ka,g[0])),h.frames.push(k),this.Pf.push(k);this.Fe[b]=h}}};l.Zy=function(){var a,b,c;a=0;for(b=this.J.length;a<
b;a++)c=this.J[a],c.ro=c.ed.jb};l.Vm=function(){if(!this.Da){var a,b,c;a=0;for(b=this.Pf.length;a<b;++a)c=this.Pf[a],c.Ka.zB=null,c.jb=null;this.fm=!1;this.Zy()}};l.Gp=function(){if(!this.Da&&this.J.length){var a,b,c;a=0;for(b=this.Pf.length;a<b;++a)c=this.Pf[a],c.jb=this.j.ta.Lk(c.Ka,!1,this.j.Tb,c.Ux);this.Zy()}};l.Gm=function(){if(!this.Da&&!this.fm&&this.j.ta){var a,b,c;a=0;for(b=this.Pf.length;a<b;++a)c=this.Pf[a],c.jb=this.j.ta.Lk(c.Ka,!1,this.j.Tb,c.Ux);this.fm=!0}};l.Kq=function(){if(!this.Da&&
!this.J.length&&this.fm){var a,b,c;a=0;for(b=this.Pf.length;a<b;++a)c=this.Pf[a],this.j.ta.deleteTexture(c.jb),c.jb=null;this.fm=!1}};var m=[];l.Yp=function(a){var b,c,d;E(m);b=0;for(c=this.Pf.length;b<c;++b)d=this.Pf[b].Ka,-1===m.indexOf(d)&&(a.drawImage(d,0,0),m.push(d))};h.la=function(a){this.type=a;this.j=a.j;a=this.type.Fe[0].frames[0].Up;this.zd?this.Oa.pn(a):this.Oa=new yb(a)};var n=h.la.prototype;n.da=function(){this.visible=0===this.X[0];this.As=this.Os=!1;this.tg=0!==this.X[3];this.Ob=this.gw(this.X[1])||
this.type.Fe[0];this.Aa=this.X[2];0>this.Aa&&(this.Aa=0);this.Aa>=this.Ob.frames.length&&(this.Aa=this.Ob.frames.length-1);var a=this.Ob.frames[this.Aa];this.Oa.pn(a.Up);this.je=a.je;this.ke=a.ke;this.kk=this.Ob.speed;this.$h=this.Ob.Yt;1===this.type.Fe.length&&1===this.type.Fe[0].frames.length||0===this.kk||(this.j.kl(this),this.Os=!0);this.zd?this.ng.reset():this.ng=new wb;this.dh=this.ng.ib;this.Vi=!0;this.Rg=0;this.Ui=!0;this.sr=this.uv="";this.CB=0;this.lo=-1;this.type.Gm();var b,c,d,e,f,g,h,
a=0;for(b=this.type.Fe.length;a<b;a++)for(e=this.type.Fe[a],c=0,d=e.frames.length;c<d;c++)f=e.frames[c],0===f.width&&(f.width=f.Ka.width,f.height=f.Ka.height),f.gl&&(h=f.Ka,g=f.ju,g.left=f.Sk/h.width,g.top=f.Tk/h.height,g.right=(f.Sk+f.width)/h.width,g.bottom=(f.Tk+f.height)/h.height,0===f.Sk&&0===f.Tk&&f.width===h.width&&f.height===h.height&&(f.gl=!1));this.ed=this.Ob.frames[this.Aa];this.ro=this.ed.jb};n.Nb=function(){var a={a:this.Ob.ab,f:this.Aa,cas:this.kk,fs:this.dh,ar:this.Rg,at:this.ng.ib,
rt:this.$h};this.Vi||(a.ap=this.Vi);this.Ui||(a.af=this.Ui);return a};n.Qb=function(a){var b=this.cD(a.a);b&&(this.Ob=b);this.Aa=a.f;0>this.Aa&&(this.Aa=0);this.Aa>=this.Ob.frames.length&&(this.Aa=this.Ob.frames.length-1);this.kk=a.cas;this.dh=a.fs;this.Rg=a.ar;this.ng.reset();this.ng.ib=a.at;this.Vi=a.hasOwnProperty("ap")?a.ap:!0;this.Ui=a.hasOwnProperty("af")?a.af:!0;a.hasOwnProperty("rt")?this.$h=a.rt:this.$h=this.Ob.Yt;this.ed=this.Ob.frames[this.Aa];this.ro=this.ed.jb;this.Oa.pn(this.ed.Up);
this.je=this.ed.je;this.ke=this.ed.ke};n.kr=function(a){this.Aa=a?0:this.Ob.frames.length-1;this.Vi=!1;this.uv=this.Ob.name;this.As=!0;this.j.trigger(jd.prototype.G.Hz,this);this.j.trigger(jd.prototype.G.Gz,this);this.As=!1;this.Rg=0};n.k=function(){return this.ng.ib};n.bb=function(){this.ng.add(this.j.yf(this));this.sr.length&&this.PB();0<=this.lo&&this.Qv();var a=this.ng.ib,b=this.Ob,c=b.frames[this.Aa],d=c.duration/this.kk;this.Vi&&a>=this.dh+d&&(this.Ui?this.Aa++:this.Aa--,this.dh+=d,this.Aa>=
b.frames.length&&(b.Tx?(this.Ui=!1,this.Aa=b.frames.length-2):b.loop?this.Aa=this.$h:(this.Rg++,this.Rg>=b.Xt?this.kr(!1):this.Aa=this.$h)),0>this.Aa&&(b.Tx?(this.Aa=1,this.Ui=!0,b.loop||(this.Rg++,this.Rg>=b.Xt&&this.kr(!0))):b.loop?this.Aa=this.$h:(this.Rg++,this.Rg>=b.Xt?this.kr(!0):this.Aa=this.$h)),0>this.Aa?this.Aa=0:this.Aa>=b.frames.length&&(this.Aa=b.frames.length-1),a>this.dh+b.frames[this.Aa].duration/this.kk&&(this.dh=a),a=b.frames[this.Aa],this.ek(c,a),this.j.yb=!0)};n.gw=function(a){var b,
c,d;b=0;for(c=this.type.Fe.length;b<c;b++)if(d=this.type.Fe[b],Ib(d.name,a))return d;return null};n.cD=function(a){var b,c,d;b=0;for(c=this.type.Fe.length;b<c;b++)if(d=this.type.Fe[b],d.ab===a)return d;return null};n.PB=function(){var a=this.Ob.frames[this.Aa],b=this.gw(this.sr);this.sr="";!b||Ib(b.name,this.Ob.name)&&this.Vi||(this.Ob=b,this.kk=b.speed,this.$h=b.Yt,0>this.Aa&&(this.Aa=0),this.Aa>=this.Ob.frames.length&&(this.Aa=this.Ob.frames.length-1),1===this.CB&&(this.Aa=0),this.Vi=!0,this.dh=
this.ng.ib,this.Ui=!0,this.ek(a,this.Ob.frames[this.Aa]),this.j.yb=!0)};n.Qv=function(){var a=this.Ob.frames[this.Aa],b=this.Aa;this.Aa=xa(this.lo);0>this.Aa&&(this.Aa=0);this.Aa>=this.Ob.frames.length&&(this.Aa=this.Ob.frames.length-1);b!==this.Aa&&(this.ek(a,this.Ob.frames[this.Aa]),this.dh=this.ng.ib,this.j.yb=!0);this.lo=-1};n.ek=function(a,b){var c=a.width,d=a.height,e=b.width,f=b.height;c!=e&&(this.width*=e/c);d!=f&&(this.height*=f/d);this.je=b.je;this.ke=b.ke;this.Oa.pn(b.Up);this.ba();this.ed=
b;this.ro=b.jb;c=0;for(d=this.Ea.length;c<d;c++)e=this.Ea[c],e.Hx&&e.Hx(a,b);this.j.trigger(jd.prototype.G.ek,this)};n.Ye=function(a){a.globalAlpha=this.opacity;var b=this.ed,c=b.gl,d=b.Ka,e=this.x,f=this.y,g=this.width,h=this.height;if(0===this.M&&0<=g&&0<=h)e-=this.je*g,f-=this.ke*h,this.j.hf&&(e=Math.round(e),f=Math.round(f)),c?a.drawImage(d,b.Sk,b.Tk,b.width,b.height,e,f,g,h):a.drawImage(d,e,f,g,h);else{this.j.hf&&(e=Math.round(e),f=Math.round(f));a.save();var k=0<g?1:-1,l=0<h?1:-1;a.translate(e,
f);1===k&&1===l||a.scale(k,l);a.rotate(this.M*k*l);e=0-this.je*ra(g);f=0-this.ke*ra(h);c?a.drawImage(d,b.Sk,b.Tk,b.width,b.height,e,f,ra(g),ra(h)):a.drawImage(d,e,f,ra(g),ra(h));a.restore()}};n.ej=function(a){this.Md(a)};n.Md=function(a){a.we(this.ro);a.Hi(this.opacity);var b=this.ed,c=this.Fb;if(this.j.hf){var d=Math.round(this.x)-this.x,e=Math.round(this.y)-this.y;b.gl?a.Gg(c.$c+d,c.bd+e,c.Ud+d,c.Vd+e,c.Id+d,c.Jd+e,c.Gd+d,c.Hd+e,b.ju):a.bl(c.$c+d,c.bd+e,c.Ud+d,c.Vd+e,c.Id+d,c.Jd+e,c.Gd+d,c.Hd+e)}else b.gl?
a.Gg(c.$c,c.bd,c.Ud,c.Vd,c.Id,c.Jd,c.Gd,c.Hd,b.ju):a.bl(c.$c,c.bd,c.Ud,c.Vd,c.Id,c.Jd,c.Gd,c.Hd)};n.kD=function(a){var b=this.ed,c,d;c=0;for(d=b.ys.length;c<d;c++)if(Ib(a,b.ys[c][0]))return c;return-1};n.zf=function(a,b){var c=this.ed,d=c.ys,e;oa(a)?e=this.kD(a):e=a-1;e=xa(e);if(0>e||e>=d.length)return b?this.x:this.y;var f=(d[e][1]-c.je)*this.width,d=d[e][2],d=(d-c.ke)*this.height,c=Math.cos(this.M);e=Math.sin(this.M);var g=f*c-d*e,d=d*c+f*e,f=g+this.x,d=d+this.y;return b?f:d};var q=[],p=-2,u=[];
c.prototype.Pz=function(a){if(!a)return!1;var c=this.j,e=c.ds(),g=e.type,h=null;e.na.collmemory?h=e.na.collmemory:(h={},e.na.collmemory=h);e.na.spriteCreatedDestroyCallback||(e.na.spriteCreatedDestroyCallback=!0,c.Bl(function(a){var c=e.na.collmemory;a=a.uid;var d,f;for(d in c)c.hasOwnProperty(d)&&(f=c[d],f[0]===a||f[1]===a)&&(b(c[d]),delete c[d])}));var l=g.gb(),m=a.gb(),l=l.Ie(),n,q,r,t,O,H,K,M=this.j.Ae,ca=M-1,X=c.Tc().Pc;for(q=0;q<l.length;q++){r=l[q];m.zb?(r.Ua(),this.j.bs(r.V,a,r.Eb,u),n=u,
this.j.pB(r,a,n)):n=m.Ie();for(t=0;t<n.length;t++)O=n[t],c.ze(r,O)||c.DB(r,O)?(H=f(h,r,O),H=!H||p<ca,d(h,r,O,M),H&&(c.al(X.Ab),H=g.gb(),K=a.gb(),H.zb=!1,K.zb=!1,g===a?(H.J.length=2,H.J[0]=r,H.J[1]=O,g.sf()):(H.J.length=1,K.J.length=1,H.J[0]=r,K.J[0]=O,g.sf(),a.sf()),X.gq(),c.uh(X.Ab))):k(h,r,O);E(u)}return!1};var t=new ea,r=!1;new Aa(0,0,0,0);l.finish=function(a){if(r){if(a){var b=this.j.Tc().Pc.Hf;a=null.gb();var c=t.Se(),d,e;if(a.zb){a.zb=!1;E(a.J);d=0;for(e=c.length;d<e;++d)a.J[d]=c[d];if(b)for(E(a.lb),
d=0,e=null.J.length;d<e;++d)c=null.J[d],t.contains(c)||a.lb.push(c)}else if(b)for(b=a.J.length,d=0,e=c.length;d<e;++d)a.J[b+d]=c[d],Ma(a.lb,c[d]);else Ia(a.J,c);null.sf()}t.clear();r=!1}};c.prototype.Gz=function(a){return Ib(this.uv,a)};c.prototype.Hz=function(){return!0};c.prototype.ek=function(){return!0};h.G=new c;g.prototype.cB=function(a,b,c){if(a&&b&&(b=this.j.Dr(a,b,this.zf(c,!0),this.zf(c,!1)))){"undefined"!==typeof b.M&&(b.M=this.M,b.ba());this.j.df++;var d,e,f;this.j.trigger(Object.getPrototypeOf(a.Za).G.ck,
b);if(b.Pd)for(d=0,e=b.siblings.length;d<e;d++)f=b.siblings[d],this.j.trigger(Object.getPrototypeOf(f.type.Za).G.ck,f);this.j.df--;d=this.j.gD();c=!1;if(ma(d.na.Spawn_LastExec)||d.na.Spawn_LastExec<this.j.jj)c=!0,d.na.Spawn_LastExec=this.j.jj;if(a!=this.type&&(a=a.gb(),a.zb=!1,c?(E(a.J),a.J[0]=b):a.J.push(b),b.Pd))for(d=0,e=b.siblings.length;d<e;d++)f=b.siblings[d],a=f.type.gb(),a.zb=!1,c?(E(a.J),a.J[0]=f):a.J.push(f)}};g.prototype.QA=function(a){this.lo=a;this.Os||(this.j.kl(this),this.Os=!0);this.As||
this.Qv()};g.prototype.TA=function(a){var b=this.ed,c=b.width*a*(0>this.width?-1:1);a=b.height*a*(0>this.height?-1:1);if(this.width!==c||this.height!==a)this.width=c,this.height=a,this.ba()};h.ya=new g;h.Fa=new function(){}})();function Dd(a){this.j=a}
(function(){function a(){return g.length?g.pop():{}}function c(a){var b,c;b=0;for(c=a.length;b<c;b++)g.push(a[b]);E(a)}function b(a){return a.length&&" "===a.charAt(a.length-1)?a.substring(0,a.length-1):a}function e(){}var d=Dd.prototype;d.da=function(){d.ya.ZA=function(a){this.width!==a&&(this.width=a,this.Vj=!0,this.ba())}};d.ma=function(a){this.Za=a;this.j=a.j};var k=d.ma.prototype;k.da=function(){};k.Vm=function(){if(!this.Da){var a,b,c;a=0;for(b=this.J.length;a<b;a++)c=this.J[a],c.Dg=null,c.Jj=
null,c.Pe=null}};d.la=function(a){this.type=a;this.j=a.j;this.zd?E(this.mi):this.mi=[];this.Vj=!0};k=d.la.prototype;k.da=function(){this.text=this.X[0];this.visible=0===this.X[1];this.font=this.X[2];this.color=this.X[3];this.Xo=this.X[4];this.Oq=this.X[5];this.Ku=0===this.X[7];this.gt=this.op=this.width;this.np=this.height;this.it=this.X[8];this.Mo=this.ok="";this.My=this.Ny=this.dn=0;this.zE();this.Pe=this.Jj=this.Dg=null;this.wx=!1;this.Am=this.j.Ae;this.zd?this.Ci.set(0,0,1,1):this.Ci=new Aa(0,
0,1,1);this.j.ta&&this.j.kl(this)};k.zE=function(){var a=this.font.split(" "),b;for(b=0;b<a.length;b++)if("pt"===a[b].substr(a[b].length-2,2)){this.dn=parseInt(a[b].substr(0,a[b].length-2));this.Qt=Math.ceil(this.dn/72*96)+4;0<b&&(this.Mo=a[b-1]);this.ok=a[b+1];for(b+=2;b<a.length;b++)this.ok+=" "+a[b];break}};k.Nb=function(){return{t:this.text,f:this.font,c:this.color,ha:this.Xo,va:this.Oq,wr:this.Ku,lho:this.it,fn:this.ok,fs:this.Mo,ps:this.dn,pxh:this.Qt,tw:this.Ny,th:this.My,lrt:this.Am}};k.Qb=
function(a){this.text=a.t;this.font=a.f;this.color=a.c;this.Xo=a.ha;this.Oq=a.va;this.Ku=a.wr;this.it=a.lho;this.ok=a.fn;this.Mo=a.fs;this.dn=a.ps;this.Qt=a.pxh;this.Ny=a.tw;this.My=a.th;this.Am=a.lrt;this.Vj=!0;this.gt=this.op=this.width;this.np=this.height};k.bb=function(){if(this.j.ta&&this.Pe&&300<=this.j.Ae-this.Am){var a=this.V;this.Ua();var b=this.Eb;if(b.right<a.Bb||b.bottom<a.Cb||b.left>a.Ib||b.top>a.Hb)this.j.ta.deleteTexture(this.Pe),this.Dg=this.Jj=this.Pe=null}};k.Gf=function(){this.Dg=
this.Jj=null;this.j.ta&&this.Pe&&this.j.ta.deleteTexture(this.Pe);this.Pe=null};k.k=function(){this.font=this.Mo+" "+this.dn.toString()+"pt "+this.ok;this.Vj=!0;this.j.yb=!0};k.Ye=function(a,b){a.font=this.font;a.textBaseline="top";a.fillStyle=this.color;a.globalAlpha=b?1:this.opacity;var c=1;b&&(c=Math.abs(this.V.ie()),a.save(),a.scale(c,c));if(this.Vj||this.width!==this.gt)this.type.Za.jB(this.text,this.mi,a,this.width,this.Ku),this.Vj=!1,this.gt=this.width;this.Ua();var c=b?0:this.Fb.$c,d=b?0:
this.Fb.bd;this.j.hf&&(c=c+.5|0,d=d+.5|0);0===this.M||b||(a.save(),a.translate(c,d),a.rotate(this.M),d=c=0);var e=d+this.height,f=this.Qt,f=f+this.it,g,k;1===this.Oq?d+=Math.max(this.height/2-this.mi.length*f/2,0):2===this.Oq&&(d+=Math.max(this.height-this.mi.length*f-2,0));for(k=0;k<this.mi.length&&!(g=c,1===this.Xo?g=c+(this.width-this.mi[k].width)/2:2===this.Xo&&(g=c+(this.width-this.mi[k].width)),a.fillText(this.mi[k].text,g,d),d+=f,d>=e-f);k++);(0!==this.M||b)&&a.restore();this.Am=this.j.Ae};
k.Md=function(a){if(!(1>this.width||1>this.height)){var b=this.Vj||this.wx;this.wx=!1;var c=this.V.ie(),d=this.V.tc(),e=this.Ci,f=c*this.width,g=c*this.height,k=Math.ceil(f),r=Math.ceil(g),v=Math.abs(k),y=Math.abs(r),A=this.j.Ia/2,F=this.j.Ha/2;this.Jj||(this.Dg=document.createElement("canvas"),this.Dg.width=v,this.Dg.height=y,this.op=v,this.np=y,b=!0,this.Jj=this.Dg.getContext("2d"));if(v!==this.op||y!==this.np)this.Dg.width=v,this.Dg.height=y,this.Pe&&(a.deleteTexture(this.Pe),this.Pe=null),b=!0;
b&&(this.Jj.clearRect(0,0,v,y),this.Ye(this.Jj,!0),this.Pe||(this.Pe=a.We(v,y,this.j.Tb,this.j.ih)),a.DF(this.Dg,this.Pe,this.j.ih));this.op=v;this.np=y;a.we(this.Pe);a.Hi(this.opacity);a.Jf();a.translate(-A,-F);a.nf();var D=this.Fb,b=this.V.cc(D.$c,D.bd,!0,!0),v=this.V.cc(D.$c,D.bd,!1,!0),y=this.V.cc(D.Ud,D.Vd,!0,!0),A=this.V.cc(D.Ud,D.Vd,!1,!0),F=this.V.cc(D.Id,D.Jd,!0,!0),G=this.V.cc(D.Id,D.Jd,!1,!0),z=this.V.cc(D.Gd,D.Hd,!0,!0),D=this.V.cc(D.Gd,D.Hd,!1,!0);if(this.j.hf||0===this.M&&0===d)var w=
(b+.5|0)-b,B=(v+.5|0)-v,b=b+w,v=v+B,y=y+w,A=A+B,F=F+w,G=G+B,z=z+w,D=D+B;0===this.M&&0===d?(y=b+k,A=v,F=y,G=v+r,z=b,D=G,e.right=1,e.bottom=1):(e.right=f/k,e.bottom=g/r);a.Gg(b,v,y,A,F,G,z,D,e);a.Jf();a.scale(c,c);a.jq(-this.V.tc());a.translate((this.V.Bb+this.V.Ib)/-2,(this.V.Cb+this.V.Hb)/-2);a.nf();this.Am=this.j.Ae}};var f=[];d.fB=function(a){E(f);for(var b="",c,d=0;d<a.length;)if(c=a.charAt(d),"\n"===c)b.length&&(f.push(b),b=""),f.push("\n"),++d;else if(" "===c||"\t"===c||"-"===c){do b+=a.charAt(d),
d++;while(d<a.length&&(" "===a.charAt(d)||"\t"===a.charAt(d)));f.push(b);b=""}else d<a.length&&(b+=c,d++);b.length&&f.push(b)};var g=[];d.jB=function(b,d,e,f,g){if(b&&b.length)if(2>=f)c(d);else{if(100>=b.length&&-1===b.indexOf("\n")){var k=e.measureText(b).width;if(k<=f){c(d);d.push(a());d[0].text=b;d[0].width=k;return}}this.kB(b,d,e,f,g)}else c(d)};d.kB=function(c,d,e,k,q){q&&(this.fB(c),c=f);var p="",u,t,r,v=0;for(r=0;r<c.length;r++)"\n"===c[r]?(v>=d.length&&d.push(a()),p=b(p),t=d[v],t.text=p,t.width=
e.measureText(p).width,v++,p=""):(u=p,p+=c[r],t=e.measureText(p).width,t>=k&&(v>=d.length&&d.push(a()),u=b(u),t=d[v],t.text=u,t.width=e.measureText(u).width,v++,p=c[r],q||" "!==p||(p="")));p.length&&(v>=d.length&&d.push(a()),p=b(p),t=d[v],t.text=p,t.width=e.measureText(p).width,v++);for(r=v;r<d.length;r++)g.push(d[r]);d.length=v};d.G=new function(){};e.prototype.VA=function(a){na(a)&&1E9>a&&(a=Math.round(1E10*a)/1E10);a=a.toString();this.text!==a&&(this.text=a,this.Vj=!0,this.j.yb=!0)};d.ya=new e;
d.Fa=new function(){}})();function Ed(a){this.j=a}
(function(){var a=Ed.prototype;a.ma=function(a){this.Za=a;this.j=a.j};var c=a.ma.prototype;c.da=function(){this.Da||(this.Ka=new Image,this.Ka.Br=this.Dq,this.j.Hu(this.Ka,this.Cq),this.jb=this.pattern=null)};c.Vm=function(){this.Da||(this.jb=null)};c.Gp=function(){if(!this.Da&&this.J.length){this.jb||(this.jb=this.j.ta.Lk(this.Ka,!0,this.j.Tb,this.zn));var a,c;a=0;for(c=this.J.length;a<c;a++)this.J[a].jb=this.jb}};c.Gm=function(){this.Da||this.jb||!this.j.ta||(this.jb=this.j.ta.Lk(this.Ka,!0,this.j.Tb,
this.zn))};c.Kq=function(){this.Da||this.J.length||!this.jb||(this.j.ta.deleteTexture(this.jb),this.jb=null)};c.Yp=function(a){a.drawImage(this.Ka,0,0)};a.la=function(a){this.type=a;this.j=a.j};c=a.la.prototype;c.da=function(){this.visible=0===this.X[0];this.Ci=new Aa(0,0,0,0);this.rw=!1;this.Ka=this.type.Ka;this.j.ta?(this.type.Gm(),this.jb=this.type.jb):(this.type.pattern||(this.type.pattern=this.j.$b.createPattern(this.type.Ka,"repeat")),this.pattern=this.type.pattern)};c.Ue=function(){this.rw=
!1;this.Ka=this.type.Ka};c.Gf=function(){this.j.ta&&this.rw&&this.jb&&(this.j.ta.deleteTexture(this.jb),this.jb=null)};c.Ye=function(a){a.globalAlpha=this.opacity;a.save();a.fillStyle=this.pattern;var c=this.x,d=this.y;this.j.hf&&(c=Math.round(c),d=Math.round(d));var k=-(this.je*this.width),f=-(this.ke*this.height),g=k%this.Ka.width,h=f%this.Ka.height;0>g&&(g+=this.Ka.width);0>h&&(h+=this.Ka.height);a.translate(c,d);a.rotate(this.M);a.translate(g,h);a.fillRect(k-g,f-h,this.width,this.height);a.restore()};
c.ej=function(a){this.Md(a)};c.Md=function(a){a.we(this.jb);a.Hi(this.opacity);var c=this.Ci;c.right=this.width/this.Ka.width;c.bottom=this.height/this.Ka.height;var d=this.Fb;if(this.j.hf){var k=Math.round(this.x)-this.x,f=Math.round(this.y)-this.y;a.Gg(d.$c+k,d.bd+f,d.Ud+k,d.Vd+f,d.Id+k,d.Jd+f,d.Gd+k,d.Hd+f,c)}else a.Gg(d.$c,d.bd,d.Ud,d.Vd,d.Id,d.Jd,d.Gd,d.Hd,c)};a.G=new function(){};a.ya=new function(){};a.Fa=new function(){}})();function Fd(a){this.j=a}
(function(){function a(a){l=a.x;m=a.y;n=a.z}function c(a,c,d,e){var f;f=q.length?q.pop():new b;f.init(a,c,d,e);return f}function b(){this.un=this.id=this.Aj=this.zj=this.y=this.x=this.zq=this.yq=this.dt=this.time=this.qu=0;this.An=this.Iq=!1}function e(a){return a.sourceCapabilities&&a.sourceCapabilities.firesTouchEvents||a.originalEvent&&a.originalEvent.sourceCapabilities&&a.originalEvent.sourceCapabilities.firesTouchEvents}function d(){}function k(){}var f=Fd.prototype;f.ma=function(a){this.Za=
a;this.j=a.j};f.ma.prototype.da=function(){};f.la=function(a){this.type=a;this.j=a.j;this.touches=[];this.xt=!1};var g=f.la.prototype,h={left:0,top:0};g.Tl=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 l=0,m=0,n=0,q=[];b.prototype.init=function(a,b,c,d){var e=mb();this.qu=this.dt=this.time=e;this.yq=a;this.zq=b;this.x=a;this.y=b;this.zj=a;this.Aj=b;this.pressure=this.height=this.width=0;this.id=c;this.un=d;this.An=this.Iq=!1};b.prototype.update=
function(a,b,c,d,e,f){this.dt=this.time;this.time=a;this.zj=this.x;this.Aj=this.y;this.x=b;this.y=c;this.width=d;this.height=e;this.pressure=f;!this.An&&15<=bb(this.yq,this.zq,this.x,this.y)&&(this.An=!0)};b.prototype.fE=function(a,b){!this.Iq&&500<=mb()-this.qu&&!this.An&&15>bb(this.yq,this.zq,this.x,this.y)&&(this.Iq=!0,a.Og=this.un,a.ml=this.id,a.vk=b,a.j.trigger(Fd.prototype.G.iA,a),a.Wg=this.x,a.Xg=this.y,a.j.trigger(Fd.prototype.G.jA,a),a.vk=0)};var p=-1E3,u=-1E3,t=-1E4;b.prototype.ox=function(a,
b){if(!this.Iq){var c=mb();333>=c-this.qu&&!this.An&&15>bb(this.yq,this.zq,this.x,this.y)&&(a.Og=this.un,a.ml=this.id,a.vk=b,666>=c-t&&25>bb(p,u,this.x,this.y)?(a.j.trigger(Fd.prototype.G.Rz,a),a.Wg=this.x,a.Xg=this.y,a.j.trigger(Fd.prototype.G.Sz,a),u=p=-1E3,t=-1E4):(a.j.trigger(Fd.prototype.G.HA,a),a.Wg=this.x,a.Xg=this.y,a.j.trigger(Fd.prototype.G.IA,a),p=this.x,u=this.y,t=c),a.vk=0)}};g.da=function(){this.VD=!("undefined"===typeof window.c2isWindows8||!window.c2isWindows8);this.vk=this.ml=this.Og=
this.Xg=this.Wg=this.qv=this.pv=this.ov=this.nB=this.mB=this.lB=this.Lp=this.Kp=this.Jp=0;this.BF=0!==this.X[0];var b=0<this.j.td?document:this.j.canvas,c=document;this.j.fd?c=b=window.Canvas:this.j.Od&&(c=b=window);var d=this;"undefined"!==typeof PointerEvent?(b.addEventListener("pointerdown",function(a){d.$m(a)},!1),b.addEventListener("pointermove",function(a){d.Zm(a)},!1),c.addEventListener("pointerup",function(a){d.qh(a,!1)},!1),c.addEventListener("pointercancel",function(a){d.qh(a,!0)},!1),this.j.canvas&&
(this.j.canvas.addEventListener("MSGestureHold",function(a){a.preventDefault()},!1),document.addEventListener("MSGestureHold",function(a){a.preventDefault()},!1),this.j.canvas.addEventListener("gesturehold",function(a){a.preventDefault()},!1),document.addEventListener("gesturehold",function(a){a.preventDefault()},!1))):window.navigator.msPointerEnabled?(b.addEventListener("MSPointerDown",function(a){d.$m(a)},!1),b.addEventListener("MSPointerMove",function(a){d.Zm(a)},!1),c.addEventListener("MSPointerUp",
function(a){d.qh(a,!1)},!1),c.addEventListener("MSPointerCancel",function(a){d.qh(a,!0)},!1),this.j.canvas&&(this.j.canvas.addEventListener("MSGestureHold",function(a){a.preventDefault()},!1),document.addEventListener("MSGestureHold",function(a){a.preventDefault()},!1))):(b.addEventListener("touchstart",function(a){d.Ip(a)},!1),b.addEventListener("touchmove",function(a){d.Hp(a)},!1),c.addEventListener("touchend",function(a){d.Wk(a,!1)},!1),c.addEventListener("touchcancel",function(a){d.Wk(a,!0)},
!1));if(this.VD){var e=function(a){a=a.reading;d.ov=a.accelerationX;d.pv=a.accelerationY;d.qv=a.accelerationZ},f=function(a){a=a.reading;d.Jp=a.yawDegrees;d.Kp=a.pitchDegrees;d.Lp=a.rollDegrees},g=Windows.Devices.Sensors.Accelerometer.getDefault();g&&(g.reportInterval=Math.max(g.minimumReportInterval,16),g.addEventListener("readingchanged",e));var h=Windows.Devices.Sensors.Inclinometer.getDefault();h&&(h.reportInterval=Math.max(h.minimumReportInterval,16),h.addEventListener("readingchanged",f));document.addEventListener("visibilitychange",
function(){document.hidden||document.msHidden?(g&&g.removeEventListener("readingchanged",e),h&&h.removeEventListener("readingchanged",f)):(g&&g.addEventListener("readingchanged",e),h&&h.addEventListener("readingchanged",f))},!1)}else window.addEventListener("deviceorientation",function(a){d.Jp=a.alpha||0;d.Kp=a.beta||0;d.Lp=a.gamma||0},!1),window.addEventListener("devicemotion",function(a){a.accelerationIncludingGravity&&(d.lB=a.accelerationIncludingGravity.x||0,d.mB=a.accelerationIncludingGravity.y||
0,d.nB=a.accelerationIncludingGravity.z||0);a.acceleration&&(d.ov=a.acceleration.x||0,d.pv=a.acceleration.y||0,d.qv=a.acceleration.z||0)},!1);this.BF&&!this.j.Kb&&(jQuery(document).mousemove(function(a){d.Xm(a)}),jQuery(document).mousedown(function(a){d.Wm(a)}),jQuery(document).mouseup(function(a){d.Ym(a)}));!this.j.Fk&&this.j.cf&&navigator.accelerometer&&navigator.accelerometer.watchAcceleration&&navigator.accelerometer.watchAcceleration(a,null,{frequency:40});this.j.sF(this)};g.Zm=function(a){if(a.pointerType!==
a.MSPOINTER_TYPE_MOUSE&&"mouse"!==a.pointerType){a.preventDefault&&a.preventDefault();var b=this.Tl(a.pointerId),c=mb();if(0<=b){var d=this.j.Kb?h:jQuery(this.j.canvas).offset(),b=this.touches[b];2>c-b.time||b.update(c,a.pageX-d.left,a.pageY-d.top,a.width||0,a.height||0,a.pressure||0)}}};g.$m=function(a){if(a.pointerType!==a.MSPOINTER_TYPE_MOUSE&&"mouse"!==a.pointerType){a.preventDefault&&Nb(a)&&a.preventDefault();var b=this.j.Kb?h:jQuery(this.j.canvas).offset(),d=a.pageX-b.left,b=a.pageY-b.top;mb();
this.Og=this.touches.length;this.ml=a.pointerId;this.touches.push(c(d,b,a.pointerId,this.Og));this.j.Vb=!0;this.j.trigger(Fd.prototype.G.Yu,this);this.j.trigger(Fd.prototype.G.hv,this);this.Wg=d;this.Xg=b;this.j.trigger(Fd.prototype.G.$q,this);this.j.Vb=!1}};g.qh=function(a,b){if(a.pointerType!==a.MSPOINTER_TYPE_MOUSE&&"mouse"!==a.pointerType){a.preventDefault&&Nb(a)&&a.preventDefault();var c=this.Tl(a.pointerId);this.Og=0<=c?this.touches[c].un:-1;this.ml=0<=c?this.touches[c].id:-1;this.j.Vb=!0;this.j.trigger(Fd.prototype.G.Xu,
this);this.j.trigger(Fd.prototype.G.gv,this);0<=c&&(b||this.touches[c].ox(this,c),100>q.length&&q.push(this.touches[c]),this.touches.splice(c,1));this.j.Vb=!1}};g.Hp=function(a){a.preventDefault&&a.preventDefault();var b=mb(),c,d,e,f;c=0;for(d=a.changedTouches.length;c<d;c++)if(e=a.changedTouches[c],f=this.Tl(e.identifier),0<=f){var g=this.j.Kb?h:jQuery(this.j.canvas).offset();f=this.touches[f];2>b-f.time||f.update(b,e.pageX-g.left,e.pageY-g.top,2*(e.KG||e.RG||e.DG||e.GG||0),2*(e.LG||e.SG||e.EG||
e.HG||0),e.yG||e.QG||e.CG||e.FG||0)}};g.Ip=function(a){a.preventDefault&&Nb(a)&&a.preventDefault();var b=this.j.Kb?h:jQuery(this.j.canvas).offset();mb();this.j.Vb=!0;var d,e,f,g;d=0;for(e=a.changedTouches.length;d<e;d++)if(f=a.changedTouches[d],g=this.Tl(f.identifier),-1===g){g=f.pageX-b.left;var k=f.pageY-b.top;this.Og=this.touches.length;this.ml=f.identifier;this.touches.push(c(g,k,f.identifier,this.Og));this.j.trigger(Fd.prototype.G.Yu,this);this.j.trigger(Fd.prototype.G.hv,this);this.Wg=g;this.Xg=
k;this.j.trigger(Fd.prototype.G.$q,this)}this.j.Vb=!1};g.Wk=function(a,b){a.preventDefault&&Nb(a)&&a.preventDefault();this.j.Vb=!0;var c,d,e;c=0;for(d=a.changedTouches.length;c<d;c++)e=a.changedTouches[c],e=this.Tl(e.identifier),0<=e&&(this.Og=this.touches[e].un,this.ml=this.touches[e].id,this.j.trigger(Fd.prototype.G.Xu,this),this.j.trigger(Fd.prototype.G.gv,this),b||this.touches[e].ox(this,e),100>q.length&&q.push(this.touches[e]),this.touches.splice(e,1));this.j.Vb=!1};g.k=function(){return this.j.cf&&
0===this.Jp&&0!==n?90*n:this.Jp};g.n=function(){return this.j.cf&&0===this.Kp&&0!==m?90*m:this.Kp};g.C=function(){return this.j.cf&&0===this.Lp&&0!==l?90*l:this.Lp};g.Wm=function(a){e(a)||(this.Ip({changedTouches:[{pageX:a.pageX,pageY:a.pageY,identifier:0}]}),this.xt=!0)};g.Xm=function(a){this.xt&&!e(a)&&this.Hp({changedTouches:[{pageX:a.pageX,pageY:a.pageY,identifier:0}]})};g.Ym=function(a){a.preventDefault&&this.j.Wo&&!this.j.ih&&a.preventDefault();this.j.Wo=!0;e(a)||(this.Wk({changedTouches:[{pageX:a.pageX,
pageY:a.pageY,identifier:0}]}),this.xt=!1)};g.Wj=function(){var a,b,c,d=mb();a=0;for(b=this.touches.length;a<b;++a)c=this.touches[a],c.time<=d-50&&(c.dt=d),c.fE(this,a)};d.prototype.hv=function(){return!0};d.prototype.gv=function(){return!0};d.prototype.yz=function(){return this.touches.length};d.prototype.$q=function(a){return a?this.j.xn(a,this.Wg,this.Xg):!1};d.prototype.Yu=function(a){a=Math.floor(a);return a===this.Og};d.prototype.Xu=function(a){a=Math.floor(a);return a===this.Og};d.prototype.iA=
function(){return!0};d.prototype.HA=function(){return!0};d.prototype.Rz=function(){return!0};d.prototype.jA=function(a){return a?this.j.xn(a,this.Wg,this.Xg):!1};d.prototype.IA=function(a){return a?this.j.xn(a,this.Wg,this.Xg):!1};d.prototype.Sz=function(a){return a?this.j.xn(a,this.Wg,this.Xg):!1};f.G=new d;k.prototype.Sn=function(a,b){var c=this.vk;if(0>c||c>=this.touches.length)a.wa(0);else{var d,e,f,g,h;ma(b)?(d=this.j.eh(0),e=d.scale,f=d.Wd,g=d.oe,h=d.M,d.scale=1,d.Wd=1,d.oe=1,d.M=0,a.wa(d.Zb(this.touches[c].x,
this.touches[c].y,!0)),d.scale=e,d.Wd=f,d.oe=g,d.M=h):(d=na(b)?this.j.eh(b):this.j.Wl(b))?a.wa(d.Zb(this.touches[c].x,this.touches[c].y,!0)):a.wa(0)}};k.prototype.Tn=function(a,b){var c=this.vk;if(0>c||c>=this.touches.length)a.wa(0);else{var d,e,f,g,h;ma(b)?(d=this.j.eh(0),e=d.scale,f=d.Wd,g=d.pe,h=d.M,d.scale=1,d.Wd=1,d.pe=1,d.M=0,a.wa(d.Zb(this.touches[c].x,this.touches[c].y,!1)),d.scale=e,d.Wd=f,d.pe=g,d.M=h):(d=na(b)?this.j.eh(b):this.j.Wl(b))?a.wa(d.Zb(this.touches[c].x,this.touches[c].y,!1)):
a.wa(0)}};f.Fa=new k})();function Gd(a){this.j=a}
(function(){function a(){}function c(){}function b(){}var e=Gd.prototype;e.ma=function(a){this.Za=a;this.j=a.j};e.ma.prototype.da=function(){};e.la=function(a){this.type=a;this.j=a.j};var d=e.la.prototype,k="",f="undefined"!==typeof window.is_scirra_arcade;f&&(k="arcade"+window.scirra_arcade_id);var g=!1;try{localStorage.getItem("test"),g=!0}catch(h){g=!1}d.da=function(){g||ia("[Construct 2] Webstorage plugin: local storage is not supported on this platform.")};a.prototype.Dz=function(a){return g?
null!=localStorage.getItem(k+a):!1};a.prototype.CA=function(){return!0};e.G=new a;c.prototype.dB=function(a,b){if(g)try{localStorage.setItem(k+a,b)}catch(c){this.j.trigger(Gd.prototype.G.CA,this)}};e.ya=new c;b.prototype.Ez=function(a,b){g?a.Zc(localStorage.getItem(k+b)||""):a.Zc("")};b.prototype.Xq=function(a){if(g){var b={},c,d,e;c=0;for(d=localStorage.length;c<d;c++)e=localStorage.key(c),f?e.substr(0,k.length)===k&&(b[e.substr(k.length)]=localStorage.getItem(e)):b[e]=localStorage.getItem(e);a.Zc(JSON.stringify({c2dictionary:!0,
data:b}))}else a.Zc("")};e.Fa=new b})();function Hd(a){this.j=a}
(function(){function a(a,b){var c=document.createElement("meta");c.name=a;c.content=b;document.head.appendChild(c)}function c(){}var b=Hd.prototype;b.ma=function(a){this.Za=a;this.j=a.j};b.ma.prototype.da=function(){};var e="",d=!1,k=!1,f=!1,g=null;b.la=function(a){this.type=a;this.j=a.j};var h=b.la.prototype;window.googlePlayLoadCallback=function(){d=!0;g.j.$a?g.j.trigger(Hd.prototype.G.Yq,g):k=!0};window.googlePlaySigninCallback=function(a){a.status&&a.status.signed_in?(f=!0,g.j.trigger(Hd.prototype.G.dv,
g)):"user_signed_out"===a.error?(f=!1,g.j.trigger(Hd.prototype.G.FA,g)):"immediate_failed"===a.error?(f=!1,g.j.trigger(Hd.prototype.G.Lz,g)):(f=!1,g.j.trigger(Hd.prototype.G.dk,g))};h.da=function(){e=this.X[1];if(!this.j.Kb){g=this;a("google-signin-clientid",e);a("google-signin-cookiepolicy","single_host_origin");a("google-signin-callback","googlePlaySigninCallback");a("google-signin-scope","https://www.googleapis.com/auth/games");var b=document.createElement("script");b.type="text/javascript";b.async=
!0;b.src="https://apis.google.com/js/client.js?onload=googlePlayLoadCallback";document.head.appendChild(b);this.j.kl(this)}};h.Gf=function(){};h.Nb=function(){return{}};h.Qb=function(){};h.Vk=function(){d&&this.j.trigger(Hd.prototype.G.Yq,this);f&&this.j.trigger(Hd.prototype.G.dv,this)};h.bb=function(){k&&(k=!1,this.j.trigger(Hd.prototype.G.Yq,this))};c.prototype.Yq=function(){return!0};c.prototype.dv=function(){return!0};c.prototype.FA=function(){return!0};c.prototype.dk=function(){return!0};c.prototype.Lz=
function(){return!0};b.G=new c;b.ya=new function(){};b.Fa=new function(){}})();function Id(a){this.j=a}
(function(){function a(){}function c(){}var b=Id.prototype;b.ma=function(a){this.behavior=a;this.j=a.j};b.ma.prototype.da=function(){};b.la=function(a,b){this.type=a;this.behavior=a.behavior;this.q=b;this.j=a.j};var e=b.la.prototype;e.da=function(){var a=this.X[0];this.kb=this.X[1];this.vd=this.X[2];this.xB=0!==this.X[3];this.eu=0!==this.X[4];this.P=Math.cos(this.q.M)*a;this.S=Math.sin(this.q.M)*a;this.zj=this.q.x;this.Aj=this.q.y;this.Ec=this.q.M;this.Gq=0;this.enabled=0!==this.X[5]};e.Nb=function(){return{acc:this.kb,
g:this.vd,dx:this.P,dy:this.S,lx:this.zj,ly:this.Aj,lka:this.Ec,t:this.Gq,e:this.enabled}};e.Qb=function(a){this.kb=a.acc;this.vd=a.g;this.P=a.dx;this.S=a.dy;this.zj=a.lx;this.Aj=a.ly;this.Ec=a.lka;this.Gq=a.t;this.enabled=a.e};e.bb=function(){if(this.enabled){var a=this.j.yf(this.q),b,c;this.q.M!==this.Ec&&(this.eu&&(b=bb(0,0,this.P,this.S),this.P=Math.cos(this.q.M)*b,this.S=Math.sin(this.q.M)*b),this.Ec=this.q.M);0!==this.kb&&(b=bb(0,0,this.P,this.S),c=0===this.P&&0===this.S?this.q.M:Va(0,0,this.P,
this.S),b+=this.kb*a,0>b&&(b=0),this.P=Math.cos(c)*b,this.S=Math.sin(c)*b);0!==this.vd&&(this.S+=this.vd*a);this.zj=this.q.x;this.Aj=this.q.y;if(0!==this.P||0!==this.S)if(this.q.x+=this.P*a,this.q.y+=this.S*a,this.Gq+=bb(0,0,this.P*a,this.S*a),this.eu&&(this.q.M=Va(0,0,this.P,this.S),this.q.ba(),this.Ec=this.q.M),this.q.ba(),this.xB&&(b=this.j.qc(this.q)))this.j.kf(this.q,b),b=bb(0,0,this.P,this.S),c=this.j.AB(this.q,this.zj,this.Aj),this.P=Math.cos(c)*b,this.S=Math.sin(c)*b,this.q.x+=this.P*a,this.q.y+=
this.S*a,this.q.ba(),this.eu&&(this.Ec=this.q.M=c,this.q.ba()),this.j.Re(this.q,this.P/b,this.S/b,Math.max(2.5*b*a,30))||this.j.Pt(this.q,100)}};b.G=new function(){};a.prototype.yl=function(a){var b=Va(0,0,this.P,this.S);this.P=Math.cos(b)*a;this.S=Math.sin(b)*a};a.prototype.lv=function(a){a=I(a);var b=bb(0,0,this.P,this.S);this.P=Math.cos(a)*b;this.S=Math.sin(a)*b};b.ya=new a;c.prototype.fk=function(a){var b=bb(0,0,this.P,this.S),b=Hb(b);a.wa(b)};b.Fa=new c})();
function Jd(a){this.j=a;var c=this;this.j.Kb||(jQuery(document).mousemove(function(a){c.Xm(a)}),jQuery(document).mousedown(function(a){c.Wm(a)}),jQuery(document).mouseup(function(a){c.Ym(a)}));a=0<this.j.td?document:this.j.canvas;this.j.fd?a=window.Canvas:this.j.Od&&(a=window);"undefined"!==typeof PointerEvent?(a.addEventListener("pointerdown",function(a){c.$m(a)},!1),a.addEventListener("pointermove",function(a){c.Zm(a)},!1),a.addEventListener("pointerup",function(a){c.qh(a)},!1),a.addEventListener("pointercancel",
function(a){c.qh(a)},!1)):window.navigator.msPointerEnabled?(a.addEventListener("MSPointerDown",function(a){c.$m(a)},!1),a.addEventListener("MSPointerMove",function(a){c.Zm(a)},!1),a.addEventListener("MSPointerUp",function(a){c.qh(a)},!1),a.addEventListener("MSPointerCancel",function(a){c.qh(a)},!1)):(a.addEventListener("touchstart",function(a){c.Ip(a)},!1),a.addEventListener("touchmove",function(a){c.Hp(a)},!1),a.addEventListener("touchend",function(a){c.Wk(a)},!1),a.addEventListener("touchcancel",
function(a){c.Wk(a)},!1))}
(function(){function a(a){var c,d;c=0;for(d=a.Ea.length;c<d;c++)if(a.Ea[c]instanceof b.la)return a.Ea[c];return null}function c(){}var b=Jd.prototype,e={left:0,top:0};b.Wm=function(a){1===a.which&&this.Dt("leftmouse",a.pageX,a.pageY)};b.Xm=function(a){1===a.which&&this.Et("leftmouse",a.pageX,a.pageY)};b.Ym=function(a){1===a.which&&this.Ft("leftmouse")};b.Ip=function(a){a.preventDefault&&Nb(a)&&a.preventDefault();var b,c,d,e;b=0;for(c=a.changedTouches.length;b<c;b++)d=a.changedTouches[b],e=d.identifier,
this.Dt(e?e.toString():"<none>",d.pageX,d.pageY)};b.Hp=function(a){a.preventDefault&&a.preventDefault();var b,c,d,e;b=0;for(c=a.changedTouches.length;b<c;b++)d=a.changedTouches[b],e=d.identifier,this.Et(e?e.toString():"<none>",d.pageX,d.pageY)};b.Wk=function(a){a.preventDefault&&Nb(a)&&a.preventDefault();var b,c,d;b=0;for(c=a.changedTouches.length;b<c;b++)d=a.changedTouches[b],d=d.identifier,this.Ft(d?d.toString():"<none>")};b.$m=function(a){a.pointerType!==a.MSPOINTER_TYPE_MOUSE&&"mouse"!==a.pointerType&&
(a.preventDefault&&Nb(a)&&a.preventDefault(),this.Dt(a.pointerId.toString(),a.pageX,a.pageY))};b.Zm=function(a){a.pointerType!==a.MSPOINTER_TYPE_MOUSE&&"mouse"!==a.pointerType&&(a.preventDefault&&a.preventDefault(),this.Et(a.pointerId.toString(),a.pageX,a.pageY))};b.qh=function(a){a.pointerType!==a.MSPOINTER_TYPE_MOUSE&&"mouse"!==a.pointerType&&(a.preventDefault&&Nb(a)&&a.preventDefault(),this.Ft(a.pointerId.toString()))};b.Dt=function(b,c,d){var h=this.j.Kb?e:jQuery(this.j.canvas).offset();c=c-h.left;
d=d-h.top;var l,m,n,q,h=this.Ij.Se(),p,u,t,r=null;p=0;for(u=h.length;p<u;p++)if(t=h[p],l=a(t),l.enabled&&!l.cj&&(l=t.V.Zb(c,d,!0),m=t.V.Zb(c,d,!1),t.Ua(),t.Kd(l,m)))r?t.V.index>r.V.index?(r=t,n=l,q=m):t.V.index===r.V.index&&t.Af()>r.Af()&&(r=t,n=l,q=m):(r=t,n=l,q=m);r&&a(r).oE(b,n,q)};b.Et=function(b,c,d){var h=this.j.Kb?e:jQuery(this.j.canvas).offset();c=c-h.left;d=d-h.top;var l,m=this.Ij.Se(),n,q,p;n=0;for(q=m.length;n<q;n++)l=m[n],p=a(l),!p.enabled||!p.cj||p.cj&&p.Or!==b||(h=l.V.Zb(c,d,!0),l=l.V.Zb(c,
d,!1),p.pE(h,l))};b.Ft=function(b){var c=this.Ij.Se(),d,e,l;d=0;for(e=c.length;d<e;d++)l=c[d],l=a(l),l.cj&&l.Or===b&&l.vE()};b.ma=function(a){this.behavior=a;this.j=a.j};b.ma.prototype.da=function(){};b.la=function(a,b){this.type=a;this.behavior=a.behavior;this.q=b;this.j=a.j};var d=b.la.prototype;d.da=function(){this.cj=!1;this.S=this.P=0;this.Or="<none>";this.lr=this.X[0];this.enabled=0!==this.X[1]};d.Nb=function(){return{enabled:this.enabled}};d.Qb=function(a){this.enabled=a.enabled;this.cj=!1};
d.oE=function(a,b,c){this.P=b-this.q.x;this.S=c-this.q.y;this.cj=!0;this.Or=a;this.j.Vb=!0;this.j.trigger(Jd.prototype.G.Tz,this.q);this.j.Vb=!1};d.pE=function(a,b){var c=a-this.P,d=b-this.S;if(0===this.lr){if(this.q.x!==c||this.q.y!==d)this.q.x=c,this.q.y=d,this.q.ba()}else 1===this.lr?this.q.x!==c&&(this.q.x=c,this.q.ba()):2===this.lr&&this.q.y!==d&&(this.q.y=d,this.q.ba())};d.vE=function(){this.cj=!1;this.j.Vb=!0;this.j.trigger(Jd.prototype.G.Uz,this.q);this.j.Vb=!1};d.bb=function(){};c.prototype.Tz=
function(){return!0};c.prototype.Uz=function(){return!0};b.G=new c;b.ya=new function(){};b.Fa=new function(){}})();function Kd(a){this.j=a}
(function(){function a(){}function c(){}var b=Kd.prototype;b.ma=function(a){this.behavior=a;this.j=a.j};b.ma.prototype.da=function(){};b.la=function(a,b){this.type=a;this.behavior=a.behavior;this.q=b;this.j=a.j;this.Sj=this.Rj=this.lu=this.mu=this.nj=this.bg=this.Zf=this.Ol=this.Bn=!1;this.ct=this.bt=this.$s=this.et=-1;this.S=this.P=0};var e=b.la.prototype;e.da=function(){this.Ne=this.X[0];this.kb=this.X[1];this.Bc=this.X[2];this.Mr=this.X[3];this.jr=this.X[4];this.Ir=1===this.X[5];this.enabled=0!==
this.X[6];this.Ir&&!this.j.Kb&&(jQuery(document).keydown(function(a){return function(b){a.Tm(b)}}(this)),jQuery(document).keyup(function(a){return function(b){a.Um(b)}}(this)))};e.Nb=function(){return{dx:this.P,dy:this.S,enabled:this.enabled,maxspeed:this.Ne,acc:this.kb,dec:this.Bc,ignoreInput:this.nj}};e.Qb=function(a){this.P=a.dx;this.S=a.dy;this.enabled=a.enabled;this.Ne=a.maxspeed;this.kb=a.acc;this.Bc=a.dec;this.nj=a.ignoreInput;this.Sj=this.Rj=this.lu=this.mu=this.bg=this.Zf=this.Ol=this.Bn=
!1;this.ct=this.bt=this.$s=this.et=-1};e.Tm=function(a){var b=this.j.Ae;switch(a.which){case 37:a.preventDefault();this.bt<b&&(this.Zf=!0);break;case 38:a.preventDefault();this.et<b&&(this.Bn=!0);break;case 39:a.preventDefault();this.ct<b&&(this.bg=!0);break;case 40:a.preventDefault(),this.$s<b&&(this.Ol=!0)}};e.Um=function(a){var b=this.j.Ae;switch(a.which){case 37:a.preventDefault();this.Zf=!1;this.bt=b;break;case 38:a.preventDefault();this.Bn=!1;this.et=b;break;case 39:a.preventDefault();this.bg=
!1;this.ct=b;break;case 40:a.preventDefault(),this.Ol=!1,this.$s=b}};e.rh=function(){this.bg=this.Zf=this.Ol=this.Bn=!1};e.bb=function(){var a=this.j.yf(this.q),b=this.Zf||this.Rj,c=this.bg||this.Sj,e=this.Bn||this.mu,h=this.Ol||this.lu;this.lu=this.mu=this.Sj=this.Rj=!1;if(this.enabled){var l=this.j.qc(this.q);if(l&&(this.j.kf(this.q,l),!this.j.Pt(this.q)))return;this.nj&&(h=e=c=b=!1);0===this.Mr?c=b=!1:1===this.Mr&&(h=e=!1);2===this.Mr&&(e||h)&&(c=b=!1);b==c&&(0>this.P?(this.P+=this.Bc*a,0<this.P&&
(this.P=0)):0<this.P&&(this.P-=this.Bc*a,0>this.P&&(this.P=0)));e==h&&(0>this.S?(this.S+=this.Bc*a,0<this.S&&(this.S=0)):0<this.S&&(this.S-=this.Bc*a,0>this.S&&(this.S=0)));b&&!c&&(this.P=0<this.P?this.P-(this.kb+this.Bc)*a:this.P-this.kb*a);c&&!b&&(this.P=0>this.P?this.P+(this.kb+this.Bc)*a:this.P+this.kb*a);e&&!h&&(this.S=0<this.S?this.S-(this.kb+this.Bc)*a:this.S-this.kb*a);h&&!e&&(this.S=0>this.S?this.S+(this.kb+this.Bc)*a:this.S+this.kb*a);if(0!==this.P||0!==this.S){Math.sqrt(this.P*this.P+this.S*
this.S)>this.Ne&&(l=Math.atan2(this.S,this.P),this.P=this.Ne*Math.cos(l),this.S=this.Ne*Math.sin(l));c=this.q.x;e=this.q.y;b=this.q.M;this.q.x+=this.P*a;this.q.ba();if(l=this.j.qc(this.q))this.j.Re(this.q,0>this.P?1:-1,0,Math.abs(Math.floor(this.P*a)))||(this.q.x=c),this.P=0,this.q.ba(),this.j.kf(this.q,l);this.q.y+=this.S*a;this.q.ba();if(l=this.j.qc(this.q))this.j.Re(this.q,0,0>this.S?1:-1,Math.abs(Math.floor(this.S*a)))||(this.q.y=e),this.S=0,this.q.ba(),this.j.kf(this.q,l);a=Hb(this.P);l=Hb(this.S);
0===a&&0===l||!this.q.type.Za.XD||(1===this.jr?this.q.M=Ua(90*Math.round(Pa(Math.atan2(l,a))/90)):2===this.jr?this.q.M=Ua(45*Math.round(Pa(Math.atan2(l,a))/45)):3===this.jr&&(this.q.M=Math.atan2(l,a)));this.q.ba();this.q.M!=b&&(l=this.j.qc(this.q))&&(this.q.M=b,this.q.ba(),this.j.kf(this.q,l))}}};b.G=new function(){};a.prototype.yl=function(a){0>a&&(a=0);a>this.Ne&&(a=this.Ne);var b=Math.atan2(this.S,this.P);this.P=a*Math.cos(b);this.S=a*Math.sin(b)};b.ya=new a;c.prototype.fk=function(a){a.wa(Math.sqrt(this.P*
this.P+this.S*this.S))};b.Fa=new c})();function Ld(a){this.j=a}
(function(){function a(){}var c=Ld.prototype;c.ma=function(a){this.behavior=a;this.j=a.j};c.ma.prototype.da=function(){};c.la=function(a,b){this.type=a;this.behavior=a.behavior;this.q=b;this.j=a.j};var b=c.la.prototype;b.da=function(){this.Eh=this.Dh=this.tn=this.Bt=this.Ht=0};b.Nb=function(){return{ontime:this.Ht,offtime:this.Bt,stage:this.tn,stagetimeleft:this.Dh,timeleft:this.Eh}};b.Qb=function(a){this.Ht=a.ontime;this.Bt=a.offtime;this.tn=a.stage;this.Dh=a.stagetimeleft;this.Eh=a.timeleft;null===
this.Eh&&(this.Eh=Infinity)};b.bb=function(){if(!(0>=this.Eh)){var a=this.j.yf(this.q);this.Eh-=a;0>=this.Eh?(this.Eh=0,this.q.visible=!0,this.j.yb=!0,this.j.trigger(Ld.prototype.G.Xz,this.q)):(this.Dh-=a,0>=this.Dh&&(0===this.tn?(this.q.visible=!1,this.tn=1,this.Dh+=this.Bt):(this.q.visible=!0,this.tn=0,this.Dh+=this.Ht),this.j.yb=!0))}};a.prototype.Xz=function(){return!0};c.G=new a;c.ya=new function(){};c.Fa=new function(){}})();function Md(a){this.j=a}
(function(){function a(){}function c(){}function b(){}var e={},d=Md.prototype;d.Uk=function(){var a,b;for(a in e)e.hasOwnProperty(a)&&(b=e[a],b.yi.unsetReady(),b.jn=!0)};d.ma=function(a){this.behavior=a;this.j=a.j};d.ma.prototype.da=function(){this.Sm=[];this.Yh=[]};d.la=function(a,b){this.type=a;this.behavior=a.behavior;this.q=b;this.j=a.j};var k=d.la.prototype;k.da=function(){this.gc=this.X[0];3>this.gc&&(this.gc=3);this.Tf=this.X[1];this.jE=this.X[2];this.Ef=this.X[3];this.kb=this.X[4];this.Bc=
this.X[5];this.Yn=I(this.X[6]);this.hq=0!==this.X[7];this.Ao=0!==this.X[8];this.enabled=0!==this.X[9];this.em=this.Jo=this.Cp=this.zk=!1;this.ne=0;this.Ec=this.R=this.q.M;this.hn=this.Ig=this.Hg=this.ec=0;this.xi=Math.ceil(this.j.$a.width/this.gc);this.Hj=Math.ceil(this.j.$a.height/this.gc);this.mc=[];this.Ml=!1;this.Kr=this.Jr=0;this.cp=this.ip=!1;this.Fv=this.Ev=0;this.aw=!0;var a=this;this.zd||(this.BE=function(){a.ip||(a.cp=!1,a.IB(),a.em=0<a.mc.length,a.ne=0,a.j.trigger(Md.prototype.G.yA,a.q),
a.Nr())},this.AE=function(){a.ip||(a.cp=!1,a.Iv(),a.em=!1,a.zk=!1,a.ne=0,a.j.trigger(Md.prototype.G.Vz,a.q),a.Nr())})};k.Gf=function(){this.ip=!0;this.Ml=!1};k.Nb=function(){var a={cs:this.gc,cb:this.Tf,ms:this.Ef,acc:this.kb,dec:this.Bc,av:this.Yn,re:this.hq,de:this.Ao,im:this.zk,mfs:this.Cp,ftmwm:this.Jo,hp:this.em,mn:this.ne,a:this.R,lka:this.Ec,s:this.ec,rx:this.Hg,ry:this.Ig,ra:this.hn,myhc:this.xi,myvc:this.Hj,path:this.mc,en:this.enabled,fr:this.aw,obs:[],costs:[]};this.cp?(a.dfp=!0,a.dpx=
this.Ev,a.dpy=this.Fv):(a.dfp=this.Ml,a.dpx=this.Jr,a.dpy=this.Kr);var b,c;b=0;for(c=this.type.Sm.length;b<c;b++)a.obs.push(this.type.Sm[b].ab);b=0;for(c=this.type.Yh.length;b<c;b++)a.costs.push({sid:this.type.Yh[b].qb.ab,cost:this.type.Yh[b].Lv});return a};k.Qb=function(a){this.gc=a.cs;this.Tf=a.cb;this.Ef=a.ms;this.kb=a.acc;this.Bc=a.dec;this.Yn=a.av;this.hq=a.re;this.Ao=a.de;this.zk=a.im;this.Cp=a.mfs;this.Jo=a.ftmwm;this.em=a.hp;this.ne=a.mn;this.R=a.a;this.Ec=a.lka;this.ec=a.s;this.Hg=a.rx;this.Ig=
a.ry;this.hn=a.ra;this.xi=a.myhc;this.Hj=a.myvc;this.mc=a.path;this.enabled=a.en;this.aw=a.fr;this.Ml=a.dfp;this.Jr=a.dpx;this.Kr=a.dpy;E(this.type.Sm);var b=a.obs,c,d,e;c=0;for(d=b.length;c<d;c++)(e=this.j.uk(b[c]))&&this.type.Sm.push(e);E(this.type.Yh);a=a.costs;c=0;for(d=a.length;c<d;c++)(e=this.j.uk(a[c].sid))&&this.type.Yh.push({qb:e,Lv:a[c].cost});this.tk().yi.setDiagonals(this.Ao)};k.Ue=function(){this.tk().jn=!0};k.bb=function(){if(this.enabled&&this.zk){this.hq&&this.q.M!==this.Ec&&(this.R=
this.q.M);var a=this.j.yf(this.q),b,c,d,e,f,g=this.q,k=Math.min(.4*this.Ef,2*Math.abs(this.q.width)),r=Math.max(1.5*this.ec,30);this.ne<this.mc.length?(e=this.mc[this.ne].x,f=this.mc[this.ne].y,d=bb(this.Hg,this.Ig,e,f),d<3*r*a&&(this.ne++,this.Hg=e,this.Ig=f,this.ne<this.mc.length&&(e=this.mc[this.ne].x,f=this.mc[this.ne].y))):(e=this.mc[this.mc.length-1].x,f=this.mc[this.mc.length-1].y);this.hn=Va(this.Hg,this.Ig,e,f);d=bb(g.x,g.y,this.Hg,this.Ig);d<k&&this.ne<this.mc.length&&(this.Jo?this.Jo=!1:
k=r*a,this.Hg+=Math.cos(this.hn)*k,this.Ig+=Math.sin(this.hn)*k);b=Va(g.x,g.y,this.Hg,this.Ig);c=Wa(this.R,b);k=bb(g.x,g.y,this.mc[this.mc.length-1].x,this.mc[this.mc.length-1].y);r=this.Ef*this.Ef/(2*this.Bc);1<d&&(this.R=Xa(this.R,b,this.Yn*a),.5>=Pa(c)?c=this.Ef:120<=Pa(c)||this.Cp&&0===this.ne?(c=0,this.Cp=!0):(b=c/this.Yn,d=bb(g.x,g.y,this.Hg,this.Ig),d=d/(2*Math.sin(c)),c=d*c/b,0>c&&(c=0),c>this.Ef&&(c=this.Ef)),k<r&&(c=Math.min(c,k/r*this.Ef+this.Ef/40)),this.ec+=this.kb*a,this.ec>c&&(this.ec=
c));g.x+=Math.cos(this.R)*this.ec*a;g.y+=Math.sin(this.R)*this.ec*a;this.hq&&(this.Ec=g.M=this.R);g.ba();this.ne===this.mc.length&&bb(g.x,g.y,e,f)<Math.max(3*this.ec*a,10)&&(this.em=this.zk=!1,this.ec=this.ne=0,this.j.trigger(Md.prototype.G.Kz,g))}};k.Wj=function(){this.enabled&&(this.bD(),this.Nr())};k.Nr=function(){this.Ml&&!this.ip&&(this.Ml=!1,this.VB(this.q.x,this.q.y,this.Jr,this.Kr))};k.tk=function(){var a=""+this.gc+","+this.Tf;e.hasOwnProperty(a)||(e[a]={yi:new window.Pathfinder,cells:null,
jn:!1,Nj:[]});return e[a]};k.bD=function(){var a=this.tk();if(!a.yi.isReady()||a.jn||a.Nj.length){var b,c,d,e,f,g,k,r,v,y;if(!a.yi.isReady()||a.jn){this.xi=Math.ceil(this.j.$a.width/this.gc);this.Hj=Math.ceil(this.j.$a.height/this.gc);b=[];e=b.length=this.xi;f=this.Hj;for(c=0;c<e;++c)for(b[c]=[],b[c].length=f,d=0;d<f;++d)b[c][d]=this.cy(c,d);a.cells=b;a.yi.init(this.xi,this.Hj,b,this.Ao);a.jn=!1;E(a.Nj)}else if(a.Nj.length){g=0;for(k=a.Nj.length;g<k;++g){b=a.Nj[g];r=b[0];v=b[1];e=b[2];c=b[3];b=[];
e=e-r;f=c-v;b.length=e;for(c=0;c<e;++c)for(b[c]=[],b[c].length=f,d=0;d<f;++d)y=this.cy(r+c,v+d),b[c][d]=y,a.cells[r+c][v+d]=y;a.yi.updateRegion(r,v,e,f,b)}E(a.Nj)}}};k.Iv=function(){var a,b;a=0;for(b=this.mc.length;a<b;a++)window.freeResultNode(this.mc[a]);E(this.mc)};k.IB=function(){var a=this.tk().yi.pathList;this.Iv();var b,c,d,e;b=0;for(c=a.length;b<c;b++)d=a[b],e=window.allocResultNode(),e.x=(d.x+.5)*this.gc,e.y=(d.y+.5)*this.gc,this.mc.push(e)};var f=[],g=new Aa;k.cy=function(a,b){var c,d,e,
k,u,t=0;g.left=a*this.gc-this.Tf;g.top=b*this.gc-this.Tf;g.right=(a+1)*this.gc+this.Tf;g.bottom=(b+1)*this.gc+this.Tf;if(0===this.jE){if(this.j.rF(g))return window.PF_OBSTACLE}else{this.j.os(this.q.V,this.type.Sm,g,f);c=0;for(d=f.length;c<d;++c)if(this.j.su(g,f[c]))return E(f),window.PF_OBSTACLE;f.length=0}c=0;for(d=this.type.Yh.length;c<d;c++){e=this.type.Yh[c].qb;u=this.type.Yh[c].Lv;this.j.bs(this.q.V,e,g,f);e=0;for(k=f.length;e<k;++e)this.j.su(g,f[e])&&(t+=u);E(f)}return t};k.VB=function(a,b,
c,d){var e=this.tk().yi;if(e.isReady()){this.cp=!0;this.Ev=c;this.Fv=d;a=Math.floor(a/this.gc);b=Math.floor(b/this.gc);c=Math.floor(c/this.gc);d=Math.floor(d/this.gc);var f,g,k,r,v,y,A;if(e.at(c,d)===window.PF_OBSTACLE){f=1E6;for(r=k=g=0;r<this.xi;r++)for(v=0;v<this.Hj;v++)e.at(r,v)!==window.PF_OBSTACLE&&(y=c-r,A=d-v,y=y*y+A*A,y<f&&(f=y,g=r,k=v));c=g;d=k}e.findPath(a,b,c,d,this.BE,this.AE)}};a.prototype.yA=function(){return!0};a.prototype.Vz=function(){return!0};a.prototype.Kz=function(){return!0};
d.G=new a;c.prototype.yl=function(a){0>a&&(a=0);a>this.Ef&&(a=this.Ef);this.ec=a};k.k=function(a,b,c,d){var e=Math.min(a,c)-this.Tf,f=Math.min(b,d)-this.Tf;a=Math.max(a,c)+this.Tf;b=Math.max(b,d)+this.Tf;e=Math.max(Math.floor(e/this.gc),0);f=Math.max(Math.floor(f/this.gc),0);a=Math.min(Math.ceil(a/this.gc),this.xi);b=Math.min(Math.ceil(b/this.gc),this.Hj);e>=a||f>=b||this.tk().Nj.push([e,f,a,b])};d.ya=new c;b.prototype.fk=function(a){a.wa(this.zk?this.ec:0)};d.Fa=new b})();
function Nd(a,c){for(var b in c.prototype)c.prototype.hasOwnProperty(b)&&(a.prototype[b]=c.prototype[b])}var Od=2/180*Math.PI,Qd=8/180*Math.PI,Rd=.5*Math.PI,Sd=Rd*Rd,Td=2/180*Math.PI,Ud=Number.MIN_VALUE*Number.MIN_VALUE;function Vd(a,c){return a.x*c.x+a.y*c.y}function Wd(a,c){return a.x*c.y-a.y*c.x}function Xd(a){return V(1*a.y,-1*a.x)}function Yd(a,c){return V(a.A.x*c.x+a.B.x*c.y,a.A.y*c.x+a.B.y*c.y)}function Zd(a,c){return V(Vd(c,a.A),Vd(c,a.B))}
function $d(a,c){var b=Yd(a.F,c);b.x+=a.position.x;b.y+=a.position.y;return b}function ae(a,c){var b=be(c,a.position),e=b.x*a.F.A.x+b.y*a.F.A.y;b.y=b.x*a.F.B.x+b.y*a.F.B.y;b.x=e;return b}function be(a,c){return V(a.x-c.x,a.y-c.y)}function ce(a,c,b){return a<c?c:a>b?b:a}function de(){this.A=V(0,0);this.B=V(0,0);this.A.Set(1,0);this.B.Set(0,1)}function ee(a){var c=new de;c.Set(a);return c}de.prototype.Set=function(a){var c=Math.cos(a);a=Math.sin(a);this.A.Set(c,a);this.B.Set(-a,c)};
de.prototype.Lc=function(){var a=new de;fe(a,this);return a};function fe(a,c){a.A.W(c.A);a.B.W(c.B)}de.prototype.Ja=function(){this.A.Set(0,0);this.B.Set(0,0)};de.prototype.Pi=function(){return Math.atan2(this.A.y,this.A.x)};function ge(a,c){var b=a.A.x*a.B.y-a.B.x*a.A.y;0!==b&&(b=1/b);c.A.x=b*a.B.y;c.B.x=-b*a.B.x;c.A.y=-b*a.A.y;c.B.y=b*a.A.x}function he(a,c,b,e){var d=a.A.x*a.B.y-a.B.x*a.A.y;0!==d&&(d=1/d);c.x=d*(a.B.y*b-a.B.x*e);c.y=d*(a.A.x*e-a.A.y*b);return c}
function ye(a,c,b){this.A=new ze(0,0,0);this.B=new ze(0,0,0);this.k=new ze(0,0,0);a&&this.A.W(a);c&&this.B.W(c);b&&this.k.W(b)}ye.prototype.Lc=function(){return new ye(this.A,this.B,this.k)};ye.prototype.Ja=function(){this.A.Set(0,0,0);this.B.Set(0,0,0);this.k.Set(0,0,0)};function Ae(a,c,b,e){var d=a.A.x,k=a.B.x,f=a.A.y;a=a.B.y;var g=d*a-k*f;0!=g&&(g=1/g);c.x=g*(a*b-k*e);c.y=g*(d*e-f*b);return c}
function Be(a,c,b,e,d){var k=a.A.x,f=a.A.y,g=a.A.z,h=a.B.x,l=a.B.y,m=a.B.z,n=a.k.x,q=a.k.y;a=a.k.z;var p=k*(l*a-m*q)+f*(m*n-h*a)+g*(h*q-l*n);0!=p&&(p=1/p);c.x=p*(b*(l*a-m*q)+e*(m*n-h*a)+d*(h*q-l*n));c.y=p*(k*(e*a-d*q)+f*(d*n-b*a)+g*(b*q-e*n));c.z=p*(k*(l*d-m*e)+f*(m*b-h*d)+g*(h*e-l*b));return c}function Ce(){this.Y=V(0,0);this.dd=V(0,0);this.I=V(0,0)}Ce.prototype.Set=function(a){this.Y.W(a.Y);this.dd.W(a.dd);this.I.W(a.I);this.qf=a.qf;this.R=a.R;this.Td=a.Td};
Ce.prototype.Lc=function(){var a=new Ce;a.Y.W(this.Y);a.dd.W(this.dd);a.I.W(this.I);a.qf=this.qf;a.R=this.R;a.Td=this.Td;return a};Ce.prototype.De=function(a,c){void 0===c&&(c=0);a.position.x=(1-c)*this.dd.x+c*this.I.x;a.position.y=(1-c)*this.dd.y+c*this.I.y;a.F.Set((1-c)*this.qf+c*this.R);var b=a.F;a.position.x-=b.A.x*this.Y.x+b.B.x*this.Y.y;a.position.y-=b.A.y*this.Y.x+b.B.y*this.Y.y};
Ce.prototype.Mh=function(a){void 0===a&&(a=0);if(this.Td<a&&1-this.Td>Number.MIN_VALUE){var c=(a-this.Td)/(1-this.Td);this.dd.x=(1-c)*this.dd.x+c*this.I.x;this.dd.y=(1-c)*this.dd.y+c*this.I.y;this.qf=(1-c)*this.qf+c*this.R;this.Td=a}};function De(a,c){this.position=V(0,0);this.F=new de;a&&this.position.W(a);c&&fe(this.F,c)}De.prototype.Set=function(a){this.position.W(a.position);fe(this.F,a.F)};De.prototype.Pi=function(){return Math.atan2(this.F.A.y,this.F.A.x)};
function Ee(a,c){this.x=a;this.y=c}var Fe=[];function V(a,c){if(0<Fe.length){var b=Fe.pop();b.Set(a,c);return b}return new Ee(a,c)}function Ge(a){Fe.push(a)}x=Ee.prototype;x.Ja=function(){this.y=this.x=0};x.Set=function(a,c){this.x=a;this.y=c};x.W=function(a){this.x=a.x;this.y=a.y};x.Nh=function(){return V(-this.x,-this.y)};x.Lc=function(){return V(this.x,this.y)};x.hg=function(a){this.x+=a.x;this.y+=a.y};x.nv=function(a){this.x-=a.x;this.y-=a.y};x.Te=function(a){this.x*=a;this.y*=a};
function He(a){return Math.sqrt(Ie(a))}function Ie(a){return a.x*a.x+a.y*a.y}function Je(a){var c=He(a);c<Number.MIN_VALUE||(c=1/c,a.x*=c,a.y*=c)}function ze(a,c,b){this.x=a;this.y=c;this.z=b}x=ze.prototype;x.Ja=function(){this.z=this.y=this.x=0};x.Set=function(a,c,b){this.x=a;this.y=c;this.z=b};x.W=function(a){this.x=a.x;this.y=a.y;this.z=a.z};x.Nh=function(){return new ze(-this.x,-this.y,-this.z)};x.Lc=function(){return new ze(this.x,this.y,this.z)};
x.hg=function(a){this.x+=a.x;this.y+=a.y;this.z+=a.z};x.nv=function(a){this.x-=a.x;this.y-=a.y;this.z-=a.z};x.Te=function(a){this.x*=a;this.y*=a;this.z*=a};function Ke(){this.ob=.005}x=Ke.prototype;x.Ri=function(){};x.Lc=function(){};x.Set=function(a){this.ob=a.ob};x.Oi=function(){};x.tl=function(){};x.Jn=function(){};x.cr=function(){};function Le(a){this.ob=.005;this.ob=a;this.k=a*a;this.Db=V(0,0)}Nd(Le,Ke);x=Le.prototype;x.Ri=function(){return"b2CircleShape"};
x.Lc=function(){var a=new Le(this.ob);a.Set(this);return a};x.Set=function(a){Ke.prototype.Set.call(this,a);a instanceof Le&&this.Db.W(a.Db)};x.Oi=function(a,c){var b=c.F,e=c.position.x+(b.A.x*this.Db.x+b.B.x*this.Db.y),b=c.position.y+(b.A.y*this.Db.x+b.B.y*this.Db.y);a.k.Set(e-this.ob,b-this.ob);a.n.Set(e+this.ob,b+this.ob)};x.tl=function(a,c){a.k=c*Math.PI*this.k;a.n.W(this.Db);a.C=a.k*(.5*this.k+(this.Db.x*this.Db.x+this.Db.y*this.Db.y))};
x.Jn=function(a,c,b,e){b=$d(b,this.Db);var d=-(Vd(a,b)-c);if(d<-this.ob+Number.MIN_VALUE)return 0;if(d>this.ob)return e.W(b),Math.PI*this.k;c=d*d;d=this.k*(Math.asin(d/this.ob)+Math.PI/2)+d*Math.sqrt(this.k-c);c=-2/3*Math.pow(this.k-c,1.5)/d;e.x=b.x+a.x*c;e.y=b.y+a.y*c;return d};x.cr=function(a){a.Z=[this.Db];a.k=1;a.ob=this.ob};
function Me(a,c){this.ob=.005;this.k=a;this.n=c;this.C=V(this.n.x-this.k.x,this.n.y-this.k.y);Je(this.C);this.H=V(this.C.y,-this.C.x);V(-.04*(this.H.x-this.C.x)+this.k.x,-.04*(this.H.y-this.C.y)+this.k.y);V(-.04*(this.H.x+this.C.x)+this.n.x,-.04*(this.H.y+this.C.y)+this.n.y);V(-this.H.x,-this.H.y)}Nd(Me,Ke);Me.prototype.Ri=function(){return"b2EdgeShape"};
Me.prototype.Oi=function(a,c){var b=c.F,e=c.position.x+(b.A.x*this.k.x+b.B.x*this.k.y),d=c.position.y+(b.A.y*this.k.x+b.B.y*this.k.y),k=c.position.x+(b.A.x*this.n.x+b.B.x*this.n.y),b=c.position.y+(b.A.y*this.n.x+b.B.y*this.n.y);e<k?(a.k.x=e,a.n.x=k):(a.k.x=k,a.n.x=e);d<b?(a.k.y=d,a.n.y=b):(a.k.y=b,a.n.y=d)};Me.prototype.tl=function(a){a.k=0;a.n.W(this.k);a.C=0};
Me.prototype.Jn=function(a,c,b,e){void 0===c&&(c=0);var d=V(a.x*c,a.y*c),k=$d(b,this.k);b=$d(b,this.n);var f=Vd(a,k)-c;a=Vd(a,b)-c;if(0<f){if(0<a)return 0;k.x=-a/(f-a)*k.x+f/(f-a)*b.x;k.y=-a/(f-a)*k.y+f/(f-a)*b.y}else 0<a&&(b.x=-a/(f-a)*k.x+f/(f-a)*b.x,b.y=-a/(f-a)*k.y+f/(f-a)*b.y);e.x=(d.x+k.x+b.x)/3;e.y=(d.y+k.y+b.y)/3;return.5*((k.x-d.x)*(b.y-d.y)-(k.y-d.y)*(b.x-d.x))};function Ne(){this.k=0;this.n=V(0,0);this.C=0}function Oe(){this.ob=.005;this.k=V(0,0);this.Z=[];this.Lb=[]}Nd(Oe,Ke);x=Oe.prototype;
x.Ri=function(){return"b2PolygonShape"};x.Lc=function(){var a=new Oe;a.Set(this);return a};x.Set=function(a){Ke.prototype.Set.call(this,a);if(a instanceof Oe){this.k.W(a.k);this.ub=a.ub;Pe(this,this.ub);for(var c=0;c<this.ub;c++)this.Z[c].W(a.Z[c]),this.Lb[c].W(a.Lb[c])}};
function Qe(a,c){var b=c.length;a.ub=b;Pe(a,b);for(b=b=0;b<a.ub;b++)a.Z[b].W(c[b]);for(b=0;b<a.ub;++b){var e=be(a.Z[b+1<a.ub?b+1:0],a.Z[b]);a.Lb[b].W(Xd(e));Je(a.Lb[b])}for(var b=a.Z,e=a.ub,d=V(0,0),k=0,f=1/3,g=0;g<e;++g){var h=b[g],l=g+1<e?b[g+1]:b[0],m=.5*((h.x-0)*(l.y-0)-(h.y-0)*(l.x-0)),k=k+m;d.x+=m*f*(0+h.x+l.x);d.y+=m*f*(0+h.y+l.y)}d.x*=1/k;d.y*=1/k;a.k=d}
function Re(a,c,b){a.ub=4;Pe(a,4);a.Z[0].Set(-c,-b);a.Z[1].Set(c,-b);a.Z[2].Set(c,b);a.Z[3].Set(-c,b);a.Lb[0].Set(0,-1);a.Lb[1].Set(1,0);a.Lb[2].Set(0,1);a.Lb[3].Set(-1,0);a.k.Ja()}
x.Oi=function(a,c){for(var b=c.F,e=this.Z[0],d=c.position.x+(b.A.x*e.x+b.B.x*e.y),k=c.position.y+(b.A.y*e.x+b.B.y*e.y),f=d,g=k,h=1;h<this.ub;++h)var e=this.Z[h],l=c.position.x+(b.A.x*e.x+b.B.x*e.y),e=c.position.y+(b.A.y*e.x+b.B.y*e.y),d=d<l?d:l,k=k<e?k:e,f=f>l?f:l,g=g>e?g:e;a.k.x=d-this.ob;a.k.y=k-this.ob;a.n.x=f+this.ob;a.n.y=g+this.ob};
x.tl=function(a,c){if(2==this.ub)a.n.x=.5*(this.Z[0].x+this.Z[1].x),a.n.y=.5*(this.Z[0].y+this.Z[1].y),a.k=0,a.C=0;else{for(var b=0,e=0,d=0,k=0,f=1/3,g=0;g<this.ub;++g)var h=this.Z[g],l=g+1<this.ub?this.Z[g+1]:this.Z[0],m=h.x-0,n=h.y-0,q=l.x-0,p=l.y-0,u=m*p-n*q,t=.5*u,d=d+t,b=b+t*f*(0+h.x+l.x),e=e+t*f*(0+h.y+l.y),h=m,k=k+u*(f*(.25*(h*h+q*h+q*q)+(0*h+0*q))+0+(f*(.25*(n*n+p*n+p*p)+(0*n+0*p))+0));a.k=c*d;a.n.Set(1/d*b,1/d*e);a.C=c*k}};
x.Jn=function(a,c,b,e){var d=Zd(b.F,a),k=c-Vd(a,b.position),f=[],g=0,h=-1;c=-1;var l=!1;for(a=a=0;a<this.ub;++a){f[a]=Vd(d,this.Z[a])-k;var m=f[a]<-Number.MIN_VALUE;0<a&&(m?l||(h=a-1,g++):l&&(c=a-1,g++));l=m}switch(g){case 0:return l?(a=new Ne,this.tl(a,1),e.W($d(b,a.n)),a.k):0;case 1:-1==h?h=this.ub-1:c=this.ub-1}a=(h+1)%this.ub;d=(c+1)%this.ub;k=(0-f[h])/(f[a]-f[h]);f=(0-f[c])/(f[d]-f[c]);h=V(this.Z[h].x*(1-k)+this.Z[a].x*k,this.Z[h].y*(1-k)+this.Z[a].y*k);c=V(this.Z[c].x*(1-f)+this.Z[d].x*f,this.Z[c].y*
(1-f)+this.Z[d].y*f);f=0;k=V(0,0);for(g=this.Z[a];a!=d;)a=(a+1)%this.ub,l=a==d?c:this.Z[a],m=.5*((g.x-h.x)*(l.y-h.y)-(g.y-h.y)*(l.x-h.x)),f+=m,k.x+=m*(h.x+g.x+l.x)/3,k.y+=m*(h.y+g.y+l.y)/3,g=l;k.Te(1/f);e.W($d(b,k));return f};x.cr=function(a){a.Z=this.Z;a.k=this.ub;a.ob=this.ob};x.Kn=function(a){for(var c=0,b=this.Z[0].x*a.x+this.Z[0].y*a.y,e=1;e<this.ub;++e){var d=this.Z[e].x*a.x+this.Z[e].y*a.y;d>b&&(c=e,b=d)}return c};
x.wl=function(a){for(var c=0,b=this.Z[0].x*a.x+this.Z[0].y*a.y,e=1;e<this.ub;++e){var d=this.Z[e].x*a.x+this.Z[e].y*a.y;d>b&&(c=e,b=d)}return this.Z[c]};function Pe(a,c){a.Z=[];a.Lb=[];for(var b=a.Z.length;b<c;b++)a.Z[b]=V(0,0),a.Lb[b]=V(0,0)}new de;function Se(){this.n=this.k=this.C=this.rc=0}function We(a,c){a.rc=c;a.C=a.rc&255;a.k=(a.rc&65280)>>8&255;a.n=(a.rc&16711680)>>16&255;a.H=(a.rc&4278190080)>>24&255}Se.prototype.Set=function(a){We(this,a.rc)};
Se.prototype.Lc=function(){var a=new Se;a.Set(this);return a};function Xe(){this.pf=V(0,0);this.id=new Se}Xe.prototype.Set=function(a){this.pf.W(a.pf);this.id.Set(a.id)};function Ye(){this.k=V(0,0);this.n=V(0,0)}var Ze=[];function $e(){if(0<Ze.length){var a=Ze.pop();a.Ja();return a}return new Ye}Ye.prototype.Ja=function(){this.k.Set(0,0);this.n.Set(0,0)};function af(a,c){var b;return b=(b=(b=(b=a.k.x<=c.k.x)&&a.k.y<=c.k.y)&&c.n.x<=a.n.x)&&c.n.y<=a.n.y}
Ye.prototype.Al=function(a){return 0<a.k.x-this.n.x||0<a.k.y-this.n.y||0<this.k.x-a.n.x||0<this.k.y-a.n.y?!1:!0};function bf(a,c,b){a.k.x=Math.min(c.k.x,b.k.x);a.k.y=Math.min(c.k.y,b.k.y);a.n.x=Math.max(c.n.x,b.n.x);a.n.y=Math.max(c.n.y,b.n.y)}function cf(a,c,b,e){var d=0,k=c[0].pf,f=c[1].pf,g=b.x*k.x+b.y*k.y-e;b=b.x*f.x+b.y*f.y-e;0>=g&&a[d++].Set(c[0]);0>=b&&a[d++].Set(c[1]);0>g*b&&(b=g/(g-b),e=a[d].pf,e.x=k.x+b*(f.x-k.x),e.y=k.y+b*(f.y-k.y),a[d].id=0<g?c[0].id:c[1].id,d++);return d}
function df(a,c,b,e,d){for(var k=c.F.A.x*a.Lb[b].x+c.F.B.x*a.Lb[b].y,f=c.F.A.y*a.Lb[b].x+c.F.B.y*a.Lb[b].y,g=d.F.A.x*k+d.F.A.y*f,h=d.F.B.x*k+d.F.B.y*f,l=0,m=Number.MAX_VALUE,n=0;n<e.ub;n++){var q=e.Z[n].x*g+e.Z[n].y*h;q<m&&(m=q,l=n)}return(d.position.x+(d.F.A.x*e.Z[l].x+d.F.B.x*e.Z[l].y)-(c.position.x+(c.F.A.x*a.Z[b].x+c.F.B.x*a.Z[b].y)))*k+(d.position.y+(d.F.A.y*e.Z[l].x+d.F.B.y*e.Z[l].y)-(c.position.y+(c.F.A.y*a.Z[b].x+c.F.B.y*a.Z[b].y)))*f}
function ef(a,c,b,e){for(var d=e.position.x+(e.F.A.x*b.k.x+e.F.B.x*b.k.y),k=e.position.y+(e.F.A.y*b.k.x+e.F.B.y*b.k.y),d=d-(c.position.x+(c.F.A.x*a.k.x+c.F.B.x*a.k.y)),k=k-(c.position.y+(c.F.A.y*a.k.x+c.F.B.y*a.k.y)),f=d*c.F.A.x+k*c.F.A.y,k=d*c.F.B.x+k*c.F.B.y,d=0,g=-Number.MAX_VALUE,h=0;h<a.ub;++h){var l=a.Lb[h].x*f+a.Lb[h].y*k;l>g&&(g=l,d=h)}f=df(a,c,d,b,e);k=d-1;0>k&&(k=a.ub-1);g=df(a,c,k,b,e);h=d+1;h>=a.ub&&(h=0);var l=df(a,c,h,b,e),m=0,n=0;if(g>f&&g>l)for(m=k,n=g;;)if(d=m-1,0>d&&(d=a.ub-1),f=
df(a,c,d,b,e),f>n)m=d,n=f;else break;else if(l>f)for(m=h,n=l;;)if(d=m+1,d>=a.ub&&(d=0),f=df(a,c,d,b,e),f>n)m=d,n=f;else break;else m=d,n=f;return{yv:m,nq:n}}
function ff(a,c,b){var e=new gf,d=b.vh,k=b.k,f=b.wh,g=b.n,h,l;e.k=c.count;for(var m=e.Z,n=0;n<e.k;n++){var q=m[n];q.uc=c.uc[n];q.vc=c.vc[n];h=hf(d,q.uc);l=hf(f,q.vc);q.Cd=$d(k,h);q.Of=$d(g,l);q.od=be(q.Of,q.Cd);q.R=0}1<e.k&&(h=c.k,l=jf(e),l<.5*h||2*h<l||l<Number.MIN_VALUE)&&(e.k=0);0==e.k&&(q=m[0],q.uc=0,q.vc=0,h=hf(d,0),l=hf(f,0),q.Cd=$d(k,h),q.Of=$d(g,l),q.od=be(q.Of,q.Cd),e.k=1);for(d=0;20>d;){k=[];for(f=0;f<e.k;f++)k[f]={},k[f].uc=e.Z[f].uc,k[f].vc=e.Z[f].vc;if(2==e.k)f=e,g=f.n.od,m=f.C.od,h=
be(m,g),g=-(g.x*h.x+g.y*h.y),0>=g?(f.n.R=1,f.k=1):(m=m.x*h.x+m.y*h.y,0>=m?(f.C.R=1,f.k=1,f.n.Set(f.C)):(h=1/(m+g),f.n.R=m*h,f.C.R=g*h,f.k=2));else if(3==e.k){var f=e,p=f.n.od,u=f.C.od,t=f.H.od,r=be(u,p),g=Vd(u,r),m=-Vd(p,r),v=be(t,p);h=Vd(t,v);l=-Vd(p,v);q=be(t,u);n=Vd(t,q);q=-Vd(u,q);v=Wd(r,v);r=v*Wd(u,t);t=v*Wd(t,p);p=v*Wd(p,u);0>=m&&0>=l?(f.n.R=1,f.k=1):0<g&&0<m&&0>=p?(h=1/(g+m),f.n.R=g*h,f.C.R=m*h,f.k=2):0<h&&0<l&&0>=t?(g=1/(h+l),f.n.R=h*g,f.H.R=l*g,f.k=2,f.C.Set(f.H)):0>=g&&0>=q?(f.C.R=1,f.k=
1,f.n.Set(f.C)):0>=h&&0>=n?(f.H.R=1,f.k=1,f.n.Set(f.H)):0<n&&0<q&&0>=r?(g=1/(n+q),f.C.R=n*g,f.H.R=q*g,f.k=2,f.n.Set(f.H)):(g=1/(r+t+p),f.n.R=r*g,f.C.R=t*g,f.H.R=p*g,f.k=3)}if(3==e.k)break;f=e;1==f.k?f=f.n.od.Nh():2==f.k?(g=be(f.C.od,f.n.od),f=0<Wd(g,f.n.od.Nh())?V(-1*g.y,1*g.x):Xd(g)):f=V(0,0);if(Ie(f)<Ud)break;g=f.Nh();e.Z[e.k].uc=b.vh.Kn(Zd(b.k.F,g));e.Z[e.k].Cd=$d(b.k,hf(b.vh,e.Z[e.k].uc));e.Z[e.k].vc=b.wh.Kn(Zd(b.n.F,f));e.Z[e.k].Of=$d(b.n,hf(b.wh,e.Z[e.k].vc));e.Z[e.k].od=be(e.Z[e.k].Of,e.Z[e.k].Cd);
Ge(f);Ge(g);d++;g=!1;for(f=0;f<k.length;f++)if(e.Z[e.k].uc==k[f].uc&&e.Z[e.k].vc==k[f].vc){g=!0;break}if(g)break;e.k++}d=a.k;k=a.n;1==e.k?(d.W(e.n.Cd),k.W(e.n.Of)):2==e.k?(d.x=e.n.R*e.n.Cd.x+e.C.R*e.C.Cd.x,d.y=e.n.R*e.n.Cd.y+e.C.R*e.C.Cd.y,k.x=e.n.R*e.n.Of.x+e.C.R*e.C.Of.x,k.y=e.n.R*e.n.Of.y+e.C.R*e.C.Of.y):3==e.k&&(k.x=d.x=e.n.R*e.n.Cd.x+e.C.R*e.C.Cd.x+e.H.R*e.H.Cd.x,k.y=d.y=e.n.R*e.n.Cd.y+e.C.R*e.C.Cd.y+e.H.R*e.H.Cd.y);a.wg=He(be(a.k,a.n));c.k=jf(e);c.count=e.k;d=e.Z;for(k=0;k<e.k;k++)c.uc[k]=d[k].uc,
c.vc[k]=d[k].vc;b.C&&(c=b.vh.ob,b=b.wh.ob,a.wg>c+b&&a.wg>Number.MIN_VALUE?(a.wg-=c+b,e=be(a.n,a.k),Je(e),a.k.x+=c*e.x,a.k.y+=c*e.y,a.n.x-=b*e.x,a.n.y-=b*e.y,Ge(e)):(b=V(0,0),b.x=.5*(a.k.x+a.n.x),b.y=.5*(a.k.y+a.n.y),a.k.x=a.n.x=b.x,a.k.y=a.n.y=b.y,a.wg=0,Ge(b)))}function kf(){}function lf(){this.k=V(0,0);this.n=V(0,0);this.wg=0}function mf(){}mf.prototype.Set=function(a){a.cr(this)};
mf.prototype.Kn=function(a){for(var c=0,b=this.Z[0].x*a.x+this.Z[0].y*a.y,e=1;e<this.k;e++){var d=this.Z[e].x*a.x+this.Z[e].y*a.y;d>b&&(c=e,b=d)}return c};mf.prototype.wl=function(a){return this.Z[this.Kn(a)]};function hf(a,c){void 0===c&&(c=0);return a.Z[c]}function nf(){this.k=null}nf.prototype.$j=function(a){of(this,a);a.Ed()};function pf(a,c,b){if(null!==a.k){var e=[];for(e.push(a.k);0<e.length;)if(a=e.pop(),a.fb.Al(b))if(null===a.he){if(!c(a.He))break}else e.push(a.he),e.push(a.sg)}}
function qf(a,c){if(null===a.k)a.k=c,a.k.parent=null;else{var b;b=c.fb;b=V((b.k.x+b.n.x)/2,(b.k.y+b.n.y)/2);for(var e=a.k;null!==e.he;)var d=e.he,e=e.sg,k=Math.abs((d.fb.k.x+d.fb.n.x)/2-b.x)+Math.abs((d.fb.k.y+d.fb.n.y)/2-b.y),f=Math.abs((e.fb.k.x+e.fb.n.x)/2-b.x)+Math.abs((e.fb.k.y+e.fb.n.y)/2-b.y),e=k<f?d:e;Ge(b);b=e;d=b.parent;e=rf();e.parent=d;bf(e.fb,c.fb,b.fb);if(d)for(b.parent.he==b?d.he=e:d.sg=e,e.he=b,e.sg=c,b.parent=e,c.parent=e;d&&!af(d.fb,e.fb);)bf(d.fb,d.he.fb,d.sg.fb),e=d,d=d.parent;
else e.he=b,e.sg=c,b.parent=e,c.parent=e,a.k=e}}function of(a,c){if(c==a.k)a.k=null;else{var b=c.parent,e=b.parent,d;d=b.he==c?b.sg:b.he;if(e)for(e.he==b?e.he=d:e.sg=d,d.parent=e;e;){d=e.fb;bf(e.fb,e.he.fb,e.sg.fb);if(af(d,e.fb))break;e=e.parent}else a.k=d,d.parent=null;b.Ed()}}function sf(){this.n=new nf;this.k=[]}function tf(a,c,b){var e=a.n;b=rf(b);b.fb.k.x=c.k.x-.1;b.fb.k.y=c.k.y-.1;b.fb.n.x=c.n.x+.1;b.fb.n.y=c.n.y+.1;qf(e,b);a.k.push(b);return b}sf.prototype.$j=function(a){Ma(this.k,a);this.n.$j(a)};
sf.prototype.Al=function(a,c){return a.fb.Al(c.fb)};function uf(a,c){for(var b=[];0<a.k.length;){var e=a.k.pop();pf(a.n,function(a){a!=e.He&&b.push(new vf(e.He,a));return!0},e.fb)}for(var d=0;d<b.length;){var k=b[d];c(k.Ul,k.Vl);for(d++;d<b.length;){var f=b[d];if(!(f.Ul==k.Ul&&f.Vl==k.Vl||f.Ul==k.Vl&&f.Vl==k.Ul))break;d++}}}function wf(a){this.fb=$e();this.He=this.parent=this.sg=this.he=null;"undefined"!=typeof a&&(this.He=a)}var xf=[];
function rf(a){if(0<xf.length){var c=xf.pop();"undefined"!=typeof a&&(c.He=a);c.fb.Ja();return c}return new wf(a)}wf.prototype.Ed=function(){this.He=this.parent=this.sg=this.he=null;xf.push(this)};function vf(a,c){this.Ul=a;this.Vl=c}function yf(){this.pb=this.lc=0;this.Ga=[];for(var a=0;2>a;a++)this.Ga[a]=new zf;this.hd=V(0,0);this.Ma=V(0,0)}yf.prototype.cd=function(){for(var a=0;2>a;a++)this.Ga[a].cd();this.hd.Ja();this.Ma.Ja();this.lc=this.pb=0};
yf.prototype.Set=function(a){this.lc=a.lc;for(var c=0;2>c;c++)this.Ga[c].Set(a.Ga[c]);this.hd.W(a.hd);this.Ma.W(a.Ma);this.pb=a.pb};yf.prototype.Lc=function(){var a=new yf;a.Set(this);return a};function zf(){this.Ma=V(0,0);this.Df=new Se;this.cd()}zf.prototype.cd=function(){this.Ma.Ja();this.Fj=this.Ej=0;We(this.Df,0)};zf.prototype.Set=function(a){this.Ma.W(a.Ma);this.Ej=a.Ej;this.Fj=a.Fj;this.Df.Set(a.Df)};
function Ef(){var a=Jf,c=Qf,b=Rf,e,d,k=0;switch(a.pb){case Sf:e=Zd(c.F,a.k);d=Zd(b.F,a.k.Nh());e=a.n.wl(e);d=a.C.wl(d);c=$d(c,e);b=$d(b,d);k=(b.x-c.x)*a.k.x+(b.y-c.y)*a.k.y;break;case Tf:k=Yd(c.F,a.k);c=$d(c,a.Ma);d=Zd(b.F,k.Nh());d=a.C.wl(d);b=$d(b,d);k=(b.x-c.x)*k.x+(b.y-c.y)*k.y;break;case Uf:k=Yd(b.F,a.k),b=$d(b,a.Ma),e=Zd(c.F,k.Nh()),e=a.n.wl(e),c=$d(c,e),k=(c.x-b.x)*k.x+(c.y-b.y)*k.y}return k}var Sf=1,Tf=2,Uf=4;
function gf(){this.n=new Vf;this.C=new Vf;this.H=new Vf;this.Z=[this.n,this.C,this.H]}function jf(a){return 1==a.k?0:2==a.k?He(be(a.n.od,a.C.od)):3==a.k?Wd(be(a.C.od,a.n.od),be(a.H.od,a.n.od)):0}function Wf(){this.uc=[0,0,0];this.vc=[0,0,0]}function Vf(){}Vf.prototype.Set=function(a){this.Cd.W(a.Cd);this.Of.W(a.Of);this.od.W(a.od);this.R=a.R;this.uc=a.uc;this.vc=a.vc};function Xf(){this.vh=new mf;this.wh=new mf;this.Iy=new Ce;this.Jy=new Ce}
function Yf(a,c){this.xa="Body"+Zf++;this.K=new De;this.K.position.W(a.position);this.K.F.Set(a.M);this.u=new Ce;this.u.Y.Ja();this.u.Td=1;this.u.qf=this.u.R=a.M;this.u.I.x=this.K.F.A.x*this.u.Y.x+this.K.F.B.x*this.u.Y.y;this.u.I.y=this.K.F.A.y*this.u.Y.x+this.K.F.B.y*this.u.Y.y;this.u.I.x+=this.K.position.x;this.u.I.y+=this.K.position.y;this.u.dd.W(this.u.I);this.D=a.T.Lc();this.C=V(0,0);this.T=a.ik;this.Jb=a.k;this.Ra=a.n;this.Me=a.H;this.L=a.Pb;this.Qd=c;this.Wb=null;this.Xd=new $f;this.qa=new ag;
this.N=a.C;this.sb=a.Kk;this.Va=a.gk;this.ea=this.H=0;this.pb=a.type;this.fa=2==this.pb?1:0;this.U=2==this.pb?1:0;this.ca=this.k=0;this.Wa=a.L;this.n=new bg;this.O=[]}function cg(a,c){var b=new dg(a,0,c);if(a.L){var e=a.Qd.k.k;b.xc.Oi(b.k,a.K);b.n=tf(e,b.k,b)}var e=a.n,d=b.Mu;if(null==e.k[d]){var k=new eg(b),f=e.C;null!=f?f.next=k:e.n=k;k.Qg(f);e.C=k;e.k[d]=k}b.tt=a;0<b.H&&fg(a);a.Qd.n=!0}x=Yf.prototype;x.Ed=function(){Ge(this.D);Ge(this.C)};
function gg(a,c,b){a.K.F.Set(b);a.K.position.W(c);c=a.K.F;var e=a.u.Y;a.u.I.x=c.A.x*e.x+c.B.x*e.y;a.u.I.y=c.A.y*e.x+c.B.y*e.y;a.u.I.x+=a.K.position.x;a.u.I.y+=a.K.position.y;a.u.dd.W(a.u.I);a.u.qf=a.u.R=b;b=a.Qd.k.k;for(c=a.n.eb();c;c=c.Sa())hg(c.He,b,a.K,a.K);ig(a.Qd.k)}x.De=function(){return this.K};x.Pi=function(){return this.u.R};x.kv=function(a){gg(this,this.K.position,a)};function jg(a,c){0!=a.pb&&a.D.W(c)}x.Rn=function(a){void 0===a&&(a=0);0!=this.pb&&(this.N=a)};
x.Mi=function(a,c){2==this.pb&&(kg(this,!0),this.C.x+=a.x,this.C.y+=a.y,this.H+=(c.x-this.u.I.x)*a.y-(c.y-this.u.I.y)*a.x)};x.Wq=function(a){void 0===a&&(a=0);2==this.pb&&(kg(this,!0),this.H+=a)};
function fg(a){a.fa=0;a.U=0;a.k=0;a.ca=0;a.u.Y.Ja();if(0!=a.pb&&1!=a.pb){for(var c=V(0,0),b=a.n.eb();b;b=b.Sa()){var e=b.He;if(0!=e.H){var d=void 0,d=new Ne;e.xc.tl(d,e.H);e=d;a.fa+=e.k;c.x+=e.n.x*e.k;c.y+=e.n.y*e.k;a.k+=e.C}}0<a.fa?(a.U=1/a.fa,c.x*=a.U,c.y*=a.U):(a.fa=1,a.U=1);0<a.k&&!a.Jb?(a.k-=a.fa*(c.x*c.x+c.y*c.y),a.k*=a.Wa,a.ca=1/a.k):(a.k=0,a.ca=0);b=a.u.I.Lc();a.u.Y.W(c);a.u.dd.W($d(a.K,a.u.Y));a.u.I.W(a.u.dd);a.D.x+=a.N*-(a.u.I.y-b.y);a.D.y+=a.N*+(a.u.I.x-b.x);Ge(c);Ge(b)}}
function lg(a,c){var b=a.K.F,b=V(b.A.x*c.x+b.B.x*c.y,b.A.y*c.x+b.B.y*c.y);b.x+=a.K.position.x;b.y+=a.K.position.y;return b}x.qd=function(){return this.pb};function kg(a,c){if(a.Me!=c){a.Me=c;a.ea=0;c||(a.D.Ja(),a.N=0,a.C.Ja(),a.H=0);for(var b=0;b<a.O.length;b++)mg(a.O[b],a)}}
x.jv=function(a){if(a!=this.L){if(a){this.L=!0;a=this.Qd.k.k;for(var c=this.n.eb();c;c=c.Sa()){var b=c.He,e=a;b.xc.Oi(b.k,this.K);b.n=tf(e,b.k,b)}}else{this.L=!1;a=this.Qd.k.k;for(c=this.n.eb();c;c=c.Sa())c.He.$j(a);for(a=this.Xd.eb(ng);a;a=a.Sa())this.Qd.k.Ed(a.Ac)}for(a=0;a<this.O.length;a++)mg(this.O[a],this)}};x.Si=function(){return this.L};x.Qi=function(){return this.Xd};
function og(a){pg.F.Set(a.u.qf);var c=pg.F,b=a.u.Y;pg.position.x=a.u.dd.x-(c.A.x*b.x+c.B.x*b.y);pg.position.y=a.u.dd.y-(c.A.y*b.x+c.B.y*b.y);c=a.Qd.k.k;for(b=a.n.eb();b;b=b.Sa())hg(b.He,c,pg,a.K)}function qg(a){a.K.F.Set(a.u.R);var c=a.K.F,b=a.u.Y;a.K.position.x=a.u.I.x-(c.A.x*b.x+c.B.x*b.y);a.K.position.y=a.u.I.y-(c.A.y*b.x+c.B.y*b.y)}function rg(a,c){if(2!=a.pb&&2!=c.pb)return!1;for(var b=a.Wb;b;b=b.next)if(b.gf==c&&0==b.kh.mx)return!1;return!0}
x.Mh=function(a){this.u.Mh(a);this.u.I.W(this.u.dd);this.u.R=this.u.qf;qg(this)};var Zf=0;function sg(){this.position=V(0,0);this.T=V(0,0);this.gk=this.Kk=this.C=this.M=0;this.H=this.n=!0;this.ik=this.k=!1;this.type=0;this.Pb=!0;this.L=1}function tg(){this.n=[];for(var a=0;a<=ug;a++)this.n[a]=null;this.C=[];for(a=0;a<=ug;a++)this.C[a]=null;this.k={}}tg.prototype.eb=function(a){return this.n[a]};
function mg(a,c){var b=c.qd(),e=c.xa,d=c.Me,k=c.Si();2==b?vg(a,c,e,wg):xg(a,e,wg);0!=b?vg(a,c,e,yg):xg(a,e,yg);0!=b&&k&&d?vg(a,c,e,zg):xg(a,e,zg);d?vg(a,c,e,Ag):xg(a,e,Ag);k?vg(a,c,e,Bg):xg(a,e,Bg)}tg.prototype.Qn=function(a){var c=a.xa;if(null!=this.k[c]){Ma(a.O,this);for(a=0;a<=ug;a++)xg(this,c,a);delete this.k[c]}};function xg(a,c,b){var e=a.k[c];null!=e&&(c=e[b],null!=c&&(e[b]=null,e=c.k,c=c.Sa(),null==e?a.n[b]=c:e.next=c,null==c?a.C[b]=e:c.Qg(e)))}
function vg(a,c,b,e){var d=a.k[b];if(null==d){for(var d=[],k=0;k<=ug;k++)d[k]=null;a.k[b]=d}null==d[e]&&(d[e]=new Cg(c),c=a.C[e],null!=c?c.next=d[e]:a.n[e]=d[e],d[e].Qg(c),a.C[e]=d[e])}var wg=0,yg=1,Bg=2,zg=3,Ag=4,ug=5;function Cg(a){this.body=a;this.k=this.next=null}Cg.prototype.Qg=function(a){this.k=a};Cg.prototype.rb=function(){return this.body};Cg.prototype.Sa=function(){return this.next};function Dg(){}
Dg.prototype.k=function(a,c){var b=a.L.Lc(),e=c.L.Lc();return b.k==e.k&&0!=b.k?0<b.k:0!=(b.C&e.n)&&0!=(b.n&e.C)};var Eg=new Dg;function Fg(){this.k=[];this.n=[]}function Gg(){}Gg.prototype.BeginContact=function(){};Gg.prototype.EndContact=function(){};function Hg(a){this.Qd=a;this.C=Eg;this.n=Ig;this.H=new Jg;this.k=new sf}
function ig(a){uf(a.k,function(c,b){a:{var e=c.rb(),d=b.rb();if(e!=d&&rg(d,e)&&a.C.k(c,b)){for(e=d.Xd.eb(ng);e;e=e.Sa())if(d=e.Ac.wc,d==c){if(d=e.Ac.kc,d==b)break a}else if(d==b&&(d=e.Ac.kc,d==c))break a;a.H.C(c,b)}}})}Hg.prototype.Ed=function(a){a.Xj&&this.n.EndContact(a);0<a.ef.lc&&(kg(a.wc.rb(),!0),kg(a.kc.rb(),!0));Kg(a.eo,a);Kg(a.fo,a);Kg(a.Sq,a);this.H.Ed(a)};function Lg(){this.n=1;this.C=65535;this.k=0}Lg.prototype.Lc=function(){var a=new Lg;a.n=this.n;a.C=this.C;a.k=this.k;return a};
function dg(a,c,b){this.Mu="Fixture"+Mg++;this.L=b.k.Lc();this.k=$e();this.tt=a;this.xc=b.shape.Lc();this.H=b.ai;this.T=b.ci;this.O=b.Di;this.C=b.n}dg.prototype.rb=function(){return this.tt};dg.prototype.Ed=function(){Ze.push(this.k)};dg.prototype.$j=function(a){null!=this.n&&(a.$j(this.n),this.n=null)};
function hg(a,c,b,e){if(a.n){var d=$e(),k=$e();a.xc.Oi(d,b);a.xc.Oi(k,e);bf(a.k,d,k);Ze.push(d);Ze.push(k);b=be(e.position,b.position);e=a.n;d=c.n;a=a.k;if(af(e.fb,a))a=!1;else{of(d,e);var k=.1+2*Math.abs(b.x),f=.1+2*Math.abs(b.y);e.fb.k.x=a.k.x-k;e.fb.k.y=a.k.y-f;e.fb.n.x=a.n.x+k;e.fb.n.y=a.n.y+f;qf(d,e);a=!0}a&&c.k.push(e);Ge(b)}}var Mg=0;function Ng(){this.k=new Lg;this.k.n=1;this.k.C=65535;this.k.k=0;this.shape=null;this.ci=.2;this.ai=this.Di=0;this.n=!1}
function bg(){this.C=this.n=null;this.k={}}bg.prototype.eb=function(){return this.n};function eg(a){this.He=a;this.k=this.next=null}eg.prototype.Qg=function(a){this.k=a};eg.prototype.Sa=function(){return this.next};function Og(a,c){this.xa=a;this.H=c;this.n=[];this.T=[];this.L=[];this.C=[];this.k=[]}function Pg(a){a.n=[];a.T=[];a.L=[];a.C=[];a.k=[]}function Qg(a,c){if(null!=a.xa)for(var b=0;b<a.C.length;++b)for(var e=c[b],d=new Fg,k=0;k<e.L;++k)d.k[k]=e.C[k].nc,d.n[k]=e.C[k].Mg}
function Rg(a,c){a.n.push(c);0!=c.qd()&&(a.L.push(c),2==c.qd()&&a.T.push(c))}function Sg(a,c,b,e,d){this.Pa=a;var k=0;0<a&&(k=1/a);this.k=k;this.Cc=c;this.bn=b;this.Gn=e;this.Jh=d}function Tg(a,c){this.k=new Hg(this);this.C=new Ug;this.n=!1;this.Ni=new tg;this.Xd=new $f;this.Wb=null;this.T=new ag;this.O=0;this.ea=c;this.H=a;this.L=0;this.dE=Vg(this,new sg)}var Wg=1-100*Number.MIN_VALUE;function Vg(a,c){var b=new Yf(c,a),e=a.Ni,d=b.xa;null==e.k[d]&&(vg(e,b,d,ug),mg(e,b),b.O.push(e));return b}
function Xg(a,c){for(var b=c.Wb;b;){var e=b,b=b.next;Yg(a,e.kh)}for(b=c.qa.eb();b;b=b.Sa())b.HB.Qn(c);for(b=c.Xd.eb(ng);b;b=b.Sa())a.k.Ed(b.Ac);for(b=c.n.eb();b;b=b.Sa()){var e=c,d=b.He,k=e.n,f=d.Mu,g=k.k[f];if(null!=g){var h=g.k,g=g.Sa();null==h?k.n=g:h.next=g;null==g?k.C=h:g.Qg(h);delete k.k[f]}for(k=e.Xd.eb(ng);k;k=k.Sa())d!=k.Ac.wc&&d!=k.Ac.kc||e.Qd.k.Ed(k.Ac);e.L&&d.$j(e.Qd.k.k);d.Ed();d.tt=null;fg(e)}c.Ed();a.Ni.Qn(c)}
function Zg(a,c){var b=c.C();b.Nk=null;if(b.qi=a.Wb)a.Wb.Nk=b;a.Wb=b;a.O++;b.Zd.kh=b;b.Zd.gf=b.ka;b.Zd.prev=null;if(b.Zd.next=b.ja.Wb)b.ja.Wb.prev=b.Zd;b.ja.Wb=b.Zd;b.$d.kh=b;b.$d.gf=b.ja;b.$d.prev=null;if(b.$d.next=b.ka.Wb)b.ka.Wb.prev=b.$d;b.ka.Wb=b.$d;var e=c.k,d=c.n;if(!c.T)for(var k=d.Xd.eb(ng);k;k=k.Sa())gh(k.Ac,d)==e&&(k.Ac.Sl=!0);return b}
function Yg(a,c){var b=c.mx;c.Nk&&(c.Nk.qi=c.qi);c.qi&&(c.qi.Nk=c.Nk);c==a.Wb&&(a.Wb=c.qi);var e=c.ja,d=c.ka;kg(e,!0);kg(d,!0);c.Zd.prev&&(c.Zd.prev.next=c.Zd.next);c.Zd.next&&(c.Zd.next.prev=c.Zd.prev);c.Zd==e.Wb&&(e.Wb=c.Zd.next);c.Zd.prev=null;c.Zd.next=null;c.$d.prev&&(c.$d.prev.next=c.$d.next);c.$d.next&&(c.$d.next.prev=c.$d.prev);c.$d==d.Wb&&(d.Wb=c.$d.next);c.$d.prev=null;c.$d.next=null;a.O--;if(!b)for(b=d.Xd.eb(ng);b;b=b.Sa())gh(b.Ac,d)==e&&(b.Ac.Sl=!0)}
Tg.prototype.Ph=function(a,c,b){var e,d;this.n&&(ig(this.k),this.n=!1);for(var k=new Sg(a,this.L*a,c,b,!0),f=this.k,g=f.Qd.Xd.eb(ng);g;g=g.Sa()){var h=g.Ac,l=h.wc,m=h.kc,n=l.rb(),q=m.rb();if(0!=n.Me||0!=q.Me){if(h.Sl){if(0==rg(q,n)){f.Ed(h);continue}if(0==f.C.k(l,m)){f.Ed(h);continue}h.Sl=!1}0==f.k.Al(l.n,m.n)?f.Ed(h):hh(h,f.n)}}if(0<k.Pa){for(var p=this.T.eb();p;p=p.Sa())p.HB.Ph(k);for(var u=new Og(this.k.n,this.C),t=this.Ni.eb(ug);t;t=t.Sa())t.body.Rb=!1;for(var r=this.Xd.eb(ng);r;r=r.Sa())r.Ac.Rb=
!1;for(var v=this.Wb;v;v=v.qi)v.Rb=!1;for(t=this.Ni.eb(zg);t;t=t.Sa()){var y=t.body;if(!y.Rb){Pg(u);ih.length=0;var A=ih;A.push(y);for(y.Rb=!0;0<A.length;){var F=A.pop();Rg(u,F);F.Me||kg(F,!0);if(0!=F.qd()){for(r=F.Xd.eb(jh);r;r=r.Sa()){var D=r.Ac;if(!D.Rb){u.C.push(D);D.Rb=!0;var G=gh(D,F);G.Rb||(A.push(G),G.Rb=!0)}}for(var z=F.Wb;z;z=z.next)!z.kh.Rb&&z.gf.Si()&&(u.k.push(z.kh),z.kh.Rb=!0,z.gf.Rb||(A.push(z.gf),z.gf.Rb=!0))}}for(var w=u,B=k,L=this.ea,W=w,O=B,H=this.H,K=0;K<W.T.length;K++){var M=
W.T[K];M.D.x+=O.Pa*(H.x+M.U*M.C.x);M.D.y+=O.Pa*(H.y+M.U*M.C.y);M.N+=O.Pa*M.ca*M.H;M.D.Te(ce(1-O.Pa*M.sb,0,1));M.N*=ce(1-O.Pa*M.Va,0,1)}kh(w.H,w.C,w.C.length);for(var ca=w,X=B,C=ca.H,P=0;P<C.n;++P){var J=C.k[P],Y=J.k,N=J.n,Q=Y.U,Z=Y.ca,la=N.U,aa=N.ca,va=J.H.x,wa=J.H.y,zb=wa,Zc=-va,kb=0,$b=0;if(X.Jh)for($b=J.L,kb=0;kb<$b;++kb){var Oa=J.C[kb];Oa.nc*=X.Cc;Oa.Mg*=X.Cc;var hb=Oa.nc*va+Oa.Mg*zb,Ob=Oa.nc*wa+Oa.Mg*Zc;Y.N-=Z*(Oa.Xb.x*Ob-Oa.Xb.y*hb);Y.D.x-=Q*hb;Y.D.y-=Q*Ob;N.N+=aa*(Oa.Yb.x*Ob-Oa.Yb.y*hb);N.D.x+=
la*hb;N.D.y+=la*Ob}else for($b=J.L,kb=0;kb<$b;++kb){var ad=J.C[kb];ad.nc=0;ad.Mg=0}}for(var Pb=0;Pb<ca.k.length;Pb++)ca.k[Pb].ig(X);for(var bc=0;bc<X.Gn;bc++){for(var oc=0;oc<ca.k.length;oc++)ca.k[oc].kg(X);lh(ca.H)}for(var ga=0;ga<ca.k.length;ga++);for(var Pd=ca.H,Ea=0;Ea<Pd.n;++Ea)for(var Fb=Pd.k[Ea],cc=Fb.xa,lb=0;lb<Fb.L;++lb){var $g=cc.Ga[lb],ah=Fb.C[lb];$g.Ej=ah.nc;$g.Fj=ah.Mg}for(var bh=w,Ab=B,Te=0;Te<bh.L.length;++Te){var ha=bh.L[Te],ch=Ab.Pa*ha.D.x,dh=Ab.Pa*ha.D.y;4<ch*ch+dh*dh&&(Je(ha.D),
ha.D.x=2*ha.D.x*Ab.k,ha.D.y=2*ha.D.y*Ab.k);var eh=Ab.Pa*ha.N;eh*eh>Sd&&(ha.N=0>ha.N?-Rd*Ab.k:Rd*Ab.k);ha.u.dd.W(ha.u.I);ha.u.qf=ha.u.R;ha.u.I.x+=Ab.Pa*ha.D.x;ha.u.I.y+=Ab.Pa*ha.D.y;ha.u.R+=Ab.Pa*ha.N;qg(ha)}for(var Ue=w,Oi=B,fh=0;fh<Oi.bn;fh++){for(var Pi=mh(Ue.H,.2),Ve=!0,Af=0;Af<Ue.k.length;Af++)var cj=Ue.k[Af].jg(.2),Ve=Ve&&cj;if(Pi&&Ve)break}Qg(w,w.H.k);if(L){for(var ie=w,dj=B,je=Number.MAX_VALUE,Bf=0;Bf<ie.L.length;Bf++){var Rb=ie.L[Bf];!Rb.Ra||Math.abs(Rb.N)>Td||1E-4<Vd(Rb.D,Rb.D)?je=Rb.ea=
0:(Rb.ea+=dj.Pa,je=Math.min(je,Rb.ea))}if(.5<=je)for(var Cf=0;Cf<ie.n.length;Cf++)kg(ie.n[Cf],!1)}}}for(t=this.Ni.eb(zg);t;t=t.Sa())og(t.body);ig(this.k);for(var Ca=new Og(this.k.n,this.C),ke=this.Ni.eb(ug);ke;ke=ke.Sa()){var Eb=ke.body;Eb.Rb=!1;Eb.u.Td=0}for(var Qa=this.Xd.eb(ng);Qa;Qa=Qa.Sa())Qa.Ac.Rb=!1,Qa.Ac.k=null;for(var le=this.Wb;le;le=le.qi)le.Rb=!1;for(;;){for(var Xh=null,Df=1,me=this.Xd.eb(nh);me;me=me.Sa()){var nb=me.Ac,Yh=nb.wc.rb(),Zh=nb.kc.rb();if(2==Yh.qd()&&Yh.Me||2==Zh.qd()&&Zh.Me){var cb=
1;if(null!=nb.k)cb=nb.k;else if(nb.Xj)cb=1,nb.k=cb;else{var Ec=nb.wc.rb(),kd=nb.kc.rb(),ld=Ec.u.Td;Ec.u.Td<kd.u.Td?(ld=kd.u.Td,Ec.u.Mh(ld)):kd.u.Td<Ec.u.Td&&(ld=Ec.u.Td,kd.u.Mh(ld));var $h=nb,ej=Ec.u,fj=kd.u;oh.vh.Set($h.wc.xc);oh.wh.Set($h.kc.xc);oh.Iy=ej;oh.Jy=fj;oh.wF=.005;var md=oh;ph++;var Ff=md.vh,Gf=md.wh,Hf=md.Iy,If=md.Jy,ne=Ff.ob+Gf.ob,oe=md.wF,ob=0,nd=0,Fc=0;qh.count=0;for(rh.C=!1;;){Hf.De(Qf,ob);If.De(Rf,ob);rh.vh=Ff;rh.wh=Gf;rh.k=Qf;rh.n=Rf;ff(sh,qh,rh);if(0>=sh.wg){ob=1;break}var hj=
Gf,S=Jf,Ga=qh,pb=Qf,qb=Rf;S.n=Ff;S.C=hj;var Sb=void 0,rb=void 0,Jb=void 0,Tb=void 0,sb=void 0,Kb=void 0,Hc=0,Ic=0,Jc=0,Kc=0,pe=0,qe=0,T=void 0,U=void 0,db=0;if(1==Ga.count)S.pb=Sf,Sb=hf(S.n,Ga.uc[0]),Tb=hf(S.C,Ga.vc[0]),U=Sb,T=pb.F,Hc=pb.position.x+(T.A.x*U.x+T.B.x*U.y),Ic=pb.position.y+(T.A.y*U.x+T.B.y*U.y),U=Tb,T=qb.F,Jc=qb.position.x+(T.A.x*U.x+T.B.x*U.y),Kc=qb.position.y+(T.A.y*U.x+T.B.y*U.y),S.k.x=Jc-Hc,S.k.y=Kc-Ic,Je(S.k);else{if(Ga.vc[0]==Ga.vc[1])S.pb=Tf,rb=hf(S.n,Ga.uc[0]),Jb=hf(S.n,Ga.uc[1]),
Tb=hf(S.C,Ga.vc[0]),S.Ma.x=.5*(rb.x+Jb.x),S.Ma.y=.5*(rb.y+Jb.y),S.k=Xd(be(Jb,rb)),Je(S.k),U=S.k,T=pb.F,pe=T.A.x*U.x+T.B.x*U.y,qe=T.A.y*U.x+T.B.y*U.y,U=S.Ma,T=pb.F,Hc=pb.position.x+(T.A.x*U.x+T.B.x*U.y),Ic=pb.position.y+(T.A.y*U.x+T.B.y*U.y),U=Tb,T=qb.F,Jc=qb.position.x+(T.A.x*U.x+T.B.x*U.y),Kc=qb.position.y+(T.A.y*U.x+T.B.y*U.y),db=(Jc-Hc)*pe+(Kc-Ic)*qe;else if(Ga.uc[0]==Ga.uc[0])S.pb=Uf,sb=hf(S.C,Ga.vc[0]),Kb=hf(S.C,Ga.vc[1]),Sb=hf(S.n,Ga.uc[0]),S.Ma.x=.5*(sb.x+Kb.x),S.Ma.y=.5*(sb.y+Kb.y),S.k=Xd(be(Kb,
sb)),Je(S.k),U=S.k,T=qb.F,pe=T.A.x*U.x+T.B.x*U.y,qe=T.A.y*U.x+T.B.y*U.y,U=S.Ma,T=qb.F,Jc=qb.position.x+(T.A.x*U.x+T.B.x*U.y),Kc=qb.position.y+(T.A.y*U.x+T.B.y*U.y),U=Sb,T=pb.F,Hc=pb.position.x+(T.A.x*U.x+T.B.x*U.y),Ic=pb.position.y+(T.A.y*U.x+T.B.y*U.y),db=(Hc-Jc)*pe+(Ic-Kc)*qe;else{var rb=hf(S.n,Ga.uc[0]),Jb=hf(S.n,Ga.uc[1]),sb=hf(S.C,Ga.vc[0]),Kb=hf(S.C,Ga.vc[1]),Lb=Yd(pb.F,be(Jb,rb)),Mb=Yd(qb.F,be(Kb,sb)),bi=Lb.x*Lb.x+Lb.y*Lb.y,Kf=Mb.x*Mb.x+Mb.y*Mb.y,re=be(Mb,Lb),ci=Lb.x*re.x+Lb.y*re.y,di=Mb.x*
re.x+Mb.y*re.y,od=Lb.x*Mb.x+Lb.y*Mb.y,ei=bi*Kf-od*od,db=0;0!=ei&&(db=ce((od*di-ci*Kf)/ei,0,1));0>(od*db+di)/Kf&&(db=ce((od-ci)/bi,0,1));Sb=V(0,0);Sb.x=rb.x+db*(Jb.x-rb.x);Sb.y=rb.y+db*(Jb.y-rb.y);Tb=V(0,0);Tb.x=sb.x+db*(Kb.x-sb.x);Tb.y=sb.y+db*(Kb.y-sb.y);0==db||1==db?(S.pb=Uf,S.k=Xd(be(Kb,sb)),Je(S.k),S.Ma=Tb):(S.pb=Tf,S.k=Xd(be(Jb,rb)),S.Ma=Sb)}if(0>db){var se=S.k;se.x=-se.x;se.y=-se.y}}var pd=Ef();if(0>=pd){ob=1;break}0==nd&&(Fc=pd>ne?Math.max(ne-oe,.75*ne):Math.max(pd-oe,.02*ne));if(pd-Fc<.5*
oe){if(0==nd){ob=1;break}break}var Lf=ob,te=ob,qd=1,Mf=pd;Hf.De(Qf,qd);If.De(Rf,qd);var Nf=Ef();if(Nf>=Fc){ob=1;break}for(var ue=0;;){var Lc=0,Lc=ue&1?te+(Fc-Mf)*(qd-te)/(Nf-Mf):.5*(te+qd);Hf.De(Qf,Lc);If.De(Rf,Lc);var ve=Ef();if(Math.abs(ve-Fc)<.025*oe){Lf=Lc;break}ve>Fc?(te=Lc,Mf=ve):(qd=Lc,Nf=ve);ue++;th++;if(50==ue)break}uh=Math.max(uh,ue);if(Lf<(1+100*Number.MIN_VALUE)*ob)break;ob=Lf;nd++;vh++;if(1E3==nd)break}wh=Math.max(wh,nd);cb=ob;0<cb&&1>cb&&(cb=(1-cb)*ld+cb);nb.k=cb}Number.MIN_VALUE<cb&&
cb<Df&&(Xh=nb,Df=cb)}}e=Xh;d=Df;var Ub=e,Mc=d;if(null===Ub||Wg<Mc)break;var rd=Ub.wc.rb(),sd=Ub.kc.rb();xh.Set(rd.u);yh.Set(sd.u);rd.Mh(Mc);sd.Mh(Mc);hh(Ub,this.k.n);Ub.k=null;if(Ub.L||!Ub.enabled)rd.u.Set(xh),sd.u.Set(yh),qg(rd),qg(sd);else if(Ub.Xj){var we=rd;2!=we.qd()&&(we=sd);Pg(Ca);ih.length=0;var td=ih;td.push(we);for(we.Rb=!0;0<td.length;)if(Eb=td.pop(),Rg(Ca,Eb),Eb.Me||kg(Eb,!0),2==Eb.qd()){for(Qa=Eb.Xd.eb(jh);Qa&&32!=Ca.ea;Qa=Qa.Sa()){var xe=Qa.Ac;if(!xe.Rb){Ca.C.push(xe);xe.Rb=!0;var Nc=
gh(xe,Eb);Nc.Rb||(0!=Nc.qd()&&(Nc.Mh(Mc),kg(Nc,!0),td.push(Nc)),Nc.Rb=!0)}}for(var eb=Eb.Wb;eb;eb=eb.next)32!=Ca.O&&!eb.kh.Rb&&eb.gf.Si()&&(Ca.k.push(eb.kh),eb.kh.Rb=!0,eb.gf.Rb||(0!=eb.gf.qd()&&(eb.gf.Mh(Mc),kg(eb.gf,!0),td.push(eb.gf)),eb.gf.Rb=!0))}var fb=Ca,Za=new Sg((1-Mc)*k.Pa,0,k.Gn,k.bn,!1),$a=0,Vb=0;kh(fb.H,fb.C,fb.C.length);for(var Of=fb.H,$a=0;$a<fb.k.length;++$a)fb.k[$a].ig(Za);for($a=0;$a<Za.Gn;++$a)for(lh(Of),Vb=0;Vb<fb.k.length;++Vb)fb.k[Vb].kg(Za);for($a=0;$a<fb.L.length;++$a){var ja=
fb.L[$a],ji=Za.Pa*ja.D.x,ki=Za.Pa*ja.D.y;4<ji*ji+ki*ki&&(Je(ja.D),ja.D.x=2*ja.D.x*Za.k,ja.D.y=2*ja.D.y*Za.k);var li=Za.Pa*ja.N;li*li>Sd&&(ja.N=0>ja.N?-Rd*Za.k:Rd*Za.k);ja.u.dd.W(ja.u.I);ja.u.qf=ja.u.R;ja.u.I.x+=Za.Pa*ja.D.x;ja.u.I.y+=Za.Pa*ja.D.y;ja.u.R+=Za.Pa*ja.N;qg(ja)}for($a=0;$a<Za.bn;++$a){for(var kj=mh(Of,.75),Pf=!0,Vb=0;Vb<fb.k.length;++Vb)var lj=fb.k[Vb].jg(.2),Pf=Pf&&lj;if(kj&&Pf)break}Qg(fb,Of.k);for(var La=0;La<Ca.n.length;La++)if(Ca.n[La].Rb=!1,Ca.n[La].Me&&2==Ca.n[La].qd())for(og(Ca.n[La]),
Qa=Ca.n[La].Xd.eb(ng);Qa;Qa=Qa.Sa())Qa.Ac.k=null;for(La=0;La<Ca.ea;La++)Ca.C[La].Rb=!1,Ca.C[La].k=null;for(La=0;La<Ca.O;La++)Ca.k[La].Rb=!1;ig(this.k)}}this.L=k.k}};Tg.prototype.Qi=function(){return this.Xd};var ih=[];function zh(a,c){this.n="Contact"+Ah++;this.ef=new yf;this.H=new yf;this.Xj=!1;var b=a.rb(),e=c.rb();this.T=2!=b.qd()||b.T||2!=e.qd()||e.T;this.L=a.C||c.C;this.Sl=!1;this.wc=a;this.kc=c;this.enabled=!0;this.eo=b.Qi();this.fo=e.Qi();this.Sq=e.Qd.Qi();Bh(this)}
zh.prototype.cd=function(a,c){this.ef.cd();this.H.cd();this.Xj=!1;var b=a.rb(),e=c.rb();this.T=2!=b.qd()||b.T||2!=e.qd()||e.T;this.L=a.C||c.C;this.Sl=!1;this.wc=a;this.kc=c;this.enabled=!0;this.eo=b.Qi();this.fo=e.Qi();this.Sq=e.Qd.Qi();Bh(this)};function Bh(a){Ch(a.eo,a);Ch(a.fo,a);Ch(a.Sq,a);Dh(a)}function Dh(a){var c=!1,b=!1;!a.L&&a.enabled&&(a.Xj&&(c=!0),a.T&&(b=!0));Eh(a.eo,a,c,b);Eh(a.fo,a,c,b);Eh(a.Sq,a,c,b)}function gh(a,c){var b=a.wc.rb();return b!=c?b:a.kc.rb()}
function hh(a,c){var b=a.H;a.H=a.ef;a.ef=b;a.enabled=!0;var e=!1,b=a.Xj,d=a.wc.rb(),k=a.kc.rb(),f=a.wc.k.Al(a.kc.k);if(a.L){if(f){var e=a.wc.xc,d=d.De(),f=a.kc.xc,g=k.De(),k=new kf;k.vh=new mf;k.vh.Set(e);k.wh=new mf;k.wh.Set(f);k.k=d;k.n=g;k.C=!0;d=new Wf;d.count=0;e=new lf;ff(e,d,k);e=e.wg<10*Number.MIN_VALUE}a.ef.lc=0}else{a.T=2!=d.qd()||d.T||2!=k.qd()||k.T?!0:!1;if(f)for(a.C(),e=0<a.ef.lc,f=0;f<a.ef.lc;f++){g=a.ef.Ga[f];g.Ej=0;for(var h=g.Fj=0;h<a.H.lc;h++){var l=a.H.Ga[h];if(l.Df.rc==g.Df.rc){g.Ej=
l.Ej;g.Fj=l.Fj;break}}}else a.ef.lc=0;e!=b&&(kg(d,!0),kg(k,!0))}a.Xj=e;e!=b&&Dh(a);!b&&e&&c.BeginContact(a);b&&!e&&c.EndContact(a)}zh.prototype.C=function(){};var oh=new Xf,Ah=0;function Fh(a,c){zh.call(this,a,c)}Nd(Fh,zh);Fh.prototype.cd=function(a,c){zh.prototype.cd.call(this,a,c)};
Fh.prototype.C=function(){var a=this.ef,c=this.wc.xc,b=this.wc.rb().K,e=this.kc.xc,d=this.kc.rb().K;a.lc=0;var k=d.position.x+(d.F.A.x*e.Db.x+d.F.B.x*e.Db.y)-(b.position.x+(b.F.A.x*c.Db.x+b.F.B.x*c.Db.y)),b=d.position.y+(d.F.A.y*e.Db.x+d.F.B.y*e.Db.y)-(b.position.y+(b.F.A.y*c.Db.x+b.F.B.y*c.Db.y)),d=c.ob+e.ob;k*k+b*b>d*d||(a.pb=1,a.Ma.W(c.Db),a.hd.Ja(),a.lc=1,a.Ga[0].Ma.W(e.Db),We(a.Ga[0].Df,0))};
function Gh(){this.T=V(0,0);this.jc=V(0,0);this.H=V(0,0);this.nh=new de;this.O=new de;this.C=[];for(var a=0;2>a;a++)this.C[a]=new Hh}function Hh(){this.jc=V(0,0);this.Xb=V(0,0);this.Yb=V(0,0)}Hh.prototype.cd=function(){this.jc.Set(0,0);this.Xb.Set(0,0);this.Yb.Set(0,0)};
function Jg(){this.k={};this.n={};Ih(this,Fh,"b2CircleShape","b2CircleShape");Ih(this,Jh,"b2PolygonShape","b2CircleShape");Ih(this,Kh,"b2PolygonShape","b2PolygonShape");Ih(this,Lh,"b2EdgeShape","b2CircleShape");Ih(this,Mh,"b2PolygonShape","b2EdgeShape")}function Ih(a,c,b,e){a.n[b]=a.n[b]||{};a.n[b][e]=a.n[b][e]||[];a.k[b]=a.k[b]||{};a.k[b][e]=new Nh;a.k[b][e].Nv=c;a.k[b][e].Yx=!0;b!=e&&(a.k[e]=a.k[e]||{},a.k[e][b]=new Nh,a.k[e][b].Nv=c,a.k[e][b].Yx=!1)}
Jg.prototype.C=function(a,c){var b=a.xc.Ri(),e=c.xc.Ri(),d=this.k[b][e],k=d.Nv;return null!=k?d.Yx?0<this.n[b][e].length?(b=this.n[b][e].pop(),b.cd(a,c),b):new k(a,c):0<this.n[e][b].length?(b=this.n[e][b].pop(),b.cd(c,a),b):new k(c,a):null};Jg.prototype.Ed=function(a){this.n[a.wc.xc.Ri()][a.kc.xc.Ri()].push(a)};function $f(){this.n=[];for(var a=0;a<=ng;a++)this.n[a]=null;this.C=[];for(a=0;a<=ng;a++)this.C[a]=null;this.k={}}$f.prototype.eb=function(a){return this.n[a]};
function Ch(a,c){var b=c.n;if(null==a.k[b]){a.k[b]=[];for(var e=0;e<=ng;e++)a.k[b][e]=null;Oh(a,c,b,ng)}}function Eh(a,c,b,e){b?Oh(a,c,c.n,jh):Ph(a,c.n,jh);e?Oh(a,c,c.n,nh):Ph(a,c.n,nh)}function Kg(a,c){var b=c.n;if(null!=a.k[b]){for(var e=0;e<=ng;e++)Ph(a,b,e);delete a.k[b]}}function Ph(a,c,b){var e=a.k[c];if(null!=e&&(c=e[b],null!=c)){e[b]=null;var e=c.k,d=c.Sa();null==e?a.n[b]=d:e.next=d;null==d?a.C[b]=e:d.Qg(e);Qh.push(c)}}
function Oh(a,c,b,e){b=a.k[b];if(null==b[e]){if(0<Qh.length){var d=Qh.pop();d.next=null;d.k=null;d.Ac=c;c=d}else c=new Rh(c);b[e]=c;c=a.C[e];null!=c?(c.next=b[e],b[e].Qg(c)):a.n[e]=b[e];a.C[e]=b[e]}}var jh=0,nh=1,ng=2;function Rh(a){this.Ac=a;this.k=this.next=null}var Qh=[];Rh.prototype.Qg=function(a){this.k=a};Rh.prototype.Sa=function(){return this.next};function Nh(){}function Ug(){this.k=[]}
function kh(a,c,b){for(a.n=b;a.k.length<a.n;)a.k[a.k.length]=new Gh;for(var e=0;e<b;e++){var d=c[e],k=d.wc,f=d.kc,g=k.xc.ob,h=f.xc.ob,l=k.rb(),m=f.rb(),d=d.ef,n=Math.sqrt(k.T*f.T),q,k=k.O,f=f.O;q=k>f?k:f;var f=l.D.x,k=l.D.y,p=m.D.x,u=m.D.y,t=l.N,r=m.N,v=d,y=l.K,A=g,F=m.K,D=h,G=Sh;if(0!=v.lc){var z=0,w=void 0,B=void 0,L=0,W=0,O=0,H=0,K=0,w=0;switch(v.pb){case 1:B=y.F;w=v.Ma;z=y.position.x+B.A.x*w.x+B.B.x*w.y;y=y.position.y+B.A.y*w.x+B.B.y*w.y;B=F.F;w=v.Ga[0].Ma;v=F.position.x+B.A.x*w.x+B.B.x*w.y;F=
F.position.y+B.A.y*w.x+B.B.y*w.y;w=v-z;B=F-y;L=w*w+B*B;L>Ud?(L=Math.sqrt(L),G.k.x=w/L,G.k.y=B/L):(G.k.x=1,G.k.y=0);w=y+A*G.k.y;F=F-D*G.k.y;G.Ga[0].x=.5*(z+A*G.k.x+(v-D*G.k.x));G.Ga[0].y=.5*(w+F);break;case 2:B=y.F;w=v.hd;L=B.A.x*w.x+B.B.x*w.y;W=B.A.y*w.x+B.B.y*w.y;B=y.F;w=v.Ma;O=y.position.x+B.A.x*w.x+B.B.x*w.y;H=y.position.y+B.A.y*w.x+B.B.y*w.y;G.k.x=L;G.k.y=W;for(z=0;z<v.lc;z++)B=F.F,w=v.Ga[z].Ma,K=F.position.x+B.A.x*w.x+B.B.x*w.y,w=F.position.y+B.A.y*w.x+B.B.y*w.y,G.Ga[z].x=K+.5*(A-(K-O)*L-(w-
H)*W-D)*L,G.Ga[z].y=w+.5*(A-(K-O)*L-(w-H)*W-D)*W;break;case 4:for(B=F.F,w=v.hd,L=B.A.x*w.x+B.B.x*w.y,W=B.A.y*w.x+B.B.y*w.y,B=F.F,w=v.Ma,O=F.position.x+B.A.x*w.x+B.B.x*w.y,H=F.position.y+B.A.y*w.x+B.B.y*w.y,G.k.x=-L,G.k.y=-W,z=0;z<v.lc;z++)B=y.F,w=v.Ga[z].Ma,K=y.position.x+B.A.x*w.x+B.B.x*w.y,w=y.position.y+B.A.y*w.x+B.B.y*w.y,G.Ga[z].x=K+.5*(D-(K-O)*L-(w-H)*W-A)*L,G.Ga[z].y=w+.5*(D-(K-O)*L-(w-H)*W-A)*W}}D=Sh.k.x;G=Sh.k.y;A=a.k[e];A.k=l;A.n=m;A.xa=d;A.H.x=D;A.H.y=G;A.L=d.lc;A.ci=n;A.Di=q;A.T.x=d.hd.x;
A.T.y=d.hd.y;A.jc.x=d.Ma.x;A.jc.y=d.Ma.y;A.ea=g+h;A.type=d.pb;for(g=0;g<A.L;++g)n=d.Ga[g],h=A.C[g],h.nc=n.Ej,h.Mg=n.Fj,h.jc.W(n.Ma),n=h.Xb.x=Sh.Ga[g].x-l.u.I.x,q=h.Xb.y=Sh.Ga[g].y-l.u.I.y,F=h.Yb.x=Sh.Ga[g].x-m.u.I.x,z=h.Yb.y=Sh.Ga[g].y-m.u.I.y,v=n*G-q*D,w=F*G-z*D,v*=v,w*=w,h.nh=1/(l.U+m.U+l.ca*v+m.ca*w),B=l.fa*l.U+m.fa*m.U,B+=l.fa*l.ca*v+m.fa*m.ca*w,h.sC=1/B,w=G,B=-D,v=n*B-q*w,w=F*B-z*w,v*=v,w*=w,h.qF=1/(l.U+m.U+l.ca*v+m.ca*w),h.Fn=0,n=A.H.x*(p+-r*z-f- -t*q)+A.H.y*(u+r*F-k-t*n),-1>n&&(h.Fn+=-A.Di*
n);2==A.L&&(u=A.C[0],p=A.C[1],d=l.U,l=l.ca,f=m.U,m=m.ca,k=u.Xb.x*G-u.Xb.y*D,u=u.Yb.x*G-u.Yb.y*D,t=p.Xb.x*G-p.Xb.y*D,g=p.Yb.x*G-p.Yb.y*D,p=d+f+l*k*k+m*u*u,r=d+f+l*t*t+m*g*g,m=d+f+l*k*t+m*u*g,p*p<100*(p*r-m*m)?(A.O.A.Set(p,m),A.O.B.Set(m,r),ge(A.O,A.nh)):A.L=1)}}
function lh(a){for(var c=0;c<a.n;c++){for(var b=a.k[c],e=b.H.x,d=b.H.y,k=0;k<b.L;k++){var f=b,g=b.C[k],h=f.H.y,l=-f.H.x,m=f.ci*g.nc,m=ce(g.Mg-g.qF*((f.n.D.x-f.n.N*g.Yb.y-f.k.D.x+f.k.N*g.Xb.y)*h+(f.n.D.y+f.n.N*g.Yb.x-f.k.D.y-f.k.N*g.Xb.x)*l),-m,m),n=m-g.Mg,h=n*h,l=n*l;f.k.D.x-=f.k.U*h;f.k.D.y-=f.k.U*l;f.k.N-=f.k.ca*(g.Xb.x*l-g.Xb.y*h);f.n.D.x+=f.n.U*h;f.n.D.y+=f.n.U*l;f.n.N+=f.n.ca*(g.Yb.x*l-g.Yb.y*h);g.Mg=m}if(1==b.L)k=b.C[0],f=k.nc-k.nh*((b.n.D.x-b.n.N*k.Yb.y-b.k.D.x+b.k.N*k.Xb.y)*e+(b.n.D.y+b.n.N*
k.Yb.x-b.k.D.y-b.k.N*k.Xb.x)*d-k.Fn),f=0<f?f:0,g=f-k.nc,e=g*e,d=g*d,b.k.D.x-=b.k.U*e,b.k.D.y-=b.k.U*d,b.k.N-=b.k.ca*(k.Xb.x*d-k.Xb.y*e),b.n.D.x+=b.n.U*e,b.n.D.y+=b.n.U*d,b.n.N+=b.n.ca*(k.Yb.x*d-k.Yb.y*e),k.nc=f;else for(k=b.C[0],f=b.C[1],g=k.nc,l=f.nc,m=(b.n.D.x-b.n.N*k.Yb.y-b.k.D.x+b.k.N*k.Xb.y)*e+(b.n.D.y+b.n.N*k.Yb.x-b.k.D.y-b.k.N*k.Xb.x)*d-k.Fn,d=(b.n.D.x-b.n.N*f.Yb.y-b.k.D.x+b.k.N*f.Xb.y)*e+(b.n.D.y+b.n.N*f.Yb.x-b.k.D.y-b.k.N*f.Xb.x)*d-f.Fn,m-=b.O.A.x*g+b.O.B.x*l,d-=b.O.A.y*g+b.O.B.y*l;;){e=
-(b.nh.A.x*m+b.nh.B.x*d);if(0<=e&&(h=-(b.nh.A.y*m+b.nh.B.y*d),0<=h)){Th(b,k,f,e-g,h-l);k.nc=e;f.nc=h;break}e=-k.nh*m;if(0<=e&&0<=b.O.A.y*e+d){Th(b,k,f,e-g,-l);k.nc=e;f.nc=0;break}e=-f.nh*d;if(0<=e&&0<=b.O.B.x*e+m){Th(b,k,f,-g,e-l);k.nc=0;f.nc=e;break}if(0<=m&&0<=d){Th(b,k,f,-g,-l);k.nc=0;f.nc=0;break}break}}}
function Th(a,c,b,e,d){var k=e*a.H.x;e*=a.H.y;var f=d*a.H.x;d*=a.H.y;a.k.D.x-=a.k.U*(k+f);a.k.D.y-=a.k.U*(e+d);a.k.N-=a.k.ca*(c.Xb.x*e-c.Xb.y*k+b.Xb.x*d-b.Xb.y*f);a.n.D.x+=a.n.U*(k+f);a.n.D.y+=a.n.U*(e+d);a.n.N+=a.n.ca*(c.Yb.x*e-c.Yb.y*k+b.Yb.x*d-b.Yb.y*f);c.nc=0;b.nc=0}
function mh(a,c){void 0===c&&(c=0);for(var b=0,e=0;e<a.n;e++){var d=a.k[e],k=d.k,f=d.n,g=k.fa*k.U,h=k.fa*k.ca,l=f.fa*f.U,m=f.fa*f.ca,n=d,q=Uh;switch(n.type){case 1:var p=n.k.K.F,u=n.jc,t=n.k.K.position.x+(p.A.x*u.x+p.B.x*u.y),r=n.k.K.position.y+(p.A.y*u.x+p.B.y*u.y),p=n.n.K.F,u=n.C[0].jc,v=n.n.K.position.x+(p.A.x*u.x+p.B.x*u.y),p=n.n.K.position.y+(p.A.y*u.x+p.B.y*u.y),u=v-t,y=p-r,A=u*u+y*y;A>Ud?(A=Math.sqrt(A),q.k.x=u/A,q.k.y=y/A):(q.k.x=1,q.k.y=0);q.Ga[0].x=.5*(t+v);q.Ga[0].y=.5*(r+p);q.n[0]=u*q.k.x+
y*q.k.y-n.ea;break;case 2:q.k.x=n.k.K.F.A.x*n.T.x+n.k.K.F.B.x*n.T.y;q.k.y=n.k.K.F.A.y*n.T.x+n.k.K.F.B.y*n.T.y;t=n.k.K.position.x+(n.k.K.F.A.x*n.jc.x+n.k.K.F.B.x*n.jc.y);r=n.k.K.position.y+(n.k.K.F.A.y*n.jc.x+n.k.K.F.B.y*n.jc.y);for(v=0;v<n.L;v++)p=n.n.K.position.x+(n.n.K.F.A.x*n.C[v].jc.x+n.n.K.F.B.x*n.C[v].jc.y),u=n.n.K.position.y+(n.n.K.F.A.y*n.C[v].jc.x+n.n.K.F.B.y*n.C[v].jc.y),q.n[v]=(p-t)*q.k.x+(u-r)*q.k.y-n.ea,q.Ga[v].x=p,q.Ga[v].y=u;break;case 4:q.k.x=n.n.K.F.A.x*n.T.x+n.n.K.F.B.x*n.T.y;q.k.y=
n.n.K.F.A.y*n.T.x+n.n.K.F.B.y*n.T.y;t=n.n.K.position.x+(n.n.K.F.A.x*n.jc.x+n.n.K.F.B.x*n.jc.y);r=n.n.K.position.y+(n.n.K.F.A.y*n.jc.x+n.n.K.F.B.y*n.jc.y);for(v=0;v<n.L;v++)p=n.k.K.position.x+(n.k.K.F.A.x*n.C[v].jc.x+n.k.K.F.B.x*n.C[v].jc.y),u=n.k.K.position.y+(n.k.K.F.A.y*n.C[v].jc.x+n.k.K.F.B.y*n.C[v].jc.y),q.n[v]=(p-t)*q.k.x+(u-r)*q.k.y-n.ea,q.Ga[v].Set(p,u);q.k.x*=-1;q.k.y*=-1}q=Uh.k;for(n=0;n<d.L;n++)u=d.C[n],p=Uh.Ga[n],y=Uh.n[n],t=p.x-k.u.I.x,r=p.y-k.u.I.y,v=p.x-f.u.I.x,p=p.y-f.u.I.y,b=b<y?b:
y,y=-u.sC*ce(c*(y+.005),-.2,0),u=y*q.x,y*=q.y,k.u.I.x-=g*u,k.u.I.y-=g*y,k.u.R-=h*(t*y-r*u),qg(k),f.u.I.x+=l*u,f.u.I.y+=l*y,f.u.R+=m*(v*y-p*u),qg(f)}return-.0075<b}function Lh(a,c){zh.call(this,a,c)}Nd(Lh,zh);Lh.prototype.cd=function(a,c){zh.prototype.cd.call(this,a,c)};Lh.prototype.C=function(){};function Jh(a,c){zh.call(this,a,c)}Nd(Jh,zh);Jh.prototype.cd=function(a,c){zh.prototype.cd.call(this,a,c)};
Jh.prototype.C=function(){a:{var a=this.ef,c=this.wc.xc,b=this.wc.rb().K,e=this.kc.xc,d=this.kc.rb().K;a.lc=0;for(var k=d.position.x+(d.F.A.x*e.Db.x+d.F.B.x*e.Db.y)-b.position.x,f=d.position.y+(d.F.A.y*e.Db.x+d.F.B.y*e.Db.y)-b.position.y,d=k*b.F.A.x+f*b.F.A.y,b=k*b.F.B.x+f*b.F.B.y,k=0,f=-Number.MAX_VALUE,g=c.ob+e.ob,h=0;h<c.ub;++h){var l=c.Lb[h].x*(d-c.Z[h].x)+c.Lb[h].y*(b-c.Z[h].y);if(l>g)break a;l>f&&(f=l,k=h)}l=k+1;l>=c.ub&&(l=0);var h=c.Z[k],m=c.Z[l];f<Number.MIN_VALUE?(a.lc=1,a.pb=2,a.hd.W(c.Lb[k]),
a.Ma.x=.5*(h.x+m.x),a.Ma.y=.5*(h.y+m.y),a.Ga[0].Ma.W(e.Db),We(a.Ga[0].Df,0)):0>=(d-h.x)*(m.x-h.x)+(b-h.y)*(m.y-h.y)?(d-h.x)*(d-h.x)+(b-h.y)*(b-h.y)>g*g||(a.lc=1,a.pb=2,a.hd.x=d-h.x,a.hd.y=b-h.y,Je(a.hd),a.Ma.W(h),a.Ga[0].Ma.W(e.Db),We(a.Ga[0].Df,0)):0>=(d-m.x)*(h.x-m.x)+(b-m.y)*(h.y-m.y)?(d-m.x)*(d-m.x)+(b-m.y)*(b-m.y)>g*g||(a.lc=1,a.pb=2,a.hd.x=d-m.x,a.hd.y=b-m.y,Je(a.hd),a.Ma.W(m),a.Ga[0].Ma.W(e.Db),We(a.Ga[0].Df,0)):(l=.5*(h.x+m.x),h=.5*(h.y+m.y),f=(d-l)*c.Lb[k].x+(b-h)*c.Lb[k].y,f>g||(a.lc=1,
a.pb=2,a.hd.x=c.Lb[k].x,a.hd.y=c.Lb[k].y,Je(a.hd),a.Ma.Set(l,h),a.Ga[0].Ma.W(e.Db),We(a.Ga[0].Df,0)))}};function Mh(a,c){zh.call(this,a,c)}Nd(Mh,zh);Mh.prototype.cd=function(a,c){zh.prototype.cd.call(this,a,c)};Mh.prototype.C=function(){};function Kh(a,c){zh.call(this,a,c)}Nd(Kh,zh);Kh.prototype.cd=function(a,c){zh.prototype.cd.call(this,a,c)};
Kh.prototype.C=function(){var a=this.ef,c=this.wc.xc,b=this.wc.rb().K,e=this.kc.xc,d=this.kc.rb().K;a.lc=0;var k=c.ob+e.ob,f=ef(c,b,e,d),g=f.yv;if(!(f.nq>k)){var h=ef(e,d,c,b);if(!(h.nq>k)){var l=c,m=e,n=b,q=d,p=0;a.pb=2;h.nq>.98*f.nq+.001&&(l=e,m=c,n=d,q=b,g=h.yv,a.pb=4,p=1);c=g;b=m;e=q;m=Vh;void 0===c&&(c=0);for(var f=n.F.A.x*l.Lb[c].x+n.F.B.x*l.Lb[c].y,h=n.F.A.y*l.Lb[c].x+n.F.B.y*l.Lb[c].y,d=e.F.A.x*f+e.F.A.y*h,h=e.F.B.x*f+e.F.B.y*h,f=d,d=0,u=Number.MAX_VALUE,t=0;t<b.ub;t++){var r=f*b.Lb[t].x+
h*b.Lb[t].y;r<u&&(u=r,d=t)}f=d+1;f>=b.ub&&(f=0);m[0].pf.x=e.position.x+(e.F.A.x*b.Z[d].x+e.F.B.x*b.Z[d].y);m[0].pf.y=e.position.y+(e.F.A.y*b.Z[d].x+e.F.B.y*b.Z[d].y);h=m[0].id;h.C=c;h.rc=h.rc&4294967040|h.C&255;h=m[0].id;h.k=d;h.rc=h.rc&4294902015|h.k<<8&65280;d=m[0].id;d.n=0;d.rc=d.rc&4278255615|d.n<<16&16711680;m[1].pf.x=e.position.x+(e.F.A.x*b.Z[f].x+e.F.B.x*b.Z[f].y);m[1].pf.y=e.position.y+(e.F.A.y*b.Z[f].x+e.F.B.y*b.Z[f].y);b=m[1].id;b.C=c;b.rc=b.rc&4294967040|b.C&255;c=m[1].id;c.k=f;c.rc=c.rc&
4294902015|c.k<<8&65280;c=m[1].id;c.n=1;c.rc=c.rc&4278255615|c.n<<16&16711680;c=l.Z[g];g=g+1<l.ub?l.Z[g+1]:l.Z[0];Wh.Set(g.x-c.x,g.y-c.y);Je(Wh);ai.x=Wh.y;ai.y=-Wh.x;fi.Set(.5*(c.x+g.x),.5*(c.y+g.y));gi.x=n.F.A.x*Wh.x+n.F.B.x*Wh.y;gi.y=n.F.A.y*Wh.x+n.F.B.y*Wh.y;hi.x=-gi.x;hi.y=-gi.y;ii.x=gi.y;ii.y=-gi.x;mi.x=n.position.x+(n.F.A.x*c.x+n.F.B.x*c.y);mi.y=n.position.y+(n.F.A.y*c.x+n.F.B.y*c.y);ni.x=n.position.x+(n.F.A.x*g.x+n.F.B.x*g.y);ni.y=n.position.y+(n.F.A.y*g.x+n.F.B.y*g.y);if(!(2>cf(oi,Vh,hi,-gi.x*
mi.x-gi.y*mi.y+k)||2>cf(pi,oi,gi,gi.x*ni.x+gi.y*ni.y+k))){a.hd.W(ai);a.Ma.W(fi);n=ii.x*mi.x+ii.y*mi.y;for(l=g=0;2>l;++l)ii.x*pi[l].pf.x+ii.y*pi[l].pf.y-n<=k&&(c=pi[l].pf.x-q.position.x,m=pi[l].pf.y-q.position.y,a.Ga[g].Ma.x=c*q.F.A.x+m*q.F.A.y,a.Ga[g].Ma.y=c*q.F.B.x+m*q.F.B.y,a.Ga[g].Df.Set(pi[l].id),c=a.Ga[g].Df,c.H=p,c.rc=c.rc&16777215|c.H<<24&4278190080,g++);a.lc=g}}}};function qi(){this.L="Controller"+ri++;this.Qd=null;this.k=new tg}qi.prototype.Ph=function(){};
qi.prototype.Qn=function(a){this.k.Qn(a);a=a.qa;var c=this.L,b=a.n[c];if(null!=b){var e=b.k(),b=b.Sa();null==e?a.k=b:e.n(b);null==b||b.Qg(e);delete a.n[c]}};var ri=0;function si(){qi.call(this);this.C=V(0,-1);this.ai=this.offset=0;this.H=V(0,0);this.n=null}Nd(si,qi);
si.prototype.Ph=function(){this.n=this.Qd.H.Lc();for(var a=this.k.eb(Ag);a;a=a.Sa()){for(var c=a.body,b=V(0,0),e=V(0,0),d=0,k=0,f=c.n.eb();f;f=f.Sa()){var g=V(0,0),h=f.He.xc.Jn(this.C,this.offset,c.De(),g),d=d+h;b.x+=h*g.x;b.y+=h*g.y;var l=0,l=1,k=k+h*l;e.x+=h*g.x*l;e.y+=h*g.y*l}d<Number.MIN_VALUE||(b.x/=d,b.y/=d,e.x/=k,e.y/=k,k=this.n.Nh(),k.Te(this.ai*d),c.Mi(k,e),k=V(c.D.x-c.N*(b.y-c.u.I.y),c.D.y+c.N*(b.x-c.u.I.x)),k.nv(this.H),k.Te(-2*d),c.Mi(k,b),c.Wq(-c.k/c.fa*d*c.N*1),Ge(b),Ge(e))}};
function ti(){qi.call(this);this.n=V(0,0)}Nd(ti,qi);ti.prototype.Ph=function(a){a=V(this.n.x*a.Pa,this.n.y*a.Pa);for(var c=this.k.eb(Ag);c;c=c.Sa()){var b=c.body,e=b.D;jg(b,V(e.x+a.x,e.y+a.y))}Ge(a)};function ui(){qi.call(this);this.n=V(0,0)}Nd(ui,qi);ui.prototype.Ph=function(){for(var a=this.k.eb(Ag);a;a=a.Sa()){var c=a.body;c.Mi(this.n,c.u.I)}};function ag(){this.k=null;this.n={}}ag.prototype.eb=function(){return this.k};function vi(){qi.call(this)}Nd(vi,qi);
vi.prototype.Ph=function(){for(var a=null,c=null,b=0,e=null,d=null,k=0,f=0,g=0,k=null,h=this.k.eb(ug);h;h=h.Sa())for(var a=h.body,c=a.u.I,b=a.fa,l=this.k.eb(ug);l;l=l.Sa())if(e=l.body,a.Me||e.Me)d=e.u.I,k=d.x-c.x,f=d.y-c.y,g=k*k+f*f,g<Number.MIN_VALUE||(k=V(k,f),k.Te(1/g/Math.sqrt(g)*b*e.fa),a.Me&&a.Mi(k,c),k.Te(-1),e.Me&&e.Mi(k,d),Ge(k))};function wi(){qi.call(this);this.C=new de;this.n=0}Nd(wi,qi);
wi.prototype.Ph=function(a){a=a.Pa;if(!(a<=Number.MIN_VALUE)){a>this.n&&0<this.n&&(a=this.n);for(var c=this.k.eb(Ag);c;c=c.Sa()){var b=c.body,e;e=Yd(this.C,Zd(b.K.F,b.D));e=Yd(b.K.F,e);jg(b,V(b.D.x+e.x*a,b.D.y+e.y*a))}}};function xi(a){this.Zd=new yi;this.$d=new yi;this.lg=V(0,0);this.mg=V(0,0);this.pb=a.type;this.qi=this.Nk=null;this.ja=a.k;this.ka=a.n;this.mx=a.T}x=xi.prototype;x.qd=function(){return this.pb};x.Si=function(){return this.ja.Si()&&this.ka.Si()};x.ig=function(){};x.kg=function(){};
x.jg=function(){return!1};function zi(){this.type=0;this.n=this.k=null;this.T=!1}function yi(){}function Ai(a){xi.call(this,a);this.Ba=V(0,0);this.Ca=V(0,0);this.k=V(0,0);this.Ba.W(a.O);this.Ca.W(a.ea);this.L=a.length;this.H=a.L;this.O=a.H;this.T=this.C=this.n=0}Nd(Ai,xi);
Ai.prototype.ig=function(a){var c,b=0,e=this.ja,d=this.ka;c=e.K.F;var k=this.Ba.x-e.u.Y.x,f=this.Ba.y-e.u.Y.y,b=c.A.x*k+c.B.x*f,f=c.A.y*k+c.B.y*f,k=b;c=d.K.F;var g=this.Ca.x-d.u.Y.x,h=this.Ca.y-d.u.Y.y,b=c.A.x*g+c.B.x*h,h=c.A.y*g+c.B.y*h,g=b;this.k.x=d.u.I.x+g-e.u.I.x-k;this.k.y=d.u.I.y+h-e.u.I.y-f;b=Math.sqrt(this.k.x*this.k.x+this.k.y*this.k.y);.005<b?this.k.Te(1/b):this.k.Ja();c=k*this.k.y-f*this.k.x;var l=g*this.k.y-h*this.k.x;c=e.U+e.ca*c*c+d.U+d.ca*l*l;this.fa=0!=c?1/c:0;if(0<this.H){var b=
b-this.L,l=2*Math.PI*this.H,m=this.fa*l*l;this.C=a.Pa*(2*this.fa*this.O*l+a.Pa*m);this.C=0!=this.C?1/this.C:0;this.T=b*a.Pa*m*this.C;this.fa=c+this.C;this.fa=0!=this.fa?1/this.fa:0}a.Jh?(this.n*=a.Cc,a=this.n*this.k.x,c=this.n*this.k.y,e.D.x-=e.U*a,e.D.y-=e.U*c,e.N-=e.ca*(k*c-f*a),d.D.x+=d.U*a,d.D.y+=d.U*c,d.N+=d.ca*(g*c-h*a)):this.n=0};
Ai.prototype.kg=function(){var a=this.Ba.x-this.ja.u.Y.x,c=this.Ba.y-this.ja.u.Y.y,b=this.ja.K.F.A.x*a+this.ja.K.F.B.x*c,c=this.ja.K.F.A.y*a+this.ja.K.F.B.y*c,a=b,e=this.Ca.x-this.ka.u.Y.x,d=this.Ca.y-this.ka.u.Y.y,b=this.ka.K.F.A.x*e+this.ka.K.F.B.x*d,d=this.ka.K.F.A.y*e+this.ka.K.F.B.y*d,e=b,k=-this.fa*(this.k.x*(this.ka.D.x-this.ka.N*d-(this.ja.D.x-this.ja.N*c))+this.k.y*(this.ka.D.y+this.ka.N*e-(this.ja.D.y+this.ja.N*a))+this.T+this.C*this.n);this.n+=k;b=k*this.k.x;k*=this.k.y;this.ja.D.x-=this.ja.U*
b;this.ja.D.y-=this.ja.U*k;this.ja.N-=this.ja.ca*(a*k-c*b);this.ka.D.x+=this.ka.U*b;this.ka.D.y+=this.ka.U*k;this.ka.N+=this.ka.ca*(e*k-d*b)};
Ai.prototype.jg=function(){if(0<this.H)return!0;var a=this.Ba.x-this.ja.u.Y.x,c=this.Ba.y-this.ja.u.Y.y,b=this.ja.K.F.A.x*a+this.ja.K.F.B.x*c,c=this.ja.K.F.A.y*a+this.ja.K.F.B.y*c,a=b,e=this.Ca.x-this.ka.u.Y.x,d=this.Ca.y-this.ka.u.Y.y,b=this.ka.K.F.A.x*e+this.ka.K.F.B.x*d,d=this.ka.K.F.A.y*e+this.ka.K.F.B.y*d,e=b,k=this.ka.u.I.x+e-this.ja.u.I.x-a,f=this.ka.u.I.y+d-this.ja.u.I.y-c,g=Math.sqrt(k*k+f*f),b=ce(g-this.L,-.2,.2),h=-this.fa*b;this.k.Set(k/g,f/g);k=h*this.k.x;h*=this.k.y;this.ja.u.I.x-=this.ja.U*
k;this.ja.u.I.y-=this.ja.U*h;this.ja.u.R-=this.ja.ca*(a*h-c*k);this.ka.u.I.x+=this.ka.U*k;this.ka.u.I.y+=this.ka.U*h;this.ka.u.R+=this.ka.ca*(e*h-d*k);qg(this.ja);qg(this.ka);return.005>Math.abs(b)};function Bi(){zi.call(this);this.O=V(0,0);this.ea=V(0,0);this.type=3;this.length=1;this.H=this.L=0}Nd(Bi,zi);Bi.prototype.C=function(){return new Ai(this)};
function Ci(a){xi.call(this,a);this.C=V(0,0);this.H=V(0,0);this.T=new de;this.k=V(0,0);this.C.W(a.H);this.H.W(a.L);this.T.Ja();this.L=0;this.k.Ja();this.n=0;this.O=a.O;this.ea=a.ea}Nd(Ci,xi);
Ci.prototype.ig=function(a){var c,b=0,e=this.ja,d=this.ka;c=e.K.F;var k=this.C.x-e.u.Y.x,f=this.C.y-e.u.Y.y,b=c.A.x*k+c.B.x*f,f=c.A.y*k+c.B.y*f,k=b;c=d.K.F;var g=this.H.x-d.u.Y.x,h=this.H.y-d.u.Y.y,b=c.A.x*g+c.B.x*h,h=c.A.y*g+c.B.y*h,g=b;c=e.U;var b=d.U,l=e.ca,m=d.ca,n=new de;n.A.x=c+b;n.B.x=0;n.A.y=0;n.B.y=c+b;n.A.x+=l*f*f;n.B.x+=-l*k*f;n.A.y+=-l*k*f;n.B.y+=l*k*k;n.A.x+=m*h*h;n.B.x+=-m*g*h;n.A.y+=-m*g*h;n.B.y+=m*g*g;ge(n,this.T);this.L=l+m;0<this.L&&(this.L=1/this.L);a.Jh?(this.k.x*=a.Cc,this.k.y*=
a.Cc,this.n*=a.Cc,a=this.k,e.D.x-=c*a.x,e.D.y-=c*a.y,e.N-=l*(k*a.y-f*a.x+this.n),d.D.x+=b*a.x,d.D.y+=b*a.y,d.N+=m*(g*a.y-h*a.x+this.n)):(this.k.Ja(),this.n=0)};
Ci.prototype.kg=function(a){var c,b=0,e=this.ja,d=this.ka,k=e.D,f=e.N,g=d.D,h=d.N,l=e.U,m=d.U,n=e.ca,q=d.ca;c=e.K.F;var p=this.C.x-e.u.Y.x,u=this.C.y-e.u.Y.y,b=c.A.x*p+c.B.x*u,u=c.A.y*p+c.B.y*u,p=b;c=d.K.F;var t=this.H.x-d.u.Y.x,r=this.H.y-d.u.Y.y,b=c.A.x*t+c.B.x*r,r=c.A.y*t+c.B.y*r,t=b;c=0;var b=-this.L*(h-f),v=this.n;c=a.Pa*this.ea;this.n=ce(this.n+b,-c,c);b=this.n-v;f-=n*b;h+=q*b;c=Yd(this.T,V(-(g.x-h*r-k.x+f*u),-(g.y+h*t-k.y-f*p)));b=this.k.Lc();this.k.hg(c);c=a.Pa*this.O;Ie(this.k)>c*c&&(Je(this.k),
this.k.Te(c));c=be(this.k,b);k.x-=l*c.x;k.y-=l*c.y;f-=n*(p*c.y-u*c.x);g.x+=m*c.x;g.y+=m*c.y;h+=q*(t*c.y-r*c.x);e.N=f;d.N=h};Ci.prototype.jg=function(){return!0};function Di(){zi.call(this);this.H=V(0,0);this.L=V(0,0);this.type=9;this.ea=this.O=0}Nd(Di,zi);Di.prototype.C=function(){return new Ci(this)};
function Ei(a){xi.call(this,a);this.ea=V(0,0);this.xa=V(0,0);this.Ba=V(0,0);this.Ca=V(0,0);this.k=new Fi;var c=a.H.pb,b=a.L.pb;this.O=this.L=this.T=this.H=null;var e=0,d=0;this.Ra=a.H.ja;this.ja=a.H.ka;1==c?(this.H=a.H,this.ea.W(this.H.Ba),this.Ba.W(this.H.Ca),e=Gi(this.H)):(this.T=a.H,this.ea.W(this.T.Ba),this.Ba.W(this.T.Ca),e=this.T.ul());this.Va=a.L.ja;this.ka=a.L.ka;1==b?(this.L=a.L,this.xa.W(this.L.Ba),this.Ca.W(this.L.Ca),d=Gi(this.L)):(this.O=a.L,this.xa.W(this.O.Ba),this.Ca.W(this.O.Ca),
d=this.O.ul());this.n=a.xh;this.qa=e+this.n*d;this.C=0}Nd(Ei,xi);
Ei.prototype.ig=function(a){var c=this.Ra,b=this.Va,e=this.ja,d=this.ka,k=0,f=0,g=0,h=0,l=g=0,m=0;this.k.Ja();this.H?(this.k.C=-1,m+=e.ca):(c=c.K.F,f=this.T.le,k=c.A.x*f.x+c.B.x*f.y,f=c.A.y*f.x+c.B.y*f.y,c=e.K.F,g=this.Ba.x-e.u.Y.x,h=this.Ba.y-e.u.Y.y,l=c.A.x*g+c.B.x*h,h=c.A.y*g+c.B.y*h,g=l*f-h*k,this.k.k.Set(-k,-f),this.k.C=-g,m+=e.U+e.ca*g*g);this.L?(this.k.H=-this.n,m+=this.n*this.n*d.ca):(c=b.K.F,f=this.O.le,k=c.A.x*f.x+c.B.x*f.y,f=c.A.y*f.x+c.B.y*f.y,c=d.K.F,g=this.Ca.x-d.u.Y.x,h=this.Ca.y-d.u.Y.y,
l=c.A.x*g+c.B.x*h,h=c.A.y*g+c.B.y*h,g=l*f-h*k,this.k.n.Set(-this.n*k,-this.n*f),this.k.H=-this.n*g,m+=this.n*this.n*(d.U+d.ca*g*g));this.fa=0<m?1/m:0;a.Jh?(e.D.x+=e.U*this.C*this.k.k.x,e.D.y+=e.U*this.C*this.k.k.y,e.N+=e.ca*this.C*this.k.C,d.D.x+=d.U*this.C*this.k.n.x,d.D.y+=d.U*this.C*this.k.n.y,d.N+=d.ca*this.C*this.k.H):this.C=0};
Ei.prototype.kg=function(){var a=this.ja,c=this.ka,b=this.k,e=a.D,d=a.N,k=c.D,f=c.N;void 0===d&&(d=0);void 0===f&&(f=0);b=-this.fa*(b.k.x*e.x+b.k.y*e.y+b.C*d+(b.n.x*k.x+b.n.y*k.y)+b.H*f);this.C+=b;a.D.x+=a.U*b*this.k.k.x;a.D.y+=a.U*b*this.k.k.y;a.N+=a.ca*b*this.k.C;c.D.x+=c.U*b*this.k.n.x;c.D.y+=c.U*b*this.k.n.y;c.N+=c.ca*b*this.k.H};
Ei.prototype.jg=function(){var a=this.ja,c=this.ka,b=0,e=0;this.H?b=Gi(this.H):b=this.T.ul();this.L?e=Gi(this.L):e=this.O.ul();b=-this.fa*(this.qa-(b+this.n*e));a.u.I.x+=a.U*b*this.k.k.x;a.u.I.y+=a.U*b*this.k.k.y;a.u.R+=a.ca*b*this.k.C;c.u.I.x+=c.U*b*this.k.n.x;c.u.I.y+=c.U*b*this.k.n.y;c.u.R+=c.ca*b*this.k.H;qg(a);qg(c);return!0};function Hi(){zi.call(this);this.type=6;this.L=this.H=null;this.xh=1}Nd(Hi,zi);Hi.prototype.C=function(){return new Ei(this)};
function Fi(){this.k=V(0,0);this.n=V(0,0)}Fi.prototype.Ja=function(){this.k.Ja();this.C=0;this.n.Ja();this.H=0};Fi.prototype.Set=function(a,c,b,e){void 0===c&&(c=0);void 0===e&&(e=0);this.k.W(a);this.C=c;this.n.W(b);this.H=e};
function Ii(a){xi.call(this,a);this.Ba=V(0,0);this.Ca=V(0,0);this.le=V(0,0);this.Ee=V(0,0);this.n=V(0,0);this.O=V(0,0);this.qa=new de;this.k=V(0,0);this.Ba.W(a.ea);this.Ca.W(a.xa);this.le.W(a.H);this.Ee.x=-this.le.y;this.Ee.y=this.le.x;this.k.Ja();this.Wa=this.Jb=0;this.Mc=a.qa;this.rd=a.Jb;this.dr=a.Ra;this.er=a.Va;this.Ti=a.L;this.zl=a.O;this.sb=0;this.n.Ja();this.O.Ja()}Nd(Ii,xi);
Ii.prototype.ul=function(){var a=this.ja,c=this.ka,b=lg(a,this.Ba),e=lg(c,this.Ca),c=e.x-b.x,b=e.y-b.y,a=Yd(a.K.F,this.le);return a.x*c+a.y*b};
Ii.prototype.ig=function(a){var c=this.ja,b=this.ka,e,d=0;this.lg.W(c.u.Y);this.mg.W(b.u.Y);var k=c.De();b.De();e=c.K.F;var f=this.Ba.x-this.lg.x,g=this.Ba.y-this.lg.y,d=e.A.x*f+e.B.x*g,g=e.A.y*f+e.B.y*g,f=d;e=b.K.F;var h=this.Ca.x-this.mg.x,l=this.Ca.y-this.mg.y,d=e.A.x*h+e.B.x*l,l=e.A.y*h+e.B.y*l,h=d;e=b.u.I.x+h-c.u.I.x-f;d=b.u.I.y+l-c.u.I.y-g;this.ea=c.U;this.xa=b.U;this.Ra=c.ca;this.Va=b.ca;this.n.W(Yd(k.F,this.le));this.C=(e+f)*this.n.y-(d+g)*this.n.x;this.H=h*this.n.y-l*this.n.x;this.Jb=this.ea+
this.xa+this.Ra*this.C*this.C+this.Va*this.H*this.H;this.Jb=this.Jb>Number.MIN_VALUE?1/this.Jb:0;this.O.W(Yd(k.F,this.Ee));this.L=(e+f)*this.O.y-(d+g)*this.O.x;this.T=h*this.O.y-l*this.O.x;k=this.ea;f=this.xa;g=this.Ra;h=this.Va;this.qa.A.x=k+f+g*this.L*this.L+h*this.T*this.T;this.qa.A.y=g*this.L*this.C+h*this.T*this.H;this.qa.B.x=this.qa.A.y;this.qa.B.y=k+f+g*this.C*this.C+h*this.H*this.H;this.Ti?(e=this.n.x*e+this.n.y*d,.01>Math.abs(this.rd-this.Mc)?this.sb=3:e<=this.Mc?1!=this.sb&&(this.sb=1,this.k.y=
0):e>=this.rd?2!=this.sb&&(this.sb=2,this.k.y=0):(this.sb=0,this.k.y=0)):this.sb=0;0==this.zl&&(this.Wa=0);a.Jh?(this.k.x*=a.Cc,this.k.y*=a.Cc,this.Wa*=a.Cc,a=this.k.x*this.O.x+(this.Wa+this.k.y)*this.n.x,e=this.k.x*this.O.y+(this.Wa+this.k.y)*this.n.y,d=this.k.x*this.L+(this.Wa+this.k.y)*this.C,k=this.k.x*this.T+(this.Wa+this.k.y)*this.H,c.D.x-=this.ea*a,c.D.y-=this.ea*e,c.N-=this.Ra*d,b.D.x+=this.xa*a,b.D.y+=this.xa*e,b.N+=this.Va*k):(this.k.Ja(),this.Wa=0)};
Ii.prototype.kg=function(a){var c=this.ja,b=this.ka,e=c.D,d=c.N,k=b.D,f=b.N,g=0,h=0,l=0,m=0;this.zl&&3!=this.sb&&(m=this.Jb*(this.er-(this.n.x*(k.x-e.x)+this.n.y*(k.y-e.y)+this.H*f-this.C*d)),g=this.Wa,h=a.Pa*this.dr,this.Wa=ce(this.Wa+m,-h,h),m=this.Wa-g,g=m*this.n.x,h=m*this.n.y,l=m*this.C,m*=this.H,e.x-=this.ea*g,e.y-=this.ea*h,d-=this.Ra*l,k.x+=this.xa*g,k.y+=this.xa*h,f+=this.Va*m);h=this.O.x*(k.x-e.x)+this.O.y*(k.y-e.y)+this.T*f-this.L*d;this.Ti&&0!=this.sb?(l=this.n.x*(k.x-e.x)+this.n.y*(k.y-
e.y)+this.H*f-this.C*d,g=this.k.Lc(),a=he(this.qa,V(0,0),-h,-l),this.k.hg(a),1==this.sb?this.k.y=Math.max(this.k.y,0):2==this.sb&&(this.k.y=Math.min(this.k.y,0)),h=-h-(this.k.y-g.y)*this.qa.B.x,l=0,l=0!=this.qa.A.x?h/this.qa.A.x+g.x:g.x,this.k.x=l,a.x=this.k.x-g.x,a.y=this.k.y-g.y,g=a.x*this.O.x+a.y*this.n.x,h=a.x*this.O.y+a.y*this.n.y,l=a.x*this.L+a.y*this.C,m=a.x*this.T+a.y*this.H):(a=0,a=0!=this.qa.A.x?-h/this.qa.A.x:0,this.k.x+=a,g=a*this.O.x,h=a*this.O.y,l=a*this.L,m=a*this.T);e.x-=this.ea*g;
e.y-=this.ea*h;d-=this.Ra*l;k.x+=this.xa*g;k.y+=this.xa*h;f+=this.Va*m;c.D.W(e);c.N=d;b.D.W(k);b.N=f};
Ii.prototype.jg=function(){var a=this.ja,c=this.ka,b=a.u.I,e=a.u.R,d=c.u.I,k=c.u.R,f,g=0,h=0,l=0,m=0,n=f=0,q=0,h=!1,p=0,u=ee(e),l=ee(k);f=u;var q=this.Ba.x-this.lg.x,t=this.Ba.y-this.lg.y,g=f.A.x*q+f.B.x*t,t=f.A.y*q+f.B.y*t,q=g;f=l;l=this.Ca.x-this.mg.x;m=this.Ca.y-this.mg.y;g=f.A.x*l+f.B.x*m;m=f.A.y*l+f.B.y*m;l=g;f=d.x+l-b.x-q;g=d.y+m-b.y-t;if(this.Ti){this.n=Yd(u,this.le);this.C=(f+q)*this.n.y-(g+t)*this.n.x;this.H=l*this.n.y-m*this.n.x;var r=this.n.x*f+this.n.y*g;.01>Math.abs(this.rd-this.Mc)?
(p=ce(r,-.2,.2),n=Math.abs(r),h=!0):r<=this.Mc?(p=ce(r-this.Mc+.005,-.2,0),n=this.Mc-r,h=!0):r>=this.rd&&(p=ce(r-this.rd+.005,0,.2),n=r-this.rd,h=!0)}this.O=Yd(u,this.Ee);this.L=(f+q)*this.O.y-(g+t)*this.O.x;this.T=l*this.O.y-m*this.O.x;u=V(0,0);t=this.O.x*f+this.O.y*g;n=Math.max(n,Math.abs(t));q=0;h?(h=this.ea,l=this.xa,m=this.Ra,f=this.Va,this.qa.A.x=h+l+m*this.L*this.L+f*this.T*this.T,this.qa.A.y=m*this.L*this.C+f*this.T*this.H,this.qa.B.x=this.qa.A.y,this.qa.B.y=h+l+m*this.C*this.C+f*this.H*this.H,
he(this.qa,u,-t,-p)):(h=this.ea,l=this.xa,m=this.Ra,f=this.Va,p=h+l+m*this.L*this.L+f*this.T*this.T,u.x=0!=p?-t/p:0,u.y=0);p=u.x*this.O.x+u.y*this.n.x;h=u.x*this.O.y+u.y*this.n.y;t=u.x*this.L+u.y*this.C;u=u.x*this.T+u.y*this.H;b.x-=this.ea*p;b.y-=this.ea*h;e-=this.Ra*t;d.x+=this.xa*p;d.y+=this.xa*h;k+=this.Va*u;a.u.R=e;c.u.R=k;qg(a);qg(c);return.005>=n&&q<=Od};
function Ji(){zi.call(this);this.ea=V(0,0);this.xa=V(0,0);this.H=V(0,0);this.type=7;this.H.Set(1,0);this.L=!1;this.Jb=this.qa=0;this.O=!1;this.Va=this.Ra=0}Nd(Ji,zi);Ji.prototype.C=function(){return new Ii(this)};
function Ki(a){xi.call(this,a);this.Ba=V(0,0);this.Ca=V(0,0);this.le=V(0,0);this.Ee=V(0,0);this.O=V(0,0);this.qa=V(0,0);this.n=new ye;this.k=new ze(0,0,0);this.Ba.W(a.ea);this.Ca.W(a.xa);this.le.W(a.H);this.Ee.x=-this.le.y;this.Ee.y=this.le.x;this.gB=a.Jb;this.k.Ja();this.Wa=this.Jb=0;this.Mc=a.qa;this.rd=a.Wa;this.dr=a.Ra;this.er=a.Va;this.Ti=a.L;this.zl=a.O;this.sb=0;this.O.Ja();this.qa.Ja()}Nd(Ki,xi);
Ki.prototype.ul=function(){var a=this.ja,c=this.ka,b=lg(a,this.Ba),e=lg(c,this.Ca),c=e.x-b.x,b=e.y-b.y,a=Yd(a.K.F,this.le);return a.x*c+a.y*b};
Ki.prototype.ig=function(a){var c=this.ja,b=this.ka,e,d=0;this.lg.W(c.u.Y);this.mg.W(b.u.Y);var k=c.De();b.De();e=c.K.F;var f=this.Ba.x-this.lg.x,g=this.Ba.y-this.lg.y,d=e.A.x*f+e.B.x*g,g=e.A.y*f+e.B.y*g,f=d;e=b.K.F;var h=this.Ca.x-this.mg.x,l=this.Ca.y-this.mg.y,d=e.A.x*h+e.B.x*l,l=e.A.y*h+e.B.y*l,h=d;e=b.u.I.x+h-c.u.I.x-f;d=b.u.I.y+l-c.u.I.y-g;this.ea=c.U;this.xa=b.U;this.Ra=c.ca;this.Va=b.ca;this.O.W(Yd(k.F,this.le));this.C=(e+f)*this.O.y-(d+g)*this.O.x;this.H=h*this.O.y-l*this.O.x;this.Jb=this.ea+
this.xa+this.Ra*this.C*this.C+this.Va*this.H*this.H;this.Jb>Number.MIN_VALUE&&(this.Jb=1/this.Jb);this.qa.W(Yd(k.F,this.Ee));this.L=(e+f)*this.qa.y-(d+g)*this.qa.x;this.T=h*this.qa.y-l*this.qa.x;k=this.ea;f=this.xa;g=this.Ra;h=this.Va;this.n.A.x=k+f+g*this.L*this.L+h*this.T*this.T;this.n.A.y=g*this.L+h*this.T;this.n.A.z=g*this.L*this.C+h*this.T*this.H;this.n.B.x=this.n.A.y;this.n.B.y=g+h;this.n.B.z=g*this.C+h*this.H;this.n.k.x=this.n.A.z;this.n.k.y=this.n.B.z;this.n.k.z=k+f+g*this.C*this.C+h*this.H*
this.H;this.Ti?(e=this.O.x*e+this.O.y*d,.01>Math.abs(this.rd-this.Mc)?this.sb=3:e<=this.Mc?1!=this.sb&&(this.sb=1,this.k.z=0):e>=this.rd?2!=this.sb&&(this.sb=2,this.k.z=0):(this.sb=0,this.k.z=0)):this.sb=0;0==this.zl&&(this.Wa=0);a.Jh?(this.k.x*=a.Cc,this.k.y*=a.Cc,this.Wa*=a.Cc,a=this.k.x*this.qa.x+(this.Wa+this.k.z)*this.O.x,e=this.k.x*this.qa.y+(this.Wa+this.k.z)*this.O.y,d=this.k.x*this.L+this.k.y+(this.Wa+this.k.z)*this.C,k=this.k.x*this.T+this.k.y+(this.Wa+this.k.z)*this.H,c.D.x-=this.ea*a,
c.D.y-=this.ea*e,c.N-=this.Ra*d,b.D.x+=this.xa*a,b.D.y+=this.xa*e,b.N+=this.Va*k):(this.k.Ja(),this.Wa=0)};
Ki.prototype.kg=function(a){var c=this.ja,b=this.ka,e=c.D,d=c.N,k=b.D,f=b.N,g=0,h=0,l=0,m=0;this.zl&&3!=this.sb&&(m=this.Jb*(this.er-(this.O.x*(k.x-e.x)+this.O.y*(k.y-e.y)+this.H*f-this.C*d)),g=this.Wa,a=a.Pa*this.dr,this.Wa=ce(this.Wa+m,-a,a),m=this.Wa-g,g=m*this.O.x,h=m*this.O.y,l=m*this.C,m*=this.H,e.x-=this.ea*g,e.y-=this.ea*h,d-=this.Ra*l,k.x+=this.xa*g,k.y+=this.xa*h,f+=this.Va*m);l=this.qa.x*(k.x-e.x)+this.qa.y*(k.y-e.y)+this.T*f-this.L*d;h=f-d;this.Ti&&0!=this.sb?(a=this.O.x*(k.x-e.x)+this.O.y*
(k.y-e.y)+this.H*f-this.C*d,g=this.k.Lc(),a=Be(this.n,new ze(0,0,0),-l,-h,-a),this.k.hg(a),1==this.sb?this.k.z=Math.max(this.k.z,0):2==this.sb&&(this.k.z=Math.min(this.k.z,0)),l=-l-(this.k.z-g.z)*this.n.k.x,h=-h-(this.k.z-g.z)*this.n.k.y,h=Ae(this.n,V(0,0),l,h),h.x+=g.x,h.y+=g.y,this.k.x=h.x,this.k.y=h.y,a.x=this.k.x-g.x,a.y=this.k.y-g.y,a.z=this.k.z-g.z,g=a.x*this.qa.x+a.z*this.O.x,h=a.x*this.qa.y+a.z*this.O.y,l=a.x*this.L+a.y+a.z*this.C,m=a.x*this.T+a.y+a.z*this.H,e.x-=this.ea*g,e.y-=this.ea*h,
d-=this.Ra*l,k.x+=this.xa*g,k.y+=this.xa*h,f+=this.Va*m):(a=Ae(this.n,V(0,0),-l,-h),this.k.x+=a.x,this.k.y+=a.y,g=a.x*this.qa.x,h=a.x*this.qa.y,l=a.x*this.L+a.y,m=a.x*this.T+a.y,e.x-=this.ea*g,e.y-=this.ea*h,d-=this.Ra*l,k.x+=this.xa*g,k.y+=this.xa*h,f+=this.Va*m);c.D.W(e);c.N=d;b.D.W(k);b.N=f};
Ki.prototype.jg=function(){var a=this.ja,c=this.ka,b=a.u.I,e=a.u.R,d=c.u.I,k=c.u.R,f,g=0,h=0,l=0,m=g=f=0,n=0,h=!1,q=0,p=ee(e),u=ee(k);f=p;var n=this.Ba.x-this.lg.x,t=this.Ba.y-this.lg.y,g=f.A.x*n+f.B.x*t,t=f.A.y*n+f.B.y*t,n=g;f=u;u=this.Ca.x-this.mg.x;l=this.Ca.y-this.mg.y;g=f.A.x*u+f.B.x*l;l=f.A.y*u+f.B.y*l;u=g;f=d.x+u-b.x-n;g=d.y+l-b.y-t;if(this.Ti){this.O=Yd(p,this.le);this.C=(f+n)*this.O.y-(g+t)*this.O.x;this.H=u*this.O.y-l*this.O.x;var r=this.O.x*f+this.O.y*g;.01>Math.abs(this.rd-this.Mc)?(q=
ce(r,-.2,.2),m=Math.abs(r),h=!0):r<=this.Mc?(q=ce(r-this.Mc+.005,-.2,0),m=this.Mc-r,h=!0):r>=this.rd&&(q=ce(r-this.rd+.005,0,.2),m=r-this.rd,h=!0)}this.qa=Yd(p,this.Ee);this.L=(f+n)*this.qa.y-(g+t)*this.qa.x;this.T=u*this.qa.y-l*this.qa.x;p=new ze(0,0,0);t=this.qa.x*f+this.qa.y*g;u=k-e-this.gB;m=Math.max(m,Math.abs(t));n=Math.abs(u);h?(h=this.ea,l=this.xa,f=this.Ra,g=this.Va,this.n.A.x=h+l+f*this.L*this.L+g*this.T*this.T,this.n.A.y=f*this.L+g*this.T,this.n.A.z=f*this.L*this.C+g*this.T*this.H,this.n.B.x=
this.n.A.y,this.n.B.y=f+g,this.n.B.z=f*this.C+g*this.H,this.n.k.x=this.n.A.z,this.n.k.y=this.n.B.z,this.n.k.z=h+l+f*this.C*this.C+g*this.H*this.H,Be(this.n,p,-t,-u,-q)):(h=this.ea,l=this.xa,f=this.Ra,g=this.Va,q=f*this.L+g*this.T,r=f+g,this.n.A.Set(h+l+f*this.L*this.L+g*this.T*this.T,q,0),this.n.B.Set(q,r,0),q=Ae(this.n,V(0,0),-t,-u),p.x=q.x,p.y=q.y,p.z=0);q=p.x*this.qa.x+p.z*this.O.x;h=p.x*this.qa.y+p.z*this.O.y;t=p.x*this.L+p.y+p.z*this.C;p=p.x*this.T+p.y+p.z*this.H;b.x-=this.ea*q;b.y-=this.ea*
h;e-=this.Ra*t;d.x+=this.xa*q;d.y+=this.xa*h;k+=this.Va*p;a.u.R=e;c.u.R=k;qg(a);qg(c);return.005>=m&&n<=Od};function Li(){zi.call(this);this.ea=V(0,0);this.xa=V(0,0);this.H=V(0,0);this.type=2;this.H.Set(1,0);this.Jb=0;this.L=!1;this.Wa=this.qa=0;this.O=!1;this.Va=this.Ra=0}Nd(Li,zi);Li.prototype.C=function(){return new Ki(this)};
function Mi(a){xi.call(this,a);this.ea=V(0,0);this.xa=V(0,0);this.Ba=V(0,0);this.Ca=V(0,0);this.k=V(0,0);this.n=V(0,0);this.L=this.ja.Qd.dE;this.ea.x=a.H.x-this.L.K.position.x;this.ea.y=a.H.y-this.L.K.position.y;this.xa.x=a.L.x-this.L.K.position.x;this.xa.y=a.L.y-this.L.K.position.y;this.Ba.W(a.O);this.Ca.W(a.ea);this.C=a.xh;this.Va=0+0*this.C;this.rd=Math.min(0,this.Va-this.C*Ni);this.Ee=Math.min(0,(this.Va-Ni)/this.C);this.O=this.T=this.H=0}Nd(Mi,xi);
Mi.prototype.ig=function(a){var c=this.ja,b=this.ka,e;e=c.K.F;var d=this.Ba.x-c.u.Y.x,k=this.Ba.y-c.u.Y.y,f=e.A.x*d+e.B.x*k,k=e.A.y*d+e.B.y*k,d=f;e=b.K.F;var g=this.Ca.x-b.u.Y.x,h=this.Ca.y-b.u.Y.y,f=e.A.x*g+e.B.x*h,h=e.A.y*g+e.B.y*h,g=f;e=b.u.I.x+g;var f=b.u.I.y+h,l=this.L.K.position.x+this.xa.x,m=this.L.K.position.y+this.xa.y;this.k.Set(c.u.I.x+d-(this.L.K.position.x+this.ea.x),c.u.I.y+k-(this.L.K.position.y+this.ea.y));this.n.Set(e-l,f-m);e=He(this.k);f=He(this.n);.005<e?this.k.Te(1/e):this.k.Ja();
.005<f?this.n.Te(1/f):this.n.Ja();0<this.Va-e-this.C*f?this.H=this.Mc=0:this.Mc=2;e<this.rd?this.T=this.Wa=0:this.Wa=2;f<this.Ee?this.O=this.sb=0:this.sb=2;e=d*this.k.y-k*this.k.x;f=g*this.n.y-h*this.n.x;this.qa=c.U+c.ca*e*e;this.Ra=b.U+b.ca*f*f;this.Jb=this.qa+this.C*this.C*this.Ra;this.qa=1/this.qa;this.Ra=1/this.Ra;this.Jb=1/this.Jb;a.Jh?(this.H*=a.Cc,this.T*=a.Cc,this.O*=a.Cc,a=(-this.H-this.T)*this.k.x,e=(-this.H-this.T)*this.k.y,f=(-this.C*this.H-this.O)*this.n.x,l=(-this.C*this.H-this.O)*this.n.y,
c.D.x+=c.U*a,c.D.y+=c.U*e,c.N+=c.ca*(d*e-k*a),b.D.x+=b.U*f,b.D.y+=b.U*l,b.N+=b.ca*(g*l-h*f)):this.O=this.T=this.H=0};
Mi.prototype.kg=function(){var a=this.ja,c=this.ka,b;b=a.K.F;var e=this.Ba.x-a.u.Y.x,d=this.Ba.y-a.u.Y.y,k=b.A.x*e+b.B.x*d,d=b.A.y*e+b.B.y*d,e=k;b=c.K.F;var f=this.Ca.x-c.u.Y.x,g=this.Ca.y-c.u.Y.y,k=b.A.x*f+b.B.x*g,g=b.A.y*f+b.B.y*g,f=k,h=k=b=0,l=0;b=l=b=l=h=k=b=0;2==this.Mc&&(b=a.D.x+-a.N*d,k=a.D.y+a.N*e,h=c.D.x+-c.N*g,l=c.D.y+c.N*f,b=-(this.k.x*b+this.k.y*k)-this.C*(this.n.x*h+this.n.y*l),l=this.Jb*-b,b=this.H,this.H=Math.max(0,this.H+l),l=this.H-b,b=-l*this.k.x,k=-l*this.k.y,h=-this.C*l*this.n.x,
l=-this.C*l*this.n.y,a.D.x+=a.U*b,a.D.y+=a.U*k,a.N+=a.ca*(e*k-d*b),c.D.x+=c.U*h,c.D.y+=c.U*l,c.N+=c.ca*(f*l-g*h));2==this.Wa&&(b=a.D.x+-a.N*d,k=a.D.y+a.N*e,b=-(this.k.x*b+this.k.y*k),l=-this.qa*b,b=this.T,this.T=Math.max(0,this.T+l),l=this.T-b,b=-l*this.k.x,k=-l*this.k.y,a.D.x+=a.U*b,a.D.y+=a.U*k,a.N+=a.ca*(e*k-d*b));2==this.sb&&(h=c.D.x+-c.N*g,l=c.D.y+c.N*f,b=-(this.n.x*h+this.n.y*l),l=-this.Ra*b,b=this.O,this.O=Math.max(0,this.O+l),l=this.O-b,h=-l*this.n.x,l=-l*this.n.y,c.D.x+=c.U*h,c.D.y+=c.U*
l,c.N+=c.ca*(f*l-g*h))};
Mi.prototype.jg=function(){var a=this.ja,c=this.ka,b,e=this.L.K.position.x+this.ea.x,d=this.L.K.position.y+this.ea.y,k=this.L.K.position.x+this.xa.x,f=this.L.K.position.y+this.xa.y,g=0,h=0,l=0,m=0,n=b=0,q=0,p=0,u=n=p=b=n=b=0;2==this.Mc&&(b=a.K.F,g=this.Ba.x-a.u.Y.x,h=this.Ba.y-a.u.Y.y,n=b.A.x*g+b.B.x*h,h=b.A.y*g+b.B.y*h,g=n,b=c.K.F,l=this.Ca.x-c.u.Y.x,m=this.Ca.y-c.u.Y.y,n=b.A.x*l+b.B.x*m,m=b.A.y*l+b.B.y*m,l=n,b=a.u.I.x+g,n=a.u.I.y+h,q=c.u.I.x+l,p=c.u.I.y+m,this.k.Set(b-e,n-d),this.n.Set(q-k,p-f),
b=He(this.k),n=He(this.n),.005<b?this.k.Te(1/b):this.k.Ja(),.005<n?this.n.Te(1/n):this.n.Ja(),b=this.Va-b-this.C*n,u=Math.max(u,-b),b=ce(b+.005,-.2,0),p=-this.Jb*b,b=-p*this.k.x,n=-p*this.k.y,q=-this.C*p*this.n.x,p=-this.C*p*this.n.y,a.u.I.x+=a.U*b,a.u.I.y+=a.U*n,a.u.R+=a.ca*(g*n-h*b),c.u.I.x+=c.U*q,c.u.I.y+=c.U*p,c.u.R+=c.ca*(l*p-m*q),qg(a),qg(c));2==this.Wa&&(b=a.K.F,g=this.Ba.x-a.u.Y.x,h=this.Ba.y-a.u.Y.y,n=b.A.x*g+b.B.x*h,h=b.A.y*g+b.B.y*h,g=n,b=a.u.I.x+g,n=a.u.I.y+h,this.k.Set(b-e,n-d),b=He(this.k),
.005<b?(this.k.x*=1/b,this.k.y*=1/b):this.k.Ja(),b=this.rd-b,u=Math.max(u,-b),b=ce(b+.005,-.2,0),p=-this.qa*b,b=-p*this.k.x,n=-p*this.k.y,a.u.I.x+=a.U*b,a.u.I.y+=a.U*n,a.u.R+=a.ca*(g*n-h*b),qg(a));2==this.sb&&(b=c.K.F,l=this.Ca.x-c.u.Y.x,m=this.Ca.y-c.u.Y.y,n=b.A.x*l+b.B.x*m,m=b.A.y*l+b.B.y*m,l=n,q=c.u.I.x+l,p=c.u.I.y+m,this.n.Set(q-k,p-f),n=He(this.n),.005<n?(this.n.x*=1/n,this.n.y*=1/n):this.n.Ja(),b=this.Ee-n,u=Math.max(u,-b),b=ce(b+.005,-.2,0),p=-this.Ra*b,q=-p*this.n.x,p=-p*this.n.y,c.u.I.x+=
c.U*q,c.u.I.y+=c.U*p,c.u.R+=c.ca*(l*p-m*q),qg(c));return.005>u};var Ni=1;function Qi(){zi.call(this);this.H=V(0,0);this.L=V(0,0);this.O=V(0,0);this.ea=V(0,0);this.type=4;this.H.Set(-1,1);this.L.Set(1,1);this.O.Set(-1,0);this.ea.Set(1,0);this.xh=1;this.T=!0}Nd(Qi,zi);Qi.prototype.C=function(){return new Mi(this)};
function Ri(a){xi.call(this,a);this.qa=new de;this.O=new de;this.ea=new de;this.xa=new de;this.n=new ze(0,0,0);this.H=V(0,0);this.T=V(0,0);this.Ba=V(0,0);this.Ca=V(0,0);this.k=new ze(0,0,0);this.fa=new ye;this.Ba.W(a.H);this.Ca.W(a.L);this.Wa=a.ea;this.k.Ja();this.L=0;this.Ra=a.xa;this.sb=a.qa;this.Ee=a.Jb;this.rd=a.Va;this.Va=a.O;this.Mc=a.Ra;this.C=0}Nd(Ri,xi);function Gi(a){return a.ka.u.R-a.ja.u.R-a.Wa}
Ri.prototype.ig=function(a){var c=this.ja,b=this.ka,e,d=0;e=c.K.F;var k=this.Ba.x-c.u.Y.x,f=this.Ba.y-c.u.Y.y,d=e.A.x*k+e.B.x*f,f=e.A.y*k+e.B.y*f,k=d;e=b.K.F;var g=this.Ca.x-b.u.Y.x,h=this.Ca.y-b.u.Y.y,d=e.A.x*g+e.B.x*h,h=e.A.y*g+e.B.y*h,g=d;e=c.U;var d=b.U,l=c.ca,m=b.ca;this.fa.A.x=e+d+f*f*l+h*h*m;this.fa.B.x=-f*k*l-h*g*m;this.fa.k.x=-f*l-h*m;this.fa.A.y=this.fa.B.x;this.fa.B.y=e+d+k*k*l+g*g*m;this.fa.k.y=k*l+g*m;this.fa.A.z=this.fa.k.x;this.fa.B.z=this.fa.k.y;this.fa.k.z=l+m;this.Jb=1/(l+m);this.Mc||
(this.L=0);if(this.Va){var n=b.u.R-c.u.R-this.Wa;Math.abs(this.sb-this.Ra)<2*Od?this.C=3:n<=this.Ra?(1!=this.C&&(this.k.z=0),this.C=1):n>=this.sb?(2!=this.C&&(this.k.z=0),this.C=2):(this.C=0,this.k.z=0)}else this.C=0;a.Jh?(this.k.x*=a.Cc,this.k.y*=a.Cc,this.L*=a.Cc,a=this.k.x,n=this.k.y,c.D.x-=e*a,c.D.y-=e*n,c.N-=l*(k*n-f*a+this.L+this.k.z),b.D.x+=d*a,b.D.y+=d*n,b.N+=m*(g*n-h*a+this.L+this.k.z)):(this.k.Ja(),this.L=0)};
Ri.prototype.kg=function(a){var c=this.ja,b=this.ka,e=0,d=e=0,k=0,f=0,g=0,h=c.D,l=c.N,m=b.D,n=b.N,q=c.U,p=b.U,u=c.ca,t=b.ca;this.Mc&&3!=this.C&&(d=this.Jb*-(n-l-this.rd),k=this.L,f=a.Pa*this.Ee,this.L=ce(this.L+d,-f,f),d=this.L-k,l-=u*d,n+=t*d);if(this.Va&&0!=this.C){a=c.K.F;d=this.Ba.x-c.u.Y.x;k=this.Ba.y-c.u.Y.y;e=a.A.x*d+a.B.x*k;k=a.A.y*d+a.B.y*k;d=e;a=b.K.F;f=this.Ca.x-b.u.Y.x;g=this.Ca.y-b.u.Y.y;e=a.A.x*f+a.B.x*g;g=a.A.y*f+a.B.y*g;f=e;a=m.x+-n*g-h.x- -l*k;var r=m.y+n*f-h.y-l*d;Be(this.fa,this.n,
-a,-r,-(n-l));3==this.C?this.k.hg(this.n):1==this.C?(e=this.k.z+this.n.z,0>e&&(Ae(this.fa,this.T,-a,-r),this.n.x=this.T.x,this.n.y=this.T.y,this.n.z=-this.k.z,this.k.x+=this.T.x,this.k.y+=this.T.y,this.k.z=0)):2==this.C&&(e=this.k.z+this.n.z,0<e&&(Ae(this.fa,this.T,-a,-r),this.n.x=this.T.x,this.n.y=this.T.y,this.n.z=-this.k.z,this.k.x+=this.T.x,this.k.y+=this.T.y,this.k.z=0));h.x-=q*this.n.x;h.y-=q*this.n.y;l-=u*(d*this.n.y-k*this.n.x+this.n.z);m.x+=p*this.n.x;m.y+=p*this.n.y;n+=t*(f*this.n.y-g*this.n.x+
this.n.z)}else a=c.K.F,d=this.Ba.x-c.u.Y.x,k=this.Ba.y-c.u.Y.y,e=a.A.x*d+a.B.x*k,k=a.A.y*d+a.B.y*k,d=e,a=b.K.F,f=this.Ca.x-b.u.Y.x,g=this.Ca.y-b.u.Y.y,e=a.A.x*f+a.B.x*g,g=a.A.y*f+a.B.y*g,f=e,Ae(this.fa,this.H,-(m.x+-n*g-h.x- -l*k),-(m.y+n*f-h.y-l*d)),this.k.x+=this.H.x,this.k.y+=this.H.y,h.x-=q*this.H.x,h.y-=q*this.H.y,l-=u*(d*this.H.y-k*this.H.x),m.x+=p*this.H.x,m.y+=p*this.H.y,n+=t*(f*this.H.y-g*this.H.x);c.D.W(h);c.N=l;b.D.W(m);b.N=n};
Ri.prototype.jg=function(){var a=0,c,b=this.ja,e=this.ka,d=0,k=c=0,f=0,k=0;if(this.Va&&0!=this.C){var a=e.u.R-b.u.R-this.Wa,g=0;3==this.C?(a=ce(a-this.Ra,-Qd,Qd),g=-this.Jb*a,d=Math.abs(a)):1==this.C?(a-=this.Ra,d=-a,a=ce(a+Od,-Qd,0),g=-this.Jb*a):2==this.C&&(d=a-=this.sb,a=ce(a-Od,0,Qd),g=-this.Jb*a);b.u.R-=b.ca*g;e.u.R+=e.ca*g;qg(b);qg(e)}c=b.K.F;g=this.Ba.x-b.u.Y.x;a=this.Ba.y-b.u.Y.y;k=c.A.x*g+c.B.x*a;a=c.A.y*g+c.B.y*a;g=k;c=e.K.F;var h=this.Ca.x-e.u.Y.x,l=this.Ca.y-e.u.Y.y,k=c.A.x*h+c.B.x*l,
l=c.A.y*h+c.B.y*l,h=k,f=e.u.I.x+h-b.u.I.x-g,k=e.u.I.y+l-b.u.I.y-a,m=f*f+k*k;c=Math.sqrt(m);var n=b.U,q=e.U,p=b.ca,u=e.ca;m>.05*.05&&(m=1/(n+q),f=m*-f,k=m*-k,b.u.I.x-=.5*n*f,b.u.I.y-=.5*n*k,e.u.I.x+=.5*q*f,e.u.I.y+=.5*q*k,f=e.u.I.x+h-b.u.I.x-g,k=e.u.I.y+l-b.u.I.y-a);this.O.A.x=n+q;this.O.B.x=0;this.O.A.y=0;this.O.B.y=n+q;this.ea.A.x=p*a*a;this.ea.B.x=-p*g*a;this.ea.A.y=-p*g*a;this.ea.B.y=p*g*g;this.xa.A.x=u*l*l;this.xa.B.x=-u*h*l;this.xa.A.y=-u*h*l;this.xa.B.y=u*h*h;fe(this.qa,this.O);n=this.qa;q=
this.ea;n.A.hg(q.A);n.B.hg(q.B);n=this.qa;q=this.xa;n.A.hg(q.A);n.B.hg(q.B);he(this.qa,Si,-f,-k);f=Si.x;k=Si.y;b.u.I.x-=b.U*f;b.u.I.y-=b.U*k;b.u.R-=b.ca*(g*k-a*f);e.u.I.x+=e.U*f;e.u.I.y+=e.U*k;e.u.R+=e.ca*(h*k-l*f);qg(b);qg(e);return.005>=c&&d<=Od};var Si=V(0,0);function Ti(){zi.call(this);this.H=V(0,0);this.L=V(0,0);this.type=1;this.H.Ja();this.L.Ja();this.Va=this.Jb=this.qa=this.xa=this.ea=0;this.Ra=this.O=!1}Nd(Ti,zi);
function Ui(a,c,b,e){a.k=c;a.n=b;a.H=ae(a.k.K,e);a.L=ae(a.n.K,e);a.ea=a.n.Pi()-a.k.Pi()}Ti.prototype.C=function(){return new Ri(this)};function Vi(a){xi.call(this,a);this.n=V(0,0);this.C=V(0,0);this.k=new ze(0,0,0);this.fa=new ye;this.n.W(a.H);this.C.W(a.L);this.H=a.O}Nd(Vi,xi);
Vi.prototype.ig=function(a){var c,b=0,e=this.ja,d=this.ka;c=e.K.F;var k=this.n.x-e.u.Y.x,f=this.n.y-e.u.Y.y,b=c.A.x*k+c.B.x*f,f=c.A.y*k+c.B.y*f,k=b;c=d.K.F;var g=this.C.x-d.u.Y.x,h=this.C.y-d.u.Y.y,b=c.A.x*g+c.B.x*h,h=c.A.y*g+c.B.y*h,g=b;c=e.U;var b=d.U,l=e.ca,m=d.ca;this.fa.A.x=c+b+f*f*l+h*h*m;this.fa.B.x=-f*k*l-h*g*m;this.fa.k.x=-f*l-h*m;this.fa.A.y=this.fa.B.x;this.fa.B.y=c+b+k*k*l+g*g*m;this.fa.k.y=k*l+g*m;this.fa.A.z=this.fa.k.x;this.fa.B.z=this.fa.k.y;this.fa.k.z=l+m;a.Jh?(this.k.x*=a.Cc,this.k.y*=
a.Cc,this.k.z*=a.Cc,e.D.x-=c*this.k.x,e.D.y-=c*this.k.y,e.N-=l*(k*this.k.y-f*this.k.x+this.k.z),d.D.x+=b*this.k.x,d.D.y+=b*this.k.y,d.N+=m*(g*this.k.y-h*this.k.x+this.k.z)):this.k.Ja()};
Vi.prototype.kg=function(){var a,c=0,b=this.ja,e=this.ka,d=b.D,k=b.N,f=e.D,g=e.N,h=b.U,l=e.U,m=b.ca,n=e.ca;a=b.K.F;var q=this.n.x-b.u.Y.x,p=this.n.y-b.u.Y.y,c=a.A.x*q+a.B.x*p,p=a.A.y*q+a.B.y*p,q=c;a=e.K.F;var u=this.C.x-e.u.Y.x,t=this.C.y-e.u.Y.y,c=a.A.x*u+a.B.x*t,t=a.A.y*u+a.B.y*t,u=c;a=new ze(0,0,0);Be(this.fa,a,-(f.x-g*t-d.x+k*p),-(f.y+g*u-d.y-k*q),-(g-k));this.k.hg(a);d.x-=h*a.x;d.y-=h*a.y;k-=m*(q*a.y-p*a.x+a.z);f.x+=l*a.x;f.y+=l*a.y;g+=n*(u*a.y-t*a.x+a.z);b.N=k;e.N=g};
Vi.prototype.jg=function(){var a,c=0,b=this.ja,e=this.ka;a=b.K.F;var d=this.n.x-b.u.Y.x,k=this.n.y-b.u.Y.y,c=a.A.x*d+a.B.x*k,k=a.A.y*d+a.B.y*k,d=c;a=e.K.F;var f=this.C.x-e.u.Y.x,g=this.C.y-e.u.Y.y,c=a.A.x*f+a.B.x*g,g=a.A.y*f+a.B.y*g,f=c;a=b.U;var c=e.U,h=b.ca,l=e.ca,m=e.u.I.x+f-b.u.I.x-d,n=e.u.I.y+g-b.u.I.y-k,q=e.u.R-b.u.R-this.H,p=Math.sqrt(m*m+n*n),u=Math.abs(q);.05<p&&(h*=1,l*=1);this.fa.A.x=a+c+k*k*h+g*g*l;this.fa.B.x=-k*d*h-g*f*l;this.fa.k.x=-k*h-g*l;this.fa.A.y=this.fa.B.x;this.fa.B.y=a+c+d*
d*h+f*f*l;this.fa.k.y=d*h+f*l;this.fa.A.z=this.fa.k.x;this.fa.B.z=this.fa.k.y;this.fa.k.z=h+l;var t=new ze(0,0,0);Be(this.fa,t,-m,-n,-q);b.u.I.x-=a*t.x;b.u.I.y-=a*t.y;b.u.R-=h*(d*t.y-k*t.x+t.z);e.u.I.x+=c*t.x;e.u.I.y+=c*t.y;e.u.R+=l*(f*t.y-g*t.x+t.z);qg(b);qg(e);return.005>=p&&u<=Od};function Wi(){zi.call(this);this.H=V(0,0);this.L=V(0,0);this.type=8;this.O=0}Nd(Wi,zi);Wi.prototype.C=function(){return new Vi(this)};
var Vh=[new Xe,new Xe],oi=[new Xe,new Xe],pi=[new Xe,new Xe],Wh=V(0,0),ai=V(0,0),fi=V(0,0),ii=V(0,0),gi=V(0,0),hi=V(0,0),mi=V(0,0),ni=V(0,0),ph=0,vh=0,wh=0,th=0,uh=0,qh=new Wf,rh=new kf,Qf=new De,Rf=new De,Jf=new function(){this.Ma=V(0,0);this.k=V(0,0)},sh=new lf,pg=new De,Ig=new Gg;new function(){this.position=V(0,0);V(0,0);V(0,0);this.id=new Se};new De;
var xh=new Ce,yh=new Ce,oh=new Xf,Sh=new function(){this.k=V(0,0);this.Ga=[];for(var a=this.lc=0;2>a;a++)this.Ga[a]=V(0,0)},Uh=new function(){this.k=V(0,0);this.n=[];this.Ga=[];for(var a=0;2>a;a++)this.Ga[a]=V(0,0)};function Xi(a,c,b,e,d,k){var f;if(f=(b+.1>=a&&a>=d-.1||b-.1<=a&&a<=d+.1)&&(e+.1>=c&&c>=k-.1||e-.1<=c&&c<=k+.1))f=.1<Math.abs(d-b)?.1>Math.abs((k-e)/(d-b)*(a-b)+e-c):.1>Math.abs(a-b);return f}
function Yi(a,c){var b=Zi(a),e=[],d,k,f,g,h,l,m,n,q;h=0;for(l=b.length;h<l;h++){k=b[h];d=[];d.length=k.length;m=q=0;for(n=k.length;m<n;m++)f=k[m],g=k[(m+1)%n],q+=f.x*g.y-f.y*g.x,d[m]=V(f.x,f.y);q=Math.abs(q/2);q>=.001*c&&e.push(d)}return e}
function Zi(a){var c=[],b=0,e=0,d=0,k=0,f=0,g=f=0,h=0,l=0,m=0,k=0,n,q,p,u,t,r=k=b=0,v=0,d=[],h=[],y=!1,A=[],F=[];for(F.push(a);F.length;){c=F[0];e=c.length;y=!0;for(b=0;b<e;b++)if(l=b,m=b<e-1?b+1:b+1-e,k=b<e-2?b+2:b+2-e,a=c[l],n=c[m],q=c[k],k=a.x,d=a.y,h=n.x,f=n.y,g=q.x,q=q.y,k=k*f+h*q+g*d-d*h-f*g-q*k,0>k){y=!1;h=1E9;for(d=0;d<e;d++)if(d!==l&&d!==m){b=d;k=d<e-1?d+1:0;p=c[b];u=c[k];g=a.x;q=a.y;var D=n.x,G=n.y,f=p.x;p=p.y;var z=u.x;u=u.y;var w=D-g,B=G-q,L=z-f,W=u-p,L=(L*(p-q)-W*(f-g))/(B*L-w*W),w=g+
L*w,B=q+L*B,g=Xi(D,G,g,q,w,B),f=Xi(w,B,f,p,z,u);if(q=g&&f?V(w,B):null)f=n.x-q.x,g=n.y-q.y,f=f*f+g*g,f<h&&(v=b,r=k,t=q,h=f)}if(1E9===h)return[];d=[];h=[];b=v;k=r;p=c[b];u=c[k];r=t.y;v=u.y;.1>Math.abs(u.x-t.x)&&.1>Math.abs(v-r)||d.push(t);r=t.y;v=p.y;.1>Math.abs(p.x-t.x)&&.1>Math.abs(v-r)||h.push(t);v=-1;for(r=l;;){if(r!==k)d.push(c[r]);else{if(0>v||v>=e)return[];Xi(u.x,u.y,c[v].x,c[v].y,a.x,a.y)||d.push(c[r]);break}v=r;0>r-1?r=e-1:r--}d.reverse();v=-1;for(r=m;;){if(r!==b)h.push(c[r]);else{if(0>v||
v>=e)return[];r!==b||Xi(p.x,p.y,c[v].x,c[v].y,n.x,n.y)||h.push(c[r]);break}v=r;r+1>e-1?r=0:r++}F.push(d,h);F.shift();break}y&&A.push(F.shift())}return A}
function $i(a){for(var c=0;4E3>c;c++)Fe.push(new Ee(0,0));this.j=a;this.Ce=new Tg(V(0,10),!0);this.Ys=-1;a=new Gg;a.behavior=this;a.BeginContact=function(a){this.behavior.j.kf(a.wc.rb().rg.q,a.kc.rb().rg.q)};this.Ce.k.n=a;a=new Dg;a.behavior=this;a.k=function(a,c){if(this.behavior.rB)return!0;var d=a.rb().rg.q.type,k=c.rb().rg.q.type,f=d.na.Physics_DisabledCollisions;return f&&f.contains(k)?!1:(f=k.na.Physics_DisabledCollisions)&&f.contains(d)?!1:!0};this.Ce.k.C=a;this.kF=0;this.Gn=8;this.bn=3;this.rB=
!0}
(function(){function a(){}var c=$i.prototype;c.ma=function(a){this.behavior=a;this.j=a.j};c.ma.prototype.da=function(){};c.la=function(a,b){this.type=a;this.behavior=a.behavior;this.q=b;this.j=a.j;this.Ce=this.behavior.Ce};var b=c.la.prototype;b.da=function(){this.zs=0!==this.X[0];this.Jv=this.X[1];this.Mt=0!==this.X[2];this.ai=this.X[3];this.ci=this.X[4];this.Di=this.X[5];this.Kk=this.X[6];this.gk=this.X[7];this.ik=0!==this.X[8];this.enabled=0!==this.X[9];this.body=null;this.q.Ua();this.kp=this.q.x;this.lp=
this.q.y;this.Ec=this.q.M;this.Vs=this.Zs=0;this.fy=this.Xs=!1;this.Ss=null;this.Ts=-1;this.Oe?(this.Oe.length=0,this.Ff.length=0,this.jh.clear()):(this.Oe=[],this.Ff=[],this.jh=new ea);var a=this;this.zd||(this.wi=function(b){a.Lj(b)});this.j.Bl(this.wi)};b.Wx=function(){this.q.Ua();this.Cr();this.Ss=this.q.Ob;this.Ts=this.q.Aa};b.Gf=function(){this.yo();this.Ff.length=0;this.jh.clear();this.body&&(Xg(this.Ce,this.body),this.body=null);this.j.Vt(this.wi)};b.Nb=function(){var a={e:this.enabled,im:this.zs,
pr:this.Mt,d:this.ai,fr:this.ci,re:this.Di,ld:this.Kk,ad:this.gk,b:this.ik,mcj:this.Ff};if(this.enabled){var b=V(0,0);b.W(this.body.D);a.vx=b.x;a.vy=b.y;a.om=this.body.N}return a};b.Qb=function(a){this.yo();this.Ff.length=0;this.jh.clear();this.body&&(Xg(this.Ce,this.body),this.body=null);this.enabled=a.e;this.zs=a.im;this.Mt=a.pr;this.ai=a.d;this.ci=a.fr;this.Di=a.re;this.Kk=a.ld;this.gk=a.ad;this.ik=a.b;this.kp=this.q.x;this.lp=this.q.y;this.Ec=this.q.M;this.Zs=this.q.width;this.Vs=this.q.height;
this.enabled&&(this.Cr(),jg(this.body,V(a.vx,a.vy)),this.body.Rn(a.om),0===a.vx&&0===a.vy&&0===a.om||kg(this.body,!0),this.Ff=a.mcj)};b.Ue=function(){this.enabled&&this.Ut();this.behavior.Ys=this.j.Ae-1};b.Lj=function(a){var b,c,e,h=a.uid;e=b=0;for(c=this.Ff.length;b<c;b++)this.Ff[e]=this.Ff[b],e<this.Oe.length&&(this.Oe[e]=this.Oe[b]),this.Ff[b].Mb[1]==h?Yg(this.Ce,this.Oe[b]):e++;this.Ff.length=e;e<this.Oe.length&&(this.Oe.length=e);this.jh.remove(a)};b.yo=function(){var a,b;a=0;for(b=this.Oe.length;a<
b;a++)Yg(this.Ce,this.Oe[a]);this.Oe.length=0};b.Ut=function(){var a,b,c;a=0;for(b=this.Ff.length;a<b;a++)switch(c=this.Ff[a],c.type){case 0:this.RB(c.Mb[0],c.Mb[1],c.Mb[2],c.Mb[3],c.Mb[4]);break;case 1:this.TB(c.Mb[0],c.Mb[1]);break;case 2:this.SB(c.Mb[0],c.Mb[1],c.Mb[2],c.Mb[3])}};b.NB=function(){this.body&&(this.yo(),Xg(this.Ce,this.body),this.body=null,this.q.na.tf=null)};var e=[];b.Cr=function(){if(this.enabled){var a=this.q,b=!1,c=null,g=null,h,l,m,n,q,p,u,t,r,v,y,A,F;if(this.body){b=!0;c=V(0,
0);c.W(this.body.D);g=this.body.N;t=this.jh.Se();h=0;for(l=t.length;h<l;h++)r=t[h].na.tf.rg,r.yo();this.NB()}r=new Ng;r.ai=this.ai;r.ci=this.ci;r.Di=this.Di;h=new sg;h.type=this.zs?0:2;a.Ua();h.position.x=.02*a.Fb.ri();h.position.y=.02*a.Fb.si();h.M=a.M;h.k=this.Mt;h.Kk=this.Kk;h.gk=this.gk;h.ik=this.ik;t=this.q.Oa&&!this.q.Oa.ji();this.body=Vg(this.Ce,h);this.body.rg=this;h=this.Jv;t||this.q.dg||0!==this.Jv||(h=1);l=Math.max(Math.abs(a.width),1);m=Math.max(Math.abs(a.height),1);v=0>a.width;y=0>a.height;
if(0===h)if(a.dg)for(A=a.Fb.ri()-a.x,u=a.Fb.si()-a.y,a.zG(e),t=[],h=0,l=e.length;h<l;++h){v=e[h];y=v.ey;if(v.If){if(!v.If.oo){q=v.If.zc;n=v.If.jf;for(m=0;m<n;++m)t.push(V(q[2*m],q[2*m+1]));m=v.id&3758096384;(-2147483648===m||1073741824===m||536870912===m||m&-2147483648&&m&1073741824&&m&536870912)&&t.reverse();v.If.oo=Yi(t,(y.right-y.left)*(y.bottom-y.top));m=0;for(n=t.length;m<n;++m)Ge(t[m]);t.length=0}m=0;for(n=v.If.oo.length;m<n;++m){F=v.If.oo[m];q=0;for(p=F.length;q<p;++q)t.push(V(.02*(y.left+
F[q].x-A),.02*(y.top+F[q].y-u)));r.shape=new Oe;Qe(r.shape,t);cg(this.body,r);q=0;for(p=t.length;q<p;++q)Ge(t[q]);t.length=0}}else t.push(V(.02*(y.left-A),.02*(y.top-u))),t.push(V(.02*(y.right-A),.02*(y.top-u))),t.push(V(.02*(y.right-A),.02*(y.bottom-u))),t.push(V(.02*(y.left-A),.02*(y.bottom-u))),r.shape=new Oe,Qe(r.shape,t),cg(this.body,r);m=0;for(n=t.length;m<n;++m)Ge(t[m]);t.length=0}else{h=a.M;a.M=0;a.ba();a.Ua();A=a.Fb.ri()-a.x;u=a.Fb.si()-a.y;a.M=h;a.ba();a.Oa.Uh(v?-l:l,y?-m:m,0);q=a.Oa.zc;
n=a.Oa.jf;t=[];t.length=n;for(h=0;h<n;h++)t[h]=V(q[2*h]-A,q[2*h+1]-u);v!==y&&t.reverse();A=Yi(t,l*m);for(h=0;h<n;h++)Ge(t[h]);if(A.length)for(h=0,l=A.length;h<l;h++){t=A[h];m=0;for(n=t.length;m<n;m++)u=t[m],u.x*=.02,u.y*=.02;r.shape=new Oe;Qe(r.shape,t);cg(this.body,r);m=0;for(n=t.length;m<n;m++)Ge(t[m])}else r.shape=new Oe,Re(r.shape,.01*l,.01*m),cg(this.body,r)}else 1===h?(r.shape=new Oe,Re(r.shape,.01*l,.01*m)):r.shape=new Le(.01*Math.min(l,m)),cg(this.body,r);a.na.tf=this.body;this.Zs=a.width;
this.Vs=a.height;if(b)for(jg(this.body,c),this.body.Rn(g),Ge(c),this.Ut(),t=this.jh.Se(),h=0,l=t.length;h<l;h++)r=t[h].na.tf.rg,r.Ut();e.length=0}};b.bb=function(){if(this.enabled){var a=this.q,b;0===this.behavior.kF?b=this.j.Ng/60:(b=this.j.yf(this.q),b>1/30&&(b=1/30));if(this.j.Ae>this.behavior.Ys&&0<this.j.Ng){this.Ce.Ph(b,this.behavior.Gn,this.behavior.bn);for(b=this.Ce.Ni.eb(wg);b;b=b.Sa())b.body.C.Ja(),b.body.H=0;this.behavior.Ys=this.j.Ae}if(this.fy||a.width!==this.Zs||a.height!==this.Vs||
a.Ob!==this.Ss||a.Aa!==this.Ts||a.dg&&a.Sx)this.Cr(),this.fy=!1,this.Ss=a.Ob,this.Ts=a.Aa,a.dg&&a.Sx&&(a.Sx=!1);b=a.M!==this.Ec;if(a.x!==this.kp||a.y!==this.lp){a.Ua();var c=a.Fb.ri(),e=a.Fb.si(),h=c-this.kp,l=e-this.lp,m=this.body,c=V(.02*c,.02*e);gg(m,c,m.Pi());jg(this.body,V(h,l));this.Xs=!0;kg(this.body,!0)}else this.Xs&&(this.Xs=!1,jg(this.body,V(0,0)),h=this.body,l=V(.02*a.Fb.ri(),.02*a.Fb.si()),gg(h,l,h.Pi()));b&&(this.body.kv(a.M),kg(this.body,!0));h=this.body.K.position;b=h.x/.02;h=h.y/.02;
l=this.body.Pi();if(b!==a.x||h!==a.y||l!==a.M)if(a.x=b,a.y=h,a.M=l,a.ba(),a.Ua(),b=a.Fb.ri()-a.x,h=a.Fb.si()-a.y,0!==b||0!==h)a.x-=b,a.y-=h,a.ba();this.kp=a.x;this.lp=a.y;this.Ec=a.M}};b.Ro=function(a){return-1!==a&&this.q.zf?0===a&&this.body?(this.body.K.position.x+this.body.u.Y.x)/.02:this.q.zf(a,!0):this.q.x};b.So=function(a){return-1!==a&&this.q.zf?0===a&&this.body?(this.body.K.position.y+this.body.u.Y.y)/.02:this.q.zf(a,!1):this.q.y};c.G=new function(){};a.prototype.Mi=function(a,b,c){if(this.enabled){var e=
this.Ro(c);c=this.So(c);this.body.Mi(V(a,b),V(.02*e,.02*c))}};a.prototype.Wq=function(a){this.enabled&&this.body.Wq(I(a))};a.prototype.Rn=function(a){this.enabled&&(this.body.Rn(I(a)),kg(this.body,!0))};b.RB=function(a,b,c,e,h){if(this.enabled){var l=this.j.zg(b);if(l&&l!=this.q&&l.na.tf){l.na.tf.rg.jh.add(this.q);var m=this.Ro(a),n=this.So(a),q,p;l.zf?(q=l.zf(c,!0),p=l.zf(c,!1)):(q=l.x,p=l.y);c=m-q;a=n-p;b=new Bi;l=l.na.tf;m=V(.02*m,.02*n);q=V(.02*q,.02*p);b.k=this.body;b.n=l;b.O.W(ae(b.k.K,m));
b.ea.W(ae(b.n.K,q));l=q.x-m.x;m=q.y-m.y;b.length=Math.sqrt(l*l+m*m);b.L=0;b.H=0;b.length=.02*Math.sqrt(c*c+a*a);b.H=e;b.L=h;this.Oe.push(Zg(this.Ce,b))}}};b.TB=function(a,b){if(this.enabled){var c=this.j.zg(b);if(c&&c!=this.q&&c.na.tf){c.na.tf.rg.jh.add(this.q);var e=this.Ro(a),h=this.So(a),l=new Ti;Ui(l,this.body,c.na.tf,V(.02*e,.02*h));this.Oe.push(Zg(this.Ce,l))}}};b.SB=function(a,b,c,e){if(this.enabled&&(b=this.j.zg(b))&&b!=this.q&&b.na.tf){b.na.tf.rg.jh.add(this.q);var h=this.Ro(a);a=this.So(a);
var l=new Ti;Ui(l,this.body,b.na.tf,V(.02*h,.02*a));l.O=!0;l.xa=I(c);l.qa=I(e);this.Oe.push(Zg(this.Ce,l))}};c.ya=new a;c.Fa=new function(){}})();function aj(a){this.j=a}
(function(){var a=aj.prototype;a.ma=function(a){this.behavior=a;this.j=a.j};a.ma.prototype.da=function(){};a.la=function(a,c){this.type=a;this.behavior=a.behavior;this.q=c;this.j=a.j};var c=a.la.prototype;c.da=function(){this.md=null;this.Sp=-1;this.mode=this.Ec=this.tu=this.Pm=this.Bi=this.Rp=0;var a=this;this.zd||(this.wi=function(c){a.Lj(c)});this.j.Bl(this.wi)};c.Nb=function(){return{uid:this.md?this.md.uid:-1,pa:this.Rp,pd:this.Bi,msa:this.Pm,tsa:this.tu,lka:this.Ec,m:this.mode}};c.Qb=function(a){this.Sp=
a.uid;this.Rp=a.pa;this.Bi=a.pd;this.Pm=a.msa;this.tu=a.tsa;this.Ec=a.lka;this.mode=a.m};c.Ue=function(){-1===this.Sp?this.md=null:this.md=this.j.zg(this.Sp);this.Sp=-1};c.Lj=function(a){this.md==a&&(this.md=null)};c.Gf=function(){this.md=null;this.j.Vt(this.wi)};c.bb=function(){};c.Wj=function(){if(this.md){this.Ec!==this.q.M&&(this.Pm=Sa(this.Pm+(this.q.M-this.Ec)));var a=this.q.x,c=this.q.y;if(3===this.mode||4===this.mode){var d=bb(this.q.x,this.q.y,this.md.x,this.md.y);if(d>this.Bi||4===this.mode&&
d<this.Bi)c=Va(this.md.x,this.md.y,this.q.x,this.q.y),a=this.md.x+Math.cos(c)*this.Bi,c=this.md.y+Math.sin(c)*this.Bi}else a=this.md.x+Math.cos(this.md.M+this.Rp)*this.Bi,c=this.md.y+Math.sin(this.md.M+this.Rp)*this.Bi;this.Ec=d=Sa(this.Pm+(this.md.M-this.tu));0!==this.mode&&1!==this.mode&&3!==this.mode&&4!==this.mode||this.q.x===a&&this.q.y===c||(this.q.x=a,this.q.y=c,this.q.ba());0!==this.mode&&2!==this.mode||this.q.M===d||(this.q.M=d,this.q.ba())}};a.G=new function(){};a.ya=new function(){};a.Fa=
new function(){}})();function bj(a){this.j=a}
(function(){function a(){}function c(){}var b=bj.prototype;b.ma=function(a){this.behavior=a;this.j=a.j};b.ma.prototype.da=function(){};b.la=function(a,b){this.type=a;this.behavior=a.behavior;this.q=b;this.j=a.j;this.sq=this.Sj=this.Rj=this.nj=this.Gl=this.Nl=this.Hk=this.Ik=this.bg=this.Zf=!1;this.Yd=null;this.jt=-1;this.tj=this.sj=0;this.Lo=!1;this.pk=this.Qf=0;this.Io=!0;this.S=this.P=0};var e=b.la.prototype;e.$y=function(){this.Qc=Math.cos(this.sk);this.Rc=Math.sin(this.sk);this.Ei=Math.cos(this.sk-
Math.PI/2);this.Fi=Math.sin(this.sk-Math.PI/2);this.Qc=Hb(this.Qc);this.Rc=Hb(this.Rc);this.Ei=Hb(this.Ei);this.Fi=Hb(this.Fi);this.$r=this.vd;0>this.vd&&(this.Qc*=-1,this.Rc*=-1,this.vd=Math.abs(this.vd))};e.da=function(){this.Ne=this.X[0];this.kb=this.X[1];this.Bc=this.X[2];this.wm=this.X[3];this.$r=this.vd=this.X[4];this.Bp=this.X[5];this.Qr=0!==this.X[6];this.Rs=this.X[7]/1E3;this.Ir=1===this.X[8];this.enabled=0!==this.X[9];this.rl=!1;this.sl=this.j.Ki(this.q);this.kt=-1;this.Uj=0;this.sk=I(90);
this.$y();var a=this;this.Ir&&!this.j.Kb&&(jQuery(document).keydown(function(b){a.Tm(b)}),jQuery(document).keyup(function(b){a.Um(b)}));this.zd||(this.wi=function(b){a.Lj(b)});this.j.Bl(this.wi);this.q.na.isPlatformBehavior=!0};e.Nb=function(){return{ii:this.nj,lfx:this.sj,lfy:this.tj,lfo:this.Yd?this.Yd.uid:-1,am:this.Qf,en:this.enabled,fall:this.pk,ft:this.Io,dx:this.P,dy:this.S,ms:this.Ne,acc:this.kb,dec:this.Bc,js:this.wm,g:this.vd,g1:this.$r,mf:this.Bp,wof:this.rl,woj:this.sl?this.sl.uid:-1,
ga:this.sk,edj:this.Qr,cdj:this.Gl,dj:this.Nl,sus:this.Rs}};e.Qb=function(a){this.nj=a.ii;this.sj=a.lfx;this.tj=a.lfy;this.jt=a.lfo;this.Qf=a.am;this.enabled=a.en;this.pk=a.fall;this.Io=a.ft;this.P=a.dx;this.S=a.dy;this.Ne=a.ms;this.kb=a.acc;this.Bc=a.dec;this.wm=a.js;this.vd=a.g;this.$r=a.g1;this.Bp=a.mf;this.rl=a.wof;this.kt=a.woj;this.sk=a.ga;this.Qr=a.edj;this.Gl=a.cdj;this.Nl=a.dj;this.Rs=a.sus;this.sq=this.Sj=this.Rj=this.Hk=this.Ik=this.bg=this.Zf=!1;this.Uj=0;this.$y()};e.Ue=function(){-1===
this.jt?this.Yd=null:this.Yd=this.j.zg(this.jt);-1===this.kt?this.sl=null:this.sl=this.j.zg(this.kt)};e.Lj=function(a){this.Yd==a&&(this.Yd=null)};e.Gf=function(){this.Yd=null;this.j.Vt(this.wi)};e.Tm=function(a){switch(a.which){case 38:a.preventDefault();this.Ik=!0;break;case 37:a.preventDefault();this.Zf=!0;break;case 39:a.preventDefault(),this.bg=!0}};e.Um=function(a){switch(a.which){case 38:a.preventDefault();this.Hk=this.Ik=!1;break;case 37:a.preventDefault();this.Zf=!1;break;case 39:a.preventDefault(),
this.bg=!1}};e.rh=function(){this.Ik=this.bg=this.Zf=!1};e.k=function(){return 0>this.vd?-1:1};e.Ew=function(){var a=null,b=null,c,e;c=this.q.x;e=this.q.y;this.q.x+=this.Qc;this.q.y+=this.Rc;this.q.ba();if(this.Yd&&this.j.ze(this.q,this.Yd)&&(!this.j.yu(this.Yd.type,hd)||this.Yd.na.solidEnabled))return this.q.x=c,this.q.y=e,this.q.ba(),this.Yd;(a=this.j.qc(this.q))||0!==this.pk||(b=this.j.Ki(this.q,!0));this.q.x=c;this.q.y=e;this.q.ba();if(a){if(this.j.ze(this.q,a))return null;this.Lo=!1;return a}if(b&&
b.length){e=a=0;for(c=b.length;a<c;a++)b[e]=b[a],this.j.ze(this.q,b[a])||e++;if(1<=e)return this.Lo=!0,b[0]}return null};e.bb=function(){};e.Xx=function(){var a=this.j.yf(this.q),b,c,e,h,l,m,n,q,p;this.Ik||this.sq||(this.Hk=!1);var u=this.Zf||this.Rj;e=this.bg||this.Sj;var t=(h=this.Ik||this.sq)&&!this.Hk;this.sq=this.Sj=this.Rj=!1;if(this.enabled){this.nj&&(t=h=e=u=!1);h||(this.Uj=0);q=this.Yd;p=!1;this.Io&&((this.j.qc(this.q)||this.j.Ki(this.q))&&this.j.Re(this.q,-this.Qc,-this.Rc,4,!0),this.Io=
!1);!q||0!==this.S||q.y===this.tj&&q.x===this.sj||(b=q.x-this.sj,c=q.y-this.tj,this.q.x+=b,this.q.y+=c,this.q.ba(),this.sj=q.x,this.tj=q.y,p=!0,this.j.qc(this.q)&&this.j.Re(this.q,-b,-c,2.5*Math.sqrt(b*b+c*c)));var r=this.Ew();if(c=this.j.qc(this.q))if(this.q.na.inputPredicted)this.j.Re(this.q,-this.Qc,-this.Rc,10,!1);else if(this.j.by(this.q,this.Ei,this.Fi,this.q.width/2))this.j.kf(this.q,c);else if(this.j.by(this.q,this.Qc,this.Rc,this.q.height/2))this.j.kf(this.q,c);else if(this.j.Pt(this.q,Math.max(this.q.width,
this.q.height)/2))this.j.kf(this.q,c);else return;r?(this.Gl=this.Nl=!1,0<this.S&&(this.rl||(this.j.aq(this.q,-this.Qc,-this.Rc,r),this.rl=!0),this.S=0),q!=r)?(this.Yd=r,this.sj=r.x,this.tj=r.y,this.j.kf(this.q,r)):p&&(c=this.j.qc(this.q))&&(this.j.kf(this.q,c),0!==b&&(0<b?this.j.Re(this.q,-this.Ei,-this.Fi):this.j.Re(this.q,this.Ei,this.Fi)),this.j.Re(this.q,-this.Qc,-this.Rc)):h||(this.Gl=!0);if(r&&t||!r&&this.Qr&&h&&this.Gl&&!this.Nl)q=this.q.x,p=this.q.y,this.q.x-=this.Qc,this.q.y-=this.Rc,this.q.ba(),
this.j.qc(this.q)?t=!1:(this.Uj=this.Rs,this.j.trigger(bj.prototype.G.kA,this.q),this.Qf=2,this.S=-this.wm,t=!0,r?this.Hk=!0:this.Nl=!0),this.q.x=q,this.q.y=p,this.q.ba();r||(h&&0<this.Uj?(this.S=-this.wm,this.Uj-=a):(this.Yd=null,this.S+=this.vd*a,this.S>this.Bp&&(this.S=this.Bp)),t&&(this.Hk=!0));this.rl=!!r;u==e&&(0>this.P?(this.P+=this.Bc*a,0<this.P&&(this.P=0)):0<this.P&&(this.P-=this.Bc*a,0>this.P&&(this.P=0)));u&&!e&&(this.P=0<this.P?this.P-(this.kb+this.Bc)*a:this.P-this.kb*a);e&&!u&&(this.P=
0>this.P?this.P+(this.kb+this.Bc)*a:this.P+this.kb*a);this.P>this.Ne?this.P=this.Ne:this.P<-this.Ne&&(this.P=-this.Ne);u=!1;0!==this.P&&(q=this.q.x,p=this.q.y,b=this.P*a*this.Ei,c=this.P*a*this.Fi,this.q.x+=this.Ei*(1<this.P?1:-1)-this.Qc,this.q.y+=this.Fi*(1<this.P?1:-1)-this.Rc,this.q.ba(),h=!1,l=this.j.qc(this.q),this.q.x=q+b,this.q.y=p+c,this.q.ba(),e=this.j.qc(this.q),!e&&r&&(e=this.j.Ki(this.q))&&(this.q.x=q,this.q.y=p,this.q.ba(),this.j.ze(this.q,e)?(e=null,h=!1):h=!0,this.q.x=q+b,this.q.y=
p+c,this.q.ba()),e?(b=Math.abs(this.P*a)+2,l||!this.j.Re(this.q,-this.Qc,-this.Rc,b,h,e))?(this.j.kf(this.q,e),b=Math.max(Math.abs(this.P*a*2.5),30),this.j.Re(this.q,this.Ei*(0>this.P?1:-1),this.Fi*(0>this.P?1:-1),b,!1)?!r||h||this.Lo||(q=this.q.x,p=this.q.y,this.q.x+=this.Qc,this.q.y+=this.Rc,this.j.qc(this.q)?this.j.Re(this.q,-this.Qc,-this.Rc,3,!1)||(this.q.x=q,this.q.y=p,this.q.ba()):(this.q.x=q,this.q.y=p,this.q.ba())):(this.q.x=q,this.q.y=p,this.q.ba()),h||(this.P=0)):!l&&!t&&Math.abs(this.S)<
Math.abs(this.wm/4)&&(this.S=0,r||(u=!0)):(q=this.Ew(),r&&!q?(c=Math.ceil(Math.abs(this.P*a))+2,q=this.q.x,p=this.q.y,this.q.x+=this.Qc*c,this.q.y+=this.Rc*c,this.q.ba(),this.j.qc(this.q)||this.j.Ki(this.q)?this.j.Re(this.q,-this.Qc,-this.Rc,c+2,!0):(this.q.x=q,this.q.y=p,this.q.ba())):q&&0===this.S&&this.j.aq(this.q,-this.Qc,-this.Rc,q)));if(0!==this.S){q=this.q.x;p=this.q.y;this.q.x+=this.S*a*this.Qc;this.q.y+=this.S*a*this.Rc;b=this.q.x;e=this.q.y;this.q.ba();c=this.j.qc(this.q);h=!1;if(!c&&0<
this.S&&!r){if((h=0<this.pk?null:this.j.Ki(this.q,!0))&&h.length){if(this.sl){this.q.x=q;this.q.y=p;this.q.ba();n=l=0;for(m=h.length;l<m;l++)h[n]=h[l],this.j.ze(this.q,h[l])||n++;h.length=n;this.q.x=b;this.q.y=e;this.q.ba()}1<=h.length&&(c=h[0])}h=!!c}c&&(this.j.kf(this.q,c),this.Uj=0,b=h?Math.abs(this.S*a*2.5+10):Math.max(Math.abs(this.S*a*2.5+10),30),this.j.Re(this.q,this.Qc*(0>this.S?1:-1),this.Rc*(0>this.S?1:-1),b,h,c)?(this.Yd=c,this.sj=c.x,this.tj=c.y,(this.Lo=h)&&(u=!0),this.S=0):(this.q.x=
q,this.q.y=p,this.q.ba(),this.rl=!0,h||(this.S=0)))}3!==this.Qf&&0<this.S&&!r&&(this.j.trigger(bj.prototype.G.Wz,this.q),this.Qf=3);(r||u)&&0<=this.S&&(3===this.Qf||u||t&&0===this.S?(this.j.trigger(bj.prototype.G.pA,this.q),this.Qf=0===this.P&&0===this.S?0:1):(0!==this.Qf&&0===this.P&&0===this.S&&(this.j.trigger(bj.prototype.G.GA,this.q),this.Qf=0),1===this.Qf||0===this.P&&0===this.S||t||(this.j.trigger(bj.prototype.G.sA,this.q),this.Qf=1)));0<this.pk&&this.pk--;this.sl=this.j.Ki(this.q)}};a.prototype.kA=
function(){return!0};a.prototype.Wz=function(){return!0};a.prototype.GA=function(){return!0};a.prototype.sA=function(){return!0};a.prototype.pA=function(){return!0};b.G=new a;b.ya=new function(){};c.prototype.fk=function(a){a.wa(Math.sqrt(this.P*this.P+this.S*this.S))};b.Fa=new c})();function gj(a){this.j=a}
(function(){function a(){}function c(){}var b=gj.prototype;b.ma=function(a){this.behavior=a;this.j=a.j};b.ma.prototype.da=function(){};b.la=function(a,b){this.type=a;this.behavior=a.behavior;this.q=b;this.j=a.j};var e=b.la.prototype;e.da=function(){this.speed=I(this.X[0]);this.kb=I(this.X[1])};e.Nb=function(){return{speed:this.speed,acc:this.kb}};e.Qb=function(a){this.speed=a.speed;this.kb=a.acc};e.bb=function(){var a=this.j.yf(this.q);0!==a&&(0!==this.kb&&(this.speed+=this.kb*a),0!==this.speed&&
(this.q.M=Sa(this.q.M+this.speed*a),this.q.ba()))};b.G=new function(){};a.prototype.yl=function(a){this.speed=I(a)};b.ya=new a;c.prototype.fk=function(a){a.wa(Pa(this.speed))};b.Fa=new c})();function ij(a){this.j=a}
(function(){function a(){}function c(){}var b=ij.prototype;b.ma=function(a){this.behavior=a;this.j=a.j};b.ma.prototype.da=function(){};b.la=function(a,b){this.type=a;this.behavior=a.behavior;this.q=b;this.j=a.j;this.Uc=0};var e=b.la.prototype,d=2*Math.PI,k=Math.PI/2,f=3*Math.PI/2;e.da=function(){this.Pb=1===this.X[0];this.Qk=this.X[1];this.Ju=this.X[2];this.sh=this.X[3];this.sh+=Math.random()*this.X[4];0===this.sh?this.Uc=0:(this.Uc=this.X[5]/this.sh*d,this.Uc+=Math.random()*this.X[6]/this.sh*d);
this.me=this.X[7];this.me+=Math.random()*this.X[8];this.xh=this.pj=this.mb=0;5===this.Qk&&(this.me=I(this.me));this.init()};e.Nb=function(){return{i:this.Uc,a:this.Pb,mv:this.Qk,w:this.Ju,p:this.sh,mag:this.me,iv:this.mb,iv2:this.pj,r:this.xh,lkv:this.Ke,lkv2:this.ym}};e.Qb=function(a){this.Uc=a.i;this.Pb=a.a;this.Qk=a.mv;this.Ju=a.w;this.sh=a.p;this.me=a.mag;this.mb=a.iv;this.pj=a.iv2||0;this.xh=a.r;this.Ke=a.lkv;this.ym=a.lkv2||0};e.init=function(){switch(this.Qk){case 0:this.mb=this.q.x;break;
case 1:this.mb=this.q.y;break;case 2:this.mb=this.q.width;this.xh=this.q.height/this.q.width;break;case 3:this.mb=this.q.width;break;case 4:this.mb=this.q.height;break;case 5:this.mb=this.q.M;break;case 6:this.mb=this.q.opacity;break;case 7:this.mb=0;break;case 8:this.mb=this.q.x,this.pj=this.q.y}this.Ke=this.mb;this.ym=this.pj};e.Kh=function(a){a=a%d;switch(this.Ju){case 0:return Math.sin(a);case 1:return a<=k?a/k:a<=f?1-2*(a-k)/Math.PI:(a-f)/k-1;case 2:return 2*a/d-1;case 3:return-2*a/d+1;case 4:return a<
Math.PI?-1:1}return 0};e.bb=function(){var a=this.j.yf(this.q);this.Pb&&0!==a&&(0===this.sh?this.Uc=0:(this.Uc+=a/this.sh*d,this.Uc=this.Uc%d),this.xF())};e.xF=function(){switch(this.Qk){case 0:this.q.x!==this.Ke&&(this.mb+=this.q.x-this.Ke);this.q.x=this.mb+this.Kh(this.Uc)*this.me;this.Ke=this.q.x;break;case 1:this.q.y!==this.Ke&&(this.mb+=this.q.y-this.Ke);this.q.y=this.mb+this.Kh(this.Uc)*this.me;this.Ke=this.q.y;break;case 2:this.q.width=this.mb+this.Kh(this.Uc)*this.me;this.q.height=this.q.width*
this.xh;break;case 3:this.q.width=this.mb+this.Kh(this.Uc)*this.me;break;case 4:this.q.height=this.mb+this.Kh(this.Uc)*this.me;break;case 5:this.q.M!==this.Ke&&(this.mb=Sa(this.mb+(this.q.M-this.Ke)));this.q.M=Sa(this.mb+this.Kh(this.Uc)*this.me);this.Ke=this.q.M;break;case 6:this.q.opacity=this.mb+this.Kh(this.Uc)*this.me/100;0>this.q.opacity?this.q.opacity=0:1<this.q.opacity&&(this.q.opacity=1);break;case 8:this.q.x!==this.Ke&&(this.mb+=this.q.x-this.Ke),this.q.y!==this.ym&&(this.pj+=this.q.y-this.ym),
this.q.x=this.mb+Math.cos(this.q.M)*this.Kh(this.Uc)*this.me,this.q.y=this.pj+Math.sin(this.q.M)*this.Kh(this.Uc)*this.me,this.Ke=this.q.x,this.ym=this.q.y}this.q.ba()};e.Hx=function(a,b){switch(this.Qk){case 2:this.mb*=b.width/a.width;this.xh=b.height/b.width;break;case 3:this.mb*=b.width/a.width;break;case 4:this.mb*=b.height/a.height}};a.prototype.Si=function(){return this.Pb};b.G=new a;c.prototype.jv=function(a){this.Pb=1===a};b.ya=new c;b.Fa=new function(){}})();function jj(a){this.j=a}
(function(){var a=jj.prototype;a.ma=function(a){this.behavior=a;this.j=a.j};a.ma.prototype.da=function(){};a.la=function(a,b){this.type=a;this.behavior=a.behavior;this.q=b;this.j=a.j;this.mode=0};a=a.la.prototype;a.da=function(){this.mode=this.X[0]};a.bb=function(){};a.Wj=function(){this.q.Ua();var a=this.q.Eb,b=this.q.V.ic,e=!1;0===this.mode?(0>this.q.x&&(this.q.x=0,e=!0),0>this.q.y&&(this.q.y=0,e=!0),this.q.x>b.width&&(this.q.x=b.width,e=!0),this.q.y>b.height&&(this.q.y=b.height,e=!0)):(0>a.left&&
(this.q.x-=a.left,e=!0),0>a.top&&(this.q.y-=a.top,e=!0),a.right>b.width&&(this.q.x-=a.right-b.width,e=!0),a.bottom>b.height&&(this.q.y-=a.bottom-b.height,e=!0));e&&this.q.ba()}})();function mj(a){this.j=a}
(function(){function a(){}function c(){}function b(){}var e=mj.prototype;e.ma=function(a){this.behavior=a;this.j=a.j};e.ma.prototype.da=function(){};e.la=function(a,b){this.type=a;this.behavior=a.behavior;this.q=b;this.j=a.j;this.Zi=this.S=this.P=0};var d=e.la.prototype;d.da=function(){this.il=this.X[0];this.Rt=this.X[1];this.enabled=0!==this.X[2]};d.Nb=function(){return{dx:this.P,dy:this.S,cancelStep:this.Zi,enabled:this.enabled,stepMode:this.il,pxPerStep:this.Rt}};d.Qb=function(a){this.P=a.dx;this.S=
a.dy;this.Zi=a.cancelStep;this.enabled=a.enabled;this.il=a.stepMode;this.Rt=a.pxPerStep};d.ow=function(){return Math.sqrt(this.P*this.P+this.S*this.S)};d.tc=function(){return Math.atan2(this.S,this.P)};d.step=function(a,b,c){if(0!==a||0!==b){var d=this.q.x,e=this.q.y,m,n=Math.round(Math.sqrt(a*a+b*b)/this.Rt);0===n&&(n=1);var q;for(q=1;q<=n;q++)if(m=q/n,this.q.x=d+a*m,this.q.y=e+b*m,this.q.ba(),this.j.trigger(c,this.q),1===this.Zi){q--;m=q/n;this.q.x=d+a*m;this.q.y=e+b*m;this.q.ba();break}else if(2===
this.Zi)break}};d.bb=function(){var a=this.j.yf(this.q),b=this.P*a,a=this.S*a;0===this.P&&0===this.S||!this.enabled||(this.Zi=0,0===this.il?(this.q.x+=b,this.q.y+=a):1===this.il?this.step(b,a,mj.prototype.G.Nz):2===this.il?(this.step(b,0,mj.prototype.G.Ou),this.Zi=0,this.step(0,a,mj.prototype.G.Pu)):3===this.il&&(this.step(0,a,mj.prototype.G.Pu),this.Zi=0,this.step(b,0,mj.prototype.G.Ou)),this.q.ba())};a.prototype.Nz=function(){return!0};a.prototype.Ou=function(){return!0};a.prototype.Pu=function(){return!0};
e.G=new a;c.prototype.yl=function(a,b){var c;switch(a){case 0:c=this.tc();this.P=Math.cos(c)*b;this.S=Math.sin(c)*b;break;case 1:this.P=b;break;case 2:this.S=b}};c.prototype.lv=function(a){a=I(a);var b=this.ow();this.P=Math.cos(a)*b;this.S=Math.sin(a)*b};e.ya=new c;b.prototype.fk=function(a){a.wa(this.ow())};b.prototype.P=function(a){a.wa(this.P)};b.prototype.S=function(a){a.wa(this.S)};e.Fa=new b})();function nj(a){this.j=a}
(function(){var a=nj.prototype;a.ma=function(a){this.behavior=a;this.j=a.j};a.ma.prototype.da=function(){};a.la=function(a,b){this.type=a;this.behavior=a.behavior;this.q=b;this.j=a.j};a=a.la.prototype;a.da=function(){};a.bb=function(){this.q.Ua();var a=this.q.Eb,b=this.q.V.ic;(0>a.right||0>a.bottom||a.left>b.width||a.top>b.height)&&this.j.Pg(this.q)}})();function id(a){this.j=a}
(function(){var a=id.prototype;a.ma=function(a){this.behavior=a;this.j=a.j};a.ma.prototype.da=function(){};a.la=function(a,c){this.type=a;this.behavior=a.behavior;this.q=c;this.j=a.j};var c=a.la.prototype;c.da=function(){this.q.na.jumpthruEnabled=0!==this.X[0]};c.bb=function(){};a.G=new function(){};a.ya=new function(){}})();function oj(a){this.j=a;this.iu=this.rq=this.rn=this.hu=0}
(function(){var a=oj.prototype;a.ma=function(a){this.behavior=a;this.j=a.j};a.ma.prototype.da=function(){};a.la=function(a,c){this.type=a;this.behavior=a.behavior;this.q=c;this.j=a.j};var c=a.la.prototype;c.da=function(){this.enabled=0!==this.X[0]};c.Nb=function(){return{smg:this.behavior.hu,ss:this.behavior.rn,se:this.behavior.rq,smd:this.behavior.iu}};c.Qb=function(a){this.behavior.hu=a.smg;this.behavior.rn=a.ss;this.behavior.rq=a.se;this.behavior.iu=a.smd};c.bb=function(){};c.Wj=function(){if(this.enabled){var a=
this.behavior.Ij.Se(),c=0,d=0,k,f,g,h=0;k=0;for(f=a.length;k<f;k++){a:{g=a[k];for(var l=void 0,m=void 0,n=void 0,l=0,m=g.Ea.length;l<m;++l)if(n=g.Ea[l],n.behavior instanceof oj){g=n;break a}g=null}g&&g.enabled&&(c+=a[k].x,d+=a[k].y,++h)}a=this.q.V.ic;f=this.j.Wc.ib;g=k=0;f>=this.behavior.rn&&f<this.behavior.rq&&(k=this.behavior.hu*Math.min(this.j.Ng,1),0===this.behavior.iu&&(k*=1-(f-this.behavior.rn)/(this.behavior.rq-this.behavior.rn)),f=Math.random()*Math.PI*2,g=Math.random()*k,k=Math.cos(f)*g,
g*=Math.sin(f));a.cu(c/h+k);a.du(d/h+g)}};a.ya=new function(){}})();function hd(a){this.j=a}(function(){var a=hd.prototype;a.ma=function(a){this.behavior=a;this.j=a.j};a.ma.prototype.da=function(){};a.la=function(a,c){this.type=a;this.behavior=a.behavior;this.q=c;this.j=a.j};var c=a.la.prototype;c.da=function(){this.q.na.solidEnabled=0!==this.X[0]};c.bb=function(){};a.G=new function(){};a.ya=new function(){}})();function pj(a){this.j=a}
(function(){var a=pj.prototype;a.ma=function(a){this.behavior=a;this.j=a.j};a.ma.prototype.da=function(){};a.la=function(a,b){this.type=a;this.behavior=a.behavior;this.q=b;this.j=a.j};a=a.la.prototype;a.da=function(){this.mode=this.X[0]};a.bb=function(){var a=this.q;a.Ua();var b=a.Eb,e=a.V,d=e.ic,k=0,f=0,g=0,h=0;0===this.mode?(f=d.width,h=d.height):(k=e.Bb,f=e.Ib,g=e.Cb,h=e.Hb);b.right<k?(a.x=f-1+(a.x-b.left),a.ba()):b.left>f?(a.x=k+1-(b.right-a.x),a.ba()):b.bottom<g?(a.y=h-1+(a.y-b.top),a.ba()):
b.top>h&&(a.y=g+1-(b.bottom-a.y),a.ba())}})();
function gd(){return[vd,wd,xd,yd,ud,zd,Hd,jd,Ad,Gd,Ed,Fd,Dd,Cd,Bd,Md,nj,ij,Kd,Ld,hd,Id,bj,Jd,$i,aj,gj,oj,id,pj,jj,mj,Fd.prototype.G.yz,R.prototype.G.jz,R.prototype.Fa.wg,jd.prototype.Fa.Sn,jd.prototype.Fa.Tn,Fd.prototype.Fa.Sn,Fd.prototype.Fa.Tn,R.prototype.Fa.Pa,jd.prototype.ya.Fz,R.prototype.Fa.M,R.prototype.G.qz,R.prototype.G.LA,jd.prototype.ya.cB,R.prototype.ya.oz,R.prototype.Fa.random,jd.prototype.G.nz,jd.prototype.G.Pz,jd.prototype.ya.eB,jd.prototype.ya.Ed,jd.prototype.G.kz,R.prototype.ya.hB,
R.prototype.ya.ez,Dd.prototype.ya.VA,xd.prototype.ya.Play,zd.prototype.ya.bB,vd.prototype.ya.MA,Gd.prototype.ya.dB,R.prototype.ya.sz,R.prototype.Fa.$D,jd.prototype.G.zz,R.prototype.G.Uu,R.prototype.ya.XA,R.prototype.G.lz,R.prototype.G.NA,R.prototype.Fa.aE,Id.prototype.ya.yl,jd.prototype.ya.TA,Id.prototype.Fa.fk,jd.prototype.ya.SA,Id.prototype.ya.lv,R.prototype.G.rz,R.prototype.G.xz,Fd.prototype.G.$q,R.prototype.ya.WA,R.prototype.ya.PA,R.prototype.ya.RA,zd.prototype.ya.aB,vd.prototype.ya.OA,Gd.prototype.G.Dz,
Gd.prototype.Fa.Ez,vd.prototype.G.xl,vd.prototype.Fa.Bz,jd.prototype.ya.YA,jd.prototype.ya.QA,ij.prototype.ya.jv]};
