得物.apk(点击下载) / BlindBoxOpenActivity.java


package com.shizhuang.duapp.modules.blindbox.box.activity;

import android.os.Bundle;
import android.os.CountDownTimer;
import android.os.Handler;
import android.os.Looper;
import android.util.ArrayMap;
import android.view.View;
import android.widget.LinearLayout;
import androidx.annotation.Keep;
import androidx.appcompat.widget.AppCompatImageView;
import androidx.appcompat.widget.AppCompatTextView;
import androidx.appcompat.widget.Toolbar;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.core.view.ViewCompat;
import androidx.core.view.ViewKt;
import cd.c;
import cd.e;
import com.alibaba.android.arouter.facade.annotation.Autowired;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.github.penfeizhou.animation.apng.APNGDrawable;
import com.knightboost.weaver.api.Scope;
import com.knightboost.weaver.api.annotations.Insert;
import com.knightboost.weaver.api.annotations.TargetClass;
import com.meituan.robust.ChangeQuickRedirect;
import com.meituan.robust.PatchProxy;
import com.meituan.robust.PatchProxyResult;
import com.shizhuang.duapp.R;
import com.shizhuang.duapp.common.dialog.commondialog.CommonDialogUtil;
import com.shizhuang.duapp.common.dialog.commondialog.IDialog;
import com.shizhuang.duapp.common.ui.BaseActivity;
import com.shizhuang.duapp.common.widget.font.IconFontTextView;
import com.shizhuang.duapp.libs.animation.DuAnimationView;
import com.shizhuang.duapp.libs.duimageloaderview.DuImageLoaderView;
import com.shizhuang.duapp.modules.blindbox.api.BoxApi;
import com.shizhuang.duapp.modules.blindbox.api.BoxFacade;
import com.shizhuang.duapp.modules.blindbox.box.model.BlindBoxMultiSkuModel;
import com.shizhuang.duapp.modules.blindbox.box.model.BlindBoxSkuModel;
import com.shizhuang.duapp.modules.blindbox.widget.BlindBoxMessageView;
import com.shizhuang.duapp.modules.blindbox.widget.button.BlindBoxOpenBoxButton;
import com.shizhuang.duapp.modules.blindbox.widget.button.BlindBoxOpenBoxButton$blindBoxClickView$1;
import com.shizhuang.duapp.modules.blindbox.widget.button.BlindBoxOpenBoxButton$showBoxRecycle$1;
import com.shizhuang.duapp.modules.blindbox.widget.button.BlindBoxOpenBoxButton$showOpenBox$1;
import com.shizhuang.duapp.modules.blindbox.widget.button.BlindBoxOpenListener;
import com.shizhuang.duapp.modules.blindbox.widget.card.BaseBigCardView;
import com.shizhuang.duapp.modules.blindbox.widget.card.BlindBoxAnimationCard;
import com.shizhuang.duapp.modules.blindbox.widget.card.MultiBlindBoxCardView;
import df.b0;
import df.r0;
import ex.d;
import fd.i;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import kotlin.Metadata;
import kotlin.Pair;
import kotlin.TuplesKt;
import kotlin.collections.CollectionsKt__CollectionsJVMKt;
import kotlin.collections.CollectionsKt__CollectionsKt;
import kotlin.collections.CollectionsKt__IterablesKt;
import kotlin.jvm.JvmField;
import org.greenrobot.eventbus.EventBus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import td.j;
import td.s;
import tw.l;
import tw.n;
import tw.o;
import tw.p;
import tw.q;

@Route(path = "/blindBox/OpenPage")
@Metadata(bv = {}, d1 = {"\u0000\u0010\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\b\u0007\u0018\u00002\u00020\u00012\u00020\u0002B\u0007¢\u0006\u0004\b\u0003\u0010\u0004¨\u0006\u0005"}, d2 = {"Lcom/shizhuang/duapp/modules/blindbox/box/activity/BlindBoxOpenActivity;", "Lcom/shizhuang/duapp/common/ui/BaseActivity;", "Lcom/shizhuang/duapp/modules/blindbox/widget/button/BlindBoxOpenListener;", "<init>", "()V", "du_blind_box_release"}, k = 1, mv = {1, 4, 2})
/* compiled from: BlindBoxOpenActivity.kt */
public final class BlindBoxOpenActivity extends BaseActivity implements BlindBoxOpenListener {
    public static ChangeQuickRedirect changeQuickRedirect;
    @Autowired
    @JvmField
    @Nullable

    /* renamed from: c  reason: collision with root package name */
    public String f11147c;
    @Autowired
    @JvmField
    public long d;
    @Autowired
    @JvmField
    @Nullable
    public String e = "";
    @Autowired
    @JvmField
    public int f = 1;
    @Autowired
    @JvmField

    /* renamed from: g  reason: collision with root package name */
    public boolean f11148g;
    @Autowired
    @JvmField

