function Vf(){this.Init()}m("AdfDhtmlActiveData",Vf);r.v(Vf);Vf.prototype.Init=function(){Vf.h.Init.call(this);this.ep={};this.Koa=0;this.M5=!1;this.xma=null;this.Ix=this.oG=0;this.Lma=Vf.EK.frb;this.AOa=Vf.EK.yrb;this.W5=Vf.EK.Yqb;this.XB=Vf.EK.wsb;this.mN=Vf.EK.trb;this.mma=Vf.EK.Vqb;this.yB=null;this.M7=0;this.jia=[];this.aN=0};r.a("AdfDhtmlActiveData.prototype.Init",{Init:Vf.prototype.Init});Vf.prototype.pq=function(a){a.se()==Cf.Po&&200==a.ms()&&a.LC()&&A.c.pq(a)};
r.a("AdfDhtmlActiveData.prototype.requestStatusChanged",{pq:Vf.prototype.pq});Vf.xN=function(a){v.l.finer("Request complete:",a);var b=A.c.Yf(!0,!0);b&&Tf(b,a)};Vf.prototype.wTa=function(a,b){u.dc(a);this.Hza=a?b+"/adwwls/wls.ads":"adw.jspx"};r.a("AdfDhtmlActiveData.prototype.initializeActiveForm",{wTa:Vf.prototype.wTa});
Vf.prototype.YVa=function(a,b,d,e,f,g){u.J(a);this.bm=a;this.sB=b;A.c.Ns(d);var h=arguments.length;u.assert(0==h%2,"An equal number of clientId and changeCount parameters are required");for(var l=this.ep,n=4;n<h;n++){var t=arguments[n];u.J(t);n++;var y=arguments[n];u.Da(y);var z=!(t in l);l[t]={};l[t].n8=y;if(e||z)v.l.fine("Register active data on:",t),this.m3||this.Z9(),A.c.aWa(e,t),(t=A.c.m(t))&&t.gI()}};r.a("AdfDhtmlActiveData.prototype.updateActiveDataComponents",{YVa:Vf.prototype.YVa});
function Xk(a,b){u.assert(b);a.zu[b.name]=b}
function Yk(a,b,d,e,f,g,h){u.J(b);u.assert(void 0!==d);u.Da(e);u.dc(h);u.co(g);var l=A.c.m(b);l?(f&&v.l.fine("Event received beyond the configured threshold for component:",b),f=a.ep[b].n8,void 0===f?v.l.severe("Active data for unregistered component:",b):e>f?(l.kv(d,e),void 0!==g&&(d=(new Date).getTime(),0==g%500&&v.l.info("ADS: GENERAL: component finished processing event : "," windowId:",A.c.pf()," pageId:",A.c.ph," clientId:",b," eventId:",e," client time:",d," event number:",g),h&&v.l.info("ADS: component finished processing event : ",
" windowId:",A.c.pf()," pageId:",A.c.ph," clientId:",b," eventId:",e," client time:",d)),a.ep[b].n8=e):v.l.fine("Old active data for",b," declined")):v.l.fine("No active component:",b," Deregestering component")}
Vf.prototype.lUa=function(a,b,d,e,f,g,h,l,n){u.J(a);u.J(b);u.J(d);u.Uc(e);u.Da(f);u.Da(g);u.Da(h);u.Da(n);u.co(l);"STREAMING"==this.XB&&(this.M7+=h,25E6<=this.M7&&(v.l.info("ADS: Reached max events threshold. Rloading the streming iframe."),this.M7=0,Zk(this,!0,!0)));this.oG=(new Date).getTime();this.aN++;void 0!==l&&(0==l%500&&v.l.info("ADS: GENERAL: active data manager receives event : "," windowId:",a," pageId:",b," clientId:",d," eventId:",f," event generation time:",g," client time:",this.oG,
" event number:",l),n&&v.l.info("ADS: active data manager receives event : "," windowId:",a," pageId:",b," clientId:",d," eventId:",f," event generation time:",g," client time:",this.oG));u.J(a);if(a==A.c.pf())h=A.c;else{h=null;var t=this.zu;null!=t&&(h=t[a]);t=null;if($k(h))try{t=h.Se.c}catch(y){v.l.fine("Could not access active window:",a)}h=t}h&&(h.ph==b?(a=Vf.Eka(g)-this.Koa>this.W5,void 0!==l?Yk(h.Ud(),d,e,f,a,l,1==n):Yk(h.Ud(),d,e,f,a)):(d=h.ph,e=Number(d),f=Number(b),isNaN(e)?v.l.error("Invalid target pageId: ",
d," windowId: ",a):isNaN(f)?v.l.error("Invalid request pageId: ",b," windowId: ",a):e<f?v.l.error("Data update is newer than current page"," request pageId: ",b," current pageId: ",d," windowId: ",a):e>f&&v.l.info("Old data update is discarded for pageId: ",b," current pageId: ",d," windowId: ",a)))};r.a("AdfDhtmlActiveData.prototype.processActiveDataEvent",{lUa:Vf.prototype.lUa});
Vf.prototype.EUa=function(){this.aN=1;var a=fl(this),b;for(b in a)if(currWindow=a[b],$k(currWindow)){var d=currWindow.Se.c;d.xj()&&(d.Ud(),A.c.qGa())}};r.a("AdfDhtmlActiveData.prototype.restartAllPushComponents",{EUa:Vf.prototype.EUa});
function gl(a,b){u.assert(a.bm==A.c.pf(),"_notifyADSConnectionStateChange should not be called on a non-master window");var d=void 0,e=fl(a),f;for(f in e)if(d=e[f],$k(d))try{var g=d.Se.c.Ud(),d=b,h=g.sN;if(h==d)v.l.finest("broadcastADSConnectionStateChange called without a change in state");else{g.sN=d;var l=g.jia;if(l){var n=l.length;if(0<n)for(var t=new Oa(g,"adsConnectionState",h,d),d=0;d<n;d++){var y=l[d];d++;var z=l[d];try{null!=z?y.call(z,t):y(t)}catch(B){v.l.Ge(B,"Error broadcasting ADS connection state")}}}}}catch(B){v.l.Ge(B,
"Error broadcasting ADS connection state to window ",f)}}function hl(a,b){u.J(b);delete a.ep[b];A.c.Pva(b)}
Vf.prototype.Z9=function(){if(!this.m3&&null!=this.bm){var a=A.c.Y();u.assert(a.AdfDhtmlActiveData,"AdfActiveDataService JavaScript feature not loaded. Please make sure it is not blocked by ad block software.");var b=this.bm,d=this.sB,e=A.c.ph,f=null,f=a.name?a.name:this.Fub;if(!this.m3){if(q.b.S()==q.Yc){var g=A.c.R(),h=A.c.ml("/afr/default_arrow_black.cur");q.b.Ni()==q.gS&&(h=A.c.ml("/afr/default_arrow_white.cur"));g.body.style.cursor="url('"+h+"'), progress"}this.m3=!0;v.l.fine("Initialize active data manager");
this.IG=this.sB=this.Kx=this.bm=void 0;this.nBa="establishChannel";this.B4a="reconnect";this.tDa="pollEvents";this.$0="afr::PushIframe";g=il(b);b==A.c.pf()?(v.l.info("self is master window: ",b),null==this.zu&&(this.zu={}),a.name=g,A.c.xaa(f),this.Kx=this.bm=b,A.c.Ns(e),this.IG=this.sB=d,Xk(this,a),b=this.$0,a=A.c.Y(),b=a.frames[b],A.c.R(),d=this.Hza,d+="?action\x3d"+this.nBa+"\x26windowId\x3d"+A.c.pf()+"\x26pageId\x3d"+A.c.ph+"\x26replaceMasterWindowId\x3d"+this.Kx+"\x26replaceMasterPageId\x3d"+
this.IG,v.l.fine("Connecting for master window:",A.c.pf()," in window:",a.name),gl(this,M.Dj.CONNECTING),b.location.replace(d)):a.name==g?jl(this,b,d):(v.l.info("non-master window, needs to register with: ",b),a.name=f,g=null,g=kl(b),null!=g?(g=g.Se.c,Xk(g.Ud(),a),A.c.xaa(f),this.Kx=this.bm=b,A.c.Ns(e),this.IG=this.sB=d):(A.c.xaa(a.name),A.c.Ns(e),jl(this,b,d)))}}};r.a("AdfDhtmlActiveData.prototype.initActivePage",{Z9:Vf.prototype.Z9});
function kl(a){u.J(a);var b=A.c.Y().open("",a,"height\x3d1,width\x3d1,top\x3d0,left\x3d0,status\x3dno,toolbar\x3dno,menubar\x3dno,location\x3dno");if(!$k(b)||b.Se.c.Ud().bm!=a){v.l.warning("can't get the master window for: ",a);try{var d=b.location;null!=d&&"about:blank"!=d&&"about:Tabs"!=d||b.close()}catch(e){}b=null}return b}function fl(a){null==a.zu&&(a.zu={});return a.zu}
Vf.prototype.C$=function(){this.M5=!0;var a=this.bm;if(a){if(a==A.c.pf()&&1!=this.Rgb)try{ll(this);var b=fl(this),d,e=a=void 0,f=A.c.Y(),g;for(g in b)a=b[g],a!=f&&$k(a)&&(a.Se.c.Ud().l$()||(e=b[g]));d=e;if(null==d)v.l.fine("Could not find candidate window to migrate to");else{var h=d.Se.c,l=h.Ud(),n=fl(l);E.Rb(n,b);d.name=il(h.pf());var t=page.pf();l.Kx=t;l.IG=page.ph;var y=h.pf();l.bm=y;l.sB=h.ph;h.ta(l,l.eja,null,50)}}catch(z){v.l.info("Can not migrate the active channel to other windows")}A.c.Cha(!1,
"")}};r.a("AdfDhtmlActiveData.prototype.onBeforeUnload",{C$:Vf.prototype.C$});function ll(a){var b=A.c,d=a.n3;if(d){try{b.ic(d)}catch(e){v.l.rg(e,"Error clearing connection check timer")}a.n3=null}if(d=a.yB){try{b.ic(d)}catch(e){v.l.rg(e,"Error clearing polling timer")}a.yB=null}}Vf.prototype.eja=function(a){Zk(this,a)};Vf.prototype.fua=function(a,b){A.c.ta(this,this.nlb,{Esb:a,prb:b},3E3)};r.a("AdfDhtmlActiveData.prototype.registerWithNewMaster",{fua:Vf.prototype.fua});
Vf.prototype.nlb=function(a){var b=a.Esb;a=a.prb;v.l.info("register with new master ",b);this.bm=b;this.sB=a;try{var d=kl(b);if(null!=d){var e=d.Se.c;if(null!=e){Xk(e.Ud(),A.c.Y());var f=fl(this),g=fl(e.Ud());E.Rb(g,f)}}else v.l.fine("can't find the master page "+b),jl(this,b,a);this.sN!=M.Dj.Gv&&gl(e.Ud(),M.Dj.Gv);this.x7();this.Gpa=!1}catch(h){v.l.info("ADS register with new master failed"),this.Gpa?(jl(this,b,a),this.Gpa=!1,this.sN!=M.Dj.Gv&&gl(e.Ud(),M.Dj.Gv)):(this.Gpa=!0,this.fua(b,a))}this.zu=
null};function Zk(a,b,d){var e=void 0;null==a.Kx&&(a.Kx=a.bm);e=void 0;e=1!=b?a.nBa:a.B4a;e={action:e,windowId:A.c.pf(),replaceMasterWindowId:a.Kx,pageId:A.c.ph,replaceMasterPageId:a.IG};b?e.messageCount=a.aN:a.aN=0;b=e;A.c.Y();gl(a,M.Dj.C0);ml(a,b,{},d)}function jl(a,b,d){u.J(b);u.J(d);var e=A.c.pf(),f=A.c.ph;null==a.zu&&(a.zu={});a.bm=e;a.Kx=b;a.sB=f;a.IG=d;b=A.c.Y();Xk(a,b);a.eja()}function il(a){return a.replace(/\//g,"S").replace(/-/g,"M").replace(/\./g,"D")}
function $k(a){var b=null;try{b=a.Se.c}catch(d){v.l.rg(d,"Could not access active window")}return null!=b?!0:!1}Vf.EK={restartInterval:15,maxReconnectionRetries:10,reconnectWaitTime:1E4,latencyThreshold:1E4,transport:"STREAMING",pollingInterval:5E3,keepAliveInterval:1E4};Vf.prototype.bta=function(){var a=A.c,b=a.Pt();if(b&&b.RH())return this.d6||(this.d6=a.ta(this,this.bta,null,300)),300;this.d6&&(a.ic(this.d6),this.d6=null);a={action:this.tDa,windowId:a.pf(),pageId:a.ph};ml(this,a,null);this.Jua()};
r.a("AdfDhtmlActiveData.prototype.initLongPolling",{bta:Vf.prototype.bta});Vf.prototype.QUa=function(a){try{this.XB=a.wsb,this.mN=a.trb,this.Lma=a.frb,this.AOa=a.yrb,this.W5=a.Yqb,this.mma=a.Vqb}catch(b){v.l.warning("Exception occurred while setting configuration. Name: "+b.name+", Message: "+b.message)}};r.a("AdfDhtmlActiveData.prototype.setConfiguration",{QUa:Vf.prototype.QUa});
Vf.prototype.tUa=function(a,b,d){u.J(a);u.J(b);u.J(d);this.oG=(new Date).getTime();this.aN++;b=null;var e=this.zu;null!=e&&(b=e[a]);if($k(b))try{var f=b.Se.c.Ud();u.J(d);if(d in f.ep){var g=A.c.m(d);g?A.c.Kc(g):(hl(f,d),v.l.info("No active component:",d))}else v.l.info("ADS: active data component is not refreshed because it's not active, clientId\x3d",d)}catch(h){v.l.fine("can't access the window ",a)}else v.l.info("No window found for refreshing component: windowId \x3d ",a)};
r.a("AdfDhtmlActiveData.prototype.refreshPushComponent",{tUa:Vf.prototype.tUa});
function ml(a,b,d,e){var f=A.c.Y().frames[a.$0],g="",h;for(h in b)g+="\x26"+h+"\x3d"+b[h];b=1;for(var l in d){h=d[l];if(!E.zc(h)){var g=g+("\x26pageKey"+b+"\x3d"+l),n;for(n in h)var t="componentIndex"+b,g=g+("\x26componentId"+b+"\x3d"+n),g=g+("\x26"+t+"\x3d"+h[n].n8)}b+=1}d=g.indexOf("\x26");0<g.length&&0==d&&(g=g.substring(1));g=a.Hza+"?"+g;"STREAMING"==a.XB?(1==e&&(g+="\x26discEvt\x3dtrue"),2E3<g.length&&nl(a,[]),f.location.replace(g)):a.C6=A.c.Yf(!1,!0).ez(g,[a])}
Vf.prototype.iVa=function(a){this.Koa=Vf.Eka(a);this.Tj&&v.Zc.info("ADS: Server time difference: ",this.Koa,";;")};r.a("AdfDhtmlActiveData.prototype.setServerTimestamp",{iVa:Vf.prototype.iVa});Vf.Eka=function(a){return null==a?0:new Date-new Date(a)};Vf.prototype.sUa=function(){this.aN++;var a=(new Date).getTime();this.oG=a;v.l.finer(a,": got keep alive")};r.a("AdfDhtmlActiveData.prototype.recordActiveDataActivity",{sUa:Vf.prototype.sUa});
Vf.prototype.Jua=function(){v.l.finer("ADS Channel Connected");gl(this,M.Dj.Gv);"POLLING"==this.XB&&(this.Fna=!0);this.oG=this.Ix=0;var a=A.c.ph;this.IG=this.sB=a;this.Kx=this.bm=a=A.c.pf();"POLLING"==this.XB?this.z7():(A.c.Y(),this.n3&&A.c.ic(this.n3),this.n3=A.c.ta(this,this.O2,null,this.W5+this.mma));A.c.Cc(!1,!1,!1,"ADS channel connected")};r.a("AdfDhtmlActiveData.prototype.setConnected",{Jua:Vf.prototype.Jua});
Vf.prototype.stop=function(){v.l.finer("ADS stopped due to user inactivity timeout.");var a=A.c;if("LONG_POLLING"==this.XB){if(this.C6)try{this.C6.abort(),delete this.C6,this.C6=null}catch(e){v.l.fine("Failed to abort Long-Polling request due to error: ",e.message)}}else if("STREAMING"==this.XB){var b=this.$0,d=a.Y();(b=d.frames[b])&&b.frameElement&&(b.frameElement.src="");v.l.fine("Terminate the push channel for master window:",a.pf()," in window:",d.name)}};
r.a("AdfDhtmlActiveData.prototype.stop",{stop:Vf.prototype.stop});Vf.prototype.O2=function(){var a=A.c,b=a.Pt();if(b&&b.RH())return 300;var b=this.W5,d=this.mma;if(this.sN==M.Dj.Gv&&this.bm==A.c.pf()){var e=!1;"STREAMING"==this.XB&&(e="complete"==a.Y().frames[this.$0].document.readyState);a=Vf.Eka(this.oG);if(e||a>b+d)v.l.finer("ADS Channel Disconnected"),this.Ix=0,this.M5?v.l.finer("Closing window ... will not try to reconnect"):(gl(this,M.Dj.C0),this.zOa())}return b+d};
r.a("AdfDhtmlActiveData.prototype.__checkAdsConnection",{O2:Vf.prototype.O2});Vf.prototype.zOa=function(){this.M5?this.Ix=0:(v.l.fine("Reconnect called ",this.Ix+1," time(s)"),this.sN!=M.Dj.Gv&&(this.Ix<=this.Lma?(this.Ix++,q.b.S()==q.Yc&&3<this.Ix&&A.c.Y().stop(),this.eja(!0),A.c.ta(this,this.zOa,null,this.AOa)):(v.l.warning("Cannot connect. Exceeded number of retries for reconnection"),gl(this,M.Dj.Fba))))};Vf.prototype.fra=function(){return this.sN};
r.a("AdfDhtmlActiveData.prototype.getADSConnectionState",{fra:Vf.prototype.fra});Vf.prototype.Wpa=function(a,b){u.Ja(a);u.ji(b);this.jia.push(a,b)};r.a("AdfDhtmlActiveData.prototype.addADSConnectionStateListener",{Wpa:Vf.prototype.Wpa});Vf.prototype.gua=function(a,b){u.Ja(a);u.ji(b);var d=this.jia;u.assert(d,"adsConnectionStateListeners array must exist");for(var e=d.length,f=0;f<e;f++){var g=d[f];f++;g==a&&d[f]===b&&d.splice(f-1,2)}};
r.a("AdfDhtmlActiveData.prototype.removeADSConnectionStateListener",{gua:Vf.prototype.gua});
Vf.prototype.z7=function(){if(A.c.yZ()&&E.zc(this.ep))this.yB=A.c.ta(this,this.z7,null,this.mN);else{if(!this.Fna&&(this.Ix++,this.Ix>this.Lma)){v.l.warning("Cannot connect. Exceeded number of retries for reconnection");gl(this,M.Dj.Fba);return}gl(this,M.Dj.Gv);if(null!=this.yB){try{clearTimeout(this.yB)}catch(h){}this.yB=null}var a=new Date,b=this.mN;null!=this.xma&&(b=a.getTime()-this.xma);a=0;b<this.mN&&(a=this.mN-b);if(200>=a){b=A.c.Pt();if(!b||!b.RH()){var b={action:this.tDa,windowId:A.c.pf(),
pageId:A.c.ph},a={},d=fl(this),e;for(e in d){var f=d[e];try{if($k(f)){var g=f.Se.c;a[e+":"+g.ph]=g.Ud().ep}}catch(h){v.l.rg(h,"Could not access active page:"+e)}}this.xma=(new Date).getTime();gl(this,this.Fna?M.Dj.CONNECTING:M.Dj.C0);this.Fna=!1;ml(this,b,a)}this.yB=A.c.ta(this,this.z7,null,this.mN)}else v.l.finer("Timer is fired much before the _pollingInterval, scheduling timer for ",a),this.yB=A.c.ta(this,this.z7,null,a)}};Vf.prototype.LRa=function(a){this.Rgb=!0;nl(this,a)};
r.a("AdfDhtmlActiveData.prototype.failover",{LRa:Vf.prototype.LRa});function ol(a){a.Nua(!1);var b=A.c.Y();a.M5||b.location.reload(!0)}function nl(a,b){var d=fl(a),e=void 0,f=A.c.Y(),g=void 0;E.isArray(b)||(e=b,b=[],b=b.concat(e));for(var h in d)-1==E.indexOf(b,h)&&(e=d[h],e!=f?$k(e)&&(e=e.Se.c,e.Ud().l$()||ol(e.Ud())):g=!0);g&&$k(f)&&ol(f.Se.c.Ud())}Vf.prototype.Nua=function(a){u.dc(a);this.Dfb=a};r.a("AdfDhtmlActiveData.prototype.setHAMigrated",{Nua:Vf.prototype.Nua});Vf.prototype.l$=function(){return this.Dfb};
r.a("AdfDhtmlActiveData.prototype.isHAMigrated",{l$:Vf.prototype.l$});Vf.prototype.nz=function(a){a in this.ep&&hl(this,a)};r.a("AdfDhtmlActiveData.prototype.unmapComponent",{nz:Vf.prototype.nz});Vf.prototype.Uta=function(a,b,d){var e=this.ep;a.push(d);b.push(e[d].n8)};r.a("AdfDhtmlActiveData.prototype.populateStartActiveDataArray",{Uta:Vf.prototype.Uta});Vf.prototype.FO=function(){return this.ep};r.a("AdfDhtmlActiveData.prototype.getActiveComponents",{FO:Vf.prototype.FO});
Vf.prototype.reset=function(){ll(this);this.ep={};this.m3=!1};r.a("AdfDhtmlActiveData.prototype.reset",{reset:Vf.prototype.reset});Vf.prototype.NUa=function(a){this.ep=a};r.a("AdfDhtmlActiveData.prototype.setActiveComponents",{NUa:Vf.prototype.NUa});