function Oe(){this.Init()}m("AdfAutomationHelper",Oe);m("AdfAutomationHelper",Oe);r.v(Oe);Oe.$=function(){null==this.Wk&&(this.Wk=new Oe);return this.Wk};m("AdfAutomationHelper.getInstance",Oe.$);
Oe.rba={CURRENT_DIALOG_RETURN_ID:"currentDialogReturnId",AUTOMATION_ENABLED:"automationEnabled",DTS:"dts",PHASE:"phase",EVENT_QUEUE_LENGTH:"eventQueueLength",IS_ATTACHMENT_MODE:"isAttachmentMode",INITIALIZATION_COMPLETE:"initializationComplete",PARTIAL_TARGETS:"partialTargets",START_ADS_CLIENT_ID_COUNT:"startADSClientIdCount",WINDOW_EVENT_HEADER_MAP:"windowEventHeaderMap",IN_HANDLE_RICH_RESPONSE:"inHandleRichResponse",PARTIAL_REQUEST_REDIRECT:"partialRequestRedirect",IN_DELIVER_QUEUED_SERVER_EVENTS:"inDeliverQueuedServerEvents",
IN_DELIVER_QUEUED_EVENTS:"inDeliverQueuedEvents",WAITING_FOR_DOCUMENT_UNLOAD:"waitingForDocumentUnload",ARE_COMPONENTS_LOADED:"areComponentsLoaded",WAITING_FOR_DESCENDANT_RESIZE:"waitingForDescendantResize",WAITING_FOR_INCOMPLETE_IMAGES:"waitingForIncompleteImages",HAS_EVENTS_TO_DELIVER:"hasEventsToDeliver",WAITING_FOR_ANIMATION:"waitingForAnimation",ARE_SYNCHRONOUS_TIMERS_CLEARED:"areSynchronousTimersCleared",IN_GET_REQUEST_NAVIGATION:"inGetRequestNavigation",REST_DATA_SERVICE:"restDataService",
TIMERS:"timers"};m("AdfAutomationHelper.CONFIG",Oe.rba);
Oe.Z0={WAITING_FOR_USER_INPUT_PHASE:{reason:"WAITING_FOR_USER_INPUT_PHASE",message:"The page is not ready to receive user inputs. Possible reasons are: 1. Splash screen is displayed, 2. Event queue is not empty."},EVENT_QUEUE_IS_NOT_EMPTY:{reason:"EVENT_QUEUE_IS_NOT_EMPTY",message:"Event queue is not empty"},DIALOG_SERVICE_IS_BUSY:{reason:"DIALOG_SERVICE_IS_BUSY",message:"Dialog service is busy"},DTS_IS_NOT_READY:{reason:"DTS_IS_NOT_READY",message:"DTS is not ready"},PAGE_IS_NOT_LOADED:{reason:"PAGE_IS_NOT_LOADED",
message:"Page is not loaded"},PARTIAL_TARGETS_ARE_UPDATING:{reason:"PARTIAL_TARGETS_ARE_UPDATING",message:"Partial targets are updating"},OUTSTANDING_ACTIVE_DATA:{reason:"OUTSTANDING_ACTIVE_DATA",message:"Outstanding active data"},WINDOW_EVENTS_BEING_DELIVERED:{reason:"WINDOW_EVENTS_BEING_DELIVERED",message:"Window events being delivered"},APPLYING_RICH_RESPONSE:{reason:"APPLYING_RICH_RESPONSE",message:"Applying rich response"},REDIRECT_REQUEST:{reason:"REDIRECT_REQUEST",message:"Redirect request"},
PROCESSING_SERVER_EVENT_QUEUE:{reason:"PROCESSING_SERVER_EVENT_QUEUE",message:"Processing server EventQueue"},PROCESSING_CLIENT_EVENT_QUEUE:{reason:"PROCESSING_CLIENT_EVENT_QUEUE",message:"Processing client EventQueue"},WAITING_FOR_DOCUMENT_UNLOAD:{reason:"WAITING_FOR_DOCUMENT_UNLOAD",message:"Waiting for document unload"},WAITING_FOR_COMPONENTS_TO_BE_READY:{reason:"WAITING_FOR_COMPONENTS_TO_BE_READY",message:"Waiting for components to be ready"},WAITING_FOR_DESCENDANT_RESIZING:{reason:"WAITING_FOR_DESCENDANT_RESIZING",
message:"Waiting for descendant resizing"},WAITING_FOR_IMAGES_TO_LOAD:{reason:"WAITING_FOR_IMAGES_TO_LOAD",message:"Waiting for images to load"},WAITING_TO_DELIVER_SERVER_EVENTS:{reason:"WAITING_TO_DELIVER_SERVER_EVENTS",message:"Waiting to deliver server events"},WAITING_FOR_NAVIGATION_TO_COMPLETE:{reason:"WAITING_FOR_NAVIGATION_TO_COMPLETE",message:"Waiting for navigation to complete"},WAITING_FOR_ANIMATION_TO_COMPLETE:{reason:"WAITING_FOR_ANIMATION_TO_COMPLETE",message:"Waiting for animation to complete"},
WAITING_FOR_SYNCHRONOUS_TIMERS_TO_CLEAR:{reason:"WAITING_FOR_SYNCHRONOUS_TIMERS_TO_CLEAR",message:"Waiting for synchronous timers to clear"},WAITING_FOR_GET_NAVIGATION_TO_START:{reason:"WAITING_FOR_GET_NAVIGATION_TO_START",message:"Waiting for GET Navigation to start"},WAITING_FOR_REST_CALLS_TO_COMPLETE:{reason:"WAITING_FOR_REST_CALLS_TO_COMPLETE",message:"A REST service call is in progress"},JS_ERROR:{reason:"JS_ERROR",message:"Javascript error while executing whyIsNotSynchronizedWithServer. Error is: "},
NO_SUCH_DIALOG_ERROR:{reason:"NO_SUCH_DIALOG_ERROR",message:"Cannot find dialog with return id passed: "},DIALOG_DOCUMENT_NOT_READY:{reason:"DIALOG_DOCUMENT_NOT_READY",message:"Dialog document readyState is not complete."},DIALOG_ADF_PAGE_NOT_READY:{reason:"DIALOG_ADF_PAGE_NOT_READY",message:"Dialog ADF page is not loaded yet."},DIALOG_NOT_SYNCED:{reason:"DIALOG_NOT_SYNCED",message:"Dialog ADF page is not synced yet."}};m("AdfAutomationHelper.WAIT_REASONS",Oe.Z0);
Oe.prototype.cD=function(a){var b;try{var d=Oe.Z0,e=Oe.rba,f=xd.$(),g=a[e.DTS],h=a[e.AUTOMATION_ENABLED],l=a[e.REST_DATA_SERVICE];b=a[e.PHASE]!=A.Y0?d.WAITING_FOR_USER_INPUT_PHASE:0!=a[e.EVENT_QUEUE_LENGTH]?d.EVENT_QUEUE_IS_NOT_EMPTY:Pe.td()?d.DIALOG_SERVICE_IS_BUSY:!g||g.vm()!=Qe.an||g.kz()?d.DTS_IS_NOT_READY:a[e.IS_ATTACHMENT_MODE]?a[e.INITIALIZATION_COMPLETE]?null:d.PAGE_IS_NOT_LOADED:a[e.INITIALIZATION_COMPLETE]?null!=a[e.PARTIAL_TARGETS]?d.PARTIAL_TARGETS_ARE_UPDATING:0!=a[e.START_ADS_CLIENT_ID_COUNT]?
d.OUTSTANDING_ACTIVE_DATA:null!=a[e.WINDOW_EVENT_HEADER_MAP]?d.WINDOW_EVENTS_BEING_DELIVERED:a[e.IN_HANDLE_RICH_RESPONSE]?d.APPLYING_RICH_RESPONSE:a[e.PARTIAL_REQUEST_REDIRECT]?d.REDIRECT_REQUEST:a[e.IN_DELIVER_QUEUED_SERVER_EVENTS]?d.PROCESSING_SERVER_EVENT_QUEUE:a[e.IN_DELIVER_QUEUED_EVENTS]?d.PROCESSING_CLIENT_EVENT_QUEUE:a[e.WAITING_FOR_DOCUMENT_UNLOAD]?d.WAITING_FOR_DOCUMENT_UNLOAD:a[e.ARE_COMPONENTS_LOADED]?a[e.WAITING_FOR_DESCENDANT_RESIZE]?d.WAITING_FOR_DESCENDANT_RESIZING:a[e.WAITING_FOR_INCOMPLETE_IMAGES]?
d.WAITING_FOR_IMAGES_TO_LOAD:a[e.HAS_EVENTS_TO_DELIVER]?d.WAITING_TO_DELIVER_SERVER_EVENTS:f.Cta()?d.WAITING_FOR_NAVIGATION_TO_COMPLETE:a[e.WAITING_FOR_ANIMATION]?d.WAITING_FOR_ANIMATION_TO_COMPLETE:a[e.ARE_SYNCHRONOUS_TIMERS_CLEARED]?a[e.IN_GET_REQUEST_NAVIGATION]?d.WAITING_FOR_GET_NAVIGATION_TO_START:l&&l.td()?d.WAITING_FOR_REST_CALLS_TO_COMPLETE:null:d.WAITING_FOR_SYNCHRONOUS_TIMERS_TO_CLEAR:d.WAITING_FOR_COMPONENTS_TO_BE_READY:d.PAGE_IS_NOT_LOADED;h&&b&&(b=Oe.NH(b.reason),d.DIALOG_SERVICE_IS_BUSY.reason===
b.reason?b.details=Pe.URa():d.WAITING_FOR_SYNCHRONOUS_TIMERS_TO_CLEAR.reason===b.reason&&(b.details=Oe.Sib(a[e.TIMERS])))}catch(n){b=Oe.NH("JS_ERROR"),b.message=Oe.Kqa(n)}return b};r.a("AdfAutomationHelper.prototype.whyIsNotSynchronizedWithServer",{cD:Oe.prototype.cD});Oe.Sib=function(a){var b=[],d;for(d in a){var e=a[d];if(null!=e&&e[M.sK]){var f={};f[M.lda]=e[M.lda]+"";e=e[M.S0];"function"===typeof e&&(f[M.S0]=e.toString());b.push(f)}}return b};
Oe.NH=function(a){a=Oe.Z0[a];var b={};a&&(b.reason=a.reason,b.message=a.message);return b};m("AdfAutomationHelper.getWaitReason",Oe.NH);Oe.Kqa=function(a){var b=a.fileName,d=a.lineNumber;a=a.message;b&&(a+=" in "+b);void 0!==d&&null!==d&&(a+=":"+d);return a};m("AdfAutomationHelper.errorToString",Oe.Kqa);