function StatsHandler(n,t,i,r,u,f,e){window._paq=window._paq||[];this.gId=n;this.channel=t;this.endPoint=i;this.platform=r;this.language=u;this.practice=f;this.matomoSiteId=e;this.gameLoaded=!1;this.initialSoundReceived=!1;this.oldOrientation="";this.currentOrientation="";this.loadStartTime=0;this.loadEndTime=0;this.connectStartTime=(new Date).getTime();this.connectEndTime=0;this.isHyperSpinActive=!1;this.sentSpinEventsList=[];this.debug=!1;this.platform="";this.gameSpecificVariables={tutorial:{autoInit:!1,startTimeStampMS:-1}};i&&this.addMatomoScript();this.loadingStart()}function LoginRequest(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y){function g(n){var t=n.split("\r\n").filter(function(n){return n!==""});t.forEach(function(n){var t=n.split(/(?: ([^"\s]+|(?:"(?:[^"\\]|\\.)*")))/g).filter(function(n){return n!==""}).map(function(n){return n.toString().replace(/(^""$)|(^")|(((?:[^\\]))"$)/g,"$4")}),i=t[0].replace("d=",""),r;p[i]=t;switch(i){case LoginRequest.COMMAND_SESSION:b=t[1];d||(d=!0,r=LoginRequest.COMMAND_LOGIN+" "+tt,nt(r,g));break;case LoginRequest.COMMAND_LOGIN:k=!0}});k&&rt()}function rt(){var r=p[LoginRequest.COMMAND_LOGIN][1],n,t,i;if(r>0)n={},n.sessionId=b,n.cId=r,n.currency=p[LoginRequest.COMMAND_LOGIN][2],p[LoginRequest.COMMAND_LOGIN][3]&&p[LoginRequest.COMMAND_LOGIN][3]!=='""'&&(n.aamsSessionString=p[LoginRequest.COMMAND_LOGIN][3].trim().replace(/"/g,"")),p[LoginRequest.COMMAND_LOGIN][4]!==undefined&&(n.jurisdiction=p[LoginRequest.COMMAND_LOGIN][4].trim().replace(/"/g,"")),p[LoginRequest.COMMAND_LOGIN][5]!==undefined&&(n.externalId=p[LoginRequest.COMMAND_LOGIN][5].trim().replace(/"/g,"")),p[LoginRequest.COMMAND_LOGIN][6]!==undefined&&(n.identityToken=p[LoginRequest.COMMAND_LOGIN][6].trim().replace(/"/g,"")),p[LoginRequest.COMMAND_SERVERTIME]!==undefined&&(n.serverTime=p[LoginRequest.COMMAND_SERVERTIME][1].replace(/"/g,"").trim(),n.serverTimeDelta=new Date(n.serverTime)-Date.now()),c(n,w);else{if(ut(p[LoginRequest.COMMAND_LOGIN][2]))return window.location=p[LoginRequest.COMMAND_LOGIN][2];t=p[LoginRequest.COMMAND_LOGIN].slice(2).join(" ").replace(/"/g,"").trim();i=a;i.hasOwnProperty(t)&&(t=i[t]);l(t,"CONNECTION_ERROR")}}function ut(n){var t=new RegExp("(http|ftp|https)://([w_-]+(?:(?:.[w_-]+)+))([w.,@@?^=%&:/~+#-]*[w@@?^=%&/~+#-])?");return t.test(n)?!0:!1}function nt(t,i){var r=new XMLHttpRequest;r.open("POST",n);r.setRequestHeader("Content-type","text/plain");r.onerror=ft;r.onabort=et;r.ontimeout=ot;i&&(r.onreadystatechange=function(){r.status===200&&r.readyState===4&&i(r.responseText)});w0&&this.connectingComplete();break;case this.gameEvents.Settings:this.paseSettings(n);break;case this.internalEvents.Load:this.addStatEvent(this.analyticEvents.Load);break;case this.internalEvents.Loaded:this.gameLoaded=!0;this.addStatEvent(this.analyticEvents.Loaded);break;case this.internalEvents.Connected:this.addStatEvent(this.analyticEvents.Connected);break;case this.gameEvents.RoundStart:case this.gameEvents.OnRoundStart:if(this.channel!=="mobile")break;this.oldOrientation=this.currentOrientation;this.currentOrientation=window.innerWidth>window.innerHeight?"ls":"pt";this.oldOrientation!==this.currentOrientation&&(this.sentSpinEventsList=[]);t="";t=this.currentOrientation==="pt"?this.isHyperSpinActive?this.analyticEvents.HyperSpinPortrait:this.analyticEvents.SpinPortrait:this.isHyperSpinActive?this.analyticEvents.HyperSpinLandscape:this.analyticEvents.SpinLandscape;this.sentSpinEventsList.indexOf(t)===-1&&(this.sentSpinEventsList.push(t),this.addStatEvent(t));break;case this.legacyEvents.InitialSoundOn:this.gameLoaded&&this.addStatEvent(this.analyticEvents.InitialSoundOn);break;case this.legacyEvents.InitialSoundOff:this.gameLoaded&&this.addStatEvent(this.analyticEvents.InitialSoundOff);break;case this.gameEvents.SoundOn:this.initialSoundReceived||(this.addStatEvent(this.analyticEvents.InitialSoundOn),this.initialSoundReceived=!0);break;case this.gameEvents.SoundOff:this.initialSoundReceived||(this.addStatEvent(this.analyticEvents.InitialSoundOff),this.initialSoundReceived=!0);break;case this.legacyEvents.SoundOn:this.gameLoaded&&this.addStatEvent(this.analyticEvents.SoundOn);break;case this.legacyEvents.SoundOff:this.gameLoaded&&this.addStatEvent(this.analyticEvents.SoundOff);break;case this.legacyEvents.ShowHelp:case this.gameEvents.OnHelp:this.addStatEvent(this.analyticEvents.ShowHelp);break;case this.legacyEvents.ShowPaytable:case this.gameEvents.OnShowPaytable:this.addStatEvent(this.analyticEvents.ShowPaytable);break;case this.gameEvents.OnHistory:this.addStatEvent(this.analyticEvents.ShowHistory);break;case this.gameEvents.AutoplayStarted:this.addStatEvent(this.analyticEvents.AutoplayStarted,n.playsLeft);break;case this.legacyEvents.AutoplayStarted:this.addStatEvent(this.analyticEvents.AutoplayStarted,r.numautoplays);break;case this.internalEvents.LoadTime:this.addStatEvent(this.analyticEvents.LoadTime,n.time);break;case this.internalEvents.LoginTime:this.addStatEvent(this.analyticEvents.LoginTime,n.time);break;case this.legacyEvents.ConnectionLost:this.addStatEvent(this.analyticEvents.ConnectionLost);break;case this.gameEvents.Message:n.flags===4?this.addStatEvent(this.analyticEvents.ConnectionLost):n.flags===3&&this.addStatEvent(this.analyticEvents.ConnectionFailure);break;case this.gameEvents.ExternalTutorialAutoInit:this.gameSpecificVariables.tutorial.autoInit=!0;break;case this.gameEvents.ExternalTutorialInit:this.gameSpecificVariables.tutorial.autoInit=!1;break;case this.gameEvents.ExternalTutorialStarted:u=this.practice==="1"?this.analyticEvents.TutorialStartedInPractice:this.analyticEvents.TutorialStarted;this.addStatEvent(u);this.gameSpecificVariables.tutorial.startTimeStampMS=(new Date).getTime();this.gameSpecificVariables.tutorial.autoInit||this.addStatEvent(this.analyticEvents.TutorialRevisit);break;case this.gameEvents.ExternalTutorialExit:this.gameSpecificVariables.tutorial.startTimeStampMS!==-1?(f=Date.now()-this.gameSpecificVariables.tutorial.startTimeStampMS,this.gameSpecificVariables.tutorial.startTimeStampMS=-1,this.addStatEvent(this.analyticEvents.TutorialAborted),this.addStatEvent(this.analyticEvents.TutorialTimeAborted,f)):this.addStatEvent(this.analyticEvents.TutorialSkipped);break;case this.gameEvents.ExternalTutorialFinish:this.gameSpecificVariables.tutorial.startTimeStampMS!==-1&&(e=Date.now()-this.gameSpecificVariables.tutorial.startTimeStampMS,this.addStatEvent(this.analyticEvents.TutorialTimeCompleted,e));this.gameSpecificVariables.tutorial.startTimeStampMS=-1;this.gameSpecificVariables.tutorial.autoInit=!1;this.addStatEvent(this.analyticEvents.TutorialCompleted);break;case this.gameEvents.HyperSpinActivated:this.isHyperSpinActive=!0;break;case this.gameEvents.HyperSpinDeactivated:this.isHyperSpinActive=!1}};StatsHandler.prototype.addStatEvent=function(n,t){typeof t!="undefined"?window._paq.push(["trackEvent","Game",n,this.gId,t]):window._paq.push(["trackEvent","Game",n,this.gId]);this.log("Sent event to matomo: "+n," with value: "+t)};StatsHandler.prototype.loadingStart=function(){this.log("LoadingStart");this.loadStartTime=(new Date).getTime();this.HandleEvent({type:"load"})};StatsHandler.prototype.LoadingComplete=function(){this.loadEndTime=(new Date).getTime();var n=this.loadEndTime-this.loadStartTime;this.HandleEvent({type:"loaded"});this.HandleEvent({type:"loadtime",time:n})};StatsHandler.prototype.connectingComplete=function(){this.connectEndTime=(new Date).getTime();var n=this.connectEndTime-this.connectStartTime;this.HandleEvent({type:"connected"});this.HandleEvent({type:"logintime",time:n})};StatsHandler.prototype.lastSettings=undefined;StatsHandler.prototype.copyObject=function(n){var t={};for(prop in n)t[prop]=n[prop];return t};StatsHandler.prototype.paseSettings=function(n){var t,i;if(this.lastSettings===undefined){this.lastSettings={};for(key in n.settings)key!="children"&&(this.lastSettings[key]=n.settings[key]);return}t=[];for(key in n.settings)(key!=="children"||key!=="_children")&&key[0]==="_"&&this.lastSettings[key]!=n.settings[key]&&t.push({id:key,newVal:n.settings[key]});if(this.lastSettings===undefined){this.lastSettings=n;return}for(i=0;i1}return window.devicePixelRatio>1},checkFeatureSupport:function(n){var i={},t,r,u,f;if(i.enforcehardwareacceleration=this.checkHardwareAcceleration,i.stencilbuffer=this.checkStencilBuffer,t=n.requiredPlatformFeatureSupport,t==="")return!1;for(t=t.split(","),r=0;r=8?"":"errios"},checkPlusDevice:function(){return this.checkIOSSupport()&&this.getIPhoneVersion()===this.devices.iPhone6p.version?!0:!1},isDevice:function(n){switch(n.type){case"iPhone":return this.isIOs()&&this.getIPhoneVersion()===n.version;case"iPad":return this.isIOs()&&this.isIpad();default:return!1}},isIpad:function(){return/iPad/i.test(navigator.userAgent)},isIphone:function(){return/iPhone/i.test(navigator.userAgent)},isIOs:function(){return/iPhone|iPod|iPad/.test(navigator.userAgent)},isIE11:function(){return/Trident/.test(navigator.userAgent)},isEdge:function(){return/Edge/.test(navigator.userAgent)},isFirefox:function(){return/Firefox/.test(navigator.userAgent)},isFirefoxWebpSupportedVersion:function(){if(this.isFirefox()){const n=window.navigator.userAgent.match(/Firefox\/([0-9]+)\./),t=n?parseInt(n[1],10):0;if(t>64)return!0}return!1},isUnsupportedEdgeWebp:function(){var n,t;if(isEdge()){n=navigator.userAgent.indexOf("Edge/");try{if(t=parseInt(navigator.userAgent.substring(n+5,navigator.userAgent.indexOf(".",n)),10),t<=18)return!0}catch(i){return!1}}return!1},isOldIpad:function(){var n=Math.max(window.screen.height,window.screen.width),t=Math.min(window.screen.height,window.screen.width);return t===768&&n===1024&&window.devicePixelRatio===1?!0:!1},getIPhoneVersion:function(){var n=Math.max(window.screen.height,window.screen.width),t=Math.min(window.screen.height,window.screen.width);return t===320&&n===480?"4":t===320&&n===568?"5":t===375&&n===667?"6":t===414&&n===736?"6+":"none"},checkAndroidSupport:function(){var n=navigator.userAgent.match(/Android[\/\s](\d+\.?\d?)?/);return n?new Number(n[1])>=4.4&&!(/firefox/gi.test(navigator.userAgent)&&!/opera/gi.test(navigator.userAgent))?"":"errandroid":"errandroid"},checkWindowsSupport:function(){return"errwindows"},checkDesktopChromeSupport:function(){return!/Android|iPhone|iPod|iPad/.test(navigator.userAgent)&&navigator.userAgent.match("Chrome")?"":"errdesktopchrome"},checkConfiguredBlockedDevice:function(){var n=this.configuration.customDeviceBlockRegex,t,i;if(!n)return!1;for(n=n.split(","),t=0;t600?this.deviceTypes.tablet:this.deviceTypes.mobile:this.deviceTypes.mobile},addSwipeToFullscreen:{background:undefined,arrowDot:undefined,hand:undefined,sizeInterval:undefined,gamewrapper:undefined,allowScrollToFullscreen:undefined,playerProtectionSweden:undefined,playerProtectionUK:undefined,isPreventingPinchZoom:!0,isShowing:!0,init:function(n){this.gamewrapper=n;this.background=document.createElement("div");this.background.id="pngSwipebackground";document.getElementById("mask").style.display="block";this.background.addEventListener("touchstart",this.onTouchStart);this.background.addEventListener("touchmove",this.onTouchMove);window.addEventListener("resize",this.onResize);this.arrowDot=document.createElement("div");this.arrowDot.id="pngArrowDot";this.hand=document.createElement("div");this.hand.id="pngSwipeHand";this.background.appendChild(this.arrowDot);this.background.appendChild(this.hand);document.body.appendChild(this.background);PlatformManager.checkIosChrome()&&(document.body.style.height="2000px");PlatformManager.getIOSVersion()>=13&&(document.body.style.overflowY="scroll");this.sizeInterval=setInterval(this.pollSize.bind(this),1e3)},pollSize:function(){var n,t,i;window.innerHeightwindow.innerHeight):GameLoader.configuration.disableSwipeToFullscreenLandscapeIos==="False"?(i=window.outerHeight||document.body.clientHeight,n=!(window.innerHeight+window.pageYOffset>=document.body.offsetHeight&&i===window.innerHeight)):n=!1,this.show(n)):GameLoader.configuration.disableSwipeToFullscreenPortraitIos==="False"?(n=document.documentElement.clientHeight>=window.innerHeight,this.show(n)):this.show(!1);typeof document.getElementById("gameWrapper")!="undefined"&&document.getElementById("gameWrapper").clientWidth>window.innerWidth?(this.show(!0),this.background.removeEventListener("touchmove",this.onTouchMove),this.background.removeEventListener("touchstart",this.onTouchStart),this.isPreventingPinchZoom=!1):this.isPreventingPinchZoom||(this.background.addEventListener("touchmove",this.onTouchMove),this.background.addEventListener("touchstart",this.onTouchStart),this.isPreventingPinchZoom=!0);(GameLoader.configuration.disableSwipeToFullscreenIos==="True"&&!PlatformManager.checkIosChrome()||PlatformManager.isIosVersionInBlackList())&&this.show(!1)},show:function(n){n&&GameLoader.loaderComplete?(this.updateBackgroundPositionForSwipeToHide(),this.background.classList.add("pngSwipeBgShow"),this.background.classList.remove("pngFadeOutAnim"),this.gamewrapper.style.pointerEvents="none",this.isShowing||window.scroll(0,0),this.isShowing=!0):(this.background.classList.remove("pngSwipeBgShow"),this.background.classList.add("pngFadeOutAnim"),this.gamewrapper.style.pointerEvents="",this.isShowing=!1)},updateBackgroundPositionForSwipeToHide:function(){var n;PNGModules.hasExternalModule("playerProtectionSweden")&&(this.playerProtectionSweden||(this.playerProtectionSweden=document.querySelector(".pps-top-bar-mobile")),this.playerProtectionSweden&&(n=this.playerProtectionSweden.clientHeight,this.background.style.top=n?n+"px":0));PNGModules.hasExternalModule("playerProtectionUK")&&(this.playerProtectionUK||(this.playerProtectionUK=document.querySelector(".pps-top-bar-mobile")),this.playerProtectionUK&&(n=this.playerProtectionUK.clientHeight,this.background.style.top=n?n+"px":0))},onResize:function(){var n=document.getElementById("mask"),t,i;if(n){if(PlatformManager.isIosVersionInBlackList()&&!PlatformManager.checkIosChrome()&&window.innerHeight>=window.innerWidth){n.style.removeProperty("height");return}n.style.height=window.innerHeight*3+"px"}t=39;i=window.orientation===90||window.orientation===270||window.orientation===-90?window.screen.width-window.innerHeight<=t:window.screen.height-window.innerHeight<=t;i?(window.scroll(0,window.innerHeight),window.addEventListener("scroll",this.onScroll)):(this.allowScrollToFullscreen=!0,window.removeEventListener("scroll",this.onScroll))},onScroll:function(){var n=document.documentElement,t=(window.pageYOffset||n.scrollTop)-(n.clientTop||0);t!==window.innerHeight&&this.allowScrollToFullscreen===!0?(window.scroll(0,window.innerHeight),this.allowScrollToFullscreen=!0):(this.allowScrollToFullscreen=!1,window.removeEventListener("scroll",this.onScroll))},onTouchStart:function(n){n.touches.length>1&&n.preventDefault()},onTouchMove:function(n){n.touches.length>1&&n.preventDefault()}},isStandalone:function(){return this.embedMode==="iframe"?!0:window.navigator.standalone},collectWebGlInfo:function(){try{var t={platform:navigator.platform,userAgent:navigator.userAgent},e,i=document.createElement("canvas"),n;function u(t,i,r){return n=t.getContext(i,{stencil:r}),e=i,!!n}function r(n){return"["+n[0]+", "+n[1]+"]"}function l(){var i=n.getExtension("EXT_texture_filter_anisotropic")||n.getExtension("WEBKIT_EXT_texture_filter_anisotropic")||n.getExtension("MOZ_EXT_texture_filter_anisotropic"),t;return i?(t=n.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT),t===0&&(t=2),t):"n/a"}function o(n,t){return t?""+Math.pow(2,n):"2^"+n}function f(n,t){var i=t?" bit mantissa":"";return"[-"+o(n.rangeMin,t)+", "+o(n.rangeMax,t)+"] ("+n.precision+i+")"}function s(t){var i=n.getShaderPrecisionFormat(t,n.HIGH_FLOAT),r=n.getShaderPrecisionFormat(t,n.MEDIUM_FLOAT),e=n.getShaderPrecisionFormat(t,n.LOW_FLOAT),u=i;return i.precision===0&&(u=r),"High: "+f(i,!0)+" Medium: "+f(r,!0)+" Low: "+f(e,!0)+f(u,!1)}function a(n){var t=n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT),i=t.precision!==0?"highp/":"mediump/";return t=n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_INT),i+(t.rangeMax!==0?"highp":"lowp")}function h(n){return n!==0&&(n&n-1)==0}function v(n){var t=r(n.getParameter(n.ALIASED_LINE_WIDTH_RANGE)),i=(navigator.platform==="Win32"||navigator.platform==="Win64")&&n.getParameter(n.RENDERER)!=="Internet Explorer"&&n.getParameter(n.RENDERER)!=="Microsoft Edge"&&t===r([1,1]);return i?h(n.getParameter(n.MAX_VERTEX_UNIFORM_VECTORS))&&h(n.getParameter(n.MAX_FRAGMENT_UNIFORM_VECTORS))?"Yes, D3D11":"Yes, D3D9":"No"}function y(){var n=document.createElement("canvas"),t=n.getContext(e,{failIfMajorPerformanceCaveat:!0});return(n.remove(),!t)?"Yes":typeof t.getContextAttributes().failIfMajorPerformanceCaveat=="undefined"?"Not implemented":"No"}function p(n){var t=1,i=n.getExtension("WEBGL_draw_buffers");return i!=null&&(t=n.getParameter(i.MAX_DRAW_BUFFERS_WEBGL)),t}function c(n){var t={renderer:"",vendor:""},i=n.getExtension("WEBGL_debug_renderer_info");return i!=null&&(t.renderer=n.getParameter(i.UNMASKED_RENDERER_WEBGL),t.vendor=n.getParameter(i.UNMASKED_VENDOR_WEBGL)),t}return(u(i,"webgl",!0)||u(i,"experimental-webgl",!0)||u(i,"webgl",!1)||u(i,"experimental-webgl",!1),i.remove(),!n)?"Browser supports WebGL but initialization failed":(t.contextName=e,t.glVersion=n.getParameter(n.VERSION),t.shadingLanguageVersion=n.getParameter(n.SHADING_LANGUAGE_VERSION),t.vendor=n.getParameter(n.VENDOR),t.renderer=n.getParameter(n.RENDERER),t.unMaskedVendor=c(n).vendor,t.unMaskedRenderer=c(n).renderer,t.antialias=n.getContextAttributes().antialias?"Available":"Not available",t.angle=v(n),t.majorPerformanceCaveat=y(),t.maxColorBuffers=p(n),t.redBits=n.getParameter(n.RED_BITS),t.greenBits=n.getParameter(n.GREEN_BITS),t.blueBits=n.getParameter(n.BLUE_BITS),t.alphaBits=n.getParameter(n.ALPHA_BITS),t.depthBits=n.getParameter(n.DEPTH_BITS),t.stencilBits=n.getParameter(n.STENCIL_BITS),t.maxRenderBufferSize=n.getParameter(n.MAX_RENDERBUFFER_SIZE),t.maxCombinedTextureImageUnits=n.getParameter(n.MAX_COMBINED_TEXTURE_IMAGE_UNITS),t.maxCubeMapTextureSize=n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE),t.maxFragmentUniformVectors=n.getParameter(n.MAX_FRAGMENT_UNIFORM_VECTORS),t.maxTextureImageUnits=n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS),t.maxTextureSize=n.getParameter(n.MAX_TEXTURE_SIZE),t.maxVaryingVectors=n.getParameter(n.MAX_VARYING_VECTORS),t.maxVertexAttributes=n.getParameter(n.MAX_VERTEX_ATTRIBS),t.maxVertexTextureImageUnits=n.getParameter(n.MAX_VERTEX_TEXTURE_IMAGE_UNITS),t.maxVertexUniformVectors=n.getParameter(n.MAX_VERTEX_UNIFORM_VECTORS),t.aliasedLineWidthRange=r(n.getParameter(n.ALIASED_LINE_WIDTH_RANGE)),t.aliasedPointSizeRange=r(n.getParameter(n.ALIASED_POINT_SIZE_RANGE)),t.maxViewportDimensions=r(n.getParameter(n.MAX_VIEWPORT_DIMS)),t.maxAnisotropy=l(),t.vertexShaderBestPrecision=s(n.VERTEX_SHADER),t.fragmentShaderBestPrecision=s(n.FRAGMENT_SHADER),t.fragmentShaderFloatIntPrecision=a(n),t.extensions=n.getSupportedExtensions(),t)}catch(w){return{unexpectedError:w}}},log:function(n){this.configuration.debug&&console.log(n)}};LauncherMessage.prototype.onExit=function(){if(this.channel==="mobile"){var n=this.lobbyUrl;n!==""?location.href=n:history.back()}else this.msgBox.parentElement.removeChild(this.msgBox)};LauncherMessage.prototype.remove=function(){if(typeof PngPreloader!="undefined")PngPreloader.onLauncherMessage(!1);this.msgBox&&this.msgBox.parentElement&&this.msgBox.parentElement.removeChild(this.msgBox)}