    /* renamed from: h  reason: collision with root package name */
    public boolean f11149h;
    public boolean i = true;
    public String j;
    public BlindBoxSkuModel k;
    public BlindBoxMultiSkuModel l;
    public final Handler m = new Handler(Looper.getMainLooper());
    public HashMap n;

    public class _boostWeave {
        public static ChangeQuickRedirect changeQuickRedirect;

        @TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.appcompat.app.AppCompatActivity")
        @Insert(mayCreateSuper = true, value = "onCreate")
        @Keep
        public static void ActivityMethodWeaver_onCreate(@androidx.annotation.Nullable BlindBoxOpenActivity blindBoxOpenActivity, Bundle bundle) {
            if (!PatchProxy.proxy(new Object[]{blindBoxOpenActivity, bundle}, null, changeQuickRedirect, true, 69000, new Class[]{BlindBoxOpenActivity.class, Bundle.class}, Void.TYPE).isSupported) {
                jn.b bVar = jn.b.f34396a;
                if (!bVar.b()) {
                    bVar.d(true);
                }
                long currentTimeMillis = System.currentTimeMillis();
                BlindBoxOpenActivity.e(blindBoxOpenActivity, bundle);
                long currentTimeMillis2 = System.currentTimeMillis();
                if (blindBoxOpenActivity.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.blindbox.box.activity.BlindBoxOpenActivity")) {
                    bVar.activityOnCreateMethod(blindBoxOpenActivity, currentTimeMillis, currentTimeMillis2);
                }
            }
        }

        @TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.appcompat.app.AppCompatActivity")
        @Insert(mayCreateSuper = true, value = "onResume")
        @Keep
        public static void ActivityMethodWeaver_onResume(BlindBoxOpenActivity blindBoxOpenActivity) {
            if (!PatchProxy.proxy(new Object[]{blindBoxOpenActivity}, null, changeQuickRedirect, true, 68999, new Class[]{BlindBoxOpenActivity.class}, Void.TYPE).isSupported) {
                long currentTimeMillis = System.currentTimeMillis();
                BlindBoxOpenActivity.d(blindBoxOpenActivity);
                long currentTimeMillis2 = System.currentTimeMillis();
                if (blindBoxOpenActivity.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.blindbox.box.activity.BlindBoxOpenActivity")) {
                    jn.b.f34396a.activityOnResumeMethod(blindBoxOpenActivity, currentTimeMillis, currentTimeMillis2);
                }
            }
        }

        @TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.appcompat.app.AppCompatActivity")
        @Insert(mayCreateSuper = true, value = "onStart")
        @Keep
        public static void ActivityMethodWeaver_onStart(BlindBoxOpenActivity blindBoxOpenActivity) {
            if (!PatchProxy.proxy(new Object[]{blindBoxOpenActivity}, null, changeQuickRedirect, true, 69001, new Class[]{BlindBoxOpenActivity.class}, Void.TYPE).isSupported) {
                long currentTimeMillis = System.currentTimeMillis();
                BlindBoxOpenActivity.f(blindBoxOpenActivity);
                long currentTimeMillis2 = System.currentTimeMillis();
                if (blindBoxOpenActivity.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.blindbox.box.activity.BlindBoxOpenActivity")) {
                    jn.b.f34396a.activityOnStartMethod(blindBoxOpenActivity, currentTimeMillis, currentTimeMillis2);
                }
            }
        }
    }

    /* compiled from: BlindBoxOpenActivity.kt */
    public static final class a implements IDialog.OnClickListener {
        public static ChangeQuickRedirect changeQuickRedirect;

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ BlindBoxOpenActivity f11152a;

        public a(BlindBoxOpenActivity blindBoxOpenActivity) {
            this.f11152a = blindBoxOpenActivity;
        }

        @Override // com.shizhuang.duapp.common.dialog.commondialog.IDialog.OnClickListener
        public final void onClick(IDialog iDialog) {
            if (!PatchProxy.proxy(new Object[]{iDialog}, this, changeQuickRedirect, false, 69018, new Class[]{IDialog.class}, Void.TYPE).isSupported) {
                BlindBoxOpenActivity blindBoxOpenActivity = this.f11152a;
                if (!PatchProxy.proxy(new Object[0], blindBoxOpenActivity, BlindBoxOpenActivity.changeQuickRedirect, false, 68985, new Class[0], Void.TYPE).isSupported) {
                    BoxFacade boxFacade = BoxFacade.f11119a;
                    String str = blindBoxOpenActivity.j;
                    if (str == null) {
                        str = "";
                    }
                    boxFacade.x(CollectionsKt__CollectionsJVMKt.listOf(str), new q(blindBoxOpenActivity, blindBoxOpenActivity));
                }
            }
        }
    }

    /* compiled from: BlindBoxOpenActivity.kt */
    public static final class b implements IDialog.OnClickListener {

