package com.ss.android.ugc.aweme.donation.detail;

import android.content.Intent;
import com.bytedance.covode.number.Covode;
import com.bytedance.router.interceptor.IInterceptor;

public final class DonationInterceptor implements IInterceptor {
    static {
        Covode.recordClassIndex(66356);
    }

    /* JADX WARNING: Code restructure failed: missing block: B:11:0x0024, code lost:
        if (r4 != null) goto L_0x000d;
     */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public final boolean matchInterceptRules(com.bytedance.router.RouteIntent r4) {
        /*
            r3 = this;
            r2 = 0
            if (r4 == 0) goto L_0x0023
            android.net.Uri r0 = r4.getUri()
            if (r0 == 0) goto L_0x0023
            java.lang.String r1 = r0.getHost()
        L_0x000d:
            android.net.Uri r0 = r4.getUri()
            if (r0 == 0) goto L_0x0017
            java.lang.String r2 = r0.getPath()
        L_0x0017:
            java.lang.String r2 = kotlin.h.b.n.LIZ(r1, r2)
            java.lang.String r1 = "donation/pannel"
            r0 = 0
            boolean r0 = kotlin.o.z.LIZ(r2, r1, r0)
            return r0
        L_0x0023:
            r1 = r2
            if (r4 == 0) goto L_0x0017
            goto L_0x000d
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.donation.detail.DonationInterceptor.matchInterceptRules(com.bytedance.router.RouteIntent):boolean");
    }

    public static String LIZ(Intent intent, String str) {
        try {
            return intent.getStringExtra(str);
        } catch (Exception unused) {
            return null;
        }
    }

    /* JADX WARNING: Code restructure failed: missing block: B:75:0x0124, code lost:
        if (r18 != null) goto L_0x000f;
     */
    /* JADX WARNING: Removed duplicated region for block: B:12:0x002a  */
    /* JADX WARNING: Removed duplicated region for block: B:77:0x012b A[RETURN] */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public final boolean onInterceptRoute(android.content.Context r17, com.bytedance.router.RouteIntent r18) {
        /*
            r16 = this;
            r11 = r17
            r14 = 0
            if (r18 == 0) goto L_0x0123
            android.net.Uri r0 = r18.getUri()
            if (r0 == 0) goto L_0x0123
            java.lang.String r1 = r0.getHost()
        L_0x000f:
            android.net.Uri r0 = r18.getUri()
            if (r0 == 0) goto L_0x0128
            java.lang.String r0 = r0.getPath()
        L_0x0019:
            java.lang.String r1 = kotlin.h.b.n.LIZ(r1, r0)
            java.lang.String r0 = "donation/pannel"
            r7 = 0
            boolean r0 = kotlin.o.z.LIZ(r1, r0, r7)
            if (r0 == 0) goto L_0x012b
            boolean r0 = r11 instanceof X.1hK
            if (r0 == 0) goto L_0x012b
            android.os.Bundle r13 = new android.os.Bundle
            r13.<init>()
            java.lang.String r1 = "sticker_id"
            java.lang.String r2 = ""
            if (r18 == 0) goto L_0x0041
            android.content.Intent r0 = r18.getExtra()
            if (r0 == 0) goto L_0x0041
            java.lang.String r0 = LIZ(r0, r1)
            if (r0 != 0) goto L_0x0042
        L_0x0041:
            r0 = r2
        L_0x0042:
            r13.putString(r1, r0)
            java.lang.String r1 = "ngo_id"
            if (r18 == 0) goto L_0x0120
            android.content.Intent r0 = r18.getExtra()
            if (r0 == 0) goto L_0x0120
            int r0 = r0.getIntExtra(r1, r7)
        L_0x0053:
            r13.putInt(r1, r0)
            java.lang.String r1 = "ngo_name"
            if (r18 == 0) goto L_0x0066
            android.content.Intent r0 = r18.getExtra()
            if (r0 == 0) goto L_0x0066
            java.lang.String r0 = LIZ(r0, r1)
            if (r0 != 0) goto L_0x0067
        L_0x0066:
            r0 = r2
        L_0x0067:
            r13.putString(r1, r0)
            if (r18 == 0) goto L_0x007a
            android.content.Intent r1 = r18.getExtra()
            if (r1 == 0) goto L_0x007a
            java.lang.String r0 = "aweme_id"
            java.lang.String r12 = LIZ(r1, r0)
            if (r12 != 0) goto L_0x007b
        L_0x007a:
            r12 = r2
        L_0x007b:
            kotlin.h.b.n.LIZIZ(r12, r2)
            java.lang.String r10 = "enter_from"
            if (r18 == 0) goto L_0x008e
            android.content.Intent r0 = r18.getExtra()
            if (r0 == 0) goto L_0x008e
            java.lang.String r9 = LIZ(r0, r10)
            if (r9 != 0) goto L_0x008f
        L_0x008e:
            r9 = r2
        L_0x008f:
            kotlin.h.b.n.LIZIZ(r9, r2)
            java.lang.String r8 = "enter_method"
            if (r18 == 0) goto L_0x00a2
            android.content.Intent r0 = r18.getExtra()
            if (r0 == 0) goto L_0x00a2
            java.lang.String r6 = LIZ(r0, r8)
            if (r6 != 0) goto L_0x00a3
        L_0x00a2:
            r6 = r2
        L_0x00a3:
            kotlin.h.b.n.LIZIZ(r6, r2)
            java.lang.String r5 = "height"
            r4 = -1
            if (r18 == 0) goto L_0x011e
            android.content.Intent r0 = r18.getExtra()
            if (r0 == 0) goto L_0x011e
            int r3 = r0.getIntExtra(r5, r4)
        L_0x00b5:
            java.lang.String r2 = "log_pb"
            if (r18 == 0) goto L_0x00c3
            android.content.Intent r0 = r18.getExtra()
            if (r0 == 0) goto L_0x00c3
            java.lang.String r14 = LIZ(r0, r2)
        L_0x00c3:
            java.lang.String r1 = "page_type"
            if (r18 == 0) goto L_0x00d1
            android.content.Intent r0 = r18.getExtra()
            if (r0 == 0) goto L_0x00d1
            int r4 = r0.getIntExtra(r1, r4)
        L_0x00d1:
            X.M12.LIZ(r12, r9, r6, r13)
            com.ss.android.ugc.aweme.donation.detail.DonationFragment r0 = new com.ss.android.ugc.aweme.donation.detail.DonationFragment
            r0.<init>()
            java.lang.String r15 = "aid"
            r13.putString(r15, r12)
            r13.putString(r8, r6)
            r13.putString(r10, r9)
            r13.putInt(r5, r3)
            r13.putString(r2, r14)
            r13.putInt(r1, r4)
            r0.setArguments(r13)
            if (r3 <= 0) goto L_0x00f4
            com.ss.android.ugc.aweme.donation.detail.DonationFragment.LJI = r3
        L_0x00f4:
            X.3YB r1 = new X.3YB
            r1.<init>()
            r1.LIZ(r0)
            r1.LIZ(r7)
            r1.LIZIZ(r7)
            X.FNv r0 = X.C6235FNv.LIZ
            r1.LIZ(r0)
            com.bytedance.tux.sheet.sheet.TuxSheet r2 = r1.LIZ
            X.1hK r11 = (X.1hK) r11
            X.0AA r1 = r11.getSupportFragmentManager()
            java.lang.String r0 = "DonationFragment"
            r2.show(r1, r0)
            X.2EV r1 = new X.2EV
            r0 = 1
            r1.<init>(r0, r7)
            X.CqM.LIZ(r1)
            return r0
        L_0x011e:
            r3 = -1
            goto L_0x00b5
        L_0x0120:
            r0 = 0
            goto L_0x0053
        L_0x0123:
            r1 = r14
            if (r18 == 0) goto L_0x0128
            goto L_0x000f
        L_0x0128:
            r0 = r14
            goto L_0x0019
        L_0x012b:
            return r7
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.donation.detail.DonationInterceptor.onInterceptRoute(android.content.Context, com.bytedance.router.RouteIntent):boolean");
    }
}
