package com.bytedance.sdk.openadsdk.yz;

import org.json.JSONObject;

/* JADX INFO: loaded from: classes2.dex */
public class wsy {
    private long fm;
    private long jnr;

    /* JADX INFO: renamed from: lb, reason: collision with root package name */
    private long f7682lb;
    private long ro;
    private long yz;

    public void fm(long j10) {
        if (this.fm <= 0) {
            this.fm = j10;
        }
    }

    public void jnr(long j10) {
        if (this.jnr <= 0) {
            this.jnr = j10;
        }
    }

    public void lb(long j10) {
        if (this.f7682lb <= 0) {
            this.f7682lb = j10;
        }
    }

    public void ro(long j10) {
        if (this.ro <= 0) {
            this.ro = j10;
        }
    }

    public void yz(long j10) {
        if (this.yz <= 0) {
            this.yz = j10;
        }
    }

    public boolean fm() {
        return this.fm > 0;
    }

    public JSONObject ro() {
        return fm((JSONObject) null);
    }

    public void fm(long j10, float f10) {
        if (f10 > 0.0f) {
            fm(j10);
        }
        double d10 = f10;
        if (d10 >= 0.25d) {
            fm(j10);
            ro(j10);
        }
        if (d10 >= 0.5d) {
            fm(j10);
            ro(j10);
            lb(j10);
        }
        if (d10 >= 0.75d) {
            fm(j10);
            ro(j10);
            lb(j10);
            yz(j10);
        }
        if (f10 >= 1.0f) {
            fm(j10);
            ro(j10);
            lb(j10);
            yz(j10);
            jnr(j10);
        }
    }

    public JSONObject fm(JSONObject jSONObject) {
        if (jSONObject == null) {
            try {
                jSONObject = new JSONObject();
            } catch (Exception unused) {
            }
        }
        long j10 = this.fm;
        if (j10 > 0) {
            jSONObject.put("show_start", j10);
            long j11 = this.ro;
            if (j11 > 0) {
                jSONObject.put("show_firstQuartile", j11);
                long j12 = this.f7682lb;
                if (j12 > 0) {
                    jSONObject.put("show_mid", j12);
                    long j13 = this.yz;
                    if (j13 > 0) {
                        jSONObject.put("show_thirdQuartile", j13);
                        long j14 = this.jnr;
                        if (j14 > 0) {
                            jSONObject.put("show_full", j14);
                        }
                    }
                }
            }
        }
        return jSONObject;
    }
}
