imToken v2.9.3版本的 MD5 值为:42af1a08a3f01f69d2f3782d81007b3c
以下内容为反编译后的 e.java 源代码,内容仅作参考
package com.helpscout.beacon.internal.presentation.ui.article;
import com.helpscout.beacon.internal.core.model.ArticleApi;
import com.helpscout.beacon.internal.core.model.ArticleDetailsApi;
import com.helpscout.beacon.internal.presentation.extensions.StringExtensionsKt;
import java.util.Arrays;
import java.util.List;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.StringsKt;
public final class e {
private final String a(String str) {
return StringsKt.replace$default(str, "src=\"//", "src=\"https://", false, 4, (Object) null);
}
private final String a(List<ArticleApi.ArticleDocPreview> list, String str) {
if (!(!list.isEmpty())) {
return "";
}
StringBuilder sb = new StringBuilder();
for (ArticleApi.ArticleDocPreview articleDocPreview : list) {
Object[] objArr = new Object[3];
objArr[0] = articleDocPreview.getUrl();
objArr[1] = articleDocPreview.getName();
String preview = articleDocPreview.getPreview();
String cleanUpPreview = preview != null ? StringExtensionsKt.cleanUpPreview(preview) : null;
if (cleanUpPreview == null) {
cleanUpPreview = "";
}
objArr[2] = cleanUpPreview;
String format = String.format("\n <a href=\"%s\" class=\"c-RelatedArticles__card\">\n <div class=\"c-RelatedArticles__card-title\">%s</div>\n <div class=\"c-RelatedArticles__card-desc\">%s</div>\n </a>\n ", Arrays.copyOf(objArr, 3));
Intrinsics.checkNotNullExpressionValue(format, "java.lang.String.format(this, *args)");
sb.append(format);
}
String sb2 = sb.toString();
Intrinsics.checkNotNullExpressionValue(sb2, "StringBuilder().apply(builderAction).toString()");
String format2 = String.format("\n <div class=\"c-RelatedArticles\">\n <div class=\"c-RelatedArticles__content\">\n <div class=\"c-RelatedArticles__title\">%s</div>\n %s\n </div>\n </div>\n ", Arrays.copyOf(new Object[]{str, sb2}, 2));
Intrinsics.checkNotNullExpressionValue(format2, "java.lang.String.format(this, *args)");
return format2;
}
public final String a(ArticleDetailsApi articleApi, String relatedArticlesTitle) {
Intrinsics.checkNotNullParameter(articleApi, "articleApi");
Intrinsics.checkNotNullParameter(relatedArticlesTitle, "relatedArticlesTitle");
return "<!doctype html>\n <html>\n <head>\n <meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0'>\n <link rel='stylesheet' type='text/css' href='file:///android_res/raw/hs_beacon_article.css'>\n </head>\n <body>\n <div class=\"c-article-container\">\n <article id=\"fullArticle\">" + a(articleApi.getText()) + "</article>\n </div>\n " + a(articleApi.getRelated(), relatedArticlesTitle) + "\n </body>\n </html>";
}
}