function nf(a,b,d,e,f){this.Init(a,b,d,e,f)}m("AdfMatchMediaBehavior",nf);r.v(nf,Aa);nf.Zga="adfinternal.matchMedia.unmatchedPropertyKey";nf.U1="adfinternal.matchMedia.mediaQueryListeners";nf.bNa=function(a){var b=A.c.Qe(nf.U1)[a.media];b&&0<b.length&&b.forEach(function(b){try{b.listener.call(b.bv,a)}catch(e){v.l.fv(e,"Failed while calling mediaQuery change handler")}})};
nf.prototype.Init=function(a,b,d,e,f){nf.h.Init.call(this);u.J(a);u.J(b);u.J(d);this.ng=a;this.ZMa=b;this.rNa=a=window.matchMedia(d);this.Oma=a.media;this.eY=e;this.sjb="true"===f};r.a("AdfMatchMediaBehavior.prototype.Init",{Init:nf.prototype.Init});
nf.prototype.Qa=function(a){this.gb=a;a=this.gb.g()+":"+this.ng;var b=page.Qe(nf.Zga);null!=this.eY&&(null==b&&(b=[]),null==b[a]&&(b[a]=this.eY),null!=b[a]&&this.sjb&&(b[a]=this.eY),page.Df(nf.Zga,b));(a=page.Qe(nf.U1))||(a={});var b=this.rNa,d=a[this.Oma];!d||d&&0==d.length?(b.addListener(nf.bNa),d=[{bv:this,listener:this.cLa,krb:b}],a[this.Oma]=d,page.Df(nf.U1,a)):d.push({bv:this,listener:this.cLa,krb:b})};r.a("AdfMatchMediaBehavior.prototype.initialize",{Qa:nf.prototype.Qa});
nf.prototype.cLa=function(a){var b=this.gb.g()+":"+this.ng;this.eY=page.Qe(nf.Zga)[b];a.matches?this.gb.setProperty(this.ng,this.ZMa):this.gb.K(this.ng)==this.ZMa&&this.gb.setProperty(this.ng,this.eY)};nf.prototype.Jd=function(){var a=page.Qe(nf.U1)[this.Oma];if(a&&0<a.length){for(var b=0;b<a.length&&a[b].bv!=this;b++);1==a.length&&this.rNa.removeListener(nf.bNa);a.splice(b,1)}};r.a("AdfMatchMediaBehavior.prototype.destroy",{Jd:nf.prototype.Jd});