        /* renamed from: a  reason: collision with root package name */
        public static final b f11153a = new b();
        public static ChangeQuickRedirect changeQuickRedirect;

        @Override // com.shizhuang.duapp.common.dialog.commondialog.IDialog.OnClickListener
        public final void onClick(@NotNull IDialog iDialog) {
            if (!PatchProxy.proxy(new Object[]{iDialog}, this, changeQuickRedirect, false, 69019, new Class[]{IDialog.class}, Void.TYPE).isSupported) {
                iDialog.dismiss();
            }
        }
    }

    public static void d(BlindBoxOpenActivity blindBoxOpenActivity) {
        boolean z;
        if (!PatchProxy.proxy(new Object[0], blindBoxOpenActivity, changeQuickRedirect, false, 68988, new Class[0], Void.TYPE).isSupported) {
            super.onResume();
            if (!blindBoxOpenActivity.i) {
                BlindBoxMessageView blindBoxMessageView = (BlindBoxMessageView) blindBoxOpenActivity._$_findCachedViewById(R.id.messageView);
                PatchProxyResult proxy = PatchProxy.proxy(new Object[0], blindBoxMessageView, BlindBoxMessageView.changeQuickRedirect, false, 71232, new Class[0], Boolean.TYPE);
                if (proxy.isSupported) {
                    z = ((Boolean) proxy.result).booleanValue();
                } else {
                    z = blindBoxMessageView.b;
                }
                if (z) {
                    i60.a aVar = i60.a.f33292a;
                    Integer valueOf = Integer.valueOf(!blindBoxOpenActivity.f11149h ? 1 : 0);
                    String str = blindBoxOpenActivity.f11147c;
                    if (str == null) {
                        str = "";
                    }
                    aVar.Z(str, valueOf);
                    blindBoxOpenActivity.g();
                } else {
                    blindBoxOpenActivity.h("452");
                }
            } else if (blindBoxOpenActivity.f == 1) {
                a1.a.j(8, i60.b.f33293a, "trade_box_pageview", "454", "");
            }
            if (blindBoxOpenActivity.f == -1) {
                blindBoxOpenActivity.h("525");
            }
            if (blindBoxOpenActivity.f > 1) {
                i60.b bVar = i60.b.f33293a;
                ArrayMap arrayMap = new ArrayMap(8);
                e.a(arrayMap, TuplesKt.to("activity_id", Long.valueOf(blindBoxOpenActivity.d)));
                bVar.b("trade_box_pageview", "526", "", arrayMap);
            }
        }
    }

