Файловый менеджер - Редактировать - /home/jogoso94/public_html/jogos/lights/js/main.js
�азад
/* Platform.js <https://mths.be/platform> Copyright 2014-2018 Benjamin Tan <https://bnjmnt4n.now.sh/> Copyright 2011-2013 John-David Dalton Available under MIT license <https://mths.be/mit> */ (function() { var a = "undefined" !== typeof window && "undefined" !== typeof window.document ? window.document : {}, c = "undefined" !== typeof module && module.exports, b = function() { for (var h, l = ["requestFullscreen exitFullscreen fullscreenElement fullscreenEnabled fullscreenchange fullscreenerror".split(" "), "webkitRequestFullscreen webkitExitFullscreen webkitFullscreenElement webkitFullscreenEnabled webkitfullscreenchange webkitfullscreenerror".split(" "), "webkitRequestFullScreen webkitCancelFullScreen webkitCurrentFullScreenElement webkitCancelFullScreen webkitfullscreenchange webkitfullscreenerror".split(" "), "mozRequestFullScreen mozCancelFullScreen mozFullScreenElement mozFullScreenEnabled mozfullscreenchange mozfullscreenerror".split(" "), "msRequestFullscreen msExitFullscreen msFullscreenElement msFullscreenEnabled MSFullscreenChange MSFullscreenError".split(" ") ], d = 0, f = l.length, m = {}; d < f; d++) if ((h = l[d]) && h[1] in a) { for (d = 0; d < h.length; d++) m[l[0][d]] = h[d]; return m } return !1 }(), g = { change: b.fullscreenchange, error: b.fullscreenerror }, k = { request: function(h) { return new Promise(function(l, d) { var f = function() { this.off("change", f); l() }.bind(this); this.on("change", f); h = h || a.documentElement; Promise.resolve(h[b.requestFullscreen]())["catch"](d) }.bind(this)) }, exit: function() { return new Promise(function(h, l) { if (this.isFullscreen) { var d = function() { this.off("change", d); h() }.bind(this); this.on("change", d); Promise.resolve(a[b.exitFullscreen]())["catch"](l) } else h() }.bind(this)) }, toggle: function(h) { return this.isFullscreen ? this.exit() : this.request(h) }, onchange: function(h) { this.on("change", h) }, onerror: function(h) { this.on("error", h) }, on: function(h, l) { var d = g[h]; d && a.addEventListener(d, l, !1) }, off: function(h, l) { var d = g[h]; d && a.removeEventListener(d, l, !1) }, raw: b }; b ? (Object.defineProperties(k, { isFullscreen: { get: function() { return !!a[b.fullscreenElement] } }, element: { enumerable: !0, get: function() { return a[b.fullscreenElement] } }, isEnabled: { enumerable: !0, get: function() { return !!a[b.fullscreenEnabled] } } }), c ? module.exports = k : window.screenfull = k) : c ? module.exports = { isEnabled: !1 } : window.screenfull = { isEnabled: !1 } })(); (function() { function a(e) { e = String(e); return e.charAt(0).toUpperCase() + e.slice(1) } function c(e, y) { var E = -1, q = e ? e.length : 0; if ("number" == typeof q && -1 < q && q <= x) for (; ++E < q;) y(e[E], E, e); else g(e, y) } function b(e) { e = String(e).replace(/^ +| +$/g, ""); return /^(?:webOS|i(?:OS|P))/.test(e) ? e : a(e) } function g(e, y) { for (var E in e) A.call(e, E) && y(e[E], E, e) } function k(e) { return null == e ? a(e) : r.call(e).slice(8, -1) } function h(e, y) { var E = null != e ? typeof e[y] : "number"; return !/^(?:boolean|number|string|undefined)$/.test(E) && ("object" == E ? !!e[y] : !0) } function l(e) { return String(e).replace(/([ -])(?!$)/g, "$1?") } function d(e, y) { var E = null; c(e, function(q, w) { E = y(E, q, w, e) }); return E } function f(e) { function y(P) { return d(P, function(N, K) { var R = K.pattern || l(K); !N && (N = RegExp("\\b" + R + " *\\d+[.\\w_]*", "i").exec(e) || RegExp("\\b" + R + " *\\w+-[\\w]*", "i").exec(e) || RegExp("\\b" + R + "(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)", "i").exec(e)) && ((N = String(K.label && !RegExp(R, "i").test(K.label) ? K.label : N).split("/"))[1] && !/[\d.]+/.test(N[0]) && (N[0] += " " + N[1]), K = K.label || K, N = b(N[0].replace(RegExp(R, "i"), K).replace(RegExp("; *(?:" + K + "[_-])?", "i"), " ").replace(RegExp("(" + K + ")[-_.]?(\\w)", "i"), "$1 $2"))); return N }) } function E(P) { return d(P, function(N, K) { return N || (RegExp(K + "(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)", "i").exec(e) || 0)[1] || null }) } var q = p, w = e && "object" == typeof e && "String" != k(e); w && (q = e, e = null); var H = q.navigator || {}, u = H.userAgent || ""; e || (e = u); var M = w ? !!H.likeChrome : /\bChrome\b/.test(e) && !/internal|\n/i.test(r.toString()), D = w ? "Object" : "ScriptBridgingProxyObject", G = w ? "Object" : "Environment", L = w && q.java ? "JavaPackage" : k(q.java), O = w ? "Object" : "RuntimeObject"; G = (L = /\bJava/.test(L) && q.java) && k(q.environment) == G; var X = L ? "a" : "\u03b1", Q = L ? "b" : "\u03b2", V = q.document || {}, S = q.operamini || q.opera, aa = z.test(aa = w && S ? S["[[Class]]"] : k(S)) ? aa : S = null, n, Y = e; w = []; var Z = null, U = e == u; u = U && S && "function" == typeof S.version && S.version(); var I = function(P) { return d(P, function(N, K) { return N || RegExp("\\b" + (K.pattern || l(K)) + "\\b", "i").exec(e) && (K.label || K) }) }([{ label: "EdgeHTML", pattern: "Edge" }, "Trident", { label: "WebKit", pattern: "AppleWebKit" }, "iCab", "Presto", "NetFront", "Tasman", "KHTML", "Gecko"]), B = function(P) { return d(P, function(N, K) { return N || RegExp("\\b" + (K.pattern || l(K)) + "\\b", "i").exec(e) && (K.label || K) }) }(["Adobe AIR", "Arora", "Avant Browser", "Breach", "Camino", "Electron", "Epiphany", "Fennec", "Flock", "Galeon", "GreenBrowser", "iCab", "Iceweasel", "K-Meleon", "Konqueror", "Lunascape", "Maxthon", { label: "Microsoft Edge", pattern: "Edge" }, "Midori", "Nook Browser", "PaleMoon", "PhantomJS", "Raven", "Rekonq", "RockMelt", { label: "Samsung Internet", pattern: "SamsungBrowser" }, "SeaMonkey", { label: "Silk", pattern: "(?:Cloud9|Silk-Accelerated)" }, "Sleipnir", "SlimBrowser", { label: "SRWare Iron", pattern: "Iron" }, "Sunrise", "Swiftfox", "Waterfox", "WebPositive", "Opera Mini", { label: "Opera Mini", pattern: "OPiOS" }, "Opera", { label: "Opera", pattern: "OPR" }, "Chrome", { label: "Chrome Mobile", pattern: "(?:CriOS|CrMo)" }, { label: "Firefox", pattern: "(?:Firefox|Minefield)" }, { label: "Firefox for iOS", pattern: "FxiOS" }, { label: "IE", pattern: "IEMobile" }, { label: "IE", pattern: "MSIE" }, "Safari" ]), J = y([{ label: "BlackBerry", pattern: "BB10" }, "BlackBerry", { label: "Galaxy S", pattern: "GT-I9000" }, { label: "Galaxy S2", pattern: "GT-I9100" }, { label: "Galaxy S3", pattern: "GT-I9300" }, { label: "Galaxy S4", pattern: "GT-I9500" }, { label: "Galaxy S5", pattern: "SM-G900" }, { label: "Galaxy S6", pattern: "SM-G920" }, { label: "Galaxy S6 Edge", pattern: "SM-G925" }, { label: "Galaxy S7", pattern: "SM-G930" }, { label: "Galaxy S7 Edge", pattern: "SM-G935" }, "Google TV", "Lumia", "iPad", "iPod", "iPhone", "Kindle", { label: "Kindle Fire", pattern: "(?:Cloud9|Silk-Accelerated)" }, "Nexus", "Nook", "PlayBook", "PlayStation Vita", "PlayStation", "TouchPad", "Transformer", { label: "Wii U", pattern: "WiiU" }, "Wii", "Xbox One", { label: "Xbox 360", pattern: "Xbox" }, "Xoom" ]), T = function(P) { return d(P, function(N, K, R) { return N || (K[J] || K[/^[a-z]+(?: +[a-z]+\b)*/i.exec(J)] || RegExp("\\b" + l(R) + "(?:\\b|\\w*\\d)", "i").exec(e)) && R }) }({ Apple: { iPad: 1, iPhone: 1, iPod: 1 }, Archos: {}, Amazon: { Kindle: 1, "Kindle Fire": 1 }, Asus: { Transformer: 1 }, "Barnes & Noble": { Nook: 1 }, BlackBerry: { PlayBook: 1 }, Google: { "Google TV": 1, Nexus: 1 }, HP: { TouchPad: 1 }, HTC: {}, LG: {}, Microsoft: { Xbox: 1, "Xbox One": 1 }, Motorola: { Xoom: 1 }, Nintendo: { "Wii U": 1, Wii: 1 }, Nokia: { Lumia: 1 }, Samsung: { "Galaxy S": 1, "Galaxy S2": 1, "Galaxy S3": 1, "Galaxy S4": 1 }, Sony: { PlayStation: 1, "PlayStation Vita": 1 } }), C = function(P) { return d(P, function(N, K) { var R = K.pattern || l(K); if (!N && (N = RegExp("\\b" + R + "(?:/[\\d.]+|[ \\w.]*)", "i").exec(e))) { var W = N, ba = K.label || K, ca = { "10.0": "10", "6.4": "10 Technical Preview", "6.3": "8.1", "6.2": "8", "6.1": "Server 2008 R2 / 7", "6.0": "Server 2008 / Vista", "5.2": "Server 2003 / XP 64-bit", "5.1": "XP", "5.01": "2000 SP1", "5.0": "2000", "4.0": "NT", "4.90": "ME" }; R && ba && /^Win/i.test(W) && !/^Windows Phone /i.test(W) && (ca = ca[/[\d.]+$/.exec(W)]) && (W = "Windows " + ca); W = String(W); R && ba && (W = W.replace(RegExp(R, "i"), ba)); N = W = b(W.replace(/ ce$/i, " CE").replace(/\bhpw/i, "web").replace(/\bMacintosh\b/, "Mac OS").replace(/_PowerPC\b/i, " OS").replace(/\b(OS X) [^ \d]+/i, "$1").replace(/\bMac (OS X)\b/, "$1").replace(/\/(\d)/, " $1").replace(/_/g, ".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i, "").replace(/\bx86\.64\b/gi, "x86_64").replace(/\b(Windows Phone) OS\b/, "$1").replace(/\b(Chrome OS \w+) [\d.]+\b/, "$1").split(" on ")[0]) } return N }) }(["Windows Phone", "Android", "CentOS", { label: "Chrome OS", pattern: "CrOS" }, "Debian", "Fedora", "FreeBSD", "Gentoo", "Haiku", "Kubuntu", "Linux Mint", "OpenBSD", "Red Hat", "SuSE", "Ubuntu", "Xubuntu", "Cygwin", "Symbian OS", "hpwOS", "webOS ", "webOS", "Tablet OS", "Tizen", "Linux", "Mac OS X", "Macintosh", "Mac", "Windows 98;", "Windows " ]); I && (I = [I]); T && !J && (J = y([T])); if (n = /\bGoogle TV\b/.exec(J)) J = n[0]; /\bSimulator\b/i.test(e) && (J = (J ? J + " " : "") + "Simulator"); "Opera Mini" == B && /\bOPiOS\b/.test(e) && w.push("running in Turbo/Uncompressed mode"); "IE" == B && /\blike iPhone OS\b/.test(e) ? (n = f(e.replace(/like iPhone OS/, "")), T = n.manufacturer, J = n.product) : /^iP/.test(J) ? (B || (B = "Safari"), C = "iOS" + ((n = / OS ([\d_]+)/i.exec(e)) ? " " + n[1].replace(/_/g, ".") : "")) : "Konqueror" != B || /buntu/i.test(C) ? T && "Google" != T && (/Chrome/.test(B) && !/\bMobile Safari\b/i.test(e) || /\bVita\b/.test(J)) || /\bAndroid\b/.test(C) && /^Chrome/.test(B) && /\bVersion\//i.test(e) ? (B = "Android Browser", C = /\bAndroid\b/.test(C) ? C : "Android") : "Silk" == B ? (/\bMobi/i.test(e) || (C = "Android", w.unshift("desktop mode")), /Accelerated *= *true/i.test(e) && w.unshift("accelerated")) : "PaleMoon" == B && (n = /\bFirefox\/([\d.]+)\b/.exec(e)) ? w.push("identifying as Firefox " + n[1]) : "Firefox" == B && (n = /\b(Mobile|Tablet|TV)\b/i.exec(e)) ? (C || (C = "Firefox OS"), J || (J = n[1])) : !B || (n = !/\bMinefield\b/i.test(e) && /\b(?:Firefox|Safari)\b/.exec(B)) ? (B && !J && /[\/,]|^[^(]+?\)/.test(e.slice(e.indexOf(n + "/") + 8)) && (B = null), (n = J || T || C) && (J || T || /\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(C)) && (B = /[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(C) ? C : n) + " Browser")) : "Electron" == B && (n = (/\bChrome\/([\d.]+)\b/.exec(e) || 0)[1]) && w.push("Chromium " + n) : C = "Kubuntu"; u || (u = E(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))", "Version", l(B), "(?:Firefox|Minefield|NetFront)" ])); if (n = "iCab" == I && 3 < parseFloat(u) && "WebKit" || /\bOpera\b/.test(B) && (/\bOPR\b/.test(e) ? "Blink" : "Presto") || /\b(?:Midori|Nook|Safari)\b/i.test(e) && !/^(?:Trident|EdgeHTML)$/.test(I) && "WebKit" || !I && /\bMSIE\b/i.test(e) && ("Mac OS" == C ? "Tasman" : "Trident") || "WebKit" == I && /\bPlayStation\b(?! Vita\b)/i.test(B) && "NetFront") I = [n]; "IE" == B && (n = (/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(e) || 0)[1]) ? (B += " Mobile", C = "Windows Phone " + (/\+$/.test(n) ? n : n + ".x"), w.unshift("desktop mode")) : /\bWPDesktop\b/i.test(e) ? (B = "IE Mobile", C = "Windows Phone 8.x", w.unshift("desktop mode"), u || (u = (/\brv:([\d.]+)/.exec(e) || 0)[1])) : "IE" != B && "Trident" == I && (n = /\brv:([\d.]+)/.exec(e)) && (B && w.push("identifying as " + B + (u ? " " + u : "")), B = "IE", u = n[1]); if (U) { if (h(q, "global")) if (L && (n = L.lang.System, Y = n.getProperty("os.arch"), C = C || n.getProperty("os.name") + " " + n.getProperty("os.version")), G) { try { u = q.require("ringo/engine").version.join("."), B = "RingoJS" } catch (P) { (n = q.system) && n.global.system == q.system && (B = "Narwhal", C || (C = n[0].os || null)) } B || (B = "Rhino") } else "object" == typeof q.process && !q.process.browser && (n = q.process) && ("object" == typeof n.versions && ("string" == typeof n.versions.electron ? (w.push("Node " + n.versions.node), B = "Electron", u = n.versions.electron) : "string" == typeof n.versions.nw && (w.push("Chromium " + u, "Node " + n.versions.node), B = "NW.js", u = n.versions.nw)), B || (B = "Node.js", Y = n.arch, C = n.platform, u = (u = /[\d.]+/.exec(n.version)) ? u[0] : null)); else k(n = q.runtime) == D ? (B = "Adobe AIR", C = n.flash.system.Capabilities.os) : k(n = q.phantom) == O ? (B = "PhantomJS", u = (n = n.version || null) && n.major + "." + n.minor + "." + n.patch) : "number" == typeof V.documentMode && (n = /\bTrident\/(\d+)/i.exec(e)) ? (u = [u, V.documentMode], (n = +n[1] + 4) != u[1] && (w.push("IE " + u[1] + " mode"), I && (I[1] = ""), u[1] = n), u = "IE" == B ? String(u[1].toFixed(1)) : u[0]) : "number" == typeof V.documentMode && /^(?:Chrome|Firefox)\b/.test(B) && (w.push("masking as " + B + " " + u), B = "IE", u = "11.0", I = ["Trident"], C = "Windows"); C = C && b(C) } u && (n = /(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(u) || /(?:alpha|beta)(?: ?\d)?/i.exec(e + ";" + (U && H.appMinorVersion)) || /\bMinefield\b/i.test(e) && "a") && (Z = /b/i.test(n) ? "beta" : "alpha", u = u.replace(RegExp(n + "\\+?$"), "") + ("beta" == Z ? Q : X) + (/\d+\+?/.exec(n) || "")); if ("Fennec" == B || "Firefox" == B && /\b(?:Android|Firefox OS)\b/.test(C)) B = "Firefox Mobile"; else if ("Maxthon" == B && u) u = u.replace(/\.[\d.]+/, ".x"); else if (/\bXbox\b/i.test(J)) "Xbox 360" == J && (C = null), "Xbox 360" == J && /\bIEMobile\b/.test(e) && w.unshift("mobile mode"); else if (!/^(?:Chrome|IE|Opera)$/.test(B) && (!B || J || /Browser|Mobi/.test(B)) || "Windows CE" != C && !/Mobi/i.test(e)) if ("IE" == B && U) try { null === q.external && w.unshift("platform preview") } catch (P) { w.unshift("embedded") } else(/\bBlackBerry\b/.test(J) || /\bBB10\b/.test(e)) && (n = (RegExp(J.replace(/ +/g, " *") + "/([.\\d]+)", "i").exec(e) || 0)[1] || u) ? (n = [n, /BB10/.test(e)], C = (n[1] ? (J = null, T = "BlackBerry") : "Device Software") + " " + n[0], u = null) : this != g && "Wii" != J && (U && S || /Opera/.test(B) && /\b(?:MSIE|Firefox)\b/i.test(e) || "Firefox" == B && /\bOS X (?:\d+\.){2,}/.test(C) || "IE" == B && (C && !/^Win/.test(C) && 5.5 < u || /\bWindows XP\b/.test(C) && 8 < u || 8 == u && !/\bTrident\b/.test(e))) && !z.test(n = f.call(g, e.replace(z, "") + ";")) && n.name && (n = "ing as " + n.name + ((n = n.version) ? " " + n : ""), z.test(B) ? (/\bIE\b/.test(n) && "Mac OS" == C && (C = null), n = "identify" + n) : (n = "mask" + n, B = aa ? b(aa.replace(/([a-z])([A-Z])/g, "$1 $2")) : "Opera", /\bIE\b/.test(n) && (C = null), U || (u = null)), I = ["Presto"], w.push(n)); else B += " Mobile"; if (n = (/\bAppleWebKit\/([\d.]+\+?)/i.exec(e) || 0)[1]) { n = [parseFloat(n.replace(/\.(\d)$/, ".0$1")), n]; if ("Safari" == B && "+" == n[1].slice(-1)) B = "WebKit Nightly", Z = "alpha", u = n[1].slice(0, -1); else if (u == n[1] || u == (n[2] = (/\bSafari\/([\d.]+\+?)/i.exec(e) || 0)[1])) u = null; n[1] = (/\bChrome\/([\d.]+)/i.exec(e) || 0)[1]; 537.36 == n[0] && 537.36 == n[2] && 28 <= parseFloat(n[1]) && "WebKit" == I && (I = ["Blink"]); U && (M || n[1]) ? (I && (I[1] = "like Chrome"), n = n[1] || (n = n[0], 530 > n ? 1 : 532 > n ? 2 : 532.05 > n ? 3 : 533 > n ? 4 : 534.03 > n ? 5 : 534.07 > n ? 6 : 534.1 > n ? 7 : 534.13 > n ? 8 : 534.16 > n ? 9 : 534.24 > n ? 10 : 534.3 > n ? 11 : 535.01 > n ? 12 : 535.02 > n ? "13+" : 535.07 > n ? 15 : 535.11 > n ? 16 : 535.19 > n ? 17 : 536.05 > n ? 18 : 536.1 > n ? 19 : 537.01 > n ? 20 : 537.11 > n ? "21+" : 537.13 > n ? 23 : 537.18 > n ? 24 : 537.24 > n ? 25 : 537.36 > n ? 26 : "Blink" != I ? "27" : "28")) : (I && (I[1] = "like Safari"), n = (n = n[0], 400 > n ? 1 : 500 > n ? 2 : 526 > n ? 3 : 533 > n ? 4 : 534 > n ? "4+" : 535 > n ? 5 : 537 > n ? 6 : 538 > n ? 7 : 601 > n ? 8 : "8")); I && (I[1] += " " + (n += "number" == typeof n ? ".x" : /[.+]/.test(n) ? "" : "+")); "Safari" == B && (!u || 45 < parseInt(u)) && (u = n) } "Opera" == B && (n = /\bzbov|zvav$/.exec(C)) ? (B += " ", w.unshift("desktop mode"), "zvav" == n ? (B += "Mini", u = null) : B += "Mobile", C = C.replace(RegExp(" *" + n + "$"), "")) : "Safari" == B && /\bChrome\b/.exec(I && I[1]) && (w.unshift("desktop mode"), B = "Chrome Mobile", u = null, /\bOS X\b/.test(C) ? (T = "Apple", C = "iOS 4.3+") : C = null); u && 0 == u.indexOf(n = /[\d.]+$/.exec(C)) && -1 < e.indexOf("/" + n + "-") && (C = String(C.replace(n, "")).replace(/^ +| +$/g, "")); I && !/\b(?:Avant|Nook)\b/.test(B) && (/Browser|Lunascape|Maxthon/.test(B) || "Safari" != B && /^iOS/.test(C) && /\bSafari\b/.test(I[1]) || /^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(B) && I[1]) && (n = I[I.length - 1]) && w.push(n); w.length && (w = ["(" + w.join("; ") + ")"]); T && J && 0 > J.indexOf(T) && w.push("on " + T); J && w.push((/^on /.test(w[w.length - 1]) ? "" : "on ") + J); if (C) { var da = (n = / ([\d.+]+)$/.exec(C)) && "/" == C.charAt(C.length - n[0].length - 1); C = { architecture: 32, family: n && !da ? C.replace(n[0], "") : C, version: n ? n[1] : null, toString: function() { var P = this.version; return this.family + (P && !da ? " " + P : "") + (64 == this.architecture ? " 64-bit" : "") } } }(n = /\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Y)) && !/\bi686\b/i.test(Y) ? (C && (C.architecture = 64, C.family = C.family.replace(RegExp(" *" + n), "")), B && (/\bWOW64\b/i.test(e) || U && /\w(?:86|32)$/.test(H.cpuClass || H.platform) && !/\bWin64; x64\b/i.test(e)) && w.unshift("32-bit")) : C && /^OS X/.test(C.family) && "Chrome" == B && 39 <= parseFloat(u) && (C.architecture = 64); e || (e = null); q = {}; q.description = e; q.layout = I && I[0]; q.manufacturer = T; q.name = B; q.prerelease = Z; q.product = J; q.ua = e; q.version = B && u; q.os = C || { architecture: null, family: null, version: null, toString: function() { return "null" } }; q.parse = f; q.toString = function() { return this.description || "" }; q.version && w.unshift(u); q.name && w.unshift(B); C && B && (C != String(C).split(" ")[0] || C != B.split(" ")[0] && !J) && w.push(J ? "(" + C + ")" : "on " + C); w.length && (q.description = w.join(" ")); return q } var m = { "function": !0, object: !0 }, p = m[typeof window] && window || this, v = m[typeof exports] && exports; m = m[typeof module] && module && !module.nodeType && module; var t = v && m && "object" == typeof global && global; !t || t.global !== t && t.window !== t && t.self !== t || (p = t); var x = Math.pow(2, 53) - 1, z = /\bOpera/; t = Object.prototype; var A = t.hasOwnProperty, r = t.toString, F = f(); "function" == typeof define && "object" == typeof define.amd && define.amd ? (p.platform = F, define(function() { return F })) : v && m ? g(F, function(e, y) { v[y] = e }) : p.platform = F }).call(this); function buildIOSMeta() { for (var a = [{ name: "viewport", content: "width=device-width, height=device-height, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" }, { name: "apple-mobile-web-app-capable", content: "yes" }, { name: "apple-mobile-web-app-status-bar-style", content: "black" }], c = 0; c < a.length; c++) { var b = document.createElement("meta"); b.name = a[c].name; b.content = a[c].content; var g = window.document.head.querySelector('meta[name="' + b.name + '"]'); g && g.parentNode.removeChild(g); window.document.head.appendChild(b) } } function hideIOSFullscreenPanel() { document.querySelector(".xxx-ios-fullscreen-message").style.display = "none"; document.querySelector(".xxx-ios-fullscreen-scroll").style.display = "none"; document.querySelector(".xxx-game-iframe-full").classList.remove("xxx-game-iframe-iphone-se") } function buildIOSFullscreenPanel() { document.body.insertAdjacentHTML("beforeend", '<div class="xxx-ios-fullscreen-message"><div class="xxx-ios-fullscreen-swipe"></div></div><div class="xxx-ios-fullscreen-scroll"></div>') } function showIOSFullscreenPanel() { document.querySelector(".xxx-ios-fullscreen-message").style.display = "none"; document.querySelector(".xxx-ios-fullscreen-scroll").style.display = "none" } function __iosResize() { window.scrollTo(0, 0); console.log(window.devicePixelRatio); console.log(window.innerWidth); console.log(window.innerHeight); if ("iPhone" === platform.product) switch (window.devicePixelRatio) { case 2: switch (window.innerWidth) { case 568: 320 !== window.innerHeight && document.querySelector(".xxx-game-iframe-full").classList.add("xxx-game-iframe-iphone-se"); break; case 667: 375 === window.innerHeight ? hideIOSFullscreenPanel() : showIOSFullscreenPanel(); break; case 808: 414 === window.innerHeight ? hideIOSFullscreenPanel() : showIOSFullscreenPanel(); break; default: hideIOSFullscreenPanel() } break; case 3: switch (window.innerWidth) { case 736: 414 === window.innerHeight ? hideIOSFullscreenPanel() : showIOSFullscreenPanel(); break; case 724: 375 === window.innerHeight ? hideIOSFullscreenPanel() : showIOSFullscreenPanel(); break; case 808: 414 === window.innerHeight ? hideIOSFullscreenPanel() : showIOSFullscreenPanel(); break; default: hideIOSFullscreenPanel() } break; default: hideIOSFullscreenPanel() } } function iosResize() { __iosResize(); setTimeout(function() { __iosResize() }, 500) } function iosInIframe() { try { return window.self !== window.top } catch (a) { return !0 } } function isIOSLessThen13() { var a = platform.os, c = a.family.toLowerCase(); a = parseFloat(a.version); return "ios" === c && 13 > a ? !0 : !1 } document.addEventListener("DOMContentLoaded", function() { platform && "iPhone" === platform.product && "safari" === platform.name.toLowerCase() && isIOSLessThen13() && !iosInIframe() && (buildIOSFullscreenPanel(), buildIOSMeta()) }); window.addEventListener("resize", function(a) { platform && "iPhone" === platform.product && "safari" === platform.name.toLowerCase() && isIOSLessThen13() && !iosInIframe() && iosResize() }); var s_iScaleFactor = 1, s_bIsIphone = !1, s_iOffsetX, s_iOffsetY, s_bFocus = !0; (function(a) { (jQuery.browser = jQuery.browser || {}).mobile = /android|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(ad|hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|tablet|treo|up\.(browser|link)|vodafone|wap|webos|windows (ce|phone)|xda|xiino/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|e\-|e\/|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(di|rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|xda(\-|2|g)|yas\-|your|zeto|zte\-/i.test(a.substr(0, 4)) })(navigator.userAgent || navigator.vendor || window.opera); $(window).resize(function() { sizeHandler() }); function NotImplementedError(a) { this.name = "NotImplementedError"; this.message = a || "" } NotImplementedError.prototype = Error.prototype; function error(a) { throw { name: "NotImplementedError", message: a }; } function trace(a) { console.log(a) } window.addEventListener("orientationchange", onOrientationChange); function onOrientationChange() { sizeHandler() } function ifArrayContainsValue(a, c) { for (var b = 0; b < a.length; b++) if (a[b] === c) return !0; return !1 } function getSize(a) { var c = a.toLowerCase(), b = window.document, g = b.documentElement; if (void 0 === window["inner" + a]) a = g["client" + a]; else if (window["inner" + a] != g["client" + a]) { var k = b.createElement("body"); k.id = "vpw-test-b"; k.style.cssText = "overflow:scroll"; var h = b.createElement("div"); h.id = "vpw-test-d"; h.style.cssText = "position:absolute;top:-1000px"; h.innerHTML = "<style>@media(" + c + ":" + g["client" + a] + "px){body#vpw-test-b div#vpw-test-d{" + c + ":7px!important}}</style>"; k.appendChild(h); g.insertBefore(k, b.head); a = 7 == h["offset" + a] ? g["client" + a] : window["inner" + a]; g.removeChild(k) } else a = window["inner" + a]; return a } function sizeHandler() { window.scrollTo(0, 1); if ($("#canvas")) { var a = null !== platform.name && "safari" === platform.name.toLowerCase() ? getIOSWindowHeight() : getSize("Height"); var c = getSize("Width"); s_bFocus && _checkOrientation(c, a); var b = Math.min(a / CANVAS_HEIGHT, c / CANVAS_WIDTH), g = Math.round(CANVAS_WIDTH * b); b = Math.round(CANVAS_HEIGHT * b); if (b < a) { var k = a - b; b += k; g += CANVAS_WIDTH / CANVAS_HEIGHT * k } else g < c && (k = c - g, g += k, b += CANVAS_HEIGHT / CANVAS_WIDTH * k); k = a / 2 - b / 2; var h = c / 2 - g / 2, l = CANVAS_WIDTH / g; if (h * l < -EDGEBOARD_X || k * l < -EDGEBOARD_Y) b = Math.min(a / (CANVAS_HEIGHT - 2 * EDGEBOARD_Y), c / (CANVAS_WIDTH - 2 * EDGEBOARD_X)), g = Math.round(CANVAS_WIDTH * b), b = Math.round(CANVAS_HEIGHT * b), k = (a - b) / 2, h = (c - g) / 2, l = CANVAS_WIDTH / g; s_iOffsetX = Math.floor(-1 * h * l); s_iOffsetY = Math.floor(-1 * k * l); 0 <= k && (s_iOffsetY = 0); 0 <= h && (s_iOffsetX = 0); null !== s_oInterface && s_oInterface.refreshButtonPos(s_iOffsetX, s_iOffsetY); null !== s_oMenu && s_oMenu.refreshButtonPos(s_iOffsetX, s_iOffsetY); null !== s_oMenuMode && s_oMenuMode.refreshButtonPos(s_iOffsetX, s_iOffsetY); null !== s_oLevelSelect && s_oLevelSelect.refreshButtonPos(s_iOffsetX, s_iOffsetY); s_bIsIphone && s_oStage ? (canvas = document.getElementById("canvas"), s_oStage.canvas.width = Math.floor(2 * g), s_oStage.canvas.height = Math.floor(2 * b), canvas.style.width = Math.floor(g) + "px", canvas.style.height = Math.floor(b) + "px", s_oStage.scaleX = s_oStage.scaleY = 2 * Math.min(g / CANVAS_WIDTH, b / CANVAS_HEIGHT)) : s_bMobile || isChrome() ? ($("#canvas").css("width", g + "px"), $("#canvas").css("height", b + "px")) : s_oStage && (s_oStage.canvas.width = Math.floor(g), s_oStage.canvas.height = Math.floor(b), s_iScaleFactor = Math.min(g / CANVAS_WIDTH, b / CANVAS_HEIGHT), s_oStage.scaleX = s_oStage.scaleY = s_iScaleFactor); 0 > k || (k = (a - b) / 2); $("#canvas").css("top", k + "px"); $("#canvas").css("left", h + "px"); fullscreenHandler() } } function _checkOrientation(a, c) { s_bMobile && ENABLE_CHECK_ORIENTATION && (a > c ? "landscape" === $(".orientation-msg-container").attr("data-orientation") ? ($(".orientation-msg-container").css("display", "none"), s_oMain.startUpdate()) : ($(".orientation-msg-container").css("display", "block"), s_oMain.stopUpdate()) : "portrait" === $(".orientation-msg-container").attr("data-orientation") ? ($(".orientation-msg-container").css("display", "none"), s_oMain.startUpdate()) : ($(".orientation-msg-container").css("display", "block"), s_oMain.stopUpdate())) } function isChrome() { return /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor) } function isIpad() { var a = -1 !== navigator.userAgent.toLowerCase().indexOf("ipad"); return !a && navigator.userAgent.match(/Mac/) && navigator.maxTouchPoints && 2 < navigator.maxTouchPoints ? !0 : a } function isMobile() { return isIpad() ? !0 : navigator.userAgent.match(/Android/i) || navigator.userAgent.match(/webOS/i) || navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPad/i) || navigator.userAgent.match(/iPod/i) || navigator.userAgent.match(/BlackBerry/i) || navigator.userAgent.match(/Windows Phone/i) ? !0 : !1 } function isIOS() { if (isIpad()) return !0; for (var a = "iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod".split(";"); a.length;) if (navigator.platform === a.pop()) return s_bIsIphone = !0; return s_bIsIphone = !1 } function getIOSWindowHeight() { return document.documentElement.clientWidth / window.innerWidth * window.innerHeight } function getHeightOfIOSToolbars() { var a = (0 === window.orientation ? screen.height : screen.width) - getIOSWindowHeight(); return 1 < a ? a : 0 } function getMobileOperatingSystem() { var a = navigator.userAgent || navigator.vendor || window.opera; return a.match(/iPad/i) || a.match(/iPhone/i) || a.match(/iPod/i) ? "ios" : a.match(/Android/i) ? "android" : "unknown" } function inIframe() { try { return window.self !== window.top } catch (a) { return !0 } } function stopSound(a) { !1 !== DISABLE_SOUND_MOBILE && !1 !== s_bMobile || s_aSounds[a].stop() } function playSound(a, c, b) { return !1 === DISABLE_SOUND_MOBILE || !1 === s_bMobile ? (s_aSounds[a].play(), s_aSounds[a].volume(c), s_aSounds[a].loop(b), s_aSounds[a]) : null } function setVolume(a, c) { !1 !== DISABLE_SOUND_MOBILE && !1 !== s_bMobile || s_aSounds[a].volume(c) } function setMute(a, c) { !1 !== DISABLE_SOUND_MOBILE && !1 !== s_bMobile || s_aSounds[c].mute(a) } function soundPlaying(a) { if (!1 === DISABLE_SOUND_MOBILE || !1 === s_bMobile) return s_aSounds[a].playing() } function createBitmap(a, c, b) { var g = new createjs.Bitmap(a), k = new createjs.Shape; c && b ? k.graphics.beginFill("#fff").drawRect(0, 0, c, b) : k.graphics.beginFill("#ff0").drawRect(0, 0, a.width, a.height); g.hitArea = k; return g } function createSprite(a, c, b, g, k, h) { a = null !== c ? new createjs.Sprite(a, c) : new createjs.Sprite(a); c = new createjs.Shape; c.graphics.beginFill("#000000").drawRect(-b, -g, k, h); a.hitArea = c; return a } function randomFloatBetween(a, c, b) { "undefined" === typeof b && (b = 2); return parseFloat(Math.min(a + Math.random() * (c - a), c).toFixed(b)) } function shuffle(a) { for (var c = a.length, b, g; 0 !== c;) g = Math.floor(Math.random() * c), --c, b = a[c], a[c] = a[g], a[g] = b; return a } function easeLinear(a, c, b, g) { return b * a / g + c } function easeInQuad(a, c, b, g) { return b * (a /= g) * a + c } function easeInSine(a, c, b, g) { return -b * Math.cos(a / g * (Math.PI / 2)) + b + c } function easeInCubic(a, c, b, g) { return b * (a /= g) * a * a + c } function getTrajectoryPoint(a, c) { var b = new createjs.Point, g = (1 - a) * (1 - a), k = a * a; b.x = g * c.start.x + 2 * (1 - a) * a * c.traj.x + k * c.end.x; b.y = g * c.start.y + 2 * (1 - a) * a * c.traj.y + k * c.end.y; return b } function formatTime(a) { a /= 1E3; var c = Math.floor(a / 60); a = parseFloat(a - 60 * c).toFixed(0); var b = ""; b = 10 > c ? b + ("0" + c + ":") : b + (c + ":"); return 10 > a ? b + ("0" + a) : b + a } function degreesToRadians(a) { return a * Math.PI / 180 } function checkRectCollision(a, c) { var b = getBounds(a, .9); var g = getBounds(c, .98); return calculateIntersection(b, g) } function calculateIntersection(a, c) { var b, g, k, h; var l = a.x + (b = a.width / 2); var d = a.y + (g = a.height / 2); var f = c.x + (k = c.width / 2); var m = c.y + (h = c.height / 2); l = Math.abs(l - f) - (b + k); d = Math.abs(d - m) - (g + h); return 0 > l && 0 > d ? (l = Math.min(Math.min(a.width, c.width), -l), d = Math.min(Math.min(a.height, c.height), -d), { x: Math.max(a.x, c.x), y: Math.max(a.y, c.y), width: l, height: d, rect1: a, rect2: c }) : null } function getBounds(a, c) { var b = { x: Infinity, y: Infinity, width: 0, height: 0 }; if (a instanceof createjs.Container) { b.x2 = -Infinity; b.y2 = -Infinity; var g = a.children, k = g.length, h; for (h = 0; h < k; h++) { var l = getBounds(g[h], 1); l.x < b.x && (b.x = l.x); l.y < b.y && (b.y = l.y); l.x + l.width > b.x2 && (b.x2 = l.x + l.width); l.y + l.height > b.y2 && (b.y2 = l.y + l.height) } Infinity == b.x && (b.x = 0); Infinity == b.y && (b.y = 0); Infinity == b.x2 && (b.x2 = 0); Infinity == b.y2 && (b.y2 = 0); b.width = b.x2 - b.x; b.height = b.y2 - b.y; delete b.x2; delete b.y2 } else { if (a instanceof createjs.Bitmap) { k = a.sourceRect || a.image; h = k.width * c; var d = k.height * c } else if (a instanceof createjs.Sprite) if (a.spriteSheet._frames && a.spriteSheet._frames[a.currentFrame] && a.spriteSheet._frames[a.currentFrame].image) { k = a.spriteSheet.getFrame(a.currentFrame); h = k.rect.width; d = k.rect.height; g = k.regX; var f = k.regY } else b.x = a.x || 0, b.y = a.y || 0; else b.x = a.x || 0, b.y = a.y || 0; g = g || 0; h = h || 0; f = f || 0; d = d || 0; b.regX = g; b.regY = f; k = a.localToGlobal(0 - g, 0 - f); l = a.localToGlobal(h - g, d - f); h = a.localToGlobal(h - g, 0 - f); g = a.localToGlobal(0 - g, d - f); b.x = Math.min(Math.min(Math.min(k.x, l.x), h.x), g.x); b.y = Math.min(Math.min(Math.min(k.y, l.y), h.y), g.y); b.width = Math.max(Math.max(Math.max(k.x, l.x), h.x), g.x) - b.x; b.height = Math.max(Math.max(Math.max(k.y, l.y), h.y), g.y) - b.y } return b } function NoClickDelay(a) { this.element = a; window.Touch && this.element.addEventListener("touchstart", this, !1) } NoClickDelay.prototype = { handleEvent: function(a) { switch (a.type) { case "touchstart": this.onTouchStart(a); break; case "touchmove": this.onTouchMove(a); break; case "touchend": this.onTouchEnd(a) } }, onTouchStart: function(a) { a.preventDefault(); this.moved = !1; this.element.addEventListener("touchmove", this, !1); this.element.addEventListener("touchend", this, !1) }, onTouchMove: function(a) { this.moved = !0 }, onTouchEnd: function(a) { this.element.removeEventListener("touchmove", this, !1); this.element.removeEventListener("touchend", this, !1); if (!this.moved) { a = document.elementFromPoint(a.changedTouches[0].clientX, a.changedTouches[0].clientY); 3 == a.nodeType && (a = a.parentNode); var c = document.createEvent("MouseEvents"); c.initEvent("click", !0, !0); a.dispatchEvent(c) } } }; (function() { function a(b) { var g = { focus: "visible", focusin: "visible", pageshow: "visible", blur: "hidden", focusout: "hidden", pagehide: "hidden" }; b = b || window.event; b.type in g ? document.body.className = g[b.type] : (document.body.className = this[c] ? "hidden" : "visible", "hidden" === document.body.className ? (s_oMain.stopUpdate(), s_bFocus = !1) : (s_oMain.startUpdate(), s_bFocus = !0)) } var c = "hidden"; c in document ? document.addEventListener("visibilitychange", a) : (c = "mozHidden") in document ? document.addEventListener("mozvisibilitychange", a) : (c = "webkitHidden") in document ? document.addEventListener("webkitvisibilitychange", a) : (c = "msHidden") in document ? document.addEventListener("msvisibilitychange", a) : "onfocusin" in document ? document.onfocusin = document.onfocusout = a : window.onpageshow = window.onpagehide = window.onfocus = window.onblur = a })(); function ctlArcadeResume() { null !== s_oMain && s_oMain.startUpdate() } function ctlArcadePause() { null !== s_oMain && s_oMain.stopUpdate() } function getParamValue(a) { for (var c = window.location.search.substring(1).split("&"), b = 0; b < c.length; b++) { var g = c[b].split("="); if (g[0] == a) return g[1] } } function saveItem(a, c) { s_bStorageAvailable && localStorage.setItem(a, c) } function getItem(a) { return s_bStorageAvailable ? localStorage.getItem(a) : null } function setItemJson(a, c) { s_bStorageAvailable && localStorage.setItem(a, JSON.stringify(c)) } function getItemJson(a) { return s_bStorageAvailable ? JSON.parse(localStorage.getItem(a)) : null } function fullscreenHandler() { ENABLE_FULLSCREEN && screenfull.isEnabled && (s_bFullscreen = screenfull.isFullscreen, null !== s_oInterface && s_oInterface.resetFullscreenBut(), null !== s_oMenu && s_oMenu.resetFullscreenBut(), null !== s_oMenuMode && s_oMenuMode.resetFullscreenBut(), null !== s_oLevelSelect && s_oLevelSelect.resetFullscreenBut()) } if (screenfull.isEnabled) screenfull.on("change", function() { s_bFullscreen = screenfull.isFullscreen; null !== s_oInterface && s_oInterface.resetFullscreenBut(); null !== s_oMenu && s_oMenu.resetFullscreenBut(); null !== s_oMenuMode && s_oMenuMode.resetFullscreenBut(); null !== s_oLevelSelect && s_oLevelSelect.resetFullscreenBut() }); function CSpriteLibrary() { var a = {}, c, b, g, k, h, l; this.init = function(d, f, m) { c = {}; g = b = 0; k = d; h = f; l = m }; this.addSprite = function(d, f) { if (!a.hasOwnProperty(d)) { var m = new Image; a[d] = c[d] = { szPath: f, oSprite: m, bLoaded: !1 }; b++ } }; this.getSprite = function(d) { return a.hasOwnProperty(d) ? a[d].oSprite : null }; this._onSpritesLoaded = function() { b = 0; h.call(l) }; this._onSpriteLoaded = function() { k.call(l); ++g === b && this._onSpritesLoaded() }; this.loadSprites = function() { for (var d in c) c[d].oSprite.oSpriteLibrary = this, c[d].oSprite.szKey = d, c[d].oSprite.onload = function() { this.oSpriteLibrary.setLoaded(this.szKey); this.oSpriteLibrary._onSpriteLoaded(this.szKey) }, c[d].oSprite.onerror = function(f) { var m = f.currentTarget; setTimeout(function() { c[m.szKey].oSprite.src = c[m.szKey].szPath }, 500) }, c[d].oSprite.src = c[d].szPath }; this.setLoaded = function(d) { a[d].bLoaded = !0 }; this.isLoaded = function(d) { return a[d].bLoaded }; this.getNumSprites = function() { return b } } CTLText.prototype = { constructor: CTLText, __autofit: function() { if (this._bFitText) { for (var a = this._iFontSize; (this._oText.getBounds().height > this._iHeight - 2 * this._iPaddingV || this._oText.getBounds().width > this._iWidth - 2 * this._iPaddingH) && !(a--, this._oText.font = a + "px " + this._szFont, this._oText.lineHeight = Math.round(a * this._fLineHeightFactor), this.__updateY(), this.__verticalAlign(), 8 > a);); this._iFontSize = a } }, __verticalAlign: function() { if (this._bVerticalAlign) { var a = this._oText.getBounds().height; this._oText.y -= (a - this._iHeight) / 2 + this._iPaddingV } }, __updateY: function() { this._oText.y = this._y + this._iPaddingV; switch (this._oText.textBaseline) { case "middle": this._oText.y += this._oText.lineHeight / 2 + (this._iFontSize * this._fLineHeightFactor - this._iFontSize) } }, __createText: function(a) { this._bDebug && (this._oDebugShape = new createjs.Shape, this._oDebugShape.graphics.beginFill("rgba(255,0,0,0.5)").drawRect(this._x, this._y, this._iWidth, this._iHeight), this._oContainer.addChild(this._oDebugShape)); this._oText = new createjs.Text(a, this._iFontSize + "px " + this._szFont, this._szColor); this._oText.textBaseline = "middle"; this._oText.lineHeight = Math.round(this._iFontSize * this._fLineHeightFactor); this._oText.textAlign = this._szAlign; this._oText.lineWidth = this._bMultiline ? this._iWidth - 2 * this._iPaddingH : null; switch (this._szAlign) { case "center": this._oText.x = this._x + this._iWidth / 2; break; case "left": this._oText.x = this._x + this._iPaddingH; break; case "right": this._oText.x = this._x + this._iWidth - this._iPaddingH } this._oContainer.addChild(this._oText); this.refreshText(a) }, setVerticalAlign: function(a) { this._bVerticalAlign = a }, setOutline: function(a) { null !== this._oText && (this._oText.outline = a) }, setShadow: function(a, c, b, g) { null !== this._oText && (this._oText.shadow = new createjs.Shadow(a, c, b, g)) }, setColor: function(a) { this._oText.color = a }, setAlpha: function(a) { this._oText.alpha = a }, removeTweens: function() { createjs.Tween.removeTweens(this._oText) }, getText: function() { return this._oText }, getY: function() { return this._y }, getFontSize: function() { return this._iFontSize }, refreshText: function(a) { "" === a && (a = " "); null === this._oText && this.__createText(a); this._oText.text = a; this._oText.font = this._iFontSize + "px " + this._szFont; this._oText.lineHeight = Math.round(this._iFontSize * this._fLineHeightFactor); this.__autofit(); this.__updateY(); this.__verticalAlign() } }; function CTLText(a, c, b, g, k, h, l, d, f, m, p, v, t, x, z, A, r) { this._oContainer = a; this._x = c; this._y = b; this._iWidth = g; this._iHeight = k; this._bMultiline = A; this._iFontSize = h; this._szAlign = l; this._szColor = d; this._szFont = f; this._iPaddingH = p; this._iPaddingV = v; this._bVerticalAlign = z; this._bFitText = x; this._bDebug = r; this._oDebugShape = null; this._fLineHeightFactor = m; this._oText = null; t && this.__createText(t) } var CANVAS_WIDTH = 768, CANVAS_HEIGHT = 1400, CANVAS_WIDTH_HALF = .5 * CANVAS_WIDTH, CANVAS_HEIGHT_HALF = .5 * CANVAS_HEIGHT, EDGEBOARD_X = 0, EDGEBOARD_Y = 200, FPS = 30, FPS_TIME = 1E3 / FPS, DISABLE_SOUND_MOBILE = !1, PRIMARY_FONT = "comfortaa", PRIMARY_FONT_COLOUR = "#ffffff", SECONDARY_FONT_COLOUR = "#000000", STATE_LOADING = 0, STATE_MENU = 1, STATE_MENU_MODE = 2, STATE_LEVEL_SELECT = 3, STATE_GAME = 4, STATE_HELP = 5, ON_MOUSE_DOWN = 0, ON_MOUSE_UP = 1, ON_MOUSE_OVER = 2, ON_MOUSE_OUT = 3, MODE_EASY = 0, MODE_MEDIUM = 1, MODE_HARD = 2, MODE_EXTREME = 3, SOUNDTRACK_VOLUME_IN_GAME = .3, NUM_COLS, NUM_ROWS, TIME, SCORE_MULTIPLIER, TIMER_REMINDER = 1E4, SQUARE_SIZE = 132, ENABLE_FULLSCREEN, ENABLE_CHECK_ORIENTATION, DIRECTION_TOP = 0, DIRECTION_RIGHT = 1, DIRECTION_BOTTOM = 2, DIRECTION_LEFT = 3, MATRIX_SCALE = [1, .8, .6, .5], SQUARE_T = 0, SQUARE_I = 1, SQUARE_L = 2, SQUARE_CROSS = 3, SQUARE_END = 4, SQUARE_START = 5, NUM_ROWS_PAGE_LEVEL = 3, NUM_COLS_PAGE_LEVEL = 4, NUM_LEVELS, MATRIX_SETTINGS = [ [ [{ type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_START, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 180 }], [{ type: SQUARE_END, rotation: 0 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_START, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 180 }], [{ type: SQUARE_L, rotation: 0 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_START, rotation: 180 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_END, rotation: 90 } ], [{ type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_START, rotation: 270 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_END, rotation: 90 }], [{ type: SQUARE_L, rotation: 0 }, { type: SQUARE_START, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 180 }], [{ type: SQUARE_L, rotation: 0 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_START, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 180 }], [{ type: SQUARE_L, rotation: 0 }, { type: SQUARE_START, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 180 } ], [{ type: SQUARE_L, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_START, rotation: 180 }, { type: SQUARE_END, rotation: 180 }], [{ type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_START, rotation: 180 } ], [{ type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_START, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_END, rotation: 90 }] ], [ [{ type: SQUARE_END, rotation: 0 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_START, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 180 }], [{ type: SQUARE_L, rotation: 0 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_START, rotation: 0 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 180 } ], [{ type: SQUARE_END, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_START, rotation: 0 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_L, rotation: 180 }], [{ type: SQUARE_L, rotation: 0 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_START, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 180 } ], [{ type: SQUARE_L, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_START, rotation: 0 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_L, rotation: 180 } ], [{ type: SQUARE_L, rotation: 0 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_START, rotation: 180 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_L, rotation: 180 } ], [{ type: SQUARE_L, rotation: 0 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_START, rotation: 180 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 180 }], [{ type: SQUARE_END, rotation: 0 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_START, rotation: 270 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_L, rotation: 180 } ], [{ type: SQUARE_END, rotation: 0 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_START, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_END, rotation: 180 } ], [{ type: SQUARE_END, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_START, rotation: 0 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 180 } ] ], [ [{ type: SQUARE_END, rotation: 0 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_START, rotation: 0 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_L, rotation: 180 } ], [{ type: SQUARE_END, rotation: 0 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_START, rotation: 0 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 180 } ], [{ type: SQUARE_START, rotation: 0 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 180 } ], [{ type: SQUARE_END, rotation: 0 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_START, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_END, rotation: 90 } ], [{ type: SQUARE_END, rotation: 0 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_START, rotation: 0 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 180 } ], [{ type: SQUARE_END, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_START, rotation: 0 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 180 }], [{ type: SQUARE_L, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_START, rotation: 0 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_L, rotation: 180 } ], [{ type: SQUARE_END, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_START, rotation: 0 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 180 } ], [{ type: SQUARE_L, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_START, rotation: 0 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 180 } ], [{ type: SQUARE_END, rotation: 0 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_START, rotation: 0 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 180 } ] ], [ [{ type: SQUARE_L, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_START, rotation: 0 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 180 } ], [{ type: SQUARE_END, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_START, rotation: 0 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 180 } ], [{ type: SQUARE_L, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_START, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_END, rotation: 180 } ], [{ type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_START, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_END, rotation: 90 } ], [{ type: SQUARE_END, rotation: 0 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_START, rotation: 0 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_END, rotation: 90 } ], [{ type: SQUARE_START, rotation: 0 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 180 } ], [{ type: SQUARE_END, rotation: 0 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_START, rotation: 0 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_L, rotation: 180 } ], [{ type: SQUARE_START, rotation: 0 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 180 } ], [{ type: SQUARE_END, rotation: 0 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_START, rotation: 0 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_END, rotation: 90 } ], [{ type: SQUARE_END, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_START, rotation: 0 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_T, rotation: 270 }, { type: SQUARE_T, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_T, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 0 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_I, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_CROSS, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 90 }, { type: SQUARE_L, rotation: 270 }, { type: SQUARE_L, rotation: 180 }, { type: SQUARE_END, rotation: 180 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_T, rotation: 180 }, { type: SQUARE_END, rotation: 90 }, { type: SQUARE_END, rotation: 270 }, { type: SQUARE_I, rotation: 0 }, { type: SQUARE_L, rotation: 180 } ] ] ]; function CPreloader() { var a, c, b, g, k, h, l, d, f; this._init = function() { s_oSpriteLibrary.init(this._onImagesLoaded, this._onAllImagesLoaded, this); s_oSpriteLibrary.addSprite("progress_bar", "./sprites/progress_bar.png"); s_oSpriteLibrary.addSprite("200x200", "./sprites/200x200.jpg"); s_oSpriteLibrary.loadSprites(); f = new createjs.Container; s_oStage.addChild(f) }; this.unload = function() { f.removeAllChildren() }; this._onImagesLoaded = function() {}; this._onAllImagesLoaded = function() { this.attachSprites(); s_oMain.preloaderReady() }; this.attachSprites = function() { var m = new createjs.Shape; m.graphics.beginFill("black").drawRect(0, 0, CANVAS_WIDTH, CANVAS_HEIGHT); f.addChild(m); m = s_oSpriteLibrary.getSprite("200x200"); l = createBitmap(m); l.regX = .5 * m.width; l.regY = .5 * m.height; l.x = CANVAS_WIDTH_HALF; l.y = CANVAS_HEIGHT_HALF - 180; f.addChild(l); d = new createjs.Shape; d.graphics.beginFill("rgba(0,0,0,0.01)").drawRoundRect(l.x - 95, l.y - 95, 190, 190, 10); f.addChild(d); l.mask = d; m = s_oSpriteLibrary.getSprite("progress_bar"); g = createBitmap(m); g.x = CANVAS_WIDTH_HALF - m.width / 2; g.y = CANVAS_HEIGHT_HALF + 50; f.addChild(g); a = m.width; c = m.height; k = new createjs.Shape; k.graphics.beginFill("rgba(0,0,0,0.01)").drawRect(g.x, g.y, 1, c); f.addChild(k); g.mask = k; b = new createjs.Text("", "30px " + PRIMARY_FONT, PRIMARY_FONT_COLOUR); b.x = CANVAS_WIDTH_HALF; b.y = CANVAS_HEIGHT_HALF + 100; b.textBaseline = "alphabetic"; b.textAlign = "center"; f.addChild(b); h = new createjs.Shape; h.graphics.beginFill("black").drawRect(0, 0, CANVAS_WIDTH, CANVAS_HEIGHT); f.addChild(h); createjs.Tween.get(h).to({ alpha: 0 }, 500).call(function() { createjs.Tween.removeTweens(h); f.removeChild(h) }) }; this.refreshLoader = function(m) { b.text = m + "%"; 100 === m && (s_oMain._onRemovePreloader(), b.visible = !1, g.visible = !1, s_oMain._onRemovePreloader()); k.graphics.clear(); m = Math.floor(m * a / 100); k.graphics.beginFill("rgba(0,0,0,0.01)").drawRect(g.x, g.y, m, c) }; this._init() } function CMain(a) { var c, b = 0, g = 0, k = STATE_LOADING, h, l, d; this.initContainer = function() { s_oCanvas = document.getElementById("canvas"); s_oStage = new createjs.Stage(s_oCanvas); s_oStage.preventSelection = !1; s_bMobile = isMobile(); !1 === s_bMobile ? s_oStage.enableMouseOver(20) : createjs.Touch.enable(s_oStage, !0); s_iPrevTime = (new Date).getTime(); createjs.Ticker.addEventListener("tick", this._update); createjs.Ticker.framerate = FPS; navigator.userAgent.match(/Windows Phone/i) && (DISABLE_SOUND_MOBILE = !0); s_oSpriteLibrary = new CSpriteLibrary; h = new CPreloader; }; this.preloaderReady = function() { this._loadImages(); !1 !== DISABLE_SOUND_MOBILE && !1 !== s_bMobile || this._initSounds(); c = !0 }; this.soundLoaded = function() { b++; h.refreshLoader(Math.floor(b / g * 100)) }; this._initSounds = function() { Howler.mute(!s_bAudioActive); s_aSoundsInfo = []; s_aSoundsInfo.push({ path: "./sounds/", filename: "soundtrack", loop: !0, volume: 1, ingamename: "soundtrack" }); s_aSoundsInfo.push({ path: "./sounds/", filename: "click", loop: !1, volume: 1, ingamename: "click" }); s_aSoundsInfo.push({ path: "./sounds/", filename: "game_win", loop: !1, volume: 1, ingamename: "game_win" }); s_aSoundsInfo.push({ path: "./sounds/", filename: "game_over", loop: !1, volume: 1, ingamename: "game_over" }); s_aSoundsInfo.push({ path: "./sounds/", filename: "light_on", loop: !1, volume: 1, ingamename: "light_on" }); s_aSoundsInfo.push({ path: "./sounds/", filename: "light_off", loop: !1, volume: 1, ingamename: "light_off" }); s_aSoundsInfo.push({ path: "./sounds/", filename: "timer", loop: !1, volume: 1, ingamename: "timer" }); s_aSoundsInfo.push({ path: "./sounds/", filename: "rotation", loop: !1, volume: 1, ingamename: "rotation" }); g += s_aSoundsInfo.length; s_aSounds = []; for (var m = 0; m < s_aSoundsInfo.length; m++) this.tryToLoadSound(s_aSoundsInfo[m], !1) }; this.tryToLoadSound = function(m, p) { setTimeout(function() { s_aSounds[m.ingamename] = new Howl({ src: [m.path + m.filename + ".mp3"], autoplay: !1, preload: !0, loop: m.loop, volume: m.volume, onload: s_oMain.soundLoaded, onloaderror: function(v, t) { for (var x = 0; x < s_aSoundsInfo.length; x++) if (0 < s_aSounds[s_aSoundsInfo[x].ingamename]._sounds.length && v === s_aSounds[s_aSoundsInfo[x].ingamename]._sounds[0]._id) { s_oMain.tryToLoadSound(s_aSoundsInfo[x], !0); break } else document.querySelector("#block_game").style.display = "none" }, onplayerror: function(v) { for (var t = 0; t < s_aSoundsInfo.length; t++) if (v === s_aSounds[s_aSoundsInfo[t].ingamename]._sounds[0]._id) { s_aSounds[s_aSoundsInfo[t].ingamename].once("unlock", function() { s_aSounds[s_aSoundsInfo[t].ingamename].play(); "soundtrack" === s_aSoundsInfo[t].ingamename && null !== s_oGame && setVolume("soundtrack", SOUNDTRACK_VOLUME_IN_GAME) }); break } } }) }, p ? 200 : 0) }; this._loadImages = function() { s_oSpriteLibrary.init(this._onImagesLoaded, this._onAllImagesLoaded, this); for (var m = 0; 5 > m; m++) s_oSpriteLibrary.addSprite("pipe" + m, "./sprites/pipe" + m + ".png"); for (m = 0; 5 > m; m++) s_oSpriteLibrary.addSprite("led_" + m, "./sprites/led_" + m + ".png"); s_oSpriteLibrary.addSprite("but_exit", "./sprites/but_exit.png"); s_oSpriteLibrary.addSprite("audio_icon", "./sprites/audio_icon.png"); s_oSpriteLibrary.addSprite("but_play", "./sprites/but_play.png"); s_oSpriteLibrary.addSprite("but_restart", "./sprites/but_restart.png"); s_oSpriteLibrary.addSprite("but_home", "./sprites/but_home.png"); s_oSpriteLibrary.addSprite("msg_box", "./sprites/msg_box.png"); s_oSpriteLibrary.addSprite("but_credits", "./sprites/but_credits.png"); s_oSpriteLibrary.addSprite("logo_ctl", "./sprites/logo_ctl.png"); s_oSpriteLibrary.addSprite("but_fullscreen", "./sprites/but_fullscreen.png"); s_oSpriteLibrary.addSprite("bg_end_panel", "./sprites/bg_end_panel.jpg"); s_oSpriteLibrary.addSprite("bg_menu", "./sprites/bg_menu.jpg"); s_oSpriteLibrary.addSprite("bg_game", "./sprites/bg_game.jpg"); s_oSpriteLibrary.addSprite("but_menu_bg", "./sprites/but_menu_bg.png"); s_oSpriteLibrary.addSprite("but_no", "./sprites/but_no.png"); s_oSpriteLibrary.addSprite("but_yes", "./sprites/but_yes.png"); s_oSpriteLibrary.addSprite("but_level", "./sprites/but_level.png"); s_oSpriteLibrary.addSprite("but_restart_small", "./sprites/but_restart_small.png"); s_oSpriteLibrary.addSprite("but_next", "./sprites/but_next.png"); s_oSpriteLibrary.addSprite("logo_menu", "./sprites/logo_menu.png"); s_oSpriteLibrary.addSprite("battery", "./sprites/battery.png"); s_oSpriteLibrary.addSprite("hand_anim", "./sprites/hand_anim.png"); s_oSpriteLibrary.addSprite("but_arrow_left", "./sprites/but_arrow_left.png"); s_oSpriteLibrary.addSprite("but_arrow_right", "./sprites/but_arrow_right.png"); s_oSpriteLibrary.addSprite("star", "./sprites/star.png"); g += s_oSpriteLibrary.getNumSprites(); s_oSpriteLibrary.loadSprites() }; this._onImagesLoaded = function() { b++; h.refreshLoader(Math.floor(b / g * 100)) }; this._onAllImagesLoaded = function() {}; this.onAllPreloaderImagesLoaded = function() { this._loadImages() }; this._onRemovePreloader = function() { try { saveItem("ls_available", "ok") } catch (m) { s_bStorageAvailable = !1 } h.unload(); s_oSoundtrack = playSound("soundtrack", 1, !0); this.gotoMenu() }; this.gotoMenu = function() { l = new CMenu; k = STATE_MENU }; this.gotoMenuMode = function() { new CMenuMode; k = STATE_MENU_MODE }; this.gotoLevelSelect = function(m) { new CLevelSelect(m); k = STATE_LEVEL_SELECT }; this.gotoGame = function(m, p) { d = new CGame(f, m, p); k = STATE_GAME; $(s_oMain).trigger("start_session") }; this.gotoHelp = function() { new CHelp; k = STATE_HELP }; this.stopUpdate = function() { c = !1; createjs.Ticker.paused = !0; $("#block_game").css("display", "block"); s_bAudioActive && Howler.mute(!0) }; this.startUpdate = function() { s_iPrevTime = (new Date).getTime(); c = !0; createjs.Ticker.paused = !1; $("#block_game").css("display", "none"); s_bAudioActive && Howler.mute(!1) }; this._update = function(m) { if (!1 !== c) { var p = (new Date).getTime(); s_iTimeElaps = p - s_iPrevTime; s_iCntTime += s_iTimeElaps; s_iCntFps++; s_iPrevTime = p; 1E3 <= s_iCntTime && (s_iCurFps = s_iCntFps, s_iCntTime -= 1E3, s_iCntFps = 0); k === STATE_MENU && l.update(); k === STATE_GAME && d.update(); s_oStage.update(m) } }; s_oMain = this; var f = a; NUM_COLS = a.num_cols; NUM_ROWS = a.num_rows; TIME = a.time; SCORE_MULTIPLIER = a.score_multiplier; ENABLE_FULLSCREEN = a.fullscreen; ENABLE_CHECK_ORIENTATION = a.check_orientation; s_bAudioActive = a.audio_enable_on_startup; this.initContainer() } var s_bMobile, s_bAudioActive = !1, s_bFullscreen = !1, s_iCntTime = 0, s_iTimeElaps = 0, s_iPrevTime = 0, s_iCntFps = 0, s_iCurFps = 0, s_szCurDraw, s_oDrawLayer, s_oStage, s_oMain, s_oSpriteLibrary, s_oSoundTrack = null, s_aSoundsInfo, s_aSounds, s_oCanvas, s_iTotalScore = 0, s_aBestScore = [0, 0, 0, 0], s_aLastLevel = [1, 1, 1, 1], s_aLevelStars = [], s_bStorageAvailable = !0; function CMenu() { var a, c, b, g, k, h, l, d, f, m, p, v, t, x, z = null, A = null; this._init = function() { l = new createjs.Container; s_oStage.addChild(l); d = createBitmap(s_oSpriteLibrary.getSprite("bg_menu")); l.addChild(d); this.initLeds(); var r = s_oSpriteLibrary.getSprite("logo_menu"); f = createBitmap(r); f.regX = r.width / 2; f.regY = r.height / 2; f.x = CANVAS_WIDTH_HALF; f.y = -150; createjs.Tween.get(f, { loop: !1 }).to({ y: CANVAS_HEIGHT_HALF - 150 }, 1E3, createjs.Ease.cubicOut); l.addChild(f); r = s_oSpriteLibrary.getSprite("but_play"); m = new CGfxButton(CANVAS_WIDTH_HALF, CANVAS_HEIGHT + 150, r, l); m.addEventListener(ON_MOUSE_UP, this._onButPlayRelease, this); createjs.Tween.get(m.getSprite(), { loop: !1 }).to({ y: CANVAS_HEIGHT_HALF + 250 }, 1E3, createjs.Ease.cubicOut); r = s_oSpriteLibrary.getSprite("but_credits"); b = 20 + r.width / 2; g = r.height / 2 + 10; t = new CGfxButton(b, g, r, l); t.addEventListener(ON_MOUSE_UP, this._onCredits, this); if (!1 === DISABLE_SOUND_MOBILE || !1 === s_bMobile) r = s_oSpriteLibrary.getSprite("audio_icon"), k = CANVAS_WIDTH - r.width / 4 - 20, h = r.height / 2 + 10, v = new CToggle(k, h, r, s_bAudioActive, l), v.addEventListener(ON_MOUSE_UP, this._onAudioToggle, this); r = window.document; var F = r.documentElement; z = F.requestFullscreen || F.mozRequestFullScreen || F.webkitRequestFullScreen || F.msRequestFullscreen; A = r.exitFullscreen || r.mozCancelFullScreen || r.webkitExitFullscreen || r.msExitFullscreen; !1 === ENABLE_FULLSCREEN && (z = !1); z && screenfull.isEnabled && (r = s_oSpriteLibrary.getSprite("but_fullscreen"), a = b + r.width / 2 + 10, c = g, x = new CToggle(a, c, r, s_bFullscreen, l), x.addEventListener(ON_MOUSE_UP, this._onFullscreenRelease, this)); p = new createjs.Shape; p.graphics.beginFill("black").drawRect(0, 0, CANVAS_WIDTH, CANVAS_HEIGHT); l.addChild(p); createjs.Tween.get(p).to({ alpha: 0 }, 1E3).call(function() { l.removeChild(p) }); if (s_bStorageAvailable) { r = getItem("lights_total_score"); s_iTotalScore = null !== r && void 0 !== r ? parseInt(r) : 0; r = getItemJson("lights_best_score"); s_aBestScore = null !== r && void 0 !== r ? r : [0, 0, 0, 0]; r = getItemJson("lights_last_level"); s_aLastLevel = null !== r && void 0 !== s_aLastLevel ? r : [1, 1, 1, 1]; if (void 0 === s_aLevelStars || null === s_aLevelStars) for (s_aLevelStars = [], r = 0; 4 > r; r++) for (F = 0; F < MATRIX_SETTINGS[r].length; F++) s_aLevelStars[r].push(0); r = getItemJson("lights_level_stars"); null !== r && void 0 !== s_aLevelStars && (s_aLevelStars = r) } else new CMsgBox(TEXT_ERR_LS, l); this.refreshButtonPos(s_iOffsetX, s_iOffsetY) }; this.initLeds = function() { var r = CANVAS_HEIGHT_HALF - 10, F = [CANVAS_WIDTH_HALF - 300, CANVAS_WIDTH_HALF, CANVAS_WIDTH_HALF + 300, CANVAS_WIDTH_HALF - 300, CANVAS_WIDTH_HALF, CANVAS_WIDTH_HALF + 300]; r = [r, r, r, r - 250, r - 250, r - 250]; for (var e = 0; 6 > e; e++) { var y = F[e], E = r[e]; var q = { images: [s_oSpriteLibrary.getSprite("led_" + Math.floor(4 * Math.random() + 1))], frames: { width: 141, height: 165 }, animations: { PIPE_END_ON: [1, 9, "LED_TURN_OFF"], LED_TURN_OFF: { frames: [9, 8, 7, 6, 5, 4, 3, 2, 1], next: "PIPE_END_ON" } }, framerate: Math.floor(30 * Math.random() + 15) }; q = new createjs.SpriteSheet(q); q = createSprite(q, "PIPE_END_ON", 0, 0, 141, 165); q.regX = 68.5; q.regY = 102.5; q.scaleX = q.scaleY = .7; q.x = y; q.y = E; l.addChild(q) } }; this.unload = function() { m.unload(); m = null; t.unload(); l.removeChild(d); if (!1 === DISABLE_SOUND_MOBILE || !1 === s_bMobile) v.unload(), v = null; z && screenfull.isEnabled && x.unload(); s_oMenu = null }; this.refreshButtonPos = function(r, F) { !1 !== DISABLE_SOUND_MOBILE && !1 !== s_bMobile || v.setPosition(k - r, h + F); z && screenfull.isEnabled && x.setPosition(a + r, c + F); t.setPosition(b + r, g + F) }; this.resetFullscreenBut = function() { z && screenfull.isEnabled && x.setActive(s_bFullscreen) }; this.exitFromCredits = function() {}; this._onAudioToggle = function() { Howler.mute(s_bAudioActive); s_bAudioActive = !s_bAudioActive }; this._onCredits = function() { new CCreditsPanel }; this._onButPlayRelease = function() { this.unload(); s_oMain.gotoMenuMode() }; this._onFullscreenRelease = function() { s_bFullscreen ? A.call(window.document) : z.call(window.document.documentElement); sizeHandler() }; this.update = function() {}; s_oMenu = this; this._init() } var s_oMenu = null; function CMenuMode() { var a, c, b, g, k, h, l = null, d = null, f, m, p, v, t, x, z, A, r, F; this._init = function() { f = new createjs.Container; s_oStage.addChild(f); m = createBitmap(s_oSpriteLibrary.getSprite("bg_menu")); f.addChild(m); new CTLText(f, CANVAS_WIDTH / 2 - 300, -200 + CANVAS_HEIGHT / 2 - 30, 600, 60, 48, "center", PRIMARY_FONT_COLOUR, PRIMARY_FONT, 1, 2, 2, TEXT_SELECT, !0, !0, !0, !1); var e = CANVAS_WIDTH_HALF, y = CANVAS_HEIGHT_HALF - 80, E = CANVAS_HEIGHT_HALF + 50, q = CANVAS_HEIGHT_HALF + 180, w = CANVAS_HEIGHT_HALF + 310, H = s_oSpriteLibrary.getSprite("but_menu_bg"); z = new CTextButton(e, y, H, TEXT_EASY, PRIMARY_FONT, PRIMARY_FONT_COLOUR, 36, f); z.addEventListenerWithParams(ON_MOUSE_UP, this._onButPlayRelease, this, MODE_EASY); A = new CTextButton(e, E, H, TEXT_MEDIUM, PRIMARY_FONT, PRIMARY_FONT_COLOUR, 36, f); A.addEventListenerWithParams(ON_MOUSE_UP, this._onButPlayRelease, this, MODE_MEDIUM); r = new CTextButton(e, q, H, TEXT_HARD, PRIMARY_FONT, PRIMARY_FONT_COLOUR, 36, f); r.addEventListenerWithParams(ON_MOUSE_UP, this._onButPlayRelease, this, MODE_HARD); F = new CTextButton(e, w, H, TEXT_EXTREME, PRIMARY_FONT, PRIMARY_FONT_COLOUR, 36, f); F.addEventListenerWithParams(ON_MOUSE_UP, this._onButPlayRelease, this, MODE_EXTREME); e = s_oSpriteLibrary.getSprite("but_exit"); k = CANVAS_WIDTH - e.width / 2 - 20; h = e.height / 2 + 10; t = new CGfxButton(k, h, e, f); t.addEventListener(ON_MOUSE_UP, this._onExit, this); _iHeightToggle = e.height; !1 === DISABLE_SOUND_MOBILE || !1 === s_bMobile ? (y = s_oSpriteLibrary.getSprite("audio_icon"), b = k - e.width / 2 - y.width / 4, g = h, v = new CToggle(b, g, y, s_bAudioActive, f), v.addEventListener(ON_MOUSE_UP, this._onAudioToggle, this), a = 20 + y.width / 4, c = y.height / 2 + 10) : (a = k - e.width - 10, c = h); e = window.document; y = e.documentElement; l = y.requestFullscreen || y.mozRequestFullScreen || y.webkitRequestFullScreen || y.msRequestFullscreen; d = e.exitFullscreen || e.mozCancelFullScreen || e.webkitExitFullscreen || e.msExitFullscreen; !1 === ENABLE_FULLSCREEN && (l = !1); l && screenfull.isEnabled && (y = s_oSpriteLibrary.getSprite("but_fullscreen"), x = new CToggle(a, c, y, s_bFullscreen, f), x.addEventListener(ON_MOUSE_UP, this._onFullscreenRelease, this)); p = new createjs.Shape; p.graphics.beginFill("black").drawRect(0, 0, CANVAS_WIDTH, CANVAS_HEIGHT); s_oStage.addChild(p); createjs.Tween.get(p).to({ alpha: 0 }, 1E3).call(function() { f.removeChild(p) }); this.refreshButtonPos(s_iOffsetX, s_iOffsetY) }; this.unload = function() { z.unload(); A.unload(); r.unload(); F.unload(); F = r = A = z = null; f.removeChild(m); m = null; t.unload(); t = null; s_oStage.removeChild(f); if (!1 === DISABLE_SOUND_MOBILE || !1 === s_bMobile) v.unload(), v = null; l && screenfull.isEnabled && x.unload(); s_oMenuMode = null }; this.refreshButtonPos = function(e, y) { !1 !== DISABLE_SOUND_MOBILE && !1 !== s_bMobile || v.setPosition(b - e, g + y); l && screenfull.isEnabled && x.setPosition(a - e, c + y); t.setPosition(k - e, h + y) }; this._onAudioToggle = function() { Howler.mute(s_bAudioActive); s_bAudioActive = !s_bAudioActive }; this._onButPlayRelease = function(e) { this.unload(); s_oMain.gotoLevelSelect(e) }; this._onExit = function() { this.unload(); s_oMain.gotoMenu() }; this._onFullscreenRelease = function() { s_bFullscreen ? d.call(window.document) : l.call(window.document.documentElement); sizeHandler() }; this.resetFullscreenBut = function() { l && screenfull.isEnabled && x.setActive(s_bFullscreen) }; s_oMenuMode = this; this._init() } var s_oMenuMode = null; function CLevelBut(a, c, b, g, k, h) { var l, d, f, m = [], p = [], v, t, x, z; this._init = function(r, F, e, y, E) { d = []; f = []; z = new createjs.Container; A.addChild(z); var q = new createjs.SpriteSheet({ images: [y], frames: { width: y.width / 2, height: y.height, regX: y.width / 2 / 2, regY: y.height / 2 }, animations: { state_true: [0], state_false: [1] } }); l = E; x = createSprite(q, "state_" + l, y.width / 2 / 2, y.height / 2, y.width / 2, y.height); x.mouseEnabled = E; x.x = r; x.y = F; x.stop(); z.addChild(x); m.push(x); v = new createjs.Text(e, "bold 50px " + PRIMARY_FONT, SECONDARY_FONT_COLOUR); v.x = r; v.y = F + 12; v.textAlign = "center"; v.textBaseline = "alphabetic"; v.lineWidth = 200; v.outline = 6; z.addChild(v); t = new createjs.Text(e, "bold 50px " + PRIMARY_FONT, PRIMARY_FONT_COLOUR); t.x = v.x; t.y = v.y; t.textAlign = "center"; t.textBaseline = "alphabetic"; t.lineWidth = 200; z.addChild(t); E ? s_bMobile || (z.cursor = "pointer") : (t.color = "#b4b4b4", v.color = "#606161"); this._initListener() }; this.unload = function() { z.off("mousedown", this.buttonDown); z.off("pressup", this.buttonRelease); z.removeAllEventListeners(); z.cursor = "arrow"; z.removeChild(x); z = null }; this._initListener = function() { z.on("mousedown", this.buttonDown); z.on("pressup", this.buttonRelease) }; this.viewBut = function(r) { z.addChild(r) }; this.addEventListener = function(r, F, e) { d[r] = F; f[r] = e }; this.addEventListenerWithParams = function(r, F, e, y) { d[r] = F; f[r] = e; p = y }; this.ifClickable = function() { if (null !== z) return !0 === z.mouseEnabled ? 1 : 0 }; this.setActive = function(r, F) { l = F; m[r].gotoAndStop("state_" + l); m[r].mouseEnabled = !0; l ? (t.color = "#69b8d5", v.color = "#004e6f") : (t.color = "#b4b4b4", v.color = "#606161") }; this.buttonRelease = function() { l && (playSound("click", 1, !1), d[ON_MOUSE_UP] && d[ON_MOUSE_UP].call(f[ON_MOUSE_UP], p)) }; this.buttonDown = function() { d[ON_MOUSE_DOWN] && d[ON_MOUSE_DOWN].call(f[ON_MOUSE_DOWN], p) }; this.setPosition = function(r, F) { z.x = r; z.y = F }; this.setVisible = function(r) { z.visible = r }; var A = h; this._init(a, c, b, g, k, h) } function CLevelSelect(a) { var c, b, g, k, h, l, d, f, m, p, v, t, x, z, A, r, F, e = null, y = null, E, q, w, H, u = null, M = null; this._init = function() { d = a; f = 0; x = []; NUM_LEVELS = MATRIX_SETTINGS[d].length; w = new createjs.Container; s_oStage.addChild(w); z = createBitmap(s_oSpriteLibrary.getSprite("bg_menu")); w.addChild(z); var D = 600; new CTLText(w, CANVAS_WIDTH / 2 - D / 2, -300 + CANVAS_HEIGHT / 2 - 30, D, 60, 48, "center", PRIMARY_FONT_COLOUR, PRIMARY_FONT, 1, 2, 2, TEXT_SELECT_LEVEL, !0, !0, !0, !1); E = new createjs.Text(TEXT_TOTAL_SCORE + s_iTotalScore, " 30px " + PRIMARY_FONT, SECONDARY_FONT_COLOUR); E.textAlign = "center"; E.lineWidth = 800; E.textBaseline = "middle"; E.x = CANVAS_WIDTH_HALF + 2; E.y = CANVAS_HEIGHT_HALF + 358; w.addChild(E); q = new createjs.Text(TEXT_TOTAL_SCORE + s_iTotalScore, " 30px " + PRIMARY_FONT, PRIMARY_FONT_COLOUR); q.textAlign = "center"; q.lineWidth = 800; q.textBaseline = "middle"; q.x = CANVAS_WIDTH_HALF; q.y = CANVAS_HEIGHT_HALF + 360; w.addChild(q); D = s_oSpriteLibrary.getSprite("but_exit"); h = CANVAS_WIDTH - D.width / 2 - 20; l = D.height / 2 + 10; r = new CGfxButton(h, l, D, w); r.addEventListener(ON_MOUSE_UP, this._onExit, this); m = D.height; if (!1 === DISABLE_SOUND_MOBILE || !1 === s_bMobile) { var G = s_oSpriteLibrary.getSprite("audio_icon"); g = h - D.width / 2 - G.width / 4; k = l; F = new CToggle(g, k, G, s_bAudioActive, w); F.addEventListener(ON_MOUSE_UP, this._onAudioToggle, this); c = 20 + G.width / 4; b = G.height / 2 + 10 } else c = h - D.width - 10, b = l; D = window.document; G = D.documentElement; u = G.requestFullscreen || G.mozRequestFullScreen || G.webkitRequestFullScreen || G.msRequestFullscreen; M = D.exitFullscreen || D.mozCancelFullScreen || D.webkitExitFullscreen || D.msExitFullscreen; !1 === ENABLE_FULLSCREEN && (u = !1); u && screenfull.isEnabled && (G = s_oSpriteLibrary.getSprite("but_fullscreen"), H = new CToggle(c, b, G, s_bFullscreen, w), H.addEventListener(ON_MOUSE_UP, this._onFullscreenRelease, this)); A = new createjs.Shape; A.graphics.beginFill("black").drawRect(0, 0, CANVAS_WIDTH, CANVAS_HEIGHT); s_oStage.addChild(A); createjs.Tween.get(A).to({ alpha: 0 }, 1E3).call(function() { w.removeChild(A) }); this.refreshButtonPos(s_iOffsetX, s_iOffsetY); this._checkBoundLimits(); v = []; D = CANVAS_WIDTH - 2 * EDGEBOARD_X; D = Math.floor(D / NUM_COLS_PAGE_LEVEL) / 2; for (var L = G = 0; L < NUM_COLS_PAGE_LEVEL; L++) v.push(G), G += 2 * D; t = []; this._createNewLevelPage(0, NUM_LEVELS); if (1 < t.length) { for (D = 1; D < t.length; D++) t[D].visible = !1; D = 280; e = new CGfxButton(CANVAS_WIDTH_HALF + D, CANVAS_HEIGHT_HALF + 350, s_oSpriteLibrary.getSprite("but_arrow_right"), w); e.addEventListener(ON_MOUSE_UP, this._onRight, this); y = new CGfxButton(CANVAS_WIDTH_HALF - D, CANVAS_HEIGHT_HALF + 350, s_oSpriteLibrary.getSprite("but_arrow_left"), w); y.addEventListener(ON_MOUSE_UP, this._onLeft, this) } this.refreshButtonPos(s_iOffsetX, s_iOffsetY) }; this._onExit = function() { this.unload(); s_oMain.gotoMenuMode() }; this._checkBoundLimits = function() { for (var D = s_oSpriteLibrary.getSprite("but_level"), G = 0, L = CANVAS_HEIGHT - 2 * EDGEBOARD_Y - 2 * m, O = 0; G < L;) G += D.height + 20, O++; NUM_ROWS_PAGE_LEVEL > O && (NUM_ROWS_PAGE_LEVEL = O); L = G = 0; O = CANVAS_WIDTH - 2 * EDGEBOARD_X; for (D = s_oSpriteLibrary.getSprite("but_level"); L < O;) L += D.width / 2 + 5, G++; NUM_COLS_PAGE_LEVEL > G && (NUM_COLS_PAGE_LEVEL = G) }; this._createNewLevelPage = function(D, G) { var L = new createjs.Container; w.addChild(L); t.push(L); p = []; for (var O = 0, X = 0, Q = 1, V = !1, S = s_oSpriteLibrary.getSprite("but_level"), aa = s_aLastLevel[d], n = D; n < G; n++) { var Y = v[O] + S.width / 4, Z = X + S.height / 2, U = new CLevelBut(Y, Z, n + 1, S, n + 1 > aa ? !1 : !0, L); U.addEventListenerWithParams(ON_MOUSE_UP, this._onButLevelRelease, this, n); p.push(U); this.addStars(n, Y, Z, L); O++; if (O === v.length && (O = 0, X += S.height + 20, Q++, Q > NUM_ROWS_PAGE_LEVEL)) { V = !0; break } } O = L.getBounds(); L.x = CANVAS_WIDTH_HALF; L.y = CANVAS_HEIGHT_HALF; L.regX = O.width / 2; L.regY = O.height / 2; V && this._createNewLevelPage(n + 1, G) }; this.addStars = function(D, G, L, O) { for (var X = 0; 3 > X; X++) { var Q = { images: [s_oSpriteLibrary.getSprite("star")], frames: { width: 70, height: 70, regX: 35, regY: 35 }, animations: { off: [0], on: [1] } }; Q = new createjs.SpriteSheet(Q); Q = createSprite(Q, "off", 35, 35, 70, 70); Q.scaleX = Q.scaleY = .5; x.push(Q); Q.x = G + [-40, 0, 40][X]; Q.y = L - 55; var V = s_aLevelStars[d]; void 0 !== V && null !== V && V[D] > X && Q.gotoAndPlay("on"); O.addChild(Q) } }; this._onRight = function() { t[f].visible = !1; f++; f >= t.length && (f = 0); t[f].visible = !0 }; this._onLeft = function() { t[f].visible = !1; f--; 0 > f && (f = t.length - 1); t[f].visible = !0 }; this.unload = function() { for (var D = 0; D < p.length; D++) p[D].unload(); for (D = 0; D < x.length; D++) w.removeChild(x[D]); null !== y && (y.unload(), y = null); null !== e && (e.unload(), e = null); w.removeChild(z); z = null; r.unload(); r = null; if (!1 === DISABLE_SOUND_MOBILE || !1 === s_bMobile) F.unload(), F = null; u && screenfull.isEnabled && (H.unload(), H = null); s_oLevelSelect = null }; this.refreshButtonPos = function(D, G) { !1 !== DISABLE_SOUND_MOBILE && !1 !== s_bMobile || F.setPosition(g - D, k + G); u && screenfull.isEnabled && H.setPosition(c - D, b + G); r.setPosition(h - D, l + G) }; this._onAudioToggle = function() { Howler.mute(s_bAudioActive); s_bAudioActive = !s_bAudioActive }; this._onButLevelRelease = function(D) { playSound("click", 1, !1); p[D].ifClickable() && (this.unload(), s_oMain.gotoGame(d, D)) }; this._onFullscreenRelease = function() { s_bFullscreen ? M.call(window.document) : u.call(window.document.documentElement); sizeHandler() }; this.resetFullscreenBut = function() { u && screenfull.isEnabled && H.setActive(s_bFullscreen) }; s_oLevelSelect = this; this._init() } var s_oLevelSelect = null; function CGame(a, c, b) { var g, k, h, l, d, f, m, p, v, t, x, z, A, r, F, e, y, E, q, w, H; this._init = function() { A = new createjs.Container; s_oStage.addChild(A); $(s_oMain).trigger("start_level", p + 1); f = c; p = b; this.resetVariables(); var u = createBitmap(s_oSpriteLibrary.getSprite("bg_game")); u.cache; y = new createjs.Container; A.addChild(u, y); w = new createjs.Container; E = new createjs.Container; q = new createjs.Container; y.addChild(w, E, q); this.initMatrix(); r = new CInterface(f, p); r.initInterfacesText(); 0 === p ? CHelpPanel() : this._onExitHelp() }; this.resetVariables = function() { F = null; g = !1; h = !0; l = k = !1; d = 0; m = TIME[f]; x = t = v = 0; z = s_iTotalScore; H = []; setVolume("soundtrack", SOUNDTRACK_VOLUME_IN_GAME) }; this.initMatrix = function() { e = new CMatrix(f, p, E, q, w); H = e.getSquares(); for (var u = 0; u < H.length; u++) H[u].checkSquareType(), H[u].setRotatingSquare(); s_oGame.startCheck(); this.arrangeMatrix(); u = E.getBounds(); E.cache(E.x - u.width / 2, E.y - u.height / 2, 1.5 * u.width, 1.5 * u.height) }; this.arrangeMatrix = function() { var u = MATRIX_SCALE[f], M = SQUARE_SIZE / 2 * u; y.scaleX = y.scaleY = u; u = y.getBounds(); y.regX = u.width / 2; y.regY = u.height / 2; y.x = CANVAS_WIDTH_HALF + M; y.y = CANVAS_HEIGHT_HALF + M }; this.updateCache = function() { E.updateCache() }; this.onRotationFinished = function(u, M) { s_oMatrix.findSquare(u, M).onRotationFinished() }; this.setMoving = function(u) { l = u }; this.isMoving = function() { return l }; this.unload = function() { r.unload(); createjs.Tween.removeAllTweens(); s_oStage.removeAllChildren(); s_oGame = null }; this.updateScores = function() { d = Math.ceil((TIME[f] - x) / 100) * SCORE_MULTIPLIER[f]; 0 > d && (d = 0); s_iTotalScore = z += d; saveItem("lights_total_score", s_iTotalScore); d > s_aBestScore[f] && (s_aBestScore[f] = d, setItemJson("lights_best_score", s_aBestScore)); this.updateLastLevel(); this.updateLevelStars() }; this.updateLastLevel = function() { p + 2 > s_aLastLevel[f] && (s_aLastLevel[f] = p + 2, setItemJson("lights_last_level", s_aLastLevel)) }; this.updateLevelStars = function() { var u = s_aLevelStars[f]; if (void 0 === u || null === u) { u = []; for (var M = 0; M < MATRIX_SETTINGS[f].length; M++) u.push(0) } m <= TIME[f] / 3 ? t = 1 : m <= TIME[f] / 3 * 2 && m > TIME[f] / 3 ? t = 2 : m > TIME[f] / 3 * 2 && (t = 3); t > u[p] && (u[p] = t, s_aLevelStars[f] = u, setItemJson("lights_level_stars", s_aLevelStars)) }; this._checkWin = function() { playSound("game_win", .5, !1); stopSound("soundtrack"); stopSound("timer"); setTimeout(function() { playSound("soundtrack", .5, !1) }, 5E3); k && null === F && (this.updateScores(), F = new CWinPanel(f, x, p, t), $(s_oMain).trigger("share_event", d), $(s_oMain).trigger("save_score", s_iTotalScore)) }; this.onExit = function() { setVolume("soundtrack", 1); s_oGame.unload(); s_oMain.gotoMenu(); $(s_oMain).trigger("end_session"); $(s_oMain).trigger("show_interlevel_ad") }; this.restart = function() { setVolume("soundtrack", SOUNDTRACK_VOLUME_IN_GAME); $(s_oMain).trigger("restart_level", p + 1); E.uncache(); this.resetVariables(); r.refreshPointsText(TIME[f] / 10); r.refreshLevelText(p + 1); e.unload(); this.initMatrix(); s_oStage.update(); this._onExitHelp() }; this._onExitHelp = function() { g = !0 }; this.gameOver = function() { g = !1; t = d = 0; null === F && (playSound("game_over", .5, !1), stopSound("soundtrack"), setTimeout(function() { playSound("soundtrack", .5, !1) }, 5E3), F = new CEndPanel(f), $(s_oMain).trigger("share_event", s_iTotalScore), $(s_oMain).trigger("save_score", s_iTotalScore)) }; this.updateTimer = function() { 0 < m && g && !this._bDisableEvents && (m -= s_iTimeElaps, r.refreshTimer(Math.ceil(m / 1E3)), x = Math.ceil((TIME[f] - m) / 10), r.refreshPointsText(Math.ceil((TIME[f] - x) / 100))) }; this.startCheck = function() { for (var u, M, D = 0; D < H.length; D++) { var G = H[D]; !0 === G.isStartSquare() ? (u = G.getRow(), M = G.getColumn()) : G.turnOnSquare(!1) } v = 0; this.checkMatrix(u, M); this.checkLeds() }; this.checkMatrix = function(u, M, D) { var G = s_oMatrix.findSquare(M, u); if (!0 !== G.isChecked() || !0 !== G.isTurnedOn()) { G.setChecked(!0); var L = G.getOpenings(); if (void 0 !== D) { if (!1 === L[D]) return; G.turnOnSquare(!0) } this.checkConnections(L, u, M); v++; this.checkForWin() } }; this.checkLeds = function() { for (var u = 0; u < H.length; u++) { var M = H[u], D = M.isTurnedOn(); M.turnOnLed(D) } }; this.checkConnections = function(u, M, D) { !0 === u[DIRECTION_TOP] && 0 <= M - 1 && this.checkMatrix(M - 1, D, DIRECTION_BOTTOM); !0 === u[DIRECTION_RIGHT] && D + 1 < NUM_COLS[f] && this.checkMatrix(M, D + 1, DIRECTION_LEFT); !0 === u[DIRECTION_BOTTOM] && M + 1 < NUM_ROWS[f] && this.checkMatrix(M + 1, D, DIRECTION_TOP); !0 === u[DIRECTION_LEFT] && 0 <= D - 1 && this.checkMatrix(M, D - 1, DIRECTION_RIGHT) }; this.checkForWin = function() { v === H.length && (g = !1, k = !0, this._checkWin()) }; this.isStartGame = function() { return g }; this.update = function() { 0 < m ? (this.updateTimer(), g && m < TIMER_REMINDER && !0 === h && (playSound("timer", 1, !0), h = !1)) : (d = m = 0, stopSound("timer"), this.gameOver()) }; s_oGame = this; this._init() } var s_oGame; function CSquare(a, c, b, g, k, h, l) { var d, f, m, p, v, t, x, z, A, r, F, e, y, E; this._init = function() { d = k; f = h; m = l; z = a; A = c; r = b; F = g; y = e = !1; this.initSquare(); p.on("pressup", this.onClickedSquare); s_bMobile || (p.cursor = "pointer") }; this.initSquare = function() { var q = { images: [s_oSpriteLibrary.getSprite("pipe0"), s_oSpriteLibrary.getSprite("pipe1"), s_oSpriteLibrary.getSprite("pipe2"), s_oSpriteLibrary.getSprite("pipe3"), s_oSpriteLibrary.getSprite("pipe4")], frames: { width: SQUARE_SIZE, height: SQUARE_SIZE }, animations: { PIPE_0_OFF: [0, 0, !1 ], PIPE_0_ON: [1, 1, !1], PIPE_1_OFF: [2, 2, !1], PIPE_1_ON: [3, 3, !1], PIPE_2_OFF: [4, 4, !1], PIPE_2_ON: [5, 5, !1], PIPE_3_OFF: [6, 6, !1], PIPE_3_ON: [7, 7, !1], PIPE_4_OFF: [8, 8, !1], PIPE_4_ON: [9, 9, !1] }, framerate: 30 }, w = "PIPE_0_OFF PIPE_1_OFF PIPE_2_OFF PIPE_3_OFF PIPE_4_OFF PIPE_4_ON".split(" "); q = new createjs.SpriteSheet(q); p = createSprite(q, w[r], 0, 0, SQUARE_SIZE, SQUARE_SIZE); p.regX = p.regY = SQUARE_SIZE / 2; p.x = SQUARE_SIZE * z; p.y = SQUARE_SIZE * A; p.rotation = F; p.gotoAndPlay(w[r]); d.addChild(p); x = new CRotatingSquare(a, c, w[r], g, m) }; this.setRotatingSquare = function() { x.setRotation(p.rotation) }; this.setEndSquareAnimations = function() { var q = { images: [s_oSpriteLibrary.getSprite("led_" + Math.floor(4 * Math.random() + 1))], frames: { width: 141, height: 165 }, animations: { PIPE_END_OFF: [0, 0, !1], LED_TURN_ON: [1, 9, !1], LED_TURN_OFF: { frames: [9, 8, 7, 6, 5, 4, 3, 2, 1, 0], next: !1 } }, framerate: 30 }; q = new createjs.SpriteSheet(q); t = createSprite(q, "PIPE_END_OFF", 0, 0, 141, 165); t.regX = 68.5; t.regY = 102.5; t.x = p.x; t.y = p.y; f.addChild(t) }; this.setStartSquareAnimations = function() { var q = { images: [s_oSpriteLibrary.getSprite("battery")], frames: { width: SQUARE_SIZE, height: SQUARE_SIZE }, animations: { idle: [0, 49, "idle"] }, framerate: 30 }; q = new createjs.SpriteSheet(q); v = createSprite(q, "idle", 0, 0, SQUARE_SIZE, SQUARE_SIZE); v.regX = v.regY = SQUARE_SIZE / 2; v.x = p.x; v.y = p.y; f.addChild(v); e = !0 }; this.checkSquareType = function() { switch (r) { case SQUARE_END: this.setEndSquareAnimations(); break; case SQUARE_START: this.setStartSquareAnimations() } }; this.onClickedSquare = function() { if (!1 !== s_oGame.isStartGame() && !0 !== s_oGame.isMoving()) { s_oGame.setMoving(!0); s_oMatrix.resetCheck(); p.visible = !1; s_oGame.updateCache(); var q = p.rotation + 90; x.initRotation(q); p.rotation = q; 360 <= p.rotation && (p.rotation = 0); playSound("rotation", .8, !1) } }; this.onRotationFinished = function() { p.visible = !0; x.stopRotation(); s_oGame.setMoving(!1) }; this.getOpenings = function() { var q = [], w = p.rotation / 90; switch (r) { case SQUARE_T: q = [ [!1, !0, !0, !0], [!0, !1, !0, !0], [!0, !0, !1, !0], [!0, !0, !0, !1] ]; q = q[w]; break; case SQUARE_I: q = [ [!1, !0, !1, !0], [!0, !1, !0, !1], [!1, !0, !1, !0 ], [!0, !1, !0, !1] ]; q = q[w]; break; case SQUARE_L: q = [ [!1, !0, !0, !1], [!1, !1, !0, !0], [!0, !1, !1, !0], [!0, !0, !1, !1] ]; q = q[w]; break; case SQUARE_CROSS: q = [!0, !0, !0, !0]; break; case SQUARE_END: case SQUARE_START: q = [ [!1, !1, !0, !1], [!1, !1, !1, !0], [!0, !1, !1, !1], [!1, !0, !1, !1] ], q = q[w] } return q }; this.isStartSquare = function() { return r === SQUARE_START ? !0 : !1 }; this.getColumn = function() { return z }; this.getRow = function() { return A }; this.randomizeSquare = function() { for (; p.rotation === F;) p.rotation = 90 * Math.floor(3 * Math.random()); e = r === SQUARE_START ? !0 : p.rotation === F ? !0 : !1 }; this.getType = function() { return r }; this.getRotation = function() { return p.rotation }; this.turnOnLed = function(q) { r === SQUARE_END && (!0 === q && !1 === y && (y = !0, !0 === s_oGame.isStartGame() && !1 === soundPlaying("light_on") && playSound("light_on", .8, !1), t.gotoAndPlay("LED_TURN_ON")), !1 === q && !0 === y && (y = !1, !0 === s_oGame.isStartGame() && !1 === soundPlaying("light_off") && playSound("light_off", 1, !1), t.gotoAndPlay("LED_TURN_OFF"))) }; this.turnOnSquare = function(q) { r !== SQUARE_START && (p.gotoAndPlay("PIPE_" + r + (!0 === q ? "_ON" : "_OFF")), e = q) }; this.isTurnedOn = function() { return e }; this.isChecked = function() { return E }; this.setChecked = function(q) { E = q }; this.unload = function() { createjs.Tween.removeAllTweens(); d.removeChild(p); f.removeChild(t, v); t = v = null; x.unload() }; this._init() } function CRotatingSquare(a, c, b, g, k) { var h, l, d, f, m, p; this._init = function() { l = k; d = a; f = c; p = b; m = g; var v = { images: [s_oSpriteLibrary.getSprite("pipe0"), s_oSpriteLibrary.getSprite("pipe1"), s_oSpriteLibrary.getSprite("pipe2"), s_oSpriteLibrary.getSprite("pipe3"), s_oSpriteLibrary.getSprite("pipe4")], frames: { width: SQUARE_SIZE, height: SQUARE_SIZE }, animations: { PIPE_0_OFF: [0, 0, !1], PIPE_0_ON: [1, 1, !1], PIPE_1_OFF: [2, 2, !1], PIPE_1_ON: [3, 3, !1], PIPE_2_OFF: [4, 4, !1], PIPE_2_ON: [5, 5, !1], PIPE_3_OFF: [6, 6, !1], PIPE_3_ON: [7, 7, !1], PIPE_4_OFF: [8, 8, !1], PIPE_4_ON: [9, 9, !1] }, framerate: 30 }; v = new createjs.SpriteSheet(v); h = createSprite(v, p, 0, 0, SQUARE_SIZE, SQUARE_SIZE); h.regX = h.regY = SQUARE_SIZE / 2; h.x = SQUARE_SIZE * d; h.y = SQUARE_SIZE * f; h.rotation = m; h.alpha = .01; h.gotoAndPlay(p); l.addChild(h); createjs.Tween.get(h) }; this.setRotation = function(v) { h.rotation = v }; this.initRotation = function(v) { h.alpha = 1; createjs.Tween.get(h).to({ rotation: v }, 200, createjs.Ease.cubicOut).call(function() { s_oGame.onRotationFinished(d, f) }) }; this.stopRotation = function() { h.alpha = .01; 360 <= h.rotation && (h.rotation = 0); s_oGame.startCheck(); s_oGame.updateCache() }; this.unload = function() { createjs.Tween.removeAllTweens(); l.removeChild(h) }; this._init() } function CMatrix(a, c, b, g, k) { var h, l, d, f, m, p; this._init = function() { h = a; l = c; f = b; m = g; p = k; d = []; for (var v = MATRIX_SETTINGS[h][l], t = 0, x = 0; x < NUM_ROWS[h]; x++) for (var z = 0; z < NUM_COLS[h]; z++) { var A = v[t]; A = new CSquare(z, x, A.type, A.rotation, f, m, p); d.push(A); t++; A.randomizeSquare() } }; this.getSquares = function() { return d }; this.findSquare = function(v, t) { for (var x = 0; x < d.length; x++) if (d[x].getColumn() === v && d[x].getRow() === t) return d[x] }; this.resetCheck = function() { for (var v = 0; v < d.length; v++) d[v].setChecked(!1) }; this.unload = function() { createjs.Tween.removeAllTweens(); for (var v = 0; v < d.length; v++) d[v].unload(); s_oMatrix = null }; s_oMatrix = this; this._init() } var s_oMatrix; function CTextButton(a, c, b, g, k, h, l, d) { var f, m, p, v, t, x, z, A, r, F; this._init = function(e, y, E, q, w, H, u) { f = !1; m = 1; p = []; v = []; F = createBitmap(E); A = new createjs.Container; A.x = e; A.y = y; A.regX = E.width / 2; A.regY = E.height / 2; s_bMobile || (A.cursor = "pointer"); A.addChild(F, r); d.addChild(A); r = new CTLText(A, 40, 0, E.width - 80, E.height - 10, u, "center", H, w, 1, 2, 2, q, !0, !0, !1, !1); this._initListener() }; this.unload = function() { A.off("mousedown", t); A.off("pressup", x); d.removeChild(A) }; this.setVisible = function(e) { A.visible = e }; this.setAlign = function(e) { r.textAlign = e }; this.setTextX = function(e) { r.x = e }; this.setScale = function(e) { m = A.scaleX = A.scaleY = e }; this.enable = function() { f = !1 }; this.disable = function() { f = !0 }; this._initListener = function() { t = A.on("mousedown", this.buttonDown); x = A.on("pressup", this.buttonRelease) }; this.addEventListener = function(e, y, E) { p[e] = y; v[e] = E }; this.addEventListenerWithParams = function(e, y, E, q) { p[e] = y; v[e] = E; z = q }; this.buttonRelease = function() { f || (playSound("click", 1, !1), A.scaleX = m, A.scaleY = m, p[ON_MOUSE_UP] && p[ON_MOUSE_UP].call(v[ON_MOUSE_UP], z)) }; this.buttonDown = function() { f || (A.scaleX = .9 * m, A.scaleY = .9 * m, p[ON_MOUSE_DOWN] && p[ON_MOUSE_DOWN].call(v[ON_MOUSE_DOWN])) }; this.setPosition = function(e, y) { A.x = e; A.y = y }; this.tweenPosition = function(e, y, E, q, w, H, u) { createjs.Tween.get(A).wait(q).to({ x: e, y: y }, E, w).call(function() { void 0 !== H && H.call(u) }) }; this.changeText = function(e) { r.refreshText(e) }; this.setX = function(e) { A.x = e }; this.setY = function(e) { A.y = e }; this.getButtonImage = function() { return A }; this.getX = function() { return A.x }; this.getY = function() { return A.y }; this.getSprite = function() { return A }; this.getScale = function() { return A.scaleX }; this._init(a, c, b, g, k, h, l) } function CToggle(a, c, b, g, k) { var h, l, d, f, m; this._init = function(p, v, t, x, z) { m = void 0 !== z ? z : s_oStage; l = []; d = []; z = new createjs.SpriteSheet({ images: [t], frames: { width: t.width / 2, height: t.height, regX: t.width / 2 / 2, regY: t.height / 2 }, animations: { state_true: [0], state_false: [1] } }); h = x; f = createSprite(z, "state_" + h, t.width / 2 / 2, t.height / 2, t.width / 2, t.height); f.x = p; f.y = v; f.stop(); s_bMobile || (f.cursor = "pointer"); m.addChild(f); this._initListener() }; this.unload = function() { f.off("mousedown", this.buttonDown); f.off("pressup", this.buttonRelease); m.removeChild(f) }; this._initListener = function() { f.on("mousedown", this.buttonDown); f.on("pressup", this.buttonRelease) }; this.addEventListener = function(p, v, t) { l[p] = v; d[p] = t }; this.setCursorType = function(p) { f.cursor = p }; this.setActive = function(p) { h = p; f.gotoAndStop("state_" + h) }; this.buttonRelease = function() { f.scaleX = 1; f.scaleY = 1; playSound("click", 1, !1); h = !h; f.gotoAndStop("state_" + h); l[ON_MOUSE_UP] && l[ON_MOUSE_UP].call(d[ON_MOUSE_UP], h) }; this.buttonDown = function() { f.scaleX = .9; f.scaleY = .9; l[ON_MOUSE_DOWN] && l[ON_MOUSE_DOWN].call(d[ON_MOUSE_DOWN]) }; this.setPosition = function(p, v) { f.x = p; f.y = v }; this._init(a, c, b, g, k) } function CGfxButton(a, c, b, g) { var k, h, l, d, f, m, p, v; this._init = function(x, z, A) { k = !1; h = []; l = []; f = []; d = createBitmap(A); d.x = x; d.y = z; m = 1; d.regX = A.width / 2; d.regY = A.height / 2; s_bMobile || (d.cursor = "pointer"); t.addChild(d); this._initListener() }; this.getSprite = function() { return d }; this.unload = function() { d.off("mousedown", p); d.off("pressup", v); t.removeChild(d) }; this.setVisible = function(x) { d.visible = x }; this.setCursorType = function(x) { d.cursor = x }; this._initListener = function() { p = d.on("mousedown", this.buttonDown); v = d.on("pressup", this.buttonRelease) }; this.addEventListener = function(x, z, A) { h[x] = z; l[x] = A }; this.addEventListenerWithParams = function(x, z, A, r) { h[x] = z; l[x] = A; f[x] = r }; this.enable = function() { k = !1 }; this.disable = function() { k = !0 }; this.buttonRelease = function() { k || (d.scaleX = 0 < m ? 1 : -1, d.scaleY = 1, playSound("click", 1, !1), h[ON_MOUSE_UP] && h[ON_MOUSE_UP].call(l[ON_MOUSE_UP], f[ON_MOUSE_UP])) }; this.buttonDown = function() { k || (d.scaleX = 0 < m ? .9 : -.9, d.scaleY = .9, h[ON_MOUSE_DOWN] && h[ON_MOUSE_DOWN].call(l[ON_MOUSE_DOWN], f[ON_MOUSE_DOWN])) }; this.rotation = function(x) { d.rotation = x }; this.getButton = function() { return d }; this.setPosition = function(x, z) { d.x = x; d.y = z }; this.setX = function(x) { d.x = x }; this.setY = function(x) { d.y = x }; this.getButtonImage = function() { return d }; this.setScaleX = function(x) { m = d.scaleX = x }; this.getX = function() { return d.x }; this.getY = function() { return d.y }; this.removeAllTweens = function() { createjs.Tween.removeTweens(d) }; var t = void 0 !== g ? g : s_oStage; this._init(a, c, b); return this } function CInterface(a, c) { var b, g, k, h, l, d, f, m, p, v, t, x, z = null, A = null, r, F, e, y, E; this._init = function() { p = new createjs.Container; s_oStage.addChild(p); var q = s_oSpriteLibrary.getSprite("but_exit"); k = CANVAS_WIDTH - q.width / 2 - 20; h = q.height / 2 + 10; r = new CGfxButton(k, h, q, p); r.addEventListener(ON_MOUSE_UP, this._onExit, this); if (!1 === DISABLE_SOUND_MOBILE || !1 === s_bMobile) { var w = s_oSpriteLibrary.getSprite("audio_icon"); f = k - q.width / 2 - w.width / 4; m = h; v = new CToggle(f, m, w, s_bAudioActive, p); v.addEventListener(ON_MOUSE_UP, this._onAudioToggle, this); b = 20 + w.width / 4; g = w.height / 2 + 10; l = f - w.width / 2; d = m } else b = k - q.width - 10, g = h, l = b, d = g; q = window.document; w = q.documentElement; z = w.requestFullscreen || w.mozRequestFullScreen || w.webkitRequestFullScreen || w.msRequestFullscreen; A = q.exitFullscreen || q.mozCancelFullScreen || q.webkitExitFullscreen || q.msExitFullscreen; !1 === ENABLE_FULLSCREEN && (z = !1); z && screenfull.isEnabled && (w = s_oSpriteLibrary.getSprite("but_fullscreen"), x = new CToggle(b, g, w, s_bFullscreen, p), x.addEventListener(ON_MOUSE_UP, this._onFullscreenRelease, this)); F = new CGfxButton(l, d, s_oSpriteLibrary.getSprite("but_restart_small"), p); F.addEventListener(ON_MOUSE_UP, this._onRestart, this); this.refreshButtonPos(s_iOffsetX, s_iOffsetY) }; this.initInterfacesText = function() { t = CANVAS_HEIGHT - 250; e = new createjs.Text(TEXT_TIME + " " + TIME[a] / 1E3, "30px " + PRIMARY_FONT, PRIMARY_FONT_COLOUR); e.textAlign = "left"; e.textBaseline = "alphabetic"; e.x = 40; e.y = t; p.addChild(e); E = new createjs.Text(TEXT_LEVEL + " " + (c + 1), "30px " + PRIMARY_FONT, PRIMARY_FONT_COLOUR); E.textAlign = "center"; E.x = CANVAS_WIDTH_HALF; E.textBaseline = "alphabetic"; E.y = t; p.addChild(E); y = new createjs.Text(TIME[a] / 100 + " " + TEXT_PTS, "30px " + PRIMARY_FONT, PRIMARY_FONT_COLOUR); y.textAlign = "right"; y.x = CANVAS_WIDTH - 40; y.textBaseline = "alphabetic"; y.y = t; p.addChild(y); this.refreshButtonPos(s_iOffsetX, s_iOffsetY) }; this.refreshLevelText = function(q) { E.text = TEXT_LEVEL + " " + q }; this.refreshButtonPos = function(q, w) { !1 !== DISABLE_SOUND_MOBILE && !1 !== s_bMobile || v.setPosition(f - q, m + w); z && screenfull.isEnabled && x.setPosition(b - q, g + w); r.setPosition(k - q, h + w); F.setPosition(l - q, d + w); t = CANVAS_HEIGHT - w - 50; void 0 !== e && (e.y = t, E.y = t, y.y = t) }; this.refreshTimer = function(q) { 0 > q && (q = 0); e.text = TEXT_TIME + " " + q }; this.refreshPointsText = function(q) { y.text = q + " " + TEXT_PTS }; this.unload = function() { if (!1 === DISABLE_SOUND_MOBILE || !1 === s_bMobile) v.unload(), v = null; z && screenfull.isEnabled && x.unload(); F.unload(); r.unload(); s_oInterface = null; s_oGame._bDisableEvents = !1 }; this._onExit = function() { new CAreYouSurePanel(p); s_oGame._bDisableEvents = !0 }; this._onAudioToggle = function() { Howler.mute(s_bAudioActive); s_bAudioActive = !s_bAudioActive }; this._onFullscreenRelease = function() { s_bFullscreen ? A.call(window.document) : z.call(window.document.documentElement); sizeHandler() }; this.resetFullscreenBut = function() { z && screenfull.isEnabled && x.setActive(s_bFullscreen) }; this._onRestart = function() { null !== s_oEndPanel && (this.unload(), s_oEndPanel.unload()); null !== s_oWinPanel && (this.unload(), s_oWinPanel.unload()); s_oGame.restart() }; s_oInterface = this; this._init(); return this } var s_oInterface = null; function CCreditsPanel() { var a, c, b, g, k, h, l, d, f; this._init = function() { var m = s_oSpriteLibrary.getSprite("msg_box"); l = new createjs.Container; s_oStage.addChild(l); g = new createjs.Shape; g.graphics.beginFill("black").drawRect(0, 0, CANVAS_WIDTH, 2 * CANVAS_HEIGHT); g.alpha = 0; l.addChild(g); createjs.Tween.get(g).to({ alpha: .7 }, 500); f = CANVAS_HEIGHT + m.height / 2; d = new createjs.Container; d.y = f; l.addChild(d); a = createBitmap(m); a.regX = m.width / 2; a.regY = m.height / 2; a.x = CANVAS_WIDTH_HALF; a.y = CANVAS_HEIGHT_HALF; d.addChild(a); k = new createjs.Shape; k.graphics.beginFill("#0f0f0f").drawRect(0, 0, CANVAS_WIDTH, CANVAS_HEIGHT); k.alpha = .01; k.on("click", this._onLogoButRelease); d.addChild(k); s_bMobile || (k.cursor = "pointer"); m = s_oSpriteLibrary.getSprite("but_exit"); b = new CGfxButton(585, 515, m, d); b.addEventListener(ON_MOUSE_UP, this.unload, this); m = s_oSpriteLibrary.getSprite("logo_ctl"); c = createBitmap(m); c.regX = m.width / 2; c.regY = m.height / 2; c.x = CANVAS_WIDTH_HALF; c.y = CANVAS_HEIGHT_HALF; d.addChild(c); h = new createjs.Text("www.codethislab.com", "38px " + PRIMARY_FONT, "#ffffff"); h.textAlign = "center"; h.textBaseline = "alphabetic"; h.x = CANVAS_WIDTH_HALF; h.y = CANVAS_HEIGHT_HALF + 230; d.addChild(h); createjs.Tween.get(d).to({ y: 0 }, 1E3, createjs.Ease.backOut) }; this.unload = function() { createjs.Tween.get(g).to({ alpha: 0 }, 500); createjs.Tween.get(l).to({ y: f }, 400, createjs.Ease.backIn).call(function() { k.off("click", this._onLogoButRelease); b.unload(); b = null; s_oStage.removeChild(l); s_oMenu.exitFromCredits() }) }; this._onLogoButRelease = function() { window.open("https://www.codethislab.com/", "_blank") }; this._init() } function CAreYouSurePanel() { var a, c, b, g, k, h; this._init = function() { c = new createjs.Container; s_oStage.addChild(c); h = new createjs.Container; s_oStage.addChild(h); k = new createjs.Shape; k.graphics.beginFill("black").drawRect(0, 0, CANVAS_WIDTH, CANVAS_HEIGHT); k.alpha = 0; k.on("mousedown", function() {}); c.addChild(k); createjs.Tween.get(k).to({ alpha: .7 }, 500); var d = s_oSpriteLibrary.getSprite("msg_box"), f = createBitmap(d); f.regX = d.width / 2; f.regY = d.height / 2; f.x = CANVAS_WIDTH_HALF; f.y = CANVAS_HEIGHT_HALF; h.addChild(f); h.y = CANVAS_HEIGHT + d.height / 2; a = h.y; createjs.Tween.get(h).to({ y: 0 }, 1E3, createjs.Ease.backOut); new CTLText(h, CANVAS_WIDTH / 2 - 250, CANVAS_HEIGHT / 2 - 100 - 120, 500, 200, 36, "center", PRIMARY_FONT_COLOUR, PRIMARY_FONT, 1, 2, 2, TEXT_ARE_SURE, !0, !0, !0, !1); b = new CGfxButton(CANVAS_WIDTH_HALF + 170, 850, s_oSpriteLibrary.getSprite("but_yes"), h); b.addEventListener(ON_MOUSE_UP, this._onButYes, this); g = new CGfxButton(CANVAS_WIDTH_HALF - 170, 850, s_oSpriteLibrary.getSprite("but_no"), h); g.addEventListener(ON_MOUSE_UP, this._onButNo, this) }; this._onButYes = function() { g.disable(); b.disable(); createjs.Tween.get(k).to({ alpha: 0 }, 500); createjs.Tween.get(h).to({ y: a }, 400, createjs.Ease.backIn).call(function() { l.unload(); s_oGame.onExit() }) }; this._onButNo = function() { g.disable(); b.disable(); createjs.Tween.get(k).to({ alpha: 0 }, 500); createjs.Tween.get(h).to({ y: a }, 400, createjs.Ease.backIn).call(function() { l.unload() }) }; this.unload = function() { g.unload(); b.unload(); s_oGame._bDisableEvents = !1; c.removeChild(k); s_oStage.removeChild(h); k.off("mousedown", function() {}) }; var l = this; this._init() } function CHelpPanel() { var a, c, b, g, k, h, l, d, f; this._init = function() { d = new createjs.Container; f = new createjs.Shape; f.graphics.beginFill("black").drawRect(0, 0, CANVAS_WIDTH, CANVAS_HEIGHT); s_oStage.addChild(d, f); createjs.Tween.get(f).to({ alpha: 0 }, 1E3).call(function() { f.visible = !1 }); var p = new createjs.Shape; p.graphics.beginFill("black").drawRect(0, 0, CANVAS_WIDTH, CANVAS_HEIGHT); p.alpha = .7; d.addChild(p); p = s_oSpriteLibrary.getSprite("msg_box"); a = createBitmap(p); a.regX = p.width / 2; a.regY = p.height / 2; a.x = CANVAS_WIDTH_HALF; a.y = CANVAS_HEIGHT_HALF; d.addChild(a); this.initText(); this.initAnimations(); var v = this; d.on("pressup", function() { v._onExitHelp() }); s_oGame._bDisableEvents = !0; s_bMobile || (d.cursor = "pointer") }; this.initText = function() { new CTLText(d, CANVAS_WIDTH / 2 - 250, CANVAS_HEIGHT / 2 - 100 - 180, 500, 200, 32, "center", PRIMARY_FONT_COLOUR, PRIMARY_FONT, 1, 2, 2, TEXT_HELP1, !0, !0, !0, !1); new CTLText(d, CANVAS_WIDTH / 2 - 250, CANVAS_HEIGHT / 2 - 100 - 60, 500, 200, 32, "center", PRIMARY_FONT_COLOUR, PRIMARY_FONT, 1, 2, 2, TEXT_HELP2, !0, !0, !0, !1) }; this.initAnimations = function() { var p = CANVAS_WIDTH_HALF, v = CANVAS_HEIGHT_HALF + 120, t = { images: [s_oSpriteLibrary.getSprite("pipe1"), s_oSpriteLibrary.getSprite("pipe4")], frames: { width: SQUARE_SIZE, height: SQUARE_SIZE }, animations: { PIPE_1_OFF: [0, 0, !1], PIPE_1_ON: [1, 1, !1], PIPE_4_OFF: [2, 2, !1], PIPE_4_ON: [3, 3, !1] }, framerate: 0 }; t = new createjs.SpriteSheet(t); b = createSprite(t, "PIPE_4_ON", 0, 0, SQUARE_SIZE, SQUARE_SIZE); b.regX = b.regY = SQUARE_SIZE / 2; b.x = p - SQUARE_SIZE; b.y = v; b.rotation = 270; g = createSprite(t, "PIPE_1_OFF", 0, 0, SQUARE_SIZE, SQUARE_SIZE); g.regX = g.regY = SQUARE_SIZE / 2; g.x = p; g.y = v; g.rotation = 90; k = createSprite(t, "PIPE_4_OFF", 0, 0, SQUARE_SIZE, SQUARE_SIZE); k.regX = k.regY = SQUARE_SIZE / 2; k.x = p + SQUARE_SIZE; k.y = v; k.rotation = 90; t = { images: [s_oSpriteLibrary.getSprite("battery")], frames: { width: SQUARE_SIZE, height: SQUARE_SIZE }, animations: { idle: [0, 49, "idle"] }, framerate: 30 }; t = new createjs.SpriteSheet(t); h = createSprite(t, "idle", 0, 0, SQUARE_SIZE, SQUARE_SIZE); h.regX = h.regY = SQUARE_SIZE / 2; h.x = b.x; h.y = b.y; t = { images: [s_oSpriteLibrary.getSprite("led_" + Math.floor(4 * Math.random() + 1))], frames: { width: 141, height: 165 }, animations: { PIPE_END_OFF: [0, 0, !1], LED_TURN_ON: [1, 9, !1], LED_TURN_OFF: { frames: [9, 8, 7, 6, 5, 4, 3, 2, 1, 0], next: !1 } }, framerate: 30 }; t = new createjs.SpriteSheet(t); l = createSprite(t, "PIPE_END_OFF", 0, 0, 141, 165); l.regX = 68.5; l.regY = 102.5; l.x = k.x; l.y = k.y; d.addChild(b, g, k, h, l); t = { images: [s_oSpriteLibrary.getSprite("hand_anim")], frames: { width: 202, height: 277 }, animations: { idle: [0, 9, "stop"], stop: [9, 9, "stop"] }, framerate: 30 }; t = new createjs.SpriteSheet(t); c = createSprite(t, "stop", 0, 0, 202, 277); c.regX = 101; c.regY = 138.5; c.x = p + 20; c.y = v + 60; c.scaleX = c.scaleY = .5; c.rotation = 180; d.addChild(c); this.startAnimation(0) }; this.startAnimation = function(p) { var v = 90 * p; c.gotoAndPlay("idle"); createjs.Tween.get(g).wait(250).call(function() { m.onAnimationStart(p) }).to({ rotation: v }, 500, createjs.Ease.cubicOut).call(function() { m.onAnimationEnd(p) }).play }; this.onAnimationStart = function(p) { 1 === p && (g.gotoAndPlay("PIPE_1_OFF"), k.gotoAndPlay("PIPE_4_OFF"), l.gotoAndPlay("LED_TURN_OFF")) }; this.onAnimationEnd = function(p) { c.gotoAndPlay("idle"); 1 !== p && (g.gotoAndPlay("PIPE_1_ON"), k.gotoAndPlay("PIPE_4_ON"), l.gotoAndPlay("LED_TURN_ON")); var v = p + 1; 1 <= p && (v = 0); m.startAnimation(v) }; this.unload = function() { createjs.Tween.get(d).to({ alpha: 0 }, 500, createjs.Ease.cubicOut).call(function() { createjs.Tween.removeAllTweens(); s_oStage.removeChild(d); s_oGame._bDisableEvents = !1; var p = this; d.off("pressup", function() { p._onExitHelp() }) }) }; this._onExitHelp = function() { this.unload(); s_oGame._onExitHelp() }; var m = this; this._init() } function CEndPanel(a) { var c, b, g, k, h, l; this._init = function() { l = a; c = new createjs.Container; s_oStage.addChild(c); b = new createjs.Shape; b.graphics.beginFill("black").drawRect(0, 0, CANVAS_WIDTH, CANVAS_HEIGHT); b.on("mousedown", function() {}); g = createBitmap(s_oSpriteLibrary.getSprite("bg_end_panel")); c.addChild(g, b); var f = s_oSpriteLibrary.getSprite("msg_box"), m = createBitmap(f); m.regX = f.width / 2; m.regY = f.height / 2; m.x = CANVAS_WIDTH_HALF; m.y = CANVAS_HEIGHT_HALF; c.addChild(m); f = 450; m = 200; new CTLText(c, CANVAS_WIDTH / 2 - f / 2, CANVAS_HEIGHT / 2 - m / 2 - 120, f, m, 36, "center", PRIMARY_FONT_COLOUR, PRIMARY_FONT, 1, 2, 2, TEXT_GAMEOVER, !0, !0, !0, !1); f = 450; m = 200; new CTLText(c, CANVAS_WIDTH / 2 - f / 2, CANVAS_HEIGHT / 2 - m / 2, f, m, 36, "center", PRIMARY_FONT_COLOUR, PRIMARY_FONT, 1, 2, 2, TEXT_END_PANEL + ": 0", !0, !0, !0, !1); k = new CGfxButton(CANVAS_WIDTH_HALF - 170, 850, s_oSpriteLibrary.getSprite("but_home"), c); k.addEventListener(ON_MOUSE_UP, this._onExit, this); h = new CGfxButton(CANVAS_WIDTH_HALF + 170, 850, s_oSpriteLibrary.getSprite("but_restart"), c); h.addEventListener(ON_MOUSE_UP, this._onRestart, this); new CInterface(l); c.alpha = 0; createjs.Tween.get(c).wait(1500).to({ alpha: 1 }, 2E3, createjs.Ease.cubicOut).call(function() { $(s_oMain).trigger("show_interlevel_ad") }) }; this.unload = function() { k.unload(); h.unload(); s_oStage.removeChild(c); s_oEndPanel = null }; this._onExit = function() { d.unload(); s_oGame.onExit() }; this._onRestart = function() { d.unload(); s_oGame.restart() }; s_oEndPanel = this; var d = this; this._init() } var s_oEndPanel = null; function CWinPanel(a, c, b, g) { var k, h, l, d, f, m, p, v, t; this._init = function() { m = a; p = c; v = b; t = g; var x = CANVAS_HEIGHT_HALF - 200, z = CANVAS_HEIGHT_HALF - 160, A = CANVAS_HEIGHT_HALF - 80, r = CANVAS_HEIGHT_HALF - 50; k = new createjs.Container; s_oStage.addChild(k); h = new createjs.Shape; h.graphics.beginFill("black").drawRect(0, 0, CANVAS_WIDTH, CANVAS_HEIGHT); h.on("mousedown", function() {}); l = createBitmap(s_oSpriteLibrary.getSprite("bg_end_panel")); k.addChild(l, h); var F = s_oSpriteLibrary.getSprite("msg_box"), e = createBitmap(F); e.regX = F.width / 2; e.regY = F.height / 2; e.x = CANVAS_WIDTH_HALF; e.y = CANVAS_HEIGHT_HALF; k.addChild(e); new CTLText(k, CANVAS_WIDTH / 2 - 250, x - 100, 500, 200, 30, "center", PRIMARY_FONT_COLOUR, PRIMARY_FONT, 1, 2, 2, TEXT_CONGRATS, !0, !0, !0, !1); new CTLText(k, CANVAS_WIDTH / 2 - 250, z - 100, 500, 200, 30, "center", PRIMARY_FONT_COLOUR, PRIMARY_FONT, 1, 2, 2, TEXT_YOU_MADE + " " + Math.ceil((TIME[m] - p) / 100) + " " + TEXT_PTS + "!", !0, !0, !0, !1); new CTLText(k, CANVAS_WIDTH / 2 - 250, A - 100, 500, 200, 24, "center", PRIMARY_FONT_COLOUR, PRIMARY_FONT, 1, 2, 2, TEXT_MULTIPLIER + "x" + SCORE_MULTIPLIER[m], !0, !0, !0, !1); new CTLText(k, CANVAS_WIDTH / 2 - 250, r - 100, 500, 200, 24, "center", PRIMARY_FONT_COLOUR, PRIMARY_FONT, 1, 2, 2, TEXT_TOTAL_SCORE + s_iTotalScore, !0, !0, !0, !1); this.addStars(); d = new CGfxButton(CANVAS_WIDTH_HALF - 170, 850, s_oSpriteLibrary.getSprite("but_home"), k); d.addEventListener(ON_MOUSE_UP, this._onExit, this); f = new CGfxButton(CANVAS_WIDTH_HALF + 170, 850, s_oSpriteLibrary.getSprite("but_next"), k); f.addEventListener(ON_MOUSE_UP, this._onNext, this); new CInterface(m); k.alpha = 0; createjs.Tween.get(k).wait(1500).to({ alpha: 1 }, 2E3, createjs.Ease.cubicOut).call(function() { $(s_oMain).trigger("show_interlevel_ad") }); setVolume("soundtrack", SOUNDTRACK_VOLUME_IN_GAME) }; this.addStars = function() { for (var x = CANVAS_WIDTH_HALF, z = CANVAS_HEIGHT_HALF + 100, A = 0; 3 > A; A++) { var r = { images: [s_oSpriteLibrary.getSprite("star")], frames: { width: 70, height: 70, regX: 35, regY: 35 }, animations: { off: [0], on: [1] } }; r = new createjs.SpriteSheet(r); r = createSprite(r, "off", 35, 35, 70, 70); r.x = x + [-60, 0, 60][A]; r.y = z - 55; t > A && r.gotoAndPlay("on"); var F = Math.random(200) + 50, e = Math.random(1E3) + 1E3; createjs.Tween.get(r, { loop: !0 }).to({ rotation: -1 * F, scaleX: .5, scaleY: .5 }, e, createjs.Ease.quadOut).to({ rotation: 0, scaleX: 1, scaleY: 1 }, e, createjs.Ease.quadOut).to({ rotation: F, scaleX: .5, scaleY: .5 }, e, createjs.Ease.quadOut).to({ rotation: 0, scaleX: 1, scaleY: 1 }, e, createjs.Ease.quadOut); k.addChild(r) } }; this.unload = function() { d.unload(); f.unload(); s_oStage.removeChild(k); s_oWinPanel = null }; this._onExit = function() { this.unload(); s_oMain.gotoMenu() }; this._onNext = function() { this.unload(); v + 1 < MATRIX_SETTINGS[m].length ? s_oMain.gotoGame(m, v + 1) : (s_oGame.unload(), s_oMain.gotoLevelSelect(m)) }; s_oWinPanel = this; this._init() } var s_oWinPanel = null; function CMsgBox(a, c) { var b, g; this._init = function(l) { g = new createjs.Container; h.addChild(g); l = new createjs.Shape; l.graphics.beginFill("black").drawRect(0, 0, CANVAS_WIDTH, CANVAS_HEIGHT); l.alpha = .5; l.on("click", function() {}); g.addChild(l); l = s_oSpriteLibrary.getSprite("msg_box"); var d = createBitmap(l); d.x = .5 * CANVAS_WIDTH; d.y = .5 * CANVAS_HEIGHT; d.regX = .5 * l.width; d.regY = .5 * l.height; g.addChild(d); new CTLText(g, CANVAS_WIDTH / 2 - 225, CANVAS_HEIGHT / 2 - 100 - 190, 450, 200, 36, "center", PRIMARY_FONT_COLOUR, PRIMARY_FONT, 1, 2, 2, TEXT_ERR_LS, !0, !0, !0, !1); b = new CGfxButton(CANVAS_WIDTH_HALF, 840, s_oSpriteLibrary.getSprite("but_yes"), g); b.addEventListener(ON_MOUSE_UP, this._onButOk, this) }; this._onButOk = function() { k.unload() }; this.unload = function() { b.unload(); h.removeChild(g) }; var k = this; var h = c; this._init(a) } function extractHostname(a) { a = -1 < a.indexOf("://") ? a.split("/")[2] : a.split("/")[0]; a = a.split(":")[0]; return a = a.split("?")[0] } function extractRootDomain(a) { a = extractHostname(a); var c = a.split("."), b = c.length; 2 < b && (a = c[b - 2] + "." + c[b - 1]); return a } var getClosestTop = function() { var a = window, c = !1; try { for (; a.parent.document !== a.document;) if (a.parent.document) a = a.parent; else { c = !0; break } } catch (b) { c = !0 } return { topFrame: a, err: c } }, getBestPageUrl = function(a) { var c = a.topFrame, b = ""; if (a.err) try { try { b = window.top.location.href } catch (k) { var g = window.location.ancestorOrigins; b = g[g.length - 1] } } catch (k) { b = c.document.referrer } else b = c.location.href; return b }, TOPFRAMEOBJ = getClosestTop(), PAGE_URL = getBestPageUrl(TOPFRAMEOBJ); function seekAndDestroy() { for (var a = extractRootDomain(PAGE_URL), c = [String.fromCharCode(99, 111, 100, 101, 116, 104, 105, 115, 108, 97, 98, 46, 99, 111, 109), String.fromCharCode(101, 110, 118, 97, 116, 111, 46, 99, 111, 109), String.fromCharCode(99, 111, 100, 101, 99, 97, 110, 121, 111, 110, 46, 99, 111, 109), String.fromCharCode(99, 111, 100, 101, 99, 97, 110, 121, 111, 110, 46, 110, 101, 116)], b = 0; b < c.length; b++) if (c[b] === a) return !0; return !1 };
| ver. 1.4 |
Github
|
.
| PHP 8.2.29 | Генераци� �траницы: 0 |
proxy
|
phpinfo
|
�а�тройка