@braze/web-sdk 6.3.0 → 6.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +35 -3
- package/package.json +1 -1
- package/shared-lib/encoding-utils.js +1 -1
- package/shared-lib/event-types.js +23 -23
- package/shared-lib/guid.js +25 -6
- package/shared-lib/indexed-db-adapter.js +7 -7
- package/shared-lib/logger.js +2 -2
- package/shared-lib/supported-options.js +22 -21
- package/src/Banner/display/banner-to-html.js +2 -2
- package/src/Banner/display/detect-banner-impressions.js +7 -7
- package/src/Banner/index.js +2 -0
- package/src/Banner/request-banners-refresh.js +6 -6
- package/src/Banner/ui/insert-banner.js +4 -4
- package/src/Card/card-manager-factory.js +5 -5
- package/src/Card/card-manager.js +4 -4
- package/src/Card/display/card-display.js +7 -7
- package/src/Card/log-card-dismissal.js +3 -3
- package/src/Card/log-content-card-click.js +3 -3
- package/src/Card/log-content-card-impressions.js +6 -6
- package/src/Card/models/card.js +7 -7
- package/src/Card/util/card-factory.js +6 -6
- package/src/ContentCards/content-cards-provider-factory.js +14 -10
- package/src/ContentCards/content-cards-provider.js +28 -28
- package/src/ContentCards/content-cards.js +4 -4
- package/src/ContentCards/get-cached-content-cards.js +2 -2
- package/src/ContentCards/request-content-cards-refresh.js +2 -2
- package/src/ContentCards/subscribe-to-content-cards-updates.js +3 -3
- package/src/ContentCards/ui/show-content-cards.js +8 -8
- package/src/Core/add-sdk-metadata.js +2 -2
- package/src/Core/change-user.js +5 -5
- package/src/Core/disable-sdk.js +3 -3
- package/src/Core/enable-sdk.js +3 -3
- package/src/Core/get-user.js +1 -1
- package/src/Core/is-disabled.js +1 -1
- package/src/Core/log-custom-event.js +9 -9
- package/src/Core/log-purchase.js +7 -7
- package/src/Core/open-session.js +11 -11
- package/src/Core/set-sdk-authentication-signature.js +2 -2
- package/src/Core/wipe-data.js +5 -5
- package/src/DUST/dust-provider-factory.js +20 -0
- package/src/DUST/dust-provider.js +288 -0
- package/src/DUST/index.js +3 -0
- package/src/DUST/subscribe-to-dust.js +24 -0
- package/src/DUST/types.js +1 -0
- package/src/FeatureFlags/feature-flags-provider-factory.js +9 -9
- package/src/FeatureFlags/feature-flags-provider.js +38 -38
- package/src/FeatureFlags/get-all-feature-flags.js +3 -3
- package/src/FeatureFlags/get-feature-flag.js +3 -3
- package/src/FeatureFlags/log-feature-flag-impression.js +5 -5
- package/src/FeatureFlags/refresh-feature-flags.js +5 -5
- package/src/FeatureFlags/subscribe-to-feature-flags-updates.js +3 -3
- package/src/InAppMessage/defer-in-app-message.js +1 -1
- package/src/InAppMessage/display/html-message-to-html.js +5 -5
- package/src/InAppMessage/display/in-app-message-to-html.js +22 -22
- package/src/InAppMessage/display/modal-utils.js +5 -5
- package/src/InAppMessage/get-deferred-in-app-message.js +1 -1
- package/src/InAppMessage/in-app-message-factory.js +4 -4
- package/src/InAppMessage/in-app-message-manager.js +80 -80
- package/src/InAppMessage/log-in-app-message-button-click.js +5 -5
- package/src/InAppMessage/log-in-app-message-click.js +5 -5
- package/src/InAppMessage/log-in-app-message-html-click.js +5 -5
- package/src/InAppMessage/log-in-app-message-impression.js +1 -1
- package/src/InAppMessage/models/control-message.js +1 -1
- package/src/InAppMessage/models/full-screen-message.js +12 -12
- package/src/InAppMessage/models/html-message.js +14 -14
- package/src/InAppMessage/models/in-app-message-button.js +4 -4
- package/src/InAppMessage/models/in-app-message.js +119 -121
- package/src/InAppMessage/models/modal-message.js +12 -12
- package/src/InAppMessage/models/slide-up-message.js +21 -21
- package/src/InAppMessage/models/templated-in-app-message.js +8 -8
- package/src/InAppMessage/subscribe-to-in-app-message.js +1 -1
- package/src/InAppMessage/ui/automatically-show-in-app-messages.js +3 -3
- package/src/InAppMessage/ui/remove-all-visible-in-app-messages.js +18 -0
- package/src/InAppMessage/ui/show-in-app-message.js +24 -24
- package/src/Push/is-push-blocked.js +2 -2
- package/src/Push/is-push-permission-granted.js +2 -2
- package/src/Push/is-push-supported.js +2 -2
- package/src/Push/push-manager-factory.js +8 -8
- package/src/Push/push-manager.js +90 -90
- package/src/Push/utils/push-utils.js +17 -17
- package/src/User/user-manager.js +12 -12
- package/src/User/user.js +48 -48
- package/src/common/constants.js +1 -0
- package/src/common/content-cards-display.js +20 -20
- package/src/common/event-logger.js +4 -4
- package/src/common/properties-base.js +16 -16
- package/src/l10n/l10n-manager-factory.js +2 -2
- package/src/l10n/l10n-manager.js +1 -1
- package/src/managers/auth-manager.js +29 -29
- package/src/managers/braze-instance.js +141 -133
- package/src/managers/device-manager.js +18 -18
- package/src/managers/network-manager.js +139 -139
- package/src/managers/server-config-manager.js +99 -82
- package/src/managers/session-manager.js +32 -32
- package/src/managers/storage-manager-factory.js +8 -8
- package/src/managers/storage-manager.js +76 -74
- package/src/managers/subscription-manager.js +10 -10
- package/src/models/backend-errors.js +5 -5
- package/src/models/braze-event.js +9 -9
- package/src/models/device.js +2 -2
- package/src/models/identifier.js +12 -12
- package/src/models/push-token.js +12 -12
- package/src/models/request-result.js +1 -1
- package/src/models/server-config.js +38 -34
- package/src/request-controller.js +136 -134
- package/src/triggers/models/custom-event-data.js +4 -4
- package/src/triggers/models/custom-event-property-data.js +5 -5
- package/src/triggers/models/filter-set.js +8 -8
- package/src/triggers/models/filter.js +30 -30
- package/src/triggers/models/in-app-message-click-data.js +1 -1
- package/src/triggers/models/purchase-data.js +1 -1
- package/src/triggers/models/purchase-property-data.js +2 -2
- package/src/triggers/models/push-click-data.js +1 -1
- package/src/triggers/models/trigger-condition.js +36 -36
- package/src/triggers/models/trigger-events.js +2 -2
- package/src/triggers/models/trigger.js +15 -15
- package/src/triggers/triggers-provider-factory.js +3 -3
- package/src/triggers/triggers-provider.js +25 -25
- package/src/ui/js/attach-css.js +3 -3
- package/src/ui/js/load-font-awesome.js +2 -2
- package/src/util/base-device-parser.js +3 -3
- package/src/util/braze-actions.js +3 -3
- package/src/util/browser-detector.js +13 -13
- package/src/util/client-hints-parser.js +6 -6
- package/src/util/component-utils.js +1 -1
- package/src/util/dom-utils.js +10 -10
- package/src/util/key-codes.js +1 -1
- package/src/util/net.js +1 -1
- package/src/util/request-header-utils.js +22 -22
- package/src/util/user-agent-parser.js +14 -14
- package/src/util/validation-utils.js +14 -13
- package/src/util/window-utils.js +1 -1
|
@@ -7,142 +7,159 @@ export default class Vt {
|
|
|
7
7
|
constructor(t) {
|
|
8
8
|
(this.j = t),
|
|
9
9
|
(this.j = t),
|
|
10
|
-
(this.
|
|
11
|
-
(this.
|
|
12
|
-
(this.
|
|
13
|
-
(this.
|
|
14
|
-
(this.
|
|
15
|
-
(this.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
10
|
+
(this.El = new u()),
|
|
11
|
+
(this.wl = new u()),
|
|
12
|
+
(this.Cl = new u()),
|
|
13
|
+
(this.yl = new u()),
|
|
14
|
+
(this.Ll = new u()),
|
|
15
|
+
(this.Tl = null),
|
|
16
|
+
(this.Bl = null);
|
|
17
|
+
}
|
|
18
|
+
Fl() {
|
|
19
|
+
if (null == this.Bl) {
|
|
20
|
+
const t = this.j.lt(s.ct.jl);
|
|
21
|
+
this.Bl = null != t ? ni.Vo(t) : new ni();
|
|
21
22
|
}
|
|
22
|
-
return this.
|
|
23
|
+
return this.Bl;
|
|
23
24
|
}
|
|
24
25
|
Ft() {
|
|
25
|
-
return this.
|
|
26
|
+
return this.Fl().Dl;
|
|
26
27
|
}
|
|
27
|
-
|
|
28
|
-
var i, e;
|
|
28
|
+
Nl(t) {
|
|
29
|
+
var i, e, n, r;
|
|
29
30
|
if (null != t && null != t.config) {
|
|
30
|
-
const
|
|
31
|
-
if (
|
|
32
|
-
const t = (t) => (null == t ? this.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
t(
|
|
43
|
-
|
|
31
|
+
const l = t.config;
|
|
32
|
+
if (l.time > this.Fl().Dl) {
|
|
33
|
+
const t = (t) => (null == t ? this.Fl().kl : t),
|
|
34
|
+
u = new ni(
|
|
35
|
+
l.time,
|
|
36
|
+
l.events_blacklist,
|
|
37
|
+
l.attributes_blacklist,
|
|
38
|
+
l.purchases_blacklist,
|
|
39
|
+
l.messaging_session_timeout,
|
|
40
|
+
l.vapid_public_key,
|
|
41
|
+
l.content_cards,
|
|
42
|
+
l.feature_flags,
|
|
43
|
+
t(l.global_request_rate_limit),
|
|
44
|
+
l.banners,
|
|
45
|
+
l.dust,
|
|
44
46
|
);
|
|
45
|
-
let l = !1;
|
|
46
|
-
null != r.dl && this.Wn() !== r.dl && (l = !0);
|
|
47
|
-
let u = !1;
|
|
48
|
-
null != r.gl.enabled && this.gi() !== r.gl.enabled && (u = !0);
|
|
49
47
|
let a = !1;
|
|
50
|
-
null !=
|
|
48
|
+
null != u.xl && this.Zn() !== u.xl && (a = !0);
|
|
51
49
|
let h = !1;
|
|
50
|
+
null != u.Gl.enabled && this.wi() !== u.Gl.enabled && (h = !0);
|
|
51
|
+
let o = !1;
|
|
52
|
+
null != u.je.enabled && this.Te() !== u.je.enabled && (o = !0);
|
|
53
|
+
let d = !1;
|
|
52
54
|
null !=
|
|
53
|
-
(null === (i =
|
|
55
|
+
(null === (i = u.banners) || void 0 === i ? void 0 : i.enabled) &&
|
|
54
56
|
this.Dt() !==
|
|
55
|
-
(null === (e =
|
|
56
|
-
(
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
(null === (e = u.banners) || void 0 === e ? void 0 : e.enabled) &&
|
|
58
|
+
(d = !0);
|
|
59
|
+
let c = !1;
|
|
60
|
+
null != (null === (n = u.dust) || void 0 === n ? void 0 : n.enabled) &&
|
|
61
|
+
this.Xi() !==
|
|
62
|
+
(null === (r = u.dust) || void 0 === r ? void 0 : r.enabled) &&
|
|
63
|
+
(c = !0),
|
|
64
|
+
(this.Bl = u),
|
|
65
|
+
this.j.ft(s.ct.jl, u.dt()),
|
|
66
|
+
a && this.El.L(),
|
|
67
|
+
h && this.wl.L(),
|
|
68
|
+
o && this.Cl.L(),
|
|
69
|
+
d && this.yl.L(),
|
|
70
|
+
c && this.Ll.L();
|
|
63
71
|
}
|
|
64
72
|
}
|
|
65
73
|
}
|
|
66
|
-
|
|
67
|
-
const i = this.
|
|
68
|
-
return this.
|
|
74
|
+
$n(t) {
|
|
75
|
+
const i = this.El.wt(t);
|
|
76
|
+
return this.Tl && this.El.removeSubscription(this.Tl), (this.Tl = i), i;
|
|
69
77
|
}
|
|
70
|
-
|
|
71
|
-
return this.
|
|
78
|
+
bi(t) {
|
|
79
|
+
return this.wl.wt(t);
|
|
72
80
|
}
|
|
73
|
-
|
|
74
|
-
return this.
|
|
81
|
+
$e(t) {
|
|
82
|
+
return this.Cl.wt(t);
|
|
75
83
|
}
|
|
76
84
|
P(t) {
|
|
77
|
-
return this.
|
|
85
|
+
return this.yl.wt(t);
|
|
86
|
+
}
|
|
87
|
+
Tr(t) {
|
|
88
|
+
return this.Ll.wt(t);
|
|
78
89
|
}
|
|
79
90
|
ge(t) {
|
|
80
|
-
return -1 !== this.
|
|
91
|
+
return -1 !== this.Fl().Il.indexOf(t);
|
|
81
92
|
}
|
|
82
93
|
hu(t) {
|
|
83
|
-
return -1 !== this.
|
|
94
|
+
return -1 !== this.Fl().Ml.indexOf(t);
|
|
84
95
|
}
|
|
85
96
|
Dr(t) {
|
|
86
|
-
return -1 !== this.
|
|
97
|
+
return -1 !== this.Fl().Sl.indexOf(t);
|
|
87
98
|
}
|
|
88
|
-
|
|
89
|
-
return this.
|
|
99
|
+
Kl() {
|
|
100
|
+
return this.Fl().Pl;
|
|
90
101
|
}
|
|
91
|
-
|
|
92
|
-
return this.
|
|
102
|
+
Zn() {
|
|
103
|
+
return this.Fl().xl;
|
|
93
104
|
}
|
|
94
|
-
|
|
95
|
-
return this.
|
|
105
|
+
wi() {
|
|
106
|
+
return this.Fl().Gl.enabled || !1;
|
|
96
107
|
}
|
|
97
|
-
|
|
98
|
-
const t = this.
|
|
108
|
+
_l() {
|
|
109
|
+
const t = this.Fl().kl;
|
|
99
110
|
return !(!t || null == t.enabled) && t.enabled;
|
|
100
111
|
}
|
|
101
|
-
|
|
102
|
-
if (!this.
|
|
103
|
-
const t = this.
|
|
112
|
+
Rl() {
|
|
113
|
+
if (!this._l()) return -1;
|
|
114
|
+
const t = this.Fl().kl;
|
|
104
115
|
return null == t.capacity || t.capacity < 10 ? -1 : t.capacity;
|
|
105
116
|
}
|
|
106
|
-
|
|
107
|
-
if (!this.
|
|
108
|
-
const t = this.
|
|
117
|
+
gl() {
|
|
118
|
+
if (!this._l()) return -1;
|
|
119
|
+
const t = this.Fl().kl;
|
|
109
120
|
return null == t.refill_rate || t.refill_rate <= 0 ? -1 : t.refill_rate;
|
|
110
121
|
}
|
|
111
|
-
|
|
112
|
-
const i = this.
|
|
122
|
+
Al(t) {
|
|
123
|
+
const i = this.Fl().kl.endpoint_overrides;
|
|
113
124
|
return null == i ? null : i[t];
|
|
114
125
|
}
|
|
115
|
-
|
|
116
|
-
const i = this.
|
|
126
|
+
bl(t) {
|
|
127
|
+
const i = this.Al(t);
|
|
117
128
|
return null == i || isNaN(i.capacity) || i.capacity <= 0 ? -1 : i.capacity;
|
|
118
129
|
}
|
|
119
|
-
|
|
120
|
-
const i = this.
|
|
130
|
+
ql(t) {
|
|
131
|
+
const i = this.Al(t);
|
|
121
132
|
return null == i || isNaN(i.refill_rate) || i.refill_rate <= 0
|
|
122
133
|
? -1
|
|
123
134
|
: i.refill_rate;
|
|
124
135
|
}
|
|
125
|
-
|
|
126
|
-
return this.
|
|
127
|
-
? (c.rt(m.
|
|
128
|
-
: this.
|
|
136
|
+
Te() {
|
|
137
|
+
return this.Fl().je.enabled && null == this.Be()
|
|
138
|
+
? (c.rt(m.ju, { e: "Missing feature flag refresh_rate_limit." }), !1)
|
|
139
|
+
: this.Fl().je.enabled || !1;
|
|
129
140
|
}
|
|
130
|
-
|
|
131
|
-
return this.
|
|
141
|
+
Be() {
|
|
142
|
+
return this.Fl().je.refresh_rate_limit;
|
|
132
143
|
}
|
|
133
144
|
Dt() {
|
|
134
145
|
var t;
|
|
135
146
|
return (
|
|
136
|
-
(null === (t = this.
|
|
147
|
+
(null === (t = this.Fl().banners) || void 0 === t ? void 0 : t.enabled) ||
|
|
137
148
|
null
|
|
138
149
|
);
|
|
139
150
|
}
|
|
140
151
|
te() {
|
|
141
152
|
var t;
|
|
142
153
|
return (
|
|
143
|
-
(null === (t = this.
|
|
154
|
+
(null === (t = this.Fl().banners) || void 0 === t
|
|
144
155
|
? void 0
|
|
145
156
|
: t.max_placements) || 0
|
|
146
157
|
);
|
|
147
158
|
}
|
|
159
|
+
Xi() {
|
|
160
|
+
var t;
|
|
161
|
+
return (
|
|
162
|
+
(null === (t = this.Fl().dust) || void 0 === t ? void 0 : t.enabled) || !1
|
|
163
|
+
);
|
|
164
|
+
}
|
|
148
165
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { STORAGE_KEYS as s } from "../managers/storage-manager.js";
|
|
2
2
|
import ue from "../models/braze-event.js";
|
|
3
3
|
import _t from "../models/identifier.js";
|
|
4
|
-
import { convertMsToSeconds as
|
|
4
|
+
import { convertMsToSeconds as P } from "../util/date-utils.js";
|
|
5
5
|
import {
|
|
6
6
|
logger as E,
|
|
7
|
-
Guid as
|
|
7
|
+
Guid as L,
|
|
8
8
|
EventTypes as m,
|
|
9
9
|
} from "../../shared-lib/index.js";
|
|
10
10
|
export default class Kt {
|
|
@@ -12,64 +12,64 @@ export default class Kt {
|
|
|
12
12
|
(this.j = s),
|
|
13
13
|
(this.Cs = t),
|
|
14
14
|
(this.h = i),
|
|
15
|
-
(this.
|
|
15
|
+
(this.zl = e),
|
|
16
16
|
(this.j = s),
|
|
17
17
|
(this.Cs = t),
|
|
18
18
|
(this.h = i),
|
|
19
|
-
(this.
|
|
19
|
+
(this.Hl = 1e3),
|
|
20
20
|
(null == e || isNaN(e)) && (e = 1800),
|
|
21
|
-
e < this.
|
|
21
|
+
e < this.Hl / 1e3 &&
|
|
22
22
|
(E.info(
|
|
23
23
|
"Specified session timeout of " +
|
|
24
24
|
e +
|
|
25
25
|
"s is too small, using the minimum session timeout of " +
|
|
26
|
-
this.
|
|
26
|
+
this.Hl / 1e3 +
|
|
27
27
|
"s instead.",
|
|
28
28
|
),
|
|
29
|
-
(e = this.
|
|
30
|
-
(this.
|
|
29
|
+
(e = this.Hl / 1e3)),
|
|
30
|
+
(this.zl = e);
|
|
31
31
|
}
|
|
32
|
-
|
|
33
|
-
return new ue(this.Cs.getUserId(), m.
|
|
32
|
+
Wl(s, t) {
|
|
33
|
+
return new ue(this.Cs.getUserId(), m.Jl, s, t.eu, { d: P(s - t.Ol) });
|
|
34
34
|
}
|
|
35
35
|
bt() {
|
|
36
|
-
const t = this.j.tu(s.iu.
|
|
36
|
+
const t = this.j.tu(s.iu.Ql);
|
|
37
37
|
return null == t ? null : t.eu;
|
|
38
38
|
}
|
|
39
|
-
|
|
39
|
+
Ul() {
|
|
40
40
|
const t = new Date().valueOf(),
|
|
41
|
-
i = this.h.
|
|
41
|
+
i = this.h.Kl();
|
|
42
42
|
if (null == i) return !1;
|
|
43
|
-
const e = this.j.lt(s.ct.
|
|
43
|
+
const e = this.j.lt(s.ct.Vl),
|
|
44
44
|
n = null == e || t - e > 1e3 * i;
|
|
45
|
-
return n && this.j.ft(s.ct.
|
|
45
|
+
return n && this.j.ft(s.ct.Vl, t), n;
|
|
46
46
|
}
|
|
47
|
-
|
|
48
|
-
return null == t || null == t.
|
|
47
|
+
Xl(s, t) {
|
|
48
|
+
return null == t || null == t.Yl || (!(s - t.Ol < this.Hl) && t.Yl < s);
|
|
49
49
|
}
|
|
50
|
-
|
|
50
|
+
Fo() {
|
|
51
51
|
const t = new Date().valueOf(),
|
|
52
|
-
i = t + 1e3 * this.
|
|
53
|
-
e = this.j.tu(s.iu.
|
|
54
|
-
if (this.
|
|
52
|
+
i = t + 1e3 * this.zl,
|
|
53
|
+
e = this.j.tu(s.iu.Ql);
|
|
54
|
+
if (this.Xl(t, e)) {
|
|
55
55
|
let n = "Generating session start event with time " + t;
|
|
56
56
|
if (null != e) {
|
|
57
|
-
let s = e.
|
|
58
|
-
s - e.
|
|
59
|
-
this.j
|
|
57
|
+
let s = e.Zl;
|
|
58
|
+
s - e.Ol < this.Hl && (s = e.Ol + this.Hl),
|
|
59
|
+
this.j.$l(this.Wl(s, e)),
|
|
60
60
|
(n += " (old session ended " + s + ")");
|
|
61
61
|
}
|
|
62
62
|
(n += ". Will expire " + i.valueOf()), E.info(n);
|
|
63
|
-
const o = new _t(
|
|
64
|
-
this.j
|
|
65
|
-
this.j.uu(s.iu.
|
|
66
|
-
return null == this.j.lt(s.ct.
|
|
63
|
+
const o = new _t(L.oe(), i);
|
|
64
|
+
this.j.$l(new ue(this.Cs.getUserId(), m.sm, t, o.eu)),
|
|
65
|
+
this.j.uu(s.iu.Ql, o);
|
|
66
|
+
return null == this.j.lt(s.ct.Vl) && this.j.ft(s.ct.Vl, t), o.eu;
|
|
67
67
|
}
|
|
68
|
-
if (null != e) return (e.
|
|
68
|
+
if (null != e) return (e.Zl = t), (e.Yl = i), this.j.uu(s.iu.Ql, e), e.eu;
|
|
69
69
|
}
|
|
70
|
-
|
|
71
|
-
const t = this.j.tu(s.iu.
|
|
70
|
+
tm() {
|
|
71
|
+
const t = this.j.tu(s.iu.Ql);
|
|
72
72
|
null != t &&
|
|
73
|
-
(this.j.
|
|
73
|
+
(this.j.im(s.iu.Ql), this.j.$l(this.Wl(new Date().valueOf(), t)));
|
|
74
74
|
}
|
|
75
75
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import ee, { STORAGE_KEYS as s } from "./storage-manager.js";
|
|
2
2
|
import { logger as E } from "../../shared-lib/index.js";
|
|
3
3
|
const Gt = {
|
|
4
|
-
|
|
4
|
+
Ya: function (e, o = !1) {
|
|
5
5
|
let t = !1;
|
|
6
6
|
try {
|
|
7
7
|
if (localStorage && localStorage.getItem)
|
|
8
8
|
try {
|
|
9
|
-
localStorage.setItem(s.ct.
|
|
10
|
-
localStorage.getItem(s.ct.
|
|
11
|
-
(localStorage.removeItem(s.ct.
|
|
9
|
+
localStorage.setItem(s.ct.lc, "true"),
|
|
10
|
+
localStorage.getItem(s.ct.lc) &&
|
|
11
|
+
(localStorage.removeItem(s.ct.lc), (t = !0));
|
|
12
12
|
} catch (e) {
|
|
13
13
|
if (
|
|
14
14
|
!(
|
|
@@ -24,12 +24,12 @@ const Gt = {
|
|
|
24
24
|
} catch (e) {
|
|
25
25
|
E.info("Local Storage not supported!");
|
|
26
26
|
}
|
|
27
|
-
const r = Gt.
|
|
28
|
-
a = new ee.
|
|
27
|
+
const r = Gt.gc(),
|
|
28
|
+
a = new ee.uc(e, r && !o, t);
|
|
29
29
|
let n;
|
|
30
|
-
return (n = t ? new ee.
|
|
30
|
+
return (n = t ? new ee.dc(e) : new ee.mc()), new ee(a, n);
|
|
31
31
|
},
|
|
32
|
-
|
|
32
|
+
gc: function () {
|
|
33
33
|
return (
|
|
34
34
|
navigator.cookieEnabled ||
|
|
35
35
|
("cookie" in document &&
|