package com.applovin.impl; import android.net.Uri; import com.applovin.impl.sdk.utils.StringUtils; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; /* loaded from: classes.dex */ public class dq { private int a; private int b; private Uri c; private iq d; private final Set e = new HashSet(); private final Map f = new HashMap(); public Set a() { return this.e; } public Uri b() { return this.c; } public Map c() { return this.f; } public iq d() { return this.d; } public String toString() { return "VastCompanionAd{width=" + this.a + ", height=" + this.b + ", destinationUri=" + this.c + ", nonVideoResource=" + this.d + ", clickTrackers=" + this.e + ", eventTrackers=" + this.f + '}'; } private dq() { } public static dq a(es esVar, dq dqVar, eq eqVar, com.applovin.impl.sdk.j jVar) { es c; if (esVar == null) { throw new IllegalArgumentException("No node specified."); } if (jVar != null) { if (dqVar == null) { try { dqVar = new dq(); } catch (Throwable th) { jVar.J(); if (com.applovin.impl.sdk.n.a()) { jVar.J().a("VastCompanionAd", "Error occurred while initializing", th); } jVar.E().a("VastCompanionAd", th); return null; } } if (dqVar.a == 0 && dqVar.b == 0) { int parseInt = StringUtils.parseInt((String) esVar.a().get("width")); int parseInt2 = StringUtils.parseInt((String) esVar.a().get("height")); if (parseInt > 0 && parseInt2 > 0) { dqVar.a = parseInt; dqVar.b = parseInt2; } } dqVar.d = iq.a(esVar, dqVar.d, jVar); if (dqVar.c == null && (c = esVar.c("CompanionClickThrough")) != null) { String d = c.d(); if (StringUtils.isValidString(d)) { dqVar.c = Uri.parse(d); } } mq.a(esVar.a("CompanionClickTracking"), dqVar.e, eqVar, jVar); mq.a(esVar, dqVar.f, eqVar, jVar); return dqVar; } throw new IllegalArgumentException("No sdk specified."); } public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof dq)) { return false; } dq dqVar = (dq) obj; if (this.a != dqVar.a || this.b != dqVar.b) { return false; } Uri uri = this.c; if (uri == null ? dqVar.c != null : !uri.equals(dqVar.c)) { return false; } iq iqVar = this.d; if (iqVar == null ? dqVar.d != null : !iqVar.equals(dqVar.d)) { return false; } Set set = this.e; if (set == null ? dqVar.e != null : !set.equals(dqVar.e)) { return false; } Map map = this.f; Map map2 = dqVar.f; return map != null ? map.equals(map2) : map2 == null; } public int hashCode() { int i = ((this.a * 31) + this.b) * 31; Uri uri = this.c; int hashCode = (i + (uri != null ? uri.hashCode() : 0)) * 31; iq iqVar = this.d; int hashCode2 = (hashCode + (iqVar != null ? iqVar.hashCode() : 0)) * 31; Set set = this.e; int hashCode3 = (hashCode2 + (set != null ? set.hashCode() : 0)) * 31; Map map = this.f; return hashCode3 + (map != null ? map.hashCode() : 0); } }