导航菜单

页面标题

页面副标题

Baubap v3.9.7 - Braze.java 源代码

正在查看: Baubap v3.9.7 应用的 Braze.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.braze;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import bo.app.b4;
import bo.app.e7;
import bo.app.f7;
import bo.app.i;
import bo.app.i7;
import bo.app.l5;
import bo.app.m6;
import bo.app.o4;
import bo.app.o5;
import bo.app.u4;
import com.braze.configuration.BrazeConfig;
import com.braze.configuration.BrazeConfigurationProvider;
import com.braze.configuration.RuntimeAppConfigurationProvider;
import com.braze.coroutine.BrazeCoroutineScope;
import com.braze.enums.BrazePushEventType;
import com.braze.enums.BrazeSdkMetadata;
import com.braze.enums.GeofenceTransitionType;
import com.braze.events.BrazeNetworkFailureEvent;
import com.braze.events.BrazePushEvent;
import com.braze.events.BrazeSdkAuthenticationErrorEvent;
import com.braze.events.ContentCardsUpdatedEvent;
import com.braze.events.FeatureFlagsUpdatedEvent;
import com.braze.events.FeedUpdatedEvent;
import com.braze.events.IEventSubscriber;
import com.braze.events.IValueCallback;
import com.braze.events.InAppMessageEvent;
import com.braze.events.NoMatchingTriggerEvent;
import com.braze.events.SdkDataWipeEvent;
import com.braze.events.SessionStateChangedEvent;
import com.braze.images.DefaultBrazeImageLoader;
import com.braze.images.IBrazeImageLoader;
import com.braze.models.FeatureFlag;
import com.braze.models.IBrazeLocation;
import com.braze.models.cards.Card;
import com.braze.models.inappmessage.IInAppMessage;
import com.braze.models.outgoing.BrazeLocation;
import com.braze.models.outgoing.BrazeProperties;
import com.braze.models.push.BrazeNotificationPayload;
import com.braze.support.BrazeFileUtils;
import com.braze.support.BrazeLogger;
import com.braze.support.DateTimeUtils;
import com.braze.support.PermissionUtils;
import com.braze.support.StringUtils;
import com.braze.support.ValidationUtils;
import java.io.File;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.EnumSet;
import java.util.List;
import java.util.Locale;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.ReentrantLock;
import org.json.JSONObject;

public final class Braze implements IBraze {
    private static boolean areOutboundNetworkRequestsOffline;
    private static IBrazeNotificationFactory customBrazeNotificationFactory;
    private static bo.app.g2 deviceDataProvider;
    private static IBrazeEndpointProvider endpointProvider;
    private static volatile Braze instance;
    private static l5 sdkEnablementProvider;
    private static boolean shouldMockNetworkRequestsAndDropEvents;
    private Context applicationContext;
    private BrazeUser brazeUser;
    public BrazeConfigurationProvider configurationProvider;
    public bo.app.h2 deviceIdProvider;
    private bo.app.k2 externalIEventMessenger;
    public IBrazeImageLoader imageLoader;
    private Boolean isApiKeyPresent;
    private boolean isInstanceStopped;
    private bo.app.w3 offlineUserStorageProvider;
    public o4 pushDeliveryManager;
    private bo.app.n2 registrationDataProvider;
    public bo.app.d3 udm;
    public static final Companion Companion = new Companion(null);
    private static final ReentrantLock brazeClassLock = new ReentrantLock();
    private static final Set<String> KNOWN_APP_CRAWLER_DEVICE_MODELS = ea.f.E0("calypso appcrawler");
    private static final Set<String> NECESSARY_BRAZE_SDK_PERMISSIONS = ea.f.F0(new String[]{"android.permission.ACCESS_NETWORK_STATE", "android.permission.INTERNET"});
    private static final ReentrantLock endpointProviderLock = new ReentrantLock();
    private static boolean shouldRequestFrameworkListenToNetworkUpdates = true;
    private static final List<BrazeConfig> pendingConfigurations = new ArrayList();
    private static final BrazeConfig clearConfigSentinel = new BrazeConfig.Builder().build();

    public static final class Companion {

        public static final class a extends kotlin.jvm.internal.l implements y30.a {
            final EnumSet b;

            public a(EnumSet enumSet) {
                super(0);
                this.b = enumSet;
            }

            public final String invoke() {
                return "Failed to add SDK Metadata of: " + this.b;
            }
        }

        public static final class a0 extends kotlin.jvm.internal.l implements y30.a {
            public static final a0 b = new a0();

            public a0() {
                super(0);
            }

            public final String invoke() {
                return "Failed to delete data from the internal storage cache.";
            }
        }

        public static final class b extends kotlin.jvm.internal.l implements y30.a {
            public static final b b = new b();

            public b() {
                super(0);
            }

            public final String invoke() {
                return "Clearing Braze instance";
            }
        }

        public static final class b0 extends kotlin.jvm.internal.l implements y30.a {
            final File b;

            public b0(File file) {
                super(0);
                this.b = file;
            }

            public final String invoke() {
                return "Deleting shared prefs file at: " + this.b.getAbsolutePath();
            }
        }

        public static final class c extends kotlin.jvm.internal.l implements y30.a {
            final BrazeConfig b;

            public c(BrazeConfig brazeConfig) {
                super(0);
                this.b = brazeConfig;
            }

            public final String invoke() {
                return "Braze.configure() called with configuration: " + this.b;
            }
        }

        public static final class c0 extends kotlin.jvm.internal.l implements y30.a {
            public static final c0 b = new c0();

            public c0() {
                super(0);
            }

            public final String invoke() {
                return "Failed to delete shared preference data for the Braze SDK.";
            }
        }

        public static final class d extends kotlin.jvm.internal.l implements y30.a {
            public static final d b = new d();

            public d() {
                super(0);
            }

            public final String invoke() {
                return "Braze.configure() cannot be called while the singleton is still live.";
            }
        }

        public static final class e extends kotlin.jvm.internal.l implements y30.a {
            public static final e b = new e();

            public e() {
                super(0);
            }

            public final String invoke() {
                return "Braze.configure() called with a null config; Clearing all configuration values.";
            }
        }

        public static final class f extends kotlin.jvm.internal.l implements y30.a {
            public static final f b = new f();

            public f() {
                super(0);
            }

            public final String invoke() {
                return "Stopping the SDK instance.";
            }
        }

        public static final class g extends kotlin.jvm.internal.l implements y30.a {
            public static final g b = new g();

            public g() {
                super(0);
            }

            public final String invoke() {
                return "Disabling all network requests";
            }
        }

        public static final class h extends kotlin.jvm.internal.l implements y30.a {
            public static final h b = new h();

            public h() {
                super(0);
            }

            public final String invoke() {
                return "Braze network requests already being mocked. Note that events dispatched in this mode are dropped.";
            }
        }

        public static final class i extends kotlin.jvm.internal.l implements y30.a {
            public static final i b = new i();

            public i() {
                super(0);
            }

            public final String invoke() {
                return "Braze network requests will be mocked. Events dispatchedin this mode will be dropped.";
            }
        }

        public static final class j extends kotlin.jvm.internal.l implements y30.a {
            public static final j b = new j();

            public j() {
                super(0);
            }

            public final String invoke() {
                return "Attempt to enable mocking Braze network requests had no effect since getInstance() has already been called.";
            }
        }

        public static final class k extends kotlin.jvm.internal.l implements y30.a {
            public static final k b = new k();

            public k() {
                super(0);
            }

            public final String invoke() {
                return "Setting SDK to enabled.";
            }
        }

        public static final class l extends kotlin.jvm.internal.l implements y30.a {
            public static final l b = new l();

            public l() {
                super(0);
            }

            public final String invoke() {
                return "Enabling all network requests";
            }
        }

        public static final class m extends kotlin.jvm.internal.l implements y30.a {
            public static final m b = new m();

            public m() {
                super(0);
            }

            public final String invoke() {
                return "Caught exception trying to get a Braze API endpoint from the BrazeEndpointProvider. Using the original URI";
            }
        }

        public static final class n extends kotlin.jvm.internal.l implements y30.a {
            public static final n b = new n();

            public n() {
                super(0);
            }

            public final String invoke() {
                return "Caught exception while retrieving API key.";
            }
        }

        public static final class o extends kotlin.jvm.internal.l implements y30.a {
            public static final o b = new o();

            public o() {
                super(0);
            }

            public final String invoke() {
                return "SDK enablement provider was null. Returning SDK as enabled.";
            }
        }

        public static final class p extends kotlin.jvm.internal.l implements y30.a {
            public static final p b = new p();

            public p() {
                super(0);
            }

            public final String invoke() {
                return "API key not present. Actions will not be performed on the SDK.";
            }
        }

        public static final class q extends kotlin.jvm.internal.l implements y30.a {
            public static final q b = new q();

            public q() {
                super(0);
            }

            public final String invoke() {
                return "SDK is disabled. Actions will not be performed on the SDK.";
            }
        }

        public static final class r extends kotlin.jvm.internal.l implements y30.a {
            final boolean b;

            public r(boolean z) {
                super(0);
                this.b = z;
            }

            public final String invoke() {
                return "Braze SDK outbound network requests are now ".concat(this.b ? "disabled" : FeatureFlag.ENABLED);
            }
        }

        public static final class s extends kotlin.jvm.internal.l implements y30.a {
            public static final s b = new s();

            public s() {
                super(0);
            }

            public final String invoke() {
                return "Push contained key for fetching test triggers, fetching triggers.";
            }
        }

        public static final class t extends kotlin.jvm.internal.l implements y30.a {
            public static final t b = new t();

            public t() {
                super(0);
            }

            public final String invoke() {
                return "The instance is null. Allowing instance initialization";
            }
        }

        public static final class u extends kotlin.jvm.internal.l implements y30.a {
            public static final u b = new u();

            public u() {
                super(0);
            }

            public final String invoke() {
                return "The instance was stopped. Allowing instance initialization";
            }
        }

        public static final class v extends kotlin.jvm.internal.l implements y30.a {
            public static final v b = new v();

            public v() {
                super(0);
            }

            public final String invoke() {
                return "No API key was found previously. Allowing instance initialization";
            }
        }

        public static final class w extends kotlin.jvm.internal.l implements y30.a {
            public static final w b = new w();

            public w() {
                super(0);
            }

            public final String invoke() {
                return "Shutting down all queued work on the Braze SDK";
            }
        }

        public static final class x extends kotlin.jvm.internal.l implements y30.a {
            public static final x b = new x();

            public x() {
                super(0);
            }

            public final String invoke() {
                return "Sending sdk data wipe event to external subscribers";
            }
        }

        public static final class y extends kotlin.jvm.internal.l implements y30.a {
            public static final y b = new y();

            public y() {
                super(0);
            }

            public final String invoke() {
                return "Shutting down the singleton work queue";
            }
        }

        public static final class z extends kotlin.jvm.internal.l implements y30.a {
            public static final z b = new z();

            public z() {
                super(0);
            }

            public final String invoke() {
                return "Failed to shutdown queued work on the Braze SDK.";
            }
        }

        public Companion(kotlin.jvm.internal.f fVar) {
            this();
        }

        public static void getCustomBrazeNotificationFactory$annotations() {
        }

        public static void getDeviceDataProvider$android_sdk_base_release$annotations() {
        }

        public static void getOutboundNetworkRequestsOffline$annotations() {
        }

        public final l5 getSdkEnablementProvider(Context context) {
            l5 sdkEnablementProvider$android_sdk_base_release = getSdkEnablementProvider$android_sdk_base_release();
            if (sdkEnablementProvider$android_sdk_base_release != null) {
                return sdkEnablementProvider$android_sdk_base_release;
            }
            l5 l5Var = new l5(context);
            setSdkEnablementProvider$android_sdk_base_release(l5Var);
            return l5Var;
        }

        public static void getSdkEnablementProvider$android_sdk_base_release$annotations() {
        }

        public static void getShouldRequestFrameworkListenToNetworkUpdates$android_sdk_base_release$annotations() {
        }

        public static void isDisabled$annotations() {
        }

        public static final Uri setConfiguredCustomEndpoint$lambda$12$lambda$11(String str, Uri uri) {
            xu.b.y(uri, "brazeEndpoint");
            Uri parse = Uri.parse(str);
            String scheme = parse.getScheme();
            String encodedAuthority = parse.getEncodedAuthority();
            Uri.Builder buildUpon = uri.buildUpon();
            if (scheme == null || h40.q.R(scheme) || encodedAuthority == null || h40.q.R(encodedAuthority)) {
                return buildUpon.encodedAuthority(str).build();
            }
            buildUpon.encodedAuthority(encodedAuthority);
            buildUpon.scheme(scheme);
            return buildUpon.build();
        }

