ChatOn v1.35.366360版本的 MD5 值为:cde28447b38d5467efa95e48e7076155

以下内容为反编译后的 t5.java 源代码,内容仅作参考


package ec;

import com.itextpdf.text.html.HtmlTags;
import com.itextpdf.text.pdf.PdfObject;
import com.itextpdf.text.pdf.security.SecurityConstants;
import com.itextpdf.text.xml.xmp.DublinCoreSchema;
import com.itextpdf.xmp.XMPException;
import java.util.ArrayList;
import java.util.Iterator;
import org.w3c.dom.Attr;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
public abstract class t5 {
    public static rg.h a(rg.f fVar, rg.h hVar, Node node, String str, boolean z8) {
        h.h hVar2 = qg.c.f18583a;
        String namespaceURI = node.getNamespaceURI();
        if (namespaceURI != null) {
            if ("http://purl.org/dc/1.1/".equals(namespaceURI)) {
                namespaceURI = DublinCoreSchema.DEFAULT_XPATH_URI;
            }
            String n10 = hVar2.n(namespaceURI);
            if (n10 == null) {
                n10 = hVar2.q(namespaceURI, node.getPrefix() != null ? node.getPrefix() : "_dflt");
            }
            StringBuilder o10 = androidx.activity.h.o(n10);
            o10.append(node.getLocalName());
            String sb2 = o10.toString();
            ?? bVar = new tg.b();
            boolean z10 = false;
            if (z8) {
                hVar = u5.e(fVar.f19068d, namespaceURI, "_dflt", true);
                hVar.f19077y = false;
                if (hVar2.k(sb2) != null) {
                    fVar.f19068d.f19078z = true;
                    hVar.f19078z = true;
                    z10 = true;
                }
            }
            boolean equals = "rdf:li".equals(sb2);
            boolean equals2 = "rdf:value".equals(sb2);
            rg.h hVar3 = new rg.h(sb2, str, bVar);
            hVar3.A = z10;
            if (equals2) {
                hVar.a(1, hVar3);
            } else {
                hVar.b(hVar3);
            }
            if (equals2) {
                if (z8 || !hVar.j().c(256)) {
                    throw new XMPException("Misplaced rdf:value element", 202);
                }
                hVar.B = true;
            }
            if (equals) {
                if (!hVar.j().c(512)) {
                    throw new XMPException("Misplaced rdf:li element", 202);
                }
                hVar3.f19071d = "[]";
            }
            return hVar3;
        }
        throw new XMPException("XML namespace required for all elements and attributes", 202);
    }

    public static void b(rg.h hVar, String str, String str2) {
        if ("xml:lang".equals(str)) {
            str2 = rg.d.e(str2);
        }
        hVar.c(new rg.h(str, str2, null));
    }

    public static void c(rg.h hVar) {
        int i10 = 1;
        rg.h g10 = hVar.g(1);
        if (g10.j().c(64)) {
            if (hVar.j().c(64)) {
                throw new XMPException("Redundant xml:lang for rdf:value element", 203);
            }
            rg.h l10 = g10.l(1);
            g10.r(l10);
            hVar.c(l10);
        }
        while (true) {
            ArrayList arrayList = g10.f19075v;
            if (i10 > (arrayList != null ? arrayList.size() : 0)) {
                break;
            }
            hVar.c(g10.l(i10));
            i10++;
        }
        for (int i11 = 2; i11 <= hVar.i(); i11++) {
            hVar.c(hVar.g(i11));
        }
        hVar.B = false;
        hVar.j().g(false);
        tg.c j10 = hVar.j();
        tg.c j11 = g10.j();
        if (j11 != null) {
            int i12 = j11.f19722a | j10.f19722a;
            j10.b(i12);
            j10.f19722a = i12;
        } else {
            j10.getClass();
        }
        hVar.f19072e = g10.f19072e;
        hVar.f19074n = null;
        Iterator o10 = g10.o();
        while (o10.hasNext()) {
            hVar.b((rg.h) o10.next());
        }
    }

