");!a&&t&&(a=t.message||t.statusText||"Unknown Error"),o(a,n,"error")}},clearMessage:n}}(),I=function(e,t,o,n){var i=document.getElementById("BFS"),r={brandContainer:document.getElementById("brand-container"),loading:document.getElementById("curtain-spinner"),loginContainer:document.getElementById("login-container"),emailInput:document.querySelector("#basic-login-form input"),codeInput:document.getElementsByName("code")[0],emailInputForgotPassword:document.querySelector("#forgot-password input"),emailInputForgotSubdomain:document.querySelector("#forgot-subdomain input"),footer:document.getElementsByClassName("footer")[0],app:document.getElementById("bento"),fedWarning:document.getElementById("fed-warning-placeholder")},s={loginForm:document.getElementById("basic-login-form"),mfaForm:document.getElementById("mfa-verification"),forgotPasswordForm:document.getElementById("forgot-password"),forgotSubdomainForm:document.getElementById("forgot-subdomain"),transferSubdomainForm:document.getElementById("transfer-subdomain")},d=h(e,t);function c(){r.loginContainer.classList.add("show-login"),i.style.display="block"}function l(){var e=r.emailInputForgotPassword;e&&(e.value=r.emailInput.value||u("forgotPassword")),c(),p(),g(s.forgotPasswordForm),r.emailInputForgotPassword.focus()}function m(){var e=r.emailInputForgotSubdomain;e&&(e.value=r.emailInput.value||u("forgotSubdomain")),c(),p(),g(s.forgotSubdomainForm),r.emailInputForgotSubdomain.focus()}function f(){c(),p(),g(s.transferSubdomainForm)}function g(e){r.brandContainer.insertAdjacentElement("afterend",e)}function p(){Object.keys(s).forEach(e=>{s[e].remove()})}return{showLoading:function(){a("showLoading"),e.startProgress(),r.loginContainer.classList.remove("show-login"),i.style.display="block"},showLoginForm:function(){var e;performance.mark("LOGIN_VIEW_SHOWN_MARK"),c(),p(),e=!!/[?&]fed=/.test(document.location.href),("service.fed.sumologic.com"===document.location.hostname||e)&&(r.fedWarning.innerHTML='
Use of this System is for Authorized purposes only
- You are accessing a U.S. Government Information System.
- System usage may be monitored, recorded, and subject to audit.
- Unauthorized use of the information system is prohibited and subject to criminal and civil penalties.
- Use of the System indicates consent to monitoring and recording.
'),s.loginForm.setAttribute("autocomplete","off"),g(s.loginForm),r.emailInput.focus(),n(t)},showForgotPassword:l,showForgotSubdomain:m,showTransferSubdomain:f,showMfaForm:function(e,t){function o(){g(s.mfaForm),r.codeInput.focus()}a("response",arguments),c(),p(),d.handleMfa(e,o,t)},swapToApp:function(){d.removeListeners(),o.removeListeners(),window.removeEventListener("hashchange",y),r.loginContainer.classList.remove("show-login"),i.remove(),r.loading.remove()},swapToForms:function(){u("forgotPassword")?l():u("forgotSubdomain")?m():u("transfer-subdomain")?f():y()},removeAllForms:p}}(_,k,E,L.initiateSamlConfig),T=function(n,i){var r=document.getElementById("prefetch-container"),s=document.head,d=document.createElement("div"),c={img:{},script:{async:!1,type:"text/javascript",defer:!0},link:{rel:"stylesheet",type:"text/css",charset:"utf-8"}};function u(e,t,o){e.forEach(e=>{var n=document.createElement(t);n["link"===t?"href":"src"]=e;var a=Object.assign(c[t],o||{});Object.keys(a).forEach(e=>{n[e]=a[e]}),(n&&n.type&&"text/css"===n.type.toLowerCase()?s:d).appendChild(n)})}return{schedulePrefetching:function(){requestAnimationFrame(()=>{u(t,"script",{onload:function(){n.increaseLoadCounter("script"),n.hasFinishLoading()&&!window.shouldDelayLoad&&(a("finished loading...bootstrapping bento"),setTimeout(i.swapToApp,1300))},onerror:function(){i.swapToForms(),k.handleReason("pageLoadError",document.getElementById("login-messages"));for(let e of document.querySelectorAll('button[type="submit"]'))e.disabled=!0}}),u(o,"link",{onload:function(){n.increaseLoadCounter("style"),n.hasFinishLoading()&&!window.shouldDelayLoad&&(a("finished loading...bootstrapping bento"),setTimeout(i.swapToApp,1300))}}),u(["images/spin.gif?v=fa2e0f38","images/tipsy.gif?v=7473ff38","images/icons/16/error.png?v=bff9a7e8","images/icons/12/side_arrow.png?v=f99bea22","css/Aristo/images/icon_sprite.png?v=1906261317"].map(t=>e+t),"img"),r.appendChild(d)})}}}(_,I),C=function(e,t,o,n){var i=document.querySelector(".signin-button"),r=document.getElementById("login-messages"),s=!1,l=void 0,m=n.getSamlState;function f(e,t){var o=document.createElement(e);return Object.keys(t).forEach(e=>{o.setAttribute(e,t[e])}),o}function g(){s=!1,e.enableButton(i,"Sign in")}function h(e){var t=!1;if("auth1:redirect_to_other_deployment"===e.errorKey){var o=(e.keyedErrors||[])[0]||{},n=o.values&&o.values.tryAt||"",i=(document.querySelector("input[name=email]").value||"").trim(),r=(document.querySelector("input[name=password]").value||"").trim();if(n){a("Redirecting to ["+n+"] with "+i);var s=f("form",{action:n+"/json/v1/authentication/redirectedloginwithcredentials",method:"POST",target:"_top",style:"display: none;",autocomplete:"off"});s.appendChild(f("input",{name:"email",value:i,type:"hidden"})),s.appendChild(f("input",{name:"password",value:r,type:"hidden"}));var d=u("return_to"),c=function(e){var t=u("provider"),o=e.includes("sumologic")||e.includes("zendesk");return{aha:"aha",salesforce:"salesforce",mindtouch:"mindtouch",talentlms:"talentlms",skilljar:"skilljar"}[t]||(o?"zendesk":"")}(d),l=u("SAMLRequest"),m=u("RelayState");c?(s.appendChild(f("input",{name:"provider",value:c,type:"hidden"})),l&&(s.appendChild(f("input",{name:"SAMLRequest",value:l,type:"hidden"})),s.appendChild(f("input",{name:"RelayState",value:m,type:"hidden"}))),d&&s.appendChild(f("input",{name:"return_to",value:d,type:"hidden"}))):(s.appendChild(f("input",{name:"provider",value:"redirected_login",type:"hidden"})),s.appendChild(f("input",{name:"return_to",value:encodeURIComponent(n+location.href.substring(location.origin.length)),type:"hidden"}))),document.body.appendChild(s),s.submit(),t=!0}}return t}function y(){window.shouldDelayLoad=!1,e.hasFinishLoading()?(window.loadApp&&window.loadApp(),t.swapToApp()):e.startProgress()}function b(){performance.mark("HEIMDALL_LOGIN_VIEW_DONE"),clearTimeout(l),d&&v("ASID",d,3e5),localStorage.setItem("ui.justLoggedIn","true"),M&&M.checkCSELogin()?M.loadCSE():y()}function w(n){if(d=n.apiSessionId||"")if(localStorage.removeItem("ui.2fa.setup"),n.mfaStatus)if("REQUIRES_VALIDATION"===n.mfaStatus)e.cancelProgress(),t.showMfaForm(n,b);else{localStorage.setItem("ui.2fa.setup","true");try{var a=JSON.stringify({asid:(i=n).apiSessionId,canRememberMfa:i.canRememberMfa,mfa_status:i.mfaStatus,qrUrl:i.qrUrl});localStorage.setItem("ui.2fa.params",a)}catch(e){}b()}else b();else h(n)||(g(),n.keyedErrors=n.keyedErrors.map(e=>{var t=e.key;"auth1:login_failed"===t&&("LOCKDOWN"===m()?t="auth1:login_failed_with_saml_lockdown":"ENABLED"===m()&&(t="auth1:login_failed_with_saml"));var o=Object.assign({},e);return o.key=t,o}),o.handleErrors(n,r));var i}function S(e){g(),o.handleErrors(e,r)}return function e(){!d&&p()?b():(clearTimeout(l),l=setTimeout(e,500))}(),{doLogin:function(t){t.preventDefault(),t.stopPropagation(),o.clearMessage(r);var n=(document.querySelector("input[name=email]").value||"").trim(),a=(document.querySelector("input[name=password]").value||"").trim();if(n&&a&&!s){s=!0,e.disableButton(i);var d=(location.href.match(/[?&]customerId=([^]*)/i)||[])[1];c("../json/v1/authentication/loginwithcredentials",{method:"POST",body:JSON.stringify({email:n,password:a,customerId:d})}).then(w).catch(S)}},doFastMfa:function(){try{var e=JSON.parse(localStorage.getItem("mfa.redirected.params"));if(localStorage.removeItem("mfa.redirected.params"),d=e.asid,"REQUIRES_SETUP"===e.mfa_status){var o=JSON.stringify(e);localStorage.setItem("ui.2fa.setup","true"),localStorage.setItem("ui.2fa.params",o),b()}else t.showMfaForm({apiSessionId:d},b)}catch(e){localStorage.removeItem("mfa.redirected.params"),t.swapToForms()}},submitRoute:function(e){document.location.hash="/"+e},handleUrlReasons:function(){var e=u("reason");o.handleReason(e,r,!1)},startProgressOrLoad:y}}(_,I,k,L),B=function(e,t,o){var n=document.querySelector("#forgot-password-form"),i=document.querySelector("#forgot-password-success"),r=document.getElementById("forgot-password-messages"),d=document.getElementById("forgot-password-submit"),l=document.querySelector("#forgot-password input[name=email]");function m(){e.enableButton(d,"Send Link")}function f(e){if(m(),e.success)n.setAttribute("style","display: none;"),i.setAttribute("style","display: block;");else{var t=e.redirectedUrl||"";if(""!==t.trim()){var o=(l&&l.value||"").trim();a("ForgotPassword redirecting to "+t),document.location.assign(t+"/ui/?forgotPassword="+encodeURIComponent(o))}}}function g(e){m();var t=e&&e.errors&&e.errors[0]||{};o.handleErrors(t,r)}function p(t){o.handleErrors("",r);var n=(l&&l.value||t||"").trim();if(n&&s(n))e.disableButton(d),c("../json/v1/authentication/requestpasswordreset?email="+encodeURIComponent(n),{method:"GET"}).then(f).catch(g);else{o.handleErrors({message:"Please enter a valid email."},r,!0)}}return{sendForgotPasswordLink:p,checkInitialTasks:function(){var e=u("forgotPassword").trim();e&&p(e)}}}(_,0,k),P=function(e,t,o){var n=document.querySelector("#forgot-subdomain-form"),a=document.querySelector("#forgot-subdomain-success"),i=document.getElementById("forgot-subdomain-messages"),r=document.getElementById("forgot-subdomain-submit"),d=document.querySelector("#forgot-subdomain input[name=email]");function l(){e.enableButton(r,"Send Me My Subdomain")}function m(){l(),n.setAttribute("style","display: none;"),a.setAttribute("style","display: block;")}function f(e){l();var t=e&&e.errors&&e.errors[0]||{};o.handleErrors(t,i)}function g(t){o.handleErrors("",i);var n=(d&&d.value||t||"").trim();if(n&&s(n))e.disableButton(r),c("../api/v1/account/subdomain/recover?email="+encodeURIComponent(n),{method:"POST"}).then(m).catch(f);else{o.handleErrors({message:"Please enter a valid email."},i,!0)}}return{sendForgotSubdomainLink:g,checkInitialTasks:function(){var e=u("forgotSubdomain").trim();e&&g(e)}}}(_,0,k),O=function(e,t){var o=document.getElementById("transfer-subdomain-messages"),n=document.getElementById("transfer-subdomain-submit"),a=document.querySelector("input[name=organization]"),i=document.location,r=document.location.hash.startsWith("#/transfer-subdomain")||u("transfer-subdomain")?"":i.href.substring(i.origin.length);return{verifySubdomainRedirect:function(i){t.handleErrors("",o);var s=(a&&a.value||i||"").trim();s&&(e.disableButton(n),c(`../api/v1/account/subdomain/${s}/url`,{method:"GET"}).then(e=>{window.location=`${e.url}${r}`}).catch(()=>{t.handleErrors({message:"Please enter a valid organization name"},o),e.enableButton(n,"Continue")}))}}}(_,k),A=function(){var e={default:{start:160741074e4,title:"Check out our recent updates to get more value out of Sumo Logic",buttonText:"What's new",buttonLink:"https://www.sumologic.com/whats-new/",supportText:"",className:"default"},illuminate20b:{start:16021404e5,end:16074108e5,title:"On demand virtual experience",buttonText:"Watch now",buttonLink:"https://www.sumologic.com/illuminate/",supportText:"",className:"illuminate20"},observability:{end:16121628e5,title:"The Sumo Logic Application Observability Solution",buttonText:"Learn More",buttonLink:"https://www.sumologic.com/solutions/operations-intelligence/",supportText:"",className:"observability"},sdo:{end:16121628e5,title:"The Software Development Optimization Solution",buttonText:"Learn More",buttonLink:"https://www.sumologic.com/solutions/software-development-optimization/",supportText:"",className:"sdo"}},t=Object.keys(e).map(t=>e[t]).filter(e=>e),o=function(){var o,n=e[(document.location.href.match(/[?&]b=([^&]*)/)||[])[1]];if(!n){var a=t.filter(c),i=a.reduce(u,0),r={banner:void 0,remainingWeight:Math.random()*i};o=a.reduce(l,r).banner||e.default}return n||o}(),n=document.getElementById("footer-animation-container"),a=document.getElementById("footer-title"),i=document.getElementById("footer-cta"),r=document.getElementById("footer-support-element"),s=document.getElementById("footer-support-text"),d=document.getElementById("copyright-text");function c(e){var t=Date.now();return!(e.start>=t||e.end<=t)}function u(e,t){return e+(t.weight||.5)}function l(e,t){return e.remainingWeight>0&&(e.remainingWeight-=t.weight||.5,e.banner=t),e}return a.innerHTML=o.title||"",i.innerHTML=o.buttonText||"",i.setAttribute("href",o.buttonLink||"#"),s.innerHTML=o.supportText||"",r.innerHTML=o.supportElement||"",n.classList.add(o.className||""),{updateCurrentYear:function(){d.innerHTML="Copyright 2010 - "+(new Date).getFullYear()+" Sumo Logic Inc."}}}(),D=(w={footer:document.getElementById("footer"),brandContainer:document.getElementById("brand-container"),improvedLogin:document.getElementById("BFS")},S={hds:{name:"Hitachi Data Systems Corporation",logo:"images/app/partners/Hitachi_Logo.png"},esentire:{name:"eSentire Inc."},ackcent:{name:"Ackcent Cybersecurity"},expel:{name:"Expel"},gmsectec:{name:"GM Security Technologies"},securitycentric:{name:"Security Centric"},infosec:{name:"Infosec"}},{handlePartners:function(){var e=u("logo"),t=S[e];t&&(function(e){w.footer.setAttribute("info",e.name+" is a reseller of Sumo Logic SaaS solution.")}(t),function(e,t){var o=document.createElement("img");o.className="logo partner-logo",o.src=function(e,t){return e.logo||(document.location.host.startsWith("localhost")?"https://sumologic-test-app-library.s3-us-west-1.amazonaws.com/msp-assets+/logos/":"https://sumologic-production-apps-library.s3-us-west-1.amazonaws.com/msp-assets/msp-logos/")+t+"/logo.png"}(e,t),o.alt=e.name,w.brandContainer.appendChild(o)}(t,e),w.improvedLogin.classList.add("partner"))}}),M=function(){var e=u("tenantName"),t=u("redirectUrl"),o=document.getElementById("login-messages");function n(e){e.error?(k.handleErrors(e,o),setTimeout(()=>{C.startProgressOrLoad()},3e3)):window.location.assign(e.returnURL)}function a(e){"string"==typeof e?k.handleReason(e,o):e.status&&"401"===e.status?C.startProgressOrLoad():k.handleReason("noAsid",o)}return{checkCSELogin:function(){return e&&t},loadCSE:function(){if(!d){var i=(document.cookie||"").split("; ").filter(e=>/^ASID=[^;]/.test(e)),r=u("asid");d=i.length?i[0].replace("ASID=",""):r}d?c(`/json/v1/authentication/generateCseJwt?tenantName=${e}${t?"&redirectUrl="+t:""}`,{method:"GET"}).then(n).catch(a):k.handleReason("noAsid",o)}}}();_.shouldShowAnimation||document.getElementById("BFS").classList.add("no-animation");var R=[T.schedulePrefetching,A.updateCurrentYear];if(g()){var j=u("asid"),x=u("mfa_status");if(x){var F={asid:j,canRememberMfa:u("canRememberMfa"),mfa_status:x};localStorage.setItem("mfa.redirected.params",JSON.stringify(F))}else v("ASID",j,3e5);document.location.assign(u("return_to"))}else f?(R.unshift(I.removeAllForms),i.has("asid")&&!p()&&v("ASID",u("asid"),3e5),M.checkCSELogin()?M.loadCSE():I.showLoading()):/\/dashboard.html/.test(window.location.href)?(window.shouldDelayLoad=!0,c(`/json/v2/content/item/public/${u("k")}?contentType=dashboard`,{method:"GET"}).then(e=>{e.error?b():(I.removeAllForms(),I.showLoading(),window.shouldDelayLoad=!1,window.loadApp&&window.loadApp())}).catch(()=>{b()})):b();if(window.onload=()=>{R.forEach(e=>{"function"==typeof e&&e()})},window.addEventListener("hashchange",y),window.doLogin=C.doLogin,window.submitRoute=C.submitRoute,window.sendForgotPasswordLink=B.sendForgotPasswordLink,window.sendForgotSubdomainLink=P.sendForgotSubdomainLink,window.verifySubdomainRedirect=O.verifySubdomainRedirect,/localhost|nite/.test(location.host)){var U=new RegExp(["cosmeticsrc.com","tribedone.org","js-cache"].join("|"));new PerformanceObserver(e=>{e.getEntries().forEach(e=>{U.test(e.name)&&function e(t){window.$?$.logWarn(t):setTimeout((function(){e(t)}),1e3)}(JSON.stringify({resource:e.name,jira:"SEC-1118852"}))})}).observe({entryTypes:["resource"]})}}();