TikTok.apk(点击下载) / C63807P3k.java


package X;

import android.content.Context;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.text.TextPaint;
import android.util.SparseArray;
import android.util.TypedValue;
import android.view.ContextThemeWrapper;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RelativeLayout;
import androidx.appcompat.widget.AppCompatImageView;
import com.bytedance.covode.number.Covode;
import com.bytedance.lighten.loader.SmartImageView;
import com.bytedance.router.SmartRouter;
import com.bytedance.tux.icon.TuxIconView;
import com.bytedance.tux.input.TuxTextView;
import com.bytedance.tux.widget.FlowLayout;
import com.ss.android.ugc.aweme.ecommerce.ECommerceService;
import com.ss.android.ugc.aweme.ecommercebase.dto.GImage;
import com.ss.android.ugc.aweme.ecommercebase.dto.PromotionItem;
import com.ss.android.ugc.aweme.ecommercebase.dto.PromotionView;
import com.ss.android.ugc.aweme.ecommercebase.network.BaseResponse;
import com.ss.android.ugc.aweme.ecommercelive.business.audience.api.AudienceProductListApi;
import com.ss.android.ugc.aweme.ecommercelive.business.audience.popcard.vo.PopupCardVO;
import com.ss.android.ugc.aweme.ecommercelive.business.common.view.LogoTuxTextView;
import com.ss.android.ugc.aweme.live.ILiveOuterService;
import com.ss.android.ugc.aweme.live.LiveOuterService;
import com.zhiliaoapp.musically.R;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import kotlin.g.b.m;

/* renamed from: X.P3k  reason: case insensitive filesystem */
public final class C63807P3k extends RelativeLayout implements P3Z {
    public static final C53157Ku2 LIZ = new C53157Ku2((byte) 0);
    public AnonymousClass36P LIZIZ;
    public SparseArray LIZJ;

    static {
        Covode.recordClassIndex(64285);
    }

    /* JADX INFO: super call moved to the top of the method (can break code semantics) */
    public C63807P3k(Context context) {
        super(context, null, 0);
        C21090sc.LIZ(context);
        ViewGroup.MarginLayoutParams marginLayoutParams = null;
        ContextThemeWrapper contextThemeWrapper = new ContextThemeWrapper(context, (int) R.style.y2);
        LayoutInflater.from(context).cloneInContext(contextThemeWrapper).inflate(R.layout.a49, this);
        setLayoutParams(new RelativeLayout.LayoutParams(C44801pl.LIZ(300, context), -2));
        AnonymousClass36P r2 = new AnonymousClass36P();
        r2.LIZ(contextThemeWrapper, R.drawable.a8f, new C53156Ku1(this, contextThemeWrapper));
        this.LIZIZ = r2;
        TuxTextView tuxTextView = (TuxTextView) LIZ(R.id.b2j);
        m.LIZIZ(tuxTextView, "");
        TextPaint paint = tuxTextView.getPaint();
        paint.setFlags(16);
        paint.setAntiAlias(true);
        TuxIconView tuxIconView = (TuxIconView) LIZ(R.id.biv);
        m.LIZIZ(tuxIconView, "");
        C51176K7p.LIZIZ(tuxIconView, 0, 0, 0, 0, false, 16);
        View LIZ2 = LIZ(R.id.biv);
        int LIZ3 = C44801pl.LIZ(2, context);
        if (LIZ2 != null) {
            ViewGroup.LayoutParams layoutParams = LIZ2.getLayoutParams();
            ViewGroup.MarginLayoutParams marginLayoutParams2 = layoutParams instanceof ViewGroup.MarginLayoutParams ? layoutParams : marginLayoutParams;
            if (marginLayoutParams2 != null) {
                marginLayoutParams2.leftMargin = LIZ3;
            }
            LIZ2.requestLayout();
        }
        TuxIconView tuxIconView2 = (TuxIconView) LIZ(R.id.biv);
        m.LIZIZ(tuxIconView2, "");
        ViewGroup.LayoutParams layoutParams2 = tuxIconView2.getLayoutParams();
        if (layoutParams2 != null) {
            AnonymousClass05V r22 = (AnonymousClass05V) layoutParams2;
            r22.LJIILLIIL = -1;
            r22.LIZLLL = R.id.gky;
            r22.LJIIZILJ = -1;
            r22.LJFF = R.id.fzu;
            TuxTextView tuxTextView2 = (TuxTextView) LIZ(R.id.fzu);
            m.LIZIZ(tuxTextView2, "");
            C51176K7p.LIZIZ(tuxTextView2, 0, 0, 0, 0, false, 16);
            C74082vt.LIZ(LIZ(R.id.fzu), C44801pl.LIZ(2, context));
            TuxIconView tuxIconView3 = (TuxIconView) LIZ(R.id.biv);
            m.LIZIZ(tuxIconView3, "");
            ViewGroup.LayoutParams layoutParams3 = tuxIconView3.getLayoutParams();
            if (layoutParams3 != null) {
                AnonymousClass05V r0 = (AnonymousClass05V) layoutParams3;
                r0.LJIJ = -1;
                r0.LJI = R.id.gky;
                r0.LJIILL = -1;
                r0.LJ = R.id.biv;
                return;
            }
            throw new NullPointerException("null cannot be cast to non-null type androidx.constraintlayout.widget.ConstraintLayout.LayoutParams");
        }
        throw new NullPointerException("null cannot be cast to non-null type androidx.constraintlayout.widget.ConstraintLayout.LayoutParams");
    }