    public static int d(Node node) {
        String localName = node.getLocalName();
        String namespaceURI = node.getNamespaceURI();
        if (namespaceURI == null && (("about".equals(localName) || "ID".equals(localName)) && (node instanceof Attr) && "http://www.w3.org/1999/02/22-rdf-syntax-ns#".equals(((Attr) node).getOwnerElement().getNamespaceURI()))) {
            namespaceURI = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
        }
        if ("http://www.w3.org/1999/02/22-rdf-syntax-ns#".equals(namespaceURI)) {
            if (HtmlTags.LI.equals(localName)) {
                return 9;
            }
            if ("parseType".equals(localName)) {
                return 4;
            }
            if ("Description".equals(localName)) {
                return 8;
            }
            if ("about".equals(localName)) {
                return 3;
            }
            if ("resource".equals(localName)) {
                return 5;
            }
            if ("RDF".equals(localName)) {
                return 1;
            }
            if ("ID".equals(localName)) {
                return 2;
            }
            if ("nodeID".equals(localName)) {
                return 6;
            }
            if ("datatype".equals(localName)) {
                return 7;
            }
            if ("aboutEach".equals(localName)) {
                return 10;
            }
            if ("aboutEachPrefix".equals(localName)) {
                return 11;
            }
            return "bagID".equals(localName) ? 12 : 0;
        }
        return 0;
    }

    public static boolean e(Node node) {
        if (node.getNodeType() != 3) {
            return false;
        }
        String nodeValue = node.getNodeValue();
        for (int i10 = 0; i10 < nodeValue.length(); i10++) {
            if (!Character.isWhitespace(nodeValue.charAt(i10))) {
                return false;
            }
        }
        return true;
    }

    public static void f(rg.f fVar, rg.h hVar, Node node, boolean z8) {
        boolean z10;
        int i10;
        if (node.hasChildNodes()) {
            throw new XMPException("Nested content not allowed with rdf:resource or property attributes", 202);
        }
        Node node2 = null;
        boolean z11 = false;
        boolean z12 = false;
        boolean z13 = false;
        boolean z14 = false;
        for (int i11 = 0; i11 < node.getAttributes().getLength(); i11++) {
            Node item = node.getAttributes().item(i11);
            if (!SecurityConstants.XMLNS.equals(item.getPrefix()) && (item.getPrefix() != null || !SecurityConstants.XMLNS.equals(item.getNodeName()))) {
                int d10 = d(item);
                if (d10 != 0) {
                    if (d10 == 2) {
                        continue;
                    } else if (d10 != 5) {
                        if (d10 != 6) {
                            throw new XMPException("Unrecognized attribute of empty property element", 202);
                        }
                        if (z12) {
                            throw new XMPException("Empty property element can't have both rdf:resource and rdf:nodeID", 202);
                        }
                        z14 = true;
                    } else if (z14) {
                        throw new XMPException("Empty property element can't have both rdf:resource and rdf:nodeID", 202);
                    } else {
                        if (z11) {
                            throw new XMPException("Empty property element can't have both rdf:value and rdf:resource", 203);
                        }
                        if (!z11) {
                            node2 = item;
                        }
                        z12 = true;
                    }
                } else if ("value".equals(item.getLocalName()) && "http://www.w3.org/1999/02/22-rdf-syntax-ns#".equals(item.getNamespaceURI())) {
                    if (z12) {
                        throw new XMPException("Empty property element can't have both rdf:value and rdf:resource", 203);
                    }
                    node2 = item;
                    z11 = true;
                } else if (!"xml:lang".equals(item.getNodeName())) {
                    z13 = true;
                }
            }
        }
        String str = PdfObject.NOTHING;
        rg.h a10 = a(fVar, hVar, node, PdfObject.NOTHING, z8);
        if (z11 || z12) {
            if (node2 != null) {
                str = node2.getNodeValue();
            }
            a10.f19072e = str;
            if (!z11) {
                a10.j().e(2, true);
            }
        } else if (z13) {
            a10.j().g(true);
            z10 = true;
            for (i10 = 0; i10 < node.getAttributes().getLength(); i10++) {
                Node item2 = node.getAttributes().item(i10);
                if (item2 != node2 && !SecurityConstants.XMLNS.equals(item2.getPrefix()) && (item2.getPrefix() != null || !SecurityConstants.XMLNS.equals(item2.getNodeName()))) {
                    int d11 = d(item2);
                    if (d11 != 0) {
                        if (d11 != 2) {
                            if (d11 == 5) {
                                b(a10, "rdf:resource", item2.getNodeValue());
                            } else if (d11 != 6) {
                                throw new XMPException("Unrecognized attribute of empty property element", 202);
                            }
                        }
                    } else if (!z10) {
                        b(a10, item2.getNodeName(), item2.getNodeValue());
                    } else if ("xml:lang".equals(item2.getNodeName())) {
                        b(a10, "xml:lang", item2.getNodeValue());
                    } else {
                        a(fVar, a10, item2, item2.getNodeValue(), false);
                    }
                }
            }
        }
        z10 = false;
        while (i10 < node.getAttributes().getLength()) {
        }
    }

