CrackMe.apk
Download file
package okhttp3;
import androidx.autofill.HintConstants;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Locale;
import java.util.Objects;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import kotlin.Deprecated;
import kotlin.DeprecationLevel;
import kotlin.Metadata;
import kotlin.ReplaceWith;
import kotlin.collections.ArraysKt;
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.StringsKt;
import kotlin.text.Typography;
@Metadata(bv = {1, 0, 3}, d1 = {"\u00002\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0003\n\u0002\u0010\u0011\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0007\u0018\u0000 \u00182\u00020\u0001:\u0001\u0018B-\b\u0002\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0003\u0012\u0006\u0010\u0005\u001a\u00020\u0003\u0012\f\u0010\u0006\u001a\b\u0012\u0004\u0012\u00020\u00030\u0007¢\u0006\u0002\u0010\bJ\u0016\u0010\u000b\u001a\u0004\u0018\u00010\f2\n\b\u0002\u0010\r\u001a\u0004\u0018\u00010\fH\u0007J\u0013\u0010\u000e\u001a\u00020\u000f2\b\u0010\u0010\u001a\u0004\u0018\u00010\u0001H\u0002J\b\u0010\u0011\u001a\u00020\u0012H\u0016J\u0010\u0010\u0013\u001a\u0004\u0018\u00010\u00032\u0006\u0010\u0014\u001a\u00020\u0003J\r\u0010\u0005\u001a\u00020\u0003H\u0007¢\u0006\u0002\b\u0015J\b\u0010\u0016\u001a\u00020\u0003H\u0016J\r\u0010\u0004\u001a\u00020\u0003H\u0007¢\u0006\u0002\b\u0017R\u000e\u0010\u0002\u001a\u00020\u0003X\u0004¢\u0006\u0002\n\u0000R\u0016\u0010\u0006\u001a\b\u0012\u0004\u0012\u00020\u00030\u0007X\u0004¢\u0006\u0004\n\u0002\u0010\tR\u0013\u0010\u0005\u001a\u00020\u00038\u0007¢\u0006\b\n\u0000\u001a\u0004\b\u0005\u0010\nR\u0013\u0010\u0004\u001a\u00020\u00038\u0007¢\u0006\b\n\u0000\u001a\u0004\b\u0004\u0010\n¨\u0006\u0019"}, d2 = {"Lokhttp3/MediaType;", "", "mediaType", "", "type", "subtype", "parameterNamesAndValues", "", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;)V", "[Ljava/lang/String;", "()Ljava/lang/String;", "charset", "Ljava/nio/charset/Charset;", "defaultValue", "equals", "", "other", "hashCode", "", "parameter", "name", "-deprecated_subtype", "toString", "-deprecated_type", "Companion", "okhttp"}, k = 1, mv = {1, 4, 0})
/* compiled from: MediaType.kt */
public final class MediaType {
public static final Companion Companion = new Companion((DefaultConstructorMarker) null);
/* access modifiers changed from: private */
public static final Pattern PARAMETER = Pattern.compile(";\\s*(?:([a-zA-Z0-9-!#$%&'*+.^_`{|}~]+)=(?:([a-zA-Z0-9-!#$%&'*+.^_`{|}~]+)|\"([^\"]*)\"))?");
private static final String QUOTED = "\"([^\"]*)\"";
private static final String TOKEN = "([a-zA-Z0-9-!#$%&'*+.^_`{|}~]+)";
/* access modifiers changed from: private */
public static final Pattern TYPE_SUBTYPE = Pattern.compile("([a-zA-Z0-9-!#$%&'*+.^_`{|}~]+)/([a-zA-Z0-9-!#$%&'*+.^_`{|}~]+)");
private final String mediaType;
private final String[] parameterNamesAndValues;
private final String subtype;
private final String type;
@JvmStatic
public static final MediaType get(String str) {
return Companion.get(str);
}
@JvmStatic
public static final MediaType parse(String str) {
return Companion.parse(str);
}
public final Charset charset() {
return charset$default(this, (Charset) null, 1, (Object) null);
}
private MediaType(String str, String str2, String str3, String[] strArr) {
this.mediaType = str;
this.type = str2;
this.subtype = str3;
this.parameterNamesAndValues = strArr;
}
public /* synthetic */ MediaType(String str, String str2, String str3, String[] strArr, DefaultConstructorMarker defaultConstructorMarker) {
this(str, str2, str3, strArr);
}
public final String type() {
return this.type;
}
public final String subtype() {
return this.subtype;
}
public static /* synthetic */ Charset charset$default(MediaType mediaType2, Charset charset, int i, Object obj) {
if ((i & 1) != 0) {
charset = null;
Charset charset2 = null;
}
return mediaType2.charset(charset);
}
public final Charset charset(Charset charset) {
String parameter = parameter("charset");
if (parameter == null) {
return charset;
}
try {
return Charset.forName(parameter);
} catch (IllegalArgumentException unused) {
return charset;
}
}
public final String parameter(String str) {
Intrinsics.checkNotNullParameter(str, HintConstants.AUTOFILL_HINT_NAME);
IntProgression step = RangesKt.step((IntProgression) ArraysKt.getIndices((T[]) this.parameterNamesAndValues), 2);
int first = step.getFirst();
int last = step.getLast();
int step2 = step.getStep();
if (step2 >= 0) {
if (first > last) {
return null;
}
} else if (first < last) {
return null;
}
while (!StringsKt.equals(this.parameterNamesAndValues[first], str, true)) {
if (first == last) {
return null;
}
first += step2;
}
return this.parameterNamesAndValues[first + 1];
}
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "type", imports = {}))
/* renamed from: -deprecated_type reason: not valid java name */
public final String m1925deprecated_type() {
return this.type;
}
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "subtype", imports = {}))
/* renamed from: -deprecated_subtype reason: not valid java name */
public final String m1924deprecated_subtype() {
return this.subtype;
}
public String toString() {
return this.mediaType;
}
public boolean equals(Object obj) {
return (obj instanceof MediaType) && Intrinsics.areEqual((Object) ((MediaType) obj).mediaType, (Object) this.mediaType);
}
public int hashCode() {
return this.mediaType.hashCode();
}
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000$\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0007\b\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\u0015\u0010\n\u001a\u00020\u000b2\u0006\u0010\f\u001a\u00020\u0007H\u0007¢\u0006\u0002\b\rJ\u0017\u0010\u000e\u001a\u0004\u0018\u00010\u000b2\u0006\u0010\f\u001a\u00020\u0007H\u0007¢\u0006\u0002\b\u000fJ\u0011\u0010\u0010\u001a\u00020\u000b*\u00020\u0007H\u0007¢\u0006\u0002\b\nJ\u0013\u0010\u0011\u001a\u0004\u0018\u00010\u000b*\u00020\u0007H\u0007¢\u0006\u0002\b\u000eR\u0016\u0010\u0003\u001a\n \u0005*\u0004\u0018\u00010\u00040\u0004X\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0006\u001a\u00020\u0007XT¢\u0006\u0002\n\u0000R\u000e\u0010\b\u001a\u00020\u0007XT¢\u0006\u0002\n\u0000R\u0016\u0010\t\u001a\n \u0005*\u0004\u0018\u00010\u00040\u0004X\u0004¢\u0006\u0002\n\u0000¨\u0006\u0012"}, d2 = {"Lokhttp3/MediaType$Companion;", "", "()V", "PARAMETER", "Ljava/util/regex/Pattern;", "kotlin.jvm.PlatformType", "QUOTED", "", "TOKEN", "TYPE_SUBTYPE", "get", "Lokhttp3/MediaType;", "mediaType", "-deprecated_get", "parse", "-deprecated_parse", "toMediaType", "toMediaTypeOrNull", "okhttp"}, k = 1, mv = {1, 4, 0})
/* compiled from: MediaType.kt */
public static final class Companion {
private Companion() {
}
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
@JvmStatic
public final MediaType get(String str) {
Intrinsics.checkNotNullParameter(str, "$this$toMediaType");
CharSequence charSequence = str;
Matcher matcher = MediaType.TYPE_SUBTYPE.matcher(charSequence);
if (matcher.lookingAt()) {
String group = matcher.group(1);
Intrinsics.checkNotNullExpressionValue(group, "typeSubtype.group(1)");
Locale locale = Locale.US;
Intrinsics.checkNotNullExpressionValue(locale, "Locale.US");
Objects.requireNonNull(group, "null cannot be cast to non-null type java.lang.String");
String lowerCase = group.toLowerCase(locale);
Intrinsics.checkNotNullExpressionValue(lowerCase, "(this as java.lang.String).toLowerCase(locale)");
String group2 = matcher.group(2);
Intrinsics.checkNotNullExpressionValue(group2, "typeSubtype.group(2)");
Locale locale2 = Locale.US;
Intrinsics.checkNotNullExpressionValue(locale2, "Locale.US");
Objects.requireNonNull(group2, "null cannot be cast to non-null type java.lang.String");
String lowerCase2 = group2.toLowerCase(locale2);
Intrinsics.checkNotNullExpressionValue(lowerCase2, "(this as java.lang.String).toLowerCase(locale)");
List arrayList = new ArrayList();
Matcher matcher2 = MediaType.PARAMETER.matcher(charSequence);
int end = matcher.end();
while (end < str.length()) {
matcher2.region(end, str.length());
if (matcher2.lookingAt()) {
String group3 = matcher2.group(1);
if (group3 == null) {
end = matcher2.end();
} else {
String group4 = matcher2.group(2);
if (group4 == null) {
group4 = matcher2.group(3);
} else if (StringsKt.startsWith$default(group4, "'", false, 2, (Object) null) && StringsKt.endsWith$default(group4, "'", false, 2, (Object) null) && group4.length() > 2) {
group4 = group4.substring(1, group4.length() - 1);
Intrinsics.checkNotNullExpressionValue(group4, "(this as java.lang.Strin…ing(startIndex, endIndex)");
}
Collection collection = arrayList;
collection.add(group3);
collection.add(group4);
end = matcher2.end();
}
} else {
StringBuilder sb = new StringBuilder();
sb.append("Parameter is not formatted correctly: \"");
String substring = str.substring(end);
Intrinsics.checkNotNullExpressionValue(substring, "(this as java.lang.String).substring(startIndex)");
sb.append(substring);
sb.append("\" for: \"");
sb.append(str);
sb.append(Typography.quote);
throw new IllegalArgumentException(sb.toString().toString());
}
}
Object[] array = arrayList.toArray(new String[0]);
Objects.requireNonNull(array, "null cannot be cast to non-null type kotlin.Array<T>");
return new MediaType(str, lowerCase, lowerCase2, (String[]) array, (DefaultConstructorMarker) null);
}
throw new IllegalArgumentException(("No subtype found for: \"" + str + Typography.quote).toString());
}
@JvmStatic
public final MediaType parse(String str) {
Intrinsics.checkNotNullParameter(str, "$this$toMediaTypeOrNull");
try {
Companion companion = this;
return get(str);
} catch (IllegalArgumentException unused) {
return null;
}
}
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to extension function", replaceWith = @ReplaceWith(expression = "mediaType.toMediaType()", imports = {"okhttp3.MediaType.Companion.toMediaType"}))
/* renamed from: -deprecated_get reason: not valid java name */
public final MediaType m1926deprecated_get(String str) {
Intrinsics.checkNotNullParameter(str, "mediaType");
Companion companion = this;
return get(str);
}
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to extension function", replaceWith = @ReplaceWith(expression = "mediaType.toMediaTypeOrNull()", imports = {"okhttp3.MediaType.Companion.toMediaTypeOrNull"}))
/* renamed from: -deprecated_parse reason: not valid java name */
public final MediaType m1927deprecated_parse(String str) {
Intrinsics.checkNotNullParameter(str, "mediaType");
Companion companion = this;
return parse(str);
}
}
}
Download file