    public static void e(BlindBoxOpenActivity blindBoxOpenActivity, Bundle bundle) {
        if (!PatchProxy.proxy(new Object[]{bundle}, blindBoxOpenActivity, changeQuickRedirect, false, 68995, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
            super.onCreate(bundle);
        }
    }

    public static void f(BlindBoxOpenActivity blindBoxOpenActivity) {
        if (!PatchProxy.proxy(new Object[0], blindBoxOpenActivity, changeQuickRedirect, false, 68997, new Class[0], Void.TYPE).isSupported) {
            super.onStart();
        }
    }

    public View _$_findCachedViewById(int i3) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i3)}, this, changeQuickRedirect, false, 68992, new Class[]{Integer.TYPE}, View.class);
        if (proxy.isSupported) {
            return (View) proxy.result;
        }
        if (this.n == null) {
            this.n = new HashMap();
        }
        View view = (View) this.n.get(Integer.valueOf(i3));
        if (view != null) {
            return view;
        }
        View findViewById = findViewById(i3);
        this.n.put(Integer.valueOf(i3), findViewById);
        return findViewById;
    }

    @Override // com.shizhuang.duapp.modules.blindbox.widget.button.BlindBoxOpenListener
    public void backCallBack() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 68981, new Class[0], Void.TYPE).isSupported) {
            i60.b bVar = i60.b.f33293a;
            ArrayMap arrayMap = new ArrayMap(8);
            Pair[] pairArr = new Pair[2];
            BlindBoxSkuModel blindBoxSkuModel = this.k;
            pairArr[0] = TuplesKt.to("sku_id", Long.valueOf(blindBoxSkuModel != null ? blindBoxSkuModel.getSkuId() : 0));
            pairArr[1] = TuplesKt.to("activity_id", Long.valueOf(this.d));
            e.a(arrayMap, pairArr);
            bVar.b("trade_box_block_click", "452", "173", arrayMap);
            ((MultiBlindBoxCardView) _$_findCachedViewById(R.id.skuCardView)).n();
            ((BlindBoxOpenBoxButton) _$_findCachedViewById(R.id.openButton)).f((LinearLayout) _$_findCachedViewById(R.id.boxRecycleLL));
            BlindBoxMessageView blindBoxMessageView = (BlindBoxMessageView) _$_findCachedViewById(R.id.messageView);
            if (!PatchProxy.proxy(new Object[0], blindBoxMessageView, BlindBoxMessageView.changeQuickRedirect, false, 71238, new Class[0], Void.TYPE).isSupported) {
                blindBoxMessageView.b((AppCompatTextView) blindBoxMessageView.a(R.id.recycleTv)).addListener(new fx.a(blindBoxMessageView));
            }
        }
    }

    @Override // com.shizhuang.duapp.modules.blindbox.widget.button.BlindBoxOpenListener
    public void disLikeCallback() {
        ArrayList arrayList;
        List<BlindBoxSkuModel> activitySkus;
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 68977, new Class[0], Void.TYPE).isSupported) {
            if (this.f != 1) {
                e60.b.f31725a.X0(getContext());
                i60.b bVar = i60.b.f33293a;
                ArrayMap arrayMap = new ArrayMap(8);
                Pair[] pairArr = new Pair[3];
                BlindBoxMultiSkuModel blindBoxMultiSkuModel = this.l;
                if (blindBoxMultiSkuModel == null || (activitySkus = blindBoxMultiSkuModel.getActivitySkus()) == null) {
                    arrayList = null;
                } else {
                    arrayList = new ArrayList(CollectionsKt__IterablesKt.collectionSizeOrDefault(activitySkus, 10));
                    Iterator<T> it2 = activitySkus.iterator();
                    while (it2.hasNext()) {
                        arrayList.add(Long.valueOf(it2.next().getSkuId()));
                    }
                }
                pairArr[0] = TuplesKt.to("sku_id", nd.e.o(arrayList));
                pairArr[1] = TuplesKt.to("activity_id", Long.valueOf(this.d));
                pairArr[2] = TuplesKt.to("prior_page_url", d.f32063a.a());
                e.a(arrayMap, pairArr);
                bVar.b("trade_box_block_click", "526", "673", arrayMap);
                return;
            }
            if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 68978, new Class[0], Void.TYPE).isSupported) {
                BoxFacade boxFacade = BoxFacade.f11119a;
                String str = this.j;
                if (str == null) {
                    str = "";
                }
                boxFacade.y(CollectionsKt__CollectionsJVMKt.listOf(str), new p(this, this));
            }
            ((MultiBlindBoxCardView) _$_findCachedViewById(R.id.skuCardView)).n();
            BlindBoxOpenBoxButton blindBoxOpenBoxButton = (BlindBoxOpenBoxButton) _$_findCachedViewById(R.id.openButton);
            LinearLayout linearLayout = (LinearLayout) _$_findCachedViewById(R.id.boxOpenLL);
            if (!PatchProxy.proxy(new Object[]{linearLayout}, blindBoxOpenBoxButton, BlindBoxOpenBoxButton.changeQuickRedirect, false, 71288, new Class[]{View.class}, Void.TYPE).isSupported) {
                blindBoxOpenBoxButton.b(linearLayout, new BlindBoxOpenBoxButton$showBoxRecycle$1(blindBoxOpenBoxButton));
            }
            BlindBoxMessageView blindBoxMessageView = (BlindBoxMessageView) _$_findCachedViewById(R.id.messageView);
            if (!PatchProxy.proxy(new Object[0], blindBoxMessageView, BlindBoxMessageView.changeQuickRedirect, false, 71239, new Class[0], Void.TYPE).isSupported) {
                blindBoxMessageView.b((ConstraintLayout) blindBoxMessageView.a(R.id.groupBox)).addListener(new fx.b(blindBoxMessageView));
            }
            i60.b bVar2 = i60.b.f33293a;
            ArrayMap arrayMap2 = new ArrayMap(8);
            Pair[] pairArr2 = new Pair[2];
            BlindBoxSkuModel blindBoxSkuModel = this.k;
            pairArr2[0] = TuplesKt.to("sku_id", Long.valueOf(blindBoxSkuModel != null ? blindBoxSkuModel.getSkuId() : 0));
            pairArr2[1] = TuplesKt.to("activity_id", Long.valueOf(this.d));
            e.a(arrayMap2, pairArr2);
            bVar2.b("trade_box_block_click", "451", "671", arrayMap2);
        }
    }

    public final void g() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 68986, new Class[0], Void.TYPE).isSupported) {
            i60.b bVar = i60.b.f33293a;
            ArrayMap arrayMap = new ArrayMap(8);
            Pair[] pairArr = new Pair[2];
            pairArr[0] = TuplesKt.to("activity_id", Long.valueOf(this.d));
            String str = this.e;
            if (str == null) {
                str = "";
            }
            pairArr[1] = TuplesKt.to("activityTitle", str);
            e.a(arrayMap, pairArr);
            bVar.b("trade_box_block_exposure", "451", "691", arrayMap);
        }
    }

    @Override // com.shizhuang.duapp.common.ui.BaseActivity, com.shizhuang.duapp.common.base.inter.IViewController
    public int getLayout() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 68957, new Class[0], Integer.TYPE);
        return proxy.isSupported ? ((Integer) proxy.result).intValue() : R.layout.activity_blind_box_open;
    }

    public final void h(String str) {
        if (!PatchProxy.proxy(new Object[]{str}, this, changeQuickRedirect, false, 68991, new Class[]{String.class}, Void.TYPE).isSupported) {
            a1.a.j(8, i60.b.f33293a, "trade_box_pageview", str, "");
        }
    }

    public final void i() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 68972, new Class[0], Void.TYPE).isSupported) {
            BlindBoxOpenBoxButton blindBoxOpenBoxButton = (BlindBoxOpenBoxButton) _$_findCachedViewById(R.id.openButton);
            if (!PatchProxy.proxy(new Object[0], blindBoxOpenBoxButton, BlindBoxOpenBoxButton.changeQuickRedirect, false, 71284, new Class[0], Void.TYPE).isSupported) {
                blindBoxOpenBoxButton.c((AppCompatTextView) blindBoxOpenBoxButton.a(R.id.blindBoxOpen), new BlindBoxOpenBoxButton$showOpenBox$1(blindBoxOpenBoxButton));
                gx.a aVar = new gx.a(blindBoxOpenBoxButton, 3000, 10);
                blindBoxOpenBoxButton.b = aVar;
                aVar.start();
            }
            _$_findCachedViewById(R.id.boxClickView).setVisibility(0);
            i60.b bVar = i60.b.f33293a;
            ArrayMap arrayMap = new ArrayMap(8);
            Pair[] pairArr = new Pair[2];
            BlindBoxSkuModel blindBoxSkuModel = this.k;
            pairArr[0] = TuplesKt.to("sku_id", Long.valueOf(blindBoxSkuModel != null ? blindBoxSkuModel.getSkuId() : 0));
            pairArr[1] = TuplesKt.to("activity_id", Long.valueOf(this.d));
            e.a(arrayMap, pairArr);
            bVar.b("trade_box_block_exposure", "454", "678", arrayMap);
        }
    }

    @Override // com.shizhuang.duapp.common.ui.BaseActivity, com.shizhuang.duapp.common.base.inter.IViewController
    public void initData() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 68963, new Class[0], Void.TYPE).isSupported && !PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 68964, new Class[0], Void.TYPE).isSupported) {
            int i3 = this.f;
            if (i3 != -1) {
                if (i3 != 1) {
                    if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 68967, new Class[0], Void.TYPE).isSupported) {
                        BoxFacade boxFacade = BoxFacade.f11119a;
                        String str = this.f11147c;
                        l lVar = new l(this, this);
                        if (!PatchProxy.proxy(new Object[]{str, lVar}, boxFacade, BoxFacade.changeQuickRedirect, false, 68706, new Class[]{String.class, s.class}, Void.TYPE).isSupported) {
                            j.doRequest(((BoxApi) j.getJavaGoApi(BoxApi.class)).batchOpenBox(c.b(TuplesKt.to("paymentNo", str))), lVar);
                        }
                    }
                } else if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 68965, new Class[0], Void.TYPE).isSupported) {
                    BoxFacade boxFacade2 = BoxFacade.f11119a;
                    String str2 = this.f11147c;
                    n nVar = new n(this, this);
                    if (!PatchProxy.proxy(new Object[]{str2, nVar}, boxFacade2, BoxFacade.changeQuickRedirect, false, 68690, new Class[]{String.class, s.class}, Void.TYPE).isSupported) {
                        j.doRequest(((BoxApi) j.getJavaGoApi(BoxApi.class)).openBox(c.b(TuplesKt.to("orderNo", str2))), nVar);
                    }
                }
            } else if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 68966, new Class[0], Void.TYPE).isSupported) {
                BoxFacade.f11119a.tryPlay(this.d, this.f11148g, new o(this, this));
            }
        }
    }

    @Override // com.shizhuang.duapp.common.ui.BaseActivity, com.shizhuang.duapp.common.base.inter.IViewController
    public void initStatusBar() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 68956, new Class[0], Void.TYPE).isSupported) {
            r0.z(this, null);
            fi.d.a(getWindow(), false, true);
            r0.u(this, ViewCompat.MEASURED_STATE_MASK);
        }
    }

    @Override // com.shizhuang.duapp.common.ui.BaseActivity, com.shizhuang.duapp.common.base.inter.IViewController
    public void initView(@Nullable Bundle bundle) {
        String str;
        if (!PatchProxy.proxy(new Object[]{bundle}, this, changeQuickRedirect, false, 68958, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
            ((BlindBoxOpenBoxButton) _$_findCachedViewById(R.id.openButton)).setListener(this);
            BlindBoxOpenBoxButton blindBoxOpenBoxButton = (BlindBoxOpenBoxButton) _$_findCachedViewById(R.id.openButton);
            View _$_findCachedViewById = _$_findCachedViewById(R.id.boxClickView);
            if (!PatchProxy.proxy(new Object[]{_$_findCachedViewById}, blindBoxOpenBoxButton, BlindBoxOpenBoxButton.changeQuickRedirect, false, 71291, new Class[]{View.class}, Void.TYPE).isSupported) {
                blindBoxOpenBoxButton.d = _$_findCachedViewById;
                if (_$_findCachedViewById != null) {
                    _$_findCachedViewById.setOnClickListener(new BlindBoxOpenBoxButton$blindBoxClickView$1(blindBoxOpenBoxButton));
                }
            }
            if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 68960, new Class[0], Void.TYPE).isSupported) {
                ((IconFontTextView) _$_findCachedViewById(R.id.closeIv)).setOnClickListener(new BlindBoxOpenActivity$initClick$1(this));
                ((AppCompatTextView) _$_findCachedViewById(R.id.shareButtonIndex)).setOnClickListener(new BlindBoxOpenActivity$initClick$2(this));
            }
            if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 68959, new Class[0], Void.TYPE).isSupported) {
                co.c i3 = ((DuImageLoaderView) _$_findCachedViewById(R.id.blindBoxTitle)).i("https://apk.poizon.com/duApp/Android_Config/resource/mall/app/blind_box/blind_box_title.webp");
                ex.a aVar = ex.a.f32060a;
                ((co.c) i3.v(aVar.i())).x();
                ((co.c) ((DuImageLoaderView) _$_findCachedViewById(R.id.ivCollection)).i("https://apk.poizon.com/duApp/Android_Config/resource/mall/app/blind_box/blind_box_icon_step_three.png").v(aVar.f())).x();
                PatchProxyResult proxy = PatchProxy.proxy(new Object[0], ex.c.f32062a, ex.c.changeQuickRedirect, false, 71178, new Class[0], String.class);
                if (proxy.isSupported) {
                    str = (String) proxy.result;
                } else {
                    str = (String) b0.f("box_bg_video", "");
                    if (!i.t(str)) {
                        str = null;
                    }
                }
                if (str != null) {
                    ((DuAnimationView) _$_findCachedViewById(R.id.bgImage)).f(str).k(true).z(1).s();
                }
            }
            b0.l("has_open_box", Boolean.TRUE);
            ((BlindBoxMessageView) _$_findCachedViewById(R.id.messageView)).setOnOpenListCallback(new BlindBoxOpenActivity$initView$1(this));
            ((MultiBlindBoxCardView) _$_findCachedViewById(R.id.skuCardView)).setOnToggleChangedCallback(new BlindBoxOpenActivity$initView$2(this));
        }
    }

    public final void j() {
        int i3 = 0;
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 68989, new Class[0], Void.TYPE).isSupported) {
            DuImageLoaderView duImageLoaderView = (DuImageLoaderView) _$_findCachedViewById(R.id.ivCollection);
            if (!(!((Boolean) b0.f("has_show_blind_box_guide", Boolean.FALSE)).booleanValue())) {
                i3 = 8;
            }
            duImageLoaderView.setVisibility(i3);
        }
    }

    public final void k() {
        String str;
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 68971, new Class[0], Void.TYPE).isSupported) {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[0], ex.c.f32062a, ex.c.changeQuickRedirect, false, 71179, new Class[0], String.class);
            if (proxy.isSupported) {
                str = (String) proxy.result;
            } else {
                str = (String) b0.f("box_fall_file", "");
                if (!i.t(str)) {
                    str = null;
                }
            }
            if (str != null) {
                APNGDrawable a5 = APNGDrawable.a(str);
                ((AppCompatImageView) _$_findCachedViewById(R.id.boxAnimationView)).setImageDrawable(a5);
                a5.f.add(new BlindBoxOpenActivity$showStartAnimation$$inlined$let$lambda$1(this));
                return;
            }
            i();
        }
    }

    public final void l() {
        BaseBigCardView baseBigCardView;
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 68974, new Class[0], Void.TYPE).isSupported) {
            this.i = false;
            if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 68975, new Class[0], Void.TYPE).isSupported) {
                ((MultiBlindBoxCardView) _$_findCachedViewById(R.id.skuCardView)).setVisibility(0);
                MultiBlindBoxCardView multiBlindBoxCardView = (MultiBlindBoxCardView) _$_findCachedViewById(R.id.skuCardView);
                if (!PatchProxy.proxy(new Object[0], multiBlindBoxCardView, MultiBlindBoxCardView.changeQuickRedirect, false, 71471, new Class[0], Void.TYPE).isSupported) {
                    int i3 = multiBlindBoxCardView.s;
                    if (i3 != -1 && i3 != 1) {
                        int i12 = 0;
                        for (T t : multiBlindBoxCardView.z) {
                            int i13 = i12 + 1;
                            if (i12 < 0) {
                                CollectionsKt__CollectionsKt.throwIndexOverflow();
                            }
                            T t4 = t;
                            if (!PatchProxy.proxy(new Object[]{new Integer(i12), t4}, multiBlindBoxCardView, MultiBlindBoxCardView.changeQuickRedirect, false, 71472, new Class[]{Integer.TYPE, BlindBoxAnimationCard.class}, Void.TYPE).isSupported) {
                                multiBlindBoxCardView.f11252v.postDelayed(new hx.a(multiBlindBoxCardView, i12, t4), multiBlindBoxCardView.f11251u * ((long) i12));
                            }
                            i12 = i13;
                        }
                    } else if (!multiBlindBoxCardView.A && (baseBigCardView = multiBlindBoxCardView.y) != null) {
                        baseBigCardView.animationShow();
                    }
                }
            }
            i60.a aVar = i60.a.f33292a;
            Integer valueOf = Integer.valueOf(!this.f11149h ? 1 : 0);
            String str = this.f11147c;
            if (str == null) {
                str = "";
            }
            aVar.Z(str, valueOf);
            if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 68976, new Class[0], Void.TYPE).isSupported) {
                int i14 = this.f;
                if (i14 == -1) {
                    ((AppCompatTextView) _$_findCachedViewById(R.id.shareButtonIndex)).setVisibility(8);
                    BlindBoxMessageView blindBoxMessageView = (BlindBoxMessageView) _$_findCachedViewById(R.id.messageView);
                    if (!PatchProxy.proxy(new Object[0], blindBoxMessageView, BlindBoxMessageView.changeQuickRedirect, false, 71236, new Class[0], Void.TYPE).isSupported) {
                        ((AppCompatTextView) blindBoxMessageView.a(R.id.tryTv)).setText("试玩结果仅供展示 ~");
                        blindBoxMessageView.d((AppCompatTextView) blindBoxMessageView.a(R.id.tryTv));
                    }
                    BlindBoxOpenBoxButton blindBoxOpenBoxButton = (BlindBoxOpenBoxButton) _$_findCachedViewById(R.id.openButton);
                    if (!PatchProxy.proxy(new Object[0], blindBoxOpenBoxButton, BlindBoxOpenBoxButton.changeQuickRedirect, false, 71293, new Class[0], Void.TYPE).isSupported) {
                        blindBoxOpenBoxButton.c((LinearLayout) blindBoxOpenBoxButton.a(R.id.boxTryLL), null);
                    }
                } else if (i14 != 1) {
                    ((AppCompatTextView) _$_findCachedViewById(R.id.shareButtonIndex)).setVisibility(0);
                    ((BlindBoxMessageView) _$_findCachedViewById(R.id.messageView)).c();
                    ChangeQuickRedirect changeQuickRedirect2 = BlindBoxOpenBoxButton.changeQuickRedirect;
                    ((BlindBoxOpenBoxButton) _$_findCachedViewById(R.id.openButton)).f(null);
                } else {
                    ((AppCompatTextView) _$_findCachedViewById(R.id.shareButtonIndex)).setVisibility(0);
                    ((BlindBoxMessageView) _$_findCachedViewById(R.id.messageView)).c();
                    ChangeQuickRedirect changeQuickRedirect3 = BlindBoxOpenBoxButton.changeQuickRedirect;
                    ((BlindBoxOpenBoxButton) _$_findCachedViewById(R.id.openButton)).f(null);
                    g();
                }
            }
            ((Toolbar) _$_findCachedViewById(R.id.toolbar)).setVisibility(0);
        }
    }

    @Override // androidx.activity.ComponentActivity, androidx.core.app.ComponentActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, com.shizhuang.duapp.common.ui.BaseActivity
    public void onCreate(Bundle bundle) {
        if (!PatchProxy.proxy(new Object[]{bundle}, this, changeQuickRedirect, false, 68994, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
            _boostWeave.ActivityMethodWeaver_onCreate(this, bundle);
        }
    }

    @Override // androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, com.shizhuang.duapp.common.ui.BaseActivity
    public void onDestroy() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 68990, new Class[0], Void.TYPE).isSupported) {
            super.onDestroy();
            if (!((Boolean) b0.f("has_show_blind_box_guide", Boolean.FALSE)).booleanValue()) {
                b0.l("has_show_blind_box_guide", Boolean.TRUE);
                EventBus.b().f(new vw.a());
            }
        }
    }

    @Override // androidx.fragment.app.FragmentActivity, com.shizhuang.duapp.common.ui.BaseActivity
    public void onResume() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 68987, new Class[0], Void.TYPE).isSupported) {
            _boostWeave.ActivityMethodWeaver_onResume(this);
        }
    }

    @Override // androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, com.shizhuang.duapp.common.ui.BaseActivity
    public void onStart() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 68996, new Class[0], Void.TYPE).isSupported) {
            _boostWeave.ActivityMethodWeaver_onStart(this);
        }
    }

    @Override // com.shizhuang.duapp.modules.blindbox.widget.button.BlindBoxOpenListener
    public void openBoxClick(int i3) {
        if (!PatchProxy.proxy(new Object[]{new Integer(i3)}, this, changeQuickRedirect, false, 68983, new Class[]{Integer.TYPE}, Void.TYPE).isSupported) {
            EventBus.b().f(new vw.b(i3, this.f11149h));
            finish();
        }
    }

    @Override // com.shizhuang.duapp.modules.blindbox.widget.button.BlindBoxOpenListener
    public void openCallBack(boolean z) {
        if (!PatchProxy.proxy(new Object[]{new Byte(z ? (byte) 1 : 0)}, this, changeQuickRedirect, false, 68973, new Class[]{Boolean.TYPE}, Void.TYPE).isSupported) {
            j();
            if (z) {
                i60.b bVar = i60.b.f33293a;
                ArrayMap arrayMap = new ArrayMap(8);
                Pair[] pairArr = new Pair[3];
                BlindBoxSkuModel blindBoxSkuModel = this.k;
                pairArr[0] = TuplesKt.to("sku_id", Long.valueOf(blindBoxSkuModel != null ? blindBoxSkuModel.getSkuId() : 0));
                pairArr[1] = TuplesKt.to("activity_id", Long.valueOf(this.d));
                String str = this.e;
                if (str == null) {
                    str = "";
                }
                pairArr[2] = TuplesKt.to("activityTitle", str);
                e.a(arrayMap, pairArr);
                bVar.b("trade_box_block_click", "454", "678", arrayMap);
            }
            ((DuImageLoaderView) _$_findCachedViewById(R.id.ivCollection)).setVisibility(8);
            BlindBoxOpenBoxButton blindBoxOpenBoxButton = (BlindBoxOpenBoxButton) _$_findCachedViewById(R.id.openButton);
            String str2 = null;
            if (!PatchProxy.proxy(new Object[0], blindBoxOpenBoxButton, BlindBoxOpenBoxButton.changeQuickRedirect, false, 71285, new Class[0], Void.TYPE).isSupported) {
                View view = blindBoxOpenBoxButton.d;
                if (view != null) {
                    ViewKt.setVisible(view, false);
                }
                CountDownTimer countDownTimer = blindBoxOpenBoxButton.b;
                if (countDownTimer != null) {
                    countDownTimer.cancel();
                }
                blindBoxOpenBoxButton.b((AppCompatTextView) blindBoxOpenBoxButton.a(R.id.blindBoxOpen), null);
            }
            PatchProxyResult proxy = PatchProxy.proxy(new Object[0], ex.c.f32062a, ex.c.changeQuickRedirect, false, 71180, new Class[0], String.class);
            if (proxy.isSupported) {
                str2 = (String) proxy.result;
            } else {
                String str3 = (String) b0.f("box_open_file", "");
                if (i.t(str3)) {
                    str2 = str3;
                }
            }
            if (str2 != null) {
                APNGDrawable a5 = APNGDrawable.a(str2);
                ((AppCompatImageView) _$_findCachedViewById(R.id.boxAnimationView)).setImageDrawable(a5);
                a5.f.add(new BlindBoxOpenActivity$openCallBack$$inlined$let$lambda$1(this));
                return;
            }
            l();
        }
    }

    @Override // com.shizhuang.duapp.modules.blindbox.widget.button.BlindBoxOpenListener
    public void reOpenCallBack(int i3) {
        if (!PatchProxy.proxy(new Object[]{new Integer(i3)}, this, changeQuickRedirect, false, 68980, new Class[]{Integer.TYPE}, Void.TYPE).isSupported) {
            EventBus.b().f(new vw.b(i3, this.f11149h));
            finish();
        }
    }

    @Override // com.shizhuang.duapp.modules.blindbox.widget.button.BlindBoxOpenListener
    public void recycleCallBack() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 68982, new Class[0], Void.TYPE).isSupported) {
            i60.b bVar = i60.b.f33293a;
            ArrayMap arrayMap = new ArrayMap(8);
            Pair[] pairArr = new Pair[3];
            BlindBoxSkuModel blindBoxSkuModel = this.k;
            pairArr[0] = TuplesKt.to("sku_id", Long.valueOf(blindBoxSkuModel != null ? blindBoxSkuModel.getSkuId() : 0));
            pairArr[1] = TuplesKt.to("activity_id", Long.valueOf(this.d));
            pairArr[2] = TuplesKt.to("prior_page_url", d.f32063a.a());
            e.a(arrayMap, pairArr);
            bVar.b("trade_box_block_click", "452", "673", arrayMap);
            CommonDialogUtil.j(this, null, "确定回收商品?", "确定", new a(this), "取消", b.f11153a, false);
        }
    }

    @Override // com.shizhuang.duapp.modules.blindbox.widget.button.BlindBoxOpenListener
    public void showOpenBtnCallBack() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 68984, new Class[0], Void.TYPE).isSupported) {
            j();
        }
    }
}