    public /* synthetic */ C63807P3k(Context context, byte b) {
        this(context);
    }

    private final void LIZ(TuxTextView tuxTextView, int i2) {
        if (tuxTextView.getMaxLines() != i2) {
            tuxTextView.setMaxLines(i2);
        }
    }

    private final void LIZ(PopupCardVO popupCardVO, C38750FJr fJr, boolean z) {
        C87053bi r10 = new C87053bi();
        r10.element = System.currentTimeMillis();
        ContextThemeWrapper contextThemeWrapper = new ContextThemeWrapper(getContext(), (int) R.style.y2);
        C225448tR r3 = new C225448tR();
        r3.LIZIZ = Integer.valueOf((int) R.attr.a5t);
        Resources system = Resources.getSystem();
        m.LIZIZ(system, "");
        r3.LIZJ = Float.valueOf(TypedValue.applyDimension(1, 2.0f, system.getDisplayMetrics()));
        Drawable LIZ2 = r3.LIZ(contextThemeWrapper);
        ((SmartImageView) LIZ(R.id.b2p)).setPlaceholderImage(LIZ2);
        String LIZ3 = C1810479p.LIZ(popupCardVO.getImageUrl(), 216, 216);
        C61448OAr oAr = new C61448OAr(this, fJr, LIZ3, LIZ2, r10, popupCardVO, z);
        AbstractC34521Yb<C23860x5> LIZ4 = C186727Vl.LIZ.LIZ(LIZ3);
        if (LIZ4 == null || !LIZ4.LJIIJ()) {
            AbstractC32261Pj unused = C24240xh.LIZ(AnonymousClass1JQ.LIZ, AnonymousClass2RI.LIZ, null, new C59568Na9(LIZ4, oAr, null), 2);
        } else {
            oAr.LIZ(true);
        }
    }

