445 lines
19 KiB
Java
445 lines
19 KiB
Java
package c.c.a.a0;
|
|
|
|
import android.graphics.Color;
|
|
import c.c.a.a0.h0.c;
|
|
import c.c.a.b0.g;
|
|
import c.c.a.d;
|
|
import c.c.a.y.k.a;
|
|
import c.c.a.y.k.b;
|
|
import c.c.a.y.k.h;
|
|
import c.c.a.y.k.j;
|
|
import c.c.a.y.k.k;
|
|
import c.c.a.y.k.l;
|
|
import c.c.a.y.l.f;
|
|
import c.c.a.y.m.e;
|
|
import com.airbnb.lottie.parser.AnimatableValueParser;
|
|
import java.io.IOException;
|
|
import java.util.ArrayList;
|
|
/* compiled from: LayerParser */
|
|
public class r {
|
|
public static final c.a a = c.a.a("nm", "ind", "refId", "ty", "parent", "sw", "sh", "sc", "ks", "tt", "masksProperties", "shapes", "t", "ef", "sr", "st", "w", "h", "ip", "op", "tm", "cl", "hd");
|
|
public static final c.a b = c.a.a("d", "a");
|
|
|
|
/* renamed from: c reason: collision with root package name */
|
|
public static final c.a f255c = c.a.a("nm");
|
|
|
|
/* JADX DEBUG: Failed to insert an additional move for type inference into block B:226:0x0303 */
|
|
/* JADX DEBUG: Multi-variable search result rejected for r6v10, resolved type: c.c.a.y.k.d */
|
|
/* JADX DEBUG: Multi-variable search result rejected for r6v11, resolved type: c.c.a.y.k.d */
|
|
/* JADX DEBUG: Multi-variable search result rejected for r6v13, resolved type: c.c.a.y.k.d */
|
|
/* JADX DEBUG: Multi-variable search result rejected for r6v23, resolved type: c.c.a.y.k.d */
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
/* JADX WARNING: Removed duplicated region for block: B:110:0x0259 */
|
|
/* JADX WARNING: Removed duplicated region for block: B:139:0x02b4 */
|
|
/* JADX WARNING: Removed duplicated region for block: B:149:0x02e4 */
|
|
/* JADX WARNING: Removed duplicated region for block: B:153:0x02fe */
|
|
public static e a(c cVar, d dVar) throws IOException {
|
|
ArrayList arrayList;
|
|
ArrayList arrayList2;
|
|
String str;
|
|
String str2;
|
|
long j;
|
|
char c2;
|
|
char c3;
|
|
String str3;
|
|
ArrayList arrayList3 = new ArrayList();
|
|
ArrayList arrayList4 = new ArrayList();
|
|
cVar.b();
|
|
Float valueOf = Float.valueOf(1.0f);
|
|
Float valueOf2 = Float.valueOf(0.0f);
|
|
int i = 1;
|
|
boolean z2 = false;
|
|
long j2 = -1;
|
|
float f = 0.0f;
|
|
String str4 = null;
|
|
e.a aVar = null;
|
|
String str5 = null;
|
|
l lVar = null;
|
|
int i2 = 0;
|
|
int i3 = 0;
|
|
int i4 = 0;
|
|
float f2 = 1.0f;
|
|
float f3 = 0.0f;
|
|
int i5 = 0;
|
|
int i6 = 0;
|
|
j jVar = null;
|
|
k kVar = null;
|
|
int i7 = 1;
|
|
b bVar = null;
|
|
boolean z3 = false;
|
|
long j3 = 0;
|
|
String str6 = "UNSET";
|
|
float f4 = 0.0f;
|
|
while (cVar.e()) {
|
|
switch (cVar.z(a)) {
|
|
case 0:
|
|
str2 = str4;
|
|
str6 = cVar.t();
|
|
str4 = str2;
|
|
i = 1;
|
|
z2 = false;
|
|
case 1:
|
|
str2 = str4;
|
|
j3 = (long) cVar.r();
|
|
str4 = str2;
|
|
i = 1;
|
|
z2 = false;
|
|
case 2:
|
|
str2 = str4;
|
|
str5 = cVar.t();
|
|
str4 = str2;
|
|
i = 1;
|
|
z2 = false;
|
|
case 3:
|
|
str2 = str4;
|
|
j = j3;
|
|
int r = cVar.r();
|
|
aVar = r < 6 ? e.a.values()[r] : e.a.UNKNOWN;
|
|
j3 = j;
|
|
str4 = str2;
|
|
i = 1;
|
|
z2 = false;
|
|
case 4:
|
|
str2 = str4;
|
|
j = j3;
|
|
j2 = (long) cVar.r();
|
|
j3 = j;
|
|
str4 = str2;
|
|
i = 1;
|
|
z2 = false;
|
|
case 5:
|
|
str2 = str4;
|
|
i2 = (int) (g.c() * ((float) cVar.r()));
|
|
str4 = str2;
|
|
i = 1;
|
|
z2 = false;
|
|
case 6:
|
|
str2 = str4;
|
|
i3 = (int) (g.c() * ((float) cVar.r()));
|
|
str4 = str2;
|
|
i = 1;
|
|
z2 = false;
|
|
case 7:
|
|
str2 = str4;
|
|
i4 = Color.parseColor(cVar.t());
|
|
str4 = str2;
|
|
i = 1;
|
|
z2 = false;
|
|
case 8:
|
|
str2 = str4;
|
|
lVar = c.a(cVar, dVar);
|
|
str4 = str2;
|
|
i = 1;
|
|
z2 = false;
|
|
case 9:
|
|
str2 = str4;
|
|
j = j3;
|
|
i7 = c.c.a.y.b.com$airbnb$lottie$model$layer$Layer$MatteType$s$values()[cVar.r()];
|
|
dVar.o++;
|
|
j3 = j;
|
|
str4 = str2;
|
|
i = 1;
|
|
z2 = false;
|
|
case 10:
|
|
str2 = str4;
|
|
h hVar = null;
|
|
cVar.a();
|
|
while (cVar.e()) {
|
|
cVar.b();
|
|
h hVar2 = hVar;
|
|
c.c.a.y.k.d dVar2 = hVar2;
|
|
int i8 = 0;
|
|
boolean z4 = false;
|
|
while (cVar.e()) {
|
|
String s2 = cVar.s();
|
|
s2.hashCode();
|
|
int hashCode = s2.hashCode();
|
|
if (hashCode != 111) {
|
|
if (hashCode != 3588) {
|
|
if (hashCode != 104433) {
|
|
if (hashCode == 3357091 && s2.equals("mode")) {
|
|
c2 = 3;
|
|
if (c2 == 0) {
|
|
dVar2 = AnimatableValueParser.T1(cVar, dVar);
|
|
} else if (c2 == 1) {
|
|
hVar2 = new h(q.a(cVar, dVar, g.c(), a0.a));
|
|
} else if (c2 == 2) {
|
|
z4 = cVar.f();
|
|
} else if (c2 != 3) {
|
|
cVar.C();
|
|
} else {
|
|
String t = cVar.t();
|
|
t.hashCode();
|
|
int hashCode2 = t.hashCode();
|
|
if (hashCode2 != 97) {
|
|
if (hashCode2 != 105) {
|
|
if (hashCode2 != 110) {
|
|
if (hashCode2 == 115 && t.equals("s")) {
|
|
c3 = 3;
|
|
if (c3 != 0) {
|
|
if (c3 == 1) {
|
|
dVar.a("Animation contains intersect masks. They are not supported but will be treated like add masks.");
|
|
i8 = 3;
|
|
} else if (c3 == 2) {
|
|
i8 = 4;
|
|
} else if (c3 != 3) {
|
|
c.c.a.b0.c.b("Unknown mask mode " + s2 + ". Defaulting to Add.");
|
|
} else {
|
|
i8 = 2;
|
|
}
|
|
}
|
|
i8 = 1;
|
|
}
|
|
} else if (t.equals("n")) {
|
|
c3 = 2;
|
|
if (c3 != 0) {
|
|
}
|
|
i8 = 1;
|
|
}
|
|
} else if (t.equals("i")) {
|
|
c3 = 1;
|
|
if (c3 != 0) {
|
|
}
|
|
i8 = 1;
|
|
}
|
|
} else if (t.equals("a")) {
|
|
c3 = 0;
|
|
if (c3 != 0) {
|
|
}
|
|
i8 = 1;
|
|
}
|
|
c3 = 65535;
|
|
if (c3 != 0) {
|
|
}
|
|
i8 = 1;
|
|
}
|
|
j3 = j3;
|
|
dVar2 = dVar2;
|
|
}
|
|
} else if (s2.equals("inv")) {
|
|
c2 = 2;
|
|
if (c2 == 0) {
|
|
}
|
|
j3 = j3;
|
|
dVar2 = dVar2;
|
|
}
|
|
} else if (s2.equals("pt")) {
|
|
c2 = 1;
|
|
if (c2 == 0) {
|
|
}
|
|
j3 = j3;
|
|
dVar2 = dVar2;
|
|
}
|
|
} else if (s2.equals("o")) {
|
|
c2 = 0;
|
|
if (c2 == 0) {
|
|
}
|
|
j3 = j3;
|
|
dVar2 = dVar2;
|
|
}
|
|
c2 = 65535;
|
|
if (c2 == 0) {
|
|
}
|
|
j3 = j3;
|
|
dVar2 = dVar2;
|
|
}
|
|
cVar.d();
|
|
arrayList3.add(new f(i8, hVar2, dVar2, z4));
|
|
j3 = j3;
|
|
hVar = null;
|
|
}
|
|
j = j3;
|
|
dVar.o += arrayList3.size();
|
|
cVar.c();
|
|
j3 = j;
|
|
str4 = str2;
|
|
i = 1;
|
|
z2 = false;
|
|
case 11:
|
|
str2 = str4;
|
|
cVar.a();
|
|
while (cVar.e()) {
|
|
c.c.a.y.l.b a2 = f.a(cVar, dVar);
|
|
if (a2 != null) {
|
|
arrayList4.add(a2);
|
|
}
|
|
}
|
|
cVar.c();
|
|
j = j3;
|
|
j3 = j;
|
|
str4 = str2;
|
|
i = 1;
|
|
z2 = false;
|
|
case 12:
|
|
cVar.b();
|
|
while (cVar.e()) {
|
|
int z5 = cVar.z(b);
|
|
if (z5 == 0) {
|
|
str3 = str4;
|
|
jVar = new j(AnimatableValueParser.P1(cVar, dVar, g.a));
|
|
} else if (z5 != i) {
|
|
cVar.B();
|
|
cVar.C();
|
|
} else {
|
|
cVar.a();
|
|
if (cVar.e()) {
|
|
c.a aVar2 = b.a;
|
|
cVar.b();
|
|
k kVar2 = null;
|
|
while (cVar.e()) {
|
|
if (cVar.z(b.a) != 0) {
|
|
cVar.B();
|
|
cVar.C();
|
|
} else {
|
|
cVar.b();
|
|
b bVar2 = null;
|
|
b bVar3 = null;
|
|
a aVar3 = null;
|
|
a aVar4 = null;
|
|
while (cVar.e()) {
|
|
int z6 = cVar.z(b.b);
|
|
if (z6 == 0) {
|
|
aVar3 = AnimatableValueParser.Q1(cVar, dVar);
|
|
} else if (z6 == i) {
|
|
aVar4 = AnimatableValueParser.Q1(cVar, dVar);
|
|
} else if (z6 == 2) {
|
|
bVar2 = AnimatableValueParser.R1(cVar, dVar);
|
|
} else if (z6 != 3) {
|
|
cVar.B();
|
|
cVar.C();
|
|
} else {
|
|
bVar3 = AnimatableValueParser.R1(cVar, dVar);
|
|
}
|
|
i = 1;
|
|
}
|
|
cVar.d();
|
|
kVar2 = new k(aVar3, aVar4, bVar2, bVar3);
|
|
str4 = str4;
|
|
i = 1;
|
|
}
|
|
}
|
|
str3 = str4;
|
|
cVar.d();
|
|
kVar = kVar2 == null ? new k(null, null, null, null) : kVar2;
|
|
} else {
|
|
str3 = str4;
|
|
}
|
|
while (cVar.e()) {
|
|
cVar.C();
|
|
}
|
|
cVar.c();
|
|
}
|
|
str4 = str3;
|
|
i = 1;
|
|
}
|
|
str2 = str4;
|
|
cVar.d();
|
|
str4 = str2;
|
|
i = 1;
|
|
z2 = false;
|
|
case 13:
|
|
cVar.a();
|
|
ArrayList arrayList5 = new ArrayList();
|
|
while (cVar.e()) {
|
|
cVar.b();
|
|
while (cVar.e()) {
|
|
if (cVar.z(f255c) != 0) {
|
|
cVar.B();
|
|
cVar.C();
|
|
} else {
|
|
arrayList5.add(cVar.t());
|
|
}
|
|
}
|
|
cVar.d();
|
|
}
|
|
cVar.c();
|
|
dVar.a("Lottie doesn't support layer effects. If you are using them for fills, strokes, trim paths etc. then try adding them directly as contents in your shape. Found: " + arrayList5);
|
|
str2 = str4;
|
|
j = j3;
|
|
j3 = j;
|
|
str4 = str2;
|
|
i = 1;
|
|
z2 = false;
|
|
case 14:
|
|
f2 = (float) cVar.p();
|
|
str2 = str4;
|
|
str4 = str2;
|
|
i = 1;
|
|
z2 = false;
|
|
case 15:
|
|
f3 = (float) cVar.p();
|
|
str2 = str4;
|
|
str4 = str2;
|
|
i = 1;
|
|
z2 = false;
|
|
case 16:
|
|
i5 = (int) (g.c() * ((float) cVar.r()));
|
|
str2 = str4;
|
|
str4 = str2;
|
|
i = 1;
|
|
z2 = false;
|
|
case 17:
|
|
i6 = (int) (g.c() * ((float) cVar.r()));
|
|
str2 = str4;
|
|
str4 = str2;
|
|
i = 1;
|
|
z2 = false;
|
|
case 18:
|
|
f = (float) cVar.p();
|
|
str2 = str4;
|
|
str4 = str2;
|
|
i = 1;
|
|
z2 = false;
|
|
case 19:
|
|
f4 = (float) cVar.p();
|
|
i = 1;
|
|
z2 = false;
|
|
case 20:
|
|
bVar = AnimatableValueParser.S1(cVar, dVar, z2);
|
|
i = 1;
|
|
z2 = false;
|
|
case 21:
|
|
str4 = cVar.t();
|
|
i = 1;
|
|
z2 = false;
|
|
case 22:
|
|
z3 = cVar.f();
|
|
i = 1;
|
|
z2 = false;
|
|
default:
|
|
str2 = str4;
|
|
j = j3;
|
|
cVar.B();
|
|
cVar.C();
|
|
j3 = j;
|
|
str4 = str2;
|
|
i = 1;
|
|
z2 = false;
|
|
}
|
|
}
|
|
cVar.d();
|
|
float f5 = f / f2;
|
|
float f6 = f4 / f2;
|
|
ArrayList arrayList6 = new ArrayList();
|
|
if (f5 > 0.0f) {
|
|
arrayList = arrayList4;
|
|
arrayList2 = arrayList3;
|
|
str = str4;
|
|
arrayList6.add(new c.c.a.c0.a(dVar, valueOf2, valueOf2, null, 0.0f, Float.valueOf(f5)));
|
|
} else {
|
|
arrayList = arrayList4;
|
|
arrayList2 = arrayList3;
|
|
str = str4;
|
|
}
|
|
if (f6 <= 0.0f) {
|
|
f6 = dVar.l;
|
|
}
|
|
arrayList6.add(new c.c.a.c0.a(dVar, valueOf, valueOf, null, f5, Float.valueOf(f6)));
|
|
arrayList6.add(new c.c.a.c0.a(dVar, valueOf2, valueOf2, null, f6, Float.valueOf(Float.MAX_VALUE)));
|
|
if (str6.endsWith(".ai") || "ai".equals(str)) {
|
|
dVar.a("Convert your Illustrator layers to shape layers.");
|
|
}
|
|
return new e(arrayList, dVar, str6, j3, aVar, j2, str5, arrayList2, lVar, i2, i3, i4, f2, f3, i5, i6, jVar, kVar, arrayList6, i7, bVar, z3);
|
|
}
|
|
}
|