Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

package okhttp3; import androidx.core.graphics.Insets$$ExternalSyntheticOutline0; impo..

Decoded Output download

<?  package okhttp3; 
 
import androidx.core.graphics.Insets$$ExternalSyntheticOutline0; 
import com.google.android.exoplayer2.extractor.p005ts.PsExtractor; 
import com.google.android.gms.actions.SearchIntents; 
import com.google.android.gms.common.internal.ImagesContract; 
import java.net.MalformedURLException; 
import java.net.URI; 
import java.net.URISyntaxException; 
import java.net.URL; 
import java.nio.charset.Charset; 
import java.util.ArrayList; 
import java.util.Collections; 
import java.util.LinkedHashSet; 
import java.util.List; 
import java.util.Objects; 
import java.util.Set; 
import kotlin.Deprecated; 
import kotlin.DeprecationLevel; 
import kotlin.Metadata; 
import kotlin.ReplaceWith; 
import kotlin.collections.CollectionsKt; 
import kotlin.collections.SetsKt; 
import kotlin.jvm.JvmName; 
import kotlin.jvm.JvmStatic; 
import kotlin.jvm.internal.DefaultConstructorMarker; 
import kotlin.jvm.internal.Intrinsics; 
import kotlin.ranges.IntProgression; 
import kotlin.ranges.RangesKt; 
import kotlin.text.Regex; 
import kotlin.text.StringsJVM; 
import kotlin.text.StringsKt; 
import kotlin.text.StringsKt__StringsKt; 
import kotlin.text.Typography; 
import okhttp3.internal.Util; 
import okhttp3.internal.hostnames; 
import okhttp3.internal.publicsuffix.PublicSuffixDatabase; 
import okio.Buffer; 
import org.jetbrains.annotations.NotNull; 
import org.jetbrains.annotations.Nullable; 
 