    private final void LIZJ(PopupCardVO popupCardVO, C38750FJr fJr) {
        if (popupCardVO.getPlatform() == 5 || (popupCardVO.getPlatform() == 6 && popupCardVO.getSchema() != null)) {
            String str = null;
            String LIZJ2 = fJr != null ? fJr.LIZJ("author_id") : null;
            String LIZJ3 = fJr != null ? fJr.LIZJ("room_id") : null;
            String LIZJ4 = fJr != null ? fJr.LIZJ("enter_from_merge") : null;
            String LIZJ5 = fJr != null ? fJr.LIZJ("enter_method") : null;
            String LIZJ6 = fJr != null ? fJr.LIZJ("action_type") : null;
            String LIZJ7 = fJr != null ? fJr.LIZJ("follow_status") : null;
            String LIZJ8 = fJr != null ? fJr.LIZJ("list_skin_type") : null;
            if (fJr != null) {
                str = fJr.LIZJ("product_skin_type");
            }
            int platform = popupCardVO.getPlatform();
            String schema = popupCardVO.getSchema();
            C63810P3n p3n = new C63810P3n((byte) 0);
            if (LIZJ2 == null) {
                LIZJ2 = "";
            }
            p3n.LIZIZ = LIZJ2;
            p3n.LIZJ = String.valueOf(popupCardVO.getProductId());
            p3n.LJIIJ = "live";
            p3n.LIZ = "live_popup_card";
            p3n.LJIIIIZZ = LIZJ3;
            p3n.LIZLLL = LIZJ4 + "_temai_" + LIZJ5;
            p3n.LJ = LIZJ6;
            p3n.LJFF = String.valueOf(popupCardVO.getPlatform());
            p3n.LJI = String.valueOf(popupCardVO.getSourceFrom());
            p3n.LJII = popupCardVO.getSource();
            p3n.LJIIIZ = LIZJ7;
            p3n.LJIILLIIL = LIZJ8;
            p3n.LJIIZILJ = str;
            String LIZ2 = C63809P3m.LIZ(platform, schema, p3n);
            if (LIZ2 != null) {
                ECommerceService.createIECommerceServicebyMonsterPlugin(false).prefetchPdp(LIZ2, getContext());
            }
        }
    }

    public final C39381h1 LIZ(Integer num, String str, String str2, String str3) {
        Object obj;
        T t;
        Boolean valueOf = Boolean.valueOf(new C63820P3x(num, str, str2, str3).LIZ());
        int i2 = 0;
        boolean z = true;
        if (!valueOf.booleanValue()) {
            z = false;
        }
        C39381h1 r2 = null;
        if (!z || valueOf == null) {
            return null;
        }
        valueOf.booleanValue();
        try {
            AudienceProductListApi audienceProductListApi = (AudienceProductListApi) C782836j.LIZ.LIZ(AudienceProductListApi.class, "https://oec-api.tiktokv.com");
            if (num != null) {
                i2 = num.intValue();
            }
            if (str == null) {
                str = "";
            }
            if (str2 == null) {
                str2 = "";
            }
            if (str3 == null) {
                str3 = "";
            }
            C09430Zo<BaseResponse<C39381h1>> execute = audienceProductListApi.getFansPopUp(i2, str, str2, str3).execute();
            obj = C23790wy.m3constructorimpl((execute == null || (t = execute.LIZIZ) == null) ? null : (C39381h1) t.getData());
        } catch (Throwable th) {
            obj = C23790wy.m3constructorimpl(C23800wz.LIZ(th));
        }
        if (!C23790wy.m8isFailureimpl(obj)) {
            r2 = obj;
        }
        return r2;
    }

    public final C52664Km5 LIZ() {
        C52665Km6 km6 = new C52665Km6();
        km6.LJ = C74082vt.LIZ(2.0f);
        km6.LIZ = false;
        C52664Km5 LIZ2 = km6.LIZ();
        m.LIZIZ(LIZ2, "");
        return LIZ2;
    }

    public final View LIZ(int i2) {
        if (this.LIZJ == null) {
            this.LIZJ = new SparseArray();
        }
        View view = (View) this.LIZJ.get(i2);
        if (view != null) {
            return view;
        }
        View findViewById = findViewById(i2);
        this.LIZJ.put(i2, findViewById);
        return findViewById;
    }

