package L1;

import android.os.Bundle;
import java.util.EnumMap;
import java.util.Objects;

/* JADX INFO: renamed from: L1.p, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C0125p {

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public static final C0125p f1940f = new C0125p((Boolean) null, 100, (Boolean) null, (String) null);

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final int f1941a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final String f1942b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final Boolean f1943c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final String f1944d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final EnumMap f1945e;

    public C0125p(Boolean bool, int i, Boolean bool2, String str) {
        EnumMap enumMap = new EnumMap(K0.class);
        this.f1945e = enumMap;
        enumMap.put(K0.AD_USER_DATA, bool == null ? I0.UNINITIALIZED : bool.booleanValue() ? I0.GRANTED : I0.DENIED);
        this.f1941a = i;
        this.f1942b = d();
        this.f1943c = bool2;
        this.f1944d = str;
    }

    public static C0125p b(String str) {
        if (str == null || str.length() <= 0) {
            return f1940f;
        }
        String[] strArrSplit = str.split(":");
        int i = Integer.parseInt(strArrSplit[0]);
        EnumMap enumMap = new EnumMap(K0.class);
        K0[] k0Arr = J0.DMA.f1475k;
        int length = k0Arr.length;
        int i5 = 1;
        int i6 = 0;
        while (i6 < length) {
            enumMap.put(k0Arr[i6], L0.e(strArrSplit[i5].charAt(0)));
            i6++;
            i5++;
        }
        return new C0125p(enumMap, i, (Boolean) null, (String) null);
    }

    public static C0125p c(int i, Bundle bundle) {
        if (bundle == null) {
            return new C0125p((Boolean) null, i, (Boolean) null, (String) null);
        }
        EnumMap enumMap = new EnumMap(K0.class);
        for (K0 k02 : J0.DMA.f1475k) {
            enumMap.put(k02, L0.d(bundle.getString(k02.f1481k)));
        }
        return new C0125p(enumMap, i, bundle.containsKey("is_dma_region") ? Boolean.valueOf(bundle.getString("is_dma_region")) : null, bundle.getString("cps_display_str"));
    }

    public final I0 a() {
        I0 i02 = (I0) this.f1945e.get(K0.AD_USER_DATA);
        return i02 == null ? I0.UNINITIALIZED : i02;
    }

    public final String d() {
        StringBuilder sb = new StringBuilder();
        sb.append(this.f1941a);
        for (K0 k02 : J0.DMA.f1475k) {
            sb.append(":");
            sb.append(L0.h((I0) this.f1945e.get(k02)));
        }
        return sb.toString();
    }

    public final boolean equals(Object obj) {
        if (!(obj instanceof C0125p)) {
            return false;
        }
        C0125p c0125p = (C0125p) obj;
        if (this.f1942b.equalsIgnoreCase(c0125p.f1942b) && Objects.equals(this.f1943c, c0125p.f1943c)) {
            return Objects.equals(this.f1944d, c0125p.f1944d);
        }
        return false;
    }

    public final int hashCode() {
        Boolean bool = this.f1943c;
        int i = bool == null ? 3 : true != bool.booleanValue() ? 13 : 7;
        String str = this.f1944d;
        return ((str == null ? 17 : str.hashCode()) * 137) + this.f1942b.hashCode() + (i * 29);
    }

    public final String toString() {
        StringBuilder sb = new StringBuilder("source=");
        sb.append(L0.a(this.f1941a));
        for (K0 k02 : J0.DMA.f1475k) {
            sb.append(",");
            sb.append(k02.f1481k);
            sb.append("=");
            I0 i02 = (I0) this.f1945e.get(k02);
            if (i02 == null) {
                sb.append("uninitialized");
            } else {
                int iOrdinal = i02.ordinal();
                if (iOrdinal == 0) {
                    sb.append("uninitialized");
                } else if (iOrdinal == 1) {
                    sb.append("eu_consent_policy");
                } else if (iOrdinal == 2) {
                    sb.append("denied");
                } else if (iOrdinal == 3) {
                    sb.append("granted");
                }
            }
        }
        Boolean bool = this.f1943c;
        if (bool != null) {
            sb.append(",isDmaRegion=");
            sb.append(bool);
        }
        String str = this.f1944d;
        if (str != null) {
            sb.append(",cpsDisplayStr=");
            sb.append(str);
        }
        return sb.toString();
    }

    public C0125p(EnumMap enumMap, int i, Boolean bool, String str) {
        EnumMap enumMap2 = new EnumMap(K0.class);
        this.f1945e = enumMap2;
        enumMap2.putAll(enumMap);
        this.f1941a = i;
        this.f1942b = d();
        this.f1943c = bool;
        this.f1944d = str;
    }
}
