@braze/web-sdk
Version:
Braze SDK for web sites and other JS platforms.
62 lines (61 loc) • 1.25 kB
JavaScript
import {
GLOBAL_RATE_LIMIT_CAPACITY_DEFAULT as hi,
GLOBAL_RATE_LIMIT_REFILL_RATE_DEFAULT as li,
} from "../common/constants.js";
export default class ni {
constructor(
t = 0,
i = [],
s = [],
h = [],
e = null,
l = null,
r = { enabled: !1 },
a = { enabled: !1, refresh_rate_limit: void 0 },
n = { enabled: !0, capacity: hi, refill_rate: li, endpoint_overrides: {} },
o = null,
) {
(this.bu = t),
(this.Cu = i),
(this.Eu = s),
(this.wu = h),
(this.Lu = e),
(this.pu = l),
(this.Ru = r),
(this.De = a),
(this.vu = n),
(this.banners = o),
(this.bu = t),
(this.Cu = i),
(this.Eu = s),
(this.wu = h),
(this.Lu = e),
(this.pu = l),
(this.Ru = r),
(this.De = a),
(this.vu = n),
(this.banners = o);
}
bt() {
return {
s: "6.0.0",
l: this.bu,
e: this.Cu,
a: this.Eu,
p: this.wu,
m: this.Lu,
v: this.pu,
c: this.Ru,
f: this.De,
grl: this.vu,
b: this.banners,
};
}
static zn(t) {
let i = t.l;
return (
"6.0.0" !== t.s && (i = 0),
new ni(i, t.e, t.a, t.p, t.m, t.v, t.c, t.f, t.grl, t.b)
);
}
}