    public final void LIZ(PopupCardVO popupCardVO, C38750FJr fJr) {
        String str;
        AbstractC31108CJt LJ;
        P3Y LJIIIZ;
        AbstractC31108CJt LJ2;
        P3Y LJIIIZ2;
        String LIZJ2 = fJr != null ? fJr.LIZJ("author_id") : null;
        String LIZJ3 = fJr != null ? fJr.LIZJ("room_id") : null;
        String LIZJ4 = fJr != null ? fJr.LIZJ("enter_from_merge") : null;
        String LIZJ5 = fJr != null ? fJr.LIZJ("enter_method") : null;
        String LIZJ6 = fJr != null ? fJr.LIZJ("action_type") : null;
        String LIZJ7 = fJr != null ? fJr.LIZJ("follow_status") : null;
        String LIZJ8 = fJr != null ? fJr.LIZJ("entrance_form") : null;
        String LIZJ9 = fJr != null ? fJr.LIZJ("is_ad") : null;
        String LIZJ10 = fJr != null ? fJr.LIZJ("request_id") : null;
        String LIZJ11 = fJr != null ? fJr.LIZJ("list_skin_type") : null;
        String LIZJ12 = fJr != null ? fJr.LIZJ("product_skin_type") : null;
        String LIZJ13 = fJr != null ? fJr.LIZJ("search_id") : null;
        String LIZJ14 = fJr != null ? fJr.LIZJ("search_result_id") : null;
        String str2 = "";
        if (fJr == null || (str = fJr.LIZJ("track_id")) == null) {
            str = str2;
            str2 = str;
        }
        C63810P3n p3n = new C63810P3n((byte) 0);
        if (LIZJ2 == null) {
            LIZJ2 = str2;
        }
        p3n.LIZIZ = LIZJ2;
        p3n.LIZJ = String.valueOf(popupCardVO.getProductId());
        p3n.LJIIJ = "live";
        p3n.LIZ = "live_popup_card";
        p3n.LJIIIIZZ = LIZJ3;
        p3n.LIZLLL = LIZJ4 + "_temai_" + LIZJ5;
        p3n.LJ = LIZJ6;
        p3n.LJFF = String.valueOf(popupCardVO.getPlatform());
        p3n.LJI = String.valueOf(popupCardVO.getSourceFrom());
        p3n.LJII = popupCardVO.getSource();
        p3n.LJIIIZ = LIZJ7;
        p3n.LJIIJJI = LIZJ8;
        p3n.LJIIL = LIZJ9;
        p3n.LJIJJ = fJr != null ? (Map) fJr.LIZIZ("effect_ad_extra") : null;
        ILiveOuterService LJJIFFI = LiveOuterService.LJJIFFI();
        p3n.LJIILIIL = (LJJIFFI == null || (LJ2 = LJJIFFI.LJ()) == null || (LJIIIZ2 = LJ2.LJIIIZ()) == null) ? null : LJIIIZ2.LJIILL();
        ILiveOuterService LJJIFFI2 = LiveOuterService.LJJIFFI();
        p3n.LJIILJJIL = (LJJIFFI2 == null || (LJ = LJJIFFI2.LJ()) == null || (LJIIIZ = LJ.LJIIIZ()) == null) ? null : LJIIIZ.LJIILLIIL();
        if (LIZJ10 == null) {
            LIZJ10 = str2;
        }
        p3n.LJIILL = LIZJ10;
        p3n.LJIILLIIL = LIZJ11;
        p3n.LJIIZILJ = LIZJ12;
        p3n.LJIJ = LIZJ13;
        p3n.LJIJI = LIZJ14;
        p3n.LJIJJLI = str;
        if (C80983Gt.LIZ(popupCardVO.getSchema())) {
            SmartRouter.buildRoute(getContext(), C63809P3m.LIZ(popupCardVO.getPlatform(), popupCardVO.getSchema(), p3n)).open();
            return;
        }
        int LIZJ15 = AnonymousClass0NQ.LIZJ(getContext(), ((float) AnonymousClass0NQ.LIZIZ(getContext())) * 0.9f);
        C11460d5 r3 = new C11460d5("sslocal://webcast_webview");
        r3.LIZ("title", popupCardVO.getTitle());
        r3.LIZ("gravity", "bottom");
        r3.LIZ("type", "popup");
        r3.LIZ(C62398Oeh.LJFF, String.valueOf(LIZJ15));
        r3.LIZ("hide_nav_bar", 1);
        C11460d5 r2 = new C11460d5(popupCardVO.getOpenUrl());
        r2.LIZ("web_bg_color", "FFFFFF");
        r2.LIZ("hide_loading", 0);
        r3.LIZ("url", r2.LIZ());
        ILiveOuterService LJJIFFI3 = LiveOuterService.LJJIFFI();
        m.LIZIZ(LJJIFFI3, str2);
        LJJIFFI3.LJ().LIZ(getContext(), Uri.parse(r3.LIZ() + "&use_page_back=true&show_title_bar=true&show_title_close=true"));
    }