/* compiled from: HttpUrl.kt */ 
@Metadata(m63bv = {1, 0, 3}, m62d1 = {"H







 



\"






 J20:IJBa00000	00
00
0
0J0H!J
0H\"J
0H#J00
H$J0H%J
0H&J'02(0HJ0H)J*0HJ
0H+J,0-J,0-2.0J
0H/J	00
H0J
0H1J
0H2J0H3J40250J60270J00H8J90270J:
00
250J
 0H;J<0J=02.0J
0H>J?0HJ
@0AHBJ
C0DH
JE0J
B0AHFJ

0DHGJ
0HHR08GR08GR08GR00
8GR08GR08GR08
R08
R0
R08
R	00
8
	R08GR08
R08GR00
X
R008GR 08G R08
R
0X
R08
K"}, m61d2 = {"Lokhttp3/HttpUrl;", "", "scheme", "", "username", "password", "host", "port", "", "pathSegments", "", "queryNamesAndValues", "fragment", ImagesContract.URL, "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/util/List;Ljava/util/List;Ljava/lang/String;Ljava/lang/String;)V", "encodedFragment", "()Ljava/lang/String;", "encodedPassword", "encodedPath", "encodedPathSegments", "()Ljava/util/List;", "encodedQuery", "encodedUsername", "isHttps", "", "()Z", "pathSize", "()I", SearchIntents.EXTRA_QUERY, "queryParameterNames", "", "()Ljava/util/Set;", "querySize", "-deprecated_encodedFragment", "-deprecated_encodedPassword", "-deprecated_encodedPath", "-deprecated_encodedPathSegments", "-deprecated_encodedQuery", "-deprecated_encodedUsername", "equals", "other", "-deprecated_fragment", "hashCode", "-deprecated_host", "newBuilder", "Lokhttp3/HttpUrl$Builder;", "link", "-deprecated_password", "-deprecated_pathSegments", "-deprecated_pathSize", "-deprecated_port", "-deprecated_query", "queryParameter", "name", "queryParameterName", "index", "-deprecated_queryParameterNames", "queryParameterValue", "queryParameterValues", "-deprecated_querySize", "redact", "resolve", "-deprecated_scheme", "toString", "toUri", "Ljava/net/URI;", "uri", "toUrl", "Ljava/net/URL;", "topPrivateDomain", "-deprecated_uri", "-deprecated_url", "-deprecated_username", "Builder", "Companion", "okhttp"}, m60k = 1, m59mv = {1, 4, 1}) 
/* loaded from: classes2.dex */ 
public final class HttpUrl { 
    @NotNull 
    public static final String FORM_ENCODE_SET = " !\"#$&'()+,/:;<=>?@[\]^`{|}~"; 
    @NotNull 
    public static final String FRAGMENT_ENCODE_SET = ""; 
    @NotNull 
    public static final String FRAGMENT_ENCODE_SET_URI = " \"#<>\^`{|}"; 
    @NotNull 
    public static final String PASSWORD_ENCODE_SET = " \"':;<=>@[]^`{}|/\?#"; 
    @NotNull 
    public static final String PATH_SEGMENT_ENCODE_SET = " \"<>^`{}|/\?#"; 
    @NotNull 
    public static final String PATH_SEGMENT_ENCODE_SET_URI = "[]"; 
    @NotNull 
    public static final String QUERY_COMPONENT_ENCODE_SET = " !\"#$&'(),/:;<=>?@[]\^`{|}~"; 
    @NotNull 
    public static final String QUERY_COMPONENT_ENCODE_SET_URI = "\^`{|}"; 
    @NotNull 
    public static final String QUERY_COMPONENT_REENCODE_SET = " \"'<>#&="; 
    @NotNull 
    public static final String QUERY_ENCODE_SET = " \"'<>#"; 
    @NotNull 
    public static final String USERNAME_ENCODE_SET = " \"':;<=>@[]^`{}|/\?#"; 
    @Nullable 
    private final String fragment; 
    @NotNull 
    private final String host; 
    private final boolean isHttps; 
    @NotNull 
    private final String password; 
    @NotNull 
    private final List<String> pathSegments; 
    private final int port; 
    private final List<String> queryNamesAndValues; 
    @NotNull 
    private final String scheme; 
    private final String url; 
    @NotNull 
    private final String username; 
    @NotNull 
    public static final Companion Companion = new Companion(null); 
    private static final char[] HEX_DIGITS = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'}; 
 
    /* compiled from: HttpUrl.kt */ 
    @Metadata(m63bv = {1, 0, 3}, m62d1 = {"<





!








 V20:VBJ#02$0J%020J&02'02(0J)02*0J+02,0J+02,02-0.HJ/0200210J203J40HJ020J	02	0J50250J60260J020J70270J020J80.290HJ:0.290HJ;02<03290H=J>02>0J?0@[email protected]
F0HGJH0@2I0HJJ02'0JK0200JL02M0J N0@2902O02C0HJ 02 0JP02M02$0JQ02'02(0JR02M02*0JS0200210JT0HJU02U0R0X
\"R	0X

\"R00
X
R$00
X
\"R0X
\"R0X
\"R0X
\"R 0X
!\"\"W"}, m61d2 = {"Lokhttp3/HttpUrl$Builder;", "", "()V", "encodedFragment", "", "getEncodedFragment$okhttp", "()Ljava/lang/String;", "setEncodedFragment$okhttp", "(Ljava/lang/String;)V", "encodedPassword", "getEncodedPassword$okhttp", "setEncodedPassword$okhttp", "encodedPathSegments", "", "getEncodedPathSegments$okhttp", "()Ljava/util/List;", "encodedQueryNamesAndValues", "getEncodedQueryNamesAndValues$okhttp", "setEncodedQueryNamesAndValues$okhttp", "(Ljava/util/List;)V", "encodedUsername", "getEncodedUsername$okhttp", "setEncodedUsername$okhttp", "host", "getHost$okhttp", "setHost$okhttp", "port", "", "getPort$okhttp", "()I", "setPort$okhttp", "(I)V", "scheme", "getScheme$okhttp", "setScheme$okhttp", "addEncodedPathSegment", "encodedPathSegment", "addEncodedPathSegments", "addEncodedQueryParameter", "encodedName", "encodedValue", "addPathSegment", "pathSegment", "addPathSegments", "pathSegments", "alreadyEncoded", "", "addQueryParameter", "name", "value", "build", "Lokhttp3/HttpUrl;", "effectivePort", "encodedPath", "encodedQuery", "fragment", "isDot", "input", "isDotDot", "parse", "base", "parse$okhttp", "password", "pop", "", "push", "pos", "limit", "addTrailingSlash", SearchIntents.EXTRA_QUERY, "reencodeForUri", "reencodeForUri$okhttp", "removeAllCanonicalQueryParameters", "canonicalName", "removeAllEncodedQueryParameters", "removeAllQueryParameters", "removePathSegment", "index", "resolvePath", "startPos", "setEncodedPathSegment", "setEncodedQueryParameter", "setPathSegment", "setQueryParameter", "toString", "username", "Companion", "okhttp"}, m60k = 1, m59mv = {1, 4, 1}) 
    /* loaded from: classes2.dex */ 
    public static final class Builder { 
        @NotNull 
        public static final Companion Companion = new Companion(null); 
        @NotNull 
        public static final String INVALID_HOST = "Invalid URL host"; 
        @Nullable 
        private String encodedFragment; 
        @NotNull 
        private final List<String> encodedPathSegments; 
        @Nullable 
        private List<String> encodedQueryNamesAndValues; 
        @Nullable 
        private String host; 
        @Nullable 
        private String scheme; 
        @NotNull 
        private String encodedUsername = ""; 
        @NotNull 
        private String encodedPassword = ""; 
        private int port = -1; 
 
        /* compiled from: HttpUrl.kt */ 
        @Metadata(m63bv = {1, 0, 3}, m62d1 = {"






20BJ 020202	0HJ 
020202	0HJ 020202	0HJ0*0202	0HR0XT

"}, m61d2 = {"Lokhttp3/HttpUrl$Builder$Companion;", "", "()V", "INVALID_HOST", "", "parsePort", "", "input", "pos", "limit", "portColonOffset", "schemeDelimiterOffset", "slashCount", "okhttp"}, m60k = 1, m59mv = {1, 4, 1}) 
        /* loaded from: classes2.dex */ 
        public static final class Companion { 
            private Companion() { 
            } 
 
            /* JADX INFO: Access modifiers changed from: private */ 
            public final int parsePort(String str, int i, int i2) { 
                try { 
                    int parseInt = Integer.parseInt(Companion.canonicalize$okhttp$default(HttpUrl.Companion, str, i, i2, "", false, false, false, false, null, 248, null)); 
                    if (1 <= parseInt && 65535 >= parseInt) { 
                        return parseInt; 
                    } 
                    return -1; 
                } catch (NumberFormatException unused) { 
                    return -1; 
                } 
            } 
 
            /* JADX INFO: Access modifiers changed from: private */ 
            public final int portColonOffset(String str, int i, int i2) { 
                while (i < i2) { 
                    char charAt = str.charAt(i); 
                    if (charAt == ':') { 
                        return i; 
                    } 
                    if (charAt == '[') { 
                        do { 
                            i++; 
                            if (i < i2) { 
                            } 
                        } while (str.charAt(i) != ']'); 
                    } 
                    i++; 
                } 
                return i2; 
            } 
 
            /* JADX INFO: Access modifiers changed from: private */ 
            public final int schemeDelimiterOffset(String str, int i, int i2) { 
                if (i2 - i < 2) { 
                    return -1; 
                } 
                char charAt = str.charAt(i); 
                if ((Intrinsics.compare((int) charAt, 97) < 0 || Intrinsics.compare((int) charAt, 122) > 0) && (Intrinsics.compare((int) charAt, 65) < 0 || Intrinsics.compare((int) charAt, 90) > 0)) { 
                    return -1; 
                } 
                while (true) { 
                    i++; 
                    if (i >= i2) { 
                        return -1; 
                    } 
                    char charAt2 = str.charAt(i); 
                    if ('a' > charAt2 || 'z' < charAt2) { 
                        if ('A' > charAt2 || 'Z' < charAt2) { 
                            if ('0' > charAt2 || '9' < charAt2) { 
                                if (charAt2 != '+' && charAt2 != '-' && charAt2 != '.') { 
                                    if (charAt2 == ':') { 
                                        return i; 
                                    } 
                                    return -1; 
                                } 
                            } 
                        } 
                    } 
                } 
            } 
 
            /* JADX INFO: Access modifiers changed from: private */ 
            public final int slashCount(String str, int i, int i2) { 
                int i3 = 0; 
                while (i < i2) { 
                    char charAt = str.charAt(i); 
                    if (charAt != '\' && charAt != '/') { 
                        break; 
                    } 
                    i3++; 
                    i++; 
                } 
                return i3; 
            } 
 
            public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) { 
                this(); 
            } 
        } 
 
        public Builder() { 
            ArrayList arrayList = new ArrayList(); 
            this.encodedPathSegments = arrayList; 
            arrayList.add(""); 
        } 
 
        private final int effectivePort() { 
            int i = this.port; 
            if (i != -1) { 
                return i; 
            } 
            Companion companion = HttpUrl.Companion; 
            String str = this.scheme; 
            Intrinsics.checkNotNull(str); 
            return companion.defaultPort(str); 
        } 
 
        private final boolean isDot(String str) { 
            boolean equals; 
            if (!Intrinsics.areEqual(str, ".")) { 
                equals = StringsJVM.equals(str, "%2e", true); 
                if (!equals) { 
                    return false; 
                } 
            } 
            return true; 
        } 
 
        private final boolean isDotDot(String str) { 
            boolean equals; 
            boolean equals2; 
            boolean equals3; 
            if (!Intrinsics.areEqual(str, "..")) { 
                equals = StringsJVM.equals(str, "%2e.", true); 
                if (!equals) { 
                    equals2 = StringsJVM.equals(str, ".%2e", true); 
                    if (!equals2) { 
                        equals3 = StringsJVM.equals(str, "%2e%2e", true); 
                        if (!equals3) { 
                            return false; 
                        } 
                    } 
                } 
            } 
            return true; 
        } 
 
        private final void pop() { 
            List<String> list = this.encodedPathSegments; 
            if ((list.remove(list.size() - 1).length() == 0) && (!this.encodedPathSegments.isEmpty())) { 
                List<String> list2 = this.encodedPathSegments; 
                list2.set(list2.size() - 1, ""); 
                return; 
            } 
            this.encodedPathSegments.add(""); 
        } 
 
        private final void push(String str, int i, int i2, boolean z, boolean z2) { 
            String canonicalize$okhttp$default = Companion.canonicalize$okhttp$default(HttpUrl.Companion, str, i, i2, HttpUrl.PATH_SEGMENT_ENCODE_SET, z2, false, false, false, null, PsExtractor.VIDEO_STREAM_MASK, null); 
            if (isDot(canonicalize$okhttp$default)) { 
                return; 
            } 
            if (isDotDot(canonicalize$okhttp$default)) { 
                pop(); 
                return; 
            } 
            List<String> list = this.encodedPathSegments; 
            if (list.get(list.size() - 1).length() == 0) { 
                List<String> list2 = this.encodedPathSegments; 
                list2.set(list2.size() - 1, canonicalize$okhttp$default); 
            } else { 
                this.encodedPathSegments.add(canonicalize$okhttp$default); 
            } 
            if (z) { 
                this.encodedPathSegments.add(""); 
            } 
        } 
 
        private final void removeAllCanonicalQueryParameters(String str) { 
            List<String> list = this.encodedQueryNamesAndValues; 
            Intrinsics.checkNotNull(list); 
            IntProgression step = RangesKt.step(RangesKt.downTo(list.size() - 2, 0), 2); 
            int first = step.getFirst(); 
            int last = step.getLast(); 
            int step2 = step.getStep(); 
            if (step2 >= 0) { 
                if (first > last) { 
                    return; 
                } 
            } else if (first < last) { 
                return; 
            } 
            while (true) { 
                List<String> list2 = this.encodedQueryNamesAndValues; 
                Intrinsics.checkNotNull(list2); 
                if (Intrinsics.areEqual(str, list2.get(first))) { 
                    List<String> list3 = this.encodedQueryNamesAndValues; 
                    Intrinsics.checkNotNull(list3); 
                    list3.remove(first + 1); 
                    List<String> list4 = this.encodedQueryNamesAndValues; 
                    Intrinsics.checkNotNull(list4); 
                    list4.remove(first); 
                    List<String> list5 = this.encodedQueryNamesAndValues; 
                    Intrinsics.checkNotNull(list5); 
                    if (list5.isEmpty()) { 
                        this.encodedQueryNamesAndValues = null; 
                        return; 
                    } 
                } 
                if (first == last) { 
                    return; 
                } 
                first += step2; 
            } 
        } 
 
        /*  JADX ERROR: JadxOverflowException in pass: RegionMakerVisitor 
            jadx.core.utils.exceptions.JadxOverflowException: Regions count limit reached 
            	at jadx.core.utils.ErrorsCounter.addError(ErrorsCounter.java:56) 
            	at jadx.core.utils.ErrorsCounter.error(ErrorsCounter.java:30) 
            	at jadx.core.dex.attributes.nodes.NotificationAttrNode.addError(NotificationAttrNode.java:18) 
            */ 
        /* JADX WARN: Removed duplicated region for block: B:13:0x002c  */ 
        /* JADX WARN: Removed duplicated region for block: B:21:0x0044 A[SYNTHETIC] */ 
        /* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:19:0x0041 -> B:11:0x0029). Please submit an issue!!! */ 
        /* 
            Code decompiled incorrectly, please refer to instructions dump. 
            To view partially-correct code enable 'Show inconsistent code' option in preferences 
        */ 
        private final void resolvePath(java.lang.String r11, int r12, int r13) { 
            /* 
                r10 = this; 
                if (r12 != r13) goto L3 
                return 
            L3: 
                char r0 = r11.charAt(r12) 
                r1 = 47 
                java.lang.String r2 = "" 
                r3 = 1 
                if (r0 == r1) goto L1e 
                r1 = 92 
                if (r0 != r1) goto L13 
                goto L1e 
            L13: 
                java.util.List<java.lang.String> r0 = r10.encodedPathSegments 
                int r1 = r0.size() 
                int r1 = r1 - r3 
                r0.set(r1, r2) 
                goto L29 
            L1e: 
                java.util.List<java.lang.String> r0 = r10.encodedPathSegments 
                r0.clear() 
                java.util.List<java.lang.String> r0 = r10.encodedPathSegments 
                r0.add(r2) 
                goto L41 
            L29: 
                r6 = r12 
                if (r6 >= r13) goto L44 
                java.lang.String r12 = "/\" 
                int r12 = okhttp3.internal.Util.delimiterOffset(r11, r12, r6, r13) 
                if (r12 >= r13) goto L36 
                r0 = 1 
                goto L37 
            L36: 
                r0 = 0 
            L37: 
                r9 = 1 
                r4 = r10 
                r5 = r11 
                r7 = r12 
                r8 = r0 
                r4.push(r5, r6, r7, r8, r9) 
                if (r0 == 0) goto L29 
            L41: 
                int r12 = r12 + 1 
                goto L29 
            L44: 
                return 
            */ 
            throw new UnsupportedOperationException("Method not decompiled: okhttp3.HttpUrl.Builder.resolvePath(java.lang.String, int, int):void"); 
        } 
 
        @NotNull 
        public final Builder addEncodedPathSegment(@NotNull String encodedPathSegment) { 
            Intrinsics.checkNotNullParameter(encodedPathSegment, "encodedPathSegment"); 
            push(encodedPathSegment, 0, encodedPathSegment.length(), false, true); 
            return this; 
        } 
 
        @NotNull 
        public final Builder addEncodedPathSegments(@NotNull String encodedPathSegments) { 
            Intrinsics.checkNotNullParameter(encodedPathSegments, "encodedPathSegments"); 
            return addPathSegments(encodedPathSegments, true); 
        } 
 
        @NotNull 
        public final Builder addEncodedQueryParameter(@NotNull String encodedName, @Nullable String str) { 
            Intrinsics.checkNotNullParameter(encodedName, "encodedName"); 
            if (this.encodedQueryNamesAndValues == null) { 
                this.encodedQueryNamesAndValues = new ArrayList(); 
            } 
            List<String> list = this.encodedQueryNamesAndValues; 
            Intrinsics.checkNotNull(list); 
            Companion companion = HttpUrl.Companion; 
            list.add(Companion.canonicalize$okhttp$default(companion, encodedName, 0, 0, HttpUrl.QUERY_COMPONENT_REENCODE_SET, true, false, true, false, null, 211, null)); 
            List<String> list2 = this.encodedQueryNamesAndValues; 
            Intrinsics.checkNotNull(list2); 
            list2.add(str != null ? Companion.canonicalize$okhttp$default(companion, str, 0, 0, HttpUrl.QUERY_COMPONENT_REENCODE_SET, true, false, true, false, null, 211, null) : null); 
            return this; 
        } 
 
        @NotNull 
        public final Builder addPathSegment(@NotNull String pathSegment) { 
            Intrinsics.checkNotNullParameter(pathSegment, "pathSegment"); 
            push(pathSegment, 0, pathSegment.length(), false, false); 
            return this; 
        } 
 
        @NotNull 
        public final Builder addPathSegments(@NotNull String pathSegments) { 
            Intrinsics.checkNotNullParameter(pathSegments, "pathSegments"); 
            return addPathSegments(pathSegments, false); 
        } 
 
        @NotNull 
        public final Builder addQueryParameter(@NotNull String name, @Nullable String str) { 
            Intrinsics.checkNotNullParameter(name, "name"); 
            if (this.encodedQueryNamesAndValues == null) { 
                this.encodedQueryNamesAndValues = new ArrayList(); 
            } 
            List<String> list = this.encodedQueryNamesAndValues; 
            Intrinsics.checkNotNull(list); 
            Companion companion = HttpUrl.Companion; 
            list.add(Companion.canonicalize$okhttp$default(companion, name, 0, 0, HttpUrl.QUERY_COMPONENT_ENCODE_SET, false, false, true, false, null, 219, null)); 
            List<String> list2 = this.encodedQueryNamesAndValues; 
            Intrinsics.checkNotNull(list2); 
            list2.add(str != null ? Companion.canonicalize$okhttp$default(companion, str, 0, 0, HttpUrl.QUERY_COMPONENT_ENCODE_SET, false, false, true, false, null, 219, null) : null); 
            return this; 
        } 
 
        @NotNull 
        public final HttpUrl build() { 
            ArrayList arrayList; 
            String str = this.scheme; 
            if (str != null) { 
                Companion companion = HttpUrl.Companion; 
                String percentDecode$okhttp$default = Companion.percentDecode$okhttp$default(companion, this.encodedUsername, 0, 0, false, 7, null); 
                String percentDecode$okhttp$default2 = Companion.percentDecode$okhttp$default(companion, this.encodedPassword, 0, 0, false, 7, null); 
                String str2 = this.host; 
                if (str2 != null) { 
                    int effectivePort = effectivePort(); 
                    List<String> list = this.encodedPathSegments; 
                    ArrayList arrayList2 = new ArrayList(CollectionsKt.collectionSizeOrDefault(list)); 
                    for (String str3 : list) { 
                        arrayList2.add(Companion.percentDecode$okhttp$default(HttpUrl.Companion, str3, 0, 0, false, 7, null)); 
                    } 
                    List<String> list2 = this.encodedQueryNamesAndValues; 
                    if (list2 != null) { 
                        arrayList = new ArrayList(CollectionsKt.collectionSizeOrDefault(list2)); 
                        for (String str4 : list2) { 
                            arrayList.add(str4 != null ? Companion.percentDecode$okhttp$default(HttpUrl.Companion, str4, 0, 0, true, 3, null) : null); 
                        } 
                    } else { 
                        arrayList = null; 
                    } 
                    String str5 = this.encodedFragment; 
                    return new HttpUrl(str, percentDecode$okhttp$default, percentDecode$okhttp$default2, str2, effectivePort, arrayList2, arrayList, str5 != null ? Companion.percentDecode$okhttp$default(HttpUrl.Companion, str5, 0, 0, false, 7, null) : null, toString()); 
                } 
                throw new IllegalStateException("host == null"); 
            } 
            throw new IllegalStateException("scheme == null"); 
        } 
 
        @NotNull 
        public final Builder encodedFragment(@Nullable String str) { 
            this.encodedFragment = str != null ? Companion.canonicalize$okhttp$default(HttpUrl.Companion, str, 0, 0, "", true, false, false, true, null, 179, null) : null; 
            return this; 
        } 
 
        @NotNull 
        public final Builder encodedPassword(@NotNull String encodedPassword) { 
            Intrinsics.checkNotNullParameter(encodedPassword, "encodedPassword"); 
            this.encodedPassword = Companion.canonicalize$okhttp$default(HttpUrl.Companion, encodedPassword, 0, 0, " \"':;<=>@[]^`{}|/\?#", true, false, false, false, null, 243, null); 
            return this; 
        } 
 
        @NotNull 
        public final Builder encodedPath(@NotNull String encodedPath) { 
            boolean startsWith$default; 
            Intrinsics.checkNotNullParameter(encodedPath, "encodedPath"); 
            startsWith$default = StringsJVM.startsWith$default(encodedPath, "/", false, 2, null); 
            if (startsWith$default) { 
                resolvePath(encodedPath, 0, encodedPath.length()); 
                return this; 
            } 
            throw new IllegalArgumentException(Insets$$ExternalSyntheticOutline0.m336m("unexpected encodedPath: ", encodedPath).toString()); 
        } 
 
        @NotNull 
        public final Builder encodedQuery(@Nullable String str) { 
            List<String> list; 
            if (str != null) { 
                Companion companion = HttpUrl.Companion; 
                String canonicalize$okhttp$default = Companion.canonicalize$okhttp$default(companion, str, 0, 0, HttpUrl.QUERY_ENCODE_SET, true, false, true, false, null, 211, null); 
                if (canonicalize$okhttp$default != null) { 
                    list = companion.toQueryNamesAndValues$okhttp(canonicalize$okhttp$default); 
                    this.encodedQueryNamesAndValues = list; 
                    return this; 
                } 
            } 
            list = null; 
            this.encodedQueryNamesAndValues = list; 
            return this; 
        } 
 
        @NotNull 
        public final Builder encodedUsername(@NotNull String encodedUsername) { 
            Intrinsics.checkNotNullParameter(encodedUsername, "encodedUsername"); 
            this.encodedUsername = Companion.canonicalize$okhttp$default(HttpUrl.Companion, encodedUsername, 0, 0, " \"':;<=>@[]^`{}|/\?#", true, false, false, false, null, 243, null); 
            return this; 
        } 
 
        @NotNull 
        public final Builder fragment(@Nullable String str) { 
            this.encodedFragment = str != null ? Companion.canonicalize$okhttp$default(HttpUrl.Companion, str, 0, 0, "", false, false, false, true, null, 187, null) : null; 
            return this; 
        } 
 
        @Nullable 
        public final String getEncodedFragment$okhttp() { 
            return this.encodedFragment; 
        } 
 
        @NotNull 
        public final String getEncodedPassword$okhttp() { 
            return this.encodedPassword; 
        } 
 
        @NotNull 
        public final List<String> getEncodedPathSegments$okhttp() { 
            return this.encodedPathSegments; 
        } 
 
        @Nullable 
        public final List<String> getEncodedQueryNamesAndValues$okhttp() { 
            return this.encodedQueryNamesAndValues; 
        } 
 
        @NotNull 
        public final String getEncodedUsername$okhttp() { 
            return this.encodedUsername; 
        } 
 
        @Nullable 
        public final String getHost$okhttp() { 
            return this.host; 
        } 
 
        public final int getPort$okhttp() { 
            return this.port; 
        } 
 
        @Nullable 
        public final String getScheme$okhttp() { 
            return this.scheme; 
        } 
 
        @NotNull 
        public final Builder host(@NotNull String host) { 
            Intrinsics.checkNotNullParameter(host, "host"); 
            String canonicalHost = hostnames.toCanonicalHost(Companion.percentDecode$okhttp$default(HttpUrl.Companion, host, 0, 0, false, 7, null)); 
            if (canonicalHost != null) { 
                this.host = canonicalHost; 
                return this; 
            } 
            throw new IllegalArgumentException(Insets$$ExternalSyntheticOutline0.m336m("unexpected host: ", host)); 
        } 
 
        @NotNull 
        public final Builder parse$okhttp(@Nullable HttpUrl httpUrl, @NotNull String str) { 
            int delimiterOffset; 
            int i; 
            String str2; 
            int i2; 
            int i3; 
            String str3; 
            boolean startsWith; 
            boolean startsWith2; 
            String input = str; 
            Intrinsics.checkNotNullParameter(input, "input"); 
            int indexOfFirstNonAsciiWhitespace$default = Util.indexOfFirstNonAsciiWhitespace$default(input, 0, 0, 3, null); 
            int indexOfLastNonAsciiWhitespace$default = Util.indexOfLastNonAsciiWhitespace$default(input, indexOfFirstNonAsciiWhitespace$default, 0, 2, null); 
            Companion companion = Companion; 
            int schemeDelimiterOffset = companion.schemeDelimiterOffset(input, indexOfFirstNonAsciiWhitespace$default, indexOfLastNonAsciiWhitespace$default); 
            char c = 65535; 
            String str4 = "(this as java.lang.Strining(startIndex, endIndex)"; 
            if (schemeDelimiterOffset != -1) { 
                startsWith = StringsJVM.startsWith(input, "https:", indexOfFirstNonAsciiWhitespace$default, true); 
                if (startsWith) { 
                    this.scheme = "https"; 
                    indexOfFirstNonAsciiWhitespace$default += 6; 
                } else { 
                    startsWith2 = StringsJVM.startsWith(input, "http:", indexOfFirstNonAsciiWhitespace$default, true); 
                    if (startsWith2) { 
                        this.scheme = "http"; 
                        indexOfFirstNonAsciiWhitespace$default += 5; 
                    } else { 
                        StringBuilder m344m = Insets$$ExternalSyntheticOutline0.m344m("Expected URL scheme 'http' or 'https' but was '"); 
                        String substring = input.substring(0, schemeDelimiterOffset); 
                        Intrinsics.checkNotNullExpressionValue(substring, "(this as java.lang.Strining(startIndex, endIndex)"); 
                        m344m.append(substring); 
                        m344m.append("'"); 
                        throw new IllegalArgumentException(m344m.toString()); 
                    } 
                } 
            } else if (httpUrl != null) { 
                this.scheme = httpUrl.scheme(); 
            } else { 
                if (str.length() > 6) { 
                    input = StringsKt.take(input, 6) + "..."; 
                } 
                throw new IllegalArgumentException(Insets$$ExternalSyntheticOutline0.m336m("Expected URL scheme 'http' or 'https' but no scheme was found for ", input)); 
            } 
            int slashCount = companion.slashCount(input, indexOfFirstNonAsciiWhitespace$default, indexOfLastNonAsciiWhitespace$default); 
            char c2 = '?'; 
            char c3 = '#'; 
            if (slashCount < 2 && httpUrl != null && !(!Intrinsics.areEqual(httpUrl.scheme(), this.scheme))) { 
                this.encodedUsername = httpUrl.encodedUsername(); 
                this.encodedPassword = httpUrl.encodedPassword(); 
                this.host = httpUrl.host(); 
                this.port = httpUrl.port(); 
                this.encodedPathSegments.clear(); 
                this.encodedPathSegments.addAll(httpUrl.encodedPathSegments()); 
                if (indexOfFirstNonAsciiWhitespace$default == indexOfLastNonAsciiWhitespace$default || input.charAt(indexOfFirstNonAsciiWhitespace$default) == '#') { 
                    encodedQuery(httpUrl.encodedQuery()); 
                } 
                i = indexOfLastNonAsciiWhitespace$default; 
            } else { 
                int i4 = indexOfFirstNonAsciiWhitespace$default + slashCount; 
                boolean z = false; 
                boolean z2 = false; 
                while (true) { 
                    delimiterOffset = Util.delimiterOffset(input, "@/\?#", i4, indexOfLastNonAsciiWhitespace$default); 
                    char charAt = delimiterOffset != indexOfLastNonAsciiWhitespace$default ? input.charAt(delimiterOffset) : (char) 65535; 
                    if (charAt == c || charAt == c3 || charAt == '/' || charAt == '\' || charAt == c2) { 
                        break; 
                    } 
                    if (charAt != '@') { 
                        i2 = indexOfLastNonAsciiWhitespace$default; 
                        str3 = str4; 
                    } else { 
                        if (!z) { 
                            int delimiterOffset2 = Util.delimiterOffset(input, ':', i4, delimiterOffset); 
                            Companion companion2 = HttpUrl.Companion; 
                            i2 = indexOfLastNonAsciiWhitespace$default; 
                            i3 = delimiterOffset; 
                            String canonicalize$okhttp$default = Companion.canonicalize$okhttp$default(companion2, str, i4, delimiterOffset2, " \"':;<=>@[]^`{}|/\?#", true, false, false, false, null, PsExtractor.VIDEO_STREAM_MASK, null); 
                            if (z2) { 
                                canonicalize$okhttp$default = Insets$$ExternalSyntheticOutline0.m327m(new StringBuilder(), this.encodedUsername, "%40", canonicalize$okhttp$default); 
                            } 
                            this.encodedUsername = canonicalize$okhttp$default; 
                            if (delimiterOffset2 != i3) { 
                                this.encodedPassword = Companion.canonicalize$okhttp$default(companion2, str, delimiterOffset2 + 1, i3, " \"':;<=>@[]^`{}|/\?#", true, false, false, false, null, PsExtractor.VIDEO_STREAM_MASK, null); 
                                z = true; 
                            } 
                            z2 = true; 
                            str3 = str4; 
                        } else { 
                            i2 = indexOfLastNonAsciiWhitespace$default; 
                            i3 = delimiterOffset; 
                            StringBuilder sb = new StringBuilder(); 
                            sb.append(this.encodedPassword); 
                            sb.append("%40"); 
                            str3 = str4; 
                            sb.append(Companion.canonicalize$okhttp$default(HttpUrl.Companion, str, i4, i3, " \"':;<=>@[]^`{}|/\?#", true, false, false, false, null, PsExtractor.VIDEO_STREAM_MASK, null)); 
                            this.encodedPassword = sb.toString(); 
                        } 
                        i4 = i3 + 1; 
                    } 
                    c3 = '#'; 
                    c2 = '?'; 
                    c = 65535; 
                    str4 = str3; 
                    indexOfLastNonAsciiWhitespace$default = i2; 
                } 
                i = indexOfLastNonAsciiWhitespace$default; 
                String str5 = str4; 
                Companion companion3 = Companion; 
                int portColonOffset = companion3.portColonOffset(input, i4, delimiterOffset); 
                int i5 = portColonOffset + 1; 
                if (i5 < delimiterOffset) { 
                    this.host = hostnames.toCanonicalHost(Companion.percentDecode$okhttp$default(HttpUrl.Companion, str, i4, portColonOffset, false, 4, null)); 
                    int parsePort = companion3.parsePort(input, i5, delimiterOffset); 
                    this.port = parsePort; 
                    if (!(parsePort != -1)) { 
                        StringBuilder m344m2 = Insets$$ExternalSyntheticOutline0.m344m("Invalid URL port: \""); 
                        String substring2 = input.substring(i5, delimiterOffset); 
                        Intrinsics.checkNotNullExpressionValue(substring2, str5); 
                        m344m2.append(substring2); 
                        m344m2.append(Typography.quote); 
                        throw new IllegalArgumentException(m344m2.toString().toString()); 
                    } 
                    str2 = str5; 
                } else { 
                    str2 = str5; 
                    Companion companion4 = HttpUrl.Companion; 
                    this.host = hostnames.toCanonicalHost(Companion.percentDecode$okhttp$default(companion4, str, i4, portColonOffset, false, 4, null)); 
                    String str6 = this.scheme; 
                    Intrinsics.checkNotNull(str6); 
                    this.port = companion4.defaultPort(str6); 
                } 
                if (!(this.host != null)) { 
                    StringBuilder m344m3 = Insets$$ExternalSyntheticOutline0.m344m("Invalid URL host: \""); 
                    String substring3 = input.substring(i4, portColonOffset); 
                    Intrinsics.checkNotNullExpressionValue(substring3, str2); 
                    m344m3.append(substring3); 
                    m344m3.append(Typography.quote); 
                    throw new IllegalArgumentException(m344m3.toString().toString()); 
                } 
                indexOfFirstNonAsciiWhitespace$default = delimiterOffset; 
            } 
            int i6 = i; 
            int delimiterOffset3 = Util.delimiterOffset(input, "?#", indexOfFirstNonAsciiWhitespace$default, i6); 
            resolvePath(input, indexOfFirstNonAsciiWhitespace$default, delimiterOffset3); 
            if (delimiterOffset3 < i6 && input.charAt(delimiterOffset3) == '?') { 
                int delimiterOffset4 = Util.delimiterOffset(input, '#', delimiterOffset3, i6); 
                Companion companion5 = HttpUrl.Companion; 
                this.encodedQueryNamesAndValues = companion5.toQueryNamesAndValues$okhttp(Companion.canonicalize$okhttp$default(companion5, str, delimiterOffset3 + 1, delimiterOffset4, HttpUrl.QUERY_ENCODE_SET, true, false, true, false, null, 208, null)); 
                delimiterOffset3 = delimiterOffset4; 
            } 
            if (delimiterOffset3 < i6 && input.charAt(delimiterOffset3) == '#') { 
                this.encodedFragment = Companion.canonicalize$okhttp$default(HttpUrl.Companion, str, delimiterOffset3 + 1, i6, "", true, false, false, true, null, 176, null); 
            } 
            return this; 
        } 
 
        @NotNull 
        public final Builder password(@NotNull String password) { 
            Intrinsics.checkNotNullParameter(password, "password"); 
            this.encodedPassword = Companion.canonicalize$okhttp$default(HttpUrl.Companion, password, 0, 0, " \"':;<=>@[]^`{}|/\?#", false, false, false, false, null, 251, null); 
            return this; 
        } 
 
        @NotNull 
        public final Builder port(int i) { 
            boolean z = true; 
            if ((1 > i || 65535 < i) ? false : false) { 
                this.port = i; 
                return this; 
            } 
            throw new IllegalArgumentException(Insets$$ExternalSyntheticOutline0.m343m("unexpected port: ", i).toString()); 
        } 
 
        @NotNull 
        public final Builder query(@Nullable String str) { 
            List<String> list; 
            if (str != null) { 
                Companion companion = HttpUrl.Companion; 
                String canonicalize$okhttp$default = Companion.canonicalize$okhttp$default(companion, str, 0, 0, HttpUrl.QUERY_ENCODE_SET, false, false, true, false, null, 219, null); 
                if (canonicalize$okhttp$default != null) { 
                    list = companion.toQueryNamesAndValues$okhttp(canonicalize$okhttp$default); 
                    this.encodedQueryNamesAndValues = list; 
                    return this; 
                } 
            } 
            list = null; 
            this.encodedQueryNamesAndValues = list; 
            return this; 
        } 
 
        @NotNull 
        public final Builder reencodeForUri$okhttp() { 
            String str = this.host; 
            this.host = str != null ? new Regex("[\"<>^`{|}]").replace(str, "") : null; 
            int size = this.encodedPathSegments.size(); 
            for (int i = 0; i < size; i++) { 
                List<String> list = this.encodedPathSegments; 
                list.set(i, Companion.canonicalize$okhttp$default(HttpUrl.Companion, list.get(i), 0, 0, HttpUrl.PATH_SEGMENT_ENCODE_SET_URI, true, true, false, false, null, 227, null)); 
            } 
            List<String> list2 = this.encodedQueryNamesAndValues; 
            if (list2 != null) { 
                int size2 = list2.size(); 
                for (int i2 = 0; i2 < size2; i2++) { 
                    String str2 = list2.get(i2); 
                    list2.set(i2, str2 != null ? Companion.canonicalize$okhttp$default(HttpUrl.Companion, str2, 0, 0, HttpUrl.QUERY_COMPONENT_ENCODE_SET_URI, true, true, true, false, null, 195, null) : null); 
                } 
            } 
            String str3 = this.encodedFragment; 
            this.encodedFragment = str3 != null ? Companion.canonicalize$okhttp$default(HttpUrl.Companion, str3, 0, 0, HttpUrl.FRAGMENT_ENCODE_SET_URI, true, true, false, true, null, 163, null) : null; 
            return this; 
        } 
 
        @NotNull 
        public final Builder removeAllEncodedQueryParameters(@NotNull String encodedName) { 
            Intrinsics.checkNotNullParameter(encodedName, "encodedName"); 
            if (this.encodedQueryNamesAndValues == null) { 
                return this; 
            } 
            removeAllCanonicalQueryParameters(Companion.canonicalize$okhttp$default(HttpUrl.Companion, encodedName, 0, 0, HttpUrl.QUERY_COMPONENT_REENCODE_SET, true, false, true, false, null, 211, null)); 
            return this; 
        } 
 
        @NotNull 
        public final Builder removeAllQueryParameters(@NotNull String name) { 
            Intrinsics.checkNotNullParameter(name, "name"); 
            if (this.encodedQueryNamesAndValues == null) { 
                return this; 
            } 
            removeAllCanonicalQueryParameters(Companion.canonicalize$okhttp$default(HttpUrl.Companion, name, 0, 0, HttpUrl.QUERY_COMPONENT_ENCODE_SET, false, false, true, false, null, 219, null)); 
            return this; 
        } 
 
        @NotNull 
        public final Builder removePathSegment(int i) { 
            this.encodedPathSegments.remove(i); 
            if (this.encodedPathSegments.isEmpty()) { 
                this.encodedPathSegments.add(""); 
            } 
            return this; 
        } 
 
        @NotNull 
        public final Builder scheme(@NotNull String scheme) { 
            boolean equals; 
            boolean equals2; 
            Intrinsics.checkNotNullParameter(scheme, "scheme"); 
            equals = StringsJVM.equals(scheme, "http", true); 
            if (equals) { 
                this.scheme = "http"; 
            } else { 
                equals2 = StringsJVM.equals(scheme, "https", true); 
                if (!equals2) { 
                    throw new IllegalArgumentException(Insets$$ExternalSyntheticOutline0.m336m("unexpected scheme: ", scheme)); 
                } 
                this.scheme = "https"; 
            } 
            return this; 
        } 
 
        public final void setEncodedFragment$okhttp(@Nullable String str) { 
            this.encodedFragment = str; 
        } 
 
        public final void setEncodedPassword$okhttp(@NotNull String str) { 
            Intrinsics.checkNotNullParameter(str, "<set-?>"); 
            this.encodedPassword = str; 
        } 
 
        @NotNull 
        public final Builder setEncodedPathSegment(int i, @NotNull String encodedPathSegment) { 
            Intrinsics.checkNotNullParameter(encodedPathSegment, "encodedPathSegment"); 
            String canonicalize$okhttp$default = Companion.canonicalize$okhttp$default(HttpUrl.Companion, encodedPathSegment, 0, 0, HttpUrl.PATH_SEGMENT_ENCODE_SET, true, false, false, false, null, 243, null); 
            this.encodedPathSegments.set(i, canonicalize$okhttp$default); 
            if ((isDot(canonicalize$okhttp$default) || isDotDot(canonicalize$okhttp$default)) ? false : true) { 
                return this; 
            } 
            throw new IllegalArgumentException(Insets$$ExternalSyntheticOutline0.m336m("unexpected path segment: ", encodedPathSegment).toString()); 
        } 
 
        public final void setEncodedQueryNamesAndValues$okhttp(@Nullable List<String> list) { 
            this.encodedQueryNamesAndValues = list; 
        } 
 
        @NotNull 
        public final Builder setEncodedQueryParameter(@NotNull String encodedName, @Nullable String str) { 
            Intrinsics.checkNotNullParameter(encodedName, "encodedName"); 
            removeAllEncodedQueryParameters(encodedName); 
            addEncodedQueryParameter(encodedName, str); 
            return this; 
        } 
 
        public final void setEncodedUsername$okhttp(@NotNull String str) { 
            Intrinsics.checkNotNullParameter(str, "<set-?>"); 
            this.encodedUsername = str; 
        } 
 
        public final void setHost$okhttp(@Nullable String str) { 
            this.host = str; 
        } 
 
        @NotNull 
        public final Builder setPathSegment(int i, @NotNull String pathSegment) { 
            Intrinsics.checkNotNullParameter(pathSegment, "pathSegment"); 
            String canonicalize$okhttp$default = Companion.canonicalize$okhttp$default(HttpUrl.Companion, pathSegment, 0, 0, HttpUrl.PATH_SEGMENT_ENCODE_SET, false, false, false, false, null, 251, null); 
            if ((isDot(canonicalize$okhttp$default) || isDotDot(canonicalize$okhttp$default)) ? false : true) { 
                this.encodedPathSegments.set(i, canonicalize$okhttp$default); 
                return this; 
            } 
            throw new IllegalArgumentException(Insets$$ExternalSyntheticOutline0.m336m("unexpected path segment: ", pathSegment).toString()); 
        } 
 
        public final void setPort$okhttp(int i) { 
            this.port = i; 
        } 
 
        @NotNull 
        public final Builder setQueryParameter(@NotNull String name, @Nullable String str) { 
            Intrinsics.checkNotNullParameter(name, "name"); 
            removeAllQueryParameters(name); 
            addQueryParameter(name, str); 
            return this; 
        } 
 
        public final void setScheme$okhttp(@Nullable String str) { 
            this.scheme = str; 
        } 
 
        /* JADX WARN: Code restructure failed: missing block: B:16:0x0033, code lost: 
            if ((r5.encodedPassword.length() > 0) != false) goto L38; 
         */ 
        /* JADX WARN: Code restructure failed: missing block: B:36:0x008e, code lost: 
            if (r1 != r3.defaultPort(r2)) goto L36; 
         */ 
        @org.jetbrains.annotations.NotNull 
        /* 
            Code decompiled incorrectly, please refer to instructions dump. 
            To view partially-correct code enable 'Show inconsistent code' option in preferences 
        */ 
        public java.lang.String toString() { 
            /* 
                r5 = this; 
                java.lang.StringBuilder r0 = new java.lang.StringBuilder 
                r0.<init>() 
                java.lang.String r1 = r5.scheme 
                if (r1 == 0) goto L12 
                r0.append(r1) 
                java.lang.String r1 = "://" 
                r0.append(r1) 
                goto L17 
            L12: 
                java.lang.String r1 = "//" 
                r0.append(r1) 
            L17: 
                java.lang.String r1 = r5.encodedUsername 
                int r1 = r1.length() 
                r2 = 0 
                r3 = 1 
                if (r1 <= 0) goto L23 
                r1 = 1 
                goto L24 
            L23: 
                r1 = 0 
            L24: 
                r4 = 58 
                if (r1 != 0) goto L35 
                java.lang.String r1 = r5.encodedPassword 
                int r1 = r1.length() 
                if (r1 <= 0) goto L32 
                r1 = 1 
                goto L33 
            L32: 
                r1 = 0 
            L33: 
                if (r1 == 0) goto L52 
            L35: 
                java.lang.String r1 = r5.encodedUsername 
                r0.append(r1) 
                java.lang.String r1 = r5.encodedPassword 
                int r1 = r1.length() 
                if (r1 <= 0) goto L43 
                r2 = 1 
            L43: 
                if (r2 == 0) goto L4d 
                r0.append(r4) 
                java.lang.String r1 = r5.encodedPassword 
                r0.append(r1) 
            L4d: 
                r1 = 64 
                r0.append(r1) 
            L52: 
                java.lang.String r1 = r5.host 
                if (r1 == 0) goto L74 
                kotlin.jvm.internal.Intrinsics.checkNotNull(r1) 
                boolean r1 = kotlin.text.StringsKt.contains$default(r1, r4) 
                if (r1 == 0) goto L6f 
                r1 = 91 
                r0.append(r1) 
                java.lang.String r1 = r5.host 
                r0.append(r1) 
                r1 = 93 
                r0.append(r1) 
                goto L74 
            L6f: 
                java.lang.String r1 = r5.host 
                r0.append(r1) 
            L74: 
                int r1 = r5.port 
                r2 = -1 
                if (r1 != r2) goto L7d 
                java.lang.String r1 = r5.scheme 
                if (r1 == 0) goto L96 
            L7d: 
                int r1 = r5.effectivePort() 
                java.lang.String r2 = r5.scheme 
                if (r2 == 0) goto L90 
                okhttp3.HttpUrl$Companion r3 = okhttp3.HttpUrl.Companion 
                kotlin.jvm.internal.Intrinsics.checkNotNull(r2) 
                int r2 = r3.defaultPort(r2) 
                if (r1 == r2) goto L96 
            L90: 
                r0.append(r4) 
                r0.append(r1) 
            L96: 
                okhttp3.HttpUrl$Companion r1 = okhttp3.HttpUrl.Companion 
                java.util.List<java.lang.String> r2 = r5.encodedPathSegments 
                r1.toPathString$okhttp(r2, r0) 
                java.util.List<java.lang.String> r2 = r5.encodedQueryNamesAndValues 
                if (r2 == 0) goto Lae 
                r2 = 63 
                r0.append(r2) 
                java.util.List<java.lang.String> r2 = r5.encodedQueryNamesAndValues 
                kotlin.jvm.internal.Intrinsics.checkNotNull(r2) 
                r1.toQueryString$okhttp(r2, r0) 
            Lae: 
                java.lang.String r1 = r5.encodedFragment 
                if (r1 == 0) goto Lbc 
                r1 = 35 
                r0.append(r1) 
                java.lang.String r1 = r5.encodedFragment 
                r0.append(r1) 
            Lbc: 
                java.lang.String r0 = r0.toString() 
                java.lang.String r1 = "StringBuilder().apply(builderAction).toString()" 
                kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r0, r1) 
                return r0 
            */ 
            throw new UnsupportedOperationException("Method not decompiled: okhttp3.HttpUrl.Builder.toString():java.lang.String"); 
        } 
 
        @NotNull 
        public final Builder username(@NotNull String username) { 
            Intrinsics.checkNotNullParameter(username, "username"); 
            this.encodedUsername = Companion.canonicalize$okhttp$default(HttpUrl.Companion, username, 0, 0, " \"':;<=>@[]^`{}|/\?#", false, false, false, false, null, 251, null); 
            return this; 
        } 
 
        private final Builder addPathSegments(String str, boolean z) { 
            int i = 0; 
            do { 
                int delimiterOffset = Util.delimiterOffset(str, "/\", i, str.length()); 
                push(str, i, delimiterOffset, delimiterOffset < str.length(), z); 
                i = delimiterOffset + 1; 
            } while (i <= str.length()); 
            return this; 
        } 
    } 
 
    /* compiled from: HttpUrl.kt */ 
    @Metadata(m63bv = {1, 0, 3}, m62d1 = {"p






	













 




!


20BJ020HJ020HJ020HJ020HJ020HJa0*020202 02!0\"2#0\"2$0\"2%0\"2
&0'H(J)0\"*02020HJ/*0*020202$0\"H+J,0*0HJ-0*0HJ-0*0HJ-0*0HJ#.0/*0002
102j`3H4J5
006*0H7J%80/*
0002
102j`3H9JV:0/*0;2<020202 02!0\"2#0\"2$0\"2%0\"2&0'HJ,=0/*0;2>020202$0\"HR0XT
R0XT
R0XT
R0X
R	0XT
R
0XT
R0XT
R0XT
R
0XT
R0XT
R0XT
R0XT
?"}, m61d2 = {"Lokhttp3/HttpUrl$Companion;", "", "()V", "FORM_ENCODE_SET", "", "FRAGMENT_ENCODE_SET", "FRAGMENT_ENCODE_SET_URI", "HEX_DIGITS", "", "PASSWORD_ENCODE_SET", "PATH_SEGMENT_ENCODE_SET", "PATH_SEGMENT_ENCODE_SET_URI", "QUERY_COMPONENT_ENCODE_SET", "QUERY_COMPONENT_ENCODE_SET_URI", "QUERY_COMPONENT_REENCODE_SET", "QUERY_ENCODE_SET", "USERNAME_ENCODE_SET", "defaultPort", "", "scheme", "get", "Lokhttp3/HttpUrl;", "uri", "Ljava/net/URI;", "-deprecated_get", ImagesContract.URL, "Ljava/net/URL;", "parse", "-deprecated_parse", "canonicalize", "pos", "limit", "encodeSet", "alreadyEncoded", "", "strict", "plusIsSpace", "unicodeAllowed", "charset", "Ljava/nio/charset/Charset;", "canonicalize$okhttp", "isPercentEncoded", "percentDecode", "percentDecode$okhttp", "toHttpUrl", "toHttpUrlOrNull", "toPathString", "", "", "out", "Ljava/lang/StringBuilder;", "Lkotlin/text/StringBuilder;", "toPathString$okhttp", "toQueryNamesAndValues", "", "toQueryNamesAndValues$okhttp", "toQueryString", "toQueryString$okhttp", "writeCanonicalized", "Lokio/Buffer;", "input", "writePercentDecoded", "encoded", "okhttp"}, m60k = 1, m59mv = {1, 4, 1}) 
    /* loaded from: classes2.dex */ 
    public static final class Companion { 
        private Companion() { 
        } 
 
        public static /* synthetic */ String canonicalize$okhttp$default(Companion companion, String str, int i, int i2, String str2, boolean z, boolean z2, boolean z3, boolean z4, Charset charset, int i3, Object obj) { 
            return companion.canonicalize$okhttp(str, (i3 & 1) != 0 ? 0 : i, (i3 & 2) != 0 ? str.length() : i2, str2, (i3 & 8) != 0 ? false : z, (i3 & 16) != 0 ? false : z2, (i3 & 32) != 0 ? false : z3, (i3 & 64) != 0 ? false : z4, (i3 & 128) != 0 ? null : charset); 
        } 
 
        private final boolean isPercentEncoded(String str, int i, int i2) { 
            int i3 = i + 2; 
            return i3 < i2 && str.charAt(i) == '%' && Util.parseHexDigit(str.charAt(i + 1)) != -1 && Util.parseHexDigit(str.charAt(i3)) != -1; 
        } 
 
        public static /* synthetic */ String percentDecode$okhttp$default(Companion companion, String str, int i, int i2, boolean z, int i3, Object obj) { 
            if ((i3 & 1) != 0) { 
                i = 0; 
            } 
            if ((i3 & 2) != 0) { 
                i2 = str.length(); 
            } 
            if ((i3 & 4) != 0) { 
                z = false; 
            } 
            return companion.percentDecode$okhttp(str, i, i2, z); 
        } 
 
        /* JADX WARN: Code restructure failed: missing block: B:40:0x0068, code lost: 
            if (isPercentEncoded(r15, r5, r17) == false) goto L43; 
         */ 
        /* 
            Code decompiled incorrectly, please refer to instructions dump. 
            To view partially-correct code enable 'Show inconsistent code' option in preferences 
        */ 
        private final void writeCanonicalized(okio.Buffer r14, java.lang.String r15, int r16, int r17, java.lang.String r18, boolean r19, boolean r20, boolean r21, boolean r22, java.nio.charset.Charset r23) { 
            /* 
                r13 = this; 
                r0 = r14 
                r1 = r15 
                r2 = r17 
                r3 = r18 
                r4 = r23 
                r5 = 0 
                r6 = r5 
                r5 = r16 
            Lc: 
                if (r5 >= r2) goto Lbe 
                java.lang.String r7 = "null cannot be cast to non-null type java.lang.String" 
                java.util.Objects.requireNonNull(r15, r7) 
                int r7 = r15.codePointAt(r5) 
                if (r19 == 0) goto L29 
                r8 = 9 
                if (r7 == r8) goto L45 
                r8 = 10 
                if (r7 == r8) goto L45 
                r8 = 12 
                if (r7 == r8) goto L45 
                r8 = 13 
                if (r7 == r8) goto L45 
            L29: 
                java.lang.String r8 = "+" 
                r9 = 32 
                if (r7 != r9) goto L37 
                java.lang.String r10 = " !\"#$&'()+,/:;<=>?@[\]^`{|}~" 
                if (r3 != r10) goto L37 
                r14.writeUtf8(r8) 
                goto L45 
            L37: 
                r10 = 43 
                if (r7 != r10) goto L48 
                if (r21 == 0) goto L48 
                if (r19 == 0) goto L40 
                goto L42 
            L40: 
                java.lang.String r8 = "%2B" 
            L42: 
                r14.writeUtf8(r8) 
            L45: 
                r9 = r13 
                goto Lb7 
            L48: 
                r8 = 37 
                if (r7 < r9) goto L70 
                r9 = 127(0x7f, float:1.78E-43) 
                if (r7 == r9) goto L70 
                r9 = 128(0x80, float:1.8E-43) 
                if (r7 < r9) goto L56 
                if (r22 == 0) goto L70 
            L56: 
                char r9 = (char) r7 
                boolean r9 = kotlin.text.StringsKt.contains$default(r3, r9) 
                if (r9 != 0) goto L70 
                if (r7 != r8) goto L6b 
                if (r19 == 0) goto L70 
                if (r20 == 0) goto L6b 
                r9 = r13 
                boolean r10 = r13.isPercentEncoded(r15, r5, r2) 
                if (r10 != 0) goto L6c 
                goto L71 
            L6b: 
                r9 = r13 
            L6c: 
                r14.writeUtf8CodePoint(r7) 
                goto Lb7 
            L70: 
                r9 = r13 
            L71: 
                if (r6 != 0) goto L78 
                okio.Buffer r6 = new okio.Buffer 
                r6.<init>() 
            L78: 
                if (r4 == 0) goto L8c 
                java.nio.charset.Charset r10 = java.nio.charset.StandardCharsets.UTF_8 
                boolean r10 = kotlin.jvm.internal.Intrinsics.areEqual(r4, r10) 
                if (r10 == 0) goto L83 
                goto L8c 
            L83: 
                int r10 = java.lang.Character.charCount(r7) 
                int r10 = r10 + r5 
                r6.writeString(r15, r5, r10, r4) 
                goto L8f 
            L8c: 
                r6.writeUtf8CodePoint(r7) 
            L8f: 
                boolean r10 = r6.exhausted() 
                if (r10 != 0) goto Lb7 
                byte r10 = r6.readByte() 
                r10 = r10 & 255(0xff, float:3.57E-43) 
                r14.writeByte(r8) 
                char[] r11 = okhttp3.HttpUrl.access$getHEX_DIGITS$cp() 
                int r12 = r10 >> 4 
                r12 = r12 & 15 
                char r11 = r11[r12] 
                r14.writeByte(r11) 
                char[] r11 = okhttp3.HttpUrl.access$getHEX_DIGITS$cp() 
                r10 = r10 & 15 
                char r10 = r11[r10] 
                r14.writeByte(r10) 
                goto L8f 
            Lb7: 
                int r7 = java.lang.Character.charCount(r7) 
                int r5 = r5 + r7 
                goto Lc 
            Lbe: 
                r9 = r13 
                return 
            */ 
            throw new UnsupportedOperationException("Method not decompiled: okhttp3.HttpUrl.Companion.writeCanonicalized(okio.Buffer, java.lang.String, int, int, java.lang.String, boolean, boolean, boolean, boolean, java.nio.charset.Charset):void"); 
        } 
 
        private final void writePercentDecoded(Buffer buffer, String str, int i, int i2, boolean z) { 
            int i3; 
            while (i < i2) { 
                Objects.requireNonNull(str, "null cannot be cast to non-null type java.lang.String"); 
                int codePointAt = str.codePointAt(i); 
                if (codePointAt == 37 && (i3 = i + 2) < i2) { 
                    int parseHexDigit = Util.parseHexDigit(str.charAt(i + 1)); 
                    int parseHexDigit2 = Util.parseHexDigit(str.charAt(i3)); 
                    if (parseHexDigit != -1 && parseHexDigit2 != -1) { 
                        buffer.writeByte((parseHexDigit << 4) + parseHexDigit2); 
                        i = Character.charCount(codePointAt) + i3; 
                    } 
                    buffer.writeUtf8CodePoint(codePointAt); 
                    i += Character.charCount(codePointAt); 
                } else { 
                    if (codePointAt == 43 && z) { 
                        buffer.writeByte(32); 
                        i++; 
                    } 
                    buffer.writeUtf8CodePoint(codePointAt); 
                    i += Character.charCount(codePointAt); 
                } 
            } 
        } 
 
        @Deprecated(level = DeprecationLevel.ERROR, message = "moved to extension function", replaceWith = @ReplaceWith(expression = "url.toHttpUrl()", imports = {"okhttp3.HttpUrl.Companion.toHttpUrl"})) 
        @JvmName(name = "-deprecated_get") 
        @NotNull 
        /* renamed from: -deprecated_get  reason: not valid java name */ 
        public final HttpUrl m2261deprecated_get(@NotNull String url) { 
            Intrinsics.checkNotNullParameter(url, "url"); 
            return get(url); 
        } 
 
        @Deprecated(level = DeprecationLevel.ERROR, message = "moved to extension function", replaceWith = @ReplaceWith(expression = "url.toHttpUrlOrNull()", imports = {"okhttp3.HttpUrl.Companion.toHttpUrlOrNull"})) 
        @JvmName(name = "-deprecated_parse") 
        @Nullable 
        /* renamed from: -deprecated_parse  reason: not valid java name */ 
        public final HttpUrl m2264deprecated_parse(@NotNull String url) { 
            Intrinsics.checkNotNullParameter(url, "url"); 
            return parse(url); 
        } 
 
        @NotNull 
        public final String canonicalize$okhttp(@NotNull String canonicalize, int i, int i2, @NotNull String encodeSet, boolean z, boolean z2, boolean z3, boolean z4, @Nullable Charset charset) { 
            boolean contains$default; 
            Intrinsics.checkNotNullParameter(canonicalize, "$this$canonicalize"); 
            Intrinsics.checkNotNullParameter(encodeSet, "encodeSet"); 
            int i3 = i; 
            while (i3 < i2) { 
                int codePointAt = canonicalize.codePointAt(i3); 
                if (codePointAt >= 32 && codePointAt != 127 && (codePointAt < 128 || z4)) { 
                    contains$default = StringsKt__StringsKt.contains$default(encodeSet, (char) codePointAt, false, 2, (Object) null); 
                    if (!contains$default) { 
                        if (codePointAt == 37) { 
                            if (z) { 
                                if (z2) { 
                                    if (!isPercentEncoded(canonicalize, i3, i2)) { 
                                        Buffer buffer = new Buffer(); 
                                        buffer.writeUtf8(canonicalize, i, i3); 
                                        writeCanonicalized(buffer, canonicalize, i3, i2, encodeSet, z, z2, z3, z4, charset); 
                                        return buffer.readUtf8(); 
                                    } 
                                    if (codePointAt == 43 || !z3) { 
                                        i3 += Character.charCount(codePointAt); 
                                    } else { 
                                        Buffer buffer2 = new Buffer(); 
                                        buffer2.writeUtf8(canonicalize, i, i3); 
                                        writeCanonicalized(buffer2, canonicalize, i3, i2, encodeSet, z, z2, z3, z4, charset); 
                                        return buffer2.readUtf8(); 
                                    } 
                                } 
                            } 
                        } 
                        if (codePointAt == 43) { 
                        } 
                        i3 += Character.charCount(codePointAt); 
                    } 
                } 
                Buffer buffer22 = new Buffer(); 
                buffer22.writeUtf8(canonicalize, i, i3); 
                writeCanonicalized(buffer22, canonicalize, i3, i2, encodeSet, z, z2, z3, z4, charset); 
                return buffer22.readUtf8(); 
            } 
            String substring = canonicalize.substring(i, i2); 
            Intrinsics.checkNotNullExpressionValue(substring, "(this as java.lang.Strining(startIndex, endIndex)"); 
            return substring; 
        } 
 
        @JvmStatic 
        public final int defaultPort(@NotNull String scheme) { 
            Intrinsics.checkNotNullParameter(scheme, "scheme"); 
            int hashCode = scheme.hashCode(); 
            if (hashCode != 3213448) { 
                if (hashCode == 99617003 && scheme.equals("https")) { 
                    return 443; 
                } 
            } else if (scheme.equals("http")) { 
                return 80; 
            } 
            return -1; 
        } 
 
        @JvmStatic 
        @JvmName(name = "get") 
        @NotNull 
        public final HttpUrl get(@NotNull String toHttpUrl) { 
            Intrinsics.checkNotNullParameter(toHttpUrl, "$this$toHttpUrl"); 
            return new Builder().parse$okhttp(null, toHttpUrl).build(); 
        } 
 
        @JvmStatic 
        @JvmName(name = "parse") 
        @Nullable 
        public final HttpUrl parse(@NotNull String toHttpUrlOrNull) { 
            Intrinsics.checkNotNullParameter(toHttpUrlOrNull, "$this$toHttpUrlOrNull"); 
            try { 
                return get(toHttpUrlOrNull); 
            } catch (IllegalArgumentException unused) { 
                return null; 
            } 
        } 
 
        @NotNull 
        public final String percentDecode$okhttp(@NotNull String percentDecode, int i, int i2, boolean z) { 
            Intrinsics.checkNotNullParameter(percentDecode, "$this$percentDecode"); 
            for (int i3 = i; i3 < i2; i3++) { 
                char charAt = percentDecode.charAt(i3); 
                if (charAt == '%' || (charAt == '+' && z)) { 
                    Buffer buffer = new Buffer(); 
                    buffer.writeUtf8(percentDecode, i, i3); 
                    writePercentDecoded(buffer, percentDecode, i3, i2, z); 
                    return buffer.readUtf8(); 
                } 
            } 
            String substring = percentDecode.substring(i, i2); 
            Intrinsics.checkNotNullExpressionValue(substring, "(this as java.lang.Strining(startIndex, endIndex)"); 
            return substring; 
        } 
 
        public final void toPathString$okhttp(@NotNull List<String> toPathString, @NotNull StringBuilder out) { 
            Intrinsics.checkNotNullParameter(toPathString, "$this$toPathString"); 
            Intrinsics.checkNotNullParameter(out, "out"); 
            int size = toPathString.size(); 
            for (int i = 0; i < size; i++) { 
                out.append('/'); 
                out.append(toPathString.get(i)); 
            } 
        } 
 
        @NotNull 
        public final List<String> toQueryNamesAndValues$okhttp(@NotNull String toQueryNamesAndValues) { 
            int indexOf$default; 
            int indexOf$default2; 
            Intrinsics.checkNotNullParameter(toQueryNamesAndValues, "$this$toQueryNamesAndValues"); 
            ArrayList arrayList = new ArrayList(); 
            int i = 0; 
            while (i <= toQueryNamesAndValues.length()) { 
                indexOf$default = StringsKt__StringsKt.indexOf$default(toQueryNamesAndValues, (char) Typography.amp, i, false, 4, (Object) null); 
                if (indexOf$default == -1) { 
                    indexOf$default = toQueryNamesAndValues.length(); 
                } 
                indexOf$default2 = StringsKt__StringsKt.indexOf$default((CharSequence) toQueryNamesAndValues, '=', i, false, 4, (Object) null); 
                if (indexOf$default2 != -1 && indexOf$default2 <= indexOf$default) { 
                    String substring = toQueryNamesAndValues.substring(i, indexOf$default2); 
                    Intrinsics.checkNotNullExpressionValue(substring, "(this as java.lang.Strining(startIndex, endIndex)"); 
                    arrayList.add(substring); 
                    String substring2 = toQueryNamesAndValues.substring(indexOf$default2 + 1, indexOf$default); 
                    Intrinsics.checkNotNullExpressionValue(substring2, "(this as java.lang.Strining(startIndex, endIndex)"); 
                    arrayList.add(substring2); 
                } else { 
                    String substring3 = toQueryNamesAndValues.substring(i, indexOf$default); 
                    Intrinsics.checkNotNullExpressionValue(substring3, "(this as java.lang.Strining(startIndex, endIndex)"); 
                    arrayList.add(substring3); 
                    arrayList.add(null); 
                } 
                i = indexOf$default + 1; 
            } 
            return arrayList; 
        } 
 
        public final void toQueryString$okhttp(@NotNull List<String> toQueryString, @NotNull StringBuilder out) { 
            Intrinsics.checkNotNullParameter(toQueryString, "$this$toQueryString"); 
            Intrinsics.checkNotNullParameter(out, "out"); 
            IntProgression step = RangesKt.step(RangesKt.until(0, toQueryString.size()), 2); 
            int first = step.getFirst(); 
            int last = step.getLast(); 
            int step2 = step.getStep(); 
            if (step2 >= 0) { 
                if (first > last) { 
                    return; 
                } 
            } else if (first < last) { 
                return; 
            } 
            while (true) { 
                String str = toQueryString.get(first); 
                String str2 = toQueryString.get(first + 1); 
                if (first > 0) { 
                    out.append(Typography.amp); 
                } 
                out.append(str); 
                if (str2 != null) { 
                    out.append('='); 
                    out.append(str2); 
                } 
                if (first == last) { 
                    return; 
                } 
                first += step2; 
            } 
        } 
 
        public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) { 
            this(); 
        } 
 
        @Deprecated(level = DeprecationLevel.ERROR, message = "moved to extension function", replaceWith = @ReplaceWith(expression = "url.toHttpUrlOrNull()", imports = {"okhttp3.HttpUrl.Companion.toHttpUrlOrNull"})) 
        @JvmName(name = "-deprecated_get") 
        @Nullable 
        /* renamed from: -deprecated_get  reason: not valid java name */ 
        public final HttpUrl m2263deprecated_get(@NotNull URL url) { 
            Intrinsics.checkNotNullParameter(url, "url"); 
            return get(url); 
        } 
 
        @JvmStatic 
        @JvmName(name = "get") 
        @Nullable 
        public final HttpUrl get(@NotNull URL toHttpUrlOrNull) { 
            Intrinsics.checkNotNullParameter(toHttpUrlOrNull, "$this$toHttpUrlOrNull"); 
            String url = toHttpUrlOrNull.toString(); 
            Intrinsics.checkNotNullExpressionValue(url, "toString()"); 
            return parse(url); 
        } 
 
        @Deprecated(level = DeprecationLevel.ERROR, message = "moved to extension function", replaceWith = @ReplaceWith(expression = "uri.toHttpUrlOrNull()", imports = {"okhttp3.HttpUrl.Companion.toHttpUrlOrNull"})) 
        @JvmName(name = "-deprecated_get") 
        @Nullable 
        /* renamed from: -deprecated_get  reason: not valid java name */ 
        public final HttpUrl m2262deprecated_get(@NotNull URI uri) { 
            Intrinsics.checkNotNullParameter(uri, "uri"); 
            return get(uri); 
        } 
 
        @JvmStatic 
        @JvmName(name = "get") 
        @Nullable 
        public final HttpUrl get(@NotNull URI toHttpUrlOrNull) { 
            Intrinsics.checkNotNullParameter(toHttpUrlOrNull, "$this$toHttpUrlOrNull"); 
            String uri = toHttpUrlOrNull.toString(); 
            Intrinsics.checkNotNullExpressionValue(uri, "toString()"); 
            return parse(uri); 
        } 
    } 
 
    public HttpUrl(@NotNull String scheme, @NotNull String username, @NotNull String password, @NotNull String host, int i, @NotNull List<String> pathSegments, @Nullable List<String> list, @Nullable String str, @NotNull String url) { 
        Intrinsics.checkNotNullParameter(scheme, "scheme"); 
        Intrinsics.checkNotNullParameter(username, "username"); 
        Intrinsics.checkNotNullParameter(password, "password"); 
        Intrinsics.checkNotNullParameter(host, "host"); 
        Intrinsics.checkNotNullParameter(pathSegments, "pathSegments"); 
        Intrinsics.checkNotNullParameter(url, "url"); 
        this.scheme = scheme; 
        this.username = username; 
        this.password = password; 
        this.host = host; 
        this.port = i; 
        this.pathSegments = pathSegments; 
        this.queryNamesAndValues = list; 
        this.fragment = str; 
        this.url = url; 
        this.isHttps = Intrinsics.areEqual(scheme, "https"); 
    } 
 
    @JvmStatic 
    public static final int defaultPort(@NotNull String str) { 
        return Companion.defaultPort(str); 
    } 
 
    @JvmStatic 
    @JvmName(name = "get") 
    @NotNull 
    public static final HttpUrl get(@NotNull String str) { 
        return Companion.get(str); 
    } 
 
    @JvmStatic 
    @JvmName(name = "get") 
    @Nullable 
    public static final HttpUrl get(@NotNull URI uri) { 
        return Companion.get(uri); 
    } 
 
    @JvmStatic 
    @JvmName(name = "get") 
    @Nullable 
    public static final HttpUrl get(@NotNull URL url) { 
        return Companion.get(url); 
    } 
 
    @JvmStatic 
    @JvmName(name = "parse") 
    @Nullable 
    public static final HttpUrl parse(@NotNull String str) { 
        return Companion.parse(str); 
    } 
 
    @Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "encodedFragment", imports = {})) 
    @JvmName(name = "-deprecated_encodedFragment") 
    @Nullable 
    /* renamed from: -deprecated_encodedFragment  reason: not valid java name */ 
    public final String m2242deprecated_encodedFragment() { 
        return encodedFragment(); 
    } 
 
    @Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "encodedPassword", imports = {})) 
    @JvmName(name = "-deprecated_encodedPassword") 
    @NotNull 
    /* renamed from: -deprecated_encodedPassword  reason: not valid java name */ 
    public final String m2243deprecated_encodedPassword() { 
        return encodedPassword(); 
    } 
 
    @Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "encodedPath", imports = {})) 
    @JvmName(name = "-deprecated_encodedPath") 
    @NotNull 
    /* renamed from: -deprecated_encodedPath  reason: not valid java name */ 
    public final String m2244deprecated_encodedPath() { 
        return encodedPath(); 
    } 
 
    @Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "encodedPathSegments", imports = {})) 
    @JvmName(name = "-deprecated_encodedPathSegments") 
    @NotNull 
    /* renamed from: -deprecated_encodedPathSegments  reason: not valid java name */ 
    public final List<String> m2245deprecated_encodedPathSegments() { 
        return encodedPathSegments(); 
    } 
 
    @Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "encodedQuery", imports = {})) 
    @JvmName(name = "-deprecated_encodedQuery") 
    @Nullable 
    /* renamed from: -deprecated_encodedQuery  reason: not valid java name */ 
    public final String m2246deprecated_encodedQuery() { 
        return encodedQuery(); 
    } 
 
    @Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "encodedUsername", imports = {})) 
    @JvmName(name = "-deprecated_encodedUsername") 
    @NotNull 
    /* renamed from: -deprecated_encodedUsername  reason: not valid java name */ 
    public final String m2247deprecated_encodedUsername() { 
        return encodedUsername(); 
    } 
 
    @Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "fragment", imports = {})) 
    @JvmName(name = "-deprecated_fragment") 
    @Nullable 
    /* renamed from: -deprecated_fragment  reason: not valid java name */ 
    public final String m2248deprecated_fragment() { 
        return this.fragment; 
    } 
 
    @Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "host", imports = {})) 
    @JvmName(name = "-deprecated_host") 
    @NotNull 
    /* renamed from: -deprecated_host  reason: not valid java name */ 
    public final String m2249deprecated_host() { 
        return this.host; 
    } 
 
    @Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "password", imports = {})) 
    @JvmName(name = "-deprecated_password") 
    @NotNull 
    /* renamed from: -deprecated_password  reason: not valid java name */ 
    public final String m2250deprecated_password() { 
        return this.password; 
    } 
 
    @Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "pathSegments", imports = {})) 
    @JvmName(name = "-deprecated_pathSegments") 
    @NotNull 
    /* renamed from: -deprecated_pathSegments  reason: not valid java name */ 
    public final List<String> m2251deprecated_pathSegments() { 
        return this.pathSegments; 
    } 
 
    @Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "pathSize", imports = {})) 
    @JvmName(name = "-deprecated_pathSize") 
    /* renamed from: -deprecated_pathSize  reason: not valid java name */ 
    public final int m2252deprecated_pathSize() { 
        return pathSize(); 
    } 
 
    @Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "port", imports = {})) 
    @JvmName(name = "-deprecated_port") 
    /* renamed from: -deprecated_port  reason: not valid java name */ 
    public final int m2253deprecated_port() { 
        return this.port; 
    } 
 
    @Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = SearchIntents.EXTRA_QUERY, imports = {})) 
    @JvmName(name = "-deprecated_query") 
    @Nullable 
    /* renamed from: -deprecated_query  reason: not valid java name */ 
    public final String m2254deprecated_query() { 
        return query(); 
    } 
 
    @Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "queryParameterNames", imports = {})) 
    @JvmName(name = "-deprecated_queryParameterNames") 
    @NotNull 
    /* renamed from: -deprecated_queryParameterNames  reason: not valid java name */ 
    public final Set<String> m2255deprecated_queryParameterNames() { 
        return queryParameterNames(); 
    } 
 
    @Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "querySize", imports = {})) 
    @JvmName(name = "-deprecated_querySize") 
    /* renamed from: -deprecated_querySize  reason: not valid java name */ 
    public final int m2256deprecated_querySize() { 
        return querySize(); 
    } 
 
    @Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "scheme", imports = {})) 
    @JvmName(name = "-deprecated_scheme") 
    @NotNull 
    /* renamed from: -deprecated_scheme  reason: not valid java name */ 
    public final String m2257deprecated_scheme() { 
        return this.scheme; 
    } 
 
    @Deprecated(level = DeprecationLevel.ERROR, message = "moved to toUri()", replaceWith = @ReplaceWith(expression = "toUri()", imports = {})) 
    @JvmName(name = "-deprecated_uri") 
    @NotNull 
    /* renamed from: -deprecated_uri  reason: not valid java name */ 
    public final URI m2258deprecated_uri() { 
        return uri(); 
    } 
 
    @Deprecated(level = DeprecationLevel.ERROR, message = "moved to toUrl()", replaceWith = @ReplaceWith(expression = "toUrl()", imports = {})) 
    @JvmName(name = "-deprecated_url") 
    @NotNull 
    /* renamed from: -deprecated_url  reason: not valid java name */ 
    public final URL m2259deprecated_url() { 
        return url(); 
    } 
 
    @Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "username", imports = {})) 
    @JvmName(name = "-deprecated_username") 
    @NotNull 
    /* renamed from: -deprecated_username  reason: not valid java name */ 
    public final String m2260deprecated_username() { 
        return this.username; 
    } 
 
    @JvmName(name = "encodedFragment") 
    @Nullable 
    public final String encodedFragment() { 
        int indexOf$default; 
        if (this.fragment == null) { 
            return null; 
        } 
        indexOf$default = StringsKt__StringsKt.indexOf$default((CharSequence) this.url, '#', 0, false, 6, (Object) null); 
        String str = this.url; 
        Objects.requireNonNull(str, "null cannot be cast to non-null type java.lang.String"); 
        String substring = str.substring(indexOf$default + 1); 
        Intrinsics.checkNotNullExpressionValue(substring, "(this as java.lang.String).substring(startIndex)"); 
        return substring; 
    } 
 
    @JvmName(name = "encodedPassword") 
    @NotNull 
    public final String encodedPassword() { 
        int indexOf$default; 
        int indexOf$default2; 
        if (this.password.length() == 0) { 
            return ""; 
        } 
        indexOf$default = StringsKt__StringsKt.indexOf$default((CharSequence) this.url, ':', this.scheme.length() + 3, false, 4, (Object) null); 
        indexOf$default2 = StringsKt__StringsKt.indexOf$default((CharSequence) this.url, '@', 0, false, 6, (Object) null); 
        String str = this.url; 
        Objects.requireNonNull(str, "null cannot be cast to non-null type java.lang.String"); 
        String substring = str.substring(indexOf$default + 1, indexOf$default2); 
        Intrinsics.checkNotNullExpressionValue(substring, "(this as java.lang.Strining(startIndex, endIndex)"); 
        return substring; 
    } 
 
    @JvmName(name = "encodedPath") 
    @NotNull 
    public final String encodedPath() { 
        int indexOf$default; 
        indexOf$default = StringsKt__StringsKt.indexOf$default((CharSequence) this.url, '/', this.scheme.length() + 3, false, 4, (Object) null); 
        String str = this.url; 
        int delimiterOffset = Util.delimiterOffset(str, "?#", indexOf$default, str.length()); 
        String str2 = this.url; 
        Objects.requireNonNull(str2, "null cannot be cast to non-null type java.lang.String"); 
        String substring = str2.substring(indexOf$default, delimiterOffset); 
        Intrinsics.checkNotNullExpressionValue(substring, "(this as java.lang.Strining(startIndex, endIndex)"); 
        return substring; 
    } 
 
    @JvmName(name = "encodedPathSegments") 
    @NotNull 
    public final List<String> encodedPathSegments() { 
        int indexOf$default; 
        indexOf$default = StringsKt__StringsKt.indexOf$default((CharSequence) this.url, '/', this.scheme.length() + 3, false, 4, (Object) null); 
        String str = this.url; 
        int delimiterOffset = Util.delimiterOffset(str, "?#", indexOf$default, str.length()); 
        ArrayList arrayList = new ArrayList(); 
        while (indexOf$default < delimiterOffset) { 
            int i = indexOf$default + 1; 
            int delimiterOffset2 = Util.delimiterOffset(this.url, '/', i, delimiterOffset); 
            String str2 = this.url; 
            Objects.requireNonNull(str2, "null cannot be cast to non-null type java.lang.String"); 
            String substring = str2.substring(i, delimiterOffset2); 
            Intrinsics.checkNotNullExpressionValue(substring, "(this as java.lang.Strining(startIndex, endIndex)"); 
            arrayList.add(substring); 
            indexOf$default = delimiterOffset2; 
        } 
        return arrayList; 
    } 
 
    @JvmName(name = "encodedQuery") 
    @Nullable 
    public final String encodedQuery() { 
        int indexOf$default; 
        if (this.queryNamesAndValues == null) { 
            return null; 
        } 
        indexOf$default = StringsKt__StringsKt.indexOf$default((CharSequence) this.url, '?', 0, false, 6, (Object) null); 
        int i = indexOf$default + 1; 
        String str = this.url; 
        int delimiterOffset = Util.delimiterOffset(str, '#', i, str.length()); 
        String str2 = this.url; 
        Objects.requireNonNull(str2, "null cannot be cast to non-null type java.lang.String"); 
        String substring = str2.substring(i, delimiterOffset); 
        Intrinsics.checkNotNullExpressionValue(substring, "(this as java.lang.Strining(startIndex, endIndex)"); 
        return substring; 
    } 
 
    @JvmName(name = "encodedUsername") 
    @NotNull 
    public final String encodedUsername() { 
        if (this.username.length() == 0) { 
            return ""; 
        } 
        int length = this.scheme.length() + 3; 
        String str = this.url; 
        int delimiterOffset = Util.delimiterOffset(str, ":@", length, str.length()); 
        String str2 = this.url; 
        Objects.requireNonNull(str2, "null cannot be cast to non-null type java.lang.String"); 
        String substring = str2.substring(length, delimiterOffset); 
        Intrinsics.checkNotNullExpressionValue(substring, "(this as java.lang.Strining(startIndex, endIndex)"); 
        return substring; 
    } 
 
    public boolean equals(@Nullable Object obj) { 
        return (obj instanceof HttpUrl) && Intrinsics.areEqual(((HttpUrl) obj).url, this.url); 
    } 
 
    @JvmName(name = "fragment") 
    @Nullable 
    public final String fragment() { 
        return this.fragment; 
    } 
 
    public int hashCode() { 
        return this.url.hashCode(); 
    } 
 
    @JvmName(name = "host") 
    @NotNull 
    public final String host() { 
        return this.host; 
    } 
 
    public final boolean isHttps() { 
        return this.isHttps; 
    } 
 
    @NotNull 
    public final Builder newBuilder() { 
        Builder builder = new Builder(); 
        builder.setScheme$okhttp(this.scheme); 
        builder.setEncodedUsername$okhttp(encodedUsername()); 
        builder.setEncodedPassword$okhttp(encodedPassword()); 
        builder.setHost$okhttp(this.host); 
        builder.setPort$okhttp(this.port != Companion.defaultPort(this.scheme) ? this.port : -1); 
        builder.getEncodedPathSegments$okhttp().clear(); 
        builder.getEncodedPathSegments$okhttp().addAll(encodedPathSegments()); 
        builder.encodedQuery(encodedQuery()); 
        builder.setEncodedFragment$okhttp(encodedFragment()); 
        return builder; 
    } 
 
    @JvmName(name = "password") 
    @NotNull 
    public final String password() { 
        return this.password; 
    } 
 
    @JvmName(name = "pathSegments") 
    @NotNull 
    public final List<String> pathSegments() { 
        return this.pathSegments; 
    } 
 
    @JvmName(name = "pathSize") 
    public final int pathSize() { 
        return this.pathSegments.size(); 
    } 
 
    @JvmName(name = "port") 
    public final int port() { 
        return this.port; 
    } 
 
    @JvmName(name = SearchIntents.EXTRA_QUERY) 
    @Nullable 
    public final String query() { 
        if (this.queryNamesAndValues == null) { 
            return null; 
        } 
        StringBuilder sb = new StringBuilder(); 
        Companion.toQueryString$okhttp(this.queryNamesAndValues, sb); 
        return sb.toString(); 
    } 
 
    @Nullable 
    public final String queryParameter(@NotNull String name) { 
        Intrinsics.checkNotNullParameter(name, "name"); 
        List<String> list = this.queryNamesAndValues; 
        if (list == null) { 
            return null; 
        } 
        IntProgression step = RangesKt.step(RangesKt.until(0, list.size()), 2); 
        int first = step.getFirst(); 
        int last = step.getLast(); 
        int step2 = step.getStep(); 
        if (step2 < 0 ? first >= last : first <= last) { 
            while (!Intrinsics.areEqual(name, this.queryNamesAndValues.get(first))) { 
                if (first != last) { 
                    first += step2; 
                } 
            } 
            return this.queryNamesAndValues.get(first + 1); 
        } 
        return null; 
    } 
 
    @NotNull 
    public final String queryParameterName(int i) { 
        List<String> list = this.queryNamesAndValues; 
        if (list != null) { 
            String str = list.get(i * 2); 
            Intrinsics.checkNotNull(str); 
            return str; 
        } 
        throw new IndexOutOfBoundsException(); 
    } 
 
    @JvmName(name = "queryParameterNames") 
    @NotNull 
    public final Set<String> queryParameterNames() { 
        if (this.queryNamesAndValues == null) { 
            return SetsKt.emptySet(); 
        } 
        LinkedHashSet linkedHashSet = new LinkedHashSet(); 
        IntProgression step = RangesKt.step(RangesKt.until(0, this.queryNamesAndValues.size()), 2); 
        int first = step.getFirst(); 
        int last = step.getLast(); 
        int step2 = step.getStep(); 
        if (step2 < 0 ? first >= last : first <= last) { 
            while (true) { 
                String str = this.queryNamesAndValues.get(first); 
                Intrinsics.checkNotNull(str); 
                linkedHashSet.add(str); 
                if (first == last) { 
                    break; 
                } 
                first += step2; 
            } 
        } 
        Set<String> unmodifiableSet = Collections.unmodifiableSet(linkedHashSet); 
        Intrinsics.checkNotNullExpressionValue(unmodifiableSet, "Collections.unmodifiableSet(result)"); 
        return unmodifiableSet; 
    } 
 
    @Nullable 
    public final String queryParameterValue(int i) { 
        List<String> list = this.queryNamesAndValues; 
        if (list != null) { 
            return list.get((i * 2) + 1); 
        } 
        throw new IndexOutOfBoundsException(); 
    } 
 
    @NotNull 
    public final List<String> queryParameterValues(@NotNull String name) { 
        Intrinsics.checkNotNullParameter(name, "name"); 
        if (this.queryNamesAndValues == null) { 
            return CollectionsKt.emptyList(); 
        } 
        ArrayList arrayList = new ArrayList(); 
        IntProgression step = RangesKt.step(RangesKt.until(0, this.queryNamesAndValues.size()), 2); 
        int first = step.getFirst(); 
        int last = step.getLast(); 
        int step2 = step.getStep(); 
        if (step2 < 0 ? first >= last : first <= last) { 
            while (true) { 
                if (Intrinsics.areEqual(name, this.queryNamesAndValues.get(first))) { 
                    arrayList.add(this.queryNamesAndValues.get(first + 1)); 
                } 
                if (first == last) { 
                    break; 
                } 
                first += step2; 
            } 
        } 
        List<String> unmodifiableList = Collections.unmodifiableList(arrayList); 
        Intrinsics.checkNotNullExpressionValue(unmodifiableList, "Collections.unmodifiableList(result)"); 
        return unmodifiableList; 
    } 
 
    @JvmName(name = "querySize") 
    public final int querySize() { 
        List<String> list = this.queryNamesAndValues; 
        if (list != null) { 
            return list.size() / 2; 
        } 
        return 0; 
    } 
 
    @NotNull 
    public final String redact() { 
        Builder newBuilder = newBuilder("/..."); 
        Intrinsics.checkNotNull(newBuilder); 
        return newBuilder.username("").password("").build().toString(); 
    } 
 
    @Nullable 
    public final HttpUrl resolve(@NotNull String link) { 
        Intrinsics.checkNotNullParameter(link, "link"); 
        Builder newBuilder = newBuilder(link); 
        if (newBuilder != null) { 
            return newBuilder.build(); 
        } 
        return null; 
    } 
 
    @JvmName(name = "scheme") 
    @NotNull 
    public final String scheme() { 
        return this.scheme; 
    } 
 
    @NotNull 
    public String toString() { 
        return this.url; 
    } 
 
    @Nullable 
    public final String topPrivateDomain() { 
        if (Util.canParseAsIpAddress(this.host)) { 
            return null; 
        } 
        return PublicSuffixDatabase.Companion.get().getEffectiveTldPlusOne(this.host); 
    } 
 
    @JvmName(name = "uri") 
    @NotNull 
    public final URI uri() { 
        String builder = newBuilder().reencodeForUri$okhttp().toString(); 
        try { 
            return new URI(builder); 
        } catch (URISyntaxException e) { 
            try { 
                URI create = URI.create(new Regex("[\u0000-\u001F\u007F-\u009F\p{javaWhitespace}]").replace(builder, "")); 
                Intrinsics.checkNotNullExpressionValue(create, "try {
        val strippe) // Unexpected!
      }"); 
                return create; 
            } catch (Exception unused) { 
                throw new RuntimeException(e); 
            } 
        } 
    } 
 
    @JvmName(name = ImagesContract.URL) 
    @NotNull 
    public final URL url() { 
        try { 
            return new URL(this.url); 
        } catch (MalformedURLException e) { 
            throw new RuntimeException(e); 
        } 
    } 
 
    @JvmName(name = "username") 
    @NotNull 
    public final String username() { 
        return this.username; 
    } 
 
    @Nullable 
    public final Builder newBuilder(@NotNull String link) { 
        Intrinsics.checkNotNullParameter(link, "link"); 
        try { 
            return new Builder().parse$okhttp(this, link); 
        } catch (IllegalArgumentException unused) { 
            return null; 
        } 
    } 
}

