@braze/web-sdk
Version:
Braze SDK for web sites and other JS platforms.
26 lines (25 loc) • 610 B
JavaScript
import ri from "./trigger-condition.js";
export default class ui {
constructor(t, i) {
(this.if = t), (this.rf = i), (this.if = t), (this.rf = i);
}
xc(t) {
if (null == this.if) return !1;
const i = ri.sf(t[0], this.if);
if (!i) return !1;
let r = null == this.rf || 0 === this.rf.length;
if (null != this.rf)
for (let i = 0; i < this.rf.length; i++)
if (this.rf[i] === t[1]) {
r = !0;
break;
}
return i && r;
}
static fromJson(t) {
return new ui(t ? t.id : null, t ? t.buttons : null);
}
dt() {
return this.if;
}
}