function Nr(a,b,d){this.Init(a,b,d)}m("AdfScriptLoadingService",Nr);r.v(Nr);
Nr.ga=function(){this.Oca="sameOrigin";m("AdfScriptLoadingService.POLICY_SAME_ORIGIN",Nr.Oca);this.Nca="crossOrigin";m("AdfScriptLoadingService.POLICY_CROSS_ORIGIN",Nr.Nca);this.Kya="auto";m("AdfScriptLoadingService.POLICY_AUTO",Nr.Kya);this.UJ=0;m("AdfScriptLoadingService.METHOD_ANY",Nr.UJ);this.rw=1;m("AdfScriptLoadingService.METHOD_SYNCHRONOUS",Nr.rw);this.rya=2;m("AdfScriptLoadingService.METHOD_ASYNCHRONOUS",Nr.rya);this.ZD=3;m("AdfScriptLoadingService.METHOD_BACKGROUND",Nr.ZD);this.$ca=0;m("AdfScriptLoadingService.STATUS_LOADING",
Nr.$ca);this.jza=1;m("AdfScriptLoadingService.STATUS_LOADED",Nr.jza)};m("AdfScriptLoadingService.InitClass",Nr.ga);
Nr.prototype.Init=function(a,b,d){Nr.h.Init.call(this);u.assert(null==d||d==Nr.Oca||d==Nr.Nca||d==Nr.Kya);this.RU=a;this.NU=b;this.YNa=d;this.SM=[];this.Dma=null;this.a6=!1;this.Ama=[];this.tnb=this.D(this.$Pa);this.o$a=this.D(this.p$a);u.assert(null!=this.NU);a=this.NU.location.hostname;u.assert(null!=a);this.Wlb=new RegExp("^(http|https):([\\w-]+\\.)?"+a+"[:/]","i");if(!this.Cma){a={};b=b.getElementsByTagName("script");for(d=0;d<b.length;d++){var e=Nr.Zoa(b[d].getAttribute("src"));e&&(a[e]=!0)}this.Cma=
a}};r.a("AdfScriptLoadingService.prototype.Init",{Init:Nr.prototype.Init});Nr.prototype.cy=function(a,b){var d=Nr.Zoa(a);this.Cma[d]||(d=Nr.Zoa(a),this.Cma[d]=!0,d=this.Aba(a,b),dD(this,d))};r.a("AdfScriptLoadingService.prototype.addLibraryScript",{cy:Nr.prototype.cy});Nr.prototype.Xpa=function(a){a=new cD(this.RU,a);dD(this,a)};r.a("AdfScriptLoadingService.prototype.addInlineScript",{Xpa:Nr.prototype.Xpa});Nr.prototype.Z7=function(a,b,d){a=new $C(a,b,d);dD(this,a)};
r.a("AdfScriptLoadingService.prototype.addCallbackScript",{Z7:Nr.prototype.Z7});Nr.prototype.Ypa=function(a){u.Ja(a);this.Ama.push(a)};r.a("AdfScriptLoadingService.prototype.addLoadListener",{Ypa:Nr.prototype.Ypa});Nr.prototype.sUa=function(a){var b=this.Ama;a=b.indexOf(a);-1<a&&b.splice(a,1)};r.a("AdfScriptLoadingService.prototype.removeLoadListener",{sUa:Nr.prototype.sUa});
Nr.prototype.Aba=function(a,b){var d=null;return d=this.YNa==Nr.Oca||(this.YNa==Nr.Nca?0:"/"==a.charAt(0)||this.Wlb.test(a))||b==Nr.rw?new eD(this.zd(),a,b):new bD(this.zd(),this.Yv(),a,b)};r.a("AdfScriptLoadingService.prototype.CreateLibraryLoadableScript",{Aba:Nr.prototype.Aba});Nr.prototype.zd=function(){return this.RU};r.a("AdfScriptLoadingService.prototype.GetDomWindow",{zd:Nr.prototype.zd});Nr.prototype.Yv=function(){return this.NU};r.a("AdfScriptLoadingService.prototype.GetDomDocument",{Yv:Nr.prototype.Yv});
function dD(a,b){var d=a.SM.length;if(0<d&&b.sj()!==Nr.ZD){for(var e=!1,f=0;f<d;++f)if(a.SM[f].sj()===Nr.ZD){a.SM.splice(f,0,b);e=!0;break}e||a.SM.push(b)}else a.SM.push(b);fD(a)}function fD(a){if(!a.Dma){for(var b=a.SM;0<b.length;){var d=a.Dma=b.shift(),e=d.sj();if(e===Nr.rw)d.load(a.tnb);else{e===Nr.ZD?gD(a):(b=a,b.a6||(b.LW(Nr.$ca),b.a6=!0));d.load(a.o$a);return}}gD(a)}}function gD(a){a.a6&&(a.a6=!1,a.LW(Nr.jza))}Nr.prototype.LW=function(a){for(var b=this.Ama,d=0;d<b.length;d++)b[d](a)};
Nr.prototype.$Pa=function(){this.Dma=null};Nr.prototype.p$a=function(){this.$Pa();fD(this)};Nr.Zoa=function(a){return a?a.replace(/;[^\?]*/,""):null};