// Generated by Construct 2, the HTML5 game and app creator :: http://www.scirra.com
'use strict';var aa,ba,ca,da,ea,fa,ga,ha,A,ia,ja,ka,la,na,oa,pa,ra,sa,ta,ua,xa,ya,za,G,Aa,Ca,Da,Ea,Fa,I,Ga,Ha,Ka,La,Ma,Na,Oa,Pa,Qa,Ra,Sa,Ta,Ua,Va,ab,bb,cb,db,eb,fb,gb,hb,ib,jb,kb,mb,nb,ob,pb,qb,rb,sb,tb,ub,vb,wb,xb,yb,zb,Bb,Cb,Db,Eb,Fb,Gb,Hb,Ib,Jb,Kb,Lb,Mb,Nb,Ob,Pb,Qb,Rb,Sb,Tb,Ub,Vb,Wb,Xb,Yb,Zb,$b,ac,bc,cc,dc,ec,fc,gc={},hc={};"function"!==typeof Object.getPrototypeOf&&(Object.getPrototypeOf="object"===typeof"test".__proto__?function(h){return h.__proto__}:function(h){return h.constructor.prototype});
(function(){function h(a,d,e,c){this.set(a,d,e,c)}function l(){this.cb=this.bb=this.fb=this.eb=this.qb=this.pb=this.Pa=this.Oa=0}function f(a,d,e,c){a<d?e<c?(n=a<e?a:e,q=d>c?d:c):(n=a<c?a:c,q=d>e?d:e):e<c?(n=d<e?d:e,q=a>c?a:c):(n=d<c?d:c,q=a>e?a:e)}function p(){this.items=this.Ed=null;this.Xh=0;H&&(this.Ed=new Set);this.Xg=[];this.ye=!0}function u(a){L[J++]=a}function r(){this.R=this.Yk=this.y=this.kh=0}function t(a){this.nb=[];this.fj=this.hj=this.ij=this.gj=0;this.Bi(a)}function a(a,d){this.Gl=
a;this.Fl=d;this.cells={}}function g(a,d){this.Gl=a;this.Fl=d;this.cells={}}function b(a,d,e){var c;return y.length?(c=y.pop(),c.lm=a,c.x=d,c.y=e,c):new ba(a,d,e)}function d(a,d,e){this.lm=a;this.x=d;this.y=e;this.ub=new ca}function c(a,d,e){var c;return Q.length?(c=Q.pop(),c.lm=a,c.x=d,c.y=e,c):new da(a,d,e)}function k(a,d,e){this.lm=a;this.x=d;this.y=e;this.ub=[];this.vg=!0;this.Ad=new ca;this.hh=!1}function e(a,d){return a.ld-d.ld}ea=function(a){window.console&&window.console.log&&window.console.log(a)};
fa=function(a){window.console&&window.console.error&&window.console.error(a)};aa=function(a){return a};ga=function(a){return"undefined"===typeof a};ha=function(a){return"number"===typeof a};A=function(a){return"string"===typeof a};ia=function(a){return 0<a&&0===(a-1&a)};ja=function(a){--a;for(var d=1;32>d;d<<=1)a=a|a>>d;return a+1};ka=function(a){return 0>a?-a:a};la=function(a,d){return a>d?a:d};na=function(a,d){return a<d?a:d};oa=Math.PI;pa=function(a){return 0<=a?a|0:(a|0)-1};ra=function(a){var d=
a|0;return d===a?d:d+1};sa=function(a,d,e,c,m,x,g,b){var w,k,n,q;a<e?(k=a,w=e):(k=e,w=a);m<g?(q=m,n=g):(q=g,n=m);if(w<q||k>n)return!1;d<c?(k=d,w=c):(k=c,w=d);x<b?(q=x,n=b):(q=b,n=x);if(w<q||k>n)return!1;w=m-a+g-e;k=x-d+b-c;a=e-a;d=c-d;m=g-m;x=b-x;b=ka(d*m-x*a);return ka(m*k-x*w)>b?!1:ka(a*k-d*w)<=b};h.prototype.set=function(a,d,e,c){this.left=a;this.top=d;this.right=e;this.bottom=c};h.prototype.dg=function(a){this.left=a.left;this.top=a.top;this.right=a.right;this.bottom=a.bottom};h.prototype.width=
function(){return this.right-this.left};h.prototype.height=function(){return this.bottom-this.top};h.prototype.offset=function(a,d){this.left+=a;this.top+=d;this.right+=a;this.bottom+=d;return this};h.prototype.normalize=function(){var a=0;this.left>this.right&&(a=this.left,this.left=this.right,this.right=a);this.top>this.bottom&&(a=this.top,this.top=this.bottom,this.bottom=a)};h.prototype.Ew=function(a){return!(a.right<this.left||a.bottom<this.top||a.left>this.right||a.top>this.bottom)};h.prototype.Fw=
function(a,d,e){return!(a.right+d<this.left||a.bottom+e<this.top||a.left+d>this.right||a.top+e>this.bottom)};h.prototype.Jb=function(a,d){return a>=this.left&&a<=this.right&&d>=this.top&&d<=this.bottom};h.prototype.sh=function(a){return this.left===a.left&&this.top===a.top&&this.right===a.right&&this.bottom===a.bottom};ta=h;l.prototype.Ai=function(a){this.Oa=a.left;this.Pa=a.top;this.pb=a.right;this.qb=a.top;this.eb=a.right;this.fb=a.bottom;this.bb=a.left;this.cb=a.bottom};l.prototype.pr=function(a,
d){if(0===d)this.Ai(a);else{var e=Math.sin(d),c=Math.cos(d),m=a.left*e,x=a.top*e,g=a.right*e,e=a.bottom*e,b=a.left*c,w=a.top*c,k=a.right*c,c=a.bottom*c;this.Oa=b-x;this.Pa=w+m;this.pb=k-x;this.qb=w+g;this.eb=k-e;this.fb=c+g;this.bb=b-e;this.cb=c+m}};l.prototype.offset=function(a,d){this.Oa+=a;this.Pa+=d;this.pb+=a;this.qb+=d;this.eb+=a;this.fb+=d;this.bb+=a;this.cb+=d;return this};var n=0,q=0;l.prototype.To=function(a){f(this.Oa,this.pb,this.eb,this.bb);a.left=n;a.right=q;f(this.Pa,this.qb,this.fb,
this.cb);a.top=n;a.bottom=q};l.prototype.Jb=function(a,d){var e=this.Oa,c=this.Pa,m=this.pb-e,x=this.qb-c,g=this.eb-e,b=this.fb-c,w=a-e,k=d-c,n=m*m+x*x,q=m*g+x*b,x=m*w+x*k,v=g*g+b*b,h=g*w+b*k,f=1/(n*v-q*q),m=(v*x-q*h)*f,n=(n*h-q*x)*f;if(0<=m&&0<n&&1>m+n)return!0;m=this.bb-e;x=this.cb-c;n=m*m+x*x;q=m*g+x*b;x=m*w+x*k;f=1/(n*v-q*q);m=(v*x-q*h)*f;n=(n*h-q*x)*f;return 0<=m&&0<n&&1>m+n};l.prototype.we=function(a,d){if(d)switch(a){case 0:return this.Oa;case 1:return this.pb;case 2:return this.eb;case 3:return this.bb;
case 4:return this.Oa;default:return this.Oa}else switch(a){case 0:return this.Pa;case 1:return this.qb;case 2:return this.fb;case 3:return this.cb;case 4:return this.Pa;default:return this.Pa}};l.prototype.rq=function(){return(this.Oa+this.pb+this.eb+this.bb)/4};l.prototype.sq=function(){return(this.Pa+this.qb+this.fb+this.cb)/4};l.prototype.Jp=function(a){var d=a.rq(),e=a.sq();if(this.Jb(d,e))return!0;d=this.rq();e=this.sq();if(a.Jb(d,e))return!0;var c,m,x,g,b,w,k,n;for(k=0;4>k;k++)for(n=0;4>n;n++)if(d=
this.we(k,!0),e=this.we(k,!1),c=this.we(k+1,!0),m=this.we(k+1,!1),x=a.we(n,!0),g=a.we(n,!1),b=a.we(n+1,!0),w=a.we(n+1,!1),sa(d,e,c,m,x,g,b,w))return!0;return!1};ua=l;xa=function(a,d){for(var e in d)d.hasOwnProperty(e)&&(a[e]=d[e]);return a};ya=function(a,d){var e,c;d=pa(d);if(!(0>d||d>=a.length)){e=d;for(c=a.length-1;e<c;e++)a[e]=a[e+1];za(a,c)}};za=function(a,d){a.length=d};G=function(a){za(a,0)};Aa=function(a,d){G(a);var e,c;e=0;for(c=d.length;e<c;++e)a[e]=d[e]};Ca=function(a,d){a.push.apply(a,
d)};Da=function(a,d){var e,c;e=0;for(c=a.length;e<c;++e)if(a[e]===d)return e;return-1};Ea=function(a,d){var e=Da(a,d);-1!==e&&ya(a,e)};Fa=function(a,d,e){return a<d?d:a>e?e:a};I=function(a){return a/(180/oa)};Ga=function(a){return 180/oa*a};Ha=function(a){a%=360;0>a&&(a+=360);return a};Ka=function(a){a%=2*oa;0>a&&(a+=2*oa);return a};La=function(a){return Ha(Ga(a))};Ma=function(a){return Ka(I(a))};Na=function(a,d,e,c){return Math.atan2(c-d,e-a)};Oa=function(a,d){if(a===d)return 0;var e=Math.sin(a),
c=Math.cos(a),m=Math.sin(d),x=Math.cos(d),e=e*m+c*x;return 1<=e?0:-1>=e?oa:Math.acos(e)};Pa=function(a,d,e){var c=Math.sin(a),m=Math.cos(a),x=Math.sin(d),g=Math.cos(d);return Math.acos(c*x+m*g)>e?0<m*x-c*g?Ka(a+e):Ka(a-e):Ka(d)};Qa=function(a,d){var e=Math.sin(a),c=Math.cos(a),m=Math.sin(d),x=Math.cos(d);return 0>=c*m-e*x};Ra=function(a,d,e,c,m,x){if(0===e)return x?a:d;var g=Math.sin(e);e=Math.cos(e);a-=c;d-=m;var b=a*g;a=a*e-d*g;d=d*e+b;return x?a+c:d+m};Sa=function(a,d,e,c){a=e-a;d=c-d;return Math.sqrt(a*
a+d*d)};Ta=function(a,d){return!a!==!d};Ua=function(a,d,e){return a+(d-a)*e};Va=function(a){for(var d in a)if(a.hasOwnProperty(d))return!0;return!1};ab=function(a){for(var d in a)a.hasOwnProperty(d)&&delete a[d]};var v=+new Date;bb=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()-
v};var m=!1,w=m=!1,X=!1;"undefined"!==typeof window&&(m=/chrome/i.test(navigator.userAgent)||/chromium/i.test(navigator.userAgent),m=!m&&/safari/i.test(navigator.userAgent),w=/(iphone|ipod|ipad)/i.test(navigator.userAgent),X=window.c2ejecta);var H=!m&&!X&&!w&&"undefined"!==typeof Set&&"undefined"!==typeof Set.prototype.forEach;p.prototype.contains=function(a){return this.Yd()?!1:H?this.Ed.has(a):this.items&&this.items.hasOwnProperty(a)};p.prototype.add=function(a){if(H)this.Ed.has(a)||(this.Ed.add(a),
this.ye=!1);else{var d=a.toString(),e=this.items;e?e.hasOwnProperty(d)||(e[d]=a,this.Xh++,this.ye=!1):(this.items={},this.items[d]=a,this.Xh=1,this.ye=!1)}};p.prototype.remove=function(a){if(!this.Yd())if(H)this.Ed.has(a)&&(this.Ed["delete"](a),this.ye=!1);else if(this.items){a=a.toString();var d=this.items;d.hasOwnProperty(a)&&(delete d[a],this.Xh--,this.ye=!1)}};p.prototype.clear=function(){this.Yd()||(H?this.Ed.clear():(this.items=null,this.Xh=0),G(this.Xg),this.ye=!0)};p.prototype.Yd=function(){return 0===
this.count()};p.prototype.count=function(){return H?this.Ed.size:this.Xh};var L=null,J=0;p.prototype.qy=function(){if(!this.ye){if(H)G(this.Xg),L=this.Xg,J=0,this.Ed.forEach(u),L=null,J=0;else{var a=this.Xg;G(a);var d,e=0,c=this.items;if(c)for(d in c)c.hasOwnProperty(d)&&(a[e++]=c[d])}this.ye=!0}};p.prototype.Te=function(){this.qy();return this.Xg};ca=p;new ca;cb=function(a,d){H?db(a,d.Ed):eb(a,d.Te())};db=function(a,d){var e,c,m,x;c=e=0;for(m=a.length;e<m;++e)x=a[e],d.has(x)||(a[c++]=x);za(a,c)};
eb=function(a,d){var e,c,m,x;c=e=0;for(m=a.length;e<m;++e)x=a[e],-1===Da(d,x)&&(a[c++]=x);za(a,c)};r.prototype.add=function(a){this.y=a-this.kh;this.Yk=this.R+this.y;this.kh=this.Yk-this.R-this.y;this.R=this.Yk};r.prototype.reset=function(){this.R=this.Yk=this.y=this.kh=0};fb=r;gb=function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")};t.prototype.Bi=function(a){this.Yq=a;this.ed=a.length/2;this.nb.length=a.length;this.kj=this.lj=-1;this.Wo=0};t.prototype.sg=function(){return!this.Yq.length};
t.prototype.la=function(){for(var a=this.nb,d=a[0],e=d,c=a[1],m=c,x,g,b=1,k=this.ed;b<k;++b)g=2*b,x=a[g],g=a[g+1],x<d&&(d=x),x>e&&(e=x),g<c&&(c=g),g>m&&(m=g);this.gj=d;this.hj=e;this.ij=c;this.fj=m};t.prototype.Ai=function(a,d,e){this.nb.length=8;this.ed=4;var c=this.nb;c[0]=a.left-d;c[1]=a.top-e;c[2]=a.right-d;c[3]=a.top-e;c[4]=a.right-d;c[5]=a.bottom-e;c[6]=a.left-d;c[7]=a.bottom-e;this.lj=a.right-a.left;this.kj=a.bottom-a.top;this.la()};t.prototype.Ng=function(a,d,e,c,m){this.nb.length=8;this.ed=
4;var x=this.nb;x[0]=a.Oa-d;x[1]=a.Pa-e;x[2]=a.pb-d;x[3]=a.qb-e;x[4]=a.eb-d;x[5]=a.fb-e;x[6]=a.bb-d;x[7]=a.cb-e;this.lj=c;this.kj=m;this.la()};t.prototype.or=function(a){this.ed=a.ed;Aa(this.nb,a.nb);this.gj=a.gj;this.ij-a.ij;this.hj=a.hj;this.fj=a.fj};t.prototype.$f=function(a,d,e){if(this.lj!==a||this.kj!==d||this.Wo!==e){this.lj=a;this.kj=d;this.Wo=e;var c,m,x,g,b,k=0,w=1,n=this.Yq,q=this.nb;0!==e&&(k=Math.sin(e),w=Math.cos(e));e=0;for(x=this.ed;e<x;e++)c=2*e,m=c+1,g=n[c]*a,b=n[m]*d,q[c]=g*w-b*
k,q[m]=b*w+g*k;this.la()}};t.prototype.Jb=function(a,d){var e=this.nb;if(a===e[0]&&d===e[1])return!0;var c,m,x,g=this.ed,b=this.gj-110,k=this.ij-101,w=this.hj+131,n=this.fj+120,q,v,h=0,f=0;for(c=0;c<g;c++)m=2*c,x=(c+1)%g*2,q=e[m],m=e[m+1],v=e[x],x=e[x+1],sa(b,k,a,d,q,m,v,x)&&h++,sa(w,n,a,d,q,m,v,x)&&f++;return 1===h%2||1===f%2};t.prototype.Jh=function(a,d,e){var c=a.nb,m=this.nb;if(this.Jb(c[0]+d,c[1]+e)||a.Jb(m[0]-d,m[1]-e))return!0;var x,g,b,k,w,n,q,v,h,f,l,t;x=0;for(k=this.ed;x<k;x++)for(g=2*x,
b=(x+1)%k*2,v=m[g],g=m[g+1],h=m[b],f=m[b+1],b=0,q=a.ed;b<q;b++)if(w=2*b,n=(b+1)%q*2,l=c[w]+d,w=c[w+1]+e,t=c[n]+d,n=c[n+1]+e,sa(v,g,h,f,l,w,t,n))return!0;return!1};hb=t;a.prototype.He=function(a,d,e){var c;c=this.cells[a];return c?(c=c[d])?c:e?(c=b(this,a,d),this.cells[a][d]=c):null:e?(c=b(this,a,d),this.cells[a]={},this.cells[a][d]=c):null};a.prototype.Yb=function(a){return pa(a/this.Gl)};a.prototype.Zb=function(a){return pa(a/this.Fl)};a.prototype.update=function(a,d,e){var c,m,x,g,b;if(d)for(c=
d.left,m=d.right;c<=m;++c)for(x=d.top,g=d.bottom;x<=g;++x)if(!e||!e.Jb(c,x))if(b=this.He(c,x,!1))b.remove(a),b.Yd()&&(b.ub.clear(),1E3>y.length&&y.push(b),this.cells[c][x]=null);if(e)for(c=e.left,m=e.right;c<=m;++c)for(x=e.top,g=e.bottom;x<=g;++x)d&&d.Jb(c,x)||this.He(c,x,!0).vm(a)};a.prototype.Jk=function(a,d){var e,c,m,x,g,b;e=this.Yb(a.left);m=this.Zb(a.top);c=this.Yb(a.right);for(g=this.Zb(a.bottom);e<=c;++e)for(x=m;x<=g;++x)(b=this.He(e,x,!1))&&b.dump(d)};ib=a;g.prototype.He=function(a,d,e){var m;
m=this.cells[a];return m?(m=m[d])?m:e?(m=c(this,a,d),this.cells[a][d]=m):null:e?(m=c(this,a,d),this.cells[a]={},this.cells[a][d]=m):null};g.prototype.Yb=function(a){return pa(a/this.Gl)};g.prototype.Zb=function(a){return pa(a/this.Fl)};g.prototype.update=function(a,d,e){var c,m,x,g,b;if(d)for(c=d.left,m=d.right;c<=m;++c)for(x=d.top,g=d.bottom;x<=g;++x)if(!e||!e.Jb(c,x))if(b=this.He(c,x,!1))b.remove(a),b.Yd()&&(b.reset(),1E3>Q.length&&Q.push(b),this.cells[c][x]=null);if(e)for(c=e.left,m=e.right;c<=
m;++c)for(x=e.top,g=e.bottom;x<=g;++x)d&&d.Jb(c,x)||this.He(c,x,!0).vm(a)};g.prototype.Jk=function(a,d,e,c,m){var x,g;a=this.Yb(a);d=this.Zb(d);e=this.Yb(e);for(x=this.Zb(c);a<=e;++a)for(c=d;c<=x;++c)(g=this.He(a,c,!1))&&g.dump(m)};g.prototype.$w=function(a){var d,e,c,m,x;d=a.left;c=a.top;e=a.right;for(m=a.bottom;d<=e;++d)for(a=c;a<=m;++a)if(x=this.He(d,a,!1))x.vg=!1};jb=g;var y=[];d.prototype.Yd=function(){return this.ub.Yd()};d.prototype.vm=function(a){this.ub.add(a)};d.prototype.remove=function(a){this.ub.remove(a)};
d.prototype.dump=function(a){Ca(a,this.ub.Te())};ba=d;var Q=[];k.prototype.Yd=function(){if(!this.ub.length)return!0;if(this.ub.length>this.Ad.count())return!1;this.Yl();return!0};k.prototype.vm=function(a){this.Ad.contains(a)?(this.Ad.remove(a),this.Ad.Yd()&&(this.hh=!1)):this.ub.length?(this.ub[this.ub.length-1].vd()>a.vd()&&(this.vg=!1),this.ub.push(a)):(this.ub.push(a),this.vg=!0)};k.prototype.remove=function(a){this.Ad.add(a);this.hh=!0;30<=this.Ad.count()&&this.Yl()};k.prototype.Yl=function(){this.hh&&
(this.Ad.count()===this.ub.length?this.reset():(cb(this.ub,this.Ad),this.Ad.clear(),this.hh=!1))};k.prototype.dv=function(){this.vg||(this.ub.sort(e),this.vg=!0)};k.prototype.reset=function(){G(this.ub);this.vg=!0;this.Ad.clear();this.hh=!1};k.prototype.dump=function(a){this.Yl();this.dv();this.ub.length&&a.push(this.ub)};da=k;var O="lighter xor copy destination-over source-in destination-in source-out destination-out source-atop destination-atop".split(" ");kb=function(a){return 0>=a||11<=a?"source-over":
O[a-1]};mb=function(a,d,e){if(e)switch(a.Qb=e.ONE,a.Kb=e.ONE_MINUS_SRC_ALPHA,d){case 1:a.Qb=e.ONE;a.Kb=e.ONE;break;case 3:a.Qb=e.ONE;a.Kb=e.ZERO;break;case 4:a.Qb=e.ONE_MINUS_DST_ALPHA;a.Kb=e.ONE;break;case 5:a.Qb=e.DST_ALPHA;a.Kb=e.ZERO;break;case 6:a.Qb=e.ZERO;a.Kb=e.SRC_ALPHA;break;case 7:a.Qb=e.ONE_MINUS_DST_ALPHA;a.Kb=e.ZERO;break;case 8:a.Qb=e.ZERO;a.Kb=e.ONE_MINUS_SRC_ALPHA;break;case 9:a.Qb=e.DST_ALPHA;a.Kb=e.ONE_MINUS_SRC_ALPHA;break;case 10:a.Qb=e.ONE_MINUS_DST_ALPHA,a.Kb=e.SRC_ALPHA}};
nb=function(a){return Math.round(1E6*a)/1E6};ob=function(a,d){return"string"!==typeof a||"string"!==typeof d||a.length!==d.length?!1:a===d?!0:a.toLowerCase()===d.toLowerCase()};pb=function(a){a=a.target;return!a||a===document||a===window||document&&document.body&&a===document.body||ob(a.tagName,"canvas")?!0:!1}})();var ic="undefined"!==typeof Float32Array?Float32Array:Array;function jc(h){var l=new ic(3);h&&(l[0]=h[0],l[1]=h[1],l[2]=h[2]);return l}
function kc(h){var l=new ic(16);h&&(l[0]=h[0],l[1]=h[1],l[2]=h[2],l[3]=h[3],l[4]=h[4],l[5]=h[5],l[6]=h[6],l[7]=h[7],l[8]=h[8],l[9]=h[9],l[10]=h[10],l[11]=h[11],l[12]=h[12],l[13]=h[13],l[14]=h[14],l[15]=h[15]);return l}function lc(h,l){l[0]=h[0];l[1]=h[1];l[2]=h[2];l[3]=h[3];l[4]=h[4];l[5]=h[5];l[6]=h[6];l[7]=h[7];l[8]=h[8];l[9]=h[9];l[10]=h[10];l[11]=h[11];l[12]=h[12];l[13]=h[13];l[14]=h[14];l[15]=h[15]}
function mc(h,l){var f=l[0],p=l[1];l=l[2];h[0]*=f;h[1]*=f;h[2]*=f;h[3]*=f;h[4]*=p;h[5]*=p;h[6]*=p;h[7]*=p;h[8]*=l;h[9]*=l;h[10]*=l;h[11]*=l}
function nc(h,l,f,p){p||(p=kc());var u,r,t,a,g,b,d,c,k=h[0],e=h[1];h=h[2];r=f[0];t=f[1];u=f[2];f=l[1];b=l[2];k===l[0]&&e===f&&h===b?(h=p,h[0]=1,h[1]=0,h[2]=0,h[3]=0,h[4]=0,h[5]=1,h[6]=0,h[7]=0,h[8]=0,h[9]=0,h[10]=1,h[11]=0,h[12]=0,h[13]=0,h[14]=0,h[15]=1):(f=k-l[0],b=e-l[1],d=h-l[2],c=1/Math.sqrt(f*f+b*b+d*d),f*=c,b*=c,d*=c,l=t*d-u*b,u=u*f-r*d,r=r*b-t*f,(c=Math.sqrt(l*l+u*u+r*r))?(c=1/c,l*=c,u*=c,r*=c):r=u=l=0,t=b*r-d*u,a=d*l-f*r,g=f*u-b*l,(c=Math.sqrt(t*t+a*a+g*g))?(c=1/c,t*=c,a*=c,g*=c):g=a=t=0,
p[0]=l,p[1]=t,p[2]=f,p[3]=0,p[4]=u,p[5]=a,p[6]=b,p[7]=0,p[8]=r,p[9]=g,p[10]=d,p[11]=0,p[12]=-(l*k+u*e+r*h),p[13]=-(t*k+a*e+g*h),p[14]=-(f*k+b*e+d*h),p[15]=1)}
(function(){function h(a,g,b){this.Je=/msie/i.test(navigator.userAgent)||/trident/i.test(navigator.userAgent);this.height=this.width=0;this.Fa=!!b;this.Yj=this.Nh=!1;this.Ml=0;this.nl=1;this.bo=1E3;this.Ay=(this.bo-this.nl)/32768;this.Dl=jc([0,0,100]);this.$p=jc([0,0,0]);this.Lr=jc([0,1,0]);this.Si=jc([1,1,1]);this.ip=!0;this.ok=kc();this.Cc=kc();this.Fm=kc();this.Ll=kc();this.B=a;this.Fp()}function l(a,g,b){this.B=a;this.Ci=g;this.name=b;this.Nc=a.getAttribLocation(g,"aPos");this.Oe=a.getAttribLocation(g,
"aTex");this.Yp=a.getUniformLocation(g,"matP");this.jk=a.getUniformLocation(g,"matMV");this.Dg=a.getUniformLocation(g,"opacity");this.Lm=a.getUniformLocation(g,"colorFill");this.Zp=a.getUniformLocation(g,"samplerFront");this.di=a.getUniformLocation(g,"samplerBack");this.Gf=a.getUniformLocation(g,"destStart");this.Ff=a.getUniformLocation(g,"destEnd");this.fi=a.getUniformLocation(g,"seconds");this.Nm=a.getUniformLocation(g,"pixelWidth");this.Mm=a.getUniformLocation(g,"pixelHeight");this.ci=a.getUniformLocation(g,
"layerScale");this.bi=a.getUniformLocation(g,"layerAngle");this.gi=a.getUniformLocation(g,"viewOrigin");this.ei=a.getUniformLocation(g,"scrollPos");this.yw=!!(this.Nm||this.Mm||this.fi||this.di||this.Gf||this.Ff||this.ci||this.bi||this.gi||this.ei);this.iq=this.jq=-999;this.nk=1;this.dq=this.cq=0;this.gq=this.bq=this.aq=1;this.mq=this.lq=this.kq=this.oq=this.nq=this.fq=0;this.Em=[];this.hq=kc();this.Dg&&a.uniform1f(this.Dg,1);this.Lm&&a.uniform4f(this.Lm,1,1,1,1);this.Zp&&a.uniform1i(this.Zp,0);this.di&&
a.uniform1i(this.di,1);this.Gf&&a.uniform2f(this.Gf,0,0);this.Ff&&a.uniform2f(this.Ff,1,1);this.ci&&a.uniform1f(this.ci,1);this.bi&&a.uniform1f(this.bi,0);this.gi&&a.uniform2f(this.gi,0,0);this.ei&&a.uniform2f(this.ei,0,0);this.fi&&a.uniform1f(this.fi,0);this.rf=!1}function f(a,g){return a[0]===g[0]&&a[1]===g[1]&&a[2]===g[2]&&a[3]===g[3]&&a[4]===g[4]&&a[5]===g[5]&&a[6]===g[6]&&a[7]===g[7]&&a[8]===g[8]&&a[9]===g[9]&&a[10]===g[10]&&a[11]===g[11]&&a[12]===g[12]&&a[13]===g[13]&&a[14]===g[14]&&a[15]===
g[15]}function p(a,g){this.type=a;this.u=g;this.B=g.B;this.wd=this.Xb=this.Kq=0;this.Z=this.Tc=null;this.qr=[]}var u=kc();h.prototype.Fp=function(){var a=this.B,g;this.Tp=1;this.Bf=this.Af=null;this.wj=1;a.clearColor(0,0,0,0);a.clear(a.COLOR_BUFFER_BIT);a.enable(a.BLEND);a.blendFunc(a.ONE,a.ONE_MINUS_SRC_ALPHA);a.disable(a.CULL_FACE);a.disable(a.STENCIL_TEST);a.disable(a.DITHER);this.Fa?(a.enable(a.DEPTH_TEST),a.depthFunc(a.LEQUAL)):a.disable(a.DEPTH_TEST);this.Up=a.ONE;this.Sp=a.ONE_MINUS_SRC_ALPHA;
this.ll=new Float32Array(8E3*(this.Fa?3:2));this.Zk=new Float32Array(16E3);this.Vq=new Float32Array(32E3);this.jn=a.createBuffer();a.bindBuffer(a.ARRAY_BUFFER,this.jn);a.bufferData(a.ARRAY_BUFFER,this.Vq.byteLength,a.DYNAMIC_DRAW);this.Qi=Array(4);this.Hi=Array(4);for(g=0;4>g;g++)this.Qi[g]=a.createBuffer(),a.bindBuffer(a.ARRAY_BUFFER,this.Qi[g]),a.bufferData(a.ARRAY_BUFFER,this.ll.byteLength,a.DYNAMIC_DRAW),this.Hi[g]=a.createBuffer(),a.bindBuffer(a.ARRAY_BUFFER,this.Hi[g]),a.bufferData(a.ARRAY_BUFFER,
this.Zk.byteLength,a.DYNAMIC_DRAW);this.Pd=0;this.Cw=a.createBuffer();a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.Cw);for(var b=new Uint16Array(12E3),d=g=0;12E3>g;)b[g++]=d,b[g++]=d+1,b[g++]=d+2,b[g++]=d,b[g++]=d+2,b[g++]=d+3,d+=4;a.bufferData(a.ELEMENT_ARRAY_BUFFER,b,a.STATIC_DRAW);this.kn=this.Rg=this.me=0;this.Na=[];g=this.Fa?"attribute highp vec3 aPos;\nattribute mediump vec2 aTex;\nvarying mediump vec2 vTex;\nuniform highp mat4 matP;\nuniform highp mat4 matMV;\nvoid main(void) {\n\tgl_Position = matP * matMV * vec4(aPos.x, aPos.y, aPos.z, 1.0);\n\tvTex = aTex;\n}":
"attribute highp vec2 aPos;\nattribute mediump vec2 aTex;\nvarying mediump vec2 vTex;\nuniform highp mat4 matP;\nuniform highp mat4 matMV;\nvoid main(void) {\n\tgl_Position = matP * matMV * vec4(aPos.x, aPos.y, 0.0, 1.0);\n\tvTex = aTex;\n}";b=this.oh({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}"},g,"<default>");this.Na.push(b);b=this.oh({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.Na.push(b);b=this.oh({src:"varying mediump vec2 vTex;\nuniform lowp sampler2D samplerFront;\nvoid main(void) {\n\tif (texture2D(samplerFront, vTex).a < 1.0)\n\t\tdiscard;\n}"},g,"<earlyz>");this.Na.push(b);b=this.oh({src:"uniform lowp vec4 colorFill;\nvoid main(void) {\n\tgl_FragColor = colorFill;\n}"},
g,"<fill>");this.Na.push(b);for(var c in oc)oc.hasOwnProperty(c)&&this.Na.push(this.oh(oc[c],g,c));a.activeTexture(a.TEXTURE0);a.bindTexture(a.TEXTURE_2D,null);this.xe=[];this.Od=0;this.Lb=!1;this.dp=this.$h=-1;this.eg=null;this.Wl=a.createFramebuffer();this.Aj=this.Kk=null;this.Qo=!1;this.Fa&&(this.Aj=a.createRenderbuffer());this.Se=jc([0,0,0]);this.pq=a.getParameter(a.ALIASED_POINT_SIZE_RANGE)[1];2048<this.pq&&(this.pq=2048);this.jc(0)};l.prototype.Rn=function(a){f(this.hq,a)||(lc(a,this.hq),this.B.uniformMatrix4fv(this.jk,
!1,a))};h.prototype.oh=function(a,g,b){var d=this.B,c=d.createShader(d.FRAGMENT_SHADER);d.shaderSource(c,a.src);d.compileShader(c);if(!d.getShaderParameter(c,d.COMPILE_STATUS))return d.deleteShader(c),null;var k=d.createShader(d.VERTEX_SHADER);d.shaderSource(k,g);d.compileShader(k);if(!d.getShaderParameter(k,d.COMPILE_STATUS))return d.deleteShader(c),d.deleteShader(k),null;g=d.createProgram();d.attachShader(g,c);d.attachShader(g,k);d.linkProgram(g);if(!d.getProgramParameter(g,d.LINK_STATUS))return d.deleteShader(c),
d.deleteShader(k),d.deleteProgram(g),null;d.useProgram(g);d.deleteShader(c);d.deleteShader(k);b=new l(d,g,b);b.Ul=a.Ul||0;b.Vl=a.Vl||0;b.cp=!!a.cp;b.cd=!!a.cd;b.Oo=!!a.Oo;b.aa=a.aa||[];a=0;for(c=b.aa.length;a<c;a++)b.aa[a][1]=d.getUniformLocation(g,b.aa[a][0]),b.Em.push(0),d.uniform1f(b.aa[a][1],0);return b};h.prototype.jm=function(a){var g,b;g=0;for(b=this.Na.length;g<b;g++)if(this.Na[g].name===a)return g;return-1};h.prototype.Xq=function(a,g,b){var d=this.Cc,c=this.ok,k=[0,0,0,0,0,0,0,0];k[0]=d[0]*
a+d[4]*g+d[12];k[1]=d[1]*a+d[5]*g+d[13];k[2]=d[2]*a+d[6]*g+d[14];k[3]=d[3]*a+d[7]*g+d[15];k[4]=c[0]*k[0]+c[4]*k[1]+c[8]*k[2]+c[12]*k[3];k[5]=c[1]*k[0]+c[5]*k[1]+c[9]*k[2]+c[13]*k[3];k[6]=c[2]*k[0]+c[6]*k[1]+c[10]*k[2]+c[14]*k[3];k[7]=-k[2];0!==k[7]&&(k[7]=1/k[7],k[4]*=k[7],k[5]*=k[7],k[6]*=k[7],b[0]=(.5*k[4]+.5)*this.width,b[1]=(.5*k[5]+.5)*this.height)};h.prototype.Pf=function(a,g,b){if(this.width!==a||this.height!==g||b){this.kf();b=this.B;this.width=a;this.height=g;b.viewport(0,0,a,g);nc(this.Dl,
this.$p,this.Lr,this.Cc);if(this.Fa){var d=-a/2;a=a/2;var c=g/2;g=-g/2;var k=this.nl,e=this.bo,n=this.ok;n||(n=kc());var q=a-d,v=g-c,m=e-k;n[0]=2/q;n[1]=0;n[2]=0;n[3]=0;n[4]=0;n[5]=2/v;n[6]=0;n[7]=0;n[8]=0;n[9]=0;n[10]=-2/m;n[11]=0;n[12]=-(d+a)/q;n[13]=-(g+c)/v;n[14]=-(e+k)/m;n[15]=1;this.Si[0]=1;this.Si[1]=1}else g=a/g,d=this.nl,a=this.bo,n=this.ok,e=d*Math.tan(45*Math.PI/360),g*=e,c=-g,k=-e,n||(n=kc()),q=g-c,v=e-k,m=a-d,n[0]=2*d/q,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=2*d/v,n[6]=0,n[7]=0,n[8]=(g+c)/
q,n[9]=(e+k)/v,n[10]=-(a+d)/m,n[11]=-1,n[12]=0,n[13]=0,n[14]=-(a*d*2)/m,n[15]=0,d=[0,0],a=[0,0],this.Xq(0,0,d),this.Xq(1,1,a),this.Si[0]=1/(a[0]-d[0]),this.Si[1]=-1/(a[1]-d[1]);d=0;for(a=this.Na.length;d<a;d++)c=this.Na[d],c.rf=!1,c.Yp&&(b.useProgram(c.Ci),b.uniformMatrix4fv(c.Yp,!1,this.ok));b.useProgram(this.Na[this.$h].Ci);b.bindTexture(b.TEXTURE_2D,null);b.activeTexture(b.TEXTURE1);b.bindTexture(b.TEXTURE_2D,null);b.activeTexture(b.TEXTURE0);this.Bf=this.Af=null;this.Aj&&(b.bindFramebuffer(b.FRAMEBUFFER,
this.Wl),b.bindRenderbuffer(b.RENDERBUFFER,this.Aj),b.renderbufferStorage(b.RENDERBUFFER,b.DEPTH_COMPONENT16,this.width,this.height),this.Qo||(b.framebufferRenderbuffer(b.FRAMEBUFFER,b.DEPTH_ATTACHMENT,b.RENDERBUFFER,this.Aj),this.Qo=!0),b.bindRenderbuffer(b.RENDERBUFFER,null),b.bindFramebuffer(b.FRAMEBUFFER,null),this.Kk=null)}};h.prototype.Dd=function(){nc(this.Dl,this.$p,this.Lr,this.Cc);mc(this.Cc,this.Si)};h.prototype.translate=function(a,g){if(0!==a||0!==g){this.Se[0]=a;this.Se[1]=g;this.Se[2]=
0;var b=this.Cc,d=this.Se,c=d[0],k=d[1],d=d[2];b[12]=b[0]*c+b[4]*k+b[8]*d+b[12];b[13]=b[1]*c+b[5]*k+b[9]*d+b[13];b[14]=b[2]*c+b[6]*k+b[10]*d+b[14];b[15]=b[3]*c+b[7]*k+b[11]*d+b[15]}};h.prototype.scale=function(a,g){if(1!==a||1!==g)this.Se[0]=a,this.Se[1]=g,this.Se[2]=1,mc(this.Cc,this.Se)};h.prototype.vn=function(a){if(0!==a){var g=this.Cc,b,d=Math.sin(a);a=Math.cos(a);var c=g[0],k=g[1],e=g[2],n=g[3],q=g[4],v=g[5],m=g[6],w=g[7];b?g!==b&&(b[8]=g[8],b[9]=g[9],b[10]=g[10],b[11]=g[11],b[12]=g[12],b[13]=
g[13],b[14]=g[14],b[15]=g[15]):b=g;b[0]=c*a+q*d;b[1]=k*a+v*d;b[2]=e*a+m*d;b[3]=n*a+w*d;b[4]=c*-d+q*a;b[5]=k*-d+v*a;b[6]=e*-d+m*a;b[7]=n*-d+w*a}};h.prototype.kd=function(){if(!f(this.Fm,this.Cc)){var a=this.sc();a.type=5;a.Z?lc(this.Cc,a.Z):a.Z=kc(this.Cc);lc(this.Cc,this.Fm);this.Lb=!1}};h.prototype.Sk=function(a){this.Fa&&(32760<a&&(a=32760),this.Ml=this.Dl[2]-this.nl-a*this.Ay)};p.prototype.Ou=function(){var a=this.B,g=this.u;0!==this.Xb?(a.depthMask(!0),a.colorMask(!1,!1,!1,!1),a.disable(a.BLEND),
a.bindFramebuffer(a.FRAMEBUFFER,g.Wl),a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,null,0),a.clear(a.DEPTH_BUFFER_BIT),a.bindFramebuffer(a.FRAMEBUFFER,null),g.Yj=!0):(a.depthMask(!1),a.colorMask(!0,!0,!0,!0),a.enable(a.BLEND),g.Yj=!1)};p.prototype.Su=function(){this.B.bindTexture(this.B.TEXTURE_2D,this.Tc)};p.prototype.Tu=function(){var a=this.B;a.activeTexture(a.TEXTURE1);a.bindTexture(a.TEXTURE_2D,this.Tc);a.activeTexture(a.TEXTURE0)};p.prototype.Pu=function(){var a=this.Kq,
g=this.u;g.wj=a;g=g.eg;g.Dg&&g.nk!==a&&(g.nk=a,this.B.uniform1f(g.Dg,a))};p.prototype.Ju=function(){this.B.drawElements(this.B.TRIANGLES,this.wd,this.B.UNSIGNED_SHORT,this.Xb)};p.prototype.Lu=function(){this.B.blendFunc(this.Xb,this.wd)};p.prototype.Uu=function(){var a,g,b,d=this.u.Na,c=this.u.dp;a=0;for(g=d.length;a<g;a++)b=d[a],a===c&&b.jk?(b.Rn(this.Z),b.rf=!0):b.rf=!1;lc(this.Z,this.u.Ll)};p.prototype.Ku=function(){var a=this.B,g=this.u;this.Tc?(g.Bf===this.Tc&&(a.activeTexture(a.TEXTURE1),a.bindTexture(a.TEXTURE_2D,
null),g.Bf=null,a.activeTexture(a.TEXTURE0)),a.bindFramebuffer(a.FRAMEBUFFER,g.Wl),g.Yj||a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,this.Tc,0)):(g.Fa||a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,null,0),a.bindFramebuffer(a.FRAMEBUFFER,null))};p.prototype.Gu=function(){var a=this.B,g=this.Xb;0===g?(a.clearColor(this.Z[0],this.Z[1],this.Z[2],this.Z[3]),a.clear(a.COLOR_BUFFER_BIT)):1===g?(a.enable(a.SCISSOR_TEST),a.scissor(this.Z[0],this.Z[1],this.Z[2],
this.Z[3]),a.clearColor(0,0,0,0),a.clear(a.COLOR_BUFFER_BIT),a.disable(a.SCISSOR_TEST)):a.clear(a.DEPTH_BUFFER_BIT)};p.prototype.Nu=function(){var a=this.B;0!==this.Xb?a.enable(a.DEPTH_TEST):a.disable(a.DEPTH_TEST)};p.prototype.Iu=function(){var a=this.B,g=this.u;g.Fa&&a.disable(a.DEPTH_TEST);var b=g.Na[1];a.useProgram(b.Ci);!b.rf&&b.jk&&(b.Rn(g.Ll),b.rf=!0);a.enableVertexAttribArray(b.Nc);a.bindBuffer(a.ARRAY_BUFFER,g.jn);a.vertexAttribPointer(b.Nc,4,a.FLOAT,!1,0,0);a.drawArrays(a.POINTS,this.Xb/
4,this.wd);b=g.eg;a.useProgram(b.Ci);0<=b.Nc&&(a.enableVertexAttribArray(b.Nc),a.bindBuffer(a.ARRAY_BUFFER,g.Qi[g.Pd]),a.vertexAttribPointer(b.Nc,g.Fa?3:2,a.FLOAT,!1,0,0));0<=b.Oe&&(a.enableVertexAttribArray(b.Oe),a.bindBuffer(a.ARRAY_BUFFER,g.Hi[g.Pd]),a.vertexAttribPointer(b.Oe,2,a.FLOAT,!1,0,0));g.Fa&&a.enable(a.DEPTH_TEST)};p.prototype.Qu=function(){var a=this.B,g=this.u,b=g.Na[this.Xb];g.dp=this.Xb;g.eg=b;a.useProgram(b.Ci);!b.rf&&b.jk&&(b.Rn(g.Ll),b.rf=!0);b.Dg&&b.nk!==g.wj&&(b.nk=g.wj,a.uniform1f(b.Dg,
g.wj));0<=b.Nc&&(a.enableVertexAttribArray(b.Nc),a.bindBuffer(a.ARRAY_BUFFER,g.Qi[g.Pd]),a.vertexAttribPointer(b.Nc,g.Fa?3:2,a.FLOAT,!1,0,0));0<=b.Oe&&(a.enableVertexAttribArray(b.Oe),a.bindBuffer(a.ARRAY_BUFFER,g.Hi[g.Pd]),a.vertexAttribPointer(b.Oe,2,a.FLOAT,!1,0,0))};p.prototype.Mu=function(){var a=this.Z;this.B.uniform4f(this.u.eg.Lm,a[0],a[1],a[2],a[3])};p.prototype.Ru=function(){var a,g,b=this.u.eg,d=this.B;a=this.Z;b.di&&this.u.Bf!==this.Tc&&(d.activeTexture(d.TEXTURE1),d.bindTexture(d.TEXTURE_2D,
this.Tc),this.u.Bf=this.Tc,d.activeTexture(d.TEXTURE0));var c=a[0];b.Nm&&c!==b.jq&&(b.jq=c,d.uniform1f(b.Nm,c));c=a[1];b.Mm&&c!==b.iq&&(b.iq=c,d.uniform1f(b.Mm,c));c=a[2];g=a[3];!b.Gf||c===b.cq&&g===b.dq||(b.cq=c,b.dq=g,d.uniform2f(b.Gf,c,g));c=a[4];g=a[5];!b.Ff||c===b.aq&&g===b.bq||(b.aq=c,b.bq=g,d.uniform2f(b.Ff,c,g));c=a[6];b.ci&&c!==b.gq&&(b.gq=c,d.uniform1f(b.ci,c));c=a[7];b.bi&&c!==b.fq&&(b.fq=c,d.uniform1f(b.bi,c));c=a[8];g=a[9];!b.gi||c===b.nq&&g===b.oq||(b.nq=c,b.oq=g,d.uniform2f(b.gi,c,
g));c=a[10];g=a[11];!b.ei||c===b.kq&&g===b.lq||(b.kq=c,b.lq=g,d.uniform2f(b.ei,c,g));c=a[12];b.fi&&c!==b.mq&&(b.mq=c,d.uniform1f(b.fi,c));if(b.aa.length)for(a=0,g=b.aa.length;a<g;a++)c=this.qr[a],c!==b.Em[a]&&(b.Em[a]=c,d.uniform1f(b.aa[a][1],c))};h.prototype.sc=function(){this.Od===this.xe.length&&this.xe.push(new p(0,this));return this.xe[this.Od++]};h.prototype.kf=function(){if(0!==this.Od&&!this.B.isContextLost()){var a=this.B;0<this.kn&&(a.bindBuffer(a.ARRAY_BUFFER,this.jn),a.bufferSubData(a.ARRAY_BUFFER,
0,this.Vq.subarray(0,this.kn)),g&&0<=g.Nc&&"<point>"===g.name&&a.vertexAttribPointer(g.Nc,4,a.FLOAT,!1,0,0));if(0<this.me){var g=this.eg;a.bindBuffer(a.ARRAY_BUFFER,this.Qi[this.Pd]);a.bufferSubData(a.ARRAY_BUFFER,0,this.ll.subarray(0,this.me));g&&0<=g.Nc&&"<point>"!==g.name&&a.vertexAttribPointer(g.Nc,this.Fa?3:2,a.FLOAT,!1,0,0);a.bindBuffer(a.ARRAY_BUFFER,this.Hi[this.Pd]);a.bufferSubData(a.ARRAY_BUFFER,0,this.Zk.subarray(0,this.Rg));g&&0<=g.Oe&&"<point>"!==g.name&&a.vertexAttribPointer(g.Oe,2,
a.FLOAT,!1,0,0)}for(var b,a=0,g=this.Od;a<g;a++)switch(b=this.xe[a],b.type){case 1:b.Ju();break;case 2:b.Su();break;case 3:b.Pu();break;case 4:b.Lu();break;case 5:b.Uu();break;case 6:b.Ku();break;case 7:b.Gu();break;case 8:b.Iu();break;case 9:b.Qu();break;case 10:b.Ru();break;case 11:b.Tu();break;case 12:b.Mu();break;case 13:b.Nu();break;case 14:b.Ou()}this.kn=this.Rg=this.me=this.Od=0;this.Yj=this.Lb=!1;this.Pd++;4<=this.Pd&&(this.Pd=0)}};h.prototype.Of=function(a){if(a!==this.Tp&&!this.Nh){var g=
this.sc();g.type=3;this.Tp=g.Kq=a;this.Lb=!1}};h.prototype.tc=function(a){if(a!==this.Af){var g=this.sc();g.type=2;this.Af=g.Tc=a;this.Lb=!1}};h.prototype.Qe=function(a,g){if((a!==this.Up||g!==this.Sp)&&!this.Nh){var b=this.sc();b.type=4;b.Xb=a;b.wd=g;this.Up=a;this.Sp=g;this.Lb=!1}};h.prototype.gr=function(){this.Qe(this.B.ONE,this.B.ONE_MINUS_SRC_ALPHA)};h.prototype.si=function(a,g,b,d,c,k,e,n){15992<=this.me&&this.kf();var q=this.me,v=this.Rg,m=this.ll,w=this.Zk,h=this.Ml;if(this.Lb)this.xe[this.Od-
1].wd+=6;else{var f=this.sc();f.type=1;f.Xb=this.Fa?q:q/2*3;f.wd=6;this.Lb=!0}this.Fa?(m[q++]=a,m[q++]=g,m[q++]=h,m[q++]=b,m[q++]=d,m[q++]=h,m[q++]=c,m[q++]=k,m[q++]=h,m[q++]=e,m[q++]=n,m[q++]=h):(m[q++]=a,m[q++]=g,m[q++]=b,m[q++]=d,m[q++]=c,m[q++]=k,m[q++]=e,m[q++]=n);w[v++]=0;w[v++]=0;w[v++]=1;w[v++]=0;w[v++]=1;w[v++]=1;w[v++]=0;w[v++]=1;this.me=q;this.Rg=v};h.prototype.Bd=function(a,g,b,d,c,k,e,n,q){15992<=this.me&&this.kf();var v=this.me,m=this.Rg,w=this.ll,h=this.Zk,f=this.Ml;if(this.Lb)this.xe[this.Od-
1].wd+=6;else{var l=this.sc();l.type=1;l.Xb=this.Fa?v:v/2*3;l.wd=6;this.Lb=!0}var l=q.left,t=q.top,u=q.right;q=q.bottom;this.Fa?(w[v++]=a,w[v++]=g,w[v++]=f,w[v++]=b,w[v++]=d,w[v++]=f,w[v++]=c,w[v++]=k,w[v++]=f,w[v++]=e,w[v++]=n,w[v++]=f):(w[v++]=a,w[v++]=g,w[v++]=b,w[v++]=d,w[v++]=c,w[v++]=k,w[v++]=e,w[v++]=n);h[m++]=l;h[m++]=t;h[m++]=u;h[m++]=t;h[m++]=u;h[m++]=q;h[m++]=l;h[m++]=q;this.me=v;this.Rg=m};h.prototype.jc=function(a){if(this.$h!==a){if(!this.Na[a]){if(0===this.$h)return;a=0}var g=this.sc();
g.type=9;this.$h=g.Xb=a;this.Lb=!1}};h.prototype.qi=function(a){a=this.Na[a];return!(!a.Gf&&!a.Ff)};h.prototype.nn=function(a){a=this.Na[a];return!!(a.Gf||a.Ff||a.cp)};h.prototype.mn=function(a){return this.Na[a].cd};h.prototype.Fx=function(a){a=this.Na[a];return 0!==a.Ul||0!==a.Vl};h.prototype.ew=function(a){return this.Na[a].Ul};h.prototype.fw=function(a){return this.Na[a].Vl};h.prototype.gw=function(a,g){return this.Na[a].aa[g][2]};h.prototype.Gk=function(a){return this.Na[a].Oo};h.prototype.Mg=
function(a,g,b,d,c,k,e,n,q,v,m,w,h,f,l){var t=this.Na[this.$h],u,p;if(t.yw||l.length){u=this.sc();u.type=10;u.Z?lc(this.Cc,u.Z):u.Z=kc();p=u.Z;p[0]=g;p[1]=b;p[2]=d;p[3]=c;p[4]=k;p[5]=e;p[6]=n;p[7]=q;p[8]=v;p[9]=m;p[10]=w;p[11]=h;p[12]=f;t.di?u.Tc=a:u.Tc=null;if(l.length)for(b=u.qr,b.length=l.length,a=0,g=l.length;a<g;a++)b[a]=l[a];this.Lb=!1}};h.prototype.clear=function(a,g,b,d){var c=this.sc();c.type=7;c.Xb=0;c.Z||(c.Z=kc());c.Z[0]=a;c.Z[1]=g;c.Z[2]=b;c.Z[3]=d;this.Lb=!1};h.prototype.clearRect=function(a,
g,b,d){if(!(0>b||0>d)){var c=this.sc();c.type=7;c.Xb=1;c.Z||(c.Z=kc());c.Z[0]=a;c.Z[1]=g;c.Z[2]=b;c.Z[3]=d;this.Lb=!1}};h.prototype.kr=function(a){if(this.Fa&&(a=!!a,this.Nh!==a)){var g=this.sc();g.type=14;g.Xb=a?1:0;this.Lb=!1;this.Nh=a;this.Kk=null;this.Nh?this.jc(2):this.jc(0)}};h.prototype.ir=function(a){if(this.Fa){var g=this.sc();g.type=13;g.Xb=a?1:0;this.Lb=!1}};h.prototype.rp=function(){lc(this.Fm,u);this.Dd();this.kd();var a=this.width/2,g=this.height/2;this.si(-a,g,a,g,a,-g,-a,-g);lc(u,
this.Cc);this.kd()};h.prototype.hr=function(a,g,b){this.jc(3);var d=this.sc();d.type=12;d.Z||(d.Z=kc());d.Z[0]=a;d.Z[1]=g;d.Z[2]=b;d.Z[3]=1;this.Lb=!1};h.prototype.cy=function(){this.jc(0)};h.prototype.Mx=function(){this.jc(2)};h.prototype.Ex=function(){this.kf();this.B.flush()};var r=[],t={};h.prototype.wu=function(){G(r);t={}};h.prototype.Bg=function(a,g,b,d){g=!!g;b=!!b;var c=a.src+","+g+","+b+(g?",undefined":""),k=null;if("undefined"!==typeof a.src&&t.hasOwnProperty(c))return k=t[c],k.jj++,k;
this.kf();var e=this.B,n=ia(a.width)&&ia(a.height),k=e.createTexture();e.bindTexture(e.TEXTURE_2D,k);e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0);var q=e.RGBA,v=e.RGBA,m=e.UNSIGNED_BYTE;if(d&&!this.Je)switch(d){case 1:v=q=e.RGB;break;case 2:m=e.UNSIGNED_SHORT_4_4_4_4;break;case 3:m=e.UNSIGNED_SHORT_5_5_5_1;break;case 4:v=q=e.RGB,m=e.UNSIGNED_SHORT_5_6_5}if(!n&&g){d=document.createElement("canvas");d.width=ja(a.width);d.height=ja(a.height);var w=d.getContext("2d");"undefined"!==typeof w.imageSmoothingEnabled?
w.imageSmoothingEnabled=b:(w.webkitImageSmoothingEnabled=b,w.mozImageSmoothingEnabled=b,w.msImageSmoothingEnabled=b);w.drawImage(a,0,0,a.width,a.height,0,0,d.width,d.height);e.texImage2D(e.TEXTURE_2D,0,q,v,m,d)}else e.texImage2D(e.TEXTURE_2D,0,q,v,m,a);g?(e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.REPEAT)):(e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE));b?(e.texParameteri(e.TEXTURE_2D,
e.TEXTURE_MAG_FILTER,e.LINEAR),n&&this.ip?(e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR_MIPMAP_LINEAR),e.generateMipmap(e.TEXTURE_2D)):e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR)):(e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST));e.bindTexture(e.TEXTURE_2D,null);this.Af=null;k.$e=a.width;k.Ze=a.height;k.jj=1;k.Vo=c;r.push(k);return t[c]=k};h.prototype.Ic=function(a,g,b){var d;this.kf();var c=this.B;
this.Je&&(d=!1);var k=c.createTexture();c.bindTexture(c.TEXTURE_2D,k);c.texImage2D(c.TEXTURE_2D,0,c.RGBA,a,g,0,c.RGBA,d?c.UNSIGNED_SHORT_4_4_4_4:c.UNSIGNED_BYTE,null);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,b?c.LINEAR:c.NEAREST);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,b?c.LINEAR:c.NEAREST);c.bindTexture(c.TEXTURE_2D,null);this.Af=null;k.$e=a;k.Ze=g;r.push(k);
return k};h.prototype.deleteTexture=function(a){a&&("undefined"!==typeof a.jj&&1<a.jj?a.jj--:(this.kf(),a===this.Af&&(this.B.bindTexture(this.B.TEXTURE_2D,null),this.Af=null),a===this.Bf&&(this.B.activeTexture(this.B.TEXTURE1),this.B.bindTexture(this.B.TEXTURE_2D,null),this.B.activeTexture(this.B.TEXTURE0),this.Bf=null),Ea(r,a),"undefined"!==typeof a.Vo&&delete t[a.Vo],this.B.deleteTexture(a)))};h.prototype.Qc=function(a){if(a!==this.Kk){var g=this.sc();g.type=6;this.Kk=g.Tc=a;this.Lb=!1}};qb=h})();
(function(){function h(a){if(a&&(a.getContext||a.dc)&&!a.c2runtime){a.c2runtime=this;var d=this;this.cc=(this.Mh=/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.Mb=!!a.dc;this.Kp="undefined"!==typeof window.AppMobi||
this.Mb;this.Ac=!!window.c2cocoonjs;this.Lc=!!window.c2ejecta;this.Ac&&(CocoonJS.App.onSuspended.addEventListener(function(){d.setSuspended(!0)}),CocoonJS.App.onActivated.addEventListener(function(){d.setSuspended(!1)}));this.Lc&&(document.addEventListener("pagehide",function(){d.setSuspended(!0)}),document.addEventListener("pageshow",function(){d.setSuspended(!1)}),document.addEventListener("resize",function(){d.setSize(window.innerWidth,window.innerHeight)}));this.Ca=this.Mb||this.Ac||this.Lc;this.Ph=
/edge\//i.test(navigator.userAgent);this.Je=(/msie/i.test(navigator.userAgent)||/trident/i.test(navigator.userAgent)||/iemobile/i.test(navigator.userAgent))&&!this.Ph;this.Mp=/tizen/i.test(navigator.userAgent);this.Kh=/android/i.test(navigator.userAgent)&&!this.Mp&&!this.Je&&!this.Ph;this.Qp=(/iphone/i.test(navigator.userAgent)||/ipod/i.test(navigator.userAgent))&&!this.Je&&!this.Ph;this.Tw=/ipad/i.test(navigator.userAgent);this.zf=this.Qp||this.Tw||this.Lc;this.Lh=(/chrome/i.test(navigator.userAgent)||
/chromium/i.test(navigator.userAgent))&&!this.Je&&!this.Ph;this.xm=/amazonwebappplatform/i.test(navigator.userAgent);this.Lw=/firefox/i.test(navigator.userAgent);this.Pw=/safari/i.test(navigator.userAgent)&&!this.Lh&&!this.Je&&!this.Ph;this.Qw=/windows/i.test(navigator.userAgent);this.Ke="undefined"!==typeof window.c2nodewebkit||"undefined"!==typeof window.c2nwjs||/nodewebkit/i.test(navigator.userAgent)||/nwjs/i.test(navigator.userAgent);this.Np=!("undefined"===typeof window.c2isWindows8||!window.c2isWindows8);
this.Sw=!("undefined"===typeof window.c2isWindows8Capable||!window.c2isWindows8Capable);this.yf=!("undefined"===typeof window.c2isWindowsPhone8||!window.c2isWindowsPhone8);this.ak=!("undefined"===typeof window.c2isWindowsPhone81||!window.c2isWindowsPhone81);this.Cm=!!window.cr_windows10;this.$j=this.Np||this.Sw||this.ak||this.Cm;this.Jw=!("undefined"===typeof window.c2isBlackberry10||!window.c2isBlackberry10);this.Xj=this.Kh&&!this.Lh&&!this.Mh&&!this.Lw&&!this.xm&&!this.Ca;this.devicePixelRatio=
1;this.wf=this.cc||this.Mh||this.Kp||this.Ac||this.Kh||this.zf||this.yf||this.ak||this.Jw||this.Mp||this.Lc;this.wf||(this.wf=/(blackberry|bb10|playbook|palm|symbian|nokia|windows\s+ce|phone|mobile|tablet|kindle|silk)/i.test(navigator.userAgent));this.Th=!!(this.zf&&this.cc&&window.webkit);this.om=null;this.Aw="";this.Th&&(this.om=cordova&&cordova.plugins&&cordova.plugins.CorHttpd?cordova.plugins.CorHttpd:null);"undefined"===typeof cr_is_preview||this.Ke||"?nw"!==window.location.search&&!/nodewebkit/i.test(navigator.userAgent)&&
!/nwjs/i.test(navigator.userAgent)||(this.Ke=!0);this.canvas=a;this.mj=document.getElementById("c2canvasdiv");this.u=this.B=null;this.km="(unavailable)";this.Fa=!1;this.jf=0;this.Ha=null;this.$l="";this.Jj=!1;this.Dq=this.Eq=0;this.canvas.oncontextmenu=function(a){a.preventDefault&&a.preventDefault();return!1};this.canvas.onselectstart=function(a){a.preventDefault&&a.preventDefault();return!1};this.Mb&&(window.c2runtime=this);this.Ke&&(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.Xj&&"undefined"!==typeof jQuery&&jQuery("canvas").parents("*").css("overflow","visible");this.width=a.width;this.height=a.height;this.I=this.width;this.H=this.height;this.uj=this.width;this.qh=this.height;this.yg=window.innerWidth;this.xg=window.innerHeight;this.Ov=!1;this.U=!0;this.Rh=!1;Date.now||(Date.now=function(){return+new Date});this.plugins=[];this.types={};this.n=[];this.Ja=
[];this.Jm={};this.$c=[];this.Tl={};this.Td=[];this.Zg=[];this.el=[];this.iu=[];this.ju=[];this.ef={};this.zm=this.Ie=!1;this.Bc=0;this.ym=this.Bm=!1;this.Yc=[];this.Oh=!1;this.Zd=this.Pb=this.gk=this.zn="";this.Fi=this.tr=!1;this.Ij=[];this.hf=this.gf=0;this.tq=30;this.Kl=this.hi=0;this.Ug=1;this.sb=new fb;this.ne=new fb;this.qk=this.Mj=this.nf=this.Tg=this.Df=this.Zl=this.dk=0;this.mh=null;this.Ql=[];this.Sl=[];this.Ej=-1;this.Om=[[]];this.Nn=this.kk=0;this.Ik(null);this.Qm=[];this.mk=-1;this.yq=
this.li=0;this.Im=!0;this.xh=0;this.Gi=[];this.Kn=this.pn=-1;this.Wh=!0;this.Cg=0;this.Qh=!1;this.fy=0;this.Zf=null;this.Ra=this.Sj=!1;this.Cq=new ca;this.Xm=new ca;this.Ym=new ca;this.cr=[];this.gd=new hb([]);this.Hn=new hb([]);this.Yf=[];this.Fh={};this.Ce={};this.ue={};this.Yg={};this.Ro={};this.Xp=this.fk=this.Xa=this.mb=this.Wp=this.ek=this.P=null;this.Wg=this.Dm=!1;this.am=[null,null];this.of=0;this.Xl="";this.ee={};this.Di=this.Me=null;this.wr="";this.pk=[];this.Lx()}}function l(a,d){return 128>=
d?a[3]:256>=d?a[2]:512>=d?a[1]:a[0]}function f(){try{return!!window.indexedDB}catch(a){return!1}}function p(a){a.target.result.createObjectStore("saves",{keyPath:"slot"})}function u(a,d,e,c){try{var m=indexedDB.open("_C2SaveStates");m.onupgradeneeded=p;m.onerror=c;m.onsuccess=function(m){m=m.target.result;m.onerror=c;m.transaction(["saves"],"readwrite").objectStore("saves").put({slot:a,data:d}).onsuccess=e}}catch(g){c(g)}}function r(a,d,e){try{var c=indexedDB.open("_C2SaveStates");c.onupgradeneeded=
p;c.onerror=e;c.onsuccess=function(c){c=c.target.result;c.onerror=e;var m=c.transaction(["saves"]).objectStore("saves").get(a);m.onsuccess=function(){m.result?d(m.result.data):d(null)}}}catch(m){e(m)}}function t(){ea("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 a(a){var d,e={};for(d in a)!a.hasOwnProperty(d)||a[d]instanceof ca||a[d]&&"undefined"!==
typeof a[d].jz||"spriteCreatedDestroyCallback"!==d&&(e[d]=a[d]);return e}var g=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame;h.prototype.Lx=function(){var a=this;if(this.Th)this.om?this.om.startServer({port:0,localhost_only:!0},function(d){a.Aw=d;a.op(function(d){a.Ag(JSON.parse(d))},function(){alert("Error fetching data.js")})},function(a){alert("error starting local server: "+a)}):
this.op(function(d){a.Ag(JSON.parse(d))},function(){alert("Error fetching data.js")});else{var d;this.yf?d=new ActiveXObject("Microsoft.XMLHTTP"):d=new XMLHttpRequest;var e="data.js";if(this.Np||this.yf||this.ak||this.Cm)e="data.json";d.open("GET",e,!0);var c=!1;if(!this.Ca&&"response"in d&&"responseType"in d)try{d.responseType="json",c="json"===d.responseType}catch(m){c=!1}if(!c&&"responseType"in d)try{d.responseType="text"}catch(g){}if("overrideMimeType"in d)try{d.overrideMimeType("application/json; charset=utf-8")}catch(b){}this.yf?
d.onreadystatechange=function(){4===d.readyState&&a.Ag(JSON.parse(d.responseText))}:(d.onload=function(){if(c)a.Ag(d.response);else if(a.Lc){var e=d.responseText,e=e.substr(e.indexOf("{"));a.Ag(JSON.parse(e))}else a.Ag(JSON.parse(d.responseText))},d.onerror=function(a){fa("Error requesting "+e+":");fa(a)});d.send()}};h.prototype.Dw=function(){var a=this,d,e,c,m,g,b,k,w,n;this.xf=(!this.Ca||this.Lc||this.cc)&&this.ty&&!this.Xj;0===this.Sb&&this.zf&&(this.xf=!1);this.devicePixelRatio=this.xf?window.devicePixelRatio||
window.webkitDevicePixelRatio||window.mozDevicePixelRatio||window.msDevicePixelRatio||1:1;this.Gb();e=!(!this.Ov&&(!this.xl||this.Ke||this.$j||this.yf||this.Mh||this.cc||this.xm));0<this.Sb&&this.setSize(window.innerWidth,window.innerHeight,!0);try{this.bv&&(this.Ac||this.Lc||!this.Ca)&&(d={alpha:e,depth:!1,antialias:!1,failIfMajorPerformanceCaveat:!0},this.B=this.canvas.getContext("webgl",d)||this.canvas.getContext("experimental-webgl",d))}catch(q){}if(this.B){if(d=this.B.getExtension("WEBGL_debug_renderer_info"))this.km=
this.B.getParameter(d.UNMASKED_RENDERER_WEBGL)+" ["+this.B.getParameter(d.UNMASKED_VENDOR_WEBGL)+"]";this.Fa&&(this.km+=" [front-to-back enabled]");this.Ca||(this.Eb=document.createElement("canvas"),jQuery(this.Eb).appendTo(this.canvas.parentNode),this.Eb.oncontextmenu=function(){return!1},this.Eb.onselectstart=function(){return!1},this.Eb.width=Math.round(this.uj*this.devicePixelRatio),this.Eb.height=Math.round(this.qh*this.devicePixelRatio),jQuery(this.Eb).css({width:this.uj+"px",height:this.qh+
"px"}),this.Wq(),this.hn=this.Eb.getContext("2d"));this.u=new qb(this.B,this.wf,this.Fa);this.u.Pf(this.canvas.width,this.canvas.height);this.u.ip=0!==this.Vu;this.Ha=null;this.canvas.addEventListener("webglcontextlost",function(d){d.preventDefault();a.hx();ea("[Construct 2] WebGL context lost");window.cr_setSuspended(!0)},!1);this.canvas.addEventListener("webglcontextrestored",function(){a.u.Fp();a.u.Pf(a.u.width,a.u.height,!0);a.mb=null;a.Xa=null;a.am[0]=null;a.am[1]=null;a.ix();a.U=!0;ea("[Construct 2] WebGL context restored");
window.cr_setSuspended(!1)},!1);d=0;for(e=this.n.length;d<e;d++)for(g=this.n[d],c=0,m=g.O.length;c<m;c++)k=g.O[c],k.$a=this.u.jm(k.id),k.cd=this.u.mn(k.$a),this.Wg=this.Wg||this.u.qi(k.$a);d=0;for(e=this.$c.length;d<e;d++){w=this.$c[d];c=0;for(m=w.O.length;c<m;c++)k=w.O[c],k.$a=this.u.jm(k.id),k.cd=this.u.mn(k.$a);w.jd();c=0;for(m=w.T.length;c<m;c++){n=w.T[c];g=0;for(b=n.O.length;g<b;g++)k=n.O[g],k.$a=this.u.jm(k.id),k.cd=this.u.mn(k.$a),this.Wg=this.Wg||this.u.qi(k.$a);n.jd()}}}else{if(0<this.Sb&&
this.Mb){this.canvas=null;document.oncontextmenu=function(){return!1};document.onselectstart=function(){return!1};this.Ha=AppMobi.canvas.getContext("2d");try{this.Ha.samplingMode=this.Ga?"smooth":"sharp",this.Ha.globalScale=1,this.Ha.HTML5CompatibilityMode=!0,this.Ha.imageSmoothingEnabled=this.Ga}catch(v){}0!==this.width&&0!==this.height&&(this.Ha.width=this.width,this.Ha.height=this.height)}this.Ha||(this.Ac?(d={antialias:!!this.Ga,alpha:e},this.Ha=this.canvas.getContext("2d",d)):(d={alpha:e},this.Ha=
this.canvas.getContext("2d",d)),this.Rk(this.Ha,this.Ga));this.hn=this.Eb=null}this.Dr=function(d){a.ab(!1,d)};window==window.top||this.Ca||this.$j||this.yf||(document.addEventListener("mousedown",function(){window.focus()},!0),document.addEventListener("touchstart",function(){window.focus()},!0));"undefined"!==typeof cr_is_preview&&(this.Ac&&console.log("[Construct 2] In preview-over-wifi via CocoonJS mode"),-1<window.location.search.indexOf("continuous")&&(ea("Reloading for continuous preview"),
this.gk="__c2_continuouspreview",this.Fi=!0),this.ux&&!this.wf&&(jQuery(window).focus(function(){a.setSuspended(!1)}),jQuery(window).blur(function(){var d=window.parent;d&&d.document.hasFocus()||a.setSuspended(!0)})));window.addEventListener("blur",function(){a.Lf()});this.Ca||(d=function(a){if(pb(a)&&document.activeElement&&document.activeElement!==document.getElementsByTagName("body")[0]&&document.activeElement.blur)try{document.activeElement.blur()}catch(d){}},window.navigator.pointerEnabled?document.addEventListener("pointerdown",
d):window.navigator.msPointerEnabled?document.addEventListener("MSPointerDown",d):document.addEventListener("touchstart",d),document.addEventListener("mousedown",d));0===this.Sb&&this.xf&&1<this.devicePixelRatio&&this.setSize(this.La,this.Sa,!0);this.Ir();this.vw();this.go();this.X={}};h.prototype.setSize=function(a,d,e){var c=0,m=0,g=0,b=0,b=0;if(this.yg!==a||this.xg!==d||e){this.yg=a;this.xg=d;var k=this.Sb,w=(document.mozFullScreen||document.webkitIsFullScreen||!!document.msFullscreenElement||
document.fullScreen||this.Qh)&&!this.cc;if(w||0!==this.Sb||e)w&&0<this.of&&(k=this.of),e=this.devicePixelRatio,4<=k?(g=this.La/this.Sa,a/d>g?(g*=d,5===k?(b=g*e/this.La,1<b?b=Math.floor(b):1>b&&(b=1/Math.ceil(1/b)),g=this.La*b/e,b=this.Sa*b/e,c=(a-g)/2,m=(d-b)/2,a=g,d=b):(c=(a-g)/2,a=g)):(b=a/g,5===k?(b=b*e/this.Sa,1<b?b=Math.floor(b):1>b&&(b=1/Math.ceil(1/b)),g=this.La*b/e,b=this.Sa*b/e,c=(a-g)/2,m=(d-b)/2,a=g):m=(d-b)/2,d=b),w&&!this.Ke&&(m=c=0)):this.Ke&&this.Qh&&0===this.sp&&(c=Math.floor((a-this.La)/
2),m=Math.floor((d-this.Sa)/2),a=this.La,d=this.Sa),2>k&&(this.jh=e),this.uj=Math.round(a),this.qh=Math.round(d),this.width=Math.round(a*e),this.height=Math.round(d*e),this.U=!0,this.Ur?(this.I=this.width,this.H=this.height,this.wc=!0):this.width<this.La&&this.height<this.Sa||1===k?(this.I=this.width,this.H=this.height,this.wc=!0):(this.I=this.La,this.H=this.Sa,this.wc=!1,2===k?(g=this.La/this.Sa,k=this.yg/this.xg,k<g?this.I=this.H*k:k>g&&(this.H=this.I/k)):3===k&&(g=this.La/this.Sa,k=this.yg/this.xg,
k>g?this.I=this.H*k:k<g&&(this.H=this.I/k))),this.mj&&!this.Ca&&(jQuery(this.mj).css({width:Math.round(a)+"px",height:Math.round(d)+"px","margin-left":Math.floor(c)+"px","margin-top":Math.floor(m)+"px"}),"undefined"!==typeof cr_is_preview&&jQuery("#borderwrap").css({width:Math.round(a)+"px",height:Math.round(d)+"px"})),this.canvas&&(this.canvas.width=Math.round(a*e),this.canvas.height=Math.round(d*e),this.Lc?(this.canvas.style.left=Math.floor(c)+"px",this.canvas.style.top=Math.floor(m)+"px",this.canvas.style.width=
Math.round(a)+"px",this.canvas.style.height=Math.round(d)+"px"):this.xf&&!this.Ca&&(this.canvas.style.width=Math.round(a)+"px",this.canvas.style.height=Math.round(d)+"px")),this.Eb&&(this.Eb.width=Math.round(a*e),this.Eb.height=Math.round(d*e),this.Eb.style.width=this.uj+"px",this.Eb.style.height=this.qh+"px"),this.u&&this.u.Pf(Math.round(a*e),Math.round(d*e)),this.Mb&&this.Ha&&(this.Ha.width=Math.round(a),this.Ha.height=Math.round(d)),this.Ha&&this.Rk(this.Ha,this.Ga),this.Ir(),this.Qp&&!this.cc&&
window.scrollTo(0,0)}};h.prototype.Ir=function(){if(this.qu&&0!==this.en){var a="portrait";2===this.en&&(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(d){console&&console.warn&&console.warn("Failed to lock orientation: ",
d)}}};h.prototype.hx=function(){this.u.wu();this.Dm=!0;var a,d,e;a=0;for(d=this.n.length;a<d;a++)e=this.n[a],e.sk&&e.sk()};h.prototype.ix=function(){this.Dm=!1;var a,d,e;a=0;for(d=this.n.length;a<d;a++)e=this.n[a],e.uk&&e.uk()};h.prototype.Wq=function(){if(!this.Ca){var a=(document.mozFullScreen||document.webkitIsFullScreen||document.fullScreen||document.msFullscreenElement||this.Qh)&&!this.cc?jQuery(this.canvas).offset():jQuery(this.canvas).position();a.position="absolute";jQuery(this.Eb).css(a)}};
var b=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.msCancelAnimationFrame||window.oCancelAnimationFrame;h.prototype.setSuspended=function(a){var d;if(a&&!this.Rh)for(ea("[Construct 2] Suspending"),this.Rh=!0,-1!==this.pn&&b&&b(this.pn),-1!==this.Kn&&clearTimeout(this.Kn),a=0,d=this.Gi.length;a<d;a++)this.Gi[a](!0);else if(!a&&this.Rh){ea("[Construct 2] Resuming");this.Rh=!1;this.dk=bb();this.Df=bb();a=this.hi=this.Mj=0;for(d=this.Gi.length;a<
d;a++)this.Gi[a](!1);this.ab(!1)}};h.prototype.Ko=function(a){this.Gi.push(a)};h.prototype.re=function(a){return this.pk[a]};h.prototype.Ag=function(a){a&&a.project||fa("Project model unavailable");a=a.project;this.name=a[0];this.qp=a[1];this.Sb=a[12];this.sp=a[12];this.La=a[10];this.Sa=a[11];this.Rq=this.La/2;this.Sq=this.Sa/2;this.Ca&&!this.Lc&&(4<=a[12]||0===a[12])&&(ea("[Construct 2] Letterbox scale fullscreen modes are not supported on this platform - falling back to 'Scale outer'"),this.sp=
this.Sb=3);this.Tn=a[18];this.Ne=a[19];if(0===this.Ne){var d=new Image;d.crossOrigin="anonymous";this.lr(d,"loading-logo.png");this.Me={lk:d}}else if(4===this.Ne){d=new Image;d.src="";var e=new Image;e.src="";var c=new Image;c.src="";var m=new Image;m.src="";var g=new Image;g.src="";var b=new Image;b.src="";var k=new Image;k.src="";var w=new Image;w.src="";var n=new Image;n.src="";var q=new Image;q.src="";var v=new Image;v.src="";var h=new Image;h.src="";this.Me={lk:[d,e,c,m],Bx:[g,b,k,w],wy:[n,q,
v,h]}}this.li=a[21];this.pk=pc();this.Gd=new W(this);d=0;for(e=a[2].length;d<e;d++)k=a[2][d],c=this.re(k[0]),rb(k,c.prototype),w=new c(this),w.Uk=k[1],w.Le=k[2],w.vq=k[9],w.G&&w.G(),this.plugins.push(w);this.pk=pc();d=0;for(e=a[3].length;d<e;d++){k=a[3][d];g=this.re(k[1]);w=null;c=0;for(m=this.plugins.length;c<m;c++)if(this.plugins[c]instanceof g){w=this.plugins[c];break}n=new w.ca(w);n.name=k[0];n.F=k[2];n.wm=k[3].slice(0);n.vy=k[3].length;n.ru=k[4];n.Qv=k[5];n.ea=k[11];n.F?(n.Fg=[],n.Ud=this.xh++,
n.Ia=null):(n.Fg=null,n.Ud=-1,n.Ia=[]);n.Gj=null;n.ig=null;n.jp=null;n.Nb=!1;n.nc=null;k[6]?(n.$k=k[6][0],n.In=k[6][1],n.Ji=k[6][2]):(n.$k=null,n.In=0,n.Ji=0);k[7]?n.lc=k[7]:n.lc=null;n.index=d;n.c=[];n.yj=[];n.je=[new sb(n)];n.qd=0;n.Jc=null;n.Au=0;n.Pg=!0;n.gl=tb;n.Xv=ub;n.bw=vb;n.Y=wb;n.ri=xb;n.Hk=yb;n.Mf=zb;n.Oj=Bb;n.cm=Cb;n.fm=Db;n.Md=Eb;n.gm=Fb;n.qj=new ib(this.La,this.Sa);n.cj=!0;n.dj=!1;n.X={};n.toString=Gb;n.Ja=[];c=0;for(m=k[8].length;c<m;c++){q=k[8][c];v=this.re(q[1]);h=null;g=0;for(b=
this.Ja.length;g<b;g++)if(this.Ja[g]instanceof v){h=this.Ja[g];break}h||(h=new v(this),h.wq=[],h.Vm=new ca,h.G&&h.G(),this.Ja.push(h));-1===h.wq.indexOf(n)&&h.wq.push(n);g=new h.ca(h,n);g.name=q[0];g.ea=q[2];g.G();n.Ja.push(g)}n.global=k[9];n.Am=k[10];n.O=[];c=0;for(m=k[12].length;c<m;c++)n.O.push({id:k[12][c][0],name:k[12][c][1],$a:-1,cd:!1,Hb:!0,index:c});n.Fz=k[13];this.Tn&&!n.F&&!n.Am&&w.Le||n.G();n.name&&(this.types[n.name]=n);this.n.push(n);w.Uk&&(c=new w.V(n),c.uid=this.li++,c.Zq=this.yq++,
c.tf=0,c.Dh=Hb,c.toString=Ib,c.m=k[14],c.G(),n.c.push(c),this.ee[c.uid.toString()]=c)}d=0;for(e=a[4].length;d<e;d++)for(g=a[4][d],b=this.n[g[0]],c=1,m=g.length;c<m;c++)k=this.n[g[c]],k.Ia.push(b),b.Fg.push(k);d=0;for(e=a[28].length;d<e;d++){g=a[28][d];b=[];c=0;for(m=g.length;c<m;c++)b.push(this.n[g[c]]);c=0;for(m=b.length;c<m;c++)b[c].Nb=!0,b[c].nc=b}if(0<this.xh)for(d=0,e=this.n.length;d<e;d++)if(k=this.n[d],!k.F&&k.Ia.length){k.Gj=Array(this.xh);k.ig=Array(this.xh);k.jp=Array(this.xh);n=[];c=h=
v=q=0;for(m=k.Ia.length;c<m;c++)for(w=k.Ia[c],k.Gj[w.Ud]=q,q+=w.vy,k.ig[w.Ud]=v,v+=w.ru,k.jp[w.Ud]=h,h+=w.Qv,g=0,b=w.O.length;g<b;g++)n.push(xa({},w.O[g]));k.O=n.concat(k.O);c=0;for(m=k.O.length;c<m;c++)k.O[c].index=c}d=0;for(e=a[5].length;d<e;d++)k=a[5][d],c=new Jb(this,k),this.Jm[c.name]=c,this.$c.push(c);d=0;for(e=a[6].length;d<e;d++)k=a[6][d],c=new Kb(this,k),this.Tl[c.name]=c,this.Td.push(c);d=0;for(e=this.Td.length;d<e;d++)this.Td[d].Ta();d=0;for(e=this.Td.length;d<e;d++)this.Td[d].Qn();d=0;
for(e=this.el.length;d<e;d++)this.el[d].Ta();G(this.el);this.pu=a[7];this.Xl=a[8];this.bd=a[9];this.jh=1;this.bv=a[13];this.Ga=a[14];this.xl=a[15];this.ty=a[17];this.en=a[20];this.qu=0<this.en;this.ux=a[22];this.wc=this.Ur=a[23];this.Vu=a[24];this.Cx=a[25];this.Fa=a[27]&&!this.Je;this.Vk=Date.now();G(this.pk);this.Dw()};var d=!1;h.prototype.Vn=function(a,e){a.cocoonLazyLoad=!0;a.onerror=function(e){d=a.Uo=!0;console&&console.error&&console.error("Error loading image '"+a.src+"': ",e)};this.Lc?a.src=
e:a.src||("undefined"!==typeof XAPKReader?XAPKReader.get(e,function(d){a.src=d},function(c){d=a.Uo=!0;console&&console.error&&console.error("Error extracting image '"+e+"' from expansion file: ",c)}):(a.crossOrigin="anonymous",this.lr(a,e)));this.Zg.push(a)};h.prototype.Nv=function(a){var d,e;d=0;for(e=this.Zg.length;d<e;d++)if(this.Zg[d].xu===a)return this.Zg[d];return null};var c=0,k=!1;h.prototype.vw=function(){this.Zf&&(c=this.Zf.ay(this.pu))};h.prototype.Po=function(){var a=c,d=0,e=0,m=!0,g,
b,e=0;for(g=this.Zg.length;e<g;e++){b=this.Zg[e];var n=b.bp;if(!n||0>=n)n=5E4;a+=n;b.src&&(b.complete||b.loaded)&&!b.Uo?d+=n:m=!1}m&&this.Cx&&this.Zf&&(k||(this.Zf.gy(),k=!0),e=this.Zf.dw(),d+=e,e<c&&(m=!1));this.dd=0==a?1:d/a;return m};var e=!1;h.prototype.go=function(){if(this.Ha||this.u){var a=this.Ha||this.hn;this.Eb&&this.Wq();var c=window.innerWidth,m=window.innerHeight;this.yg===c&&this.xg===m||this.setSize(c,m);this.dd=0;this.Vp=-1;var b=this;if(this.Po()&&(4!==this.Ne||e))this.ww();else{m=
Date.now()-this.Vk;if(a){var k=this.width,n=this.height,c=this.devicePixelRatio;if(3>this.Ne&&(this.Ac||500<=m&&this.Vp!=this.dd)){a.clearRect(0,0,k,n);var m=k/2,n=n/2,k=0===this.Ne&&this.Me.lk.complete,w=40*c,q=0,v=80*c,h;if(k){var f=this.Me.lk,v=f.width*c;h=f.height*c;w=v/2;q=h/2;a.drawImage(f,pa(m-w),pa(n-q),v,h)}1>=this.Ne?(m=pa(m-w)+.5,n=pa(n+(q+(k?12*c:0)))+.5,a.fillStyle=d?"red":"DodgerBlue",a.fillRect(m,n,Math.floor(v*this.dd),6*c),a.strokeStyle="black",a.strokeRect(m,n,v,6*c),a.strokeStyle=
"white",a.strokeRect(m-1*c,n-1*c,v+2*c,8*c)):2===this.Ne&&(a.font=this.Lc?"12pt ArialMT":"12pt Arial",a.fillStyle=d?"#f00":"#999",a.Ez="middle",c=Math.round(100*this.dd)+"%",k=a.measureText?a.measureText(c):null,a.fillText(c,m-(k?k.width:0)/2,n));this.Vp=this.dd}else if(4===this.Ne){this.$u(a);g?g(function(){b.go()}):setTimeout(function(){b.go()},16);return}}setTimeout(function(){b.go()},this.Ac?10:100)}}};var n=-1,q="undefined"===typeof cr_is_preview?200:0,v=!0,m=!1,w=0,X=0,H="undefined"===typeof cr_is_preview?
3E3:0,L=null,J=null,y=0;h.prototype.$u=function(a){if(!e){for(var c=Math.ceil(this.width),g=Math.ceil(this.height),b=this.Me.lk,k=this.Me.Bx,h=this.Me.wy,f=0;4>f;++f)if(!b[f].complete||!k[f].complete||!h[f].complete)return;0===y&&(n=Date.now());var f=Date.now(),t=!1,u=a,p,r;v||m?(a.clearRect(0,0,c,g),L&&L.width===c&&L.height===g||(L=document.createElement("canvas"),L.width=c,L.height=g,J=L.getContext("2d")),u=J,t=!0,v&&1===y&&(n=Date.now())):a.globalAlpha=1;u.fillStyle="#333333";u.fillRect(0,0,c,
g);256<this.qh?(p=Fa(.22*g,105,.6*c),r=.25*p,u.drawImage(l(k,p),.5*c-p/2,.2*g-r/2,p,r),r=p=Math.min(.395*g,.95*c),u.drawImage(l(b,p),.5*c-p/2,.485*g-r/2,p,r),p=Fa(.22*g,105,.6*c),r=.25*p,u.drawImage(l(h,p),.5*c-p/2,.868*g-r/2,p,r),u.fillStyle="#3C3C3C",p=c,r=Math.max(.005*g,2),u.fillRect(0,.8*g-r/2,p,r),u.fillStyle=d?"red":"#E0FF65",p=c*this.dd,u.fillRect(.5*c-p/2,.8*g-r/2,p,r)):(r=p=.55*g,u.drawImage(l(b,p),.5*c-p/2,.45*g-r/2,p,r),u.fillStyle="#3C3C3C",p=c,r=Math.max(.005*g,2),u.fillRect(0,.85*g-
r/2,p,r),u.fillStyle=d?"red":"#E0FF65",p=c*this.dd,u.fillRect(.5*c-p/2,.85*g-r/2,p,r));t&&(v?a.globalAlpha=0===y?0:Math.min((f-n)/300,1):m&&(a.globalAlpha=Math.max(1-(f-X)/300,0)),a.drawImage(L,0,0,c,g));v&&300<=f-n&&2<=y&&(v=!1,w=f);!v&&f-w>=H&&!m&&1<=this.dd&&(m=!0,X=f);if(m&&f-X>=300+q||"undefined"!==typeof cr_is_preview&&1<=this.dd&&500>Date.now()-n)e=!0,m=v=!1,this.Me=J=L=null;++y}};h.prototype.ww=function(){this.Eb&&(this.canvas.parentNode.removeChild(this.Eb),this.Eb=this.hn=null);this.Vk=
Date.now();this.Df=bb();var a,d,e;if(this.Tn)for(a=0,d=this.n.length;a<d;a++)e=this.n[a],e.F||e.Am||!e.ka.Le||e.G();else this.Wh=!1;a=0;for(d=this.$c.length;a<d;a++)this.$c[a].yu();2<=this.Sb&&(a=this.La/this.Sa,d=this.width/this.height,this.jh=2!==this.Sb&&d>a||2===this.Sb&&d<a?this.height/this.Sa:this.width/this.La);this.qp?this.Jm[this.qp].Fn():this.$c[0].Fn();this.Tn||(this.Cg=1,this.trigger(W.prototype.d.ro,null),window.C2_RegisterSW&&window.C2_RegisterSW());navigator.splashscreen&&navigator.splashscreen.hide&&
navigator.splashscreen.hide();a=0;for(d=this.n.length;a<d;a++)e=this.n[a],e.gx&&e.gx();document.hidden||document.webkitHidden||document.mozHidden||document.msHidden?window.cr_setSuspended(!0):this.ab(!1);this.Mb&&AppMobi.webview.execute("onGameReady();")};h.prototype.ab=function(a,d,e){if(this.P){var c=bb();if(e||!this.Rh||a){a||(g?this.pn=g(this.Dr):this.Kn=setTimeout(this.Dr,this.wf?1:16));d=d||c;var m=this.Sb;((e=(document.mozFullScreen||document.webkitIsFullScreen||document.fullScreen||!!document.msFullscreenElement)&&
!this.cc)||this.Qh)&&0<this.of&&(m=this.of);if(0<m){var m=window.innerWidth,b=window.innerHeight;this.yg===m&&this.xg===b||this.setSize(m,b)}this.Ca||(e?(this.Jj||(this.$l=jQuery(this.canvas).css("margin")||"0",this.Jj=!0),this.Lh||this.Ke||jQuery(this.canvas).css({"margin-left":""+Math.floor((screen.width-this.width/this.devicePixelRatio)/2)+"px","margin-top":""+Math.floor((screen.height-this.height/this.devicePixelRatio)/2)+"px"})):this.Jj?(this.Lh||this.Ke||jQuery(this.canvas).css("margin",this.$l),
this.$l="",this.Jj=!1,0===this.Sb&&this.setSize(Math.round(this.Eq/this.devicePixelRatio),Math.round(this.Dq/this.devicePixelRatio),!0)):(this.Eq=this.width,this.Dq=this.height));this.Wh&&(e=this.Po(),this.Cg=this.dd,e&&(this.Wh=!1,this.dd=1,this.trigger(W.prototype.d.ro,null),window.C2_RegisterSW&&window.C2_RegisterSW()));this.Zw(d);!this.U&&!this.Ac||this.Dm||this.Fi||a||(this.U=!1,this.u?this.ac():this.rd(),this.Di&&(this.canvas&&this.canvas.toDataURL&&(this.wr=this.canvas.toDataURL(this.Di[0],
this.Di[1]),window.cr_onSnapshot&&window.cr_onSnapshot(this.wr),this.trigger(W.prototype.d.Rs,null)),this.Di=null));this.nz||(this.Tg++,this.nf++,this.Mj++);this.hi+=bb()-c}}};h.prototype.Zw=function(a){var d,e,c,m,g,b,k,n;1E3<=a-this.Df&&(this.Df+=1E3,1E3<=a-this.Df&&(this.Df=a),this.Zl=this.Mj,this.Mj=0,this.Kl=this.hi,this.hi=0);d=0;0!==this.dk&&(d=a-this.dk,0>d&&(d=0),this.hf=d/=1E3,.5<this.hf?this.hf=0:this.hf>1/this.tq&&(this.hf=1/this.tq));this.dk=a;this.gf=this.hf*this.Ug;this.sb.add(this.gf);
this.ne.add(d);a=(document.mozFullScreen||document.webkitIsFullScreen||document.fullScreen||!!document.msFullscreenElement||this.Qh)&&!this.cc;2<=this.Sb||a&&0<this.of?(d=this.La/this.Sa,e=this.width/this.height,c=this.Sb,a&&0<this.of&&(c=this.of),this.jh=2!==c&&e>d||2===c&&e<d?this.height/this.Sa:this.width/this.La,this.P&&(this.P.Ok(this.P.scrollX),this.P.Pk(this.P.scrollY))):this.jh=this.xf?this.devicePixelRatio:1;this.Gb();this.Bc++;this.Gd.Px();this.Bc--;this.Gb();this.Bc++;e=this.Cq.Te();a=
0;for(d=e.length;a<d;a++)e[a].yz();a=0;for(d=this.n.length;a<d;a++)if(b=this.n[a],!b.F&&(b.Ja.length||b.Ia.length))for(e=0,c=b.c.length;e<c;e++)for(k=b.c[e],m=0,g=k.N.length;m<g;m++)k.N[m].ab();a=0;for(d=this.n.length;a<d;a++)if(b=this.n[a],!b.F&&(b.Ja.length||b.Ia.length))for(e=0,c=b.c.length;e<c;e++)for(k=b.c[e],m=0,g=k.N.length;m<g;m++)n=k.N[m],n.Ax&&n.Ax();e=this.Xm.Te();a=0;for(d=e.length;a<d;a++)e[a].ab();this.Bc--;this.xw();for(a=0;this.mh&&10>a++;)this.hp(this.mh);a=0;for(d=this.Td.length;a<
d;a++)this.Td[a].nm=!1;this.P.lf&&this.P.lf.Za();G(this.cr);this.Im=!1;this.Bc++;a=0;for(d=this.n.length;a<d;a++)if(b=this.n[a],!b.F&&(b.Ja.length||b.Ia.length))for(e=0,c=b.c.length;e<c;e++)for(k=b.c[e],m=0,g=k.N.length;m<g;m++)n=k.N[m],n.Jn&&n.Jn();e=this.Ym.Te();a=0;for(d=e.length;a<d;a++)e[a].Jn();this.Bc--};h.prototype.Lf=function(){var a,d,e,c,m,g,b,k,n;a=0;for(d=this.n.length;a<d;a++)if(b=this.n[a],!b.F)for(e=0,c=b.c.length;e<c;e++)if(k=b.c[e],k.Lf&&k.Lf(),k.N)for(m=0,g=k.N.length;m<g;m++)n=
k.N[m],n.Lf&&n.Lf()};h.prototype.hp=function(a){var d=this.P;this.P.hy();var e,c,m;if(this.u)for(e=0,c=this.n.length;e<c;e++)m=this.n[e],m.F||!m.fl||m.global&&0!==m.c.length||-1!==a.Ih.indexOf(m)||m.fl();d==a&&G(this.Gd.kc);G(this.cr);this.er(!0);a.Fn();this.er(!1);this.Im=this.U=!0;this.Gb()};h.prototype.er=function(a){var d,e,c,m,g,b,k,n,w;d=0;for(e=this.Ja.length;d<e;d++)c=this.Ja[d],a?c.mi&&c.mi():c.ni&&c.ni();d=0;for(e=this.n.length;d<e;d++)if(c=this.n[d],c.global||c.ka.Uk)for(m=0,g=c.c.length;m<
g;m++)if(b=c.c[m],a?b.mi&&b.mi():b.ni&&b.ni(),b.N)for(k=0,n=b.N.length;k<n;k++)w=b.N[k],a?w.mi&&w.mi():w.ni&&w.ni()};h.prototype.Ki=function(a){this.Xm.add(a)};h.prototype.ky=function(a){this.Ym.add(a)};h.prototype.kg=function(a){return a&&-1!==a.ki?this.hf*a.ki:this.gf};h.prototype.rd=function(){this.P.rd(this.Ha);this.Mb&&this.Ha.present()};h.prototype.ac=function(){this.Fa&&(this.jf=1,this.P.ff(this.u));this.P.ac(this.u);this.u.Ex()};h.prototype.gu=function(a){a&&this.Ql.push(a)};h.prototype.Qj=
function(a){a=a.toString();return this.ee.hasOwnProperty(a)?this.ee[a]:null};var Q=[];h.prototype.qe=function(a){var d,e;d=a.type.name;var c=null;if(this.ef.hasOwnProperty(d)){if(c=this.ef[d],c.contains(a))return}else c=Q.length?Q.pop():new ca,this.ef[d]=c;c.add(a);this.Ie=!0;if(a.Nb)for(d=0,e=a.siblings.length;d<e;d++)this.qe(a.siblings[d]);this.zm&&c.Xg.push(a);this.ym||(this.Bc++,this.trigger(Object.getPrototypeOf(a.type.ka).d.ho,a),this.Bc--)};h.prototype.Gb=function(){if(this.Ie){var a,d,e,c,
m,g;this.zm=!0;e=0;for(m=this.Yc.length;e<m;++e)for(a=this.Yc[e],d=a.type,d.c.push(a),c=0,g=d.Ia.length;c<g;++c)d.Ia[c].c.push(a),d.Ia[c].Pg=!0;G(this.Yc);this.Ks();ab(this.ef);this.Ie=this.zm=!1}};h.prototype.Ks=function(){for(var a in this.ef)this.ef.hasOwnProperty(a)&&this.as(this.ef[a])};h.prototype.as=function(a){var d=a.Te(),e=d[0].type,c,m,g,b,k,n;cb(e.c,a);e.Pg=!0;0===e.c.length&&(e.dj=!1);c=0;for(m=e.Ia.length;c<m;++c)n=e.Ia[c],cb(n.c,a),n.Pg=!0;c=0;for(m=this.Gd.kc.length;c<m;++c)if(k=this.Gd.kc[c],
k.Wb.hasOwnProperty(e.index)&&cb(k.Wb[e.index].Xd,a),!e.F)for(g=0,b=e.Ia.length;g<b;++g)n=e.Ia[g],k.Wb.hasOwnProperty(n.index)&&cb(k.Wb[n.index].Xd,a);if(k=d[0].j){if(k.Fc)for(g=k.c,c=0,m=g.length;c<m;++c)b=g[c],a.contains(b)&&(b.la(),k.Fb.update(b,b.hc,null),b.hc.set(0,0,-1,-1));cb(k.c,a);k.yi(0)}for(c=0;c<d.length;++c)this.$r(d[c],e);a.clear();Q.push(a);this.U=!0};h.prototype.$r=function(a,d){var e,c,m;e=0;for(c=this.Ql.length;e<c;++e)this.Ql[e](a);a.De&&d.qj.update(a,a.De,null);(e=a.j)&&e.Kg(a,
!0);if(a.N)for(e=0,c=a.N.length;e<c;++e)m=a.N[e],m.Kf&&m.Kf(),m.behavior.Vm.remove(a);this.Cq.remove(a);this.Xm.remove(a);this.Ym.remove(a);a.Kf&&a.Kf();this.ee.hasOwnProperty(a.uid.toString())&&delete this.ee[a.uid.toString()];this.qk--;100>d.yj.length&&d.yj.push(a)};h.prototype.tj=function(a,d,e,c){if(a.F){var m=pa(Math.random()*a.Fg.length);return this.tj(a.Fg[m],d,e,c)}return a.Jc?this.Ee(a.Jc,d,!1,e,c,!1):null};var O=[];h.prototype.Ee=function(a,d,e,c,m,g){var b,k,n,w;if(!a)return null;var q=
this.n[a[1]],v=q.ka.Le;if(this.Wh&&v&&!q.Am||v&&!this.u&&11===a[0][11])return null;var h=d;v||(d=null);var f;q.yj.length?(f=q.yj.pop(),f.Pc=!0,q.ka.V.call(f,q)):(f=new q.ka.V(q),f.Pc=!1);!e||g||this.ee.hasOwnProperty(a[2].toString())?f.uid=this.li++:f.uid=a[2];this.ee[f.uid.toString()]=f;f.Zq=this.yq++;f.tf=q.c.length;b=0;for(k=this.Yc.length;b<k;++b)this.Yc[b].type===q&&f.tf++;f.Dh=Hb;f.toString=Ib;n=a[3];if(f.Pc)ab(f.X);else{f.X={};if("undefined"!==typeof cr_is_preview)for(f.Ip=[],f.Ip.length=n.length,
b=0,k=n.length;b<k;b++)f.Ip[b]=n[b][1];f.kb=[];f.kb.length=n.length}b=0;for(k=n.length;b<k;b++)f.kb[b]=n[b][0];if(v){var l=a[0];f.x=ga(c)?l[0]:c;f.y=ga(m)?l[1]:m;f.z=l[2];f.width=l[3];f.height=l[4];f.depth=l[5];f.e=l[6];f.opacity=l[7];f.Ub=l[8];f.Vb=l[9];f.Ib=l[10];b=l[11];!this.u&&q.O.length&&(f.Ib=b);f.nh=kb(f.Ib);this.B&&mb(f,f.Ib,this.B);if(f.Pc){b=0;for(k=l[12].length;b<k;b++)for(n=0,w=l[12][b].length;n<w;n++)f.Ka[b][n]=l[12][b][n];f.Aa.set(0,0,0,0);f.De.set(0,0,-1,-1);f.hc.set(0,0,-1,-1);f.mc.Ai(f.Aa);
G(f.Bl)}else{f.Ka=l[12].slice(0);b=0;for(k=f.Ka.length;b<k;b++)f.Ka[b]=l[12][b].slice(0);f.ma=[];f.te=[];f.te.length=q.O.length;f.Aa=new ta(0,0,0,0);f.De=new ta(0,0,-1,-1);f.hc=new ta(0,0,-1,-1);f.mc=new ua;f.Bl=[];f.xa=Lb;f.gz=Mb;f.Jb=Nb;f.la=Ob;f.ry=Pb;f.Qr=Qb;f.vd=Rb}f.Li=!1;f.ny=0;f.my=0;f.ly=null;14===l.length&&(f.Li=!0,f.ny=l[13][0],f.my=l[13][1],f.ly=l[13][2]);b=0;for(k=q.O.length;b<k;b++)f.te[b]=!0;f.he=!0;f.jd=Sb;f.jd();f.Rr=!!f.ma.length;f.Al=!0;f.El=!0;q.cj=!0;f.visible=!0;f.ki=-1;f.j=
d;f.ld=d.c.length;f.jf=0;"undefined"===typeof f.qa&&(f.qa=null);this.U=f.bf=!0}var t;G(O);b=0;for(k=q.Ia.length;b<k;b++)O.push.apply(O,q.Ia[b].Ja);O.push.apply(O,q.Ja);if(f.Pc)for(b=0,k=O.length;b<k;b++){var p=O[b];t=f.N[b];t.Pc=!0;p.behavior.V.call(t,p,f);l=a[4][b];n=0;for(w=l.length;n<w;n++)t.m[n]=l[n];t.G();p.behavior.Vm.add(f)}else for(f.N=[],b=0,k=O.length;b<k;b++)p=O[b],t=new p.behavior.V(p,f),t.Pc=!1,t.m=a[4][b].slice(0),t.G(),f.N.push(t),p.behavior.Vm.add(f);l=a[5];if(f.Pc)for(b=0,k=l.length;b<
k;b++)f.m[b]=l[b];else f.m=l.slice(0);this.Yc.push(f);this.Ie=!0;d&&(d.ih(f,!0),1!==d.fc||1!==d.gc)&&(q.dj=!0);this.qk++;if(q.Nb){if(f.Nb=!0,f.Pc?G(f.siblings):f.siblings=[],!e&&!g){b=0;for(k=q.nc.length;b<k;b++)if(q.nc[b]!==q){if(!q.nc[b].Jc)return null;f.siblings.push(this.Ee(q.nc[b].Jc,h,!1,v?f.x:c,v?f.y:m,!0))}b=0;for(k=f.siblings.length;b<k;b++)for(f.siblings[b].siblings.push(f),n=0;n<k;n++)b!==n&&f.siblings[b].siblings.push(f.siblings[n])}}else f.Nb=!1,f.siblings=null;f.G();b=0;for(k=f.N.length;b<
k;b++)f.N[b].zx&&f.N[b].zx();return f};h.prototype.Ah=function(a){var d,e;d=0;for(e=this.P.T.length;d<e;d++){var c=this.P.T[d];if(ob(c.name,a))return c}return null};h.prototype.Wd=function(a){a=pa(a);0>a&&(a=0);a>=this.P.T.length&&(a=this.P.T.length-1);return this.P.T[a]};h.prototype.Il=function(a){var d,e;d=0;for(e=a.length;d<e;d++)a[d].Y().da=!0};h.prototype.ri=function(a){var d,e;d=0;for(e=a.length;d<e;d++)a[d].ri()};h.prototype.Hk=function(a){var d,e;d=0;for(e=a.length;d<e;d++)a[d].Hk()};h.prototype.Mf=
function(a){var d,e;d=0;for(e=a.length;d<e;d++)a[d].Mf()};h.prototype.Nr=function(a){if(a.cj){var d,e,c=a.c;d=0;for(e=c.length;d<e;++d)c[d].Qr();c=this.Yc;d=0;for(e=c.length;d<e;++d)c[d].type===a&&c[d].Qr();a.cj=!1}};h.prototype.Uv=function(a,d,e,c){var m,b,g=a?1!==a.fc||1!==a.gc:!1;if(d.F)for(a=0,m=d.Fg.length;a<m;++a)b=d.Fg[a],g||b.dj?Ca(c,b.c):(this.Nr(b),b.qj.Jk(e,c));else g||d.dj?Ca(c,d.c):(this.Nr(d),d.qj.Jk(e,c))};h.prototype.Qg=function(a,d,e,c){var m=a.Y(),b,g,k,n,w=this.Wa().hb.Dc,q,v,f;
if(m.da)for(c||(m.da=!1,G(m.c)),b=0,n=a.c.length;b<n;b++)if(k=a.c[b],k.la(),q=k.j.Qa(d,e,!0),v=k.j.Qa(d,e,!1),k.Jb(q,v)){if(c)return!1;m.c.push(k)}else w&&m.W.push(k);else{g=0;f=w?m.W:m.c;b=0;for(n=f.length;b<n;b++)if(k=f[b],k.la(),q=k.j.Qa(d,e,!0),v=k.j.Qa(d,e,!1),k.Jb(q,v)){if(c)return!1;w?m.c.push(k):(m.c[g]=m.c[b],g++)}c||(f.length=g)}a.Md();return c?!0:m.mm()};h.prototype.jy=function(a,d){if(!(a&&d&&a!==d&&a.bf&&d.bf))return!1;a.la();d.la();var e=a.j,c=d.j,m,b,g,k,n,w,q,v;if(e===c||e.fc===c.fc&&
c.gc===c.gc&&e.scale===c.scale&&e.e===c.e&&e.Rb===c.Rb){if(!a.Aa.Ew(d.Aa)||!a.mc.Jp(d.mc)||a.Li&&d.Li)return!1;if(a.Li)return this.Br(a,d);if(d.Li)return this.Br(d,a);q=a.qa&&!a.qa.sg();m=d.qa&&!d.qa.sg();if(!q&&!m)return!0;q?(a.qa.$f(a.width,a.height,a.e),q=a.qa):(this.gd.Ng(a.mc,a.x,a.y,a.width,a.height),q=this.gd);m?(d.qa.$f(d.width,d.height,d.e),v=d.qa):(this.gd.Ng(d.mc,d.x,d.y,d.width,d.height),v=this.gd);return q.Jh(v,d.x-a.x,d.y-a.y)}q=a.qa&&!a.qa.sg();m=d.qa&&!d.qa.sg();q?(a.qa.$f(a.width,
a.height,a.e),this.gd.or(a.qa)):this.gd.Ng(a.mc,a.x,a.y,a.width,a.height);q=this.gd;m?(d.qa.$f(d.width,d.height,d.e),this.Hn.or(d.qa)):this.Hn.Ng(d.mc,d.x,d.y,d.width,d.height);v=this.Hn;m=0;for(b=q.ed;m<b;m++)g=2*m,k=g+1,n=q.nb[g],w=q.nb[k],q.nb[g]=e.lb(n+a.x,w+a.y,!0),q.nb[k]=e.lb(n+a.x,w+a.y,!1);q.la();m=0;for(b=v.ed;m<b;m++)g=2*m,k=g+1,n=v.nb[g],w=v.nb[k],v.nb[g]=c.lb(n+d.x,w+d.y,!0),v.nb[k]=c.lb(n+d.x,w+d.y,!1);v.la();return q.Jh(v,0,0)};var z=new ua;new ta(0,0,0,0);var S=[];h.prototype.Br=function(a,
d){var e,c,m,b,g=d.Aa,k=a.x,n=a.y;a.lz(g,S);var w=d.qa&&!d.qa.sg();e=0;for(c=S.length;e<c;++e)if(m=S[e],b=m.Bz,g.Fw(b,k,n)&&(z.Ai(b),z.offset(k,n),z.Jp(d.mc)))if(w)if(d.qa.$f(d.width,d.height,d.e),m.ln){if(m.ln.Jh(d.qa,d.x-(k+b.left),d.y-(n+b.top)))return G(S),!0}else{if(this.gd.Ng(z,0,0,b.right-b.left,b.bottom-b.top),this.gd.Jh(d.qa,d.x,d.y))return G(S),!0}else if(m.ln){if(this.gd.Ng(d.mc,0,0,d.width,d.height),m.ln.Jh(this.gd,-(k+b.left),-(n+b.top)))return G(S),!0}else return G(S),!0;G(S);return!1};
h.prototype.Jr=function(a,d){if(!d)return!1;var e,c,m,b,g;e=0;for(c=a.Ja.length;e<c;e++)if(a.Ja[e].behavior instanceof d)return!0;if(!a.F)for(e=0,c=a.Ia.length;e<c;e++)for(g=a.Ia[e],m=0,b=g.Ja.length;m<b;m++)if(g.Ja[m].behavior instanceof d)return!0;return!1};h.prototype.On=function(a){return this.Jr(a,hc.Ry)};h.prototype.Pn=function(a){return this.Jr(a,hc.Sy)};var K=-1;h.prototype.trigger=function(a,d,e){if(!this.P)return!1;var c=this.P.lf;if(!c)return!1;var m=!1,b,g,k;K++;var n=c.Ol;g=0;for(k=n.length;g<
k;++g)b=this.Gr(a,d,n[g],e),m=m||b;b=this.Gr(a,d,c,e);K--;return m||b};h.prototype.Gr=function(a,d,e,c){var m=!1,b,g,k,n;if(d)for(k=this.Mn(a,d,d.type.name,e,c),m=m||k,n=d.type.Ia,b=0,g=n.length;b<g;++b)k=this.Mn(a,d,n[b].name,e,c),m=m||k;else k=this.Mn(a,d,"system",e,c),m=m||k;return m};h.prototype.Mn=function(a,d,e,c,m){var b,g=!1,k=!1,k="undefined"!==typeof m,n=(k?c.lp:c.Hr)[e];if(!n)return g;var w=null;c=0;for(b=n.length;c<b;++c)if(n[c].method==a){w=n[c].uh;break}if(!w)return g;var q;k?q=w[m]:
q=w;if(!q)return null;c=0;for(b=q.length;c<b;c++)a=q[c][0],m=q[c][1],k=this.Lv(d,e,a,m),g=g||k;return g};h.prototype.Lv=function(a,d,e,c){var m,b,g=!1;this.Nn++;var k=this.Wa().hb;k&&this.ri(k.Re);var n=1<this.Nn;this.ri(e.Re);n&&this.Gx();var w=this.Ik(e);w.hb=e;a&&(m=this.types[d].Y(),m.da=!1,G(m.c),m.c[0]=a,this.types[d].Md());a=!0;if(e.parent){d=w.Ar;for(m=e.parent;m;)d.push(m),m=m.parent;d.reverse();m=0;for(b=d.length;m<b;m++)if(!d[m].Rx()){a=!1;break}}a&&(this.nf++,e.Dc?e.Qx(c):e.Za(),g=g||
w.Cf);this.Ck();n&&this.xx();this.Mf(e.Re);k&&this.Mf(k.Re);this.Ie&&0===this.Bc&&0===K&&!this.Bm&&this.Gb();this.Nn--;return g};h.prototype.zh=function(){var a=this.Wa();return a.hb.gb[a.Ua]};h.prototype.Kw=function(){return 0===this.Wa().Ua};h.prototype.Vv=function(){var a=this.Wa();return a.hb.Gc[a.$b]};h.prototype.Gx=function(){this.kk++;this.kk>=this.Om.length&&this.Om.push([])};h.prototype.xx=function(){this.kk--};h.prototype.vp=function(){return this.Om[this.kk]};h.prototype.Ik=function(a){this.Ej++;
this.Ej>=this.Sl.length&&this.Sl.push(new Tb);var d=this.Wa();d.reset(a);return d};h.prototype.Ck=function(){this.Ej--};h.prototype.Wa=function(){return this.Sl[this.Ej]};h.prototype.Hx=function(){this.mk++;this.mk>=this.Qm.length&&this.Qm.push(aa({name:void 0,index:0,yb:!1}));var a=this.Wv();a.name=void 0;a.index=0;a.yb=!1;return a};h.prototype.yx=function(){this.mk--};h.prototype.Wv=function(){return this.Qm[this.mk]};h.prototype.xp=function(a,d){for(var e,c,m,b,g,k;d;){e=0;for(c=d.Sc.length;e<
c;e++)if(k=d.Sc[e],k instanceof Ub&&ob(a,k.name))return k;d=d.parent}e=0;for(c=this.Td.length;e<c;e++)for(g=this.Td[e],m=0,b=g.Ge.length;m<b;m++)if(k=g.Ge[m],k instanceof Ub&&ob(a,k.name))return k;return null};h.prototype.yp=function(a){var d,e;d=0;for(e=this.$c.length;d<e;d++)if(this.$c[d].ea===a)return this.$c[d];return null};h.prototype.Rj=function(a){var d,e;d=0;for(e=this.n.length;d<e;d++)if(this.n[d].ea===a)return this.n[d];return null};h.prototype.Yv=function(a){var d,e;d=0;for(e=this.Yf.length;d<
e;d++)if(this.Yf[d].ea===a)return this.Yf[d];return null};h.prototype.Eu=function(a,d){this.Di=[a,d];this.U=!0};h.prototype.xw=function(){var a=this,d=this.zn,e=this.Zd,c=this.gk,m=!1;this.tr&&(m=!0,d="__c2_continuouspreview",this.tr=!1);if(d.length){this.Gb();e=this.Vx();if(f()&&!this.Ac)u(d,e,function(){ea("Saved state to IndexedDB storage ("+e.length+" bytes)");a.Zd=e;a.trigger(W.prototype.d.sl,null);a.Zd="";m&&t()},function(c){try{localStorage.setItem("__c2save_"+d,e),ea("Saved state to WebStorage ("+
e.length+" bytes)"),a.Zd=e,a.trigger(W.prototype.d.sl,null),a.Zd="",m&&t()}catch(b){ea("Failed to save game state: "+c+"; "+b),a.trigger(W.prototype.d.vo,null)}});else try{localStorage.setItem("__c2save_"+d,e),ea("Saved state to WebStorage ("+e.length+" bytes)"),a.Zd=e,this.trigger(W.prototype.d.sl,null),a.Zd="",m&&t()}catch(b){ea("Error saving to WebStorage: "+b),a.trigger(W.prototype.d.vo,null)}this.Pb=this.gk=this.zn=""}if(c.length){if(f()&&!this.Ac)r(c,function(d){d?(a.Pb=d,ea("Loaded state from IndexedDB storage ("+
a.Pb.length+" bytes)")):(a.Pb=localStorage.getItem("__c2save_"+c)||"",ea("Loaded state from WebStorage ("+a.Pb.length+" bytes)"));a.Fi=!1;a.Pb.length||a.trigger(W.prototype.d.pl,null)},function(){a.Pb=localStorage.getItem("__c2save_"+c)||"";ea("Loaded state from WebStorage ("+a.Pb.length+" bytes)");a.Fi=!1;a.Pb.length||a.trigger(W.prototype.d.pl,null)});else{try{this.Pb=localStorage.getItem("__c2save_"+c)||"",ea("Loaded state from WebStorage ("+this.Pb.length+" bytes)")}catch(g){this.Pb=""}this.Fi=
!1;a.Pb.length||a.trigger(W.prototype.d.pl,null)}this.zn=this.gk=""}this.Pb.length&&(this.Gb(),this.Yw(this.Pb),this.Zd=this.Pb,this.trigger(W.prototype.d.$s,null),this.Pb=this.Zd="")};h.prototype.Vx=function(){var d,e,c,m,b,g,k,n={c2save:!0,version:1,rt:{time:this.sb.R,walltime:this.ne.R,timescale:this.Ug,tickcount:this.Tg,execcount:this.nf,next_uid:this.li,running_layout:this.P.ea,start_time_offset:Date.now()-this.Vk},types:{},layouts:{},events:{groups:{},cnds:{},acts:{},vars:{}}};d=0;for(e=this.n.length;d<
e;d++)if(b=this.n[d],!b.F&&!this.On(b)){g={instances:[]};Va(b.X)&&(g.ex=a(b.X));c=0;for(m=b.c.length;c<m;c++)g.instances.push(this.yn(b.c[c]));n.types[b.ea.toString()]=g}d=0;for(e=this.$c.length;d<e;d++)c=this.$c[d],n.layouts[c.ea.toString()]=c.xb();m=n.events.groups;d=0;for(e=this.Yf.length;d<e;d++)c=this.Yf[d],m[c.ea.toString()]=this.Fh[c.Eh].mg;e=n.events.cnds;for(k in this.Ce)this.Ce.hasOwnProperty(k)&&(d=this.Ce[k],Va(d.X)&&(e[k]={ex:a(d.X)}));e=n.events.acts;for(k in this.ue)this.ue.hasOwnProperty(k)&&
(d=this.ue[k],Va(d.X)&&(e[k]={ex:a(d.X)}));e=n.events.vars;for(k in this.Yg)this.Yg.hasOwnProperty(k)&&(d=this.Yg[k],d.bk||d.parent&&!d.Vh||(e[k]=d.data));n.system=this.Gd.xb();return JSON.stringify(n)};h.prototype.br=function(){var a,d,e,c,m,b;this.ee={};a=0;for(d=this.n.length;a<d;a++)if(e=this.n[a],!e.F)for(c=0,m=e.c.length;c<m;c++)b=e.c[c],this.ee[b.uid.toString()]=b};h.prototype.Yw=function(a){a=JSON.parse(a);if(a.c2save&&!(1<a.version)){this.Oh=!0;var d=a.rt;this.sb.reset();this.sb.R=d.time;
this.ne.reset();this.ne.R=d.walltime||0;this.Ug=d.timescale;this.Tg=d.tickcount;this.nf=d.execcount;this.Vk=Date.now()-d.start_time_offset;var e=d.running_layout;if(e!==this.P.ea)if(e=this.yp(e))this.hp(e);else return;var c,m,b,g,k,n,w;n=a.types;for(m in n)if(n.hasOwnProperty(m)&&(g=this.Rj(parseInt(m,10)))&&!g.F&&!this.On(g)){n[m].ex?g.X=n[m].ex:ab(g.X);k=g.c;b=n[m].instances;e=0;for(c=na(k.length,b.length);e<c;e++)this.hk(k[e],b[e]);e=b.length;for(c=k.length;e<c;e++)this.qe(k[e]);e=k.length;for(c=
b.length;e<c;e++){k=null;if(g.ka.Le&&(k=this.P.Pj(b[e].w.l),!k))continue;k=this.Ee(g.Jc,k,!1,0,0,!0);this.hk(k,b[e])}g.Pg=!0}this.Gb();this.br();c=a.layouts;for(m in c)c.hasOwnProperty(m)&&(e=this.yp(parseInt(m,10)))&&e.Ob(c[m]);c=a.events.groups;for(m in c)c.hasOwnProperty(m)&&(e=this.Yv(parseInt(m,10)))&&this.Fh[e.Eh]&&this.Fh[e.Eh].Zx(c[m]);e=a.events.cnds;for(m in this.Ce)this.Ce.hasOwnProperty(m)&&(e.hasOwnProperty(m)?this.Ce[m].X=e[m].ex:this.Ce[m].X={});e=a.events.acts;for(m in this.ue)this.ue.hasOwnProperty(m)&&
(e.hasOwnProperty(m)?this.ue[m].X=e[m].ex:this.ue[m].X={});e=a.events.vars;for(m in e)e.hasOwnProperty(m)&&this.Yg.hasOwnProperty(m)&&(this.Yg[m].data=e[m]);this.li=d.next_uid;this.Oh=!1;e=0;for(c=this.Ij.length;e<c;++e)k=this.Ij[e],this.trigger(Object.getPrototypeOf(k.type.ka).d.Ue,k);G(this.Ij);this.Gd.Ob(a.system);e=0;for(c=this.n.length;e<c;e++)if(g=this.n[e],!g.F&&!this.On(g))for(m=0,a=g.c.length;m<a;m++){k=g.c[m];if(g.Nb)for(n=k.Dh(),G(k.siblings),d=0,b=g.nc.length;d<b;d++)w=g.nc[d],g!==w&&
k.siblings.push(w.c[n]);k.Kd&&k.Kd();if(k.N)for(d=0,b=k.N.length;d<b;d++)n=k.N[d],n.Kd&&n.Kd()}this.U=!0}};h.prototype.yn=function(d,e){var c,m,b,g,k;g=d.type;b=g.ka;var n={};e?n.c2=!0:n.uid=d.uid;Va(d.X)&&(n.ex=a(d.X));if(d.kb&&d.kb.length)for(n.ivs={},c=0,m=d.kb.length;c<m;c++)n.ivs[d.type.wm[c].toString()]=d.kb[c];if(b.Le){b={x:d.x,y:d.y,w:d.width,h:d.height,l:d.j.ea,zi:d.vd()};0!==d.e&&(b.a=d.e);1!==d.opacity&&(b.o=d.opacity);.5!==d.Ub&&(b.hX=d.Ub);.5!==d.Vb&&(b.hY=d.Vb);0!==d.Ib&&(b.bm=d.Ib);
d.visible||(b.v=d.visible);d.bf||(b.ce=d.bf);-1!==d.ki&&(b.mts=d.ki);if(g.O.length)for(b.fx=[],c=0,m=g.O.length;c<m;c++)k=g.O[c],b.fx.push({name:k.name,active:d.te[k.index],params:d.Ka[k.index]});n.w=b}if(d.N&&d.N.length)for(n.behs={},c=0,m=d.N.length;c<m;c++)g=d.N[c],g.xb&&(n.behs[g.type.ea.toString()]=g.xb());d.xb&&(n.data=d.xb());return n};h.prototype.$v=function(a,d){var e,c;e=0;for(c=a.wm.length;e<c;e++)if(a.wm[e]===d)return e;return-1};h.prototype.Tv=function(a,d){var e,c;e=0;for(c=a.N.length;e<
c;e++)if(a.N[e].type.ea===d)return e;return-1};h.prototype.hk=function(a,d,e){var c,m,b,g,k;k=a.type;g=k.ka;if(e){if(!d.c2)return}else a.uid=d.uid;d.ex?a.X=d.ex:ab(a.X);if(m=d.ivs)for(c in m)m.hasOwnProperty(c)&&(b=this.$v(k,parseInt(c,10)),0>b||b>=a.kb.length||(a.kb[b]=m[c]));if(g.Le){b=d.w;a.j.ea!==b.l&&(m=a.j,a.j=this.P.Pj(b.l),a.j?(m.Kg(a,!0),a.j.ih(a,!0),a.xa(),a.j.yi(0)):(a.j=m,e||this.qe(a)));a.x=b.x;a.y=b.y;a.width=b.w;a.height=b.h;a.ld=b.zi;a.e=b.hasOwnProperty("a")?b.a:0;a.opacity=b.hasOwnProperty("o")?
b.o:1;a.Ub=b.hasOwnProperty("hX")?b.hX:.5;a.Vb=b.hasOwnProperty("hY")?b.hY:.5;a.visible=b.hasOwnProperty("v")?b.v:!0;a.bf=b.hasOwnProperty("ce")?b.ce:!0;a.ki=b.hasOwnProperty("mts")?b.mts:-1;a.Ib=b.hasOwnProperty("bm")?b.bm:0;a.nh=kb(a.Ib);this.B&&mb(a,a.Ib,this.B);a.xa();if(b.hasOwnProperty("fx"))for(e=0,m=b.fx.length;e<m;e++)g=k.fm(b.fx[e].name),0>g||(a.te[g]=b.fx[e].active,a.Ka[g]=b.fx[e].params);a.jd()}if(k=d.behs)for(c in k)k.hasOwnProperty(c)&&(e=this.Tv(a,parseInt(c,10)),0>e||a.N[e].Ob(k[c]));
d.data&&a.Ob(d.data)};h.prototype.mp=function(a,d,e){window.resolveLocalFileSystemURL(cordova.file.applicationDirectory+"www/"+a,function(a){a.file(d,e)},e)};h.prototype.op=function(a,d){this.mp("data.js",function(e){var c=new FileReader;c.onload=function(d){a(d.target.result)};c.onerror=d;c.readAsText(e)},d)};var P=[],F=0;h.prototype.Rm=function(){if(P.length&&!(8<=F)){F++;var a=P.shift();this.Hu(a.filename,a.iy,a.gv)}};h.prototype.np=function(a,d,e){var c=this;P.push({filename:a,iy:function(a){F--;
c.Rm();d(a)},gv:function(a){F--;c.Rm();e(a)}});this.Rm()};h.prototype.Hu=function(a,d,e){this.mp(a,function(a){var e=new FileReader;e.onload=function(a){d(a.target.result)};e.readAsArrayBuffer(a)},e)};h.prototype.Mv=function(a,d,e){this.np(a,function(a){a=URL.createObjectURL(new Blob([a]));d(a)},e)};h.prototype.Iw=function(a){return/^(?:[a-z]+:)?\/\//.test(a)||"data:"===a.substr(0,5)||"blob:"===a.substr(0,5)};h.prototype.lr=function(a,d){this.Th&&!this.Iw(d)?this.Mv(d,function(d){a.src=d},function(a){alert("Failed to load image: "+
a)}):a.src=d};h.prototype.Rk=function(a,d){"undefined"!==typeof a.imageSmoothingEnabled?a.imageSmoothingEnabled=d:(a.webkitImageSmoothingEnabled=d,a.mozImageSmoothingEnabled=d,a.msImageSmoothingEnabled=d)};Vb=function(a){return new h(document.getElementById(a))};Wb=function(a,d){return new h({dc:!0,width:a,height:d})};window.cr_createRuntime=Vb;window.cr_createDCRuntime=Wb;window.createCocoonJSRuntime=function(){window.c2cocoonjs=!0;var a=document.createElement("screencanvas")||document.createElement("canvas");
a.pd=!0;document.body.appendChild(a);a=new h(a);window.c2runtime=a;window.addEventListener("orientationchange",function(){window.c2runtime.setSize(window.innerWidth,window.innerHeight)});window.c2runtime.setSize(window.innerWidth,window.innerHeight);return a};window.createEjectaRuntime=function(){var a=new h(document.getElementById("canvas"));window.c2runtime=a;window.c2runtime.setSize(window.innerWidth,window.innerHeight);return a}})();
window.cr_getC2Runtime=function(){var h=document.getElementById("c2canvas");return h?h.c2runtime:window.c2runtime?window.c2runtime:null};window.cr_getSnapshot=function(h,l){var f=window.cr_getC2Runtime();f&&f.Eu(h,l)};window.cr_sizeCanvas=function(h,l){if(0!==h&&0!==l){var f=window.cr_getC2Runtime();f&&f.setSize(h,l)}};window.cr_setSuspended=function(h){var l=window.cr_getC2Runtime();l&&l.setSuspended(h)};
(function(){function h(a,c){this.b=a;this.lf=null;this.scrollX=this.b.La/2;this.scrollY=this.b.Sa/2;this.scale=1;this.e=0;this.jg=!0;this.name=c[0];this.rx=c[1];this.qx=c[2];this.width=c[1];this.height=c[2];this.Kr=c[3];this.rr=c[4];this.ea=c[5];var b=c[6],e,g;this.T=[];this.Ih=[];e=0;for(g=b.length;e<g;e++){var q=new Xb(this,b[e]);q.Aq=e;this.T.push(q)}b=c[7];this.vf=[];e=0;for(g=b.length;e<g;e++){var q=b[e],v=this.b.n[q[1]];v.Jc||(v.Jc=q);this.vf.push(q);-1===this.Ih.indexOf(v)&&this.Ih.push(v)}this.O=
[];this.ma=[];this.he=!0;this.Ka=[];e=0;for(g=c[8].length;e<g;e++)this.O.push({id:c[8][e][0],name:c[8][e][1],$a:-1,cd:!1,Hb:!0,index:e}),this.Ka.push(c[8][e][2].slice(0));this.jd();this.vi=new ta(0,0,1,1);this.qn=new ta(0,0,1,1);this.Pe={}}function l(a,c){return a.ld-c.ld}function f(a,c){this.tb=a;this.b=a.b;this.c=[];this.scale=1;this.e=0;this.Sd=!1;this.ke=new ta(0,0,0,0);this.Er=new ua;this.ya=this.wa=this.za=this.ua=0;this.Uf=!1;this.pe=-1;this.Jl=0;this.name=c[0];this.index=c[1];this.ea=c[2];
this.visible=c[3];this.Wc=c[4];this.hd=c[5];this.fc=c[6];this.gc=c[7];this.opacity=c[8];this.Lj=c[9];this.Fc=c[10];this.Rb=c[11];this.Ib=c[12];this.av=c[13];this.nh="source-over";this.Kb=this.Qb=0;this.Fb=null;this.$d=p();this.fd=!0;this.zg=new ta(0,0,-1,-1);this.Ab=new ta(0,0,-1,-1);this.Fc&&(this.Fb=new jb(this.b.La,this.b.Sa));this.Cd=!1;var b=c[14],e,g;this.xr=[];this.zc=[];this.ph=[];e=0;for(g=b.length;e<g;e++){var q=b[e],v=this.b.n[q[1]];v.Jc||(v.Jc=q,v.Au=this.index);this.zc.push(q);-1===this.tb.Ih.indexOf(v)&&
this.tb.Ih.push(v)}Aa(this.xr,this.zc);this.O=[];this.ma=[];this.he=!0;this.Ka=[];e=0;for(g=c[15].length;e<g;e++)this.O.push({id:c[15][e][0],name:c[15][e][1],$a:-1,cd:!1,Hb:!0,index:e}),this.Ka.push(c[15][e][2].slice(0));this.jd();this.vi=new ta(0,0,1,1);this.qn=new ta(0,0,1,1)}function p(){return a.length?a.pop():[]}function u(d){G(d);a.push(d)}h.prototype.Ux=function(a){var c=a.type.ea.toString();this.Pe.hasOwnProperty(c)||(this.Pe[c]=[]);this.Pe[c].push(this.b.yn(a))};h.prototype.Bp=function(){var a=
this.T[0];return!a.hd&&1===a.opacity&&!a.Lj&&a.visible};h.prototype.jd=function(){G(this.ma);this.he=!0;var a,c,b;a=0;for(c=this.O.length;a<c;a++)b=this.O[a],b.Hb&&(this.ma.push(b),b.cd||(this.he=!1))};h.prototype.em=function(a){var c,b,e;c=0;for(b=this.O.length;c<b;c++)if(e=this.O[c],e.name===a)return e;return null};var r=[],t=!0;h.prototype.Fn=function(){this.rr&&(this.lf=this.b.Tl[this.rr],this.lf.Qn());this.b.P=this;this.width=this.rx;this.height=this.qx;this.scrollX=this.b.La/2;this.scrollY=
this.b.Sa/2;var a,c,b,e,g,q,v;a=0;for(b=this.b.n.length;a<b;a++)if(c=this.b.n[a],!c.F)for(g=c.c,c=0,e=g.length;c<e;c++)if(q=g[c],q.j){var m=q.j.Aq;m>=this.T.length&&(m=this.T.length-1);q.j=this.T[m];-1===q.j.c.indexOf(q)&&q.j.c.push(q);q.j.Uf=!0}if(!t)for(a=0,b=this.T.length;a<b;++a)this.T[a].c.sort(l);G(r);this.So();a=0;for(b=this.T.length;a<b;a++)q=this.T[a],q.zu(),q.il();g=!1;if(!this.jg){for(v in this.Pe)if(this.Pe.hasOwnProperty(v)&&(c=this.b.Rj(parseInt(v,10)))&&!c.F&&this.b.Pn(c)){e=this.Pe[v];
a=0;for(b=e.length;a<b;a++){q=null;if(c.ka.Le&&(q=this.Pj(e[a].w.l),!q))continue;q=this.b.Ee(c.Jc,q,!1,0,0,!0);this.b.hk(q,e[a]);g=!0;r.push(q)}G(e)}a=0;for(b=this.T.length;a<b;a++)this.T[a].c.sort(l),this.T[a].Uf=!0}g&&(this.b.Gb(),this.b.br());for(a=0;a<r.length;a++)if(q=r[a],q.type.Nb)for(b=q.Dh(),c=0,e=q.type.nc.length;c<e;c++)v=q.type.nc[c],q.type!==v&&(v.c.length>b?q.siblings.push(v.c[b]):v.Jc&&(g=this.b.Ee(v.Jc,q.j,!0,q.x,q.y,!0),this.b.Gb(),v.gl(),q.siblings.push(g),r.push(g)));a=0;for(b=
this.vf.length;a<b;a++)this.b.Ee(this.vf[a],null,!0);this.b.mh=null;this.b.Gb();if(this.b.Ha&&!this.b.Ca)for(a=0,b=this.b.n.length;a<b;a++)v=this.b.n[a],!v.F&&v.c.length&&v.Fk&&v.Fk(this.b.Ha);if(this.b.Oh)Aa(this.b.Ij,r);else for(a=0,b=r.length;a<b;a++)q=r[a],this.b.trigger(Object.getPrototypeOf(q.type.ka).d.Ue,q);G(r);this.b.Oh||this.b.trigger(W.prototype.d.qo,null);this.jg=!1};h.prototype.yu=function(){var a,c,b,e,g;c=a=0;for(b=this.vf.length;a<b;a++)e=this.vf[a],g=this.b.n[e[1]],g.global?g.Nb||
this.b.Ee(e,null,!0):(this.vf[c]=e,c++);za(this.vf,c)};h.prototype.hy=function(){this.b.Oh||this.b.trigger(W.prototype.d.Zs,null);this.b.ym=!0;G(this.b.Gd.kc);var a,c,b,e,g,q;if(!this.jg)for(a=0,c=this.T.length;a<c;a++)for(this.T[a].Sn(),g=this.T[a].c,b=0,e=g.length;b<e;b++)q=g[b],q.type.global||this.b.Pn(q.type)&&this.Ux(q);a=0;for(c=this.T.length;a<c;a++){g=this.T[a].c;b=0;for(e=g.length;b<e;b++)q=g[b],q.type.global||this.b.qe(q);this.b.Gb();G(g);this.T[a].Uf=!0}a=0;for(c=this.b.n.length;a<c;a++)if(g=
this.b.n[a],!(g.global||g.ka.Le||g.ka.Uk||g.F)){b=0;for(e=g.c.length;b<e;b++)this.b.qe(g.c[b]);this.b.Gb()}t=!1;this.b.ym=!1};new ta(0,0,0,0);h.prototype.rd=function(a){var c,b=a,e=!1,g=!this.b.wc;g&&(this.b.fk||(this.b.fk=document.createElement("canvas"),c=this.b.fk,c.width=this.b.I,c.height=this.b.H,this.b.Xp=c.getContext("2d"),e=!0),c=this.b.fk,b=this.b.Xp,c.width!==this.b.I&&(c.width=this.b.I,e=!0),c.height!==this.b.H&&(c.height=this.b.H,e=!0),e&&this.b.Rk(b,this.b.Ga));b.globalAlpha=1;b.globalCompositeOperation=
"source-over";this.b.xl&&!this.Bp()&&b.clearRect(0,0,this.b.I,this.b.H);var q,v,e=0;for(q=this.T.length;e<q;e++)v=this.T[e],v.visible&&0<v.opacity&&11!==v.Ib&&(v.c.length||!v.hd)?v.rd(b):v.il();g&&a.drawImage(c,0,0,this.b.width,this.b.height)};h.prototype.ff=function(a){a.kr(!0);this.b.Xa||(this.b.Xa=a.Ic(this.b.I,this.b.H,this.b.Ga));if(this.b.Xa.$e!==this.b.I||this.b.Xa.Ze!==this.b.H)a.deleteTexture(this.b.Xa),this.b.Xa=a.Ic(this.b.I,this.b.H,this.b.Ga);a.Qc(this.b.Xa);this.b.wc||a.Pf(this.b.I,
this.b.H);var c,b;for(c=this.T.length-1;0<=c;--c)b=this.T[c],b.visible&&1===b.opacity&&b.he&&0===b.Ib&&(b.c.length||!b.hd)?b.ff(a):b.il();a.kr(!1)};h.prototype.ac=function(a){var c=0<this.ma.length||this.b.Wg||!this.b.wc||this.b.Fa;if(c){this.b.Xa||(this.b.Xa=a.Ic(this.b.I,this.b.H,this.b.Ga));if(this.b.Xa.$e!==this.b.I||this.b.Xa.Ze!==this.b.H)a.deleteTexture(this.b.Xa),this.b.Xa=a.Ic(this.b.I,this.b.H,this.b.Ga);a.Qc(this.b.Xa);this.b.wc||a.Pf(this.b.I,this.b.H)}else this.b.Xa&&(a.Qc(null),a.deleteTexture(this.b.Xa),
this.b.Xa=null);this.b.xl&&!this.Bp()&&a.clear(0,0,0,0);var b,e,g;b=0;for(e=this.T.length;b<e;b++)g=this.T[b],g.visible&&0<g.opacity&&(g.c.length||!g.hd)?g.ac(a):g.il();c&&(0===this.ma.length||1===this.ma.length&&this.b.wc?(1===this.ma.length?(c=this.ma[0].index,a.jc(this.ma[0].$a),a.Mg(null,1/this.b.I,1/this.b.H,0,0,1,1,this.scale,this.e,0,0,this.b.I/2,this.b.H/2,this.b.sb.R,this.Ka[c]),a.Gk(this.ma[0].$a)&&(this.b.U=!0)):a.jc(0),this.b.wc||a.Pf(this.b.width,this.b.height),a.Qc(null),a.ir(!1),a.Of(1),
a.tc(this.b.Xa),a.gr(),a.Dd(),a.kd(),c=this.b.width/2,b=this.b.height/2,a.si(-c,b,c,b,c,-b,-c,-b),a.tc(null),a.ir(!0)):this.sn(a,null,null,null))};h.prototype.Bh=function(){return 0<this.ma.length||this.b.Wg||!this.b.wc||this.b.Fa?this.b.Xa:null};h.prototype.zp=function(){var a=this.T[0].Tb(),c,b,e;c=1;for(b=this.T.length;c<b;c++)e=this.T[c],(0!==e.fc||0!==e.gc)&&e.Tb()<a&&(a=e.Tb());return a};h.prototype.Ok=function(a){if(!this.Kr){var c=1/this.zp()*this.b.I/2;a>this.width-c&&(a=this.width-c);a<
c&&(a=c)}this.scrollX!==a&&(this.scrollX=a,this.b.U=!0)};h.prototype.Pk=function(a){if(!this.Kr){var c=1/this.zp()*this.b.H/2;a>this.height-c&&(a=this.height-c);a<c&&(a=c)}this.scrollY!==a&&(this.scrollY=a,this.b.U=!0)};h.prototype.So=function(){this.Ok(this.scrollX);this.Pk(this.scrollY)};h.prototype.sn=function(a,c,b,e){var g=b?b.ma:c?c.ma:this.ma,q=1,v=0,m=0,w=0,f=this.b.I,h=this.b.H;b?(q=b.j.Tb(),v=b.j.Cb(),m=b.j.ua,w=b.j.wa,f=b.j.za,h=b.j.ya):c&&(q=c.Tb(),v=c.Cb(),m=c.ua,w=c.wa,f=c.za,h=c.ya);
var l=this.b.am,t,p,u,r,z=0,S=1,K,P,F=this.b.I,x=this.b.H,V=F/2,B=x/2,D=c?c.vi:this.vi,E=c?c.qn:this.qn,R=0,N=0,C=0,M=0,T=F,va=F,U=x,wa=x,ma=u=0;r=b?b.j.Cb():0;if(b){t=0;for(p=g.length;t<p;t++)u+=a.ew(g[t].$a),ma+=a.fw(g[t].$a);M=b.Aa;R=c.lb(M.left,M.top,!0,!0);C=c.lb(M.left,M.top,!1,!0);T=c.lb(M.right,M.bottom,!0,!0);U=c.lb(M.right,M.bottom,!1,!0);0!==r&&(t=c.lb(M.right,M.top,!0,!0),p=c.lb(M.right,M.top,!1,!0),N=c.lb(M.left,M.bottom,!0,!0),M=c.lb(M.left,M.bottom,!1,!0),r=Math.min(R,T,t,N),T=Math.max(R,
T,t,N),R=r,r=Math.min(C,U,p,M),U=Math.max(C,U,p,M),C=r);R-=u;C-=ma;T+=u;U+=ma;E.left=R/F;E.top=1-C/x;E.right=T/F;E.bottom=1-U/x;N=R=pa(R);M=C=pa(C);va=T=ra(T);wa=U=ra(U);N-=u;M-=ma;va+=u;wa+=ma;0>R&&(R=0);0>C&&(C=0);T>F&&(T=F);U>x&&(U=x);0>N&&(N=0);0>M&&(M=0);va>F&&(va=F);wa>x&&(wa=x);D.left=R/F;D.top=1-C/x;D.right=T/F;D.bottom=1-U/x}else D.left=E.left=0,D.top=E.top=0,D.right=E.right=1,D.bottom=E.bottom=1;ma=b&&(a.qi(g[0].$a)||0!==u||0!==ma||1!==b.opacity||b.type.ka.vq)||c&&!b&&1!==c.opacity;a.gr();
if(ma){l[z]||(l[z]=a.Ic(F,x,this.b.Ga));if(l[z].$e!==F||l[z].Ze!==x)a.deleteTexture(l[z]),l[z]=a.Ic(F,x,this.b.Ga);a.jc(0);a.Qc(l[z]);P=wa-M;a.clearRect(N,x-M-P,va-N,P);b?b.ac(a):(a.tc(this.b.mb),a.Of(c.opacity),a.Dd(),a.translate(-V,-B),a.kd(),a.Bd(R,U,T,U,T,C,R,C,D));E.left=E.top=0;E.right=E.bottom=1;b&&(r=D.top,D.top=D.bottom,D.bottom=r);z=1;S=0}a.Of(1);u=g.length-1;var Ia=a.nn(g[u].$a)||!c&&!b&&!this.b.wc;t=r=0;for(p=g.length;t<p;t++){l[z]||(l[z]=a.Ic(F,x,this.b.Ga));if(l[z].$e!==F||l[z].Ze!==
x)a.deleteTexture(l[z]),l[z]=a.Ic(F,x,this.b.Ga);a.jc(g[t].$a);r=g[t].index;a.Gk(g[t].$a)&&(this.b.U=!0);0!=t||ma?(a.Mg(e,1/F,1/x,E.left,E.top,E.right,E.bottom,q,v,m,w,(m+f)/2,(w+h)/2,this.b.sb.R,b?b.Ka[r]:c?c.Ka[r]:this.Ka[r]),a.tc(null),t!==u||Ia?(a.Qc(l[z]),P=wa-M,K=x-M-P,a.clearRect(N,K,va-N,P)):(b?a.Qe(b.Qb,b.Kb):c&&a.Qe(c.Qb,c.Kb),a.Qc(e)),a.tc(l[S]),a.Dd(),a.translate(-V,-B),a.kd(),a.Bd(R,U,T,U,T,C,R,C,D),t!==u||Ia||a.tc(null)):(a.Qc(l[z]),P=wa-M,K=x-M-P,a.clearRect(N,K,va-N,P),b?(b.zb&&b.zb.D?
(K=b.zb.D,S=1/K.width,K=1/K.height):(S=1/b.width,K=1/b.height),a.Mg(e,S,K,E.left,E.top,E.right,E.bottom,q,v,m,w,(m+f)/2,(w+h)/2,this.b.sb.R,b.Ka[r]),b.ac(a)):(a.Mg(e,1/F,1/x,0,0,1,1,q,v,m,w,(m+f)/2,(w+h)/2,this.b.sb.R,c?c.Ka[r]:this.Ka[r]),a.tc(c?this.b.mb:this.b.Xa),a.Dd(),a.translate(-V,-B),a.kd(),a.Bd(R,U,T,U,T,C,R,C,D)),E.left=E.top=0,E.right=E.bottom=1,b&&!Ia&&(r=U,U=C,C=r));z=0===z?1:0;S=0===z?1:0}Ia&&(a.jc(0),b?a.Qe(b.Qb,b.Kb):c?a.Qe(c.Qb,c.Kb):this.b.wc||(a.Pf(this.b.width,this.b.height),
V=this.b.width/2,B=this.b.height/2,C=R=0,T=this.b.width,U=this.b.height),a.Qc(e),a.tc(l[S]),a.Dd(),a.translate(-V,-B),a.kd(),b&&1===g.length&&!ma?a.Bd(R,C,T,C,T,U,R,U,D):a.Bd(R,U,T,U,T,C,R,C,D),a.tc(null))};h.prototype.Pj=function(a){var c,b;c=0;for(b=this.T.length;c<b;c++)if(this.T[c].ea===a)return this.T[c];return null};h.prototype.xb=function(){var a,c,b,e={sx:this.scrollX,sy:this.scrollY,s:this.scale,a:this.e,w:this.width,h:this.height,fv:this.jg,persist:this.Pe,fx:[],layers:{}};a=0;for(c=this.O.length;a<
c;a++)b=this.O[a],e.fx.push({name:b.name,active:b.Hb,params:this.Ka[b.index]});a=0;for(c=this.T.length;a<c;a++)b=this.T[a],e.layers[b.ea.toString()]=b.xb();return e};h.prototype.Ob=function(a){var c,b,e,g;this.scrollX=a.sx;this.scrollY=a.sy;this.scale=a.s;this.e=a.a;this.width=a.w;this.height=a.h;this.Pe=a.persist;"undefined"!==typeof a.fv&&(this.jg=a.fv);var q=a.fx;c=0;for(b=q.length;c<b;c++)if(e=this.em(q[c].name))e.Hb=q[c].active,this.Ka[e.index]=q[c].params;this.jd();c=a.layers;for(g in c)c.hasOwnProperty(g)&&
(a=this.Pj(parseInt(g,10)))&&a.Ob(c[g])};Jb=h;f.prototype.jd=function(){G(this.ma);this.he=!0;var a,c,b;a=0;for(c=this.O.length;a<c;a++)b=this.O[a],b.Hb&&(this.ma.push(b),b.cd||(this.he=!1))};f.prototype.em=function(a){var c,b,e;c=0;for(b=this.O.length;c<b;c++)if(e=this.O[c],e.name===a)return e;return null};f.prototype.zu=function(){var a,c,b,e,g,q;c=a=0;for(b=this.zc.length;a<b;a++){e=this.zc[a];g=this.b.n[e[1]];q=this.b.Pn(g);g=!0;if(!q||this.tb.jg){e=this.b.Ee(e,this,!0);if(!e)continue;r.push(e);
e.type.global&&(g=!1,this.ph.push(e.uid))}g&&(this.zc[c]=this.zc[a],c++)}this.zc.length=c;this.b.Gb();!this.b.u&&this.O.length&&(this.Ib=this.av);this.nh=kb(this.Ib);this.b.B&&mb(this,this.Ib,this.b.B);this.fd=!0};f.prototype.Kg=function(a,c){var b=Da(this.c,a);0>b||(c&&this.Fc&&a.hc&&a.hc.right>=a.hc.left&&(a.la(),this.Fb.update(a,a.hc,null),a.hc.set(0,0,-1,-1)),b===this.c.length-1?this.c.pop():(ya(this.c,b),this.yi(b)),this.fd=!0)};f.prototype.ih=function(a,c){a.ld=this.c.length;this.c.push(a);
c&&this.Fc&&a.hc&&a.xa();this.fd=!0};f.prototype.Dx=function(a){this.c.unshift(a);this.yi(0)};f.prototype.cx=function(a,c,b){var e=a.vd();c=c.vd();ya(this.c,e);e<c&&c--;b&&c++;c===this.c.length?this.c.push(a):this.c.splice(c,0,a);this.yi(e<c?e:c)};f.prototype.yi=function(a){-1===this.pe?this.pe=a:a<this.pe&&(this.pe=a);this.fd=this.Uf=!0};f.prototype.Sn=function(){if(this.Uf){-1===this.pe&&(this.pe=0);var a,c,b;if(this.Fc)for(a=this.pe,c=this.c.length;a<c;++a)b=this.c[a],b.ld=a,this.Fb.$w(b.hc);else for(a=
this.pe,c=this.c.length;a<c;++a)this.c[a].ld=a;this.Uf=!1;this.pe=-1}};f.prototype.Tb=function(a){return this.aw()*(this.b.wc||a?this.b.jh:1)};f.prototype.aw=function(){return(this.scale*this.tb.scale-1)*this.Rb+1};f.prototype.Cb=function(){return this.Sd?0:Ka(this.tb.e+this.e)};var a=[],g=[],b=[];f.prototype.im=function(){this.Sn();this.Fb.Jk(this.ua,this.wa,this.za,this.ya,b);if(!b.length)return p();if(1===b.length){var a=p();Aa(a,b[0]);G(b);return a}for(var c=!0;1<b.length;){for(var a=b,k=void 0,
e=void 0,n=void 0,q=void 0,v=void 0,k=0,e=a.length;k<e-1;k+=2){var n=a[k],q=a[k+1],v=p(),m=n,w=q,f=v,h=0,l=0,t=0,r=m.length,Q=w.length,O=void 0,z=void 0;for(f.length=r+Q;h<r&&l<Q;++t)O=m[h],z=w[l],O.ld<z.ld?(f[t]=O,++h):(f[t]=z,++l);for(;h<r;++h,++t)f[t]=m[h];for(;l<Q;++l,++t)f[t]=w[l];c||(u(n),u(q));g.push(v)}1===e%2&&(c?(n=p(),Aa(n,a[e-1]),g.push(n)):g.push(a[e-1]));Aa(a,g);G(g);c=!1}a=b[0];G(b);return a};f.prototype.rd=function(a){this.Cd=this.Lj||1!==this.opacity||0!==this.Ib;var c=this.b.canvas,
b=a,e=!1;this.Cd&&(this.b.ek||(this.b.ek=document.createElement("canvas"),c=this.b.ek,c.width=this.b.I,c.height=this.b.H,this.b.Wp=c.getContext("2d"),e=!0),c=this.b.ek,b=this.b.Wp,c.width!==this.b.I&&(c.width=this.b.I,e=!0),c.height!==this.b.H&&(c.height=this.b.H,e=!0),e&&this.b.Rk(b,this.b.Ga),this.hd&&b.clearRect(0,0,this.b.I,this.b.H));b.globalAlpha=1;b.globalCompositeOperation="source-over";this.hd||(b.fillStyle="rgb("+this.Wc[0]+","+this.Wc[1]+","+this.Wc[2]+")",b.fillRect(0,0,this.b.I,this.b.H));
b.save();this.Sd=!0;var e=this.Qa(0,0,!0,!0),g=this.Qa(0,0,!1,!0);this.Sd=!1;this.b.bd&&(e=Math.round(e),g=Math.round(g));this.Lk(e,g,b);var q=this.Tb();b.scale(q,q);b.translate(-e,-g);this.Fc?(this.Ab.left=this.Fb.Yb(this.ua),this.Ab.top=this.Fb.Zb(this.wa),this.Ab.right=this.Fb.Yb(this.za),this.Ab.bottom=this.Fb.Zb(this.ya),this.fd||!this.Ab.sh(this.zg)?(u(this.$d),e=this.im(),this.fd=!1,this.zg.dg(this.Ab)):e=this.$d):e=this.c;for(var v,m=null,g=0,q=e.length;g<q;++g)v=e[g],v!==m&&(this.Wu(v,b),
m=v);this.Fc&&(this.$d=e);b.restore();this.Cd&&(a.globalCompositeOperation=this.nh,a.globalAlpha=this.opacity,a.drawImage(c,0,0))};f.prototype.Wu=function(a,c){if(a.visible&&0!==a.width&&0!==a.height){a.la();var b=a.Aa;b.right<this.ua||b.bottom<this.wa||b.left>this.za||b.top>this.ya||(c.globalCompositeOperation=a.nh,a.rd(c))}};f.prototype.il=function(){this.Sd=!0;var a=this.Qa(0,0,!0,!0),c=this.Qa(0,0,!1,!0);this.Sd=!1;this.b.bd&&(a=Math.round(a),c=Math.round(c));this.Lk(a,c,null)};f.prototype.Lk=
function(a,c,b){var e=this.Tb();this.ua=a;this.wa=c;this.za=a+1/e*this.b.I;this.ya=c+1/e*this.b.H;this.ua>this.za&&(a=this.ua,this.ua=this.za,this.za=a);this.wa>this.ya&&(a=this.wa,this.wa=this.ya,this.ya=a);a=this.Cb();0!==a&&(b&&(b.translate(this.b.I/2,this.b.H/2),b.rotate(-a),b.translate(this.b.I/-2,this.b.H/-2)),this.ke.set(this.ua,this.wa,this.za,this.ya),this.ke.offset((this.ua+this.za)/-2,(this.wa+this.ya)/-2),this.Er.pr(this.ke,a),this.Er.To(this.ke),this.ke.offset((this.ua+this.za)/2,(this.wa+
this.ya)/2),this.ua=this.ke.left,this.wa=this.ke.top,this.za=this.ke.right,this.ya=this.ke.bottom)};f.prototype.ff=function(a){if(this.Cd=this.Lj){this.b.mb||(this.b.mb=a.Ic(this.b.I,this.b.H,this.b.Ga));if(this.b.mb.$e!==this.b.I||this.b.mb.Ze!==this.b.H)a.deleteTexture(this.b.mb),this.b.mb=a.Ic(this.b.I,this.b.H,this.b.Ga);a.Qc(this.b.mb)}this.Sd=!0;var c=this.Qa(0,0,!0,!0),b=this.Qa(0,0,!1,!0);this.Sd=!1;this.b.bd&&(c=Math.round(c),b=Math.round(b));this.Lk(c,b,null);c=this.Tb();a.Dd();a.scale(c,
c);a.vn(-this.Cb());a.translate((this.ua+this.za)/-2,(this.wa+this.ya)/-2);a.kd();this.Fc?(this.Ab.left=this.Fb.Yb(this.ua),this.Ab.top=this.Fb.Zb(this.wa),this.Ab.right=this.Fb.Yb(this.za),this.Ab.bottom=this.Fb.Zb(this.ya),this.fd||!this.Ab.sh(this.zg)?(u(this.$d),c=this.im(),this.fd=!1,this.zg.dg(this.Ab)):c=this.$d):c=this.c;for(var e,g=null,b=c.length-1;0<=b;--b)e=c[b],e!==g&&(this.Yu(c[b],a),g=e);this.Fc&&(this.$d=c);this.hd||(this.Jl=this.b.jf++,a.Sk(this.Jl),a.hr(1,1,1),a.rp(),a.Mx())};f.prototype.ac=
function(a){var c=0,b=0;if(this.Cd=this.Lj||1!==this.opacity||0<this.ma.length||0!==this.Ib){this.b.mb||(this.b.mb=a.Ic(this.b.I,this.b.H,this.b.Ga));if(this.b.mb.$e!==this.b.I||this.b.mb.Ze!==this.b.H)a.deleteTexture(this.b.mb),this.b.mb=a.Ic(this.b.I,this.b.H,this.b.Ga);a.Qc(this.b.mb);this.hd&&a.clear(0,0,0,0)}this.hd||(this.b.Fa?(a.Sk(this.Jl),a.hr(this.Wc[0]/255,this.Wc[1]/255,this.Wc[2]/255),a.rp(),a.cy()):a.clear(this.Wc[0]/255,this.Wc[1]/255,this.Wc[2]/255,1));this.Sd=!0;var e=this.Qa(0,0,
!0,!0),c=this.Qa(0,0,!1,!0);this.Sd=!1;this.b.bd&&(e=Math.round(e),c=Math.round(c));this.Lk(e,c,null);e=this.Tb();a.Dd();a.scale(e,e);a.vn(-this.Cb());a.translate((this.ua+this.za)/-2,(this.wa+this.ya)/-2);a.kd();this.Fc?(this.Ab.left=this.Fb.Yb(this.ua),this.Ab.top=this.Fb.Zb(this.wa),this.Ab.right=this.Fb.Yb(this.za),this.Ab.bottom=this.Fb.Zb(this.ya),this.fd||!this.Ab.sh(this.zg)?(u(this.$d),c=this.im(),this.fd=!1,this.zg.dg(this.Ab)):c=this.$d):c=this.c;var g,q,v=null,b=0;for(g=c.length;b<g;++b)q=
c[b],q!==v&&(this.Xu(c[b],a),v=q);this.Fc&&(this.$d=c);this.Cd&&(c=this.ma.length?this.ma[0].$a:0,b=this.ma.length?this.ma[0].index:0,0===this.ma.length||1===this.ma.length&&!a.nn(c)&&1===this.opacity?(1===this.ma.length?(a.jc(c),a.Mg(this.tb.Bh(),1/this.b.I,1/this.b.H,0,0,1,1,e,this.Cb(),this.ua,this.wa,(this.ua+this.za)/2,(this.wa+this.ya)/2,this.b.sb.R,this.Ka[b]),a.Gk(c)&&(this.b.U=!0)):a.jc(0),a.Qc(this.tb.Bh()),a.Of(this.opacity),a.tc(this.b.mb),a.Qe(this.Qb,this.Kb),a.Dd(),a.kd(),e=this.b.I/
2,c=this.b.H/2,a.si(-e,c,e,c,e,-c,-e,-c),a.tc(null)):this.tb.sn(a,this,null,this.tb.Bh()))};f.prototype.Xu=function(a,c){if(a.visible&&0!==a.width&&0!==a.height){a.la();var b=a.Aa;b.right<this.ua||b.bottom<this.wa||b.left>this.za||b.top>this.ya||(c.Sk(a.jf),a.Rr?this.Zu(a,c):(c.jc(0),c.Qe(a.Qb,a.Kb),a.ac(c)))}};f.prototype.Yu=function(a,c){if(a.visible&&0!==a.width&&0!==a.height){a.la();var b=a.Aa;b.right<this.ua||b.bottom<this.wa||b.left>this.za||b.top>this.ya||(a.jf=this.b.jf++,0===a.Ib&&1===a.opacity&&
a.he&&a.ff&&(c.Sk(a.jf),a.ff(c)))}};f.prototype.Zu=function(a,c){var b=a.ma[0].$a,e=a.ma[0].index,g=this.Tb();if(1!==a.ma.length||c.nn(b)||c.Fx(b)||(a.e||a.j.Cb())&&c.qi(b)||1!==a.opacity||a.type.ka.vq)this.tb.sn(c,this,a,this.Cd?this.b.mb:this.tb.Bh()),c.Dd(),c.scale(g,g),c.vn(-this.Cb()),c.translate((this.ua+this.za)/-2,(this.wa+this.ya)/-2),c.kd();else{c.jc(b);c.Qe(a.Qb,a.Kb);c.Gk(b)&&(this.b.U=!0);var q=0,v=0,m=0,w=0;c.qi(b)&&(w=a.Aa,q=this.lb(w.left,w.top,!0,!0),v=this.lb(w.left,w.top,!1,!0),
m=this.lb(w.right,w.bottom,!0,!0),w=this.lb(w.right,w.bottom,!1,!0),q=q/windowWidth,v=1-v/windowHeight,m=m/windowWidth,w=1-w/windowHeight);var f;a.zb&&a.zb.D?(f=a.zb.D,b=1/f.width,f=1/f.height):(b=1/a.width,f=1/a.height);c.Mg(this.Cd?this.b.mb:this.tb.Bh(),b,f,q,v,m,w,g,this.Cb(),this.ua,this.wa,(this.ua+this.za)/2,(this.wa+this.ya)/2,this.b.sb.R,a.Ka[e]);a.ac(c)}};f.prototype.Qa=function(a,c,b,e){var g=this.b.devicePixelRatio;this.b.xf&&(a*=g,c*=g);var g=this.b.Rq,q=this.b.Sq,g=(this.tb.scrollX-
g)*this.fc+g,q=(this.tb.scrollY-q)*this.gc+q,v=g,m=q,w=1/this.Tb(!e);e?(v-=this.b.I*w/2,m-=this.b.H*w/2):(v-=this.b.width*w/2,m-=this.b.height*w/2);v+=a*w;m+=c*w;c=this.Cb();0!==c&&(v-=g,m-=q,a=Math.cos(c),c=Math.sin(c),e=v*a-m*c,m=m*a+v*c,v=e+g,m+=q);return b?v:m};f.prototype.lb=function(a,c,b,e){var g=this.b.Rq,q=this.b.Sq,v=(this.tb.scrollX-g)*this.fc+g,m=(this.tb.scrollY-q)*this.gc+q,q=v,g=m,w=this.Cb();if(0!==w){a-=v;c-=m;var f=Math.cos(-w),w=Math.sin(-w),h=a*f-c*w;c=c*f+a*w;a=h+v;c+=m}v=1/this.Tb(!e);
e?(q-=this.b.I*v/2,g-=this.b.H*v/2):(q-=this.b.width*v/2,g-=this.b.height*v/2);q=(a-q)/v;g=(c-g)/v;a=this.b.devicePixelRatio;this.b.xf&&!e&&(q/=a,g/=a);return b?q:g};f.prototype.xb=function(){var a,c,b,e={s:this.scale,a:this.e,vl:this.ua,vt:this.wa,vr:this.za,vb:this.ya,v:this.visible,bc:this.Wc,t:this.hd,px:this.fc,py:this.gc,o:this.opacity,zr:this.Rb,fx:[],cg:this.ph,instances:[]};a=0;for(c=this.O.length;a<c;a++)b=this.O[a],e.fx.push({name:b.name,active:b.Hb,params:this.Ka[b.index]});return e};
f.prototype.Ob=function(a){var c,b,e;this.scale=a.s;this.e=a.a;this.ua=a.vl;this.wa=a.vt;this.za=a.vr;this.ya=a.vb;this.visible=a.v;this.Wc=a.bc;this.hd=a.t;this.fc=a.px;this.gc=a.py;this.opacity=a.o;this.Rb=a.zr;this.ph=a.cg||[];Aa(this.zc,this.xr);var g=new ca;c=0;for(e=this.ph.length;c<e;++c)g.add(this.ph[c]);b=c=0;for(e=this.zc.length;c<e;++c)g.contains(this.zc[c][2])||(this.zc[b]=this.zc[c],++b);za(this.zc,b);b=a.fx;c=0;for(e=b.length;c<e;c++)if(a=this.em(b[c].name))a.Hb=b[c].active,this.Ka[a.index]=
b[c].params;this.jd();this.c.sort(l);this.Uf=!0};Xb=f})();
(function(){function h(a,e){var b,c=a.length;switch(c){case 0:return!0;case 1:return a[0]===e[0];case 2:return a[0]===e[0]&&a[1]===e[1];default:for(b=0;b<c;b++)if(a[b]!==e[b])return!1;return!0}}function l(a,e){return a.index-e.index}function f(a){var e,b,c,d;2===a.length?a[0].index>a[1].index&&(e=a[0],a[0]=a[1],a[1]=e):2<a.length&&a.sort(l);a.length>=n.length&&(n.length=a.length+1);n[a.length]||(n[a.length]=[]);d=n[a.length];e=0;for(b=d.length;e<b;e++)if(c=d[e],h(a,c))return c;d.push(a);return a}
function p(a,e){this.b=a;this.Hr={};this.lp={};this.nm=!1;this.Ep=new ca;this.Ol=[];this.yl=[];this.name=e[0];var b=e[1];this.Ge=[];var c,d;c=0;for(d=b.length;c<d;c++)this.Gp(b[c],null,this.Ge)}function u(a){this.type=a;this.c=[];this.W=[];this.da=!0}function r(a,e,b){this.sheet=a;this.parent=e;this.b=a.b;this.Ba=[];this.Re=[];this.Cp=this.bl=this.Ln=this.um=this.group=this.En=!1;this.gb=[];this.Gc=[];this.Sc=[];this.Eh="";this.mg=this.um=this.group=!1;this.rj=null;b[1]&&(this.Eh=b[1][1].toLowerCase(),
this.group=!0,this.um=!!b[1][0],this.rj=[],this.mg=this.um,this.b.Yf.push(this),this.b.Fh[this.Eh]=this);this.Dc=b[2];this.ea=b[4];this.group||(this.b.Ro[this.ea.toString()]=this);var c=b[5];a=0;for(e=c.length;a<e;a++){var d=new Yb(this,c[a]);d.index=a;this.gb.push(d);this.Jo(d.type)}c=b[6];a=0;for(e=c.length;a<e;a++)d=new Zb(this,c[a]),d.index=a,this.Gc.push(d);if(8===b.length)for(b=b[7],a=0,e=b.length;a<e;a++)this.sheet.Gp(b[a],this,this.Sc);this.ck=!1;this.gb.length&&(this.ck=null==this.gb[0].type&&
this.gb[0].Bb==W.prototype.d.co)}function t(a,e){var b,c,d;if(a&&(-1===e.indexOf(a)&&e.push(a),a.Nb))for(b=0,c=a.nc.length;b<c;b++)d=a.nc[b],a!==d&&-1===e.indexOf(d)&&e.push(d)}function a(a,e){this.vc=a;this.sheet=a.sheet;this.b=a.b;this.aa=[];this.Ma=[];this.X={};this.index=-1;this.gh=!1;this.Bb=this.b.re(e[1]);this.trigger=0<e[3];this.kp=2===e[3];this.yd=e[4];this.pg=e[5];this.Uw=e[6];this.ea=e[7];this.b.Ce[this.ea.toString()]=this;-1===e[0]?(this.type=null,this.Za=this.xn,this.Xe=null,this.Xc=
-1):(this.type=this.b.n[e[0]],this.Za=this.Uw?this.Sx:this.wn,e[2]?(this.Xe=this.type.Oj(e[2]),this.Xc=this.type.cm(e[2])):(this.Xe=null,this.Xc=-1),this.vc.parent&&this.vc.parent.Tk());this.kp&&(this.Za=this.Tx);if(10===e.length){var b,c,d=e[9];b=0;for(c=d.length;b<c;b++){var g=new $b(this,d[b]);this.aa.push(g)}this.Ma.length=d.length}}function g(a,e){this.vc=a;this.sheet=a.sheet;this.b=a.b;this.aa=[];this.Ma=[];this.X={};this.index=-1;this.gh=!1;this.Bb=this.b.re(e[1]);-1===e[0]?(this.type=null,
this.Za=this.xn,this.Xe=null,this.Xc=-1):(this.type=this.b.n[e[0]],this.Za=this.wn,e[2]?(this.Xe=this.type.Oj(e[2]),this.Xc=this.type.cm(e[2])):(this.Xe=null,this.Xc=-1));this.ea=e[3];this.b.ue[this.ea.toString()]=this;if(6===e.length){var b,c,d=e[5];b=0;for(c=d.length;b<c;b++){var g=new $b(this,d[b]);this.aa.push(g)}this.Ma.length=d.length}}function b(){v++;q.length===v&&q.push(new ac);return q[v]}function d(a,e){this.Oc=a;this.vc=a.vc;this.sheet=a.sheet;this.b=a.b;this.type=e[0];this.td=null;this.ie=
0;this.get=null;this.Zo=0;this.tb=null;this.key=0;this.object=null;this.index=0;this.Oi=this.Rf=this.Oi=this.Rf=this.pp=this.mf=this.Pi=null;this.Uc=!1;var b,c,d;switch(e[0]){case 0:case 7:this.td=new bc(this,e[1]);this.ie=0;this.get=this.kw;break;case 1:this.td=new bc(this,e[1]);this.ie=0;this.get=this.lw;break;case 5:this.td=new bc(this,e[1]);this.ie=0;this.get=this.qw;break;case 3:case 8:this.Zo=e[1];this.get=this.iw;break;case 6:this.tb=this.b.Jm[e[1]];this.get=this.rw;break;case 9:this.key=e[1];
this.get=this.pw;break;case 4:this.object=this.b.n[e[1]];this.get=this.sw;this.vc.Jo(this.object);this.Oc instanceof Zb?this.vc.Tk():this.vc.parent&&this.vc.parent.Tk();break;case 10:this.index=e[1];a.type&&a.type.F?(this.get=this.mw,this.Uc=!0):this.get=this.ow;break;case 11:this.Pi=e[1];this.mf=null;this.get=this.jw;break;case 2:case 12:this.pp=e[1];this.get=this.hw;break;case 13:for(this.get=this.uw,this.Rf=[],this.Oi=[],b=1,c=e.length;b<c;b++)d=new $b(this.Oc,e[b]),this.Rf.push(d),this.Oi.push(0)}}
function c(a,e,b){this.sheet=a;this.parent=e;this.b=a.b;this.Ba=[];this.name=b[1];this.kl=b[2];this.tm=b[3];this.Vh=!!b[4];this.bk=!!b[5];this.ea=b[6];this.b.Yg[this.ea.toString()]=this;this.data=this.tm;this.parent?(this.Hf=this.Vh||this.bk?-1:this.b.fy++,this.b.ju.push(this)):(this.Hf=-1,this.b.iu.push(this))}function k(a,e,b){this.sheet=a;this.parent=e;this.b=a.b;this.Ba=[];this.Hh=null;this.Bw=b[1];this.Hb=!0}function e(){this.Ar=[];this.reset(null)}var n=[];p.prototype.toString=function(){return this.name};
p.prototype.Gp=function(a,e,b){switch(a[0]){case 0:a=new cc(this,e,a);if(a.Dc)for(b.push(a),b=0,e=a.gb.length;b<e;b++)a.gb[b].trigger&&this.Hp(a,b);else a.Pp()?this.Hp(a,0):b.push(a);break;case 1:a=new Ub(this,e,a);b.push(a);break;case 2:a=new dc(this,e,a),b.push(a)}};p.prototype.Ta=function(){var a,e;a=0;for(e=this.Ge.length;a<e;a++)this.Ge[a].Ta(a<e-1&&this.Ge[a+1].ck)};p.prototype.Qn=function(){G(this.Ol);G(this.yl);this.Io(this);G(this.yl)};p.prototype.Io=function(a){var e,b,c,d,g=a.Ol,n=a.yl,
k=this.Ep.Te();e=0;for(b=k.length;e<b;++e)c=k[e],d=c.Hh,!c.Hb||a===d||-1<n.indexOf(d)||(n.push(d),d.Io(a),g.push(d))};p.prototype.Za=function(a){this.b.Cz||(this.nm=!0,a||(this.b.Bm=!0));var e,b;e=0;for(b=this.Ge.length;e<b;e++){var c=this.Ge[e];c.Za();this.b.Il(c.Ba);this.b.Ie&&this.b.Gb()}a||(this.b.Bm=!1)};p.prototype.Hp=function(a,e){a.Dc||this.b.el.push(a);var b,c,d=a.gb[e],g;d.type?g=d.type.name:g="system";var n=(b=d.kp)?this.lp:this.Hr;n[g]||(n[g]=[]);g=n[g];n=d.Bb;if(b){if(d.aa.length&&(d=
d.aa[0],1===d.type&&2===d.td.type)){d=d.td.value.toLowerCase();b=0;for(c=g.length;b<c;b++)if(g[b].method==n){b=g[b].uh;b[d]?b[d].push([a,e]):b[d]=[[a,e]];return}b={};b[d]=[[a,e]];g.push({method:n,uh:b})}}else{b=0;for(c=g.length;b<c;b++)if(g[b].method==n){g[b].uh.push([a,e]);return}Z&&n===Z.prototype.d.Xf?g.unshift({method:n,uh:[[a,e]]}):g.push({method:n,uh:[[a,e]]})}};Kb=p;u.prototype.mm=function(){return this.da?this.type.c.length:this.c.length};u.prototype.yc=function(){return this.da?this.type.c:
this.c};u.prototype.pi=function(a){a&&(a.b.Wa().hb.Dc?(this.da&&(G(this.c),Aa(this.W,a.type.c),this.da=!1),a=this.W.indexOf(a),-1!==a&&(this.c.push(this.W[a]),this.W.splice(a,1))):(this.da=!1,G(this.c),this.c[0]=a))};sb=u;window._c2hh_="A16AF58E7D25594A6A684FA3B13239069089EECC";r.prototype.Ta=function(a){var e,b=this.parent;if(this.group)for(this.bl=!0;b;){if(!b.group){this.bl=!1;break}b=b.parent}this.Ln=!this.Pp()&&(!this.parent||this.parent.group&&this.parent.bl);this.Cp=!!a;this.Re=this.Ba.slice(0);
for(b=this.parent;b;){a=0;for(e=b.Ba.length;a<e;a++)this.hu(b.Ba[a]);b=b.parent}this.Ba=f(this.Ba);this.Re=f(this.Re);a=0;for(e=this.gb.length;a<e;a++)this.gb[a].Ta();a=0;for(e=this.Gc.length;a<e;a++)this.Gc[a].Ta();a=0;for(e=this.Sc.length;a<e;a++)this.Sc[a].Ta(a<e-1&&this.Sc[a+1].ck)};r.prototype.Zx=function(a){if(this.mg!==!!a){this.mg=!!a;var e;a=0;for(e=this.rj.length;a<e;++a)this.rj[a].Mr();0<e&&this.b.P.lf&&this.b.P.lf.Qn()}};r.prototype.Jo=function(a){t(a,this.Ba)};r.prototype.hu=function(a){t(a,
this.Re)};r.prototype.Tk=function(){this.En=!0;this.parent&&this.parent.Tk()};r.prototype.Pp=function(){return this.gb.length?this.gb[0].trigger:!1};r.prototype.Za=function(){var a,e,b=!1,c=this.b,d=this.b.Wa();d.hb=this;var g=this.gb;this.ck||(d.Rl=!1);if(this.Dc){0===g.length&&(b=!0);d.Ua=0;for(a=g.length;d.Ua<a;d.Ua++)e=g[d.Ua],e.trigger||(e=e.Za())&&(b=!0);(d.Cf=b)&&this.Mk()}else{d.Ua=0;for(a=g.length;d.Ua<a;d.Ua++)if(e=g[d.Ua].Za(),!e){d.Cf=!1;this.Ln&&c.Ie&&c.Gb();return}d.Cf=!0;this.Mk()}this.cv(d)};
r.prototype.cv=function(a){a.Cf&&this.Cp&&(a.Rl=!0);this.Ln&&this.b.Ie&&this.b.Gb()};r.prototype.Qx=function(a){this.b.Wa().hb=this;this.gb[a].Za()&&(this.Mk(),this.b.Wa().Cf=!0)};r.prototype.Mk=function(){var a=this.b.Wa(),e;a.$b=0;for(e=this.Gc.length;a.$b<e;a.$b++)if(this.Gc[a.$b].Za())return;this.fr()};r.prototype.Ox=function(){var a=this.b.Wa(),e;for(e=this.Gc.length;a.$b<e;a.$b++)if(this.Gc[a.$b].Za())return;this.fr()};r.prototype.fr=function(){if(this.Sc.length){var a,e,b,c,d=this.Sc.length-
1;this.b.Ik(this);if(this.En)for(a=0,e=this.Sc.length;a<e;a++)b=this.Sc[a],(c=!this.bl||!this.group&&a<d)&&this.b.Hk(b.Ba),b.Za(),c?this.b.Mf(b.Ba):this.b.Il(b.Ba);else for(a=0,e=this.Sc.length;a<e;a++)this.Sc[a].Za();this.b.Ck()}};r.prototype.Rx=function(){var a=this.b.Wa();a.hb=this;var e=!1,b;a.Ua=0;for(b=this.gb.length;a.Ua<b;a.Ua++)if(this.gb[a.Ua].Za())e=!0;else if(!this.Dc)return!1;return this.Dc?e:!0};r.prototype.dr=function(){this.b.nf++;var a=this.b.Wa().Ua,e=this.b.Ik(this);if(!this.Dc)for(e.Ua=
a+1,a=this.gb.length;e.Ua<a;e.Ua++)if(!this.gb[e.Ua].Za()){this.b.Ck();return}this.Mk();this.b.Ck()};r.prototype.Mw=function(a){var e=a.index;if(0===e)return!0;for(--e;0<=e;--e)if(this.gb[e].type===a.type)return!1;return!0};cc=r;a.prototype.Ta=function(){var a,e,b;a=0;for(e=this.aa.length;a<e;a++)b=this.aa[a],b.Ta(),b.Uc&&(this.gh=!0)};a.prototype.Tx=function(){return!0};a.prototype.xn=function(){var a,e;a=0;for(e=this.aa.length;a<e;a++)this.Ma[a]=this.aa[a].get();return Ta(this.Bb.apply(this.b.Gd,
this.Ma),this.pg)};a.prototype.Sx=function(){var a,e;a=0;for(e=this.aa.length;a<e;a++)this.Ma[a]=this.aa[a].get();a=this.Bb.apply(this.Xe?this.Xe:this.type,this.Ma);this.type.Md();return a};a.prototype.wn=function(){var a,e,b,c,d,g,n,k,q=this.type,v=q.Y(),f=this.vc.Dc&&!this.trigger;e=0;var h=q.Nb,l=q.F,t=q.Ud,p=this.Xc,u=-1<p,r=this.gh,D=this.aa,E=this.Ma,R=this.pg,N=this.Bb,C;if(r)for(e=0,d=D.length;e<d;++e)g=D[e],g.Uc||(E[e]=g.get(0));else for(e=0,d=D.length;e<d;++e)E[e]=D[e].get(0);if(v.da){G(v.c);
G(v.W);C=q.c;a=0;for(c=C.length;a<c;++a){k=C[a];if(r)for(e=0,d=D.length;e<d;++e)g=D[e],g.Uc&&(E[e]=g.get(a));u?(e=0,l&&(e=k.type.ig[t]),e=N.apply(k.N[p+e],E)):e=N.apply(k,E);(n=Ta(e,R))?v.c.push(k):f&&v.W.push(k)}q.finish&&q.finish(!0);v.da=!1;q.Md();return v.mm()}b=0;C=(n=f&&!this.vc.Mw(this))?v.W:v.c;var M=!1;a=0;for(c=C.length;a<c;++a){k=C[a];if(r)for(e=0,d=D.length;e<d;++e)g=D[e],g.Uc&&(E[e]=g.get(a));u?(e=0,l&&(e=k.type.ig[t]),e=N.apply(k.N[p+e],E)):e=N.apply(k,E);if(Ta(e,R))if(M=!0,n){if(v.c.push(k),
h)for(e=0,d=k.siblings.length;e<d;e++)g=k.siblings[e],g.type.Y().c.push(g)}else{C[b]=k;if(h)for(e=0,d=k.siblings.length;e<d;e++)g=k.siblings[e],g.type.Y().c[b]=g;b++}else if(n){C[b]=k;if(h)for(e=0,d=k.siblings.length;e<d;e++)g=k.siblings[e],g.type.Y().W[b]=g;b++}else if(f&&(v.W.push(k),h))for(e=0,d=k.siblings.length;e<d;e++)g=k.siblings[e],g.type.Y().W.push(g)}za(C,b);if(h)for(l=q.nc,a=0,c=l.length;a<c;a++)k=l[a].Y(),n?za(k.W,b):za(k.c,b);b=M;if(n&&!M)for(a=0,c=v.c.length;a<c;a++){k=v.c[a];if(r)for(e=
0,d=D.length;e<d;e++)g=D[e],g.Uc&&(E[e]=g.get(a));e=u?N.apply(k.N[p],E):N.apply(k,E);if(Ta(e,R)){M=!0;break}}q.finish&&q.finish(b||f);return f?M:v.mm()};Yb=a;g.prototype.Ta=function(){var a,e,b;a=0;for(e=this.aa.length;a<e;a++)b=this.aa[a],b.Ta(),b.Uc&&(this.gh=!0)};g.prototype.xn=function(){var a=this.b,e,b,c=this.aa,d=this.Ma;e=0;for(b=c.length;e<b;++e)d[e]=c[e].get();return this.Bb.apply(a.Gd,d)};g.prototype.wn=function(){var a=this.type,e=this.Xc,b=a.Ud,c=this.gh,d=this.aa,g=this.Ma,n=this.Bb,
k=a.Y().yc(),a=a.F,q=-1<e,v,f,h,l,t,p;if(c)for(f=0,l=d.length;f<l;++f)t=d[f],t.Uc||(g[f]=t.get(0));else for(f=0,l=d.length;f<l;++f)g[f]=d[f].get(0);v=0;for(h=k.length;v<h;++v){p=k[v];if(c)for(f=0,l=d.length;f<l;++f)t=d[f],t.Uc&&(g[f]=t.get(v));q?(f=0,a&&(f=p.type.ig[b]),n.apply(p.N[e+f],g)):n.apply(p,g)}return!1};Zb=g;var q=[],v=-1;d.prototype.Ta=function(){var a,e;if(11===this.type)this.mf=this.b.xp(this.Pi,this.vc.parent);else if(13===this.type)for(a=0,e=this.Rf.length;a<e;a++)this.Rf[a].Ta();this.td&&
this.td.Ta()};d.prototype.bx=function(a){this.Uc||!a||a.ka.Uk||(this.Uc=!0)};d.prototype.nr=function(){this.Uc=!0};d.prototype.kw=function(a){this.ie=a||0;a=b();this.td.get(a);v--;return a.data};d.prototype.lw=function(a){this.ie=a||0;a=b();this.td.get(a);v--;return A(a.data)?a.data:""};d.prototype.sw=function(){return this.object};d.prototype.iw=function(){return this.Zo};d.prototype.qw=function(a){this.ie=a||0;a=b();this.td.get(a);v--;return a.rb()?this.b.Wd(a.data):this.b.Ah(a.data)};d.prototype.rw=
function(){return this.tb};d.prototype.pw=function(){return this.key};d.prototype.ow=function(){return this.index};d.prototype.mw=function(a){a=a||0;var e=this.Oc.type,b=null,b=e.Y(),c=b.yc();if(c.length)b=c[a%c.length].type;else if(b.W.length)b=b.W[a%b.W.length].type;else if(e.c.length)b=e.c[a%e.c.length].type;else return 0;return this.index+b.Gj[e.Ud]};d.prototype.jw=function(){return this.mf};d.prototype.hw=function(){return this.pp};d.prototype.uw=function(){var a,e;a=0;for(e=this.Rf.length;a<
e;a++)this.Oi[a]=this.Rf[a].get();return this.Oi};$b=d;c.prototype.Ta=function(){this.Ba=f(this.Ba)};c.prototype.Qf=function(a){var e=this.b.vp();this.parent&&!this.Vh&&e?(this.Hf>=e.length&&(e.length=this.Hf+1),e[this.Hf]=a):this.data=a};c.prototype.Ch=function(){var a=this.b.vp();return!this.parent||this.Vh||!a||this.bk?this.data:this.Hf>=a.length||"undefined"===typeof a[this.Hf]?this.tm:a[this.Hf]};c.prototype.Za=function(){!this.parent||this.Vh||this.bk||this.Qf(this.tm)};Ub=c;k.prototype.toString=
function(){return"include:"+this.Hh.toString()};k.prototype.Ta=function(){this.Hh=this.b.Tl[this.Bw];this.sheet.Ep.add(this);this.Ba=f(this.Ba);for(var a=this.parent;a;)a.group&&a.rj.push(this),a=a.parent;this.Mr()};k.prototype.Za=function(){this.parent&&this.b.ri(this.b.n);this.Hh.nm||this.Hh.Za(!0);this.parent&&this.b.Mf(this.b.n)};k.prototype.Mr=function(){for(var a=this.parent;a;){if(a.group&&!a.mg){this.Hb=!1;return}a=a.parent}this.Hb=!0};dc=k;e.prototype.reset=function(a){this.hb=a;this.$b=
this.Ua=0;G(this.Ar);this.Rl=this.Cf=!1};e.prototype.Ow=function(){return this.hb.En?!0:this.Ua<this.hb.gb.length-1?!!this.hb.Ba.length:!1};Tb=e})();
(function(){function h(f,a){this.Oc=f;this.b=f.b;this.type=a[0];this.get=[this.yv,this.uv,this.Hv,this.Kv,this.hv,this.Iv,this.Cv,this.rv,this.Bv,this.Gv,this.jv,this.Fv,this.sv,this.Dv,this.zv,this.Av,this.vv,this.wv,this.qv,this.Jv,this.Ev,this.xv,this.pv,this.tv][this.type];var g=null;this.de=this.aa=this.Ma=this.Bb=this.al=this.second=this.first=this.value=null;this.Xc=-1;this.Zc=null;this.Sr=-1;this.mf=this.Pi=null;this.Lg=!1;switch(this.type){case 0:case 1:case 2:this.value=a[1];break;case 3:this.first=
new bc(f,a[1]);break;case 18:this.first=new bc(f,a[1]);this.second=new bc(f,a[2]);this.al=new bc(f,a[3]);break;case 19:this.Bb=this.b.re(a[1]);this.Bb!==W.prototype.L.random&&this.Bb!==W.prototype.L.Yo||this.Oc.nr();this.Ma=[];this.aa=[];3===a.length?(g=a[2],this.Ma.length=g.length+1):this.Ma.length=1;break;case 20:this.de=this.b.n[a[1]];this.Xc=-1;this.Bb=this.b.re(a[2]);this.Lg=a[3];gc.Function&&this.Bb===gc.Function.prototype.L.Fy&&this.Oc.nr();a[4]?this.Zc=new bc(f,a[4]):this.Zc=null;this.Ma=
[];this.aa=[];6===a.length?(g=a[5],this.Ma.length=g.length+1):this.Ma.length=1;break;case 21:this.de=this.b.n[a[1]];this.Lg=a[2];a[3]?this.Zc=new bc(f,a[3]):this.Zc=null;this.Sr=a[4];break;case 22:this.de=this.b.n[a[1]];this.de.Oj(a[2]);this.Xc=this.de.cm(a[2]);this.Bb=this.b.re(a[3]);this.Lg=a[4];a[5]?this.Zc=new bc(f,a[5]):this.Zc=null;this.Ma=[];this.aa=[];7===a.length?(g=a[6],this.Ma.length=g.length+1):this.Ma.length=1;break;case 23:this.Pi=a[1],this.mf=null}this.Oc.bx(this.de);4<=this.type&&
17>=this.type&&(this.first=new bc(f,a[1]),this.second=new bc(f,a[2]));if(g){var b,d;b=0;for(d=g.length;b<d;b++)this.aa.push(new bc(f,g[b]))}}function l(){++r;u.length===r&&u.push(new ac);return u[r]}function f(f,a,g){var b,d;b=0;for(d=f.length;b<d;++b)f[b].get(g),a[b+1]=g.data}function p(f,a){this.type=f||ec.Wf;this.data=a||0;this.Jf=null;this.type==ec.Wf&&(this.data=Math.floor(this.data))}h.prototype.Ta=function(){23===this.type&&(this.mf=this.Oc.b.xp(this.Pi,this.Oc.vc.parent));this.first&&this.first.Ta();
this.second&&this.second.Ta();this.al&&this.al.Ta();this.Zc&&this.Zc.Ta();if(this.aa){var f,a;f=0;for(a=this.aa.length;f<a;f++)this.aa[f].Ta()}};var u=[],r=-1;h.prototype.Jv=function(h){var a=this.aa,g=this.Ma;g[0]=h;h=l();f(a,g,h);--r;this.Bb.apply(this.b.Gd,g)};h.prototype.Ev=function(h){var a=this.de,g=this.Ma,b=this.aa,d=this.Zc,c=this.Bb,k=this.Oc.ie,e=a.Y(),n=e.yc();if(!n.length)if(e.W.length)n=e.W;else{this.Lg?h.uc(""):h.Da(0);return}g[0]=h;h.Jf=a;h=l();f(b,g,h);d&&(d.get(h),h.rb()&&(k=h.data,
n=a.c));--r;a=n.length;if(k>=a||k<=-a)k%=a;0>k&&(k+=a);c.apply(n[k],g)};h.prototype.pv=function(h){var a=this.de,g=this.Ma,b=this.aa,d=this.Zc,c=this.Xc,k=this.Bb,e=this.Oc.ie,n=a.Y(),q=n.yc();if(!q.length)if(n.W.length)q=n.W;else{this.Lg?h.uc(""):h.Da(0);return}g[0]=h;h.Jf=a;h=l();f(b,g,h);d&&(d.get(h),h.rb()&&(e=h.data,q=a.c));--r;b=q.length;if(e>=b||e<=-b)e%=b;0>e&&(e+=b);e=q[e];q=0;a.F&&(q=e.type.ig[a.Ud]);k.apply(e.N[c+q],g)};h.prototype.xv=function(f){var a=this.Zc,g=this.de,b=this.Sr,d=this.Oc.ie,
c=g.Y(),k=c.yc();if(!k.length)if(c.W.length)k=c.W;else{this.Lg?f.uc(""):f.Da(0);return}if(a){c=l();a.get(c);if(c.rb()){d=c.data;k=g.c;0!==k.length&&(d%=k.length,0>d&&(d+=k.length));d=g.gm(d);g=d.kb[b];A(g)?f.uc(g):f.A(g);--r;return}--r}a=k.length;if(d>=a||d<=-a)d%=a;0>d&&(d+=a);d=k[d];k=0;g.F&&(k=d.type.Gj[g.Ud]);g=d.kb[b+k];A(g)?f.uc(g):f.A(g)};h.prototype.yv=function(f){f.type=ec.Wf;f.data=this.value};h.prototype.uv=function(f){f.type=ec.Vf;f.data=this.value};h.prototype.Hv=function(f){f.type=ec.String;
f.data=this.value};h.prototype.Kv=function(f){this.first.get(f);f.rb()&&(f.data=-f.data)};h.prototype.hv=function(f){this.first.get(f);var a=l();this.second.get(a);f.rb()&&a.rb()&&(f.data+=a.data,a.tg()&&f.Eg());--r};h.prototype.Iv=function(f){this.first.get(f);var a=l();this.second.get(a);f.rb()&&a.rb()&&(f.data-=a.data,a.tg()&&f.Eg());--r};h.prototype.Cv=function(f){this.first.get(f);var a=l();this.second.get(a);f.rb()&&a.rb()&&(f.data*=a.data,a.tg()&&f.Eg());--r};h.prototype.rv=function(f){this.first.get(f);
var a=l();this.second.get(a);f.rb()&&a.rb()&&(f.data/=a.data,f.Eg());--r};h.prototype.Bv=function(f){this.first.get(f);var a=l();this.second.get(a);f.rb()&&a.rb()&&(f.data%=a.data,a.tg()&&f.Eg());--r};h.prototype.Gv=function(f){this.first.get(f);var a=l();this.second.get(a);f.rb()&&a.rb()&&(f.data=Math.pow(f.data,a.data),a.tg()&&f.Eg());--r};h.prototype.jv=function(f){this.first.get(f);var a=l();this.second.get(a);a.wg()||f.wg()?this.lv(f,a):this.kv(f,a);--r};h.prototype.lv=function(f,a){f.wg()&&
a.wg()?this.ov(f,a):this.nv(f,a)};h.prototype.ov=function(f,a){f.data+=a.data};h.prototype.nv=function(f,a){f.wg()?f.data+=(Math.round(1E10*a.data)/1E10).toString():f.uc(f.data.toString()+a.data)};h.prototype.kv=function(f,a){f.Da(f.data&&a.data?1:0)};h.prototype.Fv=function(f){this.first.get(f);var a=l();this.second.get(a);f.rb()&&a.rb()&&(f.data||a.data?f.Da(1):f.Da(0));--r};h.prototype.qv=function(f){this.first.get(f);f.data?this.second.get(f):this.al.get(f)};h.prototype.sv=function(f){this.first.get(f);
var a=l();this.second.get(a);f.Da(f.data===a.data?1:0);--r};h.prototype.Dv=function(f){this.first.get(f);var a=l();this.second.get(a);f.Da(f.data!==a.data?1:0);--r};h.prototype.zv=function(f){this.first.get(f);var a=l();this.second.get(a);f.Da(f.data<a.data?1:0);--r};h.prototype.Av=function(f){this.first.get(f);var a=l();this.second.get(a);f.Da(f.data<=a.data?1:0);--r};h.prototype.vv=function(f){this.first.get(f);var a=l();this.second.get(a);f.Da(f.data>a.data?1:0);--r};h.prototype.wv=function(f){this.first.get(f);
var a=l();this.second.get(a);f.Da(f.data>=a.data?1:0);--r};h.prototype.tv=function(f){var a=this.mf.Ch();ha(a)?f.A(a):f.uc(a)};bc=h;p.prototype.tg=function(){return this.type===ec.Vf};p.prototype.rb=function(){return this.type===ec.Wf||this.type===ec.Vf};p.prototype.wg=function(){return this.type===ec.String};p.prototype.Eg=function(){this.tg()||(this.wg()&&(this.data=parseFloat(this.data)),this.type=ec.Vf)};p.prototype.Da=function(f){this.type=ec.Wf;this.data=Math.floor(f)};p.prototype.A=function(f){this.type=
ec.Vf;this.data=f};p.prototype.uc=function(f){this.type=ec.String;this.data=f};p.prototype.dy=function(f){ha(f)?(this.type=ec.Vf,this.data=f):A(f)?(this.type=ec.String,this.data=f.toString()):(this.type=ec.Wf,this.data=0)};ac=p;ec={Wf:0,Vf:1,String:2}})();function W(h){this.b=h;this.kc=[]}
W.prototype.xb=function(){var h={},l,f,p,u,r,t,a,g;h.waits=[];var b=h.waits,d;l=0;for(f=this.kc.length;l<f;l++){t=this.kc[l];d={t:t.time,st:t.ur,s:t.Dn,ev:t.hg.ea,sm:[],sols:{}};t.hg.Gc[t.$b]&&(d.act=t.hg.Gc[t.$b].ea);p=0;for(u=t.Ba.length;p<u;p++)d.sm.push(t.Ba[p].ea);for(r in t.Wb)if(t.Wb.hasOwnProperty(r)){a=this.b.n[parseInt(r,10)];g={sa:t.Wb[r].Nk,insts:[]};p=0;for(u=t.Wb[r].Xd.length;p<u;p++)g.insts.push(t.Wb[r].Xd[p].uid);d.sols[a.ea.toString()]=g}b.push(d)}return h};
W.prototype.Ob=function(h){h=h.waits;var l,f,p,u,r,t,a,g,b,d,c;G(this.kc);l=0;for(f=h.length;l<f;l++)if(t=h[l],g=this.b.Ro[t.ev.toString()]){b=-1;p=0;for(u=g.Gc.length;p<u;p++)if(g.Gc[p].ea===t.act){b=p;break}if(-1!==b){a={Wb:{},Ba:[],Pl:!1};a.time=t.t;a.ur=t.st||"";a.Dn=!!t.s;a.hg=g;a.$b=b;p=0;for(u=t.sm.length;p<u;p++)(g=this.b.Rj(t.sm[p]))&&a.Ba.push(g);for(r in t.sols)if(t.sols.hasOwnProperty(r)&&(g=this.b.Rj(parseInt(r,10)))){b=t.sols[r];d={Nk:b.sa,Xd:[]};p=0;for(u=b.insts.length;p<u;p++)(c=
this.b.Qj(b.insts[p]))&&d.Xd.push(c);a.Wb[g.index.toString()]=d}this.kc.push(a)}}};
(function(){function h(){}function l(){}function f(){}var p=W.prototype;h.prototype.ps=function(){return!0};h.prototype.qo=function(){return!0};h.prototype.Zs=function(){return!0};h.prototype.bs=function(a,b,d){return fc(a,b,d)};h.prototype.Ls=function(a,b,d){return a?fc(100*a.opacity,b,d):!1};var u=[],r=-1;h.prototype.rs=function(a){var b=a.Y();r++;u.length===r&&u.push([]);var d=u[r];Aa(d,b.yc());var c=this.b.Wa(),f=c.hb,e=c.Ow(),c=this.b.Hx(),n,q,v,m,h,l,p=a.Nb;if(e)for(e=0,n=d.length;e<n&&!c.yb;e++){this.b.Hk(f.Ba);
m=d[e];b=a.Y();b.da=!1;G(b.c);b.c[0]=m;if(p)for(q=0,v=m.siblings.length;q<v;q++)h=m.siblings[q],l=h.type.Y(),l.da=!1,G(l.c),l.c[0]=h;c.index=e;f.dr();this.b.Mf(f.Ba)}else for(b.da=!1,G(b.c),e=0,n=d.length;e<n&&!c.yb;e++){m=d[e];b.c[0]=m;if(p)for(q=0,v=m.siblings.length;q<v;q++)h=m.siblings[q],l=h.type.Y(),l.da=!1,G(l.c),l.c[0]=h;c.index=e;f.dr()}G(d);this.b.yx();r--;return!1};h.prototype.Vt=function(){var a=this.b.zh().X;"undefined"===typeof a.TriggerOnce_lastTick&&(a.TriggerOnce_lastTick=-1);var b=
a.TriggerOnce_lastTick,d=this.b.Tg;a.TriggerOnce_lastTick=d;return this.b.Im||b!==d-1};h.prototype.os=function(a){var b=this.b.zh(),d=b.X.Every_lastTime||0,c=this.b.sb.R;"undefined"===typeof b.X.Every_seconds&&(b.X.Every_seconds=a);var f=b.X.Every_seconds;if(c>=d+f)return b.X.Every_lastTime=d+f,c>=b.X.Every_lastTime+.04&&(b.X.Every_lastTime=c),b.X.Every_seconds=a,!0;c<d-.1&&(b.X.Every_lastTime=c);return!1};h.prototype.gs=function(a,b,d){return fc(a.Ch(),b,d)};h.prototype.Ds=function(a){return(a=this.b.Fh[a.toLowerCase()])&&
a.mg};h.prototype.co=function(){var a=this.b.Wa();return a.Rl?!1:!a.Cf};h.prototype.ro=function(){return!0};h.prototype.Rs=function(){return!0};h.prototype.sl=function(){return!0};h.prototype.vo=function(){return!0};h.prototype.$s=function(){return!0};h.prototype.pl=function(){return!0};h.prototype.Yr=function(a,b,d){return Oa(I(a),I(d))<=I(b)};h.prototype.Bs=function(a,b){return Qa(I(a),I(b))};h.prototype.ys=function(a,b,d){a=Ma(a);b=Ma(b);d=Ma(d);return Qa(d,b)?Qa(a,b)&&!Qa(a,d):!(!Qa(a,b)&&Qa(a,
d))};p.d=new h;l.prototype.ss=function(a){this.b.Wh||this.b.mh||(this.b.mh=a)};l.prototype.ms=function(a,b,d,c){if(b&&a&&(b=this.b.tj(a,b,d,c))){this.b.Bc++;var f;this.b.trigger(Object.getPrototypeOf(a.ka).d.Ue,b);if(b.Nb)for(d=0,c=b.siblings.length;d<c;d++)f=b.siblings[d],this.b.trigger(Object.getPrototypeOf(f.type.ka).d.Ue,f);this.b.Bc--;a=a.Y();a.da=!1;G(a.c);a.c[0]=b;if(b.Nb)for(d=0,c=b.siblings.length;d<c;d++)f=b.siblings[d],a=f.type.Y(),a.da=!1,G(a.c),a.c[0]=f}};l.prototype.Ct=function(a,b){a&&
(b=Fa(b/100,0,1),a.opacity!==b&&(a.opacity=b,this.b.U=!0))};l.prototype.Dt=function(a){this.b.P&&this.b.P.scale!==a&&(this.b.P.scale=a,this.b.P.So(),this.b.U=!0)};l.prototype.ot=function(a){this.b.P.Ok(a)};l.prototype.pt=function(a){this.b.P.Pk(a)};l.prototype.nt=function(a,b){this.b.P.Ok(a);this.b.P.Pk(b)};l.prototype.Kt=function(a,b){0===a.kl?ha(b)?a.Qf(b):a.Qf(parseFloat(b)):1===a.kl&&a.Qf(b.toString())};l.prototype.Wr=function(a,b){0===a.kl?ha(b)?a.Qf(a.Ch()+b):a.Qf(a.Ch()+parseFloat(b)):1===
a.kl&&a.Qf(a.Ch()+b.toString())};var t=[],a=[];l.prototype.Wt=function(g){if(!(0>g)){var b,d,c,f=this.b.Wa(),e;t.length?e=t.pop():e={Wb:{},Ba:[]};e.Pl=!1;e.time=this.b.sb.R+g;e.ur="";e.Dn=!1;e.hg=f.hb;e.$b=f.$b+1;g=0;for(b=this.b.n.length;g<b;g++)c=this.b.n[g],d=c.Y(),d.da&&-1===f.hb.Ba.indexOf(c)||(e.Ba.push(c),c=void 0,a.length?c=a.pop():c={Xd:[]},c.Nk=!1,c.Nk=d.da,Aa(c.Xd,d.c),e.Wb[g.toString()]=c);this.kc.push(e);return!0}};p.q=new l;f.prototype["int"]=function(a,b){A(b)?(a.Da(parseInt(b,10)),
isNaN(a.data)&&(a.data=0)):a.Da(b)};f.prototype["float"]=function(a,b){A(b)?(a.A(parseFloat(b)),isNaN(a.data)&&(a.data=0)):a.A(b)};f.prototype.random=function(a,b,d){void 0===d?a.A(Math.random()*b):a.A(Math.random()*(d-b)+b)};f.prototype.sqrt=function(a,b){a.A(Math.sqrt(b))};f.prototype.abs=function(a,b){a.A(Math.abs(b))};f.prototype.round=function(a,b){a.Da(Math.round(b))};f.prototype.floor=function(a,b){a.Da(Math.floor(b))};f.prototype.ceil=function(a,b){a.Da(Math.ceil(b))};f.prototype.sin=function(a,
b){a.A(Math.sin(I(b)))};f.prototype.cos=function(a,b){a.A(Math.cos(I(b)))};f.prototype.tan=function(a,b){a.A(Math.tan(I(b)))};f.prototype.asin=function(a,b){a.A(Ga(Math.asin(b)))};f.prototype.acos=function(a,b){a.A(Ga(Math.acos(b)))};f.prototype.atan=function(a,b){a.A(Ga(Math.atan(b)))};f.prototype.exp=function(a,b){a.A(Math.exp(b))};f.prototype.log10=function(a,b){a.A(Math.log(b)/Math.LN10)};f.prototype.max=function(a){var b=arguments[1];"number"!==typeof b&&(b=0);var d,c,f;d=2;for(c=arguments.length;d<
c;d++)f=arguments[d],"number"===typeof f&&b<f&&(b=f);a.A(b)};f.prototype.min=function(a){var b=arguments[1];"number"!==typeof b&&(b=0);var d,c,f;d=2;for(c=arguments.length;d<c;d++)f=arguments[d],"number"===typeof f&&b>f&&(b=f);a.A(b)};f.prototype.gf=function(a){a.A(this.b.gf)};f.prototype.Ug=function(a){a.A(this.b.Ug)};f.prototype.time=function(a){a.A(this.b.sb.R)};f.prototype.Tg=function(a){a.Da(this.b.Tg)};f.prototype.qk=function(a){a.Da(this.b.qk)};f.prototype.Zl=function(a){a.Da(this.b.Zl)};f.prototype.Du=
function(a,b,d,c,f){a.A(Sa(b,d,c,f))};f.prototype.e=function(a,b,d,c,f){a.A(Ga(Na(b,d,c,f)))};f.prototype.Wx=function(a){a.A(this.b.P.scrollX)};f.prototype.Xx=function(a){a.A(this.b.P.scrollY)};f.prototype.Xw=function(a,b,d,c){a.A(Ua(b,d,c))};f.prototype.Ww=function(a){this.b.P?a.A(this.b.P.scale):a.A(0)};f.prototype.left=function(a,b,d){a.uc(A(b)?b.substr(0,d):"")};f.prototype.right=function(a,b,d){a.uc(A(b)?b.substr(b.length-d):"")};f.prototype.replace=function(a,b,d,c){A(b)&&A(d)&&A(c)?a.uc(b.replace(new RegExp(gb(d),
"gi"),c)):a.uc(A(b)?b:"")};f.prototype.trim=function(a,b){a.uc(A(b)?b.trim():"")};f.prototype.Yo=function(a){var b=pa(Math.random()*(arguments.length-1));a.dy(arguments[b+1])};f.prototype.Kl=function(a){a.A(this.b.Kl/1E3)};f.prototype.Cg=function(a){a.A(this.b.Cg)};f.prototype.tx=function(a){a.Da(this.b.La)};p.L=new f;p.Px=function(){var g,b,d,c,f,e,n=this.b.Wa();g=0;for(d=this.kc.length;g<d;g++){c=this.kc[g];if(-1===c.time){if(!c.Dn)continue}else if(c.time>this.b.sb.R)continue;n.hb=c.hg;n.$b=c.$b;
n.Ua=0;for(b in c.Wb)c.Wb.hasOwnProperty(b)&&(f=this.b.n[parseInt(b,10)].Y(),e=c.Wb[b],f.da=e.Nk,Aa(f.c,e.Xd),f=e,G(f.Xd),a.push(f));c.hg.Ox();this.b.Il(c.Ba);c.Pl=!0}b=g=0;for(d=this.kc.length;g<d;g++)c=this.kc[g],this.kc[b]=c,c.Pl?(ab(c.Wb),G(c.Ba),t.push(c)):b++;za(this.kc,b)}})();
(function(){rb=function(h,f){var p=h[1],u=h[3],r=h[4],t=h[5],a=h[6],g=h[7],b=h[8];f.d||(f.d={});f.q||(f.q={});f.L||(f.L={});var d=f.d,c=f.q,k=f.L;u&&(d.js=function(a,b){return fc(this.x,a,b)},d.ks=function(a,b){return fc(this.y,a,b)},d.Fs=function(){var a=this.j;this.la();var b=this.Aa;return!(b.right<a.ua||b.bottom<a.wa||b.left>a.za||b.top>a.ya)},d.Iy=function(){this.la();var a=this.Aa,b=this.b.P;return 0>a.right||0>a.bottom||a.left>b.width||a.top>b.height},d.Uy=function(a,b,c){var d=this.Y(),g=
d.yc();if(!g.length)return!1;var f=g[0],k=f,h=Sa(f.x,f.y,b,c),l,p,u;l=1;for(p=g.length;l<p;l++)if(f=g[l],u=Sa(f.x,f.y,b,c),0===a&&u<h||1===a&&u>h)h=u,k=f;d.pi(k);return!0},c.Mt=function(a){this.x!==a&&(this.x=a,this.xa())},c.Nt=function(a){this.y!==a&&(this.y=a,this.xa())},c.Gt=function(a,b){if(this.x!==a||this.y!==b)this.x=a,this.y=b,this.xa()},c.Ht=function(a,b){var c=a.bw(this);if(c){var d;c.qf?(d=c.qf(b,!0),c=c.qf(b,!1)):(d=c.x,c=c.y);if(this.x!==d||this.y!==c)this.x=d,this.y=c,this.xa()}},c.Ny=
function(a){0!==a&&(this.x+=Math.cos(this.e)*a,this.y+=Math.sin(this.e)*a,this.xa())},c.My=function(a,b){0!==b&&(this.x+=Math.cos(I(a))*b,this.y+=Math.sin(I(a))*b,this.xa())},k.Vi=function(a){a.A(this.x)},k.Wi=function(a){a.A(this.y)},k.gf=function(a){a.A(this.b.kg(this))});r&&(d.hs=function(a,b){return fc(this.width,a,b)},d.ds=function(a,b){return fc(this.height,a,b)},c.Lt=function(a){this.width!==a&&(this.width=a,this.xa())},c.At=function(a){this.height!==a&&(this.height=a,this.xa())},c.It=function(a,
b){if(this.width!==a||this.height!==b)this.width=a,this.height=b,this.xa()},k.Xt=function(a){a.A(this.width)},k.us=function(a){a.A(this.height)},k.Cy=function(a){this.la();a.A(this.Aa.left)},k.Ey=function(a){this.la();a.A(this.Aa.top)},k.Dy=function(a){this.la();a.A(this.Aa.right)},k.By=function(a){this.la();a.A(this.Aa.bottom)});t&&(d.Yr=function(a,b){return Oa(this.e,I(b))<=I(a)},d.Bs=function(a){return Qa(this.e,I(a))},d.ys=function(a,b){var c=Ma(a),d=Ma(b),g=Ka(this.e);return Qa(d,c)?Qa(g,c)&&
!Qa(g,d):!(!Qa(g,c)&&Qa(g,d))},c.qt=function(a){a=I(Ha(a));isNaN(a)||this.e===a||(this.e=a,this.xa())},c.Xy=function(a){0===a||isNaN(a)||(this.e+=I(a),this.e=Ka(this.e),this.xa())},c.Yy=function(a){0===a||isNaN(a)||(this.e-=I(a),this.e=Ka(this.e),this.xa())},c.mt=function(a,b){var c=Pa(this.e,I(b),I(a));isNaN(c)||this.e===c||(this.e=c,this.xa())},c.Zy=function(a,b,c){a=Pa(this.e,Math.atan2(c-this.y,b-this.x),I(a));isNaN(a)||this.e===a||(this.e=a,this.xa())},c.bz=function(a,b){var c=Math.atan2(b-this.y,
a-this.x);isNaN(c)||this.e===c||(this.e=c,this.xa())},k.Xr=function(a){a.A(La(this.e))});p||(d.es=function(a,b,c){return fc(this.kb[a],b,c)},d.zs=function(a){return this.kb[a]},d.Vy=function(a,b){var c=this.Y(),d=c.yc();if(!d.length)return!1;var g=d[0],f=g,k=g.kb[b],h,l,p;h=1;for(l=d.length;h<l;h++)if(g=d[h],p=g.kb[b],0===a&&p<k||1===a&&p>k)k=p,f=g;c.pi(f);return!0},d.Ty=function(a){var b,c,d,g,f;if(this.b.zh().pg){f=this.Y();if(f.da)for(f.da=!1,G(f.c),G(f.W),d=this.c,b=0,c=d.length;b<c;b++)g=d[b],
g.uid===a?f.W.push(g):f.c.push(g);else{d=b=0;for(c=f.c.length;b<c;b++)g=f.c[b],f.c[d]=g,g.uid===a?f.W.push(g):d++;za(f.c,d)}this.Md();return!!f.c.length}g=this.b.Qj(a);if(!g)return!1;f=this.Y();if(!f.da&&-1===f.c.indexOf(g))return!1;if(this.F)for(a=g.type.Ia,b=0,c=a.length;b<c;b++){if(a[b]===this)return f.pi(g),this.Md(),!0}else if(g.type===this)return f.pi(g),this.Md(),!0;return!1},d.Ue=function(){return!0},d.ho=function(){return!0},c.Bt=function(a,b){var c=this.kb;ha(c[a])?c[a]=ha(b)?b:parseFloat(b):
A(c[a])&&(c[a]=A(b)?b:b.toString())},c.Vr=function(a,b){var c=this.kb;ha(c[a])?c[a]=ha(b)?c[a]+b:c[a]+parseFloat(b):A(c[a])&&(c[a]=A(b)?c[a]+b:c[a]+b.toString())},c.Tt=function(a,b){var c=this.kb;ha(c[a])&&(c[a]=ha(b)?c[a]-b:c[a]-parseFloat(b))},c.xt=function(a,b){this.kb[a]=b?1:0},c.cz=function(a){this.kb[a]=1-this.kb[a]},c.ns=function(){this.b.qe(this)},c.Ms||(c.Ms=function(a){var b,c;try{b=JSON.parse(a)}catch(d){return}this.b.hk(this,b,!0);this.Kd&&this.Kd();if(this.N)for(a=0,b=this.N.length;a<
b;++a)c=this.N[a],c.Kd&&c.Kd()}),k.ls=function(a){var b=a.Jf.c.length,c,d,g;c=0;for(d=this.b.Yc.length;c<d;c++)g=this.b.Yc[c],a.Jf.F?0<=g.type.Ia.indexOf(a.Jf)&&b++:g.type===a.Jf&&b++;a.Da(b)},k.Wy=function(a){a.Da(a.Jf.Y().yc().length)},k.dz=function(a){a.Da(this.uid)},k.Hy=function(a){a.Da(this.Dh())},k.Zr||(k.Zr=function(a){a.uc(JSON.stringify(this.b.yn(this,!0)))}));a&&(d.Jy=function(){return this.visible},c.Ao=function(a){!a!==!this.visible&&(this.visible=!!a,this.b.U=!0)},d.Gy=function(a,b){return fc(nb(100*
this.opacity),a,b)},c.Ft=function(a){a=a/100;0>a?a=0:1<a&&(a=1);a!==this.opacity&&(this.opacity=a,this.b.U=!0)},k.Opacity=function(a){a.A(nb(100*this.opacity))});g&&(d.Es=function(a){return a?this.j===a:!1},d.lt=function(a){var b=this.Y(),c=b.yc();if(!c.length)return!1;var d=c[0],g=d,f,k;f=1;for(k=c.length;f<k;f++)if(d=c[f],0===a){if(d.j.index>g.j.index||d.j.index===g.j.index&&d.vd()>g.vd())g=d}else if(d.j.index<g.j.index||d.j.index===g.j.index&&d.vd()<g.vd())g=d;b.pi(g);return!0},c.Qy=function(){var a=
this.j,b=a.c;b.length&&b[b.length-1]===this||(a.Kg(this,!1),a.ih(this,!1),this.b.U=!0)},c.Oy=function(){var a=this.j,b=a.c;b.length&&b[0]===this||(a.Kg(this,!1),a.Dx(this),this.b.U=!0)},c.Py=function(a){a&&a!=this.j&&(this.j.Kg(this,!0),this.j=a,a.ih(this,!0),this.b.U=!0)},c.$t=function(a,b){var c=0===a;if(b){var d=b.Xv(this);d&&d.uid!==this.uid&&(this.j.index!==d.j.index&&(this.j.Kg(this,!0),this.j=d.j,d.j.ih(this,!0)),this.j.cx(this,d,c),this.b.U=!0)}},k.Ly=function(a){a.Da(this.j.Aq)},k.Ky=function(a){a.uc(this.j.name)},
k.ez=function(a){a.Da(this.vd())});b&&(c.$y=function(a,b){if(this.b.u){var c=this.type.fm(b);if(!(0>c)){var d=1===a;this.te[c]!==d&&(this.te[c]=d,this.jd(),this.b.U=!0)}}},c.az=function(a,b,c){if(this.b.u){var d=this.type.fm(a);0>d||(a=this.type.O[d],d=this.Ka[d],b=Math.floor(b),0>b||b>=d.length||(1===this.b.u.gw(a.$a,b)&&(c/=100),d[b]!==c&&(d[b]=c,a.Hb&&(this.b.U=!0))))}})};Lb=function(){this.El=this.Al=!0;this.type.cj=!0;this.b.U=!0;var h,f,p=this.Bl;h=0;for(f=p.length;h<f;++h)p[h](this);this.j.Fc&&
this.la()};Mb=function(h){h&&this.Bl.push(h)};Ob=function(){if(this.Al){var h=this.Aa,f=this.mc;h.set(this.x,this.y,this.x+this.width,this.y+this.height);h.offset(-this.Ub*this.width,-this.Vb*this.height);this.e?(h.offset(-this.x,-this.y),f.pr(h,this.e),f.offset(this.x,this.y),f.To(h)):f.Ai(h);h.normalize();this.Al=!1;this.ry()}};var h=new ta(0,0,0,0);Pb=function(){if(this.j.Fc){var l=this.j.Fb,f=this.Aa;h.set(l.Yb(f.left),l.Zb(f.top),l.Yb(f.right),l.Zb(f.bottom));this.hc.sh(h)||(this.hc.right<this.hc.left?
l.update(this,null,h):l.update(this,this.hc,h),this.hc.dg(h),this.j.fd=!0)}};Qb=function(){if(this.El&&this.bf){this.la();var l=this.type.qj,f=this.Aa;h.set(l.Yb(f.left),l.Zb(f.top),l.Yb(f.right),l.Zb(f.bottom));this.De.sh(h)||(this.De.right<this.De.left?l.update(this,null,h):l.update(this,this.De,h),this.De.dg(h),this.El=!1)}};Nb=function(h,f){return this.Aa.Jb(h,f)&&this.mc.Jb(h,f)?this.qa&&!this.qa.sg()?(this.qa.$f(this.width,this.height,this.e),this.qa.Jb(h-this.x,f-this.y)):!0:!1};Hb=function(){this.type.gl();
return this.tf};Rb=function(){this.j.Sn();return this.ld};Sb=function(){G(this.ma);var h,f,p,u=!0;h=0;for(f=this.te.length;h<f;h++)this.te[h]&&(p=this.type.O[h],this.ma.push(p),p.cd||(u=!1));this.Rr=!!this.ma.length;this.he=u};Ib=function(){return"Inst"+this.Zq};ub=function(h){if(h&&h.Nb&&h.type!=this){var f,p,u;f=0;for(p=h.siblings.length;f<p;f++)if(u=h.siblings[f],u.type==this)return u}h=this.Y().yc();return h.length?h[0]:null};vb=function(h){var f=this.Y().yc();return f.length?f[h.Dh()%f.length]:
null};tb=function(){if(this.Pg&&!this.F){var h,f;h=0;for(f=this.c.length;h<f;h++)this.c[h].tf=h;var p=h,u=this.b.Yc;h=0;for(f=u.length;h<f;++h)u[h].type===this&&(u[h].tf=p++);this.Pg=!1}};Fb=function(h){if(h<this.c.length)return this.c[h];h-=this.c.length;var f=this.b.Yc,p,u;p=0;for(u=f.length;p<u;++p)if(f[p].type===this){if(0===h)return f[p];--h}return null};wb=function(){return this.je[this.qd]};xb=function(){this.qd++;this.qd===this.je.length?this.je.push(new sb(this)):(this.je[this.qd].da=!0,
G(this.je[this.qd].W))};yb=function(){this.qd++;this.qd===this.je.length&&this.je.push(new sb(this));var h=this.je[this.qd],f=this.je[this.qd-1];f.da?(h.da=!0,G(h.W)):(h.da=!1,Aa(h.c,f.c),Aa(h.W,f.W))};zb=function(){this.qd--};Bb=function(h){var f,p,u,r,t,a=0;if(!this.F)for(f=0,p=this.Ia.length;f<p;f++)for(t=this.Ia[f],u=0,r=t.Ja.length;u<r;u++){if(h===t.Ja[u].name)return this.X.lastBehIndex=a,t.Ja[u];a++}f=0;for(p=this.Ja.length;f<p;f++){if(h===this.Ja[f].name)return this.X.lastBehIndex=a,this.Ja[f];
a++}return null};Cb=function(h){return this.Oj(h)?this.X.lastBehIndex:-1};Db=function(h){var f,p;f=0;for(p=this.O.length;f<p;f++)if(this.O[f].name===h)return f;return-1};Eb=function(){if(this.Nb&&!this.F){var h,f,p,u,r,t,a;this.gl();t=this.Y();var g=t.da,b=(h=this.b.Wa())&&h.hb&&h.hb.Dc;h=0;for(f=this.nc.length;h<f;h++)if(r=this.nc[h],r!==this&&(r.gl(),a=r.Y(),a.da=g,!g)){G(a.c);p=0;for(u=t.c.length;p<u;++p)a.c[p]=r.gm(t.c[p].tf);if(b)for(G(a.W),p=0,u=t.W.length;p<u;++p)a.W[p]=r.gm(t.W[p].tf)}}};
Gb=function(){return"Type"+this.ea};fc=function(h,f,p){if("undefined"===typeof h||"undefined"===typeof p)return!1;switch(f){case 0:return h===p;case 1:return h!==p;case 2:return h<p;case 3:return h<=p;case 4:return h>p;case 5:return h>=p;default:return!1}}})();var oc={};function qc(h){this.b=h}
(function(){function h(a){0>a&&(a=0);1<a&&(a=1);return Math.log(a)/Math.log(10)*20}function l(a){a=a.toLowerCase();return Y.hasOwnProperty(a)&&Y[a].length?Y[a][0].xc():x.destination}function f(){return x.createGain?x.createGain():x.createGainNode()}function p(a){return x.createDelay?x.createDelay(a):x.createDelayNode(a)}function u(a,b){a.start?a.start(b||0):a.noteOn(b||0)}function r(a,b,e,c){a.start?a.start(c||0,b):a.noteGrainOn(c||0,b,e-b)}function t(a){try{a.stop?a.stop(0):a.noteOff(0)}catch(b){}}
function a(a,b,e,c,d,g){this.type="filter";this.ad=[a,b,e,c,d,g];this.ga=f();this.M=f();this.M.gain.value=g;this.K=f();this.K.gain.value=1-g;this.Va=x.createBiquadFilter();this.Va.type="number"===typeof this.Va.type?a:Jc[a];this.Va.frequency.value=b;this.Va.detune&&(this.Va.detune.value=e);this.Va.Q.value=c;this.Va.gain.value=d;this.ga.connect(this.Va);this.ga.connect(this.K);this.Va.connect(this.M)}function g(a,b,e){this.type="delay";this.ad=[a,b,e];this.ga=f();this.M=f();this.M.gain.value=e;this.K=
f();this.K.gain.value=1-e;this.ii=f();this.Kc=p(a);this.Kc.delayTime.value=a;this.zj=f();this.zj.gain.value=b;this.ga.connect(this.ii);this.ga.connect(this.K);this.ii.connect(this.M);this.ii.connect(this.Kc);this.Kc.connect(this.zj);this.zj.connect(this.ii)}function b(a,b,e,c){this.type="convolve";this.ad=[b,e,c];this.ga=f();this.M=f();this.M.gain.value=e;this.K=f();this.K.gain.value=1-e;this.cf=x.createConvolver();a&&(this.cf.normalize=b,this.cf.buffer=a);this.ga.connect(this.cf);this.ga.connect(this.K);
this.cf.connect(this.M)}function d(a,b,e,c,d){this.type="flanger";this.ad=[a,b,e,c,d];this.ga=f();this.K=f();this.K.gain.value=1-d/2;this.M=f();this.M.gain.value=d/2;this.Hj=f();this.Hj.gain.value=c;this.Kc=p(a+b);this.Kc.delayTime.value=a;this.wb=x.createOscillator();this.wb.frequency.value=e;this.rc=f();this.rc.gain.value=b;this.ga.connect(this.Kc);this.ga.connect(this.K);this.Kc.connect(this.M);this.Kc.connect(this.Hj);this.Hj.connect(this.Kc);this.wb.connect(this.rc);this.rc.connect(this.Kc.delayTime);
u(this.wb)}function c(a,b,e,c,d,g){this.type="phaser";this.ad=[a,b,e,c,d,g];this.ga=f();this.K=f();this.K.gain.value=1-g/2;this.M=f();this.M.gain.value=g/2;this.Va=x.createBiquadFilter();this.Va.type="number"===typeof this.Va.type?7:"allpass";this.Va.frequency.value=a;this.Va.detune&&(this.Va.detune.value=b);this.Va.Q.value=e;this.wb=x.createOscillator();this.wb.frequency.value=d;this.rc=f();this.rc.gain.value=c;this.ga.connect(this.Va);this.ga.connect(this.K);this.Va.connect(this.M);this.wb.connect(this.rc);
this.rc.connect(this.Va.frequency);u(this.wb)}function k(a){this.type="gain";this.ad=[a];this.ja=f();this.ja.gain.value=a}function e(a,b){this.type="tremolo";this.ad=[a,b];this.ja=f();this.ja.gain.value=1-b/2;this.wb=x.createOscillator();this.wb.frequency.value=a;this.rc=f();this.rc.gain.value=b/2;this.wb.connect(this.rc);this.rc.connect(this.ja.gain);u(this.wb)}function n(a,b){this.type="ringmod";this.ad=[a,b];this.ga=f();this.M=f();this.M.gain.value=b;this.K=f();this.K.gain.value=1-b;this.wi=f();
this.wi.gain.value=0;this.wb=x.createOscillator();this.wb.frequency.value=a;this.wb.connect(this.wi.gain);u(this.wb);this.ga.connect(this.wi);this.ga.connect(this.K);this.wi.connect(this.M)}function q(a,b,e,c,d){this.type="distortion";this.ad=[a,b,e,c,d];this.ga=f();this.Ek=f();this.Dk=f();this.Yx(e,Math.pow(10,c/20));this.M=f();this.M.gain.value=d;this.K=f();this.K.gain.value=1-d;this.ml=x.createWaveShaper();this.xj=new Float32Array(65536);this.Rv(a,b);this.ml.xj=this.xj;this.ga.connect(this.Ek);
this.ga.connect(this.K);this.Ek.connect(this.ml);this.ml.connect(this.Dk);this.Dk.connect(this.M)}function v(a,b,e,c,d){this.type="compressor";this.ad=[a,b,e,c,d];this.ja=x.createDynamicsCompressor();try{this.ja.threshold.value=a,this.ja.knee.value=b,this.ja.ratio.value=e,this.ja.attack.value=c,this.ja.release.value=d}catch(g){}}function m(a,b){this.type="analyser";this.ad=[a,b];this.ja=x.createAnalyser();this.ja.fftSize=a;this.ja.smoothingTimeConstant=b;this.Pv=new Float32Array(this.ja.frequencyBinCount);
this.sr=new Uint8Array(a);this.oi=0}function w(){this.ra=null;this.ik=0}function X(a,b){this.src=a;this.ba=F;this.Mc=b;this.bj=!1;var e=this;this.Tm=this.gn=null;this.Jg=[];this.Qk=0;this.Wn=this.Fj=this.yr=this.zk=!1;1===F&&b&&!Wa&&(this.ba=0,this.gn=f());this.Nd=this.na=null;var c;switch(this.ba){case 0:this.na=new Audio;this.na.crossOrigin="anonymous";this.na.addEventListener("canplaythrough",function(){e.Wn=!0});1===F&&x.createMediaElementSource&&!/wiiu/i.test(navigator.userAgent)&&(this.yr=!0,
this.na.addEventListener("canplay",function(){e.Tm||(e.Tm=x.createMediaElementSource(e.na),e.Tm.connect(e.gn))}));this.na.autoplay=!1;this.na.xz="auto";this.na.src=a;break;case 1:z.Th?z.np(a,function(a){e.Nd=a;e.ep()},function(){e.Fj=!0}):(c=new XMLHttpRequest,c.open("GET",a,!0),c.responseType="arraybuffer",c.onload=function(){e.Nd=c.response;e.ep()},c.onerror=function(){e.Fj=!0},c.send());break;case 2:this.na=!0;break;case 3:this.na=!0}}function H(a,b){var e=this;this.tag=b;this.yb=this.ud=!0;this.src=
a.src;this.buffer=a;this.ba=F;this.Mc=a.Mc;this.playbackRate=1;this.ng=!0;this.oc=this.Ec=!1;this.ic=0;this.Uh=this.ug=this.yd=!1;this.volume=1;this.dn=function(a){if(!e.oc&&!e.Ec){var b=this;b||(b=a.target);b===e.aj&&(e.ng=!0,e.yb=!0,K=e.tag,z.trigger(qc.prototype.d.Ui,S))}};this.aj=null;this.rg=1===R&&!this.Mc||2===R;this.Gg=1;this.startTime=this.rg?z.sb.R:z.ne.R;this.Ya=this.ib=null;this.zd=!1;this.Db=null;this.Oq=this.Nq=this.Mq=this.Lq=this.Qq=this.Pq=0;this.g=null;var c=!1;1!==this.ba||0!==
this.buffer.ba||this.buffer.yr||(this.ba=0);switch(this.ba){case 0:this.Mc?(this.g=a.na,c=!a.bj,a.bj=!0):(this.g=new Audio,this.g.crossOrigin="anonymous",this.g.autoplay=!1,this.g.src=a.na.src,c=!0);c&&this.g.addEventListener("ended",function(){K=e.tag;e.yb=!0;z.trigger(qc.prototype.d.Ui,S)});break;case 1:this.ib=f();this.ib.connect(l(b));1===this.buffer.ba?a.na&&(this.g=x.createBufferSource(),this.g.buffer=a.na,this.g.connect(this.ib)):(this.g=this.buffer.na,this.buffer.gn.connect(this.ib),this.buffer.bj||
(this.buffer.bj=!0,this.buffer.na.addEventListener("ended",function(){K=e.tag;e.yb=!0;z.trigger(qc.prototype.d.Ui,S)})));break;case 2:this.g=new window.Media(P+this.src,null,null,function(a){a===window.Media.MEDIA_STOPPED&&(e.ng=!0,e.yb=!0,K=e.tag,z.trigger(qc.prototype.d.Ui,S))});break;case 3:this.g=!0}}function L(a){G(Ba);if(a.length){var b,e,c;b=0;for(e=B.length;b<e;b++)c=B[b],ob(a,c.tag)&&Ba.push(c)}else D&&!D.sf()&&(G(Ba),Ba[0]=D)}function J(a,b){Y.hasOwnProperty(a)?Y[a].push(b):Y[a]=[b];var e,
c,d,g,f=x.destination;if(Y.hasOwnProperty(a)&&(d=Y[a],d.length))for(f=d[0].xc(),e=0,c=d.length;e<c;e++)g=d[e],e+1===c?g.Hc(x.destination):g.Hc(d[e+1].xc());L(a);e=0;for(c=Ba.length;e<c;e++)Ba[e].Ix(f);Ja&&Ab===a&&(Ja.disconnect(),Ja.connect(f))}function y(){}function Q(){}var O=qc.prototype;O.ca=function(a){this.ka=a;this.b=a.b};O.ca.prototype.G=function(){};var z=null,S=null,K="",P="",F=0,x=null,V=[],B=[],D=null,E=!1,R=0,N=!1,C=1,M=0,T=0,va=!1,U=1,wa=1,ma=10,Ia=1E4,Bc=1,Ja=null,Ab="",Xa=!1,Ya=[],
Wa=!1,Y={},Jc="lowpass highpass bandpass lowshelf highshelf peaking notch allpass".split(" ");a.prototype.Hc=function(a){this.M.disconnect();this.M.connect(a);this.K.disconnect();this.K.connect(a)};a.prototype.remove=function(){this.ga.disconnect();this.Va.disconnect();this.M.disconnect();this.K.disconnect()};a.prototype.xc=function(){return this.ga};g.prototype.Hc=function(a){this.M.disconnect();this.M.connect(a);this.K.disconnect();this.K.connect(a)};g.prototype.remove=function(){this.ga.disconnect();
this.ii.disconnect();this.Kc.disconnect();this.zj.disconnect();this.M.disconnect();this.K.disconnect()};g.prototype.xc=function(){return this.ga};b.prototype.Hc=function(a){this.M.disconnect();this.M.connect(a);this.K.disconnect();this.K.connect(a)};b.prototype.remove=function(){this.ga.disconnect();this.cf.disconnect();this.M.disconnect();this.K.disconnect()};b.prototype.xc=function(){return this.ga};d.prototype.Hc=function(a){this.K.disconnect();this.K.connect(a);this.M.disconnect();this.M.connect(a)};
d.prototype.remove=function(){this.ga.disconnect();this.Kc.disconnect();this.wb.disconnect();this.rc.disconnect();this.K.disconnect();this.M.disconnect();this.Hj.disconnect()};d.prototype.xc=function(){return this.ga};c.prototype.Hc=function(a){this.K.disconnect();this.K.connect(a);this.M.disconnect();this.M.connect(a)};c.prototype.remove=function(){this.ga.disconnect();this.Va.disconnect();this.wb.disconnect();this.rc.disconnect();this.K.disconnect();this.M.disconnect()};c.prototype.xc=function(){return this.ga};
k.prototype.Hc=function(a){this.ja.disconnect();this.ja.connect(a)};k.prototype.remove=function(){this.ja.disconnect()};k.prototype.xc=function(){return this.ja};e.prototype.Hc=function(a){this.ja.disconnect();this.ja.connect(a)};e.prototype.remove=function(){this.wb.disconnect();this.rc.disconnect();this.ja.disconnect()};e.prototype.xc=function(){return this.ja};n.prototype.Hc=function(a){this.M.disconnect();this.M.connect(a);this.K.disconnect();this.K.connect(a)};n.prototype.remove=function(){this.wb.disconnect();
this.wi.disconnect();this.ga.disconnect();this.M.disconnect();this.K.disconnect()};n.prototype.xc=function(){return this.ga};q.prototype.Yx=function(a,b){.01>a&&(a=.01);this.Ek.gain.value=a;this.Dk.gain.value=Math.pow(1/a,.6)*b};q.prototype.shape=function(a,b,e){var c=1.05*e*b-b;e=0>a?-1:1;a=0>a?-a:a;b=a<b?a:b+c*(1-Math.exp(-(1/c)*(a-b)));return b*e};q.prototype.Rv=function(a,b){for(var e=Math.pow(10,a/20),c=Math.pow(10,b/20),d=0,g=0;32768>g;++g)d=g/32768,d=this.shape(d,e,c),this.xj[32768+g]=d,this.xj[32768-
g-1]=-d};q.prototype.Hc=function(a){this.M.disconnect();this.M.connect(a);this.K.disconnect();this.K.connect(a)};q.prototype.remove=function(){this.ga.disconnect();this.Ek.disconnect();this.ml.disconnect();this.Dk.disconnect();this.M.disconnect();this.K.disconnect()};q.prototype.xc=function(){return this.ga};v.prototype.Hc=function(a){this.ja.disconnect();this.ja.connect(a)};v.prototype.remove=function(){this.ja.disconnect()};v.prototype.xc=function(){return this.ja};m.prototype.ab=function(){this.ja.getFloatFrequencyData(this.Pv);
this.ja.getByteTimeDomainData(this.sr);for(var a=this.ja.fftSize,b=0,e=this.oi=0,c=0;b<a;b++)c=(this.sr[b]-128)/128,0>c&&(c=-c),this.oi<c&&(this.oi=c),e+=c*c;this.oi=h(this.oi);h(Math.sqrt(e/a))};m.prototype.Hc=function(a){this.ja.disconnect();this.ja.connect(a)};m.prototype.remove=function(){this.ja.disconnect()};m.prototype.xc=function(){return this.ja};w.prototype.xi=function(a){this.ra=a};w.prototype.Vj=function(){return!!this.ra};w.prototype.ab=function(){};var lb=!1;X.prototype.Jx=function(){var a,
b,e,c;e=a=0;for(b=B.length;a<b;++a)c=B[a],B[e]=c,c.buffer===this?c.stop():++e;B.length=e;this.Nd=this.na=null};X.prototype.ep=function(){if(!this.na&&this.Nd){var a=this;if(x.decodeAudioData)x.decodeAudioData(this.Nd,function(b){a.na=b;a.Nd=null;var e,c,d;if(ga(a.Ak)||N)ga(a.sj)||(e=a.sj.cf,e.normalize=a.zq,e.buffer=b);else if(a.Jg.length){e=0;for(c=a.Jg.length;e<c;e++){b=a.Jg[e];d=new H(a,b.Cr);d.Bn(!0);if("undefined"!==typeof b.Bq&&(b.ra=z.Qj(b.Bq),!b.ra))continue;if(b.ra){var g=Ra(b.ra.x,b.ra.y,
-b.ra.j.Cb(),M,T,!0),f=Ra(b.ra.x,b.ra.y,-b.ra.j.Cb(),M,T,!1);d.An(g,f,Ga(b.ra.e-b.ra.j.Cb()),b.pm,b.Wm,b.Zm);d.xi(b.ra)}else d.An(b.x,b.y,b.cu,b.pm,b.Wm,b.Zm);d.play(a.Pm,a.Un,a.Qk);a.zk&&d.pause();B.push(d)}G(a.Jg)}else d=new H(a,a.Ak||""),d.play(a.Pm,a.Un,a.Qk),a.zk&&d.pause(),B.push(d)},function(){a.Fj=!0});else if(this.na=x.createBuffer(this.Nd,!1),this.Nd=null,ga(this.Ak)||N)ga(this.sj)||(b=this.sj.cf,b.normalize=this.zq,b.buffer=this.na);else{var b=new H(this,this.Ak);b.play(this.Pm,this.Un,
this.Qk);this.zk&&b.pause();B.push(b)}}};X.prototype.Lp=function(){switch(this.ba){case 0:var a=4<=this.na.readyState;a&&(this.Wn=!0);return a||this.Wn;case 1:return!!this.Nd||!!this.na;case 2:return!0;case 3:return!0}return!1};X.prototype.Nw=function(){switch(this.ba){case 0:return this.Lp();case 1:return!!this.na;case 2:return!0;case 3:return!0}return!1};X.prototype.zw=function(){switch(this.ba){case 0:return!!this.na.error;case 1:return this.Fj}return!1};H.prototype.sf=function(){switch(this.ba){case 0:return this.g.ended;
case 1:return 1===this.buffer.ba?!this.ud&&!this.yb&&this.g.loop||this.oc?!1:this.ng:this.g.ended;case 2:return this.ng;case 3:!0}return!0};H.prototype.uu=function(){return this.ud||this.yb?!0:this.sf()};H.prototype.Bn=function(a){1===F&&(!this.zd&&a?this.ib&&(this.Ya||(this.Ya=x.createPanner(),this.Ya.panningModel="number"===typeof this.Ya.panningModel?U:["equalpower","HRTF","soundfield"][U],this.Ya.distanceModel="number"===typeof this.Ya.distanceModel?wa:["linear","inverse","exponential"][wa],this.Ya.refDistance=
ma,this.Ya.maxDistance=Ia,this.Ya.rolloffFactor=Bc),this.ib.disconnect(),this.ib.connect(this.Ya),this.Ya.connect(l(this.tag)),this.zd=!0):this.zd&&!a&&this.ib&&(this.Ya.disconnect(),this.ib.disconnect(),this.ib.connect(l(this.tag)),this.zd=!1))};H.prototype.An=function(a,b,e,c,d,g){this.zd&&1===F&&(this.Ya.setPosition(a,b,0),this.Ya.setOrientation(Math.cos(I(e)),Math.sin(I(e)),0),this.Ya.coneInnerAngle=c,this.Ya.coneOuterAngle=d,this.Ya.coneOuterGain=g,this.Pq=a,this.Qq=b,this.Lq=e,this.Mq=c,this.Nq=
d,this.Oq=g)};H.prototype.xi=function(a){this.zd&&1===F&&(this.Db||(this.Db=new w),this.Db.xi(a))};H.prototype.ab=function(a){if(this.zd&&1===F&&this.Db&&this.Db.Vj()&&this.qg()){this.Db.ab(a);a=this.Db.ra;var b=Ra(a.x,a.y,-a.j.Cb(),M,T,!0),e=Ra(a.x,a.y,-a.j.Cb(),M,T,!1);this.Ya.setPosition(b,e,0);b=0;"undefined"!==typeof this.Db.ra.e&&(b=a.e-a.j.Cb(),this.Ya.setOrientation(Math.cos(b),Math.sin(b),0))}};H.prototype.play=function(a,b,e,c){var d=this.g;this.yd=a;this.volume=b;e=e||0;c=c||0;switch(this.ba){case 0:1!==
d.playbackRate&&(d.playbackRate=1);d.volume!==b*C&&(d.volume=b*C);d.loop!==a&&(d.loop=a);d.muted&&(d.muted=!1);if(d.currentTime!==e)try{d.currentTime=e}catch(g){}if(this.Mc&&Xa&&!z.Ra)Ya.push(this);else try{this.g.play()}catch(f){console&&console.log&&console.log("[C2] WARNING: exception trying to play audio '"+this.buffer.src+"': ",f)}break;case 1:this.muted=!1;this.Gg=1;if(1===this.buffer.ba)this.ib.gain.value=b*C,this.ud||(this.g=x.createBufferSource(),this.g.buffer=this.buffer.na,this.g.connect(this.ib)),
this.g.onended=this.dn,this.aj=this.g,this.g.loop=a,this.ng=!1,0===e?u(this.g,c):r(this.g,e,this.pf(),c);else{1!==d.playbackRate&&(d.playbackRate=1);d.loop!==a&&(d.loop=a);d.volume=b*C;if(d.currentTime!==e)try{d.currentTime=e}catch(h){}this.Mc&&Xa&&!z.Ra?Ya.push(this):d.play()}break;case 2:(!this.ud&&this.yb||0!==e)&&d.seekTo(e);d.play();this.ng=!1;break;case 3:z.Mb?AppMobi.context.playSound(this.src,a):AppMobi.player.playSound(this.src,a)}this.playbackRate=1;this.startTime=(this.rg?z.sb.R:z.ne.R)-
e;this.oc=this.yb=this.ud=!1};H.prototype.stop=function(){switch(this.ba){case 0:this.g.paused||this.g.pause();break;case 1:1===this.buffer.ba?t(this.g):this.g.paused||this.g.pause();break;case 2:this.g.stop();break;case 3:z.Mb&&AppMobi.context.stopSound(this.src)}this.yb=!0;this.oc=!1};H.prototype.pause=function(){if(!(this.ud||this.yb||this.sf()||this.oc)){switch(this.ba){case 0:this.g.paused||this.g.pause();break;case 1:1===this.buffer.ba?(this.ic=this.hm(!0),this.yd&&(this.ic=this.ic%this.pf()),
this.oc=!0,t(this.g)):this.g.paused||this.g.pause();break;case 2:this.g.pause();break;case 3:z.Mb&&AppMobi.context.stopSound(this.src)}this.oc=!0}};H.prototype.Nx=function(){if(!(this.ud||this.yb||this.sf())&&this.oc){switch(this.ba){case 0:this.g.play();break;case 1:1===this.buffer.ba?(this.g=x.createBufferSource(),this.g.buffer=this.buffer.na,this.g.connect(this.ib),this.g.onended=this.dn,this.aj=this.g,this.g.loop=this.yd,this.ib.gain.value=C*this.volume*this.Gg,this.hl(),this.startTime=(this.rg?
z.sb.R:z.ne.R)-this.ic/(this.playbackRate||.001),r(this.g,this.ic,this.pf())):this.g.play();break;case 2:this.g.play();break;case 3:z.Mb&&AppMobi.context.resumeSound(this.src)}this.oc=!1}};H.prototype.seek=function(a){if(!(this.ud||this.yb||this.sf()))switch(this.ba){case 0:try{this.g.currentTime=a}catch(b){}break;case 1:if(1===this.buffer.ba)this.oc?this.ic=a:(this.pause(),this.ic=a,this.Nx());else try{this.g.currentTime=a}catch(e){}break;case 3:z.Mb&&AppMobi.context.seekSound(this.src,a)}};H.prototype.Ix=
function(a){1===this.ba&&(this.zd?(this.Ya.disconnect(),this.Ya.connect(a)):(this.ib.disconnect(),this.ib.connect(a)))};H.prototype.pf=function(){var a=0;switch(this.ba){case 0:"undefined"!==typeof this.g.duration&&(a=this.g.duration);break;case 1:a=this.buffer.na.duration;break;case 2:a=this.g.getDuration();break;case 3:z.Mb&&(a=AppMobi.context.getDurationSound(this.src))}return a};H.prototype.hm=function(a){var b=this.pf(),e=0;switch(this.ba){case 0:"undefined"!==typeof this.g.currentTime&&(e=this.g.currentTime);
break;case 1:if(1===this.buffer.ba){if(this.oc)return this.ic;e=(this.rg?z.sb.R:z.ne.R)-this.startTime}else"undefined"!==typeof this.g.currentTime&&(e=this.g.currentTime);break;case 3:z.Mb&&(e=AppMobi.context.getPlaybackTimeSound(this.src))}a&&(e*=this.playbackRate);!this.yd&&e>b&&(e=b);return e};H.prototype.qg=function(){return!this.oc&&!this.ud&&!this.yb&&!this.sf()};H.prototype.ey=function(){return!this.ud&&!this.yb&&!this.sf()};H.prototype.oy=function(){var a=this.volume*C;isFinite(a)||(a=0);
switch(this.ba){case 0:"undefined"!==typeof this.g.volume&&this.g.volume!==a&&(this.g.volume=a);break;case 1:1===this.buffer.ba?this.ib.gain.value=a*this.Gg:"undefined"!==typeof this.g.volume&&this.g.volume!==a&&(this.g.volume=a)}};H.prototype.Cj=function(a){switch(this.ba){case 0:this.g.muted!==!!a&&(this.g.muted=!!a);break;case 1:1===this.buffer.ba?(this.Gg=a?0:1,this.ib.gain.value=C*this.volume*this.Gg):this.g.muted!==!!a&&(this.g.muted=!!a)}};H.prototype.$x=function(){this.ug=!0;this.Cj(this.ug||
this.Uh)};H.prototype.mr=function(a){this.Uh=!!a;this.Cj(this.ug||this.Uh)};H.prototype.hl=function(){var a=this.playbackRate;this.rg&&(a*=z.Ug);switch(this.ba){case 0:this.g.playbackRate!==a&&(this.g.playbackRate=a);break;case 1:1===this.buffer.ba?this.g.playbackRate.value!==a&&(this.g.playbackRate.value=a):this.g.playbackRate!==a&&(this.g.playbackRate=a)}};H.prototype.by=function(a){switch(this.ba){case 0:a?this.qg()?(this.Ec=!0,this.g.pause()):this.Ec=!1:this.Ec&&(this.g.play(),this.Ec=!1);break;
case 1:a?this.qg()?(this.Ec=!0,1===this.buffer.ba?(this.ic=this.hm(!0),this.yd&&(this.ic=this.ic%this.pf()),t(this.g)):this.g.pause()):this.Ec=!1:this.Ec&&(1===this.buffer.ba?(this.g=x.createBufferSource(),this.g.buffer=this.buffer.na,this.g.connect(this.ib),this.g.onended=this.dn,this.aj=this.g,this.g.loop=this.yd,this.ib.gain.value=C*this.volume*this.Gg,this.hl(),this.startTime=(this.rg?z.sb.R:z.ne.R)-this.ic/(this.playbackRate||.001),r(this.g,this.ic,this.pf())):this.g.play(),this.Ec=!1);break;
case 2:a?this.qg()?(this.g.pause(),this.Ec=!0):this.Ec=!1:this.Ec&&(this.Ec=!1,this.g.play())}};O.V=function(a){function b(){if(!va&&x.createBuffer){var a=x.createBuffer(1,220,22050),e=x.createBufferSource();e.buffer=a;e.connect(x.destination);u(e)}}this.type=a;z=this.b=a.b;S=this;this.qc=null;this.ai=-600;this.b.Th&&(Wa=!0);!(this.b.zf||this.b.Kh&&(this.b.Lh||this.b.Xj))||this.b.Mh||this.b.Ca||this.b.xm||Wa||(Xa=!0);x=null;"undefined"!==typeof AudioContext?(F=1,x=new AudioContext):"undefined"!==
typeof webkitAudioContext&&(F=1,x=new webkitAudioContext);this.b.zf&&x&&(x.close&&x.close(),"undefined"!==typeof AudioContext?x=new AudioContext:"undefined"!==typeof webkitAudioContext&&(x=new webkitAudioContext));Xa?document.addEventListener("touchend",function(){!lb&&x&&(b(),lb=!0);var a,e,c;if(Xa){if(!N)for(a=0,e=Ya.length;a<e;++a)c=Ya[a],c.yb||c.oc||c.g.play();G(Ya)}},!0):Wa&&document.addEventListener("touchend",function(){!lb&&x&&(b(),lb=!0)},!0);1!==F&&(this.b.cc&&"undefined"!==typeof window.Media?
F=2:this.b.Kp&&(F=3));2===F&&(P=location.href,a=P.lastIndexOf("/"),-1<a&&(P=P.substr(0,a+1)),P=P.replace("file://",""));if(this.b.Pw&&this.b.Qw&&"undefined"===typeof Audio)alert("It looks like you're using Safari for Windows without Quicktime.  Audio cannot be played until Quicktime is installed."),this.b.qe(this);else{if(this.b.Mb)E=this.b.Kh;else try{E=!!(new Audio).canPlayType('audio/ogg; codecs="vorbis"')}catch(e){E=!1}this.b.Ki(this)}};var qa=O.V.prototype;qa.G=function(){this.b.Zf=this;R=this.m[0];
this.ge=this.m[1];this.vx=0!==this.m[2];this.xq=0;U=this.m[3];wa=this.m[4];this.ai=-this.m[5];ma=this.m[6];Ia=this.m[7];Bc=this.m[8];this.qc=new w;var a=this.b.I||this.b.width,b=this.b.H||this.b.height;1===F&&(x.listener.setPosition(a/2,b/2,this.ai),x.listener.setOrientation(0,0,1,0,-1,0),window.c2OnAudioMicStream=function(a,b){Ja&&Ja.disconnect();Ab=b.toLowerCase();Ja=x.createMediaStreamSource(a);Ja.connect(l(Ab))});this.b.Ko(function(a){S.nx(a)});var e=this;this.b.gu(function(a){e.kx(a)})};qa.kx=
function(a){var b,e,c;b=0;for(e=B.length;b<e;b++)c=B[b],c.Db&&c.Db.ra===a&&(c.Db.ra=null,c.zd&&c.qg()&&c.yd&&c.stop());this.qc.ra===a&&(this.qc.ra=null)};qa.xb=function(){var a={silent:N,masterVolume:C,listenerZ:this.ai,listenerUid:this.qc.Vj()?this.qc.ra.uid:-1,playing:[],effects:{}},b=a.playing,e,c,d,g,f,h;e=0;for(c=B.length;e<c;e++)d=B[e],!d.ey()||3===this.ge||d.Mc&&1===this.ge||!d.Mc&&2===this.ge||(g=d.hm(),d.yd&&(g=g%d.pf()),g={tag:d.tag,buffersrc:d.buffer.src,is_music:d.Mc,playbackTime:g,volume:d.volume,
looping:d.yd,muted:d.ug,playbackRate:d.playbackRate,paused:d.oc,resume_position:d.ic},d.zd&&(g.pan={},h=g.pan,d.Db&&d.Db.Vj()?h.objUid=d.Db.ra.uid:(h.x=d.Pq,h.y=d.Qq,h.a=d.Lq),h.ia=d.Mq,h.oa=d.Nq,h.og=d.Oq),b.push(g));b=a.effects;for(f in Y)if(Y.hasOwnProperty(f)){d=[];e=0;for(c=Y[f].length;e<c;e++)d.push({type:Y[f][e].type,params:Y[f][e].ad});b[f]=d}return a};var Za=[];qa.Ob=function(f){var h=f.silent;C=f.masterVolume;this.ai=f.listenerZ;this.qc.xi(null);var p=f.listenerUid;-1!==p&&(this.qc.ik=p,
Za.push(this.qc));var p=f.playing,u,l,r,x,t,H,P,X,z,y,L;if(3!==this.ge)for(u=0,l=B.length;u<l;u++)z=B[u],z.Mc&&1===this.ge||(z.Mc||2!==this.ge)&&z.stop();for(t in Y)if(Y.hasOwnProperty(t))for(u=0,l=Y[t].length;u<l;u++)Y[t][u].remove();ab(Y);for(t in f.effects)if(f.effects.hasOwnProperty(t))for(H=f.effects[t],u=0,l=H.length;u<l;u++)switch(r=H[u].type,y=H[u].params,r){case "filter":J(t,new a(y[0],y[1],y[2],y[3],y[4],y[5]));break;case "delay":J(t,new g(y[0],y[1],y[2]));break;case "convolve":r=y[2];z=
this.Nj(r,!1);z.na?r=new b(z.na,y[0],y[1],r):(r=new b(null,y[0],y[1],r),z.zq=y[0],z.sj=r);J(t,r);break;case "flanger":J(t,new d(y[0],y[1],y[2],y[3],y[4]));break;case "phaser":J(t,new c(y[0],y[1],y[2],y[3],y[4],y[5]));break;case "gain":J(t,new k(y[0]));break;case "tremolo":J(t,new e(y[0],y[1]));break;case "ringmod":J(t,new n(y[0],y[1]));break;case "distortion":J(t,new q(y[0],y[1],y[2],y[3],y[4]));break;case "compressor":J(t,new v(y[0],y[1],y[2],y[3],y[4]));break;case "analyser":J(t,new m(y[0],y[1]))}u=
0;for(l=p.length;u<l;u++)3===this.ge||(f=p[u],r=f.buffersrc,x=f.is_music,t=f.tag,H=f.playbackTime,P=f.looping,X=f.volume,L=(y=f.pan)&&y.hasOwnProperty("objUid")?y.objUid:-1,x&&1===this.ge)||!x&&2===this.ge||((z=this.up(r,t,x,P,X))?(z.ic=f.resume_position,z.Bn(!!y),z.play(P,X,H),z.hl(),z.oy(),z.Cj(z.ug||z.Uh),f.paused&&z.pause(),f.muted&&z.$x(),z.Cj(z.ug||z.Uh),y&&(-1!==L?(z.Db=z.Db||new w,z.Db.ik=L,Za.push(z.Db)):z.An(y.x,y.y,y.a,y.ia,y.oa,y.og))):(z=this.Nj(r,x),z.Qk=H,z.zk=f.paused,y&&(-1!==L?z.Jg.push({Bq:L,
pm:y.ia,Wm:y.oa,Zm:y.og,Cr:t}):z.Jg.push({x:y.x,y:y.y,cu:y.a,pm:y.ia,Wm:y.oa,Zm:y.og,Cr:t}))));if(h&&!N){u=0;for(l=B.length;u<l;u++)B[u].mr(!0);N=!0}else if(!h&&N){u=0;for(l=B.length;u<l;u++)B[u].mr(!1);N=!1}};qa.Kd=function(){var a,b,e,c;a=0;for(b=Za.length;a<b;a++)e=Za[a],c=this.b.Qj(e.ik),e.xi(c),e.ik=-1,c&&(M=c.x,T=c.y);G(Za)};qa.nx=function(a){if(!this.vx){!a&&x&&x.resume&&(x.resume(),va=!1);var b,e;b=0;for(e=B.length;b<e;b++)B[b].by(a);a&&x&&x.suspend&&(x.suspend(),va=!0)}};qa.ab=function(){var a=
this.b.gf,b,e,c;b=0;for(e=B.length;b<e;b++)c=B[b],c.ab(a),0!==R&&c.hl();var d,g;for(d in Y)if(Y.hasOwnProperty(d))for(c=Y[d],b=0,e=c.length;b<e;b++)g=c[b],g.ab&&g.ab();1===F&&this.qc.Vj()&&(this.qc.ab(a),M=this.qc.ra.x,T=this.qc.ra.y,x.listener.setPosition(this.qc.ra.x,this.qc.ra.y,this.ai))};var $a=[];qa.ay=function(a){var b,e,c,d,g,f=0;b=0;for(e=a.length;b<e;++b)if(c=a[b],d=c[0],c=2*c[1],(g=4<d.length&&".ogg"===d.substr(d.length-4))&&E||!g&&!E)$a.push({filename:d,size:c,ra:null}),f+=c;return f};
qa.gy=function(){var a,b,e,c;a=0;for(b=$a.length;a<b;++a)e=$a[a],c=this.b.Xl+e.filename,e.ra=this.Nj(c,!1)};qa.dw=function(){var a=0,b,e,c;b=0;for(e=$a.length;b<e;++b)c=$a[b],c.ra.Nw()||c.ra.zw()||this.b.Ca||this.b.Xj?a+=c.size:c.ra.Lp()&&(a+=Math.floor(c.size/2));return a};qa.Kx=function(){var a,b,e,c;e=a=0;for(b=V.length;a<b;++a)c=V[a],V[e]=c,c.Mc?c.Jx():++e;V.length=e};qa.Nj=function(a,b){var e,c,d,g=null;e=0;for(c=V.length;e<c;e++)if(d=V[e],d.src===a){g=d;break}g||(Wa&&b&&this.Kx(),g=new X(a,
b),V.push(g));return g};qa.up=function(a,b,e,c,d){var g,f,h;g=0;for(f=B.length;g<f;g++)if(h=B[g],h.src===a&&(h.uu()||e))return h.tag=b,h;a=this.Nj(a,e);if(!a.na)return"<preload>"!==b&&(a.Ak=b,a.Pm=c,a.Un=d),null;h=new H(a,b);B.push(h);return h};var Ba=[];y.prototype.Ui=function(a){return ob(K,a)};y.prototype.Is=function(a){L(a);var b;a=0;for(b=Ba.length;a<b;a++)if(Ba[a].qg())return!0;return!1};O.d=new y;Q.prototype.Play=function(a,b,e,c){!N&&(e=Math.pow(10,e/20),isFinite(e)||(e=0),0>e&&(e=0),1<e&&
(e=1),D=this.up(this.b.Xl+a[0]+(E?".ogg":".m4a"),c,a[1],0!==b,e))&&(D.Bn(!1),D.play(0!==b,e,0,this.xq),this.xq=0)};Q.prototype.Qt=function(a){L(a);var b;a=0;for(b=Ba.length;a<b;a++)Ba[a].stop()};Q.prototype.Rt=function(){var a,b;a=0;for(b=B.length;a<b;a++)B[a].stop()};O.q=new Q;O.L=new function(){}})();function rc(h){this.b=h}
(function(){function h(){}function l(){}var f=rc.prototype;f.ca=function(f){this.ka=f;this.b=f.b};f.ca.prototype.G=function(){};f.V=function(f){this.type=f;this.b=f.b};f.V.prototype.G=function(){var f=this;window.addEventListener("resize",function(){f.b.trigger(rc.prototype.d.ft,f)});"undefined"!==typeof navigator.onLine&&(window.addEventListener("online",function(){f.b.trigger(rc.prototype.d.ct,f)}),window.addEventListener("offline",function(){f.b.trigger(rc.prototype.d.bt,f)}));"undefined"!==typeof window.applicationCache&&
(window.applicationCache.addEventListener("updateready",function(){f.b.Cg=1;f.b.trigger(rc.prototype.d.zo,f)}),window.applicationCache.addEventListener("progress",function(h){f.b.Cg=h.loaded/h.total||0}));this.b.Mb||(document.addEventListener("appMobi.device.update.available",function(){f.b.trigger(rc.prototype.d.zo,f)}),document.addEventListener("backbutton",function(){f.b.trigger(rc.prototype.d.Ti,f)}),document.addEventListener("menubutton",function(){f.b.trigger(rc.prototype.d.so,f)}),document.addEventListener("searchbutton",
function(){f.b.trigger(rc.prototype.d.gt,f)}),document.addEventListener("tizenhwkey",function(h){var l;switch(h.keyName){case "back":l=f.b.trigger(rc.prototype.d.Ti,f);!l&&window.tizen&&window.tizen.application.getCurrentApplication().exit();break;case "menu":(l=f.b.trigger(rc.prototype.d.so,f))||h.preventDefault()}}));this.b.Cm&&"undefined"!==typeof Windows?Windows.UI.Core.SystemNavigationManager.getForCurrentView().addEventListener("backrequested",function(h){f.b.trigger(rc.prototype.d.Ti,f)&&(h.Uj=
!0)}):this.b.$j&&WinJS.Application&&(WinJS.Application.onbackclick=function(){return!!f.b.trigger(rc.prototype.d.Ti,f)});this.b.Ko(function(h){h?f.b.trigger(rc.prototype.d.dt,f):f.b.trigger(rc.prototype.d.et,f)});this.Op="undefined"!==typeof window.is_scirra_arcade};h.prototype.ct=function(){return!0};h.prototype.bt=function(){return!0};h.prototype.zo=function(){return!0};h.prototype.et=function(){return!0};h.prototype.dt=function(){return!0};h.prototype.ft=function(){return!0};h.prototype.Ti=function(){return!0};
h.prototype.so=function(){return!0};h.prototype.gt=function(){return!0};f.d=new h;l.prototype.ts=function(f,h){this.b.Ac?CocoonJS.App.openURL(f):this.b.Lc?ejecta.openURL(f):this.b.$j?Windows.System.Launcher.launchUriAsync(new Windows.Foundation.Uri(f)):navigator.app&&navigator.app.loadUrl?navigator.app.loadUrl(f,{openExternal:!0}):this.b.cc?window.open(f,"_system"):this.Op||this.b.Ca||window.open(f,h)};f.q=new l;f.L=new function(){}})();function sc(h){this.b=h}
(function(){function h(){}var l=sc.prototype;l.ca=function(f){this.ka=f;this.b=f.b};l.ca.prototype.G=function(){};l.V=function(f){this.type=f;this.b=f.b;this.Yh=Array(256);this.Ni=Array(256);this.le=0};var f=l.V.prototype;f.G=function(){var f=this;this.b.Ca||(jQuery(document).keydown(function(h){f.lx(h)}),jQuery(document).keyup(function(h){f.mx(h)}))};var p=[32,33,34,35,36,37,38,39,40,44];f.lx=function(f){var h=!1;window!=window.top&&-1<p.indexOf(f.which)&&(f.preventDefault(),h=!0,f.stopPropagation());
if(this.Yh[f.which])this.Ni[f.which]&&!h&&f.preventDefault();else{this.Yh[f.which]=!0;this.le=f.which;this.b.Ra=!0;this.b.trigger(sc.prototype.d.Ps,this);var l=this.b.trigger(sc.prototype.d.no,this),a=this.b.trigger(sc.prototype.d.Ys,this);this.b.Ra=!1;if(l||a)this.Ni[f.which]=!0,h||f.preventDefault()}};f.mx=function(f){this.Yh[f.which]=!1;this.le=f.which;this.b.Ra=!0;this.b.trigger(sc.prototype.d.fo,this);var h=this.b.trigger(sc.prototype.d.po,this),l=this.b.trigger(sc.prototype.d.oo,this);this.b.Ra=
!1;if(h||l||this.Ni[f.which])this.Ni[f.which]=!0,f.preventDefault()};f.Lf=function(){var f;for(f=0;256>f;++f)if(this.Yh[f]){this.Yh[f]=!1;this.le=f;this.b.trigger(sc.prototype.d.fo,this);var h=this.b.trigger(sc.prototype.d.po,this),l=this.b.trigger(sc.prototype.d.oo,this);if(h||l)this.Ni[f]=!0}};f.xb=function(){return{triggerKey:this.le}};f.Ob=function(f){this.le=f.triggerKey};h.prototype.no=function(f){return f===this.le};h.prototype.Ps=function(){return!0};h.prototype.fo=function(){return!0};h.prototype.po=
function(f){return f===this.le};h.prototype.Ys=function(f){return f===this.le};h.prototype.oo=function(f){return f===this.le};l.d=new h;l.q=new function(){};l.L=new function(){}})();
try{!function(){var h,l,f;!function(){var p={},u={};h=function(f,h,a){p[f]={Bu:h,tu:a}};f=l=function(h){function t(a){if("."!==a.charAt(0))return a;a=a.split("/");for(var b=h.split("/").slice(0,-1),c=0,d=a.length;d>c;c++){var g=a[c];".."===g?b.pop():"."!==g&&b.push(g)}return b.join("/")}if(f.fz=p,u[h])return u[h];if(u[h]={},!p[h])throw Error("Could not find module "+h);for(var a,g=p[h],b=g.Bu,g=g.tu,d=[],c=0,k=b.length;k>c;c++)"exports"===b[c]?d.push(a={}):d.push(l(t(b[c])));b=g.apply(this,d);return u[h]=
a||b}}();h("promise/all",["./utils","exports"],function(f,h){var l=f.isArray,t=f.isFunction;h.all=function(a){if(!l(a))throw new TypeError("You must pass an array to all.");return new this(function(g,b){function d(a){return function(b){f[a]=b;0===--e&&g(f)}}var c,f=[],e=a.length;0===e&&g([]);for(var h=0;h<a.length;h++)(c=a[h])&&t(c.then)?c.then(d(h),b):(f[h]=c,0===--e&&g(f))})}});h("promise/asap",["exports"],function(f){function h(){return function(){process.wz(a)}}function l(){var b=0,c=new d(a),
g=document.createTextNode("");return c.observe(g,{characterData:!0}),function(){g.data=b=++b%2}}function t(){return function(){c.setTimeout(a,1)}}function a(){for(var a=0;a<k.length;a++){var b=k[a];(0,b[0])(b[1])}k=[]}var g,b="undefined"!=typeof window?window:{},d=b.MutationObserver||b.WebKitMutationObserver,c="undefined"!=typeof global?global:void 0===this?window:this,k=[];g="undefined"!=typeof process&&"[object process]"==={}.toString.call(process)?h():d?l():t();f.ou=function(a,b){1===k.push([a,
b])&&g()}});h("promise/config",["exports"],function(f){var h={oz:!1};f.$o=h;f.vu=function(f,l){return 2!==arguments.length?h[f]:void(h[f]=l)}});h("promise/polyfill",["./promise","./utils","exports"],function(f,h,l){var t=f.Promise,a=h.isFunction;l.wx=function(){var g;g="undefined"!=typeof global?global:"undefined"!=typeof window&&window.document?window:self;"Promise"in g&&"resolve"in g.Promise&&"reject"in g.Promise&&"all"in g.Promise&&"race"in g.Promise&&function(){var b;return new g.Promise(function(a){b=
a}),a(b)}()||(g.Promise=t)}});h("promise/promise","./config ./utils ./all ./race ./resolve ./reject ./asap exports".split(" "),function(f,h,l,t,a,g,b,d){function c(a){if(!Q(a))throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof c))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this.Zi=[];k(a,this)}function k(a,b){function e(a){m(b,
a)}function c(a){X(b,a)}try{a(e,c)}catch(d){c(d)}}function e(a,b,e,c){var d,g,f,h,k=Q(e);if(k)try{d=e(c),f=!0}catch(n){h=!0,g=n}else d=c,f=!0;v(b,d)||(k&&f?m(b,d):h?X(b,g):a===S?m(b,d):a===K&&X(b,d))}function n(a,b,e,c){a=a.Zi;var d=a.length;a[d]=b;a[d+S]=e;a[d+K]=c}function q(a,b){for(var c,d,g=a.Zi,f=a.Yi,h=0;h<g.length;h+=3)c=g[h],d=g[h+b],e(b,c,d,f);a.Zi=null}function v(a,b){var e,c=null;try{if(a===b)throw new TypeError("A promises callback cannot return that same promise.");if(y(b)&&(c=b.then,
Q(c)))return c.call(b,function(c){return e?!0:(e=!0,void(b!==c?m(a,c):w(a,c)))},function(b){return e?!0:(e=!0,void X(a,b))}),!0}catch(d){return e?!0:(X(a,d),!0)}return!1}function m(a,b){a===b?w(a,b):v(a,b)||w(a,b)}function w(a,b){a.Jd===O&&(a.Jd=z,a.Yi=b,J.async(H,a))}function X(a,b){a.Jd===O&&(a.Jd=z,a.Yi=b,J.async(L,a))}function H(a){q(a,a.Jd=S)}function L(a){q(a,a.Jd=K)}var J=f.$o,y=(f.vu,h.dx),Q=h.isFunction;f=(h.now,l.all);t=t.race;a=a.resolve;g=g.reject;J.async=b.ou;var O=void 0,z=0,S=1,K=2;
c.prototype={constructor:c,Jd:void 0,Yi:void 0,Zi:void 0,then:function(a,b){var c=this,d=new this.constructor(function(){});if(this.Jd){var g=arguments;J.async(function(){e(c.Jd,d,g[c.Jd-1],c.Yi)})}else n(this,d,a,b);return d},"catch":function(a){return this.then(null,a)}};c.all=f;c.race=t;c.resolve=a;c.reject=g;d.Promise=c});h("promise/race",["./utils","exports"],function(f,h){var l=f.isArray;h.race=function(f){if(!l(f))throw new TypeError("You must pass an array to race.");return new this(function(a,
g){for(var b,d=0;d<f.length;d++)(b=f[d])&&"function"==typeof b.then?b.then(a,g):a(b)})}});h("promise/reject",["exports"],function(f){f.reject=function(f){return new this(function(h,l){l(f)})}});h("promise/resolve",["exports"],function(f){f.resolve=function(f){return f&&"object"==typeof f&&f.constructor===this?f:new this(function(h){h(f)})}});h("promise/utils",["exports"],function(f){function h(f){return"function"==typeof f}var l=Date.now||function(){return(new Date).getTime()};f.dx=function(f){return h(f)||
"object"==typeof f&&null!==f};f.isFunction=h;f.isArray=function(f){return"[object Array]"===Object.prototype.toString.call(f)};f.now=l});l("promise/polyfill").wx()}();var tc=function(){return function(h){function l(p){if(f[p])return f[p].sd;var u=f[p]={sd:{},id:p,loaded:!1};return h[p].call(u.sd,u,u.sd,l),u.loaded=!0,u.sd}var f={};return l.pd=h,l.kh=f,l.rh="",l(0)}([function(h,l,f){l.Xi=!0;var p=function(h){function l(a,b){a[b]=function(){var e=arguments;return a.ready().then(function(){return a[b].apply(a,
e)})}}function p(){for(var a=1;a<arguments.length;a++){var b=arguments[a];if(b)for(var c in b)b.hasOwnProperty(c)&&(e(b[c])?arguments[0][c]=b[c].slice():arguments[0][c]=b[c])}return arguments[0]}function a(a){for(var e in b)if(b.hasOwnProperty(e)&&b[e]===a)return!0;return!1}var g={},b={ah:"asyncStorage",dh:"localStorageWrapper",eh:"webSQLStorage"},d="clear getItem iterate key keys length removeItem setItem".split(" "),c={description:"",gg:[b.ah,b.eh,b.dh].slice(),name:"localforage",size:4980736,ta:"keyvaluepairs",
version:1},k=function(a){var e={},c;try{var d=d||a.indexedDB||a.webkitIndexedDB||a.mozIndexedDB||a.Dj||a.msIndexedDB;c="undefined"!=typeof a.openDatabase&&a.navigator&&a.navigator.userAgent&&/Safari/.test(a.navigator.userAgent)&&!/Chrome/.test(a.navigator.userAgent)?!1:d&&"function"==typeof d.open&&"undefined"!=typeof a.IDBKeyRange}catch(g){c=!1}e[b.ah]=!!c;var f;try{f=a.openDatabase}catch(h){f=!1}e[b.eh]=!!f;var k;try{k=a.localStorage&&"setItem"in a.localStorage&&a.localStorage.setItem}catch(l){k=
!1}return e[b.dh]=!!k,e}(h),e=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};return new (function(){function h(a){if(!(this instanceof h))throw new TypeError("Cannot call a class as a function");this.ah=b.ah;this.dh=b.dh;this.eh=b.eh;this.tl=p({},c);this.Ve=p({},this.tl,a);this.Co=this.nd=null;this.se=!1;this.pa=null;this.Do();this.jr(this.Ve.gg)}return h.prototype.$o=function(a){if("object"==typeof a){if(this.se)return Error("Can't call config() after localforage has been used.");
for(var b in a)"storeName"===b&&(a[b]=a[b].replace(/\W/g,"_")),this.Ve[b]=a[b];return"driver"in a&&a.gg&&this.jr(this.Ve.gg),!0}return"string"==typeof a?this.Ve[a]:this.Ve},h.prototype.gg=function(){return this.fh||null},h.prototype.wp=function(b,e,c){var d=this,h=function(){if(a(b))switch(b){case d.ah:return new Promise(function(a){a(f(1))});case d.dh:return new Promise(function(a){a(f(2))});case d.eh:return new Promise(function(a){a(f(4))})}else if(g[b])return Promise.resolve(g[b]);return Promise.reject(Error("Driver not found."))}();
return h.then(e,c),h},h.prototype.ready=function(a){var b=this,e=b.nd.then(function(){return null===b.se&&(b.se=b.Co()),b.se});return e.then(a,a),e},h.prototype.jr=function(a,b,c){function d(){f.Ve.gg=f.gg()}function g(a){return function(){function b(){for(;e<a.length;){var c=a[e];return e++,f.pa=null,f.se=null,f.wp(c).then(function(a){return f.au(a),d(),f.se=f.wl(f.Ve),f.se})["catch"](b)}d();return f.nd=Promise.reject(Error("No available storage method found.")),f.nd}var e=0;return b()}}var f=this;
e(a)||(a=[a]);var h=this.bu(a);return this.nd=(null!==this.nd?this.nd["catch"](function(){return Promise.resolve()}):Promise.resolve()).then(function(){var a=h[0];return f.pa=null,f.se=null,f.wp(a).then(function(a){f.fh=a.fh;d();f.Do();f.Co=g(h)})})["catch"](function(){d();return f.nd=Promise.reject(Error("No available storage method found.")),f.nd}),this.nd.then(b,c),this.nd},h.prototype.supports=function(a){return!!k[a]},h.prototype.au=function(a){p(this,a)},h.prototype.bu=function(a){for(var b=
[],e=0,c=a.length;c>e;e++){var d=a[e];this.supports(d)&&b.push(d)}return b},h.prototype.Do=function(){for(var a=0;a<d.length;a++)l(this,d[a])},h.prototype.tj=function(a){return new h(a)},h}())}("undefined"!=typeof window?window:self);l["default"]=p;h.sd=l["default"]},function(h,l){l.Xi=!0;l["default"]=function(f){function h(a,b){a=a||[];b=b||{};try{return new Blob(a,b)}catch(e){if("TypeError"!==e.name)throw e;for(var c=new (f.BlobBuilder||f.pd||f.rh||f.WebKitBlobBuilder),d=0;d<a.length;d+=1)c.append(a[d]);
return c.getBlob(b.type)}}function l(a){return new Promise(function(b,e){var c=new XMLHttpRequest;c.open("GET",a);c.withCredentials=!0;c.responseType="arraybuffer";c.onreadystatechange=function(){return 4===c.readyState?200===c.status?b({response:c.response,type:c.getResponseHeader("Content-Type")}):void e({status:c.status,response:c.response}):void 0};c.send()})}function r(a){return(new Promise(function(b,e){var c=h([""],{type:"image/png"}),d=a.transaction([O],"readwrite");d.objectStore(O).put(c,
"key");d.oncomplete=function(){var c=a.transaction([O],"readwrite").objectStore(O).get("key");c.onerror=e;c.onsuccess=function(a){var e=URL.createObjectURL(a.target.result);l(e).then(function(a){b(!(!a||"image/png"!==a.type))},function(){b(!1)}).then(function(){URL.revokeObjectURL(e)})}};d.onerror=d.onabort=e}))["catch"](function(){return!1})}function t(a){return"boolean"==typeof y?Promise.resolve(y):r(a).then(function(a){return y=a})}function a(a){return new Promise(function(b,e){var c=new FileReader;
c.onerror=e;c.onloadend=function(e){b({Bo:!0,data:btoa(e.target.result||""),type:a.type})};c.readAsBinaryString(a)})}function g(a){for(var b=atob(a.data),e=b.length,c=new ArrayBuffer(e),d=new Uint8Array(c),g=0;e>g;g++)d[g]=b.charCodeAt(g);return h([c],{type:a.type})}function b(a){var b=this,e=b.ul().then(function(){var a=Q[b.pa.name];return a&&a.fg?a.fg:void 0});return e.then(a,a),e}function d(a){a=Q[a.name];var b={};b.promise=new Promise(function(a){b.resolve=a});a.fp.push(b);a.fg?a.fg=a.fg.then(function(){return b.promise}):
a.fg=b.promise}function c(a){function e(){return Promise.resolve()}var c=this,d={db:null};if(a)for(var g in a)d[g]=a[g];Q||(Q={});var h=Q[d.name];h||(h={Kj:[],db:null,fg:null,fp:[]},Q[d.name]=h);h.Kj.push(c);c.ul||(c.ul=c.ready,c.ready=b);a=[];for(g=0;g<h.Kj.length;g++){var m=h.Kj[g];m!==c&&a.push(m.ul()["catch"](e))}var n=h.Kj.slice(0);return Promise.all(a).then(function(){return d.db=h.db,k(d,!1)}).then(function(a){d.db=a;var b;b=c.tl.version;if(d.db){var e=!d.db.objectStoreNames.contains(d.ta),
g=d.version>d.db.version;(d.version<d.db.version&&(d.version!==b&&f.console.warn('The database "'+d.name+"\" can't be downgraded from version "+d.db.version+" to version "+d.version+"."),d.version=d.db.version),g||e)?(e&&(b=d.db.version+1,b>d.version&&(d.version=b)),b=!0):b=!1}else b=!0;return b?k(d,!0):a}).then(function(a){d.db=h.db=a;c.pa=d;for(a=0;a<n.length;a++){var b=n[a];b!==c&&(b.pa.db=d.db,b.pa.version=d.version)}})}function k(a,b){return new Promise(function(e,c){if(a.db){if(!b)return e(a.db);
d(a);a.db.close()}var g=[a.name];b&&g.push(a.version);var h=J.open.apply(J,g);b&&(h.onupgradeneeded=function(b){var e=h.result;try{e.createObjectStore(a.ta),1>=b.oldVersion&&e.createObjectStore(O)}catch(c){if("ConstraintError"!==c.name)throw c;f.console.warn('The database "'+a.name+'" has been upgraded from version '+b.oldVersion+" to version "+b.newVersion+', but the storage "'+a.ta+'" already exists.')}});h.onerror=function(){c(h.error)};h.onsuccess=function(){e(h.result);var b=Q[a.name].fp.pop();
b&&b.resolve()}})}function e(a,b){var e=this;"string"!=typeof a&&(f.console.warn(a+" used as a key, but it is not a string."),a=String(a));var c=new Promise(function(b,c){e.ready().then(function(){var d=e.pa,f=d.db.transaction(d.ta,"readonly").objectStore(d.ta).get(a);f.onsuccess=function(){var a=f.result;void 0===a&&(a=null);a&&a.Bo&&(a=g(a));b(a)};f.onerror=function(){c(f.error)}})["catch"](c)});return L(c,b),c}function n(a,b){var e=this,c=new Promise(function(b,c){e.ready().then(function(){var d=
e.pa,f=d.db.transaction(d.ta,"readonly").objectStore(d.ta).openCursor(),h=1;f.onsuccess=function(){var e=f.result;if(e){var c=e.value;c&&c.Bo&&(c=g(c));c=a(c,e.key,h++);void 0!==c?b(c):e["continue"]()}else b()};f.onerror=function(){c(f.error)}})["catch"](c)});return L(c,b),c}function q(b,e,c){var d=this;"string"!=typeof b&&(f.console.warn(b+" used as a key, but it is not a string."),b=String(b));var g=new Promise(function(c,g){var f;d.ready().then(function(){return f=d.pa,e instanceof Blob?t(f.db).then(function(b){return b?
e:a(e)}):e}).then(function(a){var e=f.db.transaction(f.ta,"readwrite"),d=e.objectStore(f.ta);null===a&&(a=void 0);e.oncomplete=function(){void 0===a&&(a=null);c(a)};e.onabort=e.onerror=function(){g(h.error?h.error:h.transaction.error)};var h=d.put(a,b)})["catch"](g)});return L(g,c),g}function v(a,b){var e=this;"string"!=typeof a&&(f.console.warn(a+" used as a key, but it is not a string."),a=String(a));var c=new Promise(function(b,c){e.ready().then(function(){var d=e.pa,g=d.db.transaction(d.ta,"readwrite"),
f=g.objectStore(d.ta)["delete"](a);g.oncomplete=function(){b()};g.onerror=function(){c(f.error)};g.onabort=function(){c(f.error?f.error:f.transaction.error)}})["catch"](c)});return L(c,b),c}function m(a){var b=this,e=new Promise(function(a,e){b.ready().then(function(){var c=b.pa,d=c.db.transaction(c.ta,"readwrite"),g=d.objectStore(c.ta).clear();d.oncomplete=function(){a()};d.onabort=d.onerror=function(){e(g.error?g.error:g.transaction.error)}})["catch"](e)});return L(e,a),e}function w(a){var b=this,
e=new Promise(function(a,e){b.ready().then(function(){var c=b.pa,d=c.db.transaction(c.ta,"readonly").objectStore(c.ta).count();d.onsuccess=function(){a(d.result)};d.onerror=function(){e(d.error)}})["catch"](e)});return L(e,a),e}function X(a,b){var e=this,c=new Promise(function(b,c){return 0>a?void b(null):void e.ready().then(function(){var d=e.pa,g=!1,f=d.db.transaction(d.ta,"readonly").objectStore(d.ta).openCursor();f.onsuccess=function(){var e=f.result;return e?void(0===a?b(e.key):g?b(e.key):(g=
!0,e.advance(a))):void b(null)};f.onerror=function(){c(f.error)}})["catch"](c)});return L(c,b),c}function H(a){var b=this,e=new Promise(function(a,e){b.ready().then(function(){var c=b.pa,d=c.db.transaction(c.ta,"readonly").objectStore(c.ta).openCursor(),g=[];d.onsuccess=function(){var b=d.result;return b?(g.push(b.key),void b["continue"]()):void a(g)};d.onerror=function(){e(d.error)}})["catch"](e)});return L(e,a),e}function L(a,b){b&&a.then(function(a){b(null,a)},function(a){b(a)})}var J=J||f.indexedDB||
f.webkitIndexedDB||f.mozIndexedDB||f.Dj||f.msIndexedDB;if(J){var y,Q,O="local-forage-detect-blob-support";return{fh:"asyncStorage",wl:c,Rp:n,getItem:e,setItem:q,removeItem:v,clear:m,length:w,key:X,keys:H}}}("undefined"!=typeof window?window:self);h.sd=l["default"]},function(h,l,f){l.Xi=!0;l["default"]=function(h){function l(a,g){g&&a.then(function(a){g(null,a)},function(a){g(a)})}var r=null;try{if(!(h.localStorage&&"setItem"in h.localStorage))return;r=h.localStorage}catch(t){return}return{fh:"localStorageWrapper",
wl:function(a){var g={};if(a)for(var b in a)g[b]=a[b];return g.xd=g.name+"/",g.ta!==this.tl.ta&&(g.xd+=g.ta+"/"),this.pa=g,(new Promise(function(a){a(f(3))})).then(function(a){return g.Nf=a,Promise.resolve()})},Rp:function(a,g){var b=this,d=b.ready().then(function(){for(var c=b.pa,d=c.xd,e=d.length,g=r.length,f=1,h=0;g>h;h++){var m=r.key(h);if(0===m.indexOf(d)){var l=r.getItem(m);if(l&&(l=c.Nf.Bj(l)),l=a(l,m.substring(e),f++),void 0!==l)return l}}});return l(d,g),d},getItem:function(a,g){var b=this;
"string"!=typeof a&&(h.console.warn(a+" used as a key, but it is not a string."),a=String(a));var d=b.ready().then(function(){var c=b.pa,d=r.getItem(c.xd+a);return d&&(d=c.Nf.Bj(d)),d});return l(d,g),d},setItem:function(a,g,b){var d=this;"string"!=typeof a&&(h.console.warn(a+" used as a key, but it is not a string."),a=String(a));var c=d.ready().then(function(){void 0===g&&(g=null);var b=g;return new Promise(function(e,c){var f=d.pa;f.Nf.serialize(g,function(d,g){if(g)c(g);else try{r.setItem(f.xd+
a,d),e(b)}catch(h){"QuotaExceededError"!==h.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==h.name||c(h),c(h)}})})});return l(c,b),c},removeItem:function(a,g){var b=this;"string"!=typeof a&&(h.console.warn(a+" used as a key, but it is not a string."),a=String(a));var d=b.ready().then(function(){r.removeItem(b.pa.xd+a)});return l(d,g),d},clear:function(a){var g=this,b=g.ready().then(function(){for(var a=g.pa.xd,b=r.length-1;0<=b;b--){var f=r.key(b);0===f.indexOf(a)&&r.removeItem(f)}});return l(b,a),b},length:function(a){var g=
this.keys().then(function(a){return a.length});return l(g,a),g},key:function(a,g){var b=this,d=b.ready().then(function(){var c,d=b.pa;try{c=r.key(a)}catch(e){c=null}return c&&(c=c.substring(d.xd.length)),c});return l(d,g),d},keys:function(a){var g=this,b=g.ready().then(function(){for(var a=g.pa,b=r.length,f=[],e=0;b>e;e++)0===r.key(e).indexOf(a.xd)&&f.push(r.key(e).substring(a.xd.length));return f});return l(b,a),b}}}("undefined"!=typeof window?window:self);h.sd=l["default"]},function(h,l){l.Xi=!0;
l["default"]=function(f){function h(a){var g,b,d,c,f;g=.75*a.length;var e=a.length,n=0;"="===a[a.length-1]&&(g--,"="===a[a.length-2]&&g--);var q=new ArrayBuffer(g),v=new Uint8Array(q);for(g=0;e>g;g+=4)b=r.indexOf(a[g]),d=r.indexOf(a[g+1]),c=r.indexOf(a[g+2]),f=r.indexOf(a[g+3]),v[n++]=b<<2|d>>4,v[n++]=(15&d)<<4|c>>2,v[n++]=(3&c)<<6|63&f;return q}function l(a){var g=new Uint8Array(a),b="";for(a=0;a<g.length;a+=3)b+=r[g[a]>>2],b+=r[(3&g[a])<<4|g[a+1]>>4],b+=r[(15&g[a+1])<<2|g[a+2]>>6],b+=r[63&g[a+2]];
return 2===g.length%3?b=b.substring(0,b.length-1)+"=":1===g.length%3&&(b=b.substring(0,b.length-2)+"=="),b}var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=/^~~local_forage_type~([^~]+)~/;return{serialize:function(a,g){var b="";if(a&&(b=a.toString()),a&&("[object ArrayBuffer]"===a.toString()||a.buffer&&"[object ArrayBuffer]"===a.buffer.toString())){var d,c="__lfsc__:";a instanceof ArrayBuffer?(d=a,c+="arbf"):(d=a.buffer,"[object Int8Array]"===b?c+="si08":"[object Uint8Array]"===
b?c+="ui08":"[object Uint8ClampedArray]"===b?c+="uic8":"[object Int16Array]"===b?c+="si16":"[object Uint16Array]"===b?c+="ur16":"[object Int32Array]"===b?c+="si32":"[object Uint32Array]"===b?c+="ui32":"[object Float32Array]"===b?c+="fl32":"[object Float64Array]"===b?c+="fl64":g(Error("Failed to get type for BinaryArray")));g(c+l(d))}else if("[object Blob]"===b)b=new FileReader,b.onload=function(){var b="~~local_forage_type~"+a.type+"~"+l(this.result);g("__lfsc__:blob"+b)},b.readAsArrayBuffer(a);else try{g(JSON.stringify(a))}catch(f){console.error("Couldn't convert value into a JSON string: ",
a),g(null,f)}},Bj:function(a){if("__lfsc__:"!==a.substring(0,9))return JSON.parse(a);var g,b=a.substring(13);a=a.substring(9,13);if("blob"===a&&t.test(b)){var d=b.match(t);g=d[1];b=b.substring(d[0].length)}b=h(b);switch(a){case "arbf":return b;case "blob":var c;b=[b];g={type:g};b=b||[];g=g||{};try{c=new Blob(b,g)}catch(k){if("TypeError"!==k.name)throw k;c=new (f.BlobBuilder||f.pd||f.rh||f.WebKitBlobBuilder);for(a=0;a<b.length;a+=1)c.append(b[a]);c=c.getBlob(g.type)}return c;case "si08":return new Int8Array(b);
case "ui08":return new Uint8Array(b);case "uic8":return new Uint8ClampedArray(b);case "si16":return new Int16Array(b);case "ur16":return new Uint16Array(b);case "si32":return new Int32Array(b);case "ui32":return new Uint32Array(b);case "fl32":return new Float32Array(b);case "fl64":return new Float64Array(b);default:throw Error("Unkown type: "+a);}},Dz:h,iz:l}}("undefined"!=typeof window?window:self);h.sd=l["default"]},function(h,l,f){l.Xi=!0;l["default"]=function(h){function l(a){var b=this,e={db:null};
if(a)for(var c in a)e[c]="string"!=typeof a[c]?a[c].toString():a[c];var d=new Promise(function(a,c){try{e.db=n(e.name,String(e.version),e.description,e.size)}catch(d){return c(d)}e.db.transaction(function(d){d.executeSql("CREATE TABLE IF NOT EXISTS "+e.ta+" (id INTEGER PRIMARY KEY, key unique, value)",[],function(){b.pa=e;a()},function(a,b){c(b)})})});return(new Promise(function(a){a(f(3))})).then(function(a){return e.Nf=a,d})}function r(a,b){var c=this;"string"!=typeof a&&(h.console.warn(a+" used as a key, but it is not a string."),
a=String(a));var d=new Promise(function(b,e){c.ready().then(function(){var d=c.pa;d.db.transaction(function(c){c.executeSql("SELECT * FROM "+d.ta+" WHERE key = ? LIMIT 1",[a],function(a,e){var c=e.rows.length?e.rows.item(0).value:null;c&&(c=d.Nf.Bj(c));b(c)},function(a,b){e(b)})})})["catch"](e)});return e(d,b),d}function t(a,b){var c=this,d=new Promise(function(b,e){c.ready().then(function(){var d=c.pa;d.db.transaction(function(c){c.executeSql("SELECT * FROM "+d.ta,[],function(e,c){for(var g=c.rows,
f=g.length,h=0;f>h;h++){var m=g.item(h),k=m.value;if(k&&(k=d.Nf.Bj(k)),k=a(k,m.key,h+1),void 0!==k)return void b(k)}b()},function(a,b){e(b)})})})["catch"](e)});return e(d,b),d}function a(a,b,c){var d=this;"string"!=typeof a&&(h.console.warn(a+" used as a key, but it is not a string."),a=String(a));var g=new Promise(function(e,c){d.ready().then(function(){void 0===b&&(b=null);var g=b,f=d.pa;f.Nf.serialize(b,function(b,d){d?c(d):f.db.transaction(function(d){d.executeSql("INSERT OR REPLACE INTO "+f.ta+
" (key, value) VALUES (?, ?)",[a,b],function(){e(g)},function(a,b){c(b)})},function(a){a.code===a.QUOTA_ERR&&c(a)})})})["catch"](c)});return e(g,c),g}function g(a,b){var c=this;"string"!=typeof a&&(h.console.warn(a+" used as a key, but it is not a string."),a=String(a));var d=new Promise(function(b,e){c.ready().then(function(){var d=c.pa;d.db.transaction(function(c){c.executeSql("DELETE FROM "+d.ta+" WHERE key = ?",[a],function(){b()},function(a,b){e(b)})})})["catch"](e)});return e(d,b),d}function b(a){var b=
this,c=new Promise(function(a,e){b.ready().then(function(){var c=b.pa;c.db.transaction(function(b){b.executeSql("DELETE FROM "+c.ta,[],function(){a()},function(a,b){e(b)})})})["catch"](e)});return e(c,a),c}function d(a){var b=this,c=new Promise(function(a,e){b.ready().then(function(){var c=b.pa;c.db.transaction(function(b){b.executeSql("SELECT COUNT(key) as c FROM "+c.ta,[],function(b,e){var c=e.rows.item(0).kh;a(c)},function(a,b){e(b)})})})["catch"](e)});return e(c,a),c}function c(a,b){var c=this,
d=new Promise(function(b,e){c.ready().then(function(){var d=c.pa;d.db.transaction(function(c){c.executeSql("SELECT key FROM "+d.ta+" WHERE id = ? LIMIT 1",[a+1],function(a,e){var c=e.rows.length?e.rows.item(0).key:null;b(c)},function(a,b){e(b)})})})["catch"](e)});return e(d,b),d}function k(a){var b=this,c=new Promise(function(a,e){b.ready().then(function(){var c=b.pa;c.db.transaction(function(b){b.executeSql("SELECT key FROM "+c.ta,[],function(b,e){for(var c=[],d=0;d<e.rows.length;d++)c.push(e.rows.item(d).key);
a(c)},function(a,b){e(b)})})})["catch"](e)});return e(c,a),c}function e(a,b){b&&a.then(function(a){b(null,a)},function(a){b(a)})}var n=h.openDatabase;if(n)return{fh:"webSQLStorage",wl:l,Rp:t,getItem:r,setItem:a,removeItem:g,clear:b,length:d,key:c,keys:k}}("undefined"!=typeof window?window:self);h.sd=l["default"]}])};"object"==typeof exports&&"object"==typeof module?module.sd=tc():"function"==typeof define&&define.hz?define([],tc):"object"==typeof exports?exports.localforage=tc():this.localforage=
tc()}catch(uc){}function vc(h){this.b=h}(function(){function h(){}var l=vc.prototype;l.ca=function(f){this.ka=f;this.b=f.b};l.ca.prototype.G=function(){};l.V=function(f){this.type=f;this.b=f.b};var f=l.V.prototype;f.G=function(){};f.Kf=function(){};f.xb=function(){return{}};f.Ob=function(){};h.prototype.pd=function(){return!0};l.d=new h;l.q=new function(){};l.L=new function(){}})();function wc(h){this.b=h}
(function(){function h(){}function l(){}function f(){}var p=wc.prototype;p.ca=function(a){this.ka=a;this.b=a.b};p.ca.prototype.G=function(){};p.V=function(a){this.type=a;this.b=a.b;this.Ye=Array(4);this.Fr=this.cl=this.Tf=this.be=this.ae=0;this.Uj=!1};var u=p.V.prototype;u.G=function(){var a=this;if(!this.b.Ca){jQuery(document).mousemove(function(b){a.an(b)});jQuery(document).mousedown(function(b){a.$m(b)});jQuery(document).mouseup(function(b){a.bn(b)});jQuery(document).dblclick(function(b){a.jx(b)});
var g=function(b){a.ox(b)};document.addEventListener("mousewheel",g,!1);document.addEventListener("DOMMouseScroll",g,!1)}};var r={left:0,top:0};u.an=function(a){var g=this.b.Ca?r:jQuery(this.b.canvas).offset();this.ae=a.pageX-g.left;this.be=a.pageY-g.top};u.uq=function(){return 0<this.b.Sb?!0:0<=this.ae&&0<=this.be&&this.ae<this.b.width&&this.be<this.b.height};u.$m=function(a){this.uq()&&(this.Ye[a.which]=!0,this.b.Ra=!0,this.b.trigger(wc.prototype.d.Os,this),this.Tf=a.which-1,this.cl=0,this.b.trigger(wc.prototype.d.ol,
this),this.b.trigger(wc.prototype.d.ql,this),this.b.Ra=!1)};u.bn=function(a){this.Ye[a.which]&&(this.b.Sj&&!this.b.wf&&a.preventDefault(),this.b.Sj=!0,this.Ye[a.which]=!1,this.b.Ra=!0,this.Tf=a.which-1,this.b.trigger(wc.prototype.d.rl,this),this.b.Ra=!1)};u.jx=function(a){this.uq()&&(a.preventDefault(),this.b.Ra=!0,this.Tf=a.which-1,this.cl=1,this.b.trigger(wc.prototype.d.ol,this),this.b.trigger(wc.prototype.d.ql,this),this.b.Ra=!1)};u.ox=function(a){this.Fr=0>(a.wheelDelta?a.wheelDelta:a.detail?
-a.detail:0)?0:1;this.Uj=!1;this.b.Ra=!0;this.b.trigger(wc.prototype.d.kt,this);this.b.Ra=!1;this.Uj&&pb(a)&&a.preventDefault()};u.Lf=function(){var a,g;a=0;for(g=this.Ye.length;a<g;++a)this.Ye[a]&&(this.Ye[a]=!1,this.Tf=a-1,this.b.trigger(wc.prototype.d.rl,this))};h.prototype.ol=function(a,g){return a===this.Tf&&g===this.cl};h.prototype.Os=function(){return!0};h.prototype.As=function(a){return this.Ye[a+1]};h.prototype.rl=function(a){return a===this.Tf};h.prototype.Gs=function(a){var g=this.b.zh();
return Ta(this.b.Qg(a,this.ae,this.be,g.pg),g.pg)};h.prototype.ql=function(a,g,b){return a!==this.Tf||g!==this.cl?!1:this.b.Qg(b,this.ae,this.be,!1)};h.prototype.kt=function(a){this.Uj=!0;return a===this.Fr};p.d=new h;var t=null;l.prototype.yt=function(a){this.b.Ca||(a="auto pointer text crosshair move help wait none".split(" ")[a],t!==a&&(t=a,document.body.style.cursor=a))};p.q=new l;f.prototype.Vi=function(a,g){var b,d,c,f,e;ga(g)?(b=this.b.Wd(0),d=b.scale,c=b.Rb,f=b.fc,e=b.e,b.scale=1,b.Rb=1,b.fc=
1,b.e=0,a.A(b.Qa(this.ae,this.be,!0)),b.scale=d,b.Rb=c,b.fc=f,b.e=e):(b=ha(g)?this.b.Wd(g):this.b.Ah(g))?a.A(b.Qa(this.ae,this.be,!0)):a.A(0)};f.prototype.Wi=function(a,g){var b,d,c,f,e;ga(g)?(b=this.b.Wd(0),d=b.scale,c=b.Rb,f=b.gc,e=b.e,b.scale=1,b.Rb=1,b.gc=1,b.e=0,a.A(b.Qa(this.ae,this.be,!1)),b.scale=d,b.Rb=c,b.gc=f,b.e=e):(b=ha(g)?this.b.Wd(g):this.b.Ah(g))?a.A(b.Qa(this.ae,this.be,!1)):a.A(0)};p.L=new f})();function xc(h){this.b=h}
(function(){var h=xc.prototype;h.ca=function(h){this.ka=h;this.b=h.b};h.ca.prototype.G=function(){};h.V=function(h){this.type=h;this.b=h.b};h.V.prototype.G=function(){this.Op="undefined"!==typeof window.is_scirra_arcade};h.d=new function(){};h.q=new function(){};h.L=new function(){}})();function Z(h){this.b=h}
(function(){function h(){if(0===this.Nl.length){var a=document.createElement("canvas");a.width=this.width;a.height=this.height;var b=a.getContext("2d");this.Og?b.drawImage(this.D,this.Hg,this.Ig,this.width,this.height,0,0,this.width,this.height):b.drawImage(this.D,0,0,this.width,this.height);this.Nl=a.toDataURL("image/png")}return this.Nl}function l(){}function f(){}function p(){}var u=Z.prototype;u.ca=function(a){this.ka=a;this.b=a.b};var r=u.ca.prototype;r.G=function(){if(!this.F){var a,b,c,d,f,
g,k,l,p;this.Vc=[];this.Gh=!1;a=0;for(b=this.lc.length;a<b;a++){f=this.lc[a];k={};k.name=f[0];k.speed=f[1];k.loop=f[2];k.tn=f[3];k.un=f[4];k.Tq=f[5];k.ea=f[6];k.frames=[];c=0;for(d=f[7].length;c<d;c++)g=f[7][c],l={},l.$k=g[0],l.In=g[1],l.Hg=g[2],l.Ig=g[3],l.width=g[4],l.height=g[5],l.duration=g[6],l.Ub=g[7],l.Vb=g[8],l.qm=g[9],l.Bk=g[10],l.Uq=g[11],l.Og=0!==l.width,l.Nl="",l.mz=h,p={left:0,top:0,right:1,bottom:1},l.Cn=p,l.S=null,(p=this.b.Nv(g[0]))?l.D=p:(l.D=new Image,l.D.xu=g[0],l.D.bp=g[1],l.D.su=
null,this.b.Vn(l.D,g[0])),k.frames.push(l),this.Vc.push(l);this.lc[a]=k}}};r.Or=function(){var a,b,c;a=0;for(b=this.c.length;a<b;a++)c=this.c[a],c.vj=c.zb.S};r.sk=function(){if(!this.F){var a,b,c;a=0;for(b=this.Vc.length;a<b;++a)c=this.Vc[a],c.D.su=null,c.S=null;this.Gh=!1;this.Or()}};r.uk=function(){if(!this.F&&this.c.length){var a,b,c;a=0;for(b=this.Vc.length;a<b;++a)c=this.Vc[a],c.S=this.b.u.Bg(c.D,!1,this.b.Ga,c.Uq);this.Or()}};r.Km=function(){if(!this.F&&!this.Gh&&this.b.u){var a,b,c;a=0;for(b=
this.Vc.length;a<b;++a)c=this.Vc[a],c.S=this.b.u.Bg(c.D,!1,this.b.Ga,c.Uq);this.Gh=!0}};r.fl=function(){if(!this.F&&!this.c.length&&this.Gh){var a,b,c;a=0;for(b=this.Vc.length;a<b;++a)c=this.Vc[a],this.b.u.deleteTexture(c.S),c.S=null;this.Gh=!1}};var t=[];r.Fk=function(a){var b,c,d;G(t);b=0;for(c=this.Vc.length;b<c;++b)d=this.Vc[b].D,-1===t.indexOf(d)&&(a.drawImage(d,0,0),t.push(d))};u.V=function(a){this.type=a;this.b=a.b;a=this.type.lc[0].frames[0].Bk;this.Pc?this.qa.Bi(a):this.qa=new hb(a)};var a=
u.V.prototype;a.G=function(){this.visible=0===this.m[0];this.rm=this.Sh=!1;this.bf=0!==this.m[3];this.Ea=this.tp(this.m[1])||this.type.lc[0];this.C=this.m[2];0>this.C&&(this.C=0);this.C>=this.Ea.frames.length&&(this.C=this.Ea.frames.length-1);var a=this.Ea.frames[this.C];this.qa.Bi(a.Bk);this.Ub=a.Ub;this.Vb=a.Vb;this.df=this.Ea.speed;this.Fe=this.Ea.un;1===this.type.lc.length&&1===this.type.lc[0].frames.length||0===this.df||(this.b.Ki(this),this.Sh=!0);this.Pc?this.od.reset():this.od=new fb;this.Vd=
this.od.R;this.We=!0;this.Ld=0;this.ve=!0;this.ag=this.No="";this.Xo=0;this.Hl=-1;this.type.Km();var b,c,d,g,f,h,k,a=0;for(b=this.type.lc.length;a<b;a++)for(g=this.type.lc[a],c=0,d=g.frames.length;c<d;c++)f=g.frames[c],0===f.width&&(f.width=f.D.width,f.height=f.D.height),f.Og&&(k=f.D,h=f.Cn,h.left=f.Hg/k.width,h.top=f.Ig/k.height,h.right=(f.Hg+f.width)/k.width,h.bottom=(f.Ig+f.height)/k.height,0===f.Hg&&0===f.Ig&&f.width===k.width&&f.height===k.height&&(f.Og=!1));this.zb=this.Ea.frames[this.C];this.vj=
this.zb.S};a.xb=function(){var a={a:this.Ea.ea,f:this.C,cas:this.df,fs:this.Vd,ar:this.Ld,at:this.od.R,rt:this.Fe};this.We||(a.ap=this.We);this.ve||(a.af=this.ve);return a};a.Ob=function(a){var b=this.Sv(a.a);b&&(this.Ea=b);this.C=a.f;0>this.C&&(this.C=0);this.C>=this.Ea.frames.length&&(this.C=this.Ea.frames.length-1);this.df=a.cas;this.Vd=a.fs;this.Ld=a.ar;this.od.reset();this.od.R=a.at;this.We=a.hasOwnProperty("ap")?a.ap:!0;this.ve=a.hasOwnProperty("af")?a.af:!0;a.hasOwnProperty("rt")?this.Fe=a.rt:
this.Fe=this.Ea.un;this.zb=this.Ea.frames[this.C];this.vj=this.zb.S;this.qa.Bi(this.zb.Bk);this.Ub=this.zb.Ub;this.Vb=this.zb.Vb};a.zl=function(a){this.C=a?0:this.Ea.frames.length-1;this.We=!1;this.No=this.Ea.name;this.rm=!0;this.b.trigger(Z.prototype.d.eo,this);this.b.trigger(Z.prototype.d.Ns,this);this.rm=!1;this.Ld=0};a.pd=function(){return this.od.R};a.ab=function(){this.od.add(this.b.kg(this));this.ag.length&&this.gp();0<=this.Hl&&this.Fu();var a=this.od.R,b=this.Ea,c=b.frames[this.C],d=c.duration/
this.df;this.We&&a>=this.Vd+d&&(this.ve?this.C++:this.C--,this.Vd+=d,this.C>=b.frames.length&&(b.Tq?(this.ve=!1,this.C=b.frames.length-2):b.loop?this.C=this.Fe:(this.Ld++,this.Ld>=b.tn?this.zl(!1):this.C=this.Fe)),0>this.C&&(b.Tq?(this.C=1,this.ve=!0,b.loop||(this.Ld++,this.Ld>=b.tn&&this.zl(!0))):b.loop?this.C=this.Fe:(this.Ld++,this.Ld>=b.tn?this.zl(!0):this.C=this.Fe)),0>this.C?this.C=0:this.C>=b.frames.length&&(this.C=b.frames.length-1),a>this.Vd+b.frames[this.C].duration/this.df&&(this.Vd=a),
a=b.frames[this.C],this.Xf(c,a),this.b.U=!0)};a.tp=function(a){var b,c,d;b=0;for(c=this.type.lc.length;b<c;b++)if(d=this.type.lc[b],ob(d.name,a))return d;return null};a.Sv=function(a){var b,c,d;b=0;for(c=this.type.lc.length;b<c;b++)if(d=this.type.lc[b],d.ea===a)return d;return null};a.gp=function(){var a=this.Ea.frames[this.C],b=this.tp(this.ag);this.ag="";!b||ob(b.name,this.Ea.name)&&this.We||(this.Ea=b,this.df=b.speed,this.Fe=b.un,0>this.C&&(this.C=0),this.C>=this.Ea.frames.length&&(this.C=this.Ea.frames.length-
1),1===this.Xo&&(this.C=0),this.We=!0,this.Vd=this.od.R,this.ve=!0,this.Xf(a,this.Ea.frames[this.C]),this.b.U=!0)};a.Fu=function(){var a=this.Ea.frames[this.C],b=this.C;this.C=pa(this.Hl);0>this.C&&(this.C=0);this.C>=this.Ea.frames.length&&(this.C=this.Ea.frames.length-1);b!==this.C&&(this.Xf(a,this.Ea.frames[this.C]),this.Vd=this.od.R,this.b.U=!0);this.Hl=-1};a.Xf=function(a,b){var c=a.width,d=a.height,f=b.width,g=b.height;c!=f&&(this.width*=f/c);d!=g&&(this.height*=g/d);this.Ub=b.Ub;this.Vb=b.Vb;
this.qa.Bi(b.Bk);this.xa();this.zb=b;this.vj=b.S;c=0;for(d=this.N.length;c<d;c++)f=this.N[c],f.Hq&&f.Hq(a,b);this.b.trigger(Z.prototype.d.Xf,this)};a.rd=function(a){a.globalAlpha=this.opacity;var b=this.zb,c=b.Og,d=b.D,f=this.x,g=this.y,h=this.width,k=this.height;if(0===this.e&&0<=h&&0<=k)f-=this.Ub*h,g-=this.Vb*k,this.b.bd&&(f=Math.round(f),g=Math.round(g)),c?a.drawImage(d,b.Hg,b.Ig,b.width,b.height,f,g,h,k):a.drawImage(d,f,g,h,k);else{this.b.bd&&(f=Math.round(f),g=Math.round(g));a.save();var l=
0<h?1:-1,p=0<k?1:-1;a.translate(f,g);1===l&&1===p||a.scale(l,p);a.rotate(this.e*l*p);f=0-this.Ub*ka(h);g=0-this.Vb*ka(k);c?a.drawImage(d,b.Hg,b.Ig,b.width,b.height,f,g,ka(h),ka(k)):a.drawImage(d,f,g,ka(h),ka(k));a.restore()}};a.ff=function(a){this.ac(a)};a.ac=function(a){a.tc(this.vj);a.Of(this.opacity);var b=this.zb,c=this.mc;if(this.b.bd){var d=Math.round(this.x)-this.x,f=Math.round(this.y)-this.y;b.Og?a.Bd(c.Oa+d,c.Pa+f,c.pb+d,c.qb+f,c.eb+d,c.fb+f,c.bb+d,c.cb+f,b.Cn):a.si(c.Oa+d,c.Pa+f,c.pb+d,
c.qb+f,c.eb+d,c.fb+f,c.bb+d,c.cb+f)}else b.Og?a.Bd(c.Oa,c.Pa,c.pb,c.qb,c.eb,c.fb,c.bb,c.cb,b.Cn):a.si(c.Oa,c.Pa,c.pb,c.qb,c.eb,c.fb,c.bb,c.cb)};a.Zv=function(a){var b=this.zb,c,d;c=0;for(d=b.qm.length;c<d;c++)if(ob(a,b.qm[c][0]))return c;return-1};a.qf=function(a,b){var c=this.zb,d=c.qm,f;A(a)?f=this.Zv(a):f=a-1;f=pa(f);if(0>f||f>=d.length)return b?this.x:this.y;var g=(d[f][1]-c.Ub)*this.width,d=d[f][2],d=(d-c.Vb)*this.height,c=Math.cos(this.e);f=Math.sin(this.e);var h=g*c-d*f,d=d*c+g*f,g=h+this.x,
d=d+this.y;return b?g:d};var g=null,b=new ca,d=!1,c=[],k=new ta(0,0,0,0);r.finish=function(a){if(d){if(a){var c=this.b.Wa().hb.Dc;a=g.Y();var f=b.Te(),h,k;if(a.da){a.da=!1;G(a.c);h=0;for(k=f.length;h<k;++h)a.c[h]=f[h];if(c)for(G(a.W),h=0,k=g.c.length;h<k;++h)f=g.c[h],b.contains(f)||a.W.push(f)}else if(c)for(c=a.c.length,h=0,k=f.length;h<k;++h)a.c[c+h]=f[h],Ea(a.W,f[h]);else Aa(a.c,f);g.Md()}b.clear();d=!1}};l.prototype.Hs=function(a){if(a){var f=!1,h,l,m,p=this.b.zh(),r=p.type,p=p.pg;h=a.Y();l=this.b.Wa().hb.Dc;
var u;h.da?(this.la(),k.dg(this.Aa),k.offset(0,0),this.b.Uv(this.j,a,k,c),u=c):u=l?this.b.Kw()&&!h.W.length&&h.c.length?h.c:h.W:h.c;g=a;d=r!==a&&!p;h=0;for(l=u.length;h<l;h++)if(m=u[h],this.b.jy(this,m)){f=!0;if(p)break;r!==a&&b.add(m)}G(c);a=f}else a=!1;return a};l.prototype.xs=function(a){return this.ag.length?ob(this.ag,a):ob(this.Ea.name,a)};l.prototype.cs=function(a,b){return fc(this.C,a,b)};l.prototype.Ns=function(a){return ob(this.No,a)};l.prototype.eo=function(){return!0};l.prototype.Xf=function(){return!0};
u.d=new l;f.prototype.Ot=function(a,b,c){if(a&&b&&(b=this.b.tj(a,b,this.qf(c,!0),this.qf(c,!1)))){"undefined"!==typeof b.e&&(b.e=this.e,b.xa());this.b.Bc++;var d,f,g;this.b.trigger(Object.getPrototypeOf(a.ka).d.Ue,b);if(b.Nb)for(d=0,f=b.siblings.length;d<f;d++)g=b.siblings[d],this.b.trigger(Object.getPrototypeOf(g.type.ka).d.Ue,g);this.b.Bc--;d=this.b.Vv();c=!1;if(ga(d.X.Spawn_LastExec)||d.X.Spawn_LastExec<this.b.nf)c=!0,d.X.Spawn_LastExec=this.b.nf;if(a!=this.type&&(a=a.Y(),a.da=!1,c?(G(a.c),a.c[0]=
b):a.c.push(b),b.Nb))for(d=0,f=b.siblings.length;d<f;d++)g=b.siblings[d],a=g.type.Y(),a.da=!1,c?(G(a.c),a.c[0]=g):a.c.push(g)}};f.prototype.tt=function(a,b){this.ag=a;this.Xo=b;this.Sh||(this.b.Ki(this),this.Sh=!0);this.rm||this.gp()};f.prototype.ut=function(a){this.df=ka(a);this.ve=0<=a;this.Sh||(this.b.Ki(this),this.Sh=!0)};f.prototype.Et=function(a){a=ka(this.width)*(0===a?-1:1);this.width!==a&&(this.width=a,this.xa())};u.q=new f;p.prototype.vs=function(a,b){a.A(this.qf(b,!0))};p.prototype.ws=
function(a,b){a.A(this.qf(b,!1))};u.L=new p})();function yc(h){this.b=h}
(function(){function h(a,b){return a.length?a.pop():new b}function l(a,b,c){if(c){var d;c=0;for(d=b.length;c<d;c++)a.length<t&&a.push(b[c]);G(b)}else for(d in b)Object.prototype.hasOwnProperty.call(b,d)&&(a.length<t&&a.push(b[d]),delete b[d])}function f(b,c,d){var f=b.Ef;d=d.replace(/\s\s*$/,"");c>=f.length&&f.push(h(a,Object));c=f[c];c.text=d;c.width=b.Sm(d);b.Sg=la(b.Sg,c.width)}function p(){}var u=yc.prototype;u.G=function(){};u.ca=function(a){this.ka=a;this.b=a.b};var r=u.ca.prototype;r.G=function(){this.F||
(this.D=new Image,this.b.Vn(this.D,this.$k),this.S=null)};r.sk=function(){this.F||(this.S=null)};r.uk=function(){if(!this.F&&this.c.length){this.S||(this.S=this.b.u.Bg(this.D,!1,this.b.Ga,this.Ji));var a,b;a=0;for(b=this.c.length;a<b;a++)this.c[a].S=this.S}};r.fl=function(){this.F||this.c.length||!this.S||(this.b.u.deleteTexture(this.S),this.S=null)};r.Fk=function(a){a.drawImage(this.D,0,0)};u.V=function(a){this.type=a;this.b=a.b};r=u.V.prototype;r.Kf=function(){l(a,this.Ef,!0);l(g,this.oj,!1);l(b,
this.pj,!1);ab(this.Be)};r.G=function(){this.D=this.type.D;this.nj=this.m[0];this.ze=this.m[1];this.characterSet=this.m[2];this.text=this.m[3];this.Ae=this.m[4];this.visible=0===this.m[5];this.Tj=this.m[6]/2;this.jl=this.m[7]/2;this.zy=0===this.m[9];this.bg=this.m[10];this.lineHeight=this.m[11];this.Sf=this.Sg=0;this.Pc?(G(this.Ef),ab(this.oj),ab(this.pj),ab(this.Be)):(this.Ef=[],this.oj={},this.pj={},this.Be={});this.Ii=!0;this.Hm=this.width;this.b.u&&(this.type.S||(this.type.S=this.b.u.Bg(this.type.D,
!1,this.b.Ga,this.type.Ji)),this.S=this.type.S);this.Pt()};r.xb=function(){var a={t:this.text,csc:this.Ae,csp:this.bg,lh:this.lineHeight,tw:this.Sg,th:this.Sf,lrt:this.Vw,ha:this.Tj,va:this.jl,cw:{}},b;for(b in this.Be)a.cw[b]=this.Be[b];return a};r.Ob=function(a){this.text=a.t;this.Ae=a.csc;this.bg=a.csp;this.lineHeight=a.lh;this.Sg=a.tw;this.Sf=a.th;this.Vw=a.lrt;a.hasOwnProperty("ha")&&(this.Tj=a.ha);a.hasOwnProperty("va")&&(this.jl=a.va);for(var b in a.cw)this.Be[b]=a.cw[b];this.Ii=!0;this.Hm=
this.width};var t=1E3,a=[],g=[],b=[];r.Pt=function(){for(var a=this.D,c=a.width,d=a.height,a=this.nj,f=this.ze,l=a/c,m=f/d,p=this.characterSet,c=Math.floor(c/a),d=Math.floor(d/f),r=0;r<p.length&&!(r>=c*d);r++){var u=r%c,t=Math.floor(r/c),J=p.charAt(r);if(this.b.u){var y=this.pj,Q=u*l,O=t*m,u=(u+1)*l,t=(t+1)*m;void 0===y[J]&&(y[J]=h(b,ta));y[J].left=Q;y[J].top=O;y[J].right=u;y[J].bottom=t}else y=this.oj,u=u*a,t=t*f,Q=a,O=f,void 0===y[J]&&(y[J]=h(g,Object)),y[J].x=u,y[J].y=t,y[J].Tr=Q,y[J].Ap=O}};var d=
[];u.Ut=function(a){G(d);for(var b="",c,f=0;f<a.length;)if(c=a.charAt(f),"\n"===c)b.length&&(d.push(b),b=""),d.push("\n"),++f;else if(" "===c||"\t"===c||"-"===c){do b+=a.charAt(f),f++;while(f<a.length&&(" "===a.charAt(f)||"\t"===a.charAt(f)));d.push(b);b=""}else f<a.length&&(b+=c,f++);b.length&&d.push(b)};u.Yt=function(b){var c=b.text,d=b.Ef;if(c&&c.length){var f=b.width;if(2>=f)l(a,d,!0);else{var g=b.Ae,m=b.bg;if(c.length*(b.nj*g+m)-m<=f&&-1===c.indexOf("\n")&&(m=b.Sm(c),m<=f)){l(a,d,!0);d.push(h(a,
Object));d[0].text=c;d[0].width=m;b.Sg=m;b.Sf=b.ze*g+b.lineHeight;return}this.Zt(b);b.Sf=d.length*(b.ze*g+b.lineHeight)}}else l(a,d,!0)};u.Zt=function(b){var c=b.zy,g=b.text,h=b.Ef,l=b.width;c&&(this.Ut(g),g=d);var m="",p,r,u,L=0,J=!1;for(u=0;u<g.length;u++)"\n"===g[u]?(!0===J?J=!1:(f(b,L,m),L++),m=""):(J=!1,p=m,m+=g[u],r=b.Sm(m.replace(/\s\s*$/,"")),r>l&&(""===p?(f(b,L,m),m="",J=!0):(f(b,L,p),m=g[u]),L++,c||" "!==m||(m="")));m.replace(/\s\s*$/,"").length&&(f(b,L,m),L++);for(u=L;u<h.length;u++)a.length<
t&&a.push(h[u]);h.length=L};r.Sm=function(a){for(var b=this.bg,c=a.length,d=0,f=0;f<c;f++)d+=this.dm(a.charAt(f))*this.Ae+b;return d-(0<d?b:0)};r.dm=function(a){var b=this.Be;return void 0!==b[a]?b[a]:this.nj};r.$q=function(){if(this.Ii||this.width!==this.Hm)this.Sf=this.Sg=0,this.type.ka.Yt(this),this.Ii=!1,this.Hm=this.width};r.rd=function(a){var b=this.D;if(""!==this.text&&null!=b&&(this.$q(),!(this.height<this.ze*this.Ae+this.lineHeight))){a.globalAlpha=this.opacity;var b=this.x,c=this.y;this.b.bd&&
(b=Math.round(b),c=Math.round(c));var d=this.j.ua,f=this.j.wa,g=this.j.za,h=this.j.ya;a.save();a.translate(b,c);a.rotate(this.e);for(var l=this.e,p=this.Tj,r=this.Ae,u=this.ze*r,t=this.lineHeight,Q=this.bg,O=this.Ef,z,S=-(this.Ub*this.width),K=-(this.Vb*this.height),K=K+this.jl*la(0,this.height-this.Sf),P,F,x,V=0;V<O.length;V++){var B=O[V].text;z=p*la(0,this.width-O[V].width);P=S+z;K+=t;if(0===l&&c+K+u<f)K+=u;else{for(var D=0;D<B.length;D++){F=B.charAt(D);z=this.dm(F);var E=this.oj[F];if(0===l&&b+
P+z*r+Q<d)P+=z*r+Q;else{if(P+z*r>this.width+1E-5)break;void 0!==E&&(F=P,x=K,0===l&&(F=Math.round(F),x=Math.round(x)),a.drawImage(this.D,E.x,E.y,E.Tr,E.Ap,F,x,E.Tr*r,E.Ap*r));P+=z*r+Q;if(0===l&&b+P>g)break}}K+=u;if(0===l&&(K+u+t>this.height||c+K>h))break}}a.restore()}};var c=new ua;r.ac=function(a){a.tc(this.S);a.Of(this.opacity);if(this.text&&(this.$q(),!(this.height<this.ze*this.Ae+this.lineHeight))){this.la();var b=this.mc,d=0,f=0;this.b.bd&&(d=Math.round(this.x)-this.x,f=Math.round(this.y)-this.y);
var g=this.j.ua,h=this.j.wa,l=this.j.za,p=this.j.ya,r=this.e,u=this.Tj,t=this.jl,y=this.Ae,Q=this.ze*y,O=this.lineHeight,z=this.bg,S=this.Ef,K=this.Sf,P,F,x;0!==r&&(F=Math.cos(r),x=Math.sin(r));for(var d=b.Oa+d,b=b.Pa+f,V,t=t*la(0,this.height-K),B,D,K=0;K<S.length;K++)if(f=S[K].text,V=P=u*la(0,this.width-S[K].width),t+=O,0===r&&b+t+Q<h)t+=Q;else{for(var E=0;E<f.length;E++){var R=f.charAt(E);P=this.dm(R);R=this.pj[R];if(0===r&&d+V+P*y+z<g)V+=P*y+z;else{if(V+P*y>this.width+1E-5)break;if(void 0!==R){var N=
this.nj*y,C=this.ze*y;B=V;D=t;0===r&&(B=Math.round(B),D=Math.round(D));c.Oa=B;c.Pa=D;c.pb=B+N;c.qb=D;c.bb=B;c.cb=D+C;c.eb=B+N;c.fb=D+C;0!==r&&(B=c,D=F,N=x,C=void 0,C=B.Oa*D-B.Pa*N,B.Pa=B.Pa*D+B.Oa*N,B.Oa=C,C=B.pb*D-B.qb*N,B.qb=B.qb*D+B.pb*N,B.pb=C,C=B.bb*D-B.cb*N,B.cb=B.cb*D+B.bb*N,B.bb=C,C=B.eb*D-B.fb*N,B.fb=B.fb*D+B.eb*N,B.eb=C);c.offset(d,b);a.Bd(c.Oa,c.Pa,c.pb,c.qb,c.eb,c.fb,c.bb,c.cb,R)}V+=P*y+z;if(0===r&&d+V>l)break}}t+=Q;if(0===r&&(t+Q+O>this.height||b+t>p))break}}};u.d=new function(){};p.prototype.Jt=
function(a){ha(a)&&1E9>a&&(a=Math.round(1E10*a)/1E10);a=a.toString();this.text!==a&&(this.text=a,this.Ii=!0,this.b.U=!0)};r.pd=function(a,b){var c=parseInt(b,10);this.Be[a]!==c&&(this.Be[a]=c,this.Ii=!0,this.b.U=!0)};u.q=new p;u.L=new function(){}})();function zc(h){this.b=h}
(function(){var h=zc.prototype;h.ca=function(f){this.ka=f;this.b=f.b};var l=h.ca.prototype;l.G=function(){this.F||(this.D=new Image,this.D.bp=this.In,this.b.Vn(this.D,this.$k),this.S=this.pattern=null)};l.sk=function(){this.F||(this.S=null)};l.uk=function(){if(!this.F&&this.c.length){this.S||(this.S=this.b.u.Bg(this.D,!0,this.b.Ga,this.Ji));var f,h;f=0;for(h=this.c.length;f<h;f++)this.c[f].S=this.S}};l.Km=function(){this.F||this.S||!this.b.u||(this.S=this.b.u.Bg(this.D,!0,this.b.Ga,this.Ji))};l.fl=
function(){this.F||this.c.length||!this.S||(this.b.u.deleteTexture(this.S),this.S=null)};l.Fk=function(f){f.drawImage(this.D,0,0)};h.V=function(f){this.type=f;this.b=f.b};l=h.V.prototype;l.G=function(){this.visible=0===this.m[0];this.vi=new ta(0,0,0,0);this.Dp=!1;this.D=this.type.D;this.b.u?(this.type.Km(),this.S=this.type.S):(this.type.pattern||(this.type.pattern=this.b.Ha.createPattern(this.type.D,"repeat")),this.pattern=this.type.pattern)};l.Kd=function(){this.Dp=!1;this.D=this.type.D};l.Kf=function(){this.b.u&&
this.Dp&&this.S&&(this.b.u.deleteTexture(this.S),this.S=null)};l.rd=function(f){f.globalAlpha=this.opacity;f.save();f.fillStyle=this.pattern;var h=this.x,l=this.y;this.b.bd&&(h=Math.round(h),l=Math.round(l));var r=-(this.Ub*this.width),t=-(this.Vb*this.height),a=r%this.D.width,g=t%this.D.height;0>a&&(a+=this.D.width);0>g&&(g+=this.D.height);f.translate(h,l);f.rotate(this.e);f.translate(a,g);f.fillRect(r-a,t-g,this.width,this.height);f.restore()};l.ff=function(f){this.ac(f)};l.ac=function(f){f.tc(this.S);
f.Of(this.opacity);var h=this.vi;h.right=this.width/this.D.width;h.bottom=this.height/this.D.height;var l=this.mc;if(this.b.bd){var r=Math.round(this.x)-this.x,t=Math.round(this.y)-this.y;f.Bd(l.Oa+r,l.Pa+t,l.pb+r,l.qb+t,l.eb+r,l.fb+t,l.bb+r,l.cb+t,h)}else f.Bd(l.Oa,l.Pa,l.pb,l.qb,l.eb,l.fb,l.bb,l.cb,h)};h.d=new function(){};h.q=new function(){};h.L=new function(){}})();function Ac(h){this.b=h}
(function(){function h(a){g=a.x;b=a.y;d=a.z}function l(a,b,d,e){var g;g=c.length?c.pop():new f;g.init(a,b,d,e);return g}function f(){this.Ei=this.id=this.y=this.x=this.Xk=this.Wk=this.Gm=this.time=this.Gn=0;this.Mi=this.dl=!1}function p(){}function u(){}var r=Ac.prototype;r.ca=function(a){this.ka=a;this.b=a.b};r.ca.prototype.G=function(){};r.V=function(a){this.type=a;this.b=a.b;this.touches=[];this.Um=!1};var t=r.V.prototype,a={left:0,top:0};t.yh=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 g=0,b=0,d=0,c=[];f.prototype.init=function(a,b,c,d){var e=bb();this.Gn=this.Gm=this.time=e;this.Wk=a;this.Xk=b;this.x=a;this.y=b;this.pressure=this.height=this.width=0;this.id=c;this.Ei=d;this.Mi=this.dl=!1};f.prototype.update=function(a,b,c,d,e,f){this.Gm=this.time;this.time=a;this.x=b;this.y=c;this.width=d;this.height=e;this.pressure=f;!this.Mi&&15<=Sa(this.Wk,this.Xk,this.x,this.y)&&(this.Mi=!0)};f.prototype.ax=function(a,b){!this.dl&&500<=
bb()-this.Gn&&!this.Mi&&15>Sa(this.Wk,this.Xk,this.x,this.y)&&(this.dl=!0,a.Id=this.Ei,a.Vg=this.id,a.lg=b,a.b.trigger(Ac.prototype.d.Ws,a),a.Qd=this.x,a.Rd=this.y,a.b.trigger(Ac.prototype.d.Xs,a),a.lg=0)};var k=-1E3,e=-1E3,n=-1E4;f.prototype.qq=function(a,b){if(!this.dl){var c=bb();333>=c-this.Gn&&!this.Mi&&15>Sa(this.Wk,this.Xk,this.x,this.y)&&(a.Id=this.Ei,a.Vg=this.id,a.lg=b,666>=c-n&&25>Sa(k,e,this.x,this.y)?(a.b.trigger(Ac.prototype.d.Ss,a),a.Qd=this.x,a.Rd=this.y,a.b.trigger(Ac.prototype.d.Ts,
a),e=k=-1E3,n=-1E4):(a.b.trigger(Ac.prototype.d.ht,a),a.Qd=this.x,a.Rd=this.y,a.b.trigger(Ac.prototype.d.it,a),k=this.x,e=this.y,n=c),a.lg=0)}};t.G=function(){this.Rw=!("undefined"===typeof window.c2isWindows8||!window.c2isWindows8);this.lg=this.Vg=this.Id=this.Rd=this.Qd=this.Go=this.Fo=this.Eo=this.fu=this.eu=this.du=this.yk=this.xk=this.wk=0;this.uy=0!==this.m[0];var a=0<this.b.Sb?document:this.b.canvas,b=document;this.b.Mb?b=a=window.Canvas:this.b.Ac&&(b=a=window);var c=this;window.navigator.pointerEnabled?
(a.addEventListener("pointerdown",function(a){c.Gq(a)},!1),a.addEventListener("pointermove",function(a){c.Fq(a)},!1),b.addEventListener("pointerup",function(a){c.tk(a,!1)},!1),b.addEventListener("pointercancel",function(a){c.tk(a,!0)},!1),this.b.canvas&&(this.b.canvas.addEventListener("MSGestureHold",function(a){a.preventDefault()},!1),document.addEventListener("MSGestureHold",function(a){a.preventDefault()},!1),this.b.canvas.addEventListener("gesturehold",function(a){a.preventDefault()},!1),document.addEventListener("gesturehold",
function(a){a.preventDefault()},!1))):window.navigator.msPointerEnabled?(a.addEventListener("MSPointerDown",function(a){c.Gq(a)},!1),a.addEventListener("MSPointerMove",function(a){c.Fq(a)},!1),b.addEventListener("MSPointerUp",function(a){c.tk(a,!1)},!1),b.addEventListener("MSPointerCancel",function(a){c.tk(a,!0)},!1),this.b.canvas&&(this.b.canvas.addEventListener("MSGestureHold",function(a){a.preventDefault()},!1),document.addEventListener("MSGestureHold",function(a){a.preventDefault()},!1))):(a.addEventListener("touchstart",
function(a){c.Jq(a)},!1),a.addEventListener("touchmove",function(a){c.Iq(a)},!1),b.addEventListener("touchend",function(a){c.cn(a,!1)},!1),b.addEventListener("touchcancel",function(a){c.cn(a,!0)},!1));if(this.Rw){var d=function(a){a=a.reading;c.Eo=a.accelerationX;c.Fo=a.accelerationY;c.Go=a.accelerationZ},e=function(a){a=a.reading;c.wk=a.yawDegrees;c.xk=a.pitchDegrees;c.yk=a.rollDegrees},f=Windows.Devices.Sensors.Accelerometer.getDefault();f&&(f.reportInterval=Math.max(f.minimumReportInterval,16),
f.addEventListener("readingchanged",d));var g=Windows.Devices.Sensors.Inclinometer.getDefault();g&&(g.reportInterval=Math.max(g.minimumReportInterval,16),g.addEventListener("readingchanged",e));document.addEventListener("visibilitychange",function(){document.hidden||document.msHidden?(f&&f.removeEventListener("readingchanged",d),g&&g.removeEventListener("readingchanged",e)):(f&&f.addEventListener("readingchanged",d),g&&g.addEventListener("readingchanged",e))},!1)}else window.addEventListener("deviceorientation",
function(a){c.wk=a.alpha||0;c.xk=a.beta||0;c.yk=a.gamma||0},!1),window.addEventListener("devicemotion",function(a){a.accelerationIncludingGravity&&(c.du=a.accelerationIncludingGravity.x||0,c.eu=a.accelerationIncludingGravity.y||0,c.fu=a.accelerationIncludingGravity.z||0);a.acceleration&&(c.Eo=a.acceleration.x||0,c.Fo=a.acceleration.y||0,c.Go=a.acceleration.z||0)},!1);this.uy&&!this.b.Ca&&(jQuery(document).mousemove(function(a){c.an(a)}),jQuery(document).mousedown(function(a){c.$m(a)}),jQuery(document).mouseup(function(a){c.bn(a)}));
!this.b.zf&&this.b.cc&&navigator.accelerometer&&navigator.accelerometer.watchAcceleration&&navigator.accelerometer.watchAcceleration(h,null,{frequency:40});this.b.ky(this)};t.Fq=function(b){if(b.pointerType!==b.MSPOINTER_TYPE_MOUSE&&"mouse"!==b.pointerType){b.preventDefault&&b.preventDefault();var c=this.yh(b.pointerId),d=bb();if(0<=c){var e=this.b.Ca?a:jQuery(this.b.canvas).offset(),c=this.touches[c];2>d-c.time||c.update(d,b.pageX-e.left,b.pageY-e.top,b.width||0,b.height||0,b.pressure||0)}}};t.Gq=
function(b){if(b.pointerType!==b.MSPOINTER_TYPE_MOUSE&&"mouse"!==b.pointerType){b.preventDefault&&pb(b)&&b.preventDefault();var c=this.b.Ca?a:jQuery(this.b.canvas).offset(),d=b.pageX-c.left,c=b.pageY-c.top;bb();this.Id=this.touches.length;this.Vg=b.pointerId;this.touches.push(l(d,c,b.pointerId,this.Id));this.b.Ra=!0;this.b.trigger(Ac.prototype.d.uo,this);this.b.trigger(Ac.prototype.d.yo,this);this.Qd=d;this.Rd=c;this.b.trigger(Ac.prototype.d.xo,this);this.b.Ra=!1}};t.tk=function(a,b){if(a.pointerType!==
a.MSPOINTER_TYPE_MOUSE&&"mouse"!==a.pointerType){a.preventDefault&&pb(a)&&a.preventDefault();var d=this.yh(a.pointerId);this.Id=0<=d?this.touches[d].Ei:-1;this.Vg=0<=d?this.touches[d].id:-1;this.b.Ra=!0;this.b.trigger(Ac.prototype.d.to,this);this.b.trigger(Ac.prototype.d.wo,this);0<=d&&(b||this.touches[d].qq(this,d),100>c.length&&c.push(this.touches[d]),this.touches.splice(d,1));this.b.Ra=!1}};t.Iq=function(b){b.preventDefault&&b.preventDefault();var c=bb(),d,e,f,g;d=0;for(e=b.changedTouches.length;d<
e;d++)if(f=b.changedTouches[d],g=this.yh(f.identifier),0<=g){var h=this.b.Ca?a:jQuery(this.b.canvas).offset();g=this.touches[g];2>c-g.time||g.update(c,f.pageX-h.left,f.pageY-h.top,2*(f.zz||f.Hz||f.qz||f.uz||0),2*(f.Az||f.Iz||f.rz||f.vz||0),f.kz||f.Gz||f.pz||f.sz||0)}};t.Jq=function(b){b.preventDefault&&pb(b)&&b.preventDefault();var c=this.b.Ca?a:jQuery(this.b.canvas).offset();bb();this.b.Ra=!0;var d,e,f,g;d=0;for(e=b.changedTouches.length;d<e;d++)if(f=b.changedTouches[d],g=this.yh(f.identifier),-1===
g){g=f.pageX-c.left;var h=f.pageY-c.top;this.Id=this.touches.length;this.Vg=f.identifier;this.touches.push(l(g,h,f.identifier,this.Id));this.b.trigger(Ac.prototype.d.uo,this);this.b.trigger(Ac.prototype.d.yo,this);this.Qd=g;this.Rd=h;this.b.trigger(Ac.prototype.d.xo,this)}this.b.Ra=!1};t.cn=function(a,b){a.preventDefault&&pb(a)&&a.preventDefault();this.b.Ra=!0;var d,e,f;d=0;for(e=a.changedTouches.length;d<e;d++)f=a.changedTouches[d],f=this.yh(f.identifier),0<=f&&(this.Id=this.touches[f].Ei,this.Vg=
this.touches[f].id,this.b.trigger(Ac.prototype.d.to,this),this.b.trigger(Ac.prototype.d.wo,this),b||this.touches[f].qq(this,f),100>c.length&&c.push(this.touches[f]),this.touches.splice(f,1));this.b.Ra=!1};t.pd=function(){return this.b.cc&&0===this.wk&&0!==d?90*d:this.wk};t.rh=function(){return this.b.cc&&0===this.xk&&0!==b?90*b:this.xk};t.Dj=function(){return this.b.cc&&0===this.yk&&0!==g?90*g:this.yk};t.$m=function(a){this.Jq({changedTouches:[{pageX:a.pageX,pageY:a.pageY,identifier:0}]});this.Um=
!0};t.an=function(a){this.Um&&this.Iq({changedTouches:[{pageX:a.pageX,pageY:a.pageY,identifier:0}]})};t.bn=function(a){a.preventDefault&&this.b.Sj&&!this.b.wf&&a.preventDefault();this.b.Sj=!0;this.cn({changedTouches:[{pageX:a.pageX,pageY:a.pageY,identifier:0}]});this.Um=!1};t.Jn=function(){var a,b,c,d=bb();a=0;for(b=this.touches.length;a<b;++a)c=this.touches[a],c.time<=d-50&&(c.Gm=d),c.ax(this,a)};p.prototype.yo=function(){return!0};p.prototype.wo=function(){return!0};p.prototype.xo=function(a){return a?
this.b.Qg(a,this.Qd,this.Rd,!1):!1};var q=[];p.prototype.Js=function(a){if(!a)return!1;var b=a.Y(),c=b.yc(),d,e,f,g,h,k;f=0;for(g=c.length;f<g;f++){var l=c[f];l.la();h=0;for(k=this.touches.length;h<k;h++)if(e=this.touches[h],d=l.j.Qa(e.x,e.y,!0),e=l.j.Qa(e.x,e.y,!1),l.Jb(d,e)){q.push(l);break}}return q.length?(b.da=!1,Aa(b.c,q),a.Md(),G(q),!0):!1};p.prototype.uo=function(a){a=Math.floor(a);return a===this.Id};p.prototype.to=function(a){a=Math.floor(a);return a===this.Id};p.prototype.Ws=function(){return!0};
p.prototype.ht=function(){return!0};p.prototype.Ss=function(){return!0};p.prototype.Xs=function(a){return a?this.b.Qg(a,this.Qd,this.Rd,!1):!1};p.prototype.it=function(a){return a?this.b.Qg(a,this.Qd,this.Rd,!1):!1};p.prototype.Ts=function(a){return a?this.b.Qg(a,this.Qd,this.Rd,!1):!1};r.d=new p;u.prototype.Vi=function(a,b){var c=this.lg;if(0>c||c>=this.touches.length)a.A(0);else{var d,e,f,g,h;ga(b)?(d=this.b.Wd(0),e=d.scale,f=d.Rb,g=d.fc,h=d.e,d.scale=1,d.Rb=1,d.fc=1,d.e=0,a.A(d.Qa(this.touches[c].x,
this.touches[c].y,!0)),d.scale=e,d.Rb=f,d.fc=g,d.e=h):(d=ha(b)?this.b.Wd(b):this.b.Ah(b))?a.A(d.Qa(this.touches[c].x,this.touches[c].y,!0)):a.A(0)}};u.prototype.Wi=function(a,b){var c=this.lg;if(0>c||c>=this.touches.length)a.A(0);else{var d,e,f,g,h;ga(b)?(d=this.b.Wd(0),e=d.scale,f=d.Rb,g=d.gc,h=d.e,d.scale=1,d.Rb=1,d.gc=1,d.e=0,a.A(d.Qa(this.touches[c].x,this.touches[c].y,!1)),d.scale=e,d.Rb=f,d.gc=g,d.e=h):(d=ha(b)?this.b.Wd(b):this.b.Ah(b))?a.A(d.Qa(this.touches[c].x,this.touches[c].y,!1)):a.A(0)}};
r.L=new u})();function Cc(h){this.b=h}
(function(){function h(){}var l=Cc.prototype;l.ca=function(f){this.ka=f;this.b=f.b};l.ca.prototype.G=function(){};l.V=function(f){this.type=f;this.b=f.b};l.V.prototype.G=function(){if(window.admob){this.md=window.admob;this.md.setLicenseKey&&this.md.setLicenseKey("support@scirra.com","2ba99d4ff8c219cf7331c88fb3344f80");var f=0!==this.m[0],h=0!==this.m[1];this.mu=this.m[2];this.nu=this.m[3];this.Gw=this.m[4];this.Hw=this.m[5];this.xy=this.m[6];this.yy=this.m[7];this.b.Kh?(this.ej=this.mu,this.Wj=this.nu):
this.b.zf?(this.ej=this.Gw,this.Wj=this.Hw):this.b.yf||this.b.ak?(this.ej=this.xy,this.Wj=this.yy):this.Wj=this.ej="";this.Zj=!1;this.md.setUp(this.ej,this.Wj,f,h);var l=this;this.md.onFullScreenAdLoaded=function(){l.b.trigger(Cc.prototype.d.lo,l)};this.md.onInterstitialAdLoaded=function(){l.b.trigger(Cc.prototype.d.lo,l)};this.md.onFullScreenAdShown=function(){l.Zj=!0;l.b.trigger(Cc.prototype.d.ko,l)};this.md.onInterstitialAdShown=function(){l.Zj=!0;l.b.trigger(Cc.prototype.d.ko,l)};this.md.onFullScreenAdClosed=
function(){l.Zj=!1;l.b.trigger(Cc.prototype.d.jo,l)};this.md.onInterstitialAdHidden=function(){l.Zj=!1;l.b.trigger(Cc.prototype.d.jo,l)};this.md.onBannerAdPreloaded=function(){l.b.trigger(Cc.prototype.d.Qs,l)}}else ea("[Construct 2] com.cranberrygame.phonegap.plugin.ad.admob plugin is required to show Admob ads with Cordova; other platforms are not supported")};h.prototype.lo=function(){return!0};h.prototype.ko=function(){return!0};h.prototype.jo=function(){return!0};h.prototype.Qs=function(){return!0};
l.d=new h;l.q=new function(){};l.L=new function(){}})();function Dc(h){this.b=h}var Ec=!1;
(function(){function h(f,h){f.load=1;f.J.src=h;jQuery.ajax({context:f,dataType:"text",type:"GET",url:h,success:function(){f.J.onload=function(a){return function(){a.b.trigger(l.prototype.Dj,a)}}(f);f.load=0},error:function(){f.J.onload=function(a){return function(){a.b.trigger(l.prototype.pd,a)}}(f);f.load=0}})}function l(){}function f(){}var p=Dc.prototype;p.ca=function(f){this.ka=f;this.b=f.b};p.ca.prototype.G=function(){};p.V=function(f){this.type=f;this.b=f.b};var u=p.V.prototype;u.G=function(){this.m[6]?
(this.J=document.createElement("div"),this.J.innerHTML=this.m[8]):(this.J=document.createElement("iframe"),this.m[7]&&h(this,this.m[7]));var f=this.J,l;if(!(l=this.m[0])){l="";for(var a=0;10>a;a++)l+="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".charAt(Math.floor(62*Math.random()))}f.id=l;this.J.setAttribute("id",this.J.id);this.m[2]&&this.J.setAttribute("title",this.m[2]);this.J.setAttribute("frameborder",0);this.J.setAttribute("allowFullScreen","");f=0<this.width?1:-1;l=0<this.height?
1:-1;this.J.style.cssText="-webkit-transform:rotate("+this.e*f*l*180/3.1416+"deg);-moz-transform:rotate("+this.e*f*l*180/3.1416+"deg);-o-transform:rotate("+this.e*f*l*180/3.1416+"deg);-ms-transform:rotate("+this.e*f*l*180/3.1416+"deg);";this.J.style.background=this.m[3];this.J.style.border=this.m[4]||"none";this.J.style.color=this.m[9];switch(this.m[5]){case 0:this.J.setAttribute("scrolling","no");this.J.style.overflow="hidden";break;case 1:this.J.style.overflow="auto";break;case 2:this.J.style.overflowX=
"auto";this.J.style.overflowY="hidden";break;case 3:this.J.style.overflowX="hidden",this.J.style.overflowY="auto"}this.m[11]&&(f=this.m[11],this.$g=document.createElement("link"),this.$g.setAttribute("type","text/css"),this.$g.setAttribute("rel","stylesheet"),this.$g.setAttribute("href",f),"undefined"!=typeof this.$g&&document.getElementsByTagName("head")[0].appendChild(this.$g));this.m[12]&&(f=this.m[12],this.bh=document.createElement("script"),this.bh.setAttribute("type","text/javascript"),this.bh.setAttribute("async",
"async"),this.bh.setAttribute("src",f),"undefined"!=typeof this.bh&&document.getElementsByTagName("head")[0].appendChild(this.bh));$(this.J).appendTo(this.b.mj?this.b.mj:"body");this.m[1]||(jQuery(this.J).hide(),this.visible=!1);this.scale=1;this.Pr();this.b.Ki(this)};u.Kf=function(){jQuery(this.J).remove();this.J=null};u.ab=function(){this.Pr()};u.Pr=function(){if(!this.b.Ca){Ec&&(Ec=!1,this.b.trigger(l.prototype.rh,this));var f=this.j.lb(this.x,this.y,!0),h=this.j.lb(this.x,this.y,!1),a=this.j.lb(this.x+
this.width,this.y+this.height,!0),g=this.j.lb(this.x+this.width,this.y+this.height,!1);if(!this.visible||!this.j.visible||0>=a||0>=g||f>=this.b.width||h>=this.b.height)jQuery(this.J).hide();else{f=1>f?1:f;h=1>h?1:h;a=a>=this.b.width?this.b.width-1:a;g=g>=this.b.height?this.b.height-1:g;jQuery(this.J).show();var b=f+jQuery(this.b.canvas).offset().left,d=h+jQuery(this.b.canvas).offset().top;jQuery(this.J).offset({left:b,top:d});jQuery(this.J).width(a-f);jQuery(this.J).height(g-h);this.J.width=Math.round(this.J.width);
this.J.height=Math.round(this.J.height);this.J.x=Math.round(this.J.x);this.J.y=Math.round(this.J.y);1==this.m[10]&&jQuery(this.J).css("font-size",this.j.Tb(!0)/this.b.devicePixelRatio-.2+"em");2==this.m[10]&&jQuery(this.J).css("font-size",this.j.Tb(!0)/this.b.devicePixelRatio-.3+"em");3==this.m[10]&&jQuery(this.J).css("font-size",this.j.Tb(!0)/this.b.devicePixelRatio-.1+"em");4==this.m[10]&&jQuery(this.J).css("font-size",this.j.Tb(!0)/this.b.devicePixelRatio-.05+"em")}}};u.rd=function(){};u.ac=function(){};
l.prototype.pd=function(){return!0};l.prototype.Dj=function(){return!0};l.prototype.rh=function(){Ec=!1;return!0};p.d=new l;f.prototype.Ao=function(f){this.b.Ca||(this.visible=0!==f)};p.q=new f;p.L=new function(){}})();function Fc(h){this.b=h}
(function(){var h=Fc.prototype;h.ca=function(f){this.behavior=f;this.b=f.b};h.ca.prototype.G=function(){};h.V=function(f,h){this.type=f;this.behavior=f.behavior;this.k=h;this.b=f.b};var l=h.V.prototype;l.G=function(){this.Lo=this.m[0];this.Mo=this.m[1];this.lu=this.m[2];this.ku=this.m[3];this.k.la();this.Yn=this.k.Aa.left;this.ao=this.k.Aa.top;this.Zn=this.b.La-this.k.Aa.left;this.$n=this.b.Sa-this.k.Aa.top;this.rn=this.b.La-this.k.Aa.right;this.Cl=this.b.Sa-this.k.Aa.bottom;this.enabled=0!==this.m[4]};
l.xb=function(){return{xleft:this.Yn,ytop:this.ao,xright:this.Zn,ybottom:this.$n,rdiff:this.rn,bdiff:this.Cl,enabled:this.enabled}};l.Ob=function(f){this.Yn=f.xleft;this.ao=f.ytop;this.Zn=f.xright;this.$n=f.ybottom;this.rn=f.rdiff;this.Cl=f.bdiff;this.enabled=f.enabled};l.ab=function(){if(this.enabled){var f,h=this.k.j,l=this.k,r=this.k.Aa;0===this.Lo?(l.la(),f=h.ua+this.Yn-r.left,0!==f&&(l.x+=f,l.xa())):1===this.Lo&&(l.la(),f=h.za-this.Zn-r.left,0!==f&&(l.x+=f,l.xa()));0===this.Mo?(l.la(),f=h.wa+
this.ao-r.top,0!==f&&(l.y+=f,l.xa())):1===this.Mo&&(l.la(),f=h.ya-this.$n-r.top,0!==f&&(l.y+=f,l.xa()));1===this.lu&&(l.la(),f=h.za-this.rn-r.right,0!==f&&(l.width+=f,0>l.width&&(l.width=0),l.xa()));1===this.ku&&(l.la(),f=h.ya-this.Cl-r.bottom,0!==f&&(l.height+=f,0>l.height&&(l.height=0),l.xa()))}};h.d=new function(){};h.q=new function(){};h.L=new function(){}})();function Gc(h){this.b=h}
(function(){function h(){}function l(){}var f=Gc.prototype;f.ca=function(f){this.behavior=f;this.b=f.b};f.ca.prototype.G=function(){};f.V=function(f,h){this.type=f;this.behavior=f.behavior;this.k=h;this.b=f.b};var p=f.V.prototype;p.G=function(){this.Ho=1===this.m[0];this.vh=this.m[1];this.Ri=this.m[2];this.wh=this.m[3];this.Cu=this.m[4];this.ob=this.Ho?0:3;this.Pc?this.Rc.reset():this.Rc=new fb;this.If=this.k.opacity?this.k.opacity:1;this.Ho&&(0===this.vh?(this.ob=1,0===this.Ri&&(this.ob=2)):(this.k.opacity=
0,this.b.U=!0))};p.xb=function(){return{fit:this.vh,wt:this.Ri,fot:this.wh,s:this.ob,st:this.Rc.R,mo:this.If}};p.Ob=function(f){this.vh=f.fit;this.Ri=f.wt;this.wh=f.fot;this.ob=f.s;this.Rc.reset();this.Rc.R=f.st;this.If=f.mo};p.ab=function(){this.Rc.add(this.b.kg(this.k));0===this.ob&&(this.k.opacity=this.Rc.R/this.vh*this.If,this.b.U=!0,this.k.opacity>=this.If&&(this.k.opacity=this.If,this.ob=1,this.Rc.reset(),this.b.trigger(Gc.prototype.d.Us,this.k)));1===this.ob&&this.Rc.R>=this.Ri&&(this.ob=2,
this.Rc.reset(),this.b.trigger(Gc.prototype.d.jt,this.k));2===this.ob&&0!==this.wh&&(this.k.opacity=this.If-this.Rc.R/this.wh*this.If,this.b.U=!0,0>this.k.opacity&&(this.k.opacity=0,this.ob=3,this.Rc.reset(),this.b.trigger(Gc.prototype.d.io,this.k),1===this.Cu&&this.b.qe(this.k)))};p.pd=function(){this.ob=0;this.Rc.reset();0===this.vh?(this.ob=1,0===this.Ri&&(this.ob=2)):(this.k.opacity=0,this.b.U=!0)};h.prototype.io=function(){return!0};h.prototype.Us=function(){return!0};h.prototype.jt=function(){return!0};
f.d=new h;l.prototype.zt=function(f){0>f&&(f=0);this.wh=f};f.q=new l;f.L=new function(){}})();function Hc(h){this.b=h}
(function(){function h(){}function l(){}var f=Hc.prototype;f.ca=function(f){this.behavior=f;this.b=f.b};f.ca.prototype.G=function(){};f.V=function(f,h){this.type=f;this.behavior=f.behavior;this.k=h;this.b=f.b};var p=f.V.prototype;p.G=function(){this.Hd=this.Fd=this.ob=this.rk=this.vk=0};p.xb=function(){return{ontime:this.vk,offtime:this.rk,stage:this.ob,stagetimeleft:this.Fd,timeleft:this.Hd}};p.Ob=function(f){this.vk=f.ontime;this.rk=f.offtime;this.ob=f.stage;this.Fd=f.stagetimeleft;this.Hd=f.timeleft};
p.ab=function(){if(!(0>=this.Hd)){var f=this.b.kg(this.k);this.Hd-=f;0>=this.Hd?(this.Hd=0,this.k.visible=!0,this.b.U=!0,this.b.trigger(Hc.prototype.d.Vs,this.k)):(this.Fd-=f,0>=this.Fd&&(0===this.ob?(this.k.visible=!1,this.ob=1,this.Fd+=this.rk):(this.k.visible=!0,this.ob=0,this.Fd+=this.vk),this.b.U=!0))}};h.prototype.Cs=function(){return 0<this.Hd};h.prototype.Vs=function(){return!0};f.d=new h;l.prototype.qs=function(f,h,l){this.vk=f;this.rk=h;this.ob=1;this.Fd=h;this.Hd=l;this.k.visible=!1;this.b.U=
!0};l.prototype.St=function(){this.Hd=0;this.k.visible=!0;this.b.U=!0};f.q=new l;f.L=new function(){}})();function Ic(h){this.b=h}
(function(){var h=Ic.prototype;h.ca=function(f){this.behavior=f;this.b=f.b};h.ca.prototype.G=function(){};h.V=function(f,h){this.type=f;this.behavior=f.behavior;this.k=h;this.b=f.b};var l=h.V.prototype;l.G=function(){this.speed=I(this.m[0]);this.$i=I(this.m[1])};l.xb=function(){return{speed:this.speed,acc:this.$i}};l.Ob=function(f){this.speed=f.speed;this.$i=f.acc};l.ab=function(){var f=this.b.kg(this.k);0!==f&&(0!==this.$i&&(this.speed+=this.$i*f),0!==this.speed&&(this.k.e=Ka(this.k.e+this.speed*
f),this.k.xa()))};h.d=new function(){};h.q=new function(){};h.L=new function(){}})();function Kc(h){this.b=h}
(function(){var h=Kc.prototype;h.ca=function(f){this.behavior=f;this.b=f.b};h.ca.prototype.G=function(){};h.V=function(f,h){this.type=f;this.behavior=f.behavior;this.k=h;this.b=f.b;this.jb=0};var l=h.V.prototype,f=2*Math.PI,p=Math.PI/2,u=3*Math.PI/2;l.G=function(){this.Hb=1===this.m[0];this.ji=this.m[1];this.Xn=this.m[2];this.fe=this.m[3];this.fe+=Math.random()*this.m[4];0===this.fe?this.jb=0:(this.jb=this.m[5]/this.fe*f,this.jb+=Math.random()*this.m[6]/this.fe*f);this.ec=this.m[7];this.ec+=Math.random()*
this.m[8];this.ti=this.uf=this.fa=0;this.init()};l.xb=function(){return{i:this.jb,a:this.Hb,mv:this.ji,w:this.Xn,p:this.fe,mag:this.ec,iv:this.fa,iv2:this.uf,r:this.ti,lkv:this.pc,lkv2:this.Zh}};l.Ob=function(f){this.jb=f.i;this.Hb=f.a;this.ji=f.mv;this.Xn=f.w;this.fe=f.p;this.ec=f.mag;this.fa=f.iv;this.uf=f.iv2||0;this.ti=f.r;this.pc=f.lkv;this.Zh=f.lkv2||0};l.init=function(){switch(this.ji){case 0:this.fa=this.k.x;break;case 1:this.fa=this.k.y;break;case 2:this.fa=this.k.width;this.ti=this.k.height/
this.k.width;break;case 3:this.fa=this.k.width;break;case 4:this.fa=this.k.height;break;case 5:this.fa=this.k.e;this.ec=I(this.ec);break;case 6:this.fa=this.k.opacity;break;case 7:this.fa=0;break;case 8:this.fa=this.k.x,this.uf=this.k.y}this.pc=this.fa;this.Zh=this.uf};l.oe=function(h){h=h%f;switch(this.Xn){case 0:return Math.sin(h);case 1:return h<=p?h/p:h<=u?1-2*(h-p)/Math.PI:(h-u)/p-1;case 2:return 2*h/f-1;case 3:return-2*h/f+1;case 4:return h<Math.PI?-1:1}return 0};l.ab=function(){var h=this.b.kg(this.k);
if(this.Hb&&0!==h){0===this.fe?this.jb=0:(this.jb+=h/this.fe*f,this.jb=this.jb%f);switch(this.ji){case 0:this.k.x!==this.pc&&(this.fa+=this.k.x-this.pc);this.k.x=this.fa+this.oe(this.jb)*this.ec;this.pc=this.k.x;break;case 1:this.k.y!==this.pc&&(this.fa+=this.k.y-this.pc);this.k.y=this.fa+this.oe(this.jb)*this.ec;this.pc=this.k.y;break;case 2:this.k.width=this.fa+this.oe(this.jb)*this.ec;this.k.height=this.k.width*this.ti;break;case 3:this.k.width=this.fa+this.oe(this.jb)*this.ec;break;case 4:this.k.height=
this.fa+this.oe(this.jb)*this.ec;break;case 5:this.k.e!==this.pc&&(this.fa=Ka(this.fa+(this.k.e-this.pc)));this.k.e=Ka(this.fa+this.oe(this.jb)*this.ec);this.pc=this.k.e;break;case 6:this.k.opacity=this.fa+this.oe(this.jb)*this.ec/100;0>this.k.opacity?this.k.opacity=0:1<this.k.opacity&&(this.k.opacity=1);break;case 8:this.k.x!==this.pc&&(this.fa+=this.k.x-this.pc),this.k.y!==this.Zh&&(this.uf+=this.k.y-this.Zh),this.k.x=this.fa+Math.cos(this.k.e)*this.oe(this.jb)*this.ec,this.k.y=this.uf+Math.sin(this.k.e)*
this.oe(this.jb)*this.ec,this.pc=this.k.x,this.Zh=this.k.y}this.k.xa()}};l.Hq=function(f,h){switch(this.ji){case 2:this.fa*=h.width/f.width;this.ti=h.height/h.width;break;case 3:this.fa*=h.width/f.width;break;case 4:this.fa*=h.height/f.height}};h.d=new function(){};h.q=new function(){};h.L=new function(){}})();
function pc(){return[Cc,qc,xc,rc,wc,vc,sc,Ac,yc,Z,Dc,zc,Fc,Hc,Gc,Kc,Ic,W.prototype.d.Ds,W.prototype.d.qo,W.prototype.q.pt,W.prototype.q.Ct,W.prototype.q.Kt,W.prototype.d.gs,qc.prototype.q.Rt,qc.prototype.q.Play,Z.prototype.d.Fs,Z.prototype.q.It,W.prototype.L.Xw,Z.prototype.L.Xt,Z.prototype.L.us,sc.prototype.d.no,W.prototype.q.ss,wc.prototype.d.ql,Z.prototype.q.ns,wc.prototype.q.yt,Z.prototype.q.Ao,Z.prototype.q.xt,Z.prototype.d.zs,W.prototype.d.ps,wc.prototype.d.As,W.prototype.q.Dt,W.prototype.L.Ww,
Z.prototype.q.Ht,W.prototype.d.Vt,Z.prototype.q.Ft,W.prototype.d.co,Z.prototype.q.Gt,W.prototype.L.Wx,W.prototype.L.Xx,W.prototype.d.bs,Z.prototype.L.Vi,wc.prototype.L.Vi,Z.prototype.q.Mt,Z.prototype.L.Wi,wc.prototype.L.Wi,Z.prototype.q.Nt,W.prototype.q.nt,Z.prototype.L.Xr,Z.prototype.q.mt,Z.prototype.d.ks,wc.prototype.d.ol,Z.prototype.d.Hs,Z.prototype.d.xs,Z.prototype.d.es,W.prototype.q.ms,Z.prototype.L.vs,Z.prototype.L.ws,Z.prototype.q.Tt,yc.prototype.q.Jt,W.prototype.L.Yo,W.prototype.d.os,W.prototype.L.tx,
Z.prototype.q.tt,wc.prototype.d.rl,Z.prototype.d.hs,Z.prototype.d.ds,Z.prototype.d.lt,Z.prototype.q.Ot,W.prototype.d.rs,W.prototype.L.Du,Z.prototype.d.Ue,Z.prototype.d.eo,Z.prototype.q.Bt,Hc.prototype.d.Cs,Hc.prototype.q.St,Hc.prototype.q.qs,Z.prototype.q.qt,W.prototype.q.Wt,Gc.prototype.q.zt,Z.prototype.q.Vr,Z.prototype.q.Lt,Z.prototype.q.At,Z.prototype.d.js,Z.prototype.d.ho,W.prototype.q.ot,Z.prototype.L.ls,W.prototype.L.random,Z.prototype.q.$t,Z.prototype.q.Et,Z.prototype.d.cs,W.prototype.q.Wr,
qc.prototype.d.Is,qc.prototype.q.Qt,Z.prototype.d.Es,Z.prototype.q.ut,Ac.prototype.d.Js,wc.prototype.d.Gs,rc.prototype.q.ts,W.prototype.d.Ls,Gc.prototype.d.io]};