Did this file decode correctly?

Original Code

package okhttp3;

import androidx.core.graphics.Insets$$ExternalSyntheticOutline0;
import com.google.android.exoplayer2.extractor.p005ts.PsExtractor;
import com.google.android.gms.actions.SearchIntents;
import com.google.android.gms.common.internal.ImagesContract;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Objects;
import java.util.Set;
import kotlin.Deprecated;
import kotlin.DeprecationLevel;
import kotlin.Metadata;
import kotlin.ReplaceWith;
import kotlin.collections.CollectionsKt;
import kotlin.collections.SetsKt;
import kotlin.jvm.JvmName;
import kotlin.jvm.JvmStatic;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.ranges.IntProgression;
import kotlin.ranges.RangesKt;
import kotlin.text.Regex;
import kotlin.text.StringsJVM;
import kotlin.text.StringsKt;
import kotlin.text.StringsKt__StringsKt;
import kotlin.text.Typography;
import okhttp3.internal.Util;
import okhttp3.internal.hostnames;
import okhttp3.internal.publicsuffix.PublicSuffixDatabase;
import okio.Buffer;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

/* compiled from: HttpUrl.kt */
@Metadata(m63bv = {1, 0, 3}, m62d1 = {"\u0000H\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0004\n\u0002\u0010\b\n\u0000\n\u0002\u0010 \n\u0002\b\r\n\u0002\u0010\u000b\n\u0002\b\u0005\n\u0002\u0010\"\n\u0002\b\u000e\n\u0002\u0018\u0002\n\u0002\b\u0013\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0007\u0018\u0000 J2\u00020\u0001:\u0002IJBa\b\u0000\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0003\u0012\u0006\u0010\u0005\u001a\u00020\u0003\u0012\u0006\u0010\u0006\u001a\u00020\u0003\u0012\u0006\u0010\u0007\u001a\u00020\b\u0012\f\u0010\t\u001a\b\u0012\u0004\u0012\u00020\u00030\n\u0012\u0010\u0010\u000b\u001a\f\u0012\u0006\u0012\u0004\u0018\u00010\u0003\u0018\u00010\n\u0012\b\u0010\f\u001a\u0004\u0018\u00010\u0003\u0012\u0006\u0010\r\u001a\u00020\u0003\u0006\u0002\u0010\u000eJ\u000f\u0010\u000f\u001a\u0004\u0018\u00010\u0003H\u0007\u0006\u0002\b!J\r\u0010\u0011\u001a\u00020\u0003H\u0007\u0006\u0002\b\"J\r\u0010\u0012\u001a\u00020\u0003H\u0007\u0006\u0002\b#J\u0013\u0010\u0013\u001a\b\u0012\u0004\u0012\u00020\u00030\nH\u0007\u0006\u0002\b$J\u000f\u0010\u0015\u001a\u0004\u0018\u00010\u0003H\u0007\u0006\u0002\b%J\r\u0010\u0016\u001a\u00020\u0003H\u0007\u0006\u0002\b&J\u0013\u0010'\u001a\u00020\u00182\b\u0010(\u001a\u0004\u0018\u00010\u0001H\u0096\u0002J\u000f\u0010\f\u001a\u0004\u0018\u00010\u0003H\u0007\u0006\u0002\b)J\b\u0010*\u001a\u00020\bH\u0016J\r\u0010\u0006\u001a\u00020\u0003H\u0007\u0006\u0002\b+J\u0006\u0010,\u001a\u00020-J\u0010\u0010,\u001a\u0004\u0018\u00010-2\u0006\u0010.\u001a\u00020\u0003J\r\u0010\u0005\u001a\u00020\u0003H\u0007\u0006\u0002\b/J\u0013\u0010\t\u001a\b\u0012\u0004\u0012\u00020\u00030\nH\u0007\u0006\u0002\b0J\r\u0010\u001a\u001a\u00020\bH\u0007\u0006\u0002\b1J\r\u0010\u0007\u001a\u00020\bH\u0007\u0006\u0002\b2J\u000f\u0010\u001c\u001a\u0004\u0018\u00010\u0003H\u0007\u0006\u0002\b3J\u0010\u00104\u001a\u0004\u0018\u00010\u00032\u0006\u00105\u001a\u00020\u0003J\u000e\u00106\u001a\u00020\u00032\u0006\u00107\u001a\u00020\bJ\u0013\u0010\u001d\u001a\b\u0012\u0004\u0012\u00020\u00030\u001eH\u0007\u0006\u0002\b8J\u0010\u00109\u001a\u0004\u0018\u00010\u00032\u0006\u00107\u001a\u00020\bJ\u0016\u0010:\u001a\n\u0012\u0006\u0012\u0004\u0018\u00010\u00030\n2\u0006\u00105\u001a\u00020\u0003J\r\u0010 \u001a\u00020\bH\u0007\u0006\u0002\b;J\u0006\u0010<\u001a\u00020\u0003J\u0010\u0010=\u001a\u0004\u0018\u00010\u00002\u0006\u0010.\u001a\u00020\u0003J\r\u0010\u0002\u001a\u00020\u0003H\u0007\u0006\u0002\b>J\b\u0010?\u001a\u00020\u0003H\u0016J\r\u0010@\u001a\u00020AH\u0007\u0006\u0002\bBJ\r\u0010C\u001a\u00020DH\u0007\u0006\u0002\b\rJ\b\u0010E\u001a\u0004\u0018\u00010\u0003J\r\u0010B\u001a\u00020AH\u0007\u0006\u0002\bFJ\r\u0010\r\u001a\u00020DH\u0007\u0006\u0002\bGJ\r\u0010\u0004\u001a\u00020\u0003H\u0007\u0006\u0002\bHR\u0013\u0010\u000f\u001a\u0004\u0018\u00010\u00038G\u0006\u0006\u001a\u0004\b\u000f\u0010\u0010R\u0011\u0010\u0011\u001a\u00020\u00038G\u0006\u0006\u001a\u0004\b\u0011\u0010\u0010R\u0011\u0010\u0012\u001a\u00020\u00038G\u0006\u0006\u001a\u0004\b\u0012\u0010\u0010R\u0017\u0010\u0013\u001a\b\u0012\u0004\u0012\u00020\u00030\n8G\u0006\u0006\u001a\u0004\b\u0013\u0010\u0014R\u0013\u0010\u0015\u001a\u0004\u0018\u00010\u00038G\u0006\u0006\u001a\u0004\b\u0015\u0010\u0010R\u0011\u0010\u0016\u001a\u00020\u00038G\u0006\u0006\u001a\u0004\b\u0016\u0010\u0010R\u0015\u0010\f\u001a\u0004\u0018\u00010\u00038\u0007\u0006\b\n\u0000\u001a\u0004\b\f\u0010\u0010R\u0013\u0010\u0006\u001a\u00020\u00038\u0007\u0006\b\n\u0000\u001a\u0004\b\u0006\u0010\u0010R\u0011\u0010\u0017\u001a\u00020\u0018\u0006\b\n\u0000\u001a\u0004\b\u0017\u0010\u0019R\u0013\u0010\u0005\u001a\u00020\u00038\u0007\u0006\b\n\u0000\u001a\u0004\b\u0005\u0010\u0010R\u0019\u0010\t\u001a\b\u0012\u0004\u0012\u00020\u00030\n8\u0007\u0006\b\n\u0000\u001a\u0004\b\t\u0010\u0014R\u0011\u0010\u001a\u001a\u00020\b8G\u0006\u0006\u001a\u0004\b\u001a\u0010\u001bR\u0013\u0010\u0007\u001a\u00020\b8\u0007\u0006\b\n\u0000\u001a\u0004\b\u0007\u0010\u001bR\u0013\u0010\u001c\u001a\u0004\u0018\u00010\u00038G\u0006\u0006\u001a\u0004\b\u001c\u0010\u0010R\u0018\u0010\u000b\u001a\f\u0012\u0006\u0012\u0004\u0018\u00010\u0003\u0018\u00010\nX\u0082\u0004\u0006\u0002\n\u0000R\u0017\u0010\u001d\u001a\b\u0012\u0004\u0012\u00020\u00030\u001e8G\u0006\u0006\u001a\u0004\b\u001d\u0010\u001fR\u0011\u0010 \u001a\u00020\b8G\u0006\u0006\u001a\u0004\b \u0010\u001bR\u0013\u0010\u0002\u001a\u00020\u00038\u0007\u0006\b\n\u0000\u001a\u0004\b\u0002\u0010\u0010R\u000e\u0010\r\u001a\u00020\u0003X\u0082\u0004\u0006\u0002\n\u0000R\u0013\u0010\u0004\u001a\u00020\u00038\u0007\u0006\b\n\u0000\u001a\u0004\b\u0004\u0010\u0010\u0006K"}, m61d2 = {"Lokhttp3/HttpUrl;", "", "scheme", "", "username", "password", "host", "port", "", "pathSegments", "", "queryNamesAndValues", "fragment", ImagesContract.URL, "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/util/List;Ljava/util/List;Ljava/lang/String;Ljava/lang/String;)V", "encodedFragment", "()Ljava/lang/String;", "encodedPassword", "encodedPath", "encodedPathSegments", "()Ljava/util/List;", "encodedQuery", "encodedUsername", "isHttps", "", "()Z", "pathSize", "()I", SearchIntents.EXTRA_QUERY, "queryParameterNames", "", "()Ljava/util/Set;", "querySize", "-deprecated_encodedFragment", "-deprecated_encodedPassword", "-deprecated_encodedPath", "-deprecated_encodedPathSegments", "-deprecated_encodedQuery", "-deprecated_encodedUsername", "equals", "other", "-deprecated_fragment", "hashCode", "-deprecated_host", "newBuilder", "Lokhttp3/HttpUrl$Builder;", "link", "-deprecated_password", "-deprecated_pathSegments", "-deprecated_pathSize", "-deprecated_port", "-deprecated_query", "queryParameter", "name", "queryParameterName", "index", "-deprecated_queryParameterNames", "queryParameterValue", "queryParameterValues", "-deprecated_querySize", "redact", "resolve", "-deprecated_scheme", "toString", "toUri", "Ljava/net/URI;", "uri", "toUrl", "Ljava/net/URL;", "topPrivateDomain", "-deprecated_uri", "-deprecated_url", "-deprecated_username", "Builder", "Companion", "okhttp"}, m60k = 1, m59mv = {1, 4, 1})
/* loaded from: classes2.dex */
public final class HttpUrl {
    @NotNull
    public static final String FORM_ENCODE_SET = " !\"#$&'()+,/:;<=>?@[\\]^`{|}~";
    @NotNull
    public static final String FRAGMENT_ENCODE_SET = "";
    @NotNull
    public static final String FRAGMENT_ENCODE_SET_URI = " \"#<>\\^`{|}";
    @NotNull
    public static final String PASSWORD_ENCODE_SET = " \"':;<=>@[]^`{}|/\\?#";
    @NotNull
    public static final String PATH_SEGMENT_ENCODE_SET = " \"<>^`{}|/\\?#";
    @NotNull
    public static final String PATH_SEGMENT_ENCODE_SET_URI = "[]";
    @NotNull
    public static final String QUERY_COMPONENT_ENCODE_SET = " !\"#$&'(),/:;<=>?@[]\\^`{|}~";
    @NotNull
    public static final String QUERY_COMPONENT_ENCODE_SET_URI = "\\^`{|}";
    @NotNull
    public static final String QUERY_COMPONENT_REENCODE_SET = " \"'<>#&=";
    @NotNull
    public static final String QUERY_ENCODE_SET = " \"'<>#";
    @NotNull
    public static final String USERNAME_ENCODE_SET = " \"':;<=>@[]^`{}|/\\?#";
    @Nullable
    private final String fragment;
    @NotNull
    private final String host;
    private final boolean isHttps;
    @NotNull
    private final String password;
    @NotNull
    private final List<String> pathSegments;
    private final int port;
    private final List<String> queryNamesAndValues;
    @NotNull
    private final String scheme;
    private final String url;
    @NotNull
    private final String username;
    @NotNull
    public static final Companion Companion = new Companion(null);
    private static final char[] HEX_DIGITS = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};

    /* compiled from: HttpUrl.kt */
    @Metadata(m63bv = {1, 0, 3}, m62d1 = {"\u0000<\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\b\n\u0002\u0010!\n\u0002\b\r\n\u0002\u0010\b\n\u0002\b\u0012\n\u0002\u0010\u000b\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\f\n\u0002\u0010\u0002\n\u0002\b\u0017\u0018\u0000 V2\u00020\u0001:\u0001VB\u0005\u0006\u0002\u0010\u0002J\u000e\u0010#\u001a\u00020\u00002\u0006\u0010$\u001a\u00020\u0004J\u000e\u0010%\u001a\u00020\u00002\u0006\u0010\f\u001a\u00020\u0004J\u0018\u0010&\u001a\u00020\u00002\u0006\u0010'\u001a\u00020\u00042\b\u0010(\u001a\u0004\u0018\u00010\u0004J\u000e\u0010)\u001a\u00020\u00002\u0006\u0010*\u001a\u00020\u0004J\u000e\u0010+\u001a\u00020\u00002\u0006\u0010,\u001a\u00020\u0004J\u0018\u0010+\u001a\u00020\u00002\u0006\u0010,\u001a\u00020\u00042\u0006\u0010-\u001a\u00020.H\u0002J\u0018\u0010/\u001a\u00020\u00002\u0006\u00100\u001a\u00020\u00042\b\u00101\u001a\u0004\u0018\u00010\u0004J\u0006\u00102\u001a\u000203J\b\u00104\u001a\u00020\u001bH\u0002J\u0010\u0010\u0003\u001a\u00020\u00002\b\u0010\u0003\u001a\u0004\u0018\u00010\u0004J\u000e\u0010\t\u001a\u00020\u00002\u0006\u0010\t\u001a\u00020\u0004J\u000e\u00105\u001a\u00020\u00002\u0006\u00105\u001a\u00020\u0004J\u0010\u00106\u001a\u00020\u00002\b\u00106\u001a\u0004\u0018\u00010\u0004J\u000e\u0010\u0014\u001a\u00020\u00002\u0006\u0010\u0014\u001a\u00020\u0004J\u0010\u00107\u001a\u00020\u00002\b\u00107\u001a\u0004\u0018\u00010\u0004J\u000e\u0010\u0017\u001a\u00020\u00002\u0006\u0010\u0017\u001a\u00020\u0004J\u0010\u00108\u001a\u00020.2\u0006\u00109\u001a\u00020\u0004H\u0002J\u0010\u0010:\u001a\u00020.2\u0006\u00109\u001a\u00020\u0004H\u0002J\u001f\u0010;\u001a\u00020\u00002\b\u0010<\u001a\u0004\u0018\u0001032\u0006\u00109\u001a\u00020\u0004H\u0000\u0006\u0002\b=J\u000e\u0010>\u001a\u00020\u00002\u0006\u0010>\u001a\u00020\u0004J\b\u0010?\u001a\u00020@H\u0002J\u000e\u0010\u001a\u001a\u00020\u00002\u0006\u0010\u001a\u001a\u00020\u001bJ0\u0010A\u001a\u00020@2\u0006\u00109\u001a\u00020\u00042\u0006\u0010B\u001a\u00020\u001b2\u0006\u0010C\u001a\u00020\u001b2\u0006\u0010D\u001a\u00020.2\u0006\u0010-\u001a\u00020.H\u0002J\u0010\u0010E\u001a\u00020\u00002\b\u0010E\u001a\u0004\u0018\u00010\u0004J\r\u0010F\u001a\u00020\u0000H\u0000\u0006\u0002\bGJ\u0010\u0010H\u001a\u00020@2\u0006\u0010I\u001a\u00020\u0004H\u0002J\u000e\u0010J\u001a\u00020\u00002\u0006\u0010'\u001a\u00020\u0004J\u000e\u0010K\u001a\u00020\u00002\u0006\u00100\u001a\u00020\u0004J\u000e\u0010L\u001a\u00020\u00002\u0006\u0010M\u001a\u00020\u001bJ \u0010N\u001a\u00020@2\u0006\u00109\u001a\u00020\u00042\u0006\u0010O\u001a\u00020\u001b2\u0006\u0010C\u001a\u00020\u001bH\u0002J\u000e\u0010 \u001a\u00020\u00002\u0006\u0010 \u001a\u00020\u0004J\u0016\u0010P\u001a\u00020\u00002\u0006\u0010M\u001a\u00020\u001b2\u0006\u0010$\u001a\u00020\u0004J\u0018\u0010Q\u001a\u00020\u00002\u0006\u0010'\u001a\u00020\u00042\b\u0010(\u001a\u0004\u0018\u00010\u0004J\u0016\u0010R\u001a\u00020\u00002\u0006\u0010M\u001a\u00020\u001b2\u0006\u0010*\u001a\u00020\u0004J\u0018\u0010S\u001a\u00020\u00002\u0006\u00100\u001a\u00020\u00042\b\u00101\u001a\u0004\u0018\u00010\u0004J\b\u0010T\u001a\u00020\u0004H\u0016J\u000e\u0010U\u001a\u00020\u00002\u0006\u0010U\u001a\u00020\u0004R\u001c\u0010\u0003\u001a\u0004\u0018\u00010\u0004X\u0080\u000e\u0006\u000e\n\u0000\u001a\u0004\b\u0005\u0010\u0006\"\u0004\b\u0007\u0010\bR\u001a\u0010\t\u001a\u00020\u0004X\u0080\u000e\u0006\u000e\n\u0000\u001a\u0004\b\n\u0010\u0006\"\u0004\b\u000b\u0010\bR\u001a\u0010\f\u001a\b\u0012\u0004\u0012\u00020\u00040\rX\u0080\u0004\u0006\b\n\u0000\u001a\u0004\b\u000e\u0010\u000fR$\u0010\u0010\u001a\f\u0012\u0006\u0012\u0004\u0018\u00010\u0004\u0018\u00010\rX\u0080\u000e\u0006\u000e\n\u0000\u001a\u0004\b\u0011\u0010\u000f\"\u0004\b\u0012\u0010\u0013R\u001a\u0010\u0014\u001a\u00020\u0004X\u0080\u000e\u0006\u000e\n\u0000\u001a\u0004\b\u0015\u0010\u0006\"\u0004\b\u0016\u0010\bR\u001c\u0010\u0017\u001a\u0004\u0018\u00010\u0004X\u0080\u000e\u0006\u000e\n\u0000\u001a\u0004\b\u0018\u0010\u0006\"\u0004\b\u0019\u0010\bR\u001a\u0010\u001a\u001a\u00020\u001bX\u0080\u000e\u0006\u000e\n\u0000\u001a\u0004\b\u001c\u0010\u001d\"\u0004\b\u001e\u0010\u001fR\u001c\u0010 \u001a\u0004\u0018\u00010\u0004X\u0080\u000e\u0006\u000e\n\u0000\u001a\u0004\b!\u0010\u0006\"\u0004\b\"\u0010\b\u0006W"}, m61d2 = {"Lokhttp3/HttpUrl$Builder;", "", "()V", "encodedFragment", "", "getEncodedFragment$okhttp", "()Ljava/lang/String;", "setEncodedFragment$okhttp", "(Ljava/lang/String;)V", "encodedPassword", "getEncodedPassword$okhttp", "setEncodedPassword$okhttp", "encodedPathSegments", "", "getEncodedPathSegments$okhttp", "()Ljava/util/List;", "encodedQueryNamesAndValues", "getEncodedQueryNamesAndValues$okhttp", "setEncodedQueryNamesAndValues$okhttp", "(Ljava/util/List;)V", "encodedUsername", "getEncodedUsername$okhttp", "setEncodedUsername$okhttp", "host", "getHost$okhttp", "setHost$okhttp", "port", "", "getPort$okhttp", "()I", "setPort$okhttp", "(I)V", "scheme", "getScheme$okhttp", "setScheme$okhttp", "addEncodedPathSegment", "encodedPathSegment", "addEncodedPathSegments", "addEncodedQueryParameter", "encodedName", "encodedValue", "addPathSegment", "pathSegment", "addPathSegments", "pathSegments", "alreadyEncoded", "", "addQueryParameter", "name", "value", "build", "Lokhttp3/HttpUrl;", "effectivePort", "encodedPath", "encodedQuery", "fragment", "isDot", "input", "isDotDot", "parse", "base", "parse$okhttp", "password", "pop", "", "push", "pos", "limit", "addTrailingSlash", SearchIntents.EXTRA_QUERY, "reencodeForUri", "reencodeForUri$okhttp", "removeAllCanonicalQueryParameters", "canonicalName", "removeAllEncodedQueryParameters", "removeAllQueryParameters", "removePathSegment", "index", "resolvePath", "startPos", "setEncodedPathSegment", "setEncodedQueryParameter", "setPathSegment", "setQueryParameter", "toString", "username", "Companion", "okhttp"}, m60k = 1, m59mv = {1, 4, 1})
    /* loaded from: classes2.dex */
    public static final class Builder {
        @NotNull
        public static final Companion Companion = new Companion(null);
        @NotNull
        public static final String INVALID_HOST = "Invalid URL host";
        @Nullable
        private String encodedFragment;
        @NotNull
        private final List<String> encodedPathSegments;
        @Nullable
        private List<String> encodedQueryNamesAndValues;
        @Nullable
        private String host;
        @Nullable
        private String scheme;
        @NotNull
        private String encodedUsername = "";
        @NotNull
        private String encodedPassword = "";
        private int port = -1;

        /* compiled from: HttpUrl.kt */
        @Metadata(m63bv = {1, 0, 3}, m62d1 = {"\u0000\u001a\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\b\n\u0002\b\u0007\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002\u0006\u0002\u0010\u0002J \u0010\u0005\u001a\u00020\u00062\u0006\u0010\u0007\u001a\u00020\u00042\u0006\u0010\b\u001a\u00020\u00062\u0006\u0010\t\u001a\u00020\u0006H\u0002J \u0010\n\u001a\u00020\u00062\u0006\u0010\u0007\u001a\u00020\u00042\u0006\u0010\b\u001a\u00020\u00062\u0006\u0010\t\u001a\u00020\u0006H\u0002J \u0010\u000b\u001a\u00020\u00062\u0006\u0010\u0007\u001a\u00020\u00042\u0006\u0010\b\u001a\u00020\u00062\u0006\u0010\t\u001a\u00020\u0006H\u0002J\u001c\u0010\f\u001a\u00020\u0006*\u00020\u00042\u0006\u0010\b\u001a\u00020\u00062\u0006\u0010\t\u001a\u00020\u0006H\u0002R\u000e\u0010\u0003\u001a\u00020\u0004X\u0080T\u0006\u0002\n\u0000\u0006\r"}, m61d2 = {"Lokhttp3/HttpUrl$Builder$Companion;", "", "()V", "INVALID_HOST", "", "parsePort", "", "input", "pos", "limit", "portColonOffset", "schemeDelimiterOffset", "slashCount", "okhttp"}, m60k = 1, m59mv = {1, 4, 1})
        /* loaded from: classes2.dex */
        public static final class Companion {
            private Companion() {
            }

            /* JADX INFO: Access modifiers changed from: private */
            public final int parsePort(String str, int i, int i2) {
                try {
                    int parseInt = Integer.parseInt(Companion.canonicalize$okhttp$default(HttpUrl.Companion, str, i, i2, "", false, false, false, false, null, 248, null));
                    if (1 <= parseInt && 65535 >= parseInt) {
                        return parseInt;
                    }
                    return -1;
                } catch (NumberFormatException unused) {
                    return -1;
                }
            }

            /* JADX INFO: Access modifiers changed from: private */
            public final int portColonOffset(String str, int i, int i2) {
                while (i < i2) {
                    char charAt = str.charAt(i);
                    if (charAt == ':') {
                        return i;
                    }
                    if (charAt == '[') {
                        do {
                            i++;
                            if (i < i2) {
                            }
                        } while (str.charAt(i) != ']');
                    }
                    i++;
                }
                return i2;
            }

            /* JADX INFO: Access modifiers changed from: private */
            public final int schemeDelimiterOffset(String str, int i, int i2) {
                if (i2 - i < 2) {
                    return -1;
                }
                char charAt = str.charAt(i);
                if ((Intrinsics.compare((int) charAt, 97) < 0 || Intrinsics.compare((int) charAt, 122) > 0) && (Intrinsics.compare((int) charAt, 65) < 0 || Intrinsics.compare((int) charAt, 90) > 0)) {
                    return -1;
                }
                while (true) {
                    i++;
                    if (i >= i2) {
                        return -1;
                    }
                    char charAt2 = str.charAt(i);
                    if ('a' > charAt2 || 'z' < charAt2) {
                        if ('A' > charAt2 || 'Z' < charAt2) {
                            if ('0' > charAt2 || '9' < charAt2) {
                                if (charAt2 != '+' && charAt2 != '-' && charAt2 != '.') {
                                    if (charAt2 == ':') {
                                        return i;
                                    }
                                    return -1;
                                }
                            }
                        }
                    }
                }
            }

            /* JADX INFO: Access modifiers changed from: private */
            public final int slashCount(String str, int i, int i2) {
                int i3 = 0;
                while (i < i2) {
                    char charAt = str.charAt(i);
                    if (charAt != '\\' && charAt != '/') {
                        break;
                    }
                    i3++;
                    i++;
                }
                return i3;
            }

            public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
                this();
            }
        }

        public Builder() {
            ArrayList arrayList = new ArrayList();
            this.encodedPathSegments = arrayList;
            arrayList.add("");
        }

        private final int effectivePort() {
            int i = this.port;
            if (i != -1) {
                return i;
            }
            Companion companion = HttpUrl.Companion;
            String str = this.scheme;
            Intrinsics.checkNotNull(str);
            return companion.defaultPort(str);
        }

        private final boolean isDot(String str) {
            boolean equals;
            if (!Intrinsics.areEqual(str, ".")) {
                equals = StringsJVM.equals(str, "%2e", true);
                if (!equals) {
                    return false;
                }
            }
            return true;
        }

        private final boolean isDotDot(String str) {
            boolean equals;
            boolean equals2;
            boolean equals3;
            if (!Intrinsics.areEqual(str, "..")) {
                equals = StringsJVM.equals(str, "%2e.", true);
                if (!equals) {
                    equals2 = StringsJVM.equals(str, ".%2e", true);
                    if (!equals2) {
                        equals3 = StringsJVM.equals(str, "%2e%2e", true);
                        if (!equals3) {
                            return false;
                        }
                    }
                }
            }
            return true;
        }

        private final void pop() {
            List<String> list = this.encodedPathSegments;
            if ((list.remove(list.size() - 1).length() == 0) && (!this.encodedPathSegments.isEmpty())) {
                List<String> list2 = this.encodedPathSegments;
                list2.set(list2.size() - 1, "");
                return;
            }
            this.encodedPathSegments.add("");
        }

        private final void push(String str, int i, int i2, boolean z, boolean z2) {
            String canonicalize$okhttp$default = Companion.canonicalize$okhttp$default(HttpUrl.Companion, str, i, i2, HttpUrl.PATH_SEGMENT_ENCODE_SET, z2, false, false, false, null, PsExtractor.VIDEO_STREAM_MASK, null);
            if (isDot(canonicalize$okhttp$default)) {
                return;
            }
            if (isDotDot(canonicalize$okhttp$default)) {
                pop();
                return;
            }
            List<String> list = this.encodedPathSegments;
            if (list.get(list.size() - 1).length() == 0) {
                List<String> list2 = this.encodedPathSegments;
                list2.set(list2.size() - 1, canonicalize$okhttp$default);
            } else {
                this.encodedPathSegments.add(canonicalize$okhttp$default);
            }
            if (z) {
                this.encodedPathSegments.add("");
            }
        }

        private final void removeAllCanonicalQueryParameters(String str) {
            List<String> list = this.encodedQueryNamesAndValues;
            Intrinsics.checkNotNull(list);
            IntProgression step = RangesKt.step(RangesKt.downTo(list.size() - 2, 0), 2);
            int first = step.getFirst();
            int last = step.getLast();
            int step2 = step.getStep();
            if (step2 >= 0) {
                if (first > last) {
                    return;
                }
            } else if (first < last) {
                return;
            }
            while (true) {
                List<String> list2 = this.encodedQueryNamesAndValues;
                Intrinsics.checkNotNull(list2);
                if (Intrinsics.areEqual(str, list2.get(first))) {
                    List<String> list3 = this.encodedQueryNamesAndValues;
                    Intrinsics.checkNotNull(list3);
                    list3.remove(first + 1);
                    List<String> list4 = this.encodedQueryNamesAndValues;
                    Intrinsics.checkNotNull(list4);
                    list4.remove(first);
                    List<String> list5 = this.encodedQueryNamesAndValues;
                    Intrinsics.checkNotNull(list5);
                    if (list5.isEmpty()) {
                        this.encodedQueryNamesAndValues = null;
                        return;
                    }
                }
                if (first == last) {
                    return;
                }
                first += step2;
            }
        }

        /*  JADX ERROR: JadxOverflowException in pass: RegionMakerVisitor
            jadx.core.utils.exceptions.JadxOverflowException: Regions count limit reached
            	at jadx.core.utils.ErrorsCounter.addError(ErrorsCounter.java:56)
            	at jadx.core.utils.ErrorsCounter.error(ErrorsCounter.java:30)
            	at jadx.core.dex.attributes.nodes.NotificationAttrNode.addError(NotificationAttrNode.java:18)
            */
        /* JADX WARN: Removed duplicated region for block: B:13:0x002c  */
        /* JADX WARN: Removed duplicated region for block: B:21:0x0044 A[SYNTHETIC] */
        /* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:19:0x0041 -> B:11:0x0029). Please submit an issue!!! */
        /*
            Code decompiled incorrectly, please refer to instructions dump.
            To view partially-correct code enable 'Show inconsistent code' option in preferences
        */
        private final void resolvePath(java.lang.String r11, int r12, int r13) {
            /*
                r10 = this;
                if (r12 != r13) goto L3
                return
            L3:
                char r0 = r11.charAt(r12)
                r1 = 47
                java.lang.String r2 = ""
                r3 = 1
                if (r0 == r1) goto L1e
                r1 = 92
                if (r0 != r1) goto L13
                goto L1e
            L13:
                java.util.List<java.lang.String> r0 = r10.encodedPathSegments
                int r1 = r0.size()
                int r1 = r1 - r3
                r0.set(r1, r2)
                goto L29
            L1e:
                java.util.List<java.lang.String> r0 = r10.encodedPathSegments
                r0.clear()
                java.util.List<java.lang.String> r0 = r10.encodedPathSegments
                r0.add(r2)
                goto L41
            L29:
                r6 = r12
                if (r6 >= r13) goto L44
                java.lang.String r12 = "/\\"
                int r12 = okhttp3.internal.Util.delimiterOffset(r11, r12, r6, r13)
                if (r12 >= r13) goto L36
                r0 = 1
                goto L37
            L36:
                r0 = 0
            L37:
                r9 = 1
                r4 = r10
                r5 = r11
                r7 = r12
                r8 = r0
                r4.push(r5, r6, r7, r8, r9)
                if (r0 == 0) goto L29
            L41:
                int r12 = r12 + 1
                goto L29
            L44:
                return
            */
            throw new UnsupportedOperationException("Method not decompiled: okhttp3.HttpUrl.Builder.resolvePath(java.lang.String, int, int):void");
        }

        @NotNull
        public final Builder addEncodedPathSegment(@NotNull String encodedPathSegment) {
            Intrinsics.checkNotNullParameter(encodedPathSegment, "encodedPathSegment");
            push(encodedPathSegment, 0, encodedPathSegment.length(), false, true);
            return this;
        }

        @NotNull
        public final Builder addEncodedPathSegments(@NotNull String encodedPathSegments) {
            Intrinsics.checkNotNullParameter(encodedPathSegments, "encodedPathSegments");
            return addPathSegments(encodedPathSegments, true);
        }

        @NotNull
        public final Builder addEncodedQueryParameter(@NotNull String encodedName, @Nullable String str) {
            Intrinsics.checkNotNullParameter(encodedName, "encodedName");
            if (this.encodedQueryNamesAndValues == null) {
                this.encodedQueryNamesAndValues = new ArrayList();
            }
            List<String> list = this.encodedQueryNamesAndValues;
            Intrinsics.checkNotNull(list);
            Companion companion = HttpUrl.Companion;
            list.add(Companion.canonicalize$okhttp$default(companion, encodedName, 0, 0, HttpUrl.QUERY_COMPONENT_REENCODE_SET, true, false, true, false, null, 211, null));
            List<String> list2 = this.encodedQueryNamesAndValues;
            Intrinsics.checkNotNull(list2);
            list2.add(str != null ? Companion.canonicalize$okhttp$default(companion, str, 0, 0, HttpUrl.QUERY_COMPONENT_REENCODE_SET, true, false, true, false, null, 211, null) : null);
            return this;
        }

        @NotNull
        public final Builder addPathSegment(@NotNull String pathSegment) {
            Intrinsics.checkNotNullParameter(pathSegment, "pathSegment");
            push(pathSegment, 0, pathSegment.length(), false, false);
            return this;
        }

        @NotNull
        public final Builder addPathSegments(@NotNull String pathSegments) {
            Intrinsics.checkNotNullParameter(pathSegments, "pathSegments");
            return addPathSegments(pathSegments, false);
        }

        @NotNull
        public final Builder addQueryParameter(@NotNull String name, @Nullable String str) {
            Intrinsics.checkNotNullParameter(name, "name");
            if (this.encodedQueryNamesAndValues == null) {
                this.encodedQueryNamesAndValues = new ArrayList();
            }
            List<String> list = this.encodedQueryNamesAndValues;
            Intrinsics.checkNotNull(list);
            Companion companion = HttpUrl.Companion;
            list.add(Companion.canonicalize$okhttp$default(companion, name, 0, 0, HttpUrl.QUERY_COMPONENT_ENCODE_SET, false, false, true, false, null, 219, null));
            List<String> list2 = this.encodedQueryNamesAndValues;
            Intrinsics.checkNotNull(list2);
            list2.add(str != null ? Companion.canonicalize$okhttp$default(companion, str, 0, 0, HttpUrl.QUERY_COMPONENT_ENCODE_SET, false, false, true, false, null, 219, null) : null);
            return this;
        }

        @NotNull
        public final HttpUrl build() {
            ArrayList arrayList;
            String str = this.scheme;
            if (str != null) {
                Companion companion = HttpUrl.Companion;
                String percentDecode$okhttp$default = Companion.percentDecode$okhttp$default(companion, this.encodedUsername, 0, 0, false, 7, null);
                String percentDecode$okhttp$default2 = Companion.percentDecode$okhttp$default(companion, this.encodedPassword, 0, 0, false, 7, null);
                String str2 = this.host;
                if (str2 != null) {
                    int effectivePort = effectivePort();
                    List<String> list = this.encodedPathSegments;
                    ArrayList arrayList2 = new ArrayList(CollectionsKt.collectionSizeOrDefault(list));
                    for (String str3 : list) {
                        arrayList2.add(Companion.percentDecode$okhttp$default(HttpUrl.Companion, str3, 0, 0, false, 7, null));
                    }
                    List<String> list2 = this.encodedQueryNamesAndValues;
                    if (list2 != null) {
                        arrayList = new ArrayList(CollectionsKt.collectionSizeOrDefault(list2));
                        for (String str4 : list2) {
                            arrayList.add(str4 != null ? Companion.percentDecode$okhttp$default(HttpUrl.Companion, str4, 0, 0, true, 3, null) : null);
                        }
                    } else {
                        arrayList = null;
                    }
                    String str5 = this.encodedFragment;
                    return new HttpUrl(str, percentDecode$okhttp$default, percentDecode$okhttp$default2, str2, effectivePort, arrayList2, arrayList, str5 != null ? Companion.percentDecode$okhttp$default(HttpUrl.Companion, str5, 0, 0, false, 7, null) : null, toString());
                }
                throw new IllegalStateException("host == null");
            }
            throw new IllegalStateException("scheme == null");
        }

        @NotNull
        public final Builder encodedFragment(@Nullable String str) {
            this.encodedFragment = str != null ? Companion.canonicalize$okhttp$default(HttpUrl.Companion, str, 0, 0, "", true, false, false, true, null, 179, null) : null;
            return this;
        }

        @NotNull
        public final Builder encodedPassword(@NotNull String encodedPassword) {
            Intrinsics.checkNotNullParameter(encodedPassword, "encodedPassword");
            this.encodedPassword = Companion.canonicalize$okhttp$default(HttpUrl.Companion, encodedPassword, 0, 0, " \"':;<=>@[]^`{}|/\\?#", true, false, false, false, null, 243, null);
            return this;
        }

        @NotNull
        public final Builder encodedPath(@NotNull String encodedPath) {
            boolean startsWith$default;
            Intrinsics.checkNotNullParameter(encodedPath, "encodedPath");
            startsWith$default = StringsJVM.startsWith$default(encodedPath, "/", false, 2, null);
            if (startsWith$default) {
                resolvePath(encodedPath, 0, encodedPath.length());
                return this;
            }
            throw new IllegalArgumentException(Insets$$ExternalSyntheticOutline0.m336m("unexpected encodedPath: ", encodedPath).toString());
        }

        @NotNull
        public final Builder encodedQuery(@Nullable String str) {
            List<String> list;
            if (str != null) {
                Companion companion = HttpUrl.Companion;
                String canonicalize$okhttp$default = Companion.canonicalize$okhttp$default(companion, str, 0, 0, HttpUrl.QUERY_ENCODE_SET, true, false, true, false, null, 211, null);
                if (canonicalize$okhttp$default != null) {
                    list = companion.toQueryNamesAndValues$okhttp(canonicalize$okhttp$default);
                    this.encodedQueryNamesAndValues = list;
                    return this;
                }
            }
            list = null;
            this.encodedQueryNamesAndValues = list;
            return this;
        }

        @NotNull
        public final Builder encodedUsername(@NotNull String encodedUsername) {
            Intrinsics.checkNotNullParameter(encodedUsername, "encodedUsername");
            this.encodedUsername = Companion.canonicalize$okhttp$default(HttpUrl.Companion, encodedUsername, 0, 0, " \"':;<=>@[]^`{}|/\\?#", true, false, false, false, null, 243, null);
            return this;
        }

        @NotNull
        public final Builder fragment(@Nullable String str) {
            this.encodedFragment = str != null ? Companion.canonicalize$okhttp$default(HttpUrl.Companion, str, 0, 0, "", false, false, false, true, null, 187, null) : null;
            return this;
        }

        @Nullable
        public final String getEncodedFragment$okhttp() {
            return this.encodedFragment;
        }

        @NotNull
        public final String getEncodedPassword$okhttp() {
            return this.encodedPassword;
        }

        @NotNull
        public final List<String> getEncodedPathSegments$okhttp() {
            return this.encodedPathSegments;
        }

        @Nullable
        public final List<String> getEncodedQueryNamesAndValues$okhttp() {
            return this.encodedQueryNamesAndValues;
        }

        @NotNull
        public final String getEncodedUsername$okhttp() {
            return this.encodedUsername;
        }

        @Nullable
        public final String getHost$okhttp() {
            return this.host;
        }

        public final int getPort$okhttp() {
            return this.port;
        }

        @Nullable
        public final String getScheme$okhttp() {
            return this.scheme;
        }

        @NotNull
        public final Builder host(@NotNull String host) {
            Intrinsics.checkNotNullParameter(host, "host");
            String canonicalHost = hostnames.toCanonicalHost(Companion.percentDecode$okhttp$default(HttpUrl.Companion, host, 0, 0, false, 7, null));
            if (canonicalHost != null) {
                this.host = canonicalHost;
                return this;
            }
            throw new IllegalArgumentException(Insets$$ExternalSyntheticOutline0.m336m("unexpected host: ", host));
        }

        @NotNull
        public final Builder parse$okhttp(@Nullable HttpUrl httpUrl, @NotNull String str) {
            int delimiterOffset;
            int i;
            String str2;
            int i2;
            int i3;
            String str3;
            boolean startsWith;
            boolean startsWith2;
            String input = str;
            Intrinsics.checkNotNullParameter(input, "input");
            int indexOfFirstNonAsciiWhitespace$default = Util.indexOfFirstNonAsciiWhitespace$default(input, 0, 0, 3, null);
            int indexOfLastNonAsciiWhitespace$default = Util.indexOfLastNonAsciiWhitespace$default(input, indexOfFirstNonAsciiWhitespace$default, 0, 2, null);
            Companion companion = Companion;
            int schemeDelimiterOffset = companion.schemeDelimiterOffset(input, indexOfFirstNonAsciiWhitespace$default, indexOfLastNonAsciiWhitespace$default);
            char c = 65535;
            String str4 = "(this as java.lang.Strining(startIndex, endIndex)";
            if (schemeDelimiterOffset != -1) {
                startsWith = StringsJVM.startsWith(input, "https:", indexOfFirstNonAsciiWhitespace$default, true);
                if (startsWith) {
                    this.scheme = "https";
                    indexOfFirstNonAsciiWhitespace$default += 6;
                } else {
                    startsWith2 = StringsJVM.startsWith(input, "http:", indexOfFirstNonAsciiWhitespace$default, true);
                    if (startsWith2) {
                        this.scheme = "http";
                        indexOfFirstNonAsciiWhitespace$default += 5;
                    } else {
                        StringBuilder m344m = Insets$$ExternalSyntheticOutline0.m344m("Expected URL scheme 'http' or 'https' but was '");
                        String substring = input.substring(0, schemeDelimiterOffset);
                        Intrinsics.checkNotNullExpressionValue(substring, "(this as java.lang.Strining(startIndex, endIndex)");
                        m344m.append(substring);
                        m344m.append("'");
                        throw new IllegalArgumentException(m344m.toString());
                    }
                }
            } else if (httpUrl != null) {
                this.scheme = httpUrl.scheme();
            } else {
                if (str.length() > 6) {
                    input = StringsKt.take(input, 6) + "...";
                }
                throw new IllegalArgumentException(Insets$$ExternalSyntheticOutline0.m336m("Expected URL scheme 'http' or 'https' but no scheme was found for ", input));
            }
            int slashCount = companion.slashCount(input, indexOfFirstNonAsciiWhitespace$default, indexOfLastNonAsciiWhitespace$default);
            char c2 = '?';
            char c3 = '#';
            if (slashCount < 2 && httpUrl != null && !(!Intrinsics.areEqual(httpUrl.scheme(), this.scheme))) {
                this.encodedUsername = httpUrl.encodedUsername();
                this.encodedPassword = httpUrl.encodedPassword();
                this.host = httpUrl.host();
                this.port = httpUrl.port();
                this.encodedPathSegments.clear();
                this.encodedPathSegments.addAll(httpUrl.encodedPathSegments());
                if (indexOfFirstNonAsciiWhitespace$default == indexOfLastNonAsciiWhitespace$default || input.charAt(indexOfFirstNonAsciiWhitespace$default) == '#') {
                    encodedQuery(httpUrl.encodedQuery());
                }
                i = indexOfLastNonAsciiWhitespace$default;
            } else {
                int i4 = indexOfFirstNonAsciiWhitespace$default + slashCount;
                boolean z = false;
                boolean z2 = false;
                while (true) {
                    delimiterOffset = Util.delimiterOffset(input, "@/\\?#", i4, indexOfLastNonAsciiWhitespace$default);
                    char charAt = delimiterOffset != indexOfLastNonAsciiWhitespace$default ? input.charAt(delimiterOffset) : (char) 65535;
                    if (charAt == c || charAt == c3 || charAt == '/' || charAt == '\\' || charAt == c2) {
                        break;
                    }
                    if (charAt != '@') {
                        i2 = indexOfLastNonAsciiWhitespace$default;
                        str3 = str4;
                    } else {
                        if (!z) {
                            int delimiterOffset2 = Util.delimiterOffset(input, ':', i4, delimiterOffset);
                            Companion companion2 = HttpUrl.Companion;
                            i2 = indexOfLastNonAsciiWhitespace$default;
                            i3 = delimiterOffset;
                            String canonicalize$okhttp$default = Companion.canonicalize$okhttp$default(companion2, str, i4, delimiterOffset2, " \"':;<=>@[]^`{}|/\\?#", true, false, false, false, null, PsExtractor.VIDEO_STREAM_MASK, null);
                            if (z2) {
                                canonicalize$okhttp$default = Insets$$ExternalSyntheticOutline0.m327m(new StringBuilder(), this.encodedUsername, "%40", canonicalize$okhttp$default);
                            }
                            this.encodedUsername = canonicalize$okhttp$default;
                            if (delimiterOffset2 != i3) {
                                this.encodedPassword = Companion.canonicalize$okhttp$default(companion2, str, delimiterOffset2 + 1, i3, " \"':;<=>@[]^`{}|/\\?#", true, false, false, false, null, PsExtractor.VIDEO_STREAM_MASK, null);
                                z = true;
                            }
                            z2 = true;
                            str3 = str4;
                        } else {
                            i2 = indexOfLastNonAsciiWhitespace$default;
                            i3 = delimiterOffset;
                            StringBuilder sb = new StringBuilder();
                            sb.append(this.encodedPassword);
                            sb.append("%40");
                            str3 = str4;
                            sb.append(Companion.canonicalize$okhttp$default(HttpUrl.Companion, str, i4, i3, " \"':;<=>@[]^`{}|/\\?#", true, false, false, false, null, PsExtractor.VIDEO_STREAM_MASK, null));
                            this.encodedPassword = sb.toString();
                        }
                        i4 = i3 + 1;
                    }
                    c3 = '#';
                    c2 = '?';
                    c = 65535;
                    str4 = str3;
                    indexOfLastNonAsciiWhitespace$default = i2;
                }
                i = indexOfLastNonAsciiWhitespace$default;
                String str5 = str4;
                Companion companion3 = Companion;
                int portColonOffset = companion3.portColonOffset(input, i4, delimiterOffset);
                int i5 = portColonOffset + 1;
                if (i5 < delimiterOffset) {
                    this.host = hostnames.toCanonicalHost(Companion.percentDecode$okhttp$default(HttpUrl.Companion, str, i4, portColonOffset, false, 4, null));
                    int parsePort = companion3.parsePort(input, i5, delimiterOffset);
                    this.port = parsePort;
                    if (!(parsePort != -1)) {
                        StringBuilder m344m2 = Insets$$ExternalSyntheticOutline0.m344m("Invalid URL port: \"");
                        String substring2 = input.substring(i5, delimiterOffset);
                        Intrinsics.checkNotNullExpressionValue(substring2, str5);
                        m344m2.append(substring2);
                        m344m2.append(Typography.quote);
                        throw new IllegalArgumentException(m344m2.toString().toString());
                    }
                    str2 = str5;
                } else {
                    str2 = str5;
                    Companion companion4 = HttpUrl.Companion;
                    this.host = hostnames.toCanonicalHost(Companion.percentDecode$okhttp$default(companion4, str, i4, portColonOffset, false, 4, null));
                    String str6 = this.scheme;
                    Intrinsics.checkNotNull(str6);
                    this.port = companion4.defaultPort(str6);
                }
                if (!(this.host != null)) {
                    StringBuilder m344m3 = Insets$$ExternalSyntheticOutline0.m344m("Invalid URL host: \"");
                    String substring3 = input.substring(i4, portColonOffset);
                    Intrinsics.checkNotNullExpressionValue(substring3, str2);
                    m344m3.append(substring3);
                    m344m3.append(Typography.quote);
                    throw new IllegalArgumentException(m344m3.toString().toString());
                }
                indexOfFirstNonAsciiWhitespace$default = delimiterOffset;
            }
            int i6 = i;
            int delimiterOffset3 = Util.delimiterOffset(input, "?#", indexOfFirstNonAsciiWhitespace$default, i6);
            resolvePath(input, indexOfFirstNonAsciiWhitespace$default, delimiterOffset3);
            if (delimiterOffset3 < i6 && input.charAt(delimiterOffset3) == '?') {
                int delimiterOffset4 = Util.delimiterOffset(input, '#', delimiterOffset3, i6);
                Companion companion5 = HttpUrl.Companion;
                this.encodedQueryNamesAndValues = companion5.toQueryNamesAndValues$okhttp(Companion.canonicalize$okhttp$default(companion5, str, delimiterOffset3 + 1, delimiterOffset4, HttpUrl.QUERY_ENCODE_SET, true, false, true, false, null, 208, null));
                delimiterOffset3 = delimiterOffset4;
            }
            if (delimiterOffset3 < i6 && input.charAt(delimiterOffset3) == '#') {
                this.encodedFragment = Companion.canonicalize$okhttp$default(HttpUrl.Companion, str, delimiterOffset3 + 1, i6, "", true, false, false, true, null, 176, null);
            }
            return this;
        }

        @NotNull
        public final Builder password(@NotNull String password) {
            Intrinsics.checkNotNullParameter(password, "password");
            this.encodedPassword = Companion.canonicalize$okhttp$default(HttpUrl.Companion, password, 0, 0, " \"':;<=>@[]^`{}|/\\?#", false, false, false, false, null, 251, null);
            return this;
        }

        @NotNull
        public final Builder port(int i) {
            boolean z = true;
            if ((1 > i || 65535 < i) ? false : false) {
                this.port = i;
                return this;
            }
            throw new IllegalArgumentException(Insets$$ExternalSyntheticOutline0.m343m("unexpected port: ", i).toString());
        }

        @NotNull
        public final Builder query(@Nullable String str) {
            List<String> list;
            if (str != null) {
                Companion companion = HttpUrl.Companion;
                String canonicalize$okhttp$default = Companion.canonicalize$okhttp$default(companion, str, 0, 0, HttpUrl.QUERY_ENCODE_SET, false, false, true, false, null, 219, null);
                if (canonicalize$okhttp$default != null) {
                    list = companion.toQueryNamesAndValues$okhttp(canonicalize$okhttp$default);
                    this.encodedQueryNamesAndValues = list;
                    return this;
                }
            }
            list = null;
            this.encodedQueryNamesAndValues = list;
            return this;
        }

        @NotNull
        public final Builder reencodeForUri$okhttp() {
            String str = this.host;
            this.host = str != null ? new Regex("[\"<>^`{|}]").replace(str, "") : null;
            int size = this.encodedPathSegments.size();
            for (int i = 0; i < size; i++) {
                List<String> list = this.encodedPathSegments;
                list.set(i, Companion.canonicalize$okhttp$default(HttpUrl.Companion, list.get(i), 0, 0, HttpUrl.PATH_SEGMENT_ENCODE_SET_URI, true, true, false, false, null, 227, null));
            }
            List<String> list2 = this.encodedQueryNamesAndValues;
            if (list2 != null) {
                int size2 = list2.size();
                for (int i2 = 0; i2 < size2; i2++) {
                    String str2 = list2.get(i2);
                    list2.set(i2, str2 != null ? Companion.canonicalize$okhttp$default(HttpUrl.Companion, str2, 0, 0, HttpUrl.QUERY_COMPONENT_ENCODE_SET_URI, true, true, true, false, null, 195, null) : null);
                }
            }
            String str3 = this.encodedFragment;
            this.encodedFragment = str3 != null ? Companion.canonicalize$okhttp$default(HttpUrl.Companion, str3, 0, 0, HttpUrl.FRAGMENT_ENCODE_SET_URI, true, true, false, true, null, 163, null) : null;
            return this;
        }

        @NotNull
        public final Builder removeAllEncodedQueryParameters(@NotNull String encodedName) {
            Intrinsics.checkNotNullParameter(encodedName, "encodedName");
            if (this.encodedQueryNamesAndValues == null) {
                return this;
            }
            removeAllCanonicalQueryParameters(Companion.canonicalize$okhttp$default(HttpUrl.Companion, encodedName, 0, 0, HttpUrl.QUERY_COMPONENT_REENCODE_SET, true, false, true, false, null, 211, null));
            return this;
        }

        @NotNull
        public final Builder removeAllQueryParameters(@NotNull String name) {
            Intrinsics.checkNotNullParameter(name, "name");
            if (this.encodedQueryNamesAndValues == null) {
                return this;
            }
            removeAllCanonicalQueryParameters(Companion.canonicalize$okhttp$default(HttpUrl.Companion, name, 0, 0, HttpUrl.QUERY_COMPONENT_ENCODE_SET, false, false, true, false, null, 219, null));
            return this;
        }

        @NotNull
        public final Builder removePathSegment(int i) {
            this.encodedPathSegments.remove(i);
            if (this.encodedPathSegments.isEmpty()) {
                this.encodedPathSegments.add("");
            }
            return this;
        }

        @NotNull
        public final Builder scheme(@NotNull String scheme) {
            boolean equals;
            boolean equals2;
            Intrinsics.checkNotNullParameter(scheme, "scheme");
            equals = StringsJVM.equals(scheme, "http", true);
            if (equals) {
                this.scheme = "http";
            } else {
                equals2 = StringsJVM.equals(scheme, "https", true);
                if (!equals2) {
                    throw new IllegalArgumentException(Insets$$ExternalSyntheticOutline0.m336m("unexpected scheme: ", scheme));
                }
                this.scheme = "https";
            }
            return this;
        }

        public final void setEncodedFragment$okhttp(@Nullable String str) {
            this.encodedFragment = str;
        }

        public final void setEncodedPassword$okhttp(@NotNull String str) {
            Intrinsics.checkNotNullParameter(str, "<set-?>");
            this.encodedPassword = str;
        }

        @NotNull
        public final Builder setEncodedPathSegment(int i, @NotNull String encodedPathSegment) {
            Intrinsics.checkNotNullParameter(encodedPathSegment, "encodedPathSegment");
            String canonicalize$okhttp$default = Companion.canonicalize$okhttp$default(HttpUrl.Companion, encodedPathSegment, 0, 0, HttpUrl.PATH_SEGMENT_ENCODE_SET, true, false, false, false, null, 243, null);
            this.encodedPathSegments.set(i, canonicalize$okhttp$default);
            if ((isDot(canonicalize$okhttp$default) || isDotDot(canonicalize$okhttp$default)) ? false : true) {
                return this;
            }
            throw new IllegalArgumentException(Insets$$ExternalSyntheticOutline0.m336m("unexpected path segment: ", encodedPathSegment).toString());
        }

        public final void setEncodedQueryNamesAndValues$okhttp(@Nullable List<String> list) {
            this.encodedQueryNamesAndValues = list;
        }

        @NotNull
        public final Builder setEncodedQueryParameter(@NotNull String encodedName, @Nullable String str) {
            Intrinsics.checkNotNullParameter(encodedName, "encodedName");
            removeAllEncodedQueryParameters(encodedName);
            addEncodedQueryParameter(encodedName, str);
            return this;
        }

        public final void setEncodedUsername$okhttp(@NotNull String str) {
            Intrinsics.checkNotNullParameter(str, "<set-?>");
            this.encodedUsername = str;
        }

        public final void setHost$okhttp(@Nullable String str) {
            this.host = str;
        }

        @NotNull
        public final Builder setPathSegment(int i, @NotNull String pathSegment) {
            Intrinsics.checkNotNullParameter(pathSegment, "pathSegment");
            String canonicalize$okhttp$default = Companion.canonicalize$okhttp$default(HttpUrl.Companion, pathSegment, 0, 0, HttpUrl.PATH_SEGMENT_ENCODE_SET, false, false, false, false, null, 251, null);
            if ((isDot(canonicalize$okhttp$default) || isDotDot(canonicalize$okhttp$default)) ? false : true) {
                this.encodedPathSegments.set(i, canonicalize$okhttp$default);
                return this;
            }
            throw new IllegalArgumentException(Insets$$ExternalSyntheticOutline0.m336m("unexpected path segment: ", pathSegment).toString());
        }

        public final void setPort$okhttp(int i) {
            this.port = i;
        }

        @NotNull
        public final Builder setQueryParameter(@NotNull String name, @Nullable String str) {
            Intrinsics.checkNotNullParameter(name, "name");
            removeAllQueryParameters(name);
            addQueryParameter(name, str);
            return this;
        }

        public final void setScheme$okhttp(@Nullable String str) {
            this.scheme = str;
        }

        /* JADX WARN: Code restructure failed: missing block: B:16:0x0033, code lost:
            if ((r5.encodedPassword.length() > 0) != false) goto L38;
         */
        /* JADX WARN: Code restructure failed: missing block: B:36:0x008e, code lost:
            if (r1 != r3.defaultPort(r2)) goto L36;
         */
        @org.jetbrains.annotations.NotNull
        /*
            Code decompiled incorrectly, please refer to instructions dump.
            To view partially-correct code enable 'Show inconsistent code' option in preferences
        */
        public java.lang.String toString() {
            /*
                r5 = this;
                java.lang.StringBuilder r0 = new java.lang.StringBuilder
                r0.<init>()
                java.lang.String r1 = r5.scheme
                if (r1 == 0) goto L12
                r0.append(r1)
                java.lang.String r1 = "://"
                r0.append(r1)
                goto L17
            L12:
                java.lang.String r1 = "//"
                r0.append(r1)
            L17:
                java.lang.String r1 = r5.encodedUsername
                int r1 = r1.length()
                r2 = 0
                r3 = 1
                if (r1 <= 0) goto L23
                r1 = 1
                goto L24
            L23:
                r1 = 0
            L24:
                r4 = 58
                if (r1 != 0) goto L35
                java.lang.String r1 = r5.encodedPassword
                int r1 = r1.length()
                if (r1 <= 0) goto L32
                r1 = 1
                goto L33
            L32:
                r1 = 0
            L33:
                if (r1 == 0) goto L52
            L35:
                java.lang.String r1 = r5.encodedUsername
                r0.append(r1)
                java.lang.String r1 = r5.encodedPassword
                int r1 = r1.length()
                if (r1 <= 0) goto L43
                r2 = 1
            L43:
                if (r2 == 0) goto L4d
                r0.append(r4)
                java.lang.String r1 = r5.encodedPassword
                r0.append(r1)
            L4d:
                r1 = 64
                r0.append(r1)
            L52:
                java.lang.String r1 = r5.host
                if (r1 == 0) goto L74
                kotlin.jvm.internal.Intrinsics.checkNotNull(r1)
                boolean r1 = kotlin.text.StringsKt.contains$default(r1, r4)
                if (r1 == 0) goto L6f
                r1 = 91
                r0.append(r1)
                java.lang.String r1 = r5.host
                r0.append(r1)
                r1 = 93
                r0.append(r1)
                goto L74
            L6f:
                java.lang.String r1 = r5.host
                r0.append(r1)
            L74:
                int r1 = r5.port
                r2 = -1
                if (r1 != r2) goto L7d
                java.lang.String r1 = r5.scheme
                if (r1 == 0) goto L96
            L7d:
                int r1 = r5.effectivePort()
                java.lang.String r2 = r5.scheme
                if (r2 == 0) goto L90
                okhttp3.HttpUrl$Companion r3 = okhttp3.HttpUrl.Companion
                kotlin.jvm.internal.Intrinsics.checkNotNull(r2)
                int r2 = r3.defaultPort(r2)
                if (r1 == r2) goto L96
            L90:
                r0.append(r4)
                r0.append(r1)
            L96:
                okhttp3.HttpUrl$Companion r1 = okhttp3.HttpUrl.Companion
                java.util.List<java.lang.String> r2 = r5.encodedPathSegments
                r1.toPathString$okhttp(r2, r0)
                java.util.List<java.lang.String> r2 = r5.encodedQueryNamesAndValues
                if (r2 == 0) goto Lae
                r2 = 63
                r0.append(r2)
                java.util.List<java.lang.String> r2 = r5.encodedQueryNamesAndValues
                kotlin.jvm.internal.Intrinsics.checkNotNull(r2)
                r1.toQueryString$okhttp(r2, r0)
            Lae:
                java.lang.String r1 = r5.encodedFragment
                if (r1 == 0) goto Lbc
                r1 = 35
                r0.append(r1)
                java.lang.String r1 = r5.encodedFragment
                r0.append(r1)
            Lbc:
                java.lang.String r0 = r0.toString()
                java.lang.String r1 = "StringBuilder().apply(builderAction).toString()"
                kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r0, r1)
                return r0
            */
            throw new UnsupportedOperationException("Method not decompiled: okhttp3.HttpUrl.Builder.toString():java.lang.String");
        }

        @NotNull
        public final Builder username(@NotNull String username) {
            Intrinsics.checkNotNullParameter(username, "username");
            this.encodedUsername = Companion.canonicalize$okhttp$default(HttpUrl.Companion, username, 0, 0, " \"':;<=>@[]^`{}|/\\?#", false, false, false, false, null, 251, null);
            return this;
        }

        private final Builder addPathSegments(String str, boolean z) {
            int i = 0;
            do {
                int delimiterOffset = Util.delimiterOffset(str, "/\\", i, str.length());
                push(str, i, delimiterOffset, delimiterOffset < str.length(), z);
                i = delimiterOffset + 1;
            } while (i <= str.length());
            return this;
        }
    }

    /* compiled from: HttpUrl.kt */
    @Metadata(m63bv = {1, 0, 3}, m62d1 = {"\u0000p\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0003\n\u0002\u0010\u0019\n\u0002\b\t\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0010\u000b\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0010\u0002\n\u0002\u0010 \n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010!\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0004\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002\u0006\u0002\u0010\u0002J\u0010\u0010\u0011\u001a\u00020\u00122\u0006\u0010\u0013\u001a\u00020\u0004H\u0007J\u0017\u0010\u0014\u001a\u0004\u0018\u00010\u00152\u0006\u0010\u0016\u001a\u00020\u0017H\u0007\u0006\u0002\b\u0018J\u0017\u0010\u0014\u001a\u0004\u0018\u00010\u00152\u0006\u0010\u0019\u001a\u00020\u001aH\u0007\u0006\u0002\b\u0018J\u0015\u0010\u0014\u001a\u00020\u00152\u0006\u0010\u0019\u001a\u00020\u0004H\u0007\u0006\u0002\b\u0018J\u0017\u0010\u001b\u001a\u0004\u0018\u00010\u00152\u0006\u0010\u0019\u001a\u00020\u0004H\u0007\u0006\u0002\b\u001cJa\u0010\u001d\u001a\u00020\u0004*\u00020\u00042\b\b\u0002\u0010\u001e\u001a\u00020\u00122\b\b\u0002\u0010\u001f\u001a\u00020\u00122\u0006\u0010 \u001a\u00020\u00042\b\b\u0002\u0010!\u001a\u00020\"2\b\b\u0002\u0010#\u001a\u00020\"2\b\b\u0002\u0010$\u001a\u00020\"2\b\b\u0002\u0010%\u001a\u00020\"2\n\b\u0002\u0010&\u001a\u0004\u0018\u00010'H\u0000\u0006\u0002\b(J\u001c\u0010)\u001a\u00020\"*\u00020\u00042\u0006\u0010\u001e\u001a\u00020\u00122\u0006\u0010\u001f\u001a\u00020\u0012H\u0002J/\u0010*\u001a\u00020\u0004*\u00020\u00042\b\b\u0002\u0010\u001e\u001a\u00020\u00122\b\b\u0002\u0010\u001f\u001a\u00020\u00122\b\b\u0002\u0010$\u001a\u00020\"H\u0000\u0006\u0002\b+J\u0011\u0010,\u001a\u00020\u0015*\u00020\u0004H\u0007\u0006\u0002\b\u0014J\u0013\u0010-\u001a\u0004\u0018\u00010\u0015*\u00020\u0017H\u0007\u0006\u0002\b\u0014J\u0013\u0010-\u001a\u0004\u0018\u00010\u0015*\u00020\u001aH\u0007\u0006\u0002\b\u0014J\u0013\u0010-\u001a\u0004\u0018\u00010\u0015*\u00020\u0004H\u0007\u0006\u0002\b\u001bJ#\u0010.\u001a\u00020/*\b\u0012\u0004\u0012\u00020\u0004002\n\u00101\u001a\u000602j\u0002`3H\u0000\u0006\u0002\b4J\u0019\u00105\u001a\n\u0012\u0006\u0012\u0004\u0018\u00010\u000406*\u00020\u0004H\u0000\u0006\u0002\b7J%\u00108\u001a\u00020/*\n\u0012\u0006\u0012\u0004\u0018\u00010\u0004002\n\u00101\u001a\u000602j\u0002`3H\u0000\u0006\u0002\b9JV\u0010:\u001a\u00020/*\u00020;2\u0006\u0010<\u001a\u00020\u00042\u0006\u0010\u001e\u001a\u00020\u00122\u0006\u0010\u001f\u001a\u00020\u00122\u0006\u0010 \u001a\u00020\u00042\u0006\u0010!\u001a\u00020\"2\u0006\u0010#\u001a\u00020\"2\u0006\u0010$\u001a\u00020\"2\u0006\u0010%\u001a\u00020\"2\b\u0010&\u001a\u0004\u0018\u00010'H\u0002J,\u0010=\u001a\u00020/*\u00020;2\u0006\u0010>\u001a\u00020\u00042\u0006\u0010\u001e\u001a\u00020\u00122\u0006\u0010\u001f\u001a\u00020\u00122\u0006\u0010$\u001a\u00020\"H\u0002R\u000e\u0010\u0003\u001a\u00020\u0004X\u0080T\u0006\u0002\n\u0000R\u000e\u0010\u0005\u001a\u00020\u0004X\u0080T\u0006\u0002\n\u0000R\u000e\u0010\u0006\u001a\u00020\u0004X\u0080T\u0006\u0002\n\u0000R\u000e\u0010\u0007\u001a\u00020\bX\u0082\u0004\u0006\u0002\n\u0000R\u000e\u0010\t\u001a\u00020\u0004X\u0080T\u0006\u0002\n\u0000R\u000e\u0010\n\u001a\u00020\u0004X\u0080T\u0006\u0002\n\u0000R\u000e\u0010\u000b\u001a\u00020\u0004X\u0080T\u0006\u0002\n\u0000R\u000e\u0010\f\u001a\u00020\u0004X\u0080T\u0006\u0002\n\u0000R\u000e\u0010\r\u001a\u00020\u0004X\u0080T\u0006\u0002\n\u0000R\u000e\u0010\u000e\u001a\u00020\u0004X\u0080T\u0006\u0002\n\u0000R\u000e\u0010\u000f\u001a\u00020\u0004X\u0080T\u0006\u0002\n\u0000R\u000e\u0010\u0010\u001a\u00020\u0004X\u0080T\u0006\u0002\n\u0000\u0006?"}, m61d2 = {"Lokhttp3/HttpUrl$Companion;", "", "()V", "FORM_ENCODE_SET", "", "FRAGMENT_ENCODE_SET", "FRAGMENT_ENCODE_SET_URI", "HEX_DIGITS", "", "PASSWORD_ENCODE_SET", "PATH_SEGMENT_ENCODE_SET", "PATH_SEGMENT_ENCODE_SET_URI", "QUERY_COMPONENT_ENCODE_SET", "QUERY_COMPONENT_ENCODE_SET_URI", "QUERY_COMPONENT_REENCODE_SET", "QUERY_ENCODE_SET", "USERNAME_ENCODE_SET", "defaultPort", "", "scheme", "get", "Lokhttp3/HttpUrl;", "uri", "Ljava/net/URI;", "-deprecated_get", ImagesContract.URL, "Ljava/net/URL;", "parse", "-deprecated_parse", "canonicalize", "pos", "limit", "encodeSet", "alreadyEncoded", "", "strict", "plusIsSpace", "unicodeAllowed", "charset", "Ljava/nio/charset/Charset;", "canonicalize$okhttp", "isPercentEncoded", "percentDecode", "percentDecode$okhttp", "toHttpUrl", "toHttpUrlOrNull", "toPathString", "", "", "out", "Ljava/lang/StringBuilder;", "Lkotlin/text/StringBuilder;", "toPathString$okhttp", "toQueryNamesAndValues", "", "toQueryNamesAndValues$okhttp", "toQueryString", "toQueryString$okhttp", "writeCanonicalized", "Lokio/Buffer;", "input", "writePercentDecoded", "encoded", "okhttp"}, m60k = 1, m59mv = {1, 4, 1})
    /* loaded from: classes2.dex */
    public static final class Companion {
        private Companion() {
        }

        public static /* synthetic */ String canonicalize$okhttp$default(Companion companion, String str, int i, int i2, String str2, boolean z, boolean z2, boolean z3, boolean z4, Charset charset, int i3, Object obj) {
            return companion.canonicalize$okhttp(str, (i3 & 1) != 0 ? 0 : i, (i3 & 2) != 0 ? str.length() : i2, str2, (i3 & 8) != 0 ? false : z, (i3 & 16) != 0 ? false : z2, (i3 & 32) != 0 ? false : z3, (i3 & 64) != 0 ? false : z4, (i3 & 128) != 0 ? null : charset);
        }

        private final boolean isPercentEncoded(String str, int i, int i2) {
            int i3 = i + 2;
            return i3 < i2 && str.charAt(i) == '%' && Util.parseHexDigit(str.charAt(i + 1)) != -1 && Util.parseHexDigit(str.charAt(i3)) != -1;
        }

        public static /* synthetic */ String percentDecode$okhttp$default(Companion companion, String str, int i, int i2, boolean z, int i3, Object obj) {
            if ((i3 & 1) != 0) {
                i = 0;
            }
            if ((i3 & 2) != 0) {
                i2 = str.length();
            }
            if ((i3 & 4) != 0) {
                z = false;
            }
            return companion.percentDecode$okhttp(str, i, i2, z);
        }

        /* JADX WARN: Code restructure failed: missing block: B:40:0x0068, code lost:
            if (isPercentEncoded(r15, r5, r17) == false) goto L43;
         */
        /*
            Code decompiled incorrectly, please refer to instructions dump.
            To view partially-correct code enable 'Show inconsistent code' option in preferences
        */
        private final void writeCanonicalized(okio.Buffer r14, java.lang.String r15, int r16, int r17, java.lang.String r18, boolean r19, boolean r20, boolean r21, boolean r22, java.nio.charset.Charset r23) {
            /*
                r13 = this;
                r0 = r14
                r1 = r15
                r2 = r17
                r3 = r18
                r4 = r23
                r5 = 0
                r6 = r5
                r5 = r16
            Lc:
                if (r5 >= r2) goto Lbe
                java.lang.String r7 = "null cannot be cast to non-null type java.lang.String"
                java.util.Objects.requireNonNull(r15, r7)
                int r7 = r15.codePointAt(r5)
                if (r19 == 0) goto L29
                r8 = 9
                if (r7 == r8) goto L45
                r8 = 10
                if (r7 == r8) goto L45
                r8 = 12
                if (r7 == r8) goto L45
                r8 = 13
                if (r7 == r8) goto L45
            L29:
                java.lang.String r8 = "+"
                r9 = 32
                if (r7 != r9) goto L37
                java.lang.String r10 = " !\"#$&'()+,/:;<=>?@[\\]^`{|}~"
                if (r3 != r10) goto L37
                r14.writeUtf8(r8)
                goto L45
            L37:
                r10 = 43
                if (r7 != r10) goto L48
                if (r21 == 0) goto L48
                if (r19 == 0) goto L40
                goto L42
            L40:
                java.lang.String r8 = "%2B"
            L42:
                r14.writeUtf8(r8)
            L45:
                r9 = r13
                goto Lb7
            L48:
                r8 = 37
                if (r7 < r9) goto L70
                r9 = 127(0x7f, float:1.78E-43)
                if (r7 == r9) goto L70
                r9 = 128(0x80, float:1.8E-43)
                if (r7 < r9) goto L56
                if (r22 == 0) goto L70
            L56:
                char r9 = (char) r7
                boolean r9 = kotlin.text.StringsKt.contains$default(r3, r9)
                if (r9 != 0) goto L70
                if (r7 != r8) goto L6b
                if (r19 == 0) goto L70
                if (r20 == 0) goto L6b
                r9 = r13
                boolean r10 = r13.isPercentEncoded(r15, r5, r2)
                if (r10 != 0) goto L6c
                goto L71
            L6b:
                r9 = r13
            L6c:
                r14.writeUtf8CodePoint(r7)
                goto Lb7
            L70:
                r9 = r13
            L71:
                if (r6 != 0) goto L78
                okio.Buffer r6 = new okio.Buffer
                r6.<init>()
            L78:
                if (r4 == 0) goto L8c
                java.nio.charset.Charset r10 = java.nio.charset.StandardCharsets.UTF_8
                boolean r10 = kotlin.jvm.internal.Intrinsics.areEqual(r4, r10)
                if (r10 == 0) goto L83
                goto L8c
            L83:
                int r10 = java.lang.Character.charCount(r7)
                int r10 = r10 + r5
                r6.writeString(r15, r5, r10, r4)
                goto L8f
            L8c:
                r6.writeUtf8CodePoint(r7)
            L8f:
                boolean r10 = r6.exhausted()
                if (r10 != 0) goto Lb7
                byte r10 = r6.readByte()
                r10 = r10 & 255(0xff, float:3.57E-43)
                r14.writeByte(r8)
                char[] r11 = okhttp3.HttpUrl.access$getHEX_DIGITS$cp()
                int r12 = r10 >> 4
                r12 = r12 & 15
                char r11 = r11[r12]
                r14.writeByte(r11)
                char[] r11 = okhttp3.HttpUrl.access$getHEX_DIGITS$cp()
                r10 = r10 & 15
                char r10 = r11[r10]
                r14.writeByte(r10)
                goto L8f
            Lb7:
                int r7 = java.lang.Character.charCount(r7)
                int r5 = r5 + r7
                goto Lc
            Lbe:
                r9 = r13
                return
            */
            throw new UnsupportedOperationException("Method not decompiled: okhttp3.HttpUrl.Companion.writeCanonicalized(okio.Buffer, java.lang.String, int, int, java.lang.String, boolean, boolean, boolean, boolean, java.nio.charset.Charset):void");
        }

        private final void writePercentDecoded(Buffer buffer, String str, int i, int i2, boolean z) {
            int i3;
            while (i < i2) {
                Objects.requireNonNull(str, "null cannot be cast to non-null type java.lang.String");
                int codePointAt = str.codePointAt(i);
                if (codePointAt == 37 && (i3 = i + 2) < i2) {
                    int parseHexDigit = Util.parseHexDigit(str.charAt(i + 1));
                    int parseHexDigit2 = Util.parseHexDigit(str.charAt(i3));
                    if (parseHexDigit != -1 && parseHexDigit2 != -1) {
                        buffer.writeByte((parseHexDigit << 4) + parseHexDigit2);
                        i = Character.charCount(codePointAt) + i3;
                    }
                    buffer.writeUtf8CodePoint(codePointAt);
                    i += Character.charCount(codePointAt);
                } else {
                    if (codePointAt == 43 && z) {
                        buffer.writeByte(32);
                        i++;
                    }
                    buffer.writeUtf8CodePoint(codePointAt);
                    i += Character.charCount(codePointAt);
                }
            }
        }

        @Deprecated(level = DeprecationLevel.ERROR, message = "moved to extension function", replaceWith = @ReplaceWith(expression = "url.toHttpUrl()", imports = {"okhttp3.HttpUrl.Companion.toHttpUrl"}))
        @JvmName(name = "-deprecated_get")
        @NotNull
        /* renamed from: -deprecated_get  reason: not valid java name */
        public final HttpUrl m2261deprecated_get(@NotNull String url) {
            Intrinsics.checkNotNullParameter(url, "url");
            return get(url);
        }

        @Deprecated(level = DeprecationLevel.ERROR, message = "moved to extension function", replaceWith = @ReplaceWith(expression = "url.toHttpUrlOrNull()", imports = {"okhttp3.HttpUrl.Companion.toHttpUrlOrNull"}))
        @JvmName(name = "-deprecated_parse")
        @Nullable
        /* renamed from: -deprecated_parse  reason: not valid java name */
        public final HttpUrl m2264deprecated_parse(@NotNull String url) {
            Intrinsics.checkNotNullParameter(url, "url");
            return parse(url);
        }

        @NotNull
        public final String canonicalize$okhttp(@NotNull String canonicalize, int i, int i2, @NotNull String encodeSet, boolean z, boolean z2, boolean z3, boolean z4, @Nullable Charset charset) {
            boolean contains$default;
            Intrinsics.checkNotNullParameter(canonicalize, "$this$canonicalize");
            Intrinsics.checkNotNullParameter(encodeSet, "encodeSet");
            int i3 = i;
            while (i3 < i2) {
                int codePointAt = canonicalize.codePointAt(i3);
                if (codePointAt >= 32 && codePointAt != 127 && (codePointAt < 128 || z4)) {
                    contains$default = StringsKt__StringsKt.contains$default(encodeSet, (char) codePointAt, false, 2, (Object) null);
                    if (!contains$default) {
                        if (codePointAt == 37) {
                            if (z) {
                                if (z2) {
                                    if (!isPercentEncoded(canonicalize, i3, i2)) {
                                        Buffer buffer = new Buffer();
                                        buffer.writeUtf8(canonicalize, i, i3);
                                        writeCanonicalized(buffer, canonicalize, i3, i2, encodeSet, z, z2, z3, z4, charset);
                                        return buffer.readUtf8();
                                    }
                                    if (codePointAt == 43 || !z3) {
                                        i3 += Character.charCount(codePointAt);
                                    } else {
                                        Buffer buffer2 = new Buffer();
                                        buffer2.writeUtf8(canonicalize, i, i3);
                                        writeCanonicalized(buffer2, canonicalize, i3, i2, encodeSet, z, z2, z3, z4, charset);
                                        return buffer2.readUtf8();
                                    }
                                }
                            }
                        }
                        if (codePointAt == 43) {
                        }
                        i3 += Character.charCount(codePointAt);
                    }
                }
                Buffer buffer22 = new Buffer();
                buffer22.writeUtf8(canonicalize, i, i3);
                writeCanonicalized(buffer22, canonicalize, i3, i2, encodeSet, z, z2, z3, z4, charset);
                return buffer22.readUtf8();
            }
            String substring = canonicalize.substring(i, i2);
            Intrinsics.checkNotNullExpressionValue(substring, "(this as java.lang.Strining(startIndex, endIndex)");
            return substring;
        }

        @JvmStatic
        public final int defaultPort(@NotNull String scheme) {
            Intrinsics.checkNotNullParameter(scheme, "scheme");
            int hashCode = scheme.hashCode();
            if (hashCode != 3213448) {
                if (hashCode == 99617003 && scheme.equals("https")) {
                    return 443;
                }
            } else if (scheme.equals("http")) {
                return 80;
            }
            return -1;
        }

        @JvmStatic
        @JvmName(name = "get")
        @NotNull
        public final HttpUrl get(@NotNull String toHttpUrl) {
            Intrinsics.checkNotNullParameter(toHttpUrl, "$this$toHttpUrl");
            return new Builder().parse$okhttp(null, toHttpUrl).build();
        }

        @JvmStatic
        @JvmName(name = "parse")
        @Nullable
        public final HttpUrl parse(@NotNull String toHttpUrlOrNull) {
            Intrinsics.checkNotNullParameter(toHttpUrlOrNull, "$this$toHttpUrlOrNull");
            try {
                return get(toHttpUrlOrNull);
            } catch (IllegalArgumentException unused) {
                return null;
            }
        }

        @NotNull
        public final String percentDecode$okhttp(@NotNull String percentDecode, int i, int i2, boolean z) {
            Intrinsics.checkNotNullParameter(percentDecode, "$this$percentDecode");
            for (int i3 = i; i3 < i2; i3++) {
                char charAt = percentDecode.charAt(i3);
                if (charAt == '%' || (charAt == '+' && z)) {
                    Buffer buffer = new Buffer();
                    buffer.writeUtf8(percentDecode, i, i3);
                    writePercentDecoded(buffer, percentDecode, i3, i2, z);
                    return buffer.readUtf8();
                }
            }
            String substring = percentDecode.substring(i, i2);
            Intrinsics.checkNotNullExpressionValue(substring, "(this as java.lang.Strining(startIndex, endIndex)");
            return substring;
        }

        public final void toPathString$okhttp(@NotNull List<String> toPathString, @NotNull StringBuilder out) {
            Intrinsics.checkNotNullParameter(toPathString, "$this$toPathString");
            Intrinsics.checkNotNullParameter(out, "out");
            int size = toPathString.size();
            for (int i = 0; i < size; i++) {
                out.append('/');
                out.append(toPathString.get(i));
            }
        }

        @NotNull
        public final List<String> toQueryNamesAndValues$okhttp(@NotNull String toQueryNamesAndValues) {
            int indexOf$default;
            int indexOf$default2;
            Intrinsics.checkNotNullParameter(toQueryNamesAndValues, "$this$toQueryNamesAndValues");
            ArrayList arrayList = new ArrayList();
            int i = 0;
            while (i <= toQueryNamesAndValues.length()) {
                indexOf$default = StringsKt__StringsKt.indexOf$default(toQueryNamesAndValues, (char) Typography.amp, i, false, 4, (Object) null);
                if (indexOf$default == -1) {
                    indexOf$default = toQueryNamesAndValues.length();
                }
                indexOf$default2 = StringsKt__StringsKt.indexOf$default((CharSequence) toQueryNamesAndValues, '=', i, false, 4, (Object) null);
                if (indexOf$default2 != -1 && indexOf$default2 <= indexOf$default) {
                    String substring = toQueryNamesAndValues.substring(i, indexOf$default2);
                    Intrinsics.checkNotNullExpressionValue(substring, "(this as java.lang.Strining(startIndex, endIndex)");
                    arrayList.add(substring);
                    String substring2 = toQueryNamesAndValues.substring(indexOf$default2 + 1, indexOf$default);
                    Intrinsics.checkNotNullExpressionValue(substring2, "(this as java.lang.Strining(startIndex, endIndex)");
                    arrayList.add(substring2);
                } else {
                    String substring3 = toQueryNamesAndValues.substring(i, indexOf$default);
                    Intrinsics.checkNotNullExpressionValue(substring3, "(this as java.lang.Strining(startIndex, endIndex)");
                    arrayList.add(substring3);
                    arrayList.add(null);
                }
                i = indexOf$default + 1;
            }
            return arrayList;
        }

        public final void toQueryString$okhttp(@NotNull List<String> toQueryString, @NotNull StringBuilder out) {
            Intrinsics.checkNotNullParameter(toQueryString, "$this$toQueryString");
            Intrinsics.checkNotNullParameter(out, "out");
            IntProgression step = RangesKt.step(RangesKt.until(0, toQueryString.size()), 2);
            int first = step.getFirst();
            int last = step.getLast();
            int step2 = step.getStep();
            if (step2 >= 0) {
                if (first > last) {
                    return;
                }
            } else if (first < last) {
                return;
            }
            while (true) {
                String str = toQueryString.get(first);
                String str2 = toQueryString.get(first + 1);
                if (first > 0) {
                    out.append(Typography.amp);
                }
                out.append(str);
                if (str2 != null) {
                    out.append('=');
                    out.append(str2);
                }
                if (first == last) {
                    return;
                }
                first += step2;
            }
        }

        public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
            this();
        }

        @Deprecated(level = DeprecationLevel.ERROR, message = "moved to extension function", replaceWith = @ReplaceWith(expression = "url.toHttpUrlOrNull()", imports = {"okhttp3.HttpUrl.Companion.toHttpUrlOrNull"}))
        @JvmName(name = "-deprecated_get")
        @Nullable
        /* renamed from: -deprecated_get  reason: not valid java name */
        public final HttpUrl m2263deprecated_get(@NotNull URL url) {
            Intrinsics.checkNotNullParameter(url, "url");
            return get(url);
        }

        @JvmStatic
        @JvmName(name = "get")
        @Nullable
        public final HttpUrl get(@NotNull URL toHttpUrlOrNull) {
            Intrinsics.checkNotNullParameter(toHttpUrlOrNull, "$this$toHttpUrlOrNull");
            String url = toHttpUrlOrNull.toString();
            Intrinsics.checkNotNullExpressionValue(url, "toString()");
            return parse(url);
        }

        @Deprecated(level = DeprecationLevel.ERROR, message = "moved to extension function", replaceWith = @ReplaceWith(expression = "uri.toHttpUrlOrNull()", imports = {"okhttp3.HttpUrl.Companion.toHttpUrlOrNull"}))
        @JvmName(name = "-deprecated_get")
        @Nullable
        /* renamed from: -deprecated_get  reason: not valid java name */
        public final HttpUrl m2262deprecated_get(@NotNull URI uri) {
            Intrinsics.checkNotNullParameter(uri, "uri");
            return get(uri);
        }

        @JvmStatic
        @JvmName(name = "get")
        @Nullable
        public final HttpUrl get(@NotNull URI toHttpUrlOrNull) {
            Intrinsics.checkNotNullParameter(toHttpUrlOrNull, "$this$toHttpUrlOrNull");
            String uri = toHttpUrlOrNull.toString();
            Intrinsics.checkNotNullExpressionValue(uri, "toString()");
            return parse(uri);
        }
    }

    public HttpUrl(@NotNull String scheme, @NotNull String username, @NotNull String password, @NotNull String host, int i, @NotNull List<String> pathSegments, @Nullable List<String> list, @Nullable String str, @NotNull String url) {
        Intrinsics.checkNotNullParameter(scheme, "scheme");
        Intrinsics.checkNotNullParameter(username, "username");
        Intrinsics.checkNotNullParameter(password, "password");
        Intrinsics.checkNotNullParameter(host, "host");
        Intrinsics.checkNotNullParameter(pathSegments, "pathSegments");
        Intrinsics.checkNotNullParameter(url, "url");
        this.scheme = scheme;
        this.username = username;
        this.password = password;
        this.host = host;
        this.port = i;
        this.pathSegments = pathSegments;
        this.queryNamesAndValues = list;
        this.fragment = str;
        this.url = url;
        this.isHttps = Intrinsics.areEqual(scheme, "https");
    }

    @JvmStatic
    public static final int defaultPort(@NotNull String str) {
        return Companion.defaultPort(str);
    }

    @JvmStatic
    @JvmName(name = "get")
    @NotNull
    public static final HttpUrl get(@NotNull String str) {
        return Companion.get(str);
    }

    @JvmStatic
    @JvmName(name = "get")
    @Nullable
    public static final HttpUrl get(@NotNull URI uri) {
        return Companion.get(uri);
    }

    @JvmStatic
    @JvmName(name = "get")
    @Nullable
    public static final HttpUrl get(@NotNull URL url) {
        return Companion.get(url);
    }

    @JvmStatic
    @JvmName(name = "parse")
    @Nullable
    public static final HttpUrl parse(@NotNull String str) {
        return Companion.parse(str);
    }

    @Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "encodedFragment", imports = {}))
    @JvmName(name = "-deprecated_encodedFragment")
    @Nullable
    /* renamed from: -deprecated_encodedFragment  reason: not valid java name */
    public final String m2242deprecated_encodedFragment() {
        return encodedFragment();
    }

    @Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "encodedPassword", imports = {}))
    @JvmName(name = "-deprecated_encodedPassword")
    @NotNull
    /* renamed from: -deprecated_encodedPassword  reason: not valid java name */
    public final String m2243deprecated_encodedPassword() {
        return encodedPassword();
    }

    @Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "encodedPath", imports = {}))
    @JvmName(name = "-deprecated_encodedPath")
    @NotNull
    /* renamed from: -deprecated_encodedPath  reason: not valid java name */
    public final String m2244deprecated_encodedPath() {
        return encodedPath();
    }

    @Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "encodedPathSegments", imports = {}))
    @JvmName(name = "-deprecated_encodedPathSegments")
    @NotNull
    /* renamed from: -deprecated_encodedPathSegments  reason: not valid java name */
    public final List<String> m2245deprecated_encodedPathSegments() {
        return encodedPathSegments();
    }

    @Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "encodedQuery", imports = {}))
    @JvmName(name = "-deprecated_encodedQuery")
    @Nullable
    /* renamed from: -deprecated_encodedQuery  reason: not valid java name */
    public final String m2246deprecated_encodedQuery() {
        return encodedQuery();
    }

    @Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "encodedUsername", imports = {}))
    @JvmName(name = "-deprecated_encodedUsername")
    @NotNull
    /* renamed from: -deprecated_encodedUsername  reason: not valid java name */
    public final String m2247deprecated_encodedUsername() {
        return encodedUsername();
    }

    @Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "fragment", imports = {}))
    @JvmName(name = "-deprecated_fragment")
    @Nullable
    /* renamed from: -deprecated_fragment  reason: not valid java name */
    public final String m2248deprecated_fragment() {
        return this.fragment;
    }

    @Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "host", imports = {}))
    @JvmName(name = "-deprecated_host")
    @NotNull
    /* renamed from: -deprecated_host  reason: not valid java name */
    public final String m2249deprecated_host() {
        return this.host;
    }

    @Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "password", imports = {}))
    @JvmName(name = "-deprecated_password")
    @NotNull
    /* renamed from: -deprecated_password  reason: not valid java name */
    public final String m2250deprecated_password() {
        return this.password;
    }

    @Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "pathSegments", imports = {}))
    @JvmName(name = "-deprecated_pathSegments")
    @NotNull
    /* renamed from: -deprecated_pathSegments  reason: not valid java name */
    public final List<String> m2251deprecated_pathSegments() {
        return this.pathSegments;
    }

    @Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "pathSize", imports = {}))
    @JvmName(name = "-deprecated_pathSize")
    /* renamed from: -deprecated_pathSize  reason: not valid java name */
    public final int m2252deprecated_pathSize() {
        return pathSize();
    }

    @Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "port", imports = {}))
    @JvmName(name = "-deprecated_port")
    /* renamed from: -deprecated_port  reason: not valid java name */
    public final int m2253deprecated_port() {
        return this.port;
    }

    @Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = SearchIntents.EXTRA_QUERY, imports = {}))
    @JvmName(name = "-deprecated_query")
    @Nullable
    /* renamed from: -deprecated_query  reason: not valid java name */
    public final String m2254deprecated_query() {
        return query();
    }

    @Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "queryParameterNames", imports = {}))
    @JvmName(name = "-deprecated_queryParameterNames")
    @NotNull
    /* renamed from: -deprecated_queryParameterNames  reason: not valid java name */
    public final Set<String> m2255deprecated_queryParameterNames() {
        return queryParameterNames();
    }

    @Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "querySize", imports = {}))
    @JvmName(name = "-deprecated_querySize")
    /* renamed from: -deprecated_querySize  reason: not valid java name */
    public final int m2256deprecated_querySize() {
        return querySize();
    }

    @Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "scheme", imports = {}))
    @JvmName(name = "-deprecated_scheme")
    @NotNull
    /* renamed from: -deprecated_scheme  reason: not valid java name */
    public final String m2257deprecated_scheme() {
        return this.scheme;
    }

    @Deprecated(level = DeprecationLevel.ERROR, message = "moved to toUri()", replaceWith = @ReplaceWith(expression = "toUri()", imports = {}))
    @JvmName(name = "-deprecated_uri")
    @NotNull
    /* renamed from: -deprecated_uri  reason: not valid java name */
    public final URI m2258deprecated_uri() {
        return uri();
    }

    @Deprecated(level = DeprecationLevel.ERROR, message = "moved to toUrl()", replaceWith = @ReplaceWith(expression = "toUrl()", imports = {}))
    @JvmName(name = "-deprecated_url")
    @NotNull
    /* renamed from: -deprecated_url  reason: not valid java name */
    public final URL m2259deprecated_url() {
        return url();
    }

    @Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "username", imports = {}))
    @JvmName(name = "-deprecated_username")
    @NotNull
    /* renamed from: -deprecated_username  reason: not valid java name */
    public final String m2260deprecated_username() {
        return this.username;
    }

    @JvmName(name = "encodedFragment")
    @Nullable
    public final String encodedFragment() {
        int indexOf$default;
        if (this.fragment == null) {
            return null;
        }
        indexOf$default = StringsKt__StringsKt.indexOf$default((CharSequence) this.url, '#', 0, false, 6, (Object) null);
        String str = this.url;
        Objects.requireNonNull(str, "null cannot be cast to non-null type java.lang.String");
        String substring = str.substring(indexOf$default + 1);
        Intrinsics.checkNotNullExpressionValue(substring, "(this as java.lang.String).substring(startIndex)");
        return substring;
    }

    @JvmName(name = "encodedPassword")
    @NotNull
    public final String encodedPassword() {
        int indexOf$default;
        int indexOf$default2;
        if (this.password.length() == 0) {
            return "";
        }
        indexOf$default = StringsKt__StringsKt.indexOf$default((CharSequence) this.url, ':', this.scheme.length() + 3, false, 4, (Object) null);
        indexOf$default2 = StringsKt__StringsKt.indexOf$default((CharSequence) this.url, '@', 0, false, 6, (Object) null);
        String str = this.url;
        Objects.requireNonNull(str, "null cannot be cast to non-null type java.lang.String");
        String substring = str.substring(indexOf$default + 1, indexOf$default2);
        Intrinsics.checkNotNullExpressionValue(substring, "(this as java.lang.Strining(startIndex, endIndex)");
        return substring;
    }

    @JvmName(name = "encodedPath")
    @NotNull
    public final String encodedPath() {
        int indexOf$default;
        indexOf$default = StringsKt__StringsKt.indexOf$default((CharSequence) this.url, '/', this.scheme.length() + 3, false, 4, (Object) null);
        String str = this.url;
        int delimiterOffset = Util.delimiterOffset(str, "?#", indexOf$default, str.length());
        String str2 = this.url;
        Objects.requireNonNull(str2, "null cannot be cast to non-null type java.lang.String");
        String substring = str2.substring(indexOf$default, delimiterOffset);
        Intrinsics.checkNotNullExpressionValue(substring, "(this as java.lang.Strining(startIndex, endIndex)");
        return substring;
    }

    @JvmName(name = "encodedPathSegments")
    @NotNull
    public final List<String> encodedPathSegments() {
        int indexOf$default;
        indexOf$default = StringsKt__StringsKt.indexOf$default((CharSequence) this.url, '/', this.scheme.length() + 3, false, 4, (Object) null);
        String str = this.url;
        int delimiterOffset = Util.delimiterOffset(str, "?#", indexOf$default, str.length());
        ArrayList arrayList = new ArrayList();
        while (indexOf$default < delimiterOffset) {
            int i = indexOf$default + 1;
            int delimiterOffset2 = Util.delimiterOffset(this.url, '/', i, delimiterOffset);
            String str2 = this.url;
            Objects.requireNonNull(str2, "null cannot be cast to non-null type java.lang.String");
            String substring = str2.substring(i, delimiterOffset2);
            Intrinsics.checkNotNullExpressionValue(substring, "(this as java.lang.Strining(startIndex, endIndex)");
            arrayList.add(substring);
            indexOf$default = delimiterOffset2;
        }
        return arrayList;
    }

    @JvmName(name = "encodedQuery")
    @Nullable
    public final String encodedQuery() {
        int indexOf$default;
        if (this.queryNamesAndValues == null) {
            return null;
        }
        indexOf$default = StringsKt__StringsKt.indexOf$default((CharSequence) this.url, '?', 0, false, 6, (Object) null);
        int i = indexOf$default + 1;
        String str = this.url;
        int delimiterOffset = Util.delimiterOffset(str, '#', i, str.length());
        String str2 = this.url;
        Objects.requireNonNull(str2, "null cannot be cast to non-null type java.lang.String");
        String substring = str2.substring(i, delimiterOffset);
        Intrinsics.checkNotNullExpressionValue(substring, "(this as java.lang.Strining(startIndex, endIndex)");
        return substring;
    }

    @JvmName(name = "encodedUsername")
    @NotNull
    public final String encodedUsername() {
        if (this.username.length() == 0) {
            return "";
        }
        int length = this.scheme.length() + 3;
        String str = this.url;
        int delimiterOffset = Util.delimiterOffset(str, ":@", length, str.length());
        String str2 = this.url;
        Objects.requireNonNull(str2, "null cannot be cast to non-null type java.lang.String");
        String substring = str2.substring(length, delimiterOffset);
        Intrinsics.checkNotNullExpressionValue(substring, "(this as java.lang.Strining(startIndex, endIndex)");
        return substring;
    }

    public boolean equals(@Nullable Object obj) {
        return (obj instanceof HttpUrl) && Intrinsics.areEqual(((HttpUrl) obj).url, this.url);
    }

    @JvmName(name = "fragment")
    @Nullable
    public final String fragment() {
        return this.fragment;
    }

    public int hashCode() {
        return this.url.hashCode();
    }

    @JvmName(name = "host")
    @NotNull
    public final String host() {
        return this.host;
    }

    public final boolean isHttps() {
        return this.isHttps;
    }

    @NotNull
    public final Builder newBuilder() {
        Builder builder = new Builder();
        builder.setScheme$okhttp(this.scheme);
        builder.setEncodedUsername$okhttp(encodedUsername());
        builder.setEncodedPassword$okhttp(encodedPassword());
        builder.setHost$okhttp(this.host);
        builder.setPort$okhttp(this.port != Companion.defaultPort(this.scheme) ? this.port : -1);
        builder.getEncodedPathSegments$okhttp().clear();
        builder.getEncodedPathSegments$okhttp().addAll(encodedPathSegments());
        builder.encodedQuery(encodedQuery());
        builder.setEncodedFragment$okhttp(encodedFragment());
        return builder;
    }

    @JvmName(name = "password")
    @NotNull
    public final String password() {
        return this.password;
    }

    @JvmName(name = "pathSegments")
    @NotNull
    public final List<String> pathSegments() {
        return this.pathSegments;
    }

    @JvmName(name = "pathSize")
    public final int pathSize() {
        return this.pathSegments.size();
    }

    @JvmName(name = "port")
    public final int port() {
        return this.port;
    }

    @JvmName(name = SearchIntents.EXTRA_QUERY)
    @Nullable
    public final String query() {
        if (this.queryNamesAndValues == null) {
            return null;
        }
        StringBuilder sb = new StringBuilder();
        Companion.toQueryString$okhttp(this.queryNamesAndValues, sb);
        return sb.toString();
    }

    @Nullable
    public final String queryParameter(@NotNull String name) {
        Intrinsics.checkNotNullParameter(name, "name");
        List<String> list = this.queryNamesAndValues;
        if (list == null) {
            return null;
        }
        IntProgression step = RangesKt.step(RangesKt.until(0, list.size()), 2);
        int first = step.getFirst();
        int last = step.getLast();
        int step2 = step.getStep();
        if (step2 < 0 ? first >= last : first <= last) {
            while (!Intrinsics.areEqual(name, this.queryNamesAndValues.get(first))) {
                if (first != last) {
                    first += step2;
                }
            }
            return this.queryNamesAndValues.get(first + 1);
        }
        return null;
    }

    @NotNull
    public final String queryParameterName(int i) {
        List<String> list = this.queryNamesAndValues;
        if (list != null) {
            String str = list.get(i * 2);
            Intrinsics.checkNotNull(str);
            return str;
        }
        throw new IndexOutOfBoundsException();
    }

    @JvmName(name = "queryParameterNames")
    @NotNull
    public final Set<String> queryParameterNames() {
        if (this.queryNamesAndValues == null) {
            return SetsKt.emptySet();
        }
        LinkedHashSet linkedHashSet = new LinkedHashSet();
        IntProgression step = RangesKt.step(RangesKt.until(0, this.queryNamesAndValues.size()), 2);
        int first = step.getFirst();
        int last = step.getLast();
        int step2 = step.getStep();
        if (step2 < 0 ? first >= last : first <= last) {
            while (true) {
                String str = this.queryNamesAndValues.get(first);
                Intrinsics.checkNotNull(str);
                linkedHashSet.add(str);
                if (first == last) {
                    break;
                }
                first += step2;
            }
        }
        Set<String> unmodifiableSet = Collections.unmodifiableSet(linkedHashSet);
        Intrinsics.checkNotNullExpressionValue(unmodifiableSet, "Collections.unmodifiableSet(result)");
        return unmodifiableSet;
    }

    @Nullable
    public final String queryParameterValue(int i) {
        List<String> list = this.queryNamesAndValues;
        if (list != null) {
            return list.get((i * 2) + 1);
        }
        throw new IndexOutOfBoundsException();
    }

    @NotNull
    public final List<String> queryParameterValues(@NotNull String name) {
        Intrinsics.checkNotNullParameter(name, "name");
        if (this.queryNamesAndValues == null) {
            return CollectionsKt.emptyList();
        }
        ArrayList arrayList = new ArrayList();
        IntProgression step = RangesKt.step(RangesKt.until(0, this.queryNamesAndValues.size()), 2);
        int first = step.getFirst();
        int last = step.getLast();
        int step2 = step.getStep();
        if (step2 < 0 ? first >= last : first <= last) {
            while (true) {
                if (Intrinsics.areEqual(name, this.queryNamesAndValues.get(first))) {
                    arrayList.add(this.queryNamesAndValues.get(first + 1));
                }
                if (first == last) {
                    break;
                }
                first += step2;
            }
        }
        List<String> unmodifiableList = Collections.unmodifiableList(arrayList);
        Intrinsics.checkNotNullExpressionValue(unmodifiableList, "Collections.unmodifiableList(result)");
        return unmodifiableList;
    }

    @JvmName(name = "querySize")
    public final int querySize() {
        List<String> list = this.queryNamesAndValues;
        if (list != null) {
            return list.size() / 2;
        }
        return 0;
    }

    @NotNull
    public final String redact() {
        Builder newBuilder = newBuilder("/...");
        Intrinsics.checkNotNull(newBuilder);
        return newBuilder.username("").password("").build().toString();
    }

    @Nullable
    public final HttpUrl resolve(@NotNull String link) {
        Intrinsics.checkNotNullParameter(link, "link");
        Builder newBuilder = newBuilder(link);
        if (newBuilder != null) {
            return newBuilder.build();
        }
        return null;
    }

    @JvmName(name = "scheme")
    @NotNull
    public final String scheme() {
        return this.scheme;
    }

    @NotNull
    public String toString() {
        return this.url;
    }

    @Nullable
    public final String topPrivateDomain() {
        if (Util.canParseAsIpAddress(this.host)) {
            return null;
        }
        return PublicSuffixDatabase.Companion.get().getEffectiveTldPlusOne(this.host);
    }

    @JvmName(name = "uri")
    @NotNull
    public final URI uri() {
        String builder = newBuilder().reencodeForUri$okhttp().toString();
        try {
            return new URI(builder);
        } catch (URISyntaxException e) {
            try {
                URI create = URI.create(new Regex("[\\u0000-\\u001F\\u007F-\\u009F\\p{javaWhitespace}]").replace(builder, ""));
                Intrinsics.checkNotNullExpressionValue(create, "try {\n        val strippe) // Unexpected!\n      }");
                return create;
            } catch (Exception unused) {
                throw new RuntimeException(e);
            }
        }
    }

    @JvmName(name = ImagesContract.URL)
    @NotNull
    public final URL url() {
        try {
            return new URL(this.url);
        } catch (MalformedURLException e) {
            throw new RuntimeException(e);
        }
    }

    @JvmName(name = "username")
    @NotNull
    public final String username() {
        return this.username;
    }

    @Nullable
    public final Builder newBuilder(@NotNull String link) {
        Intrinsics.checkNotNullParameter(link, "link");
        try {
            return new Builder().parse$okhttp(this, link);
        } catch (IllegalArgumentException unused) {
            return null;
        }
    }
}

Function Calls

None

Variables

None

Stats

MD5 0b454792a63687abd95f37c086956b6c
Eval Count 0
Decode Time 249 ms