PageSourceSearch

https://ausscasinosanalyzer.com/build/midori/assets/js/auth/auth.min.js?v=5801963

js ausscasinosanalyzer.com collected 2026-09-28 11:02:56 UTC 7,680 bytes, 1 lines download raw bytes

1import{isAuth,autoSignIn}from"authApi";import{authPopup}from"authPopup";import{authWheelPopup}from"authWheelPopup";import{getLocaleCountry as __auth_localeCountry}from"globals";import{__translate as __auth_translate}from"translate";import{removeBannersAfterFirst as removeAllBannersAfterFirst}from"globals";class Auth{constructor(){this.noAmplitudeParam=new URLSearchParams(document.location.search).get("no-amplitude"),this.loginExistingUserAmplitude,this.registrationNewUserAmplitude,this.userLoginOneTime=storage.getLoginOneTime(),this.clickGoogleLoginAmplitude=()=>{},this.clickGoogleSignupAmplitude=()=>{},this.noAmplitudeParam||(async()=>{const{clickGoogleLoginAmplitude:e,clickGoogleSignupAmplitude:t}=await import("authAmplitude");this.clickGoogleLoginAmplitude=e,this.clickGoogleSignupAmplitude=t})()}translate(e,t=!1){return __auth_translate(e,__auth_localeCountry()||"en",t)||e}async initAuth(){const e=document.getElementById("profileHeader")??null,t=document.getElementById("profileHeaderButton")??null,o=document.getElementById("profileHeaderNotAuth"),i=document.getElementById("authSignupButton"),n=document.getElementById("authOptionsProfiler"),s=document.querySelector('[data-id="authSpinWheelImage"]'),a=document.querySelector("#comingSoonOfferRegister");let r=document.getElementsByClassName("authSignupBonusListButton");if(removeAllBannersAfterFirst(r),!this.noAmplitudeParam){const{loginExistingUserAmplitude:e,registrationNewUserAmplitude:t}=await import("../auth/amplitude/authAmplitude.js");this.loginExistingUserAmplitude=e,this.registrationNewUserAmplitude=t}if(e){let o=await isAuth();n&&(n.style.display="block"),this.removeBannerFromBonuses(r),this.checkIfAnalyticsLoaded({registration:o.data?.registrationVia,userID:o.data?.id}),this.setTokenStorage(!0),this.setGlobalUserId(o.data?.id),"Google"===o.data?.registrationVia&&this.sendGoogleEntryTypeAmplitude(o.data?.created,o.data?.registrationVia,o.data?.id),this.setToken(o.data?.token),this.checkUserLastPageBeforeProfilePage(e,t),this.initForumSSO()}else n&&(n.style.display="block"),this.generateProfileHeaderButtonNotAuth(o),this.authSignup(i),this.authBannerSpinWheelAnimation(s),this.setTokenStorage(!1),this.checkIfAnalyticsLoaded({registration:null,userID:null}),storage.removeCheckRegistrationVia(),await this.autoLogin(e),this.callPopupByBonusBannerClick();window.location.search.includes("logged_in=true")&&(this.successMessageGenerateHTML(),this.scrollToEntryPosition(),storage.getAuthWheelsPopupCongratulations()&&setTimeout(()=>{authWheelPopup.generateCongratulationsHTML(),authWheelPopup.congratulationsClaimBonusLayoutSwitcher(),storage.removeAuthWheelsPopupCongratulations()},1e3)),this.removeQueryParam("logged_in"),a&&a.addEventListener("click",()=>{const e=document.querySelector("#comingSoonOffer"),t=e?.dataset?.casinoId,o=document.body.dataset.siteId;this.userLoginOneTime?this.clickGoogleLoginAmplitude():this.clickGoogleSignupAmplitude(),!storage.getScrollPosition()&&storage.setScrollPosition(window.scrollY||window.pageYOffset),storage.getTrackEntryType()&&storage.removeTrackEntryType(),storage.setRegPlacement("comingSoonOffer");const i=new URLSearchParams({source:"comingSoonOffer"});t&&i.set("casino_id",t),o&&i.set("site_id",o),document.location.href=`/connect/google?${i.toString()}`})}setTokenStorage(e){return e?storage.setAuthToken((!0).toString()):storage.getAuthToken()?storage.removeAuthToken():null}setToken(e){return e?storage.setToken(e.toString()):storage.getToken()?storage.removeToken():null}async autoLogin(e){if(!storage.getToken()){const e=new URLSearchParams(window.location.search).get("token");e&&storage.setToken(e)}storage.getToken()&&(await autoSignIn(storage.getToken()),window.location.reload(),!e&&storage.removeToken())}setGlobalUserId(e){if(e&&!storage.getAuthId())return storage.setAuthId(e)}generateProfileHeaderButtonNotAuth(e){e&&e.addEventListener("click",()=>{storage.setRegistrationViaAmplitude("reg"),storage.setRegPlacement("header"),authPopup.generateHTMLAdapter("mainHTML")})}removeQueryParam(e){const t=new URL(window.location.href);t.searchParams.delete(e),""===t.search&&(t.search=""),window.history.replaceState({},document.title,t.href)}
1removeBannerFromBonuses(e){Array.from(e).forEach(e=>{e.remove()})}authSignup(e){e&&e.addEventListener("click",()=>{authPopup.generateHTMLAdapter("mainHTML")})}authBannerSpinWheelAnimation(e){let t=0;const o=()=>{t+=360,e.style.transition="transform 2s ease-in-out",e.style.transform=`rotate(${t}deg)`,setTimeout(()=>{e.style.transition="none",e.style.transform=`rotate(${t-360}deg)`,e.offsetWidth,e.style.transition="transform 2s ease-in-out",o()},4e3)};e&&o()}successMessageGenerateHTML(){let e=`\n            <div class="success" id="loggedInSuccessMessage">\n                <div class="success_box">\n                    <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n                        <path d="M12 22C6.477 22 2 17.523 2 12C2 6.477 6.477 2 12 2C17.523 2 22 6.477 22 12C22 17.523 17.523 22 12 22ZM12 20C14.1217 20 16.1566 19.1571 17.6569 17.6569C19.1571 16.1566 20 14.1217 20 12C20 9.87827 19.1571 7.84344 17.6569 6.34315C16.1566 4.84286 14.1217 4 12 4C9.87827 4 7.84344 4.84286 6.34315 6.34315C4.84285 7.84344 4 9.87827 4 12C4 14.1217 4.84285 16.1566 6.34314 17.6569C7.84344 19.1571 9.87827 20 12 20ZM11.003 16L6.76 11.757L8.174 10.343L11.003 13.172L16.659 7.515L18.074 8.929L11.003 16Z" fill="white"/>\n                    </svg>\n                    <p class="text">${this.translate("You have successfully logged in")}</p>\n                </div>\n            </div>\n        `;document.body.insertAdjacentHTML("beforeend",e);const t=document.getElementById("loggedInSuccessMessage");t.style.animation="show 0.51s forwards ease-in-out",this.hideSuccessMessage(t)}callPopupByBonusBannerClick(){let e=document.getElementsByClassName("authSignupBonusListButton");Array.from(e).forEach(e=>{e.addEventListener("click",()=>{storage.setRegPlacement("fortune_wheel"),authWheelPopup.generateMainHTML()})})}hideSuccessMessage(e){setTimeout(()=>{e.remove()},1900)}sendRegistrationViaUserPropertyAmplitude(e){storage.getCheckRegistrationVia()||(storage.setCheckRegistrationVia((new Date).toString()),"undefined"!=typeof amplitude&&amplitude.identify?amplitude.identify((new amplitude.Identify).set("registration_via",e)):window.location.hostname.includes("casinosanalyzer.co.uk")&&"undefined"!=typeof zaraz&&"function"==typeof zaraz.track&&zaraz.set("registration_via",e))}async sendUserIdPropertyAmplitude(e){const{setAnalyticsUserId:t}=await import("authAmplitude");t(e)}checkIfAnalyticsLoaded=({registration:e,userID:t})=>{window.ga||window.amplitude||window.zaraz?(this.sendRegistrationViaUserPropertyAmplitude(e),this.sendUserIdPropertyAmplitude(t)):setTimeout(()=>this.checkIfAnalyticsLoaded({registration:e,userID:t}),500)};setEntryTypeStorage(e="registration",t=!1){let o={entryType:e,isSend:t};return storage.setTrackEntryType(o)}sendGoogleEntryTypeAmplitude(e,t,o){let i=storage.getTrackEntryType();const n=(new Date).toISOString().slice(0,10);if(!i||!i.isSend){let i="login";return e===n&&(i="registration"),this.setEntryTypeStorage(i,!0),"login"===i?this.loginExistingUserAmplitude(o):this.registrationNewUserAmplitude(o,t)}}checkUserLastPageBeforeProfilePage(e,t){[e,t].forEach(e=>{e.addEventListener("click",function(){storage.setReferringPageAfterLogout(window.location.pathname)})})}scrollToEntryPosition(){storage.getScrollPosition()&&(window.scrollTo(0,parseInt(storage.getScrollPosition(),10)),storage.removeScrollPosition())}initForumSSO(){storage.setForumSsoReady((!0).toString())}}const auth=new Auth;export{auth};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.