function $a(){this.Init()}m("AdfRestDataService",$a);r.v($a);$a.ga=function(){this.iK="success";m("AdfRestDataService.SUCCESS_CALLBACK_KEY",$a.iK);this.hJ="error";m("AdfRestDataService.ERROR_CALLBACK_KEY",$a.hJ);this.aj="priority";m("AdfRestDataService.PRIORITIZE",$a.aj);this.Pm="clientId";m("AdfRestDataService.CLIENT_ID_KEY",$a.Pm);this.qt="request";m("AdfRestDataService.REQUEST_DATA",$a.qt)};m("AdfRestDataService.InitClass",$a.ga);
$a.prototype.Init=function(){$a.h.Init.call(this);this.EB=new Gf;this.Okb=new Hf(this.EB)};r.a("AdfRestDataService.prototype.Init",{Init:$a.prototype.Init});$a.Nta=function(a,b){u.J(a);a=a.trim();a=$a.tlb(a);a=$a.Iha(a);a=$a.d$a(a,b);a=$a.Wmb(a);$a.Ata(a)&&(a=q.b.fP()+a);return a};m("AdfRestDataService.normalizeUrl",$a.Nta);$a.prototype.td=function(){return this.EB.Ysa()||this.Okb.Wsa()};r.a("AdfRestDataService.prototype.isBusy",{td:$a.prototype.td});$a.Ata=function(a){return-1==a.indexOf("://")};
m("AdfRestDataService.isRelativeUrl",$a.Ata);$a.prototype.KZ=function(a,b){b=$a.Ghb(b);a=$a.Nta(a,b[$a.qt].qUa);this.EB.push(a,b)};r.a("AdfRestDataService.prototype.queueRequest",{KZ:$a.prototype.KZ});$a.prototype.h3=function(a,b,d){for(var e=a.options,f=0;f<e.length;f++){var g=e[f],h=g[b];if(h){u.Ja(h);try{var l=d.slice();l.push(g);h.apply(this,l)}catch(n){v.l.severe("Exception ocurred while invoking '"+b+"' callback for the URL '"+a.Au+"'.",n)}}}};
r.a("AdfRestDataService.prototype.__xhrCallback",{h3:$a.prototype.h3});$a.d$a=function(a,b){if(!b)return a;var d=a.indexOf("?");if(-1==d)return a+"?"+b;for(var e=a.substring(d+1).split("\x26"),f=b.split("\x26"),g="",h=0,l=e.length;h<l;h++){for(var n=e[h].split("\x3d")[0],t=0;t<f.length;t++)if(0==f[t].indexOf(n)){e[h]=f[t];f.splice(t,1);break}g+=e[h]+"\x26"}h=0;for(l=f.length;h<l;h++)g+=f[h]+"\x26";return $a.Iha(a.substring(0,d+1)+g)};
$a.Ghb=function(a){a||(a={});var b=a[$a.qt];b||(b={method:"GET"});a[$a.qt]=b;a[$a.aj]=1==a[$a.aj];return a};$a.Iha=function(a){var b;do b=a,a=a.replace(/[\/\?&]+$/,"");while(b!=a);return a};$a.tlb=function(a){-1!=a.indexOf("#")&&(a=a.substring(0,a.indexOf("#")));return a};$a.Wmb=function(a){var b=a.indexOf("?");if(-1==b)return a;for(var d=a.substring(b+1).split("\x26").sort(),e="",f=0,g=d.length;f<g;f++)e+=d[f]+"\x26";e=e.replace(/&$/,"");return a.substring(0,b+1)+e};