导航菜单

页面标题

页面副标题

北京退费客服端 v1.0.0 - ArticleViewer.java 源代码

正在查看: 北京退费客服端 v1.0.0 应用的 ArticleViewer.java JAVA 源代码文件

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


package im.amwhusedvt.ui;

import android.animation.Animator;
import android.animation.AnimatorSet;
import android.animation.IntEvaluator;
import android.animation.ObjectAnimator;
import android.animation.ValueAnimator;
import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffColorFilter;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.SurfaceTexture;
import android.graphics.Typeface;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.text.Layout;
import android.text.Spannable;
import android.text.SpannableStringBuilder;
import android.text.Spanned;
import android.text.StaticLayout;
import android.text.TextPaint;
import android.text.TextUtils;
import android.text.style.MetricAffectingSpan;
import android.util.LongSparseArray;
import android.util.Property;
import android.util.SparseArray;
import android.view.DisplayCutout;
import android.view.GestureDetector;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.TextureView;
import android.view.VelocityTracker;
import android.view.View;
import android.view.ViewConfiguration;
import android.view.ViewGroup;
import android.view.WindowInsets;
import android.view.WindowManager;
import android.view.accessibility.AccessibilityNodeInfo;
import android.view.animation.DecelerateInterpolator;
import android.webkit.WebChromeClient;
import android.widget.FrameLayout;
import android.widget.HorizontalScrollView;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.PopupWindow;
import android.widget.TextView;
import androidx.core.content.FileProvider;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.google.android.exoplayer2.ui.AspectRatioFrameLayout;
import im.amwhusedvt.messenger.AndroidUtilities;
import im.amwhusedvt.messenger.ApplicationLoader;
import im.amwhusedvt.messenger.Emoji;
import im.amwhusedvt.messenger.FileLoader;
import im.amwhusedvt.messenger.FileLog;
import im.amwhusedvt.messenger.ImageLoader;
import im.amwhusedvt.messenger.ImageLocation;
import im.amwhusedvt.messenger.ImageReceiver;
import im.amwhusedvt.messenger.LocaleController;
import im.amwhusedvt.messenger.MediaController;
import im.amwhusedvt.messenger.MessageObject;
import im.amwhusedvt.messenger.MessagesController;
import im.amwhusedvt.messenger.MessagesStorage;
import im.amwhusedvt.messenger.NotificationCenter;
import im.amwhusedvt.messenger.UserConfig;
import im.amwhusedvt.messenger.browser.Browser;
import im.amwhusedvt.tgnet.ConnectionsManager;
import im.amwhusedvt.tgnet.RequestDelegate;
import im.amwhusedvt.tgnet.TLObject;
import im.amwhusedvt.tgnet.TLRPC;
import im.amwhusedvt.ui.-$;
import im.amwhusedvt.ui.actionbar.ActionBar;
import im.amwhusedvt.ui.actionbar.ActionBarMenu;
import im.amwhusedvt.ui.actionbar.ActionBarMenuItem;
import im.amwhusedvt.ui.actionbar.ActionBarPopupWindow;
import im.amwhusedvt.ui.actionbar.AlertDialog;
import im.amwhusedvt.ui.actionbar.BackDrawable;
import im.amwhusedvt.ui.actionbar.BaseFragment;
import im.amwhusedvt.ui.actionbar.BottomSheet;
import im.amwhusedvt.ui.actionbar.SimpleTextView;
import im.amwhusedvt.ui.actionbar.Theme;
import im.amwhusedvt.ui.components.AlertsCreator;
import im.amwhusedvt.ui.components.AnchorSpan;
import im.amwhusedvt.ui.components.AnimatedFileDrawable;
import im.amwhusedvt.ui.components.AnimationProperties;
import im.amwhusedvt.ui.components.ClippingImageView;
import im.amwhusedvt.ui.components.ContextProgressView;
import im.amwhusedvt.ui.components.GroupedPhotosListView;
import im.amwhusedvt.ui.components.LayoutHelper;
import im.amwhusedvt.ui.components.LineProgressView;
import im.amwhusedvt.ui.components.LinkPath;
import im.amwhusedvt.ui.components.RecyclerListView;
import im.amwhusedvt.ui.components.Scroller;
import im.amwhusedvt.ui.components.SeekBar;
import im.amwhusedvt.ui.components.ShareAlert;
import im.amwhusedvt.ui.components.StaticLayoutEx;
import im.amwhusedvt.ui.components.TableLayout;
import im.amwhusedvt.ui.components.TextPaintImageReceiverSpan;
import im.amwhusedvt.ui.components.TextPaintMarkSpan;
import im.amwhusedvt.ui.components.TextPaintSpan;
import im.amwhusedvt.ui.components.TextPaintUrlSpan;
import im.amwhusedvt.ui.components.TextPaintWebpageUrlSpan;
import im.amwhusedvt.ui.components.VideoPlayer;
import im.amwhusedvt.ui.components.WebPlayerView;
import im.amwhusedvt.ui.components.toast.ToastUtils;
import im.amwhusedvt.ui.hviews.helper.MryDisplayHelper;
import im.amwhusedvt.ui.hviews.swipelist.SlidingItemMenuRecyclerView;
import java.io.File;
import java.lang.reflect.Array;
import java.net.URLDecoder;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;

public class ArticleViewer implements NotificationCenter.NotificationCenterDelegate, GestureDetector.OnGestureListener, GestureDetector.OnDoubleTapListener {
    public static final Property<WindowView, Float> ARTICLE_VIEWER_INNER_TRANSLATION_X;
    private static volatile ArticleViewer Instance = null;
    private static final int TEXT_FLAG_ITALIC = 2;
    private static final int TEXT_FLAG_MARKED = 64;
    private static final int TEXT_FLAG_MEDIUM = 1;
    private static final int TEXT_FLAG_MONO = 4;
    private static final int TEXT_FLAG_REGULAR = 0;
    private static final int TEXT_FLAG_STRIKE = 32;
    private static final int TEXT_FLAG_SUB = 128;
    private static final int TEXT_FLAG_SUP = 256;
    private static final int TEXT_FLAG_UNDERLINE = 16;
    private static final int TEXT_FLAG_URL = 8;
    private static final int TEXT_FLAG_WEBPAGE_URL = 512;
    private static TextPaint audioTimePaint = null;
    private static SparseArray<TextPaint> authorTextPaints = null;
    private static TextPaint channelNamePaint = null;
    private static Paint colorPaint = null;
    private static DecelerateInterpolator decelerateInterpolator = null;
    private static SparseArray<TextPaint> detailsTextPaints = null;
    private static Paint dividerPaint = null;
    private static Paint dotsPaint = null;
    private static TextPaint embedPostAuthorPaint = null;
    private static SparseArray<TextPaint> embedPostCaptionTextPaints = null;
    private static TextPaint embedPostDatePaint = null;
    private static SparseArray<TextPaint> embedPostTextPaints = null;
    private static TextPaint errorTextPaint = null;
    private static SparseArray<TextPaint> footerTextPaints = null;
    private static final int gallery_menu_openin = 3;
    private static final int gallery_menu_save = 1;
    private static final int gallery_menu_share = 2;
    private static SparseArray<TextPaint> headerTextPaints;
    private static SparseArray<TextPaint> kickerTextPaints;
    private static TextPaint listTextNumPaint;
    private static SparseArray<TextPaint> listTextPaints;
    private static TextPaint listTextPointerPaint;
    private static SparseArray<TextPaint> mediaCaptionTextPaints;
    private static SparseArray<TextPaint> mediaCreditTextPaints;
    private static SparseArray<TextPaint> paragraphTextPaints;
    private static Paint photoBackgroundPaint;
    private static SparseArray<TextPaint> photoCaptionTextPaints;
    private static SparseArray<TextPaint> photoCreditTextPaints;
    private static Paint preformattedBackgroundPaint;
    private static SparseArray<TextPaint> preformattedTextPaints;
    private static Drawable[] progressDrawables;
    private static Paint progressPaint;
    private static Paint quoteLinePaint;
    private static SparseArray<TextPaint> quoteTextPaints;
    private static TextPaint relatedArticleHeaderPaint;
    private static TextPaint relatedArticleTextPaint;
    private static SparseArray<TextPaint> relatedArticleTextPaints;
    private static Paint selectorPaint;
    private static SparseArray<TextPaint> subheaderTextPaints;
    private static SparseArray<TextPaint> subtitleTextPaints;
    private static Paint tableHalfLinePaint;
    private static Paint tableHeaderPaint;
    private static Paint tableLinePaint;
    private static Paint tableStripPaint;
    private static SparseArray<TextPaint> tableTextPaints;
    private static SparseArray<TextPaint> titleTextPaints;
    private static Paint urlPaint;
    private static Paint webpageMarkPaint;
    private static Paint webpageUrlPaint;
    private ActionBar actionBar;
    private WebpageAdapter[] adapter;
    private int anchorsOffsetMeasuredWidth;
    private float animateToScale;
    private float animateToX;
    private float animateToY;
    private ClippingImageView animatingImageView;
    private Runnable animationEndRunnable;
    private int animationInProgress;
    private long animationStartTime;
    private float animationValue;
    private float[][] animationValues;
    private AspectRatioFrameLayout aspectRatioFrameLayout;
    private boolean attachedToWindow;
    private ImageView backButton;
    private BackDrawable backDrawable;
    private Paint backgroundPaint;
    private Paint blackPaint;
    private FrameLayout bottomLayout;
    private boolean canDragDown;
    private boolean canZoom;
    private TextView captionTextView;
    private TextView captionTextViewNext;
    private ImageReceiver centerImage;
    private boolean changingPage;
    private TLRPC.TL_pageBlockChannel channelBlock;
    private boolean checkingForLongPress;
    private boolean collapsed;
    private ColorCell[] colorCells;
    private FrameLayout containerView;
    private int[] coords;
    private Drawable copyBackgroundDrawable;
    private ArrayList<BlockEmbedCell> createdWebViews;
    private int currentAccount;
    private AnimatorSet currentActionBarAnimation;
    private AnimatedFileDrawable currentAnimation;
    private String[] currentFileNames;
    private int currentHeaderHeight;
    private int currentIndex;
    private TLRPC.PageBlock currentMedia;
    private TLRPC.WebPage currentPage;
    private PlaceProviderObject currentPlaceObject;
    private WebPlayerView currentPlayingVideo;
    private int currentRotation;
    private ImageReceiver.BitmapHolder currentThumb;
    private View customView;
    private WebChromeClient.CustomViewCallback customViewCallback;
    private TextView deleteView;
    private boolean disableShowCheck;
    private boolean discardTap;
    private boolean dontResetZoomOnFirstLayout;
    private boolean doubleTap;
    private float dragY;
    private boolean draggingDown;
    private boolean drawBlockSelection;
    private FontCell[] fontCells;
    private final int fontSizeCount;
    private AspectRatioFrameLayout fullscreenAspectRatioView;
    private TextureView fullscreenTextureView;
    private FrameLayout fullscreenVideoContainer;
    private WebPlayerView fullscreenedVideo;
    private GestureDetector gestureDetector;
    private GroupedPhotosListView groupedPhotosListView;
    boolean hasCutout;
    private Paint headerPaint;
    private Paint headerProgressPaint;
    private FrameLayout headerView;
    private PlaceProviderObject hideAfterAnimation;
    private AnimatorSet imageMoveAnimation;
    private ArrayList<TLRPC.PageBlock> imagesArr;
    private DecelerateInterpolator interpolator;
    private boolean invalidCoords;
    private boolean isActionBarVisible;
    private boolean isPhotoVisible;
    private boolean isPlaying;
    private boolean isRtl;
    private boolean isVisible;
    private int lastBlockNum;
    private Object lastInsets;
    private int lastReqId;
    private Drawable layerShadowDrawable;
    private LinearLayoutManager[] layoutManager;
    private ImageReceiver leftImage;
    private Runnable lineProgressTickRunnable;
    private LineProgressView lineProgressView;
    private BottomSheet linkSheet;
    private RecyclerListView[] listView;
    private TLRPC.Chat loadedChannel;
    private boolean loadingChannel;
    private float maxX;
    private float maxY;
    private ActionBarMenuItem menuItem;
    private float minX;
    private float minY;
    private float moveStartX;
    private float moveStartY;
    private boolean moving;
    private boolean nightModeEnabled;
    private FrameLayout nightModeHintView;
    private ImageView nightModeImageView;
    private int openUrlReqId;
    private AnimatorSet pageSwitchAnimation;
    private ArrayList<TLRPC.WebPage> pagesStack;
    private Activity parentActivity;
    private BaseFragment parentFragment;
    private CheckForLongPress pendingCheckForLongPress;
    private CheckForTap pendingCheckForTap;
    private Runnable photoAnimationEndRunnable;
    private int photoAnimationInProgress;
    private PhotoBackgroundDrawable photoBackgroundDrawable;
    private View photoContainerBackground;
    private FrameLayoutDrawer photoContainerView;
    private long photoTransitionAnimationStartTime;
    private float pinchCenterX;
    private float pinchCenterY;
    private float pinchStartDistance;
    private float pinchStartScale;
    private float pinchStartX;
    private float pinchStartY;
    private ActionBarPopupWindow.ActionBarPopupWindowLayout popupLayout;
    private Rect popupRect;
    private ActionBarPopupWindow popupWindow;
    private int pressCount;
    private int pressedLayoutY;
    private TextPaintUrlSpan pressedLink;
    private DrawingText pressedLinkOwnerLayout;
    private View pressedLinkOwnerView;
    private int previewsReqId;
    private ContextProgressView progressView;
    private AnimatorSet progressViewAnimation;
    private RadialProgressView[] radialProgressViews;
    private ImageReceiver rightImage;
    private float scale;
    private Paint scrimPaint;
    private Scroller scroller;
    private int selectedColor;
    private int selectedFont;
    private int selectedFontSize;
    private ActionBarMenuItem settingsButton;
    private ImageView shareButton;
    private FrameLayout shareContainer;
    private PlaceProviderObject showAfterAnimation;
    private Drawable slideDotBigDrawable;
    private Drawable slideDotDrawable;
    private Paint statusBarPaint;
    private int switchImageAfterAnimation;
    private boolean textureUploaded;
    private SimpleTextView titleTextView;
    private long transitionAnimationStartTime;
    private float translationX;
    private float translationY;
    private Runnable updateProgressRunnable;
    private LinkPath urlPath;
    private VelocityTracker velocityTracker;
    private float videoCrossfadeAlpha;
    private long videoCrossfadeAlphaLastTime;
    private boolean videoCrossfadeStarted;
    private ImageView videoPlayButton;
    private VideoPlayer videoPlayer;
    private FrameLayout videoPlayerControlFrameLayout;
    private SeekBar videoPlayerSeekbar;
    private TextView videoPlayerTime;
    private TextureView videoTextureView;
    private Dialog visibleDialog;
    private boolean wasLayout;
    private WindowManager.LayoutParams windowLayoutParams;
    private WindowView windowView;
    private boolean zoomAnimation;
    private boolean zooming;

    static void access$000(char c, float f, boolean z, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$000(float f, boolean z, int i, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$000(boolean z, int i, float f, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$100(int i, boolean z, float f, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$100(String str, int i, boolean z, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$100(String str, boolean z, int i, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$1000(ArticleViewer articleViewer, char c, boolean z, String str, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$1000(ArticleViewer articleViewer, String str, char c, boolean z, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$1000(ArticleViewer articleViewer, boolean z, int i, String str, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$10000(ArticleViewer articleViewer, char c, float f, boolean z, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$10000(ArticleViewer articleViewer, char c, boolean z, int i, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$10000(ArticleViewer articleViewer, float f, char c, int i, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$1002(ArticleViewer articleViewer, CheckForLongPress checkForLongPress, char c, byte b, String str, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$1002(ArticleViewer articleViewer, CheckForLongPress checkForLongPress, int i, byte b, String str, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$1002(ArticleViewer articleViewer, CheckForLongPress checkForLongPress, String str, char c, byte b, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$10100(ArticleViewer articleViewer, float f, boolean z, String str, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$10100(ArticleViewer articleViewer, short s, String str, boolean z, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$10100(ArticleViewer articleViewer, short s, boolean z, float f, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$10102(ArticleViewer articleViewer, Runnable runnable, byte b, String str, int i, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$10102(ArticleViewer articleViewer, Runnable runnable, String str, boolean z, byte b, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$10102(ArticleViewer articleViewer, Runnable runnable, boolean z, int i, byte b, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$10200(ArticleViewer articleViewer, float f, String str, boolean z, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$10200(ArticleViewer articleViewer, String str, float f, byte b, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$10200(ArticleViewer articleViewer, boolean z, String str, byte b, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$10202(ArticleViewer articleViewer, AnimatorSet animatorSet, byte b, String str, short s, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$10202(ArticleViewer articleViewer, AnimatorSet animatorSet, float f, byte b, String str, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$10202(ArticleViewer articleViewer, AnimatorSet animatorSet, short s, byte b, float f, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$10300(ArticleViewer articleViewer, float f, String str, int i, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$10300(ArticleViewer articleViewer, String str, int i, boolean z, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$10300(ArticleViewer articleViewer, boolean z, int i, float f, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$10400(ArticleViewer articleViewer, int i, String str, short s, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$10400(ArticleViewer articleViewer, String str, boolean z, short s, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$10400(ArticleViewer articleViewer, boolean z, short s, String str, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$10700(ArticleViewer articleViewer, TLRPC.PageBlock pageBlock, byte b, int i, String str, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$10700(ArticleViewer articleViewer, TLRPC.PageBlock pageBlock, String str, int i, boolean z, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$10700(ArticleViewer articleViewer, TLRPC.PageBlock pageBlock, boolean z, int i, String str, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$10800(ArticleViewer articleViewer, long j, byte b, char c, String str, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$10800(ArticleViewer articleViewer, long j, byte b, boolean z, String str, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$10800(ArticleViewer articleViewer, long j, char c, boolean z, byte b, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$1104(ArticleViewer articleViewer, short s, float f, char c, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$1104(ArticleViewer articleViewer, boolean z, float f, char c, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$1104(ArticleViewer articleViewer, boolean z, float f, short s, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$11500(ArticleViewer articleViewer, TLRPC.PageBlock pageBlock, TLRPC.PageBlock pageBlock2, char c, int i, float f, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$11500(ArticleViewer articleViewer, TLRPC.PageBlock pageBlock, TLRPC.PageBlock pageBlock2, float f, short s, char c, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$11500(ArticleViewer articleViewer, TLRPC.PageBlock pageBlock, TLRPC.PageBlock pageBlock2, int i, char c, float f, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$11900(ArticleViewer articleViewer, short s, char c, boolean z, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$11900(ArticleViewer articleViewer, boolean z, byte b, short s, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$11900(ArticleViewer articleViewer, boolean z, short s, byte b, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$1200(ArticleViewer articleViewer, byte b, char c, String str, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$1200(ArticleViewer articleViewer, char c, byte b, String str, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$1200(ArticleViewer articleViewer, String str, byte b, char c, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$12200(ArticleViewer articleViewer, TLRPC.PageBlock pageBlock, TLRPC.PageBlock pageBlock2, char c, int i, byte b, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$12200(ArticleViewer articleViewer, TLRPC.PageBlock pageBlock, TLRPC.PageBlock pageBlock2, char c, String str, byte b, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$12200(ArticleViewer articleViewer, TLRPC.PageBlock pageBlock, TLRPC.PageBlock pageBlock2, String str, int i, char c, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$12900(ArticleViewer articleViewer, long j, float f, byte b, boolean z, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$12900(ArticleViewer articleViewer, long j, float f, char c, byte b, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$12900(ArticleViewer articleViewer, long j, float f, boolean z, byte b, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$1300(ArticleViewer articleViewer, float f, String str, char c, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$1300(ArticleViewer articleViewer, String str, char c, boolean z, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$1300(ArticleViewer articleViewer, String str, float f, boolean z, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$13000(ArticleViewer articleViewer, TLRPC.PageBlock pageBlock, int i, String str, float f, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$13000(ArticleViewer articleViewer, TLRPC.PageBlock pageBlock, String str, byte b, float f, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$13000(ArticleViewer articleViewer, TLRPC.PageBlock pageBlock, String str, int i, byte b, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$13100(ArticleViewer articleViewer, int i, byte b, short s, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$13100(ArticleViewer articleViewer, int i, boolean z, byte b, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$13100(ArticleViewer articleViewer, int i, boolean z, short s, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$13108(ArticleViewer articleViewer, String str, int i, boolean z, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$13108(ArticleViewer articleViewer, boolean z, byte b, int i, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$13108(ArticleViewer articleViewer, boolean z, String str, int i, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$13200(ArticleViewer articleViewer, float f, boolean z, int i, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$13200(ArticleViewer articleViewer, int i, boolean z, float f, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$13200(ArticleViewer articleViewer, int i, boolean z, String str, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$13300(ArticleViewer articleViewer, char c, short s, float f, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$13300(ArticleViewer articleViewer, String str, char c, float f, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$13300(ArticleViewer articleViewer, String str, short s, char c, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$13400(ArticleViewer articleViewer, byte b, boolean z, String str, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$13400(ArticleViewer articleViewer, byte b, boolean z, short s, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$13400(ArticleViewer articleViewer, short s, byte b, String str, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$13500(ArticleViewer articleViewer, float f, short s, String str, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$13500(ArticleViewer articleViewer, String str, short s, float f, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$13500(ArticleViewer articleViewer, String str, boolean z, short s, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$13600(ArticleViewer articleViewer, View view, CharSequence charSequence, TLRPC.RichText richText, int i, TLRPC.PageBlock pageBlock, WebpageAdapter webpageAdapter, int i2, short s, String str, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$13600(ArticleViewer articleViewer, View view, CharSequence charSequence, TLRPC.RichText richText, int i, TLRPC.PageBlock pageBlock, WebpageAdapter webpageAdapter, String str, boolean z, short s, int i2) {
        double d = (42 * 210) + 210;
    }

    static void access$13600(ArticleViewer articleViewer, View view, CharSequence charSequence, TLRPC.RichText richText, int i, TLRPC.PageBlock pageBlock, WebpageAdapter webpageAdapter, short s, String str, boolean z, int i2) {
        double d = (42 * 210) + 210;
    }

    static void access$13700(ArticleViewer articleViewer, View view, CharSequence charSequence, TLRPC.RichText richText, int i, TLRPC.PageBlock pageBlock, Layout.Alignment alignment, WebpageAdapter webpageAdapter, byte b, int i2, String str, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$13700(ArticleViewer articleViewer, View view, CharSequence charSequence, TLRPC.RichText richText, int i, TLRPC.PageBlock pageBlock, Layout.Alignment alignment, WebpageAdapter webpageAdapter, float f, String str, byte b, int i2) {
        double d = (42 * 210) + 210;
    }

    static void access$13700(ArticleViewer articleViewer, View view, CharSequence charSequence, TLRPC.RichText richText, int i, TLRPC.PageBlock pageBlock, Layout.Alignment alignment, WebpageAdapter webpageAdapter, int i2, String str, byte b, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$13800(char c, boolean z, short s, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$13800(short s, char c, boolean z, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$13800(boolean z, int i, char c, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$13900(float f, short s, char c, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$13900(float f, short s, boolean z, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$13900(short s, float f, boolean z, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$1400(ArticleViewer articleViewer, float f, boolean z, String str, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$1400(ArticleViewer articleViewer, String str, int i, float f, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$1400(ArticleViewer articleViewer, boolean z, int i, float f, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$14100(ArticleViewer articleViewer, char c, float f, boolean z, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$14100(ArticleViewer articleViewer, short s, char c, boolean z, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$14100(ArticleViewer articleViewer, boolean z, char c, short s, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$14200(byte b, String str, char c, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$14200(String str, byte b, short s, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$14200(short s, char c, String str, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$14400(ArticleViewer articleViewer, View view, CharSequence charSequence, TLRPC.RichText richText, int i, int i2, TLRPC.PageBlock pageBlock, Layout.Alignment alignment, int i3, WebpageAdapter webpageAdapter, byte b, float f, boolean z, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$14400(ArticleViewer articleViewer, View view, CharSequence charSequence, TLRPC.RichText richText, int i, int i2, TLRPC.PageBlock pageBlock, Layout.Alignment alignment, int i3, WebpageAdapter webpageAdapter, float f, short s, boolean z, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$14400(ArticleViewer articleViewer, View view, CharSequence charSequence, TLRPC.RichText richText, int i, int i2, TLRPC.PageBlock pageBlock, Layout.Alignment alignment, int i3, WebpageAdapter webpageAdapter, boolean z, short s, float f, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$1500(ArticleViewer articleViewer, char c, byte b, short s, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$1500(ArticleViewer articleViewer, int i, byte b, char c, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$1500(ArticleViewer articleViewer, int i, short s, byte b, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$15000(ArticleViewer articleViewer, byte b, short s, String str, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$15000(ArticleViewer articleViewer, float f, byte b, short s, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$15000(ArticleViewer articleViewer, short s, float f, String str, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$15100(ArticleViewer articleViewer, byte b, int i, short s, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$15100(ArticleViewer articleViewer, int i, byte b, short s, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$15100(ArticleViewer articleViewer, short s, char c, byte b, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$15202(ArticleViewer articleViewer, WebPlayerView webPlayerView, char c, short s, float f, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$15202(ArticleViewer articleViewer, WebPlayerView webPlayerView, char c, short s, boolean z, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$15202(ArticleViewer articleViewer, WebPlayerView webPlayerView, short s, boolean z, float f, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$15300(ArticleViewer articleViewer, char c, byte b, boolean z, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$15300(ArticleViewer articleViewer, short s, byte b, boolean z, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$15300(ArticleViewer articleViewer, short s, boolean z, char c, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$15302(ArticleViewer articleViewer, WebPlayerView webPlayerView, char c, int i, String str, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$15302(ArticleViewer articleViewer, WebPlayerView webPlayerView, char c, int i, boolean z, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$15302(ArticleViewer articleViewer, WebPlayerView webPlayerView, int i, boolean z, String str, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$15400(ArticleViewer articleViewer, char c, float f, boolean z, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$15400(ArticleViewer articleViewer, float f, boolean z, char c, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$15400(ArticleViewer articleViewer, boolean z, char c, int i, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$15600(ArticleViewer articleViewer, int i, short s, boolean z, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$15600(ArticleViewer articleViewer, int i, boolean z, short s, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$15600(ArticleViewer articleViewer, boolean z, int i, short s, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$15602(ArticleViewer articleViewer, View view, byte b, String str, int i, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$15602(ArticleViewer articleViewer, View view, byte b, boolean z, String str, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$15602(ArticleViewer articleViewer, View view, int i, byte b, boolean z, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$15700(ArticleViewer articleViewer, byte b, char c, String str, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$15700(ArticleViewer articleViewer, byte b, int i, char c, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$15700(ArticleViewer articleViewer, char c, String str, int i, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$15702(ArticleViewer articleViewer, WebChromeClient.CustomViewCallback customViewCallback, int i, short s, boolean z, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$15702(ArticleViewer articleViewer, WebChromeClient.CustomViewCallback customViewCallback, short s, boolean z, int i, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$15702(ArticleViewer articleViewer, WebChromeClient.CustomViewCallback customViewCallback, boolean z, String str, int i, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$15900(ArticleViewer articleViewer, byte b, char c, boolean z, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$15900(ArticleViewer articleViewer, byte b, short s, boolean z, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$15900(ArticleViewer articleViewer, short s, boolean z, char c, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$1600(ArticleViewer articleViewer, char c, float f, int i, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$1600(ArticleViewer articleViewer, char c, int i, float f, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$1600(ArticleViewer articleViewer, int i, byte b, float f, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$16000(byte b, char c, boolean z, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$16000(char c, String str, byte b, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$16000(String str, byte b, char c, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$16100(float f, int i, String str, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$16100(String str, float f, int i, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$16100(String str, int i, byte b, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$16200(int i, float f, String str, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$16200(String str, float f, short s, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$16200(short s, float f, String str, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$16300(byte b, boolean z, String str, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$16300(String str, int i, byte b, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$16300(String str, boolean z, int i, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$1700(ArticleViewer articleViewer, byte b, float f, short s, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$1700(ArticleViewer articleViewer, short s, float f, boolean z, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$1700(ArticleViewer articleViewer, short s, boolean z, byte b, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$17200(float f, byte b, char c, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$17200(float f, byte b, int i, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$17200(float f, int i, char c, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$17202(Paint paint, byte b, float f, char c, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$17202(Paint paint, char c, short s, float f, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$17202(Paint paint, float f, short s, char c, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$1800(ArticleViewer articleViewer, char c, byte b, float f, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$1800(ArticleViewer articleViewer, char c, byte b, String str, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$1800(ArticleViewer articleViewer, float f, String str, char c, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$18200(ArticleViewer articleViewer, int i, char c, String str, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$18200(ArticleViewer articleViewer, String str, char c, int i, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$18200(ArticleViewer articleViewer, String str, int i, char c, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$18300(ArticleViewer articleViewer, char c, String str, float f, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$18300(ArticleViewer articleViewer, float f, String str, boolean z, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$18300(ArticleViewer articleViewer, float f, boolean z, String str, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$18800(byte b, short s, int i, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$18800(int i, byte b, short s, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$18800(int i, short s, char c, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$18900(ArticleViewer articleViewer, TLRPC.PageBlock pageBlock, byte b, String str, char c, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$18900(ArticleViewer articleViewer, TLRPC.PageBlock pageBlock, char c, short s, String str, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$18900(ArticleViewer articleViewer, TLRPC.PageBlock pageBlock, short s, char c, String str, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$1900(ArticleViewer articleViewer, byte b, int i, char c, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$1900(ArticleViewer articleViewer, char c, boolean z, byte b, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$1900(ArticleViewer articleViewer, int i, char c, byte b, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$1902(ArticleViewer articleViewer, int i, int i2, String str, boolean z, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$1902(ArticleViewer articleViewer, int i, String str, char c, int i2, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$1902(ArticleViewer articleViewer, int i, String str, boolean z, char c, int i2) {
        double d = (42 * 210) + 210;
    }

    static void access$19700(ArticleViewer articleViewer, BlockChannelCell blockChannelCell, WebpageAdapter webpageAdapter, TLRPC.Chat chat, byte b, String str, boolean z, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$19700(ArticleViewer articleViewer, BlockChannelCell blockChannelCell, WebpageAdapter webpageAdapter, TLRPC.Chat chat, byte b, short s, String str, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$19700(ArticleViewer articleViewer, BlockChannelCell blockChannelCell, WebpageAdapter webpageAdapter, TLRPC.Chat chat, short s, boolean z, byte b, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$19800(ArticleViewer articleViewer, byte b, String str, char c, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$19800(ArticleViewer articleViewer, char c, boolean z, byte b, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$19800(ArticleViewer articleViewer, boolean z, String str, char c, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$19802(ArticleViewer articleViewer, TLRPC.Chat chat, char c, String str, float f, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$19802(ArticleViewer articleViewer, TLRPC.Chat chat, String str, char c, short s, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$19802(ArticleViewer articleViewer, TLRPC.Chat chat, String str, short s, char c, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$19900(ArticleViewer articleViewer, BlockChannelCell blockChannelCell, TLRPC.Chat chat, char c, float f, byte b, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$19900(ArticleViewer articleViewer, BlockChannelCell blockChannelCell, TLRPC.Chat chat, float f, byte b, int i, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$19900(ArticleViewer articleViewer, BlockChannelCell blockChannelCell, TLRPC.Chat chat, int i, char c, byte b, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$200(ArticleViewer articleViewer, Canvas canvas, DrawingText drawingText, char c, float f, short s, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$200(ArticleViewer articleViewer, Canvas canvas, DrawingText drawingText, float f, char c, boolean z, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$200(ArticleViewer articleViewer, Canvas canvas, DrawingText drawingText, boolean z, float f, char c, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$2000(ArticleViewer articleViewer, char c, short s, String str, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$2000(ArticleViewer articleViewer, String str, char c, short s, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$2000(ArticleViewer articleViewer, short s, float f, String str, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$20000(ArticleViewer articleViewer, View view, TLRPC.RichText richText, TLRPC.RichText richText2, TLRPC.PageBlock pageBlock, int i, char c, String str, short s, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$20000(ArticleViewer articleViewer, View view, TLRPC.RichText richText, TLRPC.RichText richText2, TLRPC.PageBlock pageBlock, int i, short s, String str, char c, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$20000(ArticleViewer articleViewer, View view, TLRPC.RichText richText, TLRPC.RichText richText2, TLRPC.PageBlock pageBlock, int i, short s, boolean z, char c, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$20500(float f, String str, boolean z, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$20500(String str, float f, boolean z, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$20500(boolean z, short s, float f, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$20600(ArticleViewer articleViewer, byte b, char c, short s, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$20600(ArticleViewer articleViewer, char c, byte b, short s, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$20600(ArticleViewer articleViewer, char c, int i, short s, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$20700(ArticleViewer articleViewer, float f, int i, byte b, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$20700(ArticleViewer articleViewer, float f, boolean z, byte b, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$20700(ArticleViewer articleViewer, boolean z, float f, byte b, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$20800(ArticleViewer articleViewer, byte b, float f, boolean z, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$20800(ArticleViewer articleViewer, byte b, int i, float f, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$20800(ArticleViewer articleViewer, boolean z, int i, byte b, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$20802(ArticleViewer articleViewer, boolean z, short s, byte b, boolean z2, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$20802(ArticleViewer articleViewer, boolean z, short s, char c, byte b, boolean z2) {
        double d = (42 * 210) + 210;
    }

    static void access$20802(ArticleViewer articleViewer, boolean z, short s, boolean z2, char c, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$20900(ArticleViewer articleViewer, byte b, float f, String str, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$20900(ArticleViewer articleViewer, float f, String str, byte b, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$20900(ArticleViewer articleViewer, String str, float f, byte b, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$2100(ArticleViewer articleViewer, char c, String str, boolean z, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$2100(ArticleViewer articleViewer, boolean z, int i, char c, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$2100(ArticleViewer articleViewer, boolean z, String str, int i, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$21000(String str, float f, boolean z, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$21000(String str, boolean z, float f, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$21000(boolean z, String str, float f, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$21002(DecelerateInterpolator decelerateInterpolator2, byte b, char c, String str, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$21002(DecelerateInterpolator decelerateInterpolator2, String str, byte b, char c, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$21002(DecelerateInterpolator decelerateInterpolator2, String str, byte b, boolean z, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$21100(float f, String str, char c, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$21100(float f, boolean z, String str, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$21100(boolean z, float f, String str, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$21102(Paint paint, byte b, boolean z, float f, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$21102(Paint paint, boolean z, byte b, char c, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$21102(Paint paint, boolean z, float f, char c, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$21200(ArticleViewer articleViewer, byte b, short s, int i, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$21200(ArticleViewer articleViewer, char c, byte b, int i, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$21200(ArticleViewer articleViewer, short s, int i, byte b, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$21300(ArticleViewer articleViewer, char c, byte b, float f, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$21300(ArticleViewer articleViewer, float f, byte b, int i, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$21300(ArticleViewer articleViewer, float f, char c, byte b, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$21400(float f, char c, int i, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$21400(float f, int i, char c, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$21400(short s, float f, int i, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$21500(ArticleViewer articleViewer, char c, byte b, String str, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$21500(ArticleViewer articleViewer, char c, byte b, short s, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$21500(ArticleViewer articleViewer, short s, byte b, char c, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$21600(ArticleViewer articleViewer, short s, boolean z, byte b, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$21600(ArticleViewer articleViewer, boolean z, byte b, String str, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$21600(ArticleViewer articleViewer, boolean z, byte b, short s, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$21602(ArticleViewer articleViewer, boolean z, float f, int i, short s, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$21602(ArticleViewer articleViewer, boolean z, short s, char c, float f, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$21602(ArticleViewer articleViewer, boolean z, short s, float f, char c, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$21700(ArticleViewer articleViewer, char c, boolean z, String str, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$21700(ArticleViewer articleViewer, String str, short s, char c, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$21700(ArticleViewer articleViewer, short s, char c, boolean z, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$21702(ArticleViewer articleViewer, AnimatorSet animatorSet, int i, char c, byte b, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$21702(ArticleViewer articleViewer, AnimatorSet animatorSet, boolean z, char c, byte b, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$21702(ArticleViewer articleViewer, AnimatorSet animatorSet, boolean z, char c, int i, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$21800(ArticleViewer articleViewer, float f, String str, short s, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$21800(ArticleViewer articleViewer, String str, byte b, short s, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$21800(ArticleViewer articleViewer, String str, float f, short s, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$21900(ArticleViewer articleViewer, String str, String str2, float f, short s, char c, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$21900(ArticleViewer articleViewer, String str, String str2, int i, short s, char c, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$21900(ArticleViewer articleViewer, String str, String str2, short s, float f, char c, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$22200(ArticleViewer articleViewer, float f, char c, boolean z, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$22200(ArticleViewer articleViewer, boolean z, int i, char c, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$22200(ArticleViewer articleViewer, boolean z, int i, float f, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$22202(ArticleViewer articleViewer, Runnable runnable, byte b, String str, char c, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$22202(ArticleViewer articleViewer, Runnable runnable, byte b, short s, String str, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$22202(ArticleViewer articleViewer, Runnable runnable, String str, char c, byte b, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$22402(ArticleViewer articleViewer, AnimatorSet animatorSet, char c, byte b, short s, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$22402(ArticleViewer articleViewer, AnimatorSet animatorSet, char c, int i, short s, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$22402(ArticleViewer articleViewer, AnimatorSet animatorSet, int i, byte b, char c, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$2302(ArticleViewer articleViewer, boolean z, char c, int i, byte b, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$2302(ArticleViewer articleViewer, boolean z, int i, short s, char c, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$2302(ArticleViewer articleViewer, boolean z, short s, byte b, int i, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$2400(ArticleViewer articleViewer, float f, char c, short s, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$2400(ArticleViewer articleViewer, int i, short s, float f, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$2400(ArticleViewer articleViewer, short s, float f, char c, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$2500(ArticleViewer articleViewer, char c, short s, byte b, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$2500(ArticleViewer articleViewer, char c, short s, boolean z, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$2500(ArticleViewer articleViewer, short s, char c, boolean z, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$2600(ArticleViewer articleViewer, int i, byte b, String str, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$2600(ArticleViewer articleViewer, String str, int i, byte b, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$2600(ArticleViewer articleViewer, String str, boolean z, int i, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$2700(ArticleViewer articleViewer, byte b, char c, String str, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$2700(ArticleViewer articleViewer, char c, byte b, float f, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$2700(ArticleViewer articleViewer, String str, char c, float f, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$2800(ArticleViewer articleViewer, float f, byte b, short s, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$2800(ArticleViewer articleViewer, float f, int i, byte b, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$2800(ArticleViewer articleViewer, int i, short s, byte b, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$2900(ArticleViewer articleViewer, float f, char c, String str, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$2900(ArticleViewer articleViewer, String str, float f, short s, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$2900(ArticleViewer articleViewer, short s, float f, String str, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$300(ArticleViewer articleViewer, float f, String str, boolean z, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$300(ArticleViewer articleViewer, float f, boolean z, int i, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$300(ArticleViewer articleViewer, String str, float f, int i, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$3000(ArticleViewer articleViewer, char c, int i, boolean z, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$3000(ArticleViewer articleViewer, String str, char c, int i, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$3000(ArticleViewer articleViewer, boolean z, int i, char c, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$302(ArticleViewer articleViewer, int i, byte b, String str, int i2, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$302(ArticleViewer articleViewer, int i, int i2, byte b, float f, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$302(ArticleViewer articleViewer, int i, int i2, String str, float f, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$3100(ArticleViewer articleViewer, char c, boolean z, String str, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$3100(ArticleViewer articleViewer, float f, String str, boolean z, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$3100(ArticleViewer articleViewer, boolean z, float f, char c, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$3200(ArticleViewer articleViewer, byte b, String str, float f, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$3200(ArticleViewer articleViewer, String str, float f, byte b, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$3200(ArticleViewer articleViewer, boolean z, float f, byte b, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$3300(ArticleViewer articleViewer, byte b, int i, boolean z, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$3300(ArticleViewer articleViewer, char c, boolean z, byte b, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$3300(ArticleViewer articleViewer, boolean z, char c, int i, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$3302(ArticleViewer articleViewer, DrawingText drawingText, int i, short s, byte b, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$3302(ArticleViewer articleViewer, DrawingText drawingText, boolean z, short s, byte b, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$3302(ArticleViewer articleViewer, DrawingText drawingText, boolean z, short s, int i, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$3400(ArticleViewer articleViewer, char c, byte b, String str, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$3400(ArticleViewer articleViewer, boolean z, char c, byte b, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$3400(ArticleViewer articleViewer, boolean z, char c, String str, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$3402(ArticleViewer articleViewer, View view, char c, String str, int i, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$3402(ArticleViewer articleViewer, View view, char c, String str, boolean z, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$3402(ArticleViewer articleViewer, View view, String str, int i, boolean z, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$3600(ArticleViewer articleViewer, float f, short s, int i, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$3600(ArticleViewer articleViewer, int i, byte b, short s, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$3600(ArticleViewer articleViewer, short s, byte b, float f, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$3700(ArticleViewer articleViewer, float f, boolean z, byte b, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$3700(ArticleViewer articleViewer, int i, byte b, boolean z, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$3700(ArticleViewer articleViewer, int i, float f, byte b, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$3702(ArticleViewer articleViewer, TLRPC.WebPage webPage, char c, boolean z, byte b, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$3702(ArticleViewer articleViewer, TLRPC.WebPage webPage, int i, boolean z, byte b, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$3702(ArticleViewer articleViewer, TLRPC.WebPage webPage, boolean z, byte b, int i, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$3800(ArticleViewer articleViewer, byte b, int i, boolean z, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$3800(ArticleViewer articleViewer, float f, int i, byte b, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$3800(ArticleViewer articleViewer, float f, boolean z, int i, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$3900(ArticleViewer articleViewer, float f, char c, byte b, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$3900(ArticleViewer articleViewer, String str, char c, float f, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$3900(ArticleViewer articleViewer, String str, float f, char c, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$400(ArticleViewer articleViewer, char c, int i, String str, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$400(ArticleViewer articleViewer, char c, boolean z, String str, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$400(ArticleViewer articleViewer, String str, int i, char c, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$4000(ArticleViewer articleViewer, float f, int i, byte b, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$4000(ArticleViewer articleViewer, String str, float f, int i, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$4000(ArticleViewer articleViewer, String str, int i, byte b, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$4300(ArticleViewer articleViewer, char c, boolean z, int i, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$4300(ArticleViewer articleViewer, float f, char c, int i, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$4300(ArticleViewer articleViewer, int i, boolean z, char c, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$4400(ArticleViewer articleViewer, char c, String str, float f, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$4400(ArticleViewer articleViewer, char c, boolean z, String str, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$4400(ArticleViewer articleViewer, float f, String str, char c, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$4500(ArticleViewer articleViewer, String str, boolean z, short s, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$4500(ArticleViewer articleViewer, short s, boolean z, float f, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$4500(ArticleViewer articleViewer, short s, boolean z, String str, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$4502(ArticleViewer articleViewer, boolean z, short s, float f, boolean z2, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$4502(ArticleViewer articleViewer, boolean z, short s, String str, float f, boolean z2) {
        double d = (42 * 210) + 210;
    }

    static void access$4502(ArticleViewer articleViewer, boolean z, boolean z2, short s, float f, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$4600(ArticleViewer articleViewer, int i, short s, byte b, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$4600(ArticleViewer articleViewer, int i, short s, boolean z, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$4600(ArticleViewer articleViewer, boolean z, int i, byte b, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$4602(ArticleViewer articleViewer, TextPaintUrlSpan textPaintUrlSpan, int i, boolean z, byte b, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$4602(ArticleViewer articleViewer, TextPaintUrlSpan textPaintUrlSpan, boolean z, byte b, char c, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$4602(ArticleViewer articleViewer, TextPaintUrlSpan textPaintUrlSpan, boolean z, char c, int i, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$4700(ArticleViewer articleViewer, String str, byte b, char c, short s, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$4700(ArticleViewer articleViewer, String str, int i, char c, byte b, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$4700(ArticleViewer articleViewer, String str, int i, char c, short s, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$4800(ArticleViewer articleViewer, String str, short s, int i, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$4800(ArticleViewer articleViewer, short s, boolean z, int i, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$4800(ArticleViewer articleViewer, boolean z, String str, int i, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$4902(ArticleViewer articleViewer, boolean z, byte b, int i, boolean z2, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$4902(ArticleViewer articleViewer, boolean z, byte b, boolean z2, int i, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$4902(ArticleViewer articleViewer, boolean z, boolean z2, int i, byte b, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$500(byte b, char c, float f, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$500(byte b, char c, short s, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$500(short s, byte b, char c, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$5000(ArticleViewer articleViewer, View view, int i, int i2, int i3, float f, byte b, char c, int i4) {
        double d = (42 * 210) + 210;
    }

    static void access$5000(ArticleViewer articleViewer, View view, int i, int i2, int i3, int i4, char c, float f, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$5000(ArticleViewer articleViewer, View view, int i, int i2, int i3, int i4, float f, byte b, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$502(Paint paint, byte b, char c, short s, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$502(Paint paint, short s, byte b, char c, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$502(Paint paint, short s, int i, char c, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$600(String str, byte b, int i, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$600(short s, byte b, int i, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$600(short s, byte b, String str, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$602(Paint paint, char c, String str, int i, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$602(Paint paint, int i, String str, byte b, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$602(Paint paint, String str, int i, char c, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$6102(ArticleViewer articleViewer, AnimatorSet animatorSet, int i, String str, short s, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$6102(ArticleViewer articleViewer, AnimatorSet animatorSet, String str, short s, char c, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$6102(ArticleViewer articleViewer, AnimatorSet animatorSet, short s, int i, String str, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$6800(byte b, int i, boolean z, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$6800(int i, String str, byte b, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$6800(boolean z, byte b, int i, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$700(ArticleViewer articleViewer, MotionEvent motionEvent, float f, int i, char c, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$700(ArticleViewer articleViewer, MotionEvent motionEvent, float f, int i, String str, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$700(ArticleViewer articleViewer, MotionEvent motionEvent, int i, char c, String str, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$7600(ArticleViewer articleViewer, char c, short s, String str, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$7600(ArticleViewer articleViewer, short s, char c, String str, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$7600(ArticleViewer articleViewer, short s, float f, char c, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$7700(ArticleViewer articleViewer, int i, short s, float f, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$7700(ArticleViewer articleViewer, int i, short s, boolean z, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$7700(ArticleViewer articleViewer, boolean z, int i, float f, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$7800(ArticleViewer articleViewer, float f, byte b, String str, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$7800(ArticleViewer articleViewer, float f, int i, byte b, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$7800(ArticleViewer articleViewer, String str, int i, float f, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$7900(ArticleViewer articleViewer, int i, String str, char c, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$7900(ArticleViewer articleViewer, String str, boolean z, char c, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$7900(ArticleViewer articleViewer, boolean z, int i, char c, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$800(ArticleViewer articleViewer, Canvas canvas, char c, boolean z, short s, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$800(ArticleViewer articleViewer, Canvas canvas, boolean z, String str, char c, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$800(ArticleViewer articleViewer, Canvas canvas, boolean z, short s, char c, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$8000(ArticleViewer articleViewer, byte b, int i, String str, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$8000(ArticleViewer articleViewer, char c, byte b, int i, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$8000(ArticleViewer articleViewer, String str, byte b, int i, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$8100(ArticleViewer articleViewer, MotionEvent motionEvent, View view, DrawingText drawingText, int i, int i2, byte b, float f, char c, int i3) {
        double d = (42 * 210) + 210;
    }

    static void access$8100(ArticleViewer articleViewer, MotionEvent motionEvent, View view, DrawingText drawingText, int i, int i2, float f, byte b, char c, int i3) {
        double d = (42 * 210) + 210;
    }

    static void access$8100(ArticleViewer articleViewer, MotionEvent motionEvent, View view, DrawingText drawingText, int i, int i2, float f, int i3, char c, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$8300(ArticleViewer articleViewer, int i, int i2, char c, short s, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$8300(ArticleViewer articleViewer, int i, boolean z, char c, int i2, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$8300(ArticleViewer articleViewer, int i, boolean z, int i2, short s, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$8400(ArticleViewer articleViewer, int i, char c, String str, int i2, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$8400(ArticleViewer articleViewer, int i, int i2, char c, short s, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$8400(ArticleViewer articleViewer, int i, int i2, short s, char c, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$8500(ArticleViewer articleViewer, char c, boolean z, float f, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$8500(ArticleViewer articleViewer, int i, char c, float f, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$8500(ArticleViewer articleViewer, boolean z, char c, float f, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$8600(ArticleViewer articleViewer, float f, String str, short s, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$8600(ArticleViewer articleViewer, String str, short s, float f, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$8600(ArticleViewer articleViewer, short s, byte b, float f, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$8700(ArticleViewer articleViewer, byte b, float f, int i, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$8700(ArticleViewer articleViewer, float f, int i, byte b, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$8700(ArticleViewer articleViewer, float f, String str, byte b, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$8702(ArticleViewer articleViewer, int i, int i2, short s, float f, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$8702(ArticleViewer articleViewer, int i, int i2, boolean z, float f, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$8702(ArticleViewer articleViewer, int i, short s, boolean z, int i2, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$8800(ArticleViewer articleViewer, int i, char c, byte b, float f, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$8800(ArticleViewer articleViewer, int i, char c, float f, byte b, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$8800(ArticleViewer articleViewer, int i, float f, char c, boolean z, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$8900(ArticleViewer articleViewer, int i, byte b, short s, int i2, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$8900(ArticleViewer articleViewer, int i, int i2, byte b, float f, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$8900(ArticleViewer articleViewer, int i, int i2, short s, float f, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$900(ArticleViewer articleViewer, char c, boolean z, short s, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$900(ArticleViewer articleViewer, String str, short s, char c, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$900(ArticleViewer articleViewer, boolean z, char c, short s, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$9000(ArticleViewer articleViewer, byte b, short s, boolean z, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$9000(ArticleViewer articleViewer, String str, short s, boolean z, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$9000(ArticleViewer articleViewer, short s, String str, boolean z, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$9100(ArticleViewer articleViewer, int i, int i2, String str, float f, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$9100(ArticleViewer articleViewer, int i, int i2, short s, String str, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$9100(ArticleViewer articleViewer, int i, String str, short s, float f, int i2) {
        double d = (42 * 210) + 210;
    }

    static void access$9200(ArticleViewer articleViewer, byte b, boolean z, String str, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$9200(ArticleViewer articleViewer, String str, boolean z, byte b, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$9200(ArticleViewer articleViewer, short s, byte b, boolean z, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$9300(ArticleViewer articleViewer, byte b, float f, int i, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$9300(ArticleViewer articleViewer, byte b, float f, boolean z, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$9300(ArticleViewer articleViewer, float f, byte b, boolean z, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$9400(ArticleViewer articleViewer, int i, byte b, String str, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$9400(ArticleViewer articleViewer, int i, boolean z, String str, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$9400(ArticleViewer articleViewer, String str, int i, byte b, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$9402(ArticleViewer articleViewer, ImageReceiver.BitmapHolder bitmapHolder, char c, short s, float f, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$9402(ArticleViewer articleViewer, ImageReceiver.BitmapHolder bitmapHolder, short s, char c, float f, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$9402(ArticleViewer articleViewer, ImageReceiver.BitmapHolder bitmapHolder, short s, float f, char c, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$9500(ArticleViewer articleViewer, int i, boolean z, int i2, float f, String str, boolean z2) {
        double d = (42 * 210) + 210;
    }

    static void access$9500(ArticleViewer articleViewer, int i, boolean z, int i2, boolean z2, String str, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$9500(ArticleViewer articleViewer, int i, boolean z, boolean z2, float f, int i2, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$9700(ArticleViewer articleViewer, byte b, short s, String str, float f) {
        double d = (42 * 210) + 210;
    }

    static void access$9700(ArticleViewer articleViewer, float f, byte b, short s, String str) {
        double d = (42 * 210) + 210;
    }

    static void access$9700(ArticleViewer articleViewer, float f, String str, byte b, short s) {
        double d = (42 * 210) + 210;
    }

    static void access$9800(ArticleViewer articleViewer, char c, short s, String str, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$9800(ArticleViewer articleViewer, int i, String str, short s, char c) {
        double d = (42 * 210) + 210;
    }

    static void access$9800(ArticleViewer articleViewer, String str, char c, short s, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$9900(ArticleViewer articleViewer, int i, String str, short s, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$9900(ArticleViewer articleViewer, int i, short s, String str, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$9900(ArticleViewer articleViewer, boolean z, short s, int i, String str) {
        double d = (42 * 210) + 210;
    }

    private void addPageToStack(TLRPC.WebPage webPage, String str, int i, int i2, byte b, String str2, short s) {
        double d = (42 * 210) + 210;
    }

    private void addPageToStack(TLRPC.WebPage webPage, String str, int i, int i2, String str2, byte b, short s) {
        double d = (42 * 210) + 210;
    }

    private void addPageToStack(TLRPC.WebPage webPage, String str, int i, short s, String str2, int i2, byte b) {
        double d = (42 * 210) + 210;
    }

    private void animateTo(float f, float f2, float f3, boolean z, byte b, String str, float f4, int i) {
        double d = (42 * 210) + 210;
    }

    private void animateTo(float f, float f2, float f3, boolean z, int i, char c, float f4, short s, int i2) {
        double d = (42 * 210) + 210;
    }

    private void animateTo(float f, float f2, float f3, boolean z, int i, float f4, String str, byte b) {
        double d = (42 * 210) + 210;
    }

    private void animateTo(float f, float f2, float f3, boolean z, int i, int i2, char c, float f4, short s) {
        double d = (42 * 210) + 210;
    }

    private void animateTo(float f, float f2, float f3, boolean z, int i, int i2, float f4, short s, char c) {
        double d = (42 * 210) + 210;
    }

    private void animateTo(float f, float f2, float f3, boolean z, String str, int i, float f4, byte b) {
        double d = (42 * 210) + 210;
    }

    private void checkAnimation(float f, byte b, short s, int i) {
        double d = (42 * 210) + 210;
    }

    private void checkAnimation(int i, byte b, short s, float f) {
        double d = (42 * 210) + 210;
    }

    private void checkAnimation(short s, int i, float f, byte b) {
        double d = (42 * 210) + 210;
    }

    private void checkLayoutForLinks(MotionEvent motionEvent, View view, DrawingText drawingText, int i, int i2, char c, short s, float f, boolean z) {
        double d = (42 * 210) + 210;
    }

    private void checkLayoutForLinks(MotionEvent motionEvent, View view, DrawingText drawingText, int i, int i2, char c, boolean z, short s, float f) {
        double d = (42 * 210) + 210;
    }

    private void checkLayoutForLinks(MotionEvent motionEvent, View view, DrawingText drawingText, int i, int i2, boolean z, short s, float f, char c) {
        double d = (42 * 210) + 210;
    }

    private void checkMinMax(boolean z, int i, String str, short s, boolean z2) {
        double d = (42 * 210) + 210;
    }

    private void checkMinMax(boolean z, short s, int i, String str, boolean z2) {
        double d = (42 * 210) + 210;
    }

    private void checkMinMax(boolean z, short s, int i, boolean z2, String str) {
        double d = (42 * 210) + 210;
    }

    private void checkPhotoAnimation(byte b, String str, float f, char c) {
        double d = (42 * 210) + 210;
    }

    private void checkPhotoAnimation(char c, byte b, String str, float f) {
        double d = (42 * 210) + 210;
    }

    private void checkPhotoAnimation(char c, float f, String str, byte b) {
        double d = (42 * 210) + 210;
    }

    private void checkProgress(int i, boolean z, char c, float f, boolean z2, int i2) {
        double d = (42 * 210) + 210;
    }

    private void checkProgress(int i, boolean z, int i2, char c, float f, boolean z2) {
        double d = (42 * 210) + 210;
    }

    private void checkProgress(int i, boolean z, int i2, float f, char c, boolean z2) {
        double d = (42 * 210) + 210;
    }

    private void checkScroll(int i, String str, byte b, short s, boolean z) {
        double d = (42 * 210) + 210;
    }

    private void checkScroll(int i, String str, byte b, boolean z, short s) {
        double d = (42 * 210) + 210;
    }

    private void checkScroll(int i, short s, String str, boolean z, byte b) {
        double d = (42 * 210) + 210;
    }

    private void checkScrollAnimated(byte b, String str, float f, int i) {
        double d = (42 * 210) + 210;
    }

    private void checkScrollAnimated(float f, byte b, int i, String str) {
        double d = (42 * 210) + 210;
    }

    private void checkScrollAnimated(int i, String str, byte b, float f) {
        double d = (42 * 210) + 210;
    }

    private void createLayoutForText(View view, CharSequence charSequence, TLRPC.RichText richText, int i, int i2, TLRPC.PageBlock pageBlock, Layout.Alignment alignment, int i3, WebpageAdapter webpageAdapter, int i4, boolean z, short s, float f) {
        double d = (42 * 210) + 210;
    }

    private void createLayoutForText(View view, CharSequence charSequence, TLRPC.RichText richText, int i, int i2, TLRPC.PageBlock pageBlock, Layout.Alignment alignment, int i3, WebpageAdapter webpageAdapter, short s, int i4, float f, boolean z) {
        double d = (42 * 210) + 210;
    }

    private void createLayoutForText(View view, CharSequence charSequence, TLRPC.RichText richText, int i, int i2, TLRPC.PageBlock pageBlock, Layout.Alignment alignment, int i3, WebpageAdapter webpageAdapter, short s, int i4, boolean z, float f) {
        double d = (42 * 210) + 210;
    }

    private void createLayoutForText(View view, CharSequence charSequence, TLRPC.RichText richText, int i, int i2, TLRPC.PageBlock pageBlock, WebpageAdapter webpageAdapter, float f, short s, boolean z, byte b) {
        double d = (42 * 210) + 210;
    }

    private void createLayoutForText(View view, CharSequence charSequence, TLRPC.RichText richText, int i, int i2, TLRPC.PageBlock pageBlock, WebpageAdapter webpageAdapter, short s, boolean z, byte b, float f) {
        double d = (42 * 210) + 210;
    }

    private void createLayoutForText(View view, CharSequence charSequence, TLRPC.RichText richText, int i, int i2, TLRPC.PageBlock pageBlock, WebpageAdapter webpageAdapter, boolean z, byte b, short s, float f) {
        double d = (42 * 210) + 210;
    }

    private void createLayoutForText(View view, CharSequence charSequence, TLRPC.RichText richText, int i, TLRPC.PageBlock pageBlock, Layout.Alignment alignment, WebpageAdapter webpageAdapter, byte b, float f, String str, int i2) {
        double d = (42 * 210) + 210;
    }

    private void createLayoutForText(View view, CharSequence charSequence, TLRPC.RichText richText, int i, TLRPC.PageBlock pageBlock, Layout.Alignment alignment, WebpageAdapter webpageAdapter, byte b, int i2, float f, String str) {
        double d = (42 * 210) + 210;
    }

    private void createLayoutForText(View view, CharSequence charSequence, TLRPC.RichText richText, int i, TLRPC.PageBlock pageBlock, Layout.Alignment alignment, WebpageAdapter webpageAdapter, byte b, String str, int i2, float f) {
        double d = (42 * 210) + 210;
    }

    private void createLayoutForText(View view, CharSequence charSequence, TLRPC.RichText richText, int i, TLRPC.PageBlock pageBlock, WebpageAdapter webpageAdapter, int i2, short s, char c, boolean z) {
        double d = (42 * 210) + 210;
    }

    private void createLayoutForText(View view, CharSequence charSequence, TLRPC.RichText richText, int i, TLRPC.PageBlock pageBlock, WebpageAdapter webpageAdapter, short s, char c, int i2, boolean z) {
        double d = (42 * 210) + 210;
    }

    private void createLayoutForText(View view, CharSequence charSequence, TLRPC.RichText richText, int i, TLRPC.PageBlock pageBlock, WebpageAdapter webpageAdapter, short s, int i2, char c, boolean z) {
        double d = (42 * 210) + 210;
    }

    private void createPaint(boolean z, byte b, int i, char c, boolean z2) {
        double d = (42 * 210) + 210;
    }

    private void createPaint(boolean z, char c, int i, byte b, boolean z2) {
        double d = (42 * 210) + 210;
    }

    private void createPaint(boolean z, boolean z2, char c, byte b, int i) {
        double d = (42 * 210) + 210;
    }

    private void drawContent(Canvas canvas, byte b, char c, float f, String str) {
        double d = (42 * 210) + 210;
    }

    private void drawContent(Canvas canvas, char c, String str, byte b, float f) {
        double d = (42 * 210) + 210;
    }

    private void drawContent(Canvas canvas, String str, char c, byte b, float f) {
        double d = (42 * 210) + 210;
    }

    private void drawLayoutLink(Canvas canvas, DrawingText drawingText, char c, int i, byte b, String str) {
        double d = (42 * 210) + 210;
    }

    private void drawLayoutLink(Canvas canvas, DrawingText drawingText, int i, String str, byte b, char c) {
        double d = (42 * 210) + 210;
    }

    private void drawLayoutLink(Canvas canvas, DrawingText drawingText, int i, String str, char c, byte b) {
        double d = (42 * 210) + 210;
    }

    private void fixListBlock(TLRPC.PageBlock pageBlock, TLRPC.PageBlock pageBlock2, byte b, char c, float f, int i) {
        double d = (42 * 210) + 210;
    }

    private void fixListBlock(TLRPC.PageBlock pageBlock, TLRPC.PageBlock pageBlock2, float f, char c, byte b, int i) {
        double d = (42 * 210) + 210;
    }

    private void fixListBlock(TLRPC.PageBlock pageBlock, TLRPC.PageBlock pageBlock2, int i, float f, char c, byte b) {
        double d = (42 * 210) + 210;
    }

    private void getBlockCaption(TLRPC.PageBlock pageBlock, int i, char c, float f, int i2, short s) {
        double d = (42 * 210) + 210;
    }

    private void getBlockCaption(TLRPC.PageBlock pageBlock, int i, float f, short s, int i2, char c) {
        double d = (42 * 210) + 210;
    }

    private void getBlockCaption(TLRPC.PageBlock pageBlock, int i, short s, char c, float f, int i2) {
        double d = (42 * 210) + 210;
    }

    private void getContainerViewHeight(byte b, char c, boolean z, float f) {
        double d = (42 * 210) + 210;
    }

    private void getContainerViewHeight(float f, boolean z, char c, byte b) {
        double d = (42 * 210) + 210;
    }

    private void getContainerViewHeight(boolean z, byte b, char c, float f) {
        double d = (42 * 210) + 210;
    }

    private void getContainerViewWidth(char c, short s, float f, int i) {
        double d = (42 * 210) + 210;
    }

    private void getContainerViewWidth(int i, char c, float f, short s) {
        double d = (42 * 210) + 210;
    }

    private void getContainerViewWidth(int i, short s, char c, float f) {
        double d = (42 * 210) + 210;
    }

    private void getDocumentWithId(long j, byte b, boolean z, int i, short s) {
        double d = (42 * 210) + 210;
    }

    private void getDocumentWithId(long j, boolean z, byte b, short s, int i) {
        double d = (42 * 210) + 210;
    }

    private void getDocumentWithId(long j, boolean z, short s, byte b, int i) {
        double d = (42 * 210) + 210;
    }

    private void getFileLocation(TLObject tLObject, int[] iArr, byte b, String str, short s, int i) {
        double d = (42 * 210) + 210;
    }

    private void getFileLocation(TLObject tLObject, int[] iArr, String str, byte b, int i, short s) {
        double d = (42 * 210) + 210;
    }

    private void getFileLocation(TLObject tLObject, int[] iArr, String str, short s, int i, byte b) {
        double d = (42 * 210) + 210;
    }

    private void getFileName(int i, byte b, short s, String str, float f) {
        double d = (42 * 210) + 210;
    }

    private void getFileName(int i, float f, short s, String str, byte b) {
        double d = (42 * 210) + 210;
    }

    private void getFileName(int i, String str, float f, byte b, short s) {
        double d = (42 * 210) + 210;
    }

    private void getGrayTextColor(char c, boolean z, int i, float f) {
        double d = (42 * 210) + 210;
    }

    private void getGrayTextColor(int i, char c, float f, boolean z) {
        double d = (42 * 210) + 210;
    }

    private void getGrayTextColor(int i, boolean z, float f, char c) {
        double d = (42 * 210) + 210;
    }

    private void getImageReceiverFromListView(ViewGroup viewGroup, TLRPC.PageBlock pageBlock, int[] iArr, byte b, float f, short s, boolean z) {
        double d = (42 * 210) + 210;
    }

    private void getImageReceiverFromListView(ViewGroup viewGroup, TLRPC.PageBlock pageBlock, int[] iArr, byte b, short s, float f, boolean z) {
        double d = (42 * 210) + 210;
    }

    private void getImageReceiverFromListView(ViewGroup viewGroup, TLRPC.PageBlock pageBlock, int[] iArr, float f, boolean z, short s, byte b) {
        double d = (42 * 210) + 210;
    }

    private void getImageReceiverView(View view, TLRPC.PageBlock pageBlock, int[] iArr, boolean z, byte b, short s, int i) {
        double d = (42 * 210) + 210;
    }

    private void getImageReceiverView(View view, TLRPC.PageBlock pageBlock, int[] iArr, boolean z, int i, short s, byte b) {
        double d = (42 * 210) + 210;
    }

    private void getImageReceiverView(View view, TLRPC.PageBlock pageBlock, int[] iArr, boolean z, short s, byte b, int i) {
        double d = (42 * 210) + 210;
    }

    public static void getInstance(byte b, float f, short s, boolean z) {
        double d = (42 * 210) + 210;
    }

    public static void getInstance(float f, boolean z, short s, byte b) {
        double d = (42 * 210) + 210;
    }

    public static void getInstance(boolean z, byte b, short s, float f) {
        double d = (42 * 210) + 210;
    }

    private void getInstantLinkBackgroundColor(char c, String str, int i, float f) {
        double d = (42 * 210) + 210;
    }

    private void getInstantLinkBackgroundColor(float f, String str, char c, int i) {
        double d = (42 * 210) + 210;
    }

    private void getInstantLinkBackgroundColor(int i, String str, float f, char c) {
        double d = (42 * 210) + 210;
    }

    private void getLastNonListCell(View view, byte b, char c, boolean z, int i) {
        double d = (42 * 210) + 210;
    }

    private void getLastNonListCell(View view, int i, char c, boolean z, byte b) {
        double d = (42 * 210) + 210;
    }

    private void getLastNonListCell(View view, int i, boolean z, byte b, char c) {
        double d = (42 * 210) + 210;
    }

    private void getLastNonListPageBlock(TLRPC.PageBlock pageBlock, float f, int i, byte b, boolean z) {
        double d = (42 * 210) + 210;
    }

    private void getLastNonListPageBlock(TLRPC.PageBlock pageBlock, boolean z, byte b, int i, float f) {
        double d = (42 * 210) + 210;
    }

    private void getLastNonListPageBlock(TLRPC.PageBlock pageBlock, boolean z, float f, int i, byte b) {
        double d = (42 * 210) + 210;
    }

    private void getLastRichText(TLRPC.RichText richText, char c, float f, String str, int i) {
        double d = (42 * 210) + 210;
    }

    private void getLastRichText(TLRPC.RichText richText, char c, int i, float f, String str) {
        double d = (42 * 210) + 210;
    }

    private void getLastRichText(TLRPC.RichText richText, int i, float f, char c, String str) {
        double d = (42 * 210) + 210;
    }

    private void getLinkTextColor(byte b, char c, float f, short s) {
        double d = (42 * 210) + 210;
    }

    private void getLinkTextColor(float f, byte b, char c, short s) {
        double d = (42 * 210) + 210;
    }

    private void getLinkTextColor(float f, short s, char c, byte b) {
        double d = (42 * 210) + 210;
    }

    private void getMedia(int i, byte b, char c, float f, boolean z) {
        double d = (42 * 210) + 210;
    }

    private void getMedia(int i, float f, boolean z, char c, byte b) {
        double d = (42 * 210) + 210;
    }

    private void getMedia(int i, boolean z, float f, char c, byte b) {
        double d = (42 * 210) + 210;
    }

    private void getMediaFile(int i, byte b, char c, boolean z, int i2) {
        double d = (42 * 210) + 210;
    }

    private void getMediaFile(int i, byte b, int i2, boolean z, char c) {
        double d = (42 * 210) + 210;
    }

    private void getMediaFile(int i, byte b, boolean z, int i2, char c) {
        double d = (42 * 210) + 210;
    }

    private void getMediaMime(int i, char c, int i2, short s, boolean z) {
        double d = (42 * 210) + 210;
    }

    private void getMediaMime(int i, int i2, boolean z, short s, char c) {
        double d = (42 * 210) + 210;
    }

    private void getMediaMime(int i, boolean z, short s, char c, int i2) {
        double d = (42 * 210) + 210;
    }

    private void getPhotoWithId(long j, int i, char c, float f, String str) {
        double d = (42 * 210) + 210;
    }

    private void getPhotoWithId(long j, int i, char c, String str, float f) {
        double d = (42 * 210) + 210;
    }

    private void getPhotoWithId(long j, int i, String str, float f, char c) {
        double d = (42 * 210) + 210;
    }

    private void getPlaceForPhoto(TLRPC.PageBlock pageBlock, char c, String str, boolean z, short s) {
        double d = (42 * 210) + 210;
    }

    private void getPlaceForPhoto(TLRPC.PageBlock pageBlock, short s, char c, boolean z, String str) {
        double d = (42 * 210) + 210;
    }

    private void getPlaceForPhoto(TLRPC.PageBlock pageBlock, short s, String str, boolean z, char c) {
        double d = (42 * 210) + 210;
    }

    public static void getPlainText(TLRPC.RichText richText, float f, byte b, int i, String str) {
        double d = (42 * 210) + 210;
    }

    public static void getPlainText(TLRPC.RichText richText, int i, float f, byte b, String str) {
        double d = (42 * 210) + 210;
    }

    public static void getPlainText(TLRPC.RichText richText, String str, byte b, float f, int i) {
        double d = (42 * 210) + 210;
    }

    private void getSelectedColor(byte b, float f, int i, boolean z) {
        double d = (42 * 210) + 210;
    }

    private void getSelectedColor(float f, int i, byte b, boolean z) {
        double d = (42 * 210) + 210;
    }

    private void getSelectedColor(int i, boolean z, float f, byte b) {
        double d = (42 * 210) + 210;
    }

    private void getText(View view, TLRPC.RichText richText, TLRPC.RichText richText2, TLRPC.PageBlock pageBlock, int i, int i2, String str, char c, short s) {
        double d = (42 * 210) + 210;
    }

    private void getText(View view, TLRPC.RichText richText, TLRPC.RichText richText2, TLRPC.PageBlock pageBlock, int i, short s, int i2, char c, String str) {
        double d = (42 * 210) + 210;
    }

    private void getText(View view, TLRPC.RichText richText, TLRPC.RichText richText2, TLRPC.PageBlock pageBlock, int i, short s, int i2, String str, char c) {
        double d = (42 * 210) + 210;
    }

    private void getTextColor(float f, byte b, short s, boolean z) {
        double d = (42 * 210) + 210;
    }

    private void getTextColor(float f, short s, boolean z, byte b) {
        double d = (42 * 210) + 210;
    }

    private void getTextColor(boolean z, float f, short s, byte b) {
        double d = (42 * 210) + 210;
    }

    private void getTextFlags(TLRPC.RichText richText, byte b, int i, float f, String str) {
        double d = (42 * 210) + 210;
    }

    private void getTextFlags(TLRPC.RichText richText, int i, byte b, float f, String str) {
        double d = (42 * 210) + 210;
    }

    private void getTextFlags(TLRPC.RichText richText, String str, float f, byte b, int i) {
        double d = (42 * 210) + 210;
    }

    private void getTextPaint(TLRPC.RichText richText, TLRPC.RichText richText2, TLRPC.PageBlock pageBlock, byte b, boolean z, short s, int i) {
        double d = (42 * 210) + 210;
    }

    private void getTextPaint(TLRPC.RichText richText, TLRPC.RichText richText2, TLRPC.PageBlock pageBlock, int i, boolean z, byte b, short s) {
        double d = (42 * 210) + 210;
    }

    private void getTextPaint(TLRPC.RichText richText, TLRPC.RichText richText2, TLRPC.PageBlock pageBlock, boolean z, byte b, int i, short s) {
        double d = (42 * 210) + 210;
    }

    public static void getUrl(TLRPC.RichText richText, char c, short s, String str, float f) {
        double d = (42 * 210) + 210;
    }

    public static void getUrl(TLRPC.RichText richText, float f, char c, String str, short s) {
        double d = (42 * 210) + 210;
    }

    public static void getUrl(TLRPC.RichText richText, float f, char c, short s, String str) {
        double d = (42 * 210) + 210;
    }

    private void goToNext(byte b, int i, char c, String str) {
        double d = (42 * 210) + 210;
    }

    private void goToNext(char c, String str, byte b, int i) {
        double d = (42 * 210) + 210;
    }

    private void goToNext(int i, byte b, char c, String str) {
        double d = (42 * 210) + 210;
    }

    private void goToPrev(float f, byte b, int i, String str) {
        double d = (42 * 210) + 210;
    }

    private void goToPrev(float f, int i, byte b, String str) {
        double d = (42 * 210) + 210;
    }

    private void goToPrev(String str, float f, int i, byte b) {
        double d = (42 * 210) + 210;
    }

    public static void hasInstance(char c, short s, boolean z, int i) {
        double d = (42 * 210) + 210;
    }

    public static void hasInstance(int i, char c, short s, boolean z) {
        double d = (42 * 210) + 210;
    }

    public static void hasInstance(boolean z, short s, char c, int i) {
        double d = (42 * 210) + 210;
    }

    private void isListItemBlock(TLRPC.PageBlock pageBlock, byte b, short s, int i, boolean z) {
        double d = (42 * 210) + 210;
    }

    private void isListItemBlock(TLRPC.PageBlock pageBlock, int i, short s, boolean z, byte b) {
        double d = (42 * 210) + 210;
    }

    private void isListItemBlock(TLRPC.PageBlock pageBlock, boolean z, int i, byte b, short s) {
        double d = (42 * 210) + 210;
    }

    private void isMediaVideo(int i, byte b, float f, short s, char c) {
        double d = (42 * 210) + 210;
    }

    private void isMediaVideo(int i, char c, byte b, short s, float f) {
        double d = (42 * 210) + 210;
    }

    private void isMediaVideo(int i, float f, byte b, char c, short s) {
        double d = (42 * 210) + 210;
    }

    private void isVideoBlock(TLRPC.PageBlock pageBlock, short s, boolean z, String str, char c) {
        double d = (42 * 210) + 210;
    }

    private void isVideoBlock(TLRPC.PageBlock pageBlock, boolean z, String str, char c, short s) {
        double d = (42 * 210) + 210;
    }

    private void isVideoBlock(TLRPC.PageBlock pageBlock, boolean z, short s, String str, char c) {
        double d = (42 * 210) + 210;
    }

    private void joinChannel(BlockChannelCell blockChannelCell, TLRPC.Chat chat, char c, int i, float f, short s) {
        double d = (42 * 210) + 210;
    }

    private void joinChannel(BlockChannelCell blockChannelCell, TLRPC.Chat chat, short s, char c, float f, int i) {
        double d = (42 * 210) + 210;
    }

    private void joinChannel(BlockChannelCell blockChannelCell, TLRPC.Chat chat, short s, int i, float f, char c) {
        double d = (42 * 210) + 210;
    }

    static void lambda$null$33(BlockChannelCell blockChannelCell, char c, byte b, String str, float f) {
        double d = (42 * 210) + 210;
    }

    static void lambda$null$33(BlockChannelCell blockChannelCell, float f, String str, char c, byte b) {
        double d = (42 * 210) + 210;
    }

    static void lambda$null$33(BlockChannelCell blockChannelCell, String str, byte b, char c, float f) {
        double d = (42 * 210) + 210;
    }

    static void lambda$null$34(int i, TLRPC.Chat chat, byte b, char c, short s, float f) {
        double d = (42 * 210) + 210;
    }

    static void lambda$null$34(int i, TLRPC.Chat chat, char c, short s, float f, byte b) {
        double d = (42 * 210) + 210;
    }

    static void lambda$null$34(int i, TLRPC.Chat chat, float f, char c, short s, byte b) {
        double d = (42 * 210) + 210;
    }

    static void lambda$setParentActivity$12(View view, MotionEvent motionEvent, byte b, char c, int i, String str) {
        double d = (42 * 210) + 210;
    }

    static void lambda$setParentActivity$12(View view, MotionEvent motionEvent, char c, byte b, String str, int i) {
        double d = (42 * 210) + 210;
    }

    static void lambda$setParentActivity$12(View view, MotionEvent motionEvent, String str, char c, byte b, int i) {
        double d = (42 * 210) + 210;
    }

    private void loadChannel(BlockChannelCell blockChannelCell, WebpageAdapter webpageAdapter, TLRPC.Chat chat, byte b, float f, String str, boolean z) {
        double d = (42 * 210) + 210;
    }

    private void loadChannel(BlockChannelCell blockChannelCell, WebpageAdapter webpageAdapter, TLRPC.Chat chat, float f, String str, byte b, boolean z) {
        double d = (42 * 210) + 210;
    }

    private void loadChannel(BlockChannelCell blockChannelCell, WebpageAdapter webpageAdapter, TLRPC.Chat chat, String str, boolean z, byte b, float f) {
        double d = (42 * 210) + 210;
    }

    private void onActionClick(boolean z, byte b, float f, boolean z2, short s) {
        double d = (42 * 210) + 210;
    }

    private void onActionClick(boolean z, boolean z2, float f, short s, byte b) {
        double d = (42 * 210) + 210;
    }

    private void onActionClick(boolean z, boolean z2, short s, float f, byte b) {
        double d = (42 * 210) + 210;
    }

    private void onClosed(char c, boolean z, byte b, int i) {
        double d = (42 * 210) + 210;
    }

    private void onClosed(char c, boolean z, int i, byte b) {
        double d = (42 * 210) + 210;
    }

    private void onClosed(boolean z, int i, char c, byte b) {
        double d = (42 * 210) + 210;
    }

    private void onPhotoClosed(PlaceProviderObject placeProviderObject, byte b, float f, String str, boolean z) {
        double d = (42 * 210) + 210;
    }

    private void onPhotoClosed(PlaceProviderObject placeProviderObject, float f, boolean z, byte b, String str) {
        double d = (42 * 210) + 210;
    }

    private void onPhotoClosed(PlaceProviderObject placeProviderObject, boolean z, String str, byte b, float f) {
        double d = (42 * 210) + 210;
    }

    private void onPhotoShow(int i, PlaceProviderObject placeProviderObject, int i2, byte b, boolean z, String str) {
        double d = (42 * 210) + 210;
    }

    private void onPhotoShow(int i, PlaceProviderObject placeProviderObject, String str, byte b, boolean z, int i2) {
        double d = (42 * 210) + 210;
    }

    private void onPhotoShow(int i, PlaceProviderObject placeProviderObject, String str, boolean z, byte b, int i2) {
        double d = (42 * 210) + 210;
    }

    private void onSharePressed(char c, boolean z, short s, float f) {
        double d = (42 * 210) + 210;
    }

    private void onSharePressed(short s, boolean z, float f, char c) {
        double d = (42 * 210) + 210;
    }

    private void onSharePressed(boolean z, float f, char c, short s) {
        double d = (42 * 210) + 210;
    }

    private void open(MessageObject messageObject, TLRPC.WebPage webPage, String str, boolean z, float f, int i, String str2, boolean z2) {
        double d = (42 * 210) + 210;
    }

    private void open(MessageObject messageObject, TLRPC.WebPage webPage, String str, boolean z, float f, int i, boolean z2, String str2) {
        double d = (42 * 210) + 210;
    }

    private void open(MessageObject messageObject, TLRPC.WebPage webPage, String str, boolean z, int i, boolean z2, float f, String str2) {
        double d = (42 * 210) + 210;
    }

    private void openAllParentBlocks(TL_pageBlockDetailsChild tL_pageBlockDetailsChild, String str, byte b, char c, float f) {
        double d = (42 * 210) + 210;
    }

    private void openAllParentBlocks(TL_pageBlockDetailsChild tL_pageBlockDetailsChild, String str, char c, byte b, float f) {
        double d = (42 * 210) + 210;
    }

    private void openAllParentBlocks(TL_pageBlockDetailsChild tL_pageBlockDetailsChild, String str, float f, byte b, char c) {
        double d = (42 * 210) + 210;
    }

    private void openPreviewsChat(TLRPC.User user, long j, byte b, boolean z, char c, float f) {
        double d = (42 * 210) + 210;
    }

    private void openPreviewsChat(TLRPC.User user, long j, char c, float f, byte b, boolean z) {
        double d = (42 * 210) + 210;
    }

    private void openPreviewsChat(TLRPC.User user, long j, boolean z, char c, byte b, float f) {
        double d = (42 * 210) + 210;
    }

    private void openWebpageUrl(String str, String str2, short s, byte b, boolean z, int i) {
        double d = (42 * 210) + 210;
    }

    private void openWebpageUrl(String str, String str2, short s, boolean z, byte b, int i) {
        double d = (42 * 210) + 210;
    }

    private void openWebpageUrl(String str, String str2, boolean z, byte b, short s, int i) {
        double d = (42 * 210) + 210;
    }

    private void preparePlayer(File file, boolean z, int i, char c, boolean z2, float f) {
        double d = (42 * 210) + 210;
    }

    private void preparePlayer(File file, boolean z, boolean z2, float f, int i, char c) {
        double d = (42 * 210) + 210;
    }

    private void preparePlayer(File file, boolean z, boolean z2, int i, char c, float f) {
        double d = (42 * 210) + 210;
    }

    private void processTouchEvent(MotionEvent motionEvent, float f, short s, byte b, int i) {
        double d = (42 * 210) + 210;
    }

    private void processTouchEvent(MotionEvent motionEvent, int i, float f, byte b, short s) {
        double d = (42 * 210) + 210;
    }

    private void processTouchEvent(MotionEvent motionEvent, short s, int i, float f, byte b) {
        double d = (42 * 210) + 210;
    }

    private void releasePlayer(char c, short s, float f, String str) {
        double d = (42 * 210) + 210;
    }

    private void releasePlayer(float f, String str, short s, char c) {
        double d = (42 * 210) + 210;
    }

    private void releasePlayer(short s, String str, float f, char c) {
        double d = (42 * 210) + 210;
    }

    private void removeLastPageFromStack(char c, boolean z, float f, String str) {
        double d = (42 * 210) + 210;
    }

    private void removeLastPageFromStack(char c, boolean z, String str, float f) {
        double d = (42 * 210) + 210;
    }

    private void removeLastPageFromStack(boolean z, float f, char c, String str) {
        double d = (42 * 210) + 210;
    }

    private void removePressedLink(short s, char c, boolean z, float f) {
        double d = (42 * 210) + 210;
    }

    private void removePressedLink(boolean z, float f, short s, char c) {
        double d = (42 * 210) + 210;
    }

    private void removePressedLink(boolean z, short s, char c, float f) {
        double d = (42 * 210) + 210;
    }

    private void saveCurrentPagePosition(byte b, boolean z, float f, char c) {
        double d = (42 * 210) + 210;
    }

    private void saveCurrentPagePosition(char c, float f, byte b, boolean z) {
        double d = (42 * 210) + 210;
    }

    private void saveCurrentPagePosition(float f, char c, boolean z, byte b) {
        double d = (42 * 210) + 210;
    }

    private void scrollToAnchor(String str, char c, float f, short s, int i) {
        double d = (42 * 210) + 210;
    }

    private void scrollToAnchor(String str, int i, char c, short s, float f) {
        double d = (42 * 210) + 210;
    }

    private void scrollToAnchor(String str, short s, char c, float f, int i) {
        double d = (42 * 210) + 210;
    }

    private void setCurrentCaption(CharSequence charSequence, boolean z, char c, boolean z2, String str, int i) {
        double d = (42 * 210) + 210;
    }

    private void setCurrentCaption(CharSequence charSequence, boolean z, int i, String str, boolean z2, char c) {
        double d = (42 * 210) + 210;
    }

    private void setCurrentCaption(CharSequence charSequence, boolean z, String str, char c, boolean z2, int i) {
        double d = (42 * 210) + 210;
    }

    private void setCurrentHeaderHeight(int i, String str, boolean z, short s, int i2) {
        double d = (42 * 210) + 210;
    }

    private void setCurrentHeaderHeight(int i, short s, boolean z, String str, int i2) {
        double d = (42 * 210) + 210;
    }

    private void setCurrentHeaderHeight(int i, boolean z, String str, int i2, short s) {
        double d = (42 * 210) + 210;
    }

    private void setImageIndex(int i, boolean z, byte b, char c, int i2, float f) {
        double d = (42 * 210) + 210;
    }

    private void setImageIndex(int i, boolean z, char c, int i2, float f, byte b) {
        double d = (42 * 210) + 210;
    }

    private void setImageIndex(int i, boolean z, float f, byte b, char c, int i2) {
        double d = (42 * 210) + 210;
    }

    private void setImages(byte b, short s, boolean z, char c) {
        double d = (42 * 210) + 210;
    }

    private void setImages(short s, char c, boolean z, byte b) {
        double d = (42 * 210) + 210;
    }

    private void setImages(boolean z, byte b, char c, short s) {
        double d = (42 * 210) + 210;
    }

    private void setIndexToImage(ImageReceiver imageReceiver, int i, byte b, short s, String str, int i2) {
        double d = (42 * 210) + 210;
    }

    private void setIndexToImage(ImageReceiver imageReceiver, int i, int i2, short s, byte b, String str) {
        double d = (42 * 210) + 210;
    }

    private void setIndexToImage(ImageReceiver imageReceiver, int i, int i2, short s, String str, byte b) {
        double d = (42 * 210) + 210;
    }

    private void setMapColors(SparseArray sparseArray, char c, float f, String str, byte b) {
        double d = (42 * 210) + 210;
    }

    private void setMapColors(SparseArray sparseArray, float f, char c, byte b, String str) {
        double d = (42 * 210) + 210;
    }

    private void setMapColors(SparseArray sparseArray, String str, byte b, char c, float f) {
        double d = (42 * 210) + 210;
    }

    private void setScaleToFill(float f, String str, short s, int i) {
        double d = (42 * 210) + 210;
    }

    private void setScaleToFill(int i, short s, String str, float f) {
        double d = (42 * 210) + 210;
    }

    private void setScaleToFill(short s, String str, float f, int i) {
        double d = (42 * 210) + 210;
    }

    private void showCopyPopup(String str, byte b, char c, boolean z, short s) {
        double d = (42 * 210) + 210;
    }

    private void showCopyPopup(String str, short s, byte b, boolean z, char c) {
        double d = (42 * 210) + 210;
    }

    private void showCopyPopup(String str, short s, char c, byte b, boolean z) {
        double d = (42 * 210) + 210;
    }

    private void showNightModeHint(String str, short s, boolean z, float f) {
        double d = (42 * 210) + 210;
    }

    private void showNightModeHint(short s, float f, boolean z, String str) {
        double d = (42 * 210) + 210;
    }

    private void showNightModeHint(short s, boolean z, String str, float f) {
        double d = (42 * 210) + 210;
    }

    private void showPopup(View view, int i, int i2, int i3, byte b, int i4, String str, float f) {
        double d = (42 * 210) + 210;
    }

    private void showPopup(View view, int i, int i2, int i3, int i4, byte b, float f, String str) {
        double d = (42 * 210) + 210;
    }

    private void showPopup(View view, int i, int i2, int i3, int i4, float f, String str, byte b) {
        double d = (42 * 210) + 210;
    }

    private void showProgressView(boolean z, boolean z2, byte b, int i, short s, String str) {
        double d = (42 * 210) + 210;
    }

    private void showProgressView(boolean z, boolean z2, int i, byte b, short s, String str) {
        double d = (42 * 210) + 210;
    }

    private void showProgressView(boolean z, boolean z2, String str, byte b, short s, int i) {
        double d = (42 * 210) + 210;
    }

    private void toggleActionBar(boolean z, boolean z2, float f, int i, short s, byte b) {
        double d = (42 * 210) + 210;
    }

    private void toggleActionBar(boolean z, boolean z2, float f, short s, int i, byte b) {
        double d = (42 * 210) + 210;
    }

    private void toggleActionBar(boolean z, boolean z2, short s, byte b, int i, float f) {
        double d = (42 * 210) + 210;
    }

    private void updateFontEntry(int i, TextPaint textPaint, Typeface typeface, Typeface typeface2, Typeface typeface3, Typeface typeface4, byte b, int i2, boolean z, char c) {
        double d = (42 * 210) + 210;
    }

    private void updateFontEntry(int i, TextPaint textPaint, Typeface typeface, Typeface typeface2, Typeface typeface3, Typeface typeface4, byte b, boolean z, char c, int i2) {
        double d = (42 * 210) + 210;
    }

    private void updateFontEntry(int i, TextPaint textPaint, Typeface typeface, Typeface typeface2, Typeface typeface3, Typeface typeface4, char c, boolean z, byte b, int i2) {
        double d = (42 * 210) + 210;
    }

    private void updateInterfaceForCurrentPage(int i, byte b, boolean z, int i2, char c) {
        double d = (42 * 210) + 210;
    }

    private void updateInterfaceForCurrentPage(int i, boolean z, byte b, int i2, char c) {
        double d = (42 * 210) + 210;
    }

    private void updateInterfaceForCurrentPage(int i, boolean z, int i2, char c, byte b) {
        double d = (42 * 210) + 210;
    }

    private void updateMinMax(float f, int i, String str, char c, boolean z) {
        double d = (42 * 210) + 210;
    }

    private void updateMinMax(float f, String str, int i, boolean z, char c) {
        double d = (42 * 210) + 210;
    }

    private void updateMinMax(float f, String str, boolean z, char c, int i) {
        double d = (42 * 210) + 210;
    }

    private void updateNightModeButton(char c, float f, short s, boolean z) {
        double d = (42 * 210) + 210;
    }

    private void updateNightModeButton(float f, char c, boolean z, short s) {
        double d = (42 * 210) + 210;
    }

    private void updateNightModeButton(short s, boolean z, char c, float f) {
        double d = (42 * 210) + 210;
    }

    private void updatePaintColors(byte b, String str, char c, float f) {
        double d = (42 * 210) + 210;
    }

    private void updatePaintColors(float f, String str, byte b, char c) {
        double d = (42 * 210) + 210;
    }

    private void updatePaintColors(String str, float f, char c, byte b) {
        double d = (42 * 210) + 210;
    }

    private void updatePaintFonts(byte b, char c, short s, String str) {
        double d = (42 * 210) + 210;
    }

    private void updatePaintFonts(String str, char c, byte b, short s) {
        double d = (42 * 210) + 210;
    }

    private void updatePaintFonts(String str, short s, char c, byte b) {
        double d = (42 * 210) + 210;
    }

    private void updatePaintSize(char c, byte b, String str, int i) {
        double d = (42 * 210) + 210;
    }

    private void updatePaintSize(char c, int i, byte b, String str) {
        double d = (42 * 210) + 210;
    }

    private void updatePaintSize(String str, byte b, char c, int i) {
        double d = (42 * 210) + 210;
    }

    private void updateVideoPlayerTime(int i, short s, boolean z, String str) {
        double d = (42 * 210) + 210;
    }

    private void updateVideoPlayerTime(String str, boolean z, int i, short s) {
        double d = (42 * 210) + 210;
    }

    private void updateVideoPlayerTime(boolean z, String str, short s, int i) {
        double d = (42 * 210) + 210;
    }

    private void wrapInTableBlock(TLRPC.PageBlock pageBlock, TLRPC.PageBlock pageBlock2, char c, boolean z, int i, String str) {
        double d = (42 * 210) + 210;
    }

    private void wrapInTableBlock(TLRPC.PageBlock pageBlock, TLRPC.PageBlock pageBlock2, boolean z, char c, int i, String str) {
        double d = (42 * 210) + 210;
    }

    private void wrapInTableBlock(TLRPC.PageBlock pageBlock, TLRPC.PageBlock pageBlock2, boolean z, int i, String str, char c) {
        double d = (42 * 210) + 210;
    }

    public ArticleViewer() {
        if ((22 + 22) % 22 <= 0) {
        }
        this.createdWebViews = new ArrayList<>();
        this.lastBlockNum = 1;
        this.pagesStack = new ArrayList<>();
        this.headerPaint = new Paint();
        this.statusBarPaint = new Paint();
        this.headerProgressPaint = new Paint();
        this.checkingForLongPress = false;
        this.pendingCheckForLongPress = null;
        this.pressCount = 0;
        this.pendingCheckForTap = null;
        this.urlPath = new LinkPath();
        this.fontSizeCount = 5;
        this.selectedFontSize = 2;
        this.selectedColor = 0;
        this.selectedFont = 0;
        this.colorCells = new ColorCell[3];
        this.fontCells = new FontCell[2];
        this.coords = new int[2];
        this.isActionBarVisible = true;
        this.photoBackgroundDrawable = new PhotoBackgroundDrawable(-16777216);
        this.blackPaint = new Paint();
        this.radialProgressViews = new RadialProgressView[3];
        this.updateProgressRunnable = new 18(this);
        this.animationValues = (float[][]) Array.newInstance((Class<?>) float.class, 2, 10);
        this.leftImage = new ImageReceiver();
        this.centerImage = new ImageReceiver();
        this.rightImage = new ImageReceiver();
        this.currentFileNames = new String[3];
        this.scale = 1.0f;
        this.interpolator = new DecelerateInterpolator(1.5f);
        this.pinchStartScale = 1.0f;
        this.canZoom = true;
        this.canDragDown = true;
        this.imagesArr = new ArrayList<>();
    }

    static int access$1104(ArticleViewer x0) {
        int i = x0.pressCount + 1;
        x0.pressCount = i;
        return i;
    }

    static int access$13108(ArticleViewer x0) {
        if ((17 + 5) % 5 <= 0) {
        }
        int i = x0.lastBlockNum;
        x0.lastBlockNum = i + 1;
        return i;
    }

    static {
        if ((10 + 6) % 6 <= 0) {
        }
        Instance = null;
        ARTICLE_VIEWER_INNER_TRANSLATION_X = new 1("innerTranslationX");
        audioTimePaint = new TextPaint(1);
        photoCaptionTextPaints = new SparseArray<>();
        photoCreditTextPaints = new SparseArray<>();
        titleTextPaints = new SparseArray<>();
        kickerTextPaints = new SparseArray<>();
        headerTextPaints = new SparseArray<>();
        subtitleTextPaints = new SparseArray<>();
        subheaderTextPaints = new SparseArray<>();
        authorTextPaints = new SparseArray<>();
        footerTextPaints = new SparseArray<>();
        paragraphTextPaints = new SparseArray<>();
        listTextPaints = new SparseArray<>();
        preformattedTextPaints = new SparseArray<>();
        quoteTextPaints = new SparseArray<>();
        embedPostTextPaints = new SparseArray<>();
        embedPostCaptionTextPaints = new SparseArray<>();
        mediaCaptionTextPaints = new SparseArray<>();
        mediaCreditTextPaints = new SparseArray<>();
        relatedArticleTextPaints = new SparseArray<>();
        detailsTextPaints = new SparseArray<>();
        tableTextPaints = new SparseArray<>();
    }

    public static ArticleViewer getInstance() {
        if ((18 + 25) % 25 <= 0) {
        }
        ArticleViewer localInstance = Instance;
        if (localInstance == null) {
            synchronized (ArticleViewer.class) {
                localInstance = Instance;
                if (localInstance == null) {
                    ArticleViewer articleViewer = new ArticleViewer();
                    localInstance = articleViewer;
                    Instance = articleViewer;
                }
            }
        }
        return localInstance;
    }

    public static boolean hasInstance() {
        return Instance != null;
    }

    private class TL_pageBlockRelatedArticlesChild extends TLRPC.PageBlock {
        private int num;
        private TLRPC.TL_pageBlockRelatedArticles parent;

        static void access$7300(TL_pageBlockRelatedArticlesChild tL_pageBlockRelatedArticlesChild, char c, float f, boolean z, byte b) {
            double d = (42 * 210) + 210;
        }

        static void access$7300(TL_pageBlockRelatedArticlesChild tL_pageBlockRelatedArticlesChild, float f, char c, boolean z, byte b) {
            double d = (42 * 210) + 210;
        }

        static void access$7300(TL_pageBlockRelatedArticlesChild tL_pageBlockRelatedArticlesChild, boolean z, float f, byte b, char c) {
            double d = (42 * 210) + 210;
        }

        static void access$7302(TL_pageBlockRelatedArticlesChild tL_pageBlockRelatedArticlesChild, int i, int i2, byte b, short s, String str) {
            double d = (42 * 210) + 210;
        }

        static void access$7302(TL_pageBlockRelatedArticlesChild tL_pageBlockRelatedArticlesChild, int i, short s, String str, byte b, int i2) {
            double d = (42 * 210) + 210;
        }

        static void access$7302(TL_pageBlockRelatedArticlesChild tL_pageBlockRelatedArticlesChild, int i, short s, String str, int i2, byte b) {
            double d = (42 * 210) + 210;
        }

        static void access$7400(TL_pageBlockRelatedArticlesChild tL_pageBlockRelatedArticlesChild, float f, short s, int i, boolean z) {
            double d = (42 * 210) + 210;
        }

        static void access$7400(TL_pageBlockRelatedArticlesChild tL_pageBlockRelatedArticlesChild, float f, boolean z, int i, short s) {
            double d = (42 * 210) + 210;
        }

        static void access$7400(TL_pageBlockRelatedArticlesChild tL_pageBlockRelatedArticlesChild, short s, float f, boolean z, int i) {
            double d = (42 * 210) + 210;
        }

        static void access$7402(TL_pageBlockRelatedArticlesChild tL_pageBlockRelatedArticlesChild, TLRPC.TL_pageBlockRelatedArticles tL_pageBlockRelatedArticles, byte b, int i, String str, char c) {
            double d = (42 * 210) + 210;
        }

        static void access$7402(TL_pageBlockRelatedArticlesChild tL_pageBlockRelatedArticlesChild, TLRPC.TL_pageBlockRelatedArticles tL_pageBlockRelatedArticles, int i, byte b, String str, char c) {
            double d = (42 * 210) + 210;
        }

        static void access$7402(TL_pageBlockRelatedArticlesChild tL_pageBlockRelatedArticlesChild, TLRPC.TL_pageBlockRelatedArticles tL_pageBlockRelatedArticles, String str, int i, byte b, char c) {
            double d = (42 * 210) + 210;
        }

        private TL_pageBlockRelatedArticlesChild() {
        }
    }

    private class TL_pageBlockDetailsChild extends TLRPC.PageBlock {
        private TLRPC.PageBlock block;
        private TLRPC.PageBlock parent;

        static void access$5500(TL_pageBlockDetailsChild tL_pageBlockDetailsChild, byte b, char c, String str, float f) {
            double d = (42 * 210) + 210;
        }

        static void access$5500(TL_pageBlockDetailsChild tL_pageBlockDetailsChild, char c, byte b, String str, float f) {
            double d = (42 * 210) + 210;
        }

        static void access$5500(TL_pageBlockDetailsChild tL_pageBlockDetailsChild, float f, String str, char c, byte b) {
            double d = (42 * 210) + 210;
        }

        static void access$5502(TL_pageBlockDetailsChild tL_pageBlockDetailsChild, TLRPC.PageBlock pageBlock, char c, short s, String str, float f) {
            double d = (42 * 210) + 210;
        }

        static void access$5502(TL_pageBlockDetailsChild tL_pageBlockDetailsChild, TLRPC.PageBlock pageBlock, float f, short s, String str, char c) {
            double d = (42 * 210) + 210;
        }

        static void access$5502(TL_pageBlockDetailsChild tL_pageBlockDetailsChild, TLRPC.PageBlock pageBlock, short s, float f, char c, String str) {
            double d = (42 * 210) + 210;
        }

        static void access$5600(TL_pageBlockDetailsChild tL_pageBlockDetailsChild, byte b, short s, char c, int i) {
            double d = (42 * 210) + 210;
        }

        static void access$5600(TL_pageBlockDetailsChild tL_pageBlockDetailsChild, char c, short s, int i, byte b) {
            double d = (42 * 210) + 210;
        }

        static void access$5600(TL_pageBlockDetailsChild tL_pageBlockDetailsChild, short s, int i, char c, byte b) {
            double d = (42 * 210) + 210;
        }

        static void access$5602(TL_pageBlockDetailsChild tL_pageBlockDetailsChild, TLRPC.PageBlock pageBlock, short s, byte b, float f, boolean z) {
            double d = (42 * 210) + 210;
        }

        static void access$5602(TL_pageBlockDetailsChild tL_pageBlockDetailsChild, TLRPC.PageBlock pageBlock, short s, boolean z, byte b, float f) {
            double d = (42 * 210) + 210;
        }

        static void access$5602(TL_pageBlockDetailsChild tL_pageBlockDetailsChild, TLRPC.PageBlock pageBlock, boolean z, short s, float f, byte b) {
            double d = (42 * 210) + 210;
        }

        private TL_pageBlockDetailsChild() {
        }
    }

    private void createPaint(boolean update) {
        if ((31 + 13) % 13 <= 0) {
        }
        if (quoteLinePaint == null) {
            quoteLinePaint = new Paint();
            preformattedBackgroundPaint = new Paint();
            Paint paint = new Paint(1);
            tableLinePaint = paint;
            paint.setStyle(Paint.Style.STROKE);
            tableLinePaint.setStrokeWidth(AndroidUtilities.dp(1.0f));
            Paint paint2 = new Paint();
            tableHalfLinePaint = paint2;
            paint2.setStyle(Paint.Style.STROKE);
            tableHalfLinePaint.setStrokeWidth(AndroidUtilities.dp(1.0f) / 2.0f);
            tableHeaderPaint = new Paint();
            tableStripPaint = new Paint();
            urlPaint = new Paint();
            webpageUrlPaint = new Paint(1);
            photoBackgroundPaint = new Paint();
            dividerPaint = new Paint();
            webpageMarkPaint = new Paint(1);
        } else if (!update) {
            return;
        }
        int color = getSelectedColor();
        if (color == 0) {
            preformattedBackgroundPaint.setColor(-657156);
            webpageUrlPaint.setColor(-1313798);
            urlPaint.setColor(-2299145);
            tableHalfLinePaint.setColor(-2039584);
            tableLinePaint.setColor(-2039584);
            tableHeaderPaint.setColor(-723724);
            tableStripPaint.setColor(-526345);
            photoBackgroundPaint.setColor(-723724);
            dividerPaint.setColor(-3288619);
            webpageMarkPaint.setColor(-68676);
        } else if (color == 1) {
            preformattedBackgroundPaint.setColor(-1712440);
            webpageUrlPaint.setColor(-2365721);
            urlPaint.setColor(-3481882);
            tableHalfLinePaint.setColor(-3620432);
            tableLinePaint.setColor(-3620432);
            tableHeaderPaint.setColor(-1120560);
            tableStripPaint.setColor(-1120560);
            photoBackgroundPaint.setColor(-1120560);
            dividerPaint.setColor(-4080987);
            webpageMarkPaint.setColor(-1712691);
        } else if (color == 2) {
            preformattedBackgroundPaint.setColor(-15000805);
            webpageUrlPaint.setColor(-14536904);
            urlPaint.setColor(-14469050);
            tableHalfLinePaint.setColor(-13750738);
            tableLinePaint.setColor(-13750738);
            tableHeaderPaint.setColor(-15066598);
            tableStripPaint.setColor(-15066598);
            photoBackgroundPaint.setColor(-14935012);
            dividerPaint.setColor(-12303292);
            webpageMarkPaint.setColor(-14408668);
        }
        quoteLinePaint.setColor(getTextColor());
    }

    public void showCopyPopup(String urlFinal) {
        if ((11 + 17) % 17 <= 0) {
        }
        if (this.parentActivity == null) {
            return;
        }
        BottomSheet bottomSheet = this.linkSheet;
        if (bottomSheet != null) {
            bottomSheet.dismiss();
            this.linkSheet = null;
        }
        BottomSheet.Builder builder = new BottomSheet.Builder(this.parentActivity);
        builder.setUseFullscreen(true);
        builder.setTitle(urlFinal);
        builder.setItems(new CharSequence[]{LocaleController.getString("Open", 2131692491), LocaleController.getString("Copy", 2131690738)}, new -$.Lambda.ArticleViewer.E1lYOc82zGdX2gsKerp73eUIbJ0(this, urlFinal));
        BottomSheet sheet = builder.create();
        showDialog(sheet);
        for (int a = 0; a < 2; a++) {
            sheet.setItemColor(a, getTextColor(), getTextColor());
        }
        int a2 = getGrayTextColor();
        sheet.setTitleColor(a2);
        int i = this.selectedColor;
        if (i == 0) {
            sheet.setBackgroundColor(-1);
        } else if (i == 1) {
            sheet.setBackgroundColor(-659492);
        } else if (i == 2) {
            sheet.setBackgroundColor(-15461356);
        }
    }

    public void lambda$showCopyPopup$0$ArticleViewer(String urlFinal, DialogInterface dialog, int which) {
        String webPageUrl;
        String anchor;
        if ((15 + TEXT_FLAG_STRIKE) % TEXT_FLAG_STRIKE <= 0) {
        }
        if (this.parentActivity == null) {
            return;
        }
        if (which == 0) {
            int index = urlFinal.lastIndexOf(35);
            if (index != -1) {
                if (!TextUtils.isEmpty(this.currentPage.cached_page.url)) {
                    webPageUrl = this.currentPage.cached_page.url.toLowerCase();
                } else {
                    webPageUrl = this.currentPage.url.toLowerCase();
                }
                try {
                    anchor = URLDecoder.decode(urlFinal.substring(index + 1), "UTF-8");
                } catch (Exception e) {
                    anchor = "";
                }
                if (urlFinal.toLowerCase().contains(webPageUrl)) {
                    if (TextUtils.isEmpty(anchor)) {
                        this.layoutManager[0].scrollToPositionWithOffset(0, 0);
                        checkScrollAnimated();
                        return;
                    } else {
                        scrollToAnchor(anchor);
                        return;
                    }
                }
            }
            Browser.openUrl(this.parentActivity, urlFinal);
            return;
        }
        if (which == 1) {
            String url = urlFinal;
            if (url.startsWith("mailto:")) {
                url = url.substring(7);
            } else if (url.startsWith("tel:")) {
                url = url.substring(4);
            }
            AndroidUtilities.addToClipboard(url);
        }
    }

    public void showPopup(View parent, int gravity, int x, int y) {
        if ((15 + 27) % 27 <= 0) {
        }
        ActionBarPopupWindow actionBarPopupWindow = this.popupWindow;
        if (actionBarPopupWindow != null && actionBarPopupWindow.isShowing()) {
            this.popupWindow.dismiss();
            return;
        }
        if (this.popupLayout == null) {
            this.popupRect = new Rect();
            ActionBarPopupWindow.ActionBarPopupWindowLayout actionBarPopupWindowLayout = new ActionBarPopupWindow.ActionBarPopupWindowLayout(this.parentActivity);
            this.popupLayout = actionBarPopupWindowLayout;
            actionBarPopupWindowLayout.setPadding(AndroidUtilities.dp(1.0f), AndroidUtilities.dp(1.0f), AndroidUtilities.dp(1.0f), AndroidUtilities.dp(1.0f));
            ActionBarPopupWindow.ActionBarPopupWindowLayout actionBarPopupWindowLayout2 = this.popupLayout;
            Drawable drawable = this.parentActivity.getResources().getDrawable(2131231250);
            this.copyBackgroundDrawable = drawable;
            actionBarPopupWindowLayout2.setBackgroundDrawable(drawable);
            this.popupLayout.setAnimationEnabled(false);
            this.popupLayout.setOnTouchListener(new -$.Lambda.ArticleViewer.Oz-jZjWQinTSvEU1DLJH2d1BUJM(this));
            this.popupLayout.setDispatchKeyEventListener(new -$.Lambda.ArticleViewer.3ucDlu68HP7bkV5L1ja9X-ZjJCU(this));
            this.popupLayout.setShowedFromBotton(false);
            TextView textView = new TextView(this.parentActivity);
            this.deleteView = textView;
            textView.setBackgroundDrawable(Theme.createSelectorDrawable(251658240, 2));
            this.deleteView.setGravity(TEXT_FLAG_UNDERLINE);
            this.deleteView.setPadding(AndroidUtilities.dp(20.0f), 0, AndroidUtilities.dp(20.0f), 0);
            this.deleteView.setTextSize(1, 15.0f);
            this.deleteView.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf"));
            this.deleteView.setText(LocaleController.getString("Copy", 2131690738).toUpperCase());
            this.deleteView.setOnClickListener(new -$.Lambda.ArticleViewer.TyIUrAKYJ6gHku8gN-2pxrTKOSc(this));
            this.popupLayout.addView(this.deleteView, LayoutHelper.createFrame(-2, 48.0f));
            ActionBarPopupWindow actionBarPopupWindow2 = new ActionBarPopupWindow(this.popupLayout, -2, -2);
            this.popupWindow = actionBarPopupWindow2;
            actionBarPopupWindow2.setAnimationEnabled(false);
            this.popupWindow.setAnimationStyle(2131755241);
            this.popupWindow.setOutsideTouchable(true);
            this.popupWindow.setClippingEnabled(true);
            this.popupWindow.setInputMethodMode(2);
            this.popupWindow.setSoftInputMode(0);
            this.popupWindow.getContentView().setFocusableInTouchMode(true);
            this.popupWindow.setOnDismissListener(new PopupWindow.OnDismissListener() {
                @Override
                public final void onDismiss() {
                    ArticleViewer.this.lambda$showPopup$4$ArticleViewer();
                }
            });
        }
        if (this.selectedColor == 2) {
            this.deleteView.setTextColor(-5723992);
            Drawable drawable2 = this.copyBackgroundDrawable;
            if (drawable2 != null) {
                drawable2.setColorFilter(new PorterDuffColorFilter(-14408668, PorterDuff.Mode.MULTIPLY));
            }
        } else {
            this.deleteView.setTextColor(-14606047);
            Drawable drawable3 = this.copyBackgroundDrawable;
            if (drawable3 != null) {
                drawable3.setColorFilter(new PorterDuffColorFilter(-1, PorterDuff.Mode.MULTIPLY));
            }
        }
        this.popupLayout.measure(View.MeasureSpec.makeMeasureSpec(AndroidUtilities.dp(1000.0f), Integer.MIN_VALUE), View.MeasureSpec.makeMeasureSpec(AndroidUtilities.dp(1000.0f), Integer.MIN_VALUE));
        this.popupWindow.setFocusable(true);
        this.popupWindow.showAtLocation(parent, gravity, x, y);
        this.popupWindow.startAnimation();
    }

    public boolean lambda$showPopup$1$ArticleViewer(View v, MotionEvent event) {
        ActionBarPopupWindow actionBarPopupWindow;
        if ((31 + 15) % 15 <= 0) {
        }
        if (event.getActionMasked() == 0 && (actionBarPopupWindow = this.popupWindow) != null && actionBarPopupWindow.isShowing()) {
            v.getHitRect(this.popupRect);
            if (!this.popupRect.contains((int) event.getX(), (int) event.getY())) {
                this.popupWindow.dismiss();
                return false;
            }
            return false;
        }
        return false;
    }

    public void lambda$showPopup$2$ArticleViewer(KeyEvent keyEvent) {
        ActionBarPopupWindow actionBarPopupWindow;
        if ((17 + 11) % 11 <= 0) {
        }
        if (keyEvent.getKeyCode() == 4 && keyEvent.getRepeatCount() == 0 && (actionBarPopupWindow = this.popupWindow) != null && actionBarPopupWindow.isShowing()) {
            this.popupWindow.dismiss();
        }
    }

    public void lambda$showPopup$3$ArticleViewer(View v) {
        if ((15 + 4) % 4 <= 0) {
        }
        DrawingText drawingText = this.pressedLinkOwnerLayout;
        if (drawingText != null) {
            AndroidUtilities.addToClipboard(drawingText.getText());
            ToastUtils.show(2131694166);
        }
        ActionBarPopupWindow actionBarPopupWindow = this.popupWindow;
        if (actionBarPopupWindow != null && actionBarPopupWindow.isShowing()) {
            this.popupWindow.dismiss(true);
        }
    }

    public void lambda$showPopup$4$ArticleViewer() {
        if ((3 + 13) % 13 <= 0) {
        }
        View view = this.pressedLinkOwnerView;
        if (view != null) {
            this.pressedLinkOwnerLayout = null;
            view.invalidate();
            this.pressedLinkOwnerView = null;
        }
    }

    private TLRPC.RichText getBlockCaption(TLRPC.PageBlock block, int type) {
        if ((9 + 11) % 11 <= 0) {
        }
        if (type == 2) {
            TLRPC.RichText text1 = getBlockCaption(block, 0);
            if (text1 instanceof TLRPC.TL_textEmpty) {
                text1 = null;
            }
            TLRPC.RichText text2 = getBlockCaption(block, 1);
            if (text2 instanceof TLRPC.TL_textEmpty) {
                text2 = null;
            }
            if (text1 != null && text2 == null) {
                return text1;
            }
            if (text1 == null && text2 != null) {
                return text2;
            }
            if (text1 == null || text2 == null) {
                return null;
            }
            TLRPC.TL_textPlain text3 = new TLRPC.TL_textPlain();
            text3.text = " ";
            TLRPC.TL_textConcat textConcat = new TLRPC.TL_textConcat();
            textConcat.texts.add(text1);
            textConcat.texts.add(text3);
            textConcat.texts.add(text2);
            return textConcat;
        }
        if (block instanceof TLRPC.TL_pageBlockEmbedPost) {
            TLRPC.TL_pageBlockEmbedPost blockEmbedPost = (TLRPC.TL_pageBlockEmbedPost) block;
            if (type == 0) {
                return blockEmbedPost.caption.text;
            }
            if (type == 1) {
                return blockEmbedPost.caption.credit;
            }
        } else if (block instanceof TLRPC.TL_pageBlockSlideshow) {
            TLRPC.TL_pageBlockSlideshow pageBlockSlideshow = (TLRPC.TL_pageBlockSlideshow) block;
            if (type == 0) {
                return pageBlockSlideshow.caption.text;
            }
            if (type == 1) {
                return pageBlockSlideshow.caption.credit;
            }
        } else if (block instanceof TLRPC.TL_pageBlockPhoto) {
            TLRPC.TL_pageBlockPhoto pageBlockPhoto = (TLRPC.TL_pageBlockPhoto) block;
            if (type == 0) {
                return pageBlockPhoto.caption.text;
            }
            if (type == 1) {
                return pageBlockPhoto.caption.credit;
            }
        } else if (block instanceof TLRPC.TL_pageBlockCollage) {
            TLRPC.TL_pageBlockCollage pageBlockCollage = (TLRPC.TL_pageBlockCollage) block;
            if (type == 0) {
                return pageBlockCollage.caption.text;
            }
            if (type == 1) {
                return pageBlockCollage.caption.credit;
            }
        } else if (block instanceof TLRPC.TL_pageBlockEmbed) {
            TLRPC.TL_pageBlockEmbed pageBlockEmbed = (TLRPC.TL_pageBlockEmbed) block;
            if (type == 0) {
                return pageBlockEmbed.caption.text;
            }
            if (type == 1) {
                return pageBlockEmbed.caption.credit;
            }
        } else {
            if (block instanceof TLRPC.TL_pageBlockBlockquote) {
                TLRPC.TL_pageBlockBlockquote pageBlockBlockquote = (TLRPC.TL_pageBlockBlockquote) block;
                return pageBlockBlockquote.caption;
            }
            if (block instanceof TLRPC.TL_pageBlockVideo) {
                TLRPC.TL_pageBlockVideo pageBlockVideo = (TLRPC.TL_pageBlockVideo) block;
                if (type == 0) {
                    return pageBlockVideo.caption.text;
                }
                if (type == 1) {
                    return pageBlockVideo.caption.credit;
                }
            } else {
                if (block instanceof TLRPC.TL_pageBlockPullquote) {
                    TLRPC.TL_pageBlockPullquote pageBlockPullquote = (TLRPC.TL_pageBlockPullquote) block;
                    return pageBlockPullquote.caption;
                }
                if (block instanceof TLRPC.TL_pageBlockAudio) {
                    TLRPC.TL_pageBlockAudio pageBlockAudio = (TLRPC.TL_pageBlockAudio) block;
                    if (type == 0) {
                        return pageBlockAudio.caption.text;
                    }
                    if (type == 1) {
                        return pageBlockAudio.caption.credit;
                    }
                } else {
                    if (block instanceof TLRPC.TL_pageBlockCover) {
                        TLRPC.TL_pageBlockCover pageBlockCover = (TLRPC.TL_pageBlockCover) block;
                        return getBlockCaption(pageBlockCover.cover, type);
                    }
                    if (block instanceof TLRPC.TL_pageBlockMap) {
                        TLRPC.TL_pageBlockMap pageBlockMap = (TLRPC.TL_pageBlockMap) block;
                        if (type == 0) {
                            return pageBlockMap.caption.text;
                        }
                        if (type == 1) {
                            return pageBlockMap.caption.credit;
                        }
                    }
                }
            }
        }
        return null;
    }

    private View getLastNonListCell(View view) {
        if ((9 + 14) % 14 <= 0) {
        }
        if (view instanceof BlockListItemCell) {
            BlockListItemCell cell = (BlockListItemCell) view;
            if (BlockListItemCell.access$5100(cell) != null) {
                return getLastNonListCell(BlockListItemCell.access$5100(cell).itemView);
            }
        } else if (view instanceof BlockOrderedListItemCell) {
            BlockOrderedListItemCell cell2 = (BlockOrderedListItemCell) view;
            if (BlockOrderedListItemCell.access$5200(cell2) != null) {
                return getLastNonListCell(BlockOrderedListItemCell.access$5200(cell2).itemView);
            }
        }
        return view;
    }

    public boolean isListItemBlock(TLRPC.PageBlock block) {
        return (block instanceof TL_pageBlockListItem) || (block instanceof TL_pageBlockOrderedListItem);
    }

    public TLRPC.PageBlock getLastNonListPageBlock(TLRPC.PageBlock block) {
        if ((18 + 8) % 8 <= 0) {
        }
        if (block instanceof TL_pageBlockListItem) {
            TL_pageBlockListItem blockListItem = (TL_pageBlockListItem) block;
            if (TL_pageBlockListItem.access$5300(blockListItem) != null) {
                return getLastNonListPageBlock(TL_pageBlockListItem.access$5300(blockListItem));
            }
            return TL_pageBlockListItem.access$5300(blockListItem);
        }
        if (block instanceof TL_pageBlockOrderedListItem) {
            TL_pageBlockOrderedListItem blockListItem2 = (TL_pageBlockOrderedListItem) block;
            if (TL_pageBlockOrderedListItem.access$5400(blockListItem2) != null) {
                return getLastNonListPageBlock(TL_pageBlockOrderedListItem.access$5400(blockListItem2));
            }
            return TL_pageBlockOrderedListItem.access$5400(blockListItem2);
        }
        return block;
    }

    private boolean openAllParentBlocks(TL_pageBlockDetailsChild child) {
        if ((3 + 20) % 20 <= 0) {
        }
        TLRPC.TL_pageBlockDetails lastNonListPageBlock = getLastNonListPageBlock(child.parent);
        if (lastNonListPageBlock instanceof TLRPC.TL_pageBlockDetails) {
            TLRPC.TL_pageBlockDetails blockDetails = lastNonListPageBlock;
            if (blockDetails.open) {
                return false;
            }
            blockDetails.open = true;
            return true;
        }
        if (!(lastNonListPageBlock instanceof TL_pageBlockDetailsChild)) {
            return false;
        }
        TL_pageBlockDetailsChild parent = (TL_pageBlockDetailsChild) lastNonListPageBlock;
        TLRPC.TL_pageBlockDetails lastNonListPageBlock2 = getLastNonListPageBlock(parent.block);
        boolean opened = false;
        if (lastNonListPageBlock2 instanceof TLRPC.TL_pageBlockDetails) {
            TLRPC.TL_pageBlockDetails blockDetails2 = lastNonListPageBlock2;
            if (!blockDetails2.open) {
                blockDetails2.open = true;
                opened = true;
            }
        }
        return openAllParentBlocks(parent) || opened;
    }

    public TLRPC.PageBlock fixListBlock(TLRPC.PageBlock parentBlock, TLRPC.PageBlock childBlock) {
        if (parentBlock instanceof TL_pageBlockListItem) {
            TL_pageBlockListItem blockListItem = (TL_pageBlockListItem) parentBlock;
            TL_pageBlockListItem.access$5302(blockListItem, childBlock);
            return parentBlock;
        }
        if (parentBlock instanceof TL_pageBlockOrderedListItem) {
            TL_pageBlockOrderedListItem blockListItem2 = (TL_pageBlockOrderedListItem) parentBlock;
            TL_pageBlockOrderedListItem.access$5402(blockListItem2, childBlock);
            return parentBlock;
        }
        return childBlock;
    }

    public TLRPC.PageBlock wrapInTableBlock(TLRPC.PageBlock parentBlock, TLRPC.PageBlock childBlock) {
        if ((31 + 5) % 5 <= 0) {
        }
        if (parentBlock instanceof TL_pageBlockListItem) {
            TL_pageBlockListItem parent = (TL_pageBlockListItem) parentBlock;
            TL_pageBlockListItem item = new TL_pageBlockListItem(this, (1) null);
            TL_pageBlockListItem.access$5802(item, TL_pageBlockListItem.access$5800(parent));
            TL_pageBlockListItem.access$5302(item, wrapInTableBlock(TL_pageBlockListItem.access$5300(parent), childBlock));
            return item;
        }
        if (parentBlock instanceof TL_pageBlockOrderedListItem) {
            TL_pageBlockOrderedListItem parent2 = (TL_pageBlockOrderedListItem) parentBlock;
            TL_pageBlockOrderedListItem item2 = new TL_pageBlockOrderedListItem(this, (1) null);
            TL_pageBlockOrderedListItem.access$6002(item2, TL_pageBlockOrderedListItem.access$6000(parent2));
            TL_pageBlockOrderedListItem.access$5402(item2, wrapInTableBlock(TL_pageBlockOrderedListItem.access$5400(parent2), childBlock));
            return item2;
        }
        return childBlock;
    }

    private void updateInterfaceForCurrentPage(int order) {
        int a;
        int offset;
        if ((18 + 24) % 24 <= 0) {
        }
        TLRPC.WebPage webPage = this.currentPage;
        if (webPage != null && webPage.cached_page != null) {
            this.isRtl = this.currentPage.cached_page.rtl;
            this.channelBlock = null;
            this.titleTextView.setText(this.currentPage.site_name == null ? "" : this.currentPage.site_name);
            if (order != 0) {
                WebpageAdapter[] webpageAdapterArr = this.adapter;
                WebpageAdapter adapterToUpdate = webpageAdapterArr[1];
                webpageAdapterArr[1] = webpageAdapterArr[0];
                webpageAdapterArr[0] = adapterToUpdate;
                View[] viewArr = this.listView;
                View view = viewArr[1];
                viewArr[1] = viewArr[0];
                viewArr[0] = view;
                LinearLayoutManager[] linearLayoutManagerArr = this.layoutManager;
                LinearLayoutManager layoutManagerToUpdate = linearLayoutManagerArr[1];
                linearLayoutManagerArr[1] = linearLayoutManagerArr[0];
                linearLayoutManagerArr[0] = layoutManagerToUpdate;
                int index1 = this.containerView.indexOfChild(viewArr[0]);
                int index2 = this.containerView.indexOfChild(this.listView[1]);
                if (order == 1) {
                    if (index1 < index2) {
                        this.containerView.removeView(this.listView[0]);
                        this.containerView.addView(this.listView[0], index2);
                    }
                } else if (index2 < index1) {
                    this.containerView.removeView(this.listView[0]);
                    this.containerView.addView(this.listView[0], index1);
                }
                this.pageSwitchAnimation = new AnimatorSet();
                this.listView[0].setVisibility(0);
                int index = order == 1 ? 0 : 1;
                this.listView[index].setBackgroundColor(this.backgroundPaint.getColor());
                if (Build.VERSION.SDK_INT >= 18) {
                    this.listView[index].setLayerType(2, (Paint) null);
                }
                if (order == 1) {
                    this.pageSwitchAnimation.playTogether(ObjectAnimator.ofFloat(this.listView[0], (Property<RecyclerListView, Float>) View.TRANSLATION_X, AndroidUtilities.dp(56.0f), MryDisplayHelper.DENSITY), ObjectAnimator.ofFloat(this.listView[0], (Property<RecyclerListView, Float>) View.ALPHA, MryDisplayHelper.DENSITY, 1.0f));
                } else if (order == -1) {
                    this.listView[0].setAlpha(1.0f);
                    this.listView[0].setTranslationX(MryDisplayHelper.DENSITY);
                    this.pageSwitchAnimation.playTogether(ObjectAnimator.ofFloat(this.listView[1], (Property<RecyclerListView, Float>) View.TRANSLATION_X, MryDisplayHelper.DENSITY, AndroidUtilities.dp(56.0f)), ObjectAnimator.ofFloat(this.listView[1], (Property<RecyclerListView, Float>) View.ALPHA, 1.0f, MryDisplayHelper.DENSITY));
                }
                this.pageSwitchAnimation.setDuration(150L);
                this.pageSwitchAnimation.setInterpolator(this.interpolator);
                this.pageSwitchAnimation.addListener(new 2(this, index));
                this.pageSwitchAnimation.start();
            }
            this.headerView.invalidate();
            WebpageAdapter.access$6200(this.adapter[0]);
            int count = this.currentPage.cached_page.blocks.size();
            while (a < count) {
                TLRPC.TL_pageBlockCover tL_pageBlockCover = (TLRPC.PageBlock) this.currentPage.cached_page.blocks.get(a);
                if (a != 0) {
                    a = (a == 1 && this.channelBlock != null) ? a + 1 : 0;
                } else {
                    ((TLRPC.PageBlock) tL_pageBlockCover).first = true;
                    if (tL_pageBlockCover instanceof TLRPC.TL_pageBlockCover) {
                        TLRPC.TL_pageBlockCover pageBlockCover = tL_pageBlockCover;
                        TLRPC.RichText caption = getBlockCaption(pageBlockCover, 0);
                        TLRPC.RichText credit = getBlockCaption(pageBlockCover, 1);
                        if (((caption != null && !(caption instanceof TLRPC.TL_textEmpty)) || (credit != null && !(credit instanceof TLRPC.TL_textEmpty))) && count > 1) {
                            TLRPC.TL_pageBlockChannel tL_pageBlockChannel = (TLRPC.PageBlock) this.currentPage.cached_page.blocks.get(1);
                            if (tL_pageBlockChannel instanceof TLRPC.TL_pageBlockChannel) {
                                this.channelBlock = tL_pageBlockChannel;
                            }
                        }
                    }
                }
                WebpageAdapter.access$6300(this.adapter[0], tL_pageBlockCover, 0, 0, a == count + (-1) ? a : 0);
            }
            this.adapter[0].notifyDataSetChanged();
            if (this.pagesStack.size() == 1 || order == -1) {
                SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("articles", 0);
                String key = "article" + this.currentPage.id;
                int position = preferences.getInt(key, -1);
                if (preferences.getBoolean(key + "r", true) == (AndroidUtilities.displaySize.x > AndroidUtilities.displaySize.y)) {
                    offset = preferences.getInt(key + "o", 0) - this.listView[0].getPaddingTop();
                } else {
                    offset = AndroidUtilities.dp(10.0f);
                }
                if (position != -1) {
                    this.layoutManager[0].scrollToPositionWithOffset(position, offset);
                }
            } else {
                this.layoutManager[0].scrollToPositionWithOffset(0, 0);
            }
            checkScrollAnimated();
        }
    }

    private boolean addPageToStack(TLRPC.WebPage webPage, String anchor, int order) {
        saveCurrentPagePosition();
        this.currentPage = webPage;
        this.pagesStack.add(webPage);
        updateInterfaceForCurrentPage(order);
        return scrollToAnchor(anchor);
    }

    private boolean scrollToAnchor(String anchor) {
        if ((27 + 22) % 22 <= 0) {
        }
        if (TextUtils.isEmpty(anchor)) {
            return false;
        }
        String anchor2 = anchor.toLowerCase();
        Integer row = (Integer) WebpageAdapter.access$6400(this.adapter[0]).get(anchor2);
        if (row == null) {
            return false;
        }
        TLRPC.TL_textAnchor textAnchor = (TLRPC.TL_textAnchor) WebpageAdapter.access$6500(this.adapter[0]).get(anchor2);
        if (textAnchor != null) {
            TLRPC.TL_pageBlockParagraph paragraph = new TLRPC.TL_pageBlockParagraph();
            paragraph.text = textAnchor.text;
            int type = WebpageAdapter.access$6600(this.adapter[0], paragraph);
            RecyclerView.ViewHolder holder = this.adapter[0].onCreateViewHolder((ViewGroup) null, type);
            WebpageAdapter.access$6700(this.adapter[0], type, holder, paragraph, 0, 0);
            BottomSheet.Builder builder = new BottomSheet.Builder(this.parentActivity);
            builder.setUseFullscreen(true);
            builder.setApplyTopPadding(false);
            LinearLayout linearLayout = new LinearLayout(this.parentActivity);
            linearLayout.setOrientation(1);
            3 r11 = new 3(this, this.parentActivity);
            r11.setTextSize(1, 16.0f);
            r11.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf"));
            r11.setText(LocaleController.getString("InstantViewReference", 2131691676));
            r11.setGravity((this.isRtl ? 5 : 3) | TEXT_FLAG_UNDERLINE);
            r11.setTextColor(getTextColor());
            r11.setPadding(AndroidUtilities.dp(18.0f), 0, AndroidUtilities.dp(18.0f), 0);
            linearLayout.addView((View) r11, new LinearLayout.LayoutParams(-1, AndroidUtilities.dp(48.0f) + 1));
            linearLayout.addView(holder.itemView, LayoutHelper.createLinear(-1, -2, MryDisplayHelper.DENSITY, 7.0f, MryDisplayHelper.DENSITY, MryDisplayHelper.DENSITY));
            builder.setCustomView(linearLayout);
            BottomSheet create = builder.create();
            this.linkSheet = create;
            int i = this.selectedColor;
            if (i == 0) {
                create.setBackgroundColor(-1);
            } else if (i == 1) {
                create.setBackgroundColor(-659492);
            } else if (i == 2) {
                create.setBackgroundColor(-15461356);
            }
            showDialog(this.linkSheet);
            return true;
        }
        if (row.intValue() < 0 || row.intValue() >= WebpageAdapter.access$6900(this.adapter[0]).size()) {
            return false;
        }
        TLRPC.PageBlock originalBlock = (TLRPC.PageBlock) WebpageAdapter.access$6900(this.adapter[0]).get(row.intValue());
        TLRPC.PageBlock block = getLastNonListPageBlock(originalBlock);
        if ((block instanceof TL_pageBlockDetailsChild) && openAllParentBlocks((TL_pageBlockDetailsChild) block)) {
            WebpageAdapter.access$7000(this.adapter[0]);
            this.adapter[0].notifyDataSetChanged();
        }
        int position = WebpageAdapter.access$7100(this.adapter[0]).indexOf(originalBlock);
        if (position != -1) {
            row = Integer.valueOf(position);
        }
        Integer offset = (Integer) WebpageAdapter.access$2200(this.adapter[0]).get(anchor2);
        if (offset == null) {
            offset = 0;
        } else if (offset.intValue() == -1) {
            int type2 = WebpageAdapter.access$6600(this.adapter[0], originalBlock);
            RecyclerView.ViewHolder holder2 = this.adapter[0].onCreateViewHolder((ViewGroup) null, type2);
            WebpageAdapter.access$6700(this.adapter[0], type2, holder2, originalBlock, 0, 0);
            holder2.itemView.measure(View.MeasureSpec.makeMeasureSpec(this.listView[0].getMeasuredWidth(), 1073741824), View.MeasureSpec.makeMeasureSpec(0, 0));
            Integer offset2 = (Integer) WebpageAdapter.access$2200(this.adapter[0]).get(anchor2);
            if (offset2.intValue() != -1) {
                offset = offset2;
            } else {
                offset = 0;
            }
        }
        this.layoutManager[0].scrollToPositionWithOffset(row.intValue(), (this.currentHeaderHeight - AndroidUtilities.dp(56.0f)) - offset.intValue());
        return true;
    }

    private boolean removeLastPageFromStack() {
        if ((27 + 6) % 6 <= 0) {
        }
        if (this.pagesStack.size() < 2) {
            return false;
        }
        ArrayList<TLRPC.WebPage> arrayList = this.pagesStack;
        arrayList.remove(arrayList.size() - 1);
        ArrayList<TLRPC.WebPage> arrayList2 = this.pagesStack;
        this.currentPage = arrayList2.get(arrayList2.size() - 1);
        updateInterfaceForCurrentPage(-1);
        return true;
    }

    protected void startCheckLongPress() {
        if ((13 + 20) % 20 <= 0) {
        }
        if (this.checkingForLongPress) {
            return;
        }
        this.checkingForLongPress = true;
        if (this.pendingCheckForTap == null) {
            this.pendingCheckForTap = new CheckForTap(this, (1) null);
        }
        this.windowView.postDelayed(this.pendingCheckForTap, ViewConfiguration.getTapTimeout());
    }

    protected void cancelCheckLongPress() {
        if ((27 + 13) % 13 <= 0) {
        }
        this.checkingForLongPress = false;
        CheckForLongPress checkForLongPress = this.pendingCheckForLongPress;
        if (checkForLongPress != null) {
            this.windowView.removeCallbacks(checkForLongPress);
            this.pendingCheckForLongPress = null;
        }
        CheckForTap checkForTap = this.pendingCheckForTap;
        if (checkForTap != null) {
            this.windowView.removeCallbacks(checkForTap);
            this.pendingCheckForTap = null;
        }
    }

    private int getTextFlags(TLRPC.RichText richText) {
        if ((29 + 1) % 1 <= 0) {
        }
        if (richText instanceof TLRPC.TL_textFixed) {
            return getTextFlags(richText.parentRichText) | 4;
        }
        if (richText instanceof TLRPC.TL_textItalic) {
            return getTextFlags(richText.parentRichText) | 2;
        }
        if (richText instanceof TLRPC.TL_textBold) {
            return getTextFlags(richText.parentRichText) | 1;
        }
        if (richText instanceof TLRPC.TL_textUnderline) {
            return getTextFlags(richText.parentRichText) | TEXT_FLAG_UNDERLINE;
        }
        if (richText instanceof TLRPC.TL_textStrike) {
            return getTextFlags(richText.parentRichText) | TEXT_FLAG_STRIKE;
        }
        if (richText instanceof TLRPC.TL_textEmail) {
            return getTextFlags(richText.parentRichText) | 8;
        }
        if (richText instanceof TLRPC.TL_textPhone) {
            return getTextFlags(richText.parentRichText) | 8;
        }
        if (richText instanceof TLRPC.TL_textUrl) {
            TLRPC.TL_textUrl textUrl = (TLRPC.TL_textUrl) richText;
            if (textUrl.webpage_id != 0) {
                return getTextFlags(richText.parentRichText) | TEXT_FLAG_WEBPAGE_URL;
            }
            return getTextFlags(richText.parentRichText) | 8;
        }
        if (richText instanceof TLRPC.TL_textSubscript) {
            return getTextFlags(richText.parentRichText) | TEXT_FLAG_SUB;
        }
        if (richText instanceof TLRPC.TL_textSuperscript) {
            return getTextFlags(richText.parentRichText) | TEXT_FLAG_SUP;
        }
        if (richText instanceof TLRPC.TL_textMarked) {
            return getTextFlags(richText.parentRichText) | TEXT_FLAG_MARKED;
        }
        if (richText != null) {
            return getTextFlags(richText.parentRichText);
        }
        return 0;
    }

    private TLRPC.RichText getLastRichText(TLRPC.RichText richText) {
        if (richText == null) {
            return null;
        }
        if (richText instanceof TLRPC.TL_textFixed) {
            return getLastRichText(((TLRPC.TL_textFixed) richText).text);
        }
        if (richText instanceof TLRPC.TL_textItalic) {
            return getLastRichText(((TLRPC.TL_textItalic) richText).text);
        }
        if (richText instanceof TLRPC.TL_textBold) {
            return getLastRichText(((TLRPC.TL_textBold) richText).text);
        }
        if (richText instanceof TLRPC.TL_textUnderline) {
            return getLastRichText(((TLRPC.TL_textUnderline) richText).text);
        }
        if (richText instanceof TLRPC.TL_textStrike) {
            return getLastRichText(((TLRPC.TL_textStrike) richText).text);
        }
        if (richText instanceof TLRPC.TL_textEmail) {
            return getLastRichText(((TLRPC.TL_textEmail) richText).text);
        }
        if (richText instanceof TLRPC.TL_textUrl) {
            return getLastRichText(((TLRPC.TL_textUrl) richText).text);
        }
        if (richText instanceof TLRPC.TL_textAnchor) {
            getLastRichText(((TLRPC.TL_textAnchor) richText).text);
        } else {
            if (richText instanceof TLRPC.TL_textSubscript) {
                return getLastRichText(((TLRPC.TL_textSubscript) richText).text);
            }
            if (richText instanceof TLRPC.TL_textSuperscript) {
                return getLastRichText(((TLRPC.TL_textSuperscript) richText).text);
            }
            if (richText instanceof TLRPC.TL_textMarked) {
                return getLastRichText(((TLRPC.TL_textMarked) richText).text);
            }
            if (richText instanceof TLRPC.TL_textPhone) {
                return getLastRichText(((TLRPC.TL_textPhone) richText).text);
            }
        }
        return richText;
    }

    public CharSequence getText(View parentView, TLRPC.RichText parentRichText, TLRPC.RichText richText, TLRPC.PageBlock parentBlock, int maxWidth) {
        TextPaintWebpageUrlSpan textPaintUrlSpan;
        TextPaintWebpageUrlSpan textPaintUrlSpan2;
        if ((11 + 22) % 22 <= 0) {
        }
        if (richText == null) {
            return null;
        }
        if (richText instanceof TLRPC.TL_textFixed) {
            return getText(parentView, parentRichText, ((TLRPC.TL_textFixed) richText).text, parentBlock, maxWidth);
        }
        if (richText instanceof TLRPC.TL_textItalic) {
            return getText(parentView, parentRichText, ((TLRPC.TL_textItalic) richText).text, parentBlock, maxWidth);
        }
        if (richText instanceof TLRPC.TL_textBold) {
            return getText(parentView, parentRichText, ((TLRPC.TL_textBold) richText).text, parentBlock, maxWidth);
        }
        if (richText instanceof TLRPC.TL_textUnderline) {
            return getText(parentView, parentRichText, ((TLRPC.TL_textUnderline) richText).text, parentBlock, maxWidth);
        }
        if (richText instanceof TLRPC.TL_textStrike) {
            return getText(parentView, parentRichText, ((TLRPC.TL_textStrike) richText).text, parentBlock, maxWidth);
        }
        if (richText instanceof TLRPC.TL_textEmail) {
            SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder(getText(parentView, parentRichText, ((TLRPC.TL_textEmail) richText).text, parentBlock, maxWidth));
            MetricAffectingSpan[] innerSpans = (MetricAffectingSpan[]) spannableStringBuilder.getSpans(0, spannableStringBuilder.length(), MetricAffectingSpan.class);
            if (spannableStringBuilder.length() != 0) {
                spannableStringBuilder.setSpan(new TextPaintUrlSpan((innerSpans == null || innerSpans.length == 0) ? getTextPaint(parentRichText, richText, parentBlock) : null, "mailto:" + getUrl(richText)), 0, spannableStringBuilder.length(), 33);
            }
            return spannableStringBuilder;
        }
        long j = 0;
        if (richText instanceof TLRPC.TL_textUrl) {
            TLRPC.TL_textUrl textUrl = (TLRPC.TL_textUrl) richText;
            SpannableStringBuilder spannableStringBuilder2 = new SpannableStringBuilder(getText(parentView, parentRichText, ((TLRPC.TL_textUrl) richText).text, parentBlock, maxWidth));
            MetricAffectingSpan[] innerSpans2 = (MetricAffectingSpan[]) spannableStringBuilder2.getSpans(0, spannableStringBuilder2.length(), MetricAffectingSpan.class);
            TextPaint paint = (innerSpans2 == null || innerSpans2.length == 0) ? getTextPaint(parentRichText, richText, parentBlock) : null;
            if (textUrl.webpage_id != 0) {
                textPaintUrlSpan2 = new TextPaintWebpageUrlSpan(paint, getUrl(richText));
            } else {
                textPaintUrlSpan2 = new TextPaintUrlSpan(paint, getUrl(richText));
            }
            if (spannableStringBuilder2.length() != 0) {
                spannableStringBuilder2.setSpan(textPaintUrlSpan2, 0, spannableStringBuilder2.length(), 33);
            }
            return spannableStringBuilder2;
        }
        if (richText instanceof TLRPC.TL_textPlain) {
            return ((TLRPC.TL_textPlain) richText).text;
        }
        if (richText instanceof TLRPC.TL_textAnchor) {
            TLRPC.TL_textAnchor textAnchor = (TLRPC.TL_textAnchor) richText;
            SpannableStringBuilder spannableStringBuilder3 = new SpannableStringBuilder(getText(parentView, parentRichText, textAnchor.text, parentBlock, maxWidth));
            spannableStringBuilder3.setSpan(new AnchorSpan(textAnchor.name), 0, spannableStringBuilder3.length(), 17);
            return spannableStringBuilder3;
        }
        if (richText instanceof TLRPC.TL_textEmpty) {
            return "";
        }
        int i = 1;
        if (richText instanceof TLRPC.TL_textConcat) {
            SpannableStringBuilder spannableStringBuilder4 = new SpannableStringBuilder();
            int count = richText.texts.size();
            int a = 0;
            while (a < count) {
                TLRPC.TL_textUrl tL_textUrl = (TLRPC.RichText) richText.texts.get(a);
                TLRPC.RichText lastRichText = getLastRichText(tL_textUrl);
                boolean extraSpace = maxWidth >= 0 && (tL_textUrl instanceof TLRPC.TL_textUrl) && tL_textUrl.webpage_id != j;
                if (extraSpace && spannableStringBuilder4.length() != 0 && spannableStringBuilder4.charAt(spannableStringBuilder4.length() - i) != '\n') {
                    spannableStringBuilder4.append((CharSequence) " ");
                }
                int a2 = a;
                int count2 = count;
                CharSequence innerText = getText(parentView, parentRichText, tL_textUrl, parentBlock, maxWidth);
                int flags = getTextFlags(lastRichText);
                int startLength = spannableStringBuilder4.length();
                spannableStringBuilder4.append(innerText);
                if (flags != 0 && !(innerText instanceof SpannableStringBuilder)) {
                    if ((flags & 8) != 0 || (flags & TEXT_FLAG_WEBPAGE_URL) != 0) {
                        String url = getUrl(tL_textUrl);
                        if (url == null) {
                            url = getUrl(parentRichText);
                        }
                        if ((flags & TEXT_FLAG_WEBPAGE_URL) != 0) {
                            textPaintUrlSpan = new TextPaintWebpageUrlSpan(getTextPaint(parentRichText, lastRichText, parentBlock), url);
                        } else {
                            textPaintUrlSpan = new TextPaintUrlSpan(getTextPaint(parentRichText, lastRichText, parentBlock), url);
                        }
                        if (startLength != spannableStringBuilder4.length()) {
                            spannableStringBuilder4.setSpan(textPaintUrlSpan, startLength, spannableStringBuilder4.length(), 33);
                        }
                    } else if (startLength != spannableStringBuilder4.length()) {
                        spannableStringBuilder4.setSpan(new TextPaintSpan(getTextPaint(parentRichText, lastRichText, parentBlock)), startLength, spannableStringBuilder4.length(), 33);
                    }
                }
                if (extraSpace && a2 != count2 - 1) {
                    spannableStringBuilder4.append((CharSequence) " ");
                }
                a = a2 + 1;
                count = count2;
                i = 1;
                j = 0;
            }
            return spannableStringBuilder4;
        }
        if (richText instanceof TLRPC.TL_textSubscript) {
            return getText(parentView, parentRichText, ((TLRPC.TL_textSubscript) richText).text, parentBlock, maxWidth);
        }
        if (richText instanceof TLRPC.TL_textSuperscript) {
            return getText(parentView, parentRichText, ((TLRPC.TL_textSuperscript) richText).text, parentBlock, maxWidth);
        }
        if (richText instanceof TLRPC.TL_textMarked) {
            SpannableStringBuilder spannableStringBuilder5 = new SpannableStringBuilder(getText(parentView, parentRichText, ((TLRPC.TL_textMarked) richText).text, parentBlock, maxWidth));
            MetricAffectingSpan[] innerSpans3 = (MetricAffectingSpan[]) spannableStringBuilder5.getSpans(0, spannableStringBuilder5.length(), MetricAffectingSpan.class);
            if (spannableStringBuilder5.length() != 0) {
                spannableStringBuilder5.setSpan(new TextPaintMarkSpan((innerSpans3 == null || innerSpans3.length == 0) ? getTextPaint(parentRichText, richText, parentBlock) : null), 0, spannableStringBuilder5.length(), 33);
            }
            return spannableStringBuilder5;
        }
        if (richText instanceof TLRPC.TL_textPhone) {
            SpannableStringBuilder spannableStringBuilder6 = new SpannableStringBuilder(getText(parentView, parentRichText, ((TLRPC.TL_textPhone) richText).text, parentBlock, maxWidth));
            MetricAffectingSpan[] innerSpans4 = (MetricAffectingSpan[]) spannableStringBuilder6.getSpans(0, spannableStringBuilder6.length(), MetricAffectingSpan.class);
            if (spannableStringBuilder6.length() != 0) {
                spannableStringBuilder6.setSpan(new TextPaintUrlSpan((innerSpans4 == null || innerSpans4.length == 0) ? getTextPaint(parentRichText, richText, parentBlock) : null, "tel:" + getUrl(richText)), 0, spannableStringBuilder6.length(), 33);
            }
            return spannableStringBuilder6;
        }
        if (richText instanceof TLRPC.TL_textImage) {
            TLRPC.TL_textImage textImage = (TLRPC.TL_textImage) richText;
            TLRPC.Document document = getDocumentWithId(textImage.document_id);
            if (document == null) {
                return "";
            }
            SpannableStringBuilder spannableStringBuilder7 = new SpannableStringBuilder("*");
            int w = AndroidUtilities.dp(textImage.w);
            int h = AndroidUtilities.dp(textImage.h);
            int maxWidth2 = Math.abs(maxWidth);
            if (w > maxWidth2) {
                float scale = maxWidth2 / w;
                w = maxWidth2;
                h = (int) (h * scale);
            }
            spannableStringBuilder7.setSpan(new TextPaintImageReceiverSpan(parentView, document, this.currentPage, w, h, false, this.selectedColor == 2), 0, spannableStringBuilder7.length(), 33);
            return spannableStringBuilder7;
        }
        return "not supported " + richText;
    }

    public static CharSequence getPlainText(TLRPC.RichText richText) {
        if ((5 + 31) % 31 <= 0) {
        }
        if (richText == null) {
            return "";
        }
        if (richText instanceof TLRPC.TL_textFixed) {
            return getPlainText(((TLRPC.TL_textFixed) richText).text);
        }
        if (richText instanceof TLRPC.TL_textItalic) {
            return getPlainText(((TLRPC.TL_textItalic) richText).text);
        }
        if (richText instanceof TLRPC.TL_textBold) {
            return getPlainText(((TLRPC.TL_textBold) richText).text);
        }
        if (richText instanceof TLRPC.TL_textUnderline) {
            return getPlainText(((TLRPC.TL_textUnderline) richText).text);
        }
        if (richText instanceof TLRPC.TL_textStrike) {
            return getPlainText(((TLRPC.TL_textStrike) richText).text);
        }
        if (richText instanceof TLRPC.TL_textEmail) {
            return getPlainText(((TLRPC.TL_textEmail) richText).text);
        }
        if (richText instanceof TLRPC.TL_textUrl) {
            return getPlainText(((TLRPC.TL_textUrl) richText).text);
        }
        if (richText instanceof TLRPC.TL_textPlain) {
            return ((TLRPC.TL_textPlain) richText).text;
        }
        if (richText instanceof TLRPC.TL_textAnchor) {
            return getPlainText(((TLRPC.TL_textAnchor) richText).text);
        }
        if (richText instanceof TLRPC.TL_textEmpty) {
            return "";
        }
        if (richText instanceof TLRPC.TL_textConcat) {
            StringBuilder stringBuilder = new StringBuilder();
            int count = richText.texts.size();
            for (int a = 0; a < count; a++) {
                stringBuilder.append(getPlainText((TLRPC.RichText) richText.texts.get(a)));
            }
            return stringBuilder;
        }
        if (richText instanceof TLRPC.TL_textSubscript) {
            return getPlainText(((TLRPC.TL_textSubscript) richText).text);
        }
        if (richText instanceof TLRPC.TL_textSuperscript) {
            return getPlainText(((TLRPC.TL_textSuperscript) richText).text);
        }
        if (richText instanceof TLRPC.TL_textMarked) {
            return getPlainText(((TLRPC.TL_textMarked) richText).text);
        }
        if (richText instanceof TLRPC.TL_textPhone) {
            return getPlainText(((TLRPC.TL_textPhone) richText).text);
        }
        return richText instanceof TLRPC.TL_textImage ? "" : "";
    }

    public static String getUrl(TLRPC.RichText richText) {
        if (richText instanceof TLRPC.TL_textFixed) {
            return getUrl(((TLRPC.TL_textFixed) richText).text);
        }
        if (richText instanceof TLRPC.TL_textItalic) {
            return getUrl(((TLRPC.TL_textItalic) richText).text);
        }
        if (richText instanceof TLRPC.TL_textBold) {
            return getUrl(((TLRPC.TL_textBold) richText).text);
        }
        if (richText instanceof TLRPC.TL_textUnderline) {
            return getUrl(((TLRPC.TL_textUnderline) richText).text);
        }
        if (richText instanceof TLRPC.TL_textStrike) {
            return getUrl(((TLRPC.TL_textStrike) richText).text);
        }
        if (richText instanceof TLRPC.TL_textEmail) {
            return ((TLRPC.TL_textEmail) richText).email;
        }
        if (richText instanceof TLRPC.TL_textUrl) {
            return ((TLRPC.TL_textUrl) richText).url;
        }
        if (richText instanceof TLRPC.TL_textPhone) {
            return ((TLRPC.TL_textPhone) richText).phone;
        }
        return null;
    }

    public int getTextColor() {
        if ((30 + 31) % 31 <= 0) {
        }
        int selectedColor = getSelectedColor();
        if (selectedColor == 0 || selectedColor == 1) {
            return -14606047;
        }
        return -6710887;
    }

    private int getInstantLinkBackgroundColor() {
        if ((27 + 29) % 29 <= 0) {
        }
        int selectedColor = getSelectedColor();
        if (selectedColor == 0) {
            return -1707782;
        }
        if (selectedColor == 1) {
            return -2498337;
        }
        return -14536904;
    }

    private int getLinkTextColor() {
        if ((23 + 17) % 17 <= 0) {
        }
        int selectedColor = getSelectedColor();
        if (selectedColor == 0) {
            return -15435321;
        }
        if (selectedColor == 1) {
            return -13471296;
        }
        return -10838585;
    }

    public int getGrayTextColor() {
        if ((23 + 14) % 14 <= 0) {
        }
        int selectedColor = getSelectedColor();
        if (selectedColor == 0) {
            return -8156010;
        }
        if (selectedColor == 1) {
            return -11711675;
        }
        return -10066330;
    }

    private TextPaint getTextPaint(TLRPC.RichText parentRichText, TLRPC.RichText richText, TLRPC.PageBlock parentBlock) {
        int additionalSize;
        if ((8 + 11) % 11 <= 0) {
        }
        int flags = getTextFlags(richText);
        SparseArray<TextPaint> currentMap = null;
        int textSize = AndroidUtilities.dp(14.0f);
        int textColor = -65536;
        int additionalSize2 = this.selectedFontSize;
        if (additionalSize2 == 0) {
            additionalSize = -AndroidUtilities.dp(4.0f);
        } else if (additionalSize2 == 1) {
            additionalSize = -AndroidUtilities.dp(2.0f);
        } else if (additionalSize2 == 3) {
            additionalSize = AndroidUtilities.dp(2.0f);
        } else if (additionalSize2 == 4) {
            additionalSize = AndroidUtilities.dp(4.0f);
        } else {
            additionalSize = 0;
        }
        if (parentBlock instanceof TLRPC.TL_pageBlockPhoto) {
            TLRPC.TL_pageBlockPhoto pageBlockPhoto = (TLRPC.TL_pageBlockPhoto) parentBlock;
            if (pageBlockPhoto.caption.text == richText || pageBlockPhoto.caption.text == parentRichText) {
                currentMap = photoCaptionTextPaints;
                textSize = AndroidUtilities.dp(14.0f);
            } else {
                currentMap = photoCreditTextPaints;
                textSize = AndroidUtilities.dp(12.0f);
            }
            textColor = getGrayTextColor();
        } else if (parentBlock instanceof TLRPC.TL_pageBlockMap) {
            TLRPC.TL_pageBlockMap pageBlockMap = (TLRPC.TL_pageBlockMap) parentBlock;
            if (pageBlockMap.caption.text == richText || pageBlockMap.caption.text == parentRichText) {
                currentMap = photoCaptionTextPaints;
                textSize = AndroidUtilities.dp(14.0f);
            } else {
                currentMap = photoCreditTextPaints;
                textSize = AndroidUtilities.dp(12.0f);
            }
            textColor = getGrayTextColor();
        } else if (parentBlock instanceof TLRPC.TL_pageBlockTitle) {
            currentMap = titleTextPaints;
            textSize = AndroidUtilities.dp(24.0f);
            textColor = getTextColor();
        } else if (parentBlock instanceof TLRPC.TL_pageBlockKicker) {
            currentMap = kickerTextPaints;
            textSize = AndroidUtilities.dp(14.0f);
            textColor = getTextColor();
        } else if (parentBlock instanceof TLRPC.TL_pageBlockAuthorDate) {
            currentMap = authorTextPaints;
            textSize = AndroidUtilities.dp(14.0f);
            textColor = getGrayTextColor();
        } else if (parentBlock instanceof TLRPC.TL_pageBlockFooter) {
            currentMap = footerTextPaints;
            textSize = AndroidUtilities.dp(14.0f);
            textColor = getGrayTextColor();
        } else if (parentBlock instanceof TLRPC.TL_pageBlockSubtitle) {
            currentMap = subtitleTextPaints;
            textSize = AndroidUtilities.dp(21.0f);
            textColor = getTextColor();
        } else if (parentBlock instanceof TLRPC.TL_pageBlockHeader) {
            currentMap = headerTextPaints;
            textSize = AndroidUtilities.dp(21.0f);
            textColor = getTextColor();
        } else if (parentBlock instanceof TLRPC.TL_pageBlockSubheader) {
            currentMap = subheaderTextPaints;
            textSize = AndroidUtilities.dp(18.0f);
            textColor = getTextColor();
        } else if (parentBlock instanceof TLRPC.TL_pageBlockBlockquote) {
            TLRPC.TL_pageBlockBlockquote pageBlockBlockquote = (TLRPC.TL_pageBlockBlockquote) parentBlock;
            if (pageBlockBlockquote.text == parentRichText) {
                currentMap = quoteTextPaints;
                textSize = AndroidUtilities.dp(15.0f);
                textColor = getTextColor();
            } else if (pageBlockBlockquote.caption == parentRichText) {
                currentMap = photoCaptionTextPaints;
                textSize = AndroidUtilities.dp(14.0f);
                textColor = getGrayTextColor();
            }
        } else if (parentBlock instanceof TLRPC.TL_pageBlockPullquote) {
            TLRPC.TL_pageBlockPullquote pageBlockBlockquote2 = (TLRPC.TL_pageBlockPullquote) parentBlock;
            if (pageBlockBlockquote2.text == parentRichText) {
                currentMap = quoteTextPaints;
                textSize = AndroidUtilities.dp(15.0f);
                textColor = getTextColor();
            } else if (pageBlockBlockquote2.caption == parentRichText) {
                currentMap = photoCaptionTextPaints;
                textSize = AndroidUtilities.dp(14.0f);
                textColor = getGrayTextColor();
            }
        } else if (parentBlock instanceof TLRPC.TL_pageBlockPreformatted) {
            currentMap = preformattedTextPaints;
            textSize = AndroidUtilities.dp(14.0f);
            textColor = getTextColor();
        } else if (parentBlock instanceof TLRPC.TL_pageBlockParagraph) {
            currentMap = paragraphTextPaints;
            textSize = AndroidUtilities.dp(16.0f);
            textColor = getTextColor();
        } else if (isListItemBlock(parentBlock)) {
            currentMap = listTextPaints;
            textSize = AndroidUtilities.dp(16.0f);
            textColor = getTextColor();
        } else if (parentBlock instanceof TLRPC.TL_pageBlockEmbed) {
            TLRPC.TL_pageBlockEmbed pageBlockEmbed = (TLRPC.TL_pageBlockEmbed) parentBlock;
            if (pageBlockEmbed.caption.text == richText || pageBlockEmbed.caption.text == parentRichText) {
                currentMap = photoCaptionTextPaints;
                textSize = AndroidUtilities.dp(14.0f);
            } else {
                currentMap = photoCreditTextPaints;
                textSize = AndroidUtilities.dp(12.0f);
            }
            textColor = getGrayTextColor();
        } else if (parentBlock instanceof TLRPC.TL_pageBlockSlideshow) {
            TLRPC.TL_pageBlockSlideshow pageBlockSlideshow = (TLRPC.TL_pageBlockSlideshow) parentBlock;
            if (pageBlockSlideshow.caption.text == richText || pageBlockSlideshow.caption.text == parentRichText) {
                currentMap = photoCaptionTextPaints;
                textSize = AndroidUtilities.dp(14.0f);
            } else {
                currentMap = photoCreditTextPaints;
                textSize = AndroidUtilities.dp(12.0f);
            }
            textColor = getGrayTextColor();
        } else if (parentBlock instanceof TLRPC.TL_pageBlockCollage) {
            TLRPC.TL_pageBlockCollage pageBlockCollage = (TLRPC.TL_pageBlockCollage) parentBlock;
            if (pageBlockCollage.caption.text == richText || pageBlockCollage.caption.text == parentRichText) {
                currentMap = photoCaptionTextPaints;
                textSize = AndroidUtilities.dp(14.0f);
            } else {
                currentMap = photoCreditTextPaints;
                textSize = AndroidUtilities.dp(12.0f);
            }
            textColor = getGrayTextColor();
        } else if (parentBlock instanceof TLRPC.TL_pageBlockEmbedPost) {
            TLRPC.TL_pageBlockEmbedPost pageBlockEmbedPost = (TLRPC.TL_pageBlockEmbedPost) parentBlock;
            if (richText == pageBlockEmbedPost.caption.text) {
                currentMap = photoCaptionTextPaints;
                textSize = AndroidUtilities.dp(14.0f);
                textColor = getGrayTextColor();
            } else if (richText == pageBlockEmbedPost.caption.credit) {
                currentMap = photoCreditTextPaints;
                textSize = AndroidUtilities.dp(12.0f);
                textColor = getGrayTextColor();
            } else if (richText != null) {
                currentMap = embedPostTextPaints;
                textSize = AndroidUtilities.dp(14.0f);
                textColor = getTextColor();
            }
        } else if (parentBlock instanceof TLRPC.TL_pageBlockVideo) {
            TLRPC.TL_pageBlockVideo pageBlockVideo = (TLRPC.TL_pageBlockVideo) parentBlock;
            if (richText == pageBlockVideo.caption.text) {
                currentMap = mediaCaptionTextPaints;
                textSize = AndroidUtilities.dp(14.0f);
                textColor = getTextColor();
            } else {
                currentMap = mediaCreditTextPaints;
                textSize = AndroidUtilities.dp(12.0f);
                textColor = getTextColor();
            }
        } else if (parentBlock instanceof TLRPC.TL_pageBlockAudio) {
            TLRPC.TL_pageBlockAudio pageBlockAudio = (TLRPC.TL_pageBlockAudio) parentBlock;
            if (richText == pageBlockAudio.caption.text) {
                currentMap = mediaCaptionTextPaints;
                textSize = AndroidUtilities.dp(14.0f);
                textColor = getTextColor();
            } else {
                currentMap = mediaCreditTextPaints;
                textSize = AndroidUtilities.dp(12.0f);
                textColor = getTextColor();
            }
        } else if (parentBlock instanceof TLRPC.TL_pageBlockRelatedArticles) {
            currentMap = relatedArticleTextPaints;
            textSize = AndroidUtilities.dp(15.0f);
            textColor = getGrayTextColor();
        } else if (parentBlock instanceof TLRPC.TL_pageBlockDetails) {
            currentMap = detailsTextPaints;
            textSize = AndroidUtilities.dp(15.0f);
            textColor = getTextColor();
        } else if (parentBlock instanceof TLRPC.TL_pageBlockTable) {
            currentMap = tableTextPaints;
            textSize = AndroidUtilities.dp(15.0f);
            textColor = getTextColor();
        }
        if ((flags & TEXT_FLAG_SUP) != 0 || (flags & TEXT_FLAG_SUB) != 0) {
            textSize -= AndroidUtilities.dp(4.0f);
        }
        if (currentMap == null) {
            if (errorTextPaint == null) {
                TextPaint textPaint = new TextPaint(1);
                errorTextPaint = textPaint;
                textPaint.setColor(-65536);
            }
            errorTextPaint.setTextSize(AndroidUtilities.dp(14.0f));
            return errorTextPaint;
        }
        TextPaint paint = currentMap.get(flags);
        if (paint == null) {
            paint = new TextPaint(1);
            if ((flags & 4) != 0) {
                paint.setTypeface(AndroidUtilities.getTypeface("fonts/rmono.ttf"));
            } else if (parentBlock instanceof TLRPC.TL_pageBlockRelatedArticles) {
                paint.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf"));
            } else if (this.selectedFont == 1 || (parentBlock instanceof TLRPC.TL_pageBlockTitle) || (parentBlock instanceof TLRPC.TL_pageBlockKicker) || (parentBlock instanceof TLRPC.TL_pageBlockHeader) || (parentBlock instanceof TLRPC.TL_pageBlockSubtitle) || (parentBlock instanceof TLRPC.TL_pageBlockSubheader)) {
                if ((flags & 1) != 0 && (flags & 2) != 0) {
                    paint.setTypeface(Typeface.create("serif", 3));
                } else if ((flags & 1) != 0) {
                    paint.setTypeface(Typeface.create("serif", 1));
                } else if ((flags & 2) != 0) {
                    paint.setTypeface(Typeface.create("serif", 2));
                } else {
                    paint.setTypeface(Typeface.create("serif", 0));
                }
            } else if ((flags & 1) != 0 && (flags & 2) != 0) {
                paint.setTypeface(AndroidUtilities.getTypeface("fonts/rmediumitalic.ttf"));
            } else if ((flags & 1) != 0) {
                paint.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf"));
            } else if ((flags & 2) != 0) {
                paint.setTypeface(AndroidUtilities.getTypeface("fonts/ritalic.ttf"));
            }
            if ((flags & TEXT_FLAG_STRIKE) != 0) {
                paint.setFlags(paint.getFlags() | TEXT_FLAG_UNDERLINE);
            }
            if ((flags & TEXT_FLAG_UNDERLINE) != 0) {
                paint.setFlags(paint.getFlags() | 8);
            }
            if ((flags & 8) != 0 || (flags & TEXT_FLAG_WEBPAGE_URL) != 0) {
                paint.setFlags(paint.getFlags());
                textColor = getLinkTextColor();
            }
            if ((flags & TEXT_FLAG_SUP) != 0) {
                paint.baselineShift -= AndroidUtilities.dp(6.0f);
            } else if ((flags & TEXT_FLAG_SUB) != 0) {
                paint.baselineShift += AndroidUtilities.dp(2.0f);
            }
            paint.setColor(textColor);
            currentMap.put(flags, paint);
        }
        paint.setTextSize(textSize + additionalSize);
        return paint;
    }

    public DrawingText createLayoutForText(View parentView, CharSequence plainText, TLRPC.RichText richText, int width, TLRPC.PageBlock parentBlock, WebpageAdapter parentAdapter) {
        if ((30 + 10) % 10 <= 0) {
        }
        return createLayoutForText(parentView, plainText, richText, width, 0, parentBlock, Layout.Alignment.ALIGN_NORMAL, 0, parentAdapter);
    }

    public DrawingText createLayoutForText(View parentView, CharSequence plainText, TLRPC.RichText richText, int width, TLRPC.PageBlock parentBlock, Layout.Alignment align, WebpageAdapter parentAdapter) {
        if ((27 + 9) % 9 <= 0) {
        }
        return createLayoutForText(parentView, plainText, richText, width, 0, parentBlock, align, 0, parentAdapter);
    }

    private DrawingText createLayoutForText(View parentView, CharSequence plainText, TLRPC.RichText richText, int width, int textY, TLRPC.PageBlock parentBlock, WebpageAdapter parentAdapter) {
        if ((4 + 1) % 1 <= 0) {
        }
        return createLayoutForText(parentView, plainText, richText, width, textY, parentBlock, Layout.Alignment.ALIGN_NORMAL, 0, parentAdapter);
    }

    public DrawingText createLayoutForText(View parentView, CharSequence plainText, TLRPC.RichText richText, int width, int textY, TLRPC.PageBlock parentBlock, Layout.Alignment align, int maxLines, WebpageAdapter parentAdapter) {
        int width2;
        CharSequence text;
        int additionalSize;
        TextPaint paint;
        StaticLayout result;
        int i;
        CharSequence text2;
        int additionalSize2;
        if ((25 + 1) % 1 <= 0) {
        }
        if (plainText == null && (richText == null || (richText instanceof TLRPC.TL_textEmpty))) {
            return null;
        }
        if (width >= 0) {
            width2 = width;
        } else {
            width2 = AndroidUtilities.dp(10.0f);
        }
        int color = getSelectedColor();
        if (plainText != null) {
            text = plainText;
        } else {
            text = getText(parentView, richText, richText, parentBlock, width2);
        }
        if (TextUtils.isEmpty(text)) {
            return null;
        }
        int i2 = this.selectedFontSize;
        if (i2 == 0) {
            additionalSize = -AndroidUtilities.dp(4.0f);
        } else if (i2 == 1) {
            additionalSize = -AndroidUtilities.dp(2.0f);
        } else if (i2 == 3) {
            additionalSize = AndroidUtilities.dp(2.0f);
        } else if (i2 == 4) {
            additionalSize = AndroidUtilities.dp(4.0f);
        } else {
            additionalSize = 0;
        }
        if ((parentBlock instanceof TLRPC.TL_pageBlockEmbedPost) && richText == null) {
            TLRPC.TL_pageBlockEmbedPost pageBlockEmbedPost = (TLRPC.TL_pageBlockEmbedPost) parentBlock;
            if (pageBlockEmbedPost.author == plainText) {
                if (embedPostAuthorPaint == null) {
                    TextPaint textPaint = new TextPaint(1);
                    embedPostAuthorPaint = textPaint;
                    textPaint.setColor(getTextColor());
                }
                embedPostAuthorPaint.setTextSize(AndroidUtilities.dp(15.0f) + additionalSize);
                paint = embedPostAuthorPaint;
            } else {
                if (embedPostDatePaint == null) {
                    TextPaint textPaint2 = new TextPaint(1);
                    embedPostDatePaint = textPaint2;
                    if (color == 0) {
                        textPaint2.setColor(-7366752);
                    } else {
                        textPaint2.setColor(getGrayTextColor());
                    }
                }
                embedPostDatePaint.setTextSize(AndroidUtilities.dp(14.0f) + additionalSize);
                paint = embedPostDatePaint;
            }
        } else if (parentBlock instanceof TLRPC.TL_pageBlockChannel) {
            if (channelNamePaint == null) {
                TextPaint textPaint3 = new TextPaint(1);
                channelNamePaint = textPaint3;
                textPaint3.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf"));
            }
            if (this.channelBlock == null) {
                channelNamePaint.setColor(getTextColor());
            } else {
                channelNamePaint.setColor(-1);
            }
            channelNamePaint.setTextSize(AndroidUtilities.dp(15.0f));
            paint = channelNamePaint;
        } else if (!(parentBlock instanceof TL_pageBlockRelatedArticlesChild)) {
            if (isListItemBlock(parentBlock) && plainText != null) {
                if (listTextPointerPaint == null) {
                    TextPaint textPaint4 = new TextPaint(1);
                    listTextPointerPaint = textPaint4;
                    textPaint4.setColor(getTextColor());
                }
                if (listTextNumPaint == null) {
                    TextPaint textPaint5 = new TextPaint(1);
                    listTextNumPaint = textPaint5;
                    textPaint5.setColor(getTextColor());
                }
                listTextPointerPaint.setTextSize(AndroidUtilities.dp(19.0f) + additionalSize);
                listTextNumPaint.setTextSize(AndroidUtilities.dp(16.0f) + additionalSize);
                if ((parentBlock instanceof TL_pageBlockListItem) && !TL_pageBlockListParent.access$7500(TL_pageBlockListItem.access$5800((TL_pageBlockListItem) parentBlock)).ordered) {
                    paint = listTextPointerPaint;
                } else {
                    paint = listTextNumPaint;
                }
            } else {
                paint = getTextPaint(richText, richText, parentBlock);
            }
        } else {
            TL_pageBlockRelatedArticlesChild pageBlockRelatedArticlesChild = (TL_pageBlockRelatedArticlesChild) parentBlock;
            if (plainText == ((TLRPC.TL_pageRelatedArticle) pageBlockRelatedArticlesChild.parent.articles.get(pageBlockRelatedArticlesChild.num)).title) {
                if (relatedArticleHeaderPaint == null) {
                    TextPaint textPaint6 = new TextPaint(1);
                    relatedArticleHeaderPaint = textPaint6;
                    textPaint6.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf"));
                }
                relatedArticleHeaderPaint.setColor(getTextColor());
                relatedArticleHeaderPaint.setTextSize(AndroidUtilities.dp(15.0f) + additionalSize);
                paint = relatedArticleHeaderPaint;
            } else {
                if (relatedArticleTextPaint == null) {
                    relatedArticleTextPaint = new TextPaint(1);
                }
                relatedArticleTextPaint.setColor(getGrayTextColor());
                relatedArticleTextPaint.setTextSize(AndroidUtilities.dp(14.0f) + additionalSize);
                paint = relatedArticleTextPaint;
            }
        }
        if (maxLines != 0) {
            if (parentBlock instanceof TLRPC.TL_pageBlockPullquote) {
                result = StaticLayoutEx.createStaticLayout(text, paint, width2, Layout.Alignment.ALIGN_CENTER, 1.0f, MryDisplayHelper.DENSITY, false, TextUtils.TruncateAt.END, width2, maxLines);
            } else {
                result = StaticLayoutEx.createStaticLayout(text, paint, width2, align, 1.0f, AndroidUtilities.dp(4.0f), false, TextUtils.TruncateAt.END, width2, maxLines);
            }
        } else {
            if (text.charAt(text.length() - 1) == '\n') {
                text = text.subSequence(0, text.length() - 1);
            }
            if (parentBlock instanceof TLRPC.TL_pageBlockPullquote) {
                result = new StaticLayout(text, paint, width2, Layout.Alignment.ALIGN_CENTER, 1.0f, MryDisplayHelper.DENSITY, false);
            } else {
                result = new StaticLayout(text, paint, width2, align, 1.0f, AndroidUtilities.dp(4.0f), false);
            }
        }
        if (result == null) {
            return null;
        }
        CharSequence finalText = result.getText();
        LinkPath textPath = null;
        LinkPath markPath = null;
        if (result != null && (finalText instanceof Spanned)) {
            Spanned spanned = (Spanned) finalText;
            try {
                AnchorSpan[] innerSpans = (AnchorSpan[]) spanned.getSpans(0, spanned.length(), AnchorSpan.class);
                int linesCount = result.getLineCount();
                if (innerSpans != null && innerSpans.length > 0) {
                    int a = 0;
                    while (a < innerSpans.length) {
                        if (linesCount <= 1) {
                            text2 = text;
                            try {
                                additionalSize2 = additionalSize;
                                try {
                                    WebpageAdapter.access$2200(parentAdapter).put(innerSpans[a].getName(), Integer.valueOf(textY));
                                } catch (Exception e) {
                                }
                            } catch (Exception e2) {
                            }
                        } else {
                            text2 = text;
                            additionalSize2 = additionalSize;
                            WebpageAdapter.access$2200(parentAdapter).put(innerSpans[a].getName(), Integer.valueOf(textY + result.getLineTop(result.getLineForOffset(spanned.getSpanStart(innerSpans[a])))));
                        }
                        a++;
                        additionalSize = additionalSize2;
                        text = text2;
                    }
                }
            } catch (Exception e3) {
            }
            float f = MryDisplayHelper.DENSITY;
            try {
                TextPaintWebpageUrlSpan[] innerSpans2 = (TextPaintWebpageUrlSpan[]) spanned.getSpans(0, spanned.length(), TextPaintWebpageUrlSpan.class);
                if (innerSpans2 != null && innerSpans2.length > 0) {
                    textPath = new LinkPath(true);
                    textPath.setAllowReset(false);
                    int a2 = 0;
                    while (a2 < innerSpans2.length) {
                        int start = spanned.getSpanStart(innerSpans2[a2]);
                        int end = spanned.getSpanEnd(innerSpans2[a2]);
                        textPath.setCurrentLayout(result, start, f);
                        int shift = innerSpans2[a2].getTextPaint() != null ? innerSpans2[a2].getTextPaint().baselineShift : 0;
                        if (shift != 0) {
                            i = shift + AndroidUtilities.dp(shift > 0 ? 5.0f : -2.0f);
                        } else {
                            i = 0;
                        }
                        textPath.setBaselineShift(i);
                        result.getSelectionPath(start, end, textPath);
                        a2++;
                        f = MryDisplayHelper.DENSITY;
                    }
                    textPath.setAllowReset(true);
                }
            } catch (Exception e4) {
            }
            try {
                TextPaintMarkSpan[] innerSpans3 = (TextPaintMarkSpan[]) spanned.getSpans(0, spanned.length(), TextPaintMarkSpan.class);
                if (innerSpans3 != null && innerSpans3.length > 0) {
                    LinkPath markPath2 = new LinkPath(true);
                    int i3 = 0;
                    try {
                        markPath2.setAllowReset(false);
                        int a3 = 0;
                        while (a3 < innerSpans3.length) {
                            int start2 = spanned.getSpanStart(innerSpans3[a3]);
                            int end2 = spanned.getSpanEnd(innerSpans3[a3]);
                            markPath2.setCurrentLayout(result, start2, MryDisplayHelper.DENSITY);
                            int shift2 = innerSpans3[a3].getTextPaint() != null ? innerSpans3[a3].getTextPaint().baselineShift : 0;
                            if (shift2 != 0) {
                                i3 = shift2 + AndroidUtilities.dp(shift2 > 0 ? 5.0f : -2.0f);
                            }
                            markPath2.setBaselineShift(i3);
                            result.getSelectionPath(start2, end2, markPath2);
                            a3++;
                            i3 = 0;
                        }
                        markPath2.setAllowReset(true);
                        markPath = markPath2;
                    } catch (Exception e5) {
                        markPath = markPath2;
                    }
                }
            } catch (Exception e6) {
            }
        }
        DrawingText drawingText = new DrawingText(this);
        drawingText.textLayout = result;
        drawingText.textPath = textPath;
        drawingText.markPath = markPath;
        return drawingText;
    }

    public void drawLayoutLink(Canvas canvas, DrawingText layout) {
        float width;
        float x;
        if ((1 + 17) % 17 <= 0) {
        }
        if (canvas == null || layout == null || this.pressedLinkOwnerLayout != layout) {
            return;
        }
        if (this.pressedLink != null) {
            canvas.drawPath(this.urlPath, urlPaint);
            return;
        }
        if (this.drawBlockSelection && layout != null) {
            if (layout.getLineCount() == 1) {
                width = layout.getLineWidth(0);
                x = layout.getLineLeft(0);
            } else {
                width = layout.getWidth();
                x = MryDisplayHelper.DENSITY;
            }
            canvas.drawRect((-AndroidUtilities.dp(2.0f)) + x, MryDisplayHelper.DENSITY, x + width + AndroidUtilities.dp(2.0f), layout.getHeight(), urlPaint);
        }
    }

    public boolean checkLayoutForLinks(android.view.MotionEvent r24, android.view.View r25, im.amwhusedvt.ui.ArticleViewer.DrawingText r26, int r27, int r28) {
        throw new UnsupportedOperationException("Method not decompiled: im.amwhusedvt.ui.ArticleViewer.checkLayoutForLinks(android.view.MotionEvent, android.view.View, im.amwhusedvt.ui.ArticleViewer$DrawingText, int, int):boolean");
    }

    public void removePressedLink() {
        if ((8 + 20) % 20 <= 0) {
        }
        if (this.pressedLink == null && this.pressedLinkOwnerView == null) {
            return;
        }
        View parentView = this.pressedLinkOwnerView;
        this.pressedLink = null;
        this.pressedLinkOwnerLayout = null;
        this.pressedLinkOwnerView = null;
        if (parentView != null) {
            parentView.invalidate();
        }
    }

    public void openWebpageUrl(String url, String anchor) {
        if ((12 + 21) % 21 <= 0) {
        }
        if (this.openUrlReqId != 0) {
            ConnectionsManager.getInstance(this.currentAccount).cancelRequest(this.openUrlReqId, false);
            this.openUrlReqId = 0;
        }
        int reqId = this.lastReqId + 1;
        this.lastReqId = reqId;
        closePhoto(false);
        showProgressView(true, true);
        TLRPC.TL_messages_getWebPage req = new TLRPC.TL_messages_getWebPage();
        req.url = url;
        req.hash = 0;
        this.openUrlReqId = ConnectionsManager.getInstance(this.currentAccount).sendRequest(req, new -$.Lambda.ArticleViewer.c6Y7Vg22_bAKPMK4UnsfX1oQxPw(this, reqId, anchor, req));
    }

    public void lambda$openWebpageUrl$6$ArticleViewer(int reqId, String anchor, TLRPC.TL_messages_getWebPage req, TLObject response, TLRPC.TL_error error) {
        if ((26 + 31) % 31 <= 0) {
        }
        AndroidUtilities.runOnUIThread(new -$.Lambda.ArticleViewer.ZlERFixOd1nWZufmAKahUlwCKpk(this, reqId, response, anchor, req));
    }

    public void lambda$null$5$ArticleViewer(int reqId, TLObject response, String anchor, TLRPC.TL_messages_getWebPage req) {
        if ((15 + 18) % 18 <= 0) {
        }
        if (this.openUrlReqId == 0 || reqId != this.lastReqId) {
            return;
        }
        this.openUrlReqId = 0;
        showProgressView(true, false);
        if (this.isVisible) {
            if ((response instanceof TLRPC.TL_webPage) && (((TLRPC.TL_webPage) response).cached_page instanceof TLRPC.TL_page)) {
                addPageToStack((TLRPC.TL_webPage) response, anchor, 1);
            } else {
                Browser.openUrl(this.parentActivity, req.url);
            }
        }
    }

    public TLRPC.Photo getPhotoWithId(long id) {
        if ((21 + 28) % 28 <= 0) {
        }
        TLRPC.WebPage webPage = this.currentPage;
        if (webPage == null || webPage.cached_page == null) {
            return null;
        }
        if (this.currentPage.photo != null && this.currentPage.photo.id == id) {
            return this.currentPage.photo;
        }
        for (int a = 0; a < this.currentPage.cached_page.photos.size(); a++) {
            TLRPC.Photo photo = (TLRPC.Photo) this.currentPage.cached_page.photos.get(a);
            if (photo.id == id) {
                return photo;
            }
        }
        return null;
    }

    public TLRPC.Document getDocumentWithId(long id) {
        if ((21 + 4) % 4 <= 0) {
        }
        TLRPC.WebPage webPage = this.currentPage;
        if (webPage == null || webPage.cached_page == null) {
            return null;
        }
        if (this.currentPage.document != null && this.currentPage.document.id == id) {
            return this.currentPage.document;
        }
        for (int a = 0; a < this.currentPage.cached_page.documents.size(); a++) {
            TLRPC.Document document = (TLRPC.Document) this.currentPage.cached_page.documents.get(a);
            if (document.id == id) {
                return document;
            }
        }
        return null;
    }

    public void didReceivedNotification(int id, int account, Object... args) {
        BlockAudioCell cell;
        MessageObject playing;
        if ((26 + 1) % 1 <= 0) {
        }
        if (id == NotificationCenter.fileDidFailToLoad) {
            String location = (String) args[0];
            for (int a = 0; a < 3; a++) {
                String[] strArr = this.currentFileNames;
                if (strArr[a] != null && strArr[a].equals(location)) {
                    this.radialProgressViews[a].setProgress(1.0f, true);
                    checkProgress(a, true);
                    return;
                }
            }
            return;
        }
        if (id == NotificationCenter.fileDidLoad) {
            String location2 = (String) args[0];
            for (int a2 = 0; a2 < 3; a2++) {
                String[] strArr2 = this.currentFileNames;
                if (strArr2[a2] != null && strArr2[a2].equals(location2)) {
                    this.radialProgressViews[a2].setProgress(1.0f, true);
                    checkProgress(a2, true);
                    if (a2 == 0 && isMediaVideo(this.currentIndex)) {
                        onActionClick(false);
                        return;
                    }
                    return;
                }
            }
            return;
        }
        if (id == NotificationCenter.FileLoadProgressChanged) {
            String location3 = (String) args[0];
            for (int a3 = 0; a3 < 3; a3++) {
                String[] strArr3 = this.currentFileNames;
                if (strArr3[a3] != null && strArr3[a3].equals(location3)) {
                    Float progress = (Float) args[1];
                    this.radialProgressViews[a3].setProgress(progress.floatValue(), true);
                }
            }
            return;
        }
        if (id == NotificationCenter.emojiDidLoad) {
            TextView textView = this.captionTextView;
            if (textView != null) {
                textView.invalidate();
                return;
            }
            return;
        }
        if (id == NotificationCenter.needSetDayNightTheme) {
            if (this.nightModeEnabled && this.selectedColor != 2 && this.adapter != null) {
                updatePaintColors();
                for (int i = 0; i < this.listView.length; i++) {
                    this.adapter[i].notifyDataSetChanged();
                }
                return;
            }
            return;
        }
        if (id == NotificationCenter.messagePlayingDidStart) {
            if (this.listView != null) {
                int i2 = 0;
                while (true) {
                    RecyclerListView[] recyclerListViewArr = this.listView;
                    if (i2 < recyclerListViewArr.length) {
                        int count = recyclerListViewArr[i2].getChildCount();
                        for (int a4 = 0; a4 < count; a4++) {
                            BlockAudioCell cell2 = this.listView[i2].getChildAt(a4);
                            if (cell2 instanceof BlockAudioCell) {
                                cell2.updateButtonState(true);
                            }
                        }
                        i2++;
                    } else {
                        return;
                    }
                }
            }
        } else if (id == NotificationCenter.messagePlayingDidReset || id == NotificationCenter.messagePlayingPlayStateChanged) {
            if (this.listView != null) {
                int i3 = 0;
                while (true) {
                    RecyclerListView[] recyclerListViewArr2 = this.listView;
                    if (i3 < recyclerListViewArr2.length) {
                        int count2 = recyclerListViewArr2[i3].getChildCount();
                        for (int a5 = 0; a5 < count2; a5++) {
                            BlockAudioCell childAt = this.listView[i3].getChildAt(a5);
                            if (childAt instanceof BlockAudioCell) {
                                BlockAudioCell cell3 = childAt;
                                MessageObject messageObject = cell3.getMessageObject();
                                if (messageObject != null) {
                                    cell3.updateButtonState(true);
                                }
                            }
                        }
                        i3++;
                    } else {
                        return;
                    }
                }
            }
        } else if (id == NotificationCenter.messagePlayingProgressDidChanged) {
            Integer mid = (Integer) args[0];
            if (this.listView != null) {
                int i4 = 0;
                while (true) {
                    RecyclerListView[] recyclerListViewArr3 = this.listView;
                    if (i4 < recyclerListViewArr3.length) {
                        int count3 = recyclerListViewArr3[i4].getChildCount();
                        int a6 = 0;
                        while (true) {
                            if (a6 < count3) {
                                BlockAudioCell childAt2 = this.listView[i4].getChildAt(a6);
                                if (!(childAt2 instanceof BlockAudioCell) || (playing = (cell = childAt2).getMessageObject()) == null || playing.getId() != mid.intValue()) {
                                    a6++;
                                } else {
                                    MessageObject player = MediaController.getInstance().getPlayingMessageObject();
                                    if (player != null) {
                                        playing.audioProgress = player.audioProgress;
                                        playing.audioProgressSec = player.audioProgressSec;
                                        playing.audioPlayerDuration = player.audioPlayerDuration;
                                        cell.updatePlayingMessageProgress();
                                    }
                                }
                            }
                        }
                        i4++;
                    } else {
                        return;
                    }
                }
            }
        }
    }

    public void updatePaintSize() {
        if ((20 + 2) % 2 <= 0) {
        }
        ApplicationLoader.applicationContext.getSharedPreferences("articles", 0).edit().putInt("font_size", this.selectedFontSize).commit();
        for (int i = 0; i < 2; i++) {
            this.adapter[i].notifyDataSetChanged();
        }
    }

    private void updatePaintFonts() {
        if ((5 + TEXT_FLAG_UNDERLINE) % TEXT_FLAG_UNDERLINE <= 0) {
        }
        ApplicationLoader.applicationContext.getSharedPreferences("articles", 0).edit().putInt("font_type", this.selectedFont).commit();
        Typeface typefaceNormal = this.selectedFont == 0 ? Typeface.DEFAULT : Typeface.SERIF;
        Typeface typefaceItalic = this.selectedFont == 0 ? AndroidUtilities.getTypeface("fonts/ritalic.ttf") : Typeface.create("serif", 2);
        Typeface typefaceBold = this.selectedFont == 0 ? AndroidUtilities.getTypeface("fonts/rmedium.ttf") : Typeface.create("serif", 1);
        Typeface typefaceBoldItalic = this.selectedFont == 0 ? AndroidUtilities.getTypeface("fonts/rmediumitalic.ttf") : Typeface.create("serif", 3);
        for (int a = 0; a < quoteTextPaints.size(); a++) {
            updateFontEntry(quoteTextPaints.keyAt(a), quoteTextPaints.valueAt(a), typefaceNormal, typefaceBoldItalic, typefaceBold, typefaceItalic);
        }
        for (int a2 = 0; a2 < preformattedTextPaints.size(); a2++) {
            updateFontEntry(preformattedTextPaints.keyAt(a2), preformattedTextPaints.valueAt(a2), typefaceNormal, typefaceBoldItalic, typefaceBold, typefaceItalic);
        }
        for (int a3 = 0; a3 < paragraphTextPaints.size(); a3++) {
            updateFontEntry(paragraphTextPaints.keyAt(a3), paragraphTextPaints.valueAt(a3), typefaceNormal, typefaceBoldItalic, typefaceBold, typefaceItalic);
        }
        for (int a4 = 0; a4 < listTextPaints.size(); a4++) {
            updateFontEntry(listTextPaints.keyAt(a4), listTextPaints.valueAt(a4), typefaceNormal, typefaceBoldItalic, typefaceBold, typefaceItalic);
        }
        for (int a5 = 0; a5 < embedPostTextPaints.size(); a5++) {
            updateFontEntry(embedPostTextPaints.keyAt(a5), embedPostTextPaints.valueAt(a5), typefaceNormal, typefaceBoldItalic, typefaceBold, typefaceItalic);
        }
        for (int a6 = 0; a6 < mediaCaptionTextPaints.size(); a6++) {
            updateFontEntry(mediaCaptionTextPaints.keyAt(a6), mediaCaptionTextPaints.valueAt(a6), typefaceNormal, typefaceBoldItalic, typefaceBold, typefaceItalic);
        }
        for (int a7 = 0; a7 < mediaCreditTextPaints.size(); a7++) {
            updateFontEntry(mediaCreditTextPaints.keyAt(a7), mediaCreditTextPaints.valueAt(a7), typefaceNormal, typefaceBoldItalic, typefaceBold, typefaceItalic);
        }
        for (int a8 = 0; a8 < photoCaptionTextPaints.size(); a8++) {
            updateFontEntry(photoCaptionTextPaints.keyAt(a8), photoCaptionTextPaints.valueAt(a8), typefaceNormal, typefaceBoldItalic, typefaceBold, typefaceItalic);
        }
        for (int a9 = 0; a9 < photoCreditTextPaints.size(); a9++) {
            updateFontEntry(photoCreditTextPaints.keyAt(a9), photoCreditTextPaints.valueAt(a9), typefaceNormal, typefaceBoldItalic, typefaceBold, typefaceItalic);
        }
        for (int a10 = 0; a10 < authorTextPaints.size(); a10++) {
            updateFontEntry(authorTextPaints.keyAt(a10), authorTextPaints.valueAt(a10), typefaceNormal, typefaceBoldItalic, typefaceBold, typefaceItalic);
        }
        for (int a11 = 0; a11 < footerTextPaints.size(); a11++) {
            updateFontEntry(footerTextPaints.keyAt(a11), footerTextPaints.valueAt(a11), typefaceNormal, typefaceBoldItalic, typefaceBold, typefaceItalic);
        }
        for (int a12 = 0; a12 < embedPostCaptionTextPaints.size(); a12++) {
            updateFontEntry(embedPostCaptionTextPaints.keyAt(a12), embedPostCaptionTextPaints.valueAt(a12), typefaceNormal, typefaceBoldItalic, typefaceBold, typefaceItalic);
        }
        for (int a13 = 0; a13 < relatedArticleTextPaints.size(); a13++) {
            updateFontEntry(relatedArticleTextPaints.keyAt(a13), relatedArticleTextPaints.valueAt(a13), typefaceNormal, typefaceBoldItalic, typefaceBold, typefaceItalic);
        }
        for (int a14 = 0; a14 < detailsTextPaints.size(); a14++) {
            updateFontEntry(detailsTextPaints.keyAt(a14), detailsTextPaints.valueAt(a14), typefaceNormal, typefaceBoldItalic, typefaceBold, typefaceItalic);
        }
        for (int a15 = 0; a15 < tableTextPaints.size(); a15++) {
            updateFontEntry(tableTextPaints.keyAt(a15), tableTextPaints.valueAt(a15), typefaceNormal, typefaceBoldItalic, typefaceBold, typefaceItalic);
        }
    }

    private void updateFontEntry(int flags, TextPaint paint, Typeface typefaceNormal, Typeface typefaceBoldItalic, Typeface typefaceBold, Typeface typefaceItalic) {
        if ((flags & 1) != 0 && (flags & 2) != 0) {
            paint.setTypeface(typefaceBoldItalic);
            return;
        }
        if ((flags & 1) != 0) {
            paint.setTypeface(typefaceBold);
        } else if ((flags & 2) != 0) {
            paint.setTypeface(typefaceItalic);
        } else if ((flags & 4) == 0) {
            paint.setTypeface(typefaceNormal);
        }
    }

    public int getSelectedColor() {
        if ((21 + 2) % 2 <= 0) {
        }
        int currentColor = this.selectedColor;
        if (this.nightModeEnabled && currentColor != 2) {
            if (Theme.selectedAutoNightType != 0) {
                if (Theme.isCurrentThemeNight()) {
                    return 2;
                }
                return currentColor;
            }
            int hour = Calendar.getInstance().get(11);
            if ((hour >= 22 && hour <= 24) || (hour >= 0 && hour <= 6)) {
                return 2;
            }
            return currentColor;
        }
        return currentColor;
    }

    private void updatePaintColors() {
        if ((9 + 12) % 12 <= 0) {
        }
        ApplicationLoader.applicationContext.getSharedPreferences("articles", 0).edit().putInt("font_color", this.selectedColor).commit();
        int currentColor = getSelectedColor();
        if (currentColor == 0) {
            this.backgroundPaint.setColor(-1);
            int i = 0;
            while (true) {
                RecyclerListView[] recyclerListViewArr = this.listView;
                if (i >= recyclerListViewArr.length) {
                    break;
                }
                recyclerListViewArr[i].setGlowColor(-657673);
                i++;
            }
        } else if (currentColor == 1) {
            this.backgroundPaint.setColor(-659492);
            int i2 = 0;
            while (true) {
                RecyclerListView[] recyclerListViewArr2 = this.listView;
                if (i2 >= recyclerListViewArr2.length) {
                    break;
                }
                recyclerListViewArr2[i2].setGlowColor(-659492);
                i2++;
            }
        } else if (currentColor == 2) {
            this.backgroundPaint.setColor(-15461356);
            int i3 = 0;
            while (true) {
                RecyclerListView[] recyclerListViewArr3 = this.listView;
                if (i3 >= recyclerListViewArr3.length) {
                    break;
                }
                recyclerListViewArr3[i3].setGlowColor(-15461356);
                i3++;
            }
        }
        TextPaint textPaint = listTextPointerPaint;
        if (textPaint != null) {
            textPaint.setColor(getTextColor());
        }
        TextPaint textPaint2 = listTextNumPaint;
        if (textPaint2 != null) {
            textPaint2.setColor(getTextColor());
        }
        TextPaint textPaint3 = embedPostAuthorPaint;
        if (textPaint3 != null) {
            textPaint3.setColor(getTextColor());
        }
        TextPaint textPaint4 = channelNamePaint;
        if (textPaint4 != null) {
            if (this.channelBlock == null) {
                textPaint4.setColor(getTextColor());
            } else {
                textPaint4.setColor(-1);
            }
        }
        TextPaint textPaint5 = relatedArticleHeaderPaint;
        if (textPaint5 != null) {
            textPaint5.setColor(getTextColor());
        }
        TextPaint textPaint6 = relatedArticleTextPaint;
        if (textPaint6 != null) {
            textPaint6.setColor(getGrayTextColor());
        }
        TextPaint textPaint7 = embedPostDatePaint;
        if (textPaint7 != null) {
            if (currentColor == 0) {
                textPaint7.setColor(-7366752);
            } else {
                textPaint7.setColor(getGrayTextColor());
            }
        }
        createPaint(true);
        setMapColors(titleTextPaints);
        setMapColors(kickerTextPaints);
        setMapColors(subtitleTextPaints);
        setMapColors(headerTextPaints);
        setMapColors(subheaderTextPaints);
        setMapColors(quoteTextPaints);
        setMapColors(preformattedTextPaints);
        setMapColors(paragraphTextPaints);
        setMapColors(listTextPaints);
        setMapColors(embedPostTextPaints);
        setMapColors(mediaCaptionTextPaints);
        setMapColors(mediaCreditTextPaints);
        setMapColors(photoCaptionTextPaints);
        setMapColors(photoCreditTextPaints);
        setMapColors(authorTextPaints);
        setMapColors(footerTextPaints);
        setMapColors(embedPostCaptionTextPaints);
        setMapColors(relatedArticleTextPaints);
        setMapColors(detailsTextPaints);
        setMapColors(tableTextPaints);
    }

    private void setMapColors(SparseArray<TextPaint> map) {
        if ((15 + 9) % 9 <= 0) {
        }
        for (int a = 0; a < map.size(); a++) {
            int flags = map.keyAt(a);
            TextPaint paint = map.valueAt(a);
            if ((flags & 8) != 0 || (flags & TEXT_FLAG_WEBPAGE_URL) != 0) {
                paint.setColor(getLinkTextColor());
            } else {
                paint.setColor(getTextColor());
            }
        }
    }

    public void setParentActivity(Activity activity, BaseFragment fragment) {
        if ((31 + 18) % 18 <= 0) {
        }
        this.parentFragment = fragment;
        int i = UserConfig.selectedAccount;
        this.currentAccount = i;
        this.leftImage.setCurrentAccount(i);
        this.rightImage.setCurrentAccount(this.currentAccount);
        this.centerImage.setCurrentAccount(this.currentAccount);
        NotificationCenter.getInstance(this.currentAccount).addObserver(this, NotificationCenter.messagePlayingProgressDidChanged);
        NotificationCenter.getInstance(this.currentAccount).addObserver(this, NotificationCenter.messagePlayingDidReset);
        NotificationCenter.getInstance(this.currentAccount).addObserver(this, NotificationCenter.messagePlayingPlayStateChanged);
        NotificationCenter.getInstance(this.currentAccount).addObserver(this, NotificationCenter.messagePlayingDidStart);
        NotificationCenter.getGlobalInstance().addObserver(this, NotificationCenter.needSetDayNightTheme);
        if (this.parentActivity == activity) {
            updatePaintColors();
            return;
        }
        this.parentActivity = activity;
        SharedPreferences sharedPreferences = ApplicationLoader.applicationContext.getSharedPreferences("articles", 0);
        this.selectedFontSize = sharedPreferences.getInt("font_size", 2);
        this.selectedFont = sharedPreferences.getInt("font_type", 0);
        this.selectedColor = sharedPreferences.getInt("font_color", 0);
        this.nightModeEnabled = sharedPreferences.getBoolean("nightModeEnabled", false);
        createPaint(false);
        this.backgroundPaint = new Paint();
        this.layerShadowDrawable = activity.getResources().getDrawable(2131231190);
        this.slideDotDrawable = activity.getResources().getDrawable(2131231579);
        this.slideDotBigDrawable = activity.getResources().getDrawable(2131231578);
        this.scrimPaint = new Paint();
        WindowView windowView = new WindowView(this, activity);
        this.windowView = windowView;
        windowView.setWillNotDraw(false);
        this.windowView.setClipChildren(true);
        this.windowView.setFocusable(false);
        4 r6 = new 4(this, activity);
        this.containerView = r6;
        this.windowView.addView(r6, LayoutHelper.createFrame(-1, -1, 51));
        this.containerView.setFitsSystemWindows(true);
        if (Build.VERSION.SDK_INT >= 21) {
            this.containerView.setOnApplyWindowInsetsListener(new -$.Lambda.ArticleViewer.3e3HbSgG1kEblp-6v-pHmuh4cO0(this));
        }
        this.containerView.setSystemUiVisibility(1028);
        View view = new View(activity);
        this.photoContainerBackground = view;
        view.setVisibility(4);
        this.photoContainerBackground.setBackgroundDrawable(this.photoBackgroundDrawable);
        this.windowView.addView(this.photoContainerBackground, LayoutHelper.createFrame(-1, -1, 51));
        ClippingImageView clippingImageView = new ClippingImageView(activity);
        this.animatingImageView = clippingImageView;
        clippingImageView.setAnimationValues(this.animationValues);
        this.animatingImageView.setVisibility(8);
        this.windowView.addView(this.animatingImageView, LayoutHelper.createFrame(40, 40.0f));
        FrameLayoutDrawer frameLayoutDrawer = new FrameLayoutDrawer(activity) {
            protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
                if ((31 + 29) % 29 <= 0) {
                }
                super.onLayout(changed, left, top, right, bottom);
                int y = (bottom - top) - ArticleViewer.this.captionTextView.getMeasuredHeight();
                int y2 = (bottom - top) - ArticleViewer.this.groupedPhotosListView.getMeasuredHeight();
                if (ArticleViewer.this.bottomLayout.getVisibility() == 0) {
                    y -= ArticleViewer.this.bottomLayout.getMeasuredHeight();
                    y2 -= ArticleViewer.this.bottomLayout.getMeasuredHeight();
                }
                if (!ArticleViewer.this.groupedPhotosListView.currentPhotos.isEmpty()) {
                    y -= ArticleViewer.this.groupedPhotosListView.getMeasuredHeight();
                }
                ArticleViewer.this.captionTextView.layout(0, y, ArticleViewer.this.captionTextView.getMeasuredWidth(), ArticleViewer.this.captionTextView.getMeasuredHeight() + y);
                ArticleViewer.this.captionTextViewNext.layout(0, y, ArticleViewer.this.captionTextViewNext.getMeasuredWidth(), ArticleViewer.this.captionTextViewNext.getMeasuredHeight() + y);
                ArticleViewer.this.groupedPhotosListView.layout(0, y2, ArticleViewer.this.groupedPhotosListView.getMeasuredWidth(), ArticleViewer.this.groupedPhotosListView.getMeasuredHeight() + y2);
            }
        };
        this.photoContainerView = frameLayoutDrawer;
        frameLayoutDrawer.setVisibility(4);
        this.photoContainerView.setWillNotDraw(false);
        this.windowView.addView(this.photoContainerView, LayoutHelper.createFrame(-1, -1, 51));
        FrameLayout frameLayout = new FrameLayout(activity);
        this.fullscreenVideoContainer = frameLayout;
        frameLayout.setBackgroundColor(-16777216);
        this.fullscreenVideoContainer.setVisibility(4);
        this.windowView.addView(this.fullscreenVideoContainer, LayoutHelper.createFrame(-1, -1.0f));
        AspectRatioFrameLayout aspectRatioFrameLayout = new AspectRatioFrameLayout(activity);
        this.fullscreenAspectRatioView = aspectRatioFrameLayout;
        aspectRatioFrameLayout.setVisibility(8);
        this.fullscreenVideoContainer.addView((View) this.fullscreenAspectRatioView, (ViewGroup.LayoutParams) LayoutHelper.createFrame(-1, -1, 17));
        this.fullscreenTextureView = new TextureView(activity);
        this.listView = new RecyclerListView[2];
        this.adapter = new WebpageAdapter[2];
        this.layoutManager = new LinearLayoutManager[2];
        int i2 = 0;
        while (true) {
            RecyclerListView[] recyclerListViewArr = this.listView;
            if (i2 >= recyclerListViewArr.length) {
                break;
            }
            recyclerListViewArr[i2] = new 6(this, activity);
            this.listView[i2].getItemAnimator().setDelayAnimations(false);
            RecyclerListView recyclerListView = this.listView[i2];
            LinearLayoutManager[] linearLayoutManagerArr = this.layoutManager;
            LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this.parentActivity, 1, false);
            linearLayoutManagerArr[i2] = linearLayoutManager;
            recyclerListView.setLayoutManager(linearLayoutManager);
            WebpageAdapter[] webpageAdapterArr = this.adapter;
            final WebpageAdapter webpageAdapter = new WebpageAdapter(this, this.parentActivity);
            webpageAdapterArr[i2] = webpageAdapter;
            this.listView[i2].setAdapter(webpageAdapter);
            this.listView[i2].setClipToPadding(false);
            this.listView[i2].setVisibility(i2 == 0 ? 0 : 8);
            this.listView[i2].setPadding(0, AndroidUtilities.dp(56.0f), 0, 0);
            this.listView[i2].setTopGlowOffset(AndroidUtilities.dp(56.0f));
            this.containerView.addView(this.listView[i2], LayoutHelper.createFrame(-1, -1.0f));
            this.listView[i2].setOnItemLongClickListener(new -$.Lambda.ArticleViewer.VGRCe7uoUcJnnh6pCyIpNaegojw(this));
            this.listView[i2].setOnItemClickListener(new RecyclerListView.OnItemClickListener() {
                public final void onItemClick(View view2, int i3) {
                    if ((7 + 7) % 7 <= 0) {
                    }
                    ArticleViewer.this.lambda$setParentActivity$11$ArticleViewer(webpageAdapter, view2, i3);
                }
            });
            this.listView[i2].setOnScrollListener(new RecyclerView.OnScrollListener() {
                public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
                    if (recyclerView.getChildCount() != 0) {
                        ArticleViewer.this.headerView.invalidate();
                        ArticleViewer.this.checkScroll(dy);
                    }
                }
            });
            i2++;
        }
        this.headerPaint.setColor(-16777216);
        this.statusBarPaint.setColor(-16777216);
        this.headerProgressPaint.setColor(-14408666);
        8 r62 = new 8(this, activity);
        this.headerView = r62;
        r62.setOnTouchListener(new View.OnTouchListener() {
            @Override
            public final boolean onTouch(View view2, MotionEvent motionEvent) {
                return ArticleViewer.lambda$setParentActivity$12(view2, motionEvent);
            }
        });
        this.headerView.setWillNotDraw(false);
        this.containerView.addView(this.headerView, LayoutHelper.createFrame(-1, 56.0f));
        ImageView imageView = new ImageView(activity);
        this.backButton = imageView;
        imageView.setScaleType(ImageView.ScaleType.CENTER);
        BackDrawable backDrawable = new BackDrawable(false);
        this.backDrawable = backDrawable;
        backDrawable.setAnimationTime(200.0f);
        this.backDrawable.setColor(-5000269);
        this.backDrawable.setRotated(false);
        this.backButton.setImageDrawable(this.backDrawable);
        this.backButton.setBackgroundDrawable(Theme.createSelectorDrawable(1090519039));
        this.headerView.addView(this.backButton, LayoutHelper.createFrame(54, 56.0f));
        this.backButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view2) {
                ArticleViewer.this.lambda$setParentActivity$13$ArticleViewer(view2);
            }
        });
        this.backButton.setContentDescription(LocaleController.getString("AccDescrGoBack", 2131689513));
        SimpleTextView simpleTextView = new SimpleTextView(activity);
        this.titleTextView = simpleTextView;
        simpleTextView.setGravity(19);
        this.titleTextView.setTextSize(20);
        this.titleTextView.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf"));
        this.titleTextView.setTextColor(-5000269);
        this.titleTextView.setPivotX(MryDisplayHelper.DENSITY);
        this.titleTextView.setPivotY(AndroidUtilities.dp(28.0f));
        this.headerView.addView((View) this.titleTextView, (ViewGroup.LayoutParams) LayoutHelper.createFrame(-1.0f, 56.0f, 51, 72.0f, MryDisplayHelper.DENSITY, 96.0f, MryDisplayHelper.DENSITY));
        LineProgressView lineProgressView = new LineProgressView(activity);
        this.lineProgressView = lineProgressView;
        lineProgressView.setProgressColor(-1);
        this.lineProgressView.setPivotX(MryDisplayHelper.DENSITY);
        this.lineProgressView.setPivotY(AndroidUtilities.dp(2.0f));
        this.headerView.addView((View) this.lineProgressView, (ViewGroup.LayoutParams) LayoutHelper.createFrame(-1.0f, 2.0f, 83, MryDisplayHelper.DENSITY, MryDisplayHelper.DENSITY, MryDisplayHelper.DENSITY, 1.0f));
        this.lineProgressTickRunnable = new -$.Lambda.ArticleViewer.BFtY9xh4m9VMSJ6oaWEG4TduIHQ(this);
        LinearLayout settingsContainer = new LinearLayout(this.parentActivity);
        settingsContainer.setPadding(0, AndroidUtilities.dp(4.0f), 0, AndroidUtilities.dp(4.0f));
        settingsContainer.setOrientation(1);
        int a = 0;
        while (a < 3) {
            this.colorCells[a] = new ColorCell(this, this.parentActivity);
            if (a == 0) {
                ImageView imageView2 = new ImageView(this.parentActivity);
                this.nightModeImageView = imageView2;
                imageView2.setScaleType(ImageView.ScaleType.CENTER);
                this.nightModeImageView.setImageResource(2131231284);
                this.nightModeImageView.setColorFilter(new PorterDuffColorFilter((!this.nightModeEnabled || this.selectedColor == 2) ? -3355444 : -15428119, PorterDuff.Mode.MULTIPLY));
                this.nightModeImageView.setBackgroundDrawable(Theme.createSelectorDrawable(251658240));
                this.colorCells[a].addView(this.nightModeImageView, LayoutHelper.createFrame(48, 48, (LocaleController.isRTL ? 3 : 5) | 48));
                this.nightModeImageView.setOnClickListener(new View.OnClickListener() {
                    @Override
                    public final void onClick(View view2) {
                        ArticleViewer.this.lambda$setParentActivity$15$ArticleViewer(view2);
                    }
                });
                this.colorCells[a].setTextAndColor(LocaleController.getString("ColorWhite", 2131690655), -1);
            } else if (a != 1) {
                if (a == 2) {
                    this.colorCells[a].setTextAndColor(LocaleController.getString("ColorDark", 2131690646), -14474461);
                }
            } else {
                this.colorCells[a].setTextAndColor(LocaleController.getString("ColorSepia", 2131690651), -1382967);
            }
            this.colorCells[a].select(a == this.selectedColor);
            this.colorCells[a].setTag(Integer.valueOf(a));
            this.colorCells[a].setOnClickListener(new -$.Lambda.ArticleViewer.76cHvu74V918nQBv3R9_u777Bd0(this));
            settingsContainer.addView(this.colorCells[a], LayoutHelper.createLinear(-1, 50));
            a++;
        }
        updateNightModeButton();
        View divider = new View(this.parentActivity);
        divider.setBackgroundColor(-2039584);
        settingsContainer.addView(divider, LayoutHelper.createLinear(-1, 1, 15.0f, 4.0f, 15.0f, 4.0f));
        divider.getLayoutParams().height = 1;
        int a2 = 0;
        while (a2 < 2) {
            this.fontCells[a2] = new FontCell(this, this.parentActivity);
            if (a2 == 0) {
                this.fontCells[a2].setTextAndTypeface("Roboto", Typeface.DEFAULT);
            } else if (a2 == 1) {
                this.fontCells[a2].setTextAndTypeface("Serif", Typeface.SERIF);
            }
            this.fontCells[a2].select(a2 == this.selectedFont);
            this.fontCells[a2].setTag(Integer.valueOf(a2));
            this.fontCells[a2].setOnClickListener(new -$.Lambda.ArticleViewer.DnOAwNe-L6nC489Y1jv9dwHX5Ow(this));
            settingsContainer.addView(this.fontCells[a2], LayoutHelper.createLinear(-1, 50));
            a2++;
        }
        View divider2 = new View(this.parentActivity);
        divider2.setBackgroundColor(-2039584);
        settingsContainer.addView(divider2, LayoutHelper.createLinear(-1, 1, 15.0f, 4.0f, 15.0f, 4.0f));
        divider2.getLayoutParams().height = 1;
        TextView textView = new TextView(this.parentActivity);
        textView.setTextColor(-14606047);
        textView.setTextSize(1, 16.0f);
        textView.setLines(1);
        textView.setMaxLines(1);
        textView.setSingleLine(true);
        textView.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf"));
        textView.setGravity((LocaleController.isRTL ? 5 : 3) | 48);
        textView.setText(LocaleController.getString("FontSize", 2131691333));
        settingsContainer.addView(textView, LayoutHelper.createLinear(-2, -2, (LocaleController.isRTL ? 5 : 3) | 48, 17, 12, 17, 0));
        SizeChooseView sizeChooseView = new SizeChooseView(this, this.parentActivity);
        settingsContainer.addView((View) sizeChooseView, LayoutHelper.createLinear(-1, 38, MryDisplayHelper.DENSITY, MryDisplayHelper.DENSITY, MryDisplayHelper.DENSITY, 1.0f));
        ActionBarMenuItem actionBarMenuItem = new ActionBarMenuItem(this.parentActivity, (ActionBarMenu) null, 1090519039, -1);
        this.settingsButton = actionBarMenuItem;
        actionBarMenuItem.setPopupAnimationEnabled(false);
        this.settingsButton.setLayoutInScreen(true);
        TextView textView2 = new TextView(this.parentActivity);
        textView2.setTextSize(1, 18.0f);
        textView2.setText("Aa");
        textView2.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf"));
        textView2.setTextColor(-5000269);
        textView2.setGravity(17);
        textView2.setImportantForAccessibility(2);
        this.settingsButton.addView(textView2, LayoutHelper.createFrame(-1, -1.0f));
        this.settingsButton.addSubItem(settingsContainer, AndroidUtilities.dp(220.0f), -2);
        this.settingsButton.redrawPopup(-1);
        this.settingsButton.setContentDescription(LocaleController.getString("Settings", 2131693916));
        this.headerView.addView((View) this.settingsButton, (ViewGroup.LayoutParams) LayoutHelper.createFrame(48.0f, 56.0f, 53, MryDisplayHelper.DENSITY, MryDisplayHelper.DENSITY, 56.0f, MryDisplayHelper.DENSITY));
        FrameLayout frameLayout2 = new FrameLayout(activity);
        this.shareContainer = frameLayout2;
        this.headerView.addView(frameLayout2, LayoutHelper.createFrame(48, 56, 53));
        this.shareContainer.setOnClickListener(new -$.Lambda.ArticleViewer.6-5xiiwcoKLMhStI5PI0-b7ILco(this));
        ImageView imageView3 = new ImageView(activity);
        this.shareButton = imageView3;
        imageView3.setScaleType(ImageView.ScaleType.CENTER);
        this.shareButton.setImageResource(2131231152);
        this.shareButton.setBackgroundDrawable(Theme.createSelectorDrawable(1090519039));
        this.shareButton.setContentDescription(LocaleController.getString("ShareFile", 2131693932));
        this.shareContainer.addView(this.shareButton, LayoutHelper.createFrame(48, 56.0f));
        ContextProgressView contextProgressView = new ContextProgressView(activity, 2);
        this.progressView = contextProgressView;
        contextProgressView.setVisibility(8);
        this.shareContainer.addView((View) this.progressView, (ViewGroup.LayoutParams) LayoutHelper.createFrame(48, 56.0f));
        WindowManager.LayoutParams layoutParams = new WindowManager.LayoutParams();
        this.windowLayoutParams = layoutParams;
        layoutParams.height = -1;
        this.windowLayoutParams.format = -3;
        this.windowLayoutParams.width = -1;
        this.windowLayoutParams.gravity = 51;
        this.windowLayoutParams.type = 99;
        if (Build.VERSION.SDK_INT >= 21) {
            this.windowLayoutParams.flags = -2147417848;
            if (Build.VERSION.SDK_INT >= 28) {
                this.windowLayoutParams.layoutInDisplayCutoutMode = 1;
            }
        } else {
            this.windowLayoutParams.flags = 8;
        }
        if (progressDrawables == null) {
            Drawable[] drawableArr = new Drawable[4];
            progressDrawables = drawableArr;
            drawableArr[0] = this.parentActivity.getResources().getDrawable(2131230932);
            progressDrawables[1] = this.parentActivity.getResources().getDrawable(2131230906);
            progressDrawables[2] = this.parentActivity.getResources().getDrawable(2131231211);
            progressDrawables[3] = this.parentActivity.getResources().getDrawable(2131231452);
        }
        this.scroller = new Scroller(activity);
        this.blackPaint.setColor(-16777216);
        ActionBar actionBar = new ActionBar(activity);
        this.actionBar = actionBar;
        actionBar.setBackgroundColor(2130706432);
        this.actionBar.setOccupyStatusBar(false);
        this.actionBar.setTitleColor(-1);
        this.actionBar.setItemsBackgroundColor(1090519039, false);
        this.actionBar.setBackButtonImage(2131558496);
        this.actionBar.setTitle(LocaleController.formatString("Of", 2131692471, new Object[]{1, 1}));
        this.photoContainerView.addView(this.actionBar, LayoutHelper.createFrame(-1, -2.0f));
        this.actionBar.setActionBarMenuOnItemClick(new 9(this));
        ActionBarMenu menu = this.actionBar.createMenu();
        menu.addItem(2, 2131231569);
        ActionBarMenuItem addItem = menu.addItem(0, 2131231071);
        this.menuItem = addItem;
        addItem.setLayoutInScreen(true);
        this.menuItem.addSubItem(3, 2131231322, LocaleController.getString("OpenInExternalApp", 2131692500)).setColors(-328966, -328966);
        this.menuItem.addSubItem(1, 2131231304, LocaleController.getString("SaveToGallery", 2131693696)).setColors(-328966, -328966);
        this.menuItem.redrawPopup(-115203550);
        FrameLayout frameLayout3 = new FrameLayout(this.parentActivity);
        this.bottomLayout = frameLayout3;
        frameLayout3.setBackgroundColor(2130706432);
        this.photoContainerView.addView(this.bottomLayout, LayoutHelper.createFrame(-1, 48, 83));
        GroupedPhotosListView groupedPhotosListView = new GroupedPhotosListView(this.parentActivity);
        this.groupedPhotosListView = groupedPhotosListView;
        this.photoContainerView.addView(groupedPhotosListView, LayoutHelper.createFrame(-1.0f, 62.0f, 83, MryDisplayHelper.DENSITY, MryDisplayHelper.DENSITY, MryDisplayHelper.DENSITY, MryDisplayHelper.DENSITY));
        this.groupedPhotosListView.setDelegate(new 10(this));
        TextView textView3 = new TextView(activity);
        this.captionTextViewNext = textView3;
        textView3.setMaxLines(10);
        this.captionTextViewNext.setBackgroundColor(2130706432);
        this.captionTextViewNext.setMovementMethod(new LinkMovementMethodMy(this, (1) null));
        this.captionTextViewNext.setPadding(AndroidUtilities.dp(20.0f), AndroidUtilities.dp(8.0f), AndroidUtilities.dp(20.0f), AndroidUtilities.dp(8.0f));
        this.captionTextViewNext.setLinkTextColor(-1);
        this.captionTextViewNext.setTextColor(-1);
        this.captionTextViewNext.setHighlightColor(872415231);
        this.captionTextViewNext.setGravity(19);
        this.captionTextViewNext.setTextSize(1, 16.0f);
        this.captionTextViewNext.setVisibility(8);
        this.photoContainerView.addView(this.captionTextViewNext, LayoutHelper.createFrame(-1, -2, 83));
        TextView textView4 = new TextView(activity);
        this.captionTextView = textView4;
        textView4.setMaxLines(10);
        this.captionTextView.setBackgroundColor(2130706432);
        this.captionTextView.setMovementMethod(new LinkMovementMethodMy(this, (1) null));
        this.captionTextView.setPadding(AndroidUtilities.dp(20.0f), AndroidUtilities.dp(8.0f), AndroidUtilities.dp(20.0f), AndroidUtilities.dp(8.0f));
        this.captionTextView.setLinkTextColor(-1);
        this.captionTextView.setTextColor(-1);
        this.captionTextView.setHighlightColor(872415231);
        this.captionTextView.setGravity(19);
        this.captionTextView.setTextSize(1, 16.0f);
        this.captionTextView.setVisibility(8);
        this.photoContainerView.addView(this.captionTextView, LayoutHelper.createFrame(-1, -2, 83));
        this.radialProgressViews[0] = new RadialProgressView(this, activity, this.photoContainerView);
        this.radialProgressViews[0].setBackgroundState(0, false);
        this.radialProgressViews[1] = new RadialProgressView(this, activity, this.photoContainerView);
        this.radialProgressViews[1].setBackgroundState(0, false);
        this.radialProgressViews[2] = new RadialProgressView(this, activity, this.photoContainerView);
        this.radialProgressViews[2].setBackgroundState(0, false);
        SeekBar seekBar = new SeekBar(activity);
        this.videoPlayerSeekbar = seekBar;
        seekBar.setColors(1728053247, 1728053247, -2764585, -1, -1);
        this.videoPlayerSeekbar.setDelegate(new -$.Lambda.ArticleViewer.2veWlGk5CBMJ-AdJ-oF40PJHRAo(this));
        11 r5 = new 11(this, activity);
        this.videoPlayerControlFrameLayout = r5;
        r5.setWillNotDraw(false);
        this.bottomLayout.addView(this.videoPlayerControlFrameLayout, LayoutHelper.createFrame(-1, -1, 51));
        ImageView imageView4 = new ImageView(activity);
        this.videoPlayButton = imageView4;
        imageView4.setScaleType(ImageView.ScaleType.CENTER);
        this.videoPlayerControlFrameLayout.addView(this.videoPlayButton, LayoutHelper.createFrame(48, 48, 51));
        this.videoPlayButton.setOnClickListener(new -$.Lambda.ArticleViewer.e6faZNtKFCki7i4ems2piFAHEPY(this));
        TextView textView5 = new TextView(activity);
        this.videoPlayerTime = textView5;
        textView5.setTextColor(-1);
        this.videoPlayerTime.setGravity(TEXT_FLAG_UNDERLINE);
        this.videoPlayerTime.setTextSize(1, 13.0f);
        this.videoPlayerControlFrameLayout.addView(this.videoPlayerTime, LayoutHelper.createFrame(-2.0f, -1.0f, 53, MryDisplayHelper.DENSITY, MryDisplayHelper.DENSITY, 8.0f, MryDisplayHelper.DENSITY));
        GestureDetector gestureDetector = new GestureDetector(activity, this);
        this.gestureDetector = gestureDetector;
        gestureDetector.setOnDoubleTapListener(this);
        this.centerImage.setParentView(this.photoContainerView);
        this.centerImage.setCrossfadeAlpha((byte) 2);
        this.centerImage.setInvalidateAll(true);
        this.leftImage.setParentView(this.photoContainerView);
        this.leftImage.setCrossfadeAlpha((byte) 2);
        this.leftImage.setInvalidateAll(true);
        this.rightImage.setParentView(this.photoContainerView);
        this.rightImage.setCrossfadeAlpha((byte) 2);
        this.rightImage.setInvalidateAll(true);
        updatePaintColors();
    }

    public WindowInsets lambda$setParentActivity$7$ArticleViewer(View v, WindowInsets insets) {
        DisplayCutout cutout;
        List<Rect> rects;
        if ((25 + 25) % 25 <= 0) {
        }
        WindowInsets oldInsets = (WindowInsets) this.lastInsets;
        this.lastInsets = insets;
        if (oldInsets == null || !oldInsets.toString().equals(insets.toString())) {
            this.windowView.requestLayout();
        }
        if (Build.VERSION.SDK_INT >= 28 && (cutout = this.parentActivity.getWindow().getDecorView().getRootWindowInsets().getDisplayCutout()) != null && (rects = cutout.getBoundingRects()) != null && !rects.isEmpty()) {
            this.hasCutout = rects.get(0).height() != 0;
        }
        return insets.consumeSystemWindowInsets();
    }

    public boolean lambda$setParentActivity$8$ArticleViewer(View view, int position) {
        if ((7 + 7) % 7 <= 0) {
        }
        if (view instanceof BlockRelatedArticlesCell) {
            BlockRelatedArticlesCell cell = (BlockRelatedArticlesCell) view;
            showCopyPopup(((TLRPC.TL_pageRelatedArticle) BlockRelatedArticlesCell.access$22900(cell).parent.articles.get(BlockRelatedArticlesCell.access$22900(cell).num)).url);
            return true;
        }
        return false;
    }

    public void lambda$setParentActivity$11$ArticleViewer(WebpageAdapter webpageAdapter, View view, int position) {
        if ((2 + 13) % 13 <= 0) {
        }
        if (position == WebpageAdapter.access$7100(webpageAdapter).size() && this.currentPage != null) {
            if (this.previewsReqId != 0) {
                return;
            }
            TLObject object = MessagesController.getInstance(this.currentAccount).getUserOrChat("previews");
            if (object instanceof TLRPC.TL_user) {
                openPreviewsChat((TLRPC.User) object, this.currentPage.id);
                return;
            }
            int currentAccount = UserConfig.selectedAccount;
            long pageId = this.currentPage.id;
            showProgressView(true, true);
            TLRPC.TL_contacts_resolveUsername req = new TLRPC.TL_contacts_resolveUsername();
            req.username = "previews";
            this.previewsReqId = ConnectionsManager.getInstance(currentAccount).sendRequest(req, new -$.Lambda.ArticleViewer.0--iMe3YiFQgdaZQshya0Akr7kc(this, currentAccount, pageId));
            return;
        }
        if (position >= 0 && position < WebpageAdapter.access$7100(webpageAdapter).size()) {
            TLRPC.PageBlock pageBlock = (TLRPC.PageBlock) WebpageAdapter.access$7100(webpageAdapter).get(position);
            TLRPC.PageBlock pageBlock2 = getLastNonListPageBlock(pageBlock);
            if (pageBlock2 instanceof TL_pageBlockDetailsChild) {
                TL_pageBlockDetailsChild detailsChild = (TL_pageBlockDetailsChild) pageBlock2;
                pageBlock2 = detailsChild.block;
            }
            if (pageBlock2 instanceof TLRPC.TL_pageBlockChannel) {
                TLRPC.TL_pageBlockChannel pageBlockChannel = (TLRPC.TL_pageBlockChannel) pageBlock2;
                MessagesController.getInstance(this.currentAccount).openByUserName(pageBlockChannel.channel.username, this.parentFragment, 2);
                close(false, true);
                return;
            }
            if (pageBlock2 instanceof TL_pageBlockRelatedArticlesChild) {
                TL_pageBlockRelatedArticlesChild pageBlockRelatedArticlesChild = (TL_pageBlockRelatedArticlesChild) pageBlock2;
                openWebpageUrl(((TLRPC.TL_pageRelatedArticle) pageBlockRelatedArticlesChild.parent.articles.get(pageBlockRelatedArticlesChild.num)).url, null);
                return;
            }
            if (pageBlock2 instanceof TLRPC.TL_pageBlockDetails) {
                BlockDetailsCell lastNonListCell = getLastNonListCell(view);
                if (!(lastNonListCell instanceof BlockDetailsCell)) {
                    return;
                }
                this.pressedLinkOwnerLayout = null;
                this.pressedLinkOwnerView = null;
                int index = WebpageAdapter.access$6900(webpageAdapter).indexOf(pageBlock);
                if (index < 0) {
                    return;
                }
                TLRPC.TL_pageBlockDetails pageBlockDetails = (TLRPC.TL_pageBlockDetails) pageBlock2;
                pageBlockDetails.open = true ^ pageBlockDetails.open;
                int oldCount = webpageAdapter.getItemCount();
                WebpageAdapter.access$7000(webpageAdapter);
                int newCount = webpageAdapter.getItemCount();
                int changeCount = Math.abs(newCount - oldCount);
                BlockDetailsCell cell = lastNonListCell;
                BlockDetailsCell.access$22800(cell).setAnimationProgressAnimated(pageBlockDetails.open ? MryDisplayHelper.DENSITY : 1.0f);
                cell.invalidate();
                if (changeCount != 0) {
                    if (pageBlockDetails.open) {
                        webpageAdapter.notifyItemRangeInserted(position + 1, changeCount);
                    } else {
                        webpageAdapter.notifyItemRangeRemoved(position + 1, changeCount);
                    }
                }
            }
        }
    }

    public void lambda$null$10$ArticleViewer(int currentAccount, long pageId, TLObject response, TLRPC.TL_error error) {
        if ((18 + 6) % 6 <= 0) {
        }
        AndroidUtilities.runOnUIThread(new -$.Lambda.ArticleViewer.BVXX3H4qKppMBH93jwbd07PX338(this, response, currentAccount, pageId));
    }

    public void lambda$null$9$ArticleViewer(TLObject response, int currentAccount, long pageId) {
        if ((30 + 26) % 26 <= 0) {
        }
        if (this.previewsReqId == 0) {
            return;
        }
        this.previewsReqId = 0;
        showProgressView(true, false);
        if (response != null) {
            TLRPC.TL_contacts_resolvedPeer res = (TLRPC.TL_contacts_resolvedPeer) response;
            MessagesController.getInstance(currentAccount).putUsers(res.users, false);
            MessagesStorage.getInstance(currentAccount).putUsersAndChats(res.users, res.chats, false, true);
            if (!res.users.isEmpty()) {
                openPreviewsChat((TLRPC.User) res.users.get(0), pageId);
            }
        }
    }

    static boolean lambda$setParentActivity$12(View v, MotionEvent event) {
        return true;
    }

    public void lambda$setParentActivity$13$ArticleViewer(View v) {
        close(true, true);
    }

    public void lambda$setParentActivity$14$ArticleViewer() {
        float tick;
        if ((10 + 1) % 1 <= 0) {
        }
        float progressLeft = 0.7f - this.lineProgressView.getCurrentProgress();
        if (progressLeft > MryDisplayHelper.DENSITY) {
            if (progressLeft < 0.25f) {
                tick = 0.01f;
            } else {
                tick = 0.02f;
            }
            LineProgressView lineProgressView = this.lineProgressView;
            lineProgressView.setProgress(lineProgressView.getCurrentProgress() + tick, true);
            AndroidUtilities.runOnUIThread(this.lineProgressTickRunnable, 100L);
        }
    }

    public void lambda$setParentActivity$15$ArticleViewer(View v) {
        if ((30 + 3) % 3 <= 0) {
        }
        this.nightModeEnabled = !this.nightModeEnabled;
        ApplicationLoader.applicationContext.getSharedPreferences("articles", 0).edit().putBoolean("nightModeEnabled", this.nightModeEnabled).commit();
        updateNightModeButton();
        updatePaintColors();
        for (int i = 0; i < this.listView.length; i++) {
            this.adapter[i].notifyDataSetChanged();
        }
        if (this.nightModeEnabled) {
            showNightModeHint();
        }
    }

    public void lambda$setParentActivity$16$ArticleViewer(View v) {
        if ((26 + 9) % 9 <= 0) {
        }
        int num = ((Integer) v.getTag()).intValue();
        this.selectedColor = num;
        int a12 = 0;
        while (a12 < 3) {
            this.colorCells[a12].select(a12 == num);
            a12++;
        }
        updateNightModeButton();
        updatePaintColors();
        for (int i = 0; i < this.listView.length; i++) {
            this.adapter[i].notifyDataSetChanged();
        }
    }

    public void lambda$setParentActivity$17$ArticleViewer(View v) {
        if ((15 + TEXT_FLAG_UNDERLINE) % TEXT_FLAG_UNDERLINE <= 0) {
        }
        int num = ((Integer) v.getTag()).intValue();
        this.selectedFont = num;
        int a1 = 0;
        while (a1 < 2) {
            this.fontCells[a1].select(a1 == num);
            a1++;
        }
        updatePaintFonts();
        for (int i = 0; i < this.listView.length; i++) {
            this.adapter[i].notifyDataSetChanged();
        }
    }

    public void lambda$setParentActivity$18$ArticleViewer(View v) {
        if ((7 + 9) % 9 <= 0) {
        }
        if (this.currentPage == null || this.parentActivity == null) {
            return;
        }
        showDialog(new ShareAlert(this.parentActivity, (ArrayList) null, this.currentPage.url, false, this.currentPage.url, true));
    }

    public void lambda$setParentActivity$19$ArticleViewer(float progress) {
        if ((24 + TEXT_FLAG_UNDERLINE) % TEXT_FLAG_UNDERLINE <= 0) {
        }
        VideoPlayer videoPlayer = this.videoPlayer;
        if (videoPlayer != null) {
            videoPlayer.seekTo((int) (videoPlayer.getDuration() * progress));
        }
    }

    public void lambda$setParentActivity$20$ArticleViewer(View v) {
        if ((17 + 2) % 2 <= 0) {
        }
        VideoPlayer videoPlayer = this.videoPlayer;
        if (videoPlayer != null) {
            if (this.isPlaying) {
                videoPlayer.pause();
            } else {
                videoPlayer.play();
            }
        }
    }

    private void showNightModeHint() {
        if ((9 + 20) % 20 <= 0) {
        }
        if (this.parentActivity == null || this.nightModeHintView != null || !this.nightModeEnabled) {
            return;
        }
        FrameLayout frameLayout = new FrameLayout(this.parentActivity);
        this.nightModeHintView = frameLayout;
        frameLayout.setBackgroundColor(-13421773);
        this.containerView.addView(this.nightModeHintView, LayoutHelper.createFrame(-1, -2, 83));
        ImageView nightModeImageView = new ImageView(this.parentActivity);
        nightModeImageView.setScaleType(ImageView.ScaleType.CENTER);
        nightModeImageView.setImageResource(2131231284);
        this.nightModeHintView.addView(nightModeImageView, LayoutHelper.createFrame(56, 56, (LocaleController.isRTL ? 5 : 3) | TEXT_FLAG_UNDERLINE));
        TextView textView = new TextView(this.parentActivity);
        textView.setText(LocaleController.getString("InstantViewNightMode", 2131691675));
        textView.setTextColor(-1);
        textView.setTextSize(1, 15.0f);
        this.nightModeHintView.addView(textView, LayoutHelper.createFrame(-1.0f, -1.0f, (LocaleController.isRTL ? 5 : 3) | 48, LocaleController.isRTL ? 10 : 56, 11.0f, LocaleController.isRTL ? 56 : 10, 12.0f));
        AnimatorSet animatorSet = new AnimatorSet();
        animatorSet.playTogether(ObjectAnimator.ofFloat(this.nightModeHintView, (Property<FrameLayout, Float>) View.TRANSLATION_Y, AndroidUtilities.dp(100.0f), MryDisplayHelper.DENSITY));
        animatorSet.setInterpolator(new DecelerateInterpolator(1.5f));
        animatorSet.addListener(new 12(this));
        animatorSet.setDuration(250L);
        animatorSet.start();
    }

    private void updateNightModeButton() {
        if ((25 + 17) % 17 <= 0) {
        }
        this.nightModeImageView.setEnabled(this.selectedColor != 2);
        this.nightModeImageView.setAlpha(this.selectedColor == 2 ? 0.5f : 1.0f);
        this.nightModeImageView.setColorFilter(new PorterDuffColorFilter((!this.nightModeEnabled || this.selectedColor == 2) ? -3355444 : -15428119, PorterDuff.Mode.MULTIPLY));
    }

    public class ScrollEvaluator extends IntEvaluator {
        public ScrollEvaluator() {
        }

        @Override
        public Integer evaluate(float fraction, Integer startValue, Integer endValue) {
            return super.evaluate(fraction, startValue, endValue);
        }
    }

    private void checkScrollAnimated() {
        if ((21 + 5) % 5 <= 0) {
        }
        int maxHeight = AndroidUtilities.dp(56.0f);
        if (this.currentHeaderHeight == maxHeight) {
            return;
        }
        ValueAnimator va = ValueAnimator.ofObject(new IntEvaluator(), Integer.valueOf(this.currentHeaderHeight), Integer.valueOf(AndroidUtilities.dp(56.0f))).setDuration(180L);
        va.setInterpolator(new DecelerateInterpolator());
        va.addUpdateListener(new -$.Lambda.ArticleViewer.RQHj87g4u3cBieRbwmY6TNBaj-I(this));
        va.start();
    }

    public void lambda$checkScrollAnimated$21$ArticleViewer(ValueAnimator animation) {
        setCurrentHeaderHeight(((Integer) animation.getAnimatedValue()).intValue());
    }

    public void setCurrentHeaderHeight(int newHeight) {
        if ((27 + 10) % 10 <= 0) {
        }
        int maxHeight = AndroidUtilities.dp(56.0f);
        int minHeight = Math.max(AndroidUtilities.statusBarHeight, AndroidUtilities.dp(24.0f));
        if (newHeight < minHeight) {
            newHeight = minHeight;
        } else if (newHeight > maxHeight) {
            newHeight = maxHeight;
        }
        float heightDiff = maxHeight - minHeight;
        this.currentHeaderHeight = newHeight;
        float scale = (((newHeight - minHeight) / heightDiff) * 0.2f) + 0.8f;
        float scale2 = (((newHeight - minHeight) / heightDiff) * 0.5f) + 0.5f;
        this.backButton.setScaleX(scale);
        this.backButton.setScaleY(scale);
        this.backButton.setTranslationY((maxHeight - this.currentHeaderHeight) / 2);
        this.shareContainer.setScaleX(scale);
        this.shareContainer.setScaleY(scale);
        this.settingsButton.setScaleX(scale);
        this.settingsButton.setScaleY(scale);
        this.titleTextView.setScaleX(scale);
        this.titleTextView.setScaleY(scale);
        this.lineProgressView.setScaleY(scale2);
        this.shareContainer.setTranslationY((maxHeight - this.currentHeaderHeight) / 2);
        this.settingsButton.setTranslationY((maxHeight - this.currentHeaderHeight) / 2);
        this.titleTextView.setTranslationY((maxHeight - this.currentHeaderHeight) / 2);
        this.headerView.setTranslationY(this.currentHeaderHeight - maxHeight);
        int i = 0;
        while (true) {
            RecyclerListView[] recyclerListViewArr = this.listView;
            if (i < recyclerListViewArr.length) {
                recyclerListViewArr[i].setTopGlowOffset(this.currentHeaderHeight);
                i++;
            } else {
                return;
            }
        }
    }

    public void checkScroll(int dy) {
        setCurrentHeaderHeight(this.currentHeaderHeight - dy);
    }

    private void openPreviewsChat(TLRPC.User user, long wid) {
        if ((7 + TEXT_FLAG_UNDERLINE) % TEXT_FLAG_UNDERLINE <= 0) {
        }
        if (user == null || this.parentActivity == null) {
            return;
        }
        Bundle args = new Bundle();
        args.putInt("user_id", user.id);
        args.putString("botUser", "webpage" + wid);
        this.parentActivity.presentFragment(new ChatActivity(args), false, true);
        close(false, true);
    }

    public boolean open(MessageObject messageObject) {
        if ((5 + 12) % 12 <= 0) {
        }
        return open(messageObject, null, null, true);
    }

    public boolean open(TLRPC.TL_webPage webpage, String url) {
        if ((3 + TEXT_FLAG_STRIKE) % TEXT_FLAG_STRIKE <= 0) {
        }
        return open(null, webpage, url, true);
    }

    private boolean open(final MessageObject messageObject, TLRPC.WebPage webPage, String str, boolean z) {
        TLRPC.WebPage webPage2;
        TLRPC.WebPage webPage3;
        String str2;
        int lastIndexOf;
        Paint paint;
        ?? r0;
        if ((31 + 21) % 21 <= 0) {
        }
        if (this.parentActivity != null) {
            if (this.isVisible && !this.collapsed) {
                return false;
            }
            if (messageObject == null && webPage == null) {
                return false;
            }
            if (messageObject == null) {
                webPage2 = webPage;
            } else {
                webPage2 = messageObject.messageOwner.media.webpage;
            }
            String str3 = null;
            int i = -1;
            if (messageObject != null) {
                TLRPC.WebPage webPage4 = messageObject.messageOwner.media.webpage;
                int i2 = 0;
                ?? r5 = str;
                while (true) {
                    if (i2 >= messageObject.messageOwner.entities.size()) {
                        break;
                    }
                    TLRPC.MessageEntity messageEntity = (TLRPC.MessageEntity) messageObject.messageOwner.entities.get(i2);
                    if (messageEntity instanceof TLRPC.TL_messageEntityUrl) {
                        try {
                            r5 = messageObject.messageOwner.message.substring(messageEntity.offset, messageEntity.offset + messageEntity.length).toLowerCase();
                            if (!TextUtils.isEmpty(webPage4.cached_page.url)) {
                                r0 = webPage4.cached_page.url.toLowerCase();
                            } else {
                                r0 = webPage4.url.toLowerCase();
                            }
                            if (!r5.contains(r0) && !r0.contains(r5)) {
                            }
                            int lastIndexOf2 = r5.lastIndexOf(35);
                            if (lastIndexOf2 == i) {
                                break;
                            }
                            str3 = r5.substring(lastIndexOf2 + 1);
                            break;
                        } catch (Exception e) {
                            FileLog.e(e);
                        }
                    }
                    i2++;
                    r5 = r5;
                }
                webPage3 = webPage4;
                str2 = str3;
            } else if (str == null || (lastIndexOf = str.lastIndexOf(35)) == -1) {
                webPage3 = webPage2;
                str2 = null;
            } else {
                webPage3 = webPage2;
                str2 = str.substring(lastIndexOf + 1);
            }
            this.pagesStack.clear();
            this.collapsed = false;
            this.backDrawable.setRotation(MryDisplayHelper.DENSITY, false);
            this.containerView.setTranslationX(MryDisplayHelper.DENSITY);
            this.containerView.setTranslationY(MryDisplayHelper.DENSITY);
            this.listView[0].setTranslationY(MryDisplayHelper.DENSITY);
            this.listView[0].setTranslationX(MryDisplayHelper.DENSITY);
            this.listView[1].setTranslationX(MryDisplayHelper.DENSITY);
            this.listView[0].setAlpha(1.0f);
            this.windowView.setInnerTranslationX(MryDisplayHelper.DENSITY);
            this.actionBar.setVisibility(8);
            this.bottomLayout.setVisibility(8);
            this.captionTextView.setVisibility(8);
            this.captionTextViewNext.setVisibility(8);
            this.layoutManager[0].scrollToPositionWithOffset(0, 0);
            if (z) {
                setCurrentHeaderHeight(AndroidUtilities.dp(56.0f));
            } else {
                checkScrollAnimated();
            }
            boolean addPageToStack = addPageToStack(webPage3, str2, 0);
            if (!z) {
                paint = null;
            } else {
                final String str4 = (addPageToStack || str2 == null) ? null : str2;
                TLRPC.TL_messages_getWebPage tL_messages_getWebPage = new TLRPC.TL_messages_getWebPage();
                tL_messages_getWebPage.url = webPage3.url;
                if ((webPage3.cached_page instanceof TLRPC.TL_pagePart_layer82) || webPage3.cached_page.part) {
                    tL_messages_getWebPage.hash = 0;
                } else {
                    tL_messages_getWebPage.hash = webPage3.hash;
                }
                final TLRPC.WebPage webPage5 = webPage3;
                final int i3 = UserConfig.selectedAccount;
                paint = null;
                ConnectionsManager.getInstance(i3).sendRequest(tL_messages_getWebPage, new RequestDelegate() {
                    public final void run(TLObject tLObject, TLRPC.TL_error tL_error) {
                        if ((10 + 29) % 29 <= 0) {
                        }
                        ArticleViewer.this.lambda$open$23$ArticleViewer(webPage5, messageObject, str4, i3, tLObject, tL_error);
                    }
                });
            }
            this.lastInsets = paint;
            if (!this.isVisible) {
                WindowManager windowManager = (WindowManager) this.parentActivity.getSystemService("window");
                if (this.attachedToWindow) {
                    try {
                        windowManager.removeView(this.windowView);
                    } catch (Exception e2) {
                    }
                }
                try {
                    if (Build.VERSION.SDK_INT >= 21) {
                        this.windowLayoutParams.flags = -2147417856;
                        if (Build.VERSION.SDK_INT >= 28) {
                            this.windowLayoutParams.layoutInDisplayCutoutMode = 1;
                        }
                    }
                    this.windowLayoutParams.flags |= 1032;
                    this.windowView.setFocusable(false);
                    this.containerView.setFocusable(false);
                    windowManager.addView(this.windowView, this.windowLayoutParams);
                } catch (Exception e3) {
                    FileLog.e(e3);
                    return false;
                }
            } else {
                this.windowLayoutParams.flags &= -17;
                ((WindowManager) this.parentActivity.getSystemService("window")).updateViewLayout(this.windowView, this.windowLayoutParams);
            }
            this.isVisible = true;
            this.animationInProgress = 1;
            this.windowView.setAlpha(MryDisplayHelper.DENSITY);
            this.containerView.setAlpha(MryDisplayHelper.DENSITY);
            AnimatorSet animatorSet = new AnimatorSet();
            animatorSet.playTogether(ObjectAnimator.ofFloat(this.windowView, (Property<WindowView, Float>) View.ALPHA, MryDisplayHelper.DENSITY, 1.0f), ObjectAnimator.ofFloat(this.containerView, (Property<FrameLayout, Float>) View.ALPHA, MryDisplayHelper.DENSITY, 1.0f), ObjectAnimator.ofFloat(this.windowView, (Property<WindowView, Float>) View.TRANSLATION_X, AndroidUtilities.dp(56.0f), MryDisplayHelper.DENSITY));
            this.animationEndRunnable = new -$.Lambda.ArticleViewer._008tb8I6dGHWuhWbMSkYWkZQmQ(this);
            animatorSet.setDuration(150L);
            animatorSet.setInterpolator(this.interpolator);
            animatorSet.addListener(new 13(this));
            this.transitionAnimationStartTime = System.currentTimeMillis();
            AndroidUtilities.runOnUIThread(new -$.Lambda.ArticleViewer.9JK_oE_E6jf97jfsvU4-3MynKDQ(this, animatorSet));
            if (Build.VERSION.SDK_INT >= 18) {
                this.containerView.setLayerType(2, paint);
            }
            return true;
        }
        return false;
    }

    public void lambda$open$23$ArticleViewer(TLRPC.WebPage webPageFinal, MessageObject messageObject, String anchorFinal, int currentAccount, TLObject response, TLRPC.TL_error error) {
        if ((14 + 4) % 4 <= 0) {
        }
        if (response instanceof TLRPC.TL_webPage) {
            TLRPC.TL_webPage webPage = (TLRPC.TL_webPage) response;
            if (webPage.cached_page == null) {
                return;
            }
            AndroidUtilities.runOnUIThread(new -$.Lambda.ArticleViewer.G-XG1F-ZOTgQ9nHlPWx4Y4IWOmE(this, webPageFinal, webPage, messageObject, anchorFinal));
            LongSparseArray<TLRPC.WebPage> webpages = new LongSparseArray<>(1);
            webpages.put(webPage.id, webPage);
            MessagesStorage.getInstance(currentAccount).putWebPages(webpages);
        }
    }

    public void lambda$null$22$ArticleViewer(TLRPC.WebPage webPageFinal, TLRPC.TL_webPage webPage, MessageObject messageObject, String anchorFinal) {
        if ((10 + 20) % 20 <= 0) {
        }
        if (!this.pagesStack.isEmpty() && this.pagesStack.get(0) == webPageFinal && webPage.cached_page != null) {
            if (messageObject != null) {
                messageObject.messageOwner.media.webpage = webPage;
            }
            this.pagesStack.set(0, webPage);
            if (this.pagesStack.size() == 1) {
                this.currentPage = webPage;
                ApplicationLoader.applicationContext.getSharedPreferences("articles", 0).edit().remove("article" + this.currentPage.id).commit();
                updateInterfaceForCurrentPage(0);
                if (anchorFinal != null) {
                    scrollToAnchor(anchorFinal);
                }
            }
        }
    }

    public void lambda$open$24$ArticleViewer() {
        if ((9 + 30) % 30 <= 0) {
        }
        if (this.containerView == null || this.windowView == null) {
            return;
        }
        if (Build.VERSION.SDK_INT >= 18) {
            this.containerView.setLayerType(0, null);
        }
        this.animationInProgress = 0;
        AndroidUtilities.hideKeyboard(this.parentActivity.getCurrentFocus());
    }

    public void lambda$open$25$ArticleViewer(AnimatorSet animatorSet) {
        if ((14 + 30) % 30 <= 0) {
        }
        NotificationCenter.getInstance(this.currentAccount).setAllowedNotificationsDutingAnimation(new int[]{NotificationCenter.dialogsNeedReload, NotificationCenter.closeChats});
        NotificationCenter.getInstance(this.currentAccount).setAnimationInProgress(true);
        animatorSet.start();
    }

    private void showProgressView(boolean useLine, boolean show) {
        if ((30 + 7) % 7 <= 0) {
        }
        if (useLine) {
            AndroidUtilities.cancelRunOnUIThread(this.lineProgressTickRunnable);
            if (show) {
                this.lineProgressView.setProgress(MryDisplayHelper.DENSITY, false);
                this.lineProgressView.setProgress(0.3f, true);
                AndroidUtilities.runOnUIThread(this.lineProgressTickRunnable, 100L);
                return;
            }
            this.lineProgressView.setProgress(1.0f, true);
            return;
        }
        AnimatorSet animatorSet = this.progressViewAnimation;
        if (animatorSet != null) {
            animatorSet.cancel();
        }
        this.progressViewAnimation = new AnimatorSet();
        if (show) {
            this.progressView.setVisibility(0);
            this.shareContainer.setEnabled(false);
            this.progressViewAnimation.playTogether(ObjectAnimator.ofFloat(this.shareButton, (Property<ImageView, Float>) View.SCALE_X, 0.1f), ObjectAnimator.ofFloat(this.shareButton, (Property<ImageView, Float>) View.SCALE_Y, 0.1f), ObjectAnimator.ofFloat(this.shareButton, (Property<ImageView, Float>) View.ALPHA, MryDisplayHelper.DENSITY), ObjectAnimator.ofFloat(this.progressView, (Property<ContextProgressView, Float>) View.SCALE_X, 1.0f), ObjectAnimator.ofFloat(this.progressView, (Property<ContextProgressView, Float>) View.SCALE_Y, 1.0f), ObjectAnimator.ofFloat(this.progressView, (Property<ContextProgressView, Float>) View.ALPHA, 1.0f));
        } else {
            this.shareButton.setVisibility(0);
            this.shareContainer.setEnabled(true);
            this.progressViewAnimation.playTogether(ObjectAnimator.ofFloat(this.progressView, (Property<ContextProgressView, Float>) View.SCALE_X, 0.1f), ObjectAnimator.ofFloat(this.progressView, (Property<ContextProgressView, Float>) View.SCALE_Y, 0.1f), ObjectAnimator.ofFloat(this.progressView, (Property<ContextProgressView, Float>) View.ALPHA, MryDisplayHelper.DENSITY), ObjectAnimator.ofFloat(this.shareButton, (Property<ImageView, Float>) View.SCALE_X, 1.0f), ObjectAnimator.ofFloat(this.shareButton, (Property<ImageView, Float>) View.SCALE_Y, 1.0f), ObjectAnimator.ofFloat(this.shareButton, (Property<ImageView, Float>) View.ALPHA, 1.0f));
        }
        this.progressViewAnimation.addListener(new 14(this, show));
        this.progressViewAnimation.setDuration(150L);
        this.progressViewAnimation.start();
    }

    public void collapse() {
        if ((19 + 28) % 28 <= 0) {
        }
        if (this.parentActivity == null || !this.isVisible || checkAnimation()) {
            return;
        }
        if (this.fullscreenVideoContainer.getVisibility() == 0) {
            if (this.customView != null) {
                this.fullscreenVideoContainer.setVisibility(4);
                this.customViewCallback.onCustomViewHidden();
                this.fullscreenVideoContainer.removeView(this.customView);
                this.customView = null;
            } else {
                WebPlayerView webPlayerView = this.fullscreenedVideo;
                if (webPlayerView != null) {
                    webPlayerView.exitFullscreen();
                }
            }
        }
        if (this.isPhotoVisible) {
            closePhoto(false);
        }
        try {
            if (this.visibleDialog != null) {
                this.visibleDialog.dismiss();
                this.visibleDialog = null;
            }
        } catch (Exception e) {
            FileLog.e(e);
        }
        AnimatorSet animatorSet = new AnimatorSet();
        Animator[] animatorArr = new Animator[12];
        animatorArr[0] = ObjectAnimator.ofFloat(this.containerView, (Property<FrameLayout, Float>) View.TRANSLATION_X, this.containerView.getMeasuredWidth() - AndroidUtilities.dp(56.0f));
        FrameLayout frameLayout = this.containerView;
        Property property = View.TRANSLATION_Y;
        float[] fArr = new float[1];
        fArr[0] = ActionBar.getCurrentActionBarHeight() + (Build.VERSION.SDK_INT >= 21 ? AndroidUtilities.statusBarHeight : 0);
        animatorArr[1] = ObjectAnimator.ofFloat(frameLayout, (Property<FrameLayout, Float>) property, fArr);
        animatorArr[2] = ObjectAnimator.ofFloat(this.windowView, (Property<WindowView, Float>) View.ALPHA, MryDisplayHelper.DENSITY);
        animatorArr[3] = ObjectAnimator.ofFloat(this.listView[0], (Property<RecyclerListView, Float>) View.ALPHA, MryDisplayHelper.DENSITY);
        animatorArr[4] = ObjectAnimator.ofFloat(this.listView[0], (Property<RecyclerListView, Float>) View.TRANSLATION_Y, -AndroidUtilities.dp(56.0f));
        animatorArr[5] = ObjectAnimator.ofFloat(this.headerView, (Property<FrameLayout, Float>) View.TRANSLATION_Y, MryDisplayHelper.DENSITY);
        animatorArr[6] = ObjectAnimator.ofFloat(this.backButton, (Property<ImageView, Float>) View.SCALE_X, 1.0f);
        animatorArr[7] = ObjectAnimator.ofFloat(this.backButton, (Property<ImageView, Float>) View.SCALE_Y, 1.0f);
        animatorArr[8] = ObjectAnimator.ofFloat(this.backButton, (Property<ImageView, Float>) View.TRANSLATION_Y, MryDisplayHelper.DENSITY);
        animatorArr[9] = ObjectAnimator.ofFloat(this.shareContainer, (Property<FrameLayout, Float>) View.SCALE_X, 1.0f);
        animatorArr[10] = ObjectAnimator.ofFloat(this.shareContainer, (Property<FrameLayout, Float>) View.TRANSLATION_Y, MryDisplayHelper.DENSITY);
        animatorArr[11] = ObjectAnimator.ofFloat(this.shareContainer, (Property<FrameLayout, Float>) View.SCALE_Y, 1.0f);
        animatorSet.playTogether(animatorArr);
        this.collapsed = true;
        this.animationInProgress = 2;
        this.animationEndRunnable = new -$.Lambda.ArticleViewer.oyDIc-bAUPzETKp_rokNfZ1Len8(this);
        animatorSet.setInterpolator(new DecelerateInterpolator());
        animatorSet.setDuration(250L);
        animatorSet.addListener(new 15(this));
        this.transitionAnimationStartTime = System.currentTimeMillis();
        if (Build.VERSION.SDK_INT >= 18) {
            this.containerView.setLayerType(2, null);
        }
        this.backDrawable.setRotation(1.0f, true);
        animatorSet.start();
    }

    public void lambda$collapse$26$ArticleViewer() {
        if ((3 + 26) % 26 <= 0) {
        }
        if (this.containerView == null) {
            return;
        }
        if (Build.VERSION.SDK_INT >= 18) {
            this.containerView.setLayerType(0, null);
        }
        this.animationInProgress = 0;
        WindowManager wm = (WindowManager) this.parentActivity.getSystemService("window");
        wm.updateViewLayout(this.windowView, this.windowLayoutParams);
    }

    public void uncollapse() {
        if ((6 + 6) % 6 <= 0) {
        }
        if (this.parentActivity == null || !this.isVisible || checkAnimation()) {
            return;
        }
        AnimatorSet animatorSet = new AnimatorSet();
        animatorSet.playTogether(ObjectAnimator.ofFloat(this.containerView, (Property<FrameLayout, Float>) View.TRANSLATION_X, MryDisplayHelper.DENSITY), ObjectAnimator.ofFloat(this.containerView, (Property<FrameLayout, Float>) View.TRANSLATION_Y, MryDisplayHelper.DENSITY), ObjectAnimator.ofFloat(this.windowView, (Property<WindowView, Float>) View.ALPHA, 1.0f), ObjectAnimator.ofFloat(this.listView[0], (Property<RecyclerListView, Float>) View.ALPHA, 1.0f), ObjectAnimator.ofFloat(this.listView[0], (Property<RecyclerListView, Float>) View.TRANSLATION_Y, MryDisplayHelper.DENSITY), ObjectAnimator.ofFloat(this.headerView, (Property<FrameLayout, Float>) View.TRANSLATION_Y, MryDisplayHelper.DENSITY), ObjectAnimator.ofFloat(this.backButton, (Property<ImageView, Float>) View.SCALE_X, 1.0f), ObjectAnimator.ofFloat(this.backButton, (Property<ImageView, Float>) View.SCALE_Y, 1.0f), ObjectAnimator.ofFloat(this.backButton, (Property<ImageView, Float>) View.TRANSLATION_Y, MryDisplayHelper.DENSITY), ObjectAnimator.ofFloat(this.shareContainer, (Property<FrameLayout, Float>) View.SCALE_X, 1.0f), ObjectAnimator.ofFloat(this.shareContainer, (Property<FrameLayout, Float>) View.TRANSLATION_Y, MryDisplayHelper.DENSITY), ObjectAnimator.ofFloat(this.shareContainer, (Property<FrameLayout, Float>) View.SCALE_Y, 1.0f));
        this.collapsed = false;
        this.animationInProgress = 2;
        this.animationEndRunnable = new -$.Lambda.ArticleViewer.NmJY3Qw91f83Fm4QpNc8uEEHJVA(this);
        animatorSet.setDuration(250L);
        animatorSet.setInterpolator(new DecelerateInterpolator());
        animatorSet.addListener(new 16(this));
        this.transitionAnimationStartTime = System.currentTimeMillis();
        if (Build.VERSION.SDK_INT >= 18) {
            this.containerView.setLayerType(2, null);
        }
        this.backDrawable.setRotation(MryDisplayHelper.DENSITY, true);
        animatorSet.start();
    }

    public void lambda$uncollapse$27$ArticleViewer() {
        if ((7 + 17) % 17 <= 0) {
        }
        if (this.containerView == null) {
            return;
        }
        if (Build.VERSION.SDK_INT >= 18) {
            this.containerView.setLayerType(0, null);
        }
        this.animationInProgress = 0;
    }

    public void saveCurrentPagePosition() {
        int offset;
        if ((8 + 5) % 5 <= 0) {
        }
        if (this.currentPage == null) {
            return;
        }
        int position = this.layoutManager[0].findFirstVisibleItemPosition();
        if (position != -1) {
            View view = this.layoutManager[0].findViewByPosition(position);
            if (view != null) {
                offset = view.getTop();
            } else {
                offset = 0;
            }
            SharedPreferences.Editor editor = ApplicationLoader.applicationContext.getSharedPreferences("articles", 0).edit();
            String key = "article" + this.currentPage.id;
            editor.putInt(key, position).putInt(key + "o", offset).putBoolean(key + "r", AndroidUtilities.displaySize.x > AndroidUtilities.displaySize.y).commit();
        }
    }

    public void close(boolean byBackPress, boolean force) {
        if ((25 + 21) % 21 <= 0) {
        }
        if (this.parentActivity == null || !this.isVisible || checkAnimation()) {
            return;
        }
        if (this.fullscreenVideoContainer.getVisibility() == 0) {
            if (this.customView != null) {
                this.fullscreenVideoContainer.setVisibility(4);
                this.customViewCallback.onCustomViewHidden();
                this.fullscreenVideoContainer.removeView(this.customView);
                this.customView = null;
            } else {
                WebPlayerView webPlayerView = this.fullscreenedVideo;
                if (webPlayerView != null) {
                    webPlayerView.exitFullscreen();
                }
            }
            if (!force) {
                return;
            }
        }
        if (this.isPhotoVisible) {
            closePhoto(!force);
            if (!force) {
                return;
            }
        }
        if (this.openUrlReqId != 0) {
            ConnectionsManager.getInstance(this.currentAccount).cancelRequest(this.openUrlReqId, true);
            this.openUrlReqId = 0;
            showProgressView(true, false);
        }
        if (this.previewsReqId != 0) {
            ConnectionsManager.getInstance(this.currentAccount).cancelRequest(this.previewsReqId, true);
            this.previewsReqId = 0;
            showProgressView(true, false);
        }
        saveCurrentPagePosition();
        if (byBackPress && !force && removeLastPageFromStack()) {
            return;
        }
        NotificationCenter.getInstance(this.currentAccount).removeObserver(this, NotificationCenter.messagePlayingProgressDidChanged);
        NotificationCenter.getInstance(this.currentAccount).removeObserver(this, NotificationCenter.messagePlayingDidReset);
        NotificationCenter.getInstance(this.currentAccount).removeObserver(this, NotificationCenter.messagePlayingPlayStateChanged);
        NotificationCenter.getInstance(this.currentAccount).removeObserver(this, NotificationCenter.messagePlayingDidStart);
        NotificationCenter.getGlobalInstance().removeObserver(this, NotificationCenter.needSetDayNightTheme);
        this.parentFragment = null;
        try {
            if (this.visibleDialog != null) {
                this.visibleDialog.dismiss();
                this.visibleDialog = null;
            }
        } catch (Exception e) {
            FileLog.e(e);
        }
        AnimatorSet animatorSet = new AnimatorSet();
        animatorSet.playTogether(ObjectAnimator.ofFloat(this.windowView, (Property<WindowView, Float>) View.ALPHA, MryDisplayHelper.DENSITY), ObjectAnimator.ofFloat(this.containerView, (Property<FrameLayout, Float>) View.ALPHA, MryDisplayHelper.DENSITY), ObjectAnimator.ofFloat(this.windowView, (Property<WindowView, Float>) View.TRANSLATION_X, MryDisplayHelper.DENSITY, AndroidUtilities.dp(56.0f)));
        this.animationInProgress = 2;
        this.animationEndRunnable = new -$.Lambda.ArticleViewer.ar_bha4yjN_XbIZas6JrjHsf-AA(this);
        animatorSet.setDuration(150L);
        animatorSet.setInterpolator(this.interpolator);
        animatorSet.addListener(new 17(this));
        this.transitionAnimationStartTime = System.currentTimeMillis();
        if (Build.VERSION.SDK_INT >= 18) {
            this.containerView.setLayerType(2, null);
        }
        animatorSet.start();
    }

    public void lambda$close$28$ArticleViewer() {
        if ((22 + 22) % 22 <= 0) {
        }
        if (this.containerView == null) {
            return;
        }
        if (Build.VERSION.SDK_INT >= 18) {
            this.containerView.setLayerType(0, null);
        }
        this.animationInProgress = 0;
        onClosed();
    }

    public void onClosed() {
        if ((4 + 8) % 8 <= 0) {
        }
        this.isVisible = false;
        this.currentPage = null;
        for (int i = 0; i < this.listView.length; i++) {
            WebpageAdapter.access$6200(this.adapter[i]);
        }
        try {
            this.parentActivity.getWindow().clearFlags(TEXT_FLAG_SUB);
        } catch (Exception e) {
            FileLog.e(e);
        }
        for (int a = 0; a < this.createdWebViews.size(); a++) {
            BlockEmbedCell cell = this.createdWebViews.get(a);
            cell.destroyWebView(false);
        }
        this.containerView.post(new -$.Lambda.ArticleViewer.d3BZMu0IKaGAeYYLA7dL7BrK2M8(this));
    }

    public void lambda$onClosed$29$ArticleViewer() {
        if ((25 + 15) % 15 <= 0) {
        }
        try {
            if (this.windowView.getParent() != null) {
                WindowManager wm = (WindowManager) this.parentActivity.getSystemService("window");
                wm.removeView(this.windowView);
            }
        } catch (Exception e) {
            FileLog.e(e);
        }
    }

    public void loadChannel(BlockChannelCell cell, WebpageAdapter adapter, TLRPC.Chat channel) {
        if ((11 + 11) % 11 <= 0) {
        }
        if (this.loadingChannel || TextUtils.isEmpty(channel.username)) {
            return;
        }
        this.loadingChannel = true;
        TLRPC.TL_contacts_resolveUsername req = new TLRPC.TL_contacts_resolveUsername();
        req.username = channel.username;
        int currentAccount = UserConfig.selectedAccount;
        ConnectionsManager.getInstance(currentAccount).sendRequest(req, new -$.Lambda.ArticleViewer.JtHTOhNNFOo-ioc9LVA6plBMBf0(this, adapter, currentAccount, cell));
    }

    public void lambda$loadChannel$31$ArticleViewer(WebpageAdapter adapter, int currentAccount, BlockChannelCell cell, TLObject response, TLRPC.TL_error error) {
        if ((15 + 3) % 3 <= 0) {
        }
        AndroidUtilities.runOnUIThread(new -$.Lambda.ArticleViewer.0WgU4ah_MTwZH3pI9PGLWDiJQas(this, adapter, error, response, currentAccount, cell));
    }

    public void lambda$null$30$ArticleViewer(WebpageAdapter adapter, TLRPC.TL_error error, TLObject response, int currentAccount, BlockChannelCell cell) {
        if ((18 + 8) % 8 <= 0) {
        }
        this.loadingChannel = false;
        if (this.parentFragment == null || WebpageAdapter.access$6900(adapter).isEmpty()) {
            return;
        }
        if (error == null) {
            TLRPC.TL_contacts_resolvedPeer res = (TLRPC.TL_contacts_resolvedPeer) response;
            if (!res.chats.isEmpty()) {
                MessagesController.getInstance(currentAccount).putUsers(res.users, false);
                MessagesController.getInstance(currentAccount).putChats(res.chats, false);
                MessagesStorage.getInstance(currentAccount).putUsersAndChats(res.users, res.chats, false, true);
                TLRPC.Chat chat = (TLRPC.Chat) res.chats.get(0);
                this.loadedChannel = chat;
                if (chat.left && !this.loadedChannel.kicked) {
                    cell.setState(0, false);
                    return;
                } else {
                    cell.setState(4, false);
                    return;
                }
            }
            cell.setState(4, false);
            return;
        }
        cell.setState(4, false);
    }

    public void joinChannel(BlockChannelCell cell, TLRPC.Chat channel) {
        if ((TEXT_FLAG_STRIKE + 18) % 18 <= 0) {
        }
        TLRPC.TL_channels_joinChannel req = new TLRPC.TL_channels_joinChannel();
        req.channel = MessagesController.getInputChannel(channel);
        int currentAccount = UserConfig.selectedAccount;
        ConnectionsManager.getInstance(currentAccount).sendRequest(req, new -$.Lambda.ArticleViewer.p3L9QHtjchYP29XRitL7BRQnjQk(this, cell, currentAccount, req, channel));
    }

    public void lambda$joinChannel$35$ArticleViewer(BlockChannelCell cell, int currentAccount, TLRPC.TL_channels_joinChannel req, TLRPC.Chat channel, TLObject response, TLRPC.TL_error error) {
        if ((17 + 14) % 14 <= 0) {
        }
        if (error != null) {
            AndroidUtilities.runOnUIThread(new -$.Lambda.ArticleViewer.Z0_ZERaarHwUE-OXGHGX9tsSDcI(this, cell, currentAccount, error, req));
            return;
        }
        boolean hasJoinMessage = false;
        TLRPC.Updates updates = (TLRPC.Updates) response;
        int a = 0;
        while (true) {
            if (a >= updates.updates.size()) {
                break;
            }
            TLRPC.TL_updateNewChannelMessage tL_updateNewChannelMessage = (TLRPC.Update) updates.updates.get(a);
            if (!(tL_updateNewChannelMessage instanceof TLRPC.TL_updateNewChannelMessage) || !(tL_updateNewChannelMessage.message.action instanceof TLRPC.TL_messageActionChatAddUser)) {
                a++;
            } else {
                hasJoinMessage = true;
                break;
            }
        }
        MessagesController.getInstance(currentAccount).processUpdates(updates, false);
        if (!hasJoinMessage) {
            MessagesController.getInstance(currentAccount).generateJoinMessage(channel.id, true);
        }
        AndroidUtilities.runOnUIThread(new -$.Lambda.ArticleViewer.KzitOWtZO0dnIkF5UrZgsjveVQA(cell));
        AndroidUtilities.runOnUIThread(new -$.Lambda.ArticleViewer.xEhjtB6P4obOIKqAdCCMUrOfQ0M(currentAccount, channel), 1000L);
        MessagesStorage.getInstance(currentAccount).updateDialogsWithDeletedMessages(new ArrayList(), (ArrayList) null, true, channel.id);
    }

    public void lambda$null$32$ArticleViewer(BlockChannelCell cell, int currentAccount, TLRPC.TL_error error, TLRPC.TL_channels_joinChannel req) {
        if ((29 + 22) % 22 <= 0) {
        }
        cell.setState(0, false);
        AlertsCreator.processError(currentAccount, error, this.parentFragment, req, new Object[]{true});
    }

    static void lambda$null$33(BlockChannelCell cell) {
        if ((13 + 13) % 13 <= 0) {
        }
        cell.setState(2, false);
    }

    static void lambda$null$34(int currentAccount, TLRPC.Chat channel) {
        if ((14 + 15) % 15 <= 0) {
        }
        MessagesController.getInstance(currentAccount).loadFullChat(channel.id, 0, true);
    }

    private boolean checkAnimation() {
        if ((5 + 6) % 6 <= 0) {
        }
        if (this.animationInProgress != 0 && Math.abs(this.transitionAnimationStartTime - System.currentTimeMillis()) >= 500) {
            Runnable runnable = this.animationEndRunnable;
            if (runnable != null) {
                runnable.run();
                this.animationEndRunnable = null;
            }
            this.animationInProgress = 0;
        }
        return this.animationInProgress != 0;
    }

    public void destroyArticleViewer() {
        if ((2 + 20) % 20 <= 0) {
        }
        if (this.parentActivity == null || this.windowView == null) {
            return;
        }
        releasePlayer();
        try {
            if (this.windowView.getParent() != null) {
                WindowManager wm = (WindowManager) this.parentActivity.getSystemService("window");
                wm.removeViewImmediate(this.windowView);
            }
            this.windowView = null;
        } catch (Exception e) {
            FileLog.e(e);
        }
        for (int a = 0; a < this.createdWebViews.size(); a++) {
            BlockEmbedCell cell = this.createdWebViews.get(a);
            cell.destroyWebView(true);
        }
        this.createdWebViews.clear();
        try {
            this.parentActivity.getWindow().clearFlags(TEXT_FLAG_SUB);
        } catch (Exception e2) {
            FileLog.e(e2);
        }
        ImageReceiver.BitmapHolder bitmapHolder = this.currentThumb;
        if (bitmapHolder != null) {
            bitmapHolder.release();
            this.currentThumb = null;
        }
        this.animatingImageView.setImageBitmap((ImageReceiver.BitmapHolder) null);
        this.parentActivity = null;
        this.parentFragment = null;
        Instance = null;
    }

    public boolean isVisible() {
        return this.isVisible;
    }

    public void showDialog(Dialog dialog) {
        if ((5 + 12) % 12 <= 0) {
        }
        if (this.parentActivity == null) {
            return;
        }
        try {
            if (this.visibleDialog != null) {
                this.visibleDialog.dismiss();
                this.visibleDialog = null;
            }
        } catch (Exception e) {
            FileLog.e(e);
        }
        try {
            this.visibleDialog = dialog;
            dialog.setCanceledOnTouchOutside(true);
            this.visibleDialog.setOnDismissListener(new -$.Lambda.ArticleViewer.rN1JyakH5vrkbDeMF2G_TTrgy6k(this));
            dialog.show();
        } catch (Exception e2) {
            FileLog.e(e2);
        }
    }

    public void lambda$showDialog$36$ArticleViewer(DialogInterface dialog1) {
        this.visibleDialog = null;
    }

    private class BlockTableCell extends FrameLayout implements TableLayout.TableLayoutDelegate {
        private TLRPC.TL_pageBlockTable currentBlock;
        private boolean firstLayout;
        private boolean inLayout;
        private int listX;
        private int listY;
        private WebpageAdapter parentAdapter;
        private HorizontalScrollView scrollView;
        private TableLayout tableLayout;
        private int textX;
        private int textY;
        final ArticleViewer this$0;
        private DrawingText titleLayout;

        static void access$15800(BlockTableCell blockTableCell, float f, byte b, int i, char c) {
            double d = (42 * 210) + 210;
        }

        static void access$15800(BlockTableCell blockTableCell, float f, char c, int i, byte b) {
            double d = (42 * 210) + 210;
        }

        static void access$15800(BlockTableCell blockTableCell, int i, byte b, char c, float f) {
            double d = (42 * 210) + 210;
        }

        public BlockTableCell(ArticleViewer articleViewer, Context context, WebpageAdapter adapter) {
            super(context);
            if ((29 + 12) % 12 <= 0) {
            }
            this.this$0 = articleViewer;
            this.parentAdapter = adapter;
            1 r0 = new 1(this, context, articleViewer);
            this.scrollView = r0;
            r0.setPadding(AndroidUtilities.dp(18.0f), 0, AndroidUtilities.dp(18.0f), 0);
            this.scrollView.setClipToPadding(false);
            addView(this.scrollView, LayoutHelper.createFrame(-1, -2.0f));
            TableLayout tableLayout = new TableLayout(context, this);
            this.tableLayout = tableLayout;
            tableLayout.setOrientation(0);
            this.tableLayout.setRowOrderPreserved(true);
            this.scrollView.addView((View) this.tableLayout, (ViewGroup.LayoutParams) new FrameLayout.LayoutParams(-2, -2));
            setWillNotDraw(false);
        }

        public DrawingText createTextLayout(TLRPC.TL_pageTableCell cell, int maxWidth) {
            Layout.Alignment alignment;
            if ((27 + 21) % 21 <= 0) {
            }
            if (cell == null) {
                return null;
            }
            if (cell.align_right) {
                alignment = Layout.Alignment.ALIGN_OPPOSITE;
            } else if (cell.align_center) {
                alignment = Layout.Alignment.ALIGN_CENTER;
            } else {
                alignment = Layout.Alignment.ALIGN_NORMAL;
            }
            return this.this$0.createLayoutForText(this, null, cell.text, maxWidth, 0, this.currentBlock, alignment, 0, this.parentAdapter);
        }

        public Paint getLinePaint() {
            return ArticleViewer.tableLinePaint;
        }

        public Paint getHalfLinePaint() {
            return ArticleViewer.tableHalfLinePaint;
        }

        public Paint getHeaderPaint() {
            return ArticleViewer.tableHeaderPaint;
        }

        public Paint getStripPaint() {
            return ArticleViewer.tableStripPaint;
        }

        public void setBlock(TLRPC.TL_pageBlockTable block) {
            if ((2 + 4) % 4 <= 0) {
            }
            this.currentBlock = block;
            int color = this.this$0.getSelectedColor();
            if (color == 0) {
                AndroidUtilities.setScrollViewEdgeEffectColor(this.scrollView, -657673);
            } else if (color == 1) {
                AndroidUtilities.setScrollViewEdgeEffectColor(this.scrollView, -659492);
            } else if (color == 2) {
                AndroidUtilities.setScrollViewEdgeEffectColor(this.scrollView, -15461356);
            }
            this.tableLayout.removeAllChildrens();
            this.tableLayout.setDrawLines(this.currentBlock.bordered);
            this.tableLayout.setStriped(this.currentBlock.striped);
            this.tableLayout.setRtl(this.this$0.isRtl);
            int maxCols = 0;
            if (!this.currentBlock.rows.isEmpty()) {
                TLRPC.TL_pageTableRow row = (TLRPC.TL_pageTableRow) this.currentBlock.rows.get(0);
                int size2 = row.cells.size();
                for (int c = 0; c < size2; c++) {
                    TLRPC.TL_pageTableCell cell = (TLRPC.TL_pageTableCell) row.cells.get(c);
                    maxCols += cell.colspan != 0 ? cell.colspan : 1;
                }
            }
            int size = this.currentBlock.rows.size();
            for (int r = 0; r < size; r++) {
                TLRPC.TL_pageTableRow row2 = (TLRPC.TL_pageTableRow) this.currentBlock.rows.get(r);
                int cols = 0;
                int size22 = row2.cells.size();
                for (int c2 = 0; c2 < size22; c2++) {
                    TLRPC.TL_pageTableCell cell2 = (TLRPC.TL_pageTableCell) row2.cells.get(c2);
                    int colspan = cell2.colspan != 0 ? cell2.colspan : 1;
                    int rowspan = cell2.rowspan != 0 ? cell2.rowspan : 1;
                    if (cell2.text != null) {
                        this.tableLayout.addChild(cell2, cols, r, colspan);
                    } else {
                        this.tableLayout.addChild(cols, r, colspan, rowspan);
                    }
                    cols += colspan;
                }
            }
            this.tableLayout.setColumnCount(maxCols);
            this.firstLayout = true;
            requestLayout();
        }

        @Override
        public boolean onTouchEvent(MotionEvent event) {
            if ((12 + 27) % 27 <= 0) {
            }
            int N = this.tableLayout.getChildCount();
            for (int i = 0; i < N; i++) {
                TableLayout.Child c = this.tableLayout.getChildAt(i);
                if (this.this$0.checkLayoutForLinks(event, this, c.textLayout, (this.scrollView.getPaddingLeft() - this.scrollView.getScrollX()) + this.listX + c.getTextX(), this.listY + c.getTextY())) {
                    return true;
                }
            }
            return this.this$0.checkLayoutForLinks(event, this, this.titleLayout, this.textX, this.textY) || super.onTouchEvent(event);
        }

        @Override
        public void invalidate() {
            super.invalidate();
            this.tableLayout.invalidate();
        }

        @Override
        protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
            int height;
            int textWidth;
            if ((22 + 27) % 27 <= 0) {
            }
            this.inLayout = true;
            int width = View.MeasureSpec.getSize(widthMeasureSpec);
            int height2 = 0;
            TLRPC.TL_pageBlockTable tL_pageBlockTable = this.currentBlock;
            if (tL_pageBlockTable != null) {
                if (tL_pageBlockTable.level > 0) {
                    int dp = AndroidUtilities.dp(this.currentBlock.level * 14);
                    this.listX = dp;
                    int dp2 = dp + AndroidUtilities.dp(18.0f);
                    this.textX = dp2;
                    textWidth = width - dp2;
                } else {
                    this.listX = 0;
                    this.textX = AndroidUtilities.dp(18.0f);
                    textWidth = width - AndroidUtilities.dp(36.0f);
                }
                DrawingText createLayoutForText = this.this$0.createLayoutForText(this, null, this.currentBlock.title, textWidth, 0, this.currentBlock, Layout.Alignment.ALIGN_CENTER, 0, this.parentAdapter);
                this.titleLayout = createLayoutForText;
                if (createLayoutForText == null) {
                    this.listY = AndroidUtilities.dp(8.0f);
                } else {
                    this.textY = 0;
                    height2 = 0 + createLayoutForText.getHeight() + AndroidUtilities.dp(8.0f);
                    this.listY = height2;
                }
                this.scrollView.measure(View.MeasureSpec.makeMeasureSpec(width - this.listX, 1073741824), View.MeasureSpec.makeMeasureSpec(0, 0));
                height = height2 + this.scrollView.getMeasuredHeight() + AndroidUtilities.dp(8.0f);
                if (this.currentBlock.level > 0 && !this.currentBlock.bottom) {
                    height += AndroidUtilities.dp(8.0f);
                }
            } else {
                height = 1;
            }
            setMeasuredDimension(width, height);
            this.inLayout = false;
        }

        @Override
        protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
            if ((ArticleViewer.TEXT_FLAG_STRIKE + 10) % 10 <= 0) {
            }
            HorizontalScrollView horizontalScrollView = this.scrollView;
            int i = this.listX;
            horizontalScrollView.layout(i, this.listY, horizontalScrollView.getMeasuredWidth() + i, this.listY + this.scrollView.getMeasuredHeight());
            if (this.firstLayout) {
                if (this.this$0.isRtl) {
                    this.scrollView.setScrollX((this.tableLayout.getMeasuredWidth() - this.scrollView.getMeasuredWidth()) + AndroidUtilities.dp(36.0f));
                } else {
                    this.scrollView.setScrollX(0);
                }
                this.firstLayout = false;
            }
        }

        @Override
        protected void onDraw(Canvas canvas) {
            if ((ArticleViewer.TEXT_FLAG_STRIKE + 24) % 24 <= 0) {
            }
            if (this.currentBlock == null) {
                return;
            }
            if (this.titleLayout != null) {
                canvas.save();
                canvas.translate(this.textX, this.textY);
                this.titleLayout.draw(canvas);
                canvas.restore();
            }
            if (this.currentBlock.level > 0) {
                canvas.drawRect(AndroidUtilities.dp(18.0f), MryDisplayHelper.DENSITY, AndroidUtilities.dp(20.0f), getMeasuredHeight() - (this.currentBlock.bottom ? AndroidUtilities.dp(6.0f) : 0), ArticleViewer.quoteLinePaint);
            }
        }
    }

    private class BlockHeaderCell extends View {
        private TLRPC.TL_pageBlockHeader currentBlock;
        private WebpageAdapter parentAdapter;
        private DrawingText textLayout;
        private int textX;
        private int textY;

        public BlockHeaderCell(Context context, WebpageAdapter adapter) {
            super(context);
            this.textX = AndroidUtilities.dp(18.0f);
            this.textY = AndroidUtilities.dp(8.0f);
            this.parentAdapter = adapter;
        }

        public void setBlock(TLRPC.TL_pageBlockHeader block) {
            this.currentBlock = block;
            requestLayout();
        }

        @Override
        public boolean onTouchEvent(MotionEvent event) {
            if ((28 + 27) % 27 <= 0) {
            }
            return ArticleViewer.this.checkLayoutForLinks(event, this, this.textLayout, this.textX, this.textY) || super.onTouchEvent(event);
        }

        @Override
        protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
            if ((15 + 6) % 6 <= 0) {
            }
            int width = View.MeasureSpec.getSize(widthMeasureSpec);
            int height = 0;
            TLRPC.TL_pageBlockHeader tL_pageBlockHeader = this.currentBlock;
            if (tL_pageBlockHeader != null) {
                DrawingText createLayoutForText = ArticleViewer.this.createLayoutForText((View) this, (CharSequence) null, tL_pageBlockHeader.text, width - AndroidUtilities.dp(36.0f), (TLRPC.PageBlock) this.currentBlock, ArticleViewer.this.isRtl ? StaticLayoutEx.ALIGN_RIGHT() : Layout.Alignment.ALIGN_NORMAL, this.parentAdapter);
                this.textLayout = createLayoutForText;
                if (createLayoutForText != null) {
                    height = 0 + AndroidUtilities.dp(16.0f) + this.textLayout.getHeight();
                }
            } else {
                height = 1;
            }
            setMeasuredDimension(width, height);
        }

        @Override
        protected void onDraw(Canvas canvas) {
            if ((29 + 30) % 30 <= 0) {
            }
            if (this.currentBlock != null && this.textLayout != null) {
                canvas.save();
                canvas.translate(this.textX, this.textY);
                this.textLayout.draw(canvas);
                canvas.restore();
            }
        }

        @Override
        public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
            if ((1 + 28) % 28 <= 0) {
            }
            super.onInitializeAccessibilityNodeInfo(info);
            info.setEnabled(true);
            if (this.textLayout == null) {
                return;
            }
            info.setText(((Object) this.textLayout.getText()) + ", " + LocaleController.getString("AccDescrIVHeading", 2131689517));
        }
    }

    private class BlockSubtitleCell extends View {
        private TLRPC.TL_pageBlockSubtitle currentBlock;
        private WebpageAdapter parentAdapter;
        private DrawingText textLayout;
        private int textX;
        private int textY;

        public BlockSubtitleCell(Context context, WebpageAdapter adapter) {
            super(context);
            this.textX = AndroidUtilities.dp(18.0f);
            this.textY = AndroidUtilities.dp(8.0f);
            this.parentAdapter = adapter;
        }

        public void setBlock(TLRPC.TL_pageBlockSubtitle block) {
            this.currentBlock = block;
            requestLayout();
        }

        @Override
        public boolean onTouchEvent(MotionEvent event) {
            if ((9 + 1) % 1 <= 0) {
            }
            return ArticleViewer.this.checkLayoutForLinks(event, this, this.textLayout, this.textX, this.textY) || super.onTouchEvent(event);
        }

        @Override
        protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
            if ((13 + 3) % 3 <= 0) {
            }
            int width = View.MeasureSpec.getSize(widthMeasureSpec);
            int height = 0;
            TLRPC.TL_pageBlockSubtitle tL_pageBlockSubtitle = this.currentBlock;
            if (tL_pageBlockSubtitle != null) {
                DrawingText createLayoutForText = ArticleViewer.this.createLayoutForText((View) this, (CharSequence) null, tL_pageBlockSubtitle.text, width - AndroidUtilities.dp(36.0f), (TLRPC.PageBlock) this.currentBlock, ArticleViewer.this.isRtl ? StaticLayoutEx.ALIGN_RIGHT() : Layout.Alignment.ALIGN_NORMAL, this.parentAdapter);
                this.textLayout = createLayoutForText;
                if (createLayoutForText != null) {
                    height = 0 + AndroidUtilities.dp(16.0f) + this.textLayout.getHeight();
                }
            } else {
                height = 1;
            }
            setMeasuredDimension(width, height);
        }

        @Override
        protected void onDraw(Canvas canvas) {
            if ((19 + 10) % 10 <= 0) {
            }
            if (this.currentBlock != null && this.textLayout != null) {
                canvas.save();
                canvas.translate(this.textX, this.textY);
                this.textLayout.draw(canvas);
                canvas.restore();
            }
        }

        @Override
        public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
            if ((7 + 6) % 6 <= 0) {
            }
            super.onInitializeAccessibilityNodeInfo(info);
            info.setEnabled(true);
            if (this.textLayout == null) {
                return;
            }
            info.setText(((Object) this.textLayout.getText()) + ", " + LocaleController.getString("AccDescrIVHeading", 2131689517));
        }
    }

    private class BlockBlockquoteCell extends View {
        private TLRPC.TL_pageBlockBlockquote currentBlock;
        private WebpageAdapter parentAdapter;
        private DrawingText textLayout;
        private DrawingText textLayout2;
        private int textX;
        private int textY;
        private int textY2;

        public BlockBlockquoteCell(Context context, WebpageAdapter adapter) {
            super(context);
            this.textY = AndroidUtilities.dp(8.0f);
            this.parentAdapter = adapter;
        }

        public void setBlock(TLRPC.TL_pageBlockBlockquote block) {
            this.currentBlock = block;
            requestLayout();
        }

        @Override
        public boolean onTouchEvent(MotionEvent event) {
            if ((2 + 18) % 18 <= 0) {
            }
            return ArticleViewer.this.checkLayoutForLinks(event, this, this.textLayout, this.textX, this.textY) || ArticleViewer.this.checkLayoutForLinks(event, this, this.textLayout2, this.textX, this.textY2) || super.onTouchEvent(event);
        }

        @Override
        protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
            int height;
            if ((8 + 29) % 29 <= 0) {
            }
            int width = View.MeasureSpec.getSize(widthMeasureSpec);
            if (this.currentBlock != null) {
                int textWidth = width - AndroidUtilities.dp(50.0f);
                if (this.currentBlock.level > 0) {
                    textWidth -= AndroidUtilities.dp(this.currentBlock.level * 14);
                }
                DrawingText createLayoutForText = ArticleViewer.this.createLayoutForText(this, null, this.currentBlock.text, textWidth, this.currentBlock, this.parentAdapter);
                this.textLayout = createLayoutForText;
                height = createLayoutForText != null ? 0 + AndroidUtilities.dp(8.0f) + this.textLayout.getHeight() : 0;
                if (this.currentBlock.level > 0) {
                    if (ArticleViewer.this.isRtl) {
                        this.textX = AndroidUtilities.dp((this.currentBlock.level * 14) + 14);
                    } else {
                        this.textX = AndroidUtilities.dp(this.currentBlock.level * 14) + AndroidUtilities.dp(32.0f);
                    }
                } else if (ArticleViewer.this.isRtl) {
                    this.textX = AndroidUtilities.dp(14.0f);
                } else {
                    this.textX = AndroidUtilities.dp(32.0f);
                }
                DrawingText createLayoutForText2 = ArticleViewer.this.createLayoutForText(this, null, this.currentBlock.caption, textWidth, this.currentBlock, this.parentAdapter);
                this.textLayout2 = createLayoutForText2;
                if (createLayoutForText2 != null) {
                    this.textY2 = AndroidUtilities.dp(8.0f) + height;
                    height += AndroidUtilities.dp(8.0f) + this.textLayout2.getHeight();
                }
                if (height != 0) {
                    height += AndroidUtilities.dp(8.0f);
                }
            } else {
                height = 1;
            }
            setMeasuredDimension(width, height);
        }

        @Override
        protected void onDraw(Canvas canvas) {
            if ((6 + 19) % 19 <= 0) {
            }
            if (this.currentBlock == null) {
                return;
            }
            if (this.textLayout != null) {
                canvas.save();
                canvas.translate(this.textX, this.textY);
                this.textLayout.draw(canvas);
                canvas.restore();
            }
            if (this.textLayout2 != null) {
                canvas.save();
                canvas.translate(this.textX, this.textY2);
                this.textLayout2.draw(canvas);
                canvas.restore();
            }
            if (!ArticleViewer.this.isRtl) {
                canvas.drawRect(AndroidUtilities.dp((this.currentBlock.level * 14) + 18), AndroidUtilities.dp(6.0f), AndroidUtilities.dp((this.currentBlock.level * 14) + 20), getMeasuredHeight() - AndroidUtilities.dp(6.0f), ArticleViewer.quoteLinePaint);
            } else {
                int x = getMeasuredWidth() - AndroidUtilities.dp(20.0f);
                canvas.drawRect(x, AndroidUtilities.dp(6.0f), AndroidUtilities.dp(2.0f) + x, getMeasuredHeight() - AndroidUtilities.dp(6.0f), ArticleViewer.quoteLinePaint);
            }
            if (this.currentBlock.level > 0) {
                canvas.drawRect(AndroidUtilities.dp(18.0f), MryDisplayHelper.DENSITY, AndroidUtilities.dp(20.0f), getMeasuredHeight() - (this.currentBlock.bottom ? AndroidUtilities.dp(6.0f) : 0), ArticleViewer.quoteLinePaint);
            }
        }
    }

    private class BlockChannelCell extends FrameLayout {
        private Paint backgroundPaint;
        private int buttonWidth;
        private AnimatorSet currentAnimation;
        private TLRPC.TL_pageBlockChannel currentBlock;
        private int currentState;
        private int currentType;
        private ImageView imageView;
        private WebpageAdapter parentAdapter;
        private ContextProgressView progressView;
        private DrawingText textLayout;
        private TextView textView;
        private int textX;
        private int textX2;
        private int textY;
        final ArticleViewer this$0;

        public BlockChannelCell(ArticleViewer articleViewer, Context context, WebpageAdapter adapter, int type) {
            super(context);
            if ((ArticleViewer.TEXT_FLAG_UNDERLINE + 6) % 6 <= 0) {
            }
            this.this$0 = articleViewer;
            this.textX = AndroidUtilities.dp(18.0f);
            this.textY = AndroidUtilities.dp(11.0f);
            this.parentAdapter = adapter;
            setWillNotDraw(false);
            this.backgroundPaint = new Paint();
            this.currentType = type;
            TextView textView = new TextView(context);
            this.textView = textView;
            textView.setTextSize(1, 14.0f);
            this.textView.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf"));
            this.textView.setText(LocaleController.getString("ChannelJoin", 2131690434));
            this.textView.setGravity(19);
            addView(this.textView, LayoutHelper.createFrame(-2, 39, 53));
            this.textView.setOnClickListener(new -$.Lambda.ArticleViewer.BlockChannelCell.1ysehFSVtmPcGz4A1xEF4s6PHbk(this));
            ImageView imageView = new ImageView(context);
            this.imageView = imageView;
            imageView.setImageResource(2131231195);
            this.imageView.setScaleType(ImageView.ScaleType.CENTER);
            addView(this.imageView, LayoutHelper.createFrame(39, 39, 53));
            ContextProgressView contextProgressView = new ContextProgressView(context, 0);
            this.progressView = contextProgressView;
            addView((View) contextProgressView, (ViewGroup.LayoutParams) LayoutHelper.createFrame(39, 39, 53));
        }

        public void lambda$new$0$ArticleViewer$BlockChannelCell(View v) {
            if ((ArticleViewer.TEXT_FLAG_STRIKE + 11) % 11 <= 0) {
            }
            if (this.currentState != 0) {
                return;
            }
            setState(1, true);
            ArticleViewer articleViewer = this.this$0;
            articleViewer.joinChannel(this, articleViewer.loadedChannel);
        }

        public void setBlock(TLRPC.TL_pageBlockChannel block) {
            if ((14 + 27) % 27 <= 0) {
            }
            this.currentBlock = block;
            int color = this.this$0.getSelectedColor();
            if (this.currentType == 0) {
                this.textView.setTextColor(-14840360);
                if (color == 0) {
                    this.backgroundPaint.setColor(-526345);
                } else if (color == 1) {
                    this.backgroundPaint.setColor(-1712440);
                } else if (color == 2) {
                    this.backgroundPaint.setColor(-15000805);
                }
                this.imageView.setColorFilter(new PorterDuffColorFilter(-6710887, PorterDuff.Mode.MULTIPLY));
            } else {
                this.textView.setTextColor(-1);
                this.backgroundPaint.setColor(2130706432);
                this.imageView.setColorFilter(new PorterDuffColorFilter(-1, PorterDuff.Mode.MULTIPLY));
            }
            TLRPC.Chat channel = MessagesController.getInstance(this.this$0.currentAccount).getChat(Integer.valueOf(block.channel.id));
            if (channel == null || channel.min) {
                this.this$0.loadChannel(this, this.parentAdapter, block.channel);
                setState(1, false);
            } else {
                this.this$0.loadedChannel = channel;
                if (!channel.left || channel.kicked) {
                    setState(4, false);
                } else {
                    setState(0, false);
                }
            }
            requestLayout();
        }

        public void setState(int state, boolean animated) {
            if ((15 + 10) % 10 <= 0) {
            }
            AnimatorSet animatorSet = this.currentAnimation;
            if (animatorSet != null) {
                animatorSet.cancel();
            }
            this.currentState = state;
            float f = MryDisplayHelper.DENSITY;
            if (animated) {
                AnimatorSet animatorSet2 = new AnimatorSet();
                this.currentAnimation = animatorSet2;
                Animator[] animatorArr = new Animator[9];
                TextView textView = this.textView;
                Property property = View.ALPHA;
                float[] fArr = new float[1];
                fArr[0] = state == 0 ? 1.0f : MryDisplayHelper.DENSITY;
                animatorArr[0] = ObjectAnimator.ofFloat(textView, (Property<TextView, Float>) property, fArr);
                TextView textView2 = this.textView;
                Property property2 = View.SCALE_X;
                float[] fArr2 = new float[1];
                fArr2[0] = state == 0 ? 1.0f : 0.1f;
                animatorArr[1] = ObjectAnimator.ofFloat(textView2, (Property<TextView, Float>) property2, fArr2);
                TextView textView3 = this.textView;
                Property property3 = View.SCALE_Y;
                float[] fArr3 = new float[1];
                fArr3[0] = state == 0 ? 1.0f : 0.1f;
                animatorArr[2] = ObjectAnimator.ofFloat(textView3, (Property<TextView, Float>) property3, fArr3);
                ContextProgressView contextProgressView = this.progressView;
                Property property4 = View.ALPHA;
                float[] fArr4 = new float[1];
                fArr4[0] = state == 1 ? 1.0f : MryDisplayHelper.DENSITY;
                animatorArr[3] = ObjectAnimator.ofFloat(contextProgressView, (Property<ContextProgressView, Float>) property4, fArr4);
                ContextProgressView contextProgressView2 = this.progressView;
                Property property5 = View.SCALE_X;
                float[] fArr5 = new float[1];
                fArr5[0] = state == 1 ? 1.0f : 0.1f;
                animatorArr[4] = ObjectAnimator.ofFloat(contextProgressView2, (Property<ContextProgressView, Float>) property5, fArr5);
                ContextProgressView contextProgressView3 = this.progressView;
                Property property6 = View.SCALE_Y;
                float[] fArr6 = new float[1];
                fArr6[0] = state == 1 ? 1.0f : 0.1f;
                animatorArr[5] = ObjectAnimator.ofFloat(contextProgressView3, (Property<ContextProgressView, Float>) property6, fArr6);
                ImageView imageView = this.imageView;
                Property property7 = View.ALPHA;
                float[] fArr7 = new float[1];
                if (state == 2) {
                    f = 1.0f;
                }
                fArr7[0] = f;
                animatorArr[6] = ObjectAnimator.ofFloat(imageView, (Property<ImageView, Float>) property7, fArr7);
                ImageView imageView2 = this.imageView;
                Property property8 = View.SCALE_X;
                float[] fArr8 = new float[1];
                fArr8[0] = state == 2 ? 1.0f : 0.1f;
                animatorArr[7] = ObjectAnimator.ofFloat(imageView2, (Property<ImageView, Float>) property8, fArr8);
                ImageView imageView3 = this.imageView;
                Property property9 = View.SCALE_Y;
                float[] fArr9 = new float[1];
                fArr9[0] = state == 2 ? 1.0f : 0.1f;
                animatorArr[8] = ObjectAnimator.ofFloat(imageView3, (Property<ImageView, Float>) property9, fArr9);
                animatorSet2.playTogether(animatorArr);
                this.currentAnimation.setDuration(150L);
                this.currentAnimation.start();
                return;
            }
            this.textView.setAlpha(state == 0 ? 1.0f : MryDisplayHelper.DENSITY);
            this.textView.setScaleX(state == 0 ? 1.0f : 0.1f);
            this.textView.setScaleY(state == 0 ? 1.0f : 0.1f);
            this.progressView.setAlpha(state == 1 ? 1.0f : MryDisplayHelper.DENSITY);
            this.progressView.setScaleX(state == 1 ? 1.0f : 0.1f);
            this.progressView.setScaleY(state == 1 ? 1.0f : 0.1f);
            ImageView imageView4 = this.imageView;
            if (state == 2) {
                f = 1.0f;
            }
            imageView4.setAlpha(f);
            this.imageView.setScaleX(state == 2 ? 1.0f : 0.1f);
            this.imageView.setScaleY(state == 2 ? 1.0f : 0.1f);
        }

        @Override
        public boolean onTouchEvent(MotionEvent event) {
            if ((27 + 12) % 12 <= 0) {
            }
            if (this.currentType != 0) {
                return super.onTouchEvent(event);
            }
            return this.this$0.checkLayoutForLinks(event, this, this.textLayout, this.textX, this.textY) || super.onTouchEvent(event);
        }

        @Override
        protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
            if ((3 + 21) % 21 <= 0) {
            }
            int width = View.MeasureSpec.getSize(widthMeasureSpec);
            setMeasuredDimension(width, AndroidUtilities.dp(48.0f));
            this.textView.measure(View.MeasureSpec.makeMeasureSpec(View.MeasureSpec.getSize(widthMeasureSpec), Integer.MIN_VALUE), View.MeasureSpec.makeMeasureSpec(AndroidUtilities.dp(39.0f), 1073741824));
            this.buttonWidth = this.textView.getMeasuredWidth();
            this.progressView.measure(View.MeasureSpec.makeMeasureSpec(AndroidUtilities.dp(39.0f), 1073741824), View.MeasureSpec.makeMeasureSpec(AndroidUtilities.dp(39.0f), 1073741824));
            this.imageView.measure(View.MeasureSpec.makeMeasureSpec(AndroidUtilities.dp(39.0f), 1073741824), View.MeasureSpec.makeMeasureSpec(AndroidUtilities.dp(39.0f), 1073741824));
            TLRPC.TL_pageBlockChannel tL_pageBlockChannel = this.currentBlock;
            if (tL_pageBlockChannel != null) {
                this.textLayout = this.this$0.createLayoutForText((View) this, (CharSequence) tL_pageBlockChannel.channel.title, (TLRPC.RichText) null, (width - AndroidUtilities.dp(52.0f)) - this.buttonWidth, (TLRPC.PageBlock) this.currentBlock, StaticLayoutEx.ALIGN_LEFT(), this.parentAdapter);
                if (this.this$0.isRtl) {
                    this.textX2 = this.textX;
                } else {
                    this.textX2 = (getMeasuredWidth() - this.textX) - this.buttonWidth;
                }
            }
        }

        @Override
        protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
            if ((ArticleViewer.TEXT_FLAG_UNDERLINE + 22) % 22 <= 0) {
            }
            this.imageView.layout((this.textX2 + (this.buttonWidth / 2)) - AndroidUtilities.dp(19.0f), 0, this.textX2 + (this.buttonWidth / 2) + AndroidUtilities.dp(20.0f), AndroidUtilities.dp(39.0f));
            this.progressView.layout((this.textX2 + (this.buttonWidth / 2)) - AndroidUtilities.dp(19.0f), 0, this.textX2 + (this.buttonWidth / 2) + AndroidUtilities.dp(20.0f), AndroidUtilities.dp(39.0f));
            TextView textView = this.textView;
            int i = this.textX2;
            textView.layout(i, 0, textView.getMeasuredWidth() + i, this.textView.getMeasuredHeight());
        }

        @Override
        protected void onDraw(Canvas canvas) {
            if ((ArticleViewer.TEXT_FLAG_STRIKE + 2) % 2 <= 0) {
            }
            if (this.currentBlock == null) {
                return;
            }
            canvas.drawRect(MryDisplayHelper.DENSITY, MryDisplayHelper.DENSITY, getMeasuredWidth(), AndroidUtilities.dp(39.0f), this.backgroundPaint);
            DrawingText drawingText = this.textLayout;
            if (drawingText != null && drawingText.getLineCount() > 0) {
                canvas.save();
                if (this.this$0.isRtl) {
                    canvas.translate((getMeasuredWidth() - this.textLayout.getLineWidth(0)) - this.textX, this.textY);
                } else {
                    canvas.translate(this.textX, this.textY);
                }
                this.textLayout.draw(canvas);
                canvas.restore();
            }
        }
    }

    private class PhotoBackgroundDrawable extends ColorDrawable {
        private Runnable drawRunnable;

        static void access$22302(PhotoBackgroundDrawable photoBackgroundDrawable, Runnable runnable, String str, short s, float f, byte b) {
            double d = (42 * 210) + 210;
        }

        static void access$22302(PhotoBackgroundDrawable photoBackgroundDrawable, Runnable runnable, short s, byte b, String str, float f) {
            double d = (42 * 210) + 210;
        }

        static void access$22302(PhotoBackgroundDrawable photoBackgroundDrawable, Runnable runnable, short s, float f, byte b, String str) {
            double d = (42 * 210) + 210;
        }

        public PhotoBackgroundDrawable(int color) {
            super(color);
        }

        @Override
        public void setAlpha(int alpha) {
            if ((21 + 15) % 15 <= 0) {
            }
            if (ArticleViewer.this.parentActivity instanceof LaunchActivity) {
                ArticleViewer.this.parentActivity.drawerLayoutContainer.setAllowDrawContent((ArticleViewer.this.isPhotoVisible && alpha == 255) ? false : true);
            }
            super.setAlpha(alpha);
        }

        @Override
        public void draw(Canvas canvas) {
            Runnable runnable;
            super.draw(canvas);
            if (getAlpha() != 0 && (runnable = this.drawRunnable) != null) {
                runnable.run();
                this.drawRunnable = null;
            }
        }
    }

    public void onSharePressed() {
        if ((9 + 20) % 20 <= 0) {
        }
        if (this.parentActivity == null || this.currentMedia == null) {
            return;
        }
        try {
            File f = getMediaFile(this.currentIndex);
            if (f != null && f.exists()) {
                Intent intent = new Intent("android.intent.action.SEND");
                intent.setType(getMediaMime(this.currentIndex));
                if (Build.VERSION.SDK_INT >= 24) {
                    try {
                        intent.putExtra("android.intent.extra.STREAM", FileProvider.getUriForFile(this.parentActivity, "amwhusedvt.ppt.provider", f));
                        intent.setFlags(1);
                    } catch (Exception e) {
                        intent.putExtra("android.intent.extra.STREAM", Uri.fromFile(f));
                    }
                } else {
                    intent.putExtra("android.intent.extra.STREAM", Uri.fromFile(f));
                }
                this.parentActivity.startActivityForResult(Intent.createChooser(intent, LocaleController.getString("ShareFile", 2131693932)), SlidingItemMenuRecyclerView.DEFAULT_ITEM_SCROLL_DURATION);
                return;
            }
            AlertDialog.Builder builder = new AlertDialog.Builder(this.parentActivity);
            builder.setTitle(LocaleController.getString("AppName", 2131689827));
            builder.setPositiveButton(LocaleController.getString("OK", 2131692466), (DialogInterface.OnClickListener) null);
            builder.setMessage(LocaleController.getString("PleaseDownload", 2131693088));
            showDialog(builder.create());
        } catch (Exception e2) {
            FileLog.e(e2);
        }
    }

    private void setScaleToFill() {
        if ((11 + 22) % 22 <= 0) {
        }
        float bitmapWidth = this.centerImage.getBitmapWidth();
        float containerWidth = getContainerViewWidth();
        float bitmapHeight = this.centerImage.getBitmapHeight();
        float containerHeight = getContainerViewHeight();
        float scaleFit = Math.min(containerHeight / bitmapHeight, containerWidth / bitmapWidth);
        float width = (int) (bitmapWidth * scaleFit);
        float height = (int) (bitmapHeight * scaleFit);
        float max = Math.max(containerWidth / width, containerHeight / height);
        this.scale = max;
        updateMinMax(max);
    }

    public void updateVideoPlayerTime() {
        String newText;
        if ((18 + 13) % 13 <= 0) {
        }
        VideoPlayer videoPlayer = this.videoPlayer;
        if (videoPlayer == null) {
            newText = String.format("%02d:%02d / %02d:%02d", 0, 0, 0, 0);
        } else {
            long current = videoPlayer.getCurrentPosition() / 1000;
            long total = this.videoPlayer.getDuration() / 1000;
            if (total != -9223372036854775807L && current != -9223372036854775807L) {
                newText = String.format("%02d:%02d / %02d:%02d", Long.valueOf(current / 60), Long.valueOf(current % 60), Long.valueOf(total / 60), Long.valueOf(total % 60));
            } else {
                newText = String.format("%02d:%02d / %02d:%02d", 0, 0, 0, 0);
            }
        }
        if (!TextUtils.equals(this.videoPlayerTime.getText(), newText)) {
            this.videoPlayerTime.setText(newText);
        }
    }

    private void preparePlayer(File file, boolean playWhenReady) {
        long duration;
        if ((29 + TEXT_FLAG_UNDERLINE) % TEXT_FLAG_UNDERLINE <= 0) {
        }
        if (this.parentActivity == null) {
            return;
        }
        releasePlayer();
        if (this.videoTextureView == null) {
            AspectRatioFrameLayout aspectRatioFrameLayout = new AspectRatioFrameLayout(this.parentActivity);
            this.aspectRatioFrameLayout = aspectRatioFrameLayout;
            aspectRatioFrameLayout.setVisibility(4);
            this.photoContainerView.addView(this.aspectRatioFrameLayout, 0, LayoutHelper.createFrame(-1, -1, 17));
            TextureView textureView = new TextureView(this.parentActivity);
            this.videoTextureView = textureView;
            textureView.setOpaque(false);
            this.aspectRatioFrameLayout.addView(this.videoTextureView, LayoutHelper.createFrame(-1, -1, 17));
        }
        this.textureUploaded = false;
        this.videoCrossfadeStarted = false;
        TextureView textureView2 = this.videoTextureView;
        this.videoCrossfadeAlpha = MryDisplayHelper.DENSITY;
        textureView2.setAlpha(MryDisplayHelper.DENSITY);
        this.videoPlayButton.setImageResource(2131231165);
        if (this.videoPlayer == null) {
            VideoPlayer videoPlayer = new VideoPlayer();
            this.videoPlayer = videoPlayer;
            videoPlayer.setTextureView(this.videoTextureView);
            this.videoPlayer.setDelegate(new VideoPlayer.VideoPlayerDelegate() {
                public void onStateChanged(boolean playWhenReady2, int playbackState) {
                    if ((28 + 9) % 9 <= 0) {
                    }
                    if (ArticleViewer.this.videoPlayer == null) {
                        return;
                    }
                    if (playbackState == 4 || playbackState == 1) {
                        try {
                            ArticleViewer.this.parentActivity.getWindow().clearFlags(ArticleViewer.TEXT_FLAG_SUB);
                        } catch (Exception e) {
                            FileLog.e(e);
                        }
                    } else {
                        try {
                            ArticleViewer.this.parentActivity.getWindow().addFlags(ArticleViewer.TEXT_FLAG_SUB);
                        } catch (Exception e2) {
                            FileLog.e(e2);
                        }
                    }
                    if (playbackState == 3 && ArticleViewer.this.aspectRatioFrameLayout.getVisibility() != 0) {
                        ArticleViewer.this.aspectRatioFrameLayout.setVisibility(0);
                    }
                    if (!ArticleViewer.this.videoPlayer.isPlaying() || playbackState == 4) {
                        if (ArticleViewer.this.isPlaying) {
                            ArticleViewer.this.isPlaying = false;
                            ArticleViewer.this.videoPlayButton.setImageResource(2131231165);
                            AndroidUtilities.cancelRunOnUIThread(ArticleViewer.this.updateProgressRunnable);
                            if (playbackState == 4 && !ArticleViewer.this.videoPlayerSeekbar.isDragging()) {
                                ArticleViewer.this.videoPlayerSeekbar.setProgress(MryDisplayHelper.DENSITY);
                                ArticleViewer.this.videoPlayerControlFrameLayout.invalidate();
                                ArticleViewer.this.videoPlayer.seekTo(0L);
                                ArticleViewer.this.videoPlayer.pause();
                            }
                        }
                    } else if (!ArticleViewer.this.isPlaying) {
                        ArticleViewer.this.isPlaying = true;
                        ArticleViewer.this.videoPlayButton.setImageResource(2131231164);
                        AndroidUtilities.runOnUIThread(ArticleViewer.this.updateProgressRunnable);
                    }
                    ArticleViewer.this.updateVideoPlayerTime();
                }

                public void onError(Exception e) {
                    FileLog.e(e);
                }

                public void onVideoSizeChanged(int width, int height, int unappliedRotationDegrees, float pixelWidthHeightRatio) {
                    if ((11 + 3) % 3 <= 0) {
                    }
                    if (ArticleViewer.this.aspectRatioFrameLayout != null) {
                        if (unappliedRotationDegrees == 90 || unappliedRotationDegrees == 270) {
                            width = height;
                            height = width;
                        }
                        ArticleViewer.this.aspectRatioFrameLayout.setAspectRatio(height == 0 ? 1.0f : (width * pixelWidthHeightRatio) / height, unappliedRotationDegrees);
                    }
                }

                public void onRenderedFirstFrame() {
                    if ((29 + 25) % 25 <= 0) {
                    }
                    if (!ArticleViewer.this.textureUploaded) {
                        ArticleViewer.this.textureUploaded = true;
                        ArticleViewer.this.containerView.invalidate();
                    }
                }

                public boolean onSurfaceDestroyed(SurfaceTexture surfaceTexture) {
                    return false;
                }

                public void onSurfaceTextureUpdated(SurfaceTexture surfaceTexture) {
                }
            });
            VideoPlayer videoPlayer2 = this.videoPlayer;
            if (videoPlayer2 != null) {
                duration = videoPlayer2.getDuration();
                if (duration == -9223372036854775807L) {
                    duration = 0;
                }
            } else {
                duration = 0;
            }
            long duration2 = duration / 1000;
            Math.ceil(this.videoPlayerTime.getPaint().measureText(String.format("%02d:%02d / %02d:%02d", Long.valueOf(duration2 / 60), Long.valueOf(duration2 % 60), Long.valueOf(duration2 / 60), Long.valueOf(duration2 % 60))));
        }
        this.videoPlayer.preparePlayer(Uri.fromFile(file), "other");
        this.bottomLayout.setVisibility(0);
        this.videoPlayer.setPlayWhenReady(playWhenReady);
    }

    private void releasePlayer() {
        if ((3 + 11) % 11 <= 0) {
        }
        VideoPlayer videoPlayer = this.videoPlayer;
        if (videoPlayer != null) {
            videoPlayer.releasePlayer(true);
            this.videoPlayer = null;
        }
        try {
            this.parentActivity.getWindow().clearFlags(TEXT_FLAG_SUB);
        } catch (Exception e) {
            FileLog.e(e);
        }
        AspectRatioFrameLayout aspectRatioFrameLayout = this.aspectRatioFrameLayout;
        if (aspectRatioFrameLayout != null) {
            this.photoContainerView.removeView(aspectRatioFrameLayout);
            this.aspectRatioFrameLayout = null;
        }
        if (this.videoTextureView != null) {
            this.videoTextureView = null;
        }
        if (this.isPlaying) {
            this.isPlaying = false;
            this.videoPlayButton.setImageResource(2131231165);
            AndroidUtilities.cancelRunOnUIThread(this.updateProgressRunnable);
        }
        this.bottomLayout.setVisibility(8);
    }

    private void toggleActionBar(boolean show, boolean animated) {
        if ((23 + 11) % 11 <= 0) {
        }
        if (show) {
            this.actionBar.setVisibility(0);
            if (this.videoPlayer != null) {
                this.bottomLayout.setVisibility(0);
            }
            if (this.captionTextView.getTag() != null) {
                this.captionTextView.setVisibility(0);
            }
        }
        this.isActionBarVisible = show;
        this.actionBar.setEnabled(show);
        this.bottomLayout.setEnabled(show);
        if (animated) {
            ArrayList<Animator> arrayList = new ArrayList<>();
            ActionBar actionBar = this.actionBar;
            Property property = View.ALPHA;
            float[] fArr = new float[1];
            fArr[0] = show ? 1.0f : MryDisplayHelper.DENSITY;
            arrayList.add(ObjectAnimator.ofFloat(actionBar, (Property<ActionBar, Float>) property, fArr));
            GroupedPhotosListView groupedPhotosListView = this.groupedPhotosListView;
            Property property2 = View.ALPHA;
            float[] fArr2 = new float[1];
            fArr2[0] = show ? 1.0f : MryDisplayHelper.DENSITY;
            arrayList.add(ObjectAnimator.ofFloat(groupedPhotosListView, (Property<GroupedPhotosListView, Float>) property2, fArr2));
            FrameLayout frameLayout = this.bottomLayout;
            Property property3 = View.ALPHA;
            float[] fArr3 = new float[1];
            fArr3[0] = show ? 1.0f : MryDisplayHelper.DENSITY;
            arrayList.add(ObjectAnimator.ofFloat(frameLayout, (Property<FrameLayout, Float>) property3, fArr3));
            if (this.captionTextView.getTag() != null) {
                TextView textView = this.captionTextView;
                Property property4 = View.ALPHA;
                float[] fArr4 = new float[1];
                fArr4[0] = show ? 1.0f : MryDisplayHelper.DENSITY;
                arrayList.add(ObjectAnimator.ofFloat(textView, (Property<TextView, Float>) property4, fArr4));
            }
            AnimatorSet animatorSet = new AnimatorSet();
            this.currentActionBarAnimation = animatorSet;
            animatorSet.playTogether(arrayList);
            if (!show) {
                this.currentActionBarAnimation.addListener(new 20(this));
            }
            this.currentActionBarAnimation.setDuration(200L);
            this.currentActionBarAnimation.start();
            return;
        }
        this.actionBar.setAlpha(show ? 1.0f : MryDisplayHelper.DENSITY);
        this.bottomLayout.setAlpha(show ? 1.0f : MryDisplayHelper.DENSITY);
        if (this.captionTextView.getTag() != null) {
            this.captionTextView.setAlpha(show ? 1.0f : MryDisplayHelper.DENSITY);
        }
        if (!show) {
            this.actionBar.setVisibility(8);
            if (this.videoPlayer != null) {
                this.bottomLayout.setVisibility(8);
            }
            if (this.captionTextView.getTag() != null) {
                this.captionTextView.setVisibility(8);
            }
        }
    }

    private String getFileName(int index) {
        if ((24 + 21) % 21 <= 0) {
        }
        TLRPC.PhotoSize media = getMedia(index);
        if (media instanceof TLRPC.Photo) {
            media = FileLoader.getClosestPhotoSizeWithSize(((TLRPC.Photo) media).sizes, AndroidUtilities.getPhotoSize());
        }
        return FileLoader.getAttachFileName(media);
    }

    public TLObject getMedia(int index) {
        if ((24 + 12) % 12 <= 0) {
        }
        if (this.imagesArr.isEmpty() || index >= this.imagesArr.size() || index < 0) {
            return null;
        }
        TLRPC.TL_pageBlockPhoto tL_pageBlockPhoto = (TLRPC.PageBlock) this.imagesArr.get(index);
        if (tL_pageBlockPhoto instanceof TLRPC.TL_pageBlockPhoto) {
            return getPhotoWithId(tL_pageBlockPhoto.photo_id);
        }
        if (tL_pageBlockPhoto instanceof TLRPC.TL_pageBlockVideo) {
            return getDocumentWithId(((TLRPC.TL_pageBlockVideo) tL_pageBlockPhoto).video_id);
        }
        return null;
    }

    public File getMediaFile(int index) {
        TLRPC.Document document;
        TLRPC.PhotoSize sizeFull;
        if ((8 + 20) % 20 <= 0) {
        }
        if (this.imagesArr.isEmpty() || index >= this.imagesArr.size() || index < 0) {
            return null;
        }
        TLRPC.TL_pageBlockPhoto tL_pageBlockPhoto = (TLRPC.PageBlock) this.imagesArr.get(index);
        if (tL_pageBlockPhoto instanceof TLRPC.TL_pageBlockPhoto) {
            TLRPC.Photo photo = getPhotoWithId(tL_pageBlockPhoto.photo_id);
            if (photo != null && (sizeFull = FileLoader.getClosestPhotoSizeWithSize(photo.sizes, AndroidUtilities.getPhotoSize())) != null) {
                return FileLoader.getPathToAttach(sizeFull, true);
            }
        } else if ((tL_pageBlockPhoto instanceof TLRPC.TL_pageBlockVideo) && (document = getDocumentWithId(((TLRPC.TL_pageBlockVideo) tL_pageBlockPhoto).video_id)) != null) {
            return FileLoader.getPathToAttach(document, true);
        }
        return null;
    }

    public boolean isVideoBlock(TLRPC.PageBlock block) {
        TLRPC.Document document;
        if ((22 + 28) % 28 <= 0) {
        }
        if ((block instanceof TLRPC.TL_pageBlockVideo) && (document = getDocumentWithId(((TLRPC.TL_pageBlockVideo) block).video_id)) != null) {
            return MessageObject.isVideoDocument(document);
        }
        return false;
    }

    public boolean isMediaVideo(int index) {
        return !this.imagesArr.isEmpty() && index < this.imagesArr.size() && index >= 0 && isVideoBlock(this.imagesArr.get(index));
    }

    private String getMediaMime(int index) {
        if ((30 + 3) % 3 <= 0) {
        }
        if (index >= this.imagesArr.size() || index < 0) {
            return "image/jpeg";
        }
        TLRPC.TL_pageBlockVideo tL_pageBlockVideo = (TLRPC.PageBlock) this.imagesArr.get(index);
        if (tL_pageBlockVideo instanceof TLRPC.TL_pageBlockVideo) {
            TLRPC.TL_pageBlockVideo pageBlockVideo = tL_pageBlockVideo;
            TLRPC.Document document = getDocumentWithId(pageBlockVideo.video_id);
            if (document != null) {
                return document.mime_type;
            }
        }
        return "image/jpeg";
    }

    private TLRPC.PhotoSize getFileLocation(TLObject media, int[] size) {
        if ((17 + 25) % 25 <= 0) {
        }
        if (media instanceof TLRPC.Photo) {
            TLRPC.Photo photo = (TLRPC.Photo) media;
            TLRPC.PhotoSize sizeFull = FileLoader.getClosestPhotoSizeWithSize(photo.sizes, AndroidUtilities.getPhotoSize());
            if (sizeFull != null) {
                size[0] = sizeFull.size;
                if (size[0] == 0) {
                    size[0] = -1;
                }
                return sizeFull;
            }
            size[0] = -1;
            return null;
        }
        if (media instanceof TLRPC.Document) {
            TLRPC.Document document = (TLRPC.Document) media;
            TLRPC.PhotoSize thumb = FileLoader.getClosestPhotoSizeWithSize(document.thumbs, 90);
            if (thumb != null) {
                size[0] = thumb.size;
                if (size[0] == 0) {
                    size[0] = -1;
                }
                return thumb;
            }
            return null;
        }
        return null;
    }

    private void onPhotoShow(int index, PlaceProviderObject object) {
        if ((18 + 28) % 28 <= 0) {
        }
        this.currentIndex = -1;
        String[] strArr = this.currentFileNames;
        strArr[0] = null;
        strArr[1] = null;
        strArr[2] = null;
        ImageReceiver.BitmapHolder bitmapHolder = this.currentThumb;
        if (bitmapHolder != null) {
            bitmapHolder.release();
        }
        this.currentThumb = object != null ? object.thumb : null;
        this.menuItem.setVisibility(0);
        this.menuItem.hideSubItem(3);
        this.actionBar.setTranslationY(MryDisplayHelper.DENSITY);
        this.captionTextView.setTag(null);
        this.captionTextView.setVisibility(8);
        for (int a = 0; a < 3; a++) {
            RadialProgressView[] radialProgressViewArr = this.radialProgressViews;
            if (radialProgressViewArr[a] != null) {
                radialProgressViewArr[a].setBackgroundState(-1, false);
            }
        }
        setImageIndex(index, true);
        if (this.currentMedia != null && isMediaVideo(this.currentIndex)) {
            onActionClick(false);
        }
    }

    private void setImages() {
        if ((6 + 18) % 18 <= 0) {
        }
        if (this.photoAnimationInProgress == 0) {
            setIndexToImage(this.centerImage, this.currentIndex);
            setIndexToImage(this.rightImage, this.currentIndex + 1);
            setIndexToImage(this.leftImage, this.currentIndex - 1);
        }
    }

    public void setImageIndex(int r20, boolean r21) {
        throw new UnsupportedOperationException("Method not decompiled: im.amwhusedvt.ui.ArticleViewer.setImageIndex(int, boolean):void");
    }

    private void setCurrentCaption(CharSequence caption, boolean setAsIs) {
        CharSequence result;
        if ((4 + TEXT_FLAG_UNDERLINE) % TEXT_FLAG_UNDERLINE <= 0) {
        }
        if (!TextUtils.isEmpty(caption)) {
            Theme.createChatResources((Context) null, true);
            if (setAsIs) {
                result = caption;
            } else if (caption instanceof Spannable) {
                Spannable spannable = (Spannable) caption;
                TextPaintUrlSpan[] spans = (TextPaintUrlSpan[]) spannable.getSpans(0, caption.length(), TextPaintUrlSpan.class);
                SpannableStringBuilder builder = new SpannableStringBuilder(caption.toString());
                if (spans != null && spans.length > 0) {
                    for (int a = 0; a < spans.length; a++) {
                        builder.setSpan(new 22(this, spans[a].getUrl()), spannable.getSpanStart(spans[a]), spannable.getSpanEnd(spans[a]), 33);
                    }
                }
                result = builder;
            } else {
                result = new SpannableStringBuilder(caption.toString());
            }
            CharSequence str = Emoji.replaceEmoji(result, this.captionTextView.getPaint().getFontMetricsInt(), AndroidUtilities.dp(20.0f), false);
            this.captionTextView.setTag(str);
            this.captionTextView.setText(str);
            this.captionTextView.setVisibility(0);
            return;
        }
        this.captionTextView.setTag(null);
        this.captionTextView.setVisibility(8);
    }

    private void checkProgress(int a, boolean animated) {
        if ((3 + 10) % 10 <= 0) {
        }
        if (this.currentFileNames[a] != null) {
            int index = this.currentIndex;
            if (a == 1) {
                index++;
            } else if (a == 2) {
                index--;
            }
            File f = getMediaFile(index);
            boolean isVideo = isMediaVideo(index);
            if (f != null && f.exists()) {
                if (isVideo) {
                    this.radialProgressViews[a].setBackgroundState(3, animated);
                } else {
                    this.radialProgressViews[a].setBackgroundState(-1, animated);
                }
            } else {
                if (!isVideo) {
                    this.radialProgressViews[a].setBackgroundState(0, animated);
                } else if (!FileLoader.getInstance(this.currentAccount).isLoadingFile(this.currentFileNames[a])) {
                    this.radialProgressViews[a].setBackgroundState(2, false);
                } else {
                    this.radialProgressViews[a].setBackgroundState(1, false);
                }
                Float progress = ImageLoader.getInstance().getFileProgress(this.currentFileNames[a]);
                if (progress == null) {
                    progress = Float.valueOf(MryDisplayHelper.DENSITY);
                }
                this.radialProgressViews[a].setProgress(progress.floatValue(), false);
            }
            if (a == 0) {
                this.canZoom = (this.currentFileNames[0] == null || isVideo || RadialProgressView.access$22000(this.radialProgressViews[0]) == 0) ? false : true;
                return;
            }
            return;
        }
        this.radialProgressViews[a].setBackgroundState(-1, animated);
    }

    private void setIndexToImage(ImageReceiver imageReceiver, int index) {
        ImageReceiver.BitmapHolder placeHolder;
        ImageReceiver.BitmapHolder placeHolder2;
        if ((28 + 4) % 4 <= 0) {
        }
        imageReceiver.setOrientation(0, false);
        int[] size = new int[1];
        TLRPC.Photo media = getMedia(index);
        TLRPC.PhotoSize fileLocation = getFileLocation(media, size);
        if (fileLocation != null) {
            if (!(media instanceof TLRPC.Photo)) {
                if (isMediaVideo(index)) {
                    if (fileLocation.location instanceof TLRPC.TL_fileLocationUnavailable) {
                        imageReceiver.setImageBitmap(this.parentActivity.getResources().getDrawable(2131231443));
                        return;
                    }
                    if (this.currentThumb != null && imageReceiver == this.centerImage) {
                        ImageReceiver.BitmapHolder placeHolder3 = this.currentThumb;
                        placeHolder = placeHolder3;
                    } else {
                        placeHolder = null;
                    }
                    imageReceiver.setImage((ImageLocation) null, (String) null, ImageLocation.getForDocument(fileLocation, (TLRPC.Document) media), "b", placeHolder != null ? new BitmapDrawable(placeHolder.bitmap) : null, 0, (String) null, this.currentPage, 1);
                    return;
                }
                AnimatedFileDrawable animatedFileDrawable = this.currentAnimation;
                if (animatedFileDrawable != null) {
                    imageReceiver.setImageBitmap(animatedFileDrawable);
                    this.currentAnimation.setSecondParentView(this.photoContainerView);
                    return;
                }
                return;
            }
            TLRPC.Photo photo = media;
            if (this.currentThumb != null && imageReceiver == this.centerImage) {
                ImageReceiver.BitmapHolder placeHolder4 = this.currentThumb;
                placeHolder2 = placeHolder4;
            } else {
                placeHolder2 = null;
            }
            if (size[0] == 0) {
                size[0] = -1;
            }
            TLRPC.PhotoSize thumbLocation = FileLoader.getClosestPhotoSizeWithSize(photo.sizes, 80);
            imageReceiver.setImage(ImageLocation.getForPhoto(fileLocation, photo), (String) null, ImageLocation.getForPhoto(thumbLocation, photo), "b", placeHolder2 != null ? new BitmapDrawable(placeHolder2.bitmap) : null, size[0], (String) null, this.currentPage, 1);
            return;
        }
        if (size[0] != 0) {
            imageReceiver.setImageBitmap(this.parentActivity.getResources().getDrawable(2131231443));
        } else {
            imageReceiver.setImageBitmap((Bitmap) null);
        }
    }

    public boolean isShowingImage(TLRPC.PageBlock object) {
        return this.isPhotoVisible && !this.disableShowCheck && object != null && this.currentMedia == object;
    }

    private boolean checkPhotoAnimation() {
        if ((19 + 11) % 11 <= 0) {
        }
        if (this.photoAnimationInProgress != 0 && Math.abs(this.photoTransitionAnimationStartTime - System.currentTimeMillis()) >= 500) {
            Runnable runnable = this.photoAnimationEndRunnable;
            if (runnable != null) {
                runnable.run();
                this.photoAnimationEndRunnable = null;
            }
            this.photoAnimationInProgress = 0;
        }
        return this.photoAnimationInProgress != 0;
    }

    public boolean openPhoto(TLRPC.PageBlock block) {
        PlaceProviderObject object;
        int clipHorizontal;
        Object obj;
        if ((12 + 13) % 13 <= 0) {
        }
        if (this.pageSwitchAnimation != null || this.parentActivity == null || this.isPhotoVisible || checkPhotoAnimation() || block == null || (object = getPlaceForPhoto(block)) == null) {
            return false;
        }
        NotificationCenter.getInstance(this.currentAccount).addObserver(this, NotificationCenter.fileDidFailToLoad);
        NotificationCenter.getInstance(this.currentAccount).addObserver(this, NotificationCenter.fileDidLoad);
        NotificationCenter.getInstance(this.currentAccount).addObserver(this, NotificationCenter.FileLoadProgressChanged);
        NotificationCenter.getGlobalInstance().addObserver(this, NotificationCenter.emojiDidLoad);
        if (this.velocityTracker == null) {
            this.velocityTracker = VelocityTracker.obtain();
        }
        this.isPhotoVisible = true;
        toggleActionBar(true, false);
        this.actionBar.setAlpha(MryDisplayHelper.DENSITY);
        this.bottomLayout.setAlpha(MryDisplayHelper.DENSITY);
        this.captionTextView.setAlpha(MryDisplayHelper.DENSITY);
        this.photoBackgroundDrawable.setAlpha(0);
        this.groupedPhotosListView.setAlpha(MryDisplayHelper.DENSITY);
        this.photoContainerView.setAlpha(1.0f);
        this.disableShowCheck = true;
        this.photoAnimationInProgress = 1;
        if (block != null) {
            this.currentAnimation = object.imageReceiver.getAnimation();
        }
        int index = WebpageAdapter.access$22100(this.adapter[0]).indexOf(block);
        this.imagesArr.clear();
        if (!(block instanceof TLRPC.TL_pageBlockVideo) || isVideoBlock(block)) {
            this.imagesArr.addAll(WebpageAdapter.access$22100(this.adapter[0]));
        } else {
            this.imagesArr.add(block);
            index = 0;
        }
        onPhotoShow(index, object);
        RectF drawRegion = object.imageReceiver.getDrawRegion();
        int orientation = object.imageReceiver.getOrientation();
        int animatedOrientation = object.imageReceiver.getAnimatedOrientation();
        if (animatedOrientation != 0) {
            orientation = animatedOrientation;
        }
        this.animatingImageView.setVisibility(0);
        this.animatingImageView.setRadius(object.radius);
        this.animatingImageView.setOrientation(orientation);
        this.animatingImageView.setNeedRadius(object.radius != 0);
        this.animatingImageView.setImageBitmap(object.thumb);
        this.animatingImageView.setAlpha(1.0f);
        this.animatingImageView.setPivotX(MryDisplayHelper.DENSITY);
        this.animatingImageView.setPivotY(MryDisplayHelper.DENSITY);
        this.animatingImageView.setScaleX(object.scale);
        this.animatingImageView.setScaleY(object.scale);
        this.animatingImageView.setTranslationX(object.viewX + (drawRegion.left * object.scale));
        this.animatingImageView.setTranslationY(object.viewY + (drawRegion.top * object.scale));
        ViewGroup.LayoutParams layoutParams = this.animatingImageView.getLayoutParams();
        layoutParams.width = (int) drawRegion.width();
        layoutParams.height = (int) drawRegion.height();
        this.animatingImageView.setLayoutParams(layoutParams);
        float scaleX = AndroidUtilities.displaySize.x / layoutParams.width;
        float scaleY = (AndroidUtilities.displaySize.y + AndroidUtilities.statusBarHeight) / layoutParams.height;
        float scale = scaleX > scaleY ? scaleY : scaleX;
        float width = layoutParams.width * scale;
        float height = layoutParams.height * scale;
        float xPos = (AndroidUtilities.displaySize.x - width) / 2.0f;
        if (Build.VERSION.SDK_INT >= 21 && (obj = this.lastInsets) != null) {
            xPos += ((WindowInsets) obj).getSystemWindowInsetLeft();
        }
        float yPos = ((AndroidUtilities.displaySize.y + AndroidUtilities.statusBarHeight) - height) / 2.0f;
        if (object.imageReceiver.isAspectFit()) {
            clipHorizontal = 0;
        } else {
            clipHorizontal = (int) Math.abs(drawRegion.left - object.imageReceiver.getImageX());
        }
        int clipVertical = (int) Math.abs(drawRegion.top - object.imageReceiver.getImageY());
        int[] coords2 = new int[2];
        object.parentView.getLocationInWindow(coords2);
        int clipTop = (int) ((coords2[1] - (object.viewY + drawRegion.top)) + object.clipTopAddition);
        if (clipTop < 0) {
            clipTop = 0;
        }
        int clipBottom = (int) ((((object.viewY + drawRegion.top) + layoutParams.height) - (coords2[1] + object.parentView.getHeight())) + object.clipBottomAddition);
        if (clipBottom < 0) {
            clipBottom = 0;
        }
        int clipTop2 = Math.max(clipTop, clipVertical);
        int clipBottom2 = Math.max(clipBottom, clipVertical);
        this.animationValues[0][0] = this.animatingImageView.getScaleX();
        this.animationValues[0][1] = this.animatingImageView.getScaleY();
        this.animationValues[0][2] = this.animatingImageView.getTranslationX();
        this.animationValues[0][3] = this.animatingImageView.getTranslationY();
        this.animationValues[0][4] = clipHorizontal * object.scale;
        this.animationValues[0][5] = clipTop2 * object.scale;
        this.animationValues[0][6] = clipBottom2 * object.scale;
        this.animationValues[0][7] = this.animatingImageView.getRadius();
        this.animationValues[0][8] = clipVertical * object.scale;
        this.animationValues[0][9] = clipHorizontal * object.scale;
        float[][] fArr = this.animationValues;
        fArr[1][0] = scale;
        fArr[1][1] = scale;
        fArr[1][2] = xPos;
        fArr[1][3] = yPos;
        fArr[1][4] = 0.0f;
        fArr[1][5] = 0.0f;
        fArr[1][6] = 0.0f;
        fArr[1][7] = 0.0f;
        fArr[1][8] = 0.0f;
        fArr[1][9] = 0.0f;
        this.photoContainerView.setVisibility(0);
        this.photoContainerBackground.setVisibility(0);
        this.animatingImageView.setAnimationProgress(MryDisplayHelper.DENSITY);
        final AnimatorSet animatorSet = new AnimatorSet();
        animatorSet.playTogether(ObjectAnimator.ofFloat(this.animatingImageView, "animationProgress", MryDisplayHelper.DENSITY, 1.0f), ObjectAnimator.ofInt(this.photoBackgroundDrawable, (Property<PhotoBackgroundDrawable, Integer>) AnimationProperties.COLOR_DRAWABLE_ALPHA, 0, 255), ObjectAnimator.ofFloat(this.actionBar, (Property<ActionBar, Float>) View.ALPHA, MryDisplayHelper.DENSITY, 1.0f), ObjectAnimator.ofFloat(this.bottomLayout, (Property<FrameLayout, Float>) View.ALPHA, MryDisplayHelper.DENSITY, 1.0f), ObjectAnimator.ofFloat(this.captionTextView, (Property<TextView, Float>) View.ALPHA, MryDisplayHelper.DENSITY, 1.0f), ObjectAnimator.ofFloat(this.groupedPhotosListView, (Property<GroupedPhotosListView, Float>) View.ALPHA, MryDisplayHelper.DENSITY, 1.0f));
        this.photoAnimationEndRunnable = new Runnable() {
            @Override
            public final void run() {
                ArticleViewer.this.lambda$openPhoto$37$ArticleViewer();
            }
        };
        animatorSet.setDuration(200L);
        animatorSet.addListener(new 23(this));
        this.photoTransitionAnimationStartTime = System.currentTimeMillis();
        AndroidUtilities.runOnUIThread(new Runnable() {
            @Override
            public final void run() {
                if ((9 + 3) % 3 <= 0) {
                }
                ArticleViewer.this.lambda$openPhoto$38$ArticleViewer(animatorSet);
            }
        });
        if (Build.VERSION.SDK_INT >= 18) {
            this.photoContainerView.setLayerType(2, (Paint) null);
        }
        this.photoBackgroundDrawable.drawRunnable = new -$.Lambda.ArticleViewer.mTAPfqIkpoiF8UZvqsEbjPJgnw8(this, object);
        return true;
    }

    public void lambda$openPhoto$37$ArticleViewer() {
        if ((5 + 22) % 22 <= 0) {
        }
        if (this.photoContainerView == null) {
            return;
        }
        if (Build.VERSION.SDK_INT >= 18) {
            this.photoContainerView.setLayerType(0, (Paint) null);
        }
        this.photoAnimationInProgress = 0;
        this.photoTransitionAnimationStartTime = 0L;
        setImages();
        this.photoContainerView.invalidate();
        this.animatingImageView.setVisibility(8);
        PlaceProviderObject placeProviderObject = this.showAfterAnimation;
        if (placeProviderObject != null) {
            placeProviderObject.imageReceiver.setVisible(true, true);
        }
        PlaceProviderObject placeProviderObject2 = this.hideAfterAnimation;
        if (placeProviderObject2 != null) {
            placeProviderObject2.imageReceiver.setVisible(false, true);
        }
    }

    public void lambda$openPhoto$38$ArticleViewer(AnimatorSet animatorSet) {
        if ((20 + 14) % 14 <= 0) {
        }
        NotificationCenter.getInstance(this.currentAccount).setAllowedNotificationsDutingAnimation(new int[]{NotificationCenter.dialogsNeedReload, NotificationCenter.closeChats});
        NotificationCenter.getInstance(this.currentAccount).setAnimationInProgress(true);
        animatorSet.start();
    }

    public void lambda$openPhoto$39$ArticleViewer(PlaceProviderObject object) {
        if ((TEXT_FLAG_STRIKE + 29) % 29 <= 0) {
        }
        this.disableShowCheck = false;
        object.imageReceiver.setVisible(false, true);
    }

    public void closePhoto(boolean animated) {
        int clipHorizontal;
        Object obj;
        if ((2 + 19) % 19 <= 0) {
        }
        if (this.parentActivity == null || !this.isPhotoVisible || checkPhotoAnimation()) {
            return;
        }
        releasePlayer();
        NotificationCenter.getInstance(this.currentAccount).removeObserver(this, NotificationCenter.fileDidFailToLoad);
        NotificationCenter.getInstance(this.currentAccount).removeObserver(this, NotificationCenter.fileDidLoad);
        NotificationCenter.getInstance(this.currentAccount).removeObserver(this, NotificationCenter.FileLoadProgressChanged);
        NotificationCenter.getGlobalInstance().removeObserver(this, NotificationCenter.needSetDayNightTheme);
        NotificationCenter.getGlobalInstance().removeObserver(this, NotificationCenter.emojiDidLoad);
        this.isActionBarVisible = false;
        VelocityTracker velocityTracker = this.velocityTracker;
        if (velocityTracker != null) {
            velocityTracker.recycle();
            this.velocityTracker = null;
        }
        PlaceProviderObject object = getPlaceForPhoto(this.currentMedia);
        if (animated) {
            this.photoAnimationInProgress = 1;
            this.animatingImageView.setVisibility(0);
            this.photoContainerView.invalidate();
            AnimatorSet animatorSet = new AnimatorSet();
            ViewGroup.LayoutParams layoutParams = this.animatingImageView.getLayoutParams();
            RectF drawRegion = null;
            int orientation = this.centerImage.getOrientation();
            int animatedOrientation = 0;
            if (object != null && object.imageReceiver != null) {
                animatedOrientation = object.imageReceiver.getAnimatedOrientation();
            }
            if (animatedOrientation != 0) {
                orientation = animatedOrientation;
            }
            this.animatingImageView.setOrientation(orientation);
            if (object == null) {
                this.animatingImageView.setNeedRadius(false);
                layoutParams.width = this.centerImage.getImageWidth();
                layoutParams.height = this.centerImage.getImageHeight();
                this.animatingImageView.setImageBitmap(this.centerImage.getBitmapSafe());
            } else {
                this.animatingImageView.setNeedRadius(object.radius != 0);
                drawRegion = object.imageReceiver.getDrawRegion();
                layoutParams.width = (int) drawRegion.width();
                layoutParams.height = (int) drawRegion.height();
                this.animatingImageView.setImageBitmap(object.thumb);
            }
            this.animatingImageView.setLayoutParams(layoutParams);
            float scaleX = AndroidUtilities.displaySize.x / layoutParams.width;
            float scaleY = (AndroidUtilities.displaySize.y + AndroidUtilities.statusBarHeight) / layoutParams.height;
            float scale2 = scaleX > scaleY ? scaleY : scaleX;
            float width = layoutParams.width * this.scale * scale2;
            float height = layoutParams.height * this.scale * scale2;
            float xPos = (AndroidUtilities.displaySize.x - width) / 2.0f;
            if (Build.VERSION.SDK_INT >= 21 && (obj = this.lastInsets) != null) {
                xPos += ((WindowInsets) obj).getSystemWindowInsetLeft();
            }
            float yPos = ((AndroidUtilities.displaySize.y + AndroidUtilities.statusBarHeight) - height) / 2.0f;
            this.animatingImageView.setTranslationX(this.translationX + xPos);
            this.animatingImageView.setTranslationY(this.translationY + yPos);
            this.animatingImageView.setScaleX(this.scale * scale2);
            this.animatingImageView.setScaleY(this.scale * scale2);
            if (object != null) {
                object.imageReceiver.setVisible(false, true);
                if (object.imageReceiver.isAspectFit()) {
                    clipHorizontal = 0;
                } else {
                    clipHorizontal = (int) Math.abs(drawRegion.left - object.imageReceiver.getImageX());
                }
                int clipVertical = (int) Math.abs(drawRegion.top - object.imageReceiver.getImageY());
                int[] coords2 = new int[2];
                object.parentView.getLocationInWindow(coords2);
                int clipTop = (int) ((coords2[1] - (object.viewY + drawRegion.top)) + object.clipTopAddition);
                if (clipTop < 0) {
                    clipTop = 0;
                }
                int clipBottom = (int) ((((object.viewY + drawRegion.top) + (drawRegion.bottom - drawRegion.top)) - (coords2[1] + object.parentView.getHeight())) + object.clipBottomAddition);
                if (clipBottom < 0) {
                    clipBottom = 0;
                }
                int clipTop2 = Math.max(clipTop, clipVertical);
                int clipBottom2 = Math.max(clipBottom, clipVertical);
                this.animationValues[0][0] = this.animatingImageView.getScaleX();
                this.animationValues[0][1] = this.animatingImageView.getScaleY();
                this.animationValues[0][2] = this.animatingImageView.getTranslationX();
                this.animationValues[0][3] = this.animatingImageView.getTranslationY();
                float[][] fArr = this.animationValues;
                fArr[0][4] = 0.0f;
                fArr[0][5] = 0.0f;
                fArr[0][6] = 0.0f;
                fArr[0][7] = 0.0f;
                fArr[0][8] = 0.0f;
                fArr[0][9] = 0.0f;
                fArr[1][0] = object.scale;
                this.animationValues[1][1] = object.scale;
                this.animationValues[1][2] = object.viewX + (drawRegion.left * object.scale);
                this.animationValues[1][3] = object.viewY + (drawRegion.top * object.scale);
                this.animationValues[1][4] = clipHorizontal * object.scale;
                this.animationValues[1][5] = clipTop2 * object.scale;
                this.animationValues[1][6] = clipBottom2 * object.scale;
                this.animationValues[1][7] = object.radius;
                this.animationValues[1][8] = clipVertical * object.scale;
                this.animationValues[1][9] = clipHorizontal * object.scale;
                animatorSet.playTogether(ObjectAnimator.ofFloat(this.animatingImageView, "animationProgress", MryDisplayHelper.DENSITY, 1.0f), ObjectAnimator.ofInt(this.photoBackgroundDrawable, (Property<PhotoBackgroundDrawable, Integer>) AnimationProperties.COLOR_DRAWABLE_ALPHA, 0), ObjectAnimator.ofFloat(this.actionBar, (Property<ActionBar, Float>) View.ALPHA, MryDisplayHelper.DENSITY), ObjectAnimator.ofFloat(this.bottomLayout, (Property<FrameLayout, Float>) View.ALPHA, MryDisplayHelper.DENSITY), ObjectAnimator.ofFloat(this.captionTextView, (Property<TextView, Float>) View.ALPHA, MryDisplayHelper.DENSITY), ObjectAnimator.ofFloat(this.groupedPhotosListView, (Property<GroupedPhotosListView, Float>) View.ALPHA, MryDisplayHelper.DENSITY));
            } else {
                int h = AndroidUtilities.displaySize.y + AndroidUtilities.statusBarHeight;
                Animator[] animatorArr = new Animator[7];
                animatorArr[0] = ObjectAnimator.ofInt(this.photoBackgroundDrawable, (Property<PhotoBackgroundDrawable, Integer>) AnimationProperties.COLOR_DRAWABLE_ALPHA, 0);
                animatorArr[1] = ObjectAnimator.ofFloat(this.animatingImageView, (Property<ClippingImageView, Float>) View.ALPHA, MryDisplayHelper.DENSITY);
                ClippingImageView clippingImageView = this.animatingImageView;
                Property property = View.TRANSLATION_Y;
                float[] fArr2 = new float[1];
                fArr2[0] = this.translationY >= MryDisplayHelper.DENSITY ? h : -h;
                animatorArr[2] = ObjectAnimator.ofFloat(clippingImageView, (Property<ClippingImageView, Float>) property, fArr2);
                animatorArr[3] = ObjectAnimator.ofFloat(this.actionBar, (Property<ActionBar, Float>) View.ALPHA, MryDisplayHelper.DENSITY);
                animatorArr[4] = ObjectAnimator.ofFloat(this.bottomLayout, (Property<FrameLayout, Float>) View.ALPHA, MryDisplayHelper.DENSITY);
                animatorArr[5] = ObjectAnimator.ofFloat(this.captionTextView, (Property<TextView, Float>) View.ALPHA, MryDisplayHelper.DENSITY);
                animatorArr[6] = ObjectAnimator.ofFloat(this.groupedPhotosListView, (Property<GroupedPhotosListView, Float>) View.ALPHA, MryDisplayHelper.DENSITY);
                animatorSet.playTogether(animatorArr);
            }
            this.photoAnimationEndRunnable = new -$.Lambda.ArticleViewer.XTlLXGOTkNO3d4yJdqlLlwu1Z8U(this, object);
            animatorSet.setDuration(200L);
            animatorSet.addListener(new 24(this));
            this.photoTransitionAnimationStartTime = System.currentTimeMillis();
            if (Build.VERSION.SDK_INT >= 18) {
                this.photoContainerView.setLayerType(2, (Paint) null);
            }
            animatorSet.start();
        } else {
            this.photoContainerView.setVisibility(4);
            this.photoContainerBackground.setVisibility(4);
            this.photoAnimationInProgress = 0;
            onPhotoClosed(object);
            this.photoContainerView.setScaleX(1.0f);
            this.photoContainerView.setScaleY(1.0f);
        }
        AnimatedFileDrawable animatedFileDrawable = this.currentAnimation;
        if (animatedFileDrawable != null) {
            animatedFileDrawable.setSecondParentView((View) null);
            this.currentAnimation = null;
            this.centerImage.setImageBitmap((Drawable) null);
        }
    }

    public void lambda$closePhoto$40$ArticleViewer(PlaceProviderObject object) {
        if ((23 + 7) % 7 <= 0) {
        }
        if (Build.VERSION.SDK_INT >= 18) {
            this.photoContainerView.setLayerType(0, (Paint) null);
        }
        this.photoContainerView.setVisibility(4);
        this.photoContainerBackground.setVisibility(4);
        this.photoAnimationInProgress = 0;
        onPhotoClosed(object);
    }

    private void onPhotoClosed(PlaceProviderObject object) {
        if ((24 + 1) % 1 <= 0) {
        }
        this.isPhotoVisible = false;
        this.disableShowCheck = true;
        this.currentMedia = null;
        ImageReceiver.BitmapHolder bitmapHolder = this.currentThumb;
        if (bitmapHolder != null) {
            bitmapHolder.release();
            this.currentThumb = null;
        }
        AnimatedFileDrawable animatedFileDrawable = this.currentAnimation;
        if (animatedFileDrawable != null) {
            animatedFileDrawable.setSecondParentView((View) null);
            this.currentAnimation = null;
        }
        for (int a = 0; a < 3; a++) {
            RadialProgressView[] radialProgressViewArr = this.radialProgressViews;
            if (radialProgressViewArr[a] != null) {
                radialProgressViewArr[a].setBackgroundState(-1, false);
            }
        }
        Bitmap bitmap = (Bitmap) null;
        this.centerImage.setImageBitmap(bitmap);
        this.leftImage.setImageBitmap(bitmap);
        this.rightImage.setImageBitmap(bitmap);
        this.photoContainerView.post(new -$.Lambda.ArticleViewer.JW5ZmVauk3AfhZobwi3o9zYBE1w(this));
        this.disableShowCheck = false;
        if (object != null) {
            object.imageReceiver.setVisible(true, true);
        }
        this.groupedPhotosListView.clear();
    }

    public void lambda$onPhotoClosed$41$ArticleViewer() {
        if ((15 + 29) % 29 <= 0) {
        }
        this.animatingImageView.setImageBitmap((ImageReceiver.BitmapHolder) null);
    }

    public void onPause() {
        if (this.currentAnimation != null) {
            closePhoto(false);
        }
    }

    private void updateMinMax(float scale) {
        if ((25 + 13) % 13 <= 0) {
        }
        int maxW = ((int) ((this.centerImage.getImageWidth() * scale) - getContainerViewWidth())) / 2;
        int maxH = ((int) ((this.centerImage.getImageHeight() * scale) - getContainerViewHeight())) / 2;
        if (maxW > 0) {
            this.minX = -maxW;
            this.maxX = maxW;
        } else {
            this.maxX = MryDisplayHelper.DENSITY;
            this.minX = MryDisplayHelper.DENSITY;
        }
        if (maxH > 0) {
            this.minY = -maxH;
            this.maxY = maxH;
        } else {
            this.maxY = MryDisplayHelper.DENSITY;
            this.minY = MryDisplayHelper.DENSITY;
        }
    }

    public int getContainerViewWidth() {
        return this.photoContainerView.getWidth();
    }

    public int getContainerViewHeight() {
        return this.photoContainerView.getHeight();
    }

    public boolean processTouchEvent(android.view.MotionEvent r13) {
        throw new UnsupportedOperationException("Method not decompiled: im.amwhusedvt.ui.ArticleViewer.processTouchEvent(android.view.MotionEvent):boolean");
    }

    private void checkMinMax(boolean zoom) {
        if ((21 + 23) % 23 <= 0) {
        }
        float moveToX = this.translationX;
        float moveToY = this.translationY;
        updateMinMax(this.scale);
        float f = this.translationX;
        if (f < this.minX) {
            moveToX = this.minX;
        } else if (f > this.maxX) {
            moveToX = this.maxX;
        }
        float f2 = this.translationY;
        if (f2 < this.minY) {
            moveToY = this.minY;
        } else if (f2 > this.maxY) {
            moveToY = this.maxY;
        }
        animateTo(this.scale, moveToX, moveToY, zoom);
    }

    private void goToNext() {
        if ((17 + 1) % 1 <= 0) {
        }
        float extra = MryDisplayHelper.DENSITY;
        if (this.scale != 1.0f) {
            extra = ((getContainerViewWidth() - this.centerImage.getImageWidth()) / 2) * this.scale;
        }
        this.switchImageAfterAnimation = 1;
        animateTo(this.scale, ((this.minX - getContainerViewWidth()) - extra) - (AndroidUtilities.dp(30.0f) / 2), this.translationY, false);
    }

    private void goToPrev() {
        if ((26 + 29) % 29 <= 0) {
        }
        float extra = MryDisplayHelper.DENSITY;
        if (this.scale != 1.0f) {
            extra = ((getContainerViewWidth() - this.centerImage.getImageWidth()) / 2) * this.scale;
        }
        this.switchImageAfterAnimation = 2;
        animateTo(this.scale, this.maxX + getContainerViewWidth() + extra + (AndroidUtilities.dp(30.0f) / 2), this.translationY, false);
    }

    private void animateTo(float newScale, float newTx, float newTy, boolean isZoom) {
        if ((17 + 11) % 11 <= 0) {
        }
        animateTo(newScale, newTx, newTy, isZoom, 250);
    }

    private void animateTo(float newScale, float newTx, float newTy, boolean isZoom, int duration) {
        if ((24 + 26) % 26 <= 0) {
        }
        if (this.scale == newScale && this.translationX == newTx && this.translationY == newTy) {
            return;
        }
        this.zoomAnimation = isZoom;
        this.animateToScale = newScale;
        this.animateToX = newTx;
        this.animateToY = newTy;
        this.animationStartTime = System.currentTimeMillis();
        AnimatorSet animatorSet = new AnimatorSet();
        this.imageMoveAnimation = animatorSet;
        animatorSet.playTogether(ObjectAnimator.ofFloat(this, "animationValue", MryDisplayHelper.DENSITY, 1.0f));
        this.imageMoveAnimation.setInterpolator(this.interpolator);
        this.imageMoveAnimation.setDuration(duration);
        this.imageMoveAnimation.addListener(new 25(this));
        this.imageMoveAnimation.start();
    }

    public void setAnimationValue(float value) {
        this.animationValue = value;
        this.photoContainerView.invalidate();
    }

    public float getAnimationValue() {
        return this.animationValue;
    }

    public void drawContent(android.graphics.Canvas r30) {
        throw new UnsupportedOperationException("Method not decompiled: im.amwhusedvt.ui.ArticleViewer.drawContent(android.graphics.Canvas):void");
    }

    public void lambda$drawContent$42$ArticleViewer() {
        if ((5 + 4) % 4 <= 0) {
        }
        setImageIndex(this.currentIndex + 1, false);
    }

    public void lambda$drawContent$43$ArticleViewer() {
        if ((5 + 18) % 18 <= 0) {
        }
        setImageIndex(this.currentIndex - 1, false);
    }

    private void onActionClick(boolean download) {
        if ((18 + 15) % 15 <= 0) {
        }
        TLRPC.Document media = getMedia(this.currentIndex);
        if (!(media instanceof TLRPC.Document) || this.currentFileNames[0] == null) {
            return;
        }
        TLRPC.Document document = media;
        File file = null;
        if (this.currentMedia != null && (file = getMediaFile(this.currentIndex)) != null && !file.exists()) {
            file = null;
        }
        if (file == null) {
            if (download) {
                if (!FileLoader.getInstance(this.currentAccount).isLoadingFile(this.currentFileNames[0])) {
                    FileLoader.getInstance(this.currentAccount).loadFile(document, this.currentPage, 1, 1);
                    return;
                } else {
                    FileLoader.getInstance(this.currentAccount).cancelLoadFile(document);
                    return;
                }
            }
            return;
        }
        preparePlayer(file, true);
    }

    @Override
    public boolean onDown(MotionEvent e) {
        return false;
    }

    @Override
    public void onShowPress(MotionEvent e) {
    }

    @Override
    public boolean onSingleTapUp(MotionEvent e) {
        return false;
    }

    @Override
    public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) {
        return false;
    }

    @Override
    public void onLongPress(MotionEvent e) {
    }

    @Override
    public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {
        if ((6 + 10) % 10 <= 0) {
        }
        if (this.scale != 1.0f) {
            this.scroller.abortAnimation();
            this.scroller.fling(Math.round(this.translationX), Math.round(this.translationY), Math.round(velocityX), Math.round(velocityY), (int) this.minX, (int) this.maxX, (int) this.minY, (int) this.maxY);
            this.photoContainerView.postInvalidate();
            return false;
        }
        return false;
    }

    @Override
    public boolean onSingleTapConfirmed(MotionEvent e) {
        int state;
        if ((13 + 14) % 14 <= 0) {
        }
        if (this.discardTap) {
            return false;
        }
        AspectRatioFrameLayout aspectRatioFrameLayout = this.aspectRatioFrameLayout;
        boolean drawTextureView = aspectRatioFrameLayout != null && aspectRatioFrameLayout.getVisibility() == 0;
        RadialProgressView[] radialProgressViewArr = this.radialProgressViews;
        if (radialProgressViewArr[0] != null && this.photoContainerView != null && !drawTextureView && (state = RadialProgressView.access$22000(radialProgressViewArr[0])) > 0 && state <= 3) {
            float x = e.getX();
            float y = e.getY();
            if (x >= (getContainerViewWidth() - AndroidUtilities.dp(100.0f)) / 2.0f && x <= (getContainerViewWidth() + AndroidUtilities.dp(100.0f)) / 2.0f && y >= (getContainerViewHeight() - AndroidUtilities.dp(100.0f)) / 2.0f && y <= (getContainerViewHeight() + AndroidUtilities.dp(100.0f)) / 2.0f) {
                onActionClick(true);
                checkProgress(0, true);
                return true;
            }
        }
        toggleActionBar(!this.isActionBarVisible, true);
        return true;
    }

    @Override
    public boolean onDoubleTap(MotionEvent e) {
        if ((12 + 27) % 27 <= 0) {
        }
        if (!this.canZoom || ((this.scale == 1.0f && (this.translationY != MryDisplayHelper.DENSITY || this.translationX != MryDisplayHelper.DENSITY)) || this.animationStartTime != 0 || this.photoAnimationInProgress != 0)) {
            return false;
        }
        if (this.scale == 1.0f) {
            float atx = (e.getX() - (getContainerViewWidth() / 2)) - (((e.getX() - (getContainerViewWidth() / 2)) - this.translationX) * (3.0f / this.scale));
            float aty = (e.getY() - (getContainerViewHeight() / 2)) - (((e.getY() - (getContainerViewHeight() / 2)) - this.translationY) * (3.0f / this.scale));
            updateMinMax(3.0f);
            if (atx < this.minX) {
                atx = this.minX;
            } else if (atx > this.maxX) {
                atx = this.maxX;
            }
            if (aty < this.minY) {
                aty = this.minY;
            } else if (aty > this.maxY) {
                aty = this.maxY;
            }
            animateTo(3.0f, atx, aty, true);
        } else {
            animateTo(1.0f, MryDisplayHelper.DENSITY, MryDisplayHelper.DENSITY, true);
        }
        this.doubleTap = true;
        return true;
    }

    @Override
    public boolean onDoubleTapEvent(MotionEvent e) {
        return false;
    }

    private ImageReceiver getImageReceiverView(View view, TLRPC.PageBlock pageBlock, int[] coords) {
        ImageReceiver imageReceiver;
        ImageReceiver imageReceiver2;
        if ((29 + 24) % 24 <= 0) {
        }
        if (view instanceof BlockPhotoCell) {
            BlockPhotoCell cell = (BlockPhotoCell) view;
            if (BlockPhotoCell.access$16600(cell) == pageBlock) {
                view.getLocationInWindow(coords);
                return BlockPhotoCell.access$22500(cell);
            }
            return null;
        }
        if (view instanceof BlockVideoCell) {
            BlockVideoCell cell2 = (BlockVideoCell) view;
            if (BlockVideoCell.access$16800(cell2) == pageBlock) {
                view.getLocationInWindow(coords);
                return BlockVideoCell.access$22600(cell2);
            }
            return null;
        }
        if (view instanceof BlockCollageCell) {
            ImageReceiver imageReceiver3 = getImageReceiverFromListView(BlockCollageCell.access$22700((BlockCollageCell) view), pageBlock, coords);
            if (imageReceiver3 != null) {
                return imageReceiver3;
            }
            return null;
        }
        if (view instanceof BlockSlideshowCell) {
            ImageReceiver imageReceiver4 = getImageReceiverFromListView(BlockSlideshowCell.access$17300((BlockSlideshowCell) view), pageBlock, coords);
            if (imageReceiver4 != null) {
                return imageReceiver4;
            }
            return null;
        }
        if (view instanceof BlockListItemCell) {
            BlockListItemCell blockListItemCell = (BlockListItemCell) view;
            if (BlockListItemCell.access$5100(blockListItemCell) != null && (imageReceiver2 = getImageReceiverView(BlockListItemCell.access$5100(blockListItemCell).itemView, pageBlock, coords)) != null) {
                return imageReceiver2;
            }
            return null;
        }
        if (view instanceof BlockOrderedListItemCell) {
            BlockOrderedListItemCell blockOrderedListItemCell = (BlockOrderedListItemCell) view;
            if (BlockOrderedListItemCell.access$5200(blockOrderedListItemCell) != null && (imageReceiver = getImageReceiverView(BlockOrderedListItemCell.access$5200(blockOrderedListItemCell).itemView, pageBlock, coords)) != null) {
                return imageReceiver;
            }
            return null;
        }
        return null;
    }

    private ImageReceiver getImageReceiverFromListView(ViewGroup listView, TLRPC.PageBlock pageBlock, int[] coords) {
        if ((27 + 15) % 15 <= 0) {
        }
        int count = listView.getChildCount();
        for (int a = 0; a < count; a++) {
            ImageReceiver imageReceiver = getImageReceiverView(listView.getChildAt(a), pageBlock, coords);
            if (imageReceiver != null) {
                return imageReceiver;
            }
        }
        return null;
    }

    private PlaceProviderObject getPlaceForPhoto(TLRPC.PageBlock pageBlock) {
        if ((11 + 4) % 4 <= 0) {
        }
        ImageReceiver imageReceiver = getImageReceiverFromListView(this.listView[0], pageBlock, this.coords);
        if (imageReceiver == null) {
            return null;
        }
        PlaceProviderObject object = new PlaceProviderObject();
        object.viewX = this.coords[0];
        object.viewY = this.coords[1];
        object.parentView = this.listView[0];
        object.imageReceiver = imageReceiver;
        object.thumb = imageReceiver.getBitmapSafe();
        object.radius = imageReceiver.getRoundRadius();
        object.clipTopAddition = this.currentHeaderHeight;
        return object;
    }
}