Picsart v24.6版本的 MD5 值为:21a61631d94e54da68d2ad9268b8b9d9
以下内容为反编译后的 WelcomeStoriesFragment.java 源代码,内容仅作参考
package com.picsart.auth.impl.legacy.growth.presenter.welcomestories;
import android.content.ComponentCallbacks;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.LinearLayoutCompat;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.n;
import com.applovin.sdk.AppLovinEventTypes;
import com.google.gson.Gson;
import com.picsart.auth.impl.common.entity.model.settings.SettingsButton;
import com.picsart.auth.impl.legacy.growth.presenter.auth.authFlowController.AuthSignInFlow;
import com.picsart.auth.impl.legacy.growth.presenter.auth.authFlowController.AuthSignUpFlow;
import com.picsart.auth.impl.legacy.growth.presenter.welcomestories.progressbar.StoriesProgressView;
import com.picsart.auth.impl.social.presentation.SocialSignInSharedViewModel;
import com.picsart.auth.signup.entity.model.MagicLinkBranchData;
import com.picsart.base.BaseFragment;
import com.picsart.studio.R;
import com.picsart.studio.apiv3.model.MediaViewData;
import com.picsart.studio.common.constants.EventParam;
import com.picsart.studio.common.constants.SourceParam;
import com.picsart.studio.reusableviews.alertview.AlertView;
import com.picsart.studio.reusableviews.button.PicsartButton;
import com.picsart.studio.reusableviews.mediaView.MediaView;
import com.picsart.subscription.OpenSubscriptionValues;
import com.picsart.subscription.SubscriptionAnalyticsParam;
import java.util.Iterator;
import kotlin.LazyThreadSafetyMode;
import kotlin.Metadata;
import kotlin.Pair;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.flow.StateFlowImpl;
import kotlinx.coroutines.flow.f;
import myobfuscated.d4.m;
import myobfuscated.ds.b0;
import myobfuscated.h4.a0;
import myobfuscated.h4.j;
import myobfuscated.h4.k;
import myobfuscated.h4.z;
import myobfuscated.ik2.h;
import myobfuscated.mk2.e;
import myobfuscated.sn2.s;
import myobfuscated.tw.g;
import myobfuscated.tz.q;
import myobfuscated.u42.p6;
import myobfuscated.u42.w2;
import myobfuscated.u42.x2;
import org.jetbrains.annotations.NotNull;
@Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b\u0002\u0010\u0003¨\u0006\u0004"}, d2 = {"Lcom/picsart/auth/impl/legacy/growth/presenter/welcomestories/WelcomeStoriesFragment;", "Lcom/picsart/base/BaseFragment;", "<init>", "()V", "_growth_registration_impl_compileGlobalReleaseKotlin"}, k = 1, mv = {1, 9, 0})
public final class WelcomeStoriesFragment extends BaseFragment {
public static final int u = 0;
@NotNull
public final h c;
@NotNull
public final h d;
@NotNull
public final h e;
@NotNull
public final h f;
@NotNull
public final h g;
@NotNull
public final h h;
@NotNull
public final h i;
@NotNull
public final h j;
@NotNull
public final e k;
public AlertView l;
public AlertView m;
public long n;
public boolean o;
public View p;
@NotNull
public final myobfuscated.d00.d q;
@NotNull
public final WelcomeStoriesFragment$lifecycleObserver$1 r;
@NotNull
public final h s;
public q t;
public static final class a implements x2 {
public final androidx.fragment.app.h a;
public final Intent b;
public a(Intent intent, androidx.fragment.app.h hVar) {
this.a = hVar;
this.b = intent;
}
@Override
public final void a(@NotNull OpenSubscriptionValues value) {
Intrinsics.checkNotNullParameter(value, "value");
androidx.fragment.app.h hVar = this.a;
if (hVar.isFinishing()) {
return;
}
String name = value.name();
Intent intent = this.b;
intent.putExtra("open_subscription_value", name);
hVar.setResult(-1, intent);
hVar.finish();
}
}
public WelcomeStoriesFragment() {
final Function0<androidx.fragment.app.h> function0 = new Function0<androidx.fragment.app.h>() {
{
super(0);
}
@Override
@NotNull
public final androidx.fragment.app.h invoke() {
androidx.fragment.app.h requireActivity = Fragment.this.requireActivity();
Intrinsics.checkNotNullExpressionValue(requireActivity, "requireActivity()");
return requireActivity;
}
};
LazyThreadSafetyMode lazyThreadSafetyMode = LazyThreadSafetyMode.NONE;
this.c = kotlin.a.a(lazyThreadSafetyMode, new Function0<SocialSignInSharedViewModel>() {
{
super(0);
}
@Override
@NotNull
public final SocialSignInSharedViewModel invoke() {
myobfuscated.i4.a defaultViewModelCreationExtras;
Fragment fragment = Fragment.this;
myobfuscated.yp2.a aVar = r2;
Function0 function02 = function0;
Function0 function03 = r4;
Function0 function04 = r5;
z viewModelStore = ((a0) function02.invoke()).getViewModelStore();
if (function03 == null || (defaultViewModelCreationExtras = (myobfuscated.i4.a) function03.invoke()) == null) {
defaultViewModelCreationExtras = fragment.getDefaultViewModelCreationExtras();
Intrinsics.checkNotNullExpressionValue(defaultViewModelCreationExtras, "this.defaultViewModelCreationExtras");
}
return myobfuscated.op2.a.a(myobfuscated.xk2.q.a.b(SocialSignInSharedViewModel.class), viewModelStore, null, defaultViewModelCreationExtras, aVar, myobfuscated.jp2.a.a(fragment), function04);
}
});
final Function0<Fragment> function02 = new Function0<Fragment>() {
{
super(0);
}
@Override
@NotNull
public final Fragment invoke() {
return Fragment.this;
}
};
this.d = kotlin.a.a(lazyThreadSafetyMode, new Function0<com.picsart.auth.impl.common.presentation.a>() {
{
super(0);
}
@Override
@NotNull
public final com.picsart.auth.impl.common.presentation.a invoke() {
myobfuscated.i4.a defaultViewModelCreationExtras;
Fragment fragment = Fragment.this;
myobfuscated.yp2.a aVar = r2;
Function0 function03 = function02;
Function0 function04 = r4;
Function0 function05 = r5;
z viewModelStore = ((a0) function03.invoke()).getViewModelStore();
if (function04 == null || (defaultViewModelCreationExtras = (myobfuscated.i4.a) function04.invoke()) == null) {
defaultViewModelCreationExtras = fragment.getDefaultViewModelCreationExtras();
Intrinsics.checkNotNullExpressionValue(defaultViewModelCreationExtras, "this.defaultViewModelCreationExtras");
}
return myobfuscated.op2.a.a(myobfuscated.xk2.q.a.b(com.picsart.auth.impl.common.presentation.a.class), viewModelStore, null, defaultViewModelCreationExtras, aVar, myobfuscated.jp2.a.a(fragment), function05);
}
});
LazyThreadSafetyMode lazyThreadSafetyMode2 = LazyThreadSafetyMode.SYNCHRONIZED;
this.e = kotlin.a.a(lazyThreadSafetyMode2, new Function0<p6>() {
{
super(0);
}
@Override
@NotNull
public final p6 invoke() {
ComponentCallbacks componentCallbacks = this;
myobfuscated.yp2.a aVar = r2;
return myobfuscated.jp2.a.a(componentCallbacks).b(r3, myobfuscated.xk2.q.a.b(p6.class), aVar);
}
});
this.f = kotlin.a.a(lazyThreadSafetyMode2, new Function0<myobfuscated.v10.a>() {
{
super(0);
}
@Override
@NotNull
public final myobfuscated.v10.a invoke() {
ComponentCallbacks componentCallbacks = this;
myobfuscated.yp2.a aVar = r2;
return myobfuscated.jp2.a.a(componentCallbacks).b(r3, myobfuscated.xk2.q.a.b(myobfuscated.v10.a.class), aVar);
}
});
this.g = kotlin.a.a(lazyThreadSafetyMode2, new Function0<myobfuscated.xy.d>() {
{
super(0);
}
@Override
@NotNull
public final myobfuscated.xy.d invoke() {
ComponentCallbacks componentCallbacks = this;
myobfuscated.yp2.a aVar = r2;
return myobfuscated.jp2.a.a(componentCallbacks).b(r3, myobfuscated.xk2.q.a.b(myobfuscated.xy.d.class), aVar);
}
});
this.h = kotlin.a.a(lazyThreadSafetyMode2, new Function0<myobfuscated.x72.a>() {
{
super(0);
}
@Override
@NotNull
public final myobfuscated.x72.a invoke() {
ComponentCallbacks componentCallbacks = this;
myobfuscated.yp2.a aVar = r2;
return myobfuscated.jp2.a.a(componentCallbacks).b(r3, myobfuscated.xk2.q.a.b(myobfuscated.x72.a.class), aVar);
}
});
this.i = kotlin.a.b(new Function0<AuthSignInFlow>() {
{
super(0);
}
@Override
@NotNull
public final AuthSignInFlow invoke() {
androidx.fragment.app.h activity = WelcomeStoriesFragment.this.getActivity();
return new AuthSignInFlow(activity instanceof AppCompatActivity ? (AppCompatActivity) activity : null);
}
});
this.j = kotlin.a.b(new Function0<AuthSignUpFlow>() {
{
super(0);
}
@Override
@NotNull
public final AuthSignUpFlow invoke() {
androidx.fragment.app.h activity = WelcomeStoriesFragment.this.getActivity();
return new AuthSignUpFlow(activity instanceof AppCompatActivity ? (AppCompatActivity) activity : null);
}
});
this.k = new e(5);
this.q = new myobfuscated.d00.d(this, 0);
this.r = new j() {
@n(Lifecycle.Event.ON_RESUME)
public final void onResume() {
StoriesProgressView storiesProgressView;
int i = WelcomeStoriesFragment.u;
WelcomeStoriesFragment welcomeStoriesFragment = WelcomeStoriesFragment.this;
welcomeStoriesFragment.K3().i.b("registration_load");
WelcomeStoriesViewModel K3 = welcomeStoriesFragment.K3();
K3.u = 0;
K3.h4();
q qVar = welcomeStoriesFragment.t;
if (qVar == null || (storiesProgressView = qVar.f) == null) {
return;
}
storiesProgressView.b();
}
};
final Function0<Fragment> function03 = new Function0<Fragment>() {
{
super(0);
}
@Override
@NotNull
public final Fragment invoke() {
return Fragment.this;
}
};
this.s = kotlin.a.a(lazyThreadSafetyMode, new Function0<WelcomeStoriesViewModel>() {
{
super(0);
}
@Override
@NotNull
public final WelcomeStoriesViewModel invoke() {
myobfuscated.i4.a defaultViewModelCreationExtras;
Fragment fragment = Fragment.this;
myobfuscated.yp2.a aVar = r2;
Function0 function04 = function03;
Function0 function05 = r4;
Function0 function06 = r5;
z viewModelStore = ((a0) function04.invoke()).getViewModelStore();
if (function05 == null || (defaultViewModelCreationExtras = (myobfuscated.i4.a) function05.invoke()) == null) {
defaultViewModelCreationExtras = fragment.getDefaultViewModelCreationExtras();
Intrinsics.checkNotNullExpressionValue(defaultViewModelCreationExtras, "this.defaultViewModelCreationExtras");
}
return myobfuscated.op2.a.a(myobfuscated.xk2.q.a.b(WelcomeStoriesViewModel.class), viewModelStore, null, defaultViewModelCreationExtras, aVar, myobfuscated.jp2.a.a(fragment), function06);
}
});
}
@Override
public final int E3() {
return R.layout.fragment_welcome_stories;
}
@Override
public final void G3(@NotNull View view, Bundle bundle) {
AlertView alertView;
AlertView alertView2;
MagicLinkBranchData magicLinkBranchData;
SharedPreferences sharedPreferences;
Intent intent;
View view2;
View view3;
String stringExtra;
Intrinsics.checkNotNullParameter(view, "view");
int i = R.id.already_have_an_account_container;
if (((LinearLayout) b0.B(R.id.already_have_an_account_container, view)) != null) {
i = R.id.buttonsContainer;
LinearLayoutCompat linearLayoutCompat = (LinearLayoutCompat) b0.B(R.id.buttonsContainer, view);
if (linearLayoutCompat != null) {
ConstraintLayout constraintLayout = (ConstraintLayout) view;
i = R.id.iv_logo;
if (((ImageView) b0.B(R.id.iv_logo, view)) != null) {
i = R.id.next;
View B = b0.B(R.id.next, view);
if (B != null) {
i = R.id.on_boarding_already_have_an_account;
if (((TextView) b0.B(R.id.on_boarding_already_have_an_account, view)) != null) {
i = R.id.prev;
View B2 = b0.B(R.id.prev, view);
if (B2 != null) {
i = R.id.progress_bar;
ProgressBar progressBar = (ProgressBar) b0.B(R.id.progress_bar, view);
if (progressBar != null) {
i = R.id.progress_bar_container;
StoriesProgressView storiesProgressView = (StoriesProgressView) b0.B(R.id.progress_bar_container, view);
if (storiesProgressView != null) {
i = R.id.readOurTermsView;
TextView textView = (TextView) b0.B(R.id.readOurTermsView, view);
if (textView != null) {
i = R.id.signInButton;
TextView textView2 = (TextView) b0.B(R.id.signInButton, view);
if (textView2 != null) {
i = R.id.skipButton;
TextView textView3 = (TextView) b0.B(R.id.skipButton, view);
if (textView3 != null) {
i = R.id.story_title;
TextView textView4 = (TextView) b0.B(R.id.story_title, view);
if (textView4 != null) {
i = R.id.story_view;
MediaView mediaView = (MediaView) b0.B(R.id.story_view, view);
if (mediaView != null) {
this.t = new q(constraintLayout, linearLayoutCompat, B, B2, progressBar, storiesProgressView, textView, textView2, textView3, textView4, mediaView);
androidx.fragment.app.h activity = getActivity();
String str = null;
if (activity == null || (alertView = myobfuscated.xl1.b.s(activity, true)) == null) {
alertView = null;
} else {
alertView.setAnalyticsModel(new myobfuscated.o22.a(SourceParam.REGISTRATION.getValue(), SourceParam.LOGIN.getValue(), null, 4));
}
this.l = alertView;
androidx.fragment.app.h activity2 = getActivity();
if (activity2 == null || (alertView2 = myobfuscated.xl1.b.u(activity2, true)) == null) {
alertView2 = null;
} else {
alertView2.setAutoHide(true);
alertView2.setAnalyticsModel(new myobfuscated.o22.a(SourceParam.REGISTRATION.getValue(), SourceParam.LOGIN.getValue(), null, 4));
}
this.m = alertView2;
final q qVar = this.t;
if (qVar != null) {
Lifecycle.State state = Lifecycle.State.CREATED;
s sVar = K3().k;
k viewLifecycleOwner = getViewLifecycleOwner();
Intrinsics.checkNotNullExpressionValue(viewLifecycleOwner, "viewLifecycleOwner");
kotlinx.coroutines.b.c(androidx.lifecycle.d.a(viewLifecycleOwner), null, null, new WelcomeStoriesFragment$onLayoutReady$lambda$10$$inlined$collectWithLifecycle$1(viewLifecycleOwner, state, sVar, null, this, qVar), 3);
K3().n.e(getViewLifecycleOwner(), new myobfuscated.d00.e(new Function1<myobfuscated.d00.a, Unit>() {
{
super(1);
}
@Override
public Unit invoke(myobfuscated.d00.a aVar) {
invoke2(aVar);
return Unit.a;
}
public final void invoke2(myobfuscated.d00.a aVar) {
final WelcomeStoriesFragment welcomeStoriesFragment = WelcomeStoriesFragment.this;
k viewLifecycleOwner2 = welcomeStoriesFragment.getViewLifecycleOwner();
Intrinsics.checkNotNullExpressionValue(viewLifecycleOwner2, "getViewLifecycleOwner(...)");
String type = aVar.b.getType();
MediaViewData mediaViewData = aVar.b;
String url = mediaViewData.getUrl();
Integer resID = mediaViewData.getResID();
MediaView storyView = qVar.k;
Intrinsics.checkNotNullExpressionValue(storyView, "storyView");
int i2 = WelcomeStoriesFragment.u;
if (storyView.getMediaViewData() == null) {
storyView.g(viewLifecycleOwner2);
storyView.setOnVideoStartListener(new Function1<String, Unit>() {
{
super(1);
}
@Override
public Unit invoke(String str2) {
invoke2(str2);
return Unit.a;
}
public final void invoke2(@NotNull String it) {
StoriesProgressView storiesProgressView2;
Intrinsics.checkNotNullParameter(it, "it");
q qVar2 = WelcomeStoriesFragment.this.t;
if (qVar2 == null || (storiesProgressView2 = qVar2.f) == null) {
return;
}
storiesProgressView2.c();
}
});
storyView.setOnVideoEndListener(new Function1<String, Unit>() {
{
super(1);
}
@Override
public Unit invoke(String str2) {
invoke2(str2);
return Unit.a;
}
public final void invoke2(@NotNull String it) {
StoriesProgressView storiesProgressView2;
Intrinsics.checkNotNullParameter(it, "it");
q qVar2 = WelcomeStoriesFragment.this.t;
if (qVar2 == null || (storiesProgressView2 = qVar2.f) == null) {
return;
}
storiesProgressView2.a();
}
});
}
storyView.a.e();
if (url != null) {
storyView.setMediaViewData(new MediaViewData(type, url, null, null, null, 28, null));
} else {
storyView.setMediaViewData(new MediaViewData(type, null, null, null, resID, 14, null));
}
myobfuscated.ee0.b.d(welcomeStoriesFragment, new WelcomeStoriesFragment$initMediaView$3(storyView, welcomeStoriesFragment, aVar.a, null));
if (storyView.getChildCount() > 2) {
storyView.removeViewAt(0);
}
}
}));
TextView signInButton = qVar.h;
Intrinsics.checkNotNullExpressionValue(signInButton, "signInButton");
myobfuscated.l22.c.a(signInButton, new Function1<View, Unit>() {
{
super(1);
}
@Override
public Unit invoke(View view4) {
invoke2(view4);
return Unit.a;
}
public final void invoke2(@NotNull View it) {
Intrinsics.checkNotNullParameter(it, "it");
WelcomeStoriesFragment welcomeStoriesFragment = WelcomeStoriesFragment.this;
int i2 = WelcomeStoriesFragment.u;
if (welcomeStoriesFragment.getActivity() == null) {
return;
}
String value = SourceParam.LOGIN.getValue();
Intrinsics.checkNotNullExpressionValue(value, "getValue(...)");
AuthSignInFlow.c((AuthSignInFlow) welcomeStoriesFragment.i.getValue(), new myobfuscated.cz.a(value, welcomeStoriesFragment.K3().w, welcomeStoriesFragment.K3().x), null, 6);
WelcomeStoriesViewModel K3 = welcomeStoriesFragment.K3();
String value2 = SourceParam.SIGN_IN.getValue();
Intrinsics.checkNotNullExpressionValue(value2, "getValue(...)");
WelcomeStoriesViewModel.d4(K3, value2);
}
});
K3().q.e(getViewLifecycleOwner(), new com.beautify.studio.impl.blemishFix.presentation.c(this, 4));
h hVar = this.c;
f fVar = ((SocialSignInSharedViewModel) hVar.getValue()).l;
k viewLifecycleOwner2 = getViewLifecycleOwner();
Intrinsics.checkNotNullExpressionValue(viewLifecycleOwner2, "viewLifecycleOwner");
kotlinx.coroutines.b.c(androidx.lifecycle.d.a(viewLifecycleOwner2), null, null, new WelcomeStoriesFragment$onLayoutReady$lambda$10$$inlined$collectWithLifecycle$2(viewLifecycleOwner2, state, fVar, null, this), 3);
f fVar2 = ((SocialSignInSharedViewModel) hVar.getValue()).o;
k viewLifecycleOwner3 = getViewLifecycleOwner();
Intrinsics.checkNotNullExpressionValue(viewLifecycleOwner3, "viewLifecycleOwner");
kotlinx.coroutines.b.c(androidx.lifecycle.d.a(viewLifecycleOwner3), null, null, new WelcomeStoriesFragment$onLayoutReady$lambda$10$$inlined$collectWithLifecycle$3(viewLifecycleOwner3, state, fVar2, null, this), 3);
SocialSignInSharedViewModel socialSignInSharedViewModel = (SocialSignInSharedViewModel) hVar.getValue();
f fVar3 = socialSignInSharedViewModel.l;
k viewLifecycleOwner4 = getViewLifecycleOwner();
Intrinsics.checkNotNullExpressionValue(viewLifecycleOwner4, "viewLifecycleOwner");
kotlinx.coroutines.b.c(androidx.lifecycle.d.a(viewLifecycleOwner4), null, null, new WelcomeStoriesFragment$onLayoutReady$lambda$10$lambda$9$$inlined$collectWithLifecycle$1(viewLifecycleOwner4, state, fVar3, null, socialSignInSharedViewModel), 3);
f fVar4 = socialSignInSharedViewModel.o;
k viewLifecycleOwner5 = getViewLifecycleOwner();
Intrinsics.checkNotNullExpressionValue(viewLifecycleOwner5, "viewLifecycleOwner");
kotlinx.coroutines.b.c(androidx.lifecycle.d.a(viewLifecycleOwner5), null, null, new WelcomeStoriesFragment$onLayoutReady$lambda$10$lambda$9$$inlined$collectWithLifecycle$2(viewLifecycleOwner5, state, fVar4, null, this), 3);
StateFlowImpl stateFlowImpl = socialSignInSharedViewModel.m;
k viewLifecycleOwner6 = getViewLifecycleOwner();
Intrinsics.checkNotNullExpressionValue(viewLifecycleOwner6, "viewLifecycleOwner");
kotlinx.coroutines.b.c(androidx.lifecycle.d.a(viewLifecycleOwner6), null, null, new WelcomeStoriesFragment$onLayoutReady$lambda$10$lambda$9$$inlined$collectWithLifecycle$3(viewLifecycleOwner6, state, stateFlowImpl, null, this), 3);
StateFlowImpl stateFlowImpl2 = socialSignInSharedViewModel.n;
k viewLifecycleOwner7 = getViewLifecycleOwner();
Intrinsics.checkNotNullExpressionValue(viewLifecycleOwner7, "viewLifecycleOwner");
kotlinx.coroutines.b.c(androidx.lifecycle.d.a(viewLifecycleOwner7), null, null, new WelcomeStoriesFragment$onLayoutReady$lambda$10$lambda$9$$inlined$collectWithLifecycle$4(viewLifecycleOwner7, state, stateFlowImpl2, null, this), 3);
f fVar5 = socialSignInSharedViewModel.p;
k viewLifecycleOwner8 = getViewLifecycleOwner();
Intrinsics.checkNotNullExpressionValue(viewLifecycleOwner8, "viewLifecycleOwner");
kotlinx.coroutines.b.c(androidx.lifecycle.d.a(viewLifecycleOwner8), null, null, new WelcomeStoriesFragment$onLayoutReady$lambda$10$lambda$9$$inlined$collectWithLifecycle$5(viewLifecycleOwner8, state, fVar5, null, this), 3);
}
androidx.fragment.app.h activity3 = getActivity();
if (activity3 != null && (stringExtra = activity3.getIntent().getStringExtra("URI")) != null && !kotlin.text.d.w(stringExtra, "https://picsart.com/sign-in", false)) {
kotlin.text.d.w(stringExtra, "picsart://sign-in", false);
}
q qVar2 = this.t;
myobfuscated.d00.d dVar = this.q;
if (qVar2 != null && (view3 = qVar2.d) != null) {
view3.setOnTouchListener(dVar);
}
q qVar3 = this.t;
if (qVar3 != null && (view2 = qVar3.c) != null) {
view2.setOnTouchListener(dVar);
}
WelcomeStoriesViewModel K3 = K3();
K3.getClass();
String source = SourceParam.REGISTRATION.getValue();
Intrinsics.checkNotNullExpressionValue(source, "getValue(...)");
String sourceSid = K3.w;
Intrinsics.checkNotNullParameter(source, "source");
Intrinsics.checkNotNullParameter(sourceSid, "sourceSid");
K3.g.a(new g("story_open", kotlin.collections.d.j(new Pair(EventParam.SOURCE.getValue(), source), new Pair(EventParam.SOURCE_SID.getValue(), sourceSid))));
androidx.fragment.app.h activity4 = getActivity();
if (activity4 == null || (intent = activity4.getIntent()) == null || (magicLinkBranchData = (MagicLinkBranchData) intent.getParcelableExtra("ml_branch_data")) == null) {
Gson gson = new Gson();
androidx.fragment.app.h activity5 = getActivity();
if (activity5 != null && (sharedPreferences = activity5.getSharedPreferences("com.picsart.studio_preferences", 0)) != null) {
str = sharedPreferences.getString("ml_branch_data", "");
}
magicLinkBranchData = (MagicLinkBranchData) gson.fromJson(str, (Class<Object>) MagicLinkBranchData.class);
}
if (magicLinkBranchData != null && (magicLinkBranchData.e == null || !magicLinkBranchData.b())) {
boolean z = magicLinkBranchData.c;
Intent intent2 = new Intent(getContext(), myobfuscated.vz.b.class);
intent2.putExtra("is_reg", z);
intent2.putExtra("ml_branch_data", magicLinkBranchData);
intent2.putExtra("source_sid", K3().w);
androidx.fragment.app.h activity6 = getActivity();
if (activity6 != null) {
activity6.startActivityForResult(intent2, 1112);
}
}
m.b(this, "request_finish_register", new Function2<String, Bundle, Unit>() {
public static final class a implements x2 {
public final Intent a;
public final androidx.fragment.app.h b;
public a(Intent intent, androidx.fragment.app.h hVar) {
this.a = intent;
this.b = hVar;
}
@Override
public final void a(@NotNull OpenSubscriptionValues value) {
Intrinsics.checkNotNullParameter(value, "value");
String name = value.name();
Intent intent = this.a;
intent.putExtra("open_subscription_value", name);
androidx.fragment.app.h hVar = this.b;
hVar.setResult(-1, intent);
hVar.finish();
}
}
{
super(2);
}
@Override
public Unit invoke(String str2, Bundle bundle2) {
invoke2(str2, bundle2);
return Unit.a;
}
public final void invoke2(@NotNull String str2, @NotNull Bundle bundle2) {
Intrinsics.checkNotNullParameter(str2, "<anonymous parameter 0>");
Intrinsics.checkNotNullParameter(bundle2, "bundle");
androidx.fragment.app.h activity7 = WelcomeStoriesFragment.this.getActivity();
if (activity7 == null) {
return;
}
Intent intent3 = activity7.getIntent();
boolean z2 = bundle2.getBoolean("from_sign_up", false);
boolean z3 = bundle2.getBoolean("key_register_skipped", false);
intent3.putExtra("from_sign_up", z2);
intent3.putExtra("key_register_skipped", z3);
WelcomeStoriesFragment welcomeStoriesFragment = WelcomeStoriesFragment.this;
int i2 = WelcomeStoriesFragment.u;
intent3.putExtra("registration_sid", welcomeStoriesFragment.K3().w);
WelcomeStoriesFragment welcomeStoriesFragment2 = WelcomeStoriesFragment.this;
String value = SourceParam.REGISTRATION.getValue();
Intrinsics.checkNotNullExpressionValue(value, "getValue(...)");
((p6) WelcomeStoriesFragment.this.e.getValue()).g(activity7, welcomeStoriesFragment2.J3(value, AppLovinEventTypes.USER_CREATED_ACCOUNT), new a(intent3, activity7));
}
});
return;
}
}
}
}
}
}
}
}
}
}
}
}
}
throw new NullPointerException("Missing required view with ID: ".concat(view.getResources().getResourceName(i)));
}
public final PicsartButton H3(SettingsButton settingsButton) {
myobfuscated.p22.a aVar = new myobfuscated.p22.a(getContext(), getResources());
aVar.a = 2;
aVar.h = myobfuscated.dx0.a.d(settingsButton.c);
aVar.c = myobfuscated.dx0.a.d(settingsButton.a);
PicsartButton picsartButton = new PicsartButton(getContext(), aVar);
picsartButton.setText(settingsButton.b);
Intrinsics.checkNotNullParameter(picsartButton, "<this>");
picsartButton.setOutlineProvider(new myobfuscated.b00.b(b0.r(8.0f)));
picsartButton.setClipToOutline(true);
return picsartButton;
}
public final LinearLayoutCompat.a I3() {
?? layoutParams = new LinearLayout.LayoutParams(-1, -2);
layoutParams.setMargins(0, 0, 0, getResources().getDimensionPixelOffset(R.dimen.margin_16));
return layoutParams;
}
public final w2 J3(String str, String str2) {
return new w2(new SubscriptionAnalyticsParam(str, SourceParam.FULLSCREEN.getValue(), K3().w, str, null, str2, null, null, null, null, false, null, null, null, false, null, null, null, null, null, null, null, 4194240, null), true, "", true, null, null, 0, 0, null, false, false, false, 262128);
}
public final WelcomeStoriesViewModel K3() {
return (WelcomeStoriesViewModel) this.s.getValue();
}
public final void L3(Intent intent, boolean z, Boolean bool, boolean z2) {
androidx.fragment.app.h activity = getActivity();
if (activity == null) {
return;
}
intent.putExtra("registration_sid", K3().w);
if (z2 && bool != null) {
boolean booleanValue = bool.booleanValue();
h hVar = this.f;
String name = WelcomeStoriesFragment.class.getName();
Intrinsics.checkNotNullExpressionValue(name, "getName(...)");
((myobfuscated.v10.a) hVar.getValue()).b(name, booleanValue);
((myobfuscated.v10.a) hVar.getValue()).a();
}
Pair pair = z ? new Pair(SourceParam.REGISTRATION_SKIP.getValue(), "registration_skip") : Intrinsics.c(bool, Boolean.TRUE) ? new Pair(SourceParam.REGISTRATION.getValue(), AppLovinEventTypes.USER_CREATED_ACCOUNT) : new Pair(SourceParam.SIGN_IN.getValue(), "sign_in");
((p6) this.e.getValue()).g(activity, J3((String) pair.component1(), (String) pair.component2()), new a(intent, activity));
}
@Override
public final void onCreate(Bundle bundle) {
super.onCreate(bundle);
Bundle arguments = getArguments();
if (arguments != null) {
WelcomeStoriesViewModel K3 = K3();
String string = arguments.getString("key_login_touch_point", "");
Intrinsics.checkNotNullExpressionValue(string, "getString(...)");
K3.getClass();
Intrinsics.checkNotNullParameter(string, "<set-?>");
K3.x = string;
WelcomeStoriesViewModel K32 = K3();
String string2 = arguments.getString("source_sid", "");
Intrinsics.checkNotNullExpressionValue(string2, "getString(...)");
K32.getClass();
Intrinsics.checkNotNullParameter(string2, "<set-?>");
K32.w = string2;
}
WelcomeStoriesViewModel K33 = K3();
K33.getClass();
K33.i.a(new myobfuscated.b72.g("registration_load"));
}
@Override
public final void onDestroyView() {
super.onDestroyView();
this.t = null;
}
@Override
public final void onPause() {
StoriesProgressView storiesProgressView;
super.onPause();
q qVar = this.t;
if (qVar != null && (storiesProgressView = qVar.f) != null) {
storiesProgressView.d = 0;
Iterator it = storiesProgressView.a.iterator();
while (it.hasNext()) {
com.picsart.auth.impl.legacy.growth.presenter.welcomestories.progressbar.a aVar = (com.picsart.auth.impl.legacy.growth.presenter.welcomestories.progressbar.a) it.next();
myobfuscated.e00.a aVar2 = aVar.c;
if (aVar2 != null) {
aVar2.setAnimationListener(null);
aVar2.cancel();
}
aVar.f = false;
aVar.c = null;
aVar.a.setVisibility(8);
aVar.b.setVisibility(8);
}
}
getViewLifecycleOwner().getLifecycle().a(this.r);
}
}