function Hc(){this.Init()}v("AdfServerLogWriter",Hc);z.l(Hc,sa);Hc.prototype.flush=function(){this.ng();if(this.Cl.length){if(window.JSON){var a=w.b.Yx();if(a){var b=JSON.stringify(this.Cl),b="logRecords\x3d"+encodeURIComponent(b).replace(/\'/g,"%27").replace(/%20/g,"+"),d=n,e=document.forms[0];e&&(d=e.action);d||(d=document.location.href);a.open("POST",d,l);a.setRequestHeader("Content-type","application/x-www-form-urlencoded");a.setRequestHeader("Adf-Rich-Log","true");a.send(b)}}this.Cl=[]}};
z.a("AdfServerLogWriter.prototype.flush",{flush:Hc.prototype.flush});Hc.D6a=function(a){try{return JSON.stringify(a)}catch(b){return n}};Hc.qNa=["level","message","error","when","responseId"];Hc.rYa=function(a,b){if(b===k)return n;var d;switch(typeof b){case "boolean":case "number":d=""+b;break;default:d='"'+b+'"'}return'"'+a+'":'+d};Hc.f9a=function(a){try{for(var b=Hc.qNa,d=b.length,e=Array(d),f=0;f<d;f++){var g=b[f],h=Hc.rYa(g,a[g]);h&&e.push(h)}return"{"+e.join(",")+"}"}catch(m){return n}};
Hc.prototype.Init=function(){Hc.f.Init.call(this);this.Cl=[]};z.a("AdfServerLogWriter.prototype.Init",{Init:Hc.prototype.Init});Hc.prototype.Yc=function(a){this.ng();B.assert(a,"null logRecord");this.Cl.push(a)};z.a("AdfServerLogWriter.prototype.PublishImpl",{Yc:Hc.prototype.Yc});