87 lines
2.6 KiB
Java
87 lines
2.6 KiB
Java
package c.i.a.c.a2.g0;
|
|
|
|
import androidx.annotation.Nullable;
|
|
import c.i.a.c.a2.t;
|
|
import c.i.a.c.a2.u;
|
|
import c.i.a.c.i2.f0;
|
|
import com.airbnb.lottie.parser.AnimatableValueParser;
|
|
import com.google.android.material.shadow.ShadowDrawableWrapper;
|
|
/* compiled from: XingSeeker */
|
|
public final class i implements g {
|
|
public final long a;
|
|
public final int b;
|
|
|
|
/* renamed from: c reason: collision with root package name */
|
|
public final long f693c;
|
|
public final long d;
|
|
public final long e;
|
|
@Nullable
|
|
public final long[] f;
|
|
|
|
public i(long j, int i, long j2, long j3, @Nullable long[] jArr) {
|
|
this.a = j;
|
|
this.b = i;
|
|
this.f693c = j2;
|
|
this.f = jArr;
|
|
this.d = j3;
|
|
this.e = j3 != -1 ? j + j3 : -1;
|
|
}
|
|
|
|
@Override // c.i.a.c.a2.g0.g
|
|
public long a() {
|
|
return this.e;
|
|
}
|
|
|
|
@Override // c.i.a.c.a2.t
|
|
public boolean c() {
|
|
return this.f != null;
|
|
}
|
|
|
|
@Override // c.i.a.c.a2.g0.g
|
|
public long d(long j) {
|
|
long j2 = j - this.a;
|
|
if (!c() || j2 <= ((long) this.b)) {
|
|
return 0;
|
|
}
|
|
long[] jArr = this.f;
|
|
AnimatableValueParser.H(jArr);
|
|
double d = (((double) j2) * 256.0d) / ((double) this.d);
|
|
int e = f0.e(jArr, (long) d, true, true);
|
|
long j3 = this.f693c;
|
|
long j4 = (((long) e) * j3) / 100;
|
|
long j5 = jArr[e];
|
|
int i = e + 1;
|
|
long j6 = (j3 * ((long) i)) / 100;
|
|
long j7 = e == 99 ? 256 : jArr[i];
|
|
return Math.round((j5 == j7 ? ShadowDrawableWrapper.COS_45 : (d - ((double) j5)) / ((double) (j7 - j5))) * ((double) (j6 - j4))) + j4;
|
|
}
|
|
|
|
@Override // c.i.a.c.a2.t
|
|
public t.a h(long j) {
|
|
if (!c()) {
|
|
return new t.a(new u(0, this.a + ((long) this.b)));
|
|
}
|
|
long i = f0.i(j, 0, this.f693c);
|
|
double d = (((double) i) * 100.0d) / ((double) this.f693c);
|
|
double d2 = ShadowDrawableWrapper.COS_45;
|
|
if (d > ShadowDrawableWrapper.COS_45) {
|
|
if (d >= 100.0d) {
|
|
d2 = 256.0d;
|
|
} else {
|
|
int i2 = (int) d;
|
|
long[] jArr = this.f;
|
|
AnimatableValueParser.H(jArr);
|
|
long[] jArr2 = jArr;
|
|
double d3 = (double) jArr2[i2];
|
|
d2 = d3 + (((i2 == 99 ? 256.0d : (double) jArr2[i2 + 1]) - d3) * (d - ((double) i2)));
|
|
}
|
|
}
|
|
return new t.a(new u(i, this.a + f0.i(Math.round((d2 / 256.0d) * ((double) this.d)), (long) this.b, this.d - 1)));
|
|
}
|
|
|
|
@Override // c.i.a.c.a2.t
|
|
public long i() {
|
|
return this.f693c;
|
|
}
|
|
}
|