;(function($,_,undefined){ips.controller.register('ccauth0.login.loginButton',{initialize:function(){console.log('auth0 controller loaded.');this.on('click','a[data-target-modal="login"]',this.loginRedirect.bind(this));this.on('click','a.global-logout-link',this.logoutRedirect.bind(this));this.setup();},setup:function(){let loginElem=this.scope.find('a[data-target-modal="login"]');let logoutElem=this.scope.find('a.global-logout-link');if(!ipsSettings.memberID){loginElem.show();logoutElem.hide();}else{loginElem.hide();logoutElem.show();}},loginRedirect:function(){let redirectURL=new URL(ipsSettings.loginLink);if(redirectURL.origin!==window.location.origin)return;window.location.assign(ipsSettings.loginLink);},logoutRedirect:function(){let redirectURL=new URL(ipsSettings.logoutLink);if(redirectURL.origin!==window.location.origin)return;window.location.assign(ipsSettings.logoutLink);}});}(jQuery,_));;