game.min.js 197 KB

123456789
  1. function hook2D(n){var o=CanvasRenderingContext2D.prototype[n];CanvasRenderingContext2D.prototype[n]=function(){console.log("Canvas2D_"+n+":",arguments),"drawImage"==n&&console.log("%c","padding:50px 300px;line-height:120px;background:url('"+arguments[0].currentSrc+"') -"+arguments[1]+"px -"+arguments[2]+"px;"),o.apply(this,arguments)}}function hookCanvasRenderingContext2D(){for(var n in _HOOK_CANVAS2D_FUNS){var o=_HOOK_CANVAS2D_FUNS[n];"function"==typeof CanvasRenderingContext2D.prototype[o]&&hook2D(o)}}var _HOOK_CANVAS2D_FUNS=_HOOK_CANVAS2D_FUNS||["drawImage"];hookCanvasRenderingContext2D();
  2. ;window.TG_InitSettings=window.TG_InitSettings||{};var TG_GamePage=TG_GamePage||{};TG_GamePage.GameCanvassesSettingsSmall={canvasBackground:{width:320,height:511,top:0,left:0,minHeight:390}},TG_GamePage.GameCanvassesSettingsBig={canvasBackground:{width:640,height:1022,top:0,left:0,minHeight:780}},TG_GamePage.initMetaViewportTag=function(){"use strict";var e,a=1;/iPhone|iPad/.test(navigator.userAgent)&&window.devicePixelRatio>1&&(a/=window.devicePixelRatio),e=document.createElement("meta"),e.name="viewport",e.content=(navigator.userAgent.indexOf("Android")>-1?"target-densitydpi=device-dpi,":"")+"initial-scale="+a+",maximum-scale="+a+",user-scalable=no,minimal-ui",document.getElementsByTagName("head")[0].appendChild(e)},TG_GamePage.initCalculations=function(e){"use strict";var a,t=navigator.userAgent.toLowerCase(),i=navigator.platform.toLowerCase();if(TG_GamePage.usesSound=!0,TG_GamePage.notCompatible=!1,TG_GamePage.usesBigGraphics=!0,TG_GamePage.usesFullScreen=!0,t.indexOf("android")>-1){a=t.match(/android [\d+\.]{3,5}/),a=null!==a?parseInt(t.match(/android [\d+\.]{3,5}/)[0].replace("android ",""),10):3;var n=!/(firefox|opera|chrome)/i.test(t),s=-1!==t.indexOf("firefox");TG_GamePage.usesBigGraphics=!0,TG_GamePage.usesFullScreen=!(3>a||n&&4>a),TG_GamePage.usesSound=!(s&&4>a)}else"macintel"===i||"macppc"===i?TG_GamePage.usesFullScreen=!1:i.indexOf("win")>-1&&!/windows phone/i.test(t)&&(TG_GamePage.usesFullScreen=!0);TG_GamePage.usesBigGraphics,TG_GamePage.usesBigGraphics=!0,TG_GamePage.usesBigGraphics=!0,TG_GamePage.usesFullScreen=null!==e?e:TG_GamePage.usesFullScreen,TG_GamePage.usesDOMUpdateHack=/android/i.test(t)&&!/(chrome|firefox|opera)/i.test(t)&&parseInt(t.match(/android [\d+\.]{3,5}/)[0].replace("android ",""),10)>=4,TG_GamePage.DOMUpdating=!1,TG_GamePage.lastWindowHeight=0,TG_GamePage.lastWindowWidth=0,TG_GamePage.scrollAndResizeTimerId=!1,TG_GamePage.deviceIsAndroidNoChromeBrowser=/Android/i.test(t)&&!/Chrome/i.test(t),TG_GamePage.deviceNeedsResizing=/ipad/i.test(t)?!1:/webos/i.test(t)?!0:"ontouchstart"in window?!0:!1,TG_GamePage.imgSizePostfix=TG_GamePage.usesBigGraphics?"":"_small",window.TG_InitSettings.mediaUrl=TG_GamePage.usesBigGraphics?"big":"small",window.TG_InitSettings.size=TG_GamePage.usesBigGraphics?"big":"small",window.TG_InitSettings.usesFullScreen=TG_GamePage.usesFullScreen},TG_GamePage.delayedCheckCompatibility=function(){"use strict";TG_GamePage.doIfLoaded(function(){var e=navigator.userAgent.toLowerCase(),a=e.indexOf("opera")>-1,t=e.indexOf("dolfin")>-1,i=e.indexOf("fbios")>-1||e.indexOf("fbforiphone")>-1||e.indexOf("fbforipad")>-1,n=e.indexOf("twitter")>-1;(TG_GamePage.notCompatible||a||t||i||n)&&(TG_GamePage.notCompatible=!0,document.getElementById("viewport").hide())})},TG_GamePage.delayedLoadCanvasses=function(){"use strict";TG_GamePage.doIfLoaded(function(){var e,a=TG_GamePage.usesBigGraphics?TG_GamePage.GameCanvassesSettingsBig:TG_GamePage.GameCanvassesSettingsSmall;document.getElementById("viewport").style.width=a.width,e=document.getElementById("canvasBackground"),e&&e.setAttribute("style","left:"+a.left+"px; top:"+a.top+"px; width:"+a.width+"; height:"+a.height)})},TG_GamePage.delayedLoadGame=function(e){"use strict";TG_GamePage.doIfLoaded(function(){if(!TG_GamePage.notCompatible){var a=document.createElement("script");a.setAttribute("type","text/javascript"),a.setAttribute("src",e)}})},TG_GamePage.doIfLoaded=function(e){"use strict";"loading"===document.readyState?document.addEventListener("DOMContentLoaded",e):e()},TG_GamePage.isLandscape=function(){"use strict";return window.innerHeight<window.innerWidth},TG_GamePage.log=function(e){"use strict";console.log(e)};
  3. ;!function(){function t(t,i){this.x=t,this.y=i}function i(i,e){return new t(i.x-e.x,i.y-e.y)}function e(i){return new t(i.y,-i.x).normalize()}function n(t){this.Gf=2147483648,this.hi=1103515245,this.ti=12345,this.state=t||Math.floor(Math.random()*(this.Gf-1))}function a(){this.Rc="",this.jf=[],this.zc=[],this.be=[],this.ce=[],this.Ba("start"),this.Ba("load"),this.Ba("game")}function s(t){var i=ga;i.Rc=t,""!==i.Rc&&"/"!==i.Rc[i.Rc.length-1]&&(i.Rc+="/")}function o(t){var i=ga;return 100*(i.zc[t]+i.be[t])/i.jf[t]}function h(t){var i=ga;i.zc[t]+=1,i.complete(t)&&_i("Load Complete",{Ia:t})}function r(t){var i=ga;i.be[t]+=1,_i("Load Failed",{Ia:t})}function l(t,i,e){var n=ga;n.ce[i]||n.Ba(i),n.ce[i].push(t),n.jf[i]+=e}function c(t){this.context=this.canvas=void 0,this.height=this.width=0,void 0!==t&&this.Eb(t)}function d(t,i,e,n,a,s){var o=pa;s?(o.context.strokeStyle=a,o.context.strokeRect(t,i,e,n)):(o.context.fillStyle=a,o.context.fillRect(t,i,e,n))}function f(t,i,e,n){var a=pa,s=a.context.lineWidth;a.context.strokeStyle="green",a.context.lineWidth=1,a.context.beginPath(),a.context.moveTo(t,i),a.context.lineTo(e,n),a.context.stroke(),a.context.lineWidth=s}function u(t,i,e){this.name=t,this.I=i,this.Bp=e,this.bc=[],this.zl=[],l(this,this.Bp,this.I)}function g(t,i,e){i>=0&&i<t.I&&(t.bc[i]=new Image,t.zl[i]=e)}function p(t,i,e,n,a,s,o){this.name=t,this.Ee=i,this.I=e,this.width=n,this.height=a,this.Sh=s,this.Uh=o,this.picIdx=[],this.posX=[],this.posY=[],this.picWidth=[],this.picHeight=[],this.offsetX=[],this.offsetY=[]}function b(t,i){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.width=t,this.height=i,this.canvas.width=t,this.canvas.height=i,this.clear(),this.kh=void 0}function v(t){t.kh=pa.canvas,pa.Eb(t.canvas)}function m(t){pa.canvas===t.canvas&&void 0!==t.kh&&(pa.Eb(t.kh),t.kh=void 0)}function w(t,i,e,n){this.B=t,this.Vr=i,this.Cr=e,this.fg=[{text:"MiHhX!@v&Qq",width:-1,font:"sans-serif"},{text:"MiHhX!@v&Qq",width:-1,font:"serif"},{text:"AaMm#@!Xx67",width:-1,font:"sans-serif"},{text:"AaMm#@!Xx67",width:-1,font:"serif"}],this.qn=!0,l(this,n,1)}function y(t,i){this.B=t,this.sf=i,this.fontWeight=this.fontStyle="",this.ne="normal",this.fontSize=40,this.fill=!0,this.Ua=1,this.Ob=0,this.fillColor="black",this.Wb={f:void 0,Za:0,Dj:!0,Ej:!0},this.xa={bg:!0,I:3,Dg:["red","white","blue"],size:.6,offset:0},this.fillStyle=void 0,this.stroke=!1,this.Oa=1,this.ze=0,this.strokeColor="black",this.strokeStyle=void 0,this.sc=1,this.rc=!1,this.Rd="miter",this.K={j:!1,color:"rgba(10, 10, 10, 0.3)",offsetX:3,offsetY:3,blur:1},this.align="left",this.m="top",this.Aa=0}function x(t,i){void 0!==i.B&&(t.B=i.B),void 0!==i.sf&&(t.sf=i.sf),void 0!==i.fontStyle&&(t.fontStyle=i.fontStyle),void 0!==i.fontWeight&&(t.fontWeight=i.fontWeight),void 0!==i.ne&&(t.ne=i.ne),void 0!==i.fontSize&&(t.fontSize=i.fontSize),void 0!==i.fill&&(t.fill=i.fill),void 0!==i.Ua&&(t.Ua=i.Ua),void 0!==i.fillColor&&(t.Ob=0,t.fillColor=i.fillColor),void 0!==i.Wb&&(t.Ob=1,t.Wb=i.Wb),void 0!==i.xa&&(t.Ob=2,t.xa=i.xa),void 0!==i.fillStyle&&(t.Ob=3,t.fillStyle=i.fillStyle),void 0!==i.stroke&&(t.stroke=i.stroke),void 0!==i.Oa&&(t.Oa=i.Oa),void 0!==i.strokeColor&&(t.ze=0,t.strokeColor=i.strokeColor),void 0!==i.strokeStyle&&(t.ze=3,t.strokeStyle=i.strokeStyle),void 0!==i.sc&&(t.sc=i.sc),void 0!==i.rc&&(t.rc=i.rc),void 0!==i.Rd&&(t.Rd=i.Rd),void 0!==i.K&&(t.K=i.K),void 0!==i.align&&(t.align=i.align),void 0!==i.m&&(t.m=i.m),void 0!==i.Aa&&(t.Aa=i.Aa)}function _(t){t.fontWeight="normal"}function k(t,i){t.fontSize=void 0===i?24:i+0}function S(t,i,e,n,a){t.Ob=2,t.xa.bg=!0,t.xa.I=i,t.xa.Dg=e.slice(0),t.xa.size=void 0===n?.6:n,t.xa.offset=void 0===a?0:a}function T(t,i){t.stroke=void 0===i?!1:i}function M(t,i){t.sc=void 0===i?1:i}function E(t,i){t.rc=void 0===i?!1:i}function j(t){t.Rd="miter"}function C(t,i,e){void 0===i?t.K.j=!0:t.K={j:!0,color:i,offsetX:0,offsetY:e,blur:2}}function L(t,i){t.align=void 0===i?"center":i}function A(t,i){t.m=void 0===i?"top":i}function I(t){return t.fontStyle+" "+t.fontWeight+" "+t.fontSize+"px "+t.B+", "+t.sf}function B(t){var i,e=0;for(i=0;i<t.length;i+=1)e=Math.max(e,t[i].width);return e}function z(t,i){return t.fontSize*i.length+t.Aa*(i.length-1)}function q(t,i,e){var n,a,s,o,h,r,l=[],c=pa.context;switch(c.font=I(t),t.ne){case"upper":i=i.toUpperCase();break;case"lower":i=i.toLowerCase()}if(void 0===e){for(r=i.split("\n"),t=0;t<r.length;t+=1)l.push({text:r[t],width:c.measureText(r[t]).width});return l}for(r=i.split("\n"),s=c.measureText(" ").width,t=0;t<r.length;t+=1){for(a=r[t].split(" "),n=a[0],h=c.measureText(a[0]).width,i=1;i<a.length;i+=1)o=c.measureText(a[i]).width,e>h+s+o?(n+=" "+a[i],h+=s+o):(l.push({text:n,width:h}),n=a[i],h=o);l.push({text:n,width:h})}return l}function F(t,i,e,n,a,s){var o=t.fontSize;return t.fontSize=i,i=s?q(t,e,n):q(t,e),n=B(i)<=n&&z(t,i)<=a,t.fontSize=o,n}function O(t,i,e,n,a){var s=0,o=32;for(void 0===a&&(a=!1),pa.context.save();F(t,s+o,i,e,n,a);)s+=o;for(;o>=2;)o/=2,F(t,s+o,i,e,n,a)&&(s+=o);return pa.context.restore(),Math.max(4,s)}function D(t,i,e,n,a){var s=Math.max(.01,t.xa.size),o=t.xa.offset;for(t.xa.bg?(o=a/2+o*a,s=.5*s*a,i=pa.context.createLinearGradient(i,e+o-s,i,e+o+s)):(o=n/2+o*n,s=.5*s*n,i=pa.context.createLinearGradient(i+o-s,e,i+o+s,e)),e=1/(t.xa.I-1),n=0;n<t.xa.I;n+=1)i.addColorStop(n*e,t.xa.Dg[n]);return i}function G(t,i,e,n,a,s,o){var h,r;switch(!t.fill&&t.K.j?(i.shadowColor=t.K.color,i.shadowOffsetX=t.K.offsetX,i.shadowOffsetY=t.K.offsetY,i.shadowBlur=t.K.blur):(i.shadowColor=void 0,i.shadowOffsetX=0,i.shadowOffsetY=0,i.shadowBlur=0),i.globalAlpha=o*t.Oa,t.ze){case 0:i.strokeStyle=t.strokeColor;break;case 3:i.strokeStyle=t.strokeStyle}for(i.lineWidth=t.sc,i.lineJoin=t.Rd,o=0;o<e.length;o+=1){switch(h=0,t.align){case"right":h=s-e[o].width;break;case"center":h=(s-e[o].width)/2}r=t.fontSize*(o+1)+t.Aa*o,i.strokeText(e[o].text,n+h,a+r)}}function R(t,i,e,n,a,s,o){e=q(t,e,o),o=B(e);var h=z(t,e);switch(i.textAlign="left",i.textBaseline="bottom",t.align){case"right":n+=-o;break;case"center":n+=-o/2}switch(t.m){case"base":case"bottom":a+=-h;break;case"middle":a+=-h/2}if(i.font=I(t),t.stroke&&t.rc&&G(t,i,e,n,a,o,s),t.fill){var r,l,c=n,d=a;switch(t.K.j?(i.shadowColor=t.K.color,i.shadowOffsetX=t.K.offsetX,i.shadowOffsetY=t.K.offsetY,i.shadowBlur=t.K.blur):(i.shadowColor=void 0,i.shadowOffsetX=0,i.shadowOffsetY=0,i.shadowBlur=0),i.globalAlpha=s*t.Ua,t.Ob){case 0:i.fillStyle=t.fillColor;break;case 1:h=t.Wb.f,l=new b(h.width,h.height);var f=t.Wb.Dj,u=t.Wb.Ej;f&&u?r="repeat":f&&!u?r="repeat-x":!f&&u?r="repeat-y":f||u||(r="no-repeat"),v(l),h.q(t.Wb.Za,0,0),m(l),r=pa.context.createPattern(l.canvas,r),i.fillStyle=r;break;case 2:i.fillStyle=D(t,c,d,o,h);break;case 3:i.fillStyle=t.fillStyle;break;default:i.fillStyle=t.fillColor}for(r=0;r<e.length;r+=1){switch(h=0,t.align){case"right":h=o-e[r].width;break;case"center":h=(o-e[r].width)/2}l=t.fontSize*(r+1)+t.Aa*r,2===t.Ob&&t.xa.bg&&(i.fillStyle=D(t,c,d+l-t.fontSize,o,t.fontSize)),i.fillText(e[r].text,c+h,d+l)}}t.stroke&&!t.rc&&G(t,i,e,n,a,o,s)}function H(){this.Mp=5,this.zk=-1,this.Wn="stop_lowest_prio",this.Wk=this.Ja=this.gb=!1;var t,i=this,e="undefined"!=typeof AudioContext?AudioContext:"undefined"!=typeof webkitAudioContext?webkitAudioContext:void 0;if(e)this.gb=!0;else if("undefined"!=typeof Audio)try{"undefined"!=typeof(new Audio).canPlayType&&(this.Ja=!0)}catch(n){}(this.Wk=this.gb||this.Ja)&&(t=new Audio,this.Pn={ogg:!!t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),mp3:!!t.canPlayType("audio/mpeg;").replace(/^no$/,""),opus:!!t.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),wav:!!t.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),m4a:!!(t.canPlayType("audio/x-m4a;")||t.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(t.canPlayType("audio/x-mp4;")||t.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!!t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")}),this.Hb=[],this.Te={},this.Sa={},this.gf={},this.vd=[],this.Sb=0,this.gb?(this.Ib=new e,this.vk="function"==typeof this.Ib.createGain?function(){return i.Ib.createGain()}:"function"==typeof this.Ib.createGainNode?function(){return i.Ib.createGainNode()}:function(){},this.Se={},this.ig=this.vk(),void 0===this.ig?(this.Ja=!0,this.ee=H.prototype.ci):(this.ig.connect(this.Ib.destination),this.Se.master=this.ig,this.ee=H.prototype.Un)):this.ee=this.Ja?H.prototype.ci:function(){}}function Y(t){var i,e,n,a,s,o=ba;for(i=0;i<o.Hb.length;i+=1)if((e=o.Hb[i])&&0===e.Ci)if(e.paused)e.Ck&&(e.di+=t,e.di>=e.Ck&&o.Pf(e.id));else if(e.gi+=t,e.dg&&e.gi>=e.jn)e.dg=!1,K(o,e,e.zb);else if(e.Lf&&si(e)>=e.$h)if(e.fj){if(o.Ja)try{e.A.pause(),e.A.currentTime=e.zb/1e3,4===e.A.readyState?e.A.play():(n=function(){var t=e;return{ready:function(){t.A.play(),t.A.removeEventListener("canplaythrough",n.ready,!1)}}}(),e.A.addEventListener("canplaythrough",n.ready,!1))}catch(h){}}else ba.stop(e.id);for(i=o.vd.length-1;i>=0;i-=1)a=o.vd[i],0===a.Ci&&(a.n+=t,a.n>=a.duration?(ii(ba,a.id,a.vn),a.Tb&&a.Tb(),o.vd.splice(i,1)):(s=a.Ca(a.n,a.start,a.vn-a.start,a.duration),ii(ba,a.id,s)))}function N(t,i){t.Te[i.wb.name]?t.Te[i.wb.name].length<t.Mp&&t.Te[i.wb.name].push(i):t.Te[i.wb.name]=[i]}function X(t,i){var e,n,a=[];for(e=0;e<t.Hb.length;e+=1)(n=t.Hb[e])&&0<=n.sa.indexOf(i)&&a.push(n);return a}function P(t,i){if(0<t.zk&&t.Sb>=t.zk)switch(t.Wn){case"cancel_new":return!1;case"stop_lowest_prio":var e,n,a;for(e=0;e<t.Hb.length;e+=1)(n=t.Hb[e])&&n.Lf&&!n.paused&&(void 0===a||a.Nf<n.Nf)&&(a=n);a.Nf>=i.Nf&&t.stop(a.id)}return!0}function V(t,i){var e,n=1;for(e=0;e<i.sa.length;e+=1)void 0!==ba.Sa[i.sa[e]]&&(n*=ba.Sa[i.sa[e]]);e=t.vk(),e.gain.value=n,e.connect(t.ig),t.Se[i.id]=e,i.A.connect(e)}function W(t,i){i.A.disconnect(0),t.Se[i.id].disconnect(0),delete t.Se[i.id]}function U(t,i){var e,n;if(!i.ib)return null;for(t.gb?(e=t.Ib.createBufferSource(),e.buffer=i.ib,n=new ni(i,e),V(t,n)):t.Ja&&((e=t.Te[i.name])&&0<e.length?(n=e.pop(),ai(n)):(e=i.ib.cloneNode(!0),n=new ni(i,e))),e=0;e<t.Hb.length;e+=1)if(void 0===t.Hb[e])return t.Hb[e]=n;return t.Hb.push(n),n}function J(t){var i,e,n=ba;for(i=0;i<t.length;i+=1)if(e=t[i].split(".").pop(),n.Pn[e])return t[i];return!1}function K(t,i,e){if("number"!=typeof e&&(e=0),0<i.Lb){var n;n=i.id,n=void 0!==t.Sa[n]?t.Sa[n]:1,ii(t,i.id,0),Q(t,i.id,n,i.Lb,i.Gc),i.Lb=0,i.Gc=void 0}t.gb&&P(t,i)?(i.Ek=1e3*t.Ib.currentTime-(e-i.zb),i.A.loop=i.fj,i.A.start?i.A.start(0,e/1e3):i.A.noteGrainOn&&i.A.noteGrainOn(0,e/1e3,i.$h/1e3),i.Lf=!0,t.Sb+=1):t.Ja&&P(t,i)&&(i.A.play(),i.Lf=!0,t.Sb+=1)}function Q(t,i,e,n,a,s){var o;for(o=0;o<t.vd.length;o+=1)if(t.vd[o].id===i){t.vd.splice(o,1);break}t.vd.push({id:i,vn:e,Ca:a||function(t,i,e,n){return t==n?i+e:e*(-Math.pow(2,-10*t/n)+1)+i},duration:n,n:0,start:void 0!==t.Sa[i]?t.Sa[i]:1,Tb:s,Ci:0})}function $(t){var i=ba;void 0===i.gf[t]&&(i.gf[t]=void 0!==i.Sa[t]?i.Sa[t]:1),ii(i,t,0)}function Z(t){var i=ba;void 0!==i.gf[t]&&(ii(i,t,i.gf[t]),delete i.gf[t])}function ti(t){var i=ba,e=1,n=X(i,t)[0];if(n)for(t=0;t<n.sa.length;t+=1)void 0!==i.Sa[n.sa[t]]&&(e*=i.Sa[n.sa[t]]);return Math.round(100*e)/100}function ii(t,i,e){var n,a=1,s=X(t,i);for(t.Sa[i]=e,i=0;i<s.length;i+=1){for(e=s[i],n=0;n<e.sa.length;n+=1)void 0!==t.Sa[e.sa[n]]&&(a*=t.Sa[e.sa[n]]);a=Math.round(100*a)/100,t.gb?t.Se[e.id].gain.value=a:t.Ja&&(e.A.volume=a)}}function ei(t,i,e,n,a,s,o){this.name=t,this.Ak=i,this.Bk=e,this.Vn=n,this.zc=!1,ii(ba,this.name,void 0!==a?a:1),this.jg=void 0!==s?s:10,this.sa=[],o&&(this.sa=this.sa.concat(o)),0>this.sa.indexOf(this.name)&&this.sa.push(this.name),this.ib=null,this.eg=0,this.v=null,l(this,this.Vn,1)}function ni(t,i){this.wb=t,this.zb=0,this.$h=this.wb.eg,this.A=i,this.gb&&(this.A.loopStart=this.zb,this.A.loopEnd=this.$h),ai(this)}function ai(t){if(t.ai(),ba.Ja)if(4===t.A.readyState)ba.Ja&&(t.A.currentTime=t.zb/1e3);else{var i=function(){ba.Ja&&(t.A.currentTime=t.zb/1e3),t.A.removeEventListener("canplaythrough",i,!1)};t.A.addEventListener("canplaythrough",i,!1)}}function si(t){return ba.gb?t.paused?t.ei:1e3*ba.Ib.currentTime-t.Ek:ba.Ja?Math.ceil(1e3*t.A.currentTime):void 0}function oi(t){this.name=t,this.text="",this.Mb=this.complete=!1}function hi(t,i){var e=new XMLHttpRequest;t.complete=!1,e.open("POST",i),e.setRequestHeader("Content-Type","text/plain;charset=UTF-8"),e.onreadystatechange=function(){4===e.readyState&&(t.complete=!0,t.Mb=200!==e.status,t.Mb?_i("Post Failed",{name:t.name}):_i("Post Complete",{name:t.name}))},e.send(t.text)}function ri(t){this.Jd=t,this.clear(),this.af=this.fe=this.ge=this.$e=this.Ze=this.cf=this.We=this.bf=this.df=this.Ye=this.Xe=0,li(this,this),di(this,this),vi(this,this),this.Qc=[],this.Me=[],this.ff=[],this.C=0,this.Dk=!1,Mi(this,this)}function li(t,i){window.addEventListener("click",function(t){var e=i.Jd,n=e.getBoundingClientRect(),a=e.width/n.width*(t.clientX-n.left),e=e.height/n.height*(t.clientY-n.top);if(!(0<i.C)&&(t.preventDefault(),i.ae.x=a,i.ae.y=e,i.Oe.push({x:i.ae.x,y:i.ae.y}),0<i.$e))for(t=i.t.length-1;t>=0&&!((a=i.t[t])&&a.j&&0>=a.C&&a.Qi&&(a=a.Qi(i.ae.x,i.ae.y),!0===a));t-=1);},!1),ci(t)}function ci(t){t.ae={x:0,y:0},t.Oe=[]}function di(t,i){var e=window;e.addEventListener("mousedown",function(t){0<i.C||(t.preventDefault(),i.yk>=Date.now()-1e3||(gi(i,0,t.clientX,t.clientY),pi(i,0)))},!1),e.addEventListener("mouseup",function(t){0<i.C||(t.preventDefault(),i.hg>=Date.now()-1e3||(gi(i,0,t.clientX,t.clientY),bi(i,0)))},!1),e.addEventListener("mousemove",function(t){0<i.C||(t.preventDefault(),gi(i,0,t.clientX,t.clientY))},!1),e.addEventListener("touchstart",function(t){var e=t.changedTouches;if(i.yk=Date.now(),!(0<i.C))for(t.preventDefault(),t=0;t<e.length;t+=1)gi(i,e[t].identifier,e[t].clientX,e[t].clientY),pi(i,e[t].identifier)},!1),e.addEventListener("touchend",function(t){var e=t.changedTouches;if(i.hg=Date.now(),!(0<i.C))for(t.preventDefault(),t=0;t<e.length;t+=1)gi(i,e[t].identifier,e[t].clientX,e[t].clientY),bi(i,e[t].identifier)},!1),e.addEventListener("touchmove",function(t){var e=t.changedTouches;if(!(0<i.C))for(t.preventDefault(),t=0;t<e.length;t+=1)gi(i,e[t].identifier,e[t].clientX,e[t].clientY)},!1),e.addEventListener("touchleave",function(t){var e=t.changedTouches;if(i.hg=Date.now(),!(0<i.C))for(t.preventDefault(),t=0;t<e.length;t+=1)gi(i,e[t].identifier,e[t].clientX,e[t].clientY),bi(i,e[t].identifier)},!1),e.addEventListener("touchcancel",function(t){var e=t.changedTouches;if(i.hg=Date.now(),!(0<i.C))for(t.preventDefault(),t=0;t<e.length;t+=1)gi(i,e[t].identifier,e[t].clientX,e[t].clientY),bi(i,e[t].identifier)},!1),fi(t),t.yk=0,t.hg=0}function fi(t){var i;for(t.$=[],i=0;16>i;i+=1)t.$[i]={id:-1,pb:!1,x:0,y:0};t.he=[]}function ui(t,i){var e,n=-1;for(e=0;16>e;e+=1)if(t.$[e].id===i){n=e;break}if(-1===n)for(e=0;16>e;e+=1)if(!t.$[e].pb){n=e,t.$[e].id=i;break}return n}function gi(t,i,e,n){i=ui(t,i);var a=t.Jd,s=a.getBoundingClientRect();-1!==i&&(t.$[i].x=a.width/s.width*(e-s.left),t.$[i].y=a.height/s.height*(n-s.top))}function pi(t,i){var e,n,a=ui(t,i);if(-1!==a&&!t.$[a].pb&&(t.he.push({me:a,x:t.$[a].x,y:t.$[a].y,pb:!0}),t.$[a].pb=!0,0<t.ge))for(e=t.t.length-1;e>=0&&!((n=t.t[e])&&n.j&&0>=n.C&&n.Ug&&(n=n.Ug(a,t.$[a].x,t.$[a].y),!0===n));e-=1);}function bi(t,i){var e,n,a=ui(t,i);if(-1!==a&&t.$[a].pb&&(t.he.push({me:a,x:t.$[a].x,y:t.$[a].y,pb:!1}),t.$[a].pb=!1,0<t.ge))for(e=t.t.length-1;e>=0&&!((n=t.t[e])&&n.j&&0>=n.C&&n.Vg&&(n=n.Vg(a,t.$[a].x,t.$[a].y),!0===n));e-=1);}function vi(t,i){window.addEventListener("keydown",function(t){0<i.C||wi(i,t.keyCode)},!1),window.addEventListener("keyup",function(t){0<i.C||yi(i,t.keyCode)},!1),mi(t)}function mi(t){var i;for(t.Ue=[],i=0;256>i;i+=1)t.Ue[i]=!1;t.de=[]}function wi(t,i){var e,n;if(!t.Ue[i]&&(t.de.push({key:i,pb:!0}),t.Ue[i]=!0,0<t.fe))for(e=0;e<t.t.length&&!((n=t.t[e])&&n.j&&0>=n.C&&n.Ri&&(n=n.Ri(i),!0===n));e+=1);}function yi(t,i){var e,n;if(t.Ue[i]&&(t.de.push({key:i,pb:!1}),t.Ue[i]=!1,0<t.fe))for(e=0;e<t.t.length&&!((n=t.t[e])&&n.j&&0>=n.C&&n.Si&&(n=n.Si(i),!0===n));e+=1);}function xi(){var t,i=va;for(t=0;t<i.Qc.length;t+=1)i.Qc[t].paused=Math.max(0,i.Qc[t].paused-1)}function _i(t,i){var e,n,a,s=va;if(void 0===e&&(e=null),s.ff.push({id:t,io:i,He:e}),0<s.af)for(n=0;n<s.t.length&&(!((a=s.t[n])&&a.j&&0>=a.C&&a.Tg)||null!==e&&e!==a||(a=a.Tg(t,i),!0!==a));n+=1);}function ki(t,i){var e=t.jb[i];e.visible&&(void 0!==e.canvas&&e.canvas!==pa.canvas&&pa.Eb(e.canvas),!1!==pa.canvas.aa||!0===e.Hc)&&(0===e.xk&&(0>=e.C&&(e.Za+=e.ho*t.rd/1e3),1===e.Th&&1===e.Vh&&0===e.ua?1===e.alpha?e.f.q(e.Za,e.x,e.y):e.f.drawByAlpha(e.Za,e.x,e.y,e.alpha):e.f.drawByTransform(e.Za,e.x,e.y,e.Th,e.Vh,e.ua,e.alpha)),1===e.xk&&(1===e.Th&&1===e.Vh&&0===e.ua?1===e.alpha?e.font.q(e.text,e.x,e.y):e.font.drawByAlpha(e.text,e.x,e.y,e.alpha):e.font.drawByTransform(e.text,e.x,e.y,e.Th,e.Vh,e.ua,e.alpha)))}function Si(t,i){var e=t.t[i];return e.visible&&(void 0!==e.canvas&&e.canvas!==pa.canvas&&pa.Eb(e.canvas),(!1!==pa.canvas.aa||!0===e.Hc)&&e.Na)?e.Na():void 0}function Ti(t){for(var i=0,e=0;i<t.t.length||e<t.jb.length;)if(e===t.jb.length){if(!0===Si(t,i))break;i+=1}else if(i===t.t.length)ki(t,e),e+=1;else if(t.jb[e].za>t.t[i].za||t.jb[e].za===t.t[i].za&&t.jb[e].depth>t.t[i].depth)ki(t,e),e+=1;else{if(!0===Si(t,i))break;i+=1}}function Mi(t,i){t.startTime=Date.now(),t.pe=t.startTime,t.cd=0,t.rd=0,t.um=200,t.ta="",t.Ql=function(){var t;if(0<i.C)i.Dk&&(Ei(i),Ti(i));else{t=Date.now(),i.rd=Math.min(i.um,t-i.pe),i.cd+=i.rd,""===i.ta&&(i.ta="start",ga.Fb(i.ta)),"start"===i.ta&&ga.complete(i.ta)&&(i.ta="load",ga.Fb(i.ta)),"load"===i.ta&&ga.complete(i.ta)&&(i.ta="game",ga.Fb(i.ta)),"undefined"!=typeof ba&&Y(i.rd);var e,n;if(0<i.Xe)for(e=0;e<i.t.length&&!((n=i.t[e])&&n.qa&&n.j&&0>=n.C&&!0===n.qa(i.rd));e+=1);var a,s;if(0!==i.Oe.length){if(0<i.Ye)for(n=i.t.length-1;n>=0;n-=1)if((a=i.t[n])&&a.j&&0>=a.C&&a.Pi)for(e=0;e<i.Oe.length;e+=1)s=i.Oe[e],!0!==s.Zb&&(s.Zb=a.Pi(s.x,s.y));i.Oe=[]}if(0!==i.he.length){if(0<i.df)for(n=i.t.length-1;n>=0;n-=1)if((a=i.t[n])&&a.j&&0>=a.C&&(a.mc||a.Kc))for(e=0;e<i.he.length;e+=1)s=i.he[e],!0!==s.Zb&&(s.pb&&a.mc?s.Zb=a.mc(s.me,s.x,s.y):!s.pb&&a.Kc&&(s.Zb=a.Kc(s.me,s.x,s.y)));i.he=[]}if(0!==i.de.length){if(0<i.bf)for(n=0;n<i.t.length;n+=1)if((a=i.t[n])&&a.j&&0>=a.C&&(a.Wg||a.Af))for(e=0;e<i.de.length;e+=1)s=i.de[e],!0!==s.Zb&&(s.pb&&a.Wg?s.Zb=a.Wg(s.key):!s.pb&&a.Af&&(s.Zb=a.Af(s.key)));i.de=[]}for(e=i.rd,n=i.Me.length=0;n<i.Qc.length;n+=1)a=i.Qc[n],void 0!==a.id&&0===a.paused&&(0<a.Fe||0<a.Fj)&&(a.Fe-=e,0>=a.Fe&&(i.Me.push({id:a.id,He:a.He}),0<a.Fj?(a.Fj-=1,a.Fe+=a.time):a.Fe=0));if(0<i.We&&0<i.Me.length)for(e=0;e<i.t.length;e+=1)if((n=i.t[e])&&n.Oi&&n.j)for(a=0;a<i.Me.length;a+=1)s=i.Me[a],!0===s.Zb||null!==s.He&&s.He!==n||(s.Zb=n.Oi(s.id));if(0<i.cf&&0<i.ff.length)for(e=0;e<i.t.length;e+=1)if((a=i.t[e])&&a.lc&&a.j&&0>=a.C)for(n=0;n<i.ff.length;n+=1)s=i.ff[n],!0===s.Zb||null!==s.He&&s.He!==a||(s.Zb=a.lc(s.id,s.io));if(i.ff.length=0,0<i.Ze)for(e=0;e<i.t.length&&!((n=i.t[e])&&n.kc&&n.j&&0>=n.C&&!0===n.kc(i.rd));e+=1);Ei(i),Ti(i),i.pe=t}window.Wm(i.Ql)},window.Wm(t.Ql)}function Ei(t){function i(t,i){return t.za===i.za?i.depth-t.depth:t.za>i.za?-1:1}var e,n;for(e=n=0;e<t.t.length;e+=1)t.t[e]&&(t.t[e].Xh&&(t.t[e].Xh=!1,t.t[e].j=!0),t.t[n]=t.t[e],n+=1);for(t.t.length=n,t.hf&&t.t.sort(i),t.hf=!1,e=n=0;e<t.jb.length;e+=1)t.jb[e]&&(t.jb[n]=t.jb[e],n+=1);t.jb.length=n,t.Zh&&t.jb.sort(i),t.Zh=!1}function ji(t,i){var e=va;void 0===t.group&&(t.group=0),void 0===t.visible&&(t.visible=!0),void 0===t.j&&(t.j=!0),void 0===t.depth&&(t.depth=0),void 0===t.za&&(t.za=0),void 0===t.C&&(t.C=0),void 0===t.xd&&(t.xd=[]),t.Xh=!1,void 0!==i&&!1===i&&(t.Xh=!0,t.j=!1),e.t.push(t),e.hf=!0,t.qa&&(e.Xe+=1),t.Pi&&(e.Ye+=1),(t.mc||t.Kc)&&(e.df+=1),(t.Wg||t.Af)&&(e.bf+=1),t.Oi&&(e.We+=1),t.lc&&(e.cf+=1),t.kc&&(e.Ze+=1),t.Qi&&(e.$e+=1),(t.Ug||t.Vg)&&(e.ge+=1),(t.Ri||t.Si)&&(e.fe+=1),t.Tg&&(e.af+=1),t.drawbeginPage&&t.drawbeginPage()}function Ci(t,i){var e=va;t.depth!==i&&(e.hf=!0),t.depth=i}function Li(t,i){var e;for(i=[].concat(i),void 0===t.xd&&(t.xd=[]),e=i.length-1;e>=0;e-=1)0>t.xd.indexOf(i[e])&&t.xd.push(i[e])}function Ai(t,i){var e,n,a=[];if(void 0===i||"all"===i||"master"===i)for(e=0;e<t.t.length;e+=1)n=t.t[e],void 0!==n&&a.push(n);else if("function"==typeof i)for(e=0;e<t.t.length;e+=1)n=t.t[e],void 0!==n&&i(n)&&a.push(n);else for(e=0;e<t.t.length;e+=1)n=t.t[e],void 0!==n&&0<=n.xd.indexOf(i)&&a.push(n);return a}function Ii(t){var i=Ai(va,t);for(t=0;t<i.length;t+=1){var e=i[t];e.C=Math.max(0,e.C-1)}}function Bi(t,i){var e=t.t.indexOf(i);if(!(0>e)){t.t[e].Yb&&t.t[e].Yb();var n=t.t[e];n.qa&&(t.Xe-=1),n.Pi&&(t.Ye-=1),(n.mc||n.Kc)&&(t.df-=1),(n.Wg||n.Af)&&(t.bf-=1),n.Oi&&(t.We-=1),n.lc&&(t.cf-=1),n.kc&&(t.Ze-=1),n.Qi&&(t.$e-=1),(n.Ug||n.Vg)&&(t.ge-=1),(n.Ri||n.Si)&&(t.fe-=1),n.Tg&&(t.af-=1),t.t[e]=void 0}}function zi(t,i){var e;switch(this.kind=t,this.r=null,this.kind){case 0:this.r={x:[i.x],y:[i.y]},this.oa=i.x,this.va=i.y,this.Fa=i.x,this.ab=i.y;break;case 2:this.r={x:[i.x,i.x+i.Pa-1,i.x+i.Pa-1,i.x,i.x],y:[i.y,i.y,i.y+i.Va-1,i.y+i.Va-1,i.y]},this.oa=i.x,this.va=i.y,this.Fa=i.x+i.Pa-1,this.ab=i.y+i.Va-1;break;case 3:this.r={x:[],y:[]},this.oa=i.x-i.zh,this.va=i.y-i.zh,this.Fa=i.x+i.zh,this.ab=i.y+i.zh;break;case 1:this.r={x:[i.rk,i.sk],y:[i.tk,i.uk]},this.oa=Math.min(i.rk,i.sk),this.va=Math.min(i.tk,i.uk),this.Fa=Math.max(i.rk,i.sk),this.ab=Math.max(i.tk,i.uk);break;case 4:for(this.r={x:[],y:[]},this.oa=i.x[0],this.va=i.y[0],this.Fa=i.x[0],this.ab=i.y[0],e=0;e<i.x.length;e+=1)this.r.x.push(i.x[e]),this.r.y.push(i.y[e]),this.oa=Math.min(this.oa,i.x[e]),this.va=Math.min(this.va,i.y[e]),this.Fa=Math.max(this.Fa,i.x[e]),this.ab=Math.max(this.ab,i.y[e]);this.r.x.push(i.x[0]),this.r.y.push(i.y[0]);break;default:this.va=this.oa=0,this.ab=this.Fa=-1}}function qi(t,i,e,n){return new zi(2,{x:t,y:i,Pa:e,Va:n})}function Fi(t){var i,e,n,a,s,o=1e6,h=-1e6,r=1e6,l=-1e6;for(i=0;i<t.I;i+=1)e=t.offsetX[i]-t.Sh,n=e+t.picWidth[i]-1,a=t.offsetY[i]-t.Uh,s=a+t.picHeight[i]-1,o>e&&(o=e),n>h&&(h=n),r>a&&(r=a),s>l&&(l=s);return new zi(2,{x:o,y:r,Pa:h-o+1,Va:l-r+1})}function Oi(n,a,s,o,h){var r,l,c,d,f;if(o<a+n.oa||o>a+n.Fa||h<s+n.va||h>s+n.ab)return!1;switch(n.kind){case 0:case 2:return!0;case 3:return c=(n.Fa-n.oa)/2,o-=a+n.oa+c,h-=s+n.va+c,c*c>=o*o+h*h;case 1:return c=a+n.r.x[0],d=s+n.r.y[0],a+=n.r.x[1],n=s+n.r.y[1],o===c?h===d:o===a?h===n:1>Math.abs(d+(o-c)*(n-d)/(a-c)-h);case 4:for(d=new t(0,0),f=new t(0,0),c=[],l=0;l<n.r.x.length-1;l+=1)d.x=n.r.x[l],d.y=n.r.y[l],f.x=n.r.x[l+1],f.y=n.r.y[l+1],c.push(e(i(d,f)));for(d=0;d<c.length;d+=1){f=new t(o,h),l=c[d],f=f.x*l.x+f.y*l.y,r=n;var u=a,g=s,p=c[d],b=new t(0,0),v=void 0,m=1e9;l=-1e10;for(var w=void 0,w=0;w<r.r.x.length;w+=1)b.x=u+r.r.x[w],b.y=g+r.r.y[w],v=b.x*p.x+b.y*p.y,m=Math.min(m,v),l=Math.max(l,v);if(r=m,r>f||f>l)return!1}return!0;default:return!1}}function Di(){this.depth=1e7,this.visible=!1,this.j=!0,this.group="Engine",this.U=[],this.Ve=this.C=this.ef=!1,this.Sc=1,this.Jb=-1,this.W=-1e6}function Gi(){this.depth=1e7,this.visible=!1,this.j=!0,this.group="Engine",this.hb=[],this.wd=[],this.clear(),this.Pq=!1,ji(this)}function Ri(t,i,e,n,a,s,o){e=qi(e,n,a,s),t.hb.push({keyCode:o,Qb:e,id:i,selected:!1})}function Hi(t,i){return i}function Yi(t,i,e,n){return i+t/n*e}function Ni(t,i,e,n,a){return void 0===a&&(a=3),i+e*Math.pow(t/n,a)}function Xi(t,i,e,n){return Ni(t,i,e,n,2)}function Pi(t,i,e,n){return i+e*Ni(n-t,1,-1,n,2)}function Vi(t,i,e,n){return Ni(t,i,e,n,3)}function Wi(t,i,e,n){return i+e*Ni(n-t,1,-1,n,3)}function Ui(t,i,e,n){return i+e*(n/2>t?Ni(t,0,.5,n/2,3):Ni(n-t,1,-.5,n/2,3))}function Ji(t,i,e,n,a){return void 0===a&&(a=1.70158),i+e*((1+a)*Math.pow(t/n,3)-a*Math.pow(t/n,2))}function Ki(t,i,e,n,a){return i+e*Ji(n-t,1,-1,n,a)}function Qi(t){return function(i,e,n,a,s,o,h){return t(i-Math.floor(i/a)*a,e,n,a,s,o,h)}}function $i(t,i,e){var n,a=0,s=1,o=[0],h=[0];for(void 0===i&&(i=[]);i.length<t.length;)i.push(!1);for(void 0===e&&(e=[]);e.length<t.length;)e.push(1/t.length);for(n=0;n<t.length;n+=1)a+=e[n];for(n=0;n<t.length;n+=1)e[n]/=a;for(n=0;n<t.length;n+=1)h.push(h[n]+e[n]),a=t[n]===Hi?0:i[n]?-1:1,o.push(o[n]+a),s=Math.max(s,o[n+1]);return function(n,a,r,l,c,d,f){var u,g;for(u=t.length-1,g=0;g<t.length;g+=1)if(n/l<=h[g+1]){u=g;break}return n=t[u](n/l-h[u],0,1,e[u],c,d,f),i[u]&&(n=-n),a+(o[u]+n)*r/s}}function Zi(t,i){function e(t,i){switch(i){case"floor":return Math.floor(ma.Jj*t);case"round":return Math.round(ma.Jj*t);default:return ma.Jj*t}}var n;if("number"==typeof t)return e(t,i);if("[object Array]"===Object.prototype.toString.call(t)){for(n=0;n<t.length;n++)t[n]=e(t[n],i);return t}if("object"==typeof t){for(n in t)t.hasOwnProperty(n)&&Zi(t[n],i);return t}}function te(t){return"big"===ma.size?void 0!==t.big?t.big:t:void 0!==t.small?t.small:t}function ie(){wo={Pb:{ed:"en-us",ie:["en-us","en-gb","nl-nl","zh-cn"]},k:{Kb:Zi(960),ec:Zi(640),qf:Zi(0),Z:Zi(0),pf:0,minHeight:Zi(780),gl:{id:"canvasBackground",depth:50},dc:{id:"canvasGame",depth:100,top:Zi(200,"round"),left:Zi(40,"round"),width:Zi(560,"round"),height:Zi(560,"round")},je:{id:"canvasGameUI",depth:150,top:0,height:Zi(180,"round")},ke:{id:"canvasMain",depth:200}},kb:{bigPlay:{type:"image",v:Gs,da:Zi(38),Xa:Zi(99),font:{align:"center",m:"middle",fontSize:te({big:52,small:36}),fillColor:"#01198a",K:{j:!0,color:"",offsetX:0,offsetY:2,blur:0}},uc:2,vc:Zi(30),fontSize:te({big:52,small:36})},difficulty_toggle:{type:"toggleText",v:As,da:Zi(164),Xa:Zi(40),font:{align:"center",m:"middle",fontSize:te({big:56,small:26}),fillColor:"#145e47",K:{j:!0,color:"#d2ff7b",offsetX:0,offsetY:2,blur:0}},J:[{id:"0",v:Qa,ja:"optionsDifficulty_easy"},{id:"1",v:Ka,ja:"optionsDifficulty_medium"},{id:"2",v:Ja,ja:"optionsDifficulty_hard"}],Xf:Zi(0),Yf:Zi(0),ek:Zi(10),uc:2,vc:Zi(20),fontSize:te({big:40,small:26})},music_toggle:{type:"toggle",v:As,da:Zi(106),Xa:Zi(40),font:{align:"center",m:"middle",fontSize:te({big:46,small:26}),fillColor:"#dec93f",K:{j:!0,color:"#d2ff7b",offsetX:0,offsetY:2,blur:0}},J:[{id:"on",v:qs,ja:"optionsMusic_on"},{id:"off",v:zs,ja:"optionsMusic_off"}],Xf:Zi(30),Yf:Zi(12),uc:2,vc:Zi(30)},sfx_toggle:{type:"toggle",v:As,da:Zi(106),Xa:Zi(40),font:{align:"center",m:"middle",fontSize:te({big:46,small:26}),fillColor:"#dec93f",K:{j:!0,color:"#d2ff7b",offsetX:0,offsetY:2,blur:0}},J:[{id:"on",v:Bs,ja:"optionsSFX_on"},{id:"off",v:Is,ja:"optionsSFX_off"}],Xf:Zi(30),Yf:Zi(12),uc:2,vc:Zi(30)},sfx_big_toggle:{type:"toggleText",v:As,da:Zi(106),Xa:Zi(40),font:{align:"center",m:"middle",fontSize:te({big:46,small:26}),fillColor:"#dec93f",K:{j:!0,color:"#d2ff7b",offsetX:0,offsetY:2,blur:0}},J:[{id:"on",v:"undefined"!=typeof Os?Os:void 0,ja:"optionsSFXBig_on"},{id:"off",v:"undefined"!=typeof Os?Fs:void 0,ja:"optionsSFXBig_off"}],Xf:Zi(29,"round"),Yf:Zi(8),uc:2,vc:Zi(30),fontSize:te({big:46,small:26})},language_toggle:{type:"toggleText",v:As,da:Zi(106),Xa:Zi(40),font:{align:"center",m:"middle",fontSize:te({big:46,small:26}),fillColor:"#dec93f",K:{j:!0,color:"#d2ff7b",offsetX:0,offsetY:2,blur:0}},J:[{id:"en-us",v:$a,ja:"optionsLang_en-us"},{id:"en-gb",v:Za,ja:"optionsLang_en-gb"},{id:"nl-nl",v:ts,ja:"optionsLang_nl-nl"},{id:"de-de",v:es,ja:"optionsLang_de-de"},{id:"tr-tr",v:is,ja:"optionsLang_tr-tr"},{id:"zh-cn",v:is,ja:"optionsLang_zh-cn"}],Xf:Zi(40),Yf:Zi(20),ek:Zi(10),uc:2,vc:Zi(30),fontSize:te({big:46,small:26})},default_text:{type:"text",v:Ls,da:Zi(40),Xa:Zi(40),font:{align:"center",m:"middle",fontSize:te({big:40,small:30}),fillColor:"#dec93f",K:{j:!0,color:"",offsetX:0,offsetY:2,blur:0}},uc:2,vc:Zi(30),fontSize:te({big:46,small:26})},default_image:{type:"image",v:Ls,da:Zi(40),Xa:Zi(40),vc:Zi(6)},options:{type:"image",v:js}},yg:{green:{font:{align:"center",m:"middle",fillColor:"#dec93f",K:{j:!0,color:"",offsetX:0,offsetY:2,blur:0}}},yellow:{font:{align:"center",m:"middle",fillColor:"#145e47",K:{j:!0,color:"",offsetX:0,offsetY:2,blur:0}}},blue:{font:{align:"center",m:"middle",fillColor:"#01198a",K:{j:!0,color:"#7bfdff",offsetX:0,offsetY:2,blur:0}}},bluegreen:{font:{align:"center",m:"middle",fillColor:"#01198a",K:{j:!0,color:"#7bfdff",offsetX:0,offsetY:2,blur:0}}},orange:{font:{align:"center",m:"middle",fillColor:"#9a1900",K:{j:!0,color:"#ffb986",offsetX:0,offsetY:2,blur:0}}}},buttons:{default_color:"green"},O:{nr:20},dj:{Xp:5e3,Lp:3e3,cs:Zi(344),bs:Zi(142),ds:{align:"center"},es:{align:"bottom"},it:12,ht:100,jt:Zi(40),kt:{align:"center"},lt:Zi(500),Hs:Zi(400),Is:{align:"center"},Js:Zi(600),Cs:Zi(15),Ds:Zi(15),Es:Zi(10),Fs:Zi(10),Gs:Zi(4),ft:{},An:{align:"center"},Bn:Zi(560)},Gh:{gs:1e3,Ab:[{type:"bigPlay",x:{align:"center"},y:Zi(610),width:Zi(396,"round"),ja:"startScreenPlay",onclick:"start"},{type:"difficulty_toggle",x:Zi(192),y:Zi(840),width:Zi(308,"round"),onclick:"difficulty"},{type:"options",x:Zi(50),y:Zi(830),onclick:"options"}],xg:Zi(820),Jq:!0,backgroundImage:void 0!==typeof Ns?Ns:void 0,Ep:"undefined"!=typeof Ad?Ad:void 0,Gp:Zi(20,"round"),Fp:{align:"center"},hk:Zi(500),qr:Zi(30),or:Zi(44,"round"),rr:Zi(4),pr:{B:"ff_dimbo_regular",align:"center",m:"middle",fontSize:te({big:27,small:24}),fillColor:"#ffffff",stroke:!0,Oa:.7,sc:te({big:6,small:3}),strokeColor:"#0a1b66",rc:!0}},Gd:{fq:Zi(90),Em:Zi(656),eq:"options",xc:{m:"bottom"},Wf:{align:"center"},Ge:Zi(164,"round"),ik:Zi(232),En:Zi(98),Xr:Zi(114),Nn:Zi(110),Wr:Zi(466),Mn:Zi(110),type:"grid",cq:3,Ms:3,dq:5,Ns:4,ol:!0,Oo:!0,Kl:Zi(78),Ll:Zi(220),Nl:Zi(220),Ml:Zi(20),jp:Zi(18),kp:Zi(18),xp:{Mi:{fontSize:te({big:70,small:38}),fillColor:"#3F4F5E",align:"center",m:"middle",K:{j:!0,color:"#D0D8EA",offsetX:0,offsetY:Zi(6),blur:0}}},yp:{Mi:{fontSize:te({big:32,small:16}),fillColor:"#3F4F5E",align:"center",m:"middle",K:{j:!0,color:"#D0D8EA",offsetX:0,offsetY:Zi(2),blur:0}}},lm:Zi(438),mm:Zi(438),em:{align:"center"},fm:{align:"center"},rm:{align:"center"},sm:{align:"center",offset:Zi(-22)},hm:{align:"center"},im:{align:"center",offset:Zi(-16)},fn:Zi(418),Uj:Zi(574),en:{fontSize:te({big:24,small:12}),fillColor:"#3F4F5E",align:"center"},gn:Zi(10),wj:{fontSize:te({big:24,small:12}),fillColor:"#3F4F5E",align:"center"},Jm:{align:"center"},qq:Zi(588),pq:Zi(160),oq:Zi(40),backgroundImage:"undefined"!=typeof s_screen_levelselect?s_screen_levelselect:void 0,jr:Zi(10),kr:200,ir:Zi(200),Bs:Zi(600),$p:800,Zp:500},Zg:{kq:"undefined"!=typeof Hs?Hs:void 0,lq:{align:"center"},sj:{align:"center"},ph:[{type:"y",ca:0,duration:800,end:{align:"center",offset:Zi(-12)},Ca:Ki,wb:so}],qh:[{type:"y",ca:0,duration:600,end:-Hs.height,Ca:Ji,ug:!0}],Rk:{align:"center",m:"middle"},Tk:{align:"center"},Uk:0,Tl:{align:"center",m:"middle"},Ul:{align:"center"},Vl:0,mq:3500,gt:[{ja:"levelStartScreenTitle",font:{fontWeight:"bold",fontSize:74,fillColor:"white",stroke:!0,strokeColor:"black",sc:3,align:"center",m:"middle"},ot:{align:"center",fontSize:74},pt:{align:"top",fontSize:74,offset:Zi(-20)},Os:!1}],font:{fontWeight:"bold",fontSize:74,fillColor:"white",stroke:!0,strokeColor:"black",sc:3,align:"center",m:"middle"}},Y:{rh:{Jg:"undefined"!=typeof Ps?Ps:void 0,$o:"undefined"!=typeof s_overlay_endless?s_overlay_endless:void 0,zp:"undefined"!=typeof s_overlay_level_win?s_overlay_level_win:void 0,wp:"undefined"!=typeof s_overlay_level_fail?s_overlay_level_fail:void 0},mr:500,ki:800,Nk:Ki,Ok:800,Pk:Vi,tb:{align:"center"},lb:{align:"center",m:"middle",fontSize:te({big:36,small:23})},xc:{align:"center",m:"middle",fontSize:te({big:36,small:23})},Wf:{align:"center"},Ge:Zi(164),nn:{align:"center",m:"middle",fontSize:te({big:62,small:28})},fr:{align:"center"},gr:Zi(236),pl:{align:"center",m:"top",fontSize:te({big:50,small:18})},Yo:{align:"center"},Zo:Zi(240),zi:{align:"center",m:"top",fontSize:te({big:36,small:34})},sl:{align:"center"},Bi:Zi(286),rl:Zi(240),ql:Zi(60),Yj:{align:"center",m:"top",fontSize:te({big:24,small:12})},Kh:{align:"center",m:"top"},Zj:Zi(400),ye:Zi(14),ln:Zi(10),Jh:{align:"center",m:"top",fontSize:te({big:30,small:18})},Wj:Zi(10),Xj:Zi(4),$j:Zi(200),et:Zi(50),mo:Zi(76),no:Zi(600),fp:Zi(350),gp:Zi(600),Bg:Zi(530),Cg:Zi(10),of:Zi(90),nf:Zi(90),Oj:Zi(58),Pj:Zi(120),Qj:Zi(236),Rj:Zi(96),Sj:Zi(414),Tj:Zi(120),dt:200,Sq:500,bn:800,dn:0,Vq:0,Uq:300,Tq:200,cn:300,bp:.8,cp:"#000000",Am:Zi(508),gj:Zi(394),wm:Zi(96),xm:Zi(74),bh:3,qe:400,Np:200,Ls:0,Qp:Zi(100),ym:1.5,Vp:{align:"center"},Wp:Zi(76),dh:Zi(180),Up:Zi(36),zm:{align:"center",m:"middle",fontSize:te({big:28,small:18}),B:"ff_opensans_extrabold",fillColor:"#1d347f",K:{j:!0,color:"#68cbfa",offsetY:Zi(2)}},vm:500,Op:500,Pp:Zi(-30),Sp:500,Rp:0,Tp:4e3,Hn:600,Ar:1500,xo:500,pi:750,type:{level:{qg:"level",qc:!0,xe:!0,Vf:"title_level",qd:"totalScore",pg:"retry",Og:"next"},failed:{qg:"failed",qc:!1,xe:!1,Vf:"title_level",on:"subtitle_failed",pg:"exit",Og:"retry"},endless:{qg:"endless",qc:!1,xe:!0,Vf:"title_endless",Ai:"totalScore",qd:"highScore",pg:"exit",Og:"retry"},difficulty:{qg:"difficulty",qc:!1,xe:!1,Vf:"title_difficulty",Ai:"timeLeft",qd:["totalScore","timeBonus"],pg:"exit",Og:"retry"}}},Ff:{backgroundImage:"undefined"!=typeof Vs?Vs:void 0},options:{backgroundImage:Ys,tb:Zi(36),lb:0,xc:{},Wf:{align:"center"},font:{align:"center",m:"middle",fontSize:te({big:46,small:36}),fillColor:"#dec93f",K:{j:!0,color:"#d2ff7b",offsetX:0,offsetY:2,blur:0}},Ge:Zi(120),el:Zi(460,"center"),cl:{align:"center"},dl:{align:"center",offset:Zi(86)},mf:Zi(10,"round"),Bg:Zi(510),Cg:Zi(10),of:Zi(180),nf:Zi(90),buttons:{startScreen:["tutorial","sfx","language","moreGames","about"],levelMapScreen:["startScreen","sfx","language","moreGames","about"],inGame:["resume","tutorial","sfx","moreGames","quit"]},oj:800,pj:Ki,qj:600,rj:Vi,Of:{align:"center",fontSize:te({big:54,small:40})},Tm:{align:"center",fontSize:te({big:44,small:40})},Um:Zi(260),se:Zi(460),Sm:Zi(300),Pm:"default_text",Qm:{align:"center",fontSize:te({big:44,small:40})},Rm:Zi(530),Mm:"default_text",Nm:{align:"center",fontSize:te({big:44,small:40})},Om:Zi(630,"round"),od:Zi(460,"round"),yc:"undefined"!=typeof Xs?Xs:void 0,lk:{align:"center"},Je:Zi(84,"round"),nk:{align:"center",m:"top"},ok:Zi(480),Jn:Zi(60),Mr:{align:"center"},Nr:Zi(160,"round"),Hr:{align:"center"},Ir:Zi(240,"round"),Kr:{align:"center"},Lr:Zi(540,"round"),mk:{m:"middle",align:"center",fontSize:te({big:42,small:34})},$f:Zi(480),Jr:Zi(160),Fr:Zi(224,"round"),Gr:Zi(686,"round"),Dr:Zi(350,"round"),Er:Zi(686,"round"),ii:{align:"center",m:"top",fillColor:"#004F5D",fontSize:te({big:34,small:30}),Aa:Zi(6)},lg:Zi(480),Ik:Zi(110),Jk:{align:"center"},Kk:Zi(210,"round"),Yn:{align:"center"},Hk:Zi(120),Zn:{align:"center"},$n:Zi(350),Fk:{align:"center"},Gk:Zi(500),kg:Zi(480),Lk:{align:"center",m:"top",fillColor:"#808080",fontSize:te({big:18,small:14})},co:{align:"center"},eo:Zi(610),bo:Zi(440),ao:Zi(20),kf:Zi(200),ji:Zi(200),Tr:Zi(80),Ur:Zi(140),Sr:Zi(10)},os:{backgroundImage:"undefined"!=typeof s_overlay_dialog?s_overlay_dialog:Ys,tb:{align:"center"},lb:Zi(120),el:Zi(460,"round"),cl:{align:"center"},dl:{align:"bottom",offset:Zi(70)},mf:Zi(10,"round"),Bg:Zi(510),Cg:Zi(10),of:Zi(130),nf:Zi(90),oj:800,pj:Ki,qj:600,rj:Vi,Rs:{},Us:{align:"center"},Vs:{align:"center",offset:Zi(60)},Ts:Zi(460),Ss:Zi(300)},Pg:{backgroundImage:"undefined"!=typeof s_screen_end?s_screen_end:void 0,An:{align:"center"},Bn:Zi(152),lr:Zi(560),font:{align:"center",m:"middle",fontSize:te({big:58,small:32}),fillColor:"#FFFFFF"},yo:{align:"center"},zo:Zi(600),bl:Zi(460),al:"default_text"}}
  4. }function ee(){xo={debug:{Po:!1,So:!1,cr:!1},Fi:{offset:Zi(-4,"round"),Ld:Zi(278,"round"),Md:Zi(52,"round")},oe:{El:"Solitaire",ic:"difficulty",Bm:["resume","tutorial","sfx","restart","quit"]},ub:{Mg:Zi(0,"round"),Ng:Zi(40,"round"),offset:Zi(-4,"round"),Ld:Zi(38,"round"),Md:Zi(170,"round")},Rb:{Ld:Zi(38,"round"),Md:Zi(52,"round")},Ea:{Mg:Zi(20,"round"),Ng:Zi(0,"round"),Ld:Zi(118,"round"),Md:Zi(52,"round")},ui:{To:500,shadowOffsetX:Zi(4,"round"),shadowOffsetY:Zi(4,"round")},oc:{kl:Zi(198,"round"),ll:Zi(52,"round"),nq:350,uj:300,dr:500,er:50},Wa:{ko:150,lo:200,Bo:!0,hl:400,wi:!0,ps:100,No:500,yi:400,wq:50,xq:500,tr:50,ur:300,vr:180,wr:-50,xr:500},As:3,km:[{name:"EASY",Jc:{tf:1,ak:!0,vj:!1},N:{ed:500,Xi:36e4,gk:1e3,tj:0,mh:30,move:0,hh:10,hj:-50,fh:25,Di:0,Cj:-200,Li:0,ri:1e3,qi:10}},{name:"MEDIUM",Jc:{tf:1,ak:!0,vj:!0},N:{ed:1e3,Xi:36e4,gk:1e3,tj:0,mh:60,move:0,hh:20,hj:-100,fh:50,Di:0,Cj:-400,Li:0,ri:1e3,qi:20}},{name:"HARD",Jc:{tf:3,ak:!0,vj:!0},N:{ed:1500,Xi:36e4,gk:1e3,tj:0,mh:90,move:0,hh:30,hj:-150,fh:75,Di:0,Cj:-600,Li:0,ri:1e3,qi:30}}]}}function ne(){So={buttons:{default_color:"green",bigPlay:"blue",difficulty_toggle:"yellow"},$b:{Xk:.2},Gh:{po:[{v:Ns,x:0,y:0},{v:"undefined"!=typeof Ad?Ad:void 0,y:Zi(20,"round"),x:{align:"center"}}]},Gd:{po:[{v:"undefined"!=typeof s_screen_levelselect?s_screen_levelselect:void 0,x:0,y:0}],xc:{B:ao.B,align:"center",m:"middle",fillColor:"#004f5d",fontSize:te({big:32,small:18})},en:{B:ao.B,fontSize:te({big:40,small:24}),fillColor:"#004f5d",align:"center"},wj:{B:ao.B,fontSize:te({big:40,small:24}),fillColor:"#004f5d",align:"center"}},Zg:{sj:-Hs.height,Rk:{B:ao.B,align:"center",m:"top",fontSize:te({big:34,small:20}),fillColor:"#6c915e"},Tk:{align:"center"},Uk:Zi(412,"round"),ng:Zi(500),Sk:Zi(80),Tl:{B:ao.B,fontSize:te({big:44,small:26}),fillColor:"#6c915e",align:"center",m:"middle"},Ul:{align:"center"},Vl:Zi(370,"round")},Y:{tb:{align:"center"},lb:Zi(52),sj:"undefined"!=typeof s_overlay_endless?-s_overlay_endless.height:"undefined"!=typeof Ps?-Ps.height:"undefined"!=typeof s_overlay_level_win?-s_overlay_level_win.height:0,ph:[{type:"y",ca:0,duration:800,end:Zi(14),Ca:Ki,ug:!0}],qh:[{type:"y",ca:0,duration:600,end:"undefined"!=typeof s_overlay_endless?-s_overlay_endless.height:"undefined"!=typeof Ps?-Ps.height:"undefined"!=typeof s_overlay_level_win?-s_overlay_level_win.height:0,Ca:Vi,ug:!0}],xc:{B:ao.B,align:"center",m:"top",fontSize:te({big:64,small:22}),fillColor:"#dec93f"},mt:!0,pl:{B:ao.B,align:"center",m:"top",fillColor:"#6c915e",fontSize:te({big:36,small:18})},Bi:Zi(300),zi:{B:ao.B,align:"center",m:"top",fillColor:"#dec93f",fontSize:te({big:42,small:36})},Yj:{B:ao.B,m:"bottom",fillColor:"#6c915e",fontSize:te({big:36,small:18})},ye:Zi(4),Jh:{B:ao.B,m:"bottom",fillColor:"#dec93f",fontSize:te({big:30,small:15})},nn:{B:ao.B,align:"center",m:"middle",fontSize:te({big:72,small:36}),fillColor:"#01513d"}},options:{lb:Zi(70),oj:800,pj:Ki,qj:600,rj:Vi,Of:{align:"center",m:"middle",fontSize:te({big:50,small:35}),fillColor:"#446d48"},xc:{B:ao.B,align:"center",m:"top",fontSize:te({big:44,small:22}),fillColor:"#6c915e"},mk:{m:"middle",align:"center",fontSize:te({big:32,small:23}),fillColor:"#6c915e"},nk:{align:"center",m:"top",fontSize:te({big:46,small:28}),fillColor:"#dec93f"},ii:{align:"center",m:"top",fillColor:"#6c915e",fontSize:te({big:38,small:24}),Aa:Zi(6)}},Pg:{font:{B:ao.B,align:"center",m:"middle",fontSize:te({big:78,small:52}),fillColor:"#037564",stroke:!0,sc:Zi(5,"round"),strokeColor:"#ffffff",rc:!0}}}}function ae(){To={nt:{alpha:1}}}function se(t,i){for(var e in t.prototype)i.prototype[e]=t.prototype[e]}function oe(t,i,e,n){this.jk=this.xf=t,this.Eo=i,this.duration=1,this.jl=n,this.Zc=e,this.zg=null,this.Ie=0}function he(t,i){t.Ie+=i,t.Ie>t.duration&&t.zg&&(t.zg(),t.zg=null)}function re(){this.za=this.depth=0,this.visible=!1,this.j=!0,this.a=ma.a.h.O,this.rq=this.a.nr,ji(this),Li(this,"system")}function le(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var i=16*Math.random()|0;return("x"===t?i:3&i|8).toString(16)})}function ce(t,i,e,n){var a,s;for(a=0;a<t.M.length;a++)void 0!==t.M[a]&&t.M[a].tag===i&&(s=t.M[a],t.X(void 0!==e?e:s.wl,void 0!==n?n:s.Im,s.n),s.j=!1)}function de(){var t,i=ma.O,e=ma.e.Yd;for(t=0;t<i.M.length;t++)void 0!==i.M[t]&&i.M[t].tag===e&&(i.M[t].paused-=1,i.M[t].paused=Math.max(i.M[t].paused,0))}function fe(){this.depth=100,this.j=this.visible=!0,ma.b.Ya(this,ma.Ic),this.a=ma.a.h.Gh,this.kb=ma.a.h.kb;for(var t in ma.a.L.Gh)this.a[t]=ma.a.L.Gh[t];this.Xo=function(t,i,e,n){t=n-t;var a=3,s=2;void 0===a&&(a=3),void 0===s&&(s=8);var o,a=Math.sin(2*(1-t/n)*Math.PI*a+Math.PI/2);return void 0===s&&(s=8),o=Math.pow(2,-s),a*=0+(Math.pow(2,s*t/n-s)-o)/(1-o)*1,i+e*(1+-1*a)},this.hn=$i([Ki,this.Xo,Hi],[!0,!1,!1],[.02,.1,.88]),this.Fh=!1!==ma.G.Fh,ji(this,!1)}function ue(t){var i,e,n;v(t.Eg),pa.clear(),i=Us.P(),x(i,t.a.pr),e=ma.w.R("startScreenByTinglyGames","<STARTSCREENBYTINGLYGAMES>"),n=O(i,e,t.a.hk,t.a.hk,!1),n<i.fontSize&&k(i,n),i.q(e,Math.round(pa.width/2),Math.round(pa.height/2)),m(t.Eg),t.Hc=!0}function ge(t){var i,e,n,a,s=0;for(a=0,ma.ud.height<t.a.xg&&(a=t.a.xg-ma.ud.height),i=0;i<t.Ab.length;i++)e=t.a.Ab[i],n=t.kb[e.type],t.Ab[i].y=ma.b.g(e.y,t.canvas.height,n.v.height)-a,s=Math.max(t.Ab[i].y+n.v.height,s);t.Fh&&(t.Fg=ma.ud.height-t.a.or-ma.Ac,t.Fg=Math.max(t.Fg,s+t.a.rr))}function pe(){this.depth=100,this.j=this.visible=!0,ma.b.Ya(this,ma.Ic),this.a=ma.a.h.Gd;var t;if(ma.a.i.Gd)for(t in ma.a.i.Gd)this.a[t]=ma.a.i.Gd[t];this.Bb=ma.a.h.kb;for(var i in ma.a.L.Gd)this.a[i]=ma.a.L.Gd[i];this.Id=-1,this.na=0,this.km=[],ji(this)}function be(t){if("grid"===t.a.type){v(t.bj),pa.clear(),t.Hd=[];var i=function(i,e,n){for(var a,s,o,h,r,l,c,d,f,u,g,p,v,m,w,y,x=ma.p.ba[i],_=t.$a?t.a.jp:t.a.kp,k=t.a.Kl,S=_,T=t.$a?t.a.cq:t.a.dq,M=Math.floor(x/T);1<Math.abs(M-T);)T-=1,M=Math.floor(x/T);for(M=Math.ceil(x/T),w=Math.round((t.canvas.width-2*k)/T),y=Math.round(((t.$a?t.a.lm:t.a.mm)-(M+1)*_)/M),a=0;M>a;a++){for(s=0;T>s;s++){if(d=t.a.ol,g=t.a.Oo,o=a*T+s,o>=x)return;if(f=ma.p.Gg||"locked",u=0,h=Zn(i,o,void 0,void 0),"object"==typeof h&&null!==h&&(void 0!==h.state&&(f=h.state),"object"==typeof h.stats&&null!==h.stats&&(u=h.stats.stars||0)),p="locked"===f,"function"==typeof ma.i.ip&&(r=ma.i.ip(oa(ma.e,i,o),i,o,f))&&(g=p=d=!1),h=k+e,c=S,m=v=1,!1!==g){if(l=t.$a?Ma:Ia,"played"===f)switch(u){case 1:l=t.$a?Ea:Ba;break;case 2:l=t.$a?ja:za;break;case 3:l=t.$a?Ca:qa}else t.$a||"locked"!==f||(l=Da);l.width>w&&(m=w/l.width),l.height>y&&(m=Math.min(v,y/l.height)),h+=Math.round((w-l.width*m)/2),c+=Math.round((y-l.height*m)/2),l.drawByTransform(0,h,c,m,m,0,1),n&&(t.Hd[o]={x:h,y:c})}r&&(r.width>w&&(v=w/r.width),r.height>y&&(v=Math.min(v,y/r.height)),void 0!==l?(u=ma.b.g(t.a.em,l.width*m,r.width*v),g=ma.b.g(t.a.fm,l.height*m,r.height*v)):(u=ma.b.g(t.a.em,w,r.width*v),g=ma.b.g(t.a.fm,y,r.height*v),n&&(t.Hd[o]={x:h+u,y:c+g})),r instanceof b?r.drawByTransform(h+u,c+g,v,v,0,1):r.drawByTransform(0,h+u,c+g,v,v,0,1)),!1===d||p||(o=o+1+"",d=t.fonts.Mi,"locked"===f&&void 0!==t.fonts.Dp?d=t.fonts.Dp:"unlocked"===f&&void 0!==t.fonts.Pr?d=t.fonts.Pr:"played"===f&&void 0!==t.fonts.played&&(d=t.fonts.played),void 0!==l?(u=ma.b.ia(t.a.hm,l.width*m,d.ha(o),d.align),g=ma.b.ia(t.a.im,l.height*m,d.fa(o),d.m)):(u=ma.b.ia(t.a.hm,w,d.ha(o),d.align),g=ma.b.ia(t.a.im,y,d.fa(o),d.m)),d.q(o,h+u,c+g)),t.$a&&p&&(void 0!==l?(u=ma.b.g(t.a.rm,l.width*m,La.width),g=ma.b.g(t.a.sm,l.height*m,La.height)):(u=ma.b.g(t.a.rm,w,La.width),g=ma.b.g(t.a.sm,y,La.height)),La.q(0,h+u,c+g)),k+=w}k=t.a.Kl,S+=y+_}};t.Df&&i(t.u-1,0),i(t.u,t.canvas.width,!0),t.Cf&&i(t.u+1,2*t.canvas.width),m(t.bj)}}function ve(t,i){switch(i-t.u){case 0:t.ij=0;break;case 1:t.ij=-t.canvas.width;break;case-1:t.ij=t.canvas.width}t.re=!0,t.gh=0,t.moveStart=t.na,t.Dm=t.ij-t.na,t.eh=Math.min(t.a.$p-t.De,Math.round(Math.abs(t.Dm)/(t.Lh/1e3))),t.eh=Math.max(t.a.Zp,t.eh)}function me(t){if(1<ma.p.ba.length){var i,e;i=ma.b.g(t.a.Xr,t.canvas.width,Oa.width),e=ma.b.g(t.a.Nn,t.canvas.height,Oa.height)-(Math.abs(ma.a.h.k.Z)-t.yb),t.nd=new Re(i,e,t.depth-20,new Fi(Oa),[Oa],function(){return t.tc="previous",ve(t,t.u-1),!0}),i=ma.b.g(t.a.Wr,t.canvas.width,Fa.width),e=ma.b.g(t.a.Mn,t.canvas.height,Fa.height)-(Math.abs(ma.a.h.k.Z)-t.yb),t.ld=new Re(i,e,t.depth-20,new Fi(Fa),[Fa],function(){return t.tc="next",ve(t,t.u+1),!0}),we(t)}else t.jd-=t.a.Ml}function we(t){if(1<ma.p.ba.length){var i;t.Df?(i=[Oa],t.nd.Vb=!0):(i=[new b(Oa.width,Oa.height)],v(i[0]),Oa.q(1,0,0),m(i[0]),t.nd.Vb=!1),Ye(t.nd,i),t.Cf?(i=[Fa],t.ld.Vb=!0):(i=[new b(Fa.width,Fa.height)],v(i[0]),Fa.q(1,0,0),m(i[0]),t.ld.Vb=!1),Ye(t.ld,i)}}function ye(t){var i,e,n;v(t.Oc),pa.clear(),i=Us.P(),t.a.xc&&x(i,t.a.xc),L(i,"center"),A(i,"middle"),e=ma.w.R("levelMapScreenWorld_"+t.u,"<LEVELMAPSCREENWORLD_"+t.u+">"),n=O(i,e,t.a.ik,t.a.En,!1),n<i.fontSize&&k(i,n),i.q(e,t.Oc.width/2,t.Oc.height/2),m(t.Oc),t.canvas.aa=!0}function xe(t,i,e,n){this.depth=10,this.visible=!0,this.j=!1,ma.b.Ya(this,ma.Ic),this.type=i.failed?"failed":t,this.a=ma.a.h.Y,this.Da=this.a.type[this.type];for(var a in ma.a.L.Y)this.a[a]=ma.a.L.Y[a];if(ma.a.L.Y.type&&ma.a.L.Y.type[this.type])for(a in ma.a.L.Y.type[this.type])this.a[a]=ma.a.L.Y.type[this.type][a];if("failed"===this.type){if(void 0!==ma.a.i.Y&&ma.a.i.Y.type&&void 0!==ma.a.i.Y.type.failed)for(a in ma.a.i.Y.type[this.type])this.Da[a]=ma.a.i.Y.type[this.type][a]}else{if(void 0!==ma.a.i.Y&&void 0!==ma.a.i.Y.type)for(a in ma.a.i.Y.type[this.type])this.Da[a]=ma.a.i.Y.type[this.type][a];for(a in ma.a.i.Y)this.Da[a]=ma.a.i.Y[a]}this.mb=i,this.V=e,this.T=n,this.Rq=[ro,lo,co],this.Ad=[],this.xb=new Di,this.xb.parent=this,ji(this,!1)}function _e(t){var i;for(i=0;i<t.ma.length;i++)Qe(t.ma[i]);for(i=0;i<t.Qd.length;i++)Bi(va,t.Qd[i]);for(t.Qd=[],t.la&&Qe(t.la),t.la=void 0,i=0;i<t.buttons.length;i++)t.buttons[i].Vb=!1;t.xb.stop(),t.xb=void 0,Ce(t)}function ke(t,i){var e;switch(i){case"title_level":e=ma.w.R("levelEndScreenTitle_level","<LEVELENDSCREENTITLE_LEVEL>").replace("<VALUE>",t.mb.level);break;case"title_endless":e=ma.w.R("levelEndScreenTitle_endless","<LEVELENDSCREENTITLE_ENDLESS>").replace("<VALUE>",t.mb.stage);break;case"title_difficulty":e=ma.w.R("levelEndScreenTitle_difficulty","<LEVELENDSCREENTITLE_DIFFICULTY>")}void 0!==e&&t.Cc(t.a.xc,e,t.a.Wf,t.a.Ge)}function Se(t,i){var e;switch(i){case"subtitle_failed":e=ma.w.R("levelEndScreenSubTitle_levelFailed","<LEVEL_FAILED>")}void 0!==e&&t.Cc(t.a.nn,e,t.a.fr,t.a.gr)}function Te(t,i,e){var n,a,s,o,h,r;switch(i){case"totalScore":n=""+t.mb.totalScore,a=ma.w.R("levelEndScreenTotalScore","<LEVENENDSCREENTOTALSCORE>"),r=0;break;case"highScore":a=ma.w.R("levelEndScreenHighScore","<LEVENENDSCREENHIGHSCORE>"),n=""+t.mb.highScore;break;case"timeLeft":a=ma.w.R("levelEndScreenTimeLeft","<LEVENENDSCREENTIMELEFT>"),n=""+t.mb.timeLeft;break;case"timeBonus":a=ma.w.R("levelEndScreenTimeBonus","<LEVENENDSCREENTIMEBONUS>"),n=""+t.mb.timeBonus,r=t.mb.timeBonus}s=t.a.Yj,s.align="left",s.m="top",h=Us.P(),x(h,s),e?(A(h,"bottom"),s=t.a.Jh,s.align="left",s.m="bottom",e=Us.P(),x(e,s),s=o=0,void 0!==a&&(s+=h.ha(a)+t.a.ln),void 0!==n&&(s+=e.ha(n)),s=ma.b.g(t.a.Kh,t.canvas.width,s)-t.c.x,void 0!==a&&(h.q(a,s,t.Tf+h.fontSize),s+=h.ha(a)+t.a.ln,o+=h.fa(a)),void 0!==n&&(void 0!==r?(n=e.fa(n),h=t.Tf+h.fontSize-n,r=new $e(s,h,t.a.$j,n,t.depth-100,r,e,t.a.Wj,t.a.Xj,t.c),tn(r,t.f,s,h),o=Math.max(o,n)):(e.q(n,s,t.Tf+h.fontSize),o=Math.max(o,e.fa(n)))),o>0&&(t.Tf+=o+t.a.ye)):(void 0!==a&&(t.Cc(s,a,t.a.Kh,t.a.Zj),o=t.a.Zj,"object"==typeof o?(o.offset=void 0!==o.offset?o.offset+t.a.ye:t.a.ye,o.offset+=h.fa(a)):"number"==typeof o&&(o+=t.a.ye+h.fa(a))),void 0!==n&&(s=t.a.Jh,s.m="top",void 0!==r?(e=Us.P(),s.align="center",x(e,s),a=ma.b.g(t.a.Kh,t.canvas.width,t.a.$j)-t.c.x,h=o-t.c.y,r=new $e(a,h,t.a.$j,e.fa(n),t.depth-100,r,e,t.a.Wj,t.a.Xj,t.c),tn(r,t.f,a,h)):t.Cc(s,n,t.a.Kh,o))),r instanceof $e&&("totalScore"===i?t.$d=r:t.Ad.push(r))}function Me(t,i){var e,n,a,s;switch(i){case"totalScore":e=ma.w.R("levelEndScreenTotalScore","<LEVENENDSCREENTOTALSCORE>"),n=""+t.mb.totalScore,JJSDK.game.recordResult(t.mb.totalScore,6e4,function(){}),a=0;break;case"timeLeft":e=ma.w.R("levelEndScreenTimeLeft","<LEVENENDSCREENTIMELEFT>"),n=""+t.mb.timeLeft}void 0!==e&&t.Cc(t.a.pl,e,t.a.Yo,t.a.Zo),void 0!==n&&(void 0!==a?(e=Us.P(),n=t.a.zi,n.align="center",x(e,n),n=ma.b.g(t.a.sl,t.canvas.width,t.a.rl)-t.c.x,s=ma.b.g(t.a.Bi,t.canvas.height,t.a.ql)-t.c.y,a=new $e(n,s,t.a.rl,t.a.ql,t.depth-100,a,e,t.a.Wj,t.a.Xj,t.c),tn(a,t.f,n,s)):t.Cc(t.a.zi,n,t.a.sl,t.a.Bi)),a instanceof $e&&("totalScore"===i?t.$d=a:t.Ad.push(a))}function Ee(t,i){var e,n,a,s;switch(i){case"retry":e=Cs,n=function(){t.Tc="retry",_e(t)};break;case"exit":e=Ms,n=function(){t.Tc="exit",_e(t)}}void 0!==e&&(a=ma.b.g(t.a.mo,t.canvas.width,e.width)-t.c.x,s=ma.b.g(t.a.no,t.canvas.height,e.height)-t.c.y,t.buttons.push(new Re(a,s,t.depth-20,new Fi(e),[e],n,t.c)))}function je(t,i){var e,n,a,s;switch(i){case"retry":e=Rs,n=function(){t.Tc="retry",_e(t)};break;case"exit":e=Ds,n=function(){t.Tc="exit",_e(t)};break;case"next":e=Ds,n=function(){t.Tc="next",_e(t)}}void 0!==e&&(a=ma.b.g(t.a.fp,t.canvas.width,e.width)-t.c.x,s=ma.b.g(t.a.gp,t.canvas.height,e.height)-t.c.y,t.buttons.push(new Re(a,s,t.depth-20,new Fi(e),[e],n,t.c)))}function Ce(t){function i(){Bi(va,t),t.T?t.V.call(t.T,t.Tc):t.V(t.Tc)}var e,n;switch(t.a.as){case"toLeft":n="horizontal",e=-t.c.width;break;case"toRight":n="horizontal",e=t.canvas.width;break;case"toBottom":n="vertical",e=t.canvas.height+t.c.height;break;default:n="vertical",e=-t.c.height}"vertical"===n?Ke(t.c,"y",e,t.a.Ok,t.a.Pk,i):Ke(t.c,"x",e,t.a.Ok,t.a.Pk,i)}function Le(t,i){this.depth=-100,this.visible=!1,this.j=!0,ma.b.Ya(this,ma.Ic),this.a=ma.a.h.options,this.Bb=ma.a.h.kb;for(var e in ma.a.L.options)this.a[e]=ma.a.L.options[e];this.type=t,this.Or=i,ji(this)}function Ae(t,i,e,n,a,s){var o,h,r,l,c,d;switch(i){case"music":break;case"sfx_big":o="sfx_big_toggle",l=t.Gn,r=Qn()?"on":"off";break;case"sfx":o="sfx_toggle",l=t.Gn,h="optionsSFX_on",r=Qn()?"on":"off";break;case"language":o="language_toggle",l=t.yr,r=ma.e.language();break;case"tutorial":o="default_text",h="optionsTutorial",l=t.Qf;break;case"highScores":o="default_text",h="optionsHighScore",l=t.Xm,t.si=t.Lq;break;case"moreGames":void 0!==ma.G.Yp?(o="default_image",d=ma.G.Yp):(o="default_text",h="optionsMoreGames"),l=t.Mq,c=!0;break;case"resume":o="default_text",h="optionsResume",l=t.close;break;case"quit":o="default_text",h="optionsQuit",l=t.vq;break;case"restart":o="default_text",h="optionsRestart",l=t.Aq;break;case"startScreen":o="default_text",h="optionsStartScreen",l=t.Xm,t.si=t.Nq}void 0!==o&&void 0!==l&&("image"===t.Bb[o].type?t.buttons.push(new Xe(o,e,n,t.depth-20,d,a,{V:l,T:t,nc:c},t.c)):"toggleText"===t.Bb[o].type?t.buttons.push(new Pe(o,e,n,t.depth-20,r,a,{V:l,T:t,nc:c},t.c)):"text"===t.Bb[o].type?t.buttons.push(new Ne(o,e,n,t.depth-20,h,a,{V:l,T:t,nc:c},t.c)):"toggle"===t.Bb[o].type&&t.buttons.push(new Ve(o,e,n,t.depth-20,r,{V:l,T:t,nc:c},t.c)),t.buttons[t.buttons.length-1].Vb=s||!1)}function Ie(t,i,e,n){var a,s,o,h,r,l,c,d=t.a.buttons[t.type];if("inGame"===t.type&&ma.a.i.oe.Bm&&(d=ma.a.i.oe.Bm),!ma.G.Cm&&!ma.Aj.moreGamesUrl)for(a=0;a<d.length;a++){if("string"==typeof d[a]&&"moreGames"===d[a]){d.splice(a,1);break}for(s=0;s<d[a].length;s++)if("moreGames"===d[a][s]){d[a].splice(s,1);break}}if(!1===ma.G.yh)for(a=0;a<d.length;a++)if(d[a]instanceof Array){for(s=0;s<d[a].length;s++)if("music"===d[a][s]){d[a]="sfx_big",o=!0;break}if(o)break}if(ma.G.Pb&&ma.G.Pb.ie&&1===ma.G.Pb.ie.length)for(a=0;a<d.length;a++)if("language"===d[a]){d.splice(a,1);break}for(o=t.Bb.default_text.v.height,h=t.a.el,i=ma.b.g(t.a.cl,t.canvas.width,h)-i,l=ma.b.g(t.a.dl,t.c.f.height,o*d.length+t.a.mf*(d.length-1))-e+-1*ma.a.h.k.Z,a=0;a<d.length;a++){if(r=i,c=h,"string"==typeof d[a])Ae(t,d[a],r,l,c,n);else for(e=d[a],c=(h-(e.length-1)*t.a.mf)/e.length,s=0;s<e.length;s++)Ae(t,e[s],r,l,c,n),r+=c+t.a.mf;l+=o+t.a.mf}}function Be(t){var i,e,n,a,s,o=ma.b.g(t.a.tb,t.canvas.width,t.a.backgroundImage.width),h=ma.b.g(t.a.lb,t.canvas.height,t.a.backgroundImage.height)+-1*ma.a.h.k.Z;for(ma.O.X("versions","options"),i=0;i<t.buttons.length;i++)Bi(va,t.buttons[i]);t.buttons=[],t.Ga(o,h),v(t.c.f),void 0!==t.a.yc&&t.a.yc.q(0,ma.b.g(t.a.lk,t.c.width,t.a.yc.width),ma.b.g(t.a.Je,t.c.height,t.a.yc.height)),s=Us.P(),x(s,t.a.Lk),L(s,"left"),e=t.a.Tr,n=t.a.Ur;for(i in ma.version)a=i+": "+ma.version[i],s.q(a,e,n),n+=s.fa(a)+t.a.Sr;e=ma.b.g(t.a.Fk,t.c.f.width,t.a.kg),n=t.a.Gk,t.buttons.push(new Ne("default_text",e,n,t.depth-20,"optionsAbout_backBtn",t.a.kg,{V:function(){var i;for(t.Ga(o,h),i=0;i<t.buttons.length;i++)Bi(va,t.buttons[i]);t.buttons=[],Ie(t,o,h,!0)},T:t},t.c))}function ze(){this.depth=-200,this.j=this.visible=!0,ma.b.Ya(this,ma.wf),this.a=ma.a.h.Pg,this.Bb=ma.a.h.kb;for(var t in ma.a.L.Pg)this.a[t]=ma.a.L.Pg[t];ji(this)}function qe(t,i,e){this.qm=t||!1,this.host=i||"http://localhost:8080",this.Eq=e||this.host+"/services/storage/gamestate",this.rn="undefined"!=typeof window.localStorage}function Fe(t){return void 0!==ma.a.i.oe&&void 0!==ma.a.i.oe.El?ma.a.i.oe.El+"_"+t:"0_"+t}function Oe(t){var i=Math.max(0,6-Math.floor(Math.abs(t)).toString().length),i=Math.pow(10,i).toString().substr(1);return 0>t&&(i="-"+i),i+t}function De(t,i,e){var n;i=Fe(i);try{n=JSON.stringify({lastChanged:new Date,gameState:JSON.stringify(e)})}catch(a){}if(t.rn)try{window.localStorage.setItem(i,n)}catch(s){}t.qm||(n=new oi("gameState_"+i),n.text=void 0===JSON?"":JSON.stringify(e),hi(n,t.Eq+"/my_ip/"+i))}function Ge(t,i,e){var n,a;if(i=Fe(i),t.rn)try{(n=window.localStorage.getItem(i))&&(n=JSON.parse(n))}catch(s){return e}if(!t.qm){t=new oi("gameState_"+i),a=null;t:{var o=new XMLHttpRequest;o.open("GET",qe.Ws+"/my_ip/"+i,!1);try{o.send()}catch(h){i=!1;break t}t.complete=!0,t.Mb=200!==o.status,t.Mb?i=!1:(t.text=o.responseText,i=!0)}i&&(a=void 0===JSON?{}:JSON.parse(t.text))}try{if(n)return JSON.parse(a&&Date.parse(a.lastChanged)>Date.parse(n.lastChanged)?a.gameState:n.gameState);if(a)return JSON.parse(a.gameState)}catch(r){}return e}function Re(t,i,e,n,a,s,o){function h(t,i,e){return t=ma.b.Ni(l.canvas),(l.images&&0<l.Fd||0<l.Uf)&&(l.Fd=0,l.Uf=0,l.canvas.aa=!0),l.Mf&&l.Vb&&Oi(l.Qb,l.x+l.parent.x,l.y+l.parent.y,i-t.x,e-t.y)?(l.Mf=!1,void 0!==l.T?l.lh.call(l.T,l):l.lh(l)):void 0}function r(t,i,e){var n=ma.b.Ni(l.canvas);return l.Vb&&Oi(l.Qb,l.x+l.parent.x,l.y+l.parent.y,i-n.x,e-n.y)?(l.Mf=!0,l.images&&(1<l.images.length?(l.Fd=1,l.canvas.aa=!0):1<l.images[0].I&&(l.Uf=1,l.canvas.aa=!0)),void 0!==typeof ho&&ba.play(ho),l.me=t,!0):void 0}this.depth=e,this.j=this.visible=!0,this.group="TG_Token",ma.b.Ya(this,ma.Ic),this.x=t,this.y=i,this.alpha=this.Qa=this.Ka=1,this.ua=0,this.Qb=n,this.images=a,this.Uf=this.Fd=0,this.Mf=!1,this.Vb=!0,this.parent=void 0!==o?o:{x:0,y:0},this.Lj=this.Kj=0,this.Hc=!0,this.lh=function(){},this.nc=!1,"object"==typeof s?(this.lh=s.V,this.T=s.T,this.nc=s.nc):"function"==typeof s&&(this.lh=s);var l=this;this.nc?(this.Ug=r,this.Vg=h):(this.mc=r,this.Kc=h),ji(this)}function He(t,i,e,n){void 0===t.lf&&(t.lf=[]),t.lf.push({type:i,start:1,le:n,Ca:e,duration:4e3,n:0})}function Ye(t,i){t.images=i,t.canvas.aa=!0}function Ne(t,i,e,n,a,s,o,h){this.S=ma.a.h.kb[t],t=void 0!==ma.a.L.buttons?ma.a.h.yg[ma.a.L.buttons[t]||ma.a.L.buttons.default_color]:ma.a.h.yg[ma.a.h.buttons.default_color],this.font=Us.P(),t.font&&x(this.font,t.font),this.S.fontSize&&k(this.font,this.S.fontSize),this.ja=a,this.text=ma.w.R(this.ja,"<"+a.toUpperCase()+">"),void 0!==s&&(this.width=s),this.height=this.S.v.height,this.f={source:this.S.v,da:this.S.da,Xa:this.S.Xa},a=this.drawdificToggle(this.f),s=new qi(0,0,a[0].width,a[0].height),Re.call(this,i,e,n,s,a,o,h)}function Xe(t,i,e,n,a,s,o,h){this.S=ma.a.h.kb[t],void 0!==s&&(this.width=s),this.height=this.S.v.height,this.cc={source:this.S.v,da:this.S.da,Xa:this.S.Xa},this.f=a,t=this.drawdificToggle(),a=new qi(0,0,t[0].width,t[0].height),Re.call(this,i,e,n,a,t,o,h)}function Pe(t,i,e,n,a,s,o,h){var r;if(this.S=ma.a.h.kb[t],t=void 0!==ma.a.L.buttons?ma.a.h.yg[ma.a.L.buttons[t]||ma.a.L.buttons.default_color]:ma.a.h.yg[ma.a.h.buttons.default_color],this.font=Us.P(),t.font&&x(this.font,t.font),this.S.fontSize&&k(this.font,this.S.fontSize),void 0!==s&&(this.width=s),this.height=this.S.v.height,this.J=this.S.J,this.J.length){for(s=0;s<this.J.length;s++)if(this.J[s].id===a){this.ka=s;break}void 0===this.ka&&(this.ka=0),this.text=ma.w.R(this.J[this.ka].ja,"<"+this.J[this.ka].id.toUpperCase()+">"),this.Zd=this.J[this.ka].v,s=this.drawdificToggle(),t=new qi(0,0,s[0].width,s[0].height),r=this,a="function"==typeof o?function(){return r.Od(),o(r.J[r.ka].id)}:"object"==typeof o?{T:this,V:function(){return r.Od(),o.V.call(o.T,r.J[r.ka].id)}}:function(){r.Od()},Re.call(this,i,e,n,t,s,a,h)}}function Ve(t,i,e,n,a,s,o){var h;if(this.J=ma.a.h.kb[t].J,this.J.length){for(t=0;t<this.J.length;t++)if(this.J[t].id===a){this.ka=t;break}void 0===this.ka&&(this.ka=0),this.Zd=this.J[this.ka].v,t=new Fi(this.Zd),h=this,a="function"==typeof s?function(){return h.Od(),s(h.J[h.ka].id)}:"object"==typeof s?{T:this,V:function(){return h.Od(),s.V.call(s.T,h.J[h.ka].id)}}:function(){h.Od()},Re.call(this,i,e,n,t,[this.Zd],a,o)}}function We(t,i,e,n){this.depth=10,this.visible=!1,this.j=!0,ma.b.Ya(this,ma.Ic),this.a=ma.a.h.Zg;for(var a in ma.a.L.Zg)this.a[a]=ma.a.L.Zg[a];this.Vi=t,this.li=i,this.V=e,this.T=n,this.Jf="entering",this.In=!1,ji(this,!1),Li(this,"LevelStartDialog")}function Ue(t){var i,e,n,a,s;if("leaving"!==t.Jf){if(t.Jf="leaving",t.zd=0,i=function(){Bi(va,t),t.T?t.V.call(t.T):t.V&&t.V()},void 0!==t.a.qh)for(e=0;e<t.a.qh.length;e++)n=t.a.qh[e],a=void 0,n.ug&&(t.zd++,a=i),s=n.end,"x"===n.type?s=ma.b.g(s,t.canvas.width,t.c.f.width):"y"===n.type&&(s=ma.b.g(s,t.canvas.height,t.c.f.height)+Math.abs(ma.a.h.k.Z)),Ke(t.c,n.type,s,n.duration,n.Ca,a,n.ca,n.loop,n.ej);0===t.zd&&i()}}function Je(t,i,e){this.depth=t,this.j=this.visible=!0,ma.b.Ya(this,i),this.f=e,this.Za=0,this.width=e.width,this.height=e.height,this.nj=this.mj=this.y=this.x=0,this.Qa=this.Ka=1,this.ua=0,this.alpha=1,this.La=[],this.Qk=0,this.parent={x:0,y:0},ji(this,!1)}function Ke(t,i,e,n,a,s,o,h,r){var l,c=o>0;switch(i){case"x":l=t.x;break;case"y":l=t.y;break;case"xScale":l=t.Ka;break;case"yScale":l=t.Qa;break;case"scale":i="xScale",l=t.Ka,Ke(t,"yScale",e,n,a,void 0,o,h,r);break;case"angle":l=t.ua;break;case"alpha":l=t.alpha;break;case"subImage":l=0}t.La.push({id:t.Qk,n:0,j:!0,Ig:c,type:i,start:l,end:e,Tb:s,duration:n,Ca:a,ca:o,loop:h,ej:r}),t.Qk++}function Qe(t){var i;for(i=t.La.length-1;i>=0;i--){switch(t.La[i].type){case"x":t.x=t.La[i].end;break;case"y":t.y=t.La[i].end;break;case"xScale":t.Ka=t.La[i].end;break;case"yScale":t.Qa=t.La[i].end;break;case"angle":t.ua=t.La[i].end;break;case"alpha":t.alpha=t.La[i].end;break;case"subImage":t.Za=t.La[i].end}"function"==typeof t.La[i].Tb&&t.La[i].Tb.call(t)}}function $e(t,i,e,n,a,s,o,h,r,l){this.depth=a,this.visible=!0,this.j=!1,ma.b.Ya(this,ma.hc),this.x=t,this.y=i,this.Hf=h,this.If="object"==typeof r?r.top:r,this.tm="object"==typeof r?r.bottom:r,this.ha=e,this.fa=n,this.width=this.ha+2*this.Hf,this.height=this.fa+this.If+this.tm,this.value=s||0,this.parent=l||{x:0,y:0},this.font=o,this.ra=new b(this.width,this.height),this.Mc(),ji(this)}function Ze(t,i,e){t.j=!0,t.oi=t.value,t.value=t.oi,t.end=i,t.duration=e,t.Ca=Yi,t.n=0}function tn(t,i,e,n){t.ni=i,t.so=e-t.Hf||0,t.to=n-t.If||0,t.ro=0/0+2*t.Hf||t.width,t.oo=void 0+t.If+t.tm||t.height,t.Mc()}function en(t){if(null===t||"undefined"==typeof t)return"";t+="";var i,e,n="",a=0;i=e=0;for(var a=t.length,s=0;a>s;s++){var o=t.charCodeAt(s),h=null;if(128>o)e++;else if(o>127&&2048>o)h=String.fromCharCode(o>>6|192,63&o|128);else if(55296!==(63488&o))h=String.fromCharCode(o>>12|224,o>>6&63|128,63&o|128);else{if(55296!==(64512&o))throw new RangeError("Unmatched trail surrogate at "+s);if(h=t.charCodeAt(++s),56320!==(64512&h))throw new RangeError("Unmatched lead surrogate at "+(s-1));o=((1023&o)<<10)+(1023&h)+65536,h=String.fromCharCode(o>>18|240,o>>12&63|128,o>>6&63|128,63&o|128)}null!==h&&(e>i&&(n+=t.slice(i,e)),n+=h,i=e=s+1)}return e>i&&(n+=t.slice(i,a)),n}function nn(t){function i(t){var i,e="",n="";for(i=0;3>=i;i++)n=t>>>8*i&255,n="0"+n.toString(16),e+=n.substr(n.length-2,2);return e}function e(t,i,e,n,a,s,h){return t=o(t,o(o(e^(i|~n),a),h)),o(t<<s|t>>>32-s,i)}function n(t,i,e,n,a,s,h){return t=o(t,o(o(i^e^n,a),h)),o(t<<s|t>>>32-s,i)}function a(t,i,e,n,a,s,h){return t=o(t,o(o(i&n|e&~n,a),h)),o(t<<s|t>>>32-s,i)}function s(t,i,e,n,a,s,h){return t=o(t,o(o(i&e|~i&n,a),h)),o(t<<s|t>>>32-s,i)}function o(t,i){var e,n,a,s,o;return a=2147483648&t,s=2147483648&i,e=1073741824&t,n=1073741824&i,o=(1073741823&t)+(1073741823&i),e&n?2147483648^o^a^s:e|n?1073741824&o?3221225472^o^a^s:1073741824^o^a^s:o^a^s}var h,r,l,c,d,f,u,g,p,b=[];for(t=en(t),b=function(t){var i,e=t.length;i=e+8;for(var n=16*((i-i%64)/64+1),a=Array(n-1),s=0,o=0;e>o;)i=(o-o%4)/4,s=o%4*8,a[i]|=t.charCodeAt(o)<<s,o++;return i=(o-o%4)/4,a[i]|=128<<o%4*8,a[n-2]=e<<3,a[n-1]=e>>>29,a}(t),f=1732584193,u=4023233417,g=2562383102,p=271733878,t=b.length,h=0;t>h;h+=16)r=f,l=u,c=g,d=p,f=s(f,u,g,p,b[h+0],7,3614090360),p=s(p,f,u,g,b[h+1],12,3905402710),g=s(g,p,f,u,b[h+2],17,606105819),u=s(u,g,p,f,b[h+3],22,3250441966),f=s(f,u,g,p,b[h+4],7,4118548399),p=s(p,f,u,g,b[h+5],12,1200080426),g=s(g,p,f,u,b[h+6],17,2821735955),u=s(u,g,p,f,b[h+7],22,4249261313),f=s(f,u,g,p,b[h+8],7,1770035416),p=s(p,f,u,g,b[h+9],12,2336552879),g=s(g,p,f,u,b[h+10],17,4294925233),u=s(u,g,p,f,b[h+11],22,2304563134),f=s(f,u,g,p,b[h+12],7,1804603682),p=s(p,f,u,g,b[h+13],12,4254626195),g=s(g,p,f,u,b[h+14],17,2792965006),u=s(u,g,p,f,b[h+15],22,1236535329),f=a(f,u,g,p,b[h+1],5,4129170786),p=a(p,f,u,g,b[h+6],9,3225465664),g=a(g,p,f,u,b[h+11],14,643717713),u=a(u,g,p,f,b[h+0],20,3921069994),f=a(f,u,g,p,b[h+5],5,3593408605),p=a(p,f,u,g,b[h+10],9,38016083),g=a(g,p,f,u,b[h+15],14,3634488961),u=a(u,g,p,f,b[h+4],20,3889429448),f=a(f,u,g,p,b[h+9],5,568446438),p=a(p,f,u,g,b[h+14],9,3275163606),g=a(g,p,f,u,b[h+3],14,4107603335),u=a(u,g,p,f,b[h+8],20,1163531501),f=a(f,u,g,p,b[h+13],5,2850285829),p=a(p,f,u,g,b[h+2],9,4243563512),g=a(g,p,f,u,b[h+7],14,1735328473),u=a(u,g,p,f,b[h+12],20,2368359562),f=n(f,u,g,p,b[h+5],4,4294588738),p=n(p,f,u,g,b[h+8],11,2272392833),g=n(g,p,f,u,b[h+11],16,1839030562),u=n(u,g,p,f,b[h+14],23,4259657740),f=n(f,u,g,p,b[h+1],4,2763975236),p=n(p,f,u,g,b[h+4],11,1272893353),g=n(g,p,f,u,b[h+7],16,4139469664),u=n(u,g,p,f,b[h+10],23,3200236656),f=n(f,u,g,p,b[h+13],4,681279174),p=n(p,f,u,g,b[h+0],11,3936430074),g=n(g,p,f,u,b[h+3],16,3572445317),u=n(u,g,p,f,b[h+6],23,76029189),f=n(f,u,g,p,b[h+9],4,3654602809),p=n(p,f,u,g,b[h+12],11,3873151461),g=n(g,p,f,u,b[h+15],16,530742520),u=n(u,g,p,f,b[h+2],23,3299628645),f=e(f,u,g,p,b[h+0],6,4096336452),p=e(p,f,u,g,b[h+7],10,1126891415),g=e(g,p,f,u,b[h+14],15,2878612391),u=e(u,g,p,f,b[h+5],21,4237533241),f=e(f,u,g,p,b[h+12],6,1700485571),p=e(p,f,u,g,b[h+3],10,2399980690),g=e(g,p,f,u,b[h+10],15,4293915773),u=e(u,g,p,f,b[h+1],21,2240044497),f=e(f,u,g,p,b[h+8],6,1873313359),p=e(p,f,u,g,b[h+15],10,4264355552),g=e(g,p,f,u,b[h+6],15,2734768916),u=e(u,g,p,f,b[h+13],21,1309151649),f=e(f,u,g,p,b[h+4],6,4149444226),p=e(p,f,u,g,b[h+11],10,3174756917),g=e(g,p,f,u,b[h+2],15,718787259),u=e(u,g,p,f,b[h+9],21,3951481745),f=o(f,r),u=o(u,l),g=o(g,c),p=o(p,d);return(i(f)+i(u)+i(g)+i(p)).toLowerCase()}function an(t,i,e,n,a,s){this.e=t,this.width=a,this.height=s,this.ra=null,this.x=e,this.y=n,this.a=i,this.alpha=void 0!==i.alpha?i.alpha:1,this.scale=void 0!==i.scale?i.scale:1,this.pa={},this.pa.ih=0,this.pa.jh=0,this.pa.scale=this.scale,this.pa.alpha=this.alpha,this.pa.ua=0,this.s={},this.s.Nc=!1,this.s.origin={},this.s.target={},this.s.n=0,this.a.Lg&&(t=this.a.Lg,this.s.origin.x=void 0===t.x?this.x:t.x,this.s.origin.y=void 0===t.y?this.y:t.y,this.s.origin.alpha=void 0!==t.alpha?t.alpha:1,this.s.origin.scale=void 0!==t.scale?t.scale:1,this.s.target.x=this.x,this.s.target.y=this.y,this.s.target.alpha=this.alpha,this.s.target.scale=this.scale,this.s.duration=t.duration,this.s.Nc=!0,this.s.Zc=t.Zc||Wi,this.s.n=0,this.s.ca=t.ca||0,sn(this),this.s.Nc=!1),this.e.Pe.push(this)}function sn(t){t.s.n>=t.s.duration&&(t.s.n=t.s.duration,t.s.Nc=!1);var i=t.s.Zc(t.s.n,t.s.origin.x,t.s.target.x-t.s.origin.x,t.s.duration),e=t.s.Zc(t.s.n,t.s.origin.y,t.s.target.y-t.s.origin.y,t.s.duration);t.pa.ih=i-t.x,t.pa.jh=e-t.y,t.pa.alpha=t.s.Zc(t.s.n,t.s.origin.alpha,t.s.target.alpha-t.s.origin.alpha,t.s.duration),t.pa.scale=t.s.Zc(t.s.n,t.s.origin.scale,t.s.target.scale-t.s.origin.scale,t.s.duration),t.e.pd=!0}function on(t,i){this.sq=this.value=this.$l=i}function hn(t,i){this.a=i,this.f=i.f,this.I=0,this.Uc=i.Uc,an.call(this,t,i,i.x,i.y,1,1)}function rn(t,i,e){switch(this.text=i,this.font=e.font.P(),e.$c&&x(this.font,e.$c),this.Gm=e.x,this.Hm=e.y,this.Fm=e.Pa,this.gq=this.font.fillColor,this.wc=e.wc||0,an.call(this,t,e,Math.floor(e.x-.1*e.Pa),Math.floor(e.y-.1*e.Va),Math.floor(1.2*e.Pa),Math.floor(1.2*e.Va)),this.ra=new b(this.width,this.height),this.font.align){case"left":this.Wd=Math.floor(.1*e.Pa);break;case"right":this.Wd=Math.floor(1.1*e.Pa);break;case"center":this.Wd=Math.floor(.6*e.Pa);break;default:throw"Unknown alignment: "+this.font.align}switch(t=Math.floor(this.wc*this.font.fontSize),this.font.m){case"top":this.Xd=Math.floor(.1*e.Va);break;case"bottom":this.Xd=Math.floor(1.1*e.Va)+t;break;case"middle":this.Xd=Math.floor(.6*e.Va)+t;break;default:throw"Unknown baseline: "+this.font.m}this.Cb={},this.Cb.color="red",this.Cb.duration=200,this.Cb.n=0,this.Cb.Vj=!1,this.Mc()}function ln(t,i,e){return i+e}function cn(t,i,e,n,a,s){this.value=this.$l=n,this.Rh=-1,this.Ln=i,this.a=e,this.Kn=-99999,this.fk=e.fk||0,this.Cl=s||function(t){return""+t},i=ln,a&&(i=Ui),this.fc=new oe(n,500,i),e.rf&&(this.rf="game_ui_"+e.rf),this.text=dn(this)+this.Cl(this.$l),rn.call(this,t,this.text,e)}function dn(t){var i="";return t.a.ag&&(i=t.rf?ma.w.R(t.rf,"<"+t.rf.toUpperCase()+">"):ma.w.R("game_ui_"+t.Ln,"<"+t.Ln+">")),i+t.a.separator}function fn(t,i){this.sq=0,this.a=i,this.Lm=this.zj=0,this.f=i.f,this.wg=i.wg,this.jo=!0,this.ma=[],this.fc=new oe(0,200,Ki),this.vg=new oe(0,200,Ki),an.call(this,t,i,i.x,i.y,this.f.width,this.f.height)}function un(){this.za=this.depth=0,this.pd=this.j=this.visible=!1,this.Pe=[],this.Lg={},this.Lg.Nc=!1,this.xl={},this.xl.Nc=!1,ji(this)}function gn(t,i){t.Nc&&(t.n+=i,t.n>=t.duration&&(t.Nc=!1,t.Tb&&t.Tb()))}function pn(t,i,e){function n(t){for(var e in i)if(e===t||i[e]===t)return!0;return!1}function a(i){for(var e in t)if(e===i||t[e]===i)return!0;return!1}if(un.apply(this,arguments),this.j=this.visible=!0,ma.b.Ya(this,ma.Sg),i=i||[],t=t||[],this.Cn=2,this.D=e||Eo,this.On=this.D.background.f,this.Qo=!1,this.Zl=0,this.Nd=new cn(this,"SCORE",this.D.N,0,!0),this.D.Dq&&new hn(this,this.D.Dq),this.Ef=this.D.highscore&&!a("highScore")?new cn(this,"HIGHSCORE",this.D.highscore,0,!1):new on(0,0),this.D.crown&&!a("highScore")&&new hn(this,this.D.crown),!this.D.Qq||a("stage")||a("level")||new cn(this,"STAGE",this.D.Qq,0,!1),!this.D.cj||a("lives")||this.D.cj.vi&&!n("lives")||new cn(this,"LIVES",this.D.cj,0,!1),this.Ph=this.D.time&&!a("time")?new cn(this,"TIME",this.D.time,0,!1,function(t){var i=Math.floor(t%6e4/1e3);return Math.floor(t/6e4)+(10>i?":0":":")+i}):new on(0,0),this.Ph.Pd(36e4),this.D.tq&&!a("progress")&&new fn(this,this.D.tq),!this.D.Wi||a("lives")||this.D.Wi.vi&&!n("lives")||new hn(this,this.D.Wi),this.D.Jg&&!a("difficulty")?new rn(this,Kn().toUpperCase(),this.D.Jg):Kn(),this.D.nl&&!a("difficulty")){var s=cs;switch(Un()){case 0:s=ds;break;case 1:s=cs;break;case 2:s=ls;break;default:throw"Unknown difficulty: "+Un()}this.Mo=new hn(this,this.D.nl),this.Mo.Ym(s)}if(this.D.fd&&!this.D.fd.length&&(this.D.fd=[this.D.fd]),this.D.Lc&&!this.D.Lc.length&&(this.D.Lc=[this.D.Lc]),this.cm=[],this.dm=[],this.cm[0]=this.D.fd&&(n("item")||n("item0"))?new hn(this,this.D.fd[0]):new on(0,""),this.dm[0]=this.D.Lc&&(n("item")||n("item0"))?new rn(this,"",this.D.Lc[0]):new on(0,""),this.D.fd&&this.D.Lc)for(s=1;s<this.D.Lc.length;++s)n("item"+s)&&(this.dm[s]=new rn(this,"0 / 0",this.D.Lc[s]),this.cm[s]=new hn(this,this.D.fd[s]));
  5. for(var o in this.D)s=this.D[o],s.ja&&new rn(this,ma.w.R(s.ja,"<"+s.ja+">")+(s.separator?s.separator:""),s);this.nm=this.Dn=0,o=this.D.uh,this.uh=new Re(o.x,o.y,-1,Fi(Es),[Es],function(){return ma.e.Eh(),!0}),ma.b.Ya(this.uh,ma.Sg)}function bn(t,i){t.Nd.Pd(i),t.Ef.ya()<i?t.Ef.Pd(i):i<t.Ef.ya()&&t.Ef.Pd(Math.max(i,t.Zl))}function vn(){this.depth=10,this.j=this.visible=!1,ji(this),Li(this,["game"])}function mn(){this.depth=0,this.j=!1,this.visible=!0,ma.b.Ya(this,ma.Ii),ji(this),Li(this,["game"])}function wn(t,i,e,n){this.za=this.depth=0,this.visible=!1,this.j=!0,this.sd=t,this.pc=i,this.open=!1,this.x=void 0===e?0:e,this.y=void 0===n?0:n,this.Gi=this.x,this.Hi=this.y,this.Nh=this.x,this.Oh=this.y,this.Bq=ma.a.i.ui.shadowOffsetX/2,this.Cq=ma.a.i.ui.shadowOffsetY/2,this.dk=this.td=0,this.tn=this.un=Wi,this.Qa=this.Ka=1,this.Ei=this.Cd=0,this.an=!1,this.dp=function(t){return.1>t?Pi(t,1,1.3-1,.2):.2>t?1.3:.45>t?Pi(t-.2,1.3,-1.2,.2):.7>t?Xi(t-.45,.1,1.2,.2):.8>t?1.3:Xi(t-.8,1.3,-(1.3-1),.2)},this.ep=$i([Pi,Hi,Pi],[!1,!1,!0],[.1,.7,.2]),this.Oq=$i([Pi,Pi],[!1,!0]),this.Bf=!0,ji(this),Li(this,["game","item"]),ma.b.Ya(this,ma.zf)}function yn(t,i,e,n,a){void 0===i&&(i=0),void 0===e&&(e=0),t.Cd=i+e,t.Ei=i,t.open=!t.open,t.Bf=!1,t.an=void 0===a?!1:a,t.j=!0,(void 0===e||0===e)&&(t.visible=!0),void 0===n&&(n=!1),void 0===t.ub||n||t.ub.qb()}function xn(t,i,e,n){this.x=t,this.y=i,this.width=e,this.height=n}function _n(t){return new xn(t.x-1,t.y-1,t.width+2,t.height+2)}function kn(t,i,e){i<t.x?(t.width=t.x-i+t.width,t.x=i):i>t.x+t.width&&(t.width=i-t.x),e<t.y?(t.height=t.y-e+t.height,t.y=e):e>t.y+t.height&&(t.height=e-t.y)}function Sn(i){return[new t(i.x,i.y),new t(i.x+i.width,i.y),new t(i.x,i.y+i.height),new t(i.x+i.width,i.y+i.height)]}function Tn(i,e,n){this.x=i,this.y=e,this.Km=n,this.o=[],this.Sf="squared",this.Nb=-1,this.gc=new t(0,20),this.yl=.5,this.Zk=0,this.sh=this.th="none",this.sg=0,this.bb=!0}function Mn(t,i,e){if("alternate"===t.th){if(null!==i&&(0===i.sd||3===i.sd?"black":"red")==(0===e.sd||3===e.sd?"black":"red"))return!1}else if("same"===t.th&&null!==i&&i.sd!==e.sd)return!1;if("asc"===t.sh){if(null===i){if(1!==e.pc)return!1}else if(i.pc+1!==e.pc)return!1}else if("desc"===t.sh)if(null===i){if(!0===ma.l.Jc.vj&&13!==e.pc)return!1}else if(i.pc-1!==e.pc)return!1;return!0}function En(t,i){var e=0;if(!Mn(t,jn(t),i[0]))return!1;for(e=0;e<i.length-1;e+=1)if(!Mn(t,i[e],i[e+1]))return!1;return t.o=t.o.concat(i),!0}function jn(t){return 0===t.o.length?null:t.o[t.o.length-1]}function Cn(t,i){return Mn(t,jn(t),i)?(t.o.push(i),!0):!1}function Ln(t){var i,e,n;return"fanned"===t.Sf?(i=t.jc(0),e=new xn(i.x,i.y,i.width,i.height),-1===t.Nb?(0<t.gc.x?e.x+=pa.width:0>t.gc.x&&(e.x-=pa.width),0<t.gc.y?e.y+=pa.height:0>t.gc.y&&(e.y-=pa.height)):(n=Math.max(t.Nb,t.Zk),e.x+=t.gc.x*n,e.y+=t.gc.y*n),kn(i,e.x,e.y),kn(i,e.x+e.width,e.y+e.height),_n(i)):_n(t.jc(0))}function An(t,i,e,n,a,s,o){var h,r,l,c;for(void 0===e&&(e=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===o&&(o=!1),h=0;h<t.o.length;h+=1){l=h>=n,r=s+Math.max(0,h-n)*e,c=i,!l&&o&&(r=0,c*=2);var d=t,f=h,u=c,g=r;r=a;var p=d.sg-f,b=d.dd(f);void 0===g&&(g=0),f=d.o[f],c=b.x,b=b.y,f.Gi=f.x,f.Hi=f.y,f.Nh=c,f.Oh=b,void 0!==p&&Ci(f,p),!0!==l&&0>=f.td&&f.x===c&&f.y===b||(void 0===g&&(g=0),f.td=u+g,f.dk=u,f.tn=f.un,f.j=!0,(void 0===g||0===g)&&(f.visible=!0),void 0===r&&(r=!1),void 0===f.ub||r||f.ub.qb(),f.ub=d)}}function In(){this.za=this.depth=0,this.visible=!0,this.j=!1,this.yj=0,this.Bd=3600,this.Kd=-1,this.wh=0,this.vh=void 0,this.Kf=new t(0,0),this.md=new t(0,0),ji(this),Li(this,["game","item"]),ma.b.Ya(this,ma.zf)}function Bn(t,i,e){var n=po;i!==e&&(!0===e.Yg&&!0!==i.Yg?(!0===i.bm&&t.N(ma.l.N.fh),t.N(ma.l.N.hh),n=mo):t.N(!0===i.Yg&&!0!==e.Yg?ma.l.N.hj:!0===i.bm?ma.l.N.fh:ma.l.N.move)),ba.play(n)}function zn(t,i){t.Bd=Math.max(i,t.Bd)}function qn(t){var i,e,n,a,s,o;if(0===ma.l.F.Rb.o.length){if(ma.l.Jc.ak){for(a=ma.a.i.Wa.ur,s=ma.a.i.Wa.tr,o=.2*a,e=ma.l.F.Ea.o.length,i=0;e>i;i+=1)n=ma.l.F.Ea.pop(),yn(n,a-2*o,o+i*s,void 0,!0),ma.l.F.Rb.o.push(n);An(ma.l.F.Rb,a,s),zn(t,s*(e-1)+a),t.N(ma.l.N.Cj)}}else{for(a=ma.a.i.Wa.xr,s=ma.a.i.Wa.vr,o=ma.a.i.Wa.wr,e=Math.min(ma.l.F.Rb.o.length,ma.l.Jc.tf),ma.l.F.Ea.Nb=e,i=0;e>i;i+=1)n=ma.l.F.Rb.pop(),yn(n,a,s*i,!0),Cn(ma.l.F.Ea,n);ma.l.F.Ea.qb(),An(ma.l.F.Ea,.5*a,s,ma.l.F.Ea.o.length-e,!0,.2*a,!0),i=s*(e-1)+a,zn(t,i),t.N(ma.l.N.Di),t=new Di,t.Ba(i+o,function(){var t=jn(ma.l.F.Ea);null!==t&&new Nn(t.Nh,t.Oh,t.depth+1)}),t.Ba(s*(e-1),function(){ma.l.F.Rb.qb()}),t.start(),Li(t,["game","item"])}}function Fn(t){var i,e,n=ma.l.F.vb.concat(ma.l.F.ad),a=[],s=[];for(i=0;i<t.length;i+=1)for(e=0;e<n.length;e+=1)!s[e]&&Ln(n[e]).contains(t[i].x,t[i].y)&&(a.push(n[e]),s[e]=!0);return a}function On(t){var i,e,n,a;t:{for(i=ma.l.F,e=0;e<i.ad.length;e+=1)if(13!==i.ad[e].o.length){i=!1;break t}i=!0}if(!0===i)zn(t,800),t=new Di,t.Ba(400,ma.l.Rn),t.start(),Li(t,["game","item"]);else if(!0===ma.a.i.Wa.wi&&0===ma.l.F.Ea.o.length&&0===ma.l.F.Rb.o.length){for(i=ma.l.F.vb,n=!0,e=0;e<i.length;e+=1)for(a=0;a<i[e].o.length;a+=1)n=n&&i[e].o[a].open;n&&t.wi()}}function Dn(t,i){var e=ma.l.F.ad.slice(0),n=ma.l.F.vb;return e.sort(function(t,i){return i.o.length-t.o.length}),function(){var a,s,o;for(a=0;a<n.length;a+=1)if(s=n[a],o=jn(s),null!==o&&o.pc===t)for(o=s.pop(),s=0;s<e.length;s+=1)if(Cn(e[s],o)){An(e[s],i),ma.l.il.N(ma.l.N.hh),ba.play(mo);break}}}function Gn(t,i,e){var n,a;n=ma.l.F.vb.slice(0);var s,o=ma.a.i.Wa.No;for(n.sort(function(t,i){return i.o.length-t.o.length}),s=ma.l.F.ad.concat(n),n=0;n<s.length;n+=1)if(a=s[n],a!==i&&En(a,[e])){i.pop(),i===ma.l.F.Ea&&(i.Nb=Math.max(i.Nb-1,0)),An(a,o,0,a.o.length-1),Ci(e,-999),zn(t,o),Rn(t),Bn(t,i,a),On(t);break}}function Rn(t){var i=ma.a.i.Wa.hl;if(!0===ma.a.i.Wa.Bo){var e,n,a=ma.l.F,s=!1;for(e=0;e<a.vb.length;e+=1)n=jn(a.vb[e]),null===n||n.open||(s=!0,yn(n,i));s&&(zn(t,i),t.N(ma.l.N.mh))}}function Hn(){this.vb=this.ad=this.Ea=this.Rb=void 0}function Yn(t){var i,e,n,a=52;i=ma.a.i.oc.kl+ma.Dd;var s=ma.a.i.oc.ll+ma.Ed;if(!0===t){for(t=[],e=0;4>e;e+=1)for(n=1;14>n;n+=1)t.push(new wn(e,n,i,s));for(;a;)e=Math.floor(Math.random()*a),a-=1,i=t[a],t[a]=t[e],t[e]=i}else t=[new wn(0,1,i,s),new wn(1,1,i,s),new wn(0,2,i,s),new wn(1,2,i,s),new wn(0,3,i,s),new wn(1,3,i,s),new wn(0,4,i,s),new wn(1,4,i,s),new wn(0,5,i,s),new wn(1,5,i,s),new wn(0,6,i,s),new wn(1,6,i,s),new wn(0,7,i,s),new wn(1,7,i,s),new wn(0,8,i,s),new wn(1,8,i,s),new wn(0,9,i,s),new wn(1,9,i,s),new wn(0,10,i,s),new wn(1,10,i,s),new wn(0,11,i,s),new wn(1,11,i,s),new wn(0,12,i,s),new wn(1,12,i,s),new wn(3,13,i,s),new wn(2,13,i,s),new wn(2,12,i,s),new wn(3,11,i,s),new wn(2,11,i,s),new wn(3,12,i,s),new wn(3,9,i,s),new wn(2,9,i,s),new wn(3,10,i,s),new wn(2,10,i,s),new wn(2,6,i,s),new wn(3,7,i,s),new wn(2,7,i,s),new wn(3,8,i,s),new wn(2,8,i,s),new wn(2,3,i,s),new wn(3,4,i,s),new wn(2,4,i,s),new wn(3,5,i,s),new wn(2,5,i,s),new wn(3,6,i,s),new wn(1,13,i,s),new wn(0,13,i,s),new wn(3,1,i,s),new wn(2,1,i,s),new wn(3,2,i,s),new wn(2,2,i,s),new wn(3,3,i,s)];return t}function Nn(t,i,e){this.depth=e,this.za=0,this.j=this.visible=!0,this.x=t,this.y=i,this.Za=0,this.mn=9,this.startTime=va.cd,this.duration=ma.a.i.ui.To,ji(this),Li(this,["game","item"]),ma.b.Ya(this,ma.zf)}function Xn(t,i){this.depth=1e3,this.visible=!1,this.j=!0,ma.b.Ya(this,ma.Ic),this.a=ma.a.h.dj;for(var e in ma.a.L.dj)this.a[e]=ma.a.L.dj[e];this.Tb=t,this.fl=i,ji(this)}function Pn(t){var i,e,n;return t.j?window.setTimeout(function(){e=+new Date,i=Math.min(va.um,e-t.pe),""===va.ta&&(va.ta="start",ga.Fb(va.ta)),"start"===va.ta&&ga.complete(va.ta)&&(va.ta="load",ga.Fb(va.ta)),"load"===va.ta&&ga.complete(va.ta)&&(va.ta="game",ga.Fb(va.ta)),t.qa(i),n=+new Date,void 0===t.Le&&(t.Le=60),t.Wh=1e3/t.Le-(n-e),t.pe=e,t.loop=Pn(t)},t.Wh):void 0}function Vn(){this.depth=-1e6,this.j=this.visible=!0,this.za=ma.hc,this.end=this.Y=this.aj=this.$i=this.load=this.cb=!1,this.state="GAME_INIT",this.screen=null,this.jj=this.Ma=this.u=0,this.Bl=!1,ji(this),Li(this,"system"),this.np=function(){ba.pause("master"),va.pause()},this.op=function(){ba.Pf("master"),ci(va),fi(va),mi(va),va.Pf()},window.addEventListener("gameSetPause",this.np,!1),window.addEventListener("gameResume",this.op,!1),this.Yd="timedLevelEvent"}function Wn(t){t.state="GAME_LOAD",new Xn(function(){ma.e.load=!0,ma.H.Pl()},ma.H.pm)}function Un(){return ma.e.ea.difficulty}function Jn(){switch(Un()){case 0:return"easy";case 1:return"medium";case 2:return"hard";default:throw"Unknown difficulty: "+Un()}}function Kn(){var t="optionsDifficulty_"+Jn();return ma.w.R(t,"<"+t+">")}function Qn(t){return void 0!==t&&(ma.e.ea.playSFX=t,ia("preferences",ma.e.ea),t?(Z("game"),Z("sfx")):($("game"),$("sfx"))),ma.e.ea.playSFX}function $n(t,i,e,n){var a="game";"game"!==a&&(a="tg"),void 0===ma.e.eb&&(ma.e.eb=[]),void 0===ma.e.eb[t]&&(ma.e.eb[t]=[]),void 0===ma.e.eb[t][i]&&(ma.e.eb[t][i]=ma.H.ah(t,i,{tg:{},game:{}})),void 0===e?ma.e.eb[t][i][a]=n:ma.e.eb[t][i][a][e]=n,ma.H.Ij(t,i,ma.e.eb[t][i])}function Zn(t,i,e,n){var a="game";return"game"!==a&&(a="tg"),void 0===ma.e.eb&&(ma.e.eb=[]),void 0===ma.e.eb[t]&&(ma.e.eb[t]=[]),void 0===ma.e.eb[t][i]&&(ma.e.eb[t][i]=ma.H.ah(t,i,{tg:{},game:{}})),t=void 0===e?ma.e.eb[t][i][a]:ma.e.eb[t][i][a][e],void 0===t&&(t=n),t}function ta(t,i){var e;return"game"!==e&&(e="tg"),void 0===ma.e.bd&&(ma.e.bd=ma.H.$g({tg:{},game:{}})),e=void 0===t?ma.e.bd[e]:ma.e.bd[e][t],void 0===e&&(e=i),e}function ia(t,i){var e;"game"!==e&&(e="tg"),void 0===ma.e.bd&&(ma.e.bd=ma.H.$g({tg:{},game:{}})),void 0===t?ma.e.bd[e]=i:ma.e.bd[e][t]=i,ma.H.Hj(ma.e.bd)}function ea(t,i,e,n){return void 0===e&&(e=t.Ma),void 0===n&&(n=t.u),void 0===i?Zn(n,e,"stats",{}):Zn(n,e,"stats",{})[i]}function na(t){t.screen&&Bi(va,t.screen),t.screen=new fe,t.Ma=-1}function aa(t,i,e,n){var a;void 0!==ma.a.L.Ff&&void 0!==ma.a.L.Ff.backgroundImage?a=ma.a.L.Ff.backgroundImage:void 0!==ma.a.h.Ff&&(a=ma.a.h.Ff.backgroundImage),ma.b.Eb(ma.wf),t=t||0,i=i||0,e=e||pa.width,n=n||pa.height,e=Math.min(Math.min(e,pa.width),a.width),n=Math.min(Math.min(n,pa.height),a.height),void 0!==a?a.drawByMatrix(0,t,i-ma.Yk,e,n,t,i,1):d(t,i,e,n,"white",!1)}function sa(t,i,e){t.state="LEVEL_INIT",void 0===e||(t.u=e),t.Ma=i,t.$i=!0,ma.p.we?ma.H.Ti(t.u,t.Ma):ma.H.Ti(t.u,t.jj)}function oa(t,i,e){var n=0;for(void 0===i&&(i=t.u),void 0===e&&(e=t.Ma),t=0;i>t;t++)n+=ma.p.ba[t];return n+e}function ha(t,i){var e,n=t.Ma+"",a=i-n.length;if("number"==typeof i&&i>1)for(e=0;a>e;e++)n="0"+n;return n}function ra(t,i){t.state="LEVEL_END";var e,n,a,s=ha(t,3);i=i||{},i.level=ma.p.pk?t.Ma+1:oa(t)+1,i.Yl=!1,a=i.totalScore||0,void 0!==i.timeBonus&&(a+=i.timeBonus),n=e=Zn(t.u,t.Ma,"stats",void 0),!0!==i.failed?(void 0===n?(n={},n.highScore=a,ma.O.X("points","progression:score:"+Jn()+":"+s,a),ma.O.X("highScore","progression:score:"+Jn()+":"+s,a),void 0!==i.stars&&(n.stars=i.stars,ma.O.X("stars","progression:score:"+Jn()+":"+s,i.stars))):(ma.O.X("points","progression:score:"+Jn()+":"+s,a),void 0!==e.highScore?e.highScore>=a?n.highScore=e.highScore:(n.highScore=a,i.Yl=!0,ma.O.X("highScore","progression:score:"+Jn()+":"+s,a)):(n.highScore=a,ma.O.X("highScore","progression:score:"+Jn()+":"+s,a)),void 0!==i.stars&&(n.stars=void 0!==e.stars&&e.stars>=i.stars?e.stars:i.stars,ma.O.X("stars",Jn()+":"+s,i.stars))),t.Ma+1<ma.p.ba[t.u]?"locked"===Zn(t.u,t.Ma+1,"state","locked")&&$n(t.u,t.Ma+1,"state","unlocked"):t.u+1<ma.p.ba.length&&"locked"===Zn(t.u+1,0,"state","locked")&&$n(t.u+1,0,"state","unlocked"),$n(t.u,t.Ma,void 0,{stats:n,state:"played"}),ce(ma.O,t.Yd,s,"progression:levelCompleted:"+Jn())):ce(ma.O,t.Yd,s,"progression:levelFailed:"+Jn()),i.highScore=ea(t,"highScore",t.Ma),"number"!=typeof i.highScore&&(i.highScore=0),new xe(ma.p.ic,i,function(t){ma.e.Y=!0,ma.e.vp=t,ma.H.Rl(i)})}function la(t){var i,e=Ai(va,void 0);for(i=0;i<e.length;i+=1){var n=e[i];n.C+=1}for(i=va,e=0;e<i.Qc.length;e+=1)i.Qc[e].paused+=1;for(i=ma.O,e=ma.e.Yd,n=0;n<i.M.length;n++)void 0!==i.M[n]&&i.M[n].tag===e&&(i.M[n].paused+=1);t&&(t.C=Math.max(0,t.C-1)),Ii("system")}function ca(){var t;ma.l&&Bi(va,ma.l),t=Ai(va,"LevelStartDialog"),0<t.length&&Bi(va,t[0])}function da(){var t="";return ma.version.builder&&(t=ma.version.builder),ma.version.tg&&(t+="-"+ma.version.tg),ma.version.game&&(t+="-"+ma.version.game),ma.version.config&&(t+="-"+ma.version.config),t}JJSDK.init({img:"http://wincard.wan.jj.cn/icon.png",url:"http://wincard.wan.jj.cn",desc:"将纸牌按照数字顺序隔色排列,并按照花色移动到右上方格子",title:"纸牌",gameId:Env.gameId,appkey:Env.appkey,baiduStatKey:Env.baiduStatKey});var fa,ua=document.getElementById("canvasBackground");fa=t.prototype,fa.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},fa.P=function(){return new t(this.x,this.y)},fa.add=function(i){return new t(this.x+i.x,this.y+i.y)},fa.scale=function(i){return new t(i*this.x,i*this.y)},fa.rotate=function(i){var e=Math.sin(i*Math.PI/180);return i=Math.cos(i*Math.PI/180),new t(i*this.x+e*this.y,-e*this.x+i*this.y)},fa.normalize=function(){var i=Math.sqrt(this.x*this.x+this.y*this.y);return 0===i?new t(0,0):new t(this.x/i,this.y/i)},fa.bb=function(t,n,a){var s=Math.min(8,this.length()/4),o=i(this,this.normalize().scale(2*s)),h=o.add(e(this).scale(s)),s=o.add(e(this).scale(-s)),r=pa.context;r.strokeStyle=a,r.beginPath(),r.moveTo(t,n),r.lineTo(t+o.x,n+o.y),r.lineTo(t+h.x,n+h.y),r.lineTo(t+this.x,n+this.y),r.lineTo(t+s.x,n+s.y),r.lineTo(t+o.x,n+o.y),r.stroke()},n.prototype.P=function(){var t=new n;return t.Gf=this.Gf,t.hi=this.hi,t.ti=this.ti,t.state=this.state,t},n.prototype.random=function(t){var i=1;return void 0!==t&&(i=t),this.state=(this.hi*this.state+this.ti)%this.Gf,this.state/this.Gf*i},new n,a.prototype.Ba=function(t){this.jf[t]=0,this.zc[t]=0,this.be[t]=0,this.ce[t]=[]},a.prototype.Mb=function(t){return this.be[t]},a.prototype.complete=function(t){return this.zc[t]+this.be[t]===this.jf[t]},a.prototype.Fb=function(t){var i;for(i=0;i<this.ce[t].length;i+=1)this.ce[t][i].Fb(t,this.Rc);0===this.ce[t].length&&_i("Load Complete",{Ia:t})};var ga=new a;c.prototype.Eb=function(t){this.canvas=t,this.context=t.getContext("2d"),this.width=t.width,this.height=t.height},c.prototype.clear=function(){this.context.clearRect(0,0,this.width,this.height),this.context.beginPath(),this.context.moveTo(0,0),this.context.lineTo(-1,-1),this.context.closePath(),this.context.stroke()},c.prototype.Cc=function(t,i,e,n,a,s){this.context.font=a,s?(this.context.strokeStyle=n,this.context.strokeText(t,i,e)):(this.context.fillStyle=n,this.context.fillText(t,i,e))};var pa=new c(ua);u.prototype.Fb=function(t,i){function e(){r(t)}function n(){h(t)}var a,s;for(a=0;a<this.bc.length;a+=1)s=this.zl[a],0!==s.toLowerCase().indexOf("http:")&&0!==s.toLowerCase().indexOf("https:")&&(s=i+s),this.bc[a].src=s,this.bc[a].addEventListener("load",n,!1),this.bc[a].addEventListener("error",e,!1)},u.prototype.complete=function(){var t;for(t=0;t<this.bc.length;t+=1)if(!this.bc[t].complete)return!1;return!0},u.prototype.drawByMatrix=function(t,i,e,n,a,s,o,h,r){this.bc[t]&&this.bc[t].complete&&(void 0===h&&(h=n),void 0===r&&(r=a),0>=n||0>=a||0!==Math.round(h)&&0!==Math.round(r)&&pa.context.drawImage(this.bc[t],i,e,n,a,s,o,h,r))},fa=p.prototype,fa.d=function(t,i,e,n,a,s,o,h){t>=0&&t<this.I&&(this.picIdx[t]=i,this.posX[t]=e,this.posY[t]=n,this.picWidth[t]=a,this.picHeight[t]=s,this.offsetX[t]=o,this.offsetY[t]=h)},fa.complete=function(){return this.Ee.complete()},fa.q=function(t,i,e){t=(Math.round(t)%this.I+this.I)%this.I,this.Ee.drawByMatrix(this.picIdx[t],this.posX[t],this.posY[t],this.picWidth[t],this.picHeight[t],i-this.Sh+this.offsetX[t],e-this.Uh+this.offsetY[t])},fa.drawByAlpha=function(t,i,e,n){var a=pa.context,s=a.globalAlpha;a.globalAlpha=n,t=(Math.round(t)%this.I+this.I)%this.I,this.Ee.drawByMatrix(this.picIdx[t],this.posX[t],this.posY[t],this.picWidth[t],this.picHeight[t],i-this.Sh+this.offsetX[t],e-this.Uh+this.offsetY[t]),a.globalAlpha=s},fa.drawByTransform=function(t,i,e,n,a,s,o){var h=pa.context;1e-4>Math.abs(n)||1e-4>Math.abs(a)||(t=(Math.round(t)%this.I+this.I)%this.I,h.save(),h.translate(i,e),h.rotate(-s*Math.PI/180),h.scale(n,a),h.globalAlpha=o,this.Ee.drawByMatrix(this.picIdx[t],this.posX[t],this.posY[t],this.picWidth[t],this.picHeight[t],this.offsetX[t]-this.Sh,this.offsetY[t]-this.Uh),h.restore())},fa.drawByMatrix=function(t,i,e,n,a,s,o,h){var r,l,c,d,f=pa.context,u=f.globalAlpha;t=(Math.round(t)%this.I+this.I)%this.I,r=this.offsetX[t],l=this.offsetY[t],c=this.picWidth[t],d=this.picHeight[t],i-=r,e-=l,0>=i+n||0>=e+a||i>=c||e>=d||(0>i&&(n+=i,s-=i,i=0),0>e&&(a+=e,o-=e,e=0),i+n>c&&(n=c-i),e+a>d&&(a=d-e),f.globalAlpha=h,this.Ee.drawByMatrix(this.picIdx[t],this.posX[t]+i,this.posY[t]+e,n,a,s,o),f.globalAlpha=u)},fa.drawByMatrix2=function(t,i,e,n,a,s,o,h,r,l){var c,d,f,u,g,p,b=pa.context,v=b.globalAlpha;t=(Math.round(t)%this.I+this.I)%this.I,c=h/n,d=r/a,f=this.offsetX[t],u=this.offsetY[t],g=this.picWidth[t],p=this.picHeight[t],i-=f,e-=u,0>=i+n||0>=e+a||i>=g||e>=p||(0>i&&(n+=i,h+=c*i,s-=c*i,i=0),0>e&&(a+=e,r+=d*e,o-=d*e,e=0),i+n>g&&(h-=c*(n-g+i),n=g-i),e+a>p&&(r-=d*(a-p+e),a=p-e),b.globalAlpha=l,this.Ee.drawByMatrix(this.picIdx[t],this.posX[t]+i,this.posY[t]+e,n,a,s,o,h,r),b.globalAlpha=v)},fa=b.prototype,fa.P=function(){var t=new b(this.width,this.height);return v(t),this.q(0,0),m(t),t},fa.clear=function(){this.context.clearRect(0,0,this.canvas.width,this.canvas.height)},fa.q=function(t,i){pa.context.drawImage(this.canvas,t,i)},fa.drawByAlpha=function(t,i,e){var n=pa.context,a=n.globalAlpha;n.globalAlpha=e,pa.context.drawImage(this.canvas,t,i),n.globalAlpha=a},fa.drawByTransform=function(t,i,e,n,a,s){var o=pa.context;1e-4>Math.abs(e)||1e-4>Math.abs(n)||(o.save(),o.translate(t,i),o.rotate(-a*Math.PI/180),o.scale(e,n),o.globalAlpha=s,pa.context.drawImage(this.canvas,0,0),o.restore())},fa.drawByMatrix=function(t,i,e,n,a,s,o){var h=pa.context,r=h.globalAlpha;0>=e||0>=n||(t+e>this.width&&(e=this.width-t),i+n>this.height&&(n=this.height-i),h.globalAlpha=o,pa.context.drawImage(this.canvas,t,i,e,n,a,s,e,n),h.globalAlpha=r)},fa.drawByMatrix2=function(t,i,e,n,a,s,o,h,r){var l=pa.context,c=l.globalAlpha;0>=e||0>=n||(t+e>this.width&&(e=this.width-t),i+n>this.height&&(n=this.height-i),0!==Math.round(o)&&0!==Math.round(h)&&(l.globalAlpha=r,pa.context.drawImage(this.canvas,t,i,e,n,a,s,o,h),l.globalAlpha=c))},w.prototype.Fb=function(t,i){return void this.complete()},w.prototype.complete=function(){return this.qn},fa=y.prototype,fa.P=function(){var t=new y(this.B,this.sf);return t.fontStyle=this.fontStyle,t.fontWeight=this.fontWeight,t.ne=this.ne,t.fontSize=this.fontSize,t.fill=this.fill,t.Ua=this.Ua,t.Ob=this.Ob,t.fillColor=this.fillColor,t.Wb={f:this.Wb.f,Dj:this.Wb.Dj,Ej:this.Wb.Ej},t.xa={bg:this.xa.bg,I:this.xa.I,Dg:this.xa.Dg.slice(0),size:this.xa.size,offset:this.xa.offset},t.fillStyle=this.fillStyle,t.stroke=this.stroke,t.Oa=this.Oa,t.ze=this.ze,t.strokeColor=this.strokeColor,t.strokeStyle=this.strokeStyle,t.sc=this.sc,t.rc=this.rc,t.Rd=this.Rd,t.K={j:this.K.j,color:this.K.color,offsetX:this.K.offsetX,offsetY:this.K.offsetY,blur:this.K.blur},t.align=this.align,t.m=this.m,t.Aa=this.Aa,t},fa.setFillColor=function(t){this.Ob=0,this.fillColor=void 0===t?"black":t},fa.setStrokeColor=function(t){this.ze=0,this.strokeColor=void 0===t?"black":t},fa.ha=function(t,i){var e;return pa.context.save(),e=B(q(this,t,i)),pa.context.restore(),e},fa.fa=function(t,i){var e;return pa.context.save(),e=z(this,q(this,t,i)),pa.context.restore(),e},fa.q=function(t,i,e,n){var a=pa.context;this.fill&&1===this.Ob?this.drawByTransform(t,i,e,1,1,0,1,n):(a.save(),R(this,a,t,i,e,1,n),a.restore())},fa.drawByAlpha=function(t,i,e,n,a){var s=pa.context;this.fill&&1===this.Ob?this.drawByTransform(t,i,e,1,1,0,n,a):(s.save(),R(this,s,t,i,e,n,a),s.restore())},fa.drawByTransform=function(t,i,e,n,a,s,o,h){var r=pa.context;r.save(),r.translate(i,e),r.rotate(-s*Math.PI/180),r.scale(n,a);try{R(this,r,t,0,0,o,h)}catch(l){}r.restore()},fa=H.prototype,fa.ci=function(t,i,e){function n(){t.zc=!0,t.eg=Math.ceil(1e3*t.ib.duration),h(e),t.ib.removeEventListener("canplaythrough",n,!1),t.ib.removeEventListener("error",a,!1)}function a(){r(e)}(i=J(i))?(t.ib=new Audio,t.ib.src=i,t.ib.Qs="auto",t.ib.addEventListener("canplaythrough",n,!1),t.ib.addEventListener("error",a,!1),t.ib.load()):a()},fa.Un=function(t,i,e){var n=J(i),a=new XMLHttpRequest;a.open("GET",n,!0),a.responseType="arraybuffer",a.onload=function(){ba.Ib.decodeAudioData(a.response,function(i){i&&(t.ib=i,t.eg=1e3*i.duration,t.zc=!0,h(e))},function(){r(e)})},a.onerror=function(){"undefined"!=typeof Audio&&(ba.gb=!1,ba.Ja=!0,ba.ee=H.prototype.ci,ba.ee(t,i,e))};try{a.send()}catch(s){a.onerror()}},fa.play=function(t,i,e,n){return t instanceof ei?(t=U(this,t))?(t.jn=i||0,t.dg=i>0,t.Lb=e||0,t.Gc=n||function(t,i,e,n){return 0==t?i:e*Math.pow(2,10*(t/n-1))+i},t.dg||K(this,t,t.zb),t.id):null:void 0},fa.Pf=function(t,i,e,n){var a,s,o=X(this,t);for(t=0;t<o.length;t+=1)a=o[t],((a.paused||!a.Lf)&&!n||!a.paused&&n)&&(n||(a.paused=!1,a.Lb=i||0,a.Gc=e||function(t,i,e,n){return 0==t?i:e*Math.pow(2,10*(t/n-1))+i},a.Re&&(void 0===i&&(a.Lb=a.Re.duration),void 0===e&&(a.Gc=a.Re.Ca),s=a.Re.gain,a.Re=void 0,ii(ba,a.id,s))),this.gb?(a.A=this.Ib.createBufferSource(),a.A.buffer=a.wb.ib,V(this,a),K(this,a,a.zb+(a.ei||0))):this.Ja&&K(this,a,a.zb))},fa.pause=function(t,i,e,n,a){var s,o=X(this,t);for(t=0;t<o.length;t+=1)s=o[t],s.paused||(s.Lb=e||0,0<s.Lb?(s.Gc=n||function(t,i,e,n){return 0==t?i:e*Math.pow(2,10*(t/n-1))+i},s.Re={gain:ti(s.id),duration:s.Lb,Ca:s.Gc},Q(ba,s.id,0,s.Lb,s.Gc,function(){ba.pause(s.id,i)})):(a||(s.paused=!0,s.di=0,s.Ck=i,this.Sb-=1),this.gb?(s.ei=1e3*this.Ib.currentTime-s.Ek,s.A.stop?s.A.stop(0):s.A.noteOff&&s.A.noteOff(0),W(this,s)):this.Ja&&s.A.pause()))},fa.stop=function(t,i,e){var n,a=X(this,t);for(t=0;t<a.length;t+=1)n=a[t],n.Lb=i||0,0<n.Lb?(n.Gc=e||function(t,i,e,n){return 0==t?i:e*Math.pow(2,10*(t/n-1))+i},Q(ba,n.id,0,n.Lb,n.Gc,function(){ba.stop(n.id)})):(this.Sa[n.id]&&delete this.Sa[n.id],n.paused||(this.Sb-=1),this.gb?(n.paused||3===n.A.playbackState||(n.A.stop?n.A.stop(0):n.A.noteOff&&n.A.noteOff(0)),W(this,n)):this.Ja&&(n.A.pause(),ai(n),N(this,n)),this.Hb[this.Hb.indexOf(n)]=void 0)},fa.position=function(t,i){var e,n,a,s=X(this,t);for(e=0;e<s.length;e++)n=s[e],!isNaN(i)&&i>=0&&(i%=n.wb.eg,this.gb?n.paused?n.ei=i:(n.A.stop?n.A.stop(0):n.A.noteOff&&n.A.noteOff(0),W(this,n),this.Sb-=1,n.A=this.Ib.createBufferSource(),n.A.buffer=n.wb.ib,V(this,n),K(this,n,n.zb+i)):this.Ja&&(4===n.A.readyState?n.A.currentTime=(n.zb+i)/1e3:(a=function(){var t=n,e=i;return{Sl:function(){t.A.currentTime=(t.zb+e)/1e3,t.A.removeEventListener("canplaythrough",a.Sl,!1)}}}(),n.A.addEventListener("canplaythrough",a.Sl,!1))))},fa.Gj=function(t){ba.position(t,0)},fa.Dh=function(t,i){var e,n=X(this,t);for(e=0;e<n.length;e+=1)n[e].fj=i,this.gb&&(n[e].A.loop=!0)},fa.Mk=function(t,i){var e,n,a,s=X(this,t);for(e=0;e<s.length;e+=1)for(n=s[e],i=[].concat(i),a=0;a<i.length;a+=1)0>n.sa.indexOf(i[a])&&n.sa.push(i[a])},fa.dd=function(t){return(t=X(this,t)[0])?si(t)-t.zb:void 0};var ba=new H;ei.prototype.Fb=function(t,i){var e,n;e=this.Ak,0!==e.toLowerCase().indexOf("http:")&&0!==e.toLowerCase().indexOf("https:")&&(e=i+e),n=this.Bk,0!==n.toLowerCase().indexOf("http:")&&0!==n.toLowerCase().indexOf("https:")&&(n=i+n),ba.ee(this,[n,e],t)},ei.prototype.Nf=function(t){return void 0!==t&&(this.jg=t),this.jg},ei.prototype.Mk=function(t){var i;for(t=[].concat(t),i=0;i<t.length;i+=1)0>this.sa.indexOf(t[i])&&this.sa.push(t[i])},ei.prototype.Fb=function(t,i){var e,n;e=this.Ak,0!==e.toLowerCase().indexOf("http:")&&0!==e.toLowerCase().indexOf("https:")&&(e=i+e),n=this.Bk,0!==n.toLowerCase().indexOf("http:")&&0!==n.toLowerCase().indexOf("https:")&&(n=i+n),ba.ee(this,[n,e],t)},ni.prototype.ai=function(){this.id=Math.round(Date.now()*Math.random())+"",this.sa=["master",this.id].concat(this.wb.sa),this.Nf=void 0!==this.wb.jg?this.wb.jg:10,this.paused=this.Lf=this.fj=!1,this.gi=this.Ci=0,this.dg=!1,this.jn=0;var t,i=1;for(t=0;t<this.sa.length;t+=1)void 0!==ba.Sa[this.sa[t]]&&(i*=ba.Sa[this.sa[t]]);!ba.gb&&ba.Ja&&(this.A.volume=i)},oi.prototype.zc=function(t){4===t.readyState&&(this.complete=!0,(this.Mb=200!==t.status)?_i("Get Failed",{name:this.name}):(this.text=t.responseText,_i("Get Complete",{name:this.name})))},ri.prototype.clear=function(){this.t=[],this.hf=!1,this.jb=[],this.Zh=!1},ri.prototype.pause=function(t){this.C+=1,void 0===t&&(t=!1),this.Dk=t},ri.prototype.Pf=function(){0!==this.C&&(this.pe=Date.now(),this.C-=1)},window.Wm=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||function(t){var i,e,n=this;window.setTimeout(function(){i=+new Date,t(i),e=+new Date,void 0===n.Le&&(n.Le=60),n.Wh=1e3/n.Le-(e-i)},n.Wh)},ri.prototype.d=function(t,i,e,n,a,s,o){return void 0===o&&(o=0),this.jb.push({xk:0,f:t,Za:i,ho:e,visible:!0,x:n,y:a,Th:1,Vh:1,ua:0,alpha:1,depth:s,za:o,C:0,xd:[]}),this.Zh=!0,this.jb[this.jb.length-1]};var va=new ri(ua);fa=zi.prototype,fa.P=function(){var t,i=new zi(-1,{});for(i.kind=this.kind,i.oa=this.oa,i.Fa=this.Fa,i.va=this.va,i.ab=this.ab,i.r={x:[],y:[]},t=0;t<this.r.x.length;t+=1)i.r.x[t]=this.r.x[t];for(t=0;t<this.r.y.length;t+=1)i.r.y[t]=this.r.y[t];return i},fa.translate=function(t,i){var e,n=this.P();for(n.oa+=t,n.Fa+=t,n.va+=i,n.ab+=i,e=0;e<n.r.x.length;e+=1)n.r.x[e]+=t;for(e=0;e<n.r.y.length;e+=1)n.r.y[e]+=i;return n},fa.scale=function(t){var i,e=this.P();for(e.oa*=t,e.Fa*=t,e.va*=t,e.ab*=t,i=0;i<e.r.x.length;i+=1)e.r.x[i]*=t;for(i=0;i<e.r.y.length;i+=1)e.r.y[i]*=t;return e},fa.rotate=function(i){var e,n,a,s;switch(this.kind){case 0:return e=new t(this.r.x[0],this.r.y[0]),e=e.rotate(i),new zi(0,{x:e.x,y:e.y});case 1:return e=new t(this.r.x[0],this.r.y[0]),e=e.rotate(i),n=new t(this.r.x[1],this.r.y[1]),n=n.rotate(i),new zi(1,{rk:e.x,tk:e.y,sk:n.x,uk:n.y});case 3:return e=(this.Fa-this.oa)/2,n=new t(this.oa+e,this.va+e),n=n.rotate(i),new zi(3,{x:n.x,y:n.y,zh:e});default:for(n=[],a=[],s=0;s<this.r.x.length-1;s+=1)e=new t(this.r.x[s],this.r.y[s]),e=e.rotate(i),n.push(e.x),a.push(e.y);return new zi(4,{x:n,y:a})}},fa.bb=function(t,i,e){var n=pa.context;switch(n.fillStyle=e,n.strokeStyle=e,this.kind){case 0:n.fillRect(t+this.oa-1,i+this.va-1,3,3);break;case 2:n.fillRect(t+this.oa,i+this.va,this.Fa-this.oa+1,this.ab-this.va+1);break;case 3:e=(this.Fa-this.oa)/2,n.beginPath(),n.arc(t+this.oa+e,i+this.va+e,e,0,2*Math.PI,!1),n.closePath(),n.fill();break;case 1:n.beginPath(),n.moveTo(t+this.r.x[0],i+this.r.y[0]),n.lineTo(t+this.r.x[1],i+this.r.y[1]),n.stroke();break;case 4:for(n.beginPath(),n.moveTo(t+this.r.x[0],i+this.r.y[0]),e=1;e<this.r.x.length-1;e+=1)n.lineTo(t+this.r.x[e],i+this.r.y[e]);n.closePath(),n.fill()}},fa=Di.prototype,fa.P=function(){var t,i=new Di;for(t=0;t<this.U.length;t+=1)i.U.push({Ia:this.U[t].Ia,action:this.U[t].action});return i.Ve=this.Ve,i},fa.Ba=function(t,i){var e,n;if(0===this.U.length||this.U[this.U.length-1].Ia<=t)this.U.push({Ia:t,action:i});else{for(e=0;this.U[e].Ia<=t;)e+=1;for(n=this.U.length;n>e;n-=1)this.U[n]=this.U[n-1];this.U[e]={Ia:t,action:i}}this.W=-1e6},fa.start=function(){this.ef=!0,this.C=!1,this.Jb=0>this.Sc&&0<this.U.length?this.U[this.U.length-1].Ia+1:-1,this.W=-1e6,Bi(va,this),ji(this)},fa.Gj=function(){if(0>this.Sc&&0<this.U.length){var t=this.U[this.U.length-1].Ia;this.Jb=0>this.Sc?t+1:t-1}else this.Jb=0>this.Sc?1:-1;this.W=-1e6},fa.stop=function(){this.ef=!1,Bi(va,this)},fa.Nc=function(){return this.ef},fa.pause=function(){this.C=!0,Bi(va,this)},fa.Pf=function(){this.C=!1,Bi(va,this),ji(this)},fa.paused=function(){return this.ef&&this.C},fa.Dh=function(t){this.Ve=t},fa.qa=function(t){if(this.ef&&!this.C&&0!==this.Sc)if(0<this.Sc){for(0>this.W&&(this.W=0);this.W<this.U.length&&this.U[this.W].Ia<=this.Jb;)this.W+=1;for(this.Jb+=this.Sc*t;0<=this.W&&this.W<this.U.length&&this.U[this.W].Ia<=this.Jb;)this.U[this.W].action(this.U[this.W].Ia,this),this.W+=1;this.W>=this.U.length&&(this.Ve?this.Gj():this.stop())}else{for(0>this.W&&(this.W=this.U.length-1);0<=this.W&&this.U[this.W].Ia>=this.Jb;)this.W-=1;for(this.Jb+=this.Sc*t;0<=this.W&&this.U[this.W].Ia>=this.Jb;)this.U[this.W].action(this.U[this.W].Ia,this),this.W-=1;0>this.W&&0>=this.Jb&&(this.Ve?this.Gj():this.stop())}},fa=Gi.prototype,fa.qa=function(){var t,i,e,n,a;if(this.Pq)for(t=0;16>t;t+=1)va.$[t].pb&&(i=va.$[t].x,e=va.$[t].y,n=this.wd[t],a=this.hb[n],!(n>=0&&a&&a.selected)||a&&Oi(a.Qb,0,0,i,e)||(yi(va,a.keyCode),a.selected=!1,this.wd[t]=-1),this.mc(t,i,e))},fa.mc=function(t,i,e){var n;if(!(0<=this.wd[t]))for(n=0;n<this.hb.length;n+=1){var a;if((a=this.hb[n])&&(a=(a=this.hb[n])?Oi(a.Qb,0,0,i,e):!1),a&&!this.hb[n].selected){wi(va,this.hb[n].keyCode),this.hb[n].selected=!0,this.wd[t]=n;break}}},fa.Kc=function(t){var i=this.wd[t];i>=0&&this.hb[i]&&this.hb[i].selected&&(yi(va,this.hb[i].keyCode),this.hb[i].selected=!1),this.wd[t]=-1},fa.clear=function(){var t;for(t=this.hb.length=0;16>t;t+=1)this.wd[t]=-1},fa.bb=function(t,i,e){var n,a,s,o;for(n=0;n<this.hb.length;n+=1)(a=this.hb[n])&&(a.selected?a.Qb.bb(0,0,i):a.Qb.bb(0,0,t),s=(a.Qb.oa+a.Qb.Fa)/2,o=(a.Qb.va+a.Qb.ab)/2,pa.Cc("id: "+a.id,s-20,o-10,e,"26px Microsoft Yahei"),pa.Cc("key: "+a.keyCode,s-20,o+10,e,"26px Microsoft Yahei"))},new n;var ma=window.TG_InitSettings||{};ma.size=void 0!==ma.size?ma.size:"big",ma.Rr=ma.usesFullScreen,ma.Jj="big"===ma.size?1:.5,ma.wf=20,ma.Ii=10,ma.Fl=0,ma.Sg=-10,ma.zf=-20,ma.Ic=-30,ma.hc=-40;var wa=new u("StartTexture",1,"start");g(wa,0,"media/StartTexture0.png");var ya=new u("LevelMapScreenTexture",1,"load");g(ya,0,"media/LevelMapScreenTexture0.png");var xa=new u("LevelEndTexture",3,"load");g(xa,0,"media/LevelEndTexture0.png"),g(xa,1,"media/LevelEndTexture1.png"),g(xa,2,"media/LevelEndTexture2.png");var _a=new u("MenuTexture",3,"load");g(_a,0,"media/MenuTexture0.png"),g(_a,1,"media/MenuTexture1.png"),g(_a,2,"media/MenuTexture2.png");var ka=new u("GameTexture",3,"load");g(ka,0,"media/GameTexture0.png"),g(ka,1,"media/GameTexture1.png"),g(ka,2,"media/GameTexture2.png");var Sa=new u("GameStaticTexture",1,"load");g(Sa,0,"media/GameStaticTexture0.png");var Ta=new u("StartScreenTexture",3,"load");g(Ta,0,"media/StartScreenTexture0.jpg"),g(Ta,1,"media/StartScreenTexture1.png"),g(Ta,2,"media/StartScreenTexture2.png"),new p("s_loadingbar_background",wa,1,34,24,0,0).d(0,0,1,1,34,24,0,0),new p("s_loadingbar_fill",wa,1,24,14,0,0).d(0,0,41,1,24,14,0,0);var Ma=new p("s_level_0",ya,1,125,140,0,0);Ma.d(0,0,129,1,125,140,0,0);var Ea=new p("s_level_1",ya,1,125,140,0,0);Ea.d(0,0,257,1,125,140,0,0);var ja=new p("s_level_2",ya,1,125,140,0,0);ja.d(0,0,1,1,125,140,0,0);var Ca=new p("s_level_3",ya,1,125,140,0,0);Ca.d(0,0,385,1,125,140,0,0);var La=new p("s_level_lock",ya,1,48,70,0,0);La.d(0,0,777,113,48,69,0,1);var Aa=new p("s_level_stars",ya,1,126,46,0,0);Aa.d(0,0,513,1,126,45,0,1);var Ia=new p("s_level2_0",ya,1,84,87,0,0);Ia.d(0,0,897,97,84,87,0,0);var Ba=new p("s_level2_1",ya,1,84,87,0,0);Ba.d(0,0,897,1,84,87,0,0);var za=new p("s_level2_2",ya,1,84,87,0,0);za.d(0,0,601,113,84,87,0,0);var qa=new p("s_level2_3",ya,1,84,87,0,0);qa.d(0,0,513,49,84,87,0,0);var Fa=new p("s_level2_arrow_right",ya,2,60,108,0,0);Fa.d(0,0,833,1,60,108,0,0),Fa.d(1,0,641,1,60,108,0,0);var Oa=new p("s_level2_arrow_left",ya,2,60,108,0,0);Oa.d(0,0,705,1,60,108,0,0),Oa.d(1,0,769,1,60,108,0,0);var Da=new p("s_level2_lock",ya,1,84,87,0,0);Da.d(0,0,689,113,84,87,0,0);var Ga=new p("s_star01_empty",xa,1,170,170,85,85);Ga.d(0,2,217,257,163,168,2,2);var Ra=new p("s_star01_fill",xa,1,170,170,85,85);Ra.d(0,2,1,441,142,147,14,17);var Ha=new p("s_star02_empty",xa,1,170,170,85,85);Ha.d(0,2,481,249,168,162,1,1);var Ya=new p("s_star02_fill",xa,1,170,170,85,85);Ya.d(0,1,273,881,146,141,12,16);var Na=new p("s_star03_empty",xa,1,170,170,85,85);Na.d(0,2,1,265,164,168,4,2);var Xa=new p("s_star03_fill",xa,1,170,170,85,85);Xa.d(0,2,169,433,142,148,14,16);var Pa=new p("s_sfx_star",xa,8,300,300,150,150);Pa.d(0,1,425,881,134,131,85,89),Pa.d(1,2,481,1,250,244,19,27),Pa.d(2,2,217,1,257,253,17,20),Pa.d(3,1,1,625,266,263,12,15),Pa.d(4,1,697,601,262,273,13,10),Pa.d(5,1,345,609,251,270,19,12),Pa.d(6,2,1,1,213,260,38,16),Pa.d(7,1,697,297,243,299,23,1);
  6. var Va=new p("s_pop_medal",xa,8,378,378,189,189);Va.d(0,0,609,1,349,241,3,69),Va.d(1,0,609,529,346,267,5,54),Va.d(2,0,609,249,348,276,20,56),Va.d(3,1,353,1,342,288,26,50),Va.d(4,1,697,1,319,292,22,46),Va.d(5,1,1,313,337,304,14,41),Va.d(6,1,1,1,343,305,12,41),Va.d(7,1,353,297,341,304,13,41);var Wa=new p("s_medal_shadow",xa,1,195,208,0,0);Wa.d(0,2,737,217,189,204,3,1);var Ua=new p("s_medal_shine",xa,6,195,208,0,0);Ua.d(0,0,1,785,193,207,1,1),Ua.d(1,0,201,785,193,207,1,1),Ua.d(2,0,401,785,193,207,1,1),Ua.d(3,0,801,801,193,207,1,1),Ua.d(4,2,737,1,193,207,1,1),Ua.d(5,0,601,801,193,207,1,1);var Ja=new p("s_icon_toggle_hard",_a,1,67,67,0,0);Ja.d(0,0,945,569,67,67,0,0);var Ka=new p("s_icon_toggle_medium",_a,1,67,67,0,0);Ka.d(0,0,945,425,67,67,0,0);var Qa=new p("s_icon_toggle_easy",_a,1,67,67,0,0);Qa.d(0,0,945,497,67,67,0,0);var $a=new p("s_flagIcon_us",_a,1,48,48,0,0);$a.d(0,0,881,193,48,36,0,6);var Za=new p("s_flagIcon_gb",_a,1,48,48,0,0);Za.d(0,0,785,809,48,36,0,6);var ts=new p("s_flagIcon_nl",_a,1,48,48,0,0);ts.d(0,0,729,809,48,36,0,6);var is=new p("s_flagIcon_tr",_a,1,48,48,0,0);is.d(0,0,841,809,48,36,0,6);var es=new p("s_flagIcon_de",_a,1,48,48,0,0);es.d(0,0,937,193,48,36,0,6);var ns=new p("s_tutorialButton_close",_a,1,66,65,0,0);ns.d(0,0,945,785,65,65,0,0);var as=new p("s_tutorialButton_next",_a,1,66,65,0,0);as.d(0,0,945,713,66,65,0,0);var ss=new p("s_tutorialButton_previous",_a,1,66,65,0,0);ss.d(0,0,945,641,66,65,0,0);var os=new p("s_logo_tinglygames",_a,1,270,66,0,0);os.d(0,0,609,161,269,65,0,0);var hs=new p("s_mascottes",_a,1,278,152,0,0);hs.d(0,0,609,1,278,152,0,0);var rs=new p("s_ui_difficulty_background",ka,1,640,124,0,0);rs.d(0,1,0,0,640,124,0,0);var ls=new p("s_ui_smiley_hard",ka,1,38,38,0,0);ls.d(0,0,966,160,38,38,0,0);var cs=new p("s_ui_smiley_medium",ka,1,38,38,0,0);cs.d(0,0,966,118,38,38,0,0);var ds=new p("s_ui_smiley_easy",ka,1,38,38,0,0);ds.d(0,0,966,78,38,38,0,0);var fs=new p("s_ui_crown",ka,1,38,38,0,0);fs.d(0,0,966,200,38,38,0,0);var us=new p("s_ui_heart",ka,1,28,24,0,0);us.d(0,0,961,1,26,23,1,1);var gs=new p("s_tutorial_01",Sa,1,350,190,0,0);gs.d(0,0,601,193,317,141,0,12);var ps=new p("s_tutorial_02",Sa,1,350,190,0,0);ps.d(0,0,1,529,241,178,55,6);var bs=new p("s_tutorial_03",Sa,1,350,190,0,0);bs.d(0,0,945,1,67,180,156,5);var vs=new p("s_tutorial_04",Sa,1,350,190,0,0);vs.d(0,0,601,1,341,186,4,1);var ms=new p("s_tutorial_05",Sa,1,350,256,0,0);ms.d(0,0,601,337,286,256,38,2);var ws=new p("s_cards",ka,52,84,110,42,55);ws.d(8,2,78,2,74,102,5,5),ws.d(9,2,154,2,74,102,5,5),ws.d(10,2,230,2,74,102,5,5),ws.d(11,2,306,2,74,102,5,5),ws.d(12,2,382,2,74,102,5,5),ws.d(13,2,2,106,74,102,5,5),ws.d(14,2,78,106,74,102,5,5),ws.d(15,2,154,106,74,102,5,5),ws.d(16,2,230,106,74,102,5,5),ws.d(17,2,306,106,74,102,5,5),ws.d(0,2,382,106,74,102,5,5),ws.d(18,2,2,210,74,102,5,5),ws.d(19,2,78,210,74,102,5,5),ws.d(20,2,154,210,74,102,5,5),ws.d(21,2,230,210,74,102,5,5),ws.d(22,2,306,210,74,102,5,5),ws.d(23,2,382,210,74,102,5,5),ws.d(24,2,2,314,74,102,5,5),ws.d(25,2,78,314,74,102,5,5),ws.d(26,2,154,314,74,102,5,5),ws.d(27,2,230,314,74,102,5,5),ws.d(1,2,306,314,74,102,5,5),ws.d(28,2,382,314,74,102,5,5),ws.d(29,2,2,418,74,102,5,5),ws.d(30,2,78,418,74,102,5,5),ws.d(31,2,154,418,74,102,5,5),ws.d(32,2,230,418,74,102,5,5),ws.d(33,2,306,418,74,102,5,5),ws.d(34,2,382,418,74,102,5,5),ws.d(35,2,2,522,74,102,5,5),ws.d(36,2,78,522,74,102,5,5),ws.d(37,2,154,522,74,102,5,5),ws.d(2,2,230,522,74,102,5,5),ws.d(38,2,306,522,74,102,5,5),ws.d(39,2,382,522,74,102,5,5),ws.d(40,2,2,626,74,102,5,5),ws.d(41,2,78,626,74,102,5,5),ws.d(42,2,154,626,74,102,5,5),ws.d(43,2,230,626,74,102,5,5),ws.d(44,2,306,626,74,102,5,5),ws.d(45,2,382,626,74,102,5,5),ws.d(46,2,2,730,74,102,5,5),ws.d(47,2,78,730,74,102,5,5),ws.d(3,2,154,730,74,102,5,5),ws.d(48,2,230,730,74,102,5,5),ws.d(49,2,306,730,74,102,5,5),ws.d(50,2,382,730,74,102,5,5),ws.d(51,2,2,834,74,102,5,5),ws.d(4,2,78,834,74,102,5,5),ws.d(5,2,154,834,74,102,5,5),ws.d(6,2,230,834,74,102,5,5),ws.d(7,2,306,834,74,102,5,5);var ys=new p("s_card_shadow",ka,1,84,114,42,55);ys.d(0,1,401,169,72,104,6,5);var xs=new p("s_card_position_stock",ka,1,84,114,42,55);xs.d(0,1,81,169,72,104,6,5);var _s=new p("s_card_position_waste",ka,1,84,114,42,55);_s.d(0,1,241,169,72,104,6,5);var ks=new p("s_card_position_pile",ka,1,84,114,42,55);ks.d(0,1,321,169,72,104,6,5);var Ss=new p("s_card_position_foundation",ka,1,84,114,42,55);Ss.d(0,1,161,169,72,104,6,5);var Ts=new p("s_card_dust",ka,9,120,160,60,80);Ts.d(0,0,857,145,110,136,5,12),Ts.d(1,0,649,289,110,136,5,12),Ts.d(2,0,761,289,110,136,5,12),Ts.d(3,0,873,289,100,136,10,12),Ts.d(4,0,649,1,102,138,9,11),Ts.d(5,0,753,1,102,138,9,11),Ts.d(6,0,857,1,102,138,9,11),Ts.d(7,0,649,145,102,138,9,11),Ts.d(8,0,753,145,102,138,9,11);var Ms=new p("s_btn_small_exit",_a,2,208,94,0,0);Ms.d(0,0,618,423,208,94,0,0),Ms.d(1,0,618,423,208,94,0,0);var Es=new p("s_btn_small_pause",_a,2,100,92,0,0);Es.d(0,0,841,521,100,92,0,0),Es.d(1,0,841,425,100,92,0,0);var js=new p("s_btn_small_options",_a,2,100,92,0,0);js.d(0,0,889,97,100,92,0,0),js.d(1,0,889,1,100,92,0,0);var Cs=new p("s_btn_small_retry",xa,2,100,92,0,0);Cs.d(0,1,665,881,100,92,0,0),Cs.d(1,1,561,881,100,92,0,0);var Ls=new p("s_btn_standard",_a,2,96,92,0,0);Ls.d(0,0,569,809,96,92,0,0),Ls.d(1,0,465,785,96,92,0,0);var As=new p("s_btn_toggle",_a,2,308,68,0,0);As.d(0,0,570,160,308,68,0,0),As.d(1,0,570,160,308,68,0,0);var Is=new p("s_icon_toggle_fxoff",_a,2,480,92,0,0);Is.d(0,2,0,0,480,92,0,0),Is.d(1,2,0,0,480,92,0,0);var Bs=new p("s_icon_toggle_fxon",_a,2,480,92,0,0);Bs.d(0,2,0,96,480,92,0,0),Bs.d(1,2,0,96,480,92,0,0);var zs=new p("s_icon_toggle_musicoff",_a,2,227,92,0,0);zs.d(0,0,233,785,227,92,0,0),zs.d(1,0,609,713,227,92,0,0);var qs=new p("s_icon_toggle_musicon",_a,2,227,92,0,0);qs.d(0,0,1,785,227,92,0,0),qs.d(1,0,609,617,227,92,0,0);var Fs=new p("s_icon_toggle_sound_off",_a,1,67,67,0,0);Fs.d(0,0,673,809,227,41,8,16);var Os=new p("s_icon_toggle_sound_on",_a,1,67,67,0,0);Os.d(0,0,897,809,38,41,13,16);var Ds=new p("s_btn_big_start",xa,2,154,152,0,0);Ds.d(0,2,865,425,154,152,0,0),Ds.d(1,2,385,417,154,152,0,0);var Gs=new p("s_btn_bigtext",Ta,2,396,112,0,0);Gs.d(0,2,0,0,396,112,0,0),Gs.d(1,2,396,0,396,112,0,0);var Rs=new p("s_btn_big_restart",xa,2,208,94,0,0);Rs.d(0,2,545,417,208,94,0,0),Rs.d(1,2,545,417,208,94,0,0);var Hs=new p("s_overlay_assignment",Sa,1,592,520,0,0);Hs.d(0,0,1,1,591,519,1,1);var Ys=new p("s_overlay_options",_a,1,602,778,0,0);Ys.d(0,0,1,1,602,778,0,0);var Ns=new p("s_screen_start",Ta,1,640,960,0,0);Ns.d(0,0,0,0,640,960,0,0);var Xs=new p("s_tutorial",_a,1,522,650,16,-20);Xs.d(0,1,1,1,522,650,0,0);var Ps=new p("s_overlay_difficulty",xa,1,602,778,0,0);Ps.d(0,0,1,1,602,778,0,0);var Vs=new p("s_background",ka,1,640,960,0,0);Vs.d(0,0,1,1,640,960,0,0);var Ws=new p("s_card_back",ka,1,84,110,42,55);Ws.d(0,2,2,2,74,102,5,5),new w("f_default","fonts/f_default.woff","fonts/f_default.ttf","fonts");var Us=new y("Microsoft Yahei","Microsoft Yahei Arial");k(Us,28),Us.fill=!0,Us.setFillColor("Black"),Us.Ua=1,T(Us,!1),Us.setStrokeColor("Black"),M(Us,1),j(Us),Us.Oa=1,E(Us,!1),L(Us,"center"),A(Us,"top"),Us.Aa=0,new w("ff_opensans_extrabold","fonts/ff_opensans_extrabold.woff","fonts/ff_opensans_extrabold.ttf","fonts"),new w("ff_dimbo_regular","fonts/ff_dimbo_regular.woff","fonts/ff_dimbo_regular.ttf","fonts"),new w("ff_opensans_bold","fonts/ff_opensans_bold.woff","fonts/ff_opensans_bold.ttf","fonts"),new w("ff_opensans_bolditalic","fonts/ff_opensans_bolditalic.woff","fonts/ff_opensans_bolditalic.ttf","fonts");var Js=new y("Microsoft Yahei","Microsoft Yahei Arial");k(Js,21),Js.fill=!0,Js.setFillColor("#799EC5"),Js.Ua=1,T(Js,!1),Js.setStrokeColor("White"),M(Js,1),j(Js),Js.Oa=1,E(Js,!1),L(Js,"center"),A(Js,"middle"),Js.Aa=0;var Ks=new y("Microsoft Yahei","Arial Microsoft Yahei");k(Ks,23),Ks.fill=!0,Ks.setFillColor("#799EC5"),Ks.Ua=1,T(Ks,!1),Ks.setStrokeColor("Black"),M(Ks,1),j(Ks),Ks.Oa=1,E(Ks,!1),L(Ks,"center"),A(Ks,"middle"),Ks.Aa=0;var Qs=new y("Microsoft Yahei","Arial Microsoft Yahei");k(Qs,52),Qs.fill=!0,Qs.setFillColor("#dec93f"),Qs.Ua=1,T(Qs,!1),Qs.setStrokeColor("Black"),M(Qs,1),j(Qs),Qs.Oa=1,E(Qs,!1),L(Qs,"center"),A(Qs,"middle"),Qs.Aa=0,new w("floaterFontFace","fonts/floaterFontFace.woff","fonts/floaterFontFace.ttf","fonts"),new w("floaterNumberFontFace","fonts/floaterNumberFontFace.woff","fonts/floaterNumberFontFace.ttf","fonts");var $s=new y("Microsoft Yahei","Arial Microsoft Yahei");k($s,30),_($s),$s.fill=!0,$s.setFillColor("#FFDE00"),$s.Ua=1,T($s,!0),$s.setStrokeColor("#6F1F00"),M($s,2),j($s),$s.Oa=1,E($s,!0),C($s,"rgba(57,0,0,0.46)",4),L($s,"left"),A($s,"top"),$s.Aa=0;var Zs=new y("Microsoft Yahei","Arial Microsoft Yahei 30px ");k(Zs,34),_(Zs),Zs.fill=!0,S(Zs,2,["#FFF600","#00DB48","blue"],.65,.02),Zs.Ua=1,T(Zs,!0),Zs.setStrokeColor("#073400"),M(Zs,5),j(Zs),Zs.Oa=1,E(Zs,!0),C(Zs,"rgba(0,57,43,0.47)",4),L(Zs,"left"),A(Zs,"top"),Zs.Aa=0;var to=new y("Microsoft Yahei","Arial Microsoft Yahei");k(to,36),_(to),to.fill=!0,S(to,3,["#FFF600","#FF8236","#FF0096"],.71,-.1),to.Ua=1,T(to,!0),to.setStrokeColor("#4F0027"),M(to,2),j(to),to.Oa=1,E(to,!0),C(to,"rgba(41,0,0,0.48)",5),L(to,"left"),A(to,"top"),to.Aa=0;var io=new y("Microsoft Yahei","Arial Microsoft Yahei 40px");k(io,40),_(io),io.fill=!0,S(io,3,["#00FCFF","#893DFB","#FF00E4"],.72,-.04),io.Ua=1,T(io,!0),io.setStrokeColor("#001637"),M(io,3),j(io),io.Oa=1,E(io,!0),C(io,"rgba(0,35,75,0.49)",6),L(io,"left"),A(io,"top"),io.Aa=0;var eo=new y("Microsoft Yahei","Arial Microsoft Yahei");k(eo,36),eo.fill=!0,eo.setFillColor("White"),eo.Ua=1,T(eo,!0),eo.setStrokeColor("#00106F"),M(eo,2),j(eo),eo.Oa=1,E(eo,!1),C(eo,"rgba(0,4,57,0.51)",4),L(eo,"left"),A(eo,"top"),eo.Aa=0;var no=new y("Microsoft Yahei","Arial Microsoft Yahei");k(no,36),_(no),no.fill=!0,no.setFillColor("#FF1E00"),no.Ua=1,T(no,!0),no.setStrokeColor("#3F0000"),M(no,2),j(no),no.Oa=1,E(no,!1),C(no,"rgba(57,0,0,0.49)",4),L(no,"left"),A(no,"top"),no.Aa=0,new w("f_themeDefault","fonts/f_themeDefault.woff","fonts/f_themeDefault.ttf","fonts");var ao=new y("Microsoft Yahei","Arial Microsoft Yahei");k(ao,18),ao.fill=!0,ao.setFillColor("Black"),ao.Ua=1,T(ao,!1),ao.setStrokeColor("White"),M(ao,5),j(ao),ao.Oa=1,E(ao,!0),L(ao,"left"),A(ao,"top"),ao.Aa=0,new ei("a_checkmark","audio/a_checkmark.mp3","audio/a_checkmark.ogg","audio",1,10,["sfx"]);var so=new ei("a_levelStart","audio/a_levelStart.mp3","audio/a_levelStart.ogg","audio",1,10,["sfx"]),oo=new ei("a_levelComplete","audio/a_levelComplete.mp3","audio/a_levelComplete.ogg","audio",1,10,["sfx"]),ho=new ei("a_mouseDown","audio/a_mouseDown.mp3","audio/a_mouseDown.ogg","audio",1,10,["sfx"]);new ei("a_popUp","audio/a_popUp.mp3","audio/a_popUp.ogg","audio",1,10,["sfx"]),new ei("a_slideIn","audio/a_slideIn.mp3","audio/a_slideIn.ogg","audio",1,10,["sfx"]),new ei("a_slideOut","audio/a_slideOut.mp3","audio/a_slideOut.ogg","audio",1,10,["sfx"]),new ei("a_unlock","audio/a_unlock.mp3","audio/a_unlock.ogg","audio",1,10,["sfx"]),new ei("a_endGame","audio/a_endGame.mp3","audio/a_endGame.ogg","audio",1,10,["sfx"]);var ro=new ei("a_levelend_star_01","audio/a_levelend_star_01.mp3","audio/a_levelend_star_01.ogg","audio",1,10,["sfx"]),lo=new ei("a_levelend_star_02","audio/a_levelend_star_02.mp3","audio/a_levelend_star_02.ogg","audio",1,10,["sfx"]),co=new ei("a_levelend_star_03","audio/a_levelend_star_03.mp3","audio/a_levelend_star_03.ogg","audio",1,10,["sfx"]),fo=new ei("a_levelend_fail","audio/a_levelend_fail.mp3","audio/a_levelend_fail.ogg","audio",1,10,["sfx"]);new ei("a_levelend_score_counter","audio/a_levelend_score_counter.mp3","audio/a_levelend_score_counter.ogg","audio",1,10,["sfx"]),new ei("a_levelend_score_end","audio/a_levelend_score_end.mp3","audio/a_levelend_score_end.ogg","audio",1,10,["sfx"]);var uo=new ei("a_medal","audio/a_medal.mp3","audio/a_medal.ogg","audio",1,10,["sfx"]),go=new ei("a_shuffle_deck","audio/a_shuffle_deck.mp3","audio/a_shuffle_deck.ogg","audio",1,10,["game"]),po=new ei("a_move_card","audio/a_move_card.mp3","audio/a_move_card.ogg","audio",1,10,["game"]),bo=new ei("a_flip_card","audio/a_flip_card.mp3","audio/a_flip_card.ogg","audio",1,10,["game"]),vo=new ei("a_place_error","audio/a_place_error.mp3","audio/a_place_error.ogg","audio",1,10,["game"]);new ei("a_card_placed","audio/a_card_placed.mp3","audio/a_card_placed.ogg","audio",1,10,["game"]);var mo=new ei("a_foundation_placed","audio/a_foundation_placed.mp3","audio/a_foundation_placed.ogg","audio",1,10,["game"]),wo={},yo={uq:"wincard",Br:!0,Rf:{Cp:!1,xi:["0c73b027c77dd2c1ee6cd996c2c83efc","64494721dfe73de69ac4b64bc8e46a7d","e95f664f107e37cbf7662646e03aaec8","38c38bc5955942d6e070ff3fb9560a5c"]},Pb:{ed:"en-us",ie:["en-us"]},bt:!1},xo=null,_o=_o||{};_o["nl-nl"]=_o["nl-nl"]||{},_o["nl-nl"].loadingScreenLoading="Laden...",_o["nl-nl"].startScreenPlay="SPEEL",_o["nl-nl"].levelMapScreenTotalScore="Totale score",_o["nl-nl"].levelEndScreenTitle_level="Level <VALUE>",_o["nl-nl"].levelEndScreenTitle_difficulty="Goed Gedaan!",_o["nl-nl"].levelEndScreenTitle_endless="Level <VALUE>",_o["nl-nl"].levelEndScreenTotalScore="Totale score",_o["nl-nl"].levelEndScreenSubTitle_levelFailed="Level mislukt!",_o["nl-nl"].levelEndScreenTimeLeft="Tijd over",_o["nl-nl"].levelEndScreenTimeBonus="Tijdsbonus",_o["nl-nl"].levelEndScreenHighScore="High score",_o["nl-nl"].optionsStartScreen="Hoofdmenu",_o["nl-nl"].optionsQuit="Stop",_o["nl-nl"].optionsResume="Terug naar spel",_o["nl-nl"].optionsTutorial="Speluitleg",_o["nl-nl"].optionsHighScore="High scores",_o["nl-nl"].optionsMoreGames="Meer Spellen",_o["nl-nl"].optionsDifficulty_easy="Vrije plaatsing",_o["nl-nl"].optionsDifficulty_medium="1 kaart delen",_o["nl-nl"].optionsDifficulty_hard="3 kaarten delen",_o["nl-nl"].optionsMusic_on="Aan",_o["nl-nl"].optionsMusic_off="Uit",_o["nl-nl"].optionsSFX_on="Aan",_o["nl-nl"].optionsSFX_off="Uit",_o["nl-nl"]["optionsLang_en-us"]="Engels (US)",_o["nl-nl"]["optionsLang_en-gb"]="Engels (GB)",_o["nl-nl"]["optionsLang_nl-nl"]="Nederlands",_o["nl-nl"].gameEndScreenTitle="Gefeliciteerd!\nJe hebt gewonnen.",_o["nl-nl"].gameEndScreenBtnText="Ga verder",_o["nl-nl"].optionsTitle="Instellingen",_o["nl-nl"].optionsQuitConfirmationText="Pas op!\n\nAls je nu stopt verlies je alle voortgang in dit level. Weet je zeker dat je wilt stoppen?",_o["nl-nl"].optionsQuitConfirmBtn_No="Nee",_o["nl-nl"].optionsQuitConfirmBtn_Yes="Ja, ik weet het zeker",_o["nl-nl"].levelMapScreenTitle="Kies een level",_o["nl-nl"].optionsRestartConfirmationText="Pas op!\n\nAls je nu herstart verlies je alle voortgang in dit level. Weet je zeker dat je wilt herstarten?",_o["nl-nl"].optionsRestart="Herstart",_o["nl-nl"].optionsSFXBig_on="Geluid aan",_o["nl-nl"].optionsSFXBig_off="Geluid uit",_o["nl-nl"].optionsAbout_title="Over ons",_o["nl-nl"].optionsAbout_text="Tingly Games",_o["nl-nl"].optionsAbout_backBtn="Terug",_o["nl-nl"].optionsAbout_version="versie:",_o["nl-nl"].optionsAbout="Over ons",_o["nl-nl"].levelEndScreenMedal="VERBETERD!",_o["nl-nl"].startScreenQuestionaire="Wat vind JIJ?",_o["nl-nl"].levelMapScreenWorld_0="Kies een level",_o["nl-nl"].startScreenByTinglyGames="door: Tingly Games",_o["nl-nl"].game_ui_SCORE="SCORE",_o["nl-nl"].game_ui_STAGE="LEVEL",_o["nl-nl"].game_ui_LIVES="LEVENS",_o["nl-nl"].game_ui_TIME="TIJD",_o["nl-nl"].game_ui_HIGHSCORE="HIGH SCORE",_o["nl-nl"].game_ui_LEVEL="LEVEL",_o["nl-nl"].TutorialText_0="Je kan kaarten van een rij naar een andere rij verplaatsen.",_o["nl-nl"].TutorialTitle_0="Speluitleg",_o["nl-nl"].levelStartText="Speel alle kaarten van het veld weg.",_o["nl-nl"].levelStartHeader="Doel",_o["nl-nl"].TutorialText_1="Je mag alleen afwisselende kleuren op elkaar leggen. Zwart op rood op zwart...",_o["nl-nl"].TutorialText_2="En je mag alleen aflopende kaarten op elkaar leggen.",_o["nl-nl"].TutorialText_3="In de top mag je azen wegleggen.",_o["nl-nl"].TutorialText_4="In de top stapels mag je alleen oplopende kaarten van dezelfde kleur leggen.",_o["nl-nl"].TutorialTitle_1="Zwart op rood",_o["nl-nl"].TutorialTitle_2="Aflopend",_o["nl-nl"].TutorialTitle_3="Azen",_o["nl-nl"].TutorialTitle_4="Top stack",_o["nl-nl"].TutorialTitle_5="Winnen",_o["en-us"]=_o["en-us"]||{},_o["en-us"].loadingScreenLoading="Loading...",_o["en-us"].startScreenPlay="play",_o["en-us"].levelMapScreenTotalScore="Total score",_o["en-us"].levelEndScreenTitle_level="Level <VALUE>",_o["en-us"].levelEndScreenTitle_difficulty="Well done!",_o["en-us"].levelEndScreenTitle_endless="Stage <VALUE>",_o["en-us"].levelEndScreenTotalScore="Total score",_o["en-us"].levelEndScreenSubTitle_levelFailed="Level Failed",_o["en-us"].levelEndScreenTimeLeft="Time left",_o["en-us"].levelEndScreenTimeBonus="Time bonus",_o["en-us"].levelEndScreenHighScore="High score",_o["en-us"].optionsStartScreen="Main menu",_o["en-us"].optionsQuit="Quit",_o["en-us"].optionsResume="Resume",_o["en-us"].optionsTutorial="how to play",_o["en-us"].optionsHighScore="High scores",_o["en-us"].optionsMoreGames="More Games",_o["en-us"].optionsDifficulty_easy="Free placement",_o["en-us"].optionsDifficulty_medium="1 card draw",_o["en-us"].optionsDifficulty_hard="3 card draw",_o["en-us"].optionsMusic_on="On",_o["en-us"].optionsMusic_off="Off",_o["en-us"].optionsSFX_on="On",_o["en-us"].optionsSFX_off="Off",_o["en-us"]["optionsLang_en-us"]="English (US)",_o["en-us"]["optionsLang_en-gb"]="English (GB)",_o["en-us"]["optionsLang_nl-nl"]="Dutch",_o["en-us"].gameEndScreenTitle="Congratulations!\nYou have completed the game.",_o["en-us"].gameEndScreenBtnText="Continue",_o["en-us"].optionsTitle="Settings",_o["en-us"].optionsQuitConfirmationText="Attention!\n\nIf you quit now you will lose all progress made during this level. Are you sure you want to quit?",_o["en-us"].optionsQuitConfirmBtn_No="No",_o["en-us"].optionsQuitConfirmBtn_Yes="Yes, I'm sure",_o["en-us"].levelMapScreenTitle="Level Select",_o["en-us"].optionsRestartConfirmationText="Attention!\n\nIf you restart now you will lose all progress made during this level. Are you sure you want to restart?",_o["en-us"].optionsRestart="Restart",_o["en-us"].optionsSFXBig_on="Sound on",_o["en-us"].optionsSFXBig_off="Sound off",_o["en-us"].optionsAbout_title="About",_o["en-us"].optionsAbout_text="",_o["en-us"].optionsAbout_backBtn="Back",_o["en-us"].optionsAbout_version="version:",_o["en-us"].optionsAbout="About",_o["en-us"].levelEndScreenMedal="IMPROVED!",_o["en-us"].startScreenQuestionaire="What do YOU think?",_o["en-us"].levelMapScreenWorld_0="Level Select",_o["en-us"].startScreenByTinglyGames="",_o["en-us"].game_ui_SCORE="SCORE",_o["en-us"].game_ui_STAGE="STAGE",_o["en-us"].game_ui_LIVES="LIVES",_o["en-us"].game_ui_TIME="TIME",_o["en-us"].game_ui_HIGHSCORE="HIGH SCORE",_o["en-us"].game_ui_LEVEL="LEVEL",_o["en-us"].TutorialText_0="You can move cards from one stack to another.",_o["en-us"].TutorialTitle_0="How to play",_o["en-us"].levelStartText="Clear the field of all cards.",_o["en-us"].levelStartHeader="Goal",_o["en-us"].TutorialText_1="You are only allowed to stack cards that alternate in color. Black on red on black...",_o["en-us"].TutorialText_2="And you can only place descending cards on top of each other.",_o["en-us"].TutorialText_3="At the top you can place aces.",_o["en-us"].TutorialText_4="In the top stacks you are allowed to place ascending cards of the same suite.",_o["en-us"].TutorialTitle_1="Black on red",_o["en-us"].TutorialTitle_2="Descending",_o["en-us"].TutorialTitle_3="Aces",_o["en-us"].TutorialTitle_4="Top stack",_o["en-us"].TutorialTitle_5="Winning",_o["zh-cn"]=_o["zh-cn"]||{},_o["zh-cn"].loadingScreenLoading="加载中...",_o["zh-cn"].startScreenPlay="开始游戏",_o["zh-cn"].levelMapScreenTotalScore="总分",_o["zh-cn"].levelEndScreenTitle_level="Level <VALUE>",_o["zh-cn"].levelEndScreenTitle_difficulty="非常棒!",_o["zh-cn"].levelEndScreenTitle_endless="Stage <VALUE>",_o["zh-cn"].levelEndScreenTotalScore="总分",_o["zh-cn"].levelEndScreenSubTitle_levelFailed="过关失败",_o["zh-cn"].levelEndScreenTimeLeft="剩余时间",_o["zh-cn"].levelEndScreenTimeBonus="时间奖励",_o["zh-cn"].levelEndScreenHighScore="高分",_o["zh-cn"].optionsStartScreen="主菜单",_o["zh-cn"].optionsQuit="放弃",_o["zh-cn"].optionsResume="帮助一次",_o["zh-cn"].optionsTutorial="游戏规则",_o["zh-cn"].optionsHighScore="高分",_o["zh-cn"].optionsMoreGames="更多游戏",_o["zh-cn"].optionsDifficulty_easy="任意位置",_o["zh-cn"].optionsDifficulty_medium="翻一张",_o["zh-cn"].optionsDifficulty_hard="翻三张",_o["zh-cn"].optionsMusic_on="开",_o["zh-cn"].optionsMusic_off="关",_o["zh-cn"].optionsSFX_on="开",_o["zh-cn"].optionsSFX_off="关",_o["zh-cn"]["optionsLang_en-us"]="English (US)",_o["zh-cn"]["optionsLang_en-gb"]="English (GB)",_o["zh-cn"]["optionsLang_nl-nl"]="Dutch",_o["zh-cn"].gameEndScreenTitle="恭喜!\n你过关了!",_o["zh-cn"].gameEndScreenBtnText="继续",_o["zh-cn"].optionsTitle="设置",_o["zh-cn"].optionsQuitConfirmationText="请注意!\n\n如果放弃,\n你将会失去本局比赛中所有的成绩.\n 你确定放弃吗?",_o["zh-cn"].optionsQuitConfirmBtn_No="取消",_o["zh-cn"].optionsQuitConfirmBtn_Yes="确定",_o["zh-cn"].levelMapScreenTitle="关卡选择",_o["zh-cn"].optionsRestartConfirmationText="请注意!\n\n如果重新开始,\n你将会失去本局比赛中所有的成绩.\n 你确定重新开始吗?",_o["zh-cn"].optionsRestart="重新开始",_o["zh-cn"].optionsSFXBig_on="打开声音",_o["zh-cn"].optionsSFXBig_off="关闭声音",_o["zh-cn"].optionsAbout_title="关于我们",_o["zh-cn"].optionsAbout_text="",_o["zh-cn"].optionsAbout_backBtn="返回",_o["zh-cn"].optionsAbout_version="版本:",_o["zh-cn"].optionsAbout="关于",_o["zh-cn"].levelEndScreenMedal="IMPROVED!",_o["zh-cn"].startScreenQuestionaire="What do YOU think?",_o["zh-cn"].levelMapScreenWorld_0="关卡选择",_o["zh-cn"].startScreenByTinglyGames="",_o["zh-cn"].game_ui_SCORE="分数",_o["zh-cn"].game_ui_STAGE="舞台",_o["zh-cn"].game_ui_LIVES="生命",_o["zh-cn"].game_ui_TIME="时间",_o["zh-cn"].game_ui_HIGHSCORE="最高分",_o["zh-cn"].game_ui_LEVEL="等级",_o["zh-cn"].TutorialText_0="你可以把纸牌从一列移动到另一列.",_o["zh-cn"].TutorialTitle_0="游戏规则",_o["zh-cn"].levelStartText="将四种花色A-K的牌\n按顺序移到右上方的四个方格内",_o["zh-cn"].levelStartHeader="目标",_o["zh-cn"].TutorialText_1="只允许排列不同颜色的纸牌. 黑色,红色,黑色....",_o["zh-cn"].TutorialText_2="纸牌数字依次递减",_o["zh-cn"].TutorialText_3="在顶部位置你可以放A",_o["zh-cn"].TutorialText_4="顶部位置只允许依次递增的\n放置同种花色的纸牌",_o["zh-cn"].TutorialTitle_1="纸牌颜色:黑-红",_o["zh-cn"].TutorialTitle_2="递减",_o["zh-cn"].TutorialTitle_3="A的位置",_o["zh-cn"].TutorialTitle_4="顶部右侧方格",_o["zh-cn"].TutorialTitle_5="胜利",_o["en-gb"]=_o["en-gb"]||{},_o["en-gb"].loadingScreenLoading="Loading...",_o["en-gb"].startScreenPlay="PLAY",_o["en-gb"].levelMapScreenTotalScore="Total score",_o["en-gb"].levelEndScreenTitle_level="Level <VALUE>",_o["en-gb"].levelEndScreenTitle_difficulty="Well done!",_o["en-gb"].levelEndScreenTitle_endless="Stage <VALUE>",_o["en-gb"].levelEndScreenTotalScore="Total score",_o["en-gb"].levelEndScreenSubTitle_levelFailed="Level Failed",_o["en-gb"].levelEndScreenTimeLeft="Time left",_o["en-gb"].levelEndScreenTimeBonus="Time bonus",_o["en-gb"].levelEndScreenHighScore="High score",_o["en-gb"].optionsStartScreen="Main menu",_o["en-gb"].optionsQuit="Quit",_o["en-gb"].optionsResume="Resume",_o["en-gb"].optionsTutorial="How to play",_o["en-gb"].optionsHighScore="High scores",_o["en-gb"].optionsMoreGames="More Games",_o["en-gb"].optionsDifficulty_easy="Free placement",_o["en-gb"].optionsDifficulty_medium="1 card draw",_o["en-gb"].optionsDifficulty_hard="3 card draw",_o["en-gb"].optionsMusic_on="On",_o["en-gb"].optionsMusic_off="Off",_o["en-gb"].optionsSFX_on="On",_o["en-gb"].optionsSFX_off="Off",_o["en-gb"]["optionsLang_en-us"]="English (US)",_o["en-gb"]["optionsLang_en-gb"]="English (GB)",_o["en-gb"]["optionsLang_nl-nl"]="Dutch",_o["en-gb"].gameEndScreenTitle="Congratulations!\nYou have completed the game.",_o["en-gb"].gameEndScreenBtnText="Continue",_o["en-gb"].optionsTitle="Settings",_o["en-gb"].optionsQuitConfirmationText="Attention!\n\nIf you quit now you will lose all progress made during this level. Are you sure you want to quit?",_o["en-gb"].optionsQuitConfirmBtn_No="No",_o["en-gb"].optionsQuitConfirmBtn_Yes="Yes, I'm sure",_o["en-gb"].levelMapScreenTitle="Level Select",_o["en-gb"].optionsRestartConfirmationText="Attention!\n\nIf you restart now you will lose all progress made during this level. Are you sure you want to restart?",_o["en-gb"].optionsRestart="Restart",_o["en-gb"].optionsSFXBig_on="Sound on",_o["en-gb"].optionsSFXBig_off="Sound off",_o["en-gb"].optionsAbout_title="About",_o["en-gb"].optionsAbout_text="",_o["en-gb"].optionsAbout_backBtn="Back",_o["en-gb"].optionsAbout_version="version:",_o["en-gb"].optionsAbout="About",_o["en-gb"].levelEndScreenMedal="IMPROVED!",_o["en-gb"].startScreenQuestionaire="What do YOU think?",_o["en-gb"].levelMapScreenWorld_0="Level Select",_o["en-gb"].startScreenByTinglyGames="by: Tingly Games",_o["en-gb"].game_ui_SCORE="SCORE",_o["en-gb"].game_ui_STAGE="STAGE",_o["en-gb"].game_ui_LIVES="LIVES",_o["en-gb"].game_ui_TIME="TIME",_o["en-gb"].game_ui_HIGHSCORE="HIGH SCORE",_o["en-gb"].game_ui_LEVEL="LEVEL",_o["en-gb"].TutorialText_0="You can move cards from one stack to another.",_o["en-gb"].TutorialTitle_0="How to play",_o["en-gb"].levelStartText="Clear the field of all cards.",_o["en-gb"].levelStartHeader="Goal",_o["en-gb"].TutorialText_1="You are only allowed to stack cards that alternate in color. Black on red on black...",_o["en-gb"].TutorialText_2="And you can only place descending cards on top of each other.",_o["en-gb"].TutorialText_3="At the top you can place aces.",_o["en-gb"].TutorialText_4="In the top stacks you are allowed to place ascending cards of the same suite.",_o["en-gb"].TutorialTitle_1="Black on red",_o["en-gb"].TutorialTitle_2="Descending",_o["en-gb"].TutorialTitle_3="Aces",_o["en-gb"].TutorialTitle_4="Top stack",_o["en-gb"].TutorialTitle_5="Winning",_o["de-de"]=_o["de-de"]||{},_o["de-de"].loadingScreenLoading="Loading...",_o["de-de"].startScreenPlay="PLAY",_o["de-de"].levelMapScreenTotalScore="Total score",_o["de-de"].levelEndScreenTitle_level="Level <VALUE>",_o["de-de"].levelEndScreenTitle_difficulty="Well done!",_o["de-de"].levelEndScreenTitle_endless="Stage <VALUE>",_o["de-de"].levelEndScreenTotalScore="Total score",_o["de-de"].levelEndScreenSubTitle_levelFailed="Level Failed",_o["de-de"].levelEndScreenTimeLeft="Time left",_o["de-de"].levelEndScreenTimeBonus="Time bonus",_o["de-de"].levelEndScreenHighScore="High score",_o["de-de"].optionsStartScreen="Main menu",_o["de-de"].optionsQuit="Quit",_o["de-de"].optionsResume="Resume",_o["de-de"].optionsTutorial="How to play",_o["de-de"].optionsHighScore="High scores",_o["de-de"].optionsMoreGames="More Games",_o["de-de"].optionsDifficulty_easy="Free placement",_o["de-de"].optionsDifficulty_medium="1 card draw",_o["de-de"].optionsDifficulty_hard="3 card draw",_o["de-de"].optionsMusic_on="On",_o["de-de"].optionsMusic_off="Off",_o["de-de"].optionsSFX_on="On",_o["de-de"].optionsSFX_off="Off",_o["de-de"]["optionsLang_en-us"]="English (US)",_o["de-de"]["optionsLang_en-gb"]="English (GB)",_o["de-de"]["optionsLang_nl-nl"]="Dutch",_o["de-de"].gameEndScreenTitle="Congratulations!\nYou have completed the game.",_o["de-de"].gameEndScreenBtnText="Continue",_o["de-de"].optionsTitle="Settings",_o["de-de"].optionsQuitConfirmationText="Attention!\n\nIf you quit now you will lose all progress made during this level. Are you sure you want to quit?",_o["de-de"].optionsQuitConfirmBtn_No="No",_o["de-de"].optionsQuitConfirmBtn_Yes="Yes, I'm sure",_o["de-de"].levelMapScreenTitle="Level Select",_o["de-de"].optionsRestartConfirmationText="Attention!\n\nIf you restart now you will lose all progress made during this level. Are you sure you want to restart?",_o["de-de"].optionsRestart="Restart",_o["de-de"].optionsSFXBig_on="Sound on",_o["de-de"].optionsSFXBig_off="Sound off",_o["de-de"].optionsAbout_title="About",_o["de-de"].optionsAbout_text="Tingly Games",_o["de-de"].optionsAbout_backBtn="Back",_o["de-de"].optionsAbout_version="version:",_o["de-de"].optionsAbout="About",_o["de-de"].levelEndScreenMedal="IMPROVED!",_o["de-de"].startScreenQuestionaire="What do YOU think?",_o["de-de"].levelMapScreenWorld_0="Level Select",_o["de-de"].startScreenByTinglyGames="by: Tingly Games",_o["de-de"].game_ui_SCORE="SCORE",_o["de-de"].game_ui_STAGE="STAGE",_o["de-de"].game_ui_LIVES="LIVES",_o["de-de"].game_ui_TIME="TIME",_o["de-de"].game_ui_HIGHSCORE="HIGH SCORE",_o["de-de"].game_ui_LEVEL="LEVEL",_o["de-de"].TutorialText_0="You can move cards from one stack to another.",_o["de-de"].TutorialTitle_0="How to play",_o["de-de"].levelStartText="Clear the field of all cards.",_o["de-de"].levelStartHeader="Goal",_o["de-de"].TutorialText_1="You are only allowed to stack cards that alternate in color. Black on red on black...",_o["de-de"].TutorialText_2="And you can only place descending cards on top of each other.",_o["de-de"].TutorialText_3="At the top you can place aces.",_o["de-de"].TutorialText_4="In the top stacks you are allowed to place ascending cards of the same suite.",_o["de-de"].TutorialTitle_1="Black on red",_o["de-de"].TutorialTitle_2="Descending",_o["de-de"].TutorialTitle_3="Aces",_o["de-de"].TutorialTitle_4="Top stack",_o["de-de"].TutorialTitle_5="Winning",_o["tr-tr"]=_o["tr-tr"]||{},_o["tr-tr"].loadingScreenLoading="Loading...",_o["tr-tr"].startScreenPlay="PLAY",_o["tr-tr"].levelMapScreenTotalScore="Total score",_o["tr-tr"].levelEndScreenTitle_level="Level <VALUE>",_o["tr-tr"].levelEndScreenTitle_difficulty="Well done!",_o["tr-tr"].levelEndScreenTitle_endless="Stage <VALUE>",_o["tr-tr"].levelEndScreenTotalScore="Total score",_o["tr-tr"].levelEndScreenSubTitle_levelFailed="Level Failed",_o["tr-tr"].levelEndScreenTimeLeft="Time left",_o["tr-tr"].levelEndScreenTimeBonus="Time bonus",_o["tr-tr"].levelEndScreenHighScore="High score",_o["tr-tr"].optionsStartScreen="Main menu",_o["tr-tr"].optionsQuit="Quit",_o["tr-tr"].optionsResume="Resume",_o["tr-tr"].optionsTutorial="How to play",_o["tr-tr"].optionsHighScore="High scores",_o["tr-tr"].optionsMoreGames="More Games",_o["tr-tr"].optionsDifficulty_easy="Free placement",_o["tr-tr"].optionsDifficulty_medium="1 card draw",_o["tr-tr"].optionsDifficulty_hard="3 card draw",_o["tr-tr"].optionsMusic_on="On",_o["tr-tr"].optionsMusic_off="Off",_o["tr-tr"].optionsSFX_on="On",_o["tr-tr"].optionsSFX_off="Off",_o["tr-tr"]["optionsLang_en-us"]="English (US)",_o["tr-tr"]["optionsLang_en-gb"]="English (GB)",_o["tr-tr"]["optionsLang_nl-nl"]="Dutch",_o["tr-tr"].gameEndScreenTitle="Congratulations!\nYou have completed the game.",_o["tr-tr"].gameEndScreenBtnText="Continue",_o["tr-tr"].optionsTitle="Settings",_o["tr-tr"].optionsQuitConfirmationText="Attention!\n\nIf you quit now you will lose all progress made during this level. Are you sure you want to quit?",_o["tr-tr"].optionsQuitConfirmBtn_No="No",_o["tr-tr"].optionsQuitConfirmBtn_Yes="Yes, I'm sure",_o["tr-tr"].levelMapScreenTitle="Level Select",_o["tr-tr"].optionsRestartConfirmationText="Attention!\n\nIf you restart now you will lose all progress made during this level. Are you sure you want to restart?",_o["tr-tr"].optionsRestart="Restart",_o["tr-tr"].optionsSFXBig_on="Sound on",_o["tr-tr"].optionsSFXBig_off="Sound off",_o["tr-tr"].optionsAbout_title="About",_o["tr-tr"].optionsAbout_text="Tingly Games",_o["tr-tr"].optionsAbout_backBtn="Back",_o["tr-tr"].optionsAbout_version="version:",_o["tr-tr"].optionsAbout="About",_o["tr-tr"].levelEndScreenMedal="IMPROVED!",_o["tr-tr"].startScreenQuestionaire="What do YOU think?",_o["tr-tr"].levelMapScreenWorld_0="Level Select",_o["tr-tr"].startScreenByTinglyGames="by: Tingly Games",_o["tr-tr"].game_ui_SCORE="SCORE",_o["tr-tr"].game_ui_STAGE="STAGE",_o["tr-tr"].game_ui_LIVES="LIVES",_o["tr-tr"].game_ui_TIME="TIME",_o["tr-tr"].game_ui_HIGHSCORE="HIGH SCORE",_o["tr-tr"].game_ui_LEVEL="LEVEL",_o["tr-tr"].TutorialText_0="You can move cards from one stack to another.",_o["tr-tr"].TutorialTitle_0="How to play",_o["tr-tr"].levelStartText="Clear the field of all cards.",_o["tr-tr"].levelStartHeader="Goal",_o["tr-tr"].TutorialText_1="You are only allowed to stack cards that alternate in color. Black on red on black...",_o["tr-tr"].TutorialText_2="And you can only place descending cards on top of each other.",_o["tr-tr"].TutorialText_3="At the top you can place aces.",_o["tr-tr"].TutorialText_4="In the top stacks you are allowed to place ascending cards of the same suite.",_o["tr-tr"].TutorialTitle_1="Black on red",_o["tr-tr"].TutorialTitle_2="Descending",_o["tr-tr"].TutorialTitle_3="Aces",_o["tr-tr"].TutorialTitle_4="Top stack",_o["tr-tr"].TutorialTitle_5="Winning";
  7. var ko=ko||{};ko.yf={Rg:"c28fe7f656634d823ab6483d02ecf09c",Ch:"4360442cc2162463fdc6a8d8cf329e32184e353b"};var So={},To={};if(_o=_o||{},_o["en-us"]=_o["en-us"]||{},_o["en-us"].optionsAbout_text="",ma.H=ma.H||{},ma.H.Ol=function(){ma.e.Ub()},ma.H.pm=function(){},ma.H.Pl=function(){ma.e.Ub()},ma.H.Ti=function(){ma.e.Ub()},ma.H.mp=function(){ma.e.Ub()},ma.H.Rl=function(){ma.e.Ub()},ma.H.lp=function(){ma.e.Ub()},ma.H.Ij=function(t,i,e){return void 0===ma.e.ac&&(ma.e.ac=new qe(!0)),ma.e.ac.Ij(t,i,e)},ma.H.ah=function(t,i,e){return void 0===ma.e.ac&&(ma.e.ac=new qe(!0)),ma.e.ac.ah(t,i,e)},ma.H.Hj=function(t){return void 0===ma.e.ac&&(ma.e.ac=new qe(!0)),ma.e.ac.Hj(t)},ma.H.$g=function(t){return void 0===ma.e.ac&&(ma.e.ac=new qe(!0)),ma.e.ac.$g(t)},ma.H.nh=function(t){window.open(t)},window.publisherSettings={},oe.prototype.ya=function(){if(this.Ie>=this.duration)return this.Zc(this.duration,this.xf,this.jk-this.xf,this.duration);var t=this.Zc(this.Ie,this.xf,this.jk-this.xf,this.duration);return this.jl&&(t=this.jl(t)),t},ma.ap=void 0!==ma.environment?ma.environment:"development",ma.Zr=void 0!==ma.ga?ma.ga:ma.ap,s("undefined"!=typeof ma.mediaUrl?ma.mediaUrl:ma.size),ma.Ah="resizeEvent",ma.version={builder:"1.3.5.0","build-time":"13:06:24","build-date":"08-09-2014",audio:ba.gb?"web audio api":ba.Ja?"html5 audio":"no audio"},ma.a={},"function"==typeof ie&&ie(),"function"==typeof ee&&ee(),"function"==typeof ne&&ne(),"function"==typeof ae&&ae(),ma.a.h="undefined"!=typeof wo?wo:{},ma.a.i="undefined"!=typeof xo?xo:{},ma.a.L="undefined"!=typeof So?So:{},ma.a.ss="undefined"!=typeof To?To:{},ma.Aj=window.publisherSettings,ma.G="undefined"!=typeof game_configuration?game_configuration:{},"undefined"!=typeof yo&&(ma.G=yo),"undefined"!=typeof ko)for(var Mo in ko)ma.G[Mo]=ko[Mo];!function(){var t,i,e,n;if(ma.w={},ma.w.wk="undefined"!=typeof _o?_o:{},ma.w.bi=void 0!==ma.G.Pb&&void 0!==ma.G.Pb.ed?ma.G.Pb.ed:ma.a.h.Pb.ed,ma.w.gg=ma.w.wk[ma.w.bi],t=void 0!==ma.G.Pb&&void 0!==ma.G.Pb.ie?ma.G.Pb.ie:ma.a.h.Pb.ie,ma.hd="languageSet",void 0!==ma.a.h.kb.language_toggle&&void 0!==ma.a.h.kb.language_toggle.J){for(i=ma.a.h.kb.language_toggle.J,n=[],e=0;e<i.length;e++)0<=t.indexOf(i[e].id)&&n.push(i[e]);ma.a.h.kb.language_toggle.J=n}ma.w.R=function(t,i){return void 0!==ma.w.gg&&void 0!==ma.w.gg[t]?ma.w.gg[t]:i},ma.w.Zm=function(t){ma.w.bi=t,ma.w.gg=ma.w.wk[t],_i(ma.hd,t)},ma.w.hp=function(){return ma.w.bi}}(),ma.Ko={hq:"",iq:"",jq:"",Jo:""},ma.b={},ma.b.createEvent=function(t,i){var e,n,a,s;if(n=i.detail||{},a=i.bubbles||!1,s=i.cancelable||!1,"function"==typeof CustomEvent)e=new CustomEvent(t,{detail:n,bubbles:a,cancelable:s});else try{e=document.createEvent("CustomEvent"),e.initCustomEvent(t,a,s,n)}catch(o){e=document.createEvent("Event"),e.initEvent(t,a,s),e.data=n}return e},ma.b.Xg=function(t){function i(){}i.prototype=Re.prototype,t.prototype=new i},ma.b.Hq=function(t,i,e,n,a,s){var o=!1,h=document.getElementById(t);return h||(o=!0,h=document.createElement("canvas"),h.id=t),h.style.zIndex=i,h.style.top=e+"px",h.style.left=n+"px",h.width=a,h.height=s,o&&((t=document.getElementById("viewport"))?t.appendChild(h):document.body.appendChild(h)),ma.k.push(h),h},function(){var t,i,e,n,a,s;if(s=navigator.userAgent.toLowerCase(),ma.Yi=0,ma.Zi=0,ma.Bh=!1,ma.Lo=/ipad/i.test(s)?!1:/webos/i.test(s)?!0:"ontouchstart"in window?!0:!1,ma.Qr=/android/i.test(s)&&!/(chrome|firefox|opera)/i.test(s)&&4<=parseInt(s.match(/android [\d+\.]{3,5}/)[0].replace("android ",""),10),ma.cg=!1,ma.ml=/Android/i.test(s)&&!/Chrome/i.test(s),void 0!==ma.a.i.k&&void 0!==ma.a.i.k.dc)for(t in ma.a.i.k.dc)ma.a.h.k.dc[t]=ma.a.i.k.dc[t];i=function(){var t,i,e,n;if(ma.Qr&&!ma.cg){if(ma.cg=!0,t=document.getElementsByTagName("canvas"))for(i=0;i<t.length;i++)if(e=t[i],!e.getContext||!e.getContext("2d"))return void(ma.cg=!1);for(i=document.createEvent("Event"),i.Ps=[!1],i.initEvent("gameSetPause",!1,!1),window.dispatchEvent(i),n=[],i=0;i<t.length;i++){e=t[i];var a=e.getContext("2d"),s=a.getImageData(0,0,e.width,e.height);n.push(s),a.clearRect(0,0,e.width,e.height),e.style.visibility="hidden"}setTimeout(function(){for(var i=0;i<t.length;i++)t[i].style.visibility="visible"},1),setTimeout(function(){for(var i=0;i<t.length;i++)t[i].getContext("2d").putImageData(n[i],0,0);i=document.createEvent("Event"),i.initEvent("gameResume",!1,!1),window.dispatchEvent(i),ma.cg=!1},100)}},e=function(){var t,e,n,a,s,o,h=ma.a.h.k;s=ma.G.rg&&ma.G.rg.show?ma.G.rg.height:0,e=h.Kb/h.ec,n=h.minHeight/h.ec,t=window.innerHeight/window.innerWidth,e>t?(t=n>t?Math.floor(window.innerHeight/n):window.innerWidth,e=window.innerHeight):(t=window.innerWidth,e=Math.floor(window.innerWidth*e)),a=t/h.ec,o=0,window.innerHeight<Math.floor(h.Kb*a)+Math.floor(s*a)&&(o=Math.max(h.Z,window.innerHeight-Math.floor(h.Kb*a+s*a))),!ma.Rr&&a>1&&(t=h.ec,e=Math.min(window.innerHeight,h.Kb),a=1,o=window.innerHeight<h.Kb*a+s*a?Math.max(h.Z,window.innerHeight-Math.floor(h.Kb*a+s*a)):0),ma.Ac=o,ma.Yk=-1*h.Z,ma.ud={height:Math.min(h.Kb,Math.floor(e/a)-Math.floor(Math.max(0,e+Math.floor(s*a)-window.innerHeight)/a)),width:Math.min(h.ec,Math.floor(t/a))},ma.fs=Math.floor(Math.max(0,e+Math.floor(s*a)-window.innerHeight)/a),s=Math.min(window.innerHeight,e+Math.floor(s*a)),document.getElementById("viewport").setAttribute("style","position:absolute; overflow:hidden; z-index: 0; width:"+t+"px; left:50%; margin-left:"+-(t/2)+"px; height: "+s+"px"),s=function(t,i,e){var n=void 0!==i.top?i.top:ma.a.h.k.qf,s=void 0!==i.left?i.left:ma.a.h.k.pf,h=void 0!==i.width?i.width:ma.a.h.k.ec,r=void 0!==i.height?i.height:ma.a.h.k.Kb;t.ms=Math.floor(a*n),t.ls=Math.floor(a*s),t.ns=Math.floor(a*h),t.ks=Math.floor(a*r),!1!==e&&(n+=o),t.setAttribute("style","left:"+Math.floor(a*s)+"px; top:"+Math.floor(a*n)+"px; width:"+Math.floor(a*h)+"px; height:"+Math.floor(a*r)+"px; z-index: "+i.depth)},s(ma.mi,ma.a.h.k.gl),s(ma.Ji,ma.a.h.k.dc),s(ma.Ki,ma.a.h.k.je,!1),s(ma.Jd,ma.a.h.k.ke),i(),_i(ma.Ah)},t=function(){return ma.Yi===window.innerHeight&&ma.Zi===window.innerWidth?!1:navigator.ct||!ma.Lo?(document.documentElement.style["min-height"]=window.innerHeight+"px",document.getElementById("viewport").style.height=window.innerHeight+"px",ma.Zi=window.innerWidth,ma.Yi=window.innerHeight,e(),!1):ma.Bh?!1:(document.documentElement.style["min-height"]=5e3,n=window.innerHeight,a=40,void(ma.Bh=window.setInterval(function(){window.scrollTo(0,ma.ml?1:0),a--,((ma.ml?0:window.innerHeight>n)||0>a)&&(ma.Zi=window.innerWidth,ma.Yi=window.innerHeight,clearInterval(ma.Bh),ma.Bh=!1,document.documentElement.style["min-height"]=window.innerHeight+"px",document.getElementById("viewport").style.height=window.innerHeight+"px",e())},10)))},s=function(t){return ma.b.Hq(t.id,t.depth,void 0!==t.top?t.top:ma.a.h.k.qf,void 0!==t.left?t.left:ma.a.h.k.pf,void 0!==t.width?t.width:ma.a.h.k.ec,void 0!==t.height?t.height:ma.a.h.k.Kb)},ma.k=[],ma.mi=s(ma.a.h.k.gl),ma.Ji=s(ma.a.h.k.dc),ma.Ki=s(ma.a.h.k.je),ma.Jd=s(ma.a.h.k.ke),e(),document.body.addEventListener("touchmove",function(t){t.preventDefault()},!0),document.body.addEventListener("touchstart",t,!0),window.addEventListener("resize",t,!0),window.setInterval(t,200),ma.Dd=ma.a.h.k.dc.left||ma.a.h.k.pf,ma.Ed=ma.a.h.k.dc.top||ma.a.h.k.qf,ma.vs=ma.a.h.k.dc.width||ma.a.h.k.ec,ma.rs=ma.a.h.k.dc.height||ma.a.h.k.Kb,ma.Gl=ma.a.h.k.je.left||ma.a.h.k.pf,ma.Hl=ma.a.h.k.je.top||ma.a.h.k.qf,ma.us=ma.a.h.k.je.width||ma.a.h.k.ec,ma.ts=ma.a.h.k.je.height||ma.a.h.k.Kb,ma.Ip=ma.a.h.k.ke.left||ma.a.h.k.pf,ma.Jp=ma.a.h.k.ke.top||ma.a.h.k.qf,ma.Kp=ma.a.h.k.ke.width||ma.a.h.k.ec,ma.Hp=ma.a.h.k.ke.height||ma.a.h.k.Kb,ma.Db={},ma.Db[ma.Ii]=ma.mi,ma.Db[ma.Fl]=ma.Ji,ma.Db[ma.Sg]=ma.Ki,ma.Db[ma.zf]=ma.Jd,ma.Db[ma.wf]=ma.mi,ma.Db[ma.Ic]=ma.Jd,ma.Db[ma.hc]=ma.Jd}(),ma.b.fo=function(){var t,i;(i=document.getElementById("viewport"))&&(t=document.createElement("img"),t.className="banner",t.src=ga.Rc+"/media/banner_game_640x100.png",t.style.position="absolute",t.style.bottom="0px",t.style.width="100%",t.style.zIndex=300,i.appendChild(t),ma.vo=!0,ma.yd=!0,i=function(t){ma.vo&&ma.yd&&(ma.H.nh("http://wan.jj.cn/gc"),t.preventDefault(),t.stopPropagation?t.stopPropagation():t.cancelBubble=!0)},t.addEventListener("mouseup",i,!0),t.addEventListener("touchend",i,!0),t.addEventListener("mousedown",function(t){ma.yd&&(t.preventDefault(),t.stopPropagation?t.stopPropagation():t.cancelBubble=!0)},!0),t.addEventListener("touchstart",function(t){ma.yd&&(t.preventDefault(),t.stopPropagation?t.stopPropagation():t.cancelBubble=!0)},!0))},ma.b.at=function(){var t,i=document.getElementsByClassName("banner");if(i){for(t=0;t<i.length;t++)i[t].style.display="inline";ma.yd=!0}},ma.b.xs=function(){var t,i=document.getElementsByClassName("banner");if(i){for(t=0;t<i.length;t++)i[t].style.display="none";ma.yd=!1}},ma.b.Ni=function(t){return t===ma.Ji?{x:ma.Dd,y:ma.Ed}:t===ma.Ki?{x:ma.Gl,y:ma.Hl+Math.abs(ma.Ac)}:{x:ma.Ip,y:ma.Jp}},ma.b.Il=function(t){return ma.Db[t]},ma.b.Eb=function(t){return ma.Db[t]?(pa.canvas!==ma.Db[t]&&pa.Eb(ma.Db[t]),!0):!1},ma.b.Ya=function(t,i){if(ma.Db[i]){var e=va;t.za!==i&&(e.hf=!0),t.za=i,t.canvas=ma.Db[i]}},ma.b.g=function(t,i,e){var n;if(i=i||0,e=e||0,"number"==typeof t)return t;if("object"==typeof t)switch(n=t.offset||0,t.align){case"center":return Math.round(i/2-e/2)+n;case"left":case"top":return n;case"right":case"bottom":return i-e-n;default:return n+0}return 0},ma.b.ia=function(t,i,e,n){var a;if(i=i||0,e=e||0,"number"==typeof t)return t;if("object"==typeof t)switch(a=t.offset||0,t.align){case"center":return"center"===n||"middle"===n?Math.round(i/2)+a:"left"===n||"top"===n?Math.round(i/2-e/2)+a:Math.round(i/2+e/2)-a;case"left":case"top":return"center"===n||"middle"===n?Math.round(e/2)+a:"left"===n||"top"===n?a:e+a;case"right":case"bottom":return"center"===n||"middle"===n?i-Math.round(e/2)-a:"left"===n||"top"===n?i-Math.round(e/2)-a:i-a;default:return a+0}return 0},ma.b.js=function(t,i,e,n){switch(n){case"center":case"middle":return Math.round(i/2)+t;case"left":case"top":return t;case"right":case"bottom":return e+t}return 0},ma.ob=ma.ob||{},ma.ob.Kq=!1,ma.ob.up=function(t){t instanceof Array&&(this.Rg=t[0],this.Ch=t[1],this.wo=""+this.Rg,this.am=!0)},ma.ob.fi=function(t,i){{var e=JSON.stringify(i);nn(e+this.Ch),this.wo+"/"+t}},ma.ob.Yh=function(){return{user_id:this.qk,session_id:this.Fq,build:this.Ao}},ma.ob.$q=function(){var t;t=le();var i=ma.G.uq,e=da(),n=ta("userId","");""===n&&(n=le(),ia("userId",n));var a={qk:n},n=ma.Ko;this.Fq=t,a&&"object"==typeof a&&(this.qk=a.qk),this.Ao=e,this.j=!0,this.am&&(t=this.Yh(),t.device=n.Jo,t.platform=n.hq,t.os_major=n.iq,t.os_minor=n.jq,t.install_publisher=i,t.install_site=window.location!==window.parent.location?document.referrer:document.location.href,this.fi("user",t)),this.X("start","session")},ma.ob.qs=function(){this.j=!1},ma.ob.X=function(t,i,e){if(this.j&&this.am){var n="";i&&(n=i instanceof Array?i.toString().replace(",",":"):n+i),i=this.Yh(),i.event_id=n+":"+t,i.value=e,this.fi("design",i)}},ma.ob.Ys=function(t,i,e){this.X(t,i,e)},ma.ob.Vm=function(t,i){var e=this.Yh();e.message=t,e.severity=i,this.fi("error",e)},fa=re.prototype,fa.start=function(t){ma.ob.up(t),ma.ob.$q()},fa.X=function(t,i,e){ma.ob.X(t,i,e)},fa.Vm=function(t,i){ma.ob.Vm(t,i)},fa.drawbeginPage=function(){this.M=[]},fa.qa=function(t){var i,e=0;for(i=0;i<this.M.length;i++)this.M[i].j&&(0===this.M[i].paused&&(this.M[i].n+=t),e=i);e<this.M.length-1&&(t=this.M.length-Math.max(this.rq,e+1),t>0&&this.M.splice(this.M.length-t,t))},fa=fe.prototype,fa.Ga=function(){var t,i,e,n;(t=this.a.backgroundImage)&&(ma.b.Eb(ma.wf),e=Math.abs(ma.Ac),i=(pa.canvas.height-e)/t.height,ma.yd&&(i=Math.max(1,ma.ud.height/t.height)),n=-(t.width*i-pa.canvas.width)/2,t.drawByTransform(0,n,e,i,i,0,1)),this.Ro&&(t=this.a.Ep)&&(i=ma.b.g(this.a.Fp,this.canvas.width,t.width),n=ma.b.g(this.a.Gp,this.canvas.height,t.height),t.q(0,i,n+e))},fa.drawbeginPage=function(){var t,i,e,n,a=0,s="medium",o=this.a.Ab,h=0;for(this.Ro=!0,this.Ga(),this.n=0,this.b={},this.b.start=function(){Bi(va,this);var t,i=ma.e,e=1;return void 0===ma.e.$b&&(void 0!==ma.a.L.$b&&(void 0!==ma.a.L.$b.qo&&(t=ma.a.L.$b.qo),void 0!==ma.a.L.$b.Xk&&(e=ma.a.L.$b.Xk)),void 0===t&&"undefined"!=typeof a_music&&(t=a_music),void 0!==t&&(ma.e.$b=ba.play(t),ma.e.$b&&(ba.Mk(ma.e.$b,"music"),ba.Dh(ma.e.$b,!0),ii(ba,ma.e.$b,e)))),ma.p.we?i.screen=new pe:sa(i,0),!0},this.b.options=ma.e.Eh,this.b.difficulty=function(t){ma.e.ea.difficulty=parseInt(t,10),ia("preferences",ma.e.ea)},this.Ab=[],ma.yd&&ma.ud.height<this.a.xg&&(h=this.a.xg-ma.ud.height),t=0;t<o.length;t++)if(i=o[t],(e=this.kb[i.type])&&("difficulty"!==i.onclick||ma.p.Mj)){switch(a=ma.b.g(i.x,this.canvas.width,i.width),n=ma.b.g(i.y,this.canvas.height,e.v.height)-h,e.type){case"text":this.Ab.push(new Ne(i.type,a,n,120,i.ja,i.width,{V:this.b[i.onclick],T:this,nc:!0}));break;case"toggleText":"difficulty"===i.onclick&&(s=Un()+""),this.Ab.push(new Pe(i.type,a,n,120,s,i.width,{V:this.b[i.onclick],T:this}));break;case"image":this.Ab.push(new Re(a,n,120,new Fi(e.v),[e.v],{V:this.b[i.onclick],T:this,nc:!0}))}"start"===i.onclick&&(i=this.Ab[this.Ab.length-1],this.a.Jq&&(He(i,"xScale",Qi(this.hn),.25),He(i,"yScale",Qi(this.hn),-.1)))}this.Fh?(this.Eg=new b(this.a.hk,this.a.qr),this.Do=Math.round(this.canvas.width/2-this.Eg.width/2),this.Fg=0,ue(this)):this.visible=!1,ge(this)},fa.Yb=function(){var t;for(t=0;t<this.Ab.length;t++)Bi(va,this.Ab[t])},fa.lc=function(t){t===ma.Ah?(this.Ga(),ge(this)):t===ma.hd&&this.Fh&&ue(this)},fa.Na=function(){this.Eg.q(this.Do,this.Fg),this.Hc=!1},fa=pe.prototype,fa.Ga=function(){var t,i,e;ma.b.Eb(ma.wf),(t=this.a.backgroundImage)&&(e=(pa.canvas.height-this.yb)/t.height,ma.uo&&(e=Math.max(1,ma.ud.height/t.height)),i=-(t.width*e-pa.canvas.width)/2,t.drawByTransform(0,i,this.yb,e,e,0,1)),t=this.yb*e;var n,a;i=ma.a.h.Y.type[ma.p.ic].qc,ma.a.i.Y&&ma.a.i.Y.type&&ma.a.i.Y.type[ma.p.ic]&&ma.a.i.Y.type[ma.p.ic]&&(i=!1===ma.a.i.Y.type[ma.p.ic].qc?!1:i),i&&(Aa.q(0,this.a.fn,this.a.Uj+t),i=Us.P(),x(i,this.a.en),i.q(this.ma+" / "+this.kk,this.a.fn+Math.round(Aa.width/2),this.a.Uj+Aa.height+this.a.gn+t)),i=Us.P(),x(i,this.a.wj),e=ma.w.R("levelMapScreenTotalScore","<TOTAL SCORE:>"),n=O(i,e,this.a.pq,this.a.oq),n<i.fontSize&&k(i,n),n=ma.b.ia(this.a.Jm,this.canvas.width,i.ha(e),i.align),a=ma.b.ia(this.a.qq,this.canvas.height,i.fa(e),i.m),i.q(e,n,a+t),e=""+this.xj,x(i,this.a.wj),n=ma.b.ia(this.a.Jm,this.canvas.width,i.ha(e),i.align),i.q(e,n,this.a.Uj+Aa.height+this.a.gn+t)},fa.drawbeginPage=function(){var t,i,e,n=this;if(this.$a=this.a.$a?!0:!1,!this.$a){for(t=0;t<ma.p.ba.length;t++)if(9<ma.p.ba[t]){i=!0;break}i||(this.$a=!0)}for(this.yb=Math.abs(ma.Ac),this.bj=new b(3*this.canvas.width,this.$a?this.a.lm:this.a.mm),this.jm=-this.canvas.width,this.jd=(this.$a?this.a.Ll:this.a.Nl)-(Math.abs(ma.a.h.k.Z)-this.yb),this.Oc=new b(this.a.ik,this.a.En),this.sr=ma.b.g(this.a.Wf,this.canvas.width,this.a.ik),this.Fn=ma.b.g(this.a.Ge,this.canvas.height,this.Oc.height)-Math.round(this.Oc.height/2)-(Math.abs(ma.a.h.k.Z)-this.yb),this.gm="undefined"!=typeof s_level_mask?s_level_mask:Fi(this.$a?Ma:Ia),this.a.ol&&(this.fonts={},t=function(t){var i,e;for(i in t)e=Us.P(),x(e,t[i]),n.fonts[i]=e},this.fonts={},this.fonts.Mi=Us,t(this.$a?this.a.xp:this.a.yp)),this.u=ma.e.u,this.ba=ma.p.ba[this.u],this.Mh=!1,this.Lh=this.bk=this.De=0,this.ck=this.jm,this.na=0,this.Df=0<this.u,this.Cf=this.u<ma.p.ba.length-1,i=this.kk=this.xj=this.ma=0;i<ma.p.ba.length;i++)for(t=0;t<ma.p.ba[i];t++)e=ea(ma.e,void 0,t,i),this.kk+=3,"object"==typeof e&&null!==e&&(this.ma+=void 0!==e.stars?e.stars:0,this.xj+=void 0!==e.highScore?e.highScore:0);this.Ga(),t=this.Bb[this.a.eq],this.oh=new Re(ma.b.g(this.a.fq,this.canvas.width,t.v.width),ma.b.g(this.a.Em,this.canvas.height,t.v.height)-(Math.abs(ma.a.h.k.Z)-this.yb),this.depth-20,new Fi(t.v),[t.v],{V:ma.e.Eh,T:this}),me(this),be(this),ye(this),this.Hc=!0},fa.Yb=function(){this.nd&&Bi(va,this.nd),this.ld&&Bi(va,this.ld),Bi(va,this.oh)},fa.mc=function(t,i,e){if(!this.re)for(t=0;t<this.Hd.length;t++)if(Oi(this.gm,this.Hd[t].x-this.canvas.width,this.Hd[t].y+this.jd,i,e)){this.Id=t;break}this.Mh=!0,this.De=0,this.sn=this.ck=i,this.Lh=this.bk=0,this.re=!1},fa.Kc=function(t,i,e){return!this.re&&-1!==this.Id&&Oi(this.gm,this.Hd[this.Id].x-this.canvas.width,this.Hd[this.Id].y+this.jd,i,e)?(t=ma.p.Gg||"locked",i=Zn(this.u,this.Id,void 0,void 0),"object"==typeof i&&null!==i&&void 0!==i.state&&(t=i.state),"locked"!==t&&(Bi(va,this),sa(ma.e,this.Id,this.u)),!0):(this.Id=-1,this.Mh=!1,Math.abs(this.na)>=this.a.jr&&(this.Lh>=this.a.kr||Math.abs(this.na)>=this.a.ir)?"previous"===this.tc?this.Df&&0<=this.na&&this.na<=this.canvas.width/2?ve(this,this.u-1):(0>this.na||(this.tc="next"),ve(this,this.u)):"next"===this.tc&&(this.Cf&&0>=this.na&&this.na>=-this.canvas.width/2?ve(this,this.u+1):(0<this.na||(this.tc="previous"),ve(this,this.u))):0<Math.abs(this.na)&&(this.tc="next"===this.tc?"previous":"next",ve(this,this.u)),!0)},fa.lc=function(t){(t===ma.hd||t===ma.Ah)&&(this.yb=Math.abs(ma.Ac),this.Ga(),be(this),ye(this)),this.nd&&(this.nd.y=ma.b.g(this.a.Nn,this.canvas.height,Oa.height)-(Math.abs(ma.a.h.k.Z)-this.yb)),this.ld&&(this.ld.y=ma.b.g(this.a.Mn,this.canvas.height,Fa.height)-(Math.abs(ma.a.h.k.Z)-this.yb)),this.Fn=ma.b.g(this.a.Ge,pa.height,this.Oc.height)-Math.round(this.Oc.height/2)-(Math.abs(ma.a.h.k.Z)-this.yb),this.jd=(this.$a?this.a.Ll:this.a.Nl)-(Math.abs(ma.a.h.k.Z)-this.yb),void 0===this.ld&&void 0===this.nd&&(this.jd-=this.a.Ml),this.oh.y=ma.b.g(this.a.Em,this.canvas.height,this.oh.images[0].height)-(Math.abs(ma.a.h.k.Z)-this.yb),this.oh.canvas.aa=!0,this.canvas.aa=!0},fa.kc=function(t){var i=va.$[0].x;this.Mh&&(this.bk=Math.abs(this.ck-i),0<this.De&&(this.Lh=this.bk/(this.De/1e3)),this.tc=i>this.ck?"previous":"next",this.De+=t,this.na+=i-this.sn,this.sn=i,this.canvas.aa=!0),this.re&&(this.na=Pi(this.gh,this.moveStart,this.Dm,this.eh),this.gh>=this.eh&&(this.re=!1,this.na=0),this.gh+=t,this.canvas.aa=!0),(this.re||this.Mh)&&("previous"===this.tc&&this.na>=this.canvas.width/2?0<=this.u-1?(this.u-=1,this.ba=ma.p.ba[this.u],this.Df=0<this.u,this.Cf=this.u<ma.p.ba.length-1,we(this),this.na-=this.canvas.width,ye(this),be(this),this.canvas.aa=!0,this.moveStart-=this.canvas.width):this.na=Math.round(this.canvas.width/2):"next"===this.tc&&this.na<=-this.canvas.width/2&&(this.u+1<ma.p.ba.length?(this.u+=1,this.ba=ma.p.ba[this.u],this.Df=0<this.u,this.Cf=this.u<ma.p.ba.length-1,we(this),this.na+=this.canvas.width,ye(this),be(this),this.canvas.aa=!0,this.moveStart+=this.canvas.width):this.na=Math.round(-this.canvas.width/2)))},fa.Na=function(){this.Oc.q(this.sr,this.Fn),this.bj.q(Math.round(this.jm+this.na),this.jd),this.Hc=!1},fa=xe.prototype,fa.Cc=function(t,i,e,n){var a,s=Us.P();x(s,t),t=s.ha(i),a=s.fa(i),s.q(i,ma.b.ia(e,this.canvas.width,t,s.align)-this.c.x,ma.b.ia(n,this.canvas.height,a,s.m)-this.c.y)},fa.drawbeginPage=function(){var t;this.n=0,this.ma=[],this.Qd=[],this.buttons=[],this.canvas.aa=!0,this.Tc="",this.Mb=this.mb.failed?!0:!1,this.qc=this.Da.qc&&!this.Mb,this.xe=this.Da.xe&&!this.Mb&&this.mb.Yl,la(this);var i,e,n,a,s=this;switch(this.Da.qg){case"failed":this.f=this.a.rh.wp;break;case"level":this.f=this.a.rh.zp;break;case"difficulty":this.f=this.a.rh.Jg;break;case"endless":this.f=this.a.rh.$o}if(this.c=new Je(this.depth-10,this.za,new b(this.f.width,this.f.height)),this.c.x=ma.b.g(this.a.tb,this.canvas.width,this.f.width),this.c.y=ma.b.g(this.a.lb,this.canvas.height,this.f.height),v(this.c.f),this.f.q(0,0,0),!this.Mb&&this.qc&&(Ga.q(0,this.a.Oj-this.c.x+Math.round(Ga.width/2),this.a.Pj-this.c.y+Math.round(Ga.height/2)),Ha.q(0,this.a.Qj-this.c.x+Math.round(Ha.width/2),this.a.Rj-this.c.y+Math.round(Ha.height/2)),Na.q(0,this.a.Sj-this.c.x+Math.round(Na.width/2),this.a.Tj-this.c.y+Math.round(Na.height/2))),void 0!==this.Da.Vf&&ke(this,this.Da.Vf),void 0!==this.Da.on&&Se(this,this.Da.on),void 0!==this.Da.Ai&&Me(this,this.Da.Ai),void 0!==this.Da.qd)if("string"==typeof this.Da.qd)Te(this,this.Da.qd);else if(this.Da.qd instanceof Array)for(t=this.Da.qd.length,i=Us.P(),x(i,this.a.Yj),e=Us.P(),x(e,this.a.Jh),i=Math.max(i.fa("g"),e.fa("g"))*t+this.a.ye*(t-1),this.Tf=ma.b.g(this.a.Zj,this.canvas.height,i)-this.c.y,i=0;t>i;i++)Te(this,this.Da.qd[i],t>1);for(m(this.c.f),Ee(this,this.Da.pg),je(this,this.Da.Og),this.buttons.push(new Re(ma.b.g(this.a.Bg,this.canvas.width,this.a.of)-this.c.x,ma.b.g(this.a.Cg,this.canvas.height,this.a.nf)-this.c.y,this.depth-20,new qi(0,0,this.a.of,this.a.nf),void 0,function(){s.Tc="exit",_e(s)},this.c)),i=0;i<this.buttons.length;i++)this.buttons[i].Vb=!1;if(this.c.y=-this.c.height,t=this.a.mr,e=0,this.xb.Ba(t,this.Zq),t+=this.a.ki,this.$d&&(n=this.a.Ar,this.qc&&(n=Math.max(n,this.a.cn+this.a.bn*this.mb.stars)),this.xb.Ba(t+this.a.Hn,function(t,i){Ze(i.parent.$d,i.parent.mb.totalScore,n)}),e=t+this.a.Hn+n,0<this.Ad.length)){for(a=function(t,i){var e=i.parent,n=e.Ad[e.$k||0];Ze(e.$d,e.$d.value+n.value,e.a.pi),Ze(n,0,e.a.pi),e.$k+=1},i=0;i<this.Ad.length;i++)e+=this.a.xo,this.xb.Ba(e,a);e+=this.a.pi}if(this.qc){for(i=0;i<this.mb.stars;i++)t+=this.a.bn,this.xb.Ba(t,this.ar),this.xb.Ba(t,this.br);t+=this.a.cn}t=Math.max(t,e),this.xe&&(t+=this.a.Np,this.xb.Ba(t,this.Yq),this.xb.Ba(t,this.Wq),this.xb.Ba(t+this.a.Op,this.Xq)),this.xb.start(),ba.play(this.Mb?fo:oo)},fa.Zq=function(t,i){function e(){var t;for(t=0;t<s.buttons.length;t++)s.buttons[t].Vb=!0}var n,a,s=i.parent;switch(s.a.$r){case"fromLeft":a="horizontal",n=ma.b.g(s.a.tb,s.canvas.width,s.c.width),s.c.x=-s.c.width,s.c.y=ma.b.g(s.a.lb,s.canvas.height,s.c.height)+Math.abs(ma.a.h.k.Z);break;case"fromRight":a="horizontal",n=ma.b.g(s.a.tb,s.canvas.width,s.c.width),s.c.x=s.canvas.width,s.c.y=ma.b.g(this.parent.a.lb,s.canvas.height,selft.c.height)+Math.abs(ma.a.h.k.Z);break;case"fromBottom":a="vertical",n=ma.b.g(s.a.lb,s.canvas.height,s.c.height)+Math.abs(ma.a.h.k.Z),s.c.x=ma.b.g(s.a.tb,s.canvas.width,s.c.width),s.c.y=s.canvas.height+s.c.height;break;default:a="vertical",n=ma.b.g(s.a.lb,s.canvas.height,s.c.height)+Math.abs(ma.a.h.k.Z),s.c.x=ma.b.g(s.a.tb,s.canvas.width,s.c.width),s.c.y=-s.c.height}"vertical"===a?Ke(s.c,"y",n,s.a.ki,s.a.Nk,e):Ke(s.c,"x",n,s.a.ki,s.a.Nk,e)},fa.ar=function(t,i){var e,n=i.parent,a=Math.abs(ma.a.h.k.Z);if(n.ma.length<n.mb.stars){switch(n.ma.length+1){case 1:e=new Je(n.depth-30,ma.hc,Ra),e.x=ma.b.g(n.a.Oj,n.canvas.width,Ra.width)+Math.round(Ga.width/2),e.y=ma.b.g(n.a.Pj,n.canvas.height,Ra.height)+a+Math.round(Ga.height/2);break;case 2:e=new Je(n.depth-30,ma.hc,Ya),e.x=ma.b.g(n.a.Qj,n.canvas.width,Ya.width)+Math.round(Ha.width/2),e.y=ma.b.g(n.a.Rj,n.canvas.height,Ya.height)+a+Math.round(Ha.height/2);break;case 3:e=new Je(n.depth-30,ma.hc,Xa),e.x=ma.b.g(n.a.Sj,n.canvas.width,Xa.width)+Math.round(Na.width/2),e.y=ma.b.g(n.a.Tj,n.canvas.height,Xa.height)+a+Math.round(Na.height/2)}e.Ka=n.a.dn,e.Qa=n.a.dn,e.alpha=n.a.Vq,Ke(e,"scale",1,n.a.Uq,Ki,function(){var t,i,e,s=n.ma.length;switch(v(n.c.f),s){case 1:e=Ra,t=ma.b.g(n.a.Oj,n.canvas.width,Ra.width)-n.c.x+Math.round(Ga.width/2),i=ma.b.g(n.a.Pj,n.canvas.height,Ra.height)-n.c.y+a+Math.round(Ga.height/2);break;case 2:e=Ya,t=ma.b.g(n.a.Qj,n.canvas.width,Ra.width)-n.c.x+Math.round(Ha.width/2),i=ma.b.g(n.a.Rj,n.canvas.height,Ra.height)-n.c.y+a+Math.round(Ha.height/2);break;case 3:e=Xa,t=ma.b.g(n.a.Sj,n.canvas.width,Ra.width)-n.c.x+Math.round(Na.width/2),i=ma.b.g(n.a.Tj,n.canvas.height,Ra.height)-n.c.y+a+Math.round(Na.height/2)}e.q(0,t,i),m(n.c.f),Bi(va,n.ma[s-1])}),Ke(e,"alpha",1,n.a.Tq,Xi),n.ma.push(e),ba.play(n.Rq[n.ma.length-1])}},fa.br=function(t,i){var e,n,a=i.parent;e=a.ma[a.Qd.length],n=new Je(a.depth-50,ma.hc,Pa),n.x=e.x,n.y=e.y,Ke(n,"subImage",Pa.I-1,a.a.Sq,void 0,function(){Bi(va,n)}),a.Qd.push(n)},fa.Wq=function(t,i){var e,n,a,s,o,h,r,l=i.parent;for(e=[],a=Us.P(),s=ma.w.R("levelEndScreenMedal","<LEVELENDSCREENMEDAL>"),l.a.zm&&x(a,l.a.zm),n=O(a,s,l.a.dh,l.a.Up,!0),n<a.fontSize&&k(a,n),o=ma.b.ia(l.a.Vp,Ua.width,a.ha(s,l.a.dh),a.align),h=ma.b.ia(l.a.Wp,Ua.height,a.fa(s,l.a.dh),a.m),r=0;r<Ua.I;r++)n=new b(Ua.width,Ua.height),v(n),Ua.q(r,0,0),a.q(s,o,h,l.a.dh),m(n),e.push(n);l.la=new Je(l.depth-120,ma.hc,e),l.la.mj=l.a.wm,l.la.nj=l.a.xm,l.la.x=ma.b.g({align:"center"},l.c.canvas.width,l.la.width)-l.c.x,l.la.y=ma.b.g(l.a.gj,l.la.canvas.height,l.la.height)-l.c.y,o=ma.b.g(l.a.Am,l.la.canvas.width,l.la.width)-l.c.x,l.la.Ka=l.a.bh,l.la.Qa=l.a.bh,l.la.parent=l.c,l.la.alpha=0,l.la.hs=!0,Ke(l.la,"scale",1,l.a.qe,Xi,function(){Bi(va,l.Ha),l.Ha=void 0}),Ke(l.la,"x",o,l.a.qe,Xi),Ke(l.la,"alpha",1,0,Xi),Ke(l.la,"subImage",Ua.I,l.a.Sp,Xi,void 0,l.a.qe+l.a.vm+l.a.Rp,!0,l.a.Tp)},fa.Yq=function(t,i){var e,n=i.parent;n.Ha=new Je(n.depth-110,ma.hc,Wa),n.Ha.y=ma.b.g(n.a.gj,n.Ha.canvas.height,Wa.height)-n.c.y+n.a.Qp,n.Ha.mj=n.a.wm,n.Ha.nj=n.a.xm,n.Ha.x=ma.b.g(n.a.Am,n.Ha.canvas.width,n.Ha.width)-n.c.x,e=ma.b.g(n.a.gj,n.Ha.canvas.height,Wa.height)-n.c.y,n.Ha.Ka=n.a.bh*n.a.ym,n.Ha.Qa=n.a.bh*n.a.ym,n.Ha.alpha=0,n.Ha.parent=n.c,Ke(n.Ha,"y",e,n.a.qe,Xi),Ke(n.Ha,"scale",1,n.a.qe,Xi),Ke(n.Ha,"alpha",1,n.a.qe,Xi)},fa.Xq=function(t,i){var e=i.parent;e.kd=new Je(e.depth-130,ma.hc,Va),e.kd.parent=e.c,e.kd.x=e.la.x,e.kd.y=e.la.y+e.a.Pp,Ke(e.kd,"subImage",Va.I-1,e.a.vm,void 0,function(){Bi(va,e.kd),e.kd=void 0}),ba.play(uo)},fa.Yb=function(){var t;for(t=0;t<this.buttons.length;t++)Bi(va,this.buttons[t]);for(t=0;t<this.ma.length;t++)Bi(va,this.ma[t]);for(t=0;t<this.Qd.length;t++)Bi(va,this.Qd[t]);for(this.la&&(Bi(va,this.la),this.kd&&Bi(va,this.kd),this.Ha&&Bi(va,this.Ha)),Bi(va,this.c),this.xb&&this.xb.stop(),this.$d&&Bi(va,this.$d),t=0;t<this.Ad.length;t++)Bi(va,this.Ad[t]);Ii(),xi(),de()},fa.Na=function(){var t=pa.context.globalAlpha;pa.context.globalAlpha=this.a.bp,d(0,0,pa.canvas.width,pa.canvas.height,this.a.cp,!1),pa.context.globalAlpha=t},fa=Le.prototype,fa.Xm=function(){var t=this;return Ke(t.c,"y","inGame"!==this.type?-this.c.f.height:this.canvas.height,this.a.qj,this.a.rj,function(){Bi(va,t),void 0!==t.si&&t.si.call(t)}),!0},fa.Ga=function(t,i){var e,n,a,s;v(this.c.f),pa.clear(),this.a.backgroundImage.q(0,0,0),e=ma.w.R("optionsTitle","<OPTIONS_TITLE>"),n=Us.P(),this.a.xc&&x(n,this.a.xc),a=ma.b.ia(this.a.Wf,this.canvas.width,n.ha(e),n.align)-t,s=ma.b.ia(this.a.Ge,this.canvas.height,n.fa(e,n.m))-i+-1*ma.a.h.k.Z,n.q(e,a,s),m(this.c.f)},fa.zr=function(t){var i=!0;return"off"===t?(i=!1,ma.O.X("off","options:music")):ma.O.X("on","options:music"),ma.e.yh(i),!0},fa.Gn=function(t){var i=!0;return"off"===t?(i=!1,ma.O.X("off","options:sfx")):ma.O.X("on","options:sfx"),Qn(i),!0},fa.yr=function(t){return ma.w.Zm(t),ma.O.X(t,"options:language"),!0},fa.Qf=function(){function t(){var t;for(h.Ga(r,l),t=0;t<h.buttons.length;t++)Bi(va,h.buttons[t]);h.buttons=[],Ie(h,r,l,!0)}function i(){return h.Gb-=1,h.Qf(),!0}function e(){return h.Gb+=1,h.Qf(),!0}var n,a,s,o,h=this,r=ma.b.g(h.a.tb,h.canvas.width,h.a.backgroundImage.width),l=ma.b.g(h.a.lb,h.canvas.height,h.a.backgroundImage.height)+-1*ma.a.h.k.Z;for(void 0===h.Gb&&(h.Gb=0),h.Zf=void 0!==ma.i.Jl?ma.i.Jl():[],ma.O.X((10>h.Gb?"0":"")+h.Gb,"options:tutorial"),n=0;n<h.buttons.length;n++)Bi(va,h.buttons[n]);return h.buttons=[],h.Ga(r,l),v(h.c.f),void 0!==h.a.yc&&(n=ma.b.g(h.a.lk,h.c.f.width,h.a.yc.width),a=ma.b.g(h.a.Je,h.c.f.height,h.a.yc.height),h.a.yc.q(0,n,a)),o=h.Zf[h.Gb].title,void 0!==o&&""!==o&&(s=Us.P(),h.a.nk&&x(s,h.a.nk),n=O(s,o,h.a.ok,h.a.Jn,h.a.ok)+4,s.fontSize>n&&k(s,n),n=ma.b.ia(h.a.Mr,h.c.f.width,s.ha(o,h.a.ok),s.align),a=ma.b.ia(h.a.Nr,h.c.f.height,s.fa(o,h.a.Jn),s.m),s.q(o,n,a)),h.Gb<h.Zf.length&&(s=h.Zf[h.Gb].f,n=ma.b.g(h.a.Hr,h.c.f.width,s.width),a=ma.b.g(h.a.Ir,h.c.f.height,s.height),s.q(0,n,a),o=h.Zf[h.Gb].text,s=Us.P(),h.a.mk&&x(s,h.a.mk),n=O(s,o,h.a.$f,h.a.Jr,h.a.$f)+4,s.fontSize>n&&k(s,n),n=ma.b.ia(h.a.Kr,h.c.f.width,s.ha(o,h.a.$f),s.align),a=ma.b.ia(h.a.Lr,h.c.f.height,s.fa(o,h.a.$f),s.m),s.q(o,n,a,h.a.$f)),m(h.c.f),s=ss,n=ma.b.g(h.a.Fr,h.canvas.width,s.width)-h.c.x,a=ma.b.g(h.a.Gr,h.canvas.height,s.height)-h.c.y,0<=h.Gb-1?h.buttons.push(new Re(n,a,h.depth-20,new Fi(s),[s],{V:i,T:h},h.c)):(s=ns,h.buttons.push(new Re(n,a,h.depth-20,new Fi(s),[s],{V:t,T:h},h.c))),s=as,n=ma.b.g(this.a.Dr,h.canvas.width,s.width)-h.c.x,a=ma.b.g(this.a.Er,h.canvas.height,s.height)-h.c.y,h.Gb+1<h.Zf.length?h.buttons.push(new Re(n,a,h.depth-20,new Fi(s),[s],{V:e,T:h},h.c)):(s=ns,h.buttons.push(new Re(n,a,h.depth-20,new Fi(s),[s],{V:t,T:h},h.c))),!0},fa.Iq=function(){function t(t,i,e){t.q(0,ma.b.g(i,a.c.f.width,t.width),ma.b.g(e,a.c.f.height,t.height))}function i(t,i,e,n,s,o){var h;h=Us.P(),i&&x(h,i),i=O(h,t,s,o,s),h.fontSize>i&&k(h,i),e=ma.b.ia(e,a.c.f.width,h.ha(t,s),h.align),n=ma.b.ia(n,a.c.f.height,h.fa(t,o),h.m),h.q(t,e,n,s)}var e,n,a=this,s=ma.b.g(a.a.tb,a.canvas.width,a.a.backgroundImage.width),o=ma.b.g(a.a.lb,a.canvas.height,a.a.backgroundImage.height)+-1*ma.a.h.k.Z;for(ma.O.X("about","options"),e=0;e<a.buttons.length;e++)Bi(va,a.buttons[e]);return a.buttons=[],a.Ga(s,o),v(a.c.f),void 0!==a.a.yc&&t(a.a.yc,a.a.lk,a.a.Je),t(os,a.a.Yn,a.a.Hk),i(ma.w.R("optionsAbout_text","<OPTIONSABOUT_TEXT>"),a.a.ii,a.a.Jk,a.a.Kk,a.a.lg,a.a.Ik),void 0!==ma.G.qp&&(e=ma.b.ia(a.a.Jk,a.c.f.width,a.a.lg,a.a.ii.align||"left"),e-=Math.round(a.a.lg/2),n=ma.b.g(a.a.Hk,a.c.f.height,os.height),a.buttons.push(new Re(e,n,a.depth-10,qi(0,0,a.a.lg,a.a.Kk+a.a.Ik-n),null,{V:function(){ma.H.nh(ma.G.qp)},nc:!0},a.c))),t(hs,a.a.Zn,a.a.$n),e=ma.b.g(a.a.Fk,a.c.f.width,a.a.kg),n=a.a.Gk,a.buttons.push(new Ne("default_text",e,n,a.depth-20,"optionsAbout_backBtn",a.a.kg,{V:function(){var t;for(a.Ga(s,o),t=0;t<a.buttons.length;t++)Bi(va,a.buttons[t]);a.buttons=[],Ie(a,s,o,!0),a.$m=!1},T:a},a.c)),i(ma.w.R("optionsAbout_version","<OPTIONSABOUT_VERSION>")+" "+da()+("big"===ma.size?"b":"s"),a.a.Lk,a.a.co,a.a.eo,a.a.bo,a.a.ao),this.$m=!0},fa.Lq=function(){return!0},fa.Mq=function(){return ma.O.X("moreGames","options"),ma.Aj.moreGamesUrl?ma.H.nh(ma.Aj.moreGamesUrl):ma.G.Cm&&ma.H.nh(ma.G.Cm),!0},fa.vq=function(){var t,i,e,n,a,s=this;for(ma.O.X("main","options:quit"),t=0;t<s.buttons.length;t++)Bi(va,s.buttons[t]);return s.buttons=[],t=ma.w.R("optionsQuitConfirmationText","<OPTIONSQUITCONFIRMTEXT>"),i=Us.P(),s.a.Of&&x(i,s.a.Of),e=O(i,t,s.a.se,s.a.Sm,!0)+5,e<i.fontSize&&k(i,e),a=i.ha(t,s.a.se)+10,n=i.fa(t,s.a.se)+10,e=ma.b.ia(s.a.Tm,s.c.f.width,a,i.align),n=ma.b.ia(s.a.Um,s.c.f.height,n,i.m),v(s.c.f),i.q(t,e,n,a),m(s.c.f),t=s.a.Mm,e=ma.b.g(s.a.Nm,s.canvas.width,s.a.od)-s.c.x,n=ma.b.g(s.a.Om,s.canvas.height,this.Bb[t].v.height)-s.c.y,this.buttons.push(new Ne(t,e,n,this.depth-20,"optionsQuitConfirmBtn_No",s.a.od,{V:function(){var t,i,e;for(ma.O.X("confirm_no","options:quit"),i=ma.b.g(s.a.tb,s.canvas.width,s.a.backgroundImage.width),e=ma.b.g(s.a.lb,s.canvas.height,s.a.backgroundImage.height)+-1*ma.a.h.k.Z,s.Ga(i,e),t=0;t<s.buttons.length;t++)Bi(va,s.buttons[t]);s.buttons=[],Ie(s,i,e,!0)},T:s},s.c)),t=s.a.Pm,e=ma.b.g(s.a.Qm,s.canvas.width,s.a.od)-s.c.x,n=ma.b.g(s.a.Rm,s.canvas.height,this.Bb[t].v.height)-s.c.y,this.buttons.push(new Ne(t,e,n,this.depth-20,"optionsQuitConfirmBtn_Yes",s.a.od,{V:function(){ma.O.X("confirm_yes","options:quit"),Bi(va,s),ce(ma.O,ma.e.Yd,ha(ma.e),"progression:levelQuit:"+Jn()),ca(),na(ma.e)},T:s},s.c)),!0},fa.Aq=function(){var t,i,e,n,a,s=this;for(ma.O.X("main","options:restart"),t=0;t<s.buttons.length;t++)Bi(va,s.buttons[t]);return s.buttons=[],t=ma.w.R("optionsRestartConfirmationText","<OPTIONSRESTARTCONFIRMTEXT>"),i=Us.P(),s.a.Of&&x(i,s.a.Of),e=O(i,t,s.a.se,s.a.Sm,!0)+5,e<i.fontSize&&k(i,e),a=i.ha(t,s.a.se)+10,n=i.fa(t,s.a.se)+10,e=ma.b.ia(s.a.Tm,s.c.f.width,a,i.align),n=ma.b.ia(s.a.Um,s.c.f.height,n,i.m),v(s.c.f),i.q(t,e,n,a),m(s.c.f),t=s.a.Mm,e=ma.b.g(s.a.Nm,s.canvas.width,s.a.od)-s.c.x,n=ma.b.g(s.a.Om,s.canvas.height,this.Bb[t].v.height)-s.c.y,this.buttons.push(new Ne(t,e,n,this.depth-20,"optionsQuitConfirmBtn_No",s.a.od,{V:function(){var t,i,e;for(ma.O.X("confirm_no","options:restart"),i=ma.b.g(s.a.tb,s.canvas.width,s.a.backgroundImage.width),e=ma.b.g(s.a.lb,s.canvas.height,s.a.backgroundImage.height)+-1*ma.a.h.k.Z,s.Ga(i,e),t=0;t<s.buttons.length;t++)Bi(va,s.buttons[t]);
  8. s.buttons=[],Ie(s,i,e,!0)},T:s},s.c)),t=s.a.Pm,e=ma.b.g(s.a.Qm,s.canvas.width,s.a.od)-s.c.x,n=ma.b.g(s.a.Rm,s.canvas.height,this.Bb[t].v.height)-s.c.y,this.buttons.push(new Ne(t,e,n,this.depth-20,"optionsQuitConfirmBtn_Yes",s.a.od,{V:function(){ma.O.X("confirm_yes","options:restart"),Bi(va,s),ce(ma.O,ma.e.Yd,ha(ma.e),"progression:levelRestart:"+Jn()),ca(),sa(ma.e,ma.e.Ma)},T:s},s.c)),!0},fa.Nq=function(){return ma.O.X("startScreen","options"),na(ma.e),!0},fa.close=function(){return Bi(va,this),this.canvas.aa=!0},fa.drawbeginPage=function(){var t,i;la(this),this.Al=!1,t=this.a.backgroundImage,this.c=new Je(this.depth-10,this.za,new b(t.width,t.height)),this.c.x=ma.b.g(this.a.tb,this.canvas.width,t.width),t=ma.b.g(this.a.lb,this.canvas.height,t.height)+-1*ma.a.h.k.Z,this.c.y=t,this.Ga(this.c.x,this.c.y),this.buttons=[],this.Or?this.Qf():Ie(this,this.c.x,this.c.y),this.Co=new Re(this.a.Bg,this.a.Cg,this.depth-20,new qi(0,0,this.a.of,this.a.nf),void 0,{V:this.close,T:this},this.c),this.Ke="versions",this.mg=new Gi,Ri(this.mg,"keyAreaLeft",this.c.x,this.c.y+this.a.Je,this.a.kf,this.a.ji,76),Ri(this.mg,"keyAreaRight",this.c.x+this.c.width-this.a.kf,this.c.y+this.a.Je,this.a.kf,this.a.ji,82),Ri(this.mg,"keyAreaCentre",ma.Kp/2-this.a.kf/2,this.c.y+this.a.Je,this.a.kf,this.a.ji,67),i=this,this.c.y="inGame"!==this.type?this.canvas.height:-this.c.f.height,Ke(this.c,"y",t,this.a.oj,this.a.pj,function(){var t;for(t=0;t<i.buttons.length;t++)i.buttons[t].Vb=!0})},fa.Yb=function(){var t;for(Ii(),xi(),de(),this.Al&&_i(ma.hd,ma.w.hp()),t=0;t<this.buttons.length;t++)Bi(va,this.buttons[t]);this.mg.clear(),Bi(va,this.Co),Bi(va,this.c)},fa.Af=function(t){this.$m&&(67===t?this.Ke="":76===t?this.Ke+="l":82===t&&(this.Ke+="r"),"lrl"===this.Ke&&Be(this))},fa.lc=function(t){t===ma.hd&&(this.Ga(this.c.x,this.c.y),this.Al=!0)},ze.prototype.Ga=function(){var t,i,e,n;t=this.a.backgroundImage,i=(ma.Hp-Math.abs(ma.Ac))/t.height,ma.uo&&(i=Math.max(1,ma.ud.height/t.height)),this.c.f=new b(i*t.width,i*t.height),v(this.c.f),this.c.y=Math.abs(ma.Ac),t.drawByTransform(0,0,0,i,i,0,1),e=Us.P(),x(e,this.a.font),n=ma.w.R("gameEndScreenTitle","<GAMEENDSCREENTITLE>"),t=ma.b.ia(this.a.An,this.canvas.width,e.ha(n),e.align),i=ma.b.ia(this.a.Bn,this.canvas.height,e.fa(n),e.m),e.q(n,t,i,this.a.lr),m(this.c.f),this.c.canvas.aa=!0},ze.prototype.drawbeginPage=function(){var t=this,i=this.a.backgroundImage,i=new b(i.width,i.height);this.c=new Je(this.depth,ma.Ic,i),this.c.x=0,this.c.y=Math.abs(ma.Ac),this.Ga(),this.button=new Ne(this.a.al,ma.b.g(this.a.yo,this.canvas.width,this.a.bl),ma.b.g(this.a.zo,this.canvas.height,this.Bb[this.a.al].v.height),this.depth-10,"gameEndScreenBtnText",this.a.bl,function(){Bi(va,t),na(ma.e)},this.c)},ze.prototype.Yb=function(){Bi(va,this.c),Bi(va,this.button)},ze.prototype.lc=function(t){t!==ma.hd&&t!==ma.Ah||this.Ga()},qe.prototype.Ij=function(t,i,e){t=Oe(1e3*t+i),De(this,"level_"+t,e)},qe.prototype.ah=function(t,i,e){return t=Oe(1e3*t+i),Ge(this,"level_"+t,e)},qe.prototype.Hj=function(t){De(this,"general",t)},qe.prototype.$g=function(t){return Ge(this,"general",t)},Re.prototype.Yb=function(){this.images&&(this.canvas.aa=!0)},Re.prototype.qa=function(t){var i,e;if(void 0!==this.lf){for(i=0;i<this.lf.length;i++)switch(e=this.lf[i],e.n+=t,e.type){case"xScale":this.Ka=e.Ca(e.n,e.start,e.le,e.duration),this.Kj=-(this.images[0].width*this.Ka-this.images[0].width*e.start)/2;break;case"yScale":this.Qa=e.Ca(e.n,e.start,e.le,e.duration),this.Lj=-(this.images[0].height*this.Qa-this.images[0].height*e.start)/2;break;case"alpha":this.alpha=e.Ca(e.n,e.start,e.le,e.duration);break;case"angle":this.ua=e.Ca(e.n,e.start,e.le,e.duration);break;case"x":this.x=e.Ca(e.n,e.start,e.le,e.duration);break;case"y":this.y=e.Ca(e.n,e.start,e.le,e.duration)}this.canvas.aa=!0}},Re.prototype.kc=function(){var t=ma.b.Ni(this.canvas);this.Mf&&!Oi(this.Qb,this.x+this.parent.x,this.y+this.parent.y,va.$[this.me].x-t.x,va.$[this.me].y-t.y)&&(this.images&&(this.Uf=this.Fd=0,this.canvas.aa=!0),this.Mf=!1)},Re.prototype.Na=function(){this.images&&(this.images[this.Fd]instanceof b?this.images[this.Fd].drawByTransform(this.x+this.parent.x+this.Kj,this.y+this.parent.y+this.Lj,this.Ka,this.Qa,this.ua,this.alpha):this.images[this.Fd].drawByTransform(this.Uf,this.x+this.parent.x+this.Kj,this.y+this.parent.y+this.Lj,this.Ka,this.Qa,this.ua,this.alpha)),this.Hc=!1},ma.b.Xg(Ne),Ne.prototype.Bj=function(t){this.text=ma.w.R(this.ja,"<"+this.ja.toUpperCase()+">"),t&&x(this.font,t),Ye(this,this.drawdificToggle(this.f))},Ne.prototype.Qh=function(t,i,e){"string"==typeof i&&(this.text=i),e&&x(this.font,e),t instanceof p?this.f.source=t:void 0!==t.da&&void 0!==t.Xa&&void 0!==t.source&&(this.f=t),Ye(this,this.drawdificToggle(this.f))},Ne.prototype.drawdificToggle=function(t){var i,e,n,a,s,o,h=t.da+t.Xa;n=this.height-(this.S.vc||0);var r=t.source;for(e=this.font.ha(this.text),void 0===this.width?i=e:"number"==typeof this.width?i=this.width-h:"object"==typeof this.width&&(void 0!==this.width.width?i=this.width.width-h:(void 0!==this.width.minWidth&&(i=Math.max(this.width.minWidth-h,e)),void 0!==this.width.maxWidth&&(i=Math.min(this.width.maxWidth-h,e)))),e=O(this.font,this.text,i,n,!0),e<this.S.fontSize?k(this.font,e):k(this.font,this.S.fontSize),e=t.da,n=this.font.align,"center"===n?e+=Math.round(i/2):"right"===n&&(e+=i),n=Math.round(this.height/2),void 0!==this.S.uc&&(n+=this.S.uc),s=[],a=0;a<r.I;a++)o=new b(i+h,this.height),v(o),r.drawByMatrix(a,0,0,t.da,this.height,0,0,1),r.drawByMatrix2(a,t.da,0,r.width-h,this.height,t.da,0,i,this.height,1),r.drawByMatrix(a,t.da+r.width-h,0,t.Xa,this.height,t.da+i,0,1),this.font.q(this.text,e,n,i),m(o),s.push(o);return s},Ne.prototype.lc=function(t){t===ma.hd&&this.Bj()},ma.b.Xg(Xe),Xe.prototype.drawdificToggle=function(){var t,i,e,n,a,s,o,h=this.cc.da+this.cc.Xa;i=this.height-(this.S.vc||0);var r=this.cc.source;for(void 0===this.width?t=this.f.width:"number"==typeof this.width?t=this.width-h:"object"==typeof this.width&&(void 0!==this.width.width?t=this.width.width-h:(void 0!==this.width.minWidth&&(t=Math.max(this.width.minWidth-h,this.f.width)),void 0!==this.width.maxWidth&&(t=Math.min(this.width.maxWidth-h,this.f.width)))),o=Math.min(t/this.f.width,i/this.f.height),o=Math.min(o,1),a=Math.round(this.cc.da+(t-this.f.width*o)/2),s=Math.round((i-this.f.height*o)/2),e=[],i=0;i<r.I;i++){n=new b(t+h,this.height),v(n),r.drawByMatrix(i,0,0,this.cc.da,this.height,0,0,1),r.drawByMatrix2(i,this.cc.da,0,r.width-h,this.height,this.cc.da,0,t,this.height,1),r.drawByMatrix(i,this.cc.da+r.width-h,0,this.cc.Xa,this.height,this.cc.da+t,0,1);try{pa.context.drawImage(this.f,a,s,this.f.width*o,this.f.height*o)}catch(l){}m(n),e.push(n)}return e},ma.b.Xg(Pe),fa=Pe.prototype,fa.Od=function(t){var i;if(void 0===t)this.ka=(this.ka+1)%this.J.length;else for(i=0;i<this.J.length;i++)if(this.J[i].id===t){this.ka=i;break}this.Qh(this.J[this.ka].v,ma.w.R(this.J[this.ka].ja,"<"+this.J[this.ka].id.toUpperCase()+">"))},fa.Bj=function(t){t&&x(this.font,t),this.text=ma.w.R(this.J[this.ka].ja,"<"+this.J[this.ka].id.toUpperCase()+">"),Ye(this,this.drawdificToggle())},fa.Qh=function(t,i,e){this.text=i,this.Zd=t,e&&x(this.font,e),Ye(this,this.drawdificToggle())},fa.drawdificToggle=function(){var t,i,e,n,a,s,o,h=this.S.da,r=this.S.Xa,l=h+r,c=Math.abs(h-r);e=this.height-(this.S.vc||0);var d=this.S.v;for(i=this.font.ha(this.text),void 0===this.width?t=i:"number"==typeof this.width?t=this.width-l:"object"==typeof this.width&&(void 0!==this.width.width?t=this.width.width-l:(void 0!==this.width.minWidth&&(t=Math.max(this.width.minWidth-l,i)),void 0!==this.width.maxWidth&&(t=Math.min(this.width.maxWidth-l,i)))),e<this.font.fontSize&&(k(this.font,e),i=this.font.ha(this.text)),n=h,e=this.font.align,"center"===e?t-c>=i?n+=Math.round((t-c)/2):(L(this.font,"center"),n+=this.S.ek,e="center"):"center"===e?n+=this.S.ek:"right"===e&&(n+=t),i=Math.round(this.height/2),void 0!==this.S.uc&&(i+=this.S.uc),s=[],a=0;a<d.I;a++)o=new b(t+l,this.height),v(o),d.drawByMatrix(a,0,0,h,this.height,0,0,1),d.drawByMatrix2(a,h,0,d.width-l,this.height,h,0,t,this.height,1),d.drawByMatrix(a,h+d.width-l,0,r,this.height,h+t,0,1),this.Zd.q(0,this.S.Xf,this.S.Yf),this.font.q(this.text,n,i,"center"===e?t-c:t),m(o),s.push(o);return s},fa.lc=function(t){t===ma.hd&&this.Bj()},ma.b.Xg(Ve),Ve.prototype.Od=function(t){var i;if(void 0===t)this.ka=(this.ka+1)%this.J.length;else for(i=0;i<this.J.length;i++)if(this.J[i].id===t){this.ka=i;break}this.Qh(this.J[this.ka].v)},Ve.prototype.Qh=function(t){this.Zd=t,Ye(this,[].concat(this.Zd))},fa=We.prototype,fa.drawbeginPage=function(){var t,i,e,n,a,s,o=this;if(t=this.a.kq,i=t.width,a=t.height,this.c=new Je(this.depth+10,this.za,new b(i,a)),v(this.c.f),t.q(0,0,0),""!==this.li&&(e=ma.b.g(this.a.Tk,i,0),n=ma.b.g(this.a.Uk,a,0),t=Us.P(),x(t,this.a.Rk),void 0!==this.a.ng&&void 0!==this.a.Sk&&(s=O(t,this.li,this.a.ng,this.a.Sk,this.a.ng),t.fontSize>s&&k(t,s)),t.q(this.li,e,n,this.a.ng)),""!==this.Vi&&(e=ma.b.g(this.a.Ul,i,0),n=ma.b.g(this.a.Vl,a,0),t=Us.P(),x(t,this.a.Tl),void 0!==this.a.Ui&&void 0!==this.a.pp&&(s=O(t,this.Vi,this.a.Ui,this.a.pp,this.a.Ui),t.fontSize>s&&k(t,s)),t.q(this.Vi,e,n,this.a.Ui)),m(this.c.f),this.c.x=ma.b.g(this.a.lq,this.canvas.width,i),this.c.y=ma.b.g(this.a.sj,this.canvas.height,a)+Math.abs(ma.a.h.k.Z),this.zd=0,t=function(){o.zd--,0===o.zd&&(o.Jf="paused")},void 0!==this.a.ph)for(i=0;i<this.a.ph.length;i++)a=this.a.ph[i],e=void 0,a.ug&&(this.zd++,e=t),n=a.end,"x"===a.type?n=ma.b.g(n,this.canvas.width,this.c.f.width):"y"===a.type&&(n=ma.b.g(n,this.canvas.height,this.c.f.height)+Math.abs(ma.a.h.k.Z)),Ke(this.c,a.type,n,a.duration,a.Ca,e,a.ca,a.loop,a.ej),void 0!==a.wb&&ba.play(a.wb);0===this.zd&&(this.Jf="paused"),this.n=0},fa.Yb=function(){Bi(va,this.c)},fa.qa=function(t){"paused"!==this.state&&(this.n+=t,this.n>=this.a.mq&&Ue(this))},fa.mc=function(){return this.In=!0},fa.Kc=function(){return this.In&&"paused"===this.Jf&&Ue(this),!0},Je.prototype.qa=function(t){var i,e,n;for(i=0;i<this.La.length;i++)if(e=this.La[i],e.j&&(e.n+=t,e.Ig&&e.n>=e.ca&&(e.n%=e.ca,e.Ig=!1),!e.Ig)){switch(e.n>=e.duration?(n=e.end,e.loop?(e.Ig=!0,e.ca=e.ej,e.n%=e.duration):("function"==typeof e.Tb&&e.Tb.call(this),this.La[i]=void 0)):"subImage"===e.type?(n=this.f instanceof Array?this.f.length:this.f.I,n=Math.floor(e.n*n/e.duration)):n=e.Ca(e.n,e.start,e.end-e.start,e.duration),e.type){case"x":this.x=n;break;case"y":this.y=n;break;case"xScale":this.Ka=n;break;case"yScale":this.Qa=n;break;case"angle":this.ua=n;break;case"alpha":this.alpha=n;break;case"subImage":this.Za=n}this.canvas.aa=!0}for(i=this.La.length-1;i>=0;i--)void 0===this.La[i]&&this.La.splice(i,1)},Je.prototype.Na=function(){var t,i,e;i=Math.round(this.x-this.Ka*this.mj)+this.parent.x,e=Math.round(this.y-this.Qa*this.nj)+this.parent.y,t=this.f,t instanceof Array&&(t=this.f[this.Za%this.f.length]),t instanceof b?t.drawByTransform(i,e,this.Ka,this.Qa,this.ua,this.alpha):t.drawByTransform(this.Za,i,e,this.Ka,this.Qa,this.ua,this.alpha)},$e.prototype.Mc=function(){var t,i;t=this.font.align,i=this.font.m;var e=this.Hf,n=this.If;this.ni||this.ra.clear(),v(this.ra),this.ni&&this.ni.drawByMatrix(0,this.so,this.to,this.ro,this.oo,0,0,1),"center"===t?e+=Math.round(this.ha/2):"right"===t&&(e+=this.ha),"middle"===i?n+=Math.round(this.fa/2):"bottom"===i&&(n+=this.fa),i=this.value+"",t=O(this.font,i,this.ha,this.fa,!0),t<this.font.fontSize&&k(this.font,t),this.font.q(i,e,n,this.ha),m(this.ra),this.Hc=!0},$e.prototype.qa=function(t){var i;i=Math.round(this.Ca(this.n,this.oi,this.end-this.oi,this.duration)),this.n>=this.duration?(this.value=this.end,this.j=!1,this.Mc()):i!==this.value&&(this.value=i,this.Mc()),this.n+=t},$e.prototype.Na=function(){this.ra.q(this.x-this.Hf+this.parent.x,this.y-this.If+this.parent.y),this.Hc=!1},ma.version=ma.version||{},ma.version.tg="1.0",an.prototype.Na=function(){this.ra&&this.ra.drawByTransform(this.x+this.pa.ih,this.y+this.pa.jh,this.pa.scale,this.pa.scale,0,this.pa.alpha)},an.prototype.qa=function(t){this.s.Nc&&(0<this.s.ca?this.s.ca-=t:(this.s.n+=-this.s.ca,this.s.ca=0,this.s.n+=t,sn(this)))},on.prototype.Pd=function(t){this.value=t},on.prototype.ya=function(){return this.value},on.prototype.Ym=function(){},se(an,hn),hn.prototype.Na=function(){if(this.f){var t=0,i=0;this.Uc&&(t=-Math.floor(this.f.width/2),i=-Math.floor(this.f.height/2)),this.f instanceof p?this.f.drawByTransform(this.I,this.x+t+this.pa.ih,this.y+i+this.pa.jh,this.pa.scale,this.pa.scale,0,this.pa.alpha):this.f.drawByTransform(this.x+t+this.pa.ih,this.y+i+this.pa.jh,this.pa.scale,this.pa.scale,0,this.pa.alpha)}},hn.prototype.dd=function(){return new t(this.x+ma.Gl,this.y+ma.Hl-ma.Ac)},hn.prototype.Ym=function(t){t!==this.f&&(this.f=t,this.e.pd=!0)},se(an,rn),rn.prototype.qa=function(t){an.prototype.qa.apply(this,arguments),this.Cb.Vj&&(this.Cb.n+=t,this.Cb.duration<=this.Cb.n&&(this.Cb.Vj=!1,this.font.setFillColor(this.gq),this.Mc()))},rn.prototype.Mc=function(){this.ra.clear(),v(this.ra);try{var t=this.font.ha(this.text),i=1;t>this.Fm&&(i=this.Fm/t),this.font.drawByTransform(this.text,this.Wd,this.Xd,i,i,0,1),this.e.Qo&&(d(0,0,this.ra.width,this.ra.height,"black",!0),d(this.Gm-this.x,this.Hm-this.y,this.ra.width-2*(this.Gm-this.x),this.ra.height-2*(this.Hm-this.y),"red",!0),f(this.Wd-5,this.Xd,this.Wd+5,this.Xd),f(this.Wd,this.Xd-5,this.Wd,this.Xd+5)),this.e.pd=!0}finally{m(this.ra)}},se(rn,cn),cn.prototype.Pd=function(t){this.value=t,t=this.fc;var i=this.value;t.xf=t.ya(),t.jk=i,t.duration=t.Eo,t.zg=void 0,t.Ie=0},cn.prototype.ya=function(){return this.value},cn.prototype.qa=function(t){if(rn.prototype.qa.apply(this,arguments),he(this.fc,t),Math.floor(this.fc.ya())!==this.Rh){var i=this.Rh;va.cd-this.Kn>this.fk&&(i=this.Cl(Math.floor(this.fc.ya()))),this.Rh!==i&&(this.Kn=va.cd,this.Rh=i,this.text=dn(this)+i,this.Mc())}},se(an,fn),fn.prototype.qa=function(t){he(this.fc,t);var i=this.fc.ya();if(i!==this.zj&&(this.e.pd=!0,this.zj=i),he(this.vg,t),t=this.vg.ya(),t!==this.Lm&&(this.e.pd=!0,this.Lm=t),i+=t,this.jo)for(t=0;t<this.ma.length;++t){var e=i>this.ma[t].position;this.ma[t].complete!==e&&(this.a.ma&&(this.e.pd=!0,this.zj=i),this.ma[t].complete=e)}},fn.prototype.Na=function(){if(0<this.vg.ya()&&this.wg.drawByMatrix(0,this.width*this.fc.ya()/100,0,this.wg.width*this.vg.ya()/100,this.wg.height,this.x+this.width*this.fc.ya()/100,this.y),this.f.drawByMatrix(0,0,0,this.width*this.fc.ya()/100,this.height,this.x,this.y),this.a.ma)for(var t=0;t<this.ma.length;++t){var i=this.ma[t];(i.complete?s_ui_level_star_fill:s_ui_level_star_empty).q(0,this.x+this.width/100*i.position,this.y+this.a.ma.y)}},un.prototype.qa=function(t){gn(this.Lg,t),gn(this.xl,t);for(var i=0;i<this.Pe.length;++i)this.Pe[i].qa(t)},un.prototype.kc=function(){this.canvas.aa=this.pd},un.prototype.Na=function(){for(var t=0;t<this.Pe.length;++t)this.Pe[t].Na();this.pd=!1},se(un,pn),fa=pn.prototype,fa.setTime=function(t){return this.Ph.Pd(t),this},fa.getTime=function(){return this.Ph.ya()},fa.Yb=function(){pa.Eb(this.canvas),pa.clear(),Bi(va,this.uh)},fa.qa=function(t){if(1===this.Cn&&this.setTime(this.getTime()+t),2===this.Cn){if(this.Dn&&1e3*this.Dn>=this.getTime()){var i=Math.floor(this.getTime()/1e3),e=Math.floor(Math.max(this.getTime()-t,0)/1e3);i!==e&&(i=this.Ph,i.Cb.n=0,i.Cb.Vj=!0,i.font.setFillColor(i.Cb.color),i.Mc(),"undefined"!=typeof a_gameui_timewarning_second&&ba.play(a_gameui_timewarning_second))}this.setTime(Math.max(this.getTime()-t,0))}un.prototype.qa.apply(this,arguments),this.nm+=t},fa.Na=function(){this.On.drawByAlpha(0,0,0,1),un.prototype.Na.apply(this,arguments)};var Eo={background:{f:rs},uh:{x:Zi(530),y:Zi(12)},Jg:{x:Zi(382),y:Zi(118),Pa:Zi(110),Va:Zi(28),wc:.2,ag:!0,separator:": ",font:Js,$c:{fillColor:"#446d48",fontSize:Zi(28),align:"center",m:"middle"}},nl:{x:Zi(356),y:Zi(133),f:cs,Uc:!0},highscore:{x:Zi(104),y:Zi(118),Pa:Zi(234),Va:Zi(28),wc:.2,ag:!0,separator:": ",font:Js,$c:{fillColor:"#446d48",fontSize:Zi(28),align:"left",m:"middle"}},crown:{x:Zi(86),y:Zi(140),f:fs,Uc:!0},cj:{x:Zi(58),y:Zi(72),Pa:Zi(66),Va:Zi(30),wc:.2,ag:!1,separator:"x ",font:Ks,$c:{align:"center",fontSize:Zi(26),fillColor:"#5E83B0"},vi:!0},Wi:{x:Zi(40),y:Zi(90),f:us,vi:!0,Uc:!0},N:{x:Zi(104),y:Zi(28),Pa:Zi(94),Va:Zi(66),fk:50,wc:.2,ag:!0,separator:"\n",font:Ks,$c:{fillColor:"rgb(108,145,94)",fontSize:Zi(34)}},time:{x:Zi(224),y:Zi(24),Pa:Zi(350),Va:Zi(68),wc:.2,ag:!1,separator:"",font:Qs},Lc:[{x:Zi(58),y:Zi(78),Pa:Zi(66),Va:Zi(30),wc:.2,font:Ks,$c:{align:"center",fontSize:Zi(26),fillColor:"#5782AE"}},{x:Zi(168),y:Zi(78),Pa:Zi(66),Va:Zi(30),wc:.2,font:Ks,$c:{align:"center",fontSize:Zi(26),fillColor:"#5782AE"}},{x:Zi(278),y:Zi(78),Pa:Zi(66),Va:Zi(30),wc:.2,font:Ks,$c:{align:"center",fontSize:Zi(26),fillColor:"#5782AE"}}],fd:[{x:Zi(40),y:Zi(90),f:null,Uc:!0},{x:Zi(150),y:Zi(90),f:null,Uc:!0},{x:Zi(260),y:Zi(90),f:null,Uc:!0}]},jo={wn:{},xn:{},yn:{},zn:{},kj:{},lj:{},hr:{},sp:{},Tn:function(){jo.wn={cb:jo.Hg,update:jo.Xc,bb:jo.Vc,end:jo.Wc,font:$s,margin:20,Ec:Yi,Fc:Yi,Dc:$i([Wi,Hi,Wi],[!1,!1,!0],[.1,.8,.1])},jo.xn={cb:jo.Hg,update:jo.Xc,bb:jo.Vc,end:jo.Wc,font:Zs,margin:20,Ec:Yi,Fc:Yi,Dc:$i([Wi,Hi,Wi],[!1,!1,!0],[.1,.8,.1])},jo.yn={cb:jo.Hg,update:jo.Xc,bb:jo.Vc,end:jo.Wc,font:to,margin:20,Ec:Yi,Fc:Yi,Dc:$i([Wi,Hi,Wi],[!1,!1,!0],[.1,.8,.1])},jo.zn={cb:jo.Hg,update:jo.Xc,bb:jo.Vc,end:jo.Wc,font:io,margin:20,Ec:Yi,Fc:Yi,Dc:$i([Wi,Hi,Wi],[!1,!1,!0],[.1,.8,.1])},jo.kj={cb:jo.Go,update:jo.Xc,bb:jo.Vc,end:jo.Wc,vf:eo,uf:no,margin:20,Ec:Yi,Fc:Yi,Dc:$i([Wi,Hi,Wi],[!1,!1,!0],[.1,.8,.1])},jo.lj={cb:jo.Ho,update:jo.Xc,bb:jo.Vc,end:jo.Wc,vf:eo,uf:no,margin:20,Ec:Yi,Fc:Yi,Dc:$i([Wi,Hi,Wi],[!1,!1,!0],[.1,.8,.1])},jo.hr={cb:jo.Io,update:jo.Xc,bb:jo.Vc,end:jo.Wc,Ec:Yi,Fc:Yi,Dc:$i([Wi,Hi,Wi],[!1,!1,!0],[.1,.8,.1])},jo.sp={cb:jo.Fo,update:jo.Xc,bb:jo.Vc,end:jo.Wc,Ec:Yi,Fc:Yi,Dc:$i([Wi,Hi,Wi],[!1,!1,!0],[.1,.8,.1])}},is:function(t){function i(t){var e,n={};for(e in t)n[e]="object"==typeof t[e]&&null!==t[e]?i(t[e]):t[e];return n}return i(t)},$s:function(t){jo.wn.font.B=t,jo.xn.font.B=t,jo.yn.font.B=t,jo.zn.font.B=t},Zs:function(t){jo.kj.vf.B=t,jo.kj.uf.B=t,jo.lj.vf.B=t,jo.lj.uf.B=t},Ne:!1,nb:[],Gq:function(t){jo.Ne=t},ws:function(){return jo.Ne},zq:function(t){var i,e;for(i=0;i<jo.nb.length;i+=1)e=jo.nb[i],void 0===e||void 0!==t&&e.kind!==t||0<e.te||(jo.nb[i]=void 0)},Sn:function(){jo.Ne=!1,jo.nb=[]},Qe:function(t,i,e,n){var a,s,o;if(void 0===n&&(n=jo.Ne),n)for(s=0;s<jo.nb.length;s+=1)if(a=jo.nb[s],void 0!==a&&a.gd&&a.kind===t&&a.font===i&&a.text===e)return a.te+=1,s;for(a={kind:t,font:i,text:e,te:1,gd:n},s=i.align,o=i.m,L(i,"center"),A(i,"middle"),n=i.ha(e)+2*t.margin,t=i.fa(e)+2*t.margin,a.ra=new b(n,t),v(a.ra),i.q(e,n/2,t/2),m(a.ra),L(i,s),A(i,o),s=0;s<jo.nb.length;s+=1)if(void 0===jo.nb[s])return jo.nb[s]=a,s;return jo.nb.push(a),jo.nb.length-1},Qn:function(t){var i=jo.nb[t];i.te-=1,0>=i.te&&!i.gd&&(jo.nb[t]=void 0)},Hg:function(t){t.buffer=jo.Qe(t.kind,t.kind.font,t.value,t.gd)},Go:function(t){var i=t.value.toString();t.buffer=0<=t.value?jo.Qe(t.kind,t.kind.vf,i,t.gd):jo.Qe(t.kind,t.kind.uf,i,t.gd)},Ho:function(t){var i=t.value.toString();0<t.value&&(i="+"+i),t.buffer=0<=t.value?jo.Qe(t.kind,t.kind.vf,i,t.gd):jo.Qe(t.kind,t.kind.uf,i,t.gd)},Io:function(t){t.ra=t.value},Fo:function(t){t.f=t.value,t.Za=0},Xc:function(t){t.x=void 0!==t.kind.Ec?t.kind.Ec(t.time,t.Hh,t.ul-t.Hh,t.duration):t.Hh+t.time/t.duration*(t.ul-t.Hh),t.y=void 0!==t.kind.Fc?t.kind.Fc(t.time,t.Ih,t.vl-t.Ih,t.duration):t.Ih+t.time/t.duration*(t.vl-t.Ih),void 0!==t.kind.Vo&&(t.ue=t.kind.Vo(t.time,0,1,t.duration)),void 0!==t.kind.Wo&&(t.ve=t.kind.Wo(t.time,0,1,t.duration)),void 0!==t.kind.Dc&&(t.alpha=t.kind.Dc(t.time,0,1,t.duration)),void 0!==t.kind.Uo&&(t.ua=t.kind.Uo(t.time,0,360,t.duration)%360),void 0!==t.f&&(t.Za=t.time*t.f.I/t.duration)},Vc:function(t){var i,e=pa.context;void 0!==t.f&&null!==t.images?1===t.ue&&1===t.ve&&0===t.ua?t.f.drawByAlpha(t.Za,t.x,t.y,t.alpha):t.f.drawByTransform(t.Za,t.x,t.y,t.ue,t.ve,t.ua,t.alpha):(i=void 0!==t.ra&&null!==t.ra?t.ra:jo.nb[t.buffer].ra,1===t.ue&&1===t.ve&&0===t.ua?i.drawByAlpha(t.x-i.width/2,t.y-i.height/2,t.alpha):1e-4>Math.abs(t.ue)||1e-4>Math.abs(t.ve)||(e.save(),e.translate(t.x,t.y),e.rotate(-t.ua*Math.PI/180),e.scale(t.ue,t.ve),i.drawByAlpha(-i.width/2,-i.height/2,t.alpha),e.restore()))},Wc:function(t){void 0!==t.buffer&&jo.Qn(t.buffer)},kc:function(t){var i,e,n=!1;for(i=0;i<jo.Ra.length;i+=1)e=jo.Ra[i],void 0!==e&&(0<e.ca?(e.ca-=t,0>e.ca&&(e.time+=-e.ca,e.ca=0)):e.time+=t,0<e.ca||(e.time>=e.duration?(e.kind.end(e),jo.Ra[i]=void 0):e.kind.update(e),n=!0));n&&(jo.canvas.aa=!0)},Na:function(){var t,i;for(t=0;t<jo.Ra.length;t+=1)i=jo.Ra[t],void 0!==i&&(0<i.ca||i.kind.bb(i))},Ra:[],tp:function(t,i,e){jo.tl(),void 0===t&&(t=ma.zf),void 0===i&&(i=-1e6),void 0===e&&(e=["game"]),jo.visible=!0,jo.j=!0,ma.b.Ya(jo,t),jo.depth=i,ji(jo),Li(jo,e),jo.Sn(),jo.Tn()},Yr:function(t,i,e,n,a,s,o,h,r){for(void 0===h&&(h=void 0!==t.ca?t.ca:0),void 0===r&&(r=jo.Ne),void 0===a&&void 0!==t.aq&&(a=e+t.aq),void 0===s&&void 0!==t.bq&&(s=n+t.bq),void 0===o&&void 0!==t.duration&&(o=t.duration),t={kind:t,value:i,Hh:e,Ih:n,ul:a,vl:s,x:e,y:n,ue:1,ve:1,alpha:1,ua:0,time:0,duration:o,ca:h,gd:r},t.kind.cb(t),i=0;i<jo.Ra.length;i+=1)if(void 0===jo.Ra[i])return jo.Ra[i]=t,i;return jo.Ra.push(t),jo.Ra.length-1},Xs:function(t){var i;0>t||t>=jo.Ra.length||(i=jo.Ra[t],void 0!==i&&(i.kind.end(i),jo.Ra[t]=void 0))},yq:function(){var t,i;for(t=0;t<jo.Ra.length;t+=1)i=jo.Ra[t],void 0!==i&&(i.kind.end(i),jo.Ra[t]=void 0);jo.Ra=[]},tl:function(){jo.yq(),jo.zq(),Bi(va,jo)}};vn.prototype.Jl=function(){var t,i,e;for(t=[],i=[gs,ps,bs,vs,ms],e=0;e<i.length;e+=1)t.push({f:i[e],text:ma.w.R("TutorialText_"+e,"<TUTORIAL_TEXT_"+e+">"),title:ma.w.R("TutorialTitle_"+e,"<TUTORIAL_TITLE_"+e+">")});return t},mn.prototype.Xn=function(){var t;this.j=!0,this.rb.setTime(this.N.Xi),t=new Di,t.Ba(this.N.gk,function(){if(0<ma.l.rb.getTime()){var t=ma.l.rb,i=ma.l.N.tj;bn(t,t.Nd.ya()+i),0>ma.l.rb.Nd.ya()&&bn(ma.l.rb,0)}}),t.Dh(!0),t.start(),Li(t,["game","item"]),this.F.cb(ma.a.i.debug.cr),this.il.cb()},mn.prototype.Rn=function(){var t,i;this.j=!1,t=ma.l.rb,i=ma.l.N.Li,bn(t,t.Nd.ya()+i),t=Math.round(ma.l.rb.getTime()/1e3),i=t%60,t=Math.round((t-i)/60)+":"+("00"+i.toString()).slice(-2),ra(ma.e,{totalScore:ma.l.rb.Nd.ya(),timeLeft:t,timeBonus:Math.round(ma.l.rb.getTime()/ma.l.N.ri*ma.l.N.qi)})},mn.prototype.drawbeginPage=function(){var t,i;jo.tp(),jo.Gq(!0),aa(),i=ma.a.i.km[Un()],this.Jc=i.Jc,this.N=i.N,this.rb=new pn,bn(this.rb,this.N.ed),this.rb.setTime(0),i=ea(ma.e,"highScore",void 0,void 0),(t="number"!=typeof i?0:i)||(t=0),i=this.rb,i.Ef.Pd(t),i.Zl=t,this.F=new Hn,this.il=new In,new We(ma.w.R("levelStartHeader","<levelStartHeader>"),ma.w.R("levelStartText","<levelStartText>"),this.Xn,this)},mn.prototype.Yb=function(){var t,i=va,e=Ai(i,"item");for(t=0;t<e.length;t+=1)Bi(i,e[t]);Bi(va,this.rb),jo.tl()},fa=wn.prototype,fa.qa=function(t){var i=1,i=1;this.j=!1,0<this.td?(this.j=!0,this.td-=t,this.td>this.dk?i=0:(this.visible=!0,i=0>=this.td?1:1-this.td/this.dk),i=this.tn(i,0,1,1),this.x=this.Gi+(this.Nh-this.Gi)*i,this.y=this.Hi+(this.Oh-this.Hi)*i):(this.x=this.Nh,this.y=this.Oh),0<this.Cd?(this.j=!0,this.Cd-=t,this.Cd>this.Ei?i=0:(this.visible=!0,i=0>=this.Cd?1:1-this.Cd/this.Ei),!this.Bf&&i>.45&&(this.Bf=!0,ba.play(bo)),this.an?(i=this.Oq(i,0,1,1),this.Ka=1-.99*i,this.Qa=1+.2*i):(this.Ka=this.dp(i),this.Qa=this.ep(i,1,.3,1))):this.Bf=!0,!1===this.j&&(this.visible=!1,void 0!==this.ub&&this.ub.qb())},fa.kc=function(){this.canvas.aa=!0},fa.Na=function(){pa.context.save(),pa.context.translate(this.x,this.y),pa.context.scale(this.Ka,this.Qa),ys.q(0,2*this.Bq,2*this.Cq),this.qb(0,0),pa.context.restore()},fa.qb=function(t,i){var e=this.open===this.Bf?{f:ws,pn:13*this.sd+this.pc-1}:{f:Ws,pn:0};e.f.q(e.pn,t,i),ma.a.i.debug.Po&&pa.context.fillText("s"+this.sd+"c"+this.pc,t+4,i-ws.height/3)},fa.jc=function(){return new xn(this.x-ws.width/2,this.y-ws.height/2,ws.width,ws.height)},xn.prototype.contains=function(t,i){return t>=this.x&&t<=this.x+this.width&&i>=this.y&&i<=this.y+this.height},Tn.prototype.pop=function(){return this.o.pop()},Tn.prototype.dd=function(i){var e,n,a=new t(this.x,this.y);if("fanned"===this.Sf&&(e=0<=this.Nb?Math.max(0,this.o.length-this.Nb):0,i>=e))for(n=e;i>n;n+=1)e=this.o[n].open?1:this.yl,a=a.add(this.gc.scale(e));return a},Tn.prototype.jc=function(t){return t=this.dd(t),new xn(t.x-ws.width/2,t.y-ws.height/2,ws.width,ws.height)},Tn.prototype.qb=function(){var t,i,e;if(!0===this.bb){if(ma.b.Eb(ma.Ii),t=Ln(this),aa(t.x,t.y,t.width,t.height),ma.a.i.debug.So&&d(t.x,t.y,t.width,t.height,"red",!0),void 0!==this.Km&&(e=this.dd(0),this.Km.q(0,e.x,e.y)),this.rp)for(t=0;t<this.o.length;t+=1)i=this.o[t],e=this.dd(t),i.x===e.x&&i.y===e.y&&ys.q(0,e.x,e.y);for(t=0;t<this.o.length;t+=1)i=this.o[t],e=this.dd(t),i.x!==e.x||i.y!==e.y||i.visible||i.qb(e.x,e.y)}},fa=In.prototype,fa.N=function(t){var i=ma.l.rb;bn(i,i.Nd.ya()+t),0>i.Nd.ya()&&bn(i,0)},fa.cb=function(){this.j=!0},fa.mc=function(i){if(!(0<this.Bd)&&-1===this.Kd){this.Kd=i,this.wh=0,this.vh=void 0,this.Kf=new t(va.$[i].x,va.$[i].y);t:{i=this.Kf.x;var e,n,a,s=this.Kf.y,o=ma.l.F.vb.concat(ma.l.F.ad);for(e=0;e<o.length;e+=1){i:{a=o[e],n=i;for(var h=s,r=void 0,r=a.o.length-1;r>=0;r-=1)if(a.jc(r).contains(n,h)){a=r;break i}a=0<a.o.length&&Ln(a).contains(n,h)?-1:-2}if(-2!==a){if(-1===a)a=o[e].o.length-1;else for(n=a;n<o[e].o.length;n+=1)if(o[e].o[n].open){a=n;break}i:{for(n=o[e],h=0,h=n.o.length-1;h>=a;h-=1)if(!n.o[h].open||h<n.o.length-1&&!Mn(n,n.o[h],n.o[h+1])){n=!1;break i}n=!0}if(n){i={sb:o[e],Ag:a};break t}}}a=ma.l.F.Ea.o.length-1,i=a>=0&&ma.l.F.Ea.jc(a).contains(i,s)?{sb:ma.l.F.Ea,Ag:a,Dl:!0}:void 0}void 0!==i&&(i.xh=i.sb.dd(i.Ag),i.fb=new Tn(i.xh.x,i.xh.y),i.fb.Sf="fanned",i.fb.sg=-104,i.fb.bb=!1,i.fb.rp=!0,i.fb.o=i.sb.o.slice(i.Ag),i.fb.gc=new t(ma.a.i.ub.Mg,ma.a.i.ub.Ng),i.sb.o=i.sb.o.slice(0,i.Ag),!0===i.Dl&&(i.sb.Nb=Math.max(i.sb.Nb-1,0)),An(i.fb,100)),this.vh=i}},fa.kc=function(e){var n,a;this.canvas.aa=!0,this.Bd=Math.max(this.Bd-e,0),0<this.Bd||-1===this.Kd||(this.wh+=e,this.md=new t(va.$[this.Kd].x,va.$[this.Kd].y),a=this.vh,void 0!==a&&(n=i(this.md,this.Kf),a.fb.x=a.xh.x+n.x,a.fb.y=a.xh.y+n.y,An(a.fb,e)))},fa.Kc=function(t){var e,n,a,s,o=0,h=null,r=ma.a.i.Wa.xq,l=ma.a.i.Wa.wq;if(!(0<this.Bd)&&this.Kd===t)if(this.Kd=-1,t=i(this.md,this.Kf).length(),n=this.wh<ma.a.i.Wa.yi&&30>t,e=this.vh,void 0!==e)if(t=function(){o=e.sb.o.length,!0===e.Dl&&(e.sb.Nb+=1),e.sb.o=e.sb.o.concat(e.fb.o),An(e.sb,r,l,o)},n)t(),this.click(this.md.x,this.md.y);else{for(n=!1,a=[e.fb,{x:e.fb.x,y:e.fb.y-ws.height/2},this.md],a=a.concat(Sn(e.fb.o[0].jc())),a=Fn(a),s=0;s<a.length;s+=1)if(h=a[s],o=h.o.length,En(h,e.fb.o)){n=!0;break}n?(An(h,r,l,o),On(this),Rn(this),Bn(this,e.sb,h)):(ba.play(vo),t())}else this.click(this.md.x,this.md.y)},fa.wi=function(){var t,i,e,n=ma.l.F.ad,a=ma.a.i.Wa.lo,s=ma.a.i.Wa.ko,o=this;for(t=13,i=0;i<n.length;i+=1)t=0===n[i].o.length?1:Math.min(t,jn(n[i]).pc);for(e=(13-t+1)*(a+s),zn(this,e),n=t;13>=n;n+=1)i=new Di,i.Ba((n-t)*(a+s),Dn(n,a)),i.start(),Li(i,["game","item"]);i=new Di,i.Ba(e,function(){On(o)}),i.start(),Li(i,["game","item"])},fa.click=function(t,i){var e,n,a=ma.a.i.Wa.hl,s=!1;if(va.cd-this.yj<=ma.a.i.Wa.yi){for(zn(this,ma.a.i.Wa.yi),s=ma.l.F.vb.concat([ma.l.F.Ea]),a=0;a<s.length;a+=1)if(e=jn(s[a]),null!==e&&e.open&&e.jc().contains(t,i)){Gn(this,s[a],e);break}this.yj=0}else{for(n=ma.l.F.Rb,e=n.jc(0),n=n.jc(n.o.length-1),kn(e,n.x,n.y),kn(e,n.x+n.width,n.y+n.height),e.contains(t,i)&&(qn(this),s=!0),n=0;n<ma.l.F.vb.length;n+=1)0!==ma.l.F.vb[n].o.length&&(e=jn(ma.l.F.vb[n]),!e.open&&ma.l.F.vb[n].jc(ma.l.F.vb[n].o.length-1).contains(t,i)&&(ba.play(bo),yn(e,a),zn(this,a),this.N(ma.l.N.mh),s=!0));this.yj=s?0:va.cd}},Hn.prototype.cb=function(i){var e,n,a,s,o,h,r,l=Yn(!0!==i);for(e=7*ma.a.i.oc.uj,r=new Tn(ma.a.i.oc.kl+ma.Dd,ma.a.i.oc.ll+ma.Ed),r.o=[l[0]],i=new Di,i.Ba(e,function(){r.o=[],r.qb()}),i.start(),Li(i,["game","item"]),i=new Tn(ma.a.i.Rb.Ld+ma.Dd,ma.a.i.Rb.Md+ma.Ed,xs),s=24,i.o=l.slice(0,s),An(i,ma.a.i.oc.dr,ma.a.i.oc.er,void 0,void 0,e),i.sg=-104,i.zs=!0,e=new Tn(ma.a.i.Ea.Ld+ma.Dd,ma.a.i.Ea.Md+ma.Ed,_s),e.Sf="fanned",e.Nb=ma.l.Jc.tf,e.Zk=ma.l.Jc.tf,e.gc=new t(ma.a.i.Ea.Mg,ma.a.i.Ea.Ng),e.yl=1,e.sg=-52,e.bm=!0,n=[],o=0;4>o;o+=1)a=new Tn(ma.a.i.Fi.Ld+o*(ws.width+ma.a.i.Fi.offset)+ma.Dd,ma.a.i.Fi.Md+ma.Ed,Ss),a.th="same",a.sh="asc",a.Yg=!0,n.push(a);for(a=[],o=1;8>o;o+=1)h=new Tn(ma.a.i.ub.Ld+(o-1)*(ws.width+ma.a.i.ub.offset)+ma.Dd,ma.a.i.ub.Md+ma.Ed,ks),h.Sf="fanned",h.th="alternate",h.sh="desc",h.gc=new t(ma.a.i.ub.Mg,ma.a.i.ub.Ng),h.ys=!0,h.o=l.slice(s,s+o),s+=o,jn(h).open=!0,a.push(h),An(h,ma.a.i.oc.nq,ma.a.i.oc.uj,void 0,void 0,(o-1)/7*ma.a.i.oc.uj);for(i.qb(),e.qb(),r.qb(),o=0;o<n.length;o+=1)n[o].qb();for(o=0;o<a.length;o+=1)a[o].qb();l=ba.play(go),ba.Dh(l,!0),ba.stop(l,4e3,Vi),this.Rb=i,this.Ea=e,this.ad=n,this.vb=a},Nn.prototype.Na=function(){var t=Math.floor((va.cd-this.startTime)/this.duration*this.mn);t>=this.mn?Bi(va,this):Ts.q(t,this.x,this.y)},ma.version=ma.version||{},ma.version.game="1.0",ma.version=ma.version||{},ma.version.theme="1.0",ma.H=ma.H||{},Xn.prototype.drawbeginPage=function(){var t,i=!1;if(void 0!==ma.G.Rf)if(!1===ma.G.Rf.Cp)i=!0;else if(void 0!==ma.G.Rf.xi)for(t=0;t<ma.G.Rf.xi.length;t++){var e=ma.G.Rf.xi[t],n=window.location.origin;if(n||(n=window.location.protocol+"//"+window.location.hostname),nn(n)===e){i=!0;break}}i?(this.Vk=this.om=this.kn=this.ready=!1,this.og=void 0,this.n=0,this.pe=this.startTime=Date.now(),this.rd=0,this.loop=Pn(this)):va.pause()},Xn.prototype.Yb=function(){this.canvas.aa=!0},Xn.prototype.qa=function(t){this.n+=t,this.kn&&(this.og+=t),"function"==typeof this.fl&&this.fl(Math.round((o("load")+o("audio"))/2)),!this.ready&&this.om&&(this.Vk||this.og>=this.a.Lp)&&(this.ready=!0),this.ready&&this.n>=(ma.G.Ks||this.a.Xp)&&(window.clearTimeout(this.loop),this.j=!1,Bi(va,this),this.Tb())},Xn.prototype.Tg=function(t,i){"Load Complete"===t&&"start"===i.Ia?(this.kn=!0,ga.Fb("audio"),this.og=0):"Load Complete"===t&&"load"===i.Ia?this.om=!0:"Load Complete"===t&&"audio"===i.Ia&&(this.Vk=!0)},ma.version=ma.version||{},ma.version.configuration_iwin="1.1",fa=Vn.prototype,fa.ai=function(){void 0!==ma.a.L.background&&void 0!==ma.a.L.background.color&&(document.body.style.background=ma.a.L.background.color),ma.O=new re,ma.G.Br&&void 0!==ma.G.yf&&ma.G.yf.Rg&&ma.G.yf.Ch&&ma.O.start([ma.G.yf.Rg,ma.G.yf.Ch]),ma.p=ma.a.i.oe||{},ma.p.ic=ma.p.ic||"level",ma.p.we=void 0!==ma.p.we?ma.p.we:"level"===ma.p.ic,ma.p.ba=void 0!==ma.p.ba?ma.p.ba instanceof Array?ma.p.ba:[ma.p.ba]:[20],ma.p.Gg=void 0!==ma.p.Gg?ma.p.Gg:"locked",ma.p.Mj=void 0!==ma.p.Mj?ma.p.Mj:"difficulty"===ma.p.ic,ma.p.pk=void 0!==ma.p.pk?ma.p.pk:!1,ma.p.Nj=void 0!==ma.p.Nj?ma.p.Nj:"level"===ma.p.ic,this.ea=ta("preferences",{}),this.ea.difficulty=void 0!==this.ea.difficulty?this.ea.difficulty:1,this.ea.playMusic=void 0!==this.ea.playMusic?this.ea.playMusic:!0,this.yh(this.ea.playMusic),this.ea.playSFX=void 0!==this.ea.playSFX?this.ea.playSFX:!0,Qn(this.ea.playSFX),this.ea.language="zh-cn",ma.w.Zm(this.ea.language),void 0===Zn(this.u,0,"state",void 0)&&$n(this.u,0,"state","unlocked"),this.cb=!0},fa.Ub=function(){var t=ma.e;switch(t.state){case"GAME_INIT":t.cb&&Wn(t);break;case"GAME_LOAD":document.getElementById("loadercell").style.display="none",t.load&&("function"==typeof vn&&(ma.i=new vn),void 0!==ma.G.rg&&!1!==ma.G.rg.show&&ma.b.fo(),na(t));break;case"LEVEL_INIT":t.$i&&(t.state="LEVEL_LOAD",t.aj=!0,ma.H.mp());break;case"LEVEL_LOAD":if(t.aj){var i;if(t.u<ma.p.ba.length&&t.Ma<ma.p.ba[t.u]){t.state="LEVEL_PLAY",t.jj+=1,t.Y=!1,t.screen=null,aa(0,ma.Yk),i=ma.O;var e,n=ha(t,3),a="progression:levelStarted:"+Jn(),s=t.Yd;for(e=0;e<i.M.length;e++)if(!i.M[e].j){i.M[e].n=0,i.M[e].paused=0,i.M[e].j=!0,i.M[e].wl=n,i.M[e].Im=a,i.M[e].tag=s;break}for(e===i.M.length&&i.M.push({j:!0,n:0,paused:0,wl:n,Im:a,tag:s}),i.X(n,a),i=0;i<t.u;i++);ma.l=new mn}}break;case"LEVEL_END":if(t.Y)switch(Bi(va,ma.l),ma.e.$i=!1,ma.e.aj=!1,ma.l=void 0,ma.b.Il(ma.Fl).aa=!0,ma.b.Il(ma.Sg).aa=!0,ma.e.vp){case"retry":sa(ma.e,ma.e.Ma);
  9. break;case"next":ma.p.we?ma.e.Ma+1<ma.p.ba[ma.e.u]?sa(ma.e,ma.e.Ma+1):ma.e.u+1<ma.p.ba.length?sa(ma.e,0,ma.e.u+1):ma.p.Nj?(ma.e.state="GAME_END",ma.e.end=!0,ma.H.lp()):ma.e.screen=new pe:sa(ma.e,0);break;case"exit":ma.p.we?ma.e.screen=new pe:na(ma.e)}break;case"GAME_END":t.end&&(t.end=!1,ma.e.screen=null,ma.e.screen=new ze)}},fa.yh=function(t){return void 0!==t&&(ma.e.ea.playMusic=t,ia("preferences",ma.e.ea),t?Z("music"):$("music")),ma.e.ea.playMusic},fa.language=function(){},fa.Qf=function(){ma.e.Eh(!0)},fa.Eh=function(t){var i="inGame";ma.e.screen instanceof fe?i="startScreen":ma.e.screen instanceof pe&&(i="levelMapScreen"),!0===t?new Le(i,!0):new Le(i,!1)},fa.drawbeginPage=function(){ma.e=this,this.cb||(this.ai(),ma.H.Ol())},fa.qa=function(){"function"==typeof this.Qg&&(this.Qg(),this.Qg||ma.e.Ub())},fa.lc=function(t,i){"languageSet"===t&&ma.e.language(i)},fa.kc=function(){var t,i;for(t=0;t<ma.k.length;t++)i=ma.k[t],i.aa&&(pa.Eb(i),pa.clear())},fa.Na=function(){var t;for(t=0;t<ma.k.length;t++)ma.k[t].aa=!1},new Vn}();