    public final void LIZ(PopupCardVO popupCardVO, C38750FJr fJr, AnonymousClass1IM<? super String, C23860x5> r9, AnonymousClass1IL<C23860x5> r10, boolean z) {
        List list;
        GImage gImage;
        C21090sc.LIZ(popupCardVO);
        LIZJ(popupCardVO, fJr);
        LIZ(popupCardVO, fJr, z);
        LogoTuxTextView logoTuxTextView = (LogoTuxTextView) LIZ(R.id.b2o);
        m.LIZIZ(logoTuxTextView, "");
        logoTuxTextView.setText(popupCardVO.getTitle());
        PromotionView promotionView = popupCardVO.getPromotionView();
        if (promotionView == null || (list = promotionView.LIZ) == null) {
            list = AnonymousClass1I6.INSTANCE;
        }
        FlowLayout flowLayout = (FlowLayout) LIZ(R.id.b2k);
        m.LIZIZ(flowLayout, "");
        C213108Yx.LIZ(flowLayout, list, AnonymousClass8Z1.POP_CARD);
        if (!list.isEmpty()) {
            LogoTuxTextView logoTuxTextView2 = (LogoTuxTextView) LIZ(R.id.b2o);
            m.LIZIZ(logoTuxTextView2, "");
            LIZ(logoTuxTextView2, 1);
        } else {
            LogoTuxTextView logoTuxTextView3 = (LogoTuxTextView) LIZ(R.id.b2o);
            m.LIZIZ(logoTuxTextView3, "");
            LIZ(logoTuxTextView3, 2);
        }
        C51156K6v promotionSkin = popupCardVO.getPromotionSkin();
        if (!(promotionSkin == null || (gImage = promotionSkin.LIZ) == null)) {
            O6Z LIZ2 = O54.LIZ(gImage.toImageUrlModel());
            LIZ2.LJJIIZ = (SmartImageView) LIZ(R.id.b2g);
            LIZ2.LIZJ();
        }
        ((LogoTuxTextView) LIZ(R.id.b2o)).LIZ(popupCardVO.getTitle(), popupCardVO.getPromotionLogos());
        TuxTextView tuxTextView = (TuxTextView) LIZ(R.id.b2q);
        m.LIZIZ(tuxTextView, "");
        String formatAvailablePrice = popupCardVO.getFormatAvailablePrice();
        if (formatAvailablePrice == null) {
            formatAvailablePrice = popupCardVO.getPrice();
        }
        tuxTextView.setText(formatAvailablePrice);
        TuxTextView tuxTextView2 = (TuxTextView) LIZ(R.id.b2j);
        m.LIZIZ(tuxTextView2, "");
        tuxTextView2.setText(popupCardVO.getFormatOriginPrice());
        TuxTextView tuxTextView3 = (TuxTextView) LIZ(R.id.b2h);
        m.LIZIZ(tuxTextView3, "");
        tuxTextView3.setText(popupCardVO.getSource());
        if (popupCardVO.isSoldOut()) {
            Context context = getContext();
            m.LIZIZ(context, "");
            C62507OgS LIZ3 = C62507OgS.LIZ(context.getResources(), R.drawable.a87, null);
            if (LIZ3 != null) {
                TuxTextView tuxTextView4 = (TuxTextView) LIZ(R.id.b2f);
                m.LIZIZ(tuxTextView4, "");
                tuxTextView4.setBackground(LIZ3);
            }
            ((TuxTextView) LIZ(R.id.b2f)).setTextColor(C017906e.LIZJ(getContext(), R.color.c3));
        } else {
            Context context2 = getContext();
            m.LIZIZ(context2, "");
            C62507OgS LIZ4 = C62507OgS.LIZ(context2.getResources(), R.drawable.a84, null);
            if (LIZ4 != null) {
                TuxTextView tuxTextView5 = (TuxTextView) LIZ(R.id.b2f);
                m.LIZIZ(tuxTextView5, "");
                tuxTextView5.setBackground(LIZ4);
            }
            ((TuxTextView) LIZ(R.id.b2f)).setTextColor(C017906e.LIZJ(getContext(), R.color.l));
        }
        AppCompatImageView appCompatImageView = (AppCompatImageView) LIZ(R.id.b2i);
        m.LIZIZ(appCompatImageView, "");
        appCompatImageView.setOnClickListener(new P48(r10));
        SmartImageView smartImageView = (SmartImageView) LIZ(R.id.b2p);
        m.LIZIZ(smartImageView, "");
        smartImageView.setOnClickListener(new P40(this, r9, popupCardVO, fJr));
        LogoTuxTextView logoTuxTextView4 = (LogoTuxTextView) LIZ(R.id.b2o);
        m.LIZIZ(logoTuxTextView4, "");
        logoTuxTextView4.setOnClickListener(new P41(this, r9, popupCardVO, fJr));
        TuxTextView tuxTextView6 = (TuxTextView) LIZ(R.id.b2f);
        m.LIZIZ(tuxTextView6, "");
        tuxTextView6.setOnClickListener(new P46(this, r9, popupCardVO, fJr));
        setOnClickListener(new P42(this, r9, popupCardVO, fJr));
    }

