@braze/web-sdk 4.3.0 → 4.5.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.
Files changed (178) hide show
  1. package/index.d.ts +68 -6
  2. package/package.json +1 -1
  3. package/shared-lib/braze-shared-lib.js +8 -1
  4. package/shared-lib/encoding-utils.js +12 -1
  5. package/shared-lib/event-types.js +32 -1
  6. package/shared-lib/guid.js +10 -1
  7. package/shared-lib/indexed-db-adapter.js +315 -1
  8. package/shared-lib/logger.js +38 -1
  9. package/shared-lib/supported-options.js +26 -1
  10. package/src/Card/card-manager-factory.js +14 -1
  11. package/src/Card/card-manager.js +72 -1
  12. package/src/Card/display/card-display.js +134 -1
  13. package/src/Card/index.js +5 -1
  14. package/src/Card/log-card-click.js +11 -1
  15. package/src/Card/log-card-dismissal.js +11 -1
  16. package/src/Card/log-card-impressions.js +13 -1
  17. package/src/Card/log-content-card-impressions.js +4 -1
  18. package/src/Card/models/banner.js +30 -1
  19. package/src/Card/models/captioned-image.js +32 -1
  20. package/src/Card/models/card.js +175 -1
  21. package/src/Card/models/classic-card.js +32 -1
  22. package/src/Card/models/control-card.js +39 -1
  23. package/src/Card/models/index.js +5 -1
  24. package/src/Card/util/card-factory.js +104 -1
  25. package/src/ContentCards/content-cards-provider-factory.js +20 -1
  26. package/src/ContentCards/content-cards-provider.js +283 -1
  27. package/src/ContentCards/content-cards.js +24 -1
  28. package/src/ContentCards/get-cached-content-cards.js +5 -1
  29. package/src/ContentCards/index.js +8 -1
  30. package/src/ContentCards/log-content-cards-displayed.js +5 -1
  31. package/src/ContentCards/request-content-cards-refresh.js +5 -1
  32. package/src/ContentCards/subscribe-to-content-cards-updates.js +14 -1
  33. package/src/ContentCards/ui/hide-content-cards.js +8 -1
  34. package/src/ContentCards/ui/show-content-cards.js +72 -1
  35. package/src/ContentCards/ui/toggle-content-cards.js +8 -1
  36. package/src/Core/add-sdk-metadata.js +27 -1
  37. package/src/Core/braze-sdk-metadata.js +10 -1
  38. package/src/Core/change-user.js +19 -1
  39. package/src/Core/destroy.js +5 -1
  40. package/src/Core/device-properties.js +9 -1
  41. package/src/Core/disable-sdk.js +10 -1
  42. package/src/Core/enable-sdk.js +8 -1
  43. package/src/Core/get-device-id.js +10 -1
  44. package/src/Core/get-user.js +4 -1
  45. package/src/Core/handle-braze-action.js +64 -1
  46. package/src/Core/index.js +23 -1
  47. package/src/Core/initialize.js +4 -1
  48. package/src/Core/is-disabled.js +4 -1
  49. package/src/Core/log-custom-event.js +36 -1
  50. package/src/Core/log-purchase.js +245 -1
  51. package/src/Core/open-session.js +23 -1
  52. package/src/Core/remove-all-subscriptions.js +4 -1
  53. package/src/Core/remove-subscription.js +4 -1
  54. package/src/Core/request-immediate-data-flush.js +4 -1
  55. package/src/Core/set-logger.js +4 -1
  56. package/src/Core/set-sdk-authentication-signature.js +9 -1
  57. package/src/Core/subscribe-to-sdk-authentication-failures.js +4 -1
  58. package/src/Core/toggle-logging.js +4 -1
  59. package/src/Core/wipe-data.js +15 -1
  60. package/src/FeatureFlags/feature-flag-factory.js +14 -0
  61. package/src/FeatureFlags/feature-flag.js +16 -0
  62. package/src/FeatureFlags/feature-flags-provider-factory.js +19 -0
  63. package/src/FeatureFlags/feature-flags-provider.js +94 -0
  64. package/src/FeatureFlags/get-all-feature-flags.js +12 -0
  65. package/src/FeatureFlags/get-feature-flag.js +12 -0
  66. package/src/FeatureFlags/index.js +4 -0
  67. package/src/FeatureFlags/refresh-feature-flags.js +9 -0
  68. package/src/FeatureFlags/subscribe-to-feature-flags-updates.js +6 -0
  69. package/src/Feed/feed-provider-factory.js +18 -1
  70. package/src/Feed/feed-provider.js +79 -1
  71. package/src/Feed/feed.js +20 -1
  72. package/src/Feed/get-cached-feed.js +5 -1
  73. package/src/Feed/index.js +8 -1
  74. package/src/Feed/log-feed-displayed.js +5 -1
  75. package/src/Feed/request-feed-refresh.js +5 -1
  76. package/src/Feed/subscribe-to-feed-updates.js +5 -1
  77. package/src/Feed/ui/hide-feed.js +7 -1
  78. package/src/Feed/ui/show-feed.js +89 -1
  79. package/src/Feed/ui/toggle-feed.js +8 -1
  80. package/src/InAppMessage/display/get-animation-effect.js +19 -1
  81. package/src/InAppMessage/display/html-message-to-html.js +223 -1
  82. package/src/InAppMessage/display/in-app-message-to-html.js +152 -1
  83. package/src/InAppMessage/display/modal-utils.js +68 -1
  84. package/src/InAppMessage/in-app-message-factory.js +145 -1
  85. package/src/InAppMessage/in-app-message-manager-factory.js +16 -1
  86. package/src/InAppMessage/in-app-message-manager.js +189 -1
  87. package/src/InAppMessage/index.js +14 -1
  88. package/src/InAppMessage/log-in-app-message-button-click.js +19 -1
  89. package/src/InAppMessage/log-in-app-message-click.js +19 -1
  90. package/src/InAppMessage/log-in-app-message-html-click.js +23 -1
  91. package/src/InAppMessage/log-in-app-message-impression.js +13 -1
  92. package/src/InAppMessage/models/control-message.js +8 -1
  93. package/src/InAppMessage/models/full-screen-message.js +71 -1
  94. package/src/InAppMessage/models/html-message.js +54 -1
  95. package/src/InAppMessage/models/in-app-message-button.js +40 -1
  96. package/src/InAppMessage/models/in-app-message.js +271 -1
  97. package/src/InAppMessage/models/modal-message.js +68 -1
  98. package/src/InAppMessage/models/slide-up-message.js +58 -1
  99. package/src/InAppMessage/models/templated-in-app-message.js +14 -1
  100. package/src/InAppMessage/subscribe-to-in-app-message.js +10 -1
  101. package/src/InAppMessage/ui/automatically-show-in-app-messages.js +15 -1
  102. package/src/InAppMessage/ui/show-in-app-message.js +170 -1
  103. package/src/Push/index.js +5 -1
  104. package/src/Push/is-push-blocked.js +5 -1
  105. package/src/Push/is-push-permission-granted.js +5 -1
  106. package/src/Push/is-push-supported.js +5 -1
  107. package/src/Push/push-manager-factory.js +30 -1
  108. package/src/Push/push-manager.js +360 -1
  109. package/src/Push/request-push-permission.js +8 -1
  110. package/src/Push/unregister-push.js +5 -1
  111. package/src/Push/utils/push-utils.js +34 -1
  112. package/src/User/index.js +1 -1
  113. package/src/User/user-manager.js +70 -1
  114. package/src/User/user.js +278 -1
  115. package/src/common/base-feed.js +25 -1
  116. package/src/common/base-provider.js +6 -1
  117. package/src/common/constants.js +5 -1
  118. package/src/common/event-logger.js +24 -1
  119. package/src/common/feed-display.js +200 -1
  120. package/src/common/translations.js +148 -1
  121. package/src/index.js +9 -1
  122. package/src/l10n/l10n-manager-factory.js +22 -1
  123. package/src/l10n/l10n-manager.js +21 -1
  124. package/src/managers/auth-manager.js +48 -1
  125. package/src/managers/braze-instance.js +307 -1
  126. package/src/managers/device-manager.js +80 -1
  127. package/src/managers/network-manager.js +219 -1
  128. package/src/managers/server-config-manager.js +88 -1
  129. package/src/managers/session-manager.js +68 -1
  130. package/src/managers/storage-manager-factory.js +35 -1
  131. package/src/managers/storage-manager.js +394 -1
  132. package/src/managers/subscription-manager.js +25 -1
  133. package/src/models/backend-errors.js +8 -1
  134. package/src/models/braze-event.js +41 -1
  135. package/src/models/braze-sdk-metadata.js +10 -1
  136. package/src/models/device.js +26 -1
  137. package/src/models/identifier.js +20 -1
  138. package/src/models/push-token.js +22 -1
  139. package/src/models/request-result.js +8 -1
  140. package/src/models/server-config.js +32 -1
  141. package/src/request-controller.js +288 -1
  142. package/src/triggers/models/custom-event-data.js +14 -1
  143. package/src/triggers/models/custom-event-property-data.js +21 -1
  144. package/src/triggers/models/filter-set.js +55 -1
  145. package/src/triggers/models/filter.js +98 -1
  146. package/src/triggers/models/in-app-message-click-data.js +25 -1
  147. package/src/triggers/models/purchase-data.js +14 -1
  148. package/src/triggers/models/purchase-property-data.js +21 -1
  149. package/src/triggers/models/push-click-data.js +15 -1
  150. package/src/triggers/models/trigger-condition.js +109 -1
  151. package/src/triggers/models/trigger-events.js +8 -1
  152. package/src/triggers/models/trigger.js +110 -1
  153. package/src/triggers/triggers-provider-factory.js +30 -1
  154. package/src/triggers/triggers-provider.js +307 -1
  155. package/src/ui/js/attach-css.js +12 -1
  156. package/src/ui/js/feed-css.js +12 -1
  157. package/src/ui/js/iam-css.js +12 -1
  158. package/src/ui/js/index.js +3 -1
  159. package/src/ui/js/load-font-awesome.js +13 -1
  160. package/src/util/base-device-parser.js +14 -1
  161. package/src/util/braze-actions.js +79 -1
  162. package/src/util/browser-detector.js +85 -1
  163. package/src/util/client-hints-parser.js +60 -1
  164. package/src/util/code-utils.js +92 -1
  165. package/src/util/color-utils.js +23 -1
  166. package/src/util/component-utils.js +26 -1
  167. package/src/util/date-utils.js +27 -1
  168. package/src/util/deprecation-utils.js +5 -1
  169. package/src/util/device-constants.js +14 -1
  170. package/src/util/dom-utils.js +87 -1
  171. package/src/util/key-codes.js +1 -1
  172. package/src/util/math.js +5 -1
  173. package/src/util/net.js +75 -1
  174. package/src/util/string-utils.js +22 -1
  175. package/src/util/url-utils.js +23 -1
  176. package/src/util/user-agent-parser.js +85 -1
  177. package/src/util/validation-utils.js +136 -1
  178. package/src/util/window-utils.js +35 -1
