package defpackage;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

/* JADX INFO: renamed from: ˋᵻʿ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public abstract class AbstractC1555 extends ᵷˆᵣ {
    /* JADX INFO: renamed from: ᵔᵖᵹᵫ, reason: contains not printable characters */
    public static String m4400(String str) {
        return AbstractC1012.m3342(new C4874(new C4531(3, str), new C4704(5, "    "), 2), "\n", 62);
    }

    /* JADX INFO: renamed from: ᵨᵼⁱ, reason: contains not printable characters */
    public static String m4401(String str) {
        Comparable comparable;
        List listM8465 = AbstractC3801.m8465(str);
        ArrayList arrayList = new ArrayList();
        for (Object obj : listM8465) {
            if (!AbstractC3801.m8468((String) obj)) {
                arrayList.add(obj);
            }
        }
        ArrayList arrayList2 = new ArrayList(AbstractC5492.m11122(arrayList, 10));
        int size = arrayList.size();
        int i = 0;
        int i2 = 0;
        while (i2 < size) {
            Object obj2 = arrayList.get(i2);
            i2++;
            String str2 = (String) obj2;
            int length = str2.length();
            int length2 = 0;
            while (true) {
                if (length2 >= length) {
                    length2 = -1;
                    break;
                }
                if (!ᵺᵘ.ˑˊᵲ(str2.charAt(length2))) {
                    break;
                }
                length2++;
            }
            if (length2 == -1) {
                length2 = str2.length();
            }
            arrayList2.add(Integer.valueOf(length2));
        }
        Iterator it = arrayList2.iterator();
        if (it.hasNext()) {
            comparable = (Comparable) it.next();
            while (it.hasNext()) {
                Comparable comparable2 = (Comparable) it.next();
                if (comparable.compareTo(comparable2) > 0) {
                    comparable = comparable2;
                }
            }
        } else {
            comparable = null;
        }
        Integer num = (Integer) comparable;
        int iIntValue = num != null ? num.intValue() : 0;
        int length3 = str.length();
        listM8465.size();
        int iM3128 = AbstractC0892.m3128(listM8465);
        ArrayList arrayList3 = new ArrayList();
        for (Object obj3 : listM8465) {
            int i3 = i + 1;
            if (i < 0) {
                AbstractC0892.m3124();
                throw null;
            }
            String str3 = (String) obj3;
            String strM8477 = ((i == 0 || i == iM3128) && AbstractC3801.m8468(str3)) ? null : AbstractC3801.m8477(iIntValue, str3);
            if (strM8477 != null) {
                arrayList3.add(strM8477);
            }
            i = i3;
        }
        StringBuilder sb = new StringBuilder(length3);
        AbstractC4126.m9006(arrayList3, sb, "\n", "", "", "...", null);
        return sb.toString();
    }

    /* JADX INFO: renamed from: ᵯᵷʽ, reason: contains not printable characters */
    public static String m4402(String str) {
        if (AbstractC3801.m8468("|")) {
            ᵕᵩʽᵲ.ᵮᵣᵗˈ("marginPrefix must be non-blank string.");
            return null;
        }
        List listM8465 = AbstractC3801.m8465(str);
        int length = str.length();
        listM8465.size();
        int iM3128 = AbstractC0892.m3128(listM8465);
        ArrayList arrayList = new ArrayList();
        int i = 0;
        for (Object obj : listM8465) {
            int i2 = i + 1;
            if (i < 0) {
                AbstractC0892.m3124();
                throw null;
            }
            String str2 = (String) obj;
            if ((i == 0 || i == iM3128) && AbstractC3801.m8468(str2)) {
                str2 = null;
            } else {
                int length2 = str2.length();
                int i3 = 0;
                while (true) {
                    if (i3 >= length2) {
                        i3 = -1;
                        break;
                    }
                    if (!ᵺᵘ.ˑˊᵲ(str2.charAt(i3))) {
                        break;
                    }
                    i3++;
                }
                String strSubstring = (i3 != -1 && str2.startsWith("|", i3)) ? str2.substring("|".length() + i3) : null;
                if (strSubstring != null) {
                    str2 = strSubstring;
                }
            }
            if (str2 != null) {
                arrayList.add(str2);
            }
            i = i2;
        }
        StringBuilder sb = new StringBuilder(length);
        AbstractC4126.m9006(arrayList, sb, "\n", "", "", "...", null);
        return sb.toString();
    }
}
