package K4;

import e4.AbstractC0567k;
import java.util.ArrayList;
import java.util.Iterator;
import r4.AbstractC0983h;

/* JADX INFO: loaded from: classes.dex */
public final class n {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public String f1149a;

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

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public final ArrayList f1154f;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public ArrayList f1155g;

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    public String f1156h;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public String f1150b = "";

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public String f1151c = "";

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public int f1153e = -1;

    public n() {
        ArrayList arrayList = new ArrayList();
        this.f1154f = arrayList;
        arrayList.add("");
    }

    public final o a() {
        ArrayList arrayList;
        String str = this.f1149a;
        if (str == null) {
            throw new IllegalStateException("scheme == null");
        }
        String strE = b.e(this.f1150b, 0, 0, 7);
        String strE2 = b.e(this.f1151c, 0, 0, 7);
        String str2 = this.f1152d;
        if (str2 == null) {
            throw new IllegalStateException("host == null");
        }
        int iB = b();
        ArrayList arrayList2 = this.f1154f;
        ArrayList arrayList3 = new ArrayList(AbstractC0567k.Z(arrayList2));
        Iterator it = arrayList2.iterator();
        while (it.hasNext()) {
            arrayList3.add(b.e((String) it.next(), 0, 0, 7));
        }
        ArrayList<String> arrayList4 = this.f1155g;
        if (arrayList4 == null) {
            arrayList = null;
        } else {
            ArrayList arrayList5 = new ArrayList(AbstractC0567k.Z(arrayList4));
            for (String str3 : arrayList4) {
                arrayList5.add(str3 == null ? null : b.e(str3, 0, 0, 3));
            }
            arrayList = arrayList5;
        }
        String str4 = this.f1156h;
        return new o(str, strE, strE2, str2, iB, arrayList3, arrayList, str4 != null ? b.e(str4, 0, 0, 7) : null, toString());
    }

    public final int b() {
        int i = this.f1153e;
        if (i != -1) {
            return i;
        }
        String str = this.f1149a;
        AbstractC0983h.b(str);
        if (str.equals("http")) {
            return 80;
        }
        return str.equals("https") ? 443 : -1;
    }

    /* JADX WARN: Removed duplicated region for block: B:4:0x0024  */
    /* JADX WARN: Removed duplicated region for block: B:74:0x0137  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct code enable 'Show inconsistent code' option in preferences
    */
    public final void c(K4.o r19, java.lang.String r20) {
        /*
            Method dump skipped, instruction units count: 938
            To view this dump change 'Code comments level' option to 'DEBUG'
        */
        throw new UnsupportedOperationException("Method not decompiled: K4.n.c(K4.o, java.lang.String):void");
    }

    /* JADX WARN: Removed duplicated region for block: B:34:0x008b  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct code enable 'Show inconsistent code' option in preferences
    */
    public final java.lang.String toString() {
        /*
            Method dump skipped, instruction units count: 284
            To view this dump change 'Code comments level' option to 'DEBUG'
        */
        throw new UnsupportedOperationException("Method not decompiled: K4.n.toString():java.lang.String");
    }
}
