package com.ss.android.ugc.aweme.bullet.business;

import X.C1156KVn;
import X.C1897Kk4;
import X.C2139Kny;
import X.C2140Knz;
import X.C2276KqB;
import X.KOD;
import X.KWA;
import X.M12;
import android.text.TextUtils;
import android.webkit.WebView;
import com.bytedance.covode.number.Covode;
import com.bytedance.frameworks.apm.trace.MethodCollector;

public final class XpathBusiness extends BulletBusinessService$Business {
    static {
        Covode.recordClassIndex(55187);
    }

    /* JADX INFO: super call moved to the top of the method (can break code semantics) */
    public XpathBusiness(C2140Knz knz) {
        super(knz);
        M12.LIZ((Object) knz);
    }

    public final void xpathDirect(WebView webView) {
        long j;
        C1156KVn<String> kVn;
        KWA kwa;
        Long l;
        MethodCollector.i(15734);
        C1897Kk4 kk4 = this.LJIIJ.LIZ;
        String str = null;
        if (!(kk4 instanceof C2276KqB)) {
            kk4 = null;
        }
        C2276KqB kqB = (C2276KqB) kk4;
        if (kqB == null || (kwa = kqB.LJJJJLL) == null || (l = (Long) kwa.LIZIZ()) == null) {
            j = 0;
        } else {
            j = l.longValue();
        }
        C1897Kk4 kk42 = this.LJIIJ.LIZ;
        if (!(kk42 instanceof C2276KqB)) {
            kk42 = null;
        }
        C2276KqB kqB2 = (C2276KqB) kk42;
        if (!(kqB2 == null || (kVn = kqB2.LJJLIIJ) == null)) {
            str = kVn.LIZIZ();
        }
        if (j > 0 && !TextUtils.isEmpty(str)) {
            String LIZ = C2139Kny.LIZ(str, j);
            if (LIZ == null) {
                LIZ = "";
            }
            if (!TextUtils.isEmpty(LIZ) && webView != null) {
                String LIZ2 = KOD.LIZ.LIZ(webView, LIZ);
                if (!TextUtils.isEmpty(LIZ2)) {
                    LIZ = LIZ2;
                }
                webView.loadUrl(LIZ);
                MethodCollector.o(15734);
                return;
            }
        }
        MethodCollector.o(15734);
    }
}
