package defpackage;

import android.content.Context;
import android.text.Layout;
import android.text.Spanned;
import android.text.style.AbsoluteSizeSpan;
import android.text.style.BackgroundColorSpan;
import android.text.style.ForegroundColorSpan;
import android.text.style.RelativeSizeSpan;
import android.text.style.StrikethroughSpan;
import android.text.style.StyleSpan;
import android.text.style.TypefaceSpan;
import android.text.style.UnderlineSpan;
import android.util.Base64;
import android.util.SparseArray;
import android.widget.FrameLayout;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.regex.Pattern;

/* JADX INFO: renamed from: ᵲᵩ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C4526 extends FrameLayout implements InterfaceC2326 {

    /* JADX INFO: renamed from: ˌᴵ, reason: contains not printable characters */
    public final C4598 f17220;

    /* JADX INFO: renamed from: ᵔᵖᵹᵫ, reason: contains not printable characters */
    public List f17221;

    /* JADX INFO: renamed from: ᵜᵪʾ, reason: contains not printable characters */
    public final C1136 f17222;

    /* JADX INFO: renamed from: ᵨᵼⁱ, reason: contains not printable characters */
    public C3696 f17223;

    /* JADX INFO: renamed from: ᵯᵷʽ, reason: contains not printable characters */
    public float f17224;

    /* JADX INFO: renamed from: ᵶˇᵱ, reason: contains not printable characters */
    public float f17225;

    public C4526(Context context) {
        super(context, null);
        this.f17221 = Collections.EMPTY_LIST;
        this.f17223 = C3696.f14087;
        this.f17224 = 0.0533f;
        this.f17225 = 0.08f;
        C4598 c4598 = new C4598(context, 0);
        this.f17220 = c4598;
        C1136 c1136 = new C1136(context, null);
        this.f17222 = c1136;
        c1136.setBackgroundColor(0);
        c1136.getSettings().setAllowContentAccess(false);
        addView(c4598);
        addView(c1136);
    }

    @Override // android.widget.FrameLayout, android.view.ViewGroup, android.view.View
    public final void onLayout(boolean z, int i, int i2, int i3, int i4) {
        super.onLayout(z, i, i2, i3, i4);
        if (!z || this.f17221.isEmpty()) {
            return;
        }
        m9568();
    }

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public final String m9567(int i, float f) {
        float f2 = ˑᵕʾ.ᵠˏˏ(i, f, getHeight(), (getHeight() - getPaddingTop()) - getPaddingBottom());
        if (f2 == -3.4028235E38f) {
            return "unset";
        }
        Object[] objArr = {Float.valueOf(f2 / getContext().getResources().getDisplayMetrics().density)};
        String str = AbstractC0956.f4222;
        return String.format(Locale.US, "%.2fpx", objArr);
    }

    /* JADX WARN: Removed duplicated region for block: B:191:0x0492  */
    /* JADX WARN: Removed duplicated region for block: B:208:0x04b8  */
    /* JADX WARN: Removed duplicated region for block: B:230:0x050d  */
    /* JADX WARN: Removed duplicated region for block: B:252:0x05e5  */
    /* JADX WARN: Removed duplicated region for block: B:262:0x0621  */
    /* JADX WARN: Removed duplicated region for block: B:269:0x0648  */
    /* JADX WARN: Removed duplicated region for block: B:272:0x0695  */
    /* JADX WARN: Removed duplicated region for block: B:280:0x06c7  */
    /* JADX WARN: Removed duplicated region for block: B:298:0x053f A[SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:51:0x017e  */
    /* JADX WARN: Removed duplicated region for block: B:52:0x0191  */
    /* JADX WARN: Removed duplicated region for block: B:55:0x019f  */
    /* JADX WARN: Removed duplicated region for block: B:56:0x01a6  */
    /* JADX WARN: Removed duplicated region for block: B:65:0x01c5  */
    /* JADX WARN: Removed duplicated region for block: B:68:0x01cd  */
    /* JADX WARN: Removed duplicated region for block: B:71:0x01dd  */
    /* JADX WARN: Removed duplicated region for block: B:72:0x01e0  */
    /* JADX WARN: Removed duplicated region for block: B:75:0x01f3  */
    /* JADX WARN: Removed duplicated region for block: B:82:0x01ff  */
    /* JADX WARN: Removed duplicated region for block: B:84:0x0207  */
    /* JADX WARN: Removed duplicated region for block: B:91:0x0213  */
    /* JADX WARN: Removed duplicated region for block: B:94:0x023d  */
    /* JADX WARN: Removed duplicated region for block: B:96:0x0254  */
    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void m9568() {
        String strConcat;
        char c;
        int i;
        int i2;
        String str;
        int i3;
        float f;
        String str2;
        String str3;
        Layout.Alignment alignment;
        int i4;
        String str4;
        Object obj;
        int i5;
        int i6;
        String str5;
        String str6;
        CharSequence charSequence;
        Object obj2;
        String str7;
        String str8;
        String str9;
        float f2;
        String str10;
        String str11;
        C5534 c5534;
        boolean z;
        String str12;
        Object[] objArr;
        int i7;
        int i8;
        int i9;
        String strM8117;
        String str13;
        float f3;
        char c2;
        char c3;
        Layout.Alignment alignment2;
        int i10;
        String str14;
        StringBuilder sb = new StringBuilder();
        String str15 = ᵹˊᵫˋ.ᵶˇᵱ(this.f17223.f14091);
        int i11 = 0;
        String strM9567 = m9567(0, this.f17224);
        float f4 = 1.2f;
        Float fValueOf = Float.valueOf(1.2f);
        C3696 c3696 = this.f17223;
        int i12 = c3696.f14092;
        int i13 = c3696.f14090;
        char c4 = 4;
        int i14 = 2;
        int i15 = 1;
        if (i12 == 1) {
            Object[] objArr2 = {ᵹˊᵫˋ.ᵶˇᵱ(i13)};
            String str16 = AbstractC0956.f4222;
            strConcat = String.format(Locale.US, "1px 1px 0 %1$s, 1px -1px 0 %1$s, -1px 1px 0 %1$s, -1px -1px 0 %1$s", objArr2);
        } else if (i12 == 2) {
            String str17 = ᵹˊᵫˋ.ᵶˇᵱ(i13);
            String str18 = AbstractC0956.f4222;
            Locale locale = Locale.US;
            strConcat = "0.1em 0.12em 0.15em ".concat(str17);
        } else if (i12 == 3) {
            String str19 = ᵹˊᵫˋ.ᵶˇᵱ(i13);
            String str20 = AbstractC0956.f4222;
            Locale locale2 = Locale.US;
            strConcat = "0.06em 0.08em 0.15em ".concat(str19);
        } else if (i12 != 4) {
            strConcat = "unset";
        } else {
            String str21 = ᵹˊᵫˋ.ᵶˇᵱ(i13);
            String str22 = AbstractC0956.f4222;
            Locale locale3 = Locale.US;
            strConcat = "-0.05em -0.05em 0.15em ".concat(str21);
        }
        Object[] objArr3 = {str15, strM9567, fValueOf, strConcat};
        String str23 = AbstractC0956.f4222;
        sb.append(String.format(Locale.US, "<body><div style='-webkit-user-select:none;position:fixed;top:0;bottom:0;left:0;right:0;color:%s;font-size:%s;line-height:%.2f;text-shadow:%s;'>", objArr3));
        HashMap map = new HashMap();
        String str24 = ᵹˊᵫˋ.ᵶˇᵱ(this.f17223.f14088);
        String str25 = "background-color:";
        StringBuilder sb2 = new StringBuilder("background-color:");
        sb2.append(str24);
        String str26 = ";";
        sb2.append(";");
        map.put(".default_bg,.default_bg *", sb2.toString());
        int i16 = 0;
        while (i16 < this.f17221.size()) {
            C4847 c4847 = (C4847) this.f17221.get(i16);
            float f5 = c4847.f18486;
            int i17 = c4847.f18490;
            float f6 = f5 != -3.4028235E38f ? f5 * 100.0f : 50.0f;
            float f7 = f4;
            int i18 = c4847.f18500;
            int i19 = -100;
            if (i18 == i15) {
                c = c4;
                i = -50;
            } else if (i18 != i14) {
                i = i11;
                c = c4;
            } else {
                c = c4;
                i = -100;
            }
            float f8 = c4847.f18491;
            if (f8 != -3.4028235E38f) {
                i2 = i11;
                if (c4847.f18501 != i15) {
                    Float fValueOf2 = Float.valueOf(f8 * 100.0f);
                    Object[] objArr4 = new Object[i15];
                    objArr4[i2] = fValueOf2;
                    str = String.format(Locale.US, "%.2f%%", objArr4);
                    int i20 = c4847.f18497;
                    i19 = i17 == i15 ? -(i20 != i15 ? i20 != i14 ? i2 : -100 : -50) : i20 != i15 ? i20 != i14 ? i2 : -100 : -50;
                } else {
                    if (f8 >= 0.0f) {
                        Float fValueOf3 = Float.valueOf(f8 * f7);
                        Object[] objArr5 = new Object[i15];
                        objArr5[i2] = fValueOf3;
                        str = String.format(Locale.US, "%.2fem", objArr5);
                        i3 = i2;
                        i19 = i3;
                    } else {
                        Float fValueOf4 = Float.valueOf(((-f8) - 1.0f) * f7);
                        Object[] objArr6 = new Object[i15];
                        objArr6[i2] = fValueOf4;
                        str = String.format(Locale.US, "%.2fem", objArr6);
                        i3 = i15;
                        i19 = i2;
                    }
                    f = c4847.f18495;
                    if (f == -3.4028235E38f) {
                        str2 = str;
                        Object[] objArr7 = new Object[i15];
                        objArr7[i2] = Float.valueOf(f * 100.0f);
                        str3 = String.format(Locale.US, "%.2f%%", objArr7);
                    } else {
                        str2 = str;
                        str3 = "fit-content";
                    }
                    alignment = c4847.f18484;
                    if (alignment != null) {
                        str4 = str3;
                        i5 = i15;
                        obj = "center";
                        i4 = 2;
                    } else {
                        int i21 = AbstractC1566.f6271[alignment.ordinal()];
                        if (i21 != i15) {
                            i4 = 2;
                            if (i21 != 2) {
                                str4 = str3;
                                obj = "center";
                            } else {
                                str4 = str3;
                                obj = "end";
                            }
                        } else {
                            i4 = 2;
                            str4 = str3;
                            obj = "start";
                        }
                        i5 = 1;
                    }
                    String str27 = i17 == i5 ? i17 != i4 ? "horizontal-tb" : "vertical-lr" : "vertical-rl";
                    String strM95672 = m9567(c4847.f18487, c4847.f18492);
                    String str28 = ᵹˊᵫˋ.ᵶˇᵱ(!c4847.f18493 ? c4847.f18489 : this.f17223.f14089);
                    String str29 = "right";
                    String str30 = "left";
                    if (i17 != 1) {
                        if (i3 != 0) {
                        }
                        str30 = "top";
                        i6 = 2;
                        str5 = str29;
                    } else if (i17 != 2) {
                        str5 = i3 != 0 ? "bottom" : "top";
                        i6 = 2;
                    } else {
                        if (i3 == 0) {
                            str29 = "left";
                        }
                        str30 = "top";
                        i6 = 2;
                        str5 = str29;
                    }
                    if (i17 != i6 || i17 == 1) {
                        str6 = "height";
                        int i22 = i19;
                        i19 = i;
                        i = i22;
                    } else {
                        str6 = "width";
                    }
                    charSequence = c4847.f18496;
                    String str31 = str6;
                    float f9 = getContext().getResources().getDisplayMetrics().density;
                    Pattern pattern = AbstractC3491.f13436;
                    int i23 = i;
                    int i24 = i16;
                    if (charSequence != null) {
                        obj2 = obj;
                        c5534 = new C5534(9, "");
                        str10 = str26;
                        str7 = "";
                        str11 = str25;
                    } else {
                        obj2 = obj;
                        if (charSequence instanceof Spanned) {
                            str7 = "";
                            Spanned spanned = (Spanned) charSequence;
                            HashSet hashSet = new HashSet();
                            str8 = "start";
                            str9 = str28;
                            BackgroundColorSpan[] backgroundColorSpanArr = (BackgroundColorSpan[]) spanned.getSpans(i2, spanned.length(), BackgroundColorSpan.class);
                            int length = backgroundColorSpanArr.length;
                            int i25 = 0;
                            while (i25 < length) {
                                hashSet.add(Integer.valueOf(backgroundColorSpanArr[i25].getBackgroundColor()));
                                i25++;
                                backgroundColorSpanArr = backgroundColorSpanArr;
                            }
                            HashMap map2 = new HashMap();
                            Iterator it = hashSet.iterator();
                            while (it.hasNext()) {
                                int iIntValue = ((Integer) it.next()).intValue();
                                String strM6517 = AbstractC2704.m6517(iIntValue, "bg_");
                                Iterator it2 = it;
                                String strM8234 = AbstractC3653.m8234(".", strM6517, ",.", strM6517, " *");
                                String str32 = ᵹˊᵫˋ.ᵶˇᵱ(iIntValue);
                                String str33 = AbstractC0956.f4222;
                                Locale locale4 = Locale.US;
                                map2.put(strM8234, str25 + str32 + str26);
                                it = it2;
                                f6 = f6;
                            }
                            f2 = f6;
                            SparseArray sparseArray = new SparseArray();
                            Object[] spans = spanned.getSpans(0, spanned.length(), Object.class);
                            int length2 = spans.length;
                            int i26 = 0;
                            while (i26 < length2) {
                                Object obj3 = spans[i26];
                                String str34 = str26;
                                boolean z2 = obj3 instanceof StrikethroughSpan;
                                String str35 = null;
                                if (z2) {
                                    z = z2;
                                    strM8117 = "<span style='text-decoration:line-through;'>";
                                    str12 = str25;
                                } else {
                                    z = z2;
                                    if (obj3 instanceof ForegroundColorSpan) {
                                        String str36 = ᵹˊᵫˋ.ᵶˇᵱ(((ForegroundColorSpan) obj3).getForegroundColor());
                                        String str37 = AbstractC0956.f4222;
                                        Locale locale5 = Locale.US;
                                        str12 = str25;
                                        strM8117 = AbstractC3589.m8117("<span style='color:", str36, ";'>");
                                    } else {
                                        str12 = str25;
                                        if (obj3 instanceof BackgroundColorSpan) {
                                            int backgroundColor = ((BackgroundColorSpan) obj3).getBackgroundColor();
                                            String str38 = AbstractC0956.f4222;
                                            Locale locale6 = Locale.US;
                                            objArr = spans;
                                            strM8117 = AbstractC0793.m2876(backgroundColor, "<span class='bg_", "'>");
                                        } else {
                                            objArr = spans;
                                            if (obj3 instanceof C0176) {
                                                strM8117 = "<span style='text-combine-upright:all;'>";
                                            } else if (obj3 instanceof AbsoluteSizeSpan) {
                                                Object[] objArr8 = {Float.valueOf(((AbsoluteSizeSpan) obj3).getDip() ? r3.getSize() : r3.getSize() / f9)};
                                                String str39 = AbstractC0956.f4222;
                                                strM8117 = String.format(Locale.US, "<span style='font-size:%.2fpx;'>", objArr8);
                                            } else if (obj3 instanceof RelativeSizeSpan) {
                                                Object[] objArr9 = {Float.valueOf(((RelativeSizeSpan) obj3).getSizeChange() * 100.0f)};
                                                String str40 = AbstractC0956.f4222;
                                                strM8117 = String.format(Locale.US, "<span style='font-size:%.2f%%;'>", objArr9);
                                            } else {
                                                if (obj3 instanceof TypefaceSpan) {
                                                    String family = ((TypefaceSpan) obj3).getFamily();
                                                    if (family != null) {
                                                        String str41 = AbstractC0956.f4222;
                                                        Locale locale7 = Locale.US;
                                                        strM8117 = AbstractC3589.m8117("<span style='font-family:\"", family, "\";'>");
                                                    }
                                                    i7 = length2;
                                                    i8 = i26;
                                                    strM8117 = null;
                                                } else if (obj3 instanceof StyleSpan) {
                                                    int style = ((StyleSpan) obj3).getStyle();
                                                    if (style == 1) {
                                                        strM8117 = "<b>";
                                                    } else if (style != 2) {
                                                        if (style == 3) {
                                                            strM8117 = "<b><i>";
                                                        }
                                                        i7 = length2;
                                                        i8 = i26;
                                                        strM8117 = null;
                                                    } else {
                                                        strM8117 = "<i>";
                                                    }
                                                } else if (obj3 instanceof C4192) {
                                                    int i27 = ((C4192) obj3).f15992;
                                                    if (i27 == -1) {
                                                        strM8117 = "<ruby style='ruby-position:unset;'>";
                                                    } else if (i27 != 1) {
                                                        if (i27 == 2) {
                                                            strM8117 = "<ruby style='ruby-position:under;'>";
                                                        }
                                                        i7 = length2;
                                                        i8 = i26;
                                                        strM8117 = null;
                                                    } else {
                                                        strM8117 = "<ruby style='ruby-position:over;'>";
                                                    }
                                                } else if (obj3 instanceof UnderlineSpan) {
                                                    strM8117 = "<u>";
                                                } else if (obj3 instanceof C0480) {
                                                    C0480 c0480 = (C0480) obj3;
                                                    int i28 = c0480.f2577;
                                                    int i29 = c0480.f2575;
                                                    i7 = length2;
                                                    StringBuilder sb3 = new StringBuilder();
                                                    i8 = i26;
                                                    if (i29 != 1) {
                                                        i9 = 2;
                                                        if (i29 == 2) {
                                                            sb3.append("open ");
                                                        }
                                                    } else {
                                                        i9 = 2;
                                                        sb3.append("filled ");
                                                    }
                                                    if (i28 == 0) {
                                                        sb3.append("none");
                                                    } else if (i28 == 1) {
                                                        sb3.append("circle");
                                                    } else if (i28 == i9) {
                                                        sb3.append("dot");
                                                    } else if (i28 != 3) {
                                                        sb3.append("unset");
                                                    } else {
                                                        sb3.append("sesame");
                                                    }
                                                    Object[] objArr10 = {sb3.toString(), c0480.f2576 != 2 ? "over right" : "under left"};
                                                    String str42 = AbstractC0956.f4222;
                                                    strM8117 = String.format(Locale.US, "<span style='-webkit-text-emphasis-style:%1$s;text-emphasis-style:%1$s;-webkit-text-emphasis-position:%2$s;text-emphasis-position:%2$s;display:inline-block;'>", objArr10);
                                                } else {
                                                    i7 = length2;
                                                    i8 = i26;
                                                    strM8117 = null;
                                                }
                                                if (z || (obj3 instanceof ForegroundColorSpan) || (obj3 instanceof BackgroundColorSpan) || (obj3 instanceof C0176) || (obj3 instanceof AbsoluteSizeSpan) || (obj3 instanceof RelativeSizeSpan) || (obj3 instanceof C0480)) {
                                                    str13 = "</span>";
                                                } else {
                                                    if (obj3 instanceof TypefaceSpan) {
                                                        if (((TypefaceSpan) obj3).getFamily() != null) {
                                                        }
                                                    } else if (obj3 instanceof StyleSpan) {
                                                        int style2 = ((StyleSpan) obj3).getStyle();
                                                        if (style2 == 1) {
                                                            str35 = "</b>";
                                                        } else if (style2 == 2) {
                                                            str35 = "</i>";
                                                        } else if (style2 == 3) {
                                                            str35 = "</i></b>";
                                                        }
                                                    } else if (obj3 instanceof C4192) {
                                                        str35 = "<rt>" + AbstractC3491.m7991(((C4192) obj3).f15993) + "</rt></ruby>";
                                                    } else if (obj3 instanceof UnderlineSpan) {
                                                        str35 = "</u>";
                                                    }
                                                    str13 = str35;
                                                }
                                                int spanStart = spanned.getSpanStart(obj3);
                                                int spanEnd = spanned.getSpanEnd(obj3);
                                                if (strM8117 != null) {
                                                    str13.getClass();
                                                    C3931 c3931 = new C3931(spanStart, spanEnd, strM8117, str13);
                                                    C2012 c2012 = (C2012) sparseArray.get(spanStart);
                                                    if (c2012 == null) {
                                                        c2012 = new C2012();
                                                        sparseArray.put(spanStart, c2012);
                                                    }
                                                    c2012.f7954.add(c3931);
                                                    C2012 c20122 = (C2012) sparseArray.get(spanEnd);
                                                    if (c20122 == null) {
                                                        c20122 = new C2012();
                                                        sparseArray.put(spanEnd, c20122);
                                                    }
                                                    c20122.f7953.add(c3931);
                                                }
                                                i26 = i8 + 1;
                                                str26 = str34;
                                                str25 = str12;
                                                spans = objArr;
                                                length2 = i7;
                                            }
                                        }
                                        i7 = length2;
                                        i8 = i26;
                                        if (z) {
                                            str13 = "</span>";
                                        }
                                        int spanStart2 = spanned.getSpanStart(obj3);
                                        int spanEnd2 = spanned.getSpanEnd(obj3);
                                        if (strM8117 != null) {
                                        }
                                        i26 = i8 + 1;
                                        str26 = str34;
                                        str25 = str12;
                                        spans = objArr;
                                        length2 = i7;
                                    }
                                }
                                objArr = spans;
                                i7 = length2;
                                i8 = i26;
                                if (z) {
                                }
                                int spanStart22 = spanned.getSpanStart(obj3);
                                int spanEnd22 = spanned.getSpanEnd(obj3);
                                if (strM8117 != null) {
                                }
                                i26 = i8 + 1;
                                str26 = str34;
                                str25 = str12;
                                spans = objArr;
                                length2 = i7;
                            }
                            str10 = str26;
                            str11 = str25;
                            StringBuilder sb4 = new StringBuilder(spanned.length());
                            int i30 = 0;
                            int i31 = 0;
                            while (i30 < sparseArray.size()) {
                                int iKeyAt = sparseArray.keyAt(i30);
                                sb4.append(AbstractC3491.m7991(spanned.subSequence(i31, iKeyAt)));
                                C2012 c20123 = (C2012) sparseArray.get(iKeyAt);
                                ArrayList arrayList = c20123.f7953;
                                ArrayList arrayList2 = c20123.f7954;
                                SparseArray sparseArray2 = sparseArray;
                                Collections.sort(arrayList, C3931.f15015);
                                ArrayList arrayList3 = c20123.f7953;
                                int size = arrayList3.size();
                                int i32 = 0;
                                while (i32 < size) {
                                    Object obj4 = arrayList3.get(i32);
                                    i32++;
                                    sb4.append(((C3931) obj4).f15019);
                                    arrayList3 = arrayList3;
                                }
                                Collections.sort(arrayList2, C3931.f15014);
                                int size2 = arrayList2.size();
                                int i33 = 0;
                                while (i33 < size2) {
                                    Object obj5 = arrayList2.get(i33);
                                    i33++;
                                    sb4.append(((C3931) obj5).f15017);
                                }
                                i30++;
                                i31 = iKeyAt;
                                sparseArray = sparseArray2;
                            }
                            sb4.append(AbstractC3491.m7991(spanned.subSequence(i31, spanned.length())));
                            c5534 = new C5534(9, sb4.toString());
                            for (String str43 : map.keySet()) {
                                String str44 = (String) map.put(str43, (String) map.get(str43));
                                ᵻᵪ.ˌᴵ(str44 == null || str44.equals(map.get(str43)));
                            }
                            Integer numValueOf = Integer.valueOf(i24);
                            Float fValueOf5 = Float.valueOf(f2);
                            Integer numValueOf2 = Integer.valueOf(i23);
                            Integer numValueOf3 = Integer.valueOf(i19);
                            f3 = c4847.f18494;
                            if (f3 != 0.0f) {
                                c3 = 1;
                                c2 = 0;
                                Object[] objArr11 = {(i17 == 2 || i17 == 1) ? "skewY" : "skewX", Float.valueOf(f3)};
                                String str45 = AbstractC0956.f4222;
                                str7 = String.format(Locale.US, "%s(%.2fdeg)", objArr11);
                            } else {
                                c2 = 0;
                                c3 = 1;
                            }
                            Object[] objArr12 = new Object[14];
                            objArr12[c2] = numValueOf;
                            objArr12[c3] = str30;
                            objArr12[2] = fValueOf5;
                            objArr12[3] = str5;
                            objArr12[c] = str2;
                            objArr12[5] = str31;
                            objArr12[6] = str4;
                            objArr12[7] = obj2;
                            objArr12[8] = str27;
                            objArr12[9] = strM95672;
                            objArr12[10] = str9;
                            objArr12[11] = numValueOf2;
                            objArr12[12] = numValueOf3;
                            objArr12[13] = str7;
                            sb.append(String.format(Locale.US, "<div style='position:absolute;z-index:%s;%s:%.2f%%;%s:%s;%s:%s;text-align:%s;writing-mode:%s;font-size:%s;background-color:%s;transform:translate(%s%%,%s%%)%s;'>", objArr12));
                            sb.append("<span class='default_bg'>");
                            alignment2 = c4847.f18488;
                            String str46 = c5534.f20903;
                            if (alignment2 != null) {
                                int i34 = AbstractC1566.f6271[alignment2.ordinal()];
                                if (i34 != 1) {
                                    i10 = 2;
                                    str14 = i34 != 2 ? "center" : "end";
                                } else {
                                    i10 = 2;
                                    str14 = str8;
                                }
                                sb.append("<span style='display:inline-block; text-align:" + str14 + ";'>");
                                sb.append(str46);
                                sb.append("</span>");
                            } else {
                                i10 = 2;
                                sb.append(str46);
                            }
                            sb.append("</span></div>");
                            i16 = i24 + 1;
                            i14 = i10;
                            f4 = f7;
                            c4 = c;
                            str26 = str10;
                            str25 = str11;
                            i11 = 0;
                            i15 = 1;
                        } else {
                            str7 = "";
                            str10 = str26;
                            str11 = str25;
                            c5534 = new C5534(9, AbstractC3491.m7991(charSequence));
                        }
                    }
                    str8 = "start";
                    str9 = str28;
                    f2 = f6;
                    while (r3.hasNext()) {
                    }
                    Integer numValueOf4 = Integer.valueOf(i24);
                    Float fValueOf52 = Float.valueOf(f2);
                    Integer numValueOf22 = Integer.valueOf(i23);
                    Integer numValueOf32 = Integer.valueOf(i19);
                    f3 = c4847.f18494;
                    if (f3 != 0.0f) {
                    }
                    Object[] objArr122 = new Object[14];
                    objArr122[c2] = numValueOf4;
                    objArr122[c3] = str30;
                    objArr122[2] = fValueOf52;
                    objArr122[3] = str5;
                    objArr122[c] = str2;
                    objArr122[5] = str31;
                    objArr122[6] = str4;
                    objArr122[7] = obj2;
                    objArr122[8] = str27;
                    objArr122[9] = strM95672;
                    objArr122[10] = str9;
                    objArr122[11] = numValueOf22;
                    objArr122[12] = numValueOf32;
                    objArr122[13] = str7;
                    sb.append(String.format(Locale.US, "<div style='position:absolute;z-index:%s;%s:%.2f%%;%s:%s;%s:%s;text-align:%s;writing-mode:%s;font-size:%s;background-color:%s;transform:translate(%s%%,%s%%)%s;'>", objArr122));
                    sb.append("<span class='default_bg'>");
                    alignment2 = c4847.f18488;
                    String str462 = c5534.f20903;
                    if (alignment2 != null) {
                    }
                    sb.append("</span></div>");
                    i16 = i24 + 1;
                    i14 = i10;
                    f4 = f7;
                    c4 = c;
                    str26 = str10;
                    str25 = str11;
                    i11 = 0;
                    i15 = 1;
                }
            } else {
                i2 = i11;
                Object[] objArr13 = new Object[i15];
                objArr13[i2] = Float.valueOf((1.0f - this.f17225) * 100.0f);
                str = String.format(Locale.US, "%.2f%%", objArr13);
            }
            i3 = i2;
            f = c4847.f18495;
            if (f == -3.4028235E38f) {
            }
            alignment = c4847.f18484;
            if (alignment != null) {
            }
            String str272 = i17 == i5 ? i17 != i4 ? "horizontal-tb" : "vertical-lr" : "vertical-rl";
            String strM956722 = m9567(c4847.f18487, c4847.f18492);
            String str282 = ᵹˊᵫˋ.ᵶˇᵱ(!c4847.f18493 ? c4847.f18489 : this.f17223.f14089);
            String str292 = "right";
            String str302 = "left";
            if (i17 != 1) {
            }
            if (i17 != i6) {
                str6 = "height";
                int i222 = i19;
                i19 = i;
                i = i222;
            }
            charSequence = c4847.f18496;
            String str312 = str6;
            float f92 = getContext().getResources().getDisplayMetrics().density;
            Pattern pattern2 = AbstractC3491.f13436;
            int i232 = i;
            int i242 = i16;
            if (charSequence != null) {
            }
            str8 = "start";
            str9 = str282;
            f2 = f6;
            while (r3.hasNext()) {
            }
            Integer numValueOf42 = Integer.valueOf(i242);
            Float fValueOf522 = Float.valueOf(f2);
            Integer numValueOf222 = Integer.valueOf(i232);
            Integer numValueOf322 = Integer.valueOf(i19);
            f3 = c4847.f18494;
            if (f3 != 0.0f) {
            }
            Object[] objArr1222 = new Object[14];
            objArr1222[c2] = numValueOf42;
            objArr1222[c3] = str302;
            objArr1222[2] = fValueOf522;
            objArr1222[3] = str5;
            objArr1222[c] = str2;
            objArr1222[5] = str312;
            objArr1222[6] = str4;
            objArr1222[7] = obj2;
            objArr1222[8] = str272;
            objArr1222[9] = strM956722;
            objArr1222[10] = str9;
            objArr1222[11] = numValueOf222;
            objArr1222[12] = numValueOf322;
            objArr1222[13] = str7;
            sb.append(String.format(Locale.US, "<div style='position:absolute;z-index:%s;%s:%.2f%%;%s:%s;%s:%s;text-align:%s;writing-mode:%s;font-size:%s;background-color:%s;transform:translate(%s%%,%s%%)%s;'>", objArr1222));
            sb.append("<span class='default_bg'>");
            alignment2 = c4847.f18488;
            String str4622 = c5534.f20903;
            if (alignment2 != null) {
            }
            sb.append("</span></div>");
            i16 = i242 + 1;
            i14 = i10;
            f4 = f7;
            c4 = c;
            str26 = str10;
            str25 = str11;
            i11 = 0;
            i15 = 1;
        }
        sb.append("</div></body></html>");
        StringBuilder sb5 = new StringBuilder();
        sb5.append("<html><head><style>");
        for (String str47 : map.keySet()) {
            sb5.append(str47);
            sb5.append("{");
            sb5.append((String) map.get(str47));
            sb5.append("}");
        }
        sb5.append("</style></head>");
        sb.insert(0, (CharSequence) sb5);
        this.f17222.loadData(Base64.encodeToString(sb.toString().getBytes(StandardCharsets.UTF_8), 1), "text/html", "base64");
    }

    @Override // defpackage.InterfaceC2326
    /* JADX INFO: renamed from: ᵲᵶᵳˈ */
    public final void mo5972(List list, C3696 c3696, float f, float f2) {
        this.f17223 = c3696;
        this.f17224 = f;
        this.f17225 = f2;
        ArrayList arrayList = new ArrayList();
        ArrayList arrayList2 = new ArrayList();
        for (int i = 0; i < list.size(); i++) {
            C4847 c4847 = (C4847) list.get(i);
            if (c4847.f18499 != null) {
                arrayList.add(c4847);
            } else {
                arrayList2.add(c4847);
            }
        }
        if (!this.f17221.isEmpty() || !arrayList2.isEmpty()) {
            this.f17221 = arrayList2;
            m9568();
        }
        this.f17220.mo5972(arrayList, c3696, f, f2);
        invalidate();
    }
}