@@ -1 +1,288 @@
1
- import b from"./util/net.js";import ue from"./models/braze-event.js";import s from"./common/event-logger.js";import{randomInclusive as lt}from"./util/math.js";import t from"./models/request-result.js";import r from"../shared-lib/braze-shared-lib.js";import{STORAGE_KEYS as o}from"./managers/storage-manager.js";import u from"./managers/subscription-manager.js";import ht from"./Push/utils/push-utils.js";export default class Ot{constructor(t,s,i,e,n,l,h,o,r,a){this.Ji=t,this.yo=s,this.kl=0,this.yl=h.Ba(),this.Sl=null,this.j=i,this.Qi=e,this.v=n,this.gt=l,this.h=h,this.Bo=r,this.vt=a,this.$l=o,this.Al=new u,this._l=50}ql(t,s){return!t&&!s&&this.Bo.Qn()>=this._l}Dl(t){let s=this.j.hh();if(t.length>0){const i=this.v.getUserId();for(const e of t){const t=!e.userId&&!i||e.userId===i;e.type===r.A.ph&&t&&(s=!0)}}return s}Ll(t,s,i,e,n,l,h){null==i&&(i=!0),i&&this.Pl();const u=this.h.Ca(),a=this.h.Ua();let c=!1;const m=(t,s)=>{let h=!1;b.Hs({url:this.yo+"/data/",data:t,headers:s,S:i=>{null!=t.respond_with&&t.respond_with.triggers&&(this.kl=Math.max(this.kl-1,0)),this.vt.Os(t,i,s)?(this.Bo.Qs(),this.gt.al(i),null!=t.respond_with&&t.respond_with.user_id!=this.v.getUserId()||(null!=t.device&&this.h.B(o.q.Ho,t.device),null!=t.sdk_metadata&&(this.h.B(o.q.Yo,t.sdk_metadata),this.h.B(o.q.Zo,this.j.Vo())),this.$l(i),"function"==typeof e&&e())):i.auth_error&&(h=!0)},error:()=>{null!=t.respond_with&&t.respond_with.triggers&&(this.kl=Math.max(this.kl-1,0)),this.vt.sa(t.events,t.attributes),"function"==typeof n&&n()},Rl:t=>{if("function"==typeof l&&l(t),i&&!c){if(t&&!h)this.Ml();else{let t=this.Sl;(null==t||t<1e3*this.yl)&&(t=1e3*this.yl),this.Ml(Math.min(3e5,lt(1e3*this.yl,3*t)))}c=!0}}})},d=this.Dl(u),f=s||d;if(this.ql(h,d))return void r.D.info("Declining to flush data due to 50 consecutive authentication failures");if(i&&!this.vt.fa(u,a,t,f))return this.Ml(),void("function"==typeof l&&l(!0));const g=this.vt.ma(t,f,u,a);f&&this.kl++;let p=!1;if(g)for(const t of g)this.vt.Gs(t.requestData,(()=>m(t.requestData,t.headers))),p=!0;this.Bo.Gn()&&i&&!p?this.Ml():d&&(r.D.info("Invoking new session subscriptions"),this.Al.St())}Il(){return this.kl>0}Ml(t){this.Nl||(null==t&&(t=1e3*this.yl),this.Pl(),this.Ol=setTimeout((()=>{if(document.hidden){const t="visibilitychange",s=()=>{document.hidden||(document.removeEventListener(t,s,!1),this.Ll())};document.addEventListener(t,s,!1)}else this.Ll()}),t),this.Sl=t)}Pl(){null!=this.Ol&&(clearTimeout(this.Ol),this.Ol=null)}initialize(){this.Nl=!1,this.Ml()}destroy(){this.Al.removeAllSubscriptions(),this.Bo.On(),this.Pl(),this.Nl=!0,this.Ll(null,null,!1),this.Ol=null}cr(t){return this.Al.ut(t)}openSession(){const t=this.j.Vo()!==this.j.mo();t&&(this.h.va(o.iu.Go),this.h.va(o.iu.su)),this.Ll(null,!1,null,null,null),this.$n(),t&&import("./Push/push-manager-factory.js").then((t=>{if(this.Nl)return;const s=t.default.aa();if(null!=s&&(ht.isPushPermissionGranted()||ht.isPushBlocked())){const t=()=>{s.Er()?r.D.info("Push token maintenance is disabled, not refreshing token for backend."):s.subscribe()},i=(s,i)=>{i&&t()},e=()=>{const s=this.h.I(o.q.gn);(null==s||s)&&t()},n=r.xt.Ft;new r.qt(n,r.D).hr(n.$t.pu,i,e)}}))}changeUser(t,s,i){const e=this.v.getUserId();if(e!==t){this.j.gh(),null!=e&&this.Ll(null,!1,null,null,null),this.v.uu(t),i?this.Bo.setSdkAuthenticationSignature(i):this.Bo.Ln();for(let t=0;t<s.length;t++)s[t].changeUser(null==e);null!=e&&this.h.Xs(o.q.P),this.h.Xs(o.q.Ho),this.openSession(),r.D.info('Changed user to "'+t+'".')}else{let s="Doing nothing.";i&&this.Bo.Hn()!==i&&(this.Bo.setSdkAuthenticationSignature(i),s="Updated SDK authentication signature"),r.D.info(`Current user is already ${t}. ${s}`)}}requestImmediateDataFlush(t){this.Pl(),this.j.mo(),this.Ll(null,null,null,null,null,t,!0)}requestFeedRefresh(){this.j.mo(),this.Ll(!0)}zr(t,s){this.j.mo(),r.D.info("Requesting explicit trigger refresh."),this.Ll(null,!0,null,t,s)}Nn(t,i){const e=r.A.Ul,n={a:t,l:i},l=s.G(e,n);return l&&r.D.info(`Logged alias ${t} with label ${i}`),l}In(i,e,n){if(this.gt.hu(e))return r.D.info(`Custom Attribute "${e}" is blocklisted, ignoring.`),new t;const l={key:e,value:n},h=s.G(i,l);return h&&r.D.info(`Logged custom attribute: ${e} with value: ${n}`),h}setLastKnownLocation(t,i,e,n,l,h){const o={latitude:i,longitude:e};null!=n&&(o.altitude=n),null!=l&&(o.ll_accuracy=l),null!=h&&(o.alt_accuracy=h);const u=s.G(r.A.xl,o,t);return u&&r.D.info(`Set user last known location as ${JSON.stringify(o,null,2)}`),u}kr(t,s){const i=this.j.mo();return new ue(this.v.getUserId(),r.A.Kl,t,i,{cid:s})}$n(){const t=r.xt.Ft;new r.qt(t,r.D).setItem(t.$t.Wl,1,{baseUrl:this.yo,data:{api_key:this.Ji,device_id:this.Qi.te().id},userId:this.v.getUserId(),sdkAuthEnabled:this.Bo.Gn()})}wr(t){for(const s of t)if(s.api_key===this.Ji)this.vt.sa(s.events,s.attributes);else{const t=r.xt.Ft;new r.qt(t,r.D).setItem(t.$t.$r,r.it.nt(),s)}}Fn(i,e,n){if(this.gt.hu(i))return r.D.info(`Custom Attribute "${i}" is blocklisted, ignoring.`),new t;let l,h;return null===e&&null===n?(l=r.A.Bl,h={key:i}):(l=r.A.Gl,h={key:i,latitude:e,longitude:n}),s.G(l,h)}Tn(t,i){const e={group_id:t,status:i};return s.G(r.A.Jl,e)}}
1
+ import b from "./util/net.js";
2
+ import ue from "./models/braze-event.js";
3
+ import s from "./common/event-logger.js";
4
+ import { randomInclusive as pt } from "./util/math.js";
5
+ import t from "./models/request-result.js";
6
+ import r from "../shared-lib/braze-shared-lib.js";
7
+ import { STORAGE_KEYS as o } from "./managers/storage-manager.js";
8
+ import u from "./managers/subscription-manager.js";
9
+ import dt from "./Push/utils/push-utils.js";
10
+ export default class Lt {
11
+ constructor(t, s, i, e, n, l, h, o, r, a) {
12
+ (this._r = t),
13
+ (this.Bo = s),
14
+ (this.kl = 0),
15
+ (this.yl = h.Pa()),
16
+ (this.jl = null),
17
+ (this.j = i),
18
+ (this.Ur = e),
19
+ (this.v = n),
20
+ (this.gt = l),
21
+ (this.h = h),
22
+ (this.Ko = r),
23
+ (this.vt = a),
24
+ (this.$l = o),
25
+ (this.Al = new u()),
26
+ (this.Tl = 50);
27
+ }
28
+ ql(t, s) {
29
+ return !t && !s && this.Ko.Yn() >= this.Tl;
30
+ }
31
+ Fl(t) {
32
+ let s = this.j.gh();
33
+ if (t.length > 0) {
34
+ const i = this.v.getUserId();
35
+ for (const e of t) {
36
+ const t = (!e.userId && !i) || e.userId === i;
37
+ e.type === r.A.Ch && t && (s = !0);
38
+ }
39
+ }
40
+ return s;
41
+ }
42
+ Dl(t, s, i, e, n, l, h) {
43
+ null == i && (i = !0), i && this.Ll();
44
+ const u = this.h.Ua(),
45
+ a = this.h.Ba();
46
+ let c = !1;
47
+ const d = (t, s) => {
48
+ let h = !1;
49
+ b.Hs({
50
+ url: this.Bo + "/data/",
51
+ data: t,
52
+ headers: s,
53
+ S: i => {
54
+ null != t.respond_with &&
55
+ t.respond_with.triggers &&
56
+ (this.kl = Math.max(this.kl - 1, 0)),
57
+ this.vt.Os(t, i, s)
58
+ ? (this.Ko.Qs(),
59
+ this.gt.al(i),
60
+ (null != t.respond_with &&
61
+ t.respond_with.user_id != this.v.getUserId()) ||
62
+ (null != t.device && this.h.B(o.q.Yo, t.device),
63
+ null != t.sdk_metadata &&
64
+ (this.h.B(o.q.ua, t.sdk_metadata),
65
+ this.h.B(o.q.ha, this.j.ca())),
66
+ this.$l(i),
67
+ "function" == typeof e && e()))
68
+ : i.auth_error && (h = !0);
69
+ },
70
+ error: () => {
71
+ null != t.respond_with &&
72
+ t.respond_with.triggers &&
73
+ (this.kl = Math.max(this.kl - 1, 0)),
74
+ this.vt.la(t.events, t.attributes),
75
+ "function" == typeof n && n();
76
+ },
77
+ Pl: t => {
78
+ if (("function" == typeof l && l(t), i && !c)) {
79
+ if (t && !h) this.Rl();
80
+ else {
81
+ let t = this.jl;
82
+ (null == t || t < 1e3 * this.yl) && (t = 1e3 * this.yl),
83
+ this.Rl(Math.min(3e5, pt(1e3 * this.yl, 3 * t)));
84
+ }
85
+ c = !0;
86
+ }
87
+ }
88
+ });
89
+ },
90
+ m = this.Fl(u),
91
+ f = s || m;
92
+ if (this.ql(h, m))
93
+ return void r.D.info(
94
+ "Declining to flush data due to 50 consecutive authentication failures"
95
+ );
96
+ if (i && !this.vt.ga(u, a, t, f))
97
+ return this.Rl(), void ("function" == typeof l && l(!0));
98
+ const g = this.vt.qa(t, f, u, a);
99
+ f && this.kl++;
100
+ let p = !1;
101
+ if (g)
102
+ for (const t of g)
103
+ this.vt.Gs(t.requestData, () => d(t.requestData, t.headers)), (p = !0);
104
+ this.Ko.Jn() && i && !p
105
+ ? this.Rl()
106
+ : m && (r.D.info("Invoking new session subscriptions"), this.Al.St());
107
+ }
108
+ Ml() {
109
+ return this.kl > 0;
110
+ }
111
+ Rl(t) {
112
+ this.Il ||
113
+ (null == t && (t = 1e3 * this.yl),
114
+ this.Ll(),
115
+ (this.Nl = setTimeout(() => {
116
+ if (document.hidden) {
117
+ const t = "visibilitychange",
118
+ s = () => {
119
+ document.hidden ||
120
+ (document.removeEventListener(t, s, !1), this.Dl());
121
+ };
122
+ document.addEventListener(t, s, !1);
123
+ } else this.Dl();
124
+ }, t)),
125
+ (this.jl = t));
126
+ }
127
+ Ll() {
128
+ null != this.Nl && (clearTimeout(this.Nl), (this.Nl = null));
129
+ }
130
+ initialize() {
131
+ (this.Il = !1), this.Rl();
132
+ }
133
+ destroy() {
134
+ this.Al.removeAllSubscriptions(),
135
+ this.Ko.Wn(),
136
+ this.Ll(),
137
+ (this.Il = !0),
138
+ this.Dl(null, null, !1),
139
+ (this.Nl = null);
140
+ }
141
+ cr(t) {
142
+ return this.Al.ut(t);
143
+ }
144
+ openSession() {
145
+ const t = this.j.ca() !== this.j.mo();
146
+ t && (this.h.ya(o.eu.Jo), this.h.ya(o.eu.su)),
147
+ this.Dl(null, !1, null, null, null),
148
+ this.Ln(),
149
+ t &&
150
+ import("./Push/push-manager-factory.js").then(t => {
151
+ if (this.Il) return;
152
+ const s = t.default.aa();
153
+ if (
154
+ null != s &&
155
+ (dt.isPushPermissionGranted() || dt.isPushBlocked())
156
+ ) {
157
+ const t = () => {
158
+ s.Gr()
159
+ ? r.D.info(
160
+ "Push token maintenance is disabled, not refreshing token for backend."
161
+ )
162
+ : s.subscribe();
163
+ },
164
+ i = (s, i) => {
165
+ i && t();
166
+ },
167
+ e = () => {
168
+ const s = this.h.I(o.q.Pn);
169
+ (null == s || s) && t();
170
+ },
171
+ n = r.xt.Ft;
172
+ new r.qt(n, r.D).hr(n.$t.cu, i, e);
173
+ }
174
+ });
175
+ }
176
+ changeUser(t, s, i) {
177
+ const e = this.v.getUserId();
178
+ if (e !== t) {
179
+ this.j.Gh(),
180
+ null != e && this.Dl(null, !1, null, null, null),
181
+ this.v.uu(t),
182
+ i ? this.Ko.setSdkAuthenticationSignature(i) : this.Ko.Qn();
183
+ for (let t = 0; t < s.length; t++) s[t].changeUser(null == e);
184
+ null != e && this.h.Xs(o.q.P),
185
+ this.h.Xs(o.q.Yo),
186
+ this.openSession(),
187
+ r.D.info('Changed user to "' + t + '".');
188
+ } else {
189
+ let s = "Doing nothing.";
190
+ i &&
191
+ this.Ko.Kn() !== i &&
192
+ (this.Ko.setSdkAuthenticationSignature(i),
193
+ (s = "Updated SDK authentication signature")),
194
+ r.D.info(`Current user is already ${t}. ${s}`);
195
+ }
196
+ }
197
+ requestImmediateDataFlush(t) {
198
+ this.Ll(), this.j.mo();
199
+ this.Dl(
200
+ null,
201
+ null,
202
+ null,
203
+ null,
204
+ () => {
205
+ r.D.error(
206
+ "Failed to flush data, request will be retried automatically."
207
+ );
208
+ },
209
+ t,
210
+ !0
211
+ );
212
+ }
213
+ requestFeedRefresh() {
214
+ this.j.mo(), this.Dl(!0);
215
+ }
216
+ zr(t, s) {
217
+ this.j.mo(),
218
+ r.D.info("Requesting explicit trigger refresh."),
219
+ this.Dl(null, !0, null, t, s);
220
+ }
221
+ Nn(t, i) {
222
+ const e = r.A.Ol,
223
+ n = { a: t, l: i },
224
+ l = s.G(e, n);
225
+ return l && r.D.info(`Logged alias ${t} with label ${i}`), l;
226
+ }
227
+ In(i, e, n) {
228
+ if (this.gt.hu(e))
229
+ return (
230
+ r.D.info(`Custom Attribute "${e}" is blocklisted, ignoring.`), new t()
231
+ );
232
+ const l = { key: e, value: n },
233
+ h = s.G(i, l);
234
+ return h && r.D.info(`Logged custom attribute: ${e} with value: ${n}`), h;
235
+ }
236
+ setLastKnownLocation(t, i, e, n, l, h) {
237
+ const o = { latitude: i, longitude: e };
238
+ null != n && (o.altitude = n),
239
+ null != l && (o.ll_accuracy = l),
240
+ null != h && (o.alt_accuracy = h);
241
+ const u = s.G(r.A.Ul, o, t);
242
+ return (
243
+ u &&
244
+ r.D.info(
245
+ `Set user last known location as ${JSON.stringify(o, null, 2)}`
246
+ ),
247
+ u
248
+ );
249
+ }
250
+ kr(t, s) {
251
+ const i = this.j.mo();
252
+ return new ue(this.v.getUserId(), r.A.xl, t, i, { cid: s });
253
+ }
254
+ Ln() {
255
+ const t = r.xt.Ft;
256
+ new r.qt(t, r.D).setItem(t.$t.Kl, 1, {
257
+ baseUrl: this.Bo,
258
+ data: { api_key: this._r, device_id: this.Ur.te().id },
259
+ userId: this.v.getUserId(),
260
+ sdkAuthEnabled: this.Ko.Jn()
261
+ });
262
+ }
263
+ wr(t) {
264
+ for (const s of t)
265
+ if (s.api_key === this._r) this.vt.la(s.events, s.attributes);
266
+ else {
267
+ const t = r.xt.Ft;
268
+ new r.qt(t, r.D).setItem(t.$t.$r, r.it.nt(), s);
269
+ }
270
+ }
271
+ Tn(i, e, n) {
272
+ if (this.gt.hu(i))
273
+ return (
274
+ r.D.info(`Custom Attribute "${i}" is blocklisted, ignoring.`), new t()
275
+ );
276
+ let l, h;
277
+ return (
278
+ null === e && null === n
279
+ ? ((l = r.A.Wl), (h = { key: i }))
280
+ : ((l = r.A.Bl), (h = { key: i, latitude: e, longitude: n })),
281
+ s.G(l, h)
282
+ );
283
+ }
284
+ $n(t, i) {
285
+ const e = { group_id: t, status: i };
286
+ return s.G(r.A.Gl, e);
287
+ }
288
+ }
@@ -1 +1,14 @@
1
- export default class xt{constructor(t){this.Hl=t}Ql(t){return null==this.Hl||this.Hl===t[0]}static fromJson(t){return new xt(t?t.event_name:null)}ss(){return this.Hl}}
1
+ export default class xt {
2
+ constructor(t) {
3
+ this.Jl = t;
4
+ }
5
+ Hl(t) {
6
+ return null == this.Jl || this.Jl === t[0];
7
+ }
8
+ static fromJson(t) {
9
+ return new xt(t ? t.event_name : null);
10
+ }
11
+ ss() {
12
+ return this.Jl;
13
+ }
14
+ }
@@ -1 +1,21 @@
1
- import Bt from"./filter-set.js";export default class Mt{constructor(t,s){this.Hl=t,this.Vl=s}Ql(t){if(null==this.Hl||null==this.Vl)return!1;const s=t[0],r=t[1];return s===this.Hl&&this.Vl.Ql(r)}static fromJson(t){return new Mt(t?t.event_name:null,t?Bt.fromJson(t.property_filters):null)}ss(){return{e:this.Hl,pf:this.Vl.ss()}}}
1
+ import kt from "./filter-set.js";
2
+ export default class Dt {
3
+ constructor(t, s) {
4
+ (this.Jl = t), (this.Ql = s);
5
+ }
6
+ Hl(t) {
7
+ if (null == this.Jl || null == this.Ql) return !1;
8
+ const s = t[0],
9
+ r = t[1];
10
+ return s === this.Jl && this.Ql.Hl(r);
11
+ }
12
+ static fromJson(t) {
13
+ return new Dt(
14
+ t ? t.event_name : null,
15
+ t ? kt.fromJson(t.property_filters) : null
16
+ );
17
+ }
18
+ ss() {
19
+ return { e: this.Jl, pf: this.Ql.ss() };
20
+ }
21
+ }
@@ -1 +1,55 @@
1
- import kt from"./filter.js";import{isArray as p}from"../../util/code-utils.js";export default class Bt{constructor(t){this.filters=t}Ql(t){let r=!0;for(let e=0;e<this.filters.length;e++){const o=this.filters[e];let s=!1;for(let r=0;r<o.length;r++)if(o[r].Ql(t)){s=!0;break}if(!s){r=!1;break}}return r}static fromJson(t){if(null==t||!p(t))return null;const r=[];for(let e=0;e<t.length;e++){const o=[],s=t[e];for(let t=0;t<s.length;t++)o.push(kt.fromJson(s[t]));r.push(o)}return new Bt(r)}ss(){const t=[];for(let r=0;r<this.filters.length;r++){const e=this.filters[r],o=[];for(let t=0;t<e.length;t++)o.push(e[t].ss());t.push(o)}return t}static yn(t){const r=[];for(let e=0;e<t.length;e++){const o=[],s=t[e];for(let t=0;t<s.length;t++)o.push(kt.yn(s[t]));r.push(o)}return new Bt(r)}}
1
+ import Gt from "./filter.js";
2
+ import { isArray as p } from "../../util/code-utils.js";
3
+ export default class kt {
4
+ constructor(t) {
5
+ this.filters = t;
6
+ }
7
+ Hl(t) {
8
+ let r = !0;
9
+ for (let e = 0; e < this.filters.length; e++) {
10
+ const o = this.filters[e];
11
+ let s = !1;
12
+ for (let r = 0; r < o.length; r++)
13
+ if (o[r].Hl(t)) {
14
+ s = !0;
15
+ break;
16
+ }
17
+ if (!s) {
18
+ r = !1;
19
+ break;
20
+ }
21
+ }
22
+ return r;
23
+ }
24
+ static fromJson(t) {
25
+ if (null == t || !p(t)) return null;
26
+ const r = [];
27
+ for (let e = 0; e < t.length; e++) {
28
+ const o = [],
29
+ s = t[e];
30
+ for (let t = 0; t < s.length; t++) o.push(Gt.fromJson(s[t]));
31
+ r.push(o);
32
+ }
33
+ return new kt(r);
34
+ }
35
+ ss() {
36
+ const t = [];
37
+ for (let r = 0; r < this.filters.length; r++) {
38
+ const e = this.filters[r],
39
+ o = [];
40
+ for (let t = 0; t < e.length; t++) o.push(e[t].ss());
41
+ t.push(o);
42
+ }
43
+ return t;
44
+ }
45
+ static Sn(t) {
46
+ const r = [];
47
+ for (let e = 0; e < t.length; e++) {
48
+ const o = [],
49
+ s = t[e];
50
+ for (let t = 0; t < s.length; t++) o.push(Gt.Sn(s[t]));
51
+ r.push(o);
52
+ }
53
+ return new kt(r);
54
+ }
55
+ }
@@ -1 +1,98 @@
1
- import{isDate as yt}from"../../util/code-utils.js";import{convertMsToSeconds as l,dateFromUnixTimestamp as h,secondsAgo as Ht,secondsInTheFuture as Ut}from"../../util/date-utils.js";export default class kt{constructor(t,s,e,i){this.Xl=t,this.Yl=s,this.comparator=e,this.Zl=i,this.Yl===kt.Th.Eh&&this.comparator!==kt._h.Ah&&this.comparator!==kt._h.yh&&this.comparator!==kt._h.Sh&&this.comparator!==kt._h.Nh&&(this.Zl=h(this.Zl))}Ql(t){let s=null;switch(null!=t&&(s=t[this.Xl]),this.comparator){case kt._h.Mh:return null!=s&&s.valueOf()===this.Zl.valueOf();case kt._h.Rh:return null==s||s.valueOf()!==this.Zl.valueOf();case kt._h.Hh:return typeof s==typeof this.Zl&&s>this.Zl;case kt._h.Ah:return this.Yl===kt.Th.Eh?null!=s&&yt(s)&&Ht(s)<=this.Zl:typeof s==typeof this.Zl&&s>=this.Zl;case kt._h.Lh:return typeof s==typeof this.Zl&&s<this.Zl;case kt._h.yh:return this.Yl===kt.Th.Eh?null!=s&&yt(s)&&Ht(s)>=this.Zl:typeof s==typeof this.Zl&&s<=this.Zl;case kt._h.Ih:return null!=s&&"string"==typeof s&&typeof s==typeof this.Zl&&null!=s.match(this.Zl);case kt._h.Oh:return null!=s;case kt._h.Uh:return null==s;case kt._h.Sh:return null!=s&&yt(s)&&Ut(s)<this.Zl;case kt._h.Nh:return null!=s&&yt(s)&&Ut(s)>this.Zl;case kt._h.Dh:return null==s||typeof s!=typeof this.Zl||"string"!=typeof s||null==s.match(this.Zl)}return!1}static fromJson(t){return new kt(t.property_key,t.property_type,t.comparator,t.property_value)}ss(){let t=this.Zl;return yt(this.Zl)&&(t=l(t.valueOf())),{k:this.Xl,t:this.Yl,c:this.comparator,v:t}}static yn(t){return new kt(t.k,t.t,t.c,t.v)}}kt._h={Mh:1,Rh:2,Hh:3,Ah:4,Lh:5,yh:6,Ih:10,Oh:11,Uh:12,Sh:15,Nh:16,Dh:17},kt.Th={Qh:"boolean",Xh:"number",Bh:"string",Eh:"date"};
1
+ import { isDate as yt } from "../../util/code-utils.js";
2
+ import {
3
+ convertMsToSeconds as l,
4
+ dateFromUnixTimestamp as h,
5
+ secondsAgo as Ht,
6
+ secondsInTheFuture as Ut
7
+ } from "../../util/date-utils.js";
8
+ export default class Gt {
9
+ constructor(t, s, e, i) {
10
+ (this.Xl = t),
11
+ (this.Vl = s),
12
+ (this.comparator = e),
13
+ (this.Yl = i),
14
+ this.Vl === Gt.Th.Zl &&
15
+ this.comparator !== Gt._h.Ah &&
16
+ this.comparator !== Gt._h.yh &&
17
+ this.comparator !== Gt._h.Mh &&
18
+ this.comparator !== Gt._h.Rh &&
19
+ (this.Yl = h(this.Yl));
20
+ }
21
+ Hl(t) {
22
+ let s = null;
23
+ switch ((null != t && (s = t[this.Xl]), this.comparator)) {
24
+ case Gt._h.Hh:
25
+ return null != s && s.valueOf() === this.Yl.valueOf();
26
+ case Gt._h.Lh:
27
+ return null == s || s.valueOf() !== this.Yl.valueOf();
28
+ case Gt._h.Ih:
29
+ return typeof s == typeof this.Yl && s > this.Yl;
30
+ case Gt._h.Ah:
31
+ return this.Vl === Gt.Th.Zl
32
+ ? null != s && yt(s) && Ht(s) <= this.Yl
33
+ : typeof s == typeof this.Yl && s >= this.Yl;
34
+ case Gt._h.Oh:
35
+ return typeof s == typeof this.Yl && s < this.Yl;
36
+ case Gt._h.yh:
37
+ return this.Vl === Gt.Th.Zl
38
+ ? null != s && yt(s) && Ht(s) >= this.Yl
39
+ : typeof s == typeof this.Yl && s <= this.Yl;
40
+ case Gt._h.Uh:
41
+ return (
42
+ null != s &&
43
+ "string" == typeof s &&
44
+ typeof s == typeof this.Yl &&
45
+ null != s.match(this.Yl)
46
+ );
47
+ case Gt._h.Qh:
48
+ return null != s;
49
+ case Gt._h.Xh:
50
+ return null == s;
51
+ case Gt._h.Mh:
52
+ return null != s && yt(s) && Ut(s) < this.Yl;
53
+ case Gt._h.Rh:
54
+ return null != s && yt(s) && Ut(s) > this.Yl;
55
+ case Gt._h.Bh:
56
+ return (
57
+ null == s ||
58
+ typeof s != typeof this.Yl ||
59
+ "string" != typeof s ||
60
+ null == s.match(this.Yl)
61
+ );
62
+ }
63
+ return !1;
64
+ }
65
+ static fromJson(t) {
66
+ return new Gt(
67
+ t.property_key,
68
+ t.property_type,
69
+ t.comparator,
70
+ t.property_value
71
+ );
72
+ }
73
+ ss() {
74
+ let t = this.Yl;
75
+ return (
76
+ yt(this.Yl) && (t = l(t.valueOf())),
77
+ { k: this.Xl, t: this.Vl, c: this.comparator, v: t }
78
+ );
79
+ }
80
+ static Sn(t) {
81
+ return new Gt(t.k, t.t, t.c, t.v);
82
+ }
83
+ }
84
+ (Gt._h = {
85
+ Hh: 1,
86
+ Lh: 2,
87
+ Ih: 3,
88
+ Ah: 4,
89
+ Oh: 5,
90
+ yh: 6,
91
+ Uh: 10,
92
+ Qh: 11,
93
+ Xh: 12,
94
+ Mh: 15,
95
+ Rh: 16,
96
+ Bh: 17
97
+ }),
98
+ (Gt.Th = { Fh: "boolean", kh: "number", Jh: "string", Zl: "date" });
@@ -1 +1,25 @@
1
- import Gt from"./trigger-condition.js";export default class Kt{constructor(t,i){this.fu=t,this.cu=i}Ql(t){if(null==this.fu)return!1;const i=Gt.au(t[0],this.fu);if(!i)return!1;let r=null==this.cu||0===this.cu.length;if(null!=this.cu)for(let i=0;i<this.cu.length;i++)if(this.cu[i]===t[1]){r=!0;break}return i&&r}static fromJson(t){return new Kt(t?t.id:null,t?t.buttons:null)}ss(){return this.fu}}
1
+ import Kt from "./trigger-condition.js";
2
+ export default class Qt {
3
+ constructor(t, i) {
4
+ (this.fu = t), (this.au = i);
5
+ }
6
+ Hl(t) {
7
+ if (null == this.fu) return !1;
8
+ const i = Kt.du(t[0], this.fu);
9
+ if (!i) return !1;
10
+ let r = null == this.au || 0 === this.au.length;
11
+ if (null != this.au)
12
+ for (let i = 0; i < this.au.length; i++)
13
+ if (this.au[i] === t[1]) {
14
+ r = !0;
15
+ break;
16
+ }
17
+ return i && r;
18
+ }
19
+ static fromJson(t) {
20
+ return new Qt(t ? t.id : null, t ? t.buttons : null);
21
+ }
22
+ ss() {
23
+ return this.fu;
24
+ }
25
+ }
@@ -1 +1,14 @@
1
- export default class Qt{constructor(t){this.productId=t}Ql(t){return null==this.productId||t[0]===this.productId}static fromJson(t){return new Qt(t?t.product_id:null)}ss(){return this.productId}}
1
+ export default class Wt {
2
+ constructor(t) {
3
+ this.productId = t;
4
+ }
5
+ Hl(t) {
6
+ return null == this.productId || t[0] === this.productId;
7
+ }
8
+ static fromJson(t) {
9
+ return new Wt(t ? t.product_id : null);
10
+ }
11
+ ss() {
12
+ return this.productId;
13
+ }
14
+ }
@@ -1 +1,21 @@
1
- import Bt from"./filter-set.js";export default class Vt{constructor(t,s){this.productId=t,this.Vl=s}Ql(t){if(null==this.productId||null==this.Vl)return!1;const s=t[0],i=t[1];return s===this.productId&&this.Vl.Ql(i)}static fromJson(t){return new Vt(t?t.product_id:null,t?Bt.fromJson(t.property_filters):null)}ss(){return{id:this.productId,pf:this.Vl.ss()}}}
1
+ import kt from "./filter-set.js";
2
+ export default class Xt {
3
+ constructor(t, s) {
4
+ (this.productId = t), (this.Ql = s);
5
+ }
6
+ Hl(t) {
7
+ if (null == this.productId || null == this.Ql) return !1;
8
+ const s = t[0],
9
+ i = t[1];
10
+ return s === this.productId && this.Ql.Hl(i);
11
+ }
12
+ static fromJson(t) {
13
+ return new Xt(
14
+ t ? t.product_id : null,
15
+ t ? kt.fromJson(t.property_filters) : null
16
+ );
17
+ }
18
+ ss() {
19
+ return { id: this.productId, pf: this.Ql.ss() };
20
+ }
21
+ }
@@ -1 +1,15 @@
1
- import Gt from"./trigger-condition.js";export default class Wt{constructor(t){this.fu=t}Ql(t){return null==this.fu||Gt.au(t[0],this.fu)}static fromJson(t){return new Wt(t?t.campaign_id:null)}ss(){return this.fu}}
1
+ import Kt from "./trigger-condition.js";
2
+ export default class Yt {
3
+ constructor(t) {
4
+ this.fu = t;
5
+ }
6
+ Hl(t) {
7
+ return null == this.fu || Kt.du(t[0], this.fu);
8
+ }
9
+ static fromJson(t) {
10
+ return new Yt(t ? t.campaign_id : null);
11
+ }
12
+ ss() {
13
+ return this.fu;
14
+ }
15
+ }
@@ -1 +1,109 @@
1
- import xt from"./custom-event-data.js";import Mt from"./custom-event-property-data.js";import Bt from"./filter-set.js";import Kt from"./in-app-message-click-data.js";import Qt from"./purchase-data.js";import Vt from"./purchase-property-data.js";import Wt from"./push-click-data.js";import V from"./trigger-events.js";import r from"../../../shared-lib/braze-shared-lib.js";export default class Gt{constructor(e,t){this.type=e,this.data=t}qa(e,t){return Gt.$a[this.type]===e&&(null==this.data||this.data.Ql(t))}static au(e,t){let a=null;try{a=window.atob(e)}catch(t){return r.D.info("Failed to unencode analytics id "+e+": "+t.message),!1}return t===a.split("_")[0]}static fromJson(e){const t=e.type;let r;switch(t){case Gt.ec.OPEN:r=null;break;case Gt.ec.Rr:r=Qt.fromJson(e.data);break;case Gt.ec.tc:r=Vt.fromJson(e.data);break;case Gt.ec.vr:r=Wt.fromJson(e.data);break;case Gt.ec.be:r=xt.fromJson(e.data);break;case Gt.ec.rc:r=Mt.fromJson(e.data);break;case Gt.ec.Ar:r=Kt.fromJson(e.data);break;case Gt.ec.ks:r=null}return new Gt(t,r)}ss(){return{t:this.type,d:this.data?this.data.ss():null}}static yn(e){let t,r;switch(e.t){case Gt.ec.OPEN:t=null;break;case Gt.ec.Rr:t=new Qt(e.d);break;case Gt.ec.tc:r=e.d||{},t=new Vt(r.id,Bt.yn(r.pf||[]));break;case Gt.ec.vr:t=new Wt(e.d);break;case Gt.ec.be:t=new xt(e.d);break;case Gt.ec.rc:r=e.d||{},t=new Mt(r.e,Bt.yn(r.pf||[]));break;case Gt.ec.Ar:t=new Kt(e.d);break;case Gt.ec.ks:t=null}return new Gt(e.t,t)}}Gt.ec={OPEN:"open",Rr:"purchase",tc:"purchase_property",vr:"push_click",be:"custom_event",rc:"custom_event_property",Ar:"iam_click",ks:"test"},Gt.$a={},Gt.$a[Gt.ec.OPEN]=V.OPEN,Gt.$a[Gt.ec.Rr]=V.Rr,Gt.$a[Gt.ec.tc]=V.Rr,Gt.$a[Gt.ec.vr]=V.vr,Gt.$a[Gt.ec.be]=V.be,Gt.$a[Gt.ec.rc]=V.be,Gt.$a[Gt.ec.Ar]=V.Ar,Gt.$a[Gt.ec.ks]=V.ks;
1
+ import xt from "./custom-event-data.js";
2
+ import Dt from "./custom-event-property-data.js";
3
+ import kt from "./filter-set.js";
4
+ import Qt from "./in-app-message-click-data.js";
5
+ import Wt from "./purchase-data.js";
6
+ import Xt from "./purchase-property-data.js";
7
+ import Yt from "./push-click-data.js";
8
+ import V from "./trigger-events.js";
9
+ import r from "../../../shared-lib/braze-shared-lib.js";
10
+ export default class Kt {
11
+ constructor(e, t) {
12
+ (this.type = e), (this.data = t);
13
+ }
14
+ ec(e, t) {
15
+ return Kt.tc[this.type] === e && (null == this.data || this.data.Hl(t));
16
+ }
17
+ static du(e, t) {
18
+ let a = null;
19
+ try {
20
+ a = window.atob(e);
21
+ } catch (t) {
22
+ return (
23
+ r.D.info("Failed to unencode analytics id " + e + ": " + t.message), !1
24
+ );
25
+ }
26
+ return t === a.split("_")[0];
27
+ }
28
+ static fromJson(e) {
29
+ const t = e.type;
30
+ let r;
31
+ switch (t) {
32
+ case Kt.rc.OPEN:
33
+ r = null;
34
+ break;
35
+ case Kt.rc.Rr:
36
+ r = Wt.fromJson(e.data);
37
+ break;
38
+ case Kt.rc.ac:
39
+ r = Xt.fromJson(e.data);
40
+ break;
41
+ case Kt.rc.vr:
42
+ r = Yt.fromJson(e.data);
43
+ break;
44
+ case Kt.rc.be:
45
+ r = xt.fromJson(e.data);
46
+ break;
47
+ case Kt.rc.sc:
48
+ r = Dt.fromJson(e.data);
49
+ break;
50
+ case Kt.rc.Ar:
51
+ r = Qt.fromJson(e.data);
52
+ break;
53
+ case Kt.rc.ks:
54
+ r = null;
55
+ }
56
+ return new Kt(t, r);
57
+ }
58
+ ss() {
59
+ return { t: this.type, d: this.data ? this.data.ss() : null };
60
+ }
61
+ static Sn(e) {
62
+ let t, r;
63
+ switch (e.t) {
64
+ case Kt.rc.OPEN:
65
+ t = null;
66
+ break;
67
+ case Kt.rc.Rr:
68
+ t = new Wt(e.d);
69
+ break;
70
+ case Kt.rc.ac:
71
+ (r = e.d || {}), (t = new Xt(r.id, kt.Sn(r.pf || [])));
72
+ break;
73
+ case Kt.rc.vr:
74
+ t = new Yt(e.d);
75
+ break;
76
+ case Kt.rc.be:
77
+ t = new xt(e.d);
78
+ break;
79
+ case Kt.rc.sc:
80
+ (r = e.d || {}), (t = new Dt(r.e, kt.Sn(r.pf || [])));
81
+ break;
82
+ case Kt.rc.Ar:
83
+ t = new Qt(e.d);
84
+ break;
85
+ case Kt.rc.ks:
86
+ t = null;
87
+ }
88
+ return new Kt(e.t, t);
89
+ }
90
+ }
91
+ (Kt.rc = {
92
+ OPEN: "open",
93
+ Rr: "purchase",
94
+ ac: "purchase_property",
95
+ vr: "push_click",
96
+ be: "custom_event",
97
+ sc: "custom_event_property",
98
+ Ar: "iam_click",
99
+ ks: "test"
100
+ }),
101
+ (Kt.tc = {}),
102
+ (Kt.tc[Kt.rc.OPEN] = V.OPEN),
103
+ (Kt.tc[Kt.rc.Rr] = V.Rr),
104
+ (Kt.tc[Kt.rc.ac] = V.Rr),
105
+ (Kt.tc[Kt.rc.vr] = V.vr),
106
+ (Kt.tc[Kt.rc.be] = V.be),
107
+ (Kt.tc[Kt.rc.sc] = V.be),
108
+ (Kt.tc[Kt.rc.Ar] = V.Ar),
109
+ (Kt.tc[Kt.rc.ks] = V.ks);