discord-jadx/app/src/main/java/b/c/a/w/c/a.java

292 lines
7.2 KiB
Java
Raw Normal View History

2021-12-17 21:59:34 +00:00
package b.c.a.w.c;
2021-07-24 02:37:17 +00:00
import androidx.annotation.FloatRange;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.google.android.material.shadow.ShadowDrawableWrapper;
2021-07-24 02:37:17 +00:00
import java.util.ArrayList;
import java.util.List;
/* compiled from: BaseKeyframeAnimation */
public abstract class a<K, A> {
public final List<b> a = new ArrayList(1);
2021-12-17 21:59:34 +00:00
/* renamed from: b reason: collision with root package name */
2022-01-27 07:52:47 +00:00
public boolean f389b = false;
2021-12-17 21:59:34 +00:00
public final d<K> c;
2021-07-24 02:37:17 +00:00
public float d = 0.0f;
@Nullable
2021-12-17 21:59:34 +00:00
public b.c.a.c0.c<A> e;
2021-07-24 02:37:17 +00:00
@Nullable
public A f = null;
public float g = -1.0f;
public float h = -1.0f;
/* compiled from: BaseKeyframeAnimation */
public interface b {
void a();
}
/* compiled from: BaseKeyframeAnimation */
public static final class c<T> implements d<T> {
2022-02-02 08:50:56 +00:00
public c(C0055a aVar) {
2021-07-24 02:37:17 +00:00
}
2021-12-17 21:59:34 +00:00
@Override // b.c.a.w.c.a.d
2021-07-24 02:37:17 +00:00
public boolean a(float f) {
throw new IllegalStateException("not implemented");
}
2021-12-17 21:59:34 +00:00
@Override // b.c.a.w.c.a.d
public b.c.a.c0.a<T> b() {
2021-07-24 02:37:17 +00:00
throw new IllegalStateException("not implemented");
}
2021-12-17 21:59:34 +00:00
@Override // b.c.a.w.c.a.d
2021-07-24 02:37:17 +00:00
public boolean c(float f) {
return false;
}
2021-12-17 21:59:34 +00:00
@Override // b.c.a.w.c.a.d
2021-07-24 02:37:17 +00:00
public float d() {
return 1.0f;
}
2021-12-17 21:59:34 +00:00
@Override // b.c.a.w.c.a.d
2021-07-24 02:37:17 +00:00
public float e() {
return 0.0f;
}
2021-12-17 21:59:34 +00:00
@Override // b.c.a.w.c.a.d
2021-07-24 02:37:17 +00:00
public boolean isEmpty() {
return true;
}
}
/* compiled from: BaseKeyframeAnimation */
public interface d<T> {
boolean a(float f);
2021-12-17 21:59:34 +00:00
b.c.a.c0.a<T> b();
2021-07-24 02:37:17 +00:00
boolean c(float f);
@FloatRange(from = ShadowDrawableWrapper.COS_45, to = 1.0d)
2021-07-24 02:37:17 +00:00
float d();
@FloatRange(from = ShadowDrawableWrapper.COS_45, to = 1.0d)
2021-07-24 02:37:17 +00:00
float e();
boolean isEmpty();
}
/* compiled from: BaseKeyframeAnimation */
public static final class e<T> implements d<T> {
2021-12-17 21:59:34 +00:00
public final List<? extends b.c.a.c0.a<T>> a;
2021-07-24 02:37:17 +00:00
@NonNull
2021-12-17 21:59:34 +00:00
/* renamed from: b reason: collision with root package name */
2022-01-27 07:52:47 +00:00
public b.c.a.c0.a<T> f390b;
2021-12-17 21:59:34 +00:00
public b.c.a.c0.a<T> c = null;
2021-07-24 02:37:17 +00:00
public float d = -1.0f;
2021-12-17 21:59:34 +00:00
public e(List<? extends b.c.a.c0.a<T>> list) {
2021-07-24 02:37:17 +00:00
this.a = list;
2022-01-27 07:52:47 +00:00
this.f390b = f(0.0f);
2021-07-24 02:37:17 +00:00
}
2021-12-17 21:59:34 +00:00
@Override // b.c.a.w.c.a.d
2021-07-24 02:37:17 +00:00
public boolean a(float f) {
2021-12-17 21:59:34 +00:00
b.c.a.c0.a<T> aVar = this.c;
2022-01-27 07:52:47 +00:00
b.c.a.c0.a<T> aVar2 = this.f390b;
2021-07-24 02:37:17 +00:00
if (aVar == aVar2 && this.d == f) {
return true;
}
2021-12-17 21:59:34 +00:00
this.c = aVar2;
2021-07-24 02:37:17 +00:00
this.d = f;
return false;
}
2021-12-17 21:59:34 +00:00
@Override // b.c.a.w.c.a.d
2021-07-24 02:37:17 +00:00
@NonNull
2021-12-17 21:59:34 +00:00
public b.c.a.c0.a<T> b() {
2022-01-27 07:52:47 +00:00
return this.f390b;
2021-07-24 02:37:17 +00:00
}
2021-12-17 21:59:34 +00:00
@Override // b.c.a.w.c.a.d
2021-07-24 02:37:17 +00:00
public boolean c(float f) {
2022-01-27 07:52:47 +00:00
if (this.f390b.a(f)) {
return !this.f390b.d();
2021-07-24 02:37:17 +00:00
}
2022-01-27 07:52:47 +00:00
this.f390b = f(f);
2021-07-24 02:37:17 +00:00
return true;
}
2021-12-17 21:59:34 +00:00
@Override // b.c.a.w.c.a.d
2021-07-24 02:37:17 +00:00
public float d() {
2021-12-17 21:59:34 +00:00
List<? extends b.c.a.c0.a<T>> list = this.a;
return ((b.c.a.c0.a) list.get(list.size() - 1)).b();
2021-07-24 02:37:17 +00:00
}
2021-12-17 21:59:34 +00:00
@Override // b.c.a.w.c.a.d
2021-07-24 02:37:17 +00:00
public float e() {
2021-12-17 21:59:34 +00:00
return ((b.c.a.c0.a) this.a.get(0)).c();
2021-07-24 02:37:17 +00:00
}
2021-12-17 21:59:34 +00:00
public final b.c.a.c0.a<T> f(float f) {
List<? extends b.c.a.c0.a<T>> list = this.a;
b.c.a.c0.a<T> aVar = (b.c.a.c0.a) list.get(list.size() - 1);
2021-07-24 02:37:17 +00:00
if (f >= aVar.c()) {
return aVar;
}
for (int size = this.a.size() - 2; size >= 1; size--) {
2021-12-17 21:59:34 +00:00
b.c.a.c0.a<T> aVar2 = (b.c.a.c0.a) this.a.get(size);
2022-01-27 07:52:47 +00:00
if (this.f390b != aVar2 && aVar2.a(f)) {
2021-07-24 02:37:17 +00:00
return aVar2;
}
}
2021-12-17 21:59:34 +00:00
return (b.c.a.c0.a) this.a.get(0);
2021-07-24 02:37:17 +00:00
}
2021-12-17 21:59:34 +00:00
@Override // b.c.a.w.c.a.d
2021-07-24 02:37:17 +00:00
public boolean isEmpty() {
return false;
}
}
/* compiled from: BaseKeyframeAnimation */
public static final class f<T> implements d<T> {
@NonNull
2021-12-17 21:59:34 +00:00
public final b.c.a.c0.a<T> a;
2021-07-24 02:37:17 +00:00
2021-12-17 21:59:34 +00:00
/* renamed from: b reason: collision with root package name */
2022-01-27 07:52:47 +00:00
public float f391b = -1.0f;
2021-12-17 21:59:34 +00:00
public f(List<? extends b.c.a.c0.a<T>> list) {
this.a = (b.c.a.c0.a) list.get(0);
2021-07-24 02:37:17 +00:00
}
2021-12-17 21:59:34 +00:00
@Override // b.c.a.w.c.a.d
2021-07-24 02:37:17 +00:00
public boolean a(float f) {
2022-01-27 07:52:47 +00:00
if (this.f391b == f) {
2021-07-24 02:37:17 +00:00
return true;
}
2022-01-27 07:52:47 +00:00
this.f391b = f;
2021-07-24 02:37:17 +00:00
return false;
}
2021-12-17 21:59:34 +00:00
@Override // b.c.a.w.c.a.d
public b.c.a.c0.a<T> b() {
2021-07-24 02:37:17 +00:00
return this.a;
}
2021-12-17 21:59:34 +00:00
@Override // b.c.a.w.c.a.d
2021-07-24 02:37:17 +00:00
public boolean c(float f) {
return !this.a.d();
}
2021-12-17 21:59:34 +00:00
@Override // b.c.a.w.c.a.d
2021-07-24 02:37:17 +00:00
public float d() {
return this.a.b();
}
2021-12-17 21:59:34 +00:00
@Override // b.c.a.w.c.a.d
2021-07-24 02:37:17 +00:00
public float e() {
return this.a.c();
}
2021-12-17 21:59:34 +00:00
@Override // b.c.a.w.c.a.d
2021-07-24 02:37:17 +00:00
public boolean isEmpty() {
return false;
}
}
2021-12-17 21:59:34 +00:00
public a(List<? extends b.c.a.c0.a<K>> list) {
2021-07-24 02:37:17 +00:00
d<K> dVar;
if (list.isEmpty()) {
dVar = new c<>(null);
} else {
dVar = list.size() == 1 ? new f<>(list) : new e<>(list);
}
2021-12-17 21:59:34 +00:00
this.c = dVar;
2021-07-24 02:37:17 +00:00
}
2021-12-17 21:59:34 +00:00
public b.c.a.c0.a<K> a() {
b.c.a.c0.a<K> b2 = this.c.b();
b.c.a.c.a("BaseKeyframeAnimation#getCurrentKeyframe");
2021-07-24 02:37:17 +00:00
return b2;
}
@FloatRange(from = ShadowDrawableWrapper.COS_45, to = 1.0d)
2021-07-24 02:37:17 +00:00
public float b() {
if (this.h == -1.0f) {
2021-12-17 21:59:34 +00:00
this.h = this.c.d();
2021-07-24 02:37:17 +00:00
}
return this.h;
}
public float c() {
2021-12-17 21:59:34 +00:00
b.c.a.c0.a<K> a = a();
2021-07-24 02:37:17 +00:00
if (a.d()) {
return 0.0f;
}
return a.d.getInterpolation(d());
}
public float d() {
2022-01-27 07:52:47 +00:00
if (this.f389b) {
2021-07-24 02:37:17 +00:00
return 0.0f;
}
2021-12-17 21:59:34 +00:00
b.c.a.c0.a<K> a = a();
2021-07-24 02:37:17 +00:00
if (a.d()) {
return 0.0f;
}
return (this.d - a.c()) / (a.b() - a.c());
}
public A e() {
float c2 = c();
2021-12-17 21:59:34 +00:00
if (this.e == null && this.c.a(c2)) {
2021-07-24 02:37:17 +00:00
return this.f;
}
A f2 = f(a(), c2);
this.f = f2;
return f2;
}
2021-12-17 21:59:34 +00:00
public abstract A f(b.c.a.c0.a<K> aVar, float f2);
2021-07-24 02:37:17 +00:00
public void g() {
for (int i = 0; i < this.a.size(); i++) {
this.a.get(i).a();
}
}
public void h(@FloatRange(from = 0.0d, to = 1.0d) float f2) {
2021-12-17 21:59:34 +00:00
if (!this.c.isEmpty()) {
2021-07-24 02:37:17 +00:00
if (this.g == -1.0f) {
2021-12-17 21:59:34 +00:00
this.g = this.c.e();
2021-07-24 02:37:17 +00:00
}
float f3 = this.g;
if (f2 < f3) {
if (f3 == -1.0f) {
2021-12-17 21:59:34 +00:00
this.g = this.c.e();
2021-07-24 02:37:17 +00:00
}
f2 = this.g;
} else if (f2 > b()) {
f2 = b();
}
if (f2 != this.d) {
this.d = f2;
2021-12-17 21:59:34 +00:00
if (this.c.c(f2)) {
2021-07-24 02:37:17 +00:00
g();
}
}
}
}
2021-12-17 21:59:34 +00:00
public void i(@Nullable b.c.a.c0.c<A> cVar) {
b.c.a.c0.c<A> cVar2 = this.e;
2021-07-24 02:37:17 +00:00
this.e = null;
}
}