    public final void LIZ(PopupCardVO popupCardVO, C38750FJr fJr, C63813P3q p3q) {
        String str;
        String str2;
        List<String> urls;
        AbstractC31108CJt LJ;
        P3Y LJIIIZ;
        AbstractC31108CJt LJ2;
        P3Y LJIIIZ2;
        String LIZJ2 = fJr != null ? fJr.LIZJ("author_id") : null;
        String LIZJ3 = fJr != null ? fJr.LIZJ("room_id") : null;
        String LIZJ4 = fJr != null ? fJr.LIZJ("enter_from_merge") : null;
        String LIZJ5 = fJr != null ? fJr.LIZJ("enter_method") : null;
        String LIZJ6 = fJr != null ? fJr.LIZJ("action_type") : null;
        String LIZJ7 = fJr != null ? fJr.LIZJ("follow_status") : null;
        String LIZJ8 = fJr != null ? fJr.LIZJ("entrance_form") : null;
        String LIZJ9 = fJr != null ? fJr.LIZJ("is_ad") : null;
        String LIZJ10 = fJr != null ? fJr.LIZJ("request_id") : null;
        String LIZJ11 = fJr != null ? fJr.LIZJ("list_skin_type") : null;
        String LIZJ12 = fJr != null ? fJr.LIZJ("product_skin_type") : null;
        String LIZJ13 = fJr != null ? fJr.LIZJ("search_id") : null;
        String LIZJ14 = fJr != null ? fJr.LIZJ("search_result_id") : null;
        int platform = popupCardVO.getPlatform();
        String schema = popupCardVO.getSchema();
        C63810P3n p3n = new C63810P3n((byte) 0);
        if (LIZJ2 == null) {
            LIZJ2 = "";
        }
        p3n.LIZIZ = LIZJ2;
        p3n.LIZJ = String.valueOf(popupCardVO.getProductId());
        p3n.LJIIJ = "live";
        p3n.LIZ = "live_popup_card";
        p3n.LJIIIIZZ = LIZJ3;
        p3n.LIZLLL = LIZJ4 + "_temai_" + LIZJ5;
        p3n.LJ = LIZJ6;
        p3n.LJFF = String.valueOf(popupCardVO.getPlatform());
        p3n.LJI = String.valueOf(popupCardVO.getSourceFrom());
        p3n.LJII = popupCardVO.getSource();
        p3n.LJIIIZ = LIZJ7;
        p3n.LJIIJJI = LIZJ8;
        p3n.LJIIL = LIZJ9;
        ILiveOuterService LJJIFFI = LiveOuterService.LJJIFFI();
        p3n.LJIILIIL = (LJJIFFI == null || (LJ2 = LJJIFFI.LJ()) == null || (LJIIIZ2 = LJ2.LJIIIZ()) == null) ? null : LJIIIZ2.LJIILL();
        ILiveOuterService LJJIFFI2 = LiveOuterService.LJJIFFI();
        p3n.LJIILJJIL = (LJJIFFI2 == null || (LJ = LJJIFFI2.LJ()) == null || (LJIIIZ = LJ.LJIIIZ()) == null) ? null : LJIIIZ.LJIILLIIL();
        if (LIZJ10 == null) {
            LIZJ10 = "";
        }
        p3n.LJIILL = LIZJ10;
        p3n.LJIILLIIL = LIZJ11;
        p3n.LJIIZILJ = LIZJ12;
        p3n.LJIJ = LIZJ13;
        p3n.LJIJI = LIZJ14;
        String LIZ2 = C63809P3m.LIZ(platform, schema, p3n);
        Uri.Builder builder = new Uri.Builder();
        Uri parse = Uri.parse(p3q.LJI);
        if (parse != null) {
            Uri.Builder encodedPath = builder.scheme(parse.getScheme()).encodedAuthority(parse.getAuthority()).encodedPath(parse.getPath());
            Set<String> queryParameterNames = parse.getQueryParameterNames();
            m.LIZIZ(queryParameterNames, "");
            for (T t : queryParameterNames) {
                encodedPath.appendQueryParameter(t, parse.getQueryParameter(t));
            }
            LinkedHashMap linkedHashMap = new LinkedHashMap();
            LinkedHashMap linkedHashMap2 = new LinkedHashMap();
            ArrayList arrayList = new ArrayList();
            GImage gImage = p3q.LJII;
            if (!(gImage == null || (urls = gImage.getUrls()) == null)) {
                arrayList.addAll(urls);
            }
            linkedHashMap2.put("image_url", arrayList);
            String str3 = p3q.LIZIZ;
            if (str3 == null) {
                str3 = "";
            }
            linkedHashMap2.put("title", str3);
            String str4 = p3q.LIZJ;
            if (str4 == null) {
                str4 = "";
            }
            linkedHashMap2.put("desc", str4);
            String str5 = p3q.LIZLLL;
            if (str5 == null) {
                str5 = "";
            }
            linkedHashMap2.put("from_price", str5);
            String str6 = p3q.LJ;
            if (str6 == null) {
                str6 = "";
            }
            linkedHashMap2.put("to_price", str6);
            ArrayList arrayList2 = new ArrayList();
            List<P4D> list = p3q.LJFF;
            if (list != null) {
                for (T t2 : list) {
                    LinkedHashMap linkedHashMap3 = new LinkedHashMap();
                    String str7 = t2.LIZ;
                    if (str7 == null) {
                        str7 = "";
                    }
                    linkedHashMap3.put("text", str7);
                    Integer num = t2.LIZIZ;
                    if (num == null) {
                        num = "";
                    }
                    linkedHashMap3.put("action", num);
                    linkedHashMap3.put("redirect", LIZ2 == null ? "" : LIZ2);
                    arrayList2.add(linkedHashMap3);
                }
            }
            linkedHashMap2.put("buttons", arrayList2);
            linkedHashMap.put("content_params", linkedHashMap2);
            LinkedHashMap linkedHashMap4 = new LinkedHashMap();
            linkedHashMap4.put("enter_from", P4K.LIZ);
            if (fJr == null || (str = fJr.LIZJ("room_id")) == null) {
                str = "";
            }
            linkedHashMap4.put("room_id", str);
            if (fJr == null || (str2 = fJr.LIZJ("author_id")) == null) {
                str2 = "";
            }
            linkedHashMap4.put("anchor_id", str2);
            linkedHashMap.put("track_params", linkedHashMap4);
            Integer num2 = p3q.LIZ;
            linkedHashMap.put("popup_type", Integer.valueOf(num2 != null ? num2.intValue() : 0));
            encodedPath.appendQueryParameter("popup_params", C20590ro.LIZ().toJson(linkedHashMap));
        }
        String uri = builder.build().toString();
        m.LIZIZ(uri, "");
        SmartRouter.buildRoute(getContext(), uri).open();
    }

