2021-08-03 07:33:18 +00:00
|
|
|
package f0;
|
|
|
|
|
2021-11-02 06:38:17 +00:00
|
|
|
import com.adjust.sdk.Constants;
|
|
|
|
import com.discord.widgets.chat.input.MentionUtilsKt;
|
|
|
|
import com.google.android.material.badge.BadgeDrawable;
|
2022-03-07 09:34:54 +00:00
|
|
|
import d0.d0.f;
|
|
|
|
import d0.g0.c;
|
2021-11-02 06:38:17 +00:00
|
|
|
import d0.t.o;
|
|
|
|
import d0.z.d.m;
|
|
|
|
import g0.e;
|
|
|
|
import java.net.URI;
|
|
|
|
import java.net.URISyntaxException;
|
|
|
|
import java.nio.charset.Charset;
|
|
|
|
import java.nio.charset.StandardCharsets;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.Objects;
|
|
|
|
import kotlin.TypeCastException;
|
|
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
|
|
import kotlin.ranges.IntProgression;
|
|
|
|
import kotlin.text.Regex;
|
2022-03-07 09:34:54 +00:00
|
|
|
import org.objectweb.asm.Opcodes;
|
2021-11-02 06:38:17 +00:00
|
|
|
/* compiled from: HttpUrl.kt */
|
2022-03-07 09:34:54 +00:00
|
|
|
/* loaded from: classes3.dex */
|
2021-11-02 06:38:17 +00:00
|
|
|
public final class w {
|
2021-12-17 21:59:34 +00:00
|
|
|
public final boolean c;
|
2021-11-02 06:38:17 +00:00
|
|
|
public final String d;
|
|
|
|
public final String e;
|
|
|
|
public final String f;
|
|
|
|
public final String g;
|
|
|
|
public final int h;
|
|
|
|
public final List<String> i;
|
|
|
|
public final List<String> j;
|
|
|
|
public final String k;
|
|
|
|
public final String l;
|
|
|
|
|
2022-03-07 09:34:54 +00:00
|
|
|
/* renamed from: b reason: collision with root package name */
|
2022-03-12 00:35:13 +00:00
|
|
|
public static final b f3655b = new b(null);
|
2022-03-07 09:34:54 +00:00
|
|
|
public static final char[] a = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
|
|
|
|
|
2021-11-02 06:38:17 +00:00
|
|
|
/* compiled from: HttpUrl.kt */
|
2022-03-07 09:34:54 +00:00
|
|
|
/* loaded from: classes3.dex */
|
2021-11-02 06:38:17 +00:00
|
|
|
public static final class a {
|
2022-03-07 09:34:54 +00:00
|
|
|
public static final C0385a a = new C0385a(null);
|
2021-11-02 06:38:17 +00:00
|
|
|
|
2021-12-17 21:59:34 +00:00
|
|
|
/* renamed from: b reason: collision with root package name */
|
2022-03-12 00:35:13 +00:00
|
|
|
public String f3656b;
|
2021-11-02 06:38:17 +00:00
|
|
|
public String e;
|
|
|
|
public final List<String> g;
|
|
|
|
public List<String> h;
|
|
|
|
public String i;
|
2022-03-07 09:34:54 +00:00
|
|
|
public String c = "";
|
|
|
|
public String d = "";
|
|
|
|
public int f = -1;
|
2021-11-02 06:38:17 +00:00
|
|
|
|
|
|
|
/* compiled from: HttpUrl.kt */
|
|
|
|
/* renamed from: f0.w$a$a reason: collision with other inner class name */
|
2022-03-07 09:34:54 +00:00
|
|
|
/* loaded from: classes3.dex */
|
|
|
|
public static final class C0385a {
|
|
|
|
public C0385a(DefaultConstructorMarker defaultConstructorMarker) {
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public a() {
|
|
|
|
ArrayList arrayList = new ArrayList();
|
|
|
|
this.g = arrayList;
|
|
|
|
arrayList.add("");
|
|
|
|
}
|
|
|
|
|
|
|
|
public final a a(String str, String str2) {
|
|
|
|
m.checkParameterIsNotNull(str, "encodedName");
|
|
|
|
if (this.h == null) {
|
|
|
|
this.h = new ArrayList();
|
|
|
|
}
|
|
|
|
List<String> list = this.h;
|
|
|
|
if (list == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
2022-03-12 00:35:13 +00:00
|
|
|
b bVar = w.f3655b;
|
2021-11-02 06:38:17 +00:00
|
|
|
list.add(b.a(bVar, str, 0, 0, " \"'<>#&=", true, false, true, false, null, 211));
|
|
|
|
List<String> list2 = this.h;
|
|
|
|
if (list2 == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
|
|
|
list2.add(str2 != null ? b.a(bVar, str2, 0, 0, " \"'<>#&=", true, false, true, false, null, 211) : null);
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final w b() {
|
|
|
|
ArrayList arrayList;
|
2022-03-12 00:35:13 +00:00
|
|
|
String str = this.f3656b;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (str != null) {
|
2022-03-12 00:35:13 +00:00
|
|
|
b bVar = w.f3655b;
|
2021-12-17 21:59:34 +00:00
|
|
|
String d = b.d(bVar, this.c, 0, 0, false, 7);
|
2021-11-02 06:38:17 +00:00
|
|
|
String d2 = b.d(bVar, this.d, 0, 0, false, 7);
|
|
|
|
String str2 = this.e;
|
|
|
|
if (str2 != null) {
|
2021-12-17 21:59:34 +00:00
|
|
|
int c = c();
|
2021-11-02 06:38:17 +00:00
|
|
|
List<String> list = this.g;
|
|
|
|
ArrayList arrayList2 = new ArrayList(o.collectionSizeOrDefault(list, 10));
|
|
|
|
for (String str3 : list) {
|
2022-03-12 00:35:13 +00:00
|
|
|
arrayList2.add(b.d(w.f3655b, str3, 0, 0, false, 7));
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
List<String> list2 = this.h;
|
|
|
|
if (list2 != null) {
|
|
|
|
arrayList = new ArrayList(o.collectionSizeOrDefault(list2, 10));
|
|
|
|
for (String str4 : list2) {
|
2022-03-12 00:35:13 +00:00
|
|
|
arrayList.add(str4 != null ? b.d(w.f3655b, str4, 0, 0, true, 3) : null);
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
} else {
|
|
|
|
arrayList = null;
|
|
|
|
}
|
|
|
|
String str5 = this.i;
|
2022-03-12 00:35:13 +00:00
|
|
|
return new w(str, d, d2, str2, c, arrayList2, arrayList, str5 != null ? b.d(w.f3655b, str5, 0, 0, false, 7) : null, toString());
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
throw new IllegalStateException("host == null");
|
|
|
|
}
|
|
|
|
throw new IllegalStateException("scheme == null");
|
|
|
|
}
|
|
|
|
|
|
|
|
public final int c() {
|
|
|
|
int i = this.f;
|
|
|
|
if (i != -1) {
|
|
|
|
return i;
|
|
|
|
}
|
2022-03-12 00:35:13 +00:00
|
|
|
String str = this.f3656b;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (str == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
|
|
|
m.checkParameterIsNotNull(str, "scheme");
|
|
|
|
int hashCode = str.hashCode();
|
|
|
|
if (hashCode != 3213448) {
|
|
|
|
if (hashCode == 99617003 && str.equals(Constants.SCHEME)) {
|
|
|
|
return 443;
|
|
|
|
}
|
|
|
|
} else if (str.equals("http")) {
|
|
|
|
return 80;
|
|
|
|
}
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final a d(String str) {
|
|
|
|
List<String> list;
|
|
|
|
if (str != null) {
|
2022-03-12 00:35:13 +00:00
|
|
|
b bVar = w.f3655b;
|
2021-11-02 06:38:17 +00:00
|
|
|
String a2 = b.a(bVar, str, 0, 0, " \"'<>#", true, false, true, false, null, 211);
|
|
|
|
if (a2 != null) {
|
|
|
|
list = bVar.e(a2);
|
|
|
|
this.h = list;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
list = null;
|
|
|
|
this.h = list;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2022-03-07 09:34:54 +00:00
|
|
|
/* JADX ERROR: JadxRuntimeException in pass: BlockProcessor
|
|
|
|
jadx.core.utils.exceptions.JadxRuntimeException: Unreachable block: B:109:0x0260
|
|
|
|
at jadx.core.dex.visitors.blocks.BlockProcessor.checkForUnreachableBlocks(BlockProcessor.java:90)
|
|
|
|
at jadx.core.dex.visitors.blocks.BlockProcessor.processBlocksTree(BlockProcessor.java:52)
|
|
|
|
at jadx.core.dex.visitors.blocks.BlockProcessor.visit(BlockProcessor.java:44)
|
|
|
|
*/
|
|
|
|
public final f0.w.a e(f0.w r30, java.lang.String r31) {
|
|
|
|
/*
|
|
|
|
Method dump skipped, instructions count: 1194
|
|
|
|
To view this dump add '--comments-level debug' option
|
|
|
|
*/
|
|
|
|
throw new UnsupportedOperationException("Method not decompiled: f0.w.a.e(f0.w, java.lang.String):f0.w$a");
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
|
2022-03-07 09:34:54 +00:00
|
|
|
/* JADX WARN: Code restructure failed: missing block: B:16:0x0033, code lost:
|
2021-11-02 06:38:17 +00:00
|
|
|
if ((r9.d.length() > 0) != false) goto L_0x0035;
|
|
|
|
*/
|
2022-03-07 09:34:54 +00:00
|
|
|
/* JADX WARN: Code restructure failed: missing block: B:49:0x00b8, code lost:
|
2021-11-02 06:38:17 +00:00
|
|
|
if (r1 != r5) goto L_0x00ba;
|
|
|
|
*/
|
2022-03-07 09:34:54 +00:00
|
|
|
/*
|
|
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
|
|
*/
|
2021-11-02 06:38:17 +00:00
|
|
|
public String toString() {
|
|
|
|
StringBuilder sb = new StringBuilder();
|
2022-03-12 00:35:13 +00:00
|
|
|
String str = this.f3656b;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (str != null) {
|
|
|
|
sb.append(str);
|
|
|
|
sb.append("://");
|
|
|
|
} else {
|
|
|
|
sb.append("//");
|
|
|
|
}
|
|
|
|
boolean z2 = true;
|
2021-12-17 21:59:34 +00:00
|
|
|
if (!(this.c.length() > 0)) {
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
2021-12-17 21:59:34 +00:00
|
|
|
sb.append(this.c);
|
2021-11-02 06:38:17 +00:00
|
|
|
if (this.d.length() <= 0) {
|
|
|
|
z2 = false;
|
|
|
|
}
|
|
|
|
if (z2) {
|
|
|
|
sb.append(MentionUtilsKt.EMOJIS_AND_STICKERS_CHAR);
|
|
|
|
sb.append(this.d);
|
|
|
|
}
|
|
|
|
sb.append(MentionUtilsKt.MENTIONS_CHAR);
|
|
|
|
String str2 = this.e;
|
|
|
|
if (str2 != null) {
|
|
|
|
if (str2 == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
|
|
|
if (d0.g0.w.contains$default((CharSequence) str2, (char) MentionUtilsKt.EMOJIS_AND_STICKERS_CHAR, false, 2, (Object) null)) {
|
|
|
|
sb.append('[');
|
|
|
|
sb.append(this.e);
|
|
|
|
sb.append(']');
|
|
|
|
} else {
|
|
|
|
sb.append(this.e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
int i = -1;
|
2022-03-12 00:35:13 +00:00
|
|
|
if (!(this.f == -1 && this.f3656b == null)) {
|
2021-12-17 21:59:34 +00:00
|
|
|
int c = c();
|
2022-03-12 00:35:13 +00:00
|
|
|
String str3 = this.f3656b;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (str3 != null) {
|
|
|
|
if (str3 == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
|
|
|
m.checkParameterIsNotNull(str3, "scheme");
|
|
|
|
int hashCode = str3.hashCode();
|
|
|
|
if (hashCode != 3213448) {
|
|
|
|
if (hashCode == 99617003 && str3.equals(Constants.SCHEME)) {
|
|
|
|
i = 443;
|
|
|
|
}
|
|
|
|
} else if (str3.equals("http")) {
|
|
|
|
i = 80;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
sb.append(MentionUtilsKt.EMOJIS_AND_STICKERS_CHAR);
|
2021-12-17 21:59:34 +00:00
|
|
|
sb.append(c);
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
List<String> list = this.g;
|
|
|
|
m.checkParameterIsNotNull(list, "$this$toPathString");
|
|
|
|
m.checkParameterIsNotNull(sb, "out");
|
|
|
|
int size = list.size();
|
|
|
|
for (int i2 = 0; i2 < size; i2++) {
|
|
|
|
sb.append(MentionUtilsKt.SLASH_CHAR);
|
|
|
|
sb.append(list.get(i2));
|
|
|
|
}
|
|
|
|
if (this.h != null) {
|
|
|
|
sb.append('?');
|
|
|
|
List<String> list2 = this.h;
|
|
|
|
if (list2 == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
|
|
|
m.checkParameterIsNotNull(list2, "$this$toQueryString");
|
|
|
|
m.checkParameterIsNotNull(sb, "out");
|
2022-03-07 09:34:54 +00:00
|
|
|
IntProgression step = f.step(f.until(0, list2.size()), 2);
|
2021-11-02 06:38:17 +00:00
|
|
|
int first = step.getFirst();
|
|
|
|
int last = step.getLast();
|
|
|
|
int step2 = step.getStep();
|
|
|
|
if (step2 < 0 ? first >= last : first <= last) {
|
|
|
|
while (true) {
|
|
|
|
String str4 = list2.get(first);
|
|
|
|
String str5 = list2.get(first + 1);
|
|
|
|
if (first > 0) {
|
|
|
|
sb.append('&');
|
|
|
|
}
|
|
|
|
sb.append(str4);
|
|
|
|
if (str5 != null) {
|
|
|
|
sb.append('=');
|
|
|
|
sb.append(str5);
|
|
|
|
}
|
|
|
|
if (first == last) {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
first += step2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (this.i != null) {
|
|
|
|
sb.append(MentionUtilsKt.CHANNELS_CHAR);
|
|
|
|
sb.append(this.i);
|
|
|
|
}
|
|
|
|
String sb2 = sb.toString();
|
|
|
|
m.checkExpressionValueIsNotNull(sb2, "StringBuilder().apply(builderAction).toString()");
|
|
|
|
return sb2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* compiled from: HttpUrl.kt */
|
2022-03-07 09:34:54 +00:00
|
|
|
/* loaded from: classes3.dex */
|
2021-11-02 06:38:17 +00:00
|
|
|
public static final class b {
|
|
|
|
public b(DefaultConstructorMarker defaultConstructorMarker) {
|
|
|
|
}
|
|
|
|
|
|
|
|
public static String a(b bVar, String str, int i, int i2, String str2, boolean z2, boolean z3, boolean z4, boolean z5, Charset charset, int i3) {
|
|
|
|
String str3;
|
|
|
|
int i4 = (i3 & 1) != 0 ? 0 : i;
|
|
|
|
int length = (i3 & 2) != 0 ? str.length() : i2;
|
2022-03-07 09:34:54 +00:00
|
|
|
boolean z6 = (i3 & 8) != 0 ? false : z2;
|
|
|
|
boolean z7 = (i3 & 16) != 0 ? false : z3;
|
|
|
|
boolean z8 = (i3 & 32) != 0 ? false : z4;
|
|
|
|
boolean z9 = (i3 & 64) != 0 ? false : z5;
|
2021-11-02 06:38:17 +00:00
|
|
|
Charset charset2 = (i3 & 128) != 0 ? null : charset;
|
|
|
|
m.checkParameterIsNotNull(str, "$this$canonicalize");
|
|
|
|
m.checkParameterIsNotNull(str2, "encodeSet");
|
|
|
|
int i5 = i4;
|
|
|
|
while (i5 < length) {
|
|
|
|
int codePointAt = str.codePointAt(i5);
|
|
|
|
int i6 = 2;
|
2022-03-07 09:34:54 +00:00
|
|
|
if (codePointAt < 32 || codePointAt == 127 || (codePointAt >= 128 && !z9)) {
|
2021-11-02 06:38:17 +00:00
|
|
|
str3 = "(this as java.lang.Strin…ing(startIndex, endIndex)";
|
|
|
|
} else {
|
|
|
|
str3 = "(this as java.lang.Strin…ing(startIndex, endIndex)";
|
2022-03-07 09:34:54 +00:00
|
|
|
if (!d0.g0.w.contains$default((CharSequence) str2, (char) codePointAt, false, 2, (Object) null) && ((codePointAt != 37 || (z6 && (!z7 || bVar.c(str, i5, length)))) && (codePointAt != 43 || !z8))) {
|
2021-11-02 06:38:17 +00:00
|
|
|
i5 += Character.charCount(codePointAt);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
e eVar = new e();
|
|
|
|
eVar.c0(str, i4, i5);
|
|
|
|
e eVar2 = null;
|
|
|
|
while (i5 < length) {
|
|
|
|
int codePointAt2 = str.codePointAt(i5);
|
2022-03-07 09:34:54 +00:00
|
|
|
if (!z6 || !(codePointAt2 == 9 || codePointAt2 == 10 || codePointAt2 == 12 || codePointAt2 == 13)) {
|
|
|
|
if (codePointAt2 != 43 || !z8) {
|
|
|
|
if (codePointAt2 < 32 || codePointAt2 == 127 || (codePointAt2 >= 128 && !z9)) {
|
|
|
|
z8 = z8;
|
2021-11-02 06:38:17 +00:00
|
|
|
} else {
|
2022-03-07 09:34:54 +00:00
|
|
|
z8 = z8;
|
|
|
|
if (!d0.g0.w.contains$default((CharSequence) str2, (char) codePointAt2, false, i6, (Object) null) && (codePointAt2 != 37 || (z6 && (!z7 || bVar.c(str, i5, length))))) {
|
2021-11-05 06:48:17 +00:00
|
|
|
eVar.d0(codePointAt2);
|
2022-03-07 09:34:54 +00:00
|
|
|
str3 = str3;
|
2021-11-02 06:38:17 +00:00
|
|
|
i5 += Character.charCount(codePointAt2);
|
|
|
|
i6 = 2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (eVar2 == null) {
|
|
|
|
eVar2 = new e();
|
|
|
|
}
|
|
|
|
if (charset2 == null || m.areEqual(charset2, StandardCharsets.UTF_8)) {
|
2022-03-07 09:34:54 +00:00
|
|
|
str3 = str3;
|
2021-11-05 06:48:17 +00:00
|
|
|
eVar2.d0(codePointAt2);
|
2021-11-02 06:38:17 +00:00
|
|
|
} else {
|
|
|
|
int charCount = Character.charCount(codePointAt2) + i5;
|
|
|
|
m.checkParameterIsNotNull(str, "string");
|
|
|
|
m.checkParameterIsNotNull(charset2, "charset");
|
2022-03-07 09:34:54 +00:00
|
|
|
boolean z10 = true;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (i5 >= 0) {
|
|
|
|
if (charCount >= i5) {
|
|
|
|
if (charCount > str.length()) {
|
2022-03-07 09:34:54 +00:00
|
|
|
z10 = false;
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
2022-03-07 09:34:54 +00:00
|
|
|
if (!z10) {
|
2021-12-17 21:59:34 +00:00
|
|
|
StringBuilder S = b.d.b.a.a.S("endIndex > string.length: ", charCount, " > ");
|
2021-11-05 06:48:17 +00:00
|
|
|
S.append(str.length());
|
|
|
|
throw new IllegalArgumentException(S.toString().toString());
|
2022-03-07 09:34:54 +00:00
|
|
|
} else if (m.areEqual(charset2, c.a)) {
|
2021-11-02 06:38:17 +00:00
|
|
|
eVar2.c0(str, i5, charCount);
|
2022-03-07 09:34:54 +00:00
|
|
|
str3 = str3;
|
2021-11-02 06:38:17 +00:00
|
|
|
} else {
|
|
|
|
String substring = str.substring(i5, charCount);
|
2022-03-07 09:34:54 +00:00
|
|
|
str3 = str3;
|
|
|
|
m.checkExpressionValueIsNotNull(substring, str3);
|
2021-11-02 06:38:17 +00:00
|
|
|
if (substring != null) {
|
|
|
|
byte[] bytes = substring.getBytes(charset2);
|
|
|
|
m.checkExpressionValueIsNotNull(bytes, "(this as java.lang.String).getBytes(charset)");
|
|
|
|
eVar2.S(bytes, 0, bytes.length);
|
|
|
|
} else {
|
|
|
|
throw new TypeCastException("null cannot be cast to non-null type java.lang.String");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
2021-12-17 21:59:34 +00:00
|
|
|
throw new IllegalArgumentException(b.d.b.a.a.r("endIndex < beginIndex: ", charCount, " < ", i5).toString());
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
} else {
|
2021-12-17 21:59:34 +00:00
|
|
|
throw new IllegalArgumentException(b.d.b.a.a.p("beginIndex < 0: ", i5).toString());
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
}
|
2021-11-05 06:48:17 +00:00
|
|
|
while (!eVar2.w()) {
|
2021-11-02 06:38:17 +00:00
|
|
|
int readByte = eVar2.readByte() & 255;
|
|
|
|
eVar.T(37);
|
|
|
|
char[] cArr = w.a;
|
|
|
|
eVar.T(cArr[(readByte >> 4) & 15]);
|
|
|
|
eVar.T(cArr[readByte & 15]);
|
|
|
|
}
|
|
|
|
i5 += Character.charCount(codePointAt2);
|
|
|
|
i6 = 2;
|
|
|
|
} else {
|
2022-03-07 09:34:54 +00:00
|
|
|
eVar.b0(z6 ? BadgeDrawable.DEFAULT_EXCEED_MAX_BADGE_NUMBER_SUFFIX : "%2B");
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
}
|
2022-03-07 09:34:54 +00:00
|
|
|
z8 = z8;
|
|
|
|
str3 = str3;
|
2021-11-02 06:38:17 +00:00
|
|
|
i5 += Character.charCount(codePointAt2);
|
|
|
|
i6 = 2;
|
|
|
|
}
|
2021-11-05 06:48:17 +00:00
|
|
|
return eVar.D();
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
String substring2 = str.substring(i4, length);
|
|
|
|
m.checkExpressionValueIsNotNull(substring2, "(this as java.lang.Strin…ing(startIndex, endIndex)");
|
|
|
|
return substring2;
|
|
|
|
}
|
|
|
|
|
|
|
|
public static String d(b bVar, String str, int i, int i2, boolean z2, int i3) {
|
|
|
|
int i4;
|
|
|
|
if ((i3 & 1) != 0) {
|
|
|
|
i = 0;
|
|
|
|
}
|
|
|
|
if ((i3 & 2) != 0) {
|
|
|
|
i2 = str.length();
|
|
|
|
}
|
|
|
|
if ((i3 & 4) != 0) {
|
|
|
|
z2 = false;
|
|
|
|
}
|
|
|
|
m.checkParameterIsNotNull(str, "$this$percentDecode");
|
|
|
|
int i5 = i;
|
|
|
|
while (i5 < i2) {
|
|
|
|
char charAt = str.charAt(i5);
|
|
|
|
if (charAt == '%' || (charAt == '+' && z2)) {
|
|
|
|
e eVar = new e();
|
|
|
|
eVar.c0(str, i, i5);
|
|
|
|
while (i5 < i2) {
|
|
|
|
int codePointAt = str.codePointAt(i5);
|
2022-03-07 09:34:54 +00:00
|
|
|
if (codePointAt != 37 || (i4 = i5 + 2) >= i2) {
|
|
|
|
if (codePointAt == 43 && z2) {
|
|
|
|
eVar.T(32);
|
|
|
|
i5++;
|
|
|
|
}
|
|
|
|
eVar.d0(codePointAt);
|
|
|
|
i5 += Character.charCount(codePointAt);
|
|
|
|
} else {
|
|
|
|
int r = f0.e0.c.r(str.charAt(i5 + 1));
|
|
|
|
int r2 = f0.e0.c.r(str.charAt(i4));
|
2021-11-02 06:38:17 +00:00
|
|
|
if (!(r == -1 || r2 == -1)) {
|
|
|
|
eVar.T((r << 4) + r2);
|
|
|
|
i5 = Character.charCount(codePointAt) + i4;
|
|
|
|
}
|
2022-03-07 09:34:54 +00:00
|
|
|
eVar.d0(codePointAt);
|
|
|
|
i5 += Character.charCount(codePointAt);
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
}
|
2021-11-05 06:48:17 +00:00
|
|
|
return eVar.D();
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
i5++;
|
|
|
|
}
|
|
|
|
String substring = str.substring(i, i2);
|
|
|
|
m.checkExpressionValueIsNotNull(substring, "(this as java.lang.Strin…ing(startIndex, endIndex)");
|
|
|
|
return substring;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final int b(String str) {
|
|
|
|
m.checkParameterIsNotNull(str, "scheme");
|
|
|
|
int hashCode = str.hashCode();
|
|
|
|
if (hashCode != 3213448) {
|
|
|
|
if (hashCode == 99617003 && str.equals(Constants.SCHEME)) {
|
|
|
|
return 443;
|
|
|
|
}
|
|
|
|
} else if (str.equals("http")) {
|
|
|
|
return 80;
|
|
|
|
}
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final boolean c(String str, int i, int i2) {
|
|
|
|
int i3 = i + 2;
|
2022-03-07 09:34:54 +00:00
|
|
|
return i3 < i2 && str.charAt(i) == '%' && f0.e0.c.r(str.charAt(i + 1)) != -1 && f0.e0.c.r(str.charAt(i3)) != -1;
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public final List<String> e(String str) {
|
|
|
|
m.checkParameterIsNotNull(str, "$this$toQueryNamesAndValues");
|
|
|
|
ArrayList arrayList = new ArrayList();
|
|
|
|
int i = 0;
|
|
|
|
while (i <= str.length()) {
|
|
|
|
int indexOf$default = d0.g0.w.indexOf$default((CharSequence) str, '&', i, false, 4, (Object) null);
|
|
|
|
if (indexOf$default == -1) {
|
|
|
|
indexOf$default = str.length();
|
|
|
|
}
|
|
|
|
int indexOf$default2 = d0.g0.w.indexOf$default((CharSequence) str, '=', i, false, 4, (Object) null);
|
|
|
|
if (indexOf$default2 == -1 || indexOf$default2 > indexOf$default) {
|
|
|
|
String substring = str.substring(i, indexOf$default);
|
|
|
|
m.checkExpressionValueIsNotNull(substring, "(this as java.lang.Strin…ing(startIndex, endIndex)");
|
|
|
|
arrayList.add(substring);
|
|
|
|
arrayList.add(null);
|
|
|
|
} else {
|
|
|
|
String substring2 = str.substring(i, indexOf$default2);
|
|
|
|
m.checkExpressionValueIsNotNull(substring2, "(this as java.lang.Strin…ing(startIndex, endIndex)");
|
|
|
|
arrayList.add(substring2);
|
|
|
|
String substring3 = str.substring(indexOf$default2 + 1, indexOf$default);
|
|
|
|
m.checkExpressionValueIsNotNull(substring3, "(this as java.lang.Strin…ing(startIndex, endIndex)");
|
|
|
|
arrayList.add(substring3);
|
|
|
|
}
|
|
|
|
i = indexOf$default + 1;
|
|
|
|
}
|
|
|
|
return arrayList;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public w(String str, String str2, String str3, String str4, int i, List<String> list, List<String> list2, String str5, String str6) {
|
|
|
|
m.checkParameterIsNotNull(str, "scheme");
|
|
|
|
m.checkParameterIsNotNull(str2, "username");
|
|
|
|
m.checkParameterIsNotNull(str3, "password");
|
|
|
|
m.checkParameterIsNotNull(str4, "host");
|
|
|
|
m.checkParameterIsNotNull(list, "pathSegments");
|
|
|
|
m.checkParameterIsNotNull(str6, "url");
|
|
|
|
this.d = str;
|
|
|
|
this.e = str2;
|
|
|
|
this.f = str3;
|
|
|
|
this.g = str4;
|
|
|
|
this.h = i;
|
|
|
|
this.i = list;
|
|
|
|
this.j = list2;
|
|
|
|
this.k = str5;
|
|
|
|
this.l = str6;
|
2021-12-17 21:59:34 +00:00
|
|
|
this.c = m.areEqual(str, Constants.SCHEME);
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public final String a() {
|
|
|
|
if (this.f.length() == 0) {
|
|
|
|
return "";
|
|
|
|
}
|
|
|
|
int indexOf$default = d0.g0.w.indexOf$default((CharSequence) this.l, (char) MentionUtilsKt.EMOJIS_AND_STICKERS_CHAR, this.d.length() + 3, false, 4, (Object) null) + 1;
|
|
|
|
int indexOf$default2 = d0.g0.w.indexOf$default((CharSequence) this.l, (char) MentionUtilsKt.MENTIONS_CHAR, 0, false, 6, (Object) null);
|
|
|
|
String str = this.l;
|
|
|
|
if (str != null) {
|
|
|
|
String substring = str.substring(indexOf$default, indexOf$default2);
|
|
|
|
m.checkExpressionValueIsNotNull(substring, "(this as java.lang.Strin…ing(startIndex, endIndex)");
|
|
|
|
return substring;
|
|
|
|
}
|
|
|
|
throw new TypeCastException("null cannot be cast to non-null type java.lang.String");
|
|
|
|
}
|
|
|
|
|
|
|
|
public final String b() {
|
|
|
|
int indexOf$default = d0.g0.w.indexOf$default((CharSequence) this.l, (char) MentionUtilsKt.SLASH_CHAR, this.d.length() + 3, false, 4, (Object) null);
|
|
|
|
String str = this.l;
|
2022-03-07 09:34:54 +00:00
|
|
|
int g = f0.e0.c.g(str, "?#", indexOf$default, str.length());
|
2021-11-02 06:38:17 +00:00
|
|
|
String str2 = this.l;
|
|
|
|
if (str2 != null) {
|
|
|
|
String substring = str2.substring(indexOf$default, g);
|
|
|
|
m.checkExpressionValueIsNotNull(substring, "(this as java.lang.Strin…ing(startIndex, endIndex)");
|
|
|
|
return substring;
|
|
|
|
}
|
|
|
|
throw new TypeCastException("null cannot be cast to non-null type java.lang.String");
|
|
|
|
}
|
|
|
|
|
|
|
|
public final List<String> c() {
|
|
|
|
int indexOf$default = d0.g0.w.indexOf$default((CharSequence) this.l, (char) MentionUtilsKt.SLASH_CHAR, this.d.length() + 3, false, 4, (Object) null);
|
|
|
|
String str = this.l;
|
2022-03-07 09:34:54 +00:00
|
|
|
int g = f0.e0.c.g(str, "?#", indexOf$default, str.length());
|
2021-11-02 06:38:17 +00:00
|
|
|
ArrayList arrayList = new ArrayList();
|
|
|
|
while (indexOf$default < g) {
|
|
|
|
int i = indexOf$default + 1;
|
2022-03-07 09:34:54 +00:00
|
|
|
int f = f0.e0.c.f(this.l, MentionUtilsKt.SLASH_CHAR, i, g);
|
2021-11-02 06:38:17 +00:00
|
|
|
String str2 = this.l;
|
|
|
|
if (str2 != null) {
|
|
|
|
String substring = str2.substring(i, f);
|
|
|
|
m.checkExpressionValueIsNotNull(substring, "(this as java.lang.Strin…ing(startIndex, endIndex)");
|
|
|
|
arrayList.add(substring);
|
|
|
|
indexOf$default = f;
|
|
|
|
} else {
|
|
|
|
throw new TypeCastException("null cannot be cast to non-null type java.lang.String");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return arrayList;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final String d() {
|
|
|
|
if (this.j == null) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
int indexOf$default = d0.g0.w.indexOf$default((CharSequence) this.l, '?', 0, false, 6, (Object) null) + 1;
|
|
|
|
String str = this.l;
|
2022-03-07 09:34:54 +00:00
|
|
|
int f = f0.e0.c.f(str, MentionUtilsKt.CHANNELS_CHAR, indexOf$default, str.length());
|
2021-11-02 06:38:17 +00:00
|
|
|
String str2 = this.l;
|
|
|
|
if (str2 != null) {
|
|
|
|
String substring = str2.substring(indexOf$default, f);
|
|
|
|
m.checkExpressionValueIsNotNull(substring, "(this as java.lang.Strin…ing(startIndex, endIndex)");
|
|
|
|
return substring;
|
|
|
|
}
|
|
|
|
throw new TypeCastException("null cannot be cast to non-null type java.lang.String");
|
|
|
|
}
|
|
|
|
|
|
|
|
public final String e() {
|
|
|
|
if (this.e.length() == 0) {
|
|
|
|
return "";
|
|
|
|
}
|
|
|
|
int length = this.d.length() + 3;
|
|
|
|
String str = this.l;
|
2022-03-07 09:34:54 +00:00
|
|
|
int g = f0.e0.c.g(str, ":@", length, str.length());
|
2021-11-02 06:38:17 +00:00
|
|
|
String str2 = this.l;
|
|
|
|
if (str2 != null) {
|
|
|
|
String substring = str2.substring(length, g);
|
|
|
|
m.checkExpressionValueIsNotNull(substring, "(this as java.lang.Strin…ing(startIndex, endIndex)");
|
|
|
|
return substring;
|
|
|
|
}
|
|
|
|
throw new TypeCastException("null cannot be cast to non-null type java.lang.String");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean equals(Object obj) {
|
|
|
|
return (obj instanceof w) && m.areEqual(((w) obj).l, this.l);
|
|
|
|
}
|
|
|
|
|
|
|
|
public final a f() {
|
|
|
|
int i;
|
|
|
|
String str;
|
|
|
|
a aVar = new a();
|
2022-03-12 00:35:13 +00:00
|
|
|
aVar.f3656b = this.d;
|
2021-11-02 06:38:17 +00:00
|
|
|
String e = e();
|
|
|
|
m.checkParameterIsNotNull(e, "<set-?>");
|
2021-12-17 21:59:34 +00:00
|
|
|
aVar.c = e;
|
2021-11-02 06:38:17 +00:00
|
|
|
String a2 = a();
|
|
|
|
m.checkParameterIsNotNull(a2, "<set-?>");
|
|
|
|
aVar.d = a2;
|
|
|
|
aVar.e = this.g;
|
|
|
|
int i2 = this.h;
|
|
|
|
String str2 = this.d;
|
|
|
|
m.checkParameterIsNotNull(str2, "scheme");
|
|
|
|
int hashCode = str2.hashCode();
|
|
|
|
int i3 = -1;
|
|
|
|
if (hashCode != 3213448) {
|
|
|
|
if (hashCode == 99617003 && str2.equals(Constants.SCHEME)) {
|
|
|
|
i = 443;
|
|
|
|
}
|
2022-03-07 09:34:54 +00:00
|
|
|
i = -1;
|
|
|
|
} else {
|
|
|
|
if (str2.equals("http")) {
|
|
|
|
i = 80;
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
2022-03-07 09:34:54 +00:00
|
|
|
i = -1;
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
if (i2 != i) {
|
2022-03-07 09:34:54 +00:00
|
|
|
i3 = this.h;
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
aVar.f = i3;
|
|
|
|
aVar.g.clear();
|
|
|
|
aVar.g.addAll(c());
|
|
|
|
aVar.d(d());
|
|
|
|
if (this.k == null) {
|
2022-03-07 09:34:54 +00:00
|
|
|
str = null;
|
|
|
|
} else {
|
|
|
|
int indexOf$default = d0.g0.w.indexOf$default((CharSequence) this.l, (char) MentionUtilsKt.CHANNELS_CHAR, 0, false, 6, (Object) null) + 1;
|
|
|
|
String str3 = this.l;
|
|
|
|
if (str3 != null) {
|
|
|
|
str = str3.substring(indexOf$default);
|
|
|
|
m.checkExpressionValueIsNotNull(str, "(this as java.lang.String).substring(startIndex)");
|
|
|
|
} else {
|
|
|
|
throw new TypeCastException("null cannot be cast to non-null type java.lang.String");
|
|
|
|
}
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
aVar.i = str;
|
|
|
|
return aVar;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final a g(String str) {
|
|
|
|
m.checkParameterIsNotNull(str, "link");
|
|
|
|
try {
|
|
|
|
a aVar = new a();
|
|
|
|
aVar.e(this, str);
|
|
|
|
return aVar;
|
|
|
|
} catch (IllegalArgumentException unused) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public final String h() {
|
|
|
|
a g = g("/...");
|
|
|
|
if (g == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
|
|
|
Objects.requireNonNull(g);
|
|
|
|
m.checkParameterIsNotNull("", "username");
|
2022-03-12 00:35:13 +00:00
|
|
|
b bVar = f3655b;
|
2021-12-17 21:59:34 +00:00
|
|
|
g.c = b.a(bVar, "", 0, 0, " \"':;<=>@[]^`{}|/\\?#", false, false, false, false, null, 251);
|
2021-11-02 06:38:17 +00:00
|
|
|
m.checkParameterIsNotNull("", "password");
|
|
|
|
g.d = b.a(bVar, "", 0, 0, " \"':;<=>@[]^`{}|/\\?#", false, false, false, false, null, 251);
|
|
|
|
return g.b().l;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int hashCode() {
|
|
|
|
return this.l.hashCode();
|
|
|
|
}
|
|
|
|
|
|
|
|
public final URI i() {
|
|
|
|
a f = f();
|
|
|
|
String str = f.e;
|
|
|
|
String str2 = null;
|
|
|
|
f.e = str != null ? new Regex("[\"<>^`{|}]").replace(str, "") : null;
|
|
|
|
int size = f.g.size();
|
|
|
|
for (int i = 0; i < size; i++) {
|
|
|
|
List<String> list = f.g;
|
2022-03-12 00:35:13 +00:00
|
|
|
list.set(i, b.a(f3655b, list.get(i), 0, 0, "[]", true, true, false, false, null, 227));
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
List<String> list2 = f.h;
|
|
|
|
if (list2 != null) {
|
|
|
|
int size2 = list2.size();
|
|
|
|
for (int i2 = 0; i2 < size2; i2++) {
|
|
|
|
String str3 = list2.get(i2);
|
2022-03-12 00:35:13 +00:00
|
|
|
list2.set(i2, str3 != null ? b.a(f3655b, str3, 0, 0, "\\^`{|}", true, true, true, false, null, Opcodes.MONITOREXIT) : null);
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
String str4 = f.i;
|
|
|
|
if (str4 != null) {
|
2022-03-12 00:35:13 +00:00
|
|
|
str2 = b.a(f3655b, str4, 0, 0, " \"#<>\\^`{|}", true, true, false, true, null, Opcodes.IF_ICMPGT);
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
f.i = str2;
|
|
|
|
String aVar = f.toString();
|
2021-08-03 07:33:18 +00:00
|
|
|
try {
|
2021-11-02 06:38:17 +00:00
|
|
|
return new URI(aVar);
|
|
|
|
} catch (URISyntaxException e) {
|
|
|
|
try {
|
|
|
|
URI create = URI.create(new Regex("[\\u0000-\\u001F\\u007F-\\u009F\\p{javaWhitespace}]").replace(aVar, ""));
|
|
|
|
m.checkExpressionValueIsNotNull(create, "URI.create(stripped)");
|
|
|
|
return create;
|
|
|
|
} catch (Exception unused) {
|
|
|
|
throw new RuntimeException(e);
|
|
|
|
}
|
2021-08-03 07:33:18 +00:00
|
|
|
}
|
|
|
|
}
|
2021-11-02 06:38:17 +00:00
|
|
|
|
|
|
|
public String toString() {
|
|
|
|
return this.l;
|
|
|
|
}
|
2021-08-03 07:33:18 +00:00
|
|
|
}
|