package com.vungle.warren.model; import android.text.TextUtils; import com.google.android.gms.ads.RequestConfiguration; import com.google.android.gms.common.internal.ImagesContract; import com.google.android.gms.measurement.api.AppMeasurementSdk; import com.vungle.warren.AdConfig; import com.vungle.warren.c0; import java.util.ArrayList; import java.util.Iterator; import java.util.List; /* loaded from: classes2.dex */ public class p { /* renamed from: a, reason: collision with root package name */ int f8394a; /* renamed from: b, reason: collision with root package name */ String f8395b; /* renamed from: c, reason: collision with root package name */ String f8396c; /* renamed from: d, reason: collision with root package name */ String f8397d; /* renamed from: e, reason: collision with root package name */ boolean f8398e; /* renamed from: f, reason: collision with root package name */ boolean f8399f; /* renamed from: g, reason: collision with root package name */ boolean f8400g; /* renamed from: h, reason: collision with root package name */ long f8401h; /* renamed from: i, reason: collision with root package name */ String f8402i; /* renamed from: j, reason: collision with root package name */ long f8403j; /* renamed from: k, reason: collision with root package name */ long f8404k; /* renamed from: l, reason: collision with root package name */ long f8405l; /* renamed from: m, reason: collision with root package name */ String f8406m; /* renamed from: n, reason: collision with root package name */ String f8407n; /* renamed from: o, reason: collision with root package name */ int f8408o; /* renamed from: p, reason: collision with root package name */ final List f8409p; /* renamed from: q, reason: collision with root package name */ final List f8410q; /* renamed from: r, reason: collision with root package name */ final List f8411r; /* renamed from: s, reason: collision with root package name */ String f8412s; /* renamed from: t, reason: collision with root package name */ String f8413t; /* renamed from: u, reason: collision with root package name */ String f8414u; /* renamed from: v, reason: collision with root package name */ int f8415v; /* renamed from: w, reason: collision with root package name */ String f8416w; /* renamed from: x, reason: collision with root package name */ volatile boolean f8417x; /* renamed from: y, reason: collision with root package name */ public long f8418y; /* renamed from: z, reason: collision with root package name */ public long f8419z; public static class a { /* renamed from: a, reason: collision with root package name */ @a5.c("action") private String f8420a; /* renamed from: b, reason: collision with root package name */ @a5.c(AppMeasurementSdk.ConditionalUserProperty.VALUE) private String f8421b; /* renamed from: c, reason: collision with root package name */ @a5.c("timestamp") private long f8422c; public a(String str, String str2, long j10) { this.f8420a = str; this.f8421b = str2; this.f8422c = j10; } public z4.k a() { z4.k kVar = new z4.k(); kVar.r("action", this.f8420a); String str = this.f8421b; if (str != null && !str.isEmpty()) { kVar.r(AppMeasurementSdk.ConditionalUserProperty.VALUE, this.f8421b); } kVar.q("timestamp_millis", Long.valueOf(this.f8422c)); return kVar; } public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } a aVar = (a) obj; return aVar.f8420a.equals(this.f8420a) && aVar.f8421b.equals(this.f8421b) && aVar.f8422c == this.f8422c; } public int hashCode() { int hashCode = ((this.f8420a.hashCode() * 31) + this.f8421b.hashCode()) * 31; long j10 = this.f8422c; return hashCode + ((int) (j10 ^ (j10 >>> 32))); } } p() { this.f8394a = 0; this.f8409p = new ArrayList(); this.f8410q = new ArrayList(); this.f8411r = new ArrayList(); } public long a() { return this.f8404k; } public long b() { return this.f8401h; } public String c() { return this.f8395b + "_" + this.f8401h; } public String d() { return this.f8414u; } public boolean e() { return this.f8417x; } public synchronized boolean equals(Object obj) { if (this == obj) { return true; } if (obj != null) { if (getClass() == obj.getClass()) { p pVar = (p) obj; if (!pVar.f8395b.equals(this.f8395b)) { return false; } if (!pVar.f8396c.equals(this.f8396c)) { return false; } if (!pVar.f8397d.equals(this.f8397d)) { return false; } if (pVar.f8398e != this.f8398e) { return false; } if (pVar.f8399f != this.f8399f) { return false; } if (pVar.f8401h != this.f8401h) { return false; } if (!pVar.f8402i.equals(this.f8402i)) { return false; } if (pVar.f8403j != this.f8403j) { return false; } if (pVar.f8404k != this.f8404k) { return false; } if (pVar.f8405l != this.f8405l) { return false; } if (!pVar.f8406m.equals(this.f8406m)) { return false; } if (!pVar.f8412s.equals(this.f8412s)) { return false; } if (!pVar.f8413t.equals(this.f8413t)) { return false; } if (pVar.f8417x != this.f8417x) { return false; } if (!pVar.f8414u.equals(this.f8414u)) { return false; } if (pVar.f8418y != this.f8418y) { return false; } if (pVar.f8419z != this.f8419z) { return false; } if (pVar.f8410q.size() != this.f8410q.size()) { return false; } for (int i10 = 0; i10 < this.f8410q.size(); i10++) { if (!((String) pVar.f8410q.get(i10)).equals(this.f8410q.get(i10))) { return false; } } if (pVar.f8411r.size() != this.f8411r.size()) { return false; } for (int i11 = 0; i11 < this.f8411r.size(); i11++) { if (!((String) pVar.f8411r.get(i11)).equals(this.f8411r.get(i11))) { return false; } } if (pVar.f8409p.size() != this.f8409p.size()) { return false; } for (int i12 = 0; i12 < this.f8409p.size(); i12++) { if (!((a) pVar.f8409p.get(i12)).equals(this.f8409p.get(i12))) { return false; } } return true; } } return false; } public synchronized void f(String str, String str2, long j10) { this.f8409p.add(new a(str, str2, j10)); this.f8410q.add(str); if (str.equals("download")) { this.f8417x = true; } } public synchronized void g(String str) { this.f8411r.add(str); } public void h(int i10) { this.f8408o = i10; } public synchronized int hashCode() { int i10; long j10; int i11 = 1; int a10 = ((((((com.vungle.warren.utility.l.a(this.f8395b) * 31) + com.vungle.warren.utility.l.a(this.f8396c)) * 31) + com.vungle.warren.utility.l.a(this.f8397d)) * 31) + (this.f8398e ? 1 : 0)) * 31; if (!this.f8399f) { i11 = 0; } long j11 = this.f8401h; int a11 = (((((a10 + i11) * 31) + ((int) (j11 ^ (j11 >>> 32)))) * 31) + com.vungle.warren.utility.l.a(this.f8402i)) * 31; long j12 = this.f8403j; int i12 = (a11 + ((int) (j12 ^ (j12 >>> 32)))) * 31; long j13 = this.f8404k; int i13 = (i12 + ((int) (j13 ^ (j13 >>> 32)))) * 31; long j14 = this.f8405l; int i14 = (i13 + ((int) (j14 ^ (j14 >>> 32)))) * 31; long j15 = this.f8418y; i10 = (i14 + ((int) (j15 ^ (j15 >>> 32)))) * 31; j10 = this.f8419z; return ((((((((((((((((i10 + ((int) (j10 ^ (j10 >>> 32)))) * 31) + com.vungle.warren.utility.l.a(this.f8406m)) * 31) + com.vungle.warren.utility.l.a(this.f8409p)) * 31) + com.vungle.warren.utility.l.a(this.f8410q)) * 31) + com.vungle.warren.utility.l.a(this.f8411r)) * 31) + com.vungle.warren.utility.l.a(this.f8412s)) * 31) + com.vungle.warren.utility.l.a(this.f8413t)) * 31) + com.vungle.warren.utility.l.a(this.f8414u)) * 31) + (this.f8417x ? 1 : 0); } public void i(long j10) { this.f8404k = j10; } public void j(boolean z10) { this.f8400g = !z10; } public void k(int i10) { this.f8394a = i10; } public void l(long j10) { this.f8405l = j10; } public void m(long j10) { this.f8403j = j10; } public synchronized z4.k n() { z4.k kVar; kVar = new z4.k(); kVar.r("placement_reference_id", this.f8395b); kVar.r("ad_token", this.f8396c); kVar.r("app_id", this.f8397d); kVar.q("incentivized", Integer.valueOf(this.f8398e ? 1 : 0)); kVar.p("header_bidding", Boolean.valueOf(this.f8399f)); kVar.p("play_remote_assets", Boolean.valueOf(this.f8400g)); kVar.q("adStartTime", Long.valueOf(this.f8401h)); if (!TextUtils.isEmpty(this.f8402i)) { kVar.r(ImagesContract.URL, this.f8402i); } kVar.q("adDuration", Long.valueOf(this.f8404k)); kVar.q("ttDownload", Long.valueOf(this.f8405l)); kVar.r("campaign", this.f8406m); kVar.r("adType", this.f8412s); kVar.r("templateId", this.f8413t); kVar.q("init_timestamp", Long.valueOf(this.f8418y)); kVar.q("asset_download_duration", Long.valueOf(this.f8419z)); if (!TextUtils.isEmpty(this.f8416w)) { kVar.r("ad_size", this.f8416w); } z4.g gVar = new z4.g(); z4.k kVar2 = new z4.k(); kVar2.q("startTime", Long.valueOf(this.f8401h)); int i10 = this.f8408o; if (i10 > 0) { kVar2.q("videoViewed", Integer.valueOf(i10)); } long j10 = this.f8403j; if (j10 > 0) { kVar2.q("videoLength", Long.valueOf(j10)); } z4.g gVar2 = new z4.g(); Iterator it = this.f8409p.iterator(); while (it.hasNext()) { gVar2.p(((a) it.next()).a()); } kVar2.o("userActions", gVar2); gVar.p(kVar2); kVar.o("plays", gVar); z4.g gVar3 = new z4.g(); Iterator it2 = this.f8411r.iterator(); while (it2.hasNext()) { gVar3.o((String) it2.next()); } kVar.o("errors", gVar3); z4.g gVar4 = new z4.g(); Iterator it3 = this.f8410q.iterator(); while (it3.hasNext()) { gVar4.o((String) it3.next()); } kVar.o("clickedThrough", gVar4); if (this.f8398e && !TextUtils.isEmpty(this.f8414u)) { kVar.r("user", this.f8414u); } int i11 = this.f8415v; if (i11 > 0) { kVar.q("ordinal_view", Integer.valueOf(i11)); } return kVar; } public p(c cVar, n nVar, long j10, String str) { this.f8394a = 0; this.f8409p = new ArrayList(); this.f8410q = new ArrayList(); this.f8411r = new ArrayList(); this.f8395b = nVar.d(); this.f8396c = cVar.e(); this.f8407n = cVar.t(); this.f8397d = cVar.h(); this.f8398e = nVar.k(); this.f8399f = nVar.j(); this.f8401h = j10; this.f8402i = cVar.F(); this.f8405l = -1L; this.f8406m = cVar.l(); this.f8418y = c0.l().k(); this.f8419z = cVar.i(); int f10 = cVar.f(); if (f10 == 0) { this.f8412s = "vungle_local"; } else if (f10 == 1) { this.f8412s = "vungle_mraid"; } else { throw new IllegalArgumentException("Unknown ad type, cannot process!"); } this.f8413t = cVar.B(); if (str == null) { this.f8414u = RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED; } else { this.f8414u = str; } this.f8415v = cVar.d().f(); AdConfig.AdSize a10 = cVar.d().a(); if (AdConfig.AdSize.isNonMrecBannerAdSize(a10)) { this.f8416w = a10.getName(); } } }