    public final void LIZIZ(PopupCardVO popupCardVO, C38750FJr fJr) {
        List<PromotionItem> list;
        PromotionItem promotionItem;
        Integer style;
        List<PromotionItem> list2;
        PromotionItem promotionItem2;
        Integer type;
        PromotionView promotionView = popupCardVO.getPromotionView();
        int intValue = (promotionView == null || (list2 = promotionView.LIZ) == null || (promotionItem2 = (PromotionItem) AnonymousClass1ZP.LJII(list2)) == null || (type = promotionItem2.getType()) == null) ? 0 : type.intValue();
        PromotionView promotionView2 = popupCardVO.getPromotionView();
        int intValue2 = (promotionView2 == null || (list = promotionView2.LIZ) == null || (promotionItem = (PromotionItem) AnonymousClass1ZP.LJII(list)) == null || (style = promotionItem.getStyle()) == null) ? -1 : style.intValue();
        if (intValue == 3 && intValue2 == 1) {
            AbstractC32261Pj unused = C24240xh.LIZ(C184047Ld.LIZ(AnonymousClass7MD.LIZIZ), null, null, new C63811P3o(this, fJr, popupCardVO, null), 3);
        } else {
            LIZ(popupCardVO, fJr);
        }
    }

    @Override // X.P3Z
    public final void setFlashSaleInfo(String str) {
        C21090sc.LIZ(str);
        TuxTextView tuxTextView = (TuxTextView) LIZ(R.id.fzu);
        m.LIZIZ(tuxTextView, "");
        tuxTextView.setText(str);
    }

    @Override // X.P3Z
    public final void setFlashSaleViewVisible(boolean z) {
        int i2 = z ? 0 : 8;
        View LIZ2 = LIZ(R.id.gky);
        m.LIZIZ(LIZ2, "");
        LIZ2.setVisibility(i2);
        TuxIconView tuxIconView = (TuxIconView) LIZ(R.id.biv);
        m.LIZIZ(tuxIconView, "");
        tuxIconView.setVisibility(i2);
        TuxTextView tuxTextView = (TuxTextView) LIZ(R.id.fzu);
        m.LIZIZ(tuxTextView, "");
        tuxTextView.setVisibility(i2);
    }
}