正在查看: Minits v4.9.3.32 应用的 XoneMapsViewEmbed.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Minits v4.9.3.32 应用的 XoneMapsViewEmbed.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.xone.maps.ui;
import C9.h;
import Da.l;
import Da.x;
import Ga.e;
import Ha.a;
import Ka.C0241e;
import Ka.C0244h;
import Ka.C0245i;
import Ka.CallableC0252p;
import Ka.FutureC0240d;
import Ka.V;
import ab.AbstractC0399a;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.graphics.Point;
import android.location.Address;
import android.location.Geocoder;
import android.location.Location;
import android.net.Uri;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.DisplayMetrics;
import android.util.Pair;
import android.util.TypedValue;
import android.view.DragEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.ListAdapter;
import android.widget.ListView;
import androidx.annotation.Keep;
import androidx.drawerlayout.widget.DrawerLayout;
import androidx.lifecycle.h;
import androidx.lifecycle.k;
import androidx.lifecycle.m;
import c4.c;
import c4.d;
import c4.e;
import c4.f;
import c4.g;
import c4.j;
import c6.b;
import com.google.android.gms.maps.GoogleMapOptions;
import com.google.android.gms.maps.StreetViewPanoramaOptions;
import com.google.android.gms.maps.model.CameraPosition;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.LatLngBounds;
import com.xone.android.javascript.XOneJavascript;
import com.xone.android.nfc.runtimeobjects.XoneNFCRuntime;
import com.xone.android.script.events.EventCallbackTask;
import com.xone.android.script.events.EventOnClusterClicked;
import com.xone.android.script.events.EventOnDistanceMeter;
import com.xone.android.script.events.EventOnLineClicked;
import com.xone.android.script.events.EventOnLocationChanged;
import com.xone.android.script.events.EventOnLocationReady;
import com.xone.android.script.events.EventOnMapClicked;
import com.xone.android.script.events.EventOnMapDrop;
import com.xone.android.script.events.EventOnMapLongClicked;
import com.xone.android.script.events.EventOnMapMoveEnded;
import com.xone.android.script.events.EventOnMapMoveStarted;
import com.xone.android.script.events.EventOnMapReady;
import com.xone.android.script.events.EventOnMapZoomChanged;
import com.xone.android.script.events.EventOnMarkerDragEnd;
import com.xone.android.script.events.EventOnStreetViewStatusChanged;
import com.xone.android.script.runtimeobjects.GpsTools;
import com.xone.android.utils.Utils;
import com.xone.annotations.ScriptAllowed;
import com.xone.interfaces.IXoneApp;
import com.xone.interfaces.IXoneCollection;
import com.xone.interfaces.IXoneObject;
import com.xone.interfaces.IXoneView;
import com.xone.maps.script.CircleScriptWrapper;
import com.xone.maps.script.ClusterManagerScriptWrapper;
import com.xone.maps.script.MarkerScriptWrapper;
import com.xone.maps.ui.XoneMapsViewEmbed;
import d6.c;
import e4.A;
import e4.F;
import e4.G;
import e4.H;
import e4.I;
import e4.i;
import e4.j;
import e4.n;
import e4.o;
import e4.p;
import e4.q;
import e4.r;
import e4.s;
import e4.t;
import e4.u;
import e4.z;
import eb.AbstractC0665a;
import fb.AbstractC0692e;
import fb.AbstractC0699l;
import ha.AbstractC0751f;
import j$.util.Objects;
import j$.util.concurrent.ConcurrentHashMap;
import ja.C0789a;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.Closeable;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.lang.ref.WeakReference;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import org.mozilla.javascript.C0893d0;
import org.mozilla.javascript.C0932x0;
import org.mozilla.javascript.Q0;
import org.xmlpull.v1.XmlPullParserException;
import ua.E;
import ua.InterfaceC1032j0;
import ua.InterfaceC1036l0;
import ua.InterfaceC1038m0;
import ua.InterfaceC1042o0;
import ua.P;
import va.C1066a;
import ya.AbstractC1099a;
import ya.AbstractC1100b;
import za.C1112b;
import za.C1116f;
@ScriptAllowed
public final class XoneMapsViewEmbed extends DrawerLayout implements IXoneView, P, c.k, c.i, c.g, c.h, c.e, f, c.j, c.b, c.c, c.l, g, k {
public static final j l1;
public static final i m1;
public static final e4.k n1;
public static final List o1;
public static final List p1;
public static final List q1;
public int A0;
public int B0;
public int C0;
public boolean D0;
public boolean E0;
public boolean F0;
public boolean G0;
public boolean H0;
public boolean I0;
public boolean J0;
public boolean K0;
public boolean L0;
public boolean M0;
public boolean N0;
public boolean O0;
public float P0;
public boolean Q0;
public int R0;
public String S0;
public String T0;
public LatLngBounds U0;
public Integer V0;
public Integer W0;
public boolean X0;
public int Y0;
public int Z0;
public boolean a1;
public List b1;
public List c1;
public List d1;
public boolean e0;
public String e1;
public Location f0;
public final List f1;
public Future g0;
public final Map g1;
public IXoneObject h0;
public Map h1;
public IXoneCollection i0;
public Float i1;
public c j0;
public Boolean j1;
public d k0;
public C0245i k1;
public c4.k l0;
public F m0;
public ListView n0;
public DrawerLayout.f o0;
public C1116f p0;
public C1112b q0;
public Map r0;
public Map s0;
public Map t0;
public Map u0;
public t v0;
public Map w0;
public C1066a x0;
public String y0;
public int z0;
public static class a {
public static final int[] a;
static {
int[] iArr = new int[h.a.values().length];
a = iArr;
try {
iArr[h.a.ON_CREATE.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
a[h.a.ON_START.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
a[h.a.ON_RESUME.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
a[h.a.ON_PAUSE.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
a[h.a.ON_STOP.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
try {
a[h.a.ON_DESTROY.ordinal()] = 6;
} catch (NoSuchFieldError unused6) {
}
}
}
static {
q jVar = new j();
l1 = jVar;
q iVar = new i(25.0f);
m1 = iVar;
q kVar = new e4.k(20.0f);
n1 = kVar;
o1 = Arrays.asList(jVar, kVar);
p1 = Arrays.asList(iVar, kVar);
q1 = Arrays.asList(jVar, kVar, jVar, iVar, kVar);
}
public XoneMapsViewEmbed(Context context) {
super(context);
this.v0 = null;
this.E0 = true;
this.H0 = true;
this.I0 = true;
this.J0 = true;
this.K0 = true;
this.L0 = true;
this.M0 = true;
this.N0 = true;
this.O0 = true;
this.P0 = 20.0f;
this.R0 = 1;
this.S0 = "";
this.T0 = "";
this.f1 = new ArrayList();
this.g1 = new HashMap();
z2();
}
private void B2(Object obj, Object... objArr) {
Q0 m = XOneJavascript.m();
if (m == null) {
XOneJavascript.x(obj, objArr);
return;
}
Object property = Q0.getProperty(m, "self");
Q0.putProperty(m, "self", this.h0);
try {
XOneJavascript.x(obj, objArr);
} finally {
Q0.putProperty(m, "self", property);
}
}
private void B3() {
c googleMap;
Map map = this.w0;
if (map == null || map.isEmpty() || (googleMap = getGoogleMap()) == null) {
return;
}
for (String str : (String[]) this.w0.keySet().toArray(new String[0])) {
r rVar = (r) this.w0.remove(str);
if (rVar != null) {
s sVar = new s();
sVar.j1(rVar.b());
sVar.B1(rVar.e());
sVar.y1(rVar.c());
sVar.n1(rVar.g());
sVar.A1(rVar.d());
sVar.m1(rVar.a());
this.w0.put(str, googleMap.d(sVar));
}
}
}
public static void C2(IXoneObject iXoneObject, Object obj, MarkerScriptWrapper markerScriptWrapper, Object obj2) {
Q0 m = XOneJavascript.m();
if (m == null) {
XOneJavascript.x(obj, obj2);
return;
}
Object property = Q0.getProperty(m, "self");
Q0.putProperty(m, "self", iXoneObject);
try {
XOneJavascript.x(obj, obj2, markerScriptWrapper);
} finally {
Q0.putProperty(m, "self", property);
}
}
private void C3() {
c googleMap;
Map map = this.t0;
if (map == null || map.isEmpty() || (googleMap = getGoogleMap()) == null) {
return;
}
for (String str : (String[]) this.t0.keySet().toArray(new String[0])) {
t tVar = (t) this.t0.remove(str);
if (tVar != null) {
u uVar = new u();
uVar.l1(tVar.c());
uVar.E1(tVar.d());
uVar.n1(tVar.a());
uVar.p1(tVar.e());
uVar.B1(tVar.b());
this.t0.put(str, googleMap.e(uVar));
}
}
}
private void D3() {
c googleMap;
Map map = this.s0;
if (map == null || map.isEmpty() || (googleMap = getGoogleMap()) == null) {
return;
}
for (String str : this.s0.keySet()) {
List<t> list = (List) this.s0.get(str);
if (list != null) {
ArrayList arrayList = new ArrayList();
for (t tVar : list) {
List c = tVar.c();
u uVar = new u();
uVar.l1(c);
uVar.E1(5.0f);
uVar.n1(tVar.a());
uVar.p1(true);
uVar.B1(tVar.b());
arrayList.add(googleMap.e(uVar));
}
this.s0.put(str, arrayList);
}
}
}
private void E3() {
c googleMap;
Map map = this.r0;
if (map == null || map.isEmpty() || (googleMap = getGoogleMap()) == null) {
return;
}
for (String str : this.r0.keySet()) {
List<t> list = (List) this.r0.get(str);
if (list != null) {
ArrayList arrayList = new ArrayList();
for (t tVar : list) {
List c = tVar.c();
u uVar = new u();
uVar.k1(new LatLng[]{(LatLng) c.get(0), (LatLng) c.get(1)});
uVar.E1(5.0f);
uVar.n1(tVar.a());
uVar.p1(true);
arrayList.add(googleMap.e(uVar));
}
this.r0.put(str, arrayList);
}
}
}
private void F3() {
try {
Map map = this.u0;
if (map != null && !map.isEmpty()) {
for (String str : (String[]) this.u0.keySet().toArray(new String[0])) {
MarkerScriptWrapper markerScriptWrapper = (MarkerScriptWrapper) this.u0.remove(str);
if (markerScriptWrapper != null) {
markerScriptWrapper.setMarker(R2(markerScriptWrapper.getWrappedMarkerOptions(), markerScriptWrapper.getTag()));
this.u0.put(markerScriptWrapper.getId(), markerScriptWrapper);
}
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
private void H3() {
if (this.h0 == null) {
return;
}
InterfaceC1038m0 app = getApp();
String n2 = n2("width");
String n22 = n2("height");
int V = app.V();
int l = app.l();
Context context = (Context) app;
this.Y0 = Utils.e1(context, n2, V, this.z0, this.B0);
this.Z0 = Utils.e1(context, n22, l, this.A0, this.C0);
setLayoutParams(new LinearLayout.LayoutParams(this.Y0, this.Z0));
ViewGroup.LayoutParams fVar = new DrawerLayout.f((int) (this.Y0 / 1.5d), this.Z0);
this.o0 = fVar;
((DrawerLayout.f) fVar).a = 8388611;
this.n0.setLayoutParams(fVar);
}
private void I1() {
if (!this.G0) {
setDrawerLockMode(1);
return;
}
Button button = new Button(getContext());
button.setBackgroundResource(AbstractC1099a.b);
button.setTextColor(Color.parseColor("#777777"));
button.setText(AbstractC1100b.i);
button.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
XoneMapsViewEmbed.this.y3(view);
}
});
DisplayMetrics displayMetrics = getDisplayMetrics();
DrawerLayout.f fVar = new DrawerLayout.f(-2, (int) TypedValue.applyDimension(1, 45.0f, displayMetrics));
fVar.setMargins((int) TypedValue.applyDimension(1, 10.0f, displayMetrics), (int) TypedValue.applyDimension(1, 9.0f, displayMetrics), 0, 0);
button.setLayoutParams(fVar);
this.k0.addView(button);
AbstractC0665a.a(button, this.j1, null);
}
private void K3(final boolean z) {
if (this.m0 == null) {
return;
}
if (!Utils.s3()) {
M3(new Runnable() {
@Override
public final void run() {
XoneMapsViewEmbed.this.e3(z);
}
});
return;
}
if (z) {
this.m0.a();
}
this.m0.b();
}
public static Object L3(Callable callable) {
if (Utils.s3()) {
try {
return callable.call();
} catch (Exception e) {
throw AbstractC0751f.e(e);
}
}
try {
return fa.j.n(callable).get();
} catch (InterruptedException | ExecutionException e2) {
throw AbstractC0751f.e(e2);
}
}
public static void M3(Runnable runnable) {
try {
if (Utils.s3()) {
runnable.run();
} else {
fa.j.m(runnable).get();
}
} catch (Exception e) {
throw AbstractC0751f.e(e);
}
}
public static int Y3(String str) {
if (TextUtils.isEmpty(str)) {
throw new IllegalArgumentException("Empty map type argument");
}
str.getClass();
switch (str) {
case "satellite":
return 2;
case "terrain":
return 3;
case "hybrid":
return 4;
case "normal":
return 1;
case "none":
return 0;
default:
throw new IllegalArgumentException("Invalid map type string argument: " + str);
}
}
public static String Z3(int i) {
if (i == 0) {
return "none";
}
if (i == 1) {
return "normal";
}
if (i == 2) {
return "satellite";
}
if (i == 3) {
return "terrain";
}
if (i == 4) {
return "hybrid";
}
throw new IllegalArgumentException("Invalid map type code argument: " + i);
}
private void a2() {
List<Wa.a> eventCallback;
IXoneObject iXoneObject = this.h0;
if (iXoneObject == null || (eventCallback = iXoneObject.getEventCallback("onmapready", this.y0)) == null) {
return;
}
Object[] objArr = {new C0789a("e", new EventOnMapReady(this.h0.getOwnerApp(), this.h0, this.y0))};
InterfaceC1036l0 xOneActivity = getXOneActivity();
new EventCallbackTask.b().b(xOneActivity).e(this.h0).h(xOneActivity.getHandler()).g(eventCallback).c(objArr).a().runSeriallyAsyncTask();
}
public static String a4(int i) {
return i != 0 ? i != 1 ? i != 2 ? i != 3 ? i != 9 ? i != 18 ? i != 19 ? "Unknown" : "SERVICE_MISSING_PERMISSION" : "SERVICE_UPDATING" : "SERVICE_INVALID" : "SERVICE_DISABLED" : "SERVICE_VERSION_UPDATE_REQUIRED" : "SERVICE_MISSING" : "SUCCESS";
}
private String c2(C0932x0 c0932x0, List list) {
final String E = Q8.k.E(c0932x0, XoneNFCRuntime.TAG_ID_FIELD, fb.t.y(Integer.valueOf(list.hashCode())));
int g = Q8.k.g(c0932x0, "color", -16777216);
String E2 = Q8.k.E(c0932x0, "pattern", "");
int g2 = Q8.k.g(c0932x0, "fillcolor", Color.parseColor("#339966"));
int o = Q8.k.o(c0932x0, "width", 2);
final Object y = Q8.k.y(c0932x0, "onClick");
if (!b.h(list) && list.size() > 2) {
list.add(new LatLng(((LatLng) list.get(0)).l, ((LatLng) list.get(0)).m));
}
final s sVar = new s();
sVar.j1(list);
sVar.y1(g);
sVar.A1(u2(E2));
sVar.m1(g2);
sVar.B1(o);
sVar.l1(y != null);
if (getGoogleMap() == null) {
return E;
}
if (Utils.s3()) {
T2(E, sVar, y);
return E;
}
M3(new Runnable() {
@Override
public final void run() {
XoneMapsViewEmbed.this.T2(E, sVar, y);
}
});
return E;
}
private String e2(C0932x0 c0932x0) {
return c2(c0932x0, b.c(Q8.k.E(c0932x0, "data", "")));
}
private <T extends Activity> T getActivity() {
return (T) getContext();
}
private InterfaceC1038m0 getApp() {
return (InterfaceC1038m0) getApplicationContext();
}
private IXoneApp getAppData() {
return getApp().G0();
}
private Context getApplicationContext() {
return getContext().getApplicationContext();
}
public LatLngBounds getBoundsInternal() {
c4.i m;
I b;
c googleMap = getGoogleMap();
if (googleMap == null || (m = googleMap.m()) == null || (b = m.b()) == null) {
return null;
}
return b.p;
}
private IXoneCollection getContentCollectionInternal() {
if (this.h0 == null) {
return null;
}
String n2 = n2("contents");
if (TextUtils.isEmpty(n2)) {
return null;
}
try {
return this.h0.Contents(n2);
} catch (Exception e) {
throw AbstractC0751f.e(e);
}
}
private DisplayMetrics getDisplayMetrics() {
return getResources().getDisplayMetrics();
}
private IXoneObject getSelfObject() {
Q0 m = XOneJavascript.m();
if (m == null) {
return null;
}
Object obj = m.get("self");
if (obj instanceof IXoneObject) {
return (IXoneObject) obj;
}
return null;
}
private InterfaceC1036l0 getXOneActivity() {
return (InterfaceC1036l0) getActivity();
}
private void n3(C0932x0 c0932x0, String str) {
double k = Q8.k.k(c0932x0, "destinationLatitude", -1.0d);
double k2 = Q8.k.k(c0932x0, "destinationLongitude", -1.0d);
String E = Q8.k.E(c0932x0, "address", null);
String E2 = Q8.k.E(c0932x0, "mode", "driving");
m3(E, (k == -1.0d && k2 == -1.0d) ? null : new LatLng(k, k2), TextUtils.isEmpty(E2) ? "d" : E2.substring(0, 1), str);
}
private void o3() {
IXoneCollection iXoneCollection;
if (!this.a1) {
Future future = this.g0;
if (future != null) {
future.cancel(true);
}
if (getGoogleMap() == null) {
return;
}
this.g0 = new e(this, this.q0, this.p0, this.i0, this.Q0).runSeriallyAsyncTask();
return;
}
int size = this.c1.size();
if (size == 0) {
return;
}
IXoneApp appData = getAppData();
try {
String n2 = n2("contents");
if (TextUtils.isEmpty(n2)) {
iXoneCollection = null;
} else {
iXoneCollection = appData.GetCollection(n2);
if (iXoneCollection != null) {
iXoneCollection.LoadAll();
}
}
File p2 = TextUtils.isEmpty(this.e1) ? null : p2(this.e1);
for (int i = 0; i < size; i++) {
String str = (String) this.c1.get(i);
String str2 = (String) this.d1.get(i);
String str3 = (String) this.b1.get(i);
Ba.a aVar = new Ba.a();
if (TextUtils.isEmpty(str)) {
aVar.p(r2(str2));
} else {
String[] split = str.split("##");
aVar.p(new LatLng(Double.parseDouble(split[0]), Double.parseDouble(split[1])));
}
if (iXoneCollection != null && !TextUtils.isEmpty(str3) && str3.startsWith("##ID##")) {
try {
aVar.m(iXoneCollection.get(str3.substring(6)));
} catch (Exception e) {
throw AbstractC0751f.e(e);
}
}
aVar.n(str2);
aVar.l(str2);
if (p2 != null) {
aVar.r(p2);
}
D1(aVar);
}
} catch (Exception e2) {
throw AbstractC0751f.e(e2);
}
}
public static void p3(JSONArray jSONArray, String str, boolean z) {
JSONObject jSONObject = new JSONObject();
AbstractC0699l.A(jSONObject, "featureType", str);
AbstractC0699l.A(jSONObject, "elementType", "all");
JSONObject jSONObject2 = new JSONObject();
AbstractC0699l.A(jSONObject2, "visibility", z ? "on" : "off");
JSONArray jSONArray2 = new JSONArray();
jSONArray2.put(jSONObject2);
AbstractC0699l.x(jSONObject, "stylers", jSONArray2);
jSONArray.put(jSONObject);
}
public static List u2(String str) {
if (TextUtils.isEmpty(str)) {
return null;
}
str.getClass();
switch (str) {
}
return null;
}
public static boolean x2(A a2) {
z[] zVarArr;
return (a2 == null || (zVarArr = a2.l) == null || zVarArr.length <= 0) ? false : true;
}
private void z2() {
c4.e.b(getApplicationContext(), e.a.m, this);
m context = getContext();
d dVar = new d(context, new GoogleMapOptions().s1(this.R0).j1(false).v1(this.I0).t1(true).u1(this.J0));
this.k0 = dVar;
addView(dVar, new FrameLayout.LayoutParams(-1, -1));
ListView listView = new ListView(context);
this.n0 = listView;
listView.setBackgroundColor(-1);
C1116f c1116f = new C1116f(this);
this.p0 = c1116f;
this.n0.setAdapter((ListAdapter) c1116f);
addView(this.n0);
if (context instanceof m) {
context.getLifecycle().a(this);
}
}
public void i3(LatLng latLng, File file, File file2) {
N1();
LatLng f = c6.g.f(latLng, 200.0d, 135.0d);
o z1 = z1(latLng, AbstractC1099a.d, file, "##DISTANCEMETER_START##");
o z12 = z1(f, AbstractC1099a.c, file2, "##DISTANCEMETER_END##");
this.f1.add(z1);
this.f1.add(z12);
y1(latLng, f);
}
public final void A2(final LatLngBounds latLngBounds) {
final c googleMap = getGoogleMap();
if (googleMap == null) {
return;
}
if (Utils.s3()) {
googleMap.u(latLngBounds);
} else {
M3(new Runnable() {
@Override
public final void run() {
googleMap.u(latLngBounds);
}
});
}
}
public void A3(LatLng latLng) {
List<Wa.a> eventCallback;
J3();
IXoneObject iXoneObject = this.h0;
if (iXoneObject == null || (eventCallback = iXoneObject.getEventCallback("onstreetviewunavailable", this.y0)) == null) {
return;
}
Object[] objArr = {new C0789a("e", new EventOnStreetViewStatusChanged(this.h0.getOwnerApp(), this.h0, this.y0, latLng.l, latLng.m))};
InterfaceC1036l0 xOneActivity = getXOneActivity();
new EventCallbackTask.b().b(xOneActivity).e(this.h0).h(xOneActivity.getHandler()).g(eventCallback).c(objArr).a().runSeriallyAsyncTask();
}
public final void B1() {
IXoneObject iXoneObject = this.h0;
if (iXoneObject == null || iXoneObject.getEventCallback("ondrop", this.y0) == null) {
return;
}
setOnDragListener(new View.OnDragListener() {
@Override
public final boolean onDrag(View view, DragEvent dragEvent) {
boolean v3;
v3 = XoneMapsViewEmbed.this.v3(view, dragEvent);
return v3;
}
});
}
public final o R2(final p pVar, final Object obj) {
if (!Utils.s3()) {
return (o) L3(new Callable() {
@Override
public final Object call() {
e4.o R2;
R2 = XoneMapsViewEmbed.this.R2(pVar, obj);
return R2;
}
});
}
o E1 = E1(pVar);
if (E1 == null) {
return null;
}
E1.s(new Ba.c(pVar, obj));
return E1;
}
public final void D1(Ba.a aVar) {
LatLng h = aVar.h();
if (h == null) {
return;
}
p pVar = new p();
pVar.D1(h);
if (aVar.j() != null && aVar.j().exists() && aVar.j().isFile()) {
pVar.y1(e4.c.c(aVar.j().getAbsolutePath()));
}
o E1 = E1(pVar);
if (E1 != null) {
aVar.o(E1.b());
}
this.p0.d(aVar);
}
public void D2(Point point) {
List<Wa.a> eventCallback;
c googleMap;
IXoneObject iXoneObject = this.h0;
if (iXoneObject == null || (eventCallback = iXoneObject.getEventCallback("ondrop", this.y0)) == null || (googleMap = getGoogleMap()) == null) {
return;
}
LatLng a2 = googleMap.m().a(point);
Object[] objArr = {new C0789a("e", new EventOnMapDrop(this.h0.getOwnerApp(), this.h0, this.y0, a2.l, a2.m))};
InterfaceC1036l0 xOneActivity = getXOneActivity();
new EventCallbackTask.b().b(xOneActivity).e(this.h0).h(xOneActivity.getHandler()).g(eventCallback).c(objArr).a().runSeriallyAsyncTask();
}
public o E1(p pVar) {
return this.j0.c(pVar);
}
public final boolean E2() {
q3.j o = q3.j.o();
int g = o.g(getApplicationContext());
if (g == 0) {
return false;
}
if (!o.j(g)) {
Utils.l("XOneAndroidFramework", v2(AbstractC1100b.b, Integer.valueOf(g), a4(g)));
return true;
}
Dialog l = o.l(getActivity(), g, 7878);
if (l != null) {
l.show();
}
return true;
}
public void F1(String str, t tVar) {
if (this.s0 == null) {
this.s0 = new HashMap();
}
List list = (List) this.s0.get(str);
if (list == null) {
list = new ArrayList();
this.s0.put(str, list);
}
list.add(tVar);
}
public final boolean F2(LatLng latLng) {
List<Wa.a> eventCallback;
Map map;
t tVar;
IXoneObject iXoneObject = this.h0;
if (iXoneObject != null && (eventCallback = iXoneObject.getEventCallback("onlineclicked", this.y0)) != null && (map = this.t0) != null && !map.isEmpty()) {
for (String str : this.t0.keySet()) {
if (str != null && (tVar = (t) this.t0.get(str)) != null && b.j(latLng, tVar.c(), false, this.P0)) {
Object[] objArr = {new C0789a("e", new EventOnLineClicked(this.h0.getOwnerApp(), this.h0, this.y0, latLng.l, latLng.m, str))};
InterfaceC1036l0 xOneActivity = getXOneActivity();
new EventCallbackTask.b().b(xOneActivity).e(this.h0).h(xOneActivity.getHandler()).g(eventCallback).c(objArr).a().runSeriallyAsyncTask();
return true;
}
}
}
return false;
}
public void G1(String str, t tVar) {
if (this.r0 == null) {
this.r0 = new HashMap();
}
List list = (List) this.r0.get(str);
if (list == null) {
list = new ArrayList();
this.r0.put(str, list);
}
list.add(tVar);
}
public boolean G2() {
return this.E0;
}
public void G3() {
this.Y0 = getWidth();
this.Z0 = getHeight();
ViewGroup.LayoutParams fVar = new DrawerLayout.f((int) (this.Y0 / 1.5d), this.Z0);
this.o0 = fVar;
((DrawerLayout.f) fVar).a = 8388611;
this.n0.setLayoutParams(fVar);
}
public void T2(String str, s sVar, Object obj) {
r rVar;
c googleMap = getGoogleMap();
if (googleMap == null) {
return;
}
if (this.w0 == null) {
this.w0 = new ConcurrentHashMap();
}
if (this.w0.containsKey(str) && (rVar = (r) this.w0.get(str)) != null) {
rVar.h();
}
r d = googleMap.d(sVar);
if (obj != null) {
d.j(obj);
}
this.w0.put(str, d);
}
public final void I3(o oVar) {
if (getGoogleMap() == null) {
return;
}
if (Utils.s3()) {
oVar.k();
return;
}
try {
Objects.requireNonNull(oVar);
M3(new l(oVar));
} catch (Exception e) {
e.printStackTrace();
}
}
public final F S2(final c cVar, final H h) {
if (!Utils.s3()) {
return (F) L3(new Callable() {
@Override
public final Object call() {
e4.F S2;
S2 = XoneMapsViewEmbed.this.S2(cVar, h);
return S2;
}
});
}
G g = new G();
g.o1(true);
g.n1(h);
return cVar.f(g);
}
public void J3() {
c4.k kVar = this.l0;
if (kVar != null) {
kVar.g();
this.l0.c();
removeView(this.l0);
this.l0 = null;
}
this.k0.setVisibility(0);
}
public final void K1(LatLng latLng, LatLng latLng2) {
List<Wa.a> eventCallback;
IXoneObject iXoneObject = this.h0;
if (iXoneObject == null || (eventCallback = iXoneObject.getEventCallback("ondistancemeter", this.y0)) == null) {
return;
}
Object[] objArr = {new C0789a("e", new EventOnDistanceMeter(this.h0.getOwnerApp(), this.h0, this.y0, c6.g.c(latLng, latLng2), GpsTools.S0(latLng), GpsTools.S0(latLng2)))};
InterfaceC1036l0 xOneActivity = getXOneActivity();
new EventCallbackTask.b().b(xOneActivity).e(this.h0).h(xOneActivity.getHandler()).g(eventCallback).c(objArr).a().runSeriallyAsyncTask();
}
public final void L1() {
r rVar;
Map map = this.w0;
if (map == null) {
return;
}
for (String str : map.keySet()) {
if (str != null && (rVar = (r) this.w0.remove(str)) != null) {
rVar.h();
}
}
}
public final void M1() {
t tVar;
Map map = this.t0;
if (map == null) {
return;
}
for (String str : map.keySet()) {
if (str != null && (tVar = (t) this.t0.remove(str)) != null) {
tVar.f();
}
}
}
public void N1() {
List list = this.f1;
if (list != null && !list.isEmpty()) {
Iterator it = this.f1.iterator();
while (it.hasNext()) {
try {
((o) it.next()).k();
} catch (Exception e) {
e.printStackTrace();
}
}
this.f1.clear();
}
t tVar = this.v0;
if (tVar != null) {
tVar.f();
this.v0 = null;
}
}
public void N3() {
if (Q(8388611) == 1) {
return;
}
k0(8388611);
}
public void O1() {
clearRoute("none");
}
public final void O3(Location location) {
P3(location, 14.0f, false);
}
public final void P1(Collection collection) {
List<t> list;
if (this.s0 == null) {
return;
}
Iterator it = collection.iterator();
while (it.hasNext()) {
String str = (String) it.next();
if (!this.s0.containsKey(str) || (list = (List) this.s0.get(str)) == null) {
return;
}
for (t tVar : list) {
if (Utils.s3()) {
tVar.f();
} else {
Objects.requireNonNull(tVar);
M3(new V(tVar));
}
}
list.clear();
this.s0.remove(str);
}
}
public final void P2(List list) {
Iterator it = list.iterator();
while (it.hasNext()) {
Pair pair = (Pair) it.next();
String str = (String) pair.first;
i6.d dVar = (i6.d) pair.second;
this.g1.put(str, dVar);
dVar.f();
}
}
public final void P3(Location location, float f, boolean z) {
Q3(location != null ? new LatLng(location.getLatitude(), location.getLongitude()) : null, f, z);
}
public final void K2(List list) {
Iterator it = list.iterator();
while (it.hasNext()) {
((C0241e) it.next()).e();
}
}
public final void Q2(List list) {
Iterator it = list.iterator();
while (it.hasNext()) {
Pair pair = (Pair) it.next();
String str = (String) pair.first;
j6.f fVar = (j6.f) pair.second;
this.g1.put(str, fVar);
fVar.f();
}
}
public final void Q3(final LatLng latLng, final float f, final boolean z) {
if (latLng == null) {
return;
}
M3(new Runnable() {
@Override
public final void run() {
XoneMapsViewEmbed.this.f3(latLng, f, z);
}
});
}
public void R1(String str, String str2, List list, List list2, List list3, String str3) {
setVisibility(0);
setTag("##ITEM##" + str);
if (TextUtils.isEmpty(str2)) {
return;
}
this.D0 = false;
this.E0 = true;
this.G0 = true;
try {
this.Y0 = -1;
this.Z0 = -1;
setLayoutParams(new LinearLayout.LayoutParams(this.Y0, this.Z0));
this.n0.post(new Runnable() {
@Override
public final void run() {
XoneMapsViewEmbed.this.G3();
}
});
} catch (Exception e) {
e.printStackTrace();
}
if (E2()) {
return;
}
this.y0 = str;
this.b1 = list;
this.c1 = list2;
this.d1 = list3;
this.e1 = str3;
T3();
this.e0 = true;
}
public void f3(LatLng latLng, float f, boolean z) {
c4.a d;
if (z) {
double d2 = f;
d = c4.b.b(new LatLngBounds.a().b(c6.g.f(latLng, d2, 0.0d)).b(c6.g.f(latLng, d2, 90.0d)).b(c6.g.f(latLng, d2, 180.0d)).b(c6.g.f(latLng, d2, 270.0d)).a(), 10);
} else {
d = c4.b.d(latLng, f);
}
c googleMap = getGoogleMap();
if (googleMap == null) {
return;
}
googleMap.g(d);
}
@Override
public void Refresh(Context context, InterfaceC1038m0 interfaceC1038m0, E e, IXoneObject iXoneObject, C1066a c1066a, Boolean bool, InterfaceC1042o0 interfaceC1042o0, int i, int i2, int i3, int i4, int i5, List list, int i6, int i7) {
this.h0 = iXoneObject;
this.x0 = c1066a;
if (AbstractC0399a.i(iXoneObject, c1066a, this.y0)) {
setVisibility(8);
return;
}
setVisibility(0);
if (!isCreated()) {
Boolean bool2 = Boolean.FALSE;
createView(context, interfaceC1038m0, e, iXoneObject, c1066a, bool2, bool2, bool2, bool, interfaceC1042o0, i, i2, i3, i4, i5, list, i6, i7);
return;
}
c googleMap = getGoogleMap();
if (googleMap != null) {
googleMap.h();
}
o3();
if (!this.O0) {
F3();
}
if (this.N0) {
return;
}
E3();
D3();
C3();
B3();
}
public final void S1() {
try {
Context applicationContext = getApplicationContext();
Bundle bundle = applicationContext.getPackageManager().getApplicationInfo(applicationContext.getPackageName(), 128).metaData;
if (bundle == null) {
throw new IllegalStateException("No meta data found on app. Cannot check Google Maps API key");
}
if (TextUtils.isEmpty(AbstractC0692e.j(bundle, "com.google.android.maps.v2.API_KEY", ""))) {
throw new IllegalArgumentException("Empty Google Maps API key. An API key is needed for use with Google Maps");
}
} catch (PackageManager.NameNotFoundException e) {
throw AbstractC0751f.e(e);
}
}
public void S3() {
this.a1 = false;
c4.k kVar = this.l0;
if (kVar != null) {
kVar.g();
this.l0.c();
removeView(this.l0);
this.l0 = null;
}
this.k0.setVisibility(0);
this.k0.a(this);
}
public final void T1(java.lang.String r4, java.lang.String r5) {
throw new UnsupportedOperationException("Method not decompiled: com.xone.maps.ui.XoneMapsViewEmbed.T1(java.lang.String, java.lang.String):void");
}
public final void T3() {
this.a1 = true;
c4.k kVar = this.l0;
if (kVar != null) {
kVar.g();
this.l0.c();
removeView(this.l0);
this.l0 = null;
}
this.k0.setVisibility(0);
this.k0.a(this);
}
public final void U1(o oVar) {
Ba.c cVar = (Ba.c) oVar.f();
if (cVar == null) {
return;
}
Object b = cVar.b();
if ((b instanceof CharSequence) && b.toString().startsWith("##DISTANCEMETER_")) {
t3();
}
}
public final void U3() {
Location location = this.f0;
if (location == null) {
O3(null);
} else {
O3(location);
}
}
public final void V1(Location location) {
List<Wa.a> eventCallback;
IXoneObject iXoneObject = this.h0;
if (iXoneObject == null || location == null || (eventCallback = iXoneObject.getEventCallback("onlocationchanged", this.y0)) == null) {
return;
}
EventOnLocationChanged eventOnLocationChanged = new EventOnLocationChanged(this.h0.getOwnerApp(), this.h0, this.y0);
eventOnLocationChanged.latitude = location.getLatitude();
eventOnLocationChanged.longitude = location.getLongitude();
Object[] objArr = {new C0789a("e", eventOnLocationChanged)};
InterfaceC1036l0 xOneActivity = getXOneActivity();
new EventCallbackTask.b().b(xOneActivity).e(this.h0).h(xOneActivity.getHandler()).g(eventCallback).c(objArr).a().runSeriallyAsyncTask();
}
public void g3(final LatLng latLng, final int i) {
this.a1 = false;
this.k0.setVisibility(8);
c4.k kVar = this.l0;
if (kVar != null) {
kVar.g();
this.l0.c();
removeView(this.l0);
this.l0 = null;
}
StreetViewPanoramaOptions streetViewPanoramaOptions = new StreetViewPanoramaOptions();
streetViewPanoramaOptions.o1(latLng, Integer.valueOf(i));
c4.k kVar2 = new c4.k(getContext(), streetViewPanoramaOptions);
this.l0 = kVar2;
addView(kVar2);
this.l0.b((Bundle) null);
this.l0.a(new c4.h() {
public final void a(c4.j jVar) {
XoneMapsViewEmbed.this.h3(latLng, i, jVar);
}
});
AbstractC0665a.a(this.l0, this.j1, null);
}
public final void W1(Location location) {
List<Wa.a> eventCallback;
IXoneObject iXoneObject = this.h0;
if (iXoneObject == null || location == null || (eventCallback = iXoneObject.getEventCallback("onlocationready", this.y0)) == null) {
return;
}
EventOnLocationReady eventOnLocationReady = new EventOnLocationReady(this.h0.getOwnerApp(), this.h0, this.y0);
eventOnLocationReady.latitude = location.getLatitude();
eventOnLocationReady.longitude = location.getLongitude();
Object[] objArr = {new C0789a("e", eventOnLocationReady)};
InterfaceC1036l0 xOneActivity = getXOneActivity();
new EventCallbackTask.b().b(xOneActivity).e(this.h0).h(xOneActivity.getHandler()).g(eventCallback).c(objArr).a().runSeriallyAsyncTask();
}
public final void W3() {
final c googleMap = getGoogleMap();
if (googleMap == null) {
throw new IllegalStateException("Google Map is not ready yet");
}
if (Utils.s3()) {
startDistanceMeter(googleMap.i().l);
} else {
M3(new Runnable() {
@Override
public final void run() {
XoneMapsViewEmbed.this.j3(googleMap);
}
});
}
}
public final void X1() {
List<Wa.a> eventCallback;
IXoneObject iXoneObject = this.h0;
if (iXoneObject == null || (eventCallback = iXoneObject.getEventCallback("onmapmoveended", this.y0)) == null) {
return;
}
Object[] objArr = {new C0789a("e", new EventOnMapMoveEnded(this.h0.getOwnerApp(), this.h0, this.y0))};
InterfaceC1036l0 xOneActivity = getXOneActivity();
new EventCallbackTask.b().b(xOneActivity).e(this.h0).h(xOneActivity.getHandler()).g(eventCallback).c(objArr).a().runSeriallyAsyncTask();
}
public final Void X2(String str, double d, double d2, Object obj) {
try {
String propName = getPropName();
IXoneObject iXoneObject = this.h0;
EventOnClusterClicked eventOnClusterClicked = new EventOnClusterClicked(iXoneObject != null ? iXoneObject.getOwnerApp() : null, this.h0, propName, str, d, d2);
Q0 m = XOneJavascript.m();
if (m == null) {
XOneJavascript.x(obj, eventOnClusterClicked);
return null;
}
Object property = Q0.getProperty(m, "self");
Q0.putProperty(m, "self", this.h0);
try {
XOneJavascript.x(obj, eventOnClusterClicked);
return null;
} finally {
Q0.putProperty(m, "self", property);
}
} catch (Exception e) {
w2(e);
return null;
}
}
public final String X3(String str) {
if (TextUtils.isEmpty(str)) {
return "";
}
str.getClass();
switch (str) {
}
return "";
}
public final void Y1() {
List<Wa.a> eventCallback;
IXoneObject iXoneObject = this.h0;
if (iXoneObject == null || (eventCallback = iXoneObject.getEventCallback("onmapmovestarted", this.y0)) == null) {
return;
}
Object[] objArr = {new C0789a("e", new EventOnMapMoveStarted(this.h0.getOwnerApp(), this.h0, this.y0))};
InterfaceC1036l0 xOneActivity = getXOneActivity();
new EventCallbackTask.b().b(xOneActivity).e(this.h0).h(xOneActivity.getHandler()).g(eventCallback).c(objArr).a().runSeriallyAsyncTask();
}
public final Void Y2(IXoneObject iXoneObject, Object obj, MarkerScriptWrapper markerScriptWrapper, Object obj2) {
try {
C2(iXoneObject, obj, markerScriptWrapper, obj2);
return null;
} catch (Exception e) {
w2(e);
return null;
}
}
public void Z1(c cVar) {
c4.l n = cVar.n();
if (this.W0 != null) {
cVar.x(r1.intValue());
}
if (this.V0 != null) {
cVar.y(r1.intValue());
}
cVar.s(this.K0);
if (n != null) {
n.a(this.L0);
}
cVar.r(true);
cVar.z(this.M0);
cVar.J(this);
if (this.M0) {
this.f0 = cVar.l();
}
o3();
Location location = this.f0;
if (location != null) {
O3(location);
}
cVar.I(this);
cVar.D(this);
cVar.F(this);
cVar.G(this);
cVar.A(this);
cVar.B(this);
cVar.K(this);
if (!TextUtils.isEmpty(this.S0)) {
JSONArray jSONArray = new JSONArray();
p3(jSONArray, "poi", false);
p3(jSONArray, "transit", false);
p3(jSONArray, "road", false);
for (String str : this.S0.split(",")) {
String X3 = X3(str);
if (!TextUtils.isEmpty(X3)) {
p3(jSONArray, X3, true);
}
}
cVar.v(new n(jSONArray.toString()));
}
if (this.D0) {
U3();
}
LatLngBounds latLngBounds = this.U0;
if (latLngBounds != null) {
A2(latLngBounds);
}
if (!TextUtils.isEmpty(this.T0)) {
List c = b.c(this.T0);
LatLngBounds.a j1 = LatLngBounds.j1();
Iterator it = c.iterator();
while (it.hasNext()) {
j1.b((LatLng) it.next());
}
l3(j1.a());
}
a2();
}
public final Void Z2(MarkerScriptWrapper markerScriptWrapper) {
try {
markerScriptWrapper.invokeCallback(this.h0);
return null;
} catch (Exception e) {
w2(e);
return null;
}
}
public final void a3(c cVar, Set set) {
try {
Z1(cVar);
} catch (Exception e) {
w2(e);
}
}
@ScriptAllowed
@Keep
public void addClusteredMarker(C0932x0 c0932x0) {
v1(c0932x0);
}
@Override
@ScriptAllowed
@Keep
public void addGeoJson(Object... objArr) {
Utils.i("AddGeoJson", objArr, 1);
final ArrayList arrayList = new ArrayList();
C0932x0[] c0932x0Arr = (C0932x0[]) Q8.m.i(objArr, C0932x0.class, C0932x0[].class);
if (c0932x0Arr == null) {
return;
}
for (C0932x0 c0932x0 : c0932x0Arr) {
String E = Q8.k.E(c0932x0, XoneNFCRuntime.TAG_ID_FIELD, null);
if (TextUtils.isEmpty(E)) {
throw new IllegalArgumentException("Empty layer id argument");
}
arrayList.add(new Pair(E, o2(c0932x0)));
}
M3(new Runnable() {
@Override
public final void run() {
XoneMapsViewEmbed.this.P2(arrayList);
}
});
}
@Override
@ScriptAllowed
@Keep
public void addKml(Object... objArr) {
Utils.i("AddKml", objArr, 1);
final ArrayList arrayList = new ArrayList();
C0932x0[] c0932x0Arr = (C0932x0[]) Q8.m.i(objArr, C0932x0.class, C0932x0[].class);
if (c0932x0Arr == null) {
return;
}
for (C0932x0 c0932x0 : c0932x0Arr) {
String E = Q8.k.E(c0932x0, XoneNFCRuntime.TAG_ID_FIELD, null);
if (TextUtils.isEmpty(E)) {
throw new IllegalArgumentException("Empty layer id argument");
}
arrayList.add(new Pair(E, q2(c0932x0)));
}
M3(new Runnable() {
@Override
public final void run() {
XoneMapsViewEmbed.this.Q2(arrayList);
}
});
}
public final void b2() {
List<Wa.a> eventCallback;
c googleMap = getGoogleMap();
if (googleMap == null) {
return;
}
CameraPosition i = googleMap.i();
Float f = this.i1;
if (f == null || f.floatValue() != i.m) {
this.i1 = Float.valueOf(i.m);
IXoneObject iXoneObject = this.h0;
if (iXoneObject == null || (eventCallback = iXoneObject.getEventCallback("onmapzoomchanged", this.y0)) == null) {
return;
}
Object[] objArr = {new C0789a("e", new EventOnMapZoomChanged(this.h0.getOwnerApp(), this.h0, this.y0, this.i1.floatValue(), GpsTools.T0(getBoundsInternal())))};
InterfaceC1036l0 xOneActivity = getXOneActivity();
new EventCallbackTask.b().b(xOneActivity).e(this.h0).h(xOneActivity.getHandler()).g(eventCallback).c(objArr).a().runSeriallyAsyncTask();
}
}
public void b4() {
if (Q(8388611) == 1) {
return;
}
if (d0(8388611)) {
B(8388611);
} else {
k0(8388611);
}
}
public final void c3(String[] strArr) {
h6.d dVar;
for (String str : strArr) {
if ((((h6.d) this.g1.get(str)) instanceof i6.d) && (dVar = (h6.d) this.g1.remove(str)) != null) {
dVar.d();
}
}
}
public void k3(List list) {
if (list == null) {
return;
}
try {
if (list.isEmpty()) {
return;
}
LatLngBounds.a j1 = LatLngBounds.j1();
Iterator it = list.iterator();
while (it.hasNext()) {
j1.b((LatLng) it.next());
}
l3(j1.a());
} catch (Exception e) {
w2(e);
}
}
@Override
@ScriptAllowed
@Keep
public String captureImage(Object... objArr) {
FileOutputStream fileOutputStream;
Throwable th;
FileNotFoundException e;
c googleMap = getGoogleMap();
if (googleMap == null) {
return "";
}
FutureC0240d futureC0240d = new FutureC0240d();
googleMap.M(futureC0240d);
Bitmap bitmap = futureC0240d.get(10L, TimeUnit.SECONDS);
File file = new File(getAppData().getAppPath(), "files");
if (!file.exists() && !file.mkdirs()) {
throw new IllegalStateException("CaptureImage(): Cannot create directory " + file);
}
File file2 = new File(file, "map_capture_" + UUID.randomUUID().toString() + ".png");
try {
fileOutputStream = new FileOutputStream(file2);
try {
try {
bitmap.compress(Bitmap.CompressFormat.PNG, 100, fileOutputStream);
String name = file2.getName();
Utils.L3(bitmap);
Utils.N(fileOutputStream);
return name;
} catch (FileNotFoundException e2) {
e = e2;
throw AbstractC0751f.e(e);
}
} catch (Throwable th2) {
th = th2;
Utils.L3(bitmap);
Utils.N(fileOutputStream);
throw th;
}
} catch (FileNotFoundException e3) {
fileOutputStream = null;
e = e3;
} catch (Throwable th3) {
fileOutputStream = null;
th = th3;
Utils.L3(bitmap);
Utils.N(fileOutputStream);
throw th;
}
}
@Override
@ScriptAllowed
@Keep
public void clearAllAreas() {
Map map = this.w0;
if (map == null || map.isEmpty()) {
return;
}
if (Utils.s3()) {
L1();
} else {
M3(new Runnable() {
@Override
public final void run() {
XoneMapsViewEmbed.this.L1();
}
});
}
}
@Override
@ScriptAllowed
@Keep
public void clearAllLines() {
Map map = this.s0;
if (map == null || map.isEmpty()) {
return;
}
P1(this.s0.keySet());
}
@Override
@ScriptAllowed
@Keep
public void clearAllPolylines() {
Map map = this.t0;
if (map == null || map.isEmpty()) {
return;
}
if (Utils.s3()) {
M1();
} else {
M3(new Runnable() {
@Override
public final void run() {
XoneMapsViewEmbed.this.M1();
}
});
}
}
@Override
@ScriptAllowed
@Keep
public void clearAllRoutes() {
Map map = this.r0;
if (map == null || map.isEmpty()) {
return;
}
clearRoute((String[]) this.r0.keySet().toArray(new String[0]));
}
@Override
@ScriptAllowed
@Keep
public void clearLine(Object... objArr) {
Utils.h("ClearLine", objArr, 1, -1);
ArrayList arrayList = new ArrayList();
for (Object obj : objArr) {
if (obj != null) {
arrayList.add(obj.toString());
}
}
if (!arrayList.isEmpty()) {
P1(arrayList);
return;
}
throw new IllegalArgumentException("ClearLine(): Empty line ID argument");
}
@Override
@ScriptAllowed
@Keep
public void clearRoute(String... strArr) {
List<t> list;
if (strArr == null || strArr.length == 0 || this.r0 == null) {
return;
}
for (String str : strArr) {
if (!this.r0.containsKey(str) || (list = (List) this.r0.get(str)) == null) {
return;
}
for (t tVar : list) {
if (Utils.s3()) {
tVar.f();
} else {
Objects.requireNonNull(tVar);
M3(new V(tVar));
}
}
list.clear();
this.r0.remove(str);
}
}
@Override
public void createView(Context context, InterfaceC1038m0 interfaceC1038m0, E e, IXoneObject iXoneObject, C1066a c1066a, Boolean bool, Boolean bool2, Boolean bool3, Boolean bool4, InterfaceC1042o0 interfaceC1042o0, int i, int i2, int i3, int i4, int i5, List list, int i6, int i7) {
this.x0 = c1066a;
String f = c1066a.q().f();
this.y0 = f;
this.h0 = iXoneObject;
this.z0 = i;
this.A0 = i2;
this.B0 = i3;
this.C0 = i4;
setTag(f);
H3();
if (AbstractC0399a.i(iXoneObject, c1066a, this.y0)) {
setVisibility(8);
return;
}
setVisibility(0);
this.D0 = k2("zoom-to-my-location", false);
this.E0 = k2("zoom-to-pois", true);
this.F0 = k2("follow-location-on-background", false);
this.G0 = k2("show-pois", true);
this.H0 = k2("show-google-buttons", true);
this.I0 = k2("show-zoom-buttons", true);
this.J0 = k2("tilt-gestures-enabled", true);
this.K0 = k2("indoor-maps-enabled", true);
this.L0 = k2("show-my-location-button", true);
this.M0 = k2("show-user-location", true);
this.N0 = k2("clear-lines-on-refresh", true);
this.O0 = k2("clear-markers-on-refresh", false);
this.P0 = l2("line-click-tolerance", 20.0f);
Context context2 = (Context) interfaceC1038m0;
this.Q0 = !Utils.d3(context2) || k2("ignore-geocoding-errors", false);
String n2 = n2("restrict-map-to-bounds");
this.R0 = Y3(fb.t.z(n2("map-type"), "normal"));
this.S0 = fb.t.z(n2("map-features"), "");
this.T0 = fb.t.z(n2("encoded-initial-bounds"), "");
this.V0 = m2("min-zoom", null);
this.W0 = m2("max-zoom", null);
this.X0 = k2("no-cluster-on-max-zoom", false);
if (!TextUtils.isEmpty(n2)) {
String[] split = n2.split(",");
if (split.length > 0 && split.length % 2 == 0) {
LatLngBounds.a aVar = new LatLngBounds.a();
for (int i10 = 0; i10 < split.length; i10 += 2) {
aVar.b(new LatLng(Double.parseDouble(split[i10]), Double.parseDouble(split[i10 + 1])));
}
this.U0 = aVar.a();
}
}
String n22 = n2("accessibility-enabled");
if (!TextUtils.isEmpty(n22)) {
this.j1 = Boolean.valueOf(fb.t.l(n22, false));
}
if (!C9.e.p(context2, "android.permission.ACCESS_NETWORK_STATE")) {
throw new IllegalStateException(v2(AbstractC1100b.a, new Object[0]));
}
String n23 = n2("contents");
if (TextUtils.isEmpty(n23)) {
throw new IllegalArgumentException("Property " + this.y0 + " in collection " + iXoneObject.getOwnerCollection().getName() + " has not declared contents attribute");
}
IXoneCollection Contents = iXoneObject.Contents(n23);
this.i0 = Contents;
if (Contents == null) {
throw new IllegalArgumentException("Collection " + n23 + " not found");
}
if (!(e.getXoneActivity() instanceof Activity) || E2()) {
return;
}
e.E(this);
B1();
S1();
S3();
I1();
this.e0 = true;
AbstractC0665a.a(this.k0, this.j1, null);
}
public void d(final c cVar) {
setGoogleMap(cVar);
this.k1 = new C0245i(this);
if (cVar == null) {
return;
}
this.q0 = new C1112b(this);
try {
if (!C9.e.f(getApplicationContext(), "android.permission.ACCESS_FINE_LOCATION", "android.permission.ACCESS_COARSE_LOCATION") && this.M0) {
new h.a().d(true).e(8001).f(v2(AbstractC1100b.j, new Object[0])).c(new C9.c() {
@Override
public final void a(Set set) {
XoneMapsViewEmbed.this.a3(cVar, set);
}
}).h("android.permission.ACCESS_FINE_LOCATION").a().i((C9.a) getActivity());
return;
}
Z1(cVar);
} catch (Exception e) {
w2(e);
}
}
public e4.f U2(LatLng latLng, boolean z, double d, int i, String str, int i2, int i3) {
List u2 = u2(str);
e4.g gVar = new e4.g();
gVar.j1(latLng);
gVar.y1(z);
gVar.u1(d);
gVar.k1(i);
gVar.v1(i2);
gVar.w1(u2);
gVar.x1(i3);
return this.j0.a(gVar);
}
public final void d3(String[] strArr) {
h6.d dVar;
for (String str : strArr) {
if ((((h6.d) this.g1.get(str)) instanceof j6.f) && (dVar = (h6.d) this.g1.remove(str)) != null) {
dVar.d();
}
}
}
@Override
@ScriptAllowed
@Keep
public void disableRotation() {
throw new UnsupportedOperationException("DisableRotation(): Not implemented yet");
}
@Override
@ScriptAllowed
@Keep
@SuppressLint({"MissingPermission"})
public void disableUserLocation() {
final c googleMap = getGoogleMap();
if (googleMap == null) {
return;
}
if (Utils.s3()) {
googleMap.z(false);
} else {
M3(new Runnable() {
@Override
public final void run() {
googleMap.z(false);
}
});
}
}
@Override
@ScriptAllowed
@Keep
public Object downloadTiles(Object... objArr) {
throw new UnsupportedOperationException("DownloadTiles(): Not implemented yet");
}
@Override
@ScriptAllowed
@Keep
public String drawArea(Object... objArr) {
Utils.j("DrawArea", objArr);
Utils.g("DrawArea", objArr, 1);
Object obj = objArr[0];
if (obj == null) {
throw new IllegalArgumentException("DrawArea(): Empty argument");
}
if (!(obj instanceof C0932x0)) {
throw new IllegalArgumentException("DrawArea(): Invalid parameter of type: " + obj.getClass().getSimpleName());
}
C0932x0 c0932x0 = (C0932x0) obj;
Object z = Q8.k.z(c0932x0, "data", null);
if (z == null) {
throw new IllegalArgumentException("DrawArea(): Empty data argument");
}
List F0 = GpsTools.F0(z);
if (F0 != null) {
return c2(c0932x0, F0);
}
throw new IllegalArgumentException("DrawArea(): Cannot create polygon from data");
}
@Override
@ScriptAllowed
@Keep
public String drawEncode(Object... objArr) {
Utils.j("DrawEncode", objArr);
Utils.g("DrawEncode", objArr, 1);
Object obj = objArr[0];
if (!(obj instanceof C0932x0)) {
return "";
}
C0932x0 c0932x0 = (C0932x0) obj;
List c = b.c(Q8.k.E(c0932x0, "data", ""));
String E = Q8.k.E(c0932x0, XoneNFCRuntime.TAG_ID_FIELD, fb.t.y(Integer.valueOf(c.hashCode())));
u uVar = new u();
uVar.l1(c);
uVar.n1(Color.parseColor(Q8.k.E(c0932x0, "color", "#000000")));
uVar.B1(u2(Q8.k.E(c0932x0, "pattern", "")));
if (getGoogleMap() == null) {
return E;
}
V2(E, uVar);
return E;
}
@Override
@ScriptAllowed
@Keep
public String drawEncodeArea(Object... objArr) {
Utils.j("DrawEncodeArea", objArr);
Utils.g("DrawEncodeArea", objArr, 1);
Object obj = objArr[0];
return obj instanceof C0932x0 ? e2((C0932x0) obj) : "";
}
@Override
@ScriptAllowed
@Keep
public void drawLine(Object... objArr) {
int parseColor;
Object[] objArr2;
String str;
String str2;
List list;
float f;
Utils.j("DrawLine", objArr);
Utils.h("DrawLine", objArr, 1, -1);
Object obj = objArr[0];
if (obj instanceof C0932x0) {
C0932x0 c0932x0 = (C0932x0) obj;
String E = Q8.k.E(c0932x0, "line", "");
parseColor = Color.parseColor(Q8.k.E(c0932x0, "strokeColor", ""));
float l = Q8.k.l(c0932x0, "strokeWidth", 5.0f);
String E2 = Q8.k.E(c0932x0, "mode", "normal");
String E3 = Q8.k.E(c0932x0, "data", "");
str = E;
list = !TextUtils.isEmpty(E3) ? b.c(E3) : GpsTools.n1(Q8.k.u(c0932x0, "locations", null));
str2 = E2;
f = l;
} else {
String y = fb.t.y(obj);
parseColor = Color.parseColor(fb.t.y(objArr[1]));
String z = fb.t.z(objArr[2], "normal");
Object obj2 = objArr[3];
if (obj2 instanceof C0893d0) {
objArr2 = Q8.m.h((C0893d0) obj2, Double[].class);
} else {
Object[] objArr3 = new Object[objArr.length - 3];
System.arraycopy(objArr, 3, objArr3, 0, objArr.length - 3);
objArr2 = objArr3;
}
ArrayList arrayList = new ArrayList();
for (int i = 0; i <= objArr2.length - 2; i += 2) {
arrayList.add(new LatLng(fb.q.i(objArr2[i], -1.0d), fb.q.i(objArr2[i + 1], -1.0d)));
}
str = y;
str2 = z;
list = arrayList;
f = 5.0f;
}
final int i2 = parseColor;
if (list.isEmpty()) {
throw new IllegalArgumentException("DrawLine(): List of points is empty");
}
if (Utils.s3()) {
W2(str2, str, i2, f, list);
return;
}
final List list2 = list;
final float f2 = f;
final String str3 = str;
final String str4 = str2;
M3(new Runnable() {
@Override
public final void run() {
XoneMapsViewEmbed.this.W2(str4, str3, i2, f2, list2);
}
});
}
@Override
@ScriptAllowed
@Keep
public void drawRoute(Object... objArr) {
String y;
double i;
double d;
double d2;
double i2;
XoneMapsViewEmbed xoneMapsViewEmbed;
int parseColor;
Ia.b bVar;
String str;
ArrayList arrayList;
float f;
boolean z;
ArrayList arrayList2;
Utils.j("DrawRoute", objArr);
Utils.h("DrawRoute", objArr, 1, 7);
Object obj = objArr[0];
List list = null;
if (obj instanceof C0932x0) {
C0932x0 c0932x0 = (C0932x0) obj;
String E = Q8.k.E(c0932x0, "route", "");
if (c0932x0.containsKey("waypoints")) {
arrayList2 = Ia.a.i(Q8.k.u(c0932x0, "waypoints", null));
} else {
double k = Q8.k.k(c0932x0, "destinationLatitude", -1.0d);
double k2 = Q8.k.k(c0932x0, "destinationLongitude", -1.0d);
double k3 = Q8.k.k(c0932x0, "sourceLatitude", -1.0d);
double k4 = Q8.k.k(c0932x0, "sourceLongitude", -1.0d);
ArrayList arrayList3 = new ArrayList();
arrayList3.add(Ia.a.c(k3, k4));
arrayList3.add(Ia.a.c(k, k2));
arrayList2 = arrayList3;
}
Ia.b d3 = Ia.b.d(Q8.k.D(c0932x0, "mode"), Ia.b.Driving);
int parseColor2 = Color.parseColor(Q8.k.E(c0932x0, "strokeColor", "#0000FF"));
float l = Q8.k.l(c0932x0, "strokeWidth", 5.0f);
boolean a2 = Q8.k.a(c0932x0, "accurate", false);
list = u2(Q8.k.E(c0932x0, "linePattern", "normal"));
xoneMapsViewEmbed = this;
str = E;
z = a2;
arrayList = arrayList2;
bVar = d3;
parseColor = parseColor2;
f = l;
} else {
if (objArr.length == 4) {
y = UUID.randomUUID().toString();
d = fb.q.i(objArr[0], -1.0d);
d2 = fb.q.i(objArr[1], -1.0d);
double i3 = fb.q.i(objArr[2], -1.0d);
i2 = fb.q.i(objArr[3], -1.0d);
i = i3;
} else {
y = fb.t.y(obj);
double i4 = fb.q.i(objArr[1], -1.0d);
double i5 = fb.q.i(objArr[2], -1.0d);
i = fb.q.i(objArr[3], -1.0d);
d = i4;
d2 = i5;
i2 = fb.q.i(objArr[4], -1.0d);
}
ArrayList arrayList4 = new ArrayList();
if (i == -1.0d && i2 == -1.0d) {
xoneMapsViewEmbed = this;
final c cVar = xoneMapsViewEmbed.j0;
if (cVar != null) {
Objects.requireNonNull(cVar);
Location location = (Location) L3(new Callable() {
@Override
public final Object call() {
return cVar.l();
}
});
if (location != null) {
arrayList4.add(Ia.a.d(location));
}
}
} else {
xoneMapsViewEmbed = this;
arrayList4.add(Ia.a.c(i, i2));
}
arrayList4.add(Ia.a.c(d, d2));
Ia.b d4 = objArr.length >= 6 ? Ia.b.d(fb.t.y(objArr[5]), Ia.b.Driving) : Ia.b.Driving;
parseColor = objArr.length >= 7 ? Color.parseColor(fb.t.y(objArr[6])) : -16776961;
bVar = d4;
str = y;
arrayList = arrayList4;
f = 5.0f;
z = false;
}
new Ga.c(xoneMapsViewEmbed, arrayList, bVar, parseColor, f, z, str, list).k();
}
public final void e3(boolean z) {
if (z) {
this.m0.a();
}
this.m0.b();
}
@Override
@ScriptAllowed
@Keep
public void enableRotation() {
throw new UnsupportedOperationException("EnableRotation(): Not implemented yet");
}
@Override
@ScriptAllowed
@Keep
@SuppressLint({"MissingPermission"})
public void enableUserLocation() {
final c googleMap = getGoogleMap();
if (googleMap == null) {
return;
}
if (Utils.s3()) {
googleMap.z(true);
} else {
M3(new Runnable() {
@Override
public final void run() {
googleMap.z(true);
}
});
}
}
@ScriptAllowed
@Keep
public String encodePolyline(Object... objArr) {
if (getGoogleMap() == null) {
return "";
}
List<o> d = this.q0.d();
ArrayList arrayList = new ArrayList();
for (o oVar : d) {
Objects.requireNonNull(oVar);
arrayList.add((LatLng) L3(new x(oVar)));
}
return b.e(arrayList);
}
public void f(o oVar) {
U1(oVar);
}
public void V2(final String str, final u uVar) {
t tVar;
if (!Utils.s3()) {
M3(new Runnable() {
@Override
public final void run() {
XoneMapsViewEmbed.this.V2(str, uVar);
}
});
return;
}
Map map = this.t0;
if (map == null) {
this.t0 = new ConcurrentHashMap();
} else if (map.containsKey(str) && (tVar = (t) this.t0.get(str)) != null) {
tVar.f();
}
this.t0.put(str, this.j0.e(uVar));
}
public void W2(String str, String str2, int i, float f, List list) {
h2(str2, i, f, u2(str), list);
}
@ScriptAllowed
@Keep
public ClusterManagerScriptWrapper getClusterManager(Object... objArr) {
C0241e c0241e;
Utils.j("GetClusterManager", objArr);
Utils.g("GetClusterManager", objArr, 1);
String z = fb.t.z(objArr[0], null);
if (TextUtils.isEmpty(z)) {
throw new IllegalArgumentException("GetClusterManager(): Empty cluster ID argument");
}
Map map = this.h1;
if (map == null || (c0241e = (C0241e) map.get(z)) == null) {
return null;
}
InterfaceC1038m0 app = getApp();
return new ClusterManagerScriptWrapper(c0241e, app.Y(), app.T());
}
@Override
@ScriptAllowed
@Keep
public IXoneCollection getContentCollection() {
return this.i0;
}
@Override
public InterfaceC1042o0 getCssItem() {
return null;
}
@Override
public IXoneObject getDataObject() {
return this.h0;
}
public c getGoogleMap() {
return this.j0;
}
@Override
@ScriptAllowed
@Keep
public String getMapType() {
final c googleMap = getGoogleMap();
return googleMap == null ? "" : Utils.s3() ? Z3(googleMap.j()) : Z3(((Integer) L3(new Callable() {
@Override
public final Object call() {
return Integer.valueOf(googleMap.j());
}
})).intValue());
}
public C0245i getMarkerManager() {
return this.k1;
}
@Override
public String getPropName() {
return this.y0;
}
@Override
@ScriptAllowed
@Keep
public double getZoom() {
return Utils.s3() ? getZoomInternal() : ((Float) L3(new Ka.F(this))).floatValue();
}
public float getZoomInternal() {
CameraPosition i;
c cVar = this.j0;
if (cVar == null || (i = cVar.i()) == null) {
return 16.0f;
}
return i.m;
}
public final void h2(String str, int i, float f, List list, List list2) {
c googleMap = getGoogleMap();
if (googleMap == null) {
return;
}
u uVar = new u();
uVar.l1(list2);
uVar.n1(i);
uVar.E1(f);
uVar.p1(true);
if (list != null) {
uVar.B1(list);
}
F1(str, googleMap.e(uVar));
}
@Override
@ScriptAllowed
@Keep
public void hideCompass() {
throw new UnsupportedOperationException("HideCompass(): Not implemented yet");
}
@Override
@ScriptAllowed
@Keep
public void hideMinimap() {
throw new UnsupportedOperationException("HideMinimap(): Not implemented yet");
}
@Override
@ScriptAllowed
@Keep
public void hidePoisMenu() {
if (Utils.s3()) {
y2();
} else {
M3(new Runnable() {
@Override
public final void run() {
XoneMapsViewEmbed.this.y2();
}
});
}
}
@Override
@ScriptAllowed
@Keep
public void hideScale() {
throw new UnsupportedOperationException("HideScale(): Not implemented yet");
}
public final void i2(IXoneObject iXoneObject) {
IXoneCollection contentCollectionInternal;
if (TextUtils.isEmpty(this.y0) || (contentCollectionInternal = getContentCollectionInternal()) == null || contentCollectionInternal.getProperties().W0("selecteditem") == null) {
return;
}
InterfaceC1036l0 xOneActivity = getXOneActivity();
new Ga.d(getApp(), new WeakReference(xOneActivity), iXoneObject, xOneActivity.getHandler()).runSeriallyAsyncTask();
}
@Override
public boolean isCreated() {
return this.e0;
}
@Override
@ScriptAllowed
@Keep
public boolean isUserLocationEnabled() {
final c googleMap = getGoogleMap();
if (googleMap == null) {
return false;
}
return Utils.s3() ? googleMap.o() : ((Boolean) L3(new Callable() {
@Override
public final Object call() {
return Boolean.valueOf(googleMap.o());
}
})).booleanValue();
}
public void j(LatLng latLng) {
List<Wa.a> eventCallback;
IXoneObject iXoneObject = this.h0;
if (iXoneObject == null || latLng == null || (eventCallback = iXoneObject.getEventCallback("onmaplongclicked", this.y0)) == null) {
return;
}
Object[] objArr = {new C0789a("e", new EventOnMapLongClicked(this.h0.getOwnerApp(), this.h0, this.y0, latLng.l, latLng.m))};
InterfaceC1036l0 xOneActivity = getXOneActivity();
new EventCallbackTask.b().b(xOneActivity).e(this.h0).h(xOneActivity.getHandler()).g(eventCallback).c(objArr).a().runSeriallyAsyncTask();
}
public final void j2(IXoneObject iXoneObject) {
InterfaceC1032j0 properties;
IXoneCollection ownerCollection = iXoneObject.getOwnerCollection();
if (ownerCollection == null || (properties = ownerCollection.getProperties()) == null || properties.W0("selecteditem") == null) {
return;
}
new Ga.d(getApp(), null, iXoneObject, null).runSeriallyAsyncTask();
}
public final void j3(c cVar) {
startDistanceMeter(cVar.i().l);
}
public void k(LatLng latLng) {
List<Wa.a> eventCallback;
if (this.h0 == null || latLng == null || F2(latLng) || (eventCallback = this.h0.getEventCallback("onmapclicked", this.y0)) == null) {
return;
}
Object[] objArr = {new C0789a("e", new EventOnMapClicked(this.h0.getOwnerApp(), this.h0, this.y0, latLng.l, latLng.m))};
InterfaceC1036l0 xOneActivity = getXOneActivity();
new EventCallbackTask.b().b(xOneActivity).e(this.h0).h(xOneActivity.getHandler()).g(eventCallback).c(objArr).a().runSeriallyAsyncTask();
}
public final boolean k2(String str, boolean z) {
if (this.h0 == null || TextUtils.isEmpty(this.y0)) {
return z;
}
try {
return fb.q.g(this.h0.FieldPropertyValue(this.y0, str), z);
} catch (Exception e) {
throw AbstractC0751f.e(e);
}
}
public final float l2(String str, float f) {
if (this.h0 == null || TextUtils.isEmpty(this.y0)) {
return f;
}
try {
return fb.q.m(this.h0.FieldPropertyValue(this.y0, str), f);
} catch (Exception e) {
throw AbstractC0751f.e(e);
}
}
public void m(o oVar) {
U1(oVar);
}
public final Integer m2(String str, Integer num) {
if (this.h0 == null || TextUtils.isEmpty(this.y0)) {
return num;
}
try {
return fb.q.r(this.h0.FieldPropertyValue(this.y0, str), num);
} catch (Exception e) {
throw AbstractC0751f.e(e);
}
}
public final void m3(String str, LatLng latLng, String str2, String str3) {
StringBuilder sb2 = new StringBuilder();
sb2.append("google.navigation:q=");
if (latLng != null) {
sb2.append(latLng.l);
sb2.append(",");
sb2.append(latLng.m);
} else if (TextUtils.isEmpty(str)) {
return;
} else {
sb2.append(str);
}
if (!TextUtils.isEmpty(str2)) {
sb2.append("&mode=");
sb2.append(str2);
}
Intent intent = new Intent("android.intent.action.VIEW", Uri.parse(sb2.toString()));
intent.setPackage(str3);
getActivity().startActivity(intent);
}
@Override
@ScriptAllowed
@Keep
public void moveTo(Object... objArr) {
Utils.j("MoveTo", objArr);
Utils.g("MoveTo", objArr, 2);
final LatLng latLng = new LatLng(Double.parseDouble(fb.t.y(objArr[0])), Double.parseDouble(fb.t.y(objArr[1])));
final c googleMap = getGoogleMap();
if (googleMap == null) {
return;
}
M3(new Runnable() {
@Override
public final void run() {
googleMap.g(c4.b.a(latLng));
}
});
}
public final String n2(String str) {
if (this.h0 == null || TextUtils.isEmpty(this.y0)) {
return null;
}
try {
return this.h0.FieldPropertyValue(this.y0, str);
} catch (Exception e) {
throw AbstractC0751f.e(e);
}
}
public final i6.d o2(org.mozilla.javascript.C0932x0 r7) {
throw new UnsupportedOperationException("Method not decompiled: com.xone.maps.ui.XoneMapsViewEmbed.o2(org.mozilla.javascript.x0):i6.d");
}
public void onDetachedFromWindow() {
super.onDetachedFromWindow();
Future future = this.g0;
if (future != null) {
future.cancel(true);
this.g0 = null;
}
}
public void onStateChanged(m mVar, h.a aVar) {
switch (a.a[aVar.ordinal()]) {
case 1:
d dVar = this.k0;
if (dVar != null) {
dVar.b((Bundle) null);
}
c4.k kVar = this.l0;
if (kVar != null) {
kVar.b((Bundle) null);
break;
}
break;
case 2:
d dVar2 = this.k0;
if (dVar2 != null) {
dVar2.f();
}
c4.k kVar2 = this.l0;
if (kVar2 != null) {
kVar2.f();
break;
}
break;
case 3:
d dVar3 = this.k0;
if (dVar3 != null) {
dVar3.e();
}
c4.k kVar3 = this.l0;
if (kVar3 != null) {
kVar3.e();
break;
}
break;
case 4:
d dVar4 = this.k0;
if (dVar4 != null) {
dVar4.d();
}
c4.k kVar4 = this.l0;
if (kVar4 != null) {
kVar4.d();
break;
}
break;
case 5:
d dVar5 = this.k0;
if (dVar5 != null) {
dVar5.g();
}
c4.k kVar5 = this.l0;
if (kVar5 != null) {
kVar5.g();
break;
}
break;
case 6:
d dVar6 = this.k0;
if (dVar6 != null) {
dVar6.c();
}
c4.k kVar6 = this.l0;
if (kVar6 != null) {
kVar6.c();
break;
}
break;
}
}
public final File p2(String str) {
InterfaceC1038m0 app = getApp();
String C0 = Utils.C0(app.Y(), app.T(), str, 2);
if (C0 != null) {
return new File(C0);
}
throw AbstractC0751f.b("Cannot find file path for icon " + str);
}
public void q(int i) {
Y1();
}
public final j6.f q2(C0932x0 c0932x0) {
InputStream fileInputStream;
try {
String E = Q8.k.E(c0932x0, "data", null);
String E2 = Q8.k.E(c0932x0, "dataFile", null);
if (TextUtils.isEmpty(E) && TextUtils.isEmpty(E2)) {
throw new IllegalArgumentException("Empty data argument");
}
if (TextUtils.isEmpty(E)) {
InterfaceC1038m0 app = getApp();
fileInputStream = new FileInputStream(Utils.q1(app.Y(), app.T(), E2, false, 1));
} else {
fileInputStream = new ByteArrayInputStream(fb.t.S(E));
}
return new j6.f(this.j0, fileInputStream, getContext());
} catch (IOException e) {
e = e;
throw AbstractC0751f.e(e);
} catch (XmlPullParserException e2) {
e = e2;
throw AbstractC0751f.e(e);
}
}
public void l3(LatLngBounds latLngBounds) {
int i;
int i2 = this.Y0;
c4.a b = (i2 <= 0 || (i = this.Z0) <= 0) ? c4.b.b(latLngBounds, 100) : c4.b.c(latLngBounds, i2, i, 100);
c googleMap = getGoogleMap();
if (googleMap == null) {
return;
}
googleMap.p(b);
}
public boolean r(o oVar) {
Map map;
try {
Ba.a e = this.p0.e(oVar.b());
if (e == null) {
if (!u3(oVar) && (map = this.h1) != null && !map.isEmpty()) {
return !this.H0;
}
return !this.H0;
}
if (e.b() == null) {
return !this.H0;
}
if (this.a1) {
j2(e.b());
} else {
i2(e.b());
}
return !this.H0;
} catch (Exception e2) {
w2(e2);
return !this.H0;
}
}
public LatLng r2(String str) {
try {
Context applicationContext = getApplicationContext();
if (!Geocoder.isPresent()) {
return s2(str);
}
List<Address> fromLocationName = new Geocoder(applicationContext).getFromLocationName(str, 1);
if (fromLocationName != null && !fromLocationName.isEmpty()) {
Address address = fromLocationName.get(0);
return new LatLng(address.getLatitude(), address.getLongitude());
}
return null;
} catch (IOException e) {
e.printStackTrace();
return null;
}
}
public final boolean O2(d6.a aVar, final Object obj, final String str) {
LatLng position = aVar.getPosition();
final double d = position.l;
final double d2 = position.m;
new fa.p() {
@Override
public final Object call() {
Void X2;
X2 = XoneMapsViewEmbed.this.X2(str, d, d2, obj);
return X2;
}
@Override
public void onPostExecute(Object obj2) {
fa.o.c(this, obj2);
}
@Override
public void onPreExecute() {
fa.o.d(this);
}
@Override
public void onProgressUpdate(Object... objArr) {
fa.o.e(this, objArr);
}
@Override
public Future postToUiThread(Runnable runnable) {
return fa.o.f(this, runnable);
}
@Override
public Future runExecutor(ExecutorService executorService) {
return fa.o.i(this, executorService);
}
@Override
public Future runSerially() {
return fa.o.k(this);
}
@Override
public Future runSeriallyAsyncTask() {
return fa.o.l(this);
}
}.runSeriallyAsyncTask();
return true;
}
@Override
@ScriptAllowed
@Keep
public boolean removeArea(Object... objArr) {
Map map;
Utils.j("RemoveArea", objArr);
Utils.g("RemoveArea", objArr, 1);
String y = fb.t.y(objArr[0]);
if (TextUtils.isEmpty(y) || (map = this.w0) == null || !map.containsKey(y)) {
return false;
}
final r rVar = (r) this.w0.remove(y);
if (rVar == null) {
return true;
}
if (Utils.s3()) {
rVar.h();
return true;
}
M3(new Runnable() {
@Override
public final void run() {
rVar.h();
}
});
return true;
}
@Override
@ScriptAllowed
@Keep
public void removeGeoJson(Object... objArr) {
final String[] strArr;
Utils.g("RemoveGeoJson", objArr, 1);
Object obj = objArr[0];
if (obj instanceof C0893d0) {
strArr = (String[]) Q8.m.g((C0893d0) obj);
} else {
if (!(obj instanceof CharSequence)) {
if (obj == null) {
throw new IllegalArgumentException("RemoveGeoJson(): Empty IDs argument");
}
throw new IllegalArgumentException("RemoveGeoJson(): Invalid argument of type " + obj.getClass().getSimpleName());
}
strArr = new String[]{obj.toString()};
}
M3(new Runnable() {
@Override
public final void run() {
XoneMapsViewEmbed.this.c3(strArr);
}
});
}
@Override
@ScriptAllowed
@Keep
public void removeKml(Object... objArr) {
final String[] strArr;
Utils.g("RemoveKml", objArr, 1);
Object obj = objArr[0];
if (obj instanceof C0893d0) {
strArr = (String[]) Q8.m.g((C0893d0) obj);
} else {
if (!(obj instanceof CharSequence)) {
if (obj == null) {
throw new IllegalArgumentException("RemoveKml(): Empty IDs argument");
}
throw new IllegalArgumentException("RemoveKml(): Invalid argument of type " + obj.getClass().getSimpleName());
}
strArr = new String[]{obj.toString()};
}
M3(new Runnable() {
@Override
public final void run() {
XoneMapsViewEmbed.this.d3(strArr);
}
});
}
@Override
@ScriptAllowed
@Keep
public boolean removeMarker(Object... objArr) {
Utils.j("removeMarker", objArr);
Utils.g("removeMarker", objArr, 1);
Object obj = objArr[0];
if (!(obj instanceof CharSequence)) {
if (obj instanceof MarkerScriptWrapper) {
return removeMarker(((MarkerScriptWrapper) obj).getId());
}
return false;
}
String obj2 = obj.toString();
Map map = this.u0;
if (map == null || !map.containsKey(obj2)) {
return false;
}
MarkerScriptWrapper markerScriptWrapper = (MarkerScriptWrapper) this.u0.remove(obj2);
if (markerScriptWrapper != null) {
I3(markerScriptWrapper.getWrappedMarker());
}
return true;
}
@Override
@ScriptAllowed
@Keep
public boolean removePolylines(Object... objArr) {
Map map;
Utils.j("RemovePolylines", objArr);
Utils.g("RemovePolylines", objArr, 1);
String y = fb.t.y(objArr[0]);
if (TextUtils.isEmpty(y) || (map = this.t0) == null || !map.containsKey(y)) {
return false;
}
t tVar = (t) this.t0.remove(y);
if (tVar == null) {
return true;
}
tVar.f();
return true;
}
@Override
@ScriptAllowed
@Keep
public void resetMinMaxZoom(Object... objArr) {
final c googleMap = getGoogleMap();
if (googleMap == null) {
return;
}
M3(new Runnable() {
@Override
public final void run() {
googleMap.q();
}
});
}
@Override
@ScriptAllowed
@Keep
public void restrictMapToBounds(Object... objArr) {
Utils.j("RestrictMapToBounds", objArr);
A2(GpsTools.j0(objArr));
}
@Override
@ScriptAllowed
@Keep
public void routeTo(Object... objArr) {
C0932x0 c0932x0;
String E;
Utils.j("RouteTo", objArr);
Utils.g("RouteTo", objArr, 1);
Object obj = objArr[0];
if (obj instanceof C0932x0) {
c0932x0 = (C0932x0) obj;
E = Q8.k.E(c0932x0, "source", "internal");
if (TextUtils.isEmpty(E)) {
E = "internal";
}
E.getClass();
switch (E) {
case "external":
case "google_maps":
T1("RouteTo", "com.google.android.apps.maps");
n3(c0932x0, "com.google.android.apps.maps");
break;
case "osmand":
T1("RouteTo", "net.osmand");
n3(c0932x0, "net.osmand");
break;
case "internal":
c0932x0.remove("source");
drawRoute(c0932x0);
break;
case "osmand_plus":
T1("RouteTo", "net.osmand.plus");
n3(c0932x0, "net.osmand.plus");
break;
default:
T1("RouteTo", E);
n3(c0932x0, E);
break;
}
}
}
public void s(Location location) {
if (location == null) {
this.f0 = null;
return;
}
try {
Location location2 = this.f0;
if (location2 == null) {
if (this.D0) {
O3(location);
}
W1(location);
this.f0 = location;
return;
}
if (this.F0) {
P3(location, getZoomInternal(), false);
} else if (this.D0 && location.distanceTo(location2) > 50000.0f) {
O3(location);
}
this.f0 = location;
V1(location);
} catch (Exception e) {
w2(e);
}
}
public final LatLng s2(String str) {
char c;
HttpURLConnection httpURLConnection;
?? r92;
LatLng latLng;
char c2;
OutputStream outputStream;
BufferedReader bufferedReader;
?? r10;
BufferedReader bufferedReader2;
BufferedReader bufferedReader3;
int responseCode;
String a2 = Ia.a.a(getApplicationContext());
OutputStream outputStream2 = null;
if (TextUtils.isEmpty(a2)) {
return null;
}
try {
try {
httpURLConnection = (HttpURLConnection) new URL("https://maps.googleapis.com/maps/api/geocode/json?key=" + a2 + "&address=" + str).openConnection();
} catch (Throwable th) {
th = th;
}
} catch (IOException e) {
e = e;
latLng = null;
c2 = 3;
httpURLConnection = null;
outputStream = null;
} catch (JSONException e2) {
e = e2;
latLng = null;
c2 = 3;
httpURLConnection = null;
outputStream = null;
} catch (Throwable th2) {
th = th2;
c = 3;
httpURLConnection = null;
r92 = null;
}
try {
httpURLConnection.setDoOutput(true);
httpURLConnection.setRequestProperty("Accept-Charset", "UTF-8");
httpURLConnection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded;charset=UTF-8");
outputStream = httpURLConnection.getOutputStream();
try {
r92 = httpURLConnection.getInputStream();
try {
responseCode = httpURLConnection.getResponseCode();
} catch (IOException e3) {
e = e3;
latLng = null;
c2 = 3;
r10 = 0;
bufferedReader2 = r10;
e.printStackTrace();
?? r0 = new Closeable[4];
r0[0] = outputStream;
r0[1] = r92;
r0[2] = r10;
r0[c2] = bufferedReader2;
Utils.P(r0);
Utils.r0(httpURLConnection);
return latLng;
} catch (JSONException e4) {
e = e4;
latLng = null;
c2 = 3;
r10 = 0;
bufferedReader2 = r10;
e.printStackTrace();
?? r02 = new Closeable[4];
r02[0] = outputStream;
r02[1] = r92;
r02[2] = r10;
r02[c2] = bufferedReader2;
Utils.P(r02);
Utils.r0(httpURLConnection);
return latLng;
} catch (Throwable th3) {
th = th3;
c = 3;
outputStream2 = outputStream;
bufferedReader = null;
bufferedReader2 = bufferedReader;
bufferedReader3 = bufferedReader;
?? r1 = new Closeable[4];
r1[0] = outputStream2;
r1[1] = r92;
r1[2] = bufferedReader3;
r1[c] = bufferedReader2;
Utils.P(r1);
Utils.r0(httpURLConnection);
throw th;
}
} catch (IOException e5) {
e = e5;
latLng = null;
c2 = 3;
r92 = null;
r10 = r92;
bufferedReader2 = r10;
e.printStackTrace();
?? r03 = new Closeable[4];
r03[0] = outputStream;
r03[1] = r92;
r03[2] = r10;
r03[c2] = bufferedReader2;
Utils.P(r03);
Utils.r0(httpURLConnection);
return latLng;
} catch (JSONException e6) {
e = e6;
latLng = null;
c2 = 3;
r92 = null;
r10 = r92;
bufferedReader2 = r10;
e.printStackTrace();
?? r022 = new Closeable[4];
r022[0] = outputStream;
r022[1] = r92;
r022[2] = r10;
r022[c2] = bufferedReader2;
Utils.P(r022);
Utils.r0(httpURLConnection);
return latLng;
} catch (Throwable th4) {
th = th4;
c = 3;
outputStream2 = outputStream;
r92 = null;
bufferedReader = r92;
bufferedReader2 = bufferedReader;
bufferedReader3 = bufferedReader;
?? r12 = new Closeable[4];
r12[0] = outputStream2;
r12[1] = r92;
r12[2] = bufferedReader3;
r12[c] = bufferedReader2;
Utils.P(r12);
Utils.r0(httpURLConnection);
throw th;
}
} catch (IOException e7) {
e = e7;
latLng = null;
c2 = 3;
outputStream = null;
r92 = outputStream;
r10 = r92;
bufferedReader2 = r10;
e.printStackTrace();
?? r032 = new Closeable[4];
r032[0] = outputStream;
r032[1] = r92;
r032[2] = r10;
r032[c2] = bufferedReader2;
Utils.P(r032);
Utils.r0(httpURLConnection);
return latLng;
} catch (JSONException e10) {
e = e10;
latLng = null;
c2 = 3;
outputStream = null;
r92 = outputStream;
r10 = r92;
bufferedReader2 = r10;
e.printStackTrace();
?? r0222 = new Closeable[4];
r0222[0] = outputStream;
r0222[1] = r92;
r0222[2] = r10;
r0222[c2] = bufferedReader2;
Utils.P(r0222);
Utils.r0(httpURLConnection);
return latLng;
} catch (Throwable th5) {
th = th5;
c = 3;
r92 = null;
}
if (responseCode < 200 || responseCode > 300) {
latLng = null;
Utils.P(new Closeable[]{outputStream, r92, null, null});
Utils.r0(httpURLConnection);
return latLng;
}
r10 = new InputStreamReader(r92);
try {
bufferedReader2 = new BufferedReader(r10);
try {
try {
StringBuilder sb2 = new StringBuilder();
while (true) {
String readLine = bufferedReader2.readLine();
if (readLine == null) {
break;
}
try {
sb2.append(readLine);
sb2.append('\n');
} catch (Throwable th6) {
th = th6;
outputStream2 = outputStream;
c = 3;
bufferedReader3 = r10;
?? r122 = new Closeable[4];
r122[0] = outputStream2;
r122[1] = r92;
r122[2] = bufferedReader3;
r122[c] = bufferedReader2;
Utils.P(r122);
Utils.r0(httpURLConnection);
throw th;
}
}
JSONObject jSONObject = new JSONObject(sb2.toString());
String string = jSONObject.getString("status");
if (TextUtils.isEmpty(string)) {
Utils.P(new Closeable[]{outputStream, r92, r10, bufferedReader2});
} else {
if (string.compareToIgnoreCase("OK") == 0) {
JSONObject jSONObject2 = jSONObject.getJSONArray("results").getJSONObject(0).getJSONObject("geometry").getJSONObject("location");
latLng = null;
c2 = 3;
try {
LatLng latLng2 = new LatLng(jSONObject2.getDouble("lat"), jSONObject2.getDouble("lng"));
Utils.P(new Closeable[]{outputStream, r92, r10, bufferedReader2});
Utils.r0(httpURLConnection);
return latLng2;
} catch (IOException e11) {
e = e11;
e.printStackTrace();
?? r0322 = new Closeable[4];
r0322[0] = outputStream;
r0322[1] = r92;
r0322[2] = r10;
r0322[c2] = bufferedReader2;
Utils.P(r0322);
Utils.r0(httpURLConnection);
return latLng;
} catch (JSONException e12) {
e = e12;
e.printStackTrace();
?? r02222 = new Closeable[4];
r02222[0] = outputStream;
r02222[1] = r92;
r02222[2] = r10;
r02222[c2] = bufferedReader2;
Utils.P(r02222);
Utils.r0(httpURLConnection);
return latLng;
}
}
Utils.P(new Closeable[]{outputStream, r92, r10, bufferedReader2});
}
Utils.r0(httpURLConnection);
return null;
} catch (Throwable th7) {
th = th7;
c = 3;
outputStream2 = outputStream;
bufferedReader3 = r10;
?? r1222 = new Closeable[4];
r1222[0] = outputStream2;
r1222[1] = r92;
r1222[2] = bufferedReader3;
r1222[c] = bufferedReader2;
Utils.P(r1222);
Utils.r0(httpURLConnection);
throw th;
}
} catch (IOException e13) {
e = e13;
latLng = null;
c2 = 3;
} catch (JSONException e14) {
e = e14;
latLng = null;
c2 = 3;
}
} catch (IOException e15) {
e = e15;
latLng = null;
c2 = 3;
bufferedReader2 = null;
} catch (JSONException e16) {
e = e16;
latLng = null;
c2 = 3;
bufferedReader2 = null;
} catch (Throwable th8) {
th = th8;
c = 3;
outputStream2 = outputStream;
bufferedReader2 = null;
bufferedReader3 = r10;
}
}
public final boolean N2(Ba.b bVar, C0244h c0244h, final IXoneObject iXoneObject) {
try {
final Object h = bVar.h();
if (h == null) {
return false;
}
final Object k = bVar.k();
o M = c0244h.M(bVar);
InterfaceC1038m0 interfaceC1038m0 = (InterfaceC1038m0) getApplicationContext();
final MarkerScriptWrapper markerScriptWrapper = new MarkerScriptWrapper(M, null, k, null, interfaceC1038m0.Y(), interfaceC1038m0.T());
new fa.p() {
@Override
public final Object call() {
Void Y2;
Y2 = XoneMapsViewEmbed.this.Y2(iXoneObject, h, markerScriptWrapper, k);
return Y2;
}
@Override
public void onPostExecute(Object obj) {
fa.o.c(this, obj);
}
@Override
public void onPreExecute() {
fa.o.d(this);
}
@Override
public void onProgressUpdate(Object... objArr) {
fa.o.e(this, objArr);
}
@Override
public Future postToUiThread(Runnable runnable) {
return fa.o.f(this, runnable);
}
@Override
public Future runExecutor(ExecutorService executorService) {
return fa.o.i(this, executorService);
}
@Override
public Future runSerially() {
return fa.o.k(this);
}
@Override
public Future runSeriallyAsyncTask() {
return fa.o.l(this);
}
}.runSeriallyAsyncTask();
return true;
} catch (Exception e) {
w2(e);
return false;
}
}
@Override
public void setExternalEnabled(boolean z) {
}
@Override
@ScriptAllowed
@Keep
public void setFollowUserLocation(Object... objArr) {
Utils.g("SetFollowUserLocation", objArr, 1);
this.F0 = fb.t.H(objArr[0]);
}
public void setGoogleMap(c cVar) {
this.j0 = cVar;
}
@Override
@ScriptAllowed
@Keep
public void setMapType(Object... objArr) {
Utils.j("SetMapType", objArr);
Utils.g("SetMapType", objArr, 1);
String z = fb.t.z(objArr[0], null);
if (TextUtils.isEmpty(z)) {
throw new IllegalArgumentException("SetMapType(): Empty map type argument");
}
final c googleMap = getGoogleMap();
if (googleMap == null) {
return;
}
final int Y3 = Y3(z);
if (Utils.s3()) {
googleMap.w(Y3);
} else {
M3(new Runnable() {
@Override
public final void run() {
googleMap.w(Y3);
}
});
}
}
@Override
@ScriptAllowed
@Keep
public void setMaxZoom(Object... objArr) {
Utils.j("SetMaxZoom", objArr);
Utils.g("SetMaxZoom", objArr, 1);
final int o = fb.q.o(objArr[0]);
final c googleMap = getGoogleMap();
if (googleMap == null) {
return;
}
if (((Float) L3(new Ka.F(this))).floatValue() > o) {
M3(new Runnable() {
@Override
public final void run() {
googleMap.g(c4.b.e(o));
}
});
}
M3(new Runnable() {
@Override
public final void run() {
googleMap.x(o);
}
});
}
@Override
@ScriptAllowed
@Keep
public void setMinZoom(Object... objArr) {
Utils.j("SetMinZoom", objArr);
Utils.g("SetMinZoom", objArr, 1);
final int o = fb.q.o(objArr[0]);
final c googleMap = getGoogleMap();
if (googleMap == null) {
return;
}
if (((Float) L3(new Ka.F(this))).floatValue() < o) {
M3(new Runnable() {
@Override
public final void run() {
googleMap.g(c4.b.e(o));
}
});
}
M3(new Runnable() {
@Override
public final void run() {
googleMap.y(o);
}
});
}
@Override
@ScriptAllowed
@Keep
public void setZoom(Object... objArr) {
final c googleMap;
Utils.g("SetZoom", objArr, 1);
final float m = fb.q.m(objArr[0], -1.0f);
if (m == -1.0f || (googleMap = getGoogleMap()) == null) {
return;
}
M3(new Runnable() {
@Override
public final void run() {
googleMap.g(c4.b.e(m));
}
});
}
@Override
@ScriptAllowed
@Keep
public void showCompass() {
throw new UnsupportedOperationException("ShowCompass(): Not implemented yet");
}
@ScriptAllowed
@Keep
public XoneMapsViewEmbed showMap(Object... objArr) {
if (Utils.s3()) {
S3();
return this;
}
fa.j.m(new Runnable() {
@Override
public final void run() {
XoneMapsViewEmbed.this.S3();
}
});
return this;
}
@Override
@ScriptAllowed
@Keep
public void showMinimap() {
throw new UnsupportedOperationException("ShowMinimap(): Not implemented yet");
}
@Override
@ScriptAllowed
@Keep
public void showPoisMenu() {
if (Utils.s3()) {
N3();
} else {
M3(new Runnable() {
@Override
public final void run() {
XoneMapsViewEmbed.this.N3();
}
});
}
}
@Override
@ScriptAllowed
@Keep
public void showScale() {
throw new UnsupportedOperationException("ShowScale(): Not implemented yet");
}
@Override
@ScriptAllowed
@Keep
public void startDistanceMeter(Object... objArr) {
String x;
String x2;
final LatLng latLng;
final File file;
Utils.h("StartDistanceMeter", objArr, 0, 2);
if (objArr == null || objArr.length == 0) {
W3();
return;
}
InterfaceC1038m0 app = getApp();
Object obj = objArr[0];
final File file2 = null;
if (obj instanceof C0932x0) {
C0932x0 c0932x0 = (C0932x0) obj;
latLng = (c0932x0.containsKey("latitude") && c0932x0.containsKey("longitude")) ? new LatLng(Q8.k.k(c0932x0, "latitude", 0.0d), Q8.k.k(c0932x0, "longitude", 0.0d)) : null;
x = Q8.k.E(c0932x0, "startMarkerIcon", "");
x2 = Q8.k.E(c0932x0, "endMarkerIcon", "");
} else {
LatLng z0 = GpsTools.z0(obj);
x = Utils.x(objArr, 1, null);
x2 = Utils.x(objArr, 2, null);
latLng = z0;
}
String Y = app.Y();
String T = app.T();
if (TextUtils.isEmpty(x)) {
file = null;
} else {
String C0 = Utils.C0(Y, T, x, 2);
if (TextUtils.isEmpty(C0)) {
throw new NullPointerException("StartDistanceMeter(): Cannot obtain start marker icon path");
}
file = new File(C0);
}
if (!TextUtils.isEmpty(x2)) {
String C02 = Utils.C0(Y, T, x2, 2);
if (TextUtils.isEmpty(C02)) {
throw new NullPointerException("StartDistanceMeter(): Cannot obtain end marker icon path");
}
file2 = new File(C02);
}
if (latLng == null) {
W3();
} else if (Utils.s3()) {
i3(latLng, file, file2);
} else {
M3(new Runnable() {
@Override
public final void run() {
XoneMapsViewEmbed.this.i3(latLng, file, file2);
}
});
}
}
@Override
@ScriptAllowed
@Keep
public void stopDistanceMeter() {
if (Utils.s3()) {
N1();
} else {
M3(new Runnable() {
@Override
public final void run() {
XoneMapsViewEmbed.this.N1();
}
});
}
}
public final List t1(final Ba.b bVar) {
return Utils.s3() ? H2(bVar) : (List) L3(new Callable() {
@Override
public final Object call() {
List H2;
H2 = XoneMapsViewEmbed.this.H2(bVar);
return H2;
}
});
}
public final Ba.b t2(C0932x0 c0932x0) {
String W = Q8.k.W(c0932x0, "clusterId");
String D = Q8.k.D(c0932x0, "clusterIcon");
InterfaceC1038m0 app = getApp();
String Y = app.Y();
String T = app.T();
String C0 = Utils.C0(Y, T, D, 2);
String E = Q8.k.E(c0932x0, "title", null);
String E2 = Q8.k.E(c0932x0, "snippet", null);
boolean a2 = Q8.k.a(c0932x0, "itemCounter", false);
double V = Q8.k.V(c0932x0, "latitude");
double V2 = Q8.k.V(c0932x0, "longitude");
String C02 = Utils.C0(Y, T, Q8.k.E(c0932x0, "icon", ""), 2);
Object z = Q8.k.z(c0932x0, "tag", null);
int o = Q8.k.o(c0932x0, "clusterIconWidth", org.mozilla.javascript.Context.VERSION_1_5);
int o2 = Q8.k.o(c0932x0, "clusterIconHeight", org.mozilla.javascript.Context.VERSION_1_5);
float l = Q8.k.l(c0932x0, "textSize", 14.0f);
int g = Q8.k.g(c0932x0, "textColor", -8421505);
String E3 = Q8.k.E(c0932x0, "textAlignment", "center");
Object z2 = Q8.k.z(c0932x0, "onClick", null);
Object z3 = Q8.k.z(c0932x0, "onClusterClick", null);
if (z2 == null) {
z2 = Q8.k.z(c0932x0, "callback", null);
}
if (!TextUtils.isEmpty(C0)) {
File file = new File(C0);
if (!file.exists()) {
throw new IllegalArgumentException("Cluster icon file " + file.getAbsolutePath() + " not found");
}
}
LatLng latLng = new LatLng(V, V2);
if (!TextUtils.isEmpty(C02)) {
File file2 = new File(C02);
if (!file2.exists()) {
throw new IllegalArgumentException("Marker icon file " + file2.getAbsolutePath() + " not found");
}
}
return new Ba.b(latLng, E, E2, getSelfObject(), W, C02, C0, a2, z3, z2, z, o, o2, l, g, E3);
}
public final void t3() {
t tVar = this.v0;
if (tVar != null) {
tVar.f();
}
if (this.f1.isEmpty()) {
return;
}
y1(((o) this.f1.get(0)).c(), ((o) this.f1.get(1)).c());
}
@ScriptAllowed
@Keep
public String toString() {
StringBuilder sb2 = new StringBuilder();
sb2.append("Google Maps view object.");
if (this.h0 != null) {
sb2.append("\nData object: ");
sb2.append(this.h0.toString());
}
if (this.i0 != null) {
sb2.append("\nData collection: ");
sb2.append(this.i0.toString());
}
if (this.j0 == null) {
sb2.append("\nMap not loaded yet");
}
return sb2.toString();
}
@Override
@ScriptAllowed
@Keep
public void toggleCompass() {
throw new UnsupportedOperationException("ToggleCompass(): Not implemented yet");
}
@Override
@ScriptAllowed
@Keep
public void togglePoisMenu() {
if (Utils.s3()) {
b4();
} else {
M3(new Runnable() {
@Override
public final void run() {
XoneMapsViewEmbed.this.b4();
}
});
}
}
public void u(o oVar) {
p pVar;
Object obj;
List<Wa.a> eventCallback;
LatLng c = oVar.c();
Ba.c cVar = (Ba.c) oVar.f();
if (cVar != null) {
Object b = cVar.b();
p a2 = cVar.a();
if ((b instanceof CharSequence) && !this.f1.isEmpty() && b.toString().startsWith("##DISTANCEMETER_")) {
t3();
K1(((o) this.f1.get(0)).c(), ((o) this.f1.get(1)).c());
return;
} else {
pVar = a2;
obj = b;
}
} else {
pVar = null;
obj = null;
}
InterfaceC1038m0 app = getApp();
String Y = app.Y();
String T = app.T();
IXoneObject iXoneObject = this.h0;
if (iXoneObject == null || (eventCallback = iXoneObject.getEventCallback("onmarkerdragend", this.y0)) == null) {
return;
}
EventOnMarkerDragEnd eventOnMarkerDragEnd = new EventOnMarkerDragEnd(this.h0.getOwnerApp(), this.h0, this.y0, c.l, c.m, obj);
eventOnMarkerDragEnd.marker = new MarkerScriptWrapper(oVar, pVar, obj, null, Y, T);
Object[] objArr = {new C0789a("e", eventOnMarkerDragEnd)};
InterfaceC1036l0 xOneActivity = getXOneActivity();
new EventCallbackTask.b().b(xOneActivity).e(this.h0).h(xOneActivity.getHandler()).g(eventCallback).c(objArr).a().runSeriallyAsyncTask();
}
public final List u1(final Collection collection, final IXoneObject iXoneObject) {
return Utils.s3() ? I2(collection, iXoneObject) : (List) L3(new Callable() {
@Override
public final Object call() {
List I2;
I2 = XoneMapsViewEmbed.this.I2(collection, iXoneObject);
return I2;
}
});
}
public final boolean u3(o oVar) {
Map map;
final MarkerScriptWrapper markerScriptWrapper;
if (oVar == null || this.h0 == null || (map = this.u0) == null || !map.containsKey(oVar.b()) || (markerScriptWrapper = (MarkerScriptWrapper) this.u0.get(oVar.b())) == null || !markerScriptWrapper.hasCallback()) {
return false;
}
new fa.p() {
@Override
public final Object call() {
Void Z2;
Z2 = XoneMapsViewEmbed.this.Z2(markerScriptWrapper);
return Z2;
}
@Override
public void onPostExecute(Object obj) {
fa.o.c(this, obj);
}
@Override
public void onPreExecute() {
fa.o.d(this);
}
@Override
public void onProgressUpdate(Object... objArr) {
fa.o.e(this, objArr);
}
@Override
public Future postToUiThread(Runnable runnable) {
return fa.o.f(this, runnable);
}
@Override
public Future runExecutor(ExecutorService executorService) {
return fa.o.i(this, executorService);
}
@Override
public Future runSerially() {
return fa.o.k(this);
}
@Override
public Future runSeriallyAsyncTask() {
return fa.o.l(this);
}
}.runSeriallyAsyncTask();
return true;
}
public void v(r rVar) {
try {
Object f = rVar.f();
if (f == null) {
return;
}
B2(f, new Object[0]);
} catch (Exception e) {
w2(e);
}
}
public final void v1(Object obj) {
if (obj instanceof C0932x0) {
final List t1 = t1(t2((C0932x0) obj));
M3(new Runnable() {
@Override
public final void run() {
XoneMapsViewEmbed.this.J2(t1);
}
});
return;
}
if (!(obj instanceof C0893d0)) {
if (obj == null) {
throw new IllegalArgumentException("AddClusteredMarker(): Empty marker argument");
}
throw new IllegalArgumentException("AddClusteredMarker(): Unknown argument type");
}
ArrayList j = Q8.m.j((C0893d0) obj, C0932x0.class);
ArrayList arrayList = new ArrayList();
int size = j.size();
IXoneObject iXoneObject = null;
int i = 0;
while (i < size) {
Object obj2 = j.get(i);
i++;
Ba.b t2 = t2((C0932x0) obj2);
if (iXoneObject == null) {
iXoneObject = t2.j();
}
arrayList.add(t2);
}
final List u1 = u1(arrayList, iXoneObject);
M3(new Runnable() {
@Override
public final void run() {
XoneMapsViewEmbed.this.K2(u1);
}
});
}
public String v2(int i, Object... objArr) {
return getContext().getString(i, objArr);
}
public final boolean v3(View view, DragEvent dragEvent) {
if (dragEvent == null || dragEvent.getAction() != 3) {
return true;
}
D2(new Point((int) dragEvent.getX(), (int) dragEvent.getY()));
return true;
}
public void w(e.a aVar) {
Utils.l("XOneAndroidFramework", "onMapsSdkInitialized(). Map renderer in use: " + aVar);
}
public List H2(Ba.b bVar) {
if (this.h1 == null) {
this.h1 = new HashMap();
}
final String f = bVar.f();
final IXoneObject j = bVar.j();
C0241e c0241e = (C0241e) this.h1.get(f);
if (c0241e == null) {
Context context = getContext();
C0241e c0241e2 = new C0241e(context, this);
final C0244h c0244h = new C0244h(context, this.j0, this.X0, c0241e2);
c0241e2.l(new c.e() {
public final boolean a(d6.b bVar2) {
boolean L2;
L2 = XoneMapsViewEmbed.this.L2(c0244h, j, (Ba.b) bVar2);
return L2;
}
});
final Object i = bVar.i();
if (i != null) {
c0241e2.k(new c.b() {
public final boolean a(d6.a aVar) {
boolean M2;
M2 = XoneMapsViewEmbed.this.M2(i, f, aVar);
return M2;
}
});
}
c0241e2.m(c0244h);
this.h1.put(f, c0241e2);
c0241e = c0241e2;
}
c0241e.n(bVar);
return Collections.singletonList(c0241e);
}
public void w2(Throwable th) {
ua.F f = (ua.F) getActivity();
if (f == null) {
th.printStackTrace();
} else {
f.b(th);
}
}
public final void b3(A a2, LatLng latLng) {
try {
if (x2(a2)) {
z3(latLng);
} else {
A3(latLng);
}
} catch (Exception e) {
w2(e);
}
}
public void x() {
Map map = this.h1;
if (map != null && !map.isEmpty()) {
Iterator it = this.h1.entrySet().iterator();
while (it.hasNext()) {
C0241e c0241e = (C0241e) ((Map.Entry) it.next()).getValue();
if (c0241e != null) {
c0241e.x();
}
}
}
X1();
b2();
}
public List I2(Collection collection, final IXoneObject iXoneObject) {
if (this.h1 == null) {
this.h1 = new HashMap();
}
HashMap hashMap = new HashMap();
Iterator it = collection.iterator();
while (it.hasNext()) {
Ba.b bVar = (Ba.b) it.next();
final Object i = bVar.i();
final String f = bVar.f();
if (((C0241e) this.h1.get(f)) == null) {
Context context = getContext();
C0241e c0241e = new C0241e(context, this);
final C0244h c0244h = new C0244h(context, this.j0, this.X0, c0241e);
c0241e.l(new c.e() {
public final boolean a(d6.b bVar2) {
boolean N2;
N2 = XoneMapsViewEmbed.this.N2(c0244h, iXoneObject, (Ba.b) bVar2);
return N2;
}
});
if (i != null) {
c0241e.k(new c.b() {
public final boolean a(d6.a aVar) {
boolean O2;
O2 = XoneMapsViewEmbed.this.O2(i, f, aVar);
return O2;
}
});
}
c0241e.m(c0244h);
this.h1.put(f, c0241e);
}
Collection collection2 = (Collection) hashMap.get(f);
if (collection2 == null) {
collection2 = new ArrayList();
hashMap.put(f, collection2);
}
collection2.add(bVar);
}
Set<Map.Entry> entrySet = hashMap.entrySet();
ArrayList arrayList = new ArrayList();
for (Map.Entry entry : entrySet) {
String str = (String) entry.getKey();
Collection collection3 = (Collection) entry.getValue();
C0241e c0241e2 = (C0241e) this.h1.get(str);
if (c0241e2 == null) {
throw new NullPointerException("clusterManager == null");
}
c0241e2.c(collection3);
arrayList.add(c0241e2);
}
return arrayList;
}
public final void h3(c4.j jVar, final LatLng latLng, int i) {
try {
if (i > 0) {
jVar.c(latLng, i);
} else {
jVar.b(latLng);
}
jVar.a(new j.a() {
public final void a(e4.A a2) {
XoneMapsViewEmbed.this.b3(latLng, a2);
}
});
} catch (Exception e) {
w2(e);
}
}
public final void y1(LatLng latLng, LatLng latLng2) {
c4.c googleMap = getGoogleMap();
if (googleMap == null) {
throw new IllegalStateException("Google Map is not ready yet");
}
u uVar = new u();
uVar.j1(latLng);
uVar.j1(latLng2);
uVar.B1(u2("mixed"));
uVar.n1(-65536);
uVar.E1(5.0f);
uVar.C1(new e4.d());
uVar.o1(new e4.x());
this.v0 = googleMap.e(uVar);
}
public void y2() {
if (Q(8388611) == 1) {
return;
}
B(8388611);
}
public final void y3(View view) {
try {
if (Q(8388611) == 1) {
return;
}
k0(8388611);
} catch (Exception e) {
w2(e);
}
}
public final o z1(LatLng latLng, int i, File file, Object obj) {
p pVar = new p();
pVar.D1(latLng);
if (file == null || !file.exists()) {
pVar.y1(e4.c.d(i));
} else {
pVar.y1(e4.c.c(file.getAbsolutePath()));
}
pVar.l1(true);
pVar.j1(1.0f);
pVar.E1(0.0f);
pVar.k1(0.47f, 1.0f);
return R2(pVar, obj);
}
public void z3(LatLng latLng) {
List<Wa.a> eventCallback;
IXoneObject iXoneObject = this.h0;
if (iXoneObject == null || (eventCallback = iXoneObject.getEventCallback("onstreetviewenabled", this.y0)) == null) {
return;
}
Object[] objArr = {new C0789a("e", new EventOnStreetViewStatusChanged(this.h0.getOwnerApp(), this.h0, this.y0, latLng.l, latLng.m))};
InterfaceC1036l0 xOneActivity = getXOneActivity();
new EventCallbackTask.b().b(xOneActivity).e(this.h0).h(xOneActivity.getHandler()).g(eventCallback).c(objArr).a().runSeriallyAsyncTask();
}
@Override
@ScriptAllowed
@Keep
public void zoomTo(Object... objArr) {
Utils.j("ZoomTo", objArr);
Utils.h("ZoomTo", objArr, 2, 4);
double parseDouble = Double.parseDouble(fb.t.y(objArr[0]));
double parseDouble2 = Double.parseDouble(fb.t.y(objArr[1]));
Q3(new LatLng(parseDouble, parseDouble2), Utils.t(objArr, 2, 14.0f), Utils.q(objArr, 3, false));
}
@Override
@ScriptAllowed
@Keep
public void zoomToBounds(Object... objArr) {
Utils.j("ZoomToBounds", objArr);
final List k0 = GpsTools.k0(objArr);
if (k0.isEmpty()) {
return;
}
if (Utils.s3()) {
k3(k0);
} else {
M3(new Runnable() {
@Override
public final void run() {
XoneMapsViewEmbed.this.k3(k0);
}
});
}
}
@Override
@ScriptAllowed
@Keep
public boolean zoomToEncodeData(Object... objArr) {
Utils.j("ZoomToEncodeData", objArr);
Object obj = objArr[0];
if (obj instanceof C0893d0) {
objArr = ((C0893d0) obj).toArray();
}
List p12 = GpsTools.p1(objArr);
if (p12.isEmpty()) {
return false;
}
final LatLngBounds G0 = GpsTools.G0(p12);
if (Utils.s3()) {
l3(G0);
return true;
}
M3(new Runnable() {
@Override
public final void run() {
XoneMapsViewEmbed.this.l3(G0);
}
});
return true;
}
@Override
@ScriptAllowed
@Keep
public Object zoomToMyLocation(Object... objArr) {
Utils.h("ZoomToMyLocation", objArr, 0, 2);
float t = Utils.t(objArr, 0, 14.0f);
boolean q = Utils.q(objArr, 1, false);
if (this.f0 == null) {
return null;
}
LatLng latLng = new LatLng(this.f0.getLatitude(), this.f0.getLongitude());
Q3(latLng, t, q);
C0932x0 c0932x0 = new C0932x0();
Q0.putProperty(c0932x0, "latitude", Double.valueOf(latLng.l));
Q0.putProperty(c0932x0, "longitude", Double.valueOf(latLng.m));
return c0932x0;
}
@ScriptAllowed
@Keep
public void addClusteredMarker(C0893d0 c0893d0) {
v1(c0893d0);
}
@ScriptAllowed
@Keep
public MarkerScriptWrapper addMarker(C0932x0 c0932x0) {
return addMarker(c0932x0);
}
@Override
@ScriptAllowed
@Keep
public XoneMapsViewEmbed addWmsTileOverlay(Object... objArr) {
Utils.g("AddWmsTileOverlay", objArr, 1);
C0932x0 c0932x0 = (C0932x0) objArr[0];
c4.c googleMap = getGoogleMap();
if (googleMap == null) {
return this;
}
Ha.a a2 = new a.C0002a().e(getApplicationContext()).g(Q8.k.a(c0932x0, "debug", false)).m(Q8.k.D(c0932x0, "name")).d(null).h(Q8.k.D(c0932x0, "urlDomain")).q(Q8.k.D(c0932x0, "version")).n(Q8.k.D(c0932x0, "request")).f(Q8.k.D(c0932x0, "cqlFilter")).l(Q8.k.D(c0932x0, "layers")).c(Q8.k.D(c0932x0, "boundingBox")).b(Q8.k.D(c0932x0, "backgroundColor")).r(Q8.k.n(c0932x0, "width")).k(Q8.k.n(c0932x0, "height")).o(Q8.k.D(c0932x0, "spatialReferenceSystem")).j(Q8.k.D(c0932x0, "format")).p(Q8.k.a(c0932x0, "transparent", true)).a();
K3(false);
this.m0 = S2(googleMap, a2);
return this;
}
@Override
@ScriptAllowed
@Keep
public CircleScriptWrapper drawCircle(Object... objArr) {
Utils.j("DrawCircle", objArr);
Utils.g("DrawCircle", objArr, 1);
Object obj = objArr[0];
if (!(obj instanceof C0932x0)) {
throw new IllegalArgumentException("DrawCircle(): Unknown argument type");
}
C0932x0 c0932x0 = (C0932x0) obj;
final LatLng k1 = GpsTools.k1(Q8.k.w(c0932x0, "location", null));
final boolean a2 = Q8.k.a(c0932x0, "visible", true);
final double k = Q8.k.k(c0932x0, "radius", 0.0d);
final int parseColor = Color.parseColor(Q8.k.E(c0932x0, "fillColor", ""));
final String E = Q8.k.E(c0932x0, "pattern", "normal");
final int parseColor2 = Color.parseColor(Q8.k.E(c0932x0, "strokeColor", ""));
final int o = Q8.k.o(c0932x0, "strokeWidth", 1);
if (k1 != null) {
return Utils.s3() ? new CircleScriptWrapper(U2(k1, a2, k, parseColor, E, parseColor2, o)) : new CircleScriptWrapper((e4.f) L3(new Callable() {
@Override
public final Object call() {
e4.f U2;
U2 = XoneMapsViewEmbed.this.U2(k1, a2, k, parseColor, E, parseColor2, o);
return U2;
}
}));
}
throw new IllegalArgumentException("DrawCircle(): Location argument must not be empty");
}
@Override
@ScriptAllowed
@Keep
public C0893d0 getGeoJsonLayerIds(Object... objArr) {
Set<Map.Entry> entrySet = this.g1.entrySet();
HashSet hashSet = new HashSet();
for (Map.Entry entry : entrySet) {
String str = (String) entry.getKey();
if (((h6.d) entry.getValue()) instanceof i6.d) {
hashSet.add(str);
}
}
return Q8.m.v(hashSet);
}
@Override
@ScriptAllowed
@Keep
public C0893d0 getKmlLayerIds(Object... objArr) {
Set<Map.Entry> entrySet = this.g1.entrySet();
HashSet hashSet = new HashSet();
for (Map.Entry entry : entrySet) {
String str = (String) entry.getKey();
if (((h6.d) entry.getValue()) instanceof j6.f) {
hashSet.add(str);
}
}
return Q8.m.v(hashSet);
}
@Override
@ScriptAllowed
@Keep
public C0893d0 getMapBounds() {
return GpsTools.T0((LatLngBounds) L3(new CallableC0252p(this)));
}
@Override
@ScriptAllowed
@Keep
public C0932x0 getMapCenter() {
LatLngBounds latLngBounds = (LatLngBounds) L3(new CallableC0252p(this));
if (latLngBounds != null) {
return GpsTools.S0(latLngBounds.l1());
}
C0932x0 c0932x0 = new C0932x0();
Q8.k.N(c0932x0, "latitude", 0.0d);
Q8.k.N(c0932x0, "longitude", 0.0d);
Q8.k.N(c0932x0, "altitude", 0.0d);
Q8.k.O(c0932x0, "accuracy", 0.0f);
Q8.k.O(c0932x0, "bearing", 0.0f);
Q8.k.O(c0932x0, "speed", 0.0f);
Q8.k.Q(c0932x0, "time", 0L);
return c0932x0;
}
@Override
@ScriptAllowed
@Keep
public C0932x0 getUserLocation() {
m4.l f;
b4.b a2 = b4.f.a(getApplicationContext());
if (a2 == null || (f = a2.f()) == null) {
return null;
}
try {
Location location = (Location) m4.o.a(f);
if (location == null) {
return null;
}
C0932x0 c0932x0 = new C0932x0();
Q8.k.N(c0932x0, "latitude", location.getLatitude());
Q8.k.N(c0932x0, "longitude", location.getLongitude());
Q8.k.N(c0932x0, "altitude", location.getAltitude());
Q8.k.O(c0932x0, "speed", location.getSpeed());
Q8.k.O(c0932x0, "accuracy", location.getAccuracy());
Q8.k.O(c0932x0, "bearing", location.getBearing());
Q8.k.O(c0932x0, "time", location.getTime());
Q8.k.T(c0932x0, "provider", location.getProvider());
return c0932x0;
} catch (InterruptedException | ExecutionException e) {
throw AbstractC0751f.e(e);
}
}
@Override
@ScriptAllowed
@Keep
public XoneMapsViewEmbed removeStreetView(Object... objArr) {
if (Utils.s3()) {
J3();
return this;
}
fa.j.m(new Runnable() {
@Override
public final void run() {
XoneMapsViewEmbed.this.J3();
}
});
return this;
}
@Override
@ScriptAllowed
@Keep
public XoneMapsViewEmbed removeWmsTileOverlay(Object... objArr) {
Utils.g("RemoveWmsTileOverlay", objArr, 1);
K3(fb.t.k(objArr[0], false));
return this;
}
@Override
@ScriptAllowed
@Keep
public XoneMapsViewEmbed showStreetView(Object... objArr) {
Utils.h("ShowStreetView", objArr, 1, 2);
final LatLng f = Ia.a.f(objArr[0]);
if (f == null) {
throw new IllegalArgumentException("ShowStreetView(): Empty location argument");
}
final int u = Utils.u(objArr, 1, 0);
if (Utils.s3()) {
g3(f, u);
return this;
}
fa.j.m(new Runnable() {
@Override
public final void run() {
XoneMapsViewEmbed.this.g3(f, u);
}
});
return this;
}
@ScriptAllowed
@Keep
public C0893d0 addMarker(C0893d0 c0893d0) {
if (c0893d0 == null) {
return new C0893d0(0L);
}
int size = c0893d0.size();
C0893d0 c0893d02 = new C0893d0(size);
for (int i = 0; i < size; i++) {
Q0.putProperty(c0893d02, i, addMarker(Q0.getProperty(c0893d0, i)));
}
return c0893d02;
}
@Override
@ScriptAllowed
@Keep
public MarkerScriptWrapper addMarker(Object... objArr) {
Object obj;
String str;
Boolean bool;
String str2;
double d;
int i;
float f;
int i2;
boolean z;
float f2;
Object obj2;
String str3;
boolean z2;
String str4;
double d2;
boolean z3;
p pVar;
e4.b c;
Utils.j("AddMarker", objArr);
Utils.h("AddMarker", objArr, 1, 2);
InterfaceC1038m0 app = getApp();
String Y = app.Y();
String T = app.T();
String str5 = "";
if (objArr.length == 1) {
C0932x0 c0932x0 = (C0932x0) objArr[0];
double V = Q8.k.V(c0932x0, "latitude");
double V2 = Q8.k.V(c0932x0, "longitude");
String E = Q8.k.E(c0932x0, "title", "");
str = Utils.A0(null, Y, T, Q8.k.E(c0932x0, "icon", ""), false, 2);
int o = Q8.k.o(c0932x0, "width", 0);
int o2 = Q8.k.o(c0932x0, "height", 0);
z = Q8.k.a(c0932x0, "draggable", false);
boolean a2 = Q8.k.a(c0932x0, "persist", true);
boolean a3 = Q8.k.a(c0932x0, "visible", true);
float l = Q8.k.l(c0932x0, "alpha", 1.0f);
f2 = Q8.k.l(c0932x0, "rotation", 0.0f);
Boolean b = Q8.k.b(c0932x0, "flat", null);
String E2 = Q8.k.E(c0932x0, "anchor", "");
Object z4 = Q8.k.z(c0932x0, "tag", null);
Object z5 = Q8.k.z(c0932x0, "onClick", null);
Object z6 = z5 == null ? Q8.k.z(c0932x0, "callback", null) : z5;
f = l;
obj = z6;
i = o;
z2 = a3;
str5 = E;
i2 = o2;
d = V2;
obj2 = z4;
str3 = T;
bool = b;
str4 = Y;
z3 = a2;
d2 = V;
str2 = E2;
} else {
double i3 = fb.q.i(objArr[0], 0.0d);
double i4 = fb.q.i(objArr[1], 0.0d);
obj = null;
str = null;
bool = null;
str2 = "";
d = i4;
i = 0;
f = 1.0f;
i2 = 0;
z = false;
f2 = 0.0f;
obj2 = null;
str3 = T;
z2 = true;
str4 = Y;
d2 = i3;
z3 = true;
}
LatLng latLng = new LatLng(d2, d);
pVar = new p();
if (!TextUtils.isEmpty(str5)) {
pVar.G1(str5);
}
pVar.D1(latLng);
if (!TextUtils.isEmpty(str)) {
File file = new File(str);
if (!file.exists()) {
throw new IllegalArgumentException("AddMarker(): Icon file " + file.getAbsolutePath() + " not found");
}
String absolutePath = file.getAbsolutePath();
if (i != 0 && i2 != 0) {
Bitmap o3 = ha.r.o(absolutePath, i, i2, false);
if (o3 == null) {
throw new IllegalArgumentException("AddMarker(): Cannot decode bitmap " + absolutePath + " with requested width and height");
}
c = e4.c.b(o3);
} else {
c = e4.c.c(absolutePath);
}
pVar.y1(c);
}
pVar.l1(z);
pVar.H1(z2);
pVar.j1(f);
pVar.E1(f2);
if (bool != null) {
pVar.m1(bool.booleanValue());
}
str2.getClass();
switch (str2) {
case "bottom":
pVar.k1(0.5f, 0.0f);
break;
case "center":
pVar.k1(0.5f, 0.5f);
break;
case "top":
pVar.k1(0.5f, 1.0f);
break;
}
Object obj3 = obj2;
o R2 = R2(pVar, obj3);
if (R2 == null) {
throw new NullPointerException("AddMarker(): Error adding marker to map");
}
MarkerScriptWrapper markerScriptWrapper = new MarkerScriptWrapper(R2, pVar, obj3, obj, str4, str3);
if (z3) {
if (this.u0 == null) {
this.u0 = new ConcurrentHashMap();
}
this.u0.put(R2.b(), markerScriptWrapper);
}
return markerScriptWrapper;
}
public void h(o oVar) {
}
}