what-the-bank/sources/o/C0743NnU.java

321 lines
11 KiB
Java

package o;
import com.google.common.primitives.UnsignedBytes;
import com.google.firebase.crashlytics.internal.common.IdManager;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.Array;
import java.math.RoundingMode;
import java.nio.charset.Charset;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import o.BrP;
import org.bouncycastle.crypto.tls.CipherSuite;
/* renamed from: o.NnU, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public class C0743NnU<T extends BrP> {
public final T a;
public C0743NnU(T t) {
this.a = t;
}
public String d(int i) {
int length;
Object b = BrP.b(new Object[]{this.a, Integer.valueOf(i)}, -2120483836, 2120483840, i);
if (b == null) {
return null;
}
if (b.getClass().isArray() && (length = Array.getLength(b)) > 16) {
return String.format("[%d values]", Integer.valueOf(length));
}
if (b instanceof Date) {
return new SimpleDateFormat("EEE MMM dd HH:mm:ss Z yyyy").format((Date) b).replaceAll("([0-9]{2} [^ ]+)$", ":$1");
}
return this.a.o(i);
}
/* JADX INFO: Access modifiers changed from: protected */
public final String e(int i, int i2) {
int[] i3 = this.a.i(i);
if (i3 == null || i3 == null) {
return null;
}
StringBuilder sb = new StringBuilder();
for (int i4 = 0; i4 < 4 && i4 < i3.length; i4++) {
if (i4 == i2) {
sb.append('.');
}
char c = (char) i3[i4];
if (c < '0') {
c = (char) (c + '0');
}
if (i4 != 0 || c != '0') {
sb.append(c);
}
}
return sb.toString();
}
/* JADX INFO: Access modifiers changed from: protected */
public final String a(int i, String... strArr) {
return d(i, 0, strArr);
}
/* JADX INFO: Access modifiers changed from: protected */
public final String d(int i, int i2, String... strArr) {
String str;
Long f = this.a.f(i);
if (f == null) {
return null;
}
long longValue = f.longValue() - i2;
if (longValue >= 0 && longValue < strArr.length && (str = strArr[(int) longValue]) != null) {
return str;
}
StringBuilder sb = new StringBuilder("Unknown (");
sb.append(f);
sb.append(")");
return sb.toString();
}
/* JADX INFO: Access modifiers changed from: protected */
public final String c(int i) {
byte[] b = this.a.b(i);
if (b == null) {
return null;
}
Object[] objArr = new Object[2];
objArr[0] = Integer.valueOf(b.length);
objArr[1] = b.length == 1 ? "" : "s";
return String.format("(%d byte%s)", objArr);
}
/* JADX INFO: Access modifiers changed from: protected */
public final String i(int i) {
Axo l = this.a.l(i);
if (l == null) {
return null;
}
return l.d(true);
}
/* JADX INFO: Access modifiers changed from: protected */
public final String d() {
Axo l = this.a.l(516);
if (l == null) {
return null;
}
return String.format("%.3f", Double.valueOf(l.doubleValue()));
}
/* JADX INFO: Access modifiers changed from: protected */
public final String d(String str) {
String o2 = this.a.o(CipherSuite.TLS_RSA_PSK_WITH_RC4_128_SHA);
if (o2 == null) {
return null;
}
return String.format(str, o2);
}
/* JADX INFO: Access modifiers changed from: protected */
public final String a(int i, Object... objArr) {
Integer j = this.a.j(i);
if (j == null) {
return null;
}
ArrayList arrayList = new ArrayList();
for (int i2 = 0; objArr.length > i2; i2++) {
Object obj = objArr[i2];
if (obj != null) {
char c = (j.intValue() & 1) == 1 ? (char) 1 : (char) 0;
if (obj instanceof String[]) {
arrayList.add(((String[]) obj)[c]);
} else if (c != 0 && (obj instanceof String)) {
arrayList.add((String) obj);
}
}
j = Integer.valueOf(j.intValue() >> 1);
}
Iterator it = arrayList.iterator();
StringBuilder sb = new StringBuilder(it.hasNext() ? ((CharSequence) it.next()).length() + 2 : 0);
Iterator it2 = arrayList.iterator();
if (it2.hasNext()) {
sb.append((CharSequence) it2.next());
while (it2.hasNext()) {
sb.append(", ");
sb.append((CharSequence) it2.next());
}
}
return sb.toString();
}
/* JADX INFO: Access modifiers changed from: protected */
public final String c() {
byte[] b = this.a.b(37);
if (b == null) {
return null;
}
int length = b.length;
for (int i = 0; i < b.length; i++) {
int i2 = b[i] & UnsignedBytes.MAX_VALUE;
if (i2 == 0 || i2 > 127) {
length = i;
break;
}
}
return new String(b, 0, length);
}
/* JADX INFO: Access modifiers changed from: protected */
public final String b(int i, Charset charset) {
byte[] b = this.a.b(i);
if (b == null) {
return null;
}
try {
return new String(b, charset.name()).trim();
} catch (UnsupportedEncodingException unused) {
return null;
}
}
/* JADX INFO: Access modifiers changed from: protected */
public final String a() {
Axo l = this.a.l(515);
if (l != null) {
return l.d(true);
}
Double c = this.a.c(515);
if (c != null) {
return new DecimalFormat("0.###").format(c);
}
return null;
}
/* JADX INFO: Access modifiers changed from: protected */
public static String b(double d) {
DecimalFormat decimalFormat = new DecimalFormat(IdManager.DEFAULT_VERSION_NAME);
decimalFormat.setRoundingMode(RoundingMode.HALF_UP);
StringBuilder sb = new StringBuilder("f/");
sb.append(decimalFormat.format(d));
return sb.toString();
}
/* JADX INFO: Access modifiers changed from: protected */
public static String d(double d) {
DecimalFormat decimalFormat = new DecimalFormat("0.#");
decimalFormat.setRoundingMode(RoundingMode.HALF_UP);
StringBuilder sb = new StringBuilder();
sb.append(decimalFormat.format(d));
sb.append(" mm");
return sb.toString();
}
/* JADX INFO: Access modifiers changed from: protected */
public final String b(int i) {
Axo[] m = this.a.m(i);
if (m == null || m.length != 4) {
return null;
}
Axo axo = m[0];
if (axo.b == 0 || axo.c == 0) {
Axo axo2 = m[2];
if (axo2.b == 0 || axo2.c == 0) {
return null;
}
}
StringBuilder sb = new StringBuilder();
if (m[1].doubleValue() == m[0].doubleValue()) {
sb.append(m[0].d(true));
sb.append("mm");
} else {
sb.append(m[0].d(true));
sb.append('-');
sb.append(m[1].d(true));
sb.append("mm");
}
Axo axo3 = m[2];
if (axo3.b != 0 && axo3.c != 0) {
sb.append(' ');
DecimalFormat decimalFormat = new DecimalFormat(IdManager.DEFAULT_VERSION_NAME);
decimalFormat.setRoundingMode(RoundingMode.HALF_UP);
if (m[3].doubleValue() == m[2].doubleValue()) {
sb.append(b(m[2].doubleValue()));
} else {
sb.append("f/");
sb.append(decimalFormat.format(m[2].doubleValue()));
sb.append('-');
sb.append(decimalFormat.format(m[3].doubleValue()));
}
}
return sb.toString();
}
public final String b() {
return d(274, 1, "Top, left side (Horizontal / normal)", "Top, right side (Mirror horizontal)", "Bottom, right side (Rotate 180)", "Bottom, left side (Mirror vertical)", "Left side, top (Mirror horizontal and rotate 270 CW)", "Right side, top (Rotate 90 CW)", "Right side, bottom (Mirror horizontal and rotate 90 CW)", "Left side, bottom (Rotate 270 CW)");
}
public final String a(int i) {
Float a = this.a.a(i);
if (a == null) {
return null;
}
if (a.floatValue() <= 1.0f) {
float round = ((float) Math.round(((float) (1.0d / Math.exp(a.floatValue() * Math.log(2.0d)))) * 10.0d)) / 10.0f;
DecimalFormat decimalFormat = new DecimalFormat("0.##");
decimalFormat.setRoundingMode(RoundingMode.HALF_UP);
StringBuilder sb = new StringBuilder();
sb.append(decimalFormat.format(round));
sb.append(" sec");
return sb.toString();
}
int exp = (int) Math.exp(a.floatValue() * Math.log(2.0d));
StringBuilder sb2 = new StringBuilder("1/");
sb2.append(exp);
sb2.append(" sec");
return sb2.toString();
}
/* JADX INFO: Access modifiers changed from: protected */
public final String e(int i) {
byte[] b = this.a.b(i);
if (b == null) {
return null;
}
if (b.length == 0) {
return "";
}
HashMap hashMap = new HashMap();
hashMap.put("ASCII", System.getProperty("file.encoding"));
hashMap.put("UNICODE", "UTF-16LE");
hashMap.put("JIS", "Shift-JIS");
try {
if (b.length >= 10) {
String str = new String(b, 0, 10);
for (Map.Entry entry : hashMap.entrySet()) {
String str2 = (String) entry.getKey();
String str3 = (String) entry.getValue();
if (str.startsWith(str2)) {
for (int length = str2.length(); length < 10; length++) {
byte b2 = b[length];
if (b2 != 0 && b2 != 32) {
return new String(b, length, b.length - length, str3).trim();
}
}
return new String(b, 10, b.length - 10, str3).trim();
}
}
}
return new String(b, System.getProperty("file.encoding")).trim();
} catch (UnsupportedEncodingException unused) {
return null;
}
}
}