package z5; import android.view.View; import androidx.appcompat.app.m; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import t5.i; import w5.f; /* loaded from: classes2.dex */ public class b { /* renamed from: a, reason: collision with root package name */ private final HashMap f15882a = new HashMap(); /* renamed from: b, reason: collision with root package name */ private final HashMap f15883b = new HashMap(); /* renamed from: c, reason: collision with root package name */ private final HashMap f15884c = new HashMap(); /* renamed from: d, reason: collision with root package name */ private final HashSet f15885d = new HashSet(); /* renamed from: e, reason: collision with root package name */ private final HashSet f15886e = new HashSet(); /* renamed from: f, reason: collision with root package name */ private final HashSet f15887f = new HashSet(); /* renamed from: g, reason: collision with root package name */ private final HashMap f15888g = new HashMap(); /* renamed from: h, reason: collision with root package name */ private boolean f15889h; public static class a { public abstract u5.c a(); public abstract ArrayList b(); } private void d(i iVar) { Iterator it = iVar.e().iterator(); while (it.hasNext()) { m.a(it.next()); e(null, iVar); } } private void e(u5.c cVar, i iVar) { throw null; } private String k(View view) { if (!view.hasWindowFocus()) { return "noWindowFocus"; } HashSet hashSet = new HashSet(); while (view != null) { String e10 = f.e(view); if (e10 != null) { return e10; } hashSet.add(view); Object parent = view.getParent(); view = parent instanceof View ? (View) parent : null; } this.f15885d.addAll(hashSet); return null; } public String a(View view) { if (this.f15882a.size() == 0) { return null; } String str = (String) this.f15882a.get(view); if (str != null) { this.f15882a.remove(view); } return str; } public String b(String str) { return (String) this.f15888g.get(str); } public HashSet c() { return this.f15886e; } public View f(String str) { return (View) this.f15884c.get(str); } public HashSet g() { return this.f15887f; } public a h(View view) { a aVar = (a) this.f15883b.get(view); if (aVar != null) { this.f15883b.remove(view); } return aVar; } public d i(View view) { return this.f15885d.contains(view) ? d.PARENT_VIEW : this.f15889h ? d.OBSTRUCTION_VIEW : d.UNDERLYING_VIEW; } public void j() { u5.a a10 = u5.a.a(); if (a10 != null) { for (i iVar : a10.e()) { View g10 = iVar.g(); if (iVar.i()) { String j10 = iVar.j(); if (g10 != null) { String k10 = k(g10); if (k10 == null) { this.f15886e.add(j10); this.f15882a.put(g10, j10); d(iVar); } else { this.f15887f.add(j10); this.f15884c.put(j10, g10); this.f15888g.put(j10, k10); } } else { this.f15887f.add(j10); this.f15888g.put(j10, "noAdView"); } } } } } public void l() { this.f15882a.clear(); this.f15883b.clear(); this.f15884c.clear(); this.f15885d.clear(); this.f15886e.clear(); this.f15887f.clear(); this.f15888g.clear(); this.f15889h = false; } public void m() { this.f15889h = true; } }