adf=window.adf||{};adf.mf=adf.mf||{};adf.mf.api=adf.mf.api||{};adf.mf.el=adf.mf.el||{};adf.mf.locale=adf.mf.locale||{};adf.mf.log=adf.mf.log||{};adf.mf.resource=adf.mf.resource||{};adf.mf.util=adf.mf.util||{};adf.mf.internal=adf.mf.internal||{};adf.mf.internal.api=adf.mf.internal.api||{};adf.mf.internal.el=adf.mf.internal.el||{};adf.mf.internal.el.parser=adf.mf.internal.el.parser||{};adf.mf.internal.locale=adf.mf.internal.locale||{};adf.mf.internal.log=adf.mf.internal.log||{};
adf.mf.internal.mb=adf.mf.internal.mb||{};adf.mf.internal.perf=adf.mf.internal.perf||{};adf.mf.internal.perf.story=adf.mf.internal.perf.story||{};adf.mf.internal.resource=adf.mf.internal.resource||{};adf.mf.internal.util=adf.mf.internal.util||{};var LoginManagerSettings=LoginManagerSettings||{};LoginManagerSettings.loginBtnId="div#loginButton";LoginManagerSettings.loginBtn_pressedClass="amx-commandButton-pressed";LoginManagerSettings.showRememberMe=!1;
try{var displayOracleErrorMessage=function(a){adf.mf.login.hideBusy();alert(a)},onADFMobileNativeDialogDisplayed=function(){adf.mf.login.hideBusy()},LoginButton=function(a){try{this.parent=a,this.$node=function(){var a=$(this.parent._loginBtnId);if(null==a)alert(adf.mf.resource.getInfoString("AMXInfoBundle","MSG_LOGINBUTTON_MISSING"));else return a},this.ontouchstart=function(a){a.preventDefault();this.$node().addClass(this.parent._loginBtnId_pressedClass)},this.ontouchmove=function(a){a.preventDefault();
var b=this.$node();this.parent.testHit(b,this.parent.getActiveTouch(a))?b.addClass(this.parent._loginBtnId_pressedClass):b.removeClass(this.parent._loginBtnId_pressedClass)},this.ontouchend=function(a){a.preventDefault();a=this.$node();adf.mf.login.onLogin();a.removeClass(this.parent._loginBtnId_pressedClass)},this.init=function(){var a=this.$node();a.bind("touchmove",function(a){adf.mf.login.loginButton.ontouchmove(a.originalEvent)});a.bind("touchend",function(a){adf.mf.login.loginButton.ontouchend(a.originalEvent)});
a.bind("touchstart",function(a){adf.mf.login.loginButton.ontouchstart(a.originalEvent)})}}catch(b){alert(adf.mf.resource.getInfoString("AMXInfoBundle","MSG_LOGINBUTTON_CTOR_FAILED",b))}},LoginManager=function(){this._loginBtnId=LoginManagerSettings.loginBtnId;this._loginBtnId_pressedClass=LoginManagerSettings.loginBtn_pressedClass;this._showRememberMe=LoginManagerSettings.showRememberMe;this._isMTAware=this._rememberMe=!1;this.setMTAware=function(a){this._isMTAware=a};this.showRememberMe=function(){this._showRememberMe=
!0;this.updateRememberMe()};this.hideRememberMe=function(){this._showRememberMe=!1;this.updateRememberMe()};this.getRememberMe=function(){return this._rememberMe};this.setRememberMe=function(a){this._rememberMe=a};this.toggleRememberMe=function(){this.setRememberMe(!this.getRememberMe());this.updateRememberMe()};this.updateRememberMe=function(){this._showRememberMe?($("#rememberMePanel").show(),this.getRememberMe()?$("#rememberMe").addClass("on").removeClass("off"):$("#rememberMe").addClass("off").removeClass("on")):
$("#rememberMePanel").hide()};this.getUserName=function(){return $("#username").val()};this.getPassword=function(){return $("#password").val()};this._login=function(){try{var a=this.getUserName(),d=adf.mf.util.obfuscate(this.getPassword());this.getRememberMe();void 0!=a&&void 0!=d&&""!=a&&""!=d?"undefined"!=typeof adf&&"undefined"!=typeof adf.mf.api.invokeSecurityMethod?adf.mf.api.invokeSecurityMethod("login",a,d,""):(adf.mf.login.hideBusy(),alert(adf.mf.resource.getInfoString("AMXInfoBundle","MSG_LOGINAPI_MISSING"))):
(adf.mf.login.hideBusy(),alert(adf.mf.resource.getInfoString("AMXInfoBundle","MSG_USERNAME_PASSWORD_MISSING")))}catch(e){adf.mf.login.hideBusy(),alert(adf.mf.resource.getInfoString("AMXInfoBundle","MSG_LOGIN_FAILED",e.description))}};this.hideBusy=function(){var a=$("#amx-loading");a.removeClass("showing");a.addClass("hiding");a.removeClass("hiding");a.addClass("hidden")};this.showBusy=function(){var a=$("#amx-loading");a.removeClass("hidden");a.addClass("beforeShowing");a.removeClass("beforeShowing");
a.addClass("showing")};this.onLogin=function(){try{adf.mf.login.showBusy(),setTimeout("adf.mf.login._login();",5)}catch(a){alert(adf.mf.resource.getInfoString("AMXInfoBundle","MSG_ONLOGIN_FAILED",a.description)),adf.mf.login.hideBusy()}};this.focusUsername=function(){document.getElementById("username").focus()};this.focusPassword=function(){document.getElementById("password").focus()};this.touchStart=function(){$("#password").blur()};this.touchEnd=function(){};this.touchMove=function(a){a.preventDefault()};
this.touchCancel=function(){};this.init=function(a,d){this.loginButton.init();this.updateRememberMe();$("#username").blur();adf.mf.api.invokeSecurityMethod("getLoginViewInitData",null,null,null,function(d,g){adf.mf.api.login.initialSettings=g[0];a(d,g)},function(a,b){d(a,b)})};this.getActiveTouch=function(a){return a.touches&&0<a.touches.length?a.touches[0]:a.changedTouches&&0<a.changedTouches.length?a.changedTouches[0]:null};this.testHit=function(a,d){if(null===d||null===a)return!1;var e=d.clientX,
g=d.clientY,h=a.position().top,k=a.position().left,m=a.width(),n=a.height(),o=!1;e<k+m&&e>k&&g<h+n&&g>h&&(o=!0);return o?!0:!1};try{this.loginButton=new LoginButton(this)}catch(a){alert(adf.mf.resource.getInfoString("AMXInfoBundle","MSG_NEW_LOGINBUTTON_FAILED",a))}};adf.mf.login=new LoginManager;var LoginAPI=function(){this.initialSettings=null;this.isAppLevelLogin=function(){return null!=this.initialSettings?this.initialSettings.isAppLevelLogin:!1};this.getFeatureName=function(){return null!=this.initialSettings?
this.initialSettings.featureName:""};this.getApplicationName=function(){return null!=this.initialSettings?this.initialSettings.applicationName:""};this.getCurrentUsername=function(){return null!=this.initialSettings?this.initialSettings.currentUsername:""};this.getConnectionName=function(){return null!=this.initialSettings?this.initialSettings.connectionName:""}};adf.mf.api.login=new LoginAPI;console.log("adf.mf.api.login has now been configured.")}catch(e$$85){alert(adf.mf.resource.getInfoString("AMXInfoBundle",
"MSG_ERROR_IN_SCRIPT",loadStage,e$$85.description))};