whisper.cat/weboasis/arcade/slots/js/main.js

162 lines
75 KiB
JavaScript
Raw Normal View History

2023-10-05 23:28:32 +11:00
(function(){function a(a){a=String(a);return a.charAt(0).toUpperCase()+a.slice(1)}function e(a,d){var f=-1,m=a?a.length:0;if("number"==typeof m&&-1<m&&m<=p)for(;++f<m;)d(a[f],f,a);else b(a,d)}function g(d){d=String(d).replace(/^ +| +$/g,"");return/^(?:webOS|i(?:OS|P))/.test(d)?d:a(d)}function b(a,d){for(var f in a)x.call(a,f)&&d(a[f],f,a)}function n(d){return null==d?a(d):D.call(d).slice(8,-1)}function k(a,d){var f=null!=a?typeof a[d]:"number";return!/^(?:boolean|number|string|undefined)$/.test(f)&&
("object"==f?!!a[d]:!0)}function r(a){return String(a).replace(/([ -])(?!$)/g,"$1?")}function f(a,d){var f=null;e(a,function(b,m){f=d(f,b,m,a)});return f}function l(a){function d(c){return f(c,function(c,d){var f=d.pattern||r(d);!c&&(c=RegExp("\\b"+f+" *\\d+[.\\w_]*","i").exec(a)||RegExp("\\b"+f+" *\\w+-[\\w]*","i").exec(a)||RegExp("\\b"+f+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(a))&&((c=String(d.label&&!RegExp(f,"i").test(d.label)?d.label:c).split("/"))[1]&&!/[\d.]+/.test(c[0])&&(c[0]+=
" "+c[1]),d=d.label||d,c=g(c[0].replace(RegExp(f,"i"),d).replace(RegExp("; *(?:"+d+"[_-])?","i")," ").replace(RegExp("("+d+")[-_.]?(\\w)","i"),"$1 $2")));return c})}function e(c){return f(c,function(c,d){return c||(RegExp(d+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(a)||0)[1]||null})}var h=m,p=a&&"object"==typeof a&&"String"!=n(a);p&&(h=a,a=null);var y=h.navigator||{},v=y.userAgent||"";a||(a=v);var x=p?!!y.likeChrome:/\bChrome\b/.test(a)&&!/internal|\n/i.test(D.toString()),
B=p?"Object":"ScriptBridgingProxyObject",A=p?"Object":"Environment",w=p&&h.java?"JavaPackage":n(h.java),T=p?"Object":"RuntimeObject";A=(w=/\bJava/.test(w)&&h.java)&&n(h.environment)==A;var z=w?"a":"\u03b1",M=w?"b":"\u03b2",Q=h.document||{},N=h.operamini||h.opera,J=q.test(J=p&&N?N["[[Class]]"]:n(N))?J:N=null,c,U=a;p=[];var V=null,P=a==v;v=P&&N&&"function"==typeof N.version&&N.version();var E=function(c){return f(c,function(c,d){return c||RegExp("\\b"+(d.pattern||r(d))+"\\b","i").exec(a)&&(d.label||
d)})}([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),t=function(c){return f(c,function(c,d){return c||RegExp("\\b"+(d.pattern||r(d))+"\\b","i").exec(a)&&(d.label||d)})}(["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"]),F=d([{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"]),K=function(c){return f(c,function(c,d,f){return c||(d[F]||d[/^[a-z]+(?: +[a-z]+\b)*/i.exec(F)]||RegExp("\\b"+r(f)+"(?:\\b|\\w*\\d)","i").exec(a))&&f})}({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}}),u=function(c){return f(c,function(c,d){var f=d.pattern||r(d);if(!c&&(c=RegExp("\\b"+f+"(?:/[\\d.]+|[ \\w.]*)","i").exec(a))){var J=c,b=d.label||d,m={"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"};f&&b&&/^Win/i.test(J)&&!/^Windows Phone /i.test(J)&&(m=m[/[\d.]+$/.exec(J)])&&(J="Windows "+m);J=String(J);f&&b&&(J=J.replace(RegExp(f,"i"),b));c=J=g(J.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 c})}(["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 "]);E&&(E=[E]);K&&!F&&(F=d([K]));if(c=/\bGoogle TV\b/.exec(F))F=c[0];/\bSimulator\b/i.test(a)&&(F=(F?F+" ":"")+"Simulator");"Opera Mini"==t&&/\bOPiOS\b/.test(a)&&p.push("running in Turbo/Uncompressed mode");"IE"==t&&/\blike iPhone OS\b/.test(a)?(c=l(a.replace(/like iPhone OS/,"")),K=c.manufacturer,F=c.product):/^iP/.test(F)?(t||(t="Safari"),u="iOS"+((c=/ OS ([\d_]+)/i.exec(a))?" "+c[1].replace(/_/g,"."):"")):"Konqueror"!=t||/buntu/i.test(u)?K&&"Google"!=K&&(/Chrome/.test(t)&&
!/\bMobile Safari\b/i.test(a)||/\bVita\b/.test(F))||/\bAndroid\b/.test(u)&&/^Chrome/.test(t)&&/\bVersion\//i.test(a)?(t="Android Browser",u=/\bAndroid\b/.test(u)?u:"Android"):"Silk"==t?(/\bMobi/i.test(a)||(u="Android",p.unshift("desktop mode")),/Accelerated *= *true/i.test(a)&&p.unshift("accelerated")):"PaleMoon"==t&&(c=/\bFirefox\/([\d.]+)\b/.exec(a))?p.push("identifying as Firefox "+c[1]):"Firefox"==t&&(c=/\b(Mobile|Tablet|TV)\b/i.exec(a))?(u||(u="Firefox OS"),F||(F=c[1])):!t||(c=!/\bMinefield\b/i.test(a)&&
/\b(?:Firefox|Safari)\b/.exec(t))?(t&&!F&&/[\/,]|^[^(]+?\)/.test(a.slice(a.indexOf(c+"/")+8))&&(t=null),(c=F||K||u)&&(F||K||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(u))&&(t=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(u)?u:c)+" Browser")):"Electron"==t&&(c=(/\bChrome\/([\d.]+)\b/.exec(a)||0)[1])&&p.push("Chromium "+c):u="Kubuntu";v||(v=e(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",r(t),"(?:Firefox|Minefield|NetFront)"]));
if(c="iCab"==E&&3<parseFloat(v)&&"WebKit"||/\bOpera\b/.test(t)&&(/\bOPR\b/.test(a)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(a)&&!/^(?:Trident|EdgeHTML)$/.test(E)&&"WebKit"||!E&&/\bMSIE\b/i.test(a)&&("Mac OS"==u?"Tasman":"Trident")||"WebKit"==E&&/\bPlayStation\b(?! Vita\b)/i.test(t)&&"NetFront")E=[c];"IE"==t&&(c=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(a)||0)[1])?(t+=" Mobile",u="Windows Phone "+(/\+$/.test(c)?c:c+".x"),p.unshift("desktop mode")):/\bWPDesktop\b/i.test(a)?(t="IE Mobile",u="Windows Phone 8.x",
p.unshift("desktop mode"),v||(v=(/\brv:([\d.]+)/.exec(a)||0)[1])):"IE"!=t&&"Trident"==E&&(c=/\brv:([\d.]+)/.exec(a))&&(t&&p.push("identifying as "+t+(v?" "+v:"")),t="IE",v=c[1]);if(P){if(k(h,"global"))if(w&&(c=w.lang.System,U=c.getProperty("os.arch"),u=u||c.getProperty("os.name")+" "+c.getProperty("os.version")),A){try{v=h.require("ringo/engine").version.join("."),t="RingoJS"}catch(X){(c=h.system)&&c.global.system==h.system&&(t="Narwhal",u||(u=c[0].os||null))}t||(t="Rhino")}else"object"==typeof h.process&&
!h.process.browser&&(c=h.process)&&("object"==typeof c.versions&&("string"==typeof c.versions.electron?(p.push("Node "+c.versions.node),t="Electron",v=c.versions.electron):"string"==typeof c.versions.nw&&(p.push("Chromium "+v,"Node "+c.versions.node),t="NW.js",v=c.versions.nw)),t||(t="Node.js",U=c.arch,u=c.platform,v=(v=/[\d.]+/.exec(c.version))?v[0]:null));else n(c=h.runtime)==B?(t="Adobe AIR",u=c.flash.system.Capabilities.os):n(c=h.phantom)==T?(t="PhantomJS",v=(c=c.version||null)&&c.major+"."+c.minor+
"."+c.patch):"number"==typeof Q.documentMode&&(c=/\bTrident\/(\d+)/i.exec(a))?(v=[v,Q.documentMode],(c=+c[1]+4)!=v[1]&&(p.push("IE "+v[1]+" mode"),E&&(E[1]=""),v[1]=c),v="IE"==t?String(v[1].toFixed(1)):v[0]):"number"==typeof Q.documentMode&&/^(?:Chrome|Firefox)\b/.test(t)&&(p.push("masking as "+t+" "+v),t="IE",v="11.0",E=["Trident"],u="Windows");u=u&&g(u)}v&&(c=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(v)||/(?:alpha|beta)(?: ?\d)?/i.exec(a+";"+(P&&y.appMinorVersion))||/\bMinefield\b/i.test(a)&&
"a")&&(V=/b/i.test(c)?"beta":"alpha",v=v.replace(RegExp(c+"\\+?$"),"")+("beta"==V?M:z)+(/\d+\+?/.exec(c)||""));if("Fennec"==t||"Firefox"==t&&/\b(?:Android|Firefox OS)\b/.test(u))t="Firefox Mobile";else if("Maxthon"==t&&v)v=v.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(F))"Xbox 360"==F&&(u=null),"Xbox 360"==F&&/\bIEMobile\b/.test(a)&&p.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(t)&&(!t||F||/Browser|Mobi/.test(t))||"Windows CE"!=u&&!/Mobi/i.test(a))if("IE"==t&&P)try{null===h.external&&
p.unshift("platform preview")}catch(X){p.unshift("embedded")}else(/\bBlackBerry\b/.test(F)||/\bBB10\b/.test(a))&&(c=(RegExp(F.replace(/ +/g," *")+"/([.\\d]+)","i").exec(a)||0)[1]||v)?(c=[c,/BB10/.test(a)],u=(c[1]?(F=null,K="BlackBerry"):"Device Software")+" "+c[0],v=null):this!=b&&"Wii"!=F&&(P&&N||/Opera/.test(t)&&/\b(?:MSIE|Firefox)\b/i.test(a)||"Firefox"==t&&/\bOS X (?:\d+\.){2,}/.test(u)||"IE"==t&&(u&&!/^Win/.test(u)&&5.5<v||/\bWindows XP\b/.test(u)&&8<v||8==v&&!/\bTrident\b/.test(a)))&&!q.test(c=
l.call(b,a.replace(q,"")+";"))&&c.name&&(c="ing as "+c.name+((c=c.version)?" "+c:""),q.test(t)?(/\bIE\b/.test(c)&&"Mac OS"==u&&(u=null),c="identify"+c):(c="mask"+c,t=J?g(J.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(c)&&(u=null),P||(v=null)),E=["Presto"],p.push(c));else t+=" Mobile";if(c=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(a)||0)[1]){c=[parseFloat(c.replace(/\.(\d)$/,".0$1")),c];if("Safari"==t&&"+"==c[1].slice(-1))t="WebKit Nightly",V="alpha",v=c[1].slice(0,-1);else if(v==c[1]||v==(c[2]=
(/\bSafari\/([\d.]+\+?)/i.exec(a)||0)[1]))v=null;c[1]=(/\bChrome\/([\d.]+)/i.exec(a)||0)[1];537.36==c[0]&&537.36==c[2]&&28<=parseFloat(c[1])&&"WebKit"==E&&(E=["Blink"]);P&&(x||c[1])?(E&&(E[1]="like Chrome"),c=c[1]||(c=c[0],530>c?1:532>c?2:532.05>c?3:533>c?4:534.03>c?5:534.07>c?6:534.1>c?7:534.13>c?8:534.16>c?9:534.24>c?10:534.3>c?11:535.01>c?12:535.02>c?"13+":535.07>c?15:535.11>c?16:535.19>c?17:536.05>c?18:536.1>c?19:537.01>c?20:537.11>c?"21+":537.13>c?23:537.18>c?24:537.24>c?25:537.36>c?26:"Blink"!=
E?"27":"28")):(E&&(E[1]="like Safari"),c=(c=c[0],400>c?1:500>c?2:526>c?3:533>c?4:534>c?"4+":535>c?5:537>c?6:538>c?7:601>c?8:"8"));E&&(E[1]+=" "+(c+="number"==typeof c?".x":/[.+]/.test(c)?"":"+"));"Safari"==t&&(!v||45<parseInt(v))&&(v=c)}"Opera"==t&&(c=/\bzbov|zvav$/.exec(u))?(t+=" ",p.unshift("desktop mode"),"zvav"==c?(t+="Mini",v=null):t+="Mobile",u=u.replace(RegExp(" *"+c+"$"),"")):"Safari"==t&&/\bChrome\b/.exec(E&&E[1])&&(p.unshift("desktop mode"),t="Chrome Mobile",v=null,/\bOS X\b/.test(u)?(K=
"Apple",u="iOS 4.3+"):u=null);v&&0==v.indexOf(c=/[\d.]+$/.exec(u))&&-1<a.indexOf("/"+c+"-")&&(u=String(u.replace(c,"")).replace(/^ +| +$/g,""));E&&!/\b(?:Avant|Nook)\b/.test(t)&&(/Browser|Lunascape|Maxthon/.test(t)||"Safari"!=t&&/^iOS/.test(u)&&/\bSafari\b/.test(E[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(t)&&E[1])&&(c=E[E.length-1])&&p.push(c);p.length&&(p=["("+p.join("; ")+")"]);K&&F&&0>F.indexOf(K)&&p.push("on "+K);F&&p.push((/^on /.test(p[p.length-
1])?"":"on ")+F);if(u){var W=(c=/ ([\d.+]+)$/.exec(u))&&"/"==u.charAt(u.length-c[0].length-1);u={architecture:32,family:c&&!W?u.replace(c[0],""):u,version:c?c[1]:null,toString:function(){var a=this.version;return this.family+(a&&!W?" "+a:"")+(64==this.architecture?" 64-bit":"")}}}(c=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(U))&&!/\bi686\b/i.test(U)?(u&&(u.architecture=64,u.family=u.family.replace(RegExp(" *"+c),"")),t&&(/\bWOW64\b/i.test(a)||P&&/\w(?:86|32)$/.test(y.cpuClass||y.platform)&&!/\bWin64; x64\b/i.test(a))&&
p.unshift("32-bit")):u&&/^OS X/.test(u.family)&&"Chrome"==t&&39<=parseFloat(v)&&(u.architecture=64);a||(a=null);h={};h.description=a;h.layout=E&&E[0];h.manufacturer=K;h.name=t;h.prerelease=V;h.product=F;h.ua=a;h.version=t&&v;h.os=u||{architecture:null,family:null,version:null,toString:function(){return"null"}};h.parse=l;h.toString=function(){return this.description||""};h.version&&p.unshift(v);h.name&&p.unshift(t);u&&t&&(u!=String(u).split(" ")[0]||u!=t.split(" ")[0]&&!F)&&p.push(F?"("+u+")":"on "+
u);p.length&&(h.description=p.join(" "));return h}var d={"function":!0,object:!0},m=d[typeof window]&&window||this,y=d[typeof exports]&&exports;d=d[typeof module]&&module&&!module.nodeType&&module;var h=y&&d&&"object"==typeof global&&global;!h||h.global!==h&&h.window!==h&&h.self!==h||(m=h);var p=Math.pow(2,53)-1,q=/\bOpera/;h=Object.prototype;var x=h.hasOwnProperty,D=h.toString,B=l();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(m.platform=B,define(function(){return B})):y&&
d?b(B,function(a,d){y[d]=a}):m.platform=B}).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"}],e=0;e<a.length;e++){var g=document.createElement("meta");g.name=a[e].name;g.content=a[e].content;var b=window.document.head.querySelector('meta[name="'+g.name+'"]');b&&b.parentNode.removeChild(b);window.document.head.appendChild(g)}}
function hideIOSFullscreenPanel(){jQuery(".xxx-ios-fullscreen-message").css("display","none");jQuery(".xxx-ios-fullscreen-scroll").css("display","none");jQuery(".xxx-game-iframe-full").removeClass("xxx-game-iframe-iphone-se")}function buildIOSFullscreenPanel(){jQuery("body").append('<div class="xxx-ios-fullscreen-message"><div class="xxx-ios-fullscreen-swipe"></div></div><div class="xxx-ios-fullscreen-scroll"></div>')}
function showIOSFullscreenPanel(){jQuery(".xxx-ios-fullscreen-message").css("display","block");jQuery(".xxx-ios-fullscreen-scroll").css("display","block")}
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&&jQuery(".xxx-game-iframe-full").addClass("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}}$(document).ready(function(){platform&&"iPhone"===platform.product&&"safari"!==platform.name.toLowerCase()&&(buildIOSFullscreenPanel(),buildIOSMeta())});jQuery(window).resize(function(){platform&&"iPhone"===platform.product&&"safari"!==platform.name.toLowerCase()&&iosResize()});
(function(){var a="undefined"!==typeof window&&"undefined"!==typeof window.document?window.document:{},e="undefined"!==typeof module&&module.exports,g="undefined"!==typeof Element&&"ALLOW_KEYBOARD_INPUT"in Element,b=function(){for(var b,f=["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(" ")],l=0,d=f.length,m={};l<d;l++)if((b=f[l])&&b[1]in a){for(l=0;l<b.length;l++)m[f[0][l]]=
b[l];return m}return!1}(),n={change:b.fullscreenchange,error:b.fullscreenerror},k={request:function(e){var f=b.requestFullscreen;e=e||a.documentElement;if(/5\.1[.\d]* Safari/.test(navigator.userAgent))e[f]();else e[f](g&&Element.ALLOW_KEYBOARD_INPUT)},exit:function(){a[b.exitFullscreen]()},toggle:function(a){this.isFullscreen?this.exit():this.request(a)},onchange:function(a){this.on("change",a)},onerror:function(a){this.on("error",a)},on:function(b,f){var l=n[b];l&&a.addEventListener(l,f,!1)},off:function(b,
f){var l=n[b];l&&a.removeEventListener(l,f,!1)},raw:b};b?(Object.defineProperties(k,{isFullscreen:{get:function(){return!!a[b.fullscreenElement]}},element:{enumerable:!0,get:function(){return a[b.fullscreenElement]}},enabled:{enumerable:!0,get:function(){return!!a[b.fullscreenEnabled]}}}),e?module.exports=k:window.screenfull=k):e?module.exports=!1:window.screenfull=!1})();var s_iScaleFactor=1,s_bIsIphone=!1;
(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 trace(a){console.log(a)}function isIOS(){var a="iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod".split(";");for(-1!==navigator.userAgent.toLowerCase().indexOf("iphone")&&(s_bIsIphone=!0);a.length;)if(navigator.platform===a.pop())return!0;return s_bIsIphone=!1}
function getSize(a){var e=a.toLowerCase(),g=window.document,b=g.documentElement;if(void 0===window["inner"+a])a=b["client"+a];else if(window["inner"+a]!=b["client"+a]){var n=g.createElement("body");n.id="vpw-test-b";n.style.cssText="overflow:scroll";var k=g.createElement("div");k.id="vpw-test-d";k.style.cssText="position:absolute;top:-1000px";k.innerHTML="<style>@media("+e+":"+b["client"+a]+"px){body#vpw-test-b div#vpw-test-d{"+e+":7px!important}}</style>";n.appendChild(k);b.insertBefore(n,g.head);
a=7==k["offset"+a]?b["client"+a]:window["inner"+a];b.removeChild(n)}else a=window["inner"+a];return a}window.addEventListener("orientationchange",onOrientationChange);function onOrientationChange(){window.matchMedia("(orientation: portrait)").matches&&sizeHandler();window.matchMedia("(orientation: landscape)").matches&&sizeHandler()}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 sizeHandler(){window.scrollTo(0,1);if($("#canvas")){var a="safari"===platform.name.toLowerCase()?getIOSWindowHeight():getSize("Height");var e=getSize("Width");_checkOrientation(e,a);var g=Math.min(a/CANVAS_HEIGHT,e/CANVAS_WIDTH),b=CANVAS_WIDTH*g;g*=CANVAS_HEIGHT;if(g<a){var n=a-g;g+=n;b+=CANVAS_WIDTH/CANVAS_HEIGHT*n}else b<e&&(n=e-b,b+=n,g+=CANVAS_HEIGHT/CANVAS_WIDTH*n);n=a/2-g/2;var k=e/2-b/2,r=CANVAS_WIDTH/b;if(k*r<-EDGEBOARD_X||n*r<-EDGEBOARD_Y)g=Math.min(a/(CANVAS_HEIGHT-2*EDGEBOARD_Y),
e/(CANVAS_WIDTH-2*EDGEBOARD_X)),b=CANVAS_WIDTH*g,g*=CANVAS_HEIGHT,n=(a-g)/2,k=(e-b)/2,r=CANVAS_WIDTH/b;s_iOffsetX=-1*k*r;s_iOffsetY=-1*n*r;0<=n&&(s_iOffsetY=0);0<=k&&(s_iOffsetX=0);null!==s_oInterface&&s_oInterface.refreshButtonPos(s_iOffsetX,s_iOffsetY);null!==s_oMenu&&s_oMenu.refreshButtonPos(s_iOffsetX,s_iOffsetY);s_bIsIphone?(canvas=document.getElementById("canvas"),s_oStage.canvas.width=2*b,s_oStage.canvas.height=2*g,canvas.style.width=b+"px",canvas.style.height=g+"px",e=Math.min(b/CANVAS_WIDTH,
g/CANVAS_HEIGHT),s_iScaleFactor=2*e,s_oStage.scaleX=s_oStage.scaleY=2*e):s_bMobile&&!1===isIOS()?($("#canvas").css("width",b+"px"),$("#canvas").css("height",g+"px")):(s_oStage.canvas.width=b,s_oStage.canvas.height=g,s_iScaleFactor=Math.min(b/CANVAS_WIDTH,g/CANVAS_HEIGHT),s_oStage.scaleX=s_oStage.scaleY=s_iScaleFactor);0>n||(n=(a-g)/2);$("#canvas").css("top",n+"px");$("#canvas").css("left",k+"px");fullscreenHandler()}}
function _checkOrientation(a,e){s_bMobile&&ENABLE_CHECK_ORIENTATION&&(a>e?"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 createBitmap(a,e,g){var b=new createjs.Bitmap(a),n=new createjs.Shape;e&&g?n.graphics.beginFill("#fff").drawRect(0,0,e,g):n.graphics.beginFill("#ff0").drawRect(0,0,a.width,a.height);b.hitArea=n;return b}function createSprite(a,e,g,b,n,k){a=null!==e?new createjs.Sprite(a,e):new createjs.Sprite(a);e=new createjs.Shape;e.graphics.beginFill("#000000").drawRect(-g,-b,n,k);a.hitArea=e;return a}
function randomFloatBetween(a,e,g){"undefined"===typeof g&&(g=2);return parseFloat(Math.min(a+Math.random()*(e-a),e).toFixed(g))}function shuffle(a){for(var e=a.length,g,b;0!==e;)b=Math.floor(Math.random()*e),--e,g=a[e],a[e]=a[b],a[b]=g;return a}function formatTime(a){a/=1E3;var e=Math.floor(a/60);a=parseFloat(a-60*e).toFixed(1);var g="";g=10>e?g+("0"+e+":"):g+(e+":");return 10>a?g+("0"+a):g+a}
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 e=document.createEvent("MouseEvents");e.initEvent("click",!0,!0);a.dispatchEvent(e)}}};function ctlArcadeResume(){null!==s_oMain&&s_oMain.startUpdate()}function ctlArcadePause(){null!==s_oMain&&s_oMain.stopUpdate()}
function getParamValue(a){for(var e=window.location.search.substring(1).split("&"),g=0;g<e.length;g++){var b=e[g].split("=");if(b[0]==a)return b[1]}}function playSound(a,e,g){return!1===DISABLE_SOUND_MOBILE||!1===s_bMobile?(s_aSounds[a].play(),s_aSounds[a].volume(e),s_aSounds[a].loop(g),s_aSounds[a]):null}function stopSound(a){!1!==DISABLE_SOUND_MOBILE&&!1!==s_bMobile||s_aSounds[a].stop()}function setVolume(a,e){!1!==DISABLE_SOUND_MOBILE&&!1!==s_bMobile||s_aSounds[a].volume(e)}
function setMute(a,e){!1!==DISABLE_SOUND_MOBILE&&!1!==s_bMobile||s_aSounds[a].mute(e)}
(function(){function a(a){var b={focus:"visible",focusin:"visible",pageshow:"visible",blur:"hidden",focusout:"hidden",pagehide:"hidden"};a=a||window.event;a.type in b?document.body.className=b[a.type]:(document.body.className=this[e]?"hidden":"visible","hidden"===document.body.className?s_oMain.stopUpdate():s_oMain.startUpdate())}var e="hidden";e in document?document.addEventListener("visibilitychange",a):(e="mozHidden")in document?document.addEventListener("mozvisibilitychange",a):(e="webkitHidden")in
document?document.addEventListener("webkitvisibilitychange",a):(e="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 fullscreenHandler(){ENABLE_FULLSCREEN&&screenfull.enabled&&(s_bFullscreen=screenfull.isFullscreen,null!==s_oInterface&&s_oInterface.resetFullscreenBut(),null!==s_oMenu&&s_oMenu.resetFullscreenBut())}
if(screenfull.enabled)screenfull.on("change",function(){s_bFullscreen=screenfull.isFullscreen;null!==s_oInterface&&s_oInterface.resetFullscreenBut();null!==s_oMenu&&s_oMenu.resetFullscreenBut()});
function CSpriteLibrary(){var a={},e,g,b,n,k,r;this.init=function(a,l,d){e={};b=g=0;n=a;k=l;r=d};this.addSprite=function(f,b){if(!a.hasOwnProperty(f)){var d=new Image;a[f]=e[f]={szPath:b,oSprite:d,bLoaded:!1};g++}};this.getSprite=function(f){return a.hasOwnProperty(f)?a[f].oSprite:null};this._onSpritesLoaded=function(){g=0;k.call(r)};this._onSpriteLoaded=function(){n.call(r);++b===g&&this._onSpritesLoaded()};this.loadSprites=function(){for(var a in e)e[a].oSprite.oSpriteLibrary=this,e[a].oSprite.szKey=
a,e[a].oSprite.onload=function(){this.oSpriteLibrary.setLoaded(this.szKey);this.oSpriteLibrary._onSpriteLoaded(this.szKey)},e[a].oSprite.onerror=function(a){var d=a.currentTarget;setTimeout(function(){e[d.szKey].oSprite.src=e[d.szKey].szPath},500)},e[a].oSprite.src=e[a].szPath};this.setLoaded=function(f){a[f].bLoaded=!0};this.isLoaded=function(f){return a[f].bLoaded};this.getNumSprites=function(){return g}}
var CANVAS_WIDTH=1500,CANVAS_HEIGHT=640,EDGEBOARD_X=300,EDGEBOARD_Y=0,FONT_GAME="adonaisregular",FPS_TIME=1E3/24,DISABLE_SOUND_MOBILE=!1,STATE_LOADING=0,STATE_MENU=1,STATE_HELP=1,STATE_GAME=3,GAME_STATE_IDLE=0,GAME_STATE_SPINNING=1,GAME_STATE_SHOW_ALL_WIN=2,GAME_STATE_SHOW_WIN=3,REEL_STATE_START=0,REEL_STATE_MOVING=1,REEL_STATE_STOP=2,ON_MOUSE_DOWN=0,ON_MOUSE_UP=1,ON_MOUSE_OVER=2,ON_MOUSE_OUT=3,ON_DRAG_START=4,ON_DRAG_END=5,REEL_OFFSET_X=380,REEL_OFFSET_Y=118,NUM_REELS=5,NUM_ROWS=3,NUM_SYMBOLS=10,
WILD_SYMBOL=10,BONUS_SYMBOL=9,NUM_PAYLINES=5,SYMBOL_SIZE=140,SPACE_BETWEEN_SYMBOLS=10,MAX_FRAMES_REEL_EASE=16,MIN_REEL_LOOPS,REEL_DELAY,REEL_START_Y=REEL_OFFSET_Y-3*SYMBOL_SIZE,REEL_ARRIVAL_Y=REEL_OFFSET_Y+3*SYMBOL_SIZE,TIME_SHOW_WIN,TIME_SHOW_ALL_WINS,MIN_BET,MAX_BET,TOTAL_MONEY,MAX_NUM_HOLD,BONUS_ITEM_WIDTH=304,BONUS_ITEM_HEIGHT=250,NUM_PRIZES=3,NUM_SYMBOLS_FOR_BONUS=3,PERC_WIN_PRIZE_1,PERC_WIN_PRIZE_2,PERC_WIN_PRIZE_3,SOUNDTRACK_VOLUME_IN_GAME=.2,WIN_OCCURRENCE,SLOT_CASH,MIN_WIN,BONUS_OCCURRENCE,
PAYTABLE_VALUES,ENABLE_FULLSCREEN,ENABLE_CHECK_ORIENTATION,SHOW_CREDITS,BONUS_PRIZE=[];
function CSlotSettings(){this._init=function(){this._initSymbolSpriteSheets();this._initPaylines();this._initSymbolWin();this._initSymbolAnims();this._initSymbolsOccurence();this._initBonus()};this._initSymbolSpriteSheets=function(){s_aSymbolData=[];for(var a=1;a<NUM_SYMBOLS+1;a++){var e={images:[s_oSpriteLibrary.getSprite("symbol_"+a)],frames:{width:SYMBOL_SIZE,height:SYMBOL_SIZE,regX:0,regY:0},animations:{"static":[0,1],moving:[1,2]}};s_aSymbolData[a]=new createjs.SpriteSheet(e)}};this._initPaylines=
function(){s_aPaylineCombo=[[{row:1,col:0},{row:1,col:1},{row:1,col:2},{row:1,col:3},{row:1,col:4}],[{row:0,col:0},{row:0,col:1},{row:0,col:2},{row:0,col:3},{row:0,col:4}],[{row:2,col:0},{row:2,col:1},{row:2,col:2},{row:2,col:3},{row:2,col:4}],[{row:0,col:0},{row:1,col:1},{row:2,col:2},{row:1,col:3},{row:0,col:4}],[{row:2,col:0},{row:1,col:1},{row:0,col:2},{row:1,col:3},{row:2,col:4}]]};this._initSymbolAnims=function(){s_aSymbolAnims=[];var a={framerate:20,images:[s_oSpriteLibrary.getSprite("symbol_1_anim")],
frames:{width:SYMBOL_SIZE,height:SYMBOL_SIZE,regX:0,regY:0},animations:{"static":[0,1],anim:[1,14]}};s_aSymbolAnims[0]=new createjs.SpriteSheet(a);a={framerate:20,images:[s_oSpriteLibrary.getSprite("symbol_2_anim")],frames:{width:SYMBOL_SIZE,height:SYMBOL_SIZE,regX:0,regY:0},animations:{"static":[0,1],anim:[1,14]}};s_aSymbolAnims[1]=new createjs.SpriteSheet(a);a={framerate:20,images:[s_oSpriteLibrary.getSprite("symbol_3_anim")],frames:{width:SYMBOL_SIZE,height:SYMBOL_SIZE,regX:0,regY:0},animations:{"static":[0,
1],anim:[1,14]}};s_aSymbolAnims[2]=new createjs.SpriteSheet(a);a={framerate:20,images:[s_oSpriteLibrary.getSprite("symbol_4_anim")],frames:{width:SYMBOL_SIZE,height:SYMBOL_SIZE,regX:0,regY:0},animations:{"static":[0,1],anim:[1,14]}};s_aSymbolAnims[3]=new createjs.SpriteSheet(a);a={framerate:20,images:[s_oSpriteLibrary.getSprite("symbol_5_anim")],frames:{width:SYMBOL_SIZE,height:SYMBOL_SIZE,regX:0,regY:0},animations:{"static":[0,1],anim:[1,14]}};s_aSymbolAnims[4]=new createjs.SpriteSheet(a);a={framerate:20,
images:[s_oSpriteLibrary.getSprite("symbol_6_anim")],frames:{width:SYMBOL_SIZE,height:SYMBOL_SIZE,regX:0,regY:0},animations:{"static":[0,1],anim:[1,14]}};s_aSymbolAnims[5]=new createjs.SpriteSheet(a);a={framerate:20,images:[s_oSpriteLibrary.getSprite("symbol_7_anim")],frames:{width:SYMBOL_SIZE,height:SYMBOL_SIZE,regX:0,regY:0},animations:{"static":[0,1],anim:[1,14]}};s_aSymbolAnims[6]=new createjs.SpriteSheet(a);a={framerate:20,images:[s_oSpriteLibrary.getSprite("symbol_8_anim")],frames:{width:SYMBOL_SIZE,
height:SYMBOL_SIZE,regX:0,regY:0},animations:{"static":[0,1],anim:[1,14]}};s_aSymbolAnims[7]=new createjs.SpriteSheet(a);a={framerate:20,images:[s_oSpriteLibrary.getSprite("symbol_9_anim")],frames:{width:SYMBOL_SIZE,height:SYMBOL_SIZE,regX:0,regY:0},animations:{"static":[0,1],anim:[1,14]}};s_aSymbolAnims[8]=new createjs.SpriteSheet(a);a={framerate:20,images:[s_oSpriteLibrary.getSprite("symbol_10_anim")],frames:{width:SYMBOL_SIZE,height:SYMBOL_SIZE,regX:0,regY:0},animations:{"static":[0,1],anim:[1,
14]}};s_aSymbolAnims[9]=new createjs.SpriteSheet(a)};this._initSymbolWin=function(){s_aSymbolWin=[];s_aSymbolWin[0]=PAYTABLE_VALUES[0];s_aSymbolWin[1]=PAYTABLE_VALUES[1];s_aSymbolWin[2]=PAYTABLE_VALUES[2];s_aSymbolWin[3]=PAYTABLE_VALUES[3];s_aSymbolWin[4]=PAYTABLE_VALUES[4];s_aSymbolWin[5]=PAYTABLE_VALUES[5];s_aSymbolWin[6]=PAYTABLE_VALUES[6];s_aSymbolWin[7]=PAYTABLE_VALUES[7]};this._initSymbolsOccurence=function(){s_aRandSymbols=[];var a;for(a=0;1>a;a++)s_aRandSymbols.push(1);for(a=0;2>a;a++)s_aRandSymbols.push(2);
for(a=0;3>a;a++)s_aRandSymbols.push(3);for(a=0;4>a;a++)s_aRandSymbols.push(4);for(a=0;4>a;a++)s_aRandSymbols.push(5);for(a=0;6>a;a++)s_aRandSymbols.push(6);for(a=0;7>a;a++)s_aRandSymbols.push(7);for(a=0;7>a;a++)s_aRandSymbols.push(8);for(a=0;2>a;a++)s_aRandSymbols.push(9);for(a=0;2>a;a++)s_aRandSymbols.push(10)};this._initBonus=function(){s_aPrizeOccurence=[];var a;for(a=0;a<PERC_WIN_PRIZE_1;a++)s_aPrizeOccurence.push(0);for(a=0;a<PERC_WIN_PRIZE_2;a++)s_aPrizeOccurence.push(1);for(a=0;a<PERC_WIN_PRIZE_3;a++)s_aPrizeOccurence.push(2)};
this._init()}var s_aSymbolData,s_aPaylineCombo,s_aSymbolWin,s_aSymbolAnims,s_aRandSymbols,s_aPrizeOccurence;TEXT_MONEY="MONEY";TEXT_PLAY="PLAY";TEXT_BET="BET";TEXT_COIN="COIN";TEXT_MAX_BET="MAX BET";TEXT_INFO="INFO";TEXT_LINES="LINES";TEXT_SPIN="SPIN";TEXT_WIN="WIN";TEXT_HOLD="HOLD";TEXT_HELP_WILD="JOLLY SYMBOL CAN REPLACE ANY OTHER SYMBOL TO MAKE UP A COMBO";TEXT_HELP_BONUS="3 OR MORE PYRAMIDS LET YOU PLAY THE BONUS GAME!";TEXT_CREDITS_DEVELOPED="HOSTED BY";TEXT_CURRENCY="$";
var TEXT_PRELOADER_CONTINUE="START";TEXT_CONGRATULATIONS="Congratulations!";TEXT_MSG_SHARE1="You collected <strong>";TEXT_MSG_SHARE2=" points</strong>!<br><br>Share your score with your friends!";TEXT_MSG_SHARING1="My score is ";TEXT_MSG_SHARING2=" points! Can you do better?";
function CPreloader(){var a,e,g,b,n,k,r,f,l,d;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.addSprite("but_start","./sprites/but_start.png");s_oSpriteLibrary.loadSprites();d=new createjs.Container;s_oStage.addChild(d)};this.unload=function(){d.removeAllChildren();l.unload()};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);d.addChild(m);m=s_oSpriteLibrary.getSprite("200x200");r=createBitmap(m);r.regX=.5*m.width;r.regY=.5*m.height;r.x=CANVAS_WIDTH/2;r.y=CANVAS_HEIGHT/2-180;d.addChild(r);f=new createjs.Shape;f.graphics.beginFill("rgba(0,0,0,0.01)").drawRoundRect(r.x-100,r.y-100,200,200,10);d.addChild(f);r.mask=f;
m=s_oSpriteLibrary.getSprite("progress_bar");b=createBitmap(m);b.x=CANVAS_WIDTH/2-m.width/2;b.y=CANVAS_HEIGHT/2+50;d.addChild(b);a=m.width;e=m.height;n=new createjs.Shape;n.graphics.beginFill("rgba(0,0,0,0.01)").drawRect(b.x,b.y,1,e);d.addChild(n);b.mask=n;g=new createjs.Text("","30px "+FONT_GAME,"#fff");g.x=CANVAS_WIDTH/2;g.y=CANVAS_HEIGHT/2+100;g.textBaseline="alphabetic";g.textAlign="center";d.addChild(g);m=s_oSpriteLibrary.getSprite("but_start");l=new CTextButton(CANVAS_WIDTH/2,CANVAS_HEIGHT/
2,m,TEXT_PRELOADER_CONTINUE,"Arial","#000","bold 40",d);l.addEventListener(ON_MOUSE_UP,this._onButStartRelease,this);l.setVisible(!1);k=new createjs.Shape;k.graphics.beginFill("black").drawRect(0,0,CANVAS_WIDTH,CANVAS_HEIGHT);d.addChild(k);createjs.Tween.get(k).to({alpha:0},500).call(function(){createjs.Tween.removeTweens(k);d.removeChild(k)})};this._onButStartRelease=function(){s_oMain._onRemovePreloader()};this.refreshLoader=function(d){g.text=d+"%";100===d&&(s_oMain._onRemovePreloader(),g.visible=
!1,b.visible=!1);n.graphics.clear();d=Math.floor(d*a/100);n.graphics.beginFill("rgba(0,0,0,0.01)").drawRect(b.x,b.y,d,e)};this._init()}
function CMain(a){var e,g=0,b=0,n=STATE_LOADING,k,r;this.initContainer=function(){var a=document.getElementById("canvas");s_oStage=new createjs.Stage(a);createjs.Touch.enable(s_oStage);s_bMobile=jQuery.browser.mobile;!1===s_bMobile&&s_oStage.enableMouseOver(20);s_iPrevTime=(new Date).getTime();createjs.Ticker.setFPS(30);createjs.Ticker.addEventListener("tick",this._update);navigator.userAgent.match(/Windows Phone/i)&&(DISABLE_SOUND_MOBILE=!0);s_oSpriteLibrary=new CSpriteLibrary;k=new CPreloader};
this.preloaderReady=function(){this._loadImages();!1!==DISABLE_SOUND_MOBILE&&!1!==s_bMobile||this._initSounds();e=!0};this.soundLoaded=function(){g++;k.refreshLoader(Math.floor(g/b*100))};this._initSounds=function(){Howler.mute(!s_bAudioActive);s_aSoundsInfo=[];s_aSoundsInfo.push({path:"./sounds/",filename:"win",loop:!0,volume:1,ingamename:"win"});s_aSoundsInfo.push({path:"./sounds/",filename:"press_but",loop:!1,volume:1,ingamename:"press_but"});s_aSoundsInfo.push({path:"./sounds/",filename:"reel_stop",
loop:!1,volume:1,ingamename:"reel_stop"});s_aSoundsInfo.push({path:"./sounds/",filename:"reels",loop:!1,volume:1,ingamename:"reels"});s_aSoundsInfo.push({path:"./sounds/",filename:"choose_bonus_item",loop:!1,volume:1,ingamename:"choose_bonus_item"});s_aSoundsInfo.push({path:"./sounds/",filename:"start_reel",loop:!1,volume:1,ingamename:"start_reel"});s_aSoundsInfo.push({path:"./sounds/",filename:"press_hold",loop:!1,volume:1,ingamename:"press_hold"});s_aSoundsInfo.push({path:"./sounds/",filename:"soundtrack",
loop:!0,volume:1,ingamename:"soundtrack"});b+=s_aSoundsInfo.length;s_aSounds=[];for(var a=0;a<s_aSoundsInfo.length;a++)this.tryToLoadSound(s_aSoundsInfo[a],!1)};this.tryToLoadSound=function(a,f){setTimeout(function(){s_aSounds[a.ingamename]=new Howl({src:[a.path+a.filename+".mp3"],autoplay:!1,preload:!0,loop:a.loop,volume:a.volume,onload:s_oMain.soundLoaded,onloaderror:function(a,d){for(var f=0;f<s_aSoundsInfo.length;f++)if(a===s_aSounds[s_aSoundsInfo[f].ingamename]._sounds[0]._id){s_oMain.tryToLoadSound(s_aSoundsInfo[f],
!0);break}},onplayerror:function(a){for(var d=0;d<s_aSoundsInfo.length;d++)if(a===s_aSounds[s_aSoundsInfo[d].ingamename]._sounds[0]._id){s_aSounds[s_aSoundsInfo[d].ingamename].once("unlock",function(){s_aSounds[s_aSoundsInfo[d].ingamename].play();"soundtrack"===s_aSoundsInfo[d].ingamename&&null!==s_oGame&&setVolume("soundtrack",SOUNDTRACK_VOLUME_IN_GAME)});break}}})},f?200:0)};this._loadImages=function(){s_oSpriteLibrary.init(this._onImagesLoaded,this._onAllImagesLoaded,this);s_oSpriteLibrary.addSprite("but_exit",
"./sprites/but_exit.png");s_oSpriteLibrary.addSprite("bg_menu","./sprites/bg_menu.jpg");s_oSpriteLibrary.addSprite("bg_game","./sprites/bg_game.jpg");s_oSpriteLibrary.addSprite("paytable","./sprites/paytable.jpg");s_oSpriteLibrary.addSprite("but_play_bg","./sprites/but_play_bg.png");s_oSpriteLibrary.addSprite("mask_slot","./sprites/mask_slot.png");s_oSpriteLibrary.addSprite("spin_but","./sprites/but_spin_bg.png");s_oSpriteLibrary.addSprite("coin_but","./sprites/but_coin_bg.png");s_oSpriteLibrary.addSprite("info_but",
"./sprites/but_info_bg.png");s_oSpriteLibrary.addSprite("bet_but","./sprites/bet_but.png");s_oSpriteLibrary.addSprite("win_frame_anim","./sprites/win_frame_anim.png");s_oSpriteLibrary.addSprite("but_lines_bg","./sprites/but_lines_bg.png");s_oSpriteLibrary.addSprite("but_maxbet_bg","./sprites/but_maxbet_bg.png");s_oSpriteLibrary.addSprite("audio_icon","./sprites/audio_icon.png");s_oSpriteLibrary.addSprite("hit_area_col","./sprites/hit_area_col.png");s_oSpriteLibrary.addSprite("hold_col","./sprites/hold_col.png");
s_oSpriteLibrary.addSprite("bonus_bg","./sprites/bonus_bg.jpg");s_oSpriteLibrary.addSprite("bonus_item","./sprites/bonus_item.png");s_oSpriteLibrary.addSprite("bonus_prize","./sprites/bonus_prize.png");s_oSpriteLibrary.addSprite("but_fullscreen","./sprites/but_fullscreen.png");s_oSpriteLibrary.addSprite("msg_box","./sprites/msg_box.png");s_oSpriteLibrary.addSprite("logo_ctl","./sprites/logo_ctl.png");s_oSpriteLibrary.addSprite("but_credits","./sprites/but_credits.png");for(var a=1;a<NUM_SYMBOLS+1;a++)s_oSpriteLibrary.addSprite("symbol_"+
a,"./sprites/symbol_"+a+".png"),s_oSpriteLibrary.addSprite("symbol_"+a+"_anim","./sprites/symbol_"+a+"_anim.png");for(a=1;a<NUM_PAYLINES+1;a++)s_oSpriteLibrary.addSprite("payline_"+a,"./sprites/payline_"+a+".png");b+=s_oSpriteLibrary.getNumSprites();s_oSpriteLibrary.loadSprites()};this._onImagesLoaded=function(){g++;k.refreshLoader(Math.floor(g/b*100))};this._onAllImagesLoaded=function(){};this.onAllPreloaderImagesLoaded=function(){this._loadImages()};this._onRemovePreloader=function(){k.unload();
s_oSoundTrack=playSound("soundtrack",1,!0);this.gotoMenu()};this.gotoMenu=function(){new CMenu;n=STATE_MENU};this.gotoGame=function(){r=new CGame(f);n=STATE_GAME};this.gotoHelp=function(){new CHelp;n=STATE_HELP};this.stopUpdate=function(){e=!1;createjs.Ticker.paused=!0;$("#block_game").css("display","block");!1!==DISABLE_SOUND_MOBILE&&!1!==s_bMobile||Howler.mute(!0)};this.startUpdate=function(){s_iPrevTime=(new Date).getTime();e=!0;createjs.Ticker.paused=!1;$("#block_game").css("display","none");
(!1===DISABLE_SOUND_MOBILE||!1===s_bMobile)&&s_bAudioActive&&Howler.mute(!1)};this._update=function(a){if(!1!==e){var d=(new Date).getTime();s_iTimeElaps=d-s_iPrevTime;s_iCntTime+=s_iTimeElaps;s_iCntFps++;s_iPrevTime=d;1E3<=s_iCntTime&&(s_iCurFps=s_iCntFps,s_iCntTime-=1E3,s_iCntFps=0);n===STATE_GAME&&r.update();s_oStage.update(a)}};s_oMain=this;var f=a;PAYTABLE_VALUES=[];for(var l=0;8>l;l++)PAYTABLE_VALUES[l]=a["paytable_symbol_"+(l+1)];ENABLE_FULLSCREEN=a.fullscreen;ENABLE_CHECK_ORIENTATION=a.check_orientation;
SHOW_CREDITS=f.show_credits;this.initContainer()}var s_bMobile,s_bAudioActive=!1,s_iCntTime=0,s_iTimeElaps=0,s_iPrevTime=0,s_iCntFps=0,s_iCurFps=0,s_oDrawLayer,s_oStage,s_oMain,s_oSpriteLibrary,s_oSoundTrack=null,s_bFullscreen=!1,s_aSoundsInfo;
function CTextButton(a,e,g,b,n,k,r){var f,l,d,m,y,h,p,q,x,D;this._init=function(a,b,h,e,g,p,k){f=!1;m=[];y=[];D=createBitmap(h);l=h.width;d=h.height;x=new createjs.Text(e,k+"px "+g,p);x.textAlign="center";x.shadow=new createjs.Shadow("#000",2,2,2);x.textBaseline="middle";x.lineHeight=24;x.x=h.width/2;x.y=h.height/2;q=new createjs.Container;q.x=a;q.y=b;q.regX=h.width/2;q.regY=h.height/2;q.addChild(D,x);q.cursor="pointer";s_oStage.addChild(q);this._initListener()};this.unload=function(){q.off("mousedown",
h);q.off("pressup",p);s_oStage.removeChild(q)};this.setVisible=function(a){q.visible=a};this.enable=function(){f=!1;D.filters=[];D.cache(0,0,l,d)};this.disable=function(){f=!0;var a=(new createjs.ColorMatrix).adjustSaturation(-100);D.filters=[new createjs.ColorMatrixFilter(a)];D.cache(0,0,l,d)};this._initListener=function(){h=q.on("mousedown",this.buttonDown);p=q.on("pressup",this.buttonRelease)};this.addEventListener=function(a,d,f){m[a]=d;y[a]=f};this.buttonRelease=function(){f||(playSound("press_but",
1,!1),q.scaleX=1,q.scaleY=1,m[ON_MOUSE_UP]&&m[ON_MOUSE_UP].call(y[ON_MOUSE_UP]))};this.buttonDown=function(){f||(q.scaleX=.9,q.scaleY=.9,m[ON_MOUSE_DOWN]&&m[ON_MOUSE_DOWN].call(y[ON_MOUSE_DOWN]))};this.setPosition=function(a,d){q.x=a;q.y=d};this.changeText=function(a){x.text=a};this.setX=function(a){q.x=a};this.setY=function(a){q.y=a};this.getButtonImage=function(){return q};this.getX=function(){return q.x};this.getY=function(){return q.y};this._init(a,e,g,b,n,k,r);return this}
function CGfxButton(a,e,g,b){var n,k,r,f,l,d,m,y,h;this._init=function(a,d,b,m){n=!1;f=[];l=[];h=createBitmap(b);h.x=a;h.y=d;k=b.width;r=b.height;h.regX=b.width/2;h.regY=b.height/2;h.cursor="pointer";!1!==m&&s_oStage.addChild(h);this._initListener()};this.unload=function(){h.off("mousedown",m);h.off("pressup",y);s_oStage.removeChild(h)};this.setVisible=function(a){h.visible=a};this.enable=function(){n=!1;h.filters=[];h.cache(0,0,k,r)};this.disable=function(){n=!0;var a=(new createjs.ColorMatrix).adjustSaturation(-100).adjustBrightness(40);
h.filters=[new createjs.ColorMatrixFilter(a)];h.cache(0,0,k,r)};this._initListener=function(){m=h.on("mousedown",this.buttonDown);y=h.on("pressup",this.buttonRelease)};this.addEventListener=function(a,d,b){f[a]=d;l[a]=b};this.addEventListenerWithParams=function(a,b,h,m){f[a]=b;l[a]=h;d=m};this.buttonRelease=function(){n||(playSound("press_but",1,!1),h.scaleX=1,h.scaleY=1,f[ON_MOUSE_UP]&&f[ON_MOUSE_UP].call(l[ON_MOUSE_UP],d))};this.buttonDown=function(){n||(h.scaleX=.9,h.scaleY=.9,f[ON_MOUSE_DOWN]&&
f[ON_MOUSE_DOWN].call(l[ON_MOUSE_DOWN],d))};this.setPosition=function(a,d){h.x=a;h.y=d};this.setX=function(a){h.x=a};this.setY=function(a){h.y=a};this.getButtonImage=function(){return h};this.getX=function(){return h.x};this.getY=function(){return h.y};this.getSprite=function(){return h};this._init(a,e,g,b);return this}
function CToggle(a,e,g,b,n){var k,r,f,l,d,m,y;this._init=function(a,d,b,m,e){y=void 0!==e?e:s_oStage;r=[];f=[];e=new createjs.SpriteSheet({images:[b],frames:{width:b.width/2,height:b.height,regX:b.width/2/2,regY:b.height/2},animations:{state_true:[0],state_false:[1]}});k=m;l=createSprite(e,"state_"+k,b.width/2/2,b.height/2,b.width/2,b.height);l.x=a;l.y=d;l.stop();s_bMobile||(l.cursor="pointer");y.addChild(l);this._initListener()};this.unload=function(){l.off("mousedown",d);l.off("pressup",m);y.removeChild(l)};
this._initListener=function(){d=l.on("mousedown",this.buttonDown);m=l.on("pressup",this.buttonRelease)};this.addEventListener=function(a,d,b){r[a]=d;f[a]=b};this.setCursorType=function(a){l.cursor=a};this.setActive=function(a){k=a;l.gotoAndStop("state_"+k)};this.buttonRelease=function(){l.scaleX=1;l.scaleY=1;playSound("press_but",1,!1);k=!k;l.gotoAndStop("state_"+k);r[ON_MOUSE_UP]&&r[ON_MOUSE_UP].call(f[ON_MOUSE_UP],k)};this.buttonDown=function(){l.scaleX=.9;l.scaleY=.9;r[ON_MOUSE_DOWN]&&r[ON_MOUSE_DOWN].call(f[ON_MOUSE_DOWN])};
this.setPosition=function(a,d){l.x=a;l.y=d};this._init(a,e,g,b,n)}
function CBetBut(a,e,g){var b,n,k,r=[],f;this._init=function(a,d,m){b=!1;n=[];k=[];m=s_oSpriteLibrary.getSprite("bet_but");var e=new createjs.SpriteSheet({images:[m],frames:{width:m.width/2,height:m.height,regX:0,regY:0},animations:{on:[0,1],off:[1,2]}});f=createSprite(e,"on",0,0,m.width/2,m.height);f.stop();f.x=a;f.y=d;f.regX=m.width/2;f.regY=m.height/2;f.cursor="pointer";s_oStage.addChild(f);this._initListener()};this.unload=function(){f.off("mousedown",this.buttonDown);f.off("pressup",this.buttonRelease);
s_oStage.removeChild(f)};this.disable=function(a){b=a};this.setVisible=function(a){f.visible=a};this.setOn=function(){f.gotoAndStop("on")};this.setOff=function(){f.gotoAndStop("off")};this._initListener=function(){f.on("mousedown",this.buttonDown);f.on("pressup",this.buttonRelease)};this.addEventListener=function(a,d,b){n[a]=d;k[a]=b};this.addEventListenerWithParams=function(a,d,b,f){n[a]=d;k[a]=b;r=f};this.buttonRelease=function(){n[ON_MOUSE_UP]&&!1===b&&(playSound("press_but",1,!1),n[ON_MOUSE_UP].call(k[ON_MOUSE_UP],
r))};this.buttonDown=function(){n[ON_MOUSE_DOWN]&&!1===b&&n[ON_MOUSE_DOWN].call(k[ON_MOUSE_DOWN],r)};this.setPosition=function(a,d){f.x=a;f.y=d};this.setX=function(a){f.x=a};this.setY=function(a){f.y=a};this.getButtonImage=function(){return f};this.getX=function(){return f.x};this.getY=function(){return f.y};this._init(a,e,g)}
function CMenu(){var a,e,g,b,n,k,r,f=null,l=null,d,m,y,h,p;this._init=function(){d=createBitmap(s_oSpriteLibrary.getSprite("bg_menu"));s_oStage.addChild(d);var q=s_oSpriteLibrary.getSprite("but_play_bg");m=new CTextButton(CANVAS_WIDTH/2,CANVAS_HEIGHT-80,q,TEXT_PLAY,FONT_GAME,"#ffde00",58);m.addEventListener(ON_MOUSE_UP,this._onButPlayRelease,this);if(!1===DISABLE_SOUND_MOBILE||!1===s_bMobile)q=s_oSpriteLibrary.getSprite("audio_icon"),n=CANVAS_WIDTH-q.width/4-10,k=q.height/2+10,h=new CToggle(n,k,q,
s_bAudioActive,s_oStage),h.addEventListener(ON_MOUSE_UP,this._onAudioToggle,this),setVolume("soundtrack",1);SHOW_CREDITS?(q=s_oSpriteLibrary.getSprite("but_credits"),a=q.height/2+10,e=q.height/2+10,y=new CGfxButton(a,e,q,s_oStage),y.addEventListener(ON_MOUSE_UP,this._onButCreditsRelease,this),g=a+q.width+10,b=e):(g=q.height/2+10,b=q.height/2+10);q=window.document;var x=q.documentElement;f=x.requestFullscreen||x.mozRequestFullScreen||x.webkitRequestFullScreen||x.msRequestFullscreen;l=q.exitFullscreen||
q.mozCancelFullScreen||q.webkitExitFullscreen||q.msExitFullscreen;!1===ENABLE_FULLSCREEN&&(f=!1);f&&screenfull.enabled&&(q=s_oSpriteLibrary.getSprite("but_fullscreen"),r=new CToggle(g,b,q,s_bFullscreen,s_oStage),r.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},600).call(function(){p.visible=!1});this.refreshButtonPos(s_iOffsetX,s_iOffsetY)};
this.refreshButtonPos=function(d,m){!1!==DISABLE_SOUND_MOBILE&&!1!==s_bMobile||h.setPosition(n-d,m+k);f&&screenfull.enabled&&r.setPosition(g+d,b+m);SHOW_CREDITS&&y.setPosition(a+d,e+m)};this.unload=function(){m.unload();m=null;if(!1===DISABLE_SOUND_MOBILE||!1===s_bMobile)h.unload(),h=null;SHOW_CREDITS&&y.unload();f&&screenfull.enabled&&r.unload();s_oStage.removeAllChildren();s_oMenu=null};this._onButPlayRelease=function(){this.unload();s_oMain.gotoGame();$(s_oMain).trigger("start_session")};this._onAudioToggle=
function(){Howler.mute(s_bAudioActive);s_bAudioActive=!s_bAudioActive};this._onButCreditsRelease=function(){new CCreditsPanel};this.resetFullscreenBut=function(){f&&screenfull.enabled&&r.setActive(s_bFullscreen)};this._onFullscreenRelease=function(){s_bFullscreen?l.call(window.document):f.call(window.document.documentElement);sizeHandler()};s_oMenu=this;this._init()}var s_oMenu=null;
function CGame(a){var e=!1,g,b,n=!0,k,r,f,l,d,m,y,h,p,q,x,D=0,B,A,C,I,G,L,H,v,O,S,R,w,T,z,M=null,Q;this._init=function(){k=GAME_STATE_IDLE;g=!0;A=x=l=r=0;L=[0,1,2,3,4];f=L[0];d=NUM_PAYLINES;q=TOTAL_MONEY;h=MIN_BET;p=h*d;H=[];for(var a=0;a<NUM_ROWS;a++){H[a]=[];for(var c=0;c<NUM_REELS;c++)H[a][c]=0}s_oTweenController=new CTweenController;w=createBitmap(s_oSpriteLibrary.getSprite("bg_game"));s_oStage.addChild(w);this._initReels();T=createBitmap(s_oSpriteLibrary.getSprite("mask_slot"));s_oStage.addChild(T);
this._initStaticSymbols();this._initHitAreaColumn();z=new CInterface(h,p,q);Q=new CBonusPanel;M=new CPayTablePanel;q<p&&z.disableSpin();setVolume("soundtrack",SOUNDTRACK_VOLUME_IN_GAME);e=!0};this.unload=function(){stopSound("reels");s_oStage.removeChild(w);s_oStage.removeChild(T);z.unload();M.unload();for(var a=0;a<C.length;a++)C[a].unload();for(a=0;a<NUM_ROWS;a++)for(var c=0;c<NUM_REELS;c++)I[a][c].unload();Q.unload()};this._initReels=function(){var a=REEL_OFFSET_X,c=REEL_OFFSET_Y,d=0;C=[];for(var b=
0;b<NUM_REELS;b++)C[b]=new CReelColumn(b,a,c,d),C[b+NUM_REELS]=new CReelColumn(b+NUM_REELS,a,c+SYMBOL_SIZE*NUM_ROWS,d),a+=SYMBOL_SIZE+SPACE_BETWEEN_SYMBOLS,d+=REEL_DELAY};this._initStaticSymbols=function(){var a=REEL_OFFSET_X,c=REEL_OFFSET_Y;I=[];for(var d=0;d<NUM_ROWS;d++){I[d]=[];for(var b=0;b<NUM_REELS;b++){var f=new CStaticSymbolCell(d,b,a,c);I[d][b]=f;a+=SYMBOL_SIZE+SPACE_BETWEEN_SYMBOLS}a=REEL_OFFSET_X;c+=SYMBOL_SIZE}};this._initHitAreaColumn=function(){R=[];S=[];d=376;b=116;for(var a=0;a<NUM_REELS;a++){var c=
createBitmap(s_oSpriteLibrary.getSprite("hold_col"));c.x=d;c.y=b;c.visible=!1;s_oStage.addChild(c);d+=150;S.push(c);R[a]=!1}v=[];O=[];var d=381,b=108;a=s_oSpriteLibrary.getSprite("hit_area_col");for(c=0;c<NUM_REELS;c++){var f=new createjs.Text(TEXT_HOLD,"30px "+FONT_GAME,"#ffffff");f.visible=!1;f.x=d+a.width/2;f.y=b+a.height-20;f.shadow=new createjs.Shadow("#000",1,1,2);f.textAlign="center";s_oStage.addChild(f);v[c]=f;f=new CGfxButton(d+a.width/2,b+a.height/2,a);f.setVisible(!1);f.addEventListenerWithParams(ON_MOUSE_UP,
this._onHitAreaCol,this,{index:c});d+=150;O.push(f)}};this.generateFinalSymbols=function(){for(var a=0;a<NUM_ROWS;a++)for(var c=0;c<NUM_REELS;c++)!1===C[c].isHold()&&(H[a][c]=s_aRandSymbols[Math.floor(Math.random()*s_aRandSymbols.length)]);a=this._checkForCombos();this._checkForBonus();return a};this._checkForCombos=function(){G=[];for(var a=B=0;a<d;a++){var c=s_aPaylineCombo[a],b=[],f=H[c[0].row][c[0].col];if(f!==BONUS_SYMBOL){var m=1,e=1;for(b.push({row:c[0].row,col:c[0].col,value:H[c[0].row][c[0].col]});f===
WILD_SYMBOL&&e<NUM_REELS;)m++,f=H[c[e].row][c[e].col],b.push({row:c[e].row,col:c[e].col,value:H[c[e].row][c[e].col]}),e++;for(;e<c.length;e++)if(H[c[e].row][c[e].col]===f||H[c[e].row][c[e].col]===WILD_SYMBOL){if(H[c[e].row][c[e].col]===BONUS_SYMBOL)break;m++;b.push({row:c[e].row,col:c[e].col,value:H[c[e].row][c[e].col]})}else break;f!==BONUS_SYMBOL&&0<s_aSymbolWin[f-1][m-1]&&(B+=s_aSymbolWin[f-1][m-1],G.push({line:a+1,amount:s_aSymbolWin[f-1][m-1],num_win:m,value:f,list:b}))}}return B>p?!0:!1};this._checkForBonus=
function(){b=!1;D=0;for(var a=[],c=0;c<NUM_ROWS;c++)for(var d=0;d<NUM_REELS;d++)H[c][d]===BONUS_SYMBOL&&(a.push({row:c,col:d,value:H[c][d]}),D++);D>=NUM_SYMBOLS_FOR_BONUS&&(G.push({line:-1,amount:0,num_win:D,value:BONUS_SYMBOL,list:a}),5<D&&(D=5),b=!0)};this._generateRandSymbols=function(){for(var a=[],c=0;c<NUM_ROWS;c++)a[c]=s_aRandSymbols[Math.floor(Math.random()*s_aRandSymbols.length)];return a};this.reelArrived=function(a,c){if(r>MIN_REEL_LOOPS)if(f===c){if(!1===C[a].isReadyToStop()){var d=a;
a<NUM_REELS?(d+=NUM_REELS,C[d].setReadyToStop(),C[a].restart([H[0][a],H[1][a],H[2][a]],!0)):(d-=NUM_REELS,C[d].setReadyToStop(),C[a].restart([H[0][d],H[1][d],H[2][d]],!0))}}else C[a].restart(this._generateRandSymbols(),!1);else C[a].restart(this._generateRandSymbols(),!1),0===a&&r++};this.increaseReelLoops=function(){r+=2};this.stopNextReel=function(){l++;0===l%2&&(playSound("reel_stop",.3,!1),f=L[l/2],l===2*NUM_REELS&&this._endReelAnimation())};this._endReelAnimation=function(){stopSound("reels");
l=r=0;f=L[0];for(var a=0;a<NUM_REELS;a++)R[a]=!1,S[a].visible=!1,C[a].setHold(!1),C[a+NUM_REELS].setHold(!1);x=0;if(0<G.length){for(var c=0;c<G.length;c++){M.highlightCombo(G[c].value,G[c].num_win);-1!==G[c].line&&z.showLine(G[c].line);var d=G[c].list;for(a=0;a<d.length;a++)I[d[a].row][d[a].col].show(d[a].value)}B*=h;q+=B;SLOT_CASH-=B;0<B&&(z.refreshMoney(q),z.refreshWinText(B));m=0;k=GAME_STATE_SHOW_ALL_WIN;playSound("win",1,!1);g=!0;!1===b&&(z.disableBetBut(!1),z.enableGuiButtons())}else g?(this.enableColumnHitArea(),
g=!1,z.enableSpin(),z.disableMaxBet()):(z.disableBetBut(!1),z.enableGuiButtons(),g=!0),z.refreshWinText(0),k=GAME_STATE_IDLE;q<p&&z.disableSpin();A++;A===N&&(A=0,$(s_oMain).trigger("show_interlevel_ad"));$(s_oMain).trigger("save_score",q)};this.hidePayTable=function(){M.hide()};this._showWin=function(){if(0<y){stopSound("win");if(-1!==G[y-1].line){var a=G[y-1].line;z.hideLine(a)}a=G[y-1].list;for(var c=0;c<a.length;c++)I[a[c].row][a[c].col].stopAnim()}y===G.length&&(y=0);-1!==G[y].line&&(a=G[y].line,
z.showLine(a));a=G[y].list;for(c=0;c<a.length;c++)I[a[c].row][a[c].col].show(a[c].value);y++};this._hideAllWins=function(){for(var a=0;a<G.length;a++)for(var c=G[a].list,d=0;d<c.length;d++)I[c[d].row][c[d].col].stopAnim();z.hideAllLines();y=m=0;m=TIME_SHOW_WIN;k=GAME_STATE_SHOW_WIN;b&&Q.show(D,h)};this.enableColumnHitArea=function(){for(var a=0;a<NUM_REELS;a++)v[a].visible=!0,O[a].setVisible(!0)};this.disableColumnHitArea=function(){for(var a=0;a<NUM_REELS;a++)v[a].visible=!1,O[a].setVisible(!1)};
this.activateLines=function(a){d=a;this.removeWinShowing();p=a=h*d;z.refreshTotalBet(p);z.refreshNumLines(d);a>q?z.disableSpin():z.enableSpin()};this.addLine=function(){d===NUM_PAYLINES?d=1:d++;var a=h*d;p=a;p=Math.floor(100*p)/100;z.refreshTotalBet(p);z.refreshNumLines(d);a>q?z.disableSpin():z.enableSpin()};this.changeCoinBet=function(){var a=Math.floor(100*(h+.05))/100;a>MAX_BET?(h=MIN_BET,p=h*d,p=Math.floor(100*p)/100,z.refreshBet(h),z.refreshTotalBet(p),a=p):(a*=d,h+=.05,h=Math.floor(100*h)/100,
p=a,p=Math.floor(100*p)/100,z.refreshBet(h),z.refreshTotalBet(p));a>q?z.disableSpin():z.enableSpin()};this.onMaxBet=function(){var a=MAX_BET;d=NUM_PAYLINES;a*=d;h=MAX_BET;p=a;z.refreshBet(h);z.refreshTotalBet(p);z.refreshNumLines(d);a>q?z.disableSpin():(z.enableSpin(),this.onSpin())};this._onHitAreaCol=function(a){a=a.index;!0===R[a]?(R[a]=!1,S[a].visible=!1,v[a].visible=!0,x--,C[a].setHold(!1),C[a+NUM_REELS].setHold(!1)):x<MAX_NUM_HOLD&&(R[a]=!0,x++,S[a].visible=!0,v[a].visible=!1,C[a].setHold(!0),
C[a+NUM_REELS].setHold(!0),playSound("press_hold",1,!1))};this.removeWinShowing=function(){M.resetHighlightCombo();z.resetWin();for(var a=0;a<NUM_ROWS;a++)for(var c=0;c<NUM_REELS;c++)I[a][c].hide();for(a=0;a<C.length;a++)C[a].activate();k=GAME_STATE_IDLE};this.endBonus=function(a){a*=h;q+=a;z.refreshMoney(q);SLOT_CASH-=a;z.disableBetBut(!1);z.enableGuiButtons();$(s_oMain).trigger("bonus_end",q);$(s_oMain).trigger("save_score",q)};this.onSpin=function(){stopSound("win");playSound("reels",.3,!1);this.disableColumnHitArea();
z.disableBetBut(!0);this.removeWinShowing();MIN_WIN=s_aSymbolWin[0][s_aSymbolWin[0].length-1];for(var a=0;a<s_aSymbolWin.length;a++)for(var c=s_aSymbolWin[a],d=0;d<c.length;d++)0!==c[d]&&c[d]<MIN_WIN&&(MIN_WIN=c[d]);MIN_WIN*=h;g&&(q-=p,z.refreshMoney(q),SLOT_CASH+=p,$(s_oMain).trigger("bet_placed",{bet:h,tot_bet:p}));if(!n&&C[0].visible&&C[1].visible&&this._checkForCombos())this._assignWin();else if(SLOT_CASH<MIN_WIN){do a=this.generateFinalSymbols();while(!0===a||b)}else if(Math.floor(100*Math.random())>
WIN_OCCURRENCE){do a=this.generateFinalSymbols();while(!0===a||b)}else this._assignWin();z.hideAllLines();z.disableGuiButtons();n=!1;k=GAME_STATE_SPINNING};this._assignWin=function(){if(SLOT_CASH<BONUS_PRIZE[0][0]*h){var a=0;do{var c=this.generateFinalSymbols();a++}while((!1===c||B*h>SLOT_CASH||b)&&1E4>=a)}else if(Math.floor(100*Math.random())>=BONUS_OCCURRENCE){a=0;do c=this.generateFinalSymbols(),a++;while((!1===c||B*h>SLOT_CASH||b)&&1E4>=a)}else{a=0;do{c=this.generateFinalSymbols();var d=0;b&&
(d=D-3);a++}while((!1===c||B*h+BONUS_PRIZE[d][0]*h>SLOT_CASH||!1===b)&&1E4>=a)}if(1E4<a){do c=this.generateFinalSymbols();while(!0===c||b)}};this.onInfoClicked=function(){k!==GAME_STATE_SPINNING&&(M.isVisible()?M.hide():M.show())};this.onExit=function(){this.unload();s_oMain.gotoMenu();$(s_oMain).trigger("end_session");$(s_oMain).trigger("share_event",{img:"200x200.jpg",title:TEXT_CONGRATULATIONS,msg:TEXT_MSG_SHARE1+q+TEXT_MSG_SHARE2,msg_share:TEXT_MSG_SHARING1+q+TEXT_MSG_SHARING2})};this.getState=
function(){return k};this.update=function(){if(!1!==e)switch(k){case GAME_STATE_SPINNING:for(var a=0;a<C.length;a++)C[a].update(f);break;case GAME_STATE_SHOW_ALL_WIN:m+=s_iTimeElaps;m>TIME_SHOW_ALL_WINS&&this._hideAllWins();break;case GAME_STATE_SHOW_WIN:m+=s_iTimeElaps,m>TIME_SHOW_WIN&&(m=0,this._showWin())}};s_oGame=this;WIN_OCCURRENCE=a.win_occurrence;SLOT_CASH=a.slot_cash;BONUS_OCCURRENCE=a.bonus_occurrence;MIN_REEL_LOOPS=a.min_reel_loop;REEL_DELAY=a.reel_delay;TIME_SHOW_WIN=a.time_show_win;TIME_SHOW_ALL_WINS=
a.time_show_all_wins;TOTAL_MONEY=a.money;MIN_BET=a.min_bet;MAX_BET=a.max_bet;MAX_NUM_HOLD=a.max_hold;BONUS_PRIZE[0]=a.bonus_prize_for_3_symbol;BONUS_PRIZE[1]=a.bonus_prize_for_4_symbol;BONUS_PRIZE[2]=a.bonus_prize_for_5_symbol;PERC_WIN_PRIZE_1=a.perc_win_prize_1;PERC_WIN_PRIZE_2=a.perc_win_prize_2;PERC_WIN_PRIZE_3=a.perc_win_prize_3;var N=a.num_spin_ads_showing;new CSlotSettings;this._init()}var s_oGame,s_oTweenController;
function CReelColumn(a,e,g,b){var n,k,r,f,l,d,m,y,h,p,q,x,D,B,A;this._init=function(a,b,e,g){f=r=k=n=!1;y=0;l=a;m=g;d=l<NUM_REELS?l:l-NUM_REELS;p=0;q=MAX_FRAMES_REEL_EASE;h=REEL_STATE_START;x=e;D=x+SYMBOL_SIZE*NUM_ROWS;this.initContainer(b,e)};this.initContainer=function(a,d){A=new createjs.Container;A.x=a;A.y=d;var b=0;B=[];for(var f=0;f<NUM_ROWS;f++){var e=createSprite(s_aSymbolData[s_aRandSymbols[Math.floor(Math.random()*s_aRandSymbols.length)]],"static",0,0,SYMBOL_SIZE,SYMBOL_SIZE);e.stop();e.x=
0;e.y=b;A.addChild(e);B[f]=e;b+=SYMBOL_SIZE}s_oStage.addChild(A)};this.unload=function(){s_oStage.removeChild(A)};this.activate=function(){x=A.y;D=x+SYMBOL_SIZE*NUM_ROWS;n=!0};this._setSymbol=function(a){A.removeAllChildren();for(var d=0,b=0;b<a.length;b++){var f=new createSprite(s_aSymbolData[a[b]],"static",0,0,SYMBOL_SIZE,SYMBOL_SIZE);f.stop();f.x=0;f.y=d;A.addChild(f);B[b]=f;d+=SYMBOL_SIZE}};this.setHold=function(a){n=!1;f=a;y=0};this.restart=function(a,d){A.y=x=REEL_START_Y;D=x+SYMBOL_SIZE*NUM_ROWS;
this._setSymbol(a);if(k=d){p=0;q=MAX_FRAMES_REEL_EASE;h=REEL_STATE_STOP;for(var b=0;b<NUM_ROWS;b++)B[b].gotoAndStop("static");r=!0}else for(b=0;b<NUM_ROWS;b++)B[b].gotoAndStop("moving")};this.setReadyToStop=function(){p=0;q=MAX_FRAMES_REEL_EASE;h=REEL_STATE_STOP};this.isReadyToStop=function(){return k};this.isHold=function(){return f};this._updateStart=function(){0===p&&l<NUM_REELS&&playSound("start_reel",.3,!1);p++;p>q&&(p=0,q/=2,h++,x=A.y,D=x+SYMBOL_SIZE*NUM_ROWS);var a=s_oTweenController.easeInBack(p,
0,1,q);a=s_oTweenController.tweenValue(x,D,a);A.y=a};this._updateMoving=function(){p++;p>q&&(p=0,x=A.y,D=x+SYMBOL_SIZE*NUM_ROWS);var a=s_oTweenController.easeLinear(p,0,1,q);a=s_oTweenController.tweenValue(x,D,a);A.y=a};this._updateStopping=function(){p++;if(p>=q)n=!1,p=0,q=MAX_FRAMES_REEL_EASE,h=REEL_STATE_START,y=0,k=!1,r&&(r=!1,A.y=REEL_OFFSET_Y),s_oGame.stopNextReel();else{var a=s_oTweenController.easeOutCubic(p,0,1,q);a=s_oTweenController.tweenValue(x,D,a);A.y=a}};this.update=function(a){if(!1!==
n&&(y++,y>m))if(f)a===l&&(n=!1,s_oGame.stopNextReel(),s_oGame.stopNextReel(),0===l&&s_oGame.increaseReelLoops());else switch(!1===k&&A.y>REEL_ARRIVAL_Y&&s_oGame.reelArrived(l,d),h){case REEL_STATE_START:this._updateStart();break;case REEL_STATE_MOVING:this._updateMoving();break;case REEL_STATE_STOP:this._updateStopping()}};this._init(a,e,g,b)}
function CInterface(a,e,g){var b,n,k,r,f,l,d,m,y,h,p,q,x,D,B,A,C,I,G,L,H=null,v=null;this._init=function(a,e,g){var w=s_oSpriteLibrary.getSprite("but_exit");k=CANVAS_WIDTH-w.width/2-10;r=w.height/2+10;y=new CGfxButton(k,r,w,!0);y.addEventListener(ON_MOUSE_UP,this._onExit,this);!1===DISABLE_SOUND_MOBILE||!1===s_bMobile?(f=y.getX()-w.width,l=w.height/2+10,x=new CToggle(f,l,s_oSpriteLibrary.getSprite("audio_icon"),s_bAudioActive,s_oStage),x.addEventListener(ON_MOUSE_UP,this._onAudioToggle,this),b=f-
w.width):b=k-w.width;n=w.height/2+10;w=window.document;var O=w.documentElement;H=O.requestFullscreen||O.mozRequestFullScreen||O.webkitRequestFullScreen||O.msRequestFullscreen;v=w.exitFullscreen||w.mozCancelFullScreen||w.webkitExitFullscreen||w.msExitFullscreen;!1===ENABLE_FULLSCREEN&&(H=!1);H&&screenfull.enabled&&(w=s_oSpriteLibrary.getSprite("but_fullscreen"),L=new CToggle(b,n,w,s_bFullscreen,s_oStage),L.addEventListener(ON_MOUSE_UP,this._onFullscreenRelease,this));w=s_oSpriteLibrary.getSprite("spin_but");
h=new CTextButton(1094+w.width/2,CANVAS_HEIGHT-w.height/2-4,w,TEXT_WIN+"\n0.00",FONT_GAME,"#ffde00",26);h.addEventListener(ON_MOUSE_UP,this._onSpin,this);w=s_oSpriteLibrary.getSprite("info_but");p=new CTextButton(320+w.width/2,CANVAS_HEIGHT-w.height/2-4,w,TEXT_INFO,FONT_GAME,"#ffffff",32);p.addEventListener(ON_MOUSE_UP,this._onInfo,this);w=s_oSpriteLibrary.getSprite("but_lines_bg");q=new CTextButton(490+w.width/2,CANVAS_HEIGHT-w.height/2-4,w,TEXT_LINES,FONT_GAME,"#ffffff",32);q.addEventListener(ON_MOUSE_UP,
this._onAddLine,this);w=s_oSpriteLibrary.getSprite("coin_but");D=new CTextButton(678+w.width/2,CANVAS_HEIGHT-w.height/2-4,w,TEXT_COIN,FONT_GAME,"#ffffff",32);D.addEventListener(ON_MOUSE_UP,this._onBet,this);w=s_oSpriteLibrary.getSprite("but_maxbet_bg");B=new CTextButton(866+w.width/2,CANVAS_HEIGHT-w.height/2-4,w,TEXT_MAX_BET,FONT_GAME,"#ffffff",32);B.addEventListener(ON_MOUSE_UP,this._onMaxBet,this);C=new createjs.Text(TEXT_MONEY+"\n"+g.toFixed(2)+TEXT_CURRENCY,"34px "+FONT_GAME,"#ffde00");C.x=450;
C.y=46;C.textBaseline="alphabetic";C.lineHeight=28;C.textAlign="center";s_oStage.addChild(C);G=new createjs.Text(NUM_PAYLINES,"24px "+FONT_GAME,"#ffde00");G.x=584;G.y=CANVAS_HEIGHT-77;G.shadow=new createjs.Shadow("#000",2,2,2);G.textAlign="center";G.textBaseline="alphabetic";s_oStage.addChild(G);A=new createjs.Text(a.toFixed(2),"24px "+FONT_GAME,"#ffde00");A.x=776;A.y=CANVAS_HEIGHT-77;A.shadow=new createjs.Shadow("#000",2,2,2);A.textAlign="center";A.textBaseline="alphabetic";s_oStage.addChild(A);
I=new createjs.Text(TEXT_BET+": "+e.toFixed(2),"24px "+FONT_GAME,"#ffde00");I.x=980;I.y=CANVAS_HEIGHT-77;I.shadow=new createjs.Shadow("#000",2,2,2);I.textAlign="center";I.textBaseline="alphabetic";s_oStage.addChild(I);w=s_oSpriteLibrary.getSprite("bet_but");d=[];a=new CBetBut(334+w.width/2,282+w.height/2,w,!0);a.addEventListenerWithParams(ON_MOUSE_UP,this._onBetLineClicked,this,1);d[0]=a;a=new CBetBut(334+w.width/2,180+w.height/2,w,!0);a.addEventListenerWithParams(ON_MOUSE_UP,this._onBetLineClicked,
this,2);d[1]=a;a=new CBetBut(334+w.width/2,432+w.height/2,w,!0);a.addEventListenerWithParams(ON_MOUSE_UP,this._onBetLineClicked,this,3);d[2]=a;a=new CBetBut(334+w.width/2,114+w.height/2,w,!0);a.addEventListenerWithParams(ON_MOUSE_UP,this._onBetLineClicked,this,4);d[3]=a;a=new CBetBut(334+w.width/2,502+w.height/2,w,!0);a.addEventListenerWithParams(ON_MOUSE_UP,this._onBetLineClicked,this,5);d[4]=a;m=[];for(a=0;a<NUM_PAYLINES;a++)e=new createjs.Bitmap(s_oSpriteLibrary.getSprite("payline_"+(a+1))),e.visible=
!1,s_oStage.addChild(e),m[a]=e;this.refreshButtonPos(s_iOffsetX,s_iOffsetY)};this.unload=function(){y.unload();y=null;h.unload();h=null;p.unload();p=null;q.unload();q=null;D.unload();D=null;B.unload();B=null;if(!1===DISABLE_SOUND_MOBILE||!1===s_bMobile)x.unload(),x=null;H&&screenfull.enabled&&L.unload();for(var a=0;a<NUM_PAYLINES;a++)d[a].unload();s_oStage.removeAllChildren();s_oInterface=null};this.refreshButtonPos=function(a,d){!1!==DISABLE_SOUND_MOBILE&&!1!==s_bMobile||x.setPosition(f-a,d+l);H&&
screenfull.enabled&&L.setPosition(b-a,n+d);y.setPosition(k-a,d+r)};this.refreshMoney=function(a){C.text=TEXT_MONEY+"\n"+a.toFixed(2)+TEXT_CURRENCY};this.refreshBet=function(a){A.text=a.toFixed(2)};this.refreshTotalBet=function(a){I.text=TEXT_BET+": "+a.toFixed(2)};this.refreshNumLines=function(a){G.text=a;for(var b=0;b<NUM_PAYLINES;b++)b<a?(d[b].setOn(),m[b].visible=!0):d[b].setOff();setTimeout(function(){for(var a=0;a<NUM_PAYLINES;a++)m[a].visible=!1},1E3)};this.resetWin=function(){h.changeText("")};
this.refreshWinText=function(a){h.changeText(TEXT_WIN+"\n"+a.toFixed(2))};this.showLine=function(a){m[a-1].visible=!0};this.hideLine=function(a){m[a-1].visible=!1};this.hideAllLines=function(){for(var a=0;a<NUM_PAYLINES;a++)m[a].visible=!1};this.disableBetBut=function(a){for(var b=0;b<NUM_PAYLINES;b++)d[b].disable(a)};this.enableGuiButtons=function(){h.enable();B.enable();D.enable();q.enable();p.enable()};this.enableSpin=function(){h.enable();B.enable()};this.disableSpin=function(){h.disable();B.disable()};
this.enableMaxBet=function(){B.enable()};this.disableMaxBet=function(){B.disable()};this.disableGuiButtons=function(){h.disable();B.disable();D.disable();q.disable();p.disable()};this._onBetLineClicked=function(a){this.refreshNumLines(a);s_oGame.activateLines(a)};this._onExit=function(){s_oGame.onExit()};this._onSpin=function(){s_oGame.onSpin()};this._onAddLine=function(){s_oGame.addLine()};this._onInfo=function(){s_oGame.onInfoClicked()};this._onBet=function(){s_oGame.changeCoinBet()};this._onMaxBet=
function(){s_oGame.onMaxBet()};this._onAudioToggle=function(){Howler.mute(s_bAudioActive);s_bAudioActive=!s_bAudioActive};this.resetFullscreenBut=function(){H&&screenfull.enabled&&L.setActive(s_bFullscreen)};this._onFullscreenRelease=function(){s_bFullscreen?v.call(window.document):H.call(window.document.documentElement);sizeHandler()};s_oInterface=this;this._init(a,e,g);return this}var s_oInterface=null;
function CPayTablePanel(){var a,e,g,b,n,k;this._init=function(){k=new createjs.Container;n=createBitmap(s_oSpriteLibrary.getSprite("paytable"));k.addChild(n);this._createPayouts();g=new createjs.Text(TEXT_HELP_WILD,"21px "+FONT_GAME,"#ffff00");g.textAlign="center";g.lineWidth=220;g.lineHeight=22;g.x=635;g.y=290;k.addChild(g);b=new createjs.Text(TEXT_HELP_BONUS,"21px "+FONT_GAME,"#ffff00");b.textAlign="center";b.lineHeight=22;b.lineWidth=210;b.x=976;b.y=294;k.addChild(b);k.visible=!1;s_oStage.addChild(k);
var a=this;k.on("pressup",function(){a._onExit()})};this.unload=function(){var b=this;k.off("pressup",function(){b._onExit()});s_oStage.removeChild(k);for(var f=0;f<a.length;f++)k.removeChild(a[f]);for(f=0;f<e.length;f++)k.removeChild(e[f])};this._createPayouts=function(){a=[];e=[];for(var b=[{x:446,y:106},{x:654,y:106},{x:860,y:106},{x:1070,y:106},{x:446,y:195},{x:654,y:195},{x:860,y:195},{x:1070,y:195}],f=0,g=0;g<s_aSymbolWin.length;g++){for(var d=[],m=0;m<s_aSymbolWin[g].length;m++)d[m]=s_aSymbolWin[g][m];
do m=d.indexOf(0),-1!==m&&d.splice(m,1);while(-1!==m);m=d.length;if(0!==m){var n=30;4===m&&(n=22);var h=b[f].y;a[g]=[];e[g]=[];for(var p=0;p<m;p++){var q=new createjs.Text("X"+(5-p),"25px "+FONT_GAME,"#ffffff");q.textAlign="center";q.x=b[f].x;q.y=h;q.textBaseline="alphabetic";k.addChild(q);a[g][p]=q;var x=new createjs.Text(d[m-p-1],"25px "+FONT_GAME,"#ffff00");x.textAlign="center";x.x=q.x+50;x.y=q.y;x.textBaseline="alphabetic";k.addChild(x);e[g][p]=x;h+=n}f++}}};this.show=function(){k.visible=!0};
this.hide=function(){k.visible=!1};this.resetHighlightCombo=function(){for(var b=0;b<a.length;b++)for(var f=0;f<a[b].length;f++)a[b][f].color="#ffffff",e[b][f].color="#ffff00",createjs.Tween.removeTweens(e[b][f]),e[b][f].alpha=1};this.highlightCombo=function(a,b){a!==BONUS_SYMBOL&&(e[a-1][NUM_REELS-b].color="#ff0000",this.tweenAlpha(e[a-1][NUM_REELS-b],0))};this.tweenAlpha=function(a,b){var f=this;createjs.Tween.get(a).to({alpha:b},200).call(function(){1===b?f.tweenAlpha(a,0):f.tweenAlpha(a,1)})};
this._onExit=function(){s_oGame.hidePayTable()};this.isVisible=function(){return k.visible};this._init()}
function CStaticSymbolCell(a,e,g,b){var n=-1,k,r,f,l;this._init=function(a,b,e,g){l=new createjs.Container;l.visible=!1;r=[];for(a=0;a<NUM_SYMBOLS;a++)b=createSprite(s_aSymbolAnims[a],"static",0,0,SYMBOL_SIZE,SYMBOL_SIZE),b.stop(),b.x=e,b.y=g,b.on("animationend",this._onAnimEnded,null,!1,{index:a}),l.addChild(b),r[a]=b,r[a].visible=!1;a={framerate:60,images:[s_oSpriteLibrary.getSprite("win_frame_anim")],frames:{width:SYMBOL_SIZE,height:SYMBOL_SIZE,regX:0,regY:0},animations:{"static":[0,1],anim:[1,
19]}};a=new createjs.SpriteSheet(a);f=new createSprite(a,"static",0,0,SYMBOL_SIZE,SYMBOL_SIZE);f.stop();f.x=e;f.y=g;l.addChild(f);s_oStage.addChild(l)};this.unload=function(){s_oStage.removeChild(l)};this.hide=function(){-1<n&&(f.gotoAndStop("static"),f.visible=!1,r[n].gotoAndPlay("static"),l.visible=!1)};this.show=function(a){f.gotoAndPlay("anim");f.visible=!0;for(var b=0;b<NUM_SYMBOLS;b++)r[b].visible=b+1===a?!0:!1;r[a-1].gotoAndPlay("anim");n=a-1;k=r[a-1].spriteSheet.getNumFrames();l.visible=!0};
this._onAnimEnded=function(a,b){r[b.index].currentFrame!==k&&(r[b.index].stop(),setTimeout(function(){r[b.index].gotoAndPlay(1)},100))};this.stopAnim=function(){r[n].gotoAndStop("static");r[n].visible=!1;f.gotoAndStop("static");f.visible=!1};this._init(a,e,g,b)}
function CTweenController(){this.tweenValue=function(a,e,g){return a+g*(e-a)};this.easeLinear=function(a,e,g,b){return g*a/b+e};this.easeInCubic=function(a,e,g,b){b=(a/=b)*a*a;return e+g*b};this.easeBackInQuart=function(a,e,g,b){b=(a/=b)*a;return e+g*(2*b*b+2*b*a+-3*b)};this.easeInBack=function(a,e,g,b){return g*(a/=b)*a*(2.70158*a-1.70158)+e};this.easeOutCubic=function(a,e,g,b){return g*((a=a/b-1)*a*a+1)+e}}
function CBonusPanel(){var a,e,g,b,n,k,r,f,l;this._init=function(){l=new createjs.Container;s_oStage.addChild(l);var a=createBitmap(s_oSpriteLibrary.getSprite("bonus_bg"));l.alpha=0;l.visible=!1;l.addChild(a);a={framerate:6,images:[s_oSpriteLibrary.getSprite("bonus_item")],frames:{width:BONUS_ITEM_WIDTH,height:BONUS_ITEM_HEIGHT},animations:{idle:[0],item_clicked:[1,14,"idle"]}};a=new createjs.SpriteSheet(a);b=[];for(var e=[{x:253,y:30},{x:577,y:118},{x:946,y:19},{x:262,y:305},{x:927,y:305}],g=0;5>
g;g++){var h=createSprite(a,"idle",0,0,BONUS_ITEM_WIDTH,BONUS_ITEM_HEIGHT);h.on("click",this._onBonusItemReleased,this,!1,g);h.x=e[g].x;h.y=e[g].y;h.visible=!1;l.addChild(h);b[g]=h}a=s_oSpriteLibrary.getSprite("bonus_prize");k=[];r=[];k[0]=createBitmap(a);k[0].x=300;k[0].y=CANVAS_HEIGHT-90;l.addChild(k[0]);e=new createjs.Text("100","44px "+FONT_GAME,"#ffff00");e.textAlign="left";e.x=k[0].x+a.width+10;e.y=k[0].y+a.height/2;e.textBaseline="middle";l.addChild(e);r.push(e);k[1]=createBitmap(a);k[1].x=
600;k[1].y=CANVAS_HEIGHT-90;l.addChild(k[1]);e=new createjs.Text("200","44px "+FONT_GAME,"#ffff00");e.textAlign="left";e.x=k[1].x+a.width+10;e.y=k[1].y+a.height/2;e.textBaseline="middle";l.addChild(e);r.push(e);k[2]=createBitmap(a);k[2].x=900;k[2].y=CANVAS_HEIGHT-90;l.addChild(k[2]);e=new createjs.Text("300","44px "+FONT_GAME,"#ffff00");e.textAlign="left";e.x=k[2].x+a.width+10;e.y=k[2].y+a.height/2;e.textBaseline="middle";l.addChild(e);r.push(e);f=[{x:440,y:129},{x:765,y:219},{x:1134,y:129},{x:450,
y:405},{x:1114,y:405}]};this.unload=function(){for(var a=0;5>a;a++)b[a].off("click",this._onBonusItemReleased)};this.show=function(d,f){$(s_oMain).trigger("bonus_start");g=f;a=!1;switch(d){case 3:n=BONUS_PRIZE[0];break;case 4:n=BONUS_PRIZE[1];break;case 5:n=BONUS_PRIZE[2];break;default:n=BONUS_PRIZE[0]}r[0].text="X"+n[0];r[1].text="X"+n[1];r[2].text="X"+n[2];for(var e=0;e<d;e++)b[e].visible=!0;l.visible=!0;createjs.Tween.get(l).to({alpha:1},1E3)};this._onBonusItemReleased=function(d,f){if(!a){a=!0;
do var k=Math.floor(Math.random()*s_aPrizeOccurence.length);while(n[s_aPrizeOccurence[k]]*g>SLOT_CASH);e=n[s_aPrizeOccurence[k]];b[f].gotoAndPlay("item_clicked");playSound("choose_bonus_item",1,!1);this.endBonus(f)}};this.endBonus=function(a){new CScoreText("X"+e,f[a].x,f[a].y);setTimeout(function(){l.alpha=0;l.visible=!1;for(var a=0;a<b.length;a++)b[a].visible=!1;s_oGame.endBonus(e)},4E3)};this._init()}
function CScoreText(a,e,g){var b;this._init=function(a,e,g){b=new createjs.Text("00000","50px "+FONT_GAME,"#ff0000");b.textAlign="center";b.text=a;b.x=e;b.y=g;b.alpha=0;b.shadow=new createjs.Shadow("#000000",2,2,2);s_oStage.addChild(b);var f=this;createjs.Tween.get(b).to({alpha:1},400,createjs.Ease.quadIn).call(function(){f.moveUp()})};this.moveUp=function(){var a=b.y-100,e=this;createjs.Tween.get(b).to({y:a},1E3,createjs.Ease.sineIn).call(function(){e.unload()})};this.unload=function(){s_oStage.removeChild(b)};
this._init(a,e,g)}
function CCreditsPanel(){var a,e,g,b,n,k,r,f,l,d;this._init=function(){d=new createjs.Container;d.alpha=0;s_oStage.addChild(d);var m=new createjs.Shape;m.graphics.beginFill("rgba(0,0,0,0.7)").drawRect(0,0,CANVAS_WIDTH,CANVAS_HEIGHT);d.addChild(m);e=createBitmap(s_oSpriteLibrary.getSprite("msg_box"));d.addChild(e);r=new createjs.Shape;r.graphics.beginFill("#0f0f0f").drawRect(0,0,CANVAS_WIDTH,CANVAS_HEIGHT);r.alpha=.01;r.on("click",this._onLogoButRelease);d.addChild(r);m=s_oSpriteLibrary.getSprite("but_exit");a=
CANVAS_WIDTH/2+310;b=new CGfxButton(a,195,m,d);b.addEventListener(ON_MOUSE_UP,this.unload,this);k=new createjs.Text(TEXT_CREDITS_DEVELOPED,"40px "+FONT_GAME,"#000");k.textAlign="center";k.textBaseline="alphabetic";k.x=CANVAS_WIDTH/2;k.y=270;k.outline=2;d.addChild(k);n=new createjs.Text(TEXT_CREDITS_DEVELOPED,"40px "+FONT_GAME,"#fff");n.textAlign="center";n.textBaseline="alphabetic";n.x=CANVAS_WIDTH/2;n.y=270;d.addChild(n);m=s_oSpriteLibrary.getSprite("logo_ctl");g=createBitmap(m);g.regX=m.width/2;
g.regY=m.height/2;g.x=CANVAS_WIDTH/2;g.y=CANVAS_HEIGHT/2;d.addChild(g);l=new createjs.Text("WebOas.is","34px "+FONT_GAME,"#000");l.textAlign="center";l.textBaseline="alphabetic";l.x=CANVAS_WIDTH/2;l.y=395;l.outline=2;d.addChild(l);f=new createjs.Text("WebOas.is","34px "+FONT_GAME,"#fff");f.textAlign="center";f.textBaseline="alphabetic";f.x=CANVAS_WIDTH/2;f.y=395;d.addChild(f);createjs.Tween.get(d).to({alpha:1},600,createjs.Ease.cubicOut);this.refreshButtonPos(s_iOffsetX,s_iOffsetY)};
this.refreshButtonPos=function(a,b){};this.unload=function(){r.off("click",this._onLogoButRelease);b.unload();b=null;s_oStage.removeChild(d)};this._onLogoButRelease=function(){window.open("https://weboas.is","_blank")};this._init()};