    public static void g(rg.f fVar, rg.h hVar, Node node, boolean z8) {
        rg.h a10 = a(fVar, hVar, node, null, z8);
        for (int i10 = 0; i10 < node.getAttributes().getLength(); i10++) {
            Node item = node.getAttributes().item(i10);
            if (!SecurityConstants.XMLNS.equals(item.getPrefix()) && (item.getPrefix() != null || !SecurityConstants.XMLNS.equals(item.getNodeName()))) {
                String namespaceURI = item.getNamespaceURI();
                String localName = item.getLocalName();
                if ("xml:lang".equals(item.getNodeName())) {
                    b(a10, "xml:lang", item.getNodeValue());
                } else if (!"http://www.w3.org/1999/02/22-rdf-syntax-ns#".equals(namespaceURI) || (!"ID".equals(localName) && !"datatype".equals(localName))) {
                    throw new XMPException("Invalid attribute for literal property element", 202);
                }
            }
        }
        String str = PdfObject.NOTHING;
        for (int i11 = 0; i11 < node.getChildNodes().getLength(); i11++) {
            Node item2 = node.getChildNodes().item(i11);
            if (item2.getNodeType() != 3) {
                throw new XMPException("Invalid child of literal property element", 202);
            }
            StringBuilder o10 = androidx.activity.h.o(str);
            o10.append(item2.getNodeValue());
            str = o10.toString();
        }
        a10.f19072e = str;
    }

    public static void h(rg.f fVar, rg.h hVar, Node node, boolean z8) {
        int d10 = d(node);
        if (d10 != 8 && d10 != 0) {
            throw new XMPException("Node element must be rdf:Description or typed node", 202);
        }
        if (z8 && d10 == 0) {
            throw new XMPException("Top level typed node not allowed", 203);
        }
        int i10 = 0;
        for (int i11 = 0; i11 < node.getAttributes().getLength(); i11++) {
            Node item = node.getAttributes().item(i11);
            if (!SecurityConstants.XMLNS.equals(item.getPrefix()) && (item.getPrefix() != null || !SecurityConstants.XMLNS.equals(item.getNodeName()))) {
                int d11 = d(item);
                if (d11 == 0) {
                    a(fVar, hVar, item, item.getNodeValue(), z8);
                } else if (d11 != 6 && d11 != 2 && d11 != 3) {
                    throw new XMPException("Invalid nodeElement attribute", 202);
                } else {
                    if (i10 > 0) {
                        throw new XMPException("Mutally exclusive about, ID, nodeID attributes", 202);
                    }
                    i10++;
                    if (z8 && d11 == 3) {
                        String str = hVar.f19071d;
                        if (str == null || str.length() <= 0) {
                            hVar.f19071d = item.getNodeValue();
                        } else if (!hVar.f19071d.equals(item.getNodeValue())) {
                            throw new XMPException("Mismatched top level rdf:about values", 203);
                        }
                    }
                }
            }
        }
        i(fVar, hVar, node, z8);
    }

