window.adf||(window.adf={});adf.mf=adf.mf||{};adf.mf.environment=adf.mf.environment||{};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||{};window.adf_mf_sessionKey=0;
(function(){adf.mf.api.resourceFile={};adf.mf.api.resourceFile.loadJsFile=function(a,b,d,e,g){if(null==g){var h=document.getElementsByTagName("head")[0],k=document.createElement("script");k.type="text/javascript";k.src=a;k.async=b;k.onload=d;k.onerror=e;h.appendChild(k)}else adf.mf.api.resourceFile._loadFileWithAjax(a,b,function(b){if(null!=b&&0<b.length){b=g(b);try{(new Function(b))(),d()}catch(h){console.log(a),console.log(h),e(h)}}else e("Empty response")},e)};adf.mf.api.resourceFile.loadJsonFile=
function(a,b,d,e){adf.mf.api.resourceFile._loadFileWithAjax(a,b,function(a){if(null!=a&&0<a.length)if(JSON)try{var b=JSON.parse(a);d(b)}catch(k){e("JSON failure: "+k)}else e("Browser is unable to parse the JSON text because it does not support JSON.parse()");else e("Empty response")},e)};adf.mf.api.resourceFile._loadFileWithAjax=function(a,b,d,e){var g=new XMLHttpRequest;b&&(g.onreadystatechange=function(){4==g.readyState&&d(g.responseText)});g.open("GET",a,b);g.send(null);b||(4==g.readyState?d(g.responseText):
e("No response"))}})();
(function(){adf.mf.api.getQueryString=function(){if(document.location.search&&""!=document.location.search)return document.location.search;if(null!=window.AdfmfCallback){var a=window.AdfmfCallback.getQueryString();if(null!=a)return a}a=document.location.search;return null==a?"":a};adf.mf.api.getQueryStringParamValue=function(a,b,d){var e=null;if(null!=a&&null!=b){var g=a.indexOf("?"+b+"=");0>g&&(g=a.indexOf("&"+b+"="));0<=g&&(b=a.indexOf("&",g+1),0>b&&(b=a.length),a=a.substring(g,b),g=a.indexOf("="),
0<=g&&g<a.length&&(e=a.substring(g+1),0==e.length&&(e=null)))}null!=e&&(e=unescape(e));return(null==e||""==e)&&void 0!==d?d:e};adf.mf.internal.locale.init=function(){if(!adf.mf.internal.locale.initStarted){adf.mf.internal.locale.initStarted=!0;var a=null;if(void 0==a)try{a=window.navigator.userLanaguage}catch(b){}if(void 0==a)try{a=window.navigator.language}catch(d){}void 0==a&&(a="en");var e=document.dir;""==e&&(e="ltr");var g=adf.mf.api.getQueryString(),a=adf.mf.api.getQueryStringParamValue(g,"lang",
a),e=adf.mf.api.getQueryStringParamValue(g,"dir",e);document.documentElement.setAttribute("lang",a);document.documentElement.setAttribute("dir",e);document.dir=e}}})();
(function(){adf.mf.internal.locale.splitLocale=function(a){var b=[null,null,null],d=0,e=a.indexOf("_");if(-1!=e)b[0]=a.substring(d,e);else return b[0]=a,b;d=++e;e=a.indexOf("_",d);if(-1!=e)b[1]=a.substring(d,e);else return b[1]=a.substring(d),b;d=++e;b[2]=a.substring(d);return b};adf.mf.locale.getUserLanguage=function(){var a=document.documentElement.getAttribute("lang");null==a&&alert('Illegal use of language API prior to "showpagecomplete" event.');return a};adf.mf.locale.getJavaLanguage=function(a){null==
a&&(a=getUserLanguage());var b=a.indexOf("-",0);if(-1==b)return a;var d=a.length,e=a.substring(0,b),e=e+"_";b++;var g=a.indexOf("-",b);-1==g&&(g=d);b=a.substring(b,g);e+=b.toUpperCase();g!=d&&(e=e+"_"+a.substring(g+1,d));return e};adf.mf.locale.generateLocaleList=function(a,b){var d=adf.mf.locale.getJavaLanguage(a),e=adf.mf.internal.locale.splitLocale(d),d=e[0],g=e[1],e=e[2],h=[];0!=a.indexOf("en")&&h.push("en-US");null!=d&&(h.push(d),null!=g&&(h.push(d+"-"+g),null!=e&&b&&h.push(d+"-"+g+"-"+e)));
return h}})();
(function(){adf.mf.resource.ADFErrorBundleName="ADFErrorBundle";adf.mf.resource.ADFInfoBundleName="ADFInfoBundle";adf.mf.resource.loadADFMessageBundles=function(a,b){adf.mf.resource.loadMessageBundle(adf.mf.resource.ADFInfoBundleName,a,b.slice(0));adf.mf.resource.loadMessageBundle(adf.mf.resource.ADFErrorBundleName,a,b.slice(0));adf.mf.resource.adfMessageBundlesLoaded=!0};adf.mf.resource.loadMessageBundle=function(a,b,d){d=d||[adf.mf.locale.getUserLanguage()];adf.mf.internal.resource.loadGenericMessageBundle(a,b,
d,function(){return void 0!==adf.mf.resource[a]},function(b){null===b?adf.mf.log.Framework.isLoggable(adf.mf.log.level.WARNING)&&adf.mf.log.Framework.logp(adf.mf.log.level.WARNING,"adf.mf.resource","loadMessageBundle","Failed to load "+a):adf.mf.log.Framework.isLoggable(adf.mf.log.level.INFO)&&adf.mf.log.Framework.logp(adf.mf.log.level.INFO,"adf.mf.resource","loadMessageBundle","Loaded message bundle "+a+" for locale "+b)})};adf.mf.resource.getInfoString=function(a,b){var d=Array.prototype.slice.call(arguments,
2);return adf.mf.internal.resource.getResourceStringImpl(a,b,d)};adf.mf.resource.getErrorId=function(a,b){return adf.mf.internal.resource.getResourceStringImpl(a,b+"__ID")};adf.mf.resource.getErrorCause=function(a,b){var d=Array.prototype.slice.call(arguments,2);return adf.mf.internal.resource.getResourceStringImpl(a,b+"_CAUSE",d)};adf.mf.resource.getErrorAction=function(a,b){var d=Array.prototype.slice.call(arguments,2);return adf.mf.internal.resource.getResourceStringImpl(a,b+"_ACTION",d)};adf.mf.internal.resource.loadJavaScript=
function(a,b,d){adf.mf.api.resourceFile.loadJsFile(a,!1,b,d,function(b){b+="\n//@ sourceURL="+a;b=b.replace(/var LocaleSymbols/,"window.LocaleSymbols");return b=b.replace(/TrMessageFactory\.\_TRANSLATIONS\=/,"window.TrMessageFactory._TRANSLATIONS=")})};adf.mf.internal.resource.loadJavaScriptByLocale=function(a,b,d,e){if(0==a.length)e(null);else{var g=a.pop(),h=b(g),k=function(){if(adf.mf.log.Framework.isLoggable(adf.mf.log.level.WARNING)){var g=document.location.pathname,g=g.substring(0,g.lastIndexOf("/"));
adf.mf.log.Framework.logp(adf.mf.log.level.WARNING,"adf.mf.internal.resource","loadJavaScriptByLocale","Failed to load "+h+" from "+g)}adf.mf.internal.resource.loadJavaScriptByLocale(a,b,d,e)};adf.mf.log.Framework.isLoggable(adf.mf.log.level.FINER)&&adf.mf.log.Framework.logp(adf.mf.log.level.FINER,"adf.mf.internal.resource","loadJavaScriptByLocale","url: "+h+" locales: "+adf.mf.internal.log.getStringifedIfNeeded(a));adf.mf.internal.resource.loadJavaScript(h,function(){d(g)?(adf.mf.log.Framework.isLoggable(adf.mf.log.level.INFO)&&
adf.mf.log.Framework.logp(adf.mf.log.level.INFO,"adf.mf.internal.resource","loadJavaScriptByLocale","Loaded "+h),e(g)):k()},k)}};adf.mf.internal.resource.loadGenericMessageBundle=function(a,b,d,e,g){adf.mf.internal.resource.loadJavaScriptByLocale(d,function(d){var e=b+"/resource/"+a;return 0==d.indexOf("en")?e+".js":e+"_"+adf.mf.locale.getJavaLanguage(d)+".js"},e,g)};adf.mf.internal.resource.logResourceImpl=function(a,b,d,e,g){adf.mf.log.Framework.isLoggable(a)&&adf.mf.log.Framework.logp(a,"adf",
b,adf.mf.internal.resource.getResourceStringImpl(d,e,g))};adf.mf.internal.resource.getResourceStringImpl=function(a,b,d){var e,g=adf.mf.locale.getJavaLanguage(adf.mf.locale.getUserLanguage()).split("_");g.unshift(a);for(var h=g.length;0<h;h--){var k=g.slice(0,h).join("_"),k=adf.mf.resource[k];if(void 0!==k&&null!==k){k=k[b];if(void 0!==k&&null!==k)return adf.mf.log.format.apply(this,[k].concat(d));1==h&&(e="Unable to find message key "+b+" for bundle "+a)}else 1==h&&(e="Unable to find message bundle "+
a)}if(!adf.mf.resource.adfMessageBundlesLoaded)return adf.mf.log.Framework.isLoggable(adf.mf.log.level.FINE)&&adf.mf.log.Framework.logp(adf.mf.log.level.FINE,"adf","getResourceStringImpl",e),null==d&&(d=""),d=a+"["+b+"]("+d+")","AMXInfoBundle[MSG_LOADING]()"==d?d="Loading":"ADFInfoBundle"==a&&("LBL_INFO_DISPLAY_STR"==b?d="Info":"LBL_CONFIRMATION_DISPLAY_STR"==b?d="Confirmation":"LBL_WARNING_DISPLAY_STR"==b?d="Warning":"LBL_ERROR_DISPLAY_STR"==b?d="Error":"LBL_FATAL_DISPLAY_STR"==b?d="Fatal":"LBL_OK_DISPLAY_STR"==
b&&(d="OK")),d;adf.mf.log.Framework.isLoggable(adf.mf.log.level.SEVERE)&&adf.mf.log.Framework.logp(adf.mf.log.level.SEVERE,"adf","getResourceStringImpl",e);return null}})();
(function(){adf.mf.log.format=function(a,b){b=Array.prototype.slice.call(arguments,1);return a.replace(/\{(\d+)\}/g,function(a,e){return b[e]})};adf.mf.log.formatDate=function(a){function b(a,b){for(var g=""+a;g.length<b;)g="0"+g;return g}return a.getFullYear()+"-"+b(a.getMonth()+1,2)+"-"+b(a.getDate(),2)+" "+b(a.getHours(),2)+":"+b(a.getMinutes(),2)+":"+b(a.getSeconds(),2)+"."+b(a.getMilliseconds(),3)};adf.mf.log.logAndThrowErrorResource=function(a,b,d){var e=Array.prototype.slice.call(arguments,
3),e=adf.mf.internal.resource.getResourceStringImpl(a,d,e);adf.mf.log.Framework.isLoggable(adf.mf.log.level.SEVERE)&&adf.mf.log.Framework.logp(adf.mf.log.level.SEVERE,"adf",b,e);throw adf.mf.resource.getErrorId(d)+": "+e;};adf.mf.log.logInfoResource=function(a,b,d,e){var g=Array.prototype.slice.call(arguments,4);adf.mf.internal.resource.logResourceImpl(b,d,a,e,g)};adf.mf.internal.log.getStringifedIfNeeded=function(a){return"object"==typeof a&&null!=adf.mf.util&&null!=adf.mf.util.stringify?adf.mf.util.stringify(a):
a};adf.mf.internal.log.level=function(a,b){this.name=a;this.value=b;this.toString=function(){return this.name}};adf.mf.log.level=adf.mf.log.level||{SEVERE:new adf.mf.internal.log.level("SEVERE",1E3),WARNING:new adf.mf.internal.log.level("WARNING",900),INFO:new adf.mf.internal.log.level("INFO",800),CONFIG:new adf.mf.internal.log.level("CONFIG",700),FINE:new adf.mf.internal.log.level("FINE",500),FINER:new adf.mf.internal.log.level("FINER",400),FINEST:new adf.mf.internal.log.level("FINEST",300),ALL:new adf.mf.internal.log.level("ALL",
Number.MIN_VALUE)};adf.mf.log.compilePattern=function(a){a=a.replace("%LOGGER%","{0}");a=a.replace("%LEVEL%","{1}");a=a.replace("%TIME%","{2}");a=a.replace("%CLASS%","{3}");a=a.replace("%METHOD%","{4}");return a=a.replace("%MESSAGE%","{5}")};adf.mf.log.logger=function(a){this.name=a;this.level=adf.mf.log.level.SEVERE;this.pattern=adf.mf.log.compilePattern("[%LEVEL% - %LOGGER% - %CLASS% - %METHOD%] %MESSAGE%");this.init=function(a,d){this.level=a;d&&(this.pattern=adf.mf.log.compilePattern(d))};this.isLoggable=
function(a){return a.value>=this.level.value};this.toString=function(){return this.name};this.logp=function(a,d,e,g){if(!1!=this.isLoggable(a)){var h=adf.mf.log.formatDate(new Date),a=adf.mf.log.format(this.pattern,this.name,a.name,h,d,e,g);console.log(a)}}};adf.mf.log.Framework=adf.mf.log.Framework||new adf.mf.log.logger("oracle.adfmf.framework");adf.mf.log.Application=adf.mf.log.Application||new adf.mf.log.logger("oracle.adfmf.application")})();
adf.mf.internal.api.queueShowPageComplete=function(){if(!adf.mf.internal.api._showPageCompleteQueued){adf.mf.internal.api._showPageCompleteQueued=!0;var a=document.createEvent("Events");a.initEvent("showpagecomplete",!1,!1,{});a.view=window;a.altKey=!1;a.ctrlKey=!1;a.shiftKey=!1;a.metaKey=!1;a.keyCode=0;a.charCode="a";document.dispatchEvent(a)}};adf.mf.internal.handleLowMemory=function(){document.body.className+=" adfmf-low-memory"};adf.mf.internal._handleWebViewDisplayHideLater=function(){adf.mf.internal.handleWebViewDisplay(!1)};
adf.mf.internal.handleWebViewDisplay=function(a){null!=adf.mf.internal._handleWebViewDisplayTimer&&(window.clearTimeout(adf.mf.internal._handleWebViewDisplayTimer),adf.mf.internal._handleWebViewDisplayTimer=null);a?document.body.style.display="block":(a=adf.mf.internal.amx&&0!=adf.mf.internal.amx._showLoadingCalls,adf.mf.internal.api&&adf.mf.internal.api._showPageCompleteQueued&&!a?document.body.style.display="none":adf.mf.internal._handleWebViewDisplayTimer=window.setTimeout(adf.mf.internal._handleWebViewDisplayHideLater,
4E3))};
function onBaseLoad(){var a=function(a){console.log(a);var b=document.createElement("div");b.style.WebkitUserSelect="text";b.appendChild(document.createTextNode(a));a=document.getElementById("BaseLoadErrorBox");if(null==a){a=document.createElement("div");a.id="BaseLoadErrorBox";var d=a.style;d.zIndex="10001";d.position="absolute";d.top="20px";d.bottom="20px";d.left="20px";d.right="20px";d.padding="10px";d.overflow="auto";d.opacity="0.9";d.backgroundColor="white";d.color="black";d.WebkitOverflowScrolling="touch";
document.body.appendChild(a)}a.appendChild(b)};adf.mf.internal.log.lastResortLogger=a;var b=null,d,e="js/profile-html.json";window.adf_base_success_log=[];window.adf._bootstrapMode&&(window.adf_base_success_log.push("adf._bootstrapMode: "+window.adf._bootstrapMode),"amx"==window.adf._bootstrapMode?e="js/profile.json":"dev"==window.adf._bootstrapMode?(e="../Base/js/json/profile-dev.json",b="dev"):"hosted"==window.adf._bootstrapMode?(e="js/profile-hosted.json",b="hosted"):"eltest"==window.adf._bootstrapMode?
e="../../Base/js/json/profile-eltest.json":"automate"==window.adf._bootstrapMode?(e="../../../../../www/js/profile-automate.json",b="automate"):"login"==window.adf._bootstrapMode?e="js/profile-login.json":"html"==window.adf._bootstrapMode?e="js/profile-html.json":a("Error: unexpected window.adf._bootstrapMode: "+window.adf._bootstrapMode));var g="";window.adf.wwwPath?g=window.adf.wwwPath:adf.wwwPath="";e=g+e;window.baseDebug&&alert("Profile JSON File: "+e);adf.mf.api.resourceFile.loadJsonFile(e,!1,
function(a){window.baseDebug&&alert("Successfully loaded the resources JSON file: "+e);window.adf_base_success_log.push("Successfully loaded the resources JSON file: "+e);d=a},function(b){window.baseDebug&&alert("Unable to load the resources JSON file: "+e+"\nmessage: "+b);a("Unable to load the resources JSON file: "+e+"; "+b)});if(null==d)a("Error: a profile is required to set up the base page");else{var h=adf.mf.api.getQueryString();d.dtMode="true"==adf.mf.api.getQueryStringParamValue(h,"amx_dtmode");
window.adf_base_success_log.push("dtMode: "+d.dtMode);adf.mf.environment.profile=d;d.locale&&_loadJsResourceWithSourceUrl(g+d.locale);adf.mf.internal.locale.init();var k=d.cssResources;if(null!=k)for(var m=0,n=k.length;m<n;++m){var o=k[m];if(d.dtMode||"hosted"==b)"css/amx.css"==o?o=adf.mf.api.getQueryStringParamValue(h,"amx_skin_override",o):"css/dvtm.css"==o&&(o=adf.mf.api.getQueryStringParamValue(h,"dvtm_skin_override",o));else if("dev"==b&&-1!=o.indexOf("css-mobileAlta-1.1-ios/"))var q=adf.mf.api.getQueryStringParamValue(h,
"amx_skin_folder_override","css-mobileAlta-1.1-ios/"),o=o.replace("css-mobileAlta-1.1-ios/",q);q=document.createElement("link");q.setAttribute("rel","stylesheet");q.setAttribute("type","text/css");q.setAttribute("href",g+o);document.head.appendChild(q)}d.dtMode&&(document.documentElement.className+=" amx-dtmode");d.generateBaseHtml&&(m=document.createElement("div"),m.id="bodyPage",document.body.appendChild(m),n=document.createElement("div"),n.setAttribute("data-role","header"),m.appendChild(n),m=
document.createElement("div"),m.id="amx-loading",m.className="amx-loading showing",document.body.appendChild(m),m=document.createElement("div"),m.id="amx-loading-live-region",m.setAttribute("aria-atomic","true"),m.setAttribute("aria-live","assertive"),m.setAttribute("aria-relevant","additions"),n=adf.mf.resource.getInfoString("AMXInfoBundle","MSG_LOADING"),null==n&&(n="Loading"),m.textContent=n,n=m.style,n.width="0px",n.height="0px",n.overflow="hidden",document.body.appendChild(m));h=d.jsResources;
if(null!=h){m=0;for(n=h.length;m<n;++m)k=h[m],!(d.dtMode&&"js/adf.mf.device.integration.js"==k)&&!(d.dtMode&&"js/cordova-2.2.0.js"==k)&&(window.baseDebug&&alert("Profile JS Resource: "+g+k),_loadJsResourceWithSourceUrl(g+k))}d.generateBaseHtml&&!d.dtMode&&"hosted"!=b&&(m=document.getElementById("bodyPage"),null==m?a("Failed to locate bodyPage"):m.className="release"==adf.mf.internal.BUILD_CONFIGURATION?"amx-release":"amx-debug");b&&(amx.config.debug.enable=!0);adf.mf.environment.profile.mockData=
"undefined"===typeof adf.pg;window.adf_base_success_log.push("mockData: "+d.mockData);adf.mf.environment.profile.delayShowComplete?adf.mf.environment.profile.mockData?(adf.mf.log.Framework.logp(adf.mf.log.level.FINE,"base","onBaseLoad",window.adf_base_success_log.join("\n")),adf.mf.internal.api.showFirstAmxPage()):(adf.mf.log.Framework.logp(adf.mf.log.level.FINE,"base","onBaseLoad","adding deviceready listener"),adf.mf.internal.perf.perfTimings(!1,!1,!0,"waiting for PG device ready event"),document.addEventListener("deviceready",
onBaseDeviceReady,!1),adf.mf.internal.baseShowPageReady=!0,_showFirstAmxPageIfReady()):(adf.mf.log.Framework.logp(adf.mf.log.level.FINE,"base","onBaseLoad",window.adf_base_success_log.join("\n")),document.addEventListener("deviceready",onBaseDeviceReady,!1),adf.mf.internal.baseShowPageReady=!0,_showFirstAmxPageIfReady())}}
function _loadJsResourceWithSourceUrl(a){adf.mf.api.resourceFile.loadJsFile(a,!1,function(){window.baseDebug&&alert("Successfully loaded JavaScript "+a);window.adf_base_success_log.push("Successfully loaded JavaScript "+a)},function(b){window.baseDebug&&alert("Failed to load JS file: "+a);adf.mf.internal.log.lastResortLogger("Failed to load JS file: "+a+", "+b)},function(b){return b+="\n//@ sourceURL="+a})}
function onBaseDeviceReady(){adf.mf.internal.baseDeviceReady=!0;_showFirstAmxPageIfReady()}
function _showFirstAmxPageIfReady(){adf.mf.internal.baseDeviceReady&&adf.mf.internal.baseShowPageReady&&(adf.mf.log.Framework.logp(adf.mf.log.level.FINE,"base","_showFirstAmxPageIfReady",window.adf_base_success_log.join("\n")),!adf.mf.environment.profile.dtMode&&window.Cordova&&(0==Cordova.sessionKey&&0!=adf_mf_sessionKey&&(Cordova.sessionKey=adf_mf_sessionKey),0==Cordova.sessionKey&&(adf.mf.log.Framework.logp(adf.mf.log.level.FINE,"base","_showFirstAmxPageIfReady","Cordova SessionKey is not initialized"),
adfc.internal.LogUtil.showAlert("Cordova SessionKey is not initialized"))),adf.mf.internal.perf.perfTimings(!1,!1,!0,"PG deviceready event received"),adf.mf.log.Framework.logp(adf.mf.log.level.FINE,"base","_showFirstAmxPageIfReady","deviceready event received"),adf.mf.environment.profile.delayShowComplete?adf.mf.internal.api.showFirstAmxPage():adf.mf.internal.api.queueShowPageComplete())}window.addEventListener("load",onBaseLoad,!1);