");!a&&t&&(a=t.message||t.statusText||"Unknown Error"),o(a,n,"error")}},clearMessage:n}}(),C=function(e,t,o,n){var a=document.getElementById("BFS"),i={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=v(e,t);function c(){i.loginContainer.classList.add("show-login"),a.style.display="block"}function u(){var e=i.emailInputForgotPassword;e&&(e.value=i.emailInput.value||m("forgotPassword")),c(),h(),f(s.forgotPasswordForm),i.emailInputForgotPassword.focus()}function l(){var e=i.emailInputForgotSubdomain;e&&(e.value=i.emailInput.value||m("forgotSubdomain")),c(),h(),f(s.forgotSubdomainForm),i.emailInputForgotSubdomain.focus()}function g(){c(),h(),f(s.transferSubdomainForm)}function f(e){i.brandContainer.insertAdjacentElement("afterend",e)}function h(){Object.keys(s).forEach(e=>{s[e].remove()})}return{showLoading:function(){r("showLoading"),e.startProgress(),i.loginContainer.classList.remove("show-login"),a.style.display="block"},showLoginForm:function(){var e;performance.mark("LOGIN_VIEW_SHOWN_MARK"),c(),h(),e=!!/[?&]fed=/.test(document.location.href),("service.fed.sumologic.com"===document.location.hostname||e)&&(i.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.
Information on or transmitted by this system may contain controlled unclassified information (CUI) and, as such should be considered and treated as non-public information.
'),s.loginForm.setAttribute("autocomplete","off"),f(s.loginForm),i.emailInput.focus(),n(t)},showForgotPassword:u,showForgotSubdomain:l,showTransferSubdomain:g,showMfaForm:function(e,t){function o(){f(s.mfaForm),i.codeInput.focus()}r("response",arguments),c(),h(),d.handleMfa(e,o,t)},swapToApp:function(){d.removeListeners(),o.removeListeners(),window.removeEventListener("hashchange",b),i.loginContainer.classList.remove("show-login"),a.remove(),i.loading.remove()},swapToForms:function(){m("forgotPassword")?u():m("forgotSubdomain")?l():m("transfer-subdomain")?g():b()},removeAllForms:h}}(L,T,I,k.initiateSamlConfig),P=function(n,a){var i=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&&(r("finished loading...bootstrapping bento"),setTimeout(a.swapToApp,1300))},onerror:function(){a.swapToForms(),T.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&&(r("finished loading...bootstrapping bento"),setTimeout(a.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"),i.appendChild(d)})}}}(L,C),B=function(e,t,o,n){var a=document.querySelector(".signin-button"),s=document.getElementById("login-messages"),d=!1,c=void 0,g=n.getSamlState;function f(e,t){var o=document.createElement(e);return Object.keys(t).forEach(e=>{o.setAttribute(e,t[e])}),o}function h(){d=!1,e.enableButton(a,"Sign in")}function p(e){var t=!1;if("auth1:redirect_to_other_deployment"===e.errorKey){var o=(e.keyedErrors||[])[0]||{},n=o.values&&o.values.tryAt||"",a=(document.querySelector("input[name=email]").value||"").trim(),i=(document.querySelector("input[name=password]").value||"").trim();if(n){r("Redirecting to ["+n+"] with "+a);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:a,type:"hidden"})),s.appendChild(f("input",{name:"password",value:i,type:"hidden"}));var d=m("return_to"),c=function(e){var t=m("provider"),o=e.includes("sumologic")||e.includes("zendesk");return{aha:"aha",salesforce:"salesforce",mindtouch:"mindtouch",talentlms:"talentlms",skilljar:"skilljar"}[t]||(o?"zendesk":"")}(d),u=m("SAMLRequest"),l=m("RelayState");c?(s.appendChild(f("input",{name:"provider",value:c,type:"hidden"})),u&&(s.appendChild(f("input",{name:"SAMLRequest",value:u,type:"hidden"})),s.appendChild(f("input",{name:"RelayState",value:l,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 v(){window.shouldDelayLoad=!1,e.hasFinishLoading()?(window.loadApp&&window.loadApp(),t.swapToApp()):e.startProgress()}function b(){performance.mark("HEIMDALL_LOGIN_VIEW_DONE"),clearTimeout(c),u&&w("ASID",u,3e5),localStorage.setItem("ui.justLoggedIn","true"),j&&j.checkCSELogin()?j.loadCSE():(i&&function(){if(!u){var e=(document.cookie||"").split("; ").filter(e=>/^ASID=[^;]/.test(e)),t=m("asid");u=e.length?e[0].replace("ASID=",""):t}window.sumoEarlyApiCalls={auth:l("/json/v1/authentication/user",{method:"GET"}),userSettings:l("/json/v1/userSettings/get",{method:"POST",body:JSON.stringify({userSettingsList:[]})}),upgradePageKnob:l("/json/v1/account/getUpgradePageKnob",{method:"GET"}).then(({upgradeButton:e,upgradePage:t})=>({upgradeButton:e,upgradePage:t})),passwordPolicy:l("/json/v1/authentication/passwordpolicy",{method:"GET"})}}(),v())}function S(n){if(u=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 p(n)||(h(),n.keyedErrors=n.keyedErrors.map(e=>{var t=e.key;"auth1:login_failed"===t&&("LOCKDOWN"===g()?t="auth1:login_failed_with_saml_lockdown":"ENABLED"===g()&&(t="auth1:login_failed_with_saml"));var o=Object.assign({},e);return o.key=t,o}),o.handleErrors(n,s));var i}function E(e){h(),o.handleErrors(e,s)}return function e(){!u&&y()?b():(clearTimeout(c),c=setTimeout(e,500))}(),{doLogin:function(t){t.preventDefault(),t.stopPropagation(),o.clearMessage(s);var n=(document.querySelector("input[name=email]").value||"").trim(),i=(document.querySelector("input[name=password]").value||"").trim();if(n&&i&&!d){d=!0,e.disableButton(a);var r=(location.href.match(/[?&]customerId=([^]*)/i)||[])[1];l("../json/v1/authentication/loginwithcredentials",{method:"POST",body:JSON.stringify({email:n,password:i,customerId:r})}).then(S).catch(E)}},doFastMfa:function(){try{var e=JSON.parse(localStorage.getItem("mfa.redirected.params"));if(localStorage.removeItem("mfa.redirected.params"),u=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:u},b)}catch(e){localStorage.removeItem("mfa.redirected.params"),t.swapToForms()}},submitRoute:function(e){document.location.hash="/"+e},handleUrlReasons:function(){var e=m("reason");o.handleReason(e,s,!1)},startProgressOrLoad:v}}(L,C,T,k),O=function(e,t,o){var n=document.querySelector("#forgot-password-form"),a=document.querySelector("#forgot-password-success"),i=document.getElementById("forgot-password-messages"),s=document.getElementById("forgot-password-submit"),d=document.querySelector("#forgot-password input[name=email]");function u(){e.enableButton(s,"Send Link")}function g(e){if(u(),e.success)n.setAttribute("style","display: none;"),a.setAttribute("style","display: block;");else{var t=e.redirectedUrl||"";if(""!==t.trim()){var o=(d&&d.value||"").trim();r("ForgotPassword redirecting to "+t),document.location.assign(t+"/ui/?forgotPassword="+encodeURIComponent(o))}}}function f(e){u();var t=e&&e.errors&&e.errors[0]||{};o.handleErrors(t,i)}function h(t){o.handleErrors("",i);var n=(d&&d.value||t||"").trim();if(n&&c(n))e.disableButton(s),l("../json/v1/authentication/requestpasswordreset?email="+encodeURIComponent(n),{method:"GET"}).then(g).catch(f);else{o.handleErrors({message:"Please enter a valid email."},i,!0)}}return{sendForgotPasswordLink:h,checkInitialTasks:function(){var e=m("forgotPassword").trim();e&&h(e)}}}(L,0,T),A=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"),s=document.querySelector("#forgot-subdomain input[name=email]");function d(){e.enableButton(r,"Send Me My Subdomain")}function u(){d(),n.setAttribute("style","display: none;"),a.setAttribute("style","display: block;")}function g(e){d();var t=e&&e.errors&&e.errors[0]||{};o.handleErrors(t,i)}function f(t){o.handleErrors("",i);var n=(s&&s.value||t||"").trim();if(n&&c(n))e.disableButton(r),l("../api/v1/account/subdomain/recover?email="+encodeURIComponent(n),{method:"POST"}).then(u).catch(g);else{o.handleErrors({message:"Please enter a valid email."},i,!0)}}return{sendForgotSubdomainLink:f,checkInitialTasks:function(){var e=m("forgotSubdomain").trim();e&&f(e)}}}(L,0,T),D=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")||m("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),l(`../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")}))}}}(L,T),M=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."}}}(),R=(E={footer:document.getElementById("footer"),brandContainer:document.getElementById("brand-container"),improvedLogin:document.getElementById("BFS")},_={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=m("logo"),t=_[e];t&&(function(e){E.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,E.brandContainer.appendChild(o)}(t,e),E.improvedLogin.classList.add("partner"))}}),j=function(){var e=m("tenantName"),t=m("redirectUrl"),o=document.getElementById("login-messages");function n(e){e.error?(T.handleErrors(e,o),setTimeout(()=>{B.startProgressOrLoad()},3e3)):window.location.assign(e.returnURL)}function a(e){"string"==typeof e?T.handleReason(e,o):e.status&&"401"===e.status?B.startProgressOrLoad():T.handleReason("noAsid",o)}return{checkCSELogin:function(){return e&&t},loadCSE:function(){if(!u){var i=(document.cookie||"").split("; ").filter(e=>/^ASID=[^;]/.test(e)),r=m("asid");u=i.length?i[0].replace("ASID=",""):r}u?l(`/json/v1/authentication/generateCseJwt?tenantName=${e}${t?"&redirectUrl="+t:""}`,{method:"GET"}).then(n).catch(a):T.handleReason("noAsid",o)}}}();L.shouldShowAnimation||document.getElementById("BFS").classList.add("no-animation");var x=[P.schedulePrefetching,M.updateCurrentYear];if(p()){var F=m("asid"),U=m("mfa_status");if(U){var N={asid:F,canRememberMfa:m("canRememberMfa"),mfa_status:U};localStorage.setItem("mfa.redirected.params",JSON.stringify(N))}else w("ASID",F,3e5);const e=m("return_to");(function(e){try{const{protocol:t,origin:o}=new URL(e);return"https:"===t&&(o.endsWith(".sumologic.net")||o.endsWith(".sumologic.com")||o.endsWith(".prada-epd.nl")||o.endsWith(".ephemeral.in"))}catch(e){return!1}})(e)&&document.location.assign(e)}else h?(x.unshift(C.removeAllForms),s.has("asid")&&!y()&&w("ASID",m("asid"),3e5),j.checkCSELogin()?j.loadCSE():C.showLoading()):/\/dashboard.html/.test(window.location.href)?(window.shouldDelayLoad=!0,l(`/json/v2/content/item/public/${m("k")}?contentType=dashboard`,{method:"GET"}).then(e=>{e.error?S():(C.removeAllForms(),C.showLoading(),window.shouldDelayLoad=!1,window.loadApp&&window.loadApp())}).catch(()=>{S()})):S();if(window.onload=()=>{x.forEach(e=>{"function"==typeof e&&e()})},window.addEventListener("hashchange",b),window.doLogin=B.doLogin,window.submitRoute=B.submitRoute,window.sendForgotPasswordLink=O.sendForgotPasswordLink,window.sendForgotSubdomainLink=A.sendForgotSubdomainLink,window.verifySubdomainRedirect=D.verifySubdomainRedirect,/localhost|nite/.test(location.host)){var q=new RegExp(["cosmeticsrc.com","tribedone.org","js-cache"].join("|"));new PerformanceObserver(e=>{e.getEntries().forEach(e=>{q.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"]})}}();