    public static void i(rg.f fVar, rg.h hVar, Node node, boolean z8) {
        boolean z10;
        boolean z11;
        for (int i10 = 0; i10 < node.getChildNodes().getLength(); i10++) {
            Node item = node.getChildNodes().item(i10);
            if (!e(item)) {
                if (item.getNodeType() != 1) {
                    throw new XMPException("Expected property element node not found", 202);
                }
                int d10 = d(item);
                if (d10 != 8 && (10 > d10 || d10 > 12)) {
                    if (!(1 <= d10 && d10 <= 7)) {
                        NamedNodeMap attributes = item.getAttributes();
                        ArrayList<String> arrayList = null;
                        for (int i11 = 0; i11 < attributes.getLength(); i11++) {
                            Node item2 = attributes.item(i11);
                            if (SecurityConstants.XMLNS.equals(item2.getPrefix()) || (item2.getPrefix() == null && SecurityConstants.XMLNS.equals(item2.getNodeName()))) {
                                if (arrayList == null) {
                                    arrayList = new ArrayList();
                                }
                                arrayList.add(item2.getNodeName());
                            }
                        }
                        if (arrayList != null) {
                            for (String str : arrayList) {
                                attributes.removeNamedItem(str);
                            }
                        }
                        if (attributes.getLength() > 3) {
                            f(fVar, hVar, item, z8);
                        } else {
                            for (int i12 = 0; i12 < attributes.getLength(); i12++) {
                                Node item3 = attributes.item(i12);
                                String localName = item3.getLocalName();
                                String namespaceURI = item3.getNamespaceURI();
                                String nodeValue = item3.getNodeValue();
                                if (!"xml:lang".equals(item3.getNodeName()) || ("ID".equals(localName) && "http://www.w3.org/1999/02/22-rdf-syntax-ns#".equals(namespaceURI))) {
                                    if ("datatype".equals(localName) && "http://www.w3.org/1999/02/22-rdf-syntax-ns#".equals(namespaceURI)) {
                                        g(fVar, hVar, item, z8);
                                    } else if (!"parseType".equals(localName) || !"http://www.w3.org/1999/02/22-rdf-syntax-ns#".equals(namespaceURI)) {
                                        f(fVar, hVar, item, z8);
                                    } else if ("Literal".equals(nodeValue)) {
                                        throw new XMPException("ParseTypeLiteral property element not allowed", 203);
                                    } else {
                                        if (!"Resource".equals(nodeValue)) {
                                            if (!"Collection".equals(nodeValue)) {
                                                throw new XMPException("ParseTypeOther property element not allowed", 203);
                                            }
                                            throw new XMPException("ParseTypeCollection property element not allowed", 203);
                                        }
                                        rg.h a10 = a(fVar, hVar, item, PdfObject.NOTHING, z8);
                                        a10.j().g(true);
                                        for (int i13 = 0; i13 < item.getAttributes().getLength(); i13++) {
                                            Node item4 = item.getAttributes().item(i13);
                                            if (!SecurityConstants.XMLNS.equals(item4.getPrefix()) && (item4.getPrefix() != null || !SecurityConstants.XMLNS.equals(item4.getNodeName()))) {
                                                String localName2 = item4.getLocalName();
                                                String namespaceURI2 = item4.getNamespaceURI();
                                                if ("xml:lang".equals(item4.getNodeName())) {
                                                    b(a10, "xml:lang", item4.getNodeValue());
                                                } else if (!"http://www.w3.org/1999/02/22-rdf-syntax-ns#".equals(namespaceURI2) || (!"ID".equals(localName2) && !"parseType".equals(localName2))) {
                                                    throw new XMPException("Invalid attribute for ParseTypeResource property element", 202);
                                                }
                                            }
                                        }
                                        i(fVar, a10, item, false);
                                        if (a10.B) {
                                            c(a10);
                                        }
                                    }
                                }
                            }
                            if (item.hasChildNodes()) {
                                int i14 = 0;
                                while (true) {
                                    if (i14 >= item.getChildNodes().getLength()) {
                                        g(fVar, hVar, item, z8);
                                        break;
                                    } else if (item.getChildNodes().item(i14).getNodeType() == 3) {
                                        i14++;
                                    } else if (z8 && "iX:changes".equals(item.getNodeName())) {
                                        z10 = false;
                                    } else {
                                        rg.h a11 = a(fVar, hVar, item, PdfObject.NOTHING, z8);
                                        for (int i15 = 0; i15 < item.getAttributes().getLength(); i15++) {
                                            Node item5 = item.getAttributes().item(i15);
                                            if (!SecurityConstants.XMLNS.equals(item5.getPrefix()) && (item5.getPrefix() != null || !SecurityConstants.XMLNS.equals(item5.getNodeName()))) {
                                                String localName3 = item5.getLocalName();
                                                String namespaceURI3 = item5.getNamespaceURI();
                                                if ("xml:lang".equals(item5.getNodeName())) {
                                                    b(a11, "xml:lang", item5.getNodeValue());
                                                } else if (!"ID".equals(localName3) || !"http://www.w3.org/1999/02/22-rdf-syntax-ns#".equals(namespaceURI3)) {
                                                    throw new XMPException("Invalid attribute for resource property element", 202);
                                                }
                                            }
                                        }
                                        boolean z12 = false;
                                        for (int i16 = 0; i16 < item.getChildNodes().getLength(); i16++) {
                                            Node item6 = item.getChildNodes().item(i16);
                                            if (!e(item6)) {
                                                if (item6.getNodeType() != 1 || z12) {
                                                    if (!z12) {
                                                        throw new XMPException("Children of resource property element must be XML elements", 202);
                                                    }
                                                    throw new XMPException("Invalid child of resource property element", 202);
                                                }
                                                boolean equals = "http://www.w3.org/1999/02/22-rdf-syntax-ns#".equals(item6.getNamespaceURI());
                                                String localName4 = item6.getLocalName();
                                                if (equals && "Bag".equals(localName4)) {
                                                    a11.j().e(512, true);
                                                } else if (equals && "Seq".equals(localName4)) {
                                                    tg.c j10 = a11.j();
                                                    j10.e(512, true);
                                                    j10.e(1024, true);
                                                } else if (equals && "Alt".equals(localName4)) {
                                                    tg.c j11 = a11.j();
                                                    j11.e(512, true);
                                                    j11.e(1024, true);
                                                    j11.e(2048, true);
                                                } else {
                                                    a11.j().g(true);
                                                    if (!equals && !"Description".equals(localName4)) {
                                                        String namespaceURI4 = item6.getNamespaceURI();
                                                        if (namespaceURI4 == null) {
                                                            throw new XMPException("All XML elements must be in a namespace", 203);
                                                        }
                                                        b(a11, "rdf:type", namespaceURI4 + ':' + localName4);
                                                    }
                                                }
                                                h(fVar, a11, item6, false);
                                                if (a11.B) {
                                                    c(a11);
                                                } else if (a11.j().c(2048) && a11.j().c(2048) && a11.m()) {
                                                    Iterator o10 = a11.o();
                                                    while (o10.hasNext()) {
                                                        if (((rg.h) o10.next()).j().c(64)) {
                                                            z11 = true;
                                                            a11.j().e(4096, true);
                                                            u5.h(a11);
                                                            break;
                                                        }
                                                    }
                                                }
                                                z11 = true;
                                                z12 = z11;
                                            }
                                        }
                                        z10 = false;
                                        if (!z12) {
                                            throw new XMPException("Missing child of resource property element", 202);
                                        }
                                    }
                                }
                            } else {
                                f(fVar, hVar, item, z8);
                            }
                        }
                    }
                }
                throw new XMPException("Invalid property element name", 202);
            }
        }
    }
}