function me(){this.Init()}v("AdfAutomationHelper",me);v("AdfAutomationHelper",me);z.l(me);me.O=function(){this.Nj==n&&(this.Nj=new me);return this.Nj};v("AdfAutomationHelper.getInstance",me.O);
me.Q2={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",TIMERS:"timers"};
v("AdfAutomationHelper.CONFIG",me.Q2);
me.RT={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"},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."}};v("AdfAutomationHelper.WAIT_REASONS",me.RT);
me.prototype.az=function(a){var b;try{var d=me.RT,e=me.Q2,f=ed.O(),g=a[e.DTS],h=a[e.AUTOMATION_ENABLED];b=a[e.PHASE]!=F.QT?d.WAITING_FOR_USER_INPUT_PHASE:0!=a[e.EVENT_QUEUE_LENGTH]?d.EVENT_QUEUE_IS_NOT_EMPTY:ne.od()?d.DIALOG_SERVICE_IS_BUSY:!g||g.Ok()!=oe.hl||g.yv()?d.DTS_IS_NOT_READY:a[e.IS_ATTACHMENT_MODE]?!a[e.INITIALIZATION_COMPLETE]?d.PAGE_IS_NOT_LOADED:n:!a[e.INITIALIZATION_COMPLETE]?d.PAGE_IS_NOT_LOADED:a[e.PARTIAL_TARGETS]!=n?d.PARTIAL_TARGETS_ARE_UPDATING:0!=a[e.START_ADS_CLIENT_ID_COUNT]?
d.OUTSTANDING_ACTIVE_DATA:a[e.WINDOW_EVENT_HEADER_MAP]!=n?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]?d.WAITING_FOR_COMPONENTS_TO_BE_READY: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.tha()?d.WAITING_FOR_NAVIGATION_TO_COMPLETE:a[e.WAITING_FOR_ANIMATION]?d.WAITING_FOR_ANIMATION_TO_COMPLETE:!a[e.ARE_SYNCHRONOUS_TIMERS_CLEARED]?d.WAITING_FOR_SYNCHRONOUS_TIMERS_TO_CLEAR:a[e.IN_GET_REQUEST_NAVIGATION]?d.WAITING_FOR_GET_NAVIGATION_TO_START:n;h&&b&&(b=me.QC(b.reason),d.DIALOG_SERVICE_IS_BUSY.reason===b.reason?b.details=ne.KBa():d.WAITING_FOR_SYNCHRONOUS_TIMERS_TO_CLEAR.reason===
b.reason&&(b.details=me.FYa(a[e.TIMERS])))}catch(m){b=me.QC("JS_ERROR"),b.message=me.ifa(m)}return b};z.a("AdfAutomationHelper.prototype.whyIsNotSynchronizedWithServer",{az:me.prototype.az});me.FYa=function(a){var b=[],d;for(d in a){var e=a[d];if(e!=n&&e[R.ZE]){var f={};f[R.H4]=e[R.H4]+"";e=e[R.KT];"function"===typeof e&&(f[R.KT]=e.toString());b.push(f)}}return b};me.QC=function(a){a=me.RT[a];var b={};a&&(b.reason=a.reason,b.message=a.message);return b};v("AdfAutomationHelper.getWaitReason",me.QC);
me.ifa=function(a){var b=a.fileName,d=a.lineNumber;a=a.message;b&&(a+=" in "+b);d!==k&&d!==n&&(a+=":"+d);return a};v("AdfAutomationHelper.errorToString",me.ifa);