        private final boolean shouldAllowSingletonInitialization() {
            Braze braze = Braze.instance;
            if (braze == null) {
                BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, BrazeLogger.Priority.V, (Throwable) null, t.b, 2, (Object) null);
                return true;
            }
            if (braze.isInstanceStopped) {
                BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, (BrazeLogger.Priority) null, (Throwable) null, u.b, 3, (Object) null);
                return true;
            }
            if (!xu.b.n(Boolean.FALSE, braze.isApiKeyPresent$android_sdk_base_release())) {
                return false;
            }
            BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, (BrazeLogger.Priority) null, (Throwable) null, v.b, 3, (Object) null);
            return true;
        }

        public static final boolean wipeData$lambda$9(File file, String str) {
            xu.b.y(str, "name");
            return (h40.q.l0(str, "com.appboy", false) && !xu.b.n(str, "com.appboy.override.configuration.cache")) || (h40.q.l0(str, "com.braze", false) && !xu.b.n(str, "com.braze.override.configuration.cache"));
        }

        public final void addSdkMetadata(Context context, EnumSet<BrazeSdkMetadata> enumSet) {
            xu.b.y(context, "context");
            xu.b.y(enumSet, "sdkMetadata");
            ReentrantLock reentrantLock = Braze.brazeClassLock;
            reentrantLock.lock();
            try {
                try {
                    Braze.pendingConfigurations.add(new BrazeConfig.Builder().setSdkMetadata(enumSet).build());
                    Braze braze = Braze.instance;
                    if (braze != null) {
                        braze.applyPendingRuntimeConfiguration$android_sdk_base_release();
                    }
                } catch (Exception e2) {
                    BrazeLogger.INSTANCE.brazelog(Braze.Companion, BrazeLogger.Priority.E, e2, new a(enumSet));
                }
            } finally {
                reentrantLock.unlock();
            }
        }

        public final void clearEndpointProvider() {
            ReentrantLock reentrantLock = Braze.endpointProviderLock;
            reentrantLock.lock();
            try {
                Braze.endpointProvider = null;
            } finally {
                reentrantLock.unlock();
            }
        }

        public final void clearInstance$android_sdk_base_release() {
            ReentrantLock reentrantLock = Braze.brazeClassLock;
            reentrantLock.lock();
            try {
                Braze braze = Braze.instance;
                BrazeLogger brazeLogger = BrazeLogger.INSTANCE;
                Companion companion = Braze.Companion;
                BrazeLogger.brazelog$default(brazeLogger, companion, BrazeLogger.Priority.W, (Throwable) null, b.b, 2, (Object) null);
                BrazeCoroutineScope.cancelChildren();
                if (braze != null && braze.udm != null) {
                    braze.getUdm$android_sdk_base_release().m().g();
                }
                Braze.instance = null;
                Braze.shouldMockNetworkRequestsAndDropEvents = false;
                Braze.areOutboundNetworkRequestsOffline = false;
                companion.setSdkEnablementProvider$android_sdk_base_release(null);
                Braze.endpointProvider = null;
                companion.setShouldRequestFrameworkListenToNetworkUpdates$android_sdk_base_release(true);
                reentrantLock.unlock();
            } catch (Throwable th) {
                reentrantLock.unlock();
                throw th;
            }
        }

        public final boolean configure(Context context, BrazeConfig brazeConfig) {
            xu.b.y(context, "context");
            BrazeLogger brazeLogger = BrazeLogger.INSTANCE;
            BrazeLogger.Priority priority = BrazeLogger.Priority.I;
            BrazeLogger.brazelog$default(brazeLogger, this, priority, (Throwable) null, new c(brazeConfig), 2, (Object) null);
            ReentrantLock reentrantLock = Braze.brazeClassLock;
            reentrantLock.lock();
            try {
                Braze braze = Braze.instance;
                if (braze != null && !braze.isInstanceStopped && xu.b.n(Boolean.TRUE, braze.isApiKeyPresent$android_sdk_base_release())) {
                    BrazeLogger.brazelog$default(brazeLogger, Braze.Companion, priority, (Throwable) null, d.b, 2, (Object) null);
                    reentrantLock.unlock();
                    return false;
                }
                if (brazeConfig != null) {
                    Braze.pendingConfigurations.add(brazeConfig);
                } else {
                    BrazeLogger.brazelog$default(brazeLogger, Braze.Companion, priority, (Throwable) null, e.b, 2, (Object) null);
                    Braze.pendingConfigurations.add(Braze.clearConfigSentinel);
                }
                reentrantLock.unlock();
                return true;
            } catch (Throwable th) {
                reentrantLock.unlock();
                throw th;
            }
        }

        public final void disableSdk(Context context) {
            xu.b.y(context, "context");
            getSdkEnablementProvider(context).a(true);
            BrazeLogger brazeLogger = BrazeLogger.INSTANCE;
            BrazeLogger.Priority priority = BrazeLogger.Priority.W;
            BrazeLogger.brazelog$default(brazeLogger, this, priority, (Throwable) null, f.b, 2, (Object) null);
            stopInstance$android_sdk_base_release();
            BrazeLogger.brazelog$default(brazeLogger, this, priority, (Throwable) null, g.b, 2, (Object) null);
            setOutboundNetworkRequestsOffline(true);
        }

        public final boolean enableMockNetworkRequestsAndDropEventsMode() {
            if (Braze.instance == null) {
                ReentrantLock reentrantLock = Braze.brazeClassLock;
                reentrantLock.lock();
                try {
                    if (Braze.instance == null) {
                        if (Braze.shouldMockNetworkRequestsAndDropEvents) {
                            BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, Braze.Companion, BrazeLogger.Priority.I, (Throwable) null, h.b, 2, (Object) null);
                        } else {
                            BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, Braze.Companion, BrazeLogger.Priority.I, (Throwable) null, i.b, 2, (Object) null);
                            Braze.shouldMockNetworkRequestsAndDropEvents = true;
                        }
                        reentrantLock.unlock();
                        return true;
                    }
                    reentrantLock.unlock();
                } catch (Throwable th) {
                    reentrantLock.unlock();
                    throw th;
                }
            }
            BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, BrazeLogger.Priority.W, (Throwable) null, j.b, 2, (Object) null);
            return false;
        }

        public final void enableSdk(Context context) {
            xu.b.y(context, "context");
            BrazeLogger brazeLogger = BrazeLogger.INSTANCE;
            BrazeLogger.Priority priority = BrazeLogger.Priority.W;
            BrazeLogger.brazelog$default(brazeLogger, this, priority, (Throwable) null, k.b, 2, (Object) null);
            getSdkEnablementProvider(context).a(false);
            BrazeLogger.brazelog$default(brazeLogger, this, priority, (Throwable) null, l.b, 2, (Object) null);
            setOutboundNetworkRequestsOffline(false);
        }

        public final Uri getApiEndpoint(Uri uri) {
            xu.b.y(uri, "brazeEndpoint");
            ReentrantLock reentrantLock = Braze.endpointProviderLock;
            reentrantLock.lock();
            try {
                IBrazeEndpointProvider iBrazeEndpointProvider = Braze.endpointProvider;
                if (iBrazeEndpointProvider != null) {
                    try {
                        Uri apiEndpoint = iBrazeEndpointProvider.getApiEndpoint(uri);
                        if (apiEndpoint != null) {
                            return apiEndpoint;
                        }
                    } catch (Exception e2) {
                        BrazeLogger.INSTANCE.brazelog(Braze.Companion, BrazeLogger.Priority.W, e2, m.b);
                    }
                }
                return uri;
            } finally {
                reentrantLock.unlock();
            }
        }

        public final String getConfiguredApiKey(BrazeConfigurationProvider brazeConfigurationProvider) {
            xu.b.y(brazeConfigurationProvider, "configurationProvider");
            try {
                return brazeConfigurationProvider.getBrazeApiKey().toString();
            } catch (Exception e2) {
                BrazeLogger.INSTANCE.brazelog(this, BrazeLogger.Priority.E, e2, n.b);
                return null;
            }
        }

        public final IBrazeNotificationFactory getCustomBrazeNotificationFactory() {
            return Braze.customBrazeNotificationFactory;
        }

        public final bo.app.g2 getDeviceDataProvider$android_sdk_base_release() {
            return Braze.deviceDataProvider;
        }

        public final Braze getInstance(Context context) {
            xu.b.y(context, "context");
            if (shouldAllowSingletonInitialization()) {
                ReentrantLock reentrantLock = Braze.brazeClassLock;
                reentrantLock.lock();
                try {
                    if (Braze.Companion.shouldAllowSingletonInitialization()) {
                        Braze braze = new Braze(context);
                        braze.isInstanceStopped = false;
                        Braze.instance = braze;
                        return braze;
                    }
                } finally {
                    reentrantLock.unlock();
                }
            }
            Braze braze2 = Braze.instance;
            xu.b.w(braze2, "null cannot be cast to non-null type com.braze.Braze");
            return braze2;
        }

        public final boolean getOutboundNetworkRequestsOffline() {
            return Braze.areOutboundNetworkRequestsOffline;
        }

        public final l5 getSdkEnablementProvider$android_sdk_base_release() {
            return Braze.sdkEnablementProvider;
        }

        public final boolean getShouldRequestFrameworkListenToNetworkUpdates$android_sdk_base_release() {
            return Braze.shouldRequestFrameworkListenToNetworkUpdates;
        }

        public final boolean isDisabled() {
            l5 sdkEnablementProvider$android_sdk_base_release = getSdkEnablementProvider$android_sdk_base_release();
            if (sdkEnablementProvider$android_sdk_base_release == null) {
                BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, (BrazeLogger.Priority) null, (Throwable) null, o.b, 3, (Object) null);
                return false;
            }
            Braze braze = Braze.instance;
            if (braze != null && xu.b.n(Boolean.FALSE, braze.isApiKeyPresent$android_sdk_base_release())) {
                BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, BrazeLogger.Priority.W, (Throwable) null, p.b, 2, (Object) null);
                return true;
            }
            boolean a2 = sdkEnablementProvider$android_sdk_base_release.a();
            if (a2) {
                BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, BrazeLogger.Priority.W, (Throwable) null, q.b, 2, (Object) null);
            }
            return a2;
        }

        public final void requestTriggersIfInAppMessageTestPush$android_sdk_base_release(Intent intent, bo.app.c2 c2Var) {
            xu.b.y(intent, "intent");
            xu.b.y(c2Var, "brazeManager");
            String stringExtra = intent.getStringExtra(Constants.BRAZE_PUSH_FETCH_TEST_TRIGGERS_KEY);
            if (stringExtra == null || !xu.b.n(stringExtra, "true")) {
                return;
            }
            BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, BrazeLogger.Priority.I, (Throwable) null, s.b, 2, (Object) null);
            c2Var.a(new b4.a((String) null, (Boolean) null, (Boolean) null, (bo.app.a4) null, 15, (kotlin.jvm.internal.f) null).e());
        }

        public final void setConfiguredCustomEndpoint$android_sdk_base_release(String str) {
            ReentrantLock reentrantLock = Braze.endpointProviderLock;
            reentrantLock.lock();
            try {
                Braze.Companion.setEndpointProvider(new com.braze.b(str, 0));
            } finally {
                reentrantLock.unlock();
            }
        }

        public final void setCustomBrazeNotificationFactory(IBrazeNotificationFactory iBrazeNotificationFactory) {
            Braze.customBrazeNotificationFactory = iBrazeNotificationFactory;
        }

        public final void setDeviceDataProvider$android_sdk_base_release(bo.app.g2 g2Var) {
            Braze.deviceDataProvider = g2Var;
        }

        public final void setEndpointProvider(IBrazeEndpointProvider iBrazeEndpointProvider) {
            ReentrantLock reentrantLock = Braze.endpointProviderLock;
            reentrantLock.lock();
            try {
                Braze.endpointProvider = iBrazeEndpointProvider;
            } finally {
                reentrantLock.unlock();
            }
        }

        public final void setOutboundNetworkRequestsOffline(boolean z2) {
            BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, BrazeLogger.Priority.I, (Throwable) null, new r(z2), 2, (Object) null);
            ReentrantLock reentrantLock = Braze.brazeClassLock;
            reentrantLock.lock();
            try {
                Braze.areOutboundNetworkRequestsOffline = z2;
                Braze braze = Braze.instance;
                if (braze != null) {
                    braze.setSyncPolicyOfflineStatus(z2);
                }
            } finally {
                reentrantLock.unlock();
            }
        }

        public final void setSdkEnablementProvider$android_sdk_base_release(l5 l5Var) {
            Braze.sdkEnablementProvider = l5Var;
        }

        public final void setShouldRequestFrameworkListenToNetworkUpdates$android_sdk_base_release(boolean z2) {
            Braze.shouldRequestFrameworkListenToNetworkUpdates = z2;
        }

        public final void stopInstance$android_sdk_base_release() {
            try {
                BrazeLogger brazeLogger = BrazeLogger.INSTANCE;
                BrazeLogger.brazelog$default(brazeLogger, this, BrazeLogger.Priority.I, (Throwable) null, w.b, 2, (Object) null);
                ReentrantLock reentrantLock = Braze.brazeClassLock;
                reentrantLock.lock();
                try {
                    BrazeCoroutineScope.cancelChildren();
                    Braze braze = Braze.instance;
                    if (braze != null) {
                        Companion companion = Braze.Companion;
                        BrazeLogger.brazelog$default(brazeLogger, companion, BrazeLogger.Priority.V, (Throwable) null, x.b, 2, (Object) null);
                        braze.getExternalIEventMessenger$android_sdk_base_release().a(new SdkDataWipeEvent(), SdkDataWipeEvent.class);
                        BrazeLogger.brazelog$default(brazeLogger, companion, (BrazeLogger.Priority) null, (Throwable) null, y.b, 3, (Object) null);
                        o5.a.a();
                        if (braze.udm != null) {
                            braze.getUdm$android_sdk_base_release().m().a(true);
                            braze.getUdm$android_sdk_base_release().o().a();
                            braze.getUdm$android_sdk_base_release().r().unregisterGeofences();
                        }
                        braze.isInstanceStopped = true;
                    }
                    reentrantLock.unlock();
                } catch (Throwable th) {
                    reentrantLock.unlock();
                    throw th;
                }
            } catch (Exception e2) {
                BrazeLogger.INSTANCE.brazelog(this, BrazeLogger.Priority.W, e2, z.b);
            }
        }

        public final void wipeData(Context context) {
            File[] listFiles;
            xu.b.y(context, "context");
            stopInstance$android_sdk_base_release();
            try {
                m6.e.a(context);
                DefaultBrazeImageLoader.Companion.a(context);
            } catch (Exception e2) {
                BrazeLogger.INSTANCE.brazelog(this, BrazeLogger.Priority.W, e2, a0.b);
            }
            try {
                File file = new File(context.getApplicationInfo().dataDir, "shared_prefs");
                if (file.exists() && file.isDirectory() && (listFiles = file.listFiles(new com.braze.a(0))) != null) {
                    for (File file2 : a40.a.m0(listFiles)) {
                        BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, Braze.Companion, BrazeLogger.Priority.V, (Throwable) null, new b0(file2), 2, (Object) null);
                        xu.b.x(file2, "file");
                        BrazeFileUtils.deleteSharedPreferencesFile(context, file2);
                    }
                }
            } catch (Exception e3) {
                BrazeLogger.INSTANCE.brazelog(this, BrazeLogger.Priority.W, e3, c0.b);
            }
        }

        private Companion() {
        }
    }

    public static final class a extends kotlin.jvm.internal.l implements y30.a {
        public static final a b = new a();

        public a() {
            super(0);
        }

        public final String invoke() {
            return "Braze SDK Initializing";
        }
    }

    public static final class a0 extends kotlin.jvm.internal.l implements y30.a {
        final String b;

        public a0(String str) {
            super(0);
            this.b = str;
        }

        public final String invoke() {
            return "Failed to deserialize in-app message json. Payload: " + this.b;
        }
    }

    public static final class a1 extends kotlin.jvm.internal.l implements y30.a {
        final String b;
        final Braze c;

        public static final class a extends kotlin.jvm.internal.l implements y30.a {
            public static final a b = new a();

            public a() {
                super(0);
            }

            public final String invoke() {
                return "Card ID cannot be null or blank.";
            }
        }

        public a1(String str, Braze braze) {
            super(0);
            this.b = str;
            this.c = braze;
        }

        public final void a() {
            String str = this.b;
            if (str == null || h40.q.R(str)) {
                BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.c, BrazeLogger.Priority.W, (Throwable) null, a.b, 2, (Object) null);
                return;
            }
            bo.app.a2 e = bo.app.i.h.e(this.b);
            if (e != null) {
                this.c.getUdm$android_sdk_base_release().h().a(e);
            }
        }

        public Object invoke() {
            a();
            return m30.x.a;
        }
    }

    public static final class a2 extends kotlin.jvm.internal.l implements y30.a {
        final Throwable b;

        public a2(Throwable th) {
            super(0);
            this.b = th;
        }

        public final String invoke() {
            return "Failed to log throwable: " + this.b;
        }
    }

    public static final class a3 extends kotlin.jvm.internal.l implements y30.a {
        public static final a3 b = new a3();

        public a3() {
            super(0);
        }

        public final String invoke() {
            return "Failed to request geofence refresh.";
        }
    }

    public static final class a4 extends kotlin.jvm.internal.l implements y30.a {
        public static final a4 b = new a4();

        public a4() {
            super(0);
        }

        public final String invoke() {
            return "Failed to add subscriber for network failures.";
        }
    }

    public static final class b extends kotlin.jvm.internal.l implements y30.a {
        final String b;

        public b(String str) {
            super(0);
            this.b = str;
        }

        public final String invoke() {
            return "Device build model matches a known crawler. Enabling mock network request mode. Device it: " + this.b;
        }
    }

    public static final class b0 extends s30.i implements y30.e {
        int b;
        final String c;
        final Braze d;

        public b0(String str, Braze braze, q30.e eVar) {
            super(2, eVar);
            this.c = str;
            this.d = braze;
        }

        public final Object invoke(m40.g0 g0Var, q30.e eVar) {
            return create(g0Var, eVar).invokeSuspend(m30.x.a);
        }

        public final q30.e create(Object obj, q30.e eVar) {
            return new b0(this.c, this.d, eVar);
        }

        public final Object invokeSuspend(Object obj) {
            r30.a aVar = r30.a.b;
            if (this.b != 0) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            lu.n.f0(obj);
            String str = this.c;
            if (str == null) {
                return null;
            }
            return com.braze.support.h.a(str, this.d.getUdm$android_sdk_base_release().h());
        }
    }

    public static final class b1 extends kotlin.jvm.internal.l implements y30.a {
        final String b;

        public b1(String str) {
            super(0);
            this.b = str;
        }

        public final String invoke() {
            return "Failed to log feed card impression. Card id: " + this.b;
        }
    }

    public static final class b2 extends kotlin.jvm.internal.l implements y30.a {
        public static final b2 b = new b2();

        public b2() {
            super(0);
        }

        public final String invoke() {
            return "Failed to post geofence report.";
        }
    }

    public static final class b3 extends kotlin.jvm.internal.l implements y30.a {
        final double b;
        final double c;
        final Braze d;

        public static final class a extends kotlin.jvm.internal.l implements y30.a {
            final double b;
            final double c;

            public a(double d, double d2) {
                super(0);
                this.b = d;
                this.c = d2;
            }

            public final String invoke() {
                return "Location provided is invalid. Not requesting refresh of Braze Geofences. Provided latitude - longitude: " + this.b + " - " + this.c;
            }
        }

        public static final class b extends kotlin.jvm.internal.l implements y30.a {
            final double b;
            final double c;

            public b(double d, double d2) {
                super(0);
                this.b = d;
                this.c = d2;
            }

            public final String invoke() {
                return "Manually requesting Geofence refresh of with provided latitude - longitude: " + this.b + " - " + this.c;
            }
        }

        public b3(double d, double d2, Braze braze) {
            super(0);
            this.b = d;
            this.c = d2;
            this.d = braze;
        }

        public final void a() {
            if (!ValidationUtils.isValidLocation(this.b, this.c)) {
                BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.d, BrazeLogger.Priority.W, (Throwable) null, new a(this.b, this.c), 2, (Object) null);
            } else {
                BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.d, BrazeLogger.Priority.W, (Throwable) null, new b(this.b, this.c), 2, (Object) null);
                this.d.getUdm$android_sdk_base_release().r().requestGeofenceRefresh(new BrazeLocation(this.b, this.c, null, null, null, 28, null));
            }
        }

        public Object invoke() {
            a();
            return m30.x.a;
        }
    }

    public static final class b4 extends kotlin.jvm.internal.l implements y30.a {
        public static final b4 b = new b4();

        public b4() {
            super(0);
        }

        public final String invoke() {
            return "Failed to add subscriber to new in-app messages.";
        }
    }

    public static final class c extends kotlin.jvm.internal.l implements y30.a {
        public c() {
            super(0);
        }

        public final String invoke() {
            return "Created external messenger " + Braze.this.getExternalIEventMessenger$android_sdk_base_release();
        }
    }

    public static final class c0 extends kotlin.jvm.internal.l implements y30.a {
        public static final c0 b = new c0();

        public c0() {
            super(0);
        }

        public final String invoke() {
            return "Failed to retrieve the device id.";
        }
    }

    public static final class c1 extends kotlin.jvm.internal.l implements y30.a {
        final String b;
        final Braze c;

        public static final class a extends kotlin.jvm.internal.l implements y30.a {
            public static final a b = new a();

            public a() {
                super(0);
            }

            public final String invoke() {
                return "Card ID cannot be null or blank.";
            }
        }

        public c1(String str, Braze braze) {
            super(0);
            this.b = str;
            this.c = braze;
        }

        public final void a() {
            String str = this.b;
            if (str == null || h40.q.R(str)) {
                BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.c, BrazeLogger.Priority.W, (Throwable) null, a.b, 2, (Object) null);
                return;
            }
            bo.app.a2 f = bo.app.i.h.f(this.b);
            if (f != null) {
                this.c.getUdm$android_sdk_base_release().h().a(f);
            }
            this.c.getUdm$android_sdk_base_release().d().markCardAsViewed(this.b);
        }

        public Object invoke() {
            a();
            return m30.x.a;
        }
    }

    public static final class c2 extends kotlin.jvm.internal.l implements y30.a {
        final String b;
        final GeofenceTransitionType c;
        final Braze d;

        public c2(String str, GeofenceTransitionType geofenceTransitionType, Braze braze) {
            super(0);
            this.b = str;
            this.c = geofenceTransitionType;
            this.d = braze;
        }

        public final void a() {
            String str = this.b;
            if (str == null || h40.q.R(str) || this.c == null) {
                return;
            }
            this.d.getUdm$android_sdk_base_release().r().postGeofenceReport(this.b, this.c);
        }

        public Object invoke() {
            a();
            return m30.x.a;
        }
    }

    public static final class c3 extends kotlin.jvm.internal.l implements y30.a {
        public static final c3 b = new c3();

        public c3() {
            super(0);
        }

        public final String invoke() {
            return "Failed to initialize geofences with the geofence manager.";
        }
    }

    public static final class c4 extends kotlin.jvm.internal.l implements y30.a {
        public static final c4 b = new c4();

        public c4() {
            super(0);
        }

        public final String invoke() {
            return "Failed to add subscriber to no matching trigger events.";
        }
    }

    public static final class d extends kotlin.jvm.internal.l implements y30.a {
        public static final d b = new d();

        public d() {
            super(0);
        }

        public final String invoke() {
            return "Failed to perform initial Braze singleton setup.";
        }
    }

    public static final class d0 extends s30.i implements y30.e {
        int b;

        public d0(q30.e eVar) {
            super(2, eVar);
        }

        public final Object invoke(m40.g0 g0Var, q30.e eVar) {
            return create(g0Var, eVar).invokeSuspend(m30.x.a);
        }

        public final q30.e create(Object obj, q30.e eVar) {
            return Braze.this.new d0(eVar);
        }

        public final Object invokeSuspend(Object obj) {
            r30.a aVar = r30.a.b;
            if (this.b != 0) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            lu.n.f0(obj);
            return Braze.this.getDeviceIdProvider$android_sdk_base_release().getDeviceId();
        }
    }

    public static final class d1 extends kotlin.jvm.internal.l implements y30.a {
        public static final d1 b = new d1();

        public d1() {
            super(0);
        }

        public final String invoke() {
            return "Failed to log that the feed was displayed.";
        }
    }

    public static final class d2 extends kotlin.jvm.internal.l implements y30.a {
        final InAppMessageEvent b;

        public d2(InAppMessageEvent inAppMessageEvent) {
            super(0);
            this.b = inAppMessageEvent;
        }

        public final String invoke() {
            return "Error reenqueueing In-App Message from event " + this.b;
        }
    }

    public static final class d3 extends kotlin.jvm.internal.l implements y30.a {
        public d3() {
            super(0);
        }

        public final void a() {
            Braze.this.getUdm$android_sdk_base_release().r().initializeGeofences();
        }

        public Object invoke() {
            a();
            return m30.x.a;
        }
    }

    public static final class d4 extends kotlin.jvm.internal.l implements y30.a {
        public static final d4 b = new d4();

        public d4() {
            super(0);
        }

        public final String invoke() {
            return "Failed to add subscriber for push notification updates.";
        }
    }

    public static final class e extends kotlin.jvm.internal.l implements y30.a {
        final Context c;

        public static final class a extends kotlin.jvm.internal.l implements y30.a {
            public static final a b = new a();

            public a() {
                super(0);
            }

            public final String invoke() {
                return "Finished UserDependencyManager creation.";
            }
        }

        public static final class b extends kotlin.jvm.internal.l implements y30.a {
            public static final b b = new b();

            public b() {
                super(0);
            }

            public final String invoke() {
                return "Failed to startup user dependency manager.";
            }
        }

        public static final class c extends kotlin.jvm.internal.l implements y30.a {
            public static final c b = new c();

            public c() {
                super(0);
            }

            public final String invoke() {
                return "Finished singleton setup.";
            }
        }

        public static final class d extends kotlin.jvm.internal.l implements y30.a {
            public static final d b = new d();

            public d() {
                super(0);
            }

            public final String invoke() {
                return "Firebase Cloud Messaging found. Setting up Firebase Cloud Messaging.";
            }
        }

        public static final class C0000e extends kotlin.jvm.internal.l implements y30.a {
            public static final C0000e b = new C0000e();

            public C0000e() {
                super(0);
            }

            public final String invoke() {
                return "Firebase Cloud Messaging requirements not met. Braze will not register for Firebase Cloud Messaging.";
            }
        }

        public static final class f extends kotlin.jvm.internal.l implements y30.a {
            public static final f b = new f();

            public f() {
                super(0);
            }

            public final String invoke() {
                return "Automatic Firebase Cloud Messaging registration not enabled in configuration. Braze will not register for Firebase Cloud Messaging.";
            }
        }

        public static final class g extends kotlin.jvm.internal.l implements y30.a {
            public static final g b = new g();

            public g() {
                super(0);
            }

            public final String invoke() {
                return "Amazon Device Messaging found. Setting up Amazon Device Messaging";
            }
        }

        public static final class h extends kotlin.jvm.internal.l implements y30.a {
            public static final h b = new h();

            public h() {
                super(0);
            }

            public final String invoke() {
                return "ADM manifest requirements not met. Braze will not register for ADM.";
            }
        }

        public static final class i extends kotlin.jvm.internal.l implements y30.a {
            public static final i b = new i();

            public i() {
                super(0);
            }

            public final String invoke() {
                return "Automatic ADM registration not enabled in configuration. Braze will not register for ADM.";
            }
        }

        public static final class j extends kotlin.jvm.internal.l implements y30.a {
            public static final j b = new j();

            public j() {
                super(0);
            }

            public final String invoke() {
                return "Failed to setup pre SDK tasks";
            }
        }

        public static final class k extends kotlin.jvm.internal.l implements y30.a {
            public static final k b = new k();

            public k() {
                super(0);
            }

            public final String invoke() {
                return "Starting up a new user dependency manager";
            }
        }

        public e(Context context) {
            super(0);
            this.c = context;
        }

        public final void a() {
            Braze braze;
            Context context;
            bo.app.w3 w3Var;
            Braze.this.applyPendingRuntimeConfiguration$android_sdk_base_release();
            Braze.this.setConfigurationProvider$android_sdk_base_release(new BrazeConfigurationProvider(Braze.this.applicationContext));
            Braze braze2 = Braze.this;
            Companion companion = Braze.Companion;
            String configuredApiKey = companion.getConfiguredApiKey(braze2.getConfigurationProvider$android_sdk_base_release());
            braze2.setApiKeyPresent$android_sdk_base_release(Boolean.valueOf(!(configuredApiKey == null || h40.q.R(configuredApiKey))));
            BrazeLogger.setInitialLogLevelFromConfiguration(Braze.this.getConfigurationProvider$android_sdk_base_release().getLoggerInitialLogLevel());
            BrazeLogger.checkForSystemLogLevelProperty$default(false, 1, null);
            if (companion.getSdkEnablementProvider(this.c).a()) {
                companion.setOutboundNetworkRequestsOffline(true);
            }
            Braze.this.setPushDeliveryManager$android_sdk_base_release(new o4(Braze.this.applicationContext, Braze.this.getConfigurationProvider$android_sdk_base_release().getBrazeApiKey().toString()));
            Braze.this.setDeviceIdProvider$android_sdk_base_release(new bo.app.l0(Braze.this.applicationContext));
            Braze.this.offlineUserStorageProvider = new bo.app.w3(Braze.this.applicationContext);
            Braze.this.registrationDataProvider = new u4(Braze.this.applicationContext, Braze.this.getConfigurationProvider$android_sdk_base_release());
            String customEndpoint = Braze.this.getConfigurationProvider$android_sdk_base_release().getCustomEndpoint();
            if (customEndpoint != null && !h40.q.R(customEndpoint)) {
                companion.setConfiguredCustomEndpoint$android_sdk_base_release(Braze.this.getConfigurationProvider$android_sdk_base_release().getCustomEndpoint());
            }
            try {
                if (Braze.this.getConfigurationProvider$android_sdk_base_release().isFirebaseCloudMessagingRegistrationEnabled()) {
                    Context context2 = this.c;
                    bo.app.n2 n2Var = Braze.this.registrationDataProvider;
                    if (n2Var == null) {
                        xu.b.r0("registrationDataProvider");
                        throw null;
                    }
                    bo.app.t1 t1Var = new bo.app.t1(context2, n2Var);
                    if (t1Var.a()) {
                        BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, Braze.this, BrazeLogger.Priority.I, (Throwable) null, d.b, 2, (Object) null);
                        String firebaseCloudMessagingSenderIdKey = Braze.this.getConfigurationProvider$android_sdk_base_release().getFirebaseCloudMessagingSenderIdKey();
                        if (firebaseCloudMessagingSenderIdKey != null) {
                            t1Var.a(firebaseCloudMessagingSenderIdKey);
                        }
                    } else {
                        BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, Braze.this, BrazeLogger.Priority.W, (Throwable) null, C0000e.b, 2, (Object) null);
                    }
                } else {
                    BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, Braze.this, BrazeLogger.Priority.I, (Throwable) null, f.b, 2, (Object) null);
                }
                if (!Braze.this.getConfigurationProvider$android_sdk_base_release().isAdmMessagingRegistrationEnabled()) {
                    BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, Braze.this, BrazeLogger.Priority.I, (Throwable) null, i.b, 2, (Object) null);
                } else if (bo.app.b.c.a(Braze.this.applicationContext)) {
                    BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, Braze.this, BrazeLogger.Priority.I, (Throwable) null, g.b, 2, (Object) null);
                    Context context3 = Braze.this.applicationContext;
                    bo.app.n2 n2Var2 = Braze.this.registrationDataProvider;
                    if (n2Var2 == null) {
                        xu.b.r0("registrationDataProvider");
                        throw null;
                    }
                    new bo.app.b(context3, n2Var2).a();
                } else {
                    BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, Braze.this, BrazeLogger.Priority.W, (Throwable) null, h.b, 2, (Object) null);
                }
                Braze.this.verifyProperSdkSetup();
            } catch (Exception e) {
                BrazeLogger.INSTANCE.brazelog(Braze.this, BrazeLogger.Priority.E, e, j.b);
            }
            BrazeLogger brazeLogger = BrazeLogger.INSTANCE;
            Braze braze3 = Braze.this;
            BrazeLogger.Priority priority = BrazeLogger.Priority.V;
            BrazeLogger.brazelog$default(brazeLogger, braze3, priority, (Throwable) null, k.b, 2, (Object) null);
            try {
                braze = Braze.this;
                context = braze.applicationContext;
                w3Var = Braze.this.offlineUserStorageProvider;
            } catch (Exception e2) {
                BrazeLogger.INSTANCE.brazelog(Braze.this, BrazeLogger.Priority.E, e2, b.b);
                Braze.this.publishError(e2);
            }
            if (w3Var == null) {
                xu.b.r0("offlineUserStorageProvider");
                throw null;
            }
            BrazeConfigurationProvider configurationProvider$android_sdk_base_release = Braze.this.getConfigurationProvider$android_sdk_base_release();
            bo.app.k2 externalIEventMessenger$android_sdk_base_release = Braze.this.getExternalIEventMessenger$android_sdk_base_release();
            bo.app.h2 deviceIdProvider$android_sdk_base_release = Braze.this.getDeviceIdProvider$android_sdk_base_release();
            bo.app.n2 n2Var3 = Braze.this.registrationDataProvider;
            if (n2Var3 == null) {
                xu.b.r0("registrationDataProvider");
                throw null;
            }
            braze.setUserSpecificMemberVariablesAndStartDispatch(new f7(context, w3Var, configurationProvider$android_sdk_base_release, externalIEventMessenger$android_sdk_base_release, deviceIdProvider$android_sdk_base_release, n2Var3, Braze.this.getPushDeliveryManager$android_sdk_base_release(), Braze.shouldMockNetworkRequestsAndDropEvents, Braze.areOutboundNetworkRequestsOffline, Braze.this.getDeviceDataProvider(), Braze.Companion.getShouldRequestFrameworkListenToNetworkUpdates$android_sdk_base_release()));
            BrazeLogger.brazelog$default(brazeLogger, Braze.this, priority, (Throwable) null, a.b, 2, (Object) null);
            BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, Braze.this, BrazeLogger.Priority.V, (Throwable) null, c.b, 2, (Object) null);
        }

        public Object invoke() {
            a();
            return m30.x.a;
        }
    }

    public static final class e0 extends kotlin.jvm.internal.l implements y30.a {
        public static final e0 b = new e0();

        public e0() {
            super(0);
        }

        public final String invoke() {
            return "Failed to get all feature flags";
        }
    }

    public static final class e1 extends kotlin.jvm.internal.l implements y30.a {
        public e1() {
            super(0);
        }

        public final void a() {
            bo.app.a2 a = bo.app.i.h.a();
            if (a != null) {
                Braze.this.getUdm$android_sdk_base_release().h().a(a);
            }
        }

        public Object invoke() {
            a();
            return m30.x.a;
        }
    }

    public static final class e2 extends kotlin.jvm.internal.l implements y30.a {
        final InAppMessageEvent c;

        public e2(InAppMessageEvent inAppMessageEvent) {
            super(0);
            this.c = inAppMessageEvent;
        }

        public final void a() {
            Braze.this.getUdm$android_sdk_base_release().v().d(this.c.getTriggerAction());
        }

        public Object invoke() {
            a();
            return m30.x.a;
        }
    }

    public static final class e3 extends kotlin.jvm.internal.l implements y30.a {
        public static final e3 b = new e3();

        public e3() {
            super(0);
        }

        public final String invoke() {
            return "Failed to request data flush.";
        }
    }

    public static final class e4 extends kotlin.jvm.internal.l implements y30.a {
        public static final e4 b = new e4();

        public e4() {
            super(0);
        }

        public final String invoke() {
            return "Failed to add subscriber for SDK authentication failures.";
        }
    }

    public static final class f extends kotlin.jvm.internal.l implements y30.a {
        final long b;
        final long c;

        public f(long j, long j2) {
            super(0);
            this.b = j;
            this.c = j2;
        }

        public final String invoke() {
            StringBuilder sb = new StringBuilder("Braze SDK loaded in ");
            sb.append(TimeUnit.MILLISECONDS.convert(this.b - this.c, TimeUnit.NANOSECONDS));
            sb.append(" ms / ");
            return a0.a.r(sb, this.b - this.c, " nanos");
        }
    }

    public static final class f0 extends s30.i implements y30.e {
        int b;

        public f0(q30.e eVar) {
            super(2, eVar);
        }

        public final Object invoke(m40.g0 g0Var, q30.e eVar) {
            return create(g0Var, eVar).invokeSuspend(m30.x.a);
        }

        public final q30.e create(Object obj, q30.e eVar) {
            return Braze.this.new f0(eVar);
        }

        public final Object invokeSuspend(Object obj) {
            r30.a aVar = r30.a.b;
            if (this.b != 0) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            lu.n.f0(obj);
            return Braze.this.getUdm$android_sdk_base_release().n().E() ? bo.app.m1.a(Braze.this.getUdm$android_sdk_base_release().x(), (String) null, 1, (Object) null) : n30.u.b;
        }
    }

    public static final class f1 extends kotlin.jvm.internal.l implements y30.a {
        public static final f1 b = new f1();

        public f1() {
            super(0);
        }

        public final String invoke() {
            return "Failed to log location recorded event.";
        }
    }

    public static final class f2 extends kotlin.jvm.internal.l implements y30.a {
        public static final f2 b = new f2();

        public f2() {
            super(0);
        }

        public final String invoke() {
            return "Failed to refresh feature flags.";
        }
    }

    public static final class f3 extends kotlin.jvm.internal.l implements y30.a {

        public static final class a extends kotlin.jvm.internal.l implements y30.a {
            public static final a b = new a();

            public a() {
                super(0);
            }

            public final String invoke() {
                return "requestImmediateDataFlush() called";
            }
        }

        public f3() {
            super(0);
        }

        public final void a() {
            BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, Braze.this, BrazeLogger.Priority.V, (Throwable) null, a.b, 2, (Object) null);
            Braze.this.getUdm$android_sdk_base_release().h().e();
        }

        public Object invoke() {
            a();
            return m30.x.a;
        }
    }

    public static final class f4 extends kotlin.jvm.internal.l implements y30.a {
        public static final f4 b = new f4();

        public f4() {
            super(0);
        }

        public final String invoke() {
            return "Failed to add subscriber for session updates.";
        }
    }

    public static final class g extends kotlin.jvm.internal.l implements y30.a {
        final String b;
        final String c;

        public g(String str, String str2) {
            super(0);
            this.b = str;
            this.c = str2;
        }

        public final String invoke() {
            return "Failed to update ContentCard storage provider with single card update. User id: " + this.b + " Serialized json: " + this.c;
        }
    }

    public static final class g0 extends kotlin.jvm.internal.l implements y30.a {
        public static final g0 b = new g0();

        public g0() {
            super(0);
        }

        public final String invoke() {
            return "The ContentCardsUpdatedEvent was null. Returning null for the list of cached cards.";
        }
    }

    public static final class g1 extends kotlin.jvm.internal.l implements y30.a {
        final IBrazeLocation b;
        final Braze c;

        public g1(IBrazeLocation iBrazeLocation, Braze braze) {
            super(0);
            this.b = iBrazeLocation;
            this.c = braze;
        }

        public final void a() {
            bo.app.a2 a = bo.app.i.h.a(this.b);
            if (a != null) {
                this.c.getUdm$android_sdk_base_release().h().a(a);
            }
        }

        public Object invoke() {
            a();
            return m30.x.a;
        }
    }

    public static final class g2 extends kotlin.jvm.internal.l implements y30.a {

        public static final class a extends kotlin.jvm.internal.l implements y30.a {
            public static final a b = new a();

            public a() {
                super(0);
            }

            public final String invoke() {
                return "Feature flags not enabled. Not refreshing feature flags.";
            }
        }

        public g2() {
            super(0);
        }

        public final void a() {
            if (Braze.this.getUdm$android_sdk_base_release().n().E()) {
                Braze.this.getUdm$android_sdk_base_release().x().h();
            } else {
                BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, Braze.this, BrazeLogger.Priority.I, (Throwable) null, a.b, 2, (Object) null);
                Braze.this.getUdm$android_sdk_base_release().g().a(new bo.app.o1(), bo.app.o1.class);
            }
        }

        public Object invoke() {
            a();
            return m30.x.a;
        }
    }

    public static final class g3 extends kotlin.jvm.internal.l implements y30.a {
        public static final g3 b = new g3();

        public g3() {
            super(0);
        }

        public final String invoke() {
            return "Location permissions were granted. Requesting geofence and location initialization.";
        }
    }

    public static final class g4 extends kotlin.jvm.internal.l implements y30.a {
        public static final g4 b = new g4();

        public g4() {
            super(0);
        }

        public final String invoke() {
            return "Failed to validate and store push identifier";
        }
    }

    public static final class h extends kotlin.jvm.internal.l implements y30.a {
        final String b;
        final Braze c;
        final String d;

        public static final class a extends kotlin.jvm.internal.l implements y30.a {
            final String b;
            final String c;

            public a(String str, String str2) {
                super(0);
                this.b = str;
                this.c = str2;
            }

            public final String invoke() {
                return "Cannot add null or blank card json to storage. Returning. User id: " + this.b + " Serialized json: " + this.c;
            }
        }

        public h(String str, Braze braze, String str2) {
            super(0);
            this.b = str;
            this.c = braze;
            this.d = str2;
        }

        public final void a() {
            if (h40.q.R(this.b)) {
                BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.c, BrazeLogger.Priority.W, (Throwable) null, new a(this.d, this.b), 2, (Object) null);
                return;
            }
            this.c.getUdm$android_sdk_base_release().s().a(new bo.app.x(this.b), this.d);
            this.c.getExternalIEventMessenger$android_sdk_base_release().a(this.c.getUdm$android_sdk_base_release().s().b(), ContentCardsUpdatedEvent.class);
        }

        public Object invoke() {
            a();
            return m30.x.a;
        }
    }

    public static final class h0 extends kotlin.jvm.internal.l implements y30.a {
        public static final h0 b = new h0();

        public h0() {
            super(0);
        }

        public final String invoke() {
            return "ConfigurationProvider has not been initialized. Constructing a new one.";
        }
    }

    public static final class h1 extends kotlin.jvm.internal.l implements y30.a {
        final String b;

        public h1(String str) {
            super(0);
            this.b = str;
        }

        public final String invoke() {
            return "Failed to log purchase event of: " + this.b;
        }
    }

    public static final class h2 extends kotlin.jvm.internal.l implements y30.a {
        public static final h2 b = new h2();

        public h2() {
            super(0);
        }

        public final String invoke() {
            return "Failed to get the registered push registration token.";
        }
    }

    public static final class h3 extends kotlin.jvm.internal.l implements y30.a {
        public static final h3 b = new h3();

        public h3() {
            super(0);
        }

        public final String invoke() {
            return "Failed to request single location update";
        }
    }

    public static final class h4 extends s30.i implements y30.e {
        int b;
        final String d;

        public h4(String str, q30.e eVar) {
            super(2, eVar);
            this.d = str;
        }

        public final Object invoke(m40.g0 g0Var, q30.e eVar) {
            return create(g0Var, eVar).invokeSuspend(m30.x.a);
        }

        public final q30.e create(Object obj, q30.e eVar) {
            return Braze.this.new h4(this.d, eVar);
        }

        public final Object invokeSuspend(Object obj) {
            r30.a aVar = r30.a.b;
            if (this.b != 0) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            lu.n.f0(obj);
            return Boolean.valueOf(Braze.this.getUdm$android_sdk_base_release().f().c(this.d));
        }
    }

    public static final class i extends kotlin.jvm.internal.l implements y30.a {
        final Class b;

        public i(Class cls) {
            super(0);
            this.b = cls;
        }

        public final String invoke() {
            return "Failed to add synchronous subscriber for class: " + this.b;
        }
    }

    public static final class i0 extends kotlin.jvm.internal.l implements y30.a {
        public static final i0 b = new i0();

        public i0() {
            super(0);
        }

        public final String invoke() {
            return "The ContentCardsUpdatedEvent was null. Returning the default value for the card count.";
        }
    }

    public static final class i1 extends kotlin.jvm.internal.l implements y30.a {
        final String b;
        final String c;
        final BigDecimal d;
        final int e;
        final Braze f;
        final BrazeProperties g;

        public static final class a extends kotlin.jvm.internal.l implements y30.a {
            public static final a b = new a();

            public a() {
                super(0);
            }

            public final String invoke() {
                return "Log purchase input was invalid. Not logging in-app purchase to Braze.";
            }
        }

        public static final class b extends kotlin.jvm.internal.l implements y30.a {
            public static final b b = new b();

            public b() {
                super(0);
            }

            public final String invoke() {
                return "Purchase logged with invalid properties. Not logging custom event to Braze.";
            }
        }

        public i1(String str, String str2, BigDecimal bigDecimal, int i, Braze braze, BrazeProperties brazeProperties) {
            super(0);
            this.b = str;
            this.c = str2;
            this.d = bigDecimal;
            this.e = i;
            this.f = braze;
            this.g = brazeProperties;
        }

        public final void a() {
            String str = this.b;
            if (!ValidationUtils.isValidLogPurchaseInput(str, this.c, this.d, this.e, this.f.getUdm$android_sdk_base_release().n())) {
                BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.f, BrazeLogger.Priority.W, (Throwable) null, a.b, 2, (Object) null);
                return;
            }
            BrazeProperties brazeProperties = this.g;
            if (brazeProperties != null && brazeProperties.isInvalid()) {
                BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.f, BrazeLogger.Priority.W, (Throwable) null, b.b, 2, (Object) null);
                return;
            }
            String ensureBrazeFieldLength = ValidationUtils.ensureBrazeFieldLength(str);
            i.a aVar = bo.app.i.h;
            String str2 = this.c;
            xu.b.v(str2);
            BigDecimal bigDecimal = this.d;
            xu.b.v(bigDecimal);
            bo.app.a2 a2 = aVar.a(ensureBrazeFieldLength, str2, bigDecimal, this.e, this.g);
            if (a2 != null && this.f.getUdm$android_sdk_base_release().h().a(a2)) {
                this.f.getUdm$android_sdk_base_release().v().a(new bo.app.h4(ensureBrazeFieldLength, this.g, a2));
            }
        }

        public Object invoke() {
            a();
            return m30.x.a;
        }
    }

    public static final class i2 extends s30.i implements y30.e {
        int b;

        public i2(q30.e eVar) {
            super(2, eVar);
        }

        public final Object invoke(m40.g0 g0Var, q30.e eVar) {
            return create(g0Var, eVar).invokeSuspend(m30.x.a);
        }

        public final q30.e create(Object obj, q30.e eVar) {
            return Braze.this.new i2(eVar);
        }

        public final Object invokeSuspend(Object obj) {
            r30.a aVar = r30.a.b;
            if (this.b != 0) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            lu.n.f0(obj);
            bo.app.n2 n2Var = Braze.this.registrationDataProvider;
            if (n2Var != null) {
                return n2Var.a();
            }
            xu.b.r0("registrationDataProvider");
            throw null;
        }
    }

    public static final class i3 extends kotlin.jvm.internal.l implements y30.a {
        public i3() {
            super(0);
        }

        public final void a() {
            Braze.this.getUdm$android_sdk_base_release().q().a();
        }

        public Object invoke() {
            a();
            return m30.x.a;
        }
    }

    public static final class i4 extends kotlin.jvm.internal.l implements y30.a {
        final String b;

        public i4(String str) {
            super(0);
            this.b = str;
        }

        public final String invoke() {
            return x1.y.o(new StringBuilder("The Braze SDK requires the permission "), this.b, ". Check your AndroidManifest.");
        }
    }

    public static final class j extends kotlin.jvm.internal.l implements y30.a {
        public static final j b = new j();

        public j() {
            super(0);
        }

        public final String invoke() {
            return "Applying any pending runtime configuration values";
        }
    }

    public static final class j0 extends kotlin.jvm.internal.l implements y30.a {
        public static final j0 b = new j0();

        public j0() {
            super(0);
        }

        public final String invoke() {
            return "The ContentCardsUpdatedEvent was null. Returning the default value for the unviewed card count.";
        }
    }

    public static final class j1 extends kotlin.jvm.internal.l implements y30.a {
        final String b;

        public j1(String str) {
            super(0);
            this.b = str;
        }

        public final String invoke() {
            return "Error logging Push Delivery " + this.b;
        }
    }

    public static final class j2 extends kotlin.jvm.internal.l implements y30.a {
        final String b;

        public j2(String str) {
            super(0);
            this.b = str;
        }

        public final String invoke() {
            return "Failed to set the push token " + this.b;
        }
    }

    public static final class j3 extends kotlin.jvm.internal.l implements y30.a {
        final InAppMessageEvent b;

        public j3(InAppMessageEvent inAppMessageEvent) {
            super(0);
            this.b = inAppMessageEvent;
        }

        public final String invoke() {
            return "Error retrying In-App Message from event " + this.b;
        }
    }

    public static final class j4 extends kotlin.jvm.internal.l implements y30.a {
        public static final j4 b = new j4();

        public j4() {
            super(0);
        }

        public final String invoke() {
            return "The Braze SDK requires a non-empty API key. Check your braze.xml or BrazeConfig.";
        }
    }

    public static final class k extends kotlin.jvm.internal.l implements y30.a {
        public static final k b = new k();

        public k() {
            super(0);
        }

        public final String invoke() {
            return "Clearing config values";
        }
    }

    public static final class k0 extends kotlin.jvm.internal.l implements y30.a {
        public static final k0 b = new k0();

        public k0() {
            super(0);
        }

        public final String invoke() {
            return "The ContentCardsUpdatedEvent was null. Returning the default value for the last update timestamp.";
        }
    }

    public static final class k1 extends kotlin.jvm.internal.l implements y30.a {
        final String c;
        final long d;

        public k1(String str, long j) {
            super(0);
            this.c = str;
            this.d = j;
        }

        public final void a() {
            Braze.this.getUdm$android_sdk_base_release().h().a(this.c);
            Braze.this.schedulePushDelivery$android_sdk_base_release(this.d);
        }

        public Object invoke() {
            a();
            return m30.x.a;
        }
    }

    public static final class k2 extends kotlin.jvm.internal.l implements y30.a {
        final String c;

        public static final class a extends kotlin.jvm.internal.l implements y30.a {
            final String b;

            public a(String str) {
                super(0);
                this.b = str;
            }

            public final String invoke() {
                return x1.y.o(new StringBuilder("Push token "), this.b, " registered and immediately being flushed.");
            }
        }

        public static final class b extends kotlin.jvm.internal.l implements y30.a {
            public static final b b = new b();

            public b() {
                super(0);
            }

            public final String invoke() {
                return "Push token must not be null or blank. Not registering for push with Braze.";
            }
        }

        public k2(String str) {
            super(0);
            this.c = str;
        }

        public final void a() {
            BrazeLogger brazeLogger = BrazeLogger.INSTANCE;
            BrazeLogger.brazelog$default(brazeLogger, Braze.this, BrazeLogger.Priority.I, (Throwable) null, new a(this.c), 2, (Object) null);
            String str = this.c;
            if (str == null || h40.q.R(str)) {
                BrazeLogger.brazelog$default(brazeLogger, Braze.this, BrazeLogger.Priority.W, (Throwable) null, b.b, 2, (Object) null);
                return;
            }
            bo.app.n2 n2Var = Braze.this.registrationDataProvider;
            if (n2Var == null) {
                xu.b.r0("registrationDataProvider");
                throw null;
            }
            n2Var.a(this.c);
            Braze.this.getUdm$android_sdk_base_release().l().e();
            Braze.this.requestImmediateDataFlush();
        }

        public Object invoke() {
            a();
            return m30.x.a;
        }
    }

    public static final class k3 extends kotlin.jvm.internal.l implements y30.a {
        final InAppMessageEvent c;

        public k3(InAppMessageEvent inAppMessageEvent) {
            super(0);
            this.c = inAppMessageEvent;
        }

        public final void a() {
            Braze.this.getUdm$android_sdk_base_release().v().a(this.c.getTriggerEvent(), this.c.getTriggerAction());
        }

        public Object invoke() {
            a();
            return m30.x.a;
        }
    }

    public static final class k4 extends kotlin.jvm.internal.l implements y30.a {
        public static final k4 b = new k4();

        public k4() {
            super(0);
        }

        public final String invoke() {
            return "The Braze SDK is not integrated correctly. Please visit https://www.braze.com/docs/developer_guide/platform_integration_guides/android/initial_sdk_setup/android_sdk_integration/";
        }
    }

    public static final class l extends kotlin.jvm.internal.l implements y30.a {
        final BrazeConfig b;

        public l(BrazeConfig brazeConfig) {
            super(0);
            this.b = brazeConfig;
        }

        public final String invoke() {
            return "Setting pending config object: " + this.b;
        }
    }

    public static final class l0 extends s30.i implements y30.e {
        int b;
        final IValueCallback c;
        final Braze d;

        public static final class a extends s30.i implements y30.e {
            int b;
            final IValueCallback c;
            final Braze d;

            public a(IValueCallback iValueCallback, Braze braze, q30.e eVar) {
                super(2, eVar);
                this.c = iValueCallback;
                this.d = braze;
            }

            public final Object invoke(m40.g0 g0Var, q30.e eVar) {
                return create(g0Var, eVar).invokeSuspend(m30.x.a);
            }

            public final q30.e create(Object obj, q30.e eVar) {
                return new a(this.c, this.d, eVar);
            }

            public final Object invokeSuspend(Object obj) {
                r30.a aVar = r30.a.b;
                if (this.b != 0) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                lu.n.f0(obj);
                IValueCallback iValueCallback = this.c;
                BrazeUser brazeUser = this.d.brazeUser;
                if (brazeUser != null) {
                    iValueCallback.onSuccess(brazeUser);
                    return m30.x.a;
                }
                xu.b.r0("brazeUser");
                throw null;
            }
        }

        public l0(IValueCallback iValueCallback, Braze braze, q30.e eVar) {
            super(2, eVar);
            this.c = iValueCallback;
            this.d = braze;
        }

        public final Object invoke(m40.g0 g0Var, q30.e eVar) {
            return create(g0Var, eVar).invokeSuspend(m30.x.a);
        }

        public final q30.e create(Object obj, q30.e eVar) {
            return new l0(this.c, this.d, eVar);
        }

        public final Object invokeSuspend(Object obj) {
            r30.a aVar = r30.a.b;
            int i = this.b;
            if (i == 0) {
                lu.n.f0(obj);
                q30.j coroutineContext = BrazeCoroutineScope.INSTANCE.getCoroutineContext();
                a aVar2 = new a(this.c, this.d, null);
                this.b = 1;
                if (tx.b.r0(this, coroutineContext, aVar2) == aVar) {
                    return aVar;
                }
            } else {
                if (i != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                lu.n.f0(obj);
            }
            return m30.x.a;
        }
    }

    public static final class l1 extends kotlin.jvm.internal.l implements y30.a {
        public static final l1 b = new l1();

        public l1() {
            super(0);
        }

        public final String invoke() {
            return "Failed to log push max campaign";
        }
    }

    public static final class l2 extends kotlin.jvm.internal.l implements y30.a {
        final Class b;
        final IEventSubscriber c;
        final boolean d;

        public l2(Class cls, IEventSubscriber iEventSubscriber, boolean z) {
            super(0);
            this.b = cls;
            this.c = iEventSubscriber;
            this.d = z;
        }

        public final String invoke() {
            return "Did remove the background " + this.b + ' ' + this.c + "? " + this.d;
        }
    }

    public static final class l3 extends s30.i implements y30.e {
        int b;
        final boolean c;
        final Braze d;
        final y30.a e;
        final y30.a f;

        public static final class a extends s30.i implements y30.e {
            int b;
            private Object c;
            final boolean d;
            final Braze e;
            final y30.a f;
            final y30.a g;

            public static final class C0001a extends kotlin.jvm.internal.l implements y30.a {
                final y30.a b;

                public C0001a(y30.a aVar) {
                    super(0);
                    this.b = aVar;
                }

                public final String invoke() {
                    return "Early returning because the Braze instance isn't fully initialized. Always use Braze.getInstance(context) to get the latest Braze instance. Please report to Braze if the issue continues. > " + ((String) this.b.invoke());
                }
            }

            public a(boolean z, Braze braze, y30.a aVar, y30.a aVar2, q30.e eVar) {
                super(2, eVar);
                this.d = z;
                this.e = braze;
                this.f = aVar;
                this.g = aVar2;
            }

            public final Object invoke(m40.g0 g0Var, q30.e eVar) {
                return create(g0Var, eVar).invokeSuspend(m30.x.a);
            }

            public final q30.e create(Object obj, q30.e eVar) {
                a aVar = new a(this.d, this.e, this.f, this.g, eVar);
                aVar.c = obj;
                return aVar;
            }

            public final Object invokeSuspend(Object obj) {
                r30.a aVar = r30.a.b;
                if (this.b != 0) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                lu.n.f0(obj);
                m40.g0 g0Var = (m40.g0) this.c;
                boolean z = this.d;
                m30.x xVar = m30.x.a;
                if (z && this.e.udm == null) {
                    BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, g0Var, BrazeLogger.Priority.W, (Throwable) null, new C0001a(this.g), 2, (Object) null);
                    return xVar;
                }
                this.f.invoke();
                return xVar;
            }
        }

        public l3(boolean z, Braze braze, y30.a aVar, y30.a aVar2, q30.e eVar) {
            super(2, eVar);
            this.c = z;
            this.d = braze;
            this.e = aVar;
            this.f = aVar2;
        }

        public final Object invoke(m40.g0 g0Var, q30.e eVar) {
            return create(g0Var, eVar).invokeSuspend(m30.x.a);
        }

        public final q30.e create(Object obj, q30.e eVar) {
            return new l3(this.c, this.d, this.e, this.f, eVar);
        }

        public final Object invokeSuspend(Object obj) {
            r30.a aVar = r30.a.b;
            if (this.b != 0) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            lu.n.f0(obj);
            tx.b.k0(q30.k.b, new a(this.c, this.d, this.e, this.f, null));
            return m30.x.a;
        }
    }

    public static final class l4 extends kotlin.jvm.internal.l implements y30.a {
        public static final l4 b = new l4();

        public l4() {
            super(0);
        }

        public final String invoke() {
            return "";
        }
    }

    public static final class m extends kotlin.jvm.internal.l implements y30.a {
        public static final m b = new m();

        public m() {
            super(0);
        }

        public final String invoke() {
            return "SDK is disabled. Returning false for content card stale check.";
        }
    }

    public static final class m0 extends kotlin.jvm.internal.l implements y30.a {
        public static final m0 b = new m0();

        public m0() {
            super(0);
        }

        public final String invoke() {
            return "Failed to retrieve the current user.";
        }
    }

    public static final class m1 extends kotlin.jvm.internal.l implements y30.a {
        final String c;

        public m1(String str) {
            super(0);
            this.c = str;
        }

        public final void a() {
            Braze.this.getUdm$android_sdk_base_release().h().b(this.c);
        }

        public Object invoke() {
            a();
            return m30.x.a;
        }
    }

    public static final class m2 extends kotlin.jvm.internal.l implements y30.a {
        final Class b;
        final IEventSubscriber c;
        final boolean d;

        public m2(Class cls, IEventSubscriber iEventSubscriber, boolean z) {
            super(0);
            this.b = cls;
            this.c = iEventSubscriber;
            this.d = z;
        }

        public final String invoke() {
            return "Did remove the synchronous " + this.b + ' ' + this.c + "? " + this.d;
        }
    }

    public static final class m3 extends s30.i implements y30.e {
        int b;
        final boolean c;
        final Braze d;
        final Object e;
        final y30.e f;
        final y30.a g;

        public static final class a extends s30.i implements y30.e {
            int b;
            final boolean c;
            final Braze d;
            final Object e;
            final y30.e f;
            final y30.a g;

            public static final class C0002a extends s30.i implements y30.e {
                int b;
                private Object c;
                final boolean d;
                final Braze e;
                final Object f;
                final y30.e g;
                final y30.a h;

                public static final class C0003a extends kotlin.jvm.internal.l implements y30.a {
                    final y30.a b;

                    public C0003a(y30.a aVar) {
                        super(0);
                        this.b = aVar;
                    }

                    public final String invoke() {
                        return "Early returning because the Braze instance isn't fully initialized. Always use Braze.getInstance(context) to get the latest Braze instance. Please report to Braze if the issue continues. > " + ((String) this.b.invoke());
                    }
                }

                public C0002a(boolean z, Braze braze, Object obj, y30.e eVar, y30.a aVar, q30.e eVar2) {
                    super(2, eVar2);
                    this.d = z;
                    this.e = braze;
                    this.f = obj;
                    this.g = eVar;
                    this.h = aVar;
                }

                public final Object invoke(m40.g0 g0Var, q30.e eVar) {
                    return create(g0Var, eVar).invokeSuspend(m30.x.a);
                }

                public final q30.e create(Object obj, q30.e eVar) {
                    C0002a c0002a = new C0002a(this.d, this.e, this.f, this.g, this.h, eVar);
                    c0002a.c = obj;
                    return c0002a;
                }

                public final Object invokeSuspend(Object obj) {
                    r30.a aVar = r30.a.b;
                    int i = this.b;
                    if (i == 0) {
                        lu.n.f0(obj);
                        m40.g0 g0Var = (m40.g0) this.c;
                        if (this.d && this.e.udm == null) {
                            BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, g0Var, BrazeLogger.Priority.W, (Throwable) null, new C0003a(this.h), 2, (Object) null);
                            return this.f;
                        }
                        y30.e eVar = this.g;
                        this.b = 1;
                        obj = eVar.invoke(g0Var, this);
                        if (obj == aVar) {
                            return aVar;
                        }
                    } else {
                        if (i != 1) {
                            throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                        }
                        lu.n.f0(obj);
                    }
                    return obj;
                }
            }

            public a(boolean z, Braze braze, Object obj, y30.e eVar, y30.a aVar, q30.e eVar2) {
                super(2, eVar2);
                this.c = z;
                this.d = braze;
                this.e = obj;
                this.f = eVar;
                this.g = aVar;
            }

            public final Object invoke(m40.g0 g0Var, q30.e eVar) {
                return create(g0Var, eVar).invokeSuspend(m30.x.a);
            }

            public final q30.e create(Object obj, q30.e eVar) {
                return new a(this.c, this.d, this.e, this.f, this.g, eVar);
            }

            public final Object invokeSuspend(Object obj) {
                r30.a aVar = r30.a.b;
                if (this.b != 0) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                lu.n.f0(obj);
                return tx.b.k0(q30.k.b, new C0002a(this.c, this.d, this.e, this.f, this.g, null));
            }
        }

        public m3(boolean z, Braze braze, Object obj, y30.e eVar, y30.a aVar, q30.e eVar2) {
            super(2, eVar2);
            this.c = z;
            this.d = braze;
            this.e = obj;
            this.f = eVar;
            this.g = aVar;
        }

        public final Object invoke(m40.g0 g0Var, q30.e eVar) {
            return create(g0Var, eVar).invokeSuspend(m30.x.a);
        }

        public final q30.e create(Object obj, q30.e eVar) {
            return new m3(this.c, this.d, this.e, this.f, this.g, eVar);
        }

        public final Object invokeSuspend(Object obj) {
            r30.a aVar = r30.a.b;
            int i = this.b;
            if (i == 0) {
                lu.n.f0(obj);
                m40.m0 r = tx.b.r(o5.a, null, new a(this.c, this.d, this.e, this.f, this.g, null), 3);
                this.b = 1;
                obj = r.z(this);
                if (obj == aVar) {
                    return aVar;
                }
            } else {
                if (i != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                lu.n.f0(obj);
            }
            return obj;
        }
    }

    public static final class m4 extends s30.i implements y30.e {
        int b;
        private Object c;

        public static final class a extends kotlin.jvm.internal.l implements y30.a {
            public static final a b = new a();

            public a() {
                super(0);
            }

            public final String invoke() {
                return "Waited on previous tasks to finish!";
            }
        }

        public m4(q30.e eVar) {
            super(2, eVar);
        }

        public final Object invoke(m40.g0 g0Var, q30.e eVar) {
            return create(g0Var, eVar).invokeSuspend(m30.x.a);
        }

        public final q30.e create(Object obj, q30.e eVar) {
            m4 m4Var = new m4(eVar);
            m4Var.c = obj;
            return m4Var;
        }

        public final Object invokeSuspend(Object obj) {
            r30.a aVar = r30.a.b;
            if (this.b != 0) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            lu.n.f0(obj);
            BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, (m40.g0) this.c, (BrazeLogger.Priority) null, (Throwable) null, a.b, 3, (Object) null);
            return m30.x.a;
        }
    }

    public static final class n extends kotlin.jvm.internal.l implements y30.a {
        public static final n b = new n();

        public n() {
            super(0);
        }

        public final String invoke() {
            return "The ContentCardsUpdatedEvent was null. Returning true for stale check.";
        }
    }

    public static final class n0 extends s30.i implements y30.e {
        int b;
        final IValueCallback c;
        final Braze d;

        public static final class a extends s30.i implements y30.e {
            int b;
            final IValueCallback c;
            final Braze d;

            public a(IValueCallback iValueCallback, Braze braze, q30.e eVar) {
                super(2, eVar);
                this.c = iValueCallback;
                this.d = braze;
            }

            public final Object invoke(m40.g0 g0Var, q30.e eVar) {
                return create(g0Var, eVar).invokeSuspend(m30.x.a);
            }

            public final q30.e create(Object obj, q30.e eVar) {
                return new a(this.c, this.d, eVar);
            }

            public final Object invokeSuspend(Object obj) {
                r30.a aVar = r30.a.b;
                if (this.b != 0) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                lu.n.f0(obj);
                this.c.onSuccess(this.d.getDeviceIdProvider$android_sdk_base_release().getDeviceId());
                return m30.x.a;
            }
        }

        public n0(IValueCallback iValueCallback, Braze braze, q30.e eVar) {
            super(2, eVar);
            this.c = iValueCallback;
            this.d = braze;
        }

        public final Object invoke(m40.g0 g0Var, q30.e eVar) {
            return create(g0Var, eVar).invokeSuspend(m30.x.a);
        }

        public final q30.e create(Object obj, q30.e eVar) {
            return new n0(this.c, this.d, eVar);
        }

        public final Object invokeSuspend(Object obj) {
            r30.a aVar = r30.a.b;
            int i = this.b;
            if (i == 0) {
                lu.n.f0(obj);
                q30.j coroutineContext = BrazeCoroutineScope.INSTANCE.getCoroutineContext();
                a aVar2 = new a(this.c, this.d, null);
                this.b = 1;
                if (tx.b.r0(this, coroutineContext, aVar2) == aVar) {
                    return aVar;
                }
            } else {
                if (i != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                lu.n.f0(obj);
            }
            return m30.x.a;
        }
    }

    public static final class n1 extends kotlin.jvm.internal.l implements y30.a {
        public static final n1 b = new n1();

        public n1() {
            super(0);
        }

        public final String invoke() {
            return "Failed to log push notification action clicked.";
        }
    }

    public static final class n2 extends kotlin.jvm.internal.l implements y30.a {
        final Class b;

        public n2(Class cls) {
            super(0);
            this.b = cls;
        }

        public final String invoke() {
            return "Failed to remove " + this.b.getName() + " subscriber.";
        }
    }

    public static final class n3 extends kotlin.jvm.internal.l implements y30.a {
        public static final n3 b = new n3();

        public n3() {
            super(0);
        }

        public final String invoke() {
            return "Error scheduling push delivery";
        }
    }

    public static final class n4 extends kotlin.jvm.internal.l implements y30.a {
        public static final n4 b = new n4();

        public n4() {
            super(0);
        }

        public final String invoke() {
            return "Caught exception while waiting for previous tasks in serial work queue to finish.";
        }
    }

    public static final class o extends kotlin.jvm.internal.l implements y30.a {
        public static final o b = new o();

        public o() {
            super(0);
        }

        public final String invoke() {
            return "Failed to retrieve the cached ContentCardsUpdatedEvent.";
        }
    }

    public static final class o0 extends kotlin.jvm.internal.l implements y30.a {
        public static final o0 b = new o0();

        public o0() {
            super(0);
        }

        public final String invoke() {
            return "Failed to retrieve the current device id.";
        }
    }

    public static final class o1 extends kotlin.jvm.internal.l implements y30.a {
        final String b;
        final Braze c;
        final String d;
        final String e;

        public static final class a extends kotlin.jvm.internal.l implements y30.a {
            public static final a b = new a();

            public a() {
                super(0);
            }

            public final String invoke() {
                return "No campaign Id associated with this notification (this is expected for test sends). Not logging push notification action clicked.";
            }
        }

        public static final class b extends kotlin.jvm.internal.l implements y30.a {
            public static final b b = new b();

            public b() {
                super(0);
            }

            public final String invoke() {
                return "Action ID cannot be null or blank.";
            }
        }

        public static final class c extends kotlin.jvm.internal.l implements y30.a {
            public static final c b = new c();

            public c() {
                super(0);
            }

            public final String invoke() {
                return "Action Type cannot be null or blank.";
            }
        }

        public o1(String str, Braze braze, String str2, String str3) {
            super(0);
            this.b = str;
            this.c = braze;
            this.d = str2;
            this.e = str3;
        }

        public final void a() {
            String str = this.b;
            if (str == null || h40.q.R(str)) {
                BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.c, BrazeLogger.Priority.W, (Throwable) null, a.b, 2, (Object) null);
                return;
            }
            String str2 = this.d;
            if (str2 == null || h40.q.R(str2)) {
                BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.c, BrazeLogger.Priority.W, (Throwable) null, b.b, 2, (Object) null);
                return;
            }
            String str3 = this.e;
            if (str3 == null || h40.q.R(str3)) {
                BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.c, BrazeLogger.Priority.W, (Throwable) null, c.b, 2, (Object) null);
            } else {
                this.c.getUdm$android_sdk_base_release().h().a(bo.app.j4.k.a(this.b, this.d, this.e));
            }
        }

        public Object invoke() {
            a();
            return m30.x.a;
        }
    }

    public static final class o2 extends kotlin.jvm.internal.l implements y30.a {
        public static final o2 b = new o2();

        public o2() {
            super(0);
        }

        public final String invoke() {
            return "Failed to request Content Cards refresh from Braze servers.";
        }
    }

    public static final class o3 extends kotlin.jvm.internal.l implements y30.a {
        final long c;

        public o3(long j) {
            super(0);
            this.c = j;
        }

        public final void a() {
            Braze.this.getUdm$android_sdk_base_release().h().a(this.c);
        }

        public Object invoke() {
            a();
            return m30.x.a;
        }
    }

    public static final class p extends s30.i implements y30.e {
        int b;

        public p(q30.e eVar) {
            super(2, eVar);
        }

        public final Object invoke(m40.g0 g0Var, q30.e eVar) {
            return create(g0Var, eVar).invokeSuspend(m30.x.a);
        }

        public final q30.e create(Object obj, q30.e eVar) {
            return Braze.this.new p(eVar);
        }

        public final Object invokeSuspend(Object obj) {
            r30.a aVar = r30.a.b;
            if (this.b != 0) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            lu.n.f0(obj);
            if (Braze.this.getUdm$android_sdk_base_release().n().B()) {
                return Braze.this.getUdm$android_sdk_base_release().s().b();
            }
            return null;
        }
    }

    public static final class p0 extends kotlin.jvm.internal.l implements y30.a {
        final String b;

        public p0(String str) {
            super(0);
            this.b = str;
        }

        public final String invoke() {
            return "Failed to get feature flag " + this.b;
        }
    }

    public static final class p1 extends kotlin.jvm.internal.l implements y30.a {
        final String b;

        public p1(String str) {
            super(0);
            this.b = str;
        }

        public final String invoke() {
            return b2.o.r(new StringBuilder("Failed to log push open for '"), this.b, '\'');
        }
    }

    public static final class p2 extends kotlin.jvm.internal.l implements y30.a {

        public static final class a extends kotlin.jvm.internal.l implements y30.a {
            public static final a b = new a();

            public a() {
                super(0);
            }

            public final String invoke() {
                return "Content Cards is not enabled, skipping API call to refresh";
            }
        }

        public p2() {
            super(0);
        }

        public final void a() {
            if (Braze.this.getUdm$android_sdk_base_release().n().B()) {
                i7.b(Braze.this.getUdm$android_sdk_base_release().h(), Braze.this.getUdm$android_sdk_base_release().s().e(), Braze.this.getUdm$android_sdk_base_release().s().f(), 0, true, 4, (Object) null);
            } else {
                BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, Braze.this, (BrazeLogger.Priority) null, (Throwable) null, a.b, 3, (Object) null);
            }
        }

        public Object invoke() {
            a();
            return m30.x.a;
        }
    }

    public static final class p3 extends kotlin.jvm.internal.l implements y30.a {
        final String b;
        final boolean c;

        public p3(String str, boolean z) {
            super(0);
            this.b = str;
            this.c = z;
        }

        public final String invoke() {
            return "Failed to set Google Advertising ID data on device. Google Advertising ID: " + this.b + " and limit-ad-tracking: " + this.c;
        }
    }

    public static final class q extends kotlin.jvm.internal.l implements y30.a {
        final String b;

        public q(String str) {
            super(0);
            this.b = str;
        }

        public final String invoke() {
            return "Failed to set external id to: " + this.b;
        }
    }

    public static final class q0 extends s30.i implements y30.e {
        int b;
        final String d;

        public q0(String str, q30.e eVar) {
            super(2, eVar);
            this.d = str;
        }

        public final Object invoke(m40.g0 g0Var, q30.e eVar) {
            return create(g0Var, eVar).invokeSuspend(m30.x.a);
        }

        public final q30.e create(Object obj, q30.e eVar) {
            return Braze.this.new q0(this.d, eVar);
        }

        public final Object invokeSuspend(Object obj) {
            r30.a aVar = r30.a.b;
            if (this.b != 0) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            lu.n.f0(obj);
            if (Braze.this.getUdm$android_sdk_base_release().n().E()) {
                return (FeatureFlag) n30.s.a1(Braze.this.getUdm$android_sdk_base_release().x().b(this.d));
            }
            return null;
        }
    }

    public static final class q1 extends kotlin.jvm.internal.l implements y30.a {
        final String b;
        final Braze c;

        public static final class a extends kotlin.jvm.internal.l implements y30.a {
            public static final a b = new a();

            public a() {
                super(0);
            }

            public final String invoke() {
                return "No campaign Id associated with this notification (this is expected for test sends). Not logging push notification opened.";
            }
        }

        public q1(String str, Braze braze) {
            super(0);
            this.b = str;
            this.c = braze;
        }

        public final void a() {
            String str = this.b;
            if (str == null || h40.q.R(str)) {
                BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.c, BrazeLogger.Priority.W, (Throwable) null, a.b, 2, (Object) null);
            } else {
                this.c.getUdm$android_sdk_base_release().h().a(bo.app.m4.j.a(this.b));
            }
        }

        public Object invoke() {
            a();
            return m30.x.a;
        }
    }

    public static final class q2 extends kotlin.jvm.internal.l implements y30.a {
        public static final q2 b = new q2();

        public q2() {
            super(0);
        }

        public final String invoke() {
            return "Failed to request Content Cards refresh from the cache.";
        }
    }

    public static final class q3 extends kotlin.jvm.internal.l implements y30.a {
        final String b;
        final Braze c;
        final boolean d;

        public static final class a extends kotlin.jvm.internal.l implements y30.a {
            public static final a b = new a();

            public a() {
                super(0);
            }

            public final String invoke() {
                return "Google Advertising ID cannot be null or blank";
            }
        }

        public static final class b extends kotlin.jvm.internal.l implements y30.a {
            final String b;
            final boolean c;

            public b(String str, boolean z) {
                super(0);
                this.b = str;
                this.c = z;
            }

            public final String invoke() {
                return "Setting Google Advertising ID: " + this.b + " and limit-ad-tracking: " + this.c;
            }
        }

        public q3(String str, Braze braze, boolean z) {
            super(0);
            this.b = str;
            this.c = braze;
            this.d = z;
        }

        public final void a() {
            if (h40.q.R(this.b)) {
                BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.c, BrazeLogger.Priority.W, (Throwable) null, a.b, 2, (Object) null);
                return;
            }
            BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.c, BrazeLogger.Priority.D, (Throwable) null, new b(this.b, this.d), 2, (Object) null);
            this.c.getDeviceDataProvider().a(this.b);
            this.c.getDeviceDataProvider().a(this.d);
        }

        public Object invoke() {
            a();
            return m30.x.a;
        }
    }

    public static final class r extends kotlin.jvm.internal.l implements y30.a {
        final String b;
        final Braze c;
        final String d;

        public static final class a extends kotlin.jvm.internal.l implements y30.a {
            public static final a b = new a();

            public a() {
                super(0);
            }

            public final String invoke() {
                return "userId passed to changeUser was null or empty. The current user will remain the active user.";
            }
        }

        public static final class b extends kotlin.jvm.internal.l implements y30.a {
            final String b;

            public b(String str) {
                super(0);
                this.b = str;
            }

            public final String invoke() {
                return "Rejected user id with byte length longer than 997. Not changing user. Input user id: " + this.b;
            }
        }

        public static final class c extends kotlin.jvm.internal.l implements y30.a {
            final String b;

            public c(String str) {
                super(0);
                this.b = str;
            }

            public final String invoke() {
                return x1.y.o(new StringBuilder("Received request to change current user "), this.b, " to the same user id. Not changing user.");
            }
        }

        public static final class d extends kotlin.jvm.internal.l implements y30.a {
            final String b;

            public d(String str) {
                super(0);
                this.b = str;
            }

            public final String invoke() {
                return "Set sdk auth signature on changeUser call: " + this.b;
            }
        }

        public static final class e extends kotlin.jvm.internal.l implements y30.a {
            final String b;

            public e(String str) {
                super(0);
                this.b = str;
            }

            public final String invoke() {
                return "Changing anonymous user to " + this.b;
            }
        }

        public static final class f extends kotlin.jvm.internal.l implements y30.a {
            final String b;
            final String c;

            public f(String str, String str2) {
                super(0);
                this.b = str;
                this.c = str2;
            }

            public final String invoke() {
                StringBuilder sb = new StringBuilder("Changing current user ");
                sb.append(this.b);
                sb.append(" to new user ");
                return b2.o.r(sb, this.c, '.');
            }
        }

        public static final class g extends kotlin.jvm.internal.l implements y30.a {
            final String b;

            public g(String str) {
                super(0);
                this.b = str;
            }

            public final String invoke() {
                return "Set sdk auth signature on changeUser call: " + this.b;
            }
        }

        public r(String str, Braze braze, String str2) {
            super(0);
            this.b = str;
            this.c = braze;
            this.d = str2;
        }

        public final void a() {
            String str = this.b;
            if (str == null || str.length() == 0) {
                BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.c, BrazeLogger.Priority.W, (Throwable) null, a.b, 2, (Object) null);
                return;
            }
            if (StringUtils.getByteSize(this.b) > 997) {
                BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.c, BrazeLogger.Priority.W, (Throwable) null, new b(this.b), 2, (Object) null);
                return;
            }
            BrazeUser brazeUser = this.c.brazeUser;
            if (brazeUser == null) {
                xu.b.r0("brazeUser");
                throw null;
            }
            String userId = brazeUser.getUserId();
            if (xu.b.n(userId, this.b)) {
                BrazeLogger brazeLogger = BrazeLogger.INSTANCE;
                BrazeLogger.brazelog$default(brazeLogger, this.c, BrazeLogger.Priority.I, (Throwable) null, new c(this.b), 2, (Object) null);
                String str2 = this.d;
                if (str2 == null || h40.q.R(str2)) {
                    return;
                }
                BrazeLogger.brazelog$default(brazeLogger, this.c, (BrazeLogger.Priority) null, (Throwable) null, new d(this.d), 3, (Object) null);
                this.c.getUdm$android_sdk_base_release().i().a(this.d);
                return;
            }
            this.c.getUdm$android_sdk_base_release().g().a();
            this.c.getUdm$android_sdk_base_release().p().d();
            if (xu.b.n(userId, "")) {
                BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.c, BrazeLogger.Priority.I, (Throwable) null, new e(this.b), 2, (Object) null);
                bo.app.w3 w3Var = this.c.offlineUserStorageProvider;
                if (w3Var == null) {
                    xu.b.r0("offlineUserStorageProvider");
                    throw null;
                }
                w3Var.a(this.b);
                BrazeUser brazeUser2 = this.c.brazeUser;
                if (brazeUser2 == null) {
                    xu.b.r0("brazeUser");
                    throw null;
                }
                brazeUser2.setUserId(this.b);
            } else {
                BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.c, BrazeLogger.Priority.I, (Throwable) null, new f(userId, this.b), 2, (Object) null);
                this.c.getExternalIEventMessenger$android_sdk_base_release().a(new FeedUpdatedEvent(new ArrayList(), this.b, false, DateTimeUtils.nowInSeconds()), FeedUpdatedEvent.class);
            }
            this.c.getUdm$android_sdk_base_release().h().g();
            this.c.getUdm$android_sdk_base_release().b().a();
            bo.app.w3 w3Var2 = this.c.offlineUserStorageProvider;
            if (w3Var2 == null) {
                xu.b.r0("offlineUserStorageProvider");
                throw null;
            }
            w3Var2.a(this.b);
            bo.app.d3 udm$android_sdk_base_release = this.c.getUdm$android_sdk_base_release();
            Context context = this.c.applicationContext;
            bo.app.w3 w3Var3 = this.c.offlineUserStorageProvider;
            if (w3Var3 == null) {
                xu.b.r0("offlineUserStorageProvider");
                throw null;
            }
            BrazeConfigurationProvider configurationProvider$android_sdk_base_release = this.c.getConfigurationProvider$android_sdk_base_release();
            bo.app.k2 externalIEventMessenger$android_sdk_base_release = this.c.getExternalIEventMessenger$android_sdk_base_release();
            bo.app.h2 deviceIdProvider$android_sdk_base_release = this.c.getDeviceIdProvider$android_sdk_base_release();
            bo.app.n2 n2Var = this.c.registrationDataProvider;
            if (n2Var == null) {
                xu.b.r0("registrationDataProvider");
                throw null;
            }
            this.c.setUserSpecificMemberVariablesAndStartDispatch(new f7(context, w3Var3, configurationProvider$android_sdk_base_release, externalIEventMessenger$android_sdk_base_release, deviceIdProvider$android_sdk_base_release, n2Var, this.c.getPushDeliveryManager$android_sdk_base_release(), Braze.shouldMockNetworkRequestsAndDropEvents, Braze.areOutboundNetworkRequestsOffline, this.c.getDeviceDataProvider(), Braze.Companion.getShouldRequestFrameworkListenToNetworkUpdates$android_sdk_base_release()));
            String str3 = this.d;
            if (str3 != null && !h40.q.R(str3)) {
                BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.c, (BrazeLogger.Priority) null, (Throwable) null, new g(this.d), 3, (Object) null);
                this.c.getUdm$android_sdk_base_release().i().a(this.d);
            }
            this.c.getUdm$android_sdk_base_release().k().g();
            this.c.getUdm$android_sdk_base_release().h().f();
            udm$android_sdk_base_release.a();
        }

        public Object invoke() {
            a();
            return m30.x.a;
        }
    }

    public static final class r0 extends kotlin.jvm.internal.l implements y30.a {
        public static final r0 b = new r0();

        public r0() {
            super(0);
        }

        public final String invoke() {
            return "Error handling test in-app message push";
        }
    }

    public static final class r1 extends kotlin.jvm.internal.l implements y30.a {
        final Intent b;

        public r1(Intent intent) {
            super(0);
            this.b = intent;
        }

        public final String invoke() {
            return "Error logging push notification with intent: " + this.b;
        }
    }

    public static final class r2 extends kotlin.jvm.internal.l implements y30.a {
        public r2() {
            super(0);
        }

        public final void a() {
            Braze.this.getExternalIEventMessenger$android_sdk_base_release().a(Braze.this.getUdm$android_sdk_base_release().s().b(), ContentCardsUpdatedEvent.class);
        }

        public Object invoke() {
            a();
            return m30.x.a;
        }
    }

    public static final class r3 extends kotlin.jvm.internal.l implements y30.a {
        final String b;

        public r3(String str) {
            super(0);
            this.b = str;
        }

        public final String invoke() {
            return "Failed to set SDK authentication signature on device.\n" + this.b;
        }
    }

    public static final class s extends kotlin.jvm.internal.l implements y30.a {
        public static final s b = new s();

        public s() {
            super(0);
        }

        public final String invoke() {
            return "Failed to close session.";
        }
    }

    public static final class s0 extends kotlin.jvm.internal.l implements y30.a {
        final Intent b;
        final Braze c;

        public s0(Intent intent, Braze braze) {
            super(0);
            this.b = intent;
            this.c = braze;
        }

        public final void a() {
            Braze.Companion.requestTriggersIfInAppMessageTestPush$android_sdk_base_release(this.b, this.c.getUdm$android_sdk_base_release().h());
        }

        public Object invoke() {
            a();
            return m30.x.a;
        }
    }

    public static final class s1 extends kotlin.jvm.internal.l implements y30.a {
        final Intent b;
        final Braze c;

        public static final class a extends kotlin.jvm.internal.l implements y30.a {
            public static final a b = new a();

            public a() {
                super(0);
            }

            public final String invoke() {
                return "Cannot logPushNotificationOpened with null intent. Not logging push click.";
            }
        }

        public static final class b extends kotlin.jvm.internal.l implements y30.a {
            final String b;

            public b(String str) {
                super(0);
                this.b = str;
            }

            public final String invoke() {
                return "Logging push click. Campaign Id: " + this.b;
            }
        }

        public static final class c extends kotlin.jvm.internal.l implements y30.a {
            public static final c b = new c();

            public c() {
                super(0);
            }

            public final String invoke() {
                return "No campaign Id associated with this notification (this is expected for test sends). Not logging push click.";
            }
        }

        public s1(Intent intent, Braze braze) {
            super(0);
            this.b = intent;
            this.c = braze;
        }

        public final void a() {
            Intent intent = this.b;
            if (intent == null) {
                BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.c, BrazeLogger.Priority.I, (Throwable) null, a.b, 2, (Object) null);
                return;
            }
            String stringExtra = intent.getStringExtra(Constants.BRAZE_PUSH_CAMPAIGN_ID_KEY);
            if (stringExtra == null || h40.q.R(stringExtra)) {
                BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.c, BrazeLogger.Priority.I, (Throwable) null, c.b, 2, (Object) null);
            } else {
                BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.c, BrazeLogger.Priority.I, (Throwable) null, new b(stringExtra), 2, (Object) null);
                this.c.getUdm$android_sdk_base_release().h().a(bo.app.m4.j.a(stringExtra));
            }
            Braze.Companion.requestTriggersIfInAppMessageTestPush$android_sdk_base_release(this.b, this.c.getUdm$android_sdk_base_release().h());
        }

        public Object invoke() {
            a();
            return m30.x.a;
        }
    }

    public static final class s2 extends kotlin.jvm.internal.l implements y30.a {
        public static final s2 b = new s2();

        public s2() {
            super(0);
        }

        public final String invoke() {
            return "Failed to request refresh of feed.";
        }
    }

    public static final class s3 extends kotlin.jvm.internal.l implements y30.a {
        final String c;

        public static final class a extends kotlin.jvm.internal.l implements y30.a {
            final String b;

            public a(String str) {
                super(0);
                this.b = str;
            }

            public final String invoke() {
                return "Got new sdk auth signature " + this.b;
            }
        }

        public static final class b extends kotlin.jvm.internal.l implements y30.a {
            public static final b b = new b();

            public b() {
                super(0);
            }

            public final String invoke() {
                return "SDK authentication signature cannot be null or blank";
            }
        }

        public s3(String str) {
            super(0);
            this.c = str;
        }

        public final void a() {
            BrazeLogger brazeLogger = BrazeLogger.INSTANCE;
            BrazeLogger.brazelog$default(brazeLogger, Braze.this, BrazeLogger.Priority.V, (Throwable) null, new a(this.c), 2, (Object) null);
            if (h40.q.R(this.c)) {
                BrazeLogger.brazelog$default(brazeLogger, Braze.this, BrazeLogger.Priority.W, (Throwable) null, b.b, 2, (Object) null);
            } else {
                Braze.this.getUdm$android_sdk_base_release().i().a(this.c);
            }
        }

        public Object invoke() {
            a();
            return m30.x.a;
        }
    }

    public static final class t extends kotlin.jvm.internal.l implements y30.a {
        final Activity b;
        final Braze c;

        public static final class a extends kotlin.jvm.internal.l implements y30.a {
            public static final a b = new a();

            public a() {
                super(0);
            }

            public final String invoke() {
                return "Cannot close session with null activity.";
            }
        }

        public t(Activity activity, Braze braze) {
            super(0);
            this.b = activity;
            this.c = braze;
        }

        public final void a() {
            if (this.b == null) {
                BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.c, BrazeLogger.Priority.W, (Throwable) null, a.b, 2, (Object) null);
            } else {
                this.c.getUdm$android_sdk_base_release().h().closeSession(this.b);
            }
        }

        public Object invoke() {
            a();
            return m30.x.a;
        }
    }

    public static final class t0 extends kotlin.jvm.internal.l implements y30.a {
        public static final t0 b = new t0();

        public t0() {
            super(0);
        }

        public final String invoke() {
            return "Ephemeral events enabled";
        }
    }

    public static final class t1 extends kotlin.jvm.internal.l implements y30.a {
        final String b;
        final String c;

        public t1(String str, String str2) {
            super(0);
            this.b = str;
            this.c = str2;
        }

        public final String invoke() {
            return "Failed to log push story page clicked for pageId: " + this.b + " campaignId: " + this.c;
        }
    }

    public static final class t2 extends kotlin.jvm.internal.l implements y30.a {
        public t2() {
            super(0);
        }

        public final void a() {
            Braze.this.getUdm$android_sdk_base_release().h().a(new b4.a((String) null, (Boolean) null, (Boolean) null, (bo.app.a4) null, 15, (kotlin.jvm.internal.f) null).d());
        }

        public Object invoke() {
            a();
            return m30.x.a;
        }
    }

    public static final class t3 extends kotlin.jvm.internal.l implements y30.a {
        final boolean b;

        public t3(boolean z) {
            super(0);
            this.b = z;
        }

        public final String invoke() {
            return "Failed to set sync policy offline to " + this.b;
        }
    }

    public static final class u extends kotlin.jvm.internal.l implements y30.a {
        public static final u b = new u();

        public u() {
            super(0);
        }

        public final String invoke() {
            return "Failed to retrieve the current user.";
        }
    }

    public static final class u0 extends kotlin.jvm.internal.l implements y30.a {
        final String b;
        final Set c;
        final boolean d;

        public u0(String str, Set set, boolean z) {
            super(0);
            this.b = str;
            this.c = set;
            this.d = z;
        }

        public final String invoke() {
            return "Checking event key [" + this.b + "] against ephemeral event list " + this.c + " and got match?: " + this.d;
        }
    }

    public static final class u1 extends kotlin.jvm.internal.l implements y30.a {
        final String b;
        final String c;
        final Braze d;

        public static final class a extends kotlin.jvm.internal.l implements y30.a {
            public static final a b = new a();

            public a() {
                super(0);
            }

            public final String invoke() {
                return "Push story page click input was invalid. Not logging in-app purchase to Braze.";
            }
        }

        public u1(String str, String str2, Braze braze) {
            super(0);
            this.b = str;
            this.c = str2;
            this.d = braze;
        }

        public final void a() {
            if (!ValidationUtils.isValidPushStoryClickInput(this.b, this.c)) {
                BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.d, BrazeLogger.Priority.W, (Throwable) null, a.b, 2, (Object) null);
                return;
            }
            i.a aVar = bo.app.i.h;
            String str = this.b;
            xu.b.v(str);
            String str2 = this.c;
            xu.b.v(str2);
            bo.app.a2 e = aVar.e(str, str2);
            if (e != null) {
                this.d.getUdm$android_sdk_base_release().h().a(e);
            }
        }

        public Object invoke() {
            a();
            return m30.x.a;
        }
    }

    public static final class u2 extends kotlin.jvm.internal.l implements y30.a {
        public static final u2 b = new u2();

        public u2() {
            super(0);
        }

        public final String invoke() {
            return "Failed to retrieve and publish feed from offline cache.";
        }
    }

    public static final class u3 extends kotlin.jvm.internal.l implements y30.a {
        final boolean c;

        public static final class a extends kotlin.jvm.internal.l implements y30.a {
            final boolean b;

            public a(boolean z) {
                super(0);
                this.b = z;
            }

            public final String invoke() {
                return "Setting the image loader deny network downloads to " + this.b;
            }
        }

        public u3(boolean z) {
            super(0);
            this.c = z;
        }

        public final void a() {
            Braze.this.getUdm$android_sdk_base_release().h().c(this.c);
            Braze.this.getUdm$android_sdk_base_release().m().a(this.c);
            Braze braze = Braze.this;
            if (braze.imageLoader != null) {
                BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, braze, (BrazeLogger.Priority) null, (Throwable) null, new a(this.c), 3, (Object) null);
                Braze.this.getImageLoader().setOffline(this.c);
            }
        }

        public Object invoke() {
            a();
            return m30.x.a;
        }
    }

    public static final class v extends s30.i implements y30.e {
        int b;

        public v(q30.e eVar) {
            super(2, eVar);
        }

        public final Object invoke(m40.g0 g0Var, q30.e eVar) {
            return create(g0Var, eVar).invokeSuspend(m30.x.a);
        }

        public final q30.e create(Object obj, q30.e eVar) {
            return Braze.this.new v(eVar);
        }

        public final Object invokeSuspend(Object obj) {
            r30.a aVar = r30.a.b;
            if (this.b != 0) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            lu.n.f0(obj);
            BrazeUser brazeUser = Braze.this.brazeUser;
            if (brazeUser != null) {
                return brazeUser;
            }
            xu.b.r0("brazeUser");
            throw null;
        }
    }

    public static final class v0 extends kotlin.jvm.internal.l implements y30.a {
        final String b;

        public v0(String str) {
            super(0);
            this.b = str;
        }

        public final String invoke() {
            return "Failed to log custom event: " + this.b;
        }
    }

    public static final class v1 extends kotlin.jvm.internal.l implements y30.a {
        public static final v1 b = new v1();

        public v1() {
            super(0);
        }

        public final String invoke() {
            return "Failed to open session.";
        }
    }

    public static final class v2 extends kotlin.jvm.internal.l implements y30.a {
        public v2() {
            super(0);
        }

        public final void a() {
            Braze.this.getExternalIEventMessenger$android_sdk_base_release().a(Braze.this.getUdm$android_sdk_base_release().d().a(), FeedUpdatedEvent.class);
        }

        public Object invoke() {
            a();
            return m30.x.a;
        }
    }

    public static final class v3 extends kotlin.jvm.internal.l implements y30.a {
        public static final v3 b = new v3();

        public v3() {
            super(0);
        }

        public final String invoke() {
            return "Failed to add subscriber for Content Cards updates.";
        }
    }

    public static final class w extends kotlin.jvm.internal.l implements y30.a {
        public static final w b = new w();

        public w() {
            super(0);
        }

        public final String invoke() {
            return "Cannot deserialize null content card json string. Returning null.";
        }
    }

    public static final class w0 extends kotlin.jvm.internal.l implements y30.a {
        final String b;
        final Braze c;
        final BrazeProperties d;

        public static final class a extends kotlin.jvm.internal.l implements y30.a {
            final kotlin.jvm.internal.x b;

            public a(kotlin.jvm.internal.x xVar) {
                super(0);
                this.b = xVar;
            }

            public final String invoke() {
                return x1.y.o(new StringBuilder("Logged custom event with name "), (String) this.b.b, " was invalid. Not logging custom event to Braze.");
            }
        }

        public static final class b extends kotlin.jvm.internal.l implements y30.a {
            final kotlin.jvm.internal.x b;

            public b(kotlin.jvm.internal.x xVar) {
                super(0);
                this.b = xVar;
            }

            public final String invoke() {
                return x1.y.o(new StringBuilder("Custom event with name "), (String) this.b.b, " logged with invalid properties. Not logging custom event to Braze.");
            }
        }

        public w0(String str, Braze braze, BrazeProperties brazeProperties) {
            super(0);
            this.b = str;
            this.c = braze;
            this.d = brazeProperties;
        }

        public final void a() {
            kotlin.jvm.internal.x xVar = new kotlin.jvm.internal.x();
            String str = this.b;
            xVar.b = str;
            if (!ValidationUtils.isValidLogCustomEventInput(str, this.c.getUdm$android_sdk_base_release().n())) {
                BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.c, BrazeLogger.Priority.W, (Throwable) null, new a(xVar), 2, (Object) null);
                return;
            }
            BrazeProperties brazeProperties = this.d;
            if (brazeProperties != null && brazeProperties.isInvalid()) {
                BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.c, BrazeLogger.Priority.W, (Throwable) null, new b(xVar), 2, (Object) null);
                return;
            }
            String ensureBrazeFieldLength = ValidationUtils.ensureBrazeFieldLength((String) xVar.b);
            xVar.b = ensureBrazeFieldLength;
            bo.app.a2 a2 = bo.app.i.h.a(ensureBrazeFieldLength, this.d);
            if (a2 == null) {
                return;
            }
            if (this.c.isEphemeralEventKey((String) xVar.b) ? this.c.getUdm$android_sdk_base_release().n().D() : this.c.getUdm$android_sdk_base_release().h().a(a2)) {
                this.c.getUdm$android_sdk_base_release().v().a(new bo.app.b0((String) xVar.b, this.d, a2));
            }
        }

        public Object invoke() {
            a();
            return m30.x.a;
        }
    }

    public static final class w1 extends kotlin.jvm.internal.l implements y30.a {
        final Activity b;
        final Braze c;

        public static final class a extends kotlin.jvm.internal.l implements y30.a {
            public static final a b = new a();

            public a() {
                super(0);
            }

            public final String invoke() {
                return "Cannot open session with null activity.";
            }
        }

        public w1(Activity activity, Braze braze) {
            super(0);
            this.b = activity;
            this.c = braze;
        }

        public final void a() {
            if (this.b == null) {
                BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.c, BrazeLogger.Priority.I, (Throwable) null, a.b, 2, (Object) null);
            } else {
                this.c.getUdm$android_sdk_base_release().h().openSession(this.b);
            }
        }

        public Object invoke() {
            a();
            return m30.x.a;
        }
    }

    public static final class w2 extends kotlin.jvm.internal.l implements y30.a {
        public static final w2 b = new w2();

        public w2() {
            super(0);
        }

        public final String invoke() {
            return "Failed to request geofence refresh.";
        }
    }

    public static final class w3 extends kotlin.jvm.internal.l implements y30.a {
        public static final w3 b = new w3();

        public w3() {
            super(0);
        }

        public final String invoke() {
            return "Failed to send cached feature flags upon subscribeToFeatureFlagsUpdates.";
        }
    }

    public static final class x extends kotlin.jvm.internal.l implements y30.a {
        final String b;

        public x(String str) {
            super(0);
            this.b = str;
        }

        public final String invoke() {
            return "Failed to deserialize content card json string. Payload: " + this.b;
        }
    }

    public static final class x0 extends kotlin.jvm.internal.l implements y30.a {
        public static final x0 b = new x0();

        public x0() {
            super(0);
        }

        public final String invoke() {
            return "Failed to log a Feature Flag impression.";
        }
    }

    public static final class x1 extends kotlin.jvm.internal.l implements y30.a {
        public static final x1 b = new x1();

        public x1() {
            super(0);
        }

        public final String invoke() {
            return "Failed to flush push delivery events";
        }
    }

    public static final class x2 extends kotlin.jvm.internal.l implements y30.a {
        final IBrazeLocation b;
        final Braze c;

        public static final class a extends kotlin.jvm.internal.l implements y30.a {
            public static final a b = new a();

            public a() {
                super(0);
            }

            public final String invoke() {
                return "Cannot request Geofence refresh with null location.";
            }
        }

        public x2(IBrazeLocation iBrazeLocation, Braze braze) {
            super(0);
            this.b = iBrazeLocation;
            this.c = braze;
        }

        public final void a() {
            if (this.b == null) {
                BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.c, (BrazeLogger.Priority) null, (Throwable) null, a.b, 3, (Object) null);
            } else {
                this.c.getUdm$android_sdk_base_release().r().requestGeofenceRefresh(this.b);
            }
        }

        public Object invoke() {
            a();
            return m30.x.a;
        }
    }

    public static final class x3 extends kotlin.jvm.internal.l implements y30.a {

        public static final class a extends kotlin.jvm.internal.l implements y30.a {
            public static final a b = new a();

            public a() {
                super(0);
            }

            public final String invoke() {
                return "Sending cached update upon feature flag subscription";
            }
        }

        public x3() {
            super(0);
        }

        public final void a() {
            BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, Braze.this, (BrazeLogger.Priority) null, (Throwable) null, a.b, 3, (Object) null);
            if (Braze.this.getUdm$android_sdk_base_release().n().E()) {
                Braze.this.getUdm$android_sdk_base_release().x().g();
            } else {
                Braze.this.getUdm$android_sdk_base_release().g().a(new bo.app.o1(), bo.app.o1.class);
            }
        }

        public Object invoke() {
            a();
            return m30.x.a;
        }
    }

    public static final class y extends kotlin.jvm.internal.l implements y30.a {
        final JSONObject b;

        public y(JSONObject jSONObject) {
            super(0);
            this.b = jSONObject;
        }

        public final String invoke() {
            return "Failed to deserialize content card json. Payload: " + this.b;
        }
    }

    public static final class y0 extends kotlin.jvm.internal.l implements y30.a {
        final String c;

        public y0(String str) {
            super(0);
            this.c = str;
        }

        public final void a() {
            Braze.this.getUdm$android_sdk_base_release().x().a(this.c);
        }

        public Object invoke() {
            a();
            return m30.x.a;
        }
    }

    public static final class y1 extends kotlin.jvm.internal.l implements y30.a {
        public y1() {
            super(0);
        }

        public final void a() {
            i7.a(Braze.this.getUdm$android_sdk_base_release().h(), 0L, 1, (Object) null);
        }

        public Object invoke() {
            a();
            return m30.x.a;
        }
    }

    public static final class y2 extends kotlin.jvm.internal.l implements y30.a {
        final boolean b;

        public y2(boolean z) {
            super(0);
            this.b = z;
        }

        public final String invoke() {
            return "Failed to request geofence refresh with rate limit ignore: " + this.b;
        }
    }

    public static final class y3 extends kotlin.jvm.internal.l implements y30.a {
        public static final y3 b = new y3();

        public y3() {
            super(0);
        }

        public final String invoke() {
            return "Failed to add subscriber for Feature Flags updates.";
        }
    }

    public static final class z extends s30.i implements y30.e {
        int b;
        private Object c;
        final JSONObject e;

        public static final class a extends kotlin.jvm.internal.l implements y30.a {
            public static final a b = new a();

            public a() {
                super(0);
            }

            public final String invoke() {
                return "Content Cards are disabled. Not deserializing json. Returning null.";
            }
        }

        public static final class b extends kotlin.jvm.internal.l implements y30.a {
            public static final b b = new b();

            public b() {
                super(0);
            }

            public final String invoke() {
                return "Cannot deserialize null content card json. Returning null.";
            }
        }

        public z(JSONObject jSONObject, q30.e eVar) {
            super(2, eVar);
            this.e = jSONObject;
        }

        public final Object invoke(m40.g0 g0Var, q30.e eVar) {
            return create(g0Var, eVar).invokeSuspend(m30.x.a);
        }

        public final q30.e create(Object obj, q30.e eVar) {
            z zVar = Braze.this.new z(this.e, eVar);
            zVar.c = obj;
            return zVar;
        }

        public final Object invokeSuspend(Object obj) {
            r30.a aVar = r30.a.b;
            if (this.b != 0) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            lu.n.f0(obj);
            m40.g0 g0Var = (m40.g0) this.c;
            if (!Braze.this.getUdm$android_sdk_base_release().n().B()) {
                BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, g0Var, BrazeLogger.Priority.W, (Throwable) null, a.b, 2, (Object) null);
                return null;
            }
            if (this.e != null) {
                return Braze.this.getUdm$android_sdk_base_release().s().a(this.e);
            }
            BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, g0Var, BrazeLogger.Priority.W, (Throwable) null, b.b, 2, (Object) null);
            return null;
        }
    }

    public static final class z0 extends kotlin.jvm.internal.l implements y30.a {
        final String b;

        public z0(String str) {
            super(0);
            this.b = str;
        }

        public final String invoke() {
            return "Failed to log feed card clicked. Card id: " + this.b;
        }
    }

    public static final class z1 extends kotlin.jvm.internal.l implements y30.a {
        public static final z1 b = new z1();

        public z1() {
            super(0);
        }

        public final String invoke() {
            return "User dependency manager is uninitialized. Not publishing error.";
        }
    }

    public static final class z2 extends kotlin.jvm.internal.l implements y30.a {
        final boolean c;

        public z2(boolean z) {
            super(0);
            this.c = z;
        }

        public final void a() {
            Braze.this.getUdm$android_sdk_base_release().r().requestGeofenceRefresh(this.c);
        }

        public Object invoke() {
            a();
            return m30.x.a;
        }
    }

    public static final class z3 extends kotlin.jvm.internal.l implements y30.a {
        public static final z3 b = new z3();

        public z3() {
            super(0);
        }

        public final String invoke() {
            return "Failed to add subscriber for feed updates.";
        }
    }

    public Braze(Context context) {
        xu.b.y(context, "context");
        long nanoTime = System.nanoTime();
        BrazeLogger brazeLogger = BrazeLogger.INSTANCE;
        BrazeLogger.brazelog$default(brazeLogger, this, (BrazeLogger.Priority) null, (Throwable) null, a.b, 3, (Object) null);
        Context applicationContext = context.getApplicationContext();
        xu.b.x(applicationContext, "context.applicationContext");
        this.applicationContext = applicationContext;
        String str = Build.MODEL;
        if (str != null) {
            Set<String> set = KNOWN_APP_CRAWLER_DEVICE_MODELS;
            String lowerCase = str.toLowerCase(Locale.ROOT);
            xu.b.x(lowerCase, "this as java.lang.String).toLowerCase(Locale.ROOT)");
            if (set.contains(lowerCase)) {
                BrazeLogger.brazelog$default(brazeLogger, this, BrazeLogger.Priority.I, (Throwable) null, new b(str), 2, (Object) null);
                Companion.enableMockNetworkRequestsAndDropEventsMode();
            }
        }
        setImageLoader(new DefaultBrazeImageLoader(this.applicationContext));
        this.externalIEventMessenger = new bo.app.g1(Companion.getSdkEnablementProvider(this.applicationContext));
        BrazeLogger.brazelog$default(brazeLogger, this, BrazeLogger.Priority.V, (Throwable) null, new c(), 2, (Object) null);
        run$android_sdk_base_release(d.b, false, false, new e(context));
        BrazeLogger.brazelog$default(brazeLogger, this, (BrazeLogger.Priority) null, (Throwable) null, new f(System.nanoTime(), nanoTime), 3, (Object) null);
    }

    public static final void addSdkMetadata(Context context, EnumSet<BrazeSdkMetadata> enumSet) {
        Companion.addSdkMetadata(context, enumSet);
    }

    public static final void clearEndpointProvider() {
        Companion.clearEndpointProvider();
    }

    public static final boolean configure(Context context, BrazeConfig brazeConfig) {
        return Companion.configure(context, brazeConfig);
    }

    public static final void disableSdk(Context context) {
        Companion.disableSdk(context);
    }

    public static final boolean enableMockNetworkRequestsAndDropEventsMode() {
        return Companion.enableMockNetworkRequestsAndDropEventsMode();
    }

    public static final void enableSdk(Context context) {
        Companion.enableSdk(context);
    }

    public static final Uri getApiEndpoint(Uri uri) {
        return Companion.getApiEndpoint(uri);
    }

    private final ContentCardsUpdatedEvent getCachedContentCardsUpdatedEvent() {
        return (ContentCardsUpdatedEvent) runForResult$default(this, null, o.b, false, false, new p(null), 12, null);
    }

    public static void getConfigurationProvider$android_sdk_base_release$annotations() {
    }

    public static final String getConfiguredApiKey(BrazeConfigurationProvider brazeConfigurationProvider) {
        return Companion.getConfiguredApiKey(brazeConfigurationProvider);
    }

    public static final IBrazeNotificationFactory getCustomBrazeNotificationFactory() {
        return Companion.getCustomBrazeNotificationFactory();
    }

    public final bo.app.g2 getDeviceDataProvider() {
        bo.app.k0 k0Var = deviceDataProvider;
        if (k0Var == null) {
            k0Var = new bo.app.k0(this.applicationContext, getConfigurationProvider$android_sdk_base_release());
        }
        deviceDataProvider = k0Var;
        return k0Var;
    }

    public static void getDeviceIdProvider$android_sdk_base_release$annotations() {
    }

    public static void getExternalIEventMessenger$android_sdk_base_release$annotations() {
    }

    public static final Braze getInstance(Context context) {
        return Companion.getInstance(context);
    }

    public static final boolean getOutboundNetworkRequestsOffline() {
        return Companion.getOutboundNetworkRequestsOffline();
    }

    public static void getPushDeliveryManager$android_sdk_base_release$annotations() {
    }

    private static void getRegistrationDataProvider$annotations() {
    }

    public static void getUdm$android_sdk_base_release$annotations() {
    }

    public static void isApiKeyPresent$android_sdk_base_release$annotations() {
    }

    public static final boolean isDisabled() {
        return Companion.isDisabled();
    }

    public final boolean isEphemeralEventKey(String str) {
        if (!getConfigurationProvider$android_sdk_base_release().isEphemeralEventsEnabled()) {
            return false;
        }
        BrazeLogger brazeLogger = BrazeLogger.INSTANCE;
        BrazeLogger.Priority priority = BrazeLogger.Priority.V;
        BrazeLogger.brazelog$default(brazeLogger, this, priority, (Throwable) null, t0.b, 2, (Object) null);
        Set<String> ephemeralEventKeys = getConfigurationProvider$android_sdk_base_release().getEphemeralEventKeys();
        boolean contains = ephemeralEventKeys.contains(str);
        BrazeLogger.brazelog$default(brazeLogger, this, priority, (Throwable) null, new u0(str, ephemeralEventKeys, contains), 2, (Object) null);
        return contains;
    }

    public final void publishError(Throwable th) {
        if (this.udm == null) {
            BrazeLogger.INSTANCE.brazelog(this, BrazeLogger.Priority.V, th, z1.b);
            return;
        }
        try {
            getUdm$android_sdk_base_release().g().a(th, Throwable.class);
        } catch (Exception e5) {
            BrazeLogger.INSTANCE.brazelog(this, BrazeLogger.Priority.E, e5, new a2(th));
        }
    }

    public static void run$android_sdk_base_release$default(Braze braze, y30.a aVar, boolean z4, boolean z5, y30.a aVar2, int i5, Object obj) {
        if ((i5 & 2) != 0) {
            z4 = true;
        }
        if ((i5 & 4) != 0) {
            z5 = true;
        }
        braze.run$android_sdk_base_release(aVar, z4, z5, aVar2);
    }

    private final <T> T runForResult(T t4, y30.a aVar, boolean z4, boolean z5, y30.e eVar) {
        if (z4) {
            try {
                if (Companion.isDisabled()) {
                    return t4;
                }
            } catch (Exception e5) {
                BrazeLogger.INSTANCE.brazelog(this, BrazeLogger.Priority.W, e5, aVar);
                publishError(e5);
                return t4;
            }
        }
        return (T) tx.b.k0(q30.k.b, new m3(z5, this, t4, eVar, aVar, null));
    }

    public static Object runForResult$default(Braze braze, Object obj, y30.a aVar, boolean z4, boolean z5, y30.e eVar, int i5, Object obj2) {
        return braze.runForResult(obj, aVar, (i5 & 4) != 0 ? true : z4, (i5 & 8) != 0 ? true : z5, eVar);
    }

    public static final void setCustomBrazeNotificationFactory(IBrazeNotificationFactory iBrazeNotificationFactory) {
        Companion.setCustomBrazeNotificationFactory(iBrazeNotificationFactory);
    }

    public static final void setEndpointProvider(IBrazeEndpointProvider iBrazeEndpointProvider) {
        Companion.setEndpointProvider(iBrazeEndpointProvider);
    }

    public static final void setOutboundNetworkRequestsOffline(boolean z4) {
        Companion.setOutboundNetworkRequestsOffline(z4);
    }

    public final void setSyncPolicyOfflineStatus(boolean z4) {
        run$android_sdk_base_release$default(this, new t3(z4), false, false, new u3(z4), 6, null);
    }

    public final void setUserSpecificMemberVariablesAndStartDispatch(f7 f7Var) {
        setUdm$android_sdk_base_release(f7Var);
        o5.a.a(getUdm$android_sdk_base_release().g());
        e7 k5 = getUdm$android_sdk_base_release().k();
        bo.app.c2 h5 = getUdm$android_sdk_base_release().h();
        bo.app.w3 w3Var = this.offlineUserStorageProvider;
        if (w3Var == null) {
            xu.b.r0("offlineUserStorageProvider");
            throw null;
        }
        this.brazeUser = new BrazeUser(k5, h5, w3Var.a(), getUdm$android_sdk_base_release().q(), getUdm$android_sdk_base_release().n());
        getUdm$android_sdk_base_release().y().a(getUdm$android_sdk_base_release().g());
        getUdm$android_sdk_base_release().o().a(getUdm$android_sdk_base_release().g());
        getUdm$android_sdk_base_release().w().j();
    }

    public final void verifyProperSdkSetup() {
        boolean z4 = true;
        for (String str : NECESSARY_BRAZE_SDK_PERMISSIONS) {
            if (!PermissionUtils.hasPermission(this.applicationContext, str)) {
                BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, BrazeLogger.Priority.W, (Throwable) null, new i4(str), 2, (Object) null);
                z4 = false;
            }
        }
        if (h40.q.R(getConfigurationProvider$android_sdk_base_release().getBrazeApiKey().toString())) {
            BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, BrazeLogger.Priority.W, (Throwable) null, j4.b, 2, (Object) null);
        } else if (z4) {
            return;
        }
        BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, BrazeLogger.Priority.W, (Throwable) null, k4.b, 2, (Object) null);
    }

    public static final void wipeData(Context context) {
        Companion.wipeData(context);
    }

    public final void addSerializedCardJsonToStorage$android_sdk_base_release(String str, String str2) {
        xu.b.y(str, "serializedCardJson");
        run$android_sdk_base_release$default(this, new g(str2, str), false, false, new h(str, this, str2), 6, null);
    }

    @Override
    public <T> void addSingleSynchronousSubscription(IEventSubscriber<T> iEventSubscriber, Class<T> cls) {
        xu.b.y(iEventSubscriber, "subscriber");
        xu.b.y(cls, "eventClass");
        try {
            this.externalIEventMessenger.c(cls, iEventSubscriber);
        } catch (Exception e5) {
            BrazeLogger.INSTANCE.brazelog(this, BrazeLogger.Priority.W, e5, new i(cls));
            publishError(e5);
        }
    }

    public final void applyPendingRuntimeConfiguration$android_sdk_base_release() {
        ReentrantLock reentrantLock = brazeClassLock;
        reentrantLock.lock();
        try {
            BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, (BrazeLogger.Priority) null, (Throwable) null, j.b, 3, (Object) null);
            RuntimeAppConfigurationProvider runtimeAppConfigurationProvider = new RuntimeAppConfigurationProvider(this.applicationContext);
            for (BrazeConfig brazeConfig : pendingConfigurations) {
                if (xu.b.n(brazeConfig, clearConfigSentinel)) {
                    BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, BrazeLogger.Priority.V, (Throwable) null, k.b, 2, (Object) null);
                    runtimeAppConfigurationProvider.clearAllConfigurationValues();
                } else {
                    BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, BrazeLogger.Priority.V, (Throwable) null, new l(brazeConfig), 2, (Object) null);
                    runtimeAppConfigurationProvider.setConfiguration(brazeConfig);
                }
            }
            pendingConfigurations.clear();
            reentrantLock.unlock();
        } catch (Throwable th) {
            reentrantLock.unlock();
            throw th;
        }
    }

    public final boolean areCachedContentCardsStale() {
        if (Companion.isDisabled()) {
            BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, BrazeLogger.Priority.V, (Throwable) null, m.b, 2, (Object) null);
            return false;
        }
        ContentCardsUpdatedEvent cachedContentCardsUpdatedEvent = getCachedContentCardsUpdatedEvent();
        if (cachedContentCardsUpdatedEvent != null) {
            return cachedContentCardsUpdatedEvent.isTimestampOlderThan(60L);
        }
        BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, BrazeLogger.Priority.V, (Throwable) null, n.b, 2, (Object) null);
        return true;
    }

    @Override
    public void changeUser(String str) {
        changeUser(str, null);
    }

    @Override
    public void closeSession(Activity activity) {
        run$android_sdk_base_release$default(this, s.b, false, false, new t(activity, this), 6, null);
    }

    @Override
    public Card deserializeContentCard(String str) {
        if (Companion.isDisabled()) {
            return null;
        }
        if (str == null) {
            BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, BrazeLogger.Priority.W, (Throwable) null, w.b, 2, (Object) null);
            return null;
        }
        try {
            return deserializeContentCard(new JSONObject(str));
        } catch (Exception e5) {
            BrazeLogger.INSTANCE.brazelog(this, BrazeLogger.Priority.E, e5, new x(str));
            publishError(e5);
            return null;
        }
    }

    @Override
    public IInAppMessage deserializeInAppMessageString(String str) {
        return (IInAppMessage) runForResult$default(this, null, new a0(str), false, false, new b0(str, this, null), 12, null);
    }

    @Override
    public List<FeatureFlag> getAllFeatureFlags() {
        return (List) runForResult$default(this, n30.u.b, e0.b, false, false, new f0(null), 12, null);
    }

    @Override
    public List<Card> getCachedContentCards() {
        if (Companion.isDisabled()) {
            return null;
        }
        ContentCardsUpdatedEvent cachedContentCardsUpdatedEvent = getCachedContentCardsUpdatedEvent();
        if (cachedContentCardsUpdatedEvent != null) {
            return cachedContentCardsUpdatedEvent.getAllCards();
        }
        BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, BrazeLogger.Priority.V, (Throwable) null, g0.b, 2, (Object) null);
        return null;
    }

    public final BrazeConfigurationProvider getConfigurationProvider$android_sdk_base_release() {
        BrazeConfigurationProvider brazeConfigurationProvider = this.configurationProvider;
        if (brazeConfigurationProvider != null) {
            return brazeConfigurationProvider;
        }
        xu.b.r0("configurationProvider");
        throw null;
    }

    public final BrazeConfigurationProvider getConfigurationProviderSafe$android_sdk_base_release(Context context) {
        xu.b.y(context, "context");
        if (this.configurationProvider != null) {
            return getConfigurationProvider$android_sdk_base_release();
        }
        BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, (BrazeLogger.Priority) null, (Throwable) null, h0.b, 3, (Object) null);
        return new BrazeConfigurationProvider(context);
    }

    @Override
    public int getContentCardCount() {
        if (Companion.isDisabled()) {
            return -1;
        }
        ContentCardsUpdatedEvent cachedContentCardsUpdatedEvent = getCachedContentCardsUpdatedEvent();
        if (cachedContentCardsUpdatedEvent != null) {
            return cachedContentCardsUpdatedEvent.getCardCount();
        }
        BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, BrazeLogger.Priority.W, (Throwable) null, i0.b, 2, (Object) null);
        return -1;
    }

    @Override
    public int getContentCardUnviewedCount() {
        if (Companion.isDisabled()) {
            return -1;
        }
        ContentCardsUpdatedEvent cachedContentCardsUpdatedEvent = getCachedContentCardsUpdatedEvent();
        if (cachedContentCardsUpdatedEvent != null) {
            return cachedContentCardsUpdatedEvent.getUnviewedCardCount();
        }
        BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, BrazeLogger.Priority.W, (Throwable) null, j0.b, 2, (Object) null);
        return -1;
    }

    @Override
    public long getContentCardsLastUpdatedInSecondsFromEpoch() {
        if (Companion.isDisabled()) {
            return -1L;
        }
        ContentCardsUpdatedEvent cachedContentCardsUpdatedEvent = getCachedContentCardsUpdatedEvent();
        if (cachedContentCardsUpdatedEvent != null) {
            return cachedContentCardsUpdatedEvent.getTimestampSeconds();
        }
        BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, BrazeLogger.Priority.W, (Throwable) null, k0.b, 2, (Object) null);
        return -1L;
    }

    @Override
    public BrazeUser getCurrentUser() {
        return (BrazeUser) runForResult(null, u.b, false, true, new v(null));
    }

    @Override
    public String getDeviceId() {
        return (String) runForResult("", c0.b, false, false, new d0(null));
    }

    @Override
    public void getDeviceIdAsync(IValueCallback<String> iValueCallback) {
        xu.b.y(iValueCallback, "completionCallback");
        if (Companion.isDisabled()) {
            iValueCallback.onError();
            return;
        }
        try {
            tx.b.X(o5.a, null, null, new n0(iValueCallback, this, null), 3);
        } catch (Exception e5) {
            BrazeLogger.INSTANCE.brazelog(this, BrazeLogger.Priority.W, e5, o0.b);
            iValueCallback.onError();
            publishError(e5);
        }
    }

    public final bo.app.h2 getDeviceIdProvider$android_sdk_base_release() {
        bo.app.h2 h2Var = this.deviceIdProvider;
        if (h2Var != null) {
            return h2Var;
        }
        xu.b.r0("deviceIdProvider");
        throw null;
    }

    public final bo.app.k2 getExternalIEventMessenger$android_sdk_base_release() {
        return this.externalIEventMessenger;
    }

    @Override
    public FeatureFlag getFeatureFlag(String str) {
        xu.b.y(str, FeatureFlag.ID);
        return (FeatureFlag) runForResult$default(this, null, new p0(str), false, false, new q0(str, null), 12, null);
    }

    @Override
    public IBrazeImageLoader getImageLoader() {
        IBrazeImageLoader iBrazeImageLoader = this.imageLoader;
        if (iBrazeImageLoader != null) {
            return iBrazeImageLoader;
        }
        xu.b.r0("imageLoader");
        throw null;
    }

    @Override
    public final String getInstallTrackingId() {
        return com.braze.c.a(this);
    }

    public final o4 getPushDeliveryManager$android_sdk_base_release() {
        o4 o4Var = this.pushDeliveryManager;
        if (o4Var != null) {
            return o4Var;
        }
        xu.b.r0("pushDeliveryManager");
        throw null;
    }

    @Override
    public String getRegisteredPushToken() {
        return (String) runForResult$default(this, null, h2.b, false, false, new i2(null), 12, null);
    }

    public final bo.app.d3 getUdm$android_sdk_base_release() {
        bo.app.d3 d3Var = this.udm;
        if (d3Var != null) {
            return d3Var;
        }
        xu.b.r0("udm");
        throw null;
    }

    public final void handleInAppMessageTestPush$android_sdk_base_release(Intent intent) {
        xu.b.y(intent, "intent");
        run$android_sdk_base_release$default(this, r0.b, false, false, new s0(intent, this), 6, null);
    }

    public final Boolean isApiKeyPresent$android_sdk_base_release() {
        return this.isApiKeyPresent;
    }

    @Override
    public void logCustomEvent(String str) {
        logCustomEvent(str, null);
    }

    @Override
    public void logFeatureFlagImpression(String str) {
        xu.b.y(str, FeatureFlag.ID);
        run$android_sdk_base_release$default(this, x0.b, false, false, new y0(str), 6, null);
    }

    @Override
    public void logFeedCardClick(String str) {
        run$android_sdk_base_release$default(this, new z0(str), false, false, new a1(str, this), 6, null);
    }

    @Override
    public void logFeedCardImpression(String str) {
        run$android_sdk_base_release$default(this, new b1(str), false, false, new c1(str, this), 6, null);
    }

    @Override
    public void logFeedDisplayed() {
        run$android_sdk_base_release$default(this, d1.b, false, false, new e1(), 6, null);
    }

    public final void logLocationRecordedEventFromLocationUpdate$android_sdk_base_release(IBrazeLocation iBrazeLocation) {
        xu.b.y(iBrazeLocation, "location");
        run$android_sdk_base_release$default(this, f1.b, false, false, new g1(iBrazeLocation, this), 6, null);
    }

    @Override
    public void logPurchase(String str, String str2, BigDecimal bigDecimal) {
        logPurchase(str, str2, bigDecimal, 1);
    }

    public final void logPushDelivery$android_sdk_base_release(String str, long j5) {
        xu.b.y(str, "campaignId");
        run$android_sdk_base_release$default(this, new j1(str), false, false, new k1(str, j5), 6, null);
    }

    public final void logPushMaxCampaign$android_sdk_base_release(String str) {
        xu.b.y(str, "campaign");
        run$android_sdk_base_release$default(this, l1.b, false, false, new m1(str), 6, null);
    }

    @Override
    public void logPushNotificationActionClicked(String str, String str2, String str3) {
        run$android_sdk_base_release$default(this, n1.b, false, false, new o1(str, this, str2, str3), 6, null);
    }

    @Override
    public void logPushNotificationOpened(String str) {
        run$android_sdk_base_release$default(this, new p1(str), false, false, new q1(str, this), 6, null);
    }

    @Override
    public void logPushStoryPageClicked(String str, String str2) {
        run$android_sdk_base_release$default(this, new t1(str2, str), false, false, new u1(str, str2, this), 6, null);
    }

    @Override
    public void openSession(Activity activity) {
        run$android_sdk_base_release$default(this, v1.b, false, false, new w1(activity, this), 6, null);
    }

    public final void performPushDeliveryFlush$android_sdk_base_release() {
        run$android_sdk_base_release$default(this, x1.b, false, false, new y1(), 6, null);
    }

    public final void publishBrazePushAction$android_sdk_base_release(BrazePushEventType brazePushEventType, BrazeNotificationPayload brazeNotificationPayload) {
        xu.b.y(brazePushEventType, "pushActionType");
        xu.b.y(brazeNotificationPayload, "payload");
        this.externalIEventMessenger.a(new BrazePushEvent(brazePushEventType, brazeNotificationPayload), BrazePushEvent.class);
    }

    public final void recordGeofenceTransition$android_sdk_base_release(String str, GeofenceTransitionType geofenceTransitionType) {
        run$android_sdk_base_release$default(this, b2.b, false, false, new c2(str, geofenceTransitionType, this), 6, null);
    }

    public final void reenqueueInAppMessage$android_sdk_base_release(InAppMessageEvent inAppMessageEvent) {
        xu.b.y(inAppMessageEvent, "event");
        run$android_sdk_base_release$default(this, new d2(inAppMessageEvent), false, false, new e2(inAppMessageEvent), 6, null);
    }

    @Override
    public void refreshFeatureFlags() {
        run$android_sdk_base_release$default(this, f2.b, false, false, new g2(), 6, null);
    }

    @Override
    public <T> void removeSingleSubscription(IEventSubscriber<T> iEventSubscriber, Class<T> cls) {
        xu.b.y(cls, "eventClass");
        if (iEventSubscriber != null) {
            try {
                boolean d5 = this.externalIEventMessenger.d(cls, iEventSubscriber);
                BrazeLogger brazeLogger = BrazeLogger.INSTANCE;
                BrazeLogger.Priority priority = BrazeLogger.Priority.V;
                BrazeLogger.brazelog$default(brazeLogger, this, priority, (Throwable) null, new l2(cls, iEventSubscriber, d5), 2, (Object) null);
                BrazeLogger.brazelog$default(brazeLogger, this, priority, (Throwable) null, new m2(cls, iEventSubscriber, this.externalIEventMessenger.b(cls, iEventSubscriber)), 2, (Object) null);
            } catch (Exception e5) {
                BrazeLogger.INSTANCE.brazelog(this, BrazeLogger.Priority.W, e5, new n2(cls));
                publishError(e5);
            }
        }
    }

    @Override
    public void requestContentCardsRefresh(boolean z4) {
        if (z4) {
            requestContentCardsRefreshFromCache();
        } else {
            requestContentCardsRefresh();
        }
    }

    @Override
    public void requestContentCardsRefreshFromCache() {
        run$android_sdk_base_release$default(this, q2.b, false, false, new r2(), 6, null);
    }

    @Override
    public void requestFeedRefresh() {
        run$android_sdk_base_release$default(this, s2.b, false, false, new t2(), 6, null);
    }

    @Override
    public void requestFeedRefreshFromCache() {
        run$android_sdk_base_release$default(this, u2.b, false, false, new v2(), 6, null);
    }

    public final void requestGeofenceRefresh$android_sdk_base_release(IBrazeLocation iBrazeLocation) {
        run$android_sdk_base_release$default(this, w2.b, false, false, new x2(iBrazeLocation, this), 6, null);
    }

    @Override
    public void requestGeofences(double d5, double d6) {
        run$android_sdk_base_release$default(this, a3.b, false, false, new b3(d5, d6, this), 6, null);
    }

    public final void requestGeofencesInitialization$android_sdk_base_release() {
        run$android_sdk_base_release$default(this, c3.b, false, false, new d3(), 6, null);
    }

    @Override
    public void requestImmediateDataFlush() {
        run$android_sdk_base_release$default(this, e3.b, false, false, new f3(), 6, null);
    }

    @Override
    public void requestLocationInitialization() {
        BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, (BrazeLogger.Priority) null, (Throwable) null, g3.b, 3, (Object) null);
        requestGeofencesInitialization$android_sdk_base_release();
        requestSingleLocationUpdate$android_sdk_base_release();
    }

    public final void requestSingleLocationUpdate$android_sdk_base_release() {
        run$android_sdk_base_release$default(this, h3.b, false, false, new i3(), 6, null);
    }

    public final void retryInAppMessage$android_sdk_base_release(InAppMessageEvent inAppMessageEvent) {
        xu.b.y(inAppMessageEvent, "event");
        run$android_sdk_base_release$default(this, new j3(inAppMessageEvent), false, false, new k3(inAppMessageEvent), 6, null);
    }

    public final void run$android_sdk_base_release(y30.a aVar, boolean z4, boolean z5, y30.a aVar2) {
        xu.b.y(aVar, "errorLog");
        xu.b.y(aVar2, "block");
        if (z4) {
            try {
                if (Companion.isDisabled()) {
                    return;
                }
            } catch (Exception e5) {
                BrazeLogger.INSTANCE.brazelog(this, BrazeLogger.Priority.W, e5, aVar);
                publishError(e5);
                return;
            }
        }
        tx.b.X(o5.a, null, null, new l3(z5, this, aVar2, aVar, null), 3);
    }

    public final void schedulePushDelivery$android_sdk_base_release(long j5) {
        run$android_sdk_base_release$default(this, n3.b, false, false, new o3(j5), 6, null);
    }

    public final void setApiKeyPresent$android_sdk_base_release(Boolean bool) {
        this.isApiKeyPresent = bool;
    }

    public final void setConfigurationProvider$android_sdk_base_release(BrazeConfigurationProvider brazeConfigurationProvider) {
        xu.b.y(brazeConfigurationProvider, "<set-?>");
        this.configurationProvider = brazeConfigurationProvider;
    }

    public final void setDeviceIdProvider$android_sdk_base_release(bo.app.h2 h2Var) {
        xu.b.y(h2Var, "<set-?>");
        this.deviceIdProvider = h2Var;
    }

    public final void setExternalIEventMessenger$android_sdk_base_release(bo.app.k2 k2Var) {
        xu.b.y(k2Var, "<set-?>");
        this.externalIEventMessenger = k2Var;
    }

    @Override
    public void setGoogleAdvertisingId(String str, boolean z4) {
        xu.b.y(str, "googleAdvertisingId");
        run$android_sdk_base_release$default(this, new p3(str, z4), false, false, new q3(str, this, z4), 6, null);
    }

    @Override
    public void setImageLoader(IBrazeImageLoader iBrazeImageLoader) {
        xu.b.y(iBrazeImageLoader, "<set-?>");
        this.imageLoader = iBrazeImageLoader;
    }

    public final void setPushDeliveryManager$android_sdk_base_release(o4 o4Var) {
        xu.b.y(o4Var, "<set-?>");
        this.pushDeliveryManager = o4Var;
    }

    @Override
    public void setRegisteredPushToken(String str) {
        run$android_sdk_base_release$default(this, new j2(str), false, false, new k2(str), 6, null);
    }

    @Override
    public void setSdkAuthenticationSignature(String str) {
        xu.b.y(str, "signature");
        run$android_sdk_base_release$default(this, new r3(str), false, false, new s3(str), 6, null);
    }

    public final void setUdm$android_sdk_base_release(bo.app.d3 d3Var) {
        xu.b.y(d3Var, "<set-?>");
        this.udm = d3Var;
    }

    @Override
    public void subscribeToContentCardsUpdates(IEventSubscriber<ContentCardsUpdatedEvent> iEventSubscriber) {
        xu.b.y(iEventSubscriber, "subscriber");
        try {
            this.externalIEventMessenger.a(ContentCardsUpdatedEvent.class, iEventSubscriber);
        } catch (Exception e5) {
            BrazeLogger.INSTANCE.brazelog(this, BrazeLogger.Priority.W, e5, v3.b);
            publishError(e5);
        }
    }

    @Override
    public void subscribeToFeatureFlagsUpdates(IEventSubscriber<FeatureFlagsUpdatedEvent> iEventSubscriber) {
        xu.b.y(iEventSubscriber, "subscriber");
        try {
            this.externalIEventMessenger.a(FeatureFlagsUpdatedEvent.class, iEventSubscriber);
            run$android_sdk_base_release$default(this, w3.b, false, false, new x3(), 6, null);
        } catch (Exception e5) {
            BrazeLogger.INSTANCE.brazelog(this, BrazeLogger.Priority.W, e5, y3.b);
            publishError(e5);
        }
    }

    @Override
    public void subscribeToFeedUpdates(IEventSubscriber<FeedUpdatedEvent> iEventSubscriber) {
        xu.b.y(iEventSubscriber, "subscriber");
        try {
            this.externalIEventMessenger.a(FeedUpdatedEvent.class, iEventSubscriber);
        } catch (Exception e5) {
            BrazeLogger.INSTANCE.brazelog(this, BrazeLogger.Priority.W, e5, z3.b);
            publishError(e5);
        }
    }

    @Override
    public void subscribeToNetworkFailures(IEventSubscriber<BrazeNetworkFailureEvent> iEventSubscriber) {
        xu.b.y(iEventSubscriber, "subscriber");
        try {
            this.externalIEventMessenger.a(BrazeNetworkFailureEvent.class, iEventSubscriber);
        } catch (Exception e5) {
            BrazeLogger.INSTANCE.brazelog(this, BrazeLogger.Priority.W, e5, a4.b);
            publishError(e5);
        }
    }

    @Override
    public void subscribeToNewInAppMessages(IEventSubscriber<InAppMessageEvent> iEventSubscriber) {
        xu.b.y(iEventSubscriber, "subscriber");
        try {
            this.externalIEventMessenger.a(InAppMessageEvent.class, iEventSubscriber);
        } catch (Exception e5) {
            BrazeLogger.INSTANCE.brazelog(this, BrazeLogger.Priority.W, e5, b4.b);
            publishError(e5);
        }
    }

    @Override
    public void subscribeToNoMatchingTriggerForEvent(IEventSubscriber<NoMatchingTriggerEvent> iEventSubscriber) {
        xu.b.y(iEventSubscriber, "subscriber");
        try {
            this.externalIEventMessenger.a(NoMatchingTriggerEvent.class, iEventSubscriber);
        } catch (Exception e5) {
            BrazeLogger.INSTANCE.brazelog(this, BrazeLogger.Priority.W, e5, c4.b);
            publishError(e5);
        }
    }

    @Override
    public void subscribeToPushNotificationEvents(IEventSubscriber<BrazePushEvent> iEventSubscriber) {
        xu.b.y(iEventSubscriber, "subscriber");
        try {
            this.externalIEventMessenger.a(BrazePushEvent.class, iEventSubscriber);
        } catch (Exception e5) {
            BrazeLogger.INSTANCE.brazelog(this, BrazeLogger.Priority.W, e5, d4.b);
            publishError(e5);
        }
    }

    @Override
    public void subscribeToSdkAuthenticationFailures(IEventSubscriber<BrazeSdkAuthenticationErrorEvent> iEventSubscriber) {
        xu.b.y(iEventSubscriber, "subscriber");
        try {
            this.externalIEventMessenger.a(BrazeSdkAuthenticationErrorEvent.class, iEventSubscriber);
        } catch (Exception e5) {
            BrazeLogger.INSTANCE.brazelog(this, BrazeLogger.Priority.W, e5, e4.b);
            publishError(e5);
        }
    }

    @Override
    public void subscribeToSessionUpdates(IEventSubscriber<SessionStateChangedEvent> iEventSubscriber) {
        xu.b.y(iEventSubscriber, "subscriber");
        try {
            this.externalIEventMessenger.a(SessionStateChangedEvent.class, iEventSubscriber);
        } catch (Exception e5) {
            BrazeLogger.INSTANCE.brazelog(this, BrazeLogger.Priority.W, e5, f4.b);
            publishError(e5);
        }
    }

    public final boolean validateAndStorePushId$android_sdk_base_release(String str) {
        xu.b.y(str, "pushId");
        return ((Boolean) runForResult$default(this, Boolean.TRUE, g4.b, false, false, new h4(str, null), 12, null)).booleanValue();
    }

    public final void waitForUserDependencyThread$android_sdk_base_release() {
        try {
            runForResult(null, l4.b, false, false, new m4(null));
        } catch (Exception e5) {
            BrazeLogger.INSTANCE.brazelog(this, BrazeLogger.Priority.E, e5, n4.b);
        }
    }

    @Override
    public void changeUser(String str, String str2) {
        run$android_sdk_base_release$default(this, new q(str), false, false, new r(str, this, str2), 6, null);
    }

    @Override
    public void getCurrentUser(IValueCallback<BrazeUser> iValueCallback) {
        xu.b.y(iValueCallback, "completionCallback");
        if (Companion.isDisabled()) {
            iValueCallback.onError();
            return;
        }
        try {
            tx.b.X(o5.a, null, null, new l0(iValueCallback, this, null), 3);
        } catch (Exception e5) {
            BrazeLogger.INSTANCE.brazelog(this, BrazeLogger.Priority.W, e5, m0.b);
            iValueCallback.onError();
            publishError(e5);
        }
    }

    @Override
    public void logCustomEvent(String str, BrazeProperties brazeProperties) {
        run$android_sdk_base_release$default(this, new v0(str), false, false, new w0(str, this, brazeProperties != null ? brazeProperties.clone() : null), 6, null);
    }

    @Override
    public void logPurchase(String str, String str2, BigDecimal bigDecimal, BrazeProperties brazeProperties) {
        logPurchase(str, str2, bigDecimal, 1, brazeProperties);
    }

    @Override
    public void logPushNotificationOpened(Intent intent) {
        run$android_sdk_base_release$default(this, new r1(intent), false, false, new s1(intent, this), 6, null);
    }

    public final void requestGeofenceRefresh$android_sdk_base_release(boolean z4) {
        run$android_sdk_base_release$default(this, new y2(z4), false, false, new z2(z4), 6, null);
    }

    @Override
    public void logPurchase(String str, String str2, BigDecimal bigDecimal, int i5) {
        logPurchase(str, str2, bigDecimal, i5, null);
    }

    @Override
    public void requestContentCardsRefresh() {
        run$android_sdk_base_release$default(this, o2.b, false, false, new p2(), 6, null);
    }

    @Override
    public void logPurchase(String str, String str2, BigDecimal bigDecimal, int i5, BrazeProperties brazeProperties) {
        run$android_sdk_base_release$default(this, new h1(str), false, false, new i1(str, str2, bigDecimal, i5, this, brazeProperties != null ? brazeProperties.clone() : null), 6, null);
    }

    @Override
    public Card deserializeContentCard(JSONObject jSONObject) {
        return (Card) runForResult$default(this, null, new y(jSONObject), false, false, new z(jSONObject, null), 12, null);
    }
}