@saasquatch/squatch-js 2.8.3-0 → 2.8.3-2

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.
@@ -1,29 +1,34 @@
1
- var ye = Object.defineProperty;
2
- var Ee = (o, t, e) => t in o ? ye(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e;
3
- var l = (o, t, e) => Ee(o, typeof t != "symbol" ? t + "" : t, e);
4
- let P = null;
5
- function Ce(o) {
1
+ var Ee = Object.defineProperty;
2
+ var Ce = (o, t, e) => t in o ? Ee(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e;
3
+ var l = (o, t, e) => Ce(o, typeof t != "symbol" ? t + "" : t, e);
4
+ let C = null;
5
+ function Ae(o) {
6
6
  const e = o.replace(/[.+?^${}()|[\]\\]/g, "\\$&").replace(/\*/g, ".*");
7
- P = new RegExp(`^${e}$`);
7
+ C = new RegExp(`^${e}$`);
8
8
  }
9
- function ve() {
10
- P = null;
9
+ function Ie() {
10
+ C = null;
11
11
  }
12
- function E(o) {
13
- return (...t) => {
14
- P && P.test(o) && console.log(`[${o}]`, ...t);
12
+ function k(o) {
13
+ const t = (...e) => {
14
+ C && C.test(o) && console.log(`[${o}]`, ...e);
15
15
  };
16
+ return Object.defineProperty(t, "enabled", {
17
+ get() {
18
+ return !!(C && C.test(o));
19
+ }
20
+ }), t;
16
21
  }
17
22
  /*! js-cookie v3.0.5 | MIT */
18
- function T(o) {
23
+ function S(o) {
19
24
  for (var t = 1; t < arguments.length; t++) {
20
25
  var e = arguments[t];
21
- for (var i in e)
22
- o[i] = e[i];
26
+ for (var n in e)
27
+ o[n] = e[n];
23
28
  }
24
29
  return o;
25
30
  }
26
- var be = {
31
+ var _e = {
27
32
  read: function(o) {
28
33
  return o[0] === '"' && (o = o.slice(1, -1)), o.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
29
34
  },
@@ -35,47 +40,47 @@ var be = {
35
40
  }
36
41
  };
37
42
  function G(o, t) {
38
- function e(n, s, r) {
43
+ function e(i, s, r) {
39
44
  if (!(typeof document > "u")) {
40
- r = T({}, t, r), typeof r.expires == "number" && (r.expires = new Date(Date.now() + r.expires * 864e5)), r.expires && (r.expires = r.expires.toUTCString()), n = encodeURIComponent(n).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
45
+ r = S({}, t, r), typeof r.expires == "number" && (r.expires = new Date(Date.now() + r.expires * 864e5)), r.expires && (r.expires = r.expires.toUTCString()), i = encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
41
46
  var a = "";
42
- for (var c in r)
43
- r[c] && (a += "; " + c, r[c] !== !0 && (a += "=" + r[c].split(";")[0]));
44
- return document.cookie = n + "=" + o.write(s, n) + a;
47
+ for (var d in r)
48
+ r[d] && (a += "; " + d, r[d] !== !0 && (a += "=" + r[d].split(";")[0]));
49
+ return document.cookie = i + "=" + o.write(s, i) + a;
45
50
  }
46
51
  }
47
- function i(n) {
48
- if (!(typeof document > "u" || arguments.length && !n)) {
52
+ function n(i) {
53
+ if (!(typeof document > "u" || arguments.length && !i)) {
49
54
  for (var s = document.cookie ? document.cookie.split("; ") : [], r = {}, a = 0; a < s.length; a++) {
50
- var c = s[a].split("="), d = c.slice(1).join("=");
55
+ var d = s[a].split("="), c = d.slice(1).join("=");
51
56
  try {
52
- var h = decodeURIComponent(c[0]);
53
- if (r[h] = o.read(d, h), n === h)
57
+ var h = decodeURIComponent(d[0]);
58
+ if (r[h] = o.read(c, h), i === h)
54
59
  break;
55
60
  } catch {
56
61
  }
57
62
  }
58
- return n ? r[n] : r;
63
+ return i ? r[i] : r;
59
64
  }
60
65
  }
61
66
  return Object.create(
62
67
  {
63
68
  set: e,
64
- get: i,
65
- remove: function(n, s) {
69
+ get: n,
70
+ remove: function(i, s) {
66
71
  e(
67
- n,
72
+ i,
68
73
  "",
69
- T({}, s, {
74
+ S({}, s, {
70
75
  expires: -1
71
76
  })
72
77
  );
73
78
  },
74
- withAttributes: function(n) {
75
- return G(this.converter, T({}, this.attributes, n));
79
+ withAttributes: function(i) {
80
+ return G(this.converter, S({}, this.attributes, i));
76
81
  },
77
- withConverter: function(n) {
78
- return G(T({}, this.converter, n), this.attributes);
82
+ withConverter: function(i) {
83
+ return G(S({}, this.converter, i), this.attributes);
79
84
  }
80
85
  },
81
86
  {
@@ -84,21 +89,21 @@ function G(o, t) {
84
89
  }
85
90
  );
86
91
  }
87
- var S = G(be, { path: "/" });
88
- const A = "https://app.referralsaasquatch.com", z = "https://fast.ssqt.io/npm", U = "squatch", J = "impact";
89
- function W(o) {
92
+ var M = G(_e, { path: "/" });
93
+ const A = "https://app.referralsaasquatch.com", V = "https://fast.ssqt.io/npm", R = "squatch", z = "impact";
94
+ function q(o) {
90
95
  if (typeof o != "object") throw new Error("config must be an object");
91
- const t = window.squatchTenant, e = Q(), i = {
96
+ const t = window.squatchTenant, e = Y(), n = {
92
97
  tenantAlias: (o == null ? void 0 : o.tenantAlias) || t,
93
98
  domain: (o == null ? void 0 : o.domain) || (e == null ? void 0 : e.domain),
94
99
  npmCdn: (o == null ? void 0 : o.npmCdn) || (e == null ? void 0 : e.npmCdn),
95
100
  debug: (o == null ? void 0 : o.debug) || (e == null ? void 0 : e.debug)
96
101
  };
97
- if (typeof i.tenantAlias != "string")
102
+ if (typeof n.tenantAlias != "string")
98
103
  throw new Error("tenantAlias not provided");
99
- const n = i.tenantAlias, s = typeof i.domain == "string" && i.domain || A, r = typeof i.debug == "boolean" && i.debug || !1, a = typeof i.npmCdn == "string" && i.npmCdn || z;
104
+ const i = n.tenantAlias, s = typeof n.domain == "string" && n.domain || A, r = typeof n.debug == "boolean" && n.debug || !1, a = typeof n.npmCdn == "string" && n.npmCdn || V;
100
105
  return {
101
- tenantAlias: n,
106
+ tenantAlias: i,
102
107
  domain: s,
103
108
  debug: r,
104
109
  npmCdn: a
@@ -107,30 +112,30 @@ function W(o) {
107
112
  function I(o) {
108
113
  return typeof o == "object" && !Array.isArray(o) && o !== null;
109
114
  }
110
- function Ae(o) {
115
+ function Te(o) {
111
116
  if (o && /^[a-z]{2}_(?:[A-Z]{2}|[0-9]{3})$/.test(o))
112
117
  return o;
113
118
  }
114
- function se(o) {
119
+ function ce(o) {
115
120
  if (!I(o)) throw new Error("Widget properties must be an object");
116
121
  if (!(o != null && o.user)) throw new Error("Required properties missing.");
117
122
  return o;
118
123
  }
119
- function re(o) {
124
+ function le(o) {
120
125
  if (!I(o)) throw new Error("Widget properties must be an object");
121
126
  return o;
122
127
  }
123
- function q() {
128
+ function W() {
124
129
  return window.impactToken || window.squatchToken;
125
130
  }
126
- function Q() {
131
+ function Y() {
127
132
  return window.impactConfig || window.squatchConfig;
128
133
  }
129
- async function Ie(o, t, e, i) {
130
- const n = i || q(), s = {
134
+ async function $e(o, t, e, n) {
135
+ const i = n || W(), s = {
131
136
  Accept: "application/json",
132
137
  "Content-Type": "application/json",
133
- ...n ? { Authorization: `Bearer ${n}` } : {},
138
+ ...i ? { Authorization: `Bearer ${i}` } : {},
134
139
  "X-SaaSquatch-Referrer": window ? window.location.href : ""
135
140
  };
136
141
  try {
@@ -145,35 +150,35 @@ async function Ie(o, t, e, i) {
145
150
  throw r;
146
151
  }
147
152
  }
148
- async function _e(o, t = "") {
153
+ async function qe(o, t = "") {
149
154
  const e = {
150
155
  Accept: "application/json",
151
156
  "Content-Type": "application/json"
152
- }, i = t || q();
153
- i && (e["X-SaaSquatch-User-Token"] = i);
157
+ }, n = t || W();
158
+ n && (e["X-SaaSquatch-User-Token"] = n);
154
159
  try {
155
- const n = await fetch(o, {
160
+ const i = await fetch(o, {
156
161
  method: "GET",
157
162
  credentials: "include",
158
163
  headers: e
159
- }), s = await n.text();
160
- if (!n.ok) throw new Error(s);
164
+ }), s = await i.text();
165
+ if (!i.ok) throw new Error(s);
161
166
  return s && JSON.parse(s);
162
- } catch (n) {
163
- throw n;
167
+ } catch (i) {
168
+ throw i;
164
169
  }
165
170
  }
166
- async function V(o, t, e) {
167
- const i = {
171
+ async function X(o, t, e) {
172
+ const n = {
168
173
  Accept: "application/json",
169
174
  "Content-Type": "application/json"
170
- }, n = e || q();
171
- n && (i["X-SaaSquatch-User-Token"] = n);
175
+ }, i = e || W();
176
+ i && (n["X-SaaSquatch-User-Token"] = i);
172
177
  try {
173
178
  const s = await fetch(o, {
174
179
  method: "POST",
175
180
  body: t,
176
- headers: i
181
+ headers: n
177
182
  }), r = await s.text();
178
183
  if (!s.ok) throw new Error(r);
179
184
  return r && JSON.parse(r);
@@ -181,16 +186,16 @@ async function V(o, t, e) {
181
186
  throw s;
182
187
  }
183
188
  }
184
- async function ke(o, t, e) {
185
- const i = {
189
+ async function We(o, t, e) {
190
+ const n = {
186
191
  Accept: "application/json",
187
192
  "Content-Type": "application/json",
188
193
  "X-SaaSquatch-Referrer": window ? window.location.href : ""
189
- }, n = e || q();
190
- n && (i["X-SaaSquatch-User-Token"] = n);
194
+ }, i = e || W();
195
+ i && (n["X-SaaSquatch-User-Token"] = i);
191
196
  try {
192
197
  const s = await fetch(o, {
193
- headers: i,
198
+ headers: n,
194
199
  method: "PUT",
195
200
  credentials: "include",
196
201
  body: t
@@ -201,7 +206,7 @@ async function ke(o, t, e) {
201
206
  throw s;
202
207
  }
203
208
  }
204
- const xe = `
209
+ const Se = `
205
210
  query renderWidget ($user: UserIdInput, $engagementMedium: UserEngagementMedium, $widgetType: WidgetType, $locale: RSLocale) {
206
211
  renderWidget(user: $user, engagementMedium: $engagementMedium, widgetType: $widgetType, locale: $locale) {
207
212
  template
@@ -216,7 +221,7 @@ const xe = `
216
221
  }
217
222
  }
218
223
  `;
219
- class Y {
224
+ class K {
220
225
  /**
221
226
  * Initialize a new {@link WidgetApi} instance.
222
227
  *
@@ -238,8 +243,8 @@ class Y {
238
243
  l(this, "domain");
239
244
  l(this, "npmCdn");
240
245
  l(this, "referralCookie", this.squatchReferralCookie);
241
- const i = W(t);
242
- this.tenantAlias = i.tenantAlias, this.domain = i.domain, this.npmCdn = i.npmCdn;
246
+ const n = q(t);
247
+ this.tenantAlias = n.tenantAlias, this.domain = n.domain, this.npmCdn = n.npmCdn;
243
248
  }
244
249
  /**
245
250
  * Creates/upserts user, requests widget template.
@@ -256,18 +261,18 @@ class Y {
256
261
  * @return {Promise} string if true, with the widget template, jsOptions and user details.
257
262
  */
258
263
  upsertUser(t) {
259
- const i = se(t), {
260
- widgetType: n,
264
+ const n = ce(t), {
265
+ widgetType: i,
261
266
  engagementMedium: s = "POPUP",
262
267
  jwt: r,
263
268
  locale: a,
264
- user: c
265
- } = i, d = encodeURIComponent(this.tenantAlias), h = c.accountId ? encodeURIComponent(c.accountId) : null, u = c.id ? encodeURIComponent(c.id) : null, m = We({
266
- widgetType: n,
269
+ user: d
270
+ } = n, c = encodeURIComponent(this.tenantAlias), h = d.accountId ? encodeURIComponent(d.accountId) : null, u = d.id ? encodeURIComponent(d.id) : null, p = Re({
271
+ widgetType: i,
267
272
  engagementMedium: s,
268
273
  locale: a
269
- }), p = `/api/v1/${d}/widget/account/${h}/user/${u}/upsert${m}`, g = this.domain + p, f = (S || window.Cookies).get("_saasquatch");
270
- return f && (c.cookies = f), ke(g, JSON.stringify(c), r);
274
+ }), g = `/api/v1/${c}/widget/account/${h}/user/${u}/upsert${p}`, m = this.domain + g, w = (M || window.Cookies).get("_saasquatch");
275
+ return w && (d.cookies = w), We(m, JSON.stringify(d), r);
271
276
  }
272
277
  /**
273
278
  * Requests widget template
@@ -283,24 +288,24 @@ class Y {
283
288
  * @return {Promise} template html if true.
284
289
  */
285
290
  render(t) {
286
- const i = re(t), { widgetType: n, engagementMedium: s = "POPUP", jwt: r, user: a } = i, c = encodeURIComponent(this.tenantAlias), d = a != null && a.accountId ? encodeURIComponent(a.accountId) : null, h = a != null && a.id ? encodeURIComponent(a.id) : null, u = i.locale ?? Ae(navigator.language.replace(/\-/g, "_")), m = `/api/v1/${c}/graphql`, p = this.domain + m;
287
- return new Promise(async (g, f) => {
288
- var _;
291
+ const n = le(t), { widgetType: i, engagementMedium: s = "POPUP", jwt: r, user: a } = n, d = encodeURIComponent(this.tenantAlias), c = a != null && a.accountId ? encodeURIComponent(a.accountId) : null, h = a != null && a.id ? encodeURIComponent(a.id) : null, u = n.locale ?? Te(navigator.language.replace(/\-/g, "_")), p = `/api/v1/${d}/graphql`, g = this.domain + p;
292
+ return new Promise(async (m, w) => {
293
+ var b;
289
294
  try {
290
- const C = await Ie(
291
- p,
292
- xe,
295
+ const f = await $e(
296
+ g,
297
+ Se,
293
298
  {
294
- user: h && d ? { id: h, accountId: d } : null,
299
+ user: h && c ? { id: h, accountId: c } : null,
295
300
  engagementMedium: s,
296
- widgetType: n,
301
+ widgetType: i,
297
302
  locale: u
298
303
  },
299
304
  r
300
305
  );
301
- g((_ = C == null ? void 0 : C.data) == null ? void 0 : _.renderWidget);
302
- } catch (C) {
303
- f(C);
306
+ m((b = f == null ? void 0 : f.data) == null ? void 0 : b.renderWidget);
307
+ } catch (f) {
308
+ w(f);
304
309
  }
305
310
  });
306
311
  }
@@ -310,35 +315,35 @@ class Y {
310
315
  * @return {Promise<ReferralCookie>} code referral code if true.
311
316
  */
312
317
  async squatchReferralCookie() {
313
- const t = encodeURIComponent(this.tenantAlias), e = (S || window.Cookies).get("_saasquatch") || "", i = e ? `?cookies=${encodeURIComponent(e)}` : "", n = `${this.domain}/a/${t}/widgets/squatchcookiejson${i}`, s = await _e(n);
318
+ const t = encodeURIComponent(this.tenantAlias), e = (M || window.Cookies).get("_saasquatch") || "", n = e ? `?cookies=${encodeURIComponent(e)}` : "", i = `${this.domain}/a/${t}/widgets/squatchcookiejson${n}`, s = await qe(i);
314
319
  return Promise.resolve({
315
320
  ...s,
316
321
  encodedCookie: e
317
322
  });
318
323
  }
319
324
  }
320
- function We({
325
+ function Re({
321
326
  widgetType: o,
322
327
  engagementMedium: t,
323
328
  locale: e
324
329
  }) {
325
- const i = new URLSearchParams();
326
- return i.append("engagementMedium", t), o && i.append("widgetType", o), e && i.append("locale", e), `?${i.toString()}`;
330
+ const n = new URLSearchParams();
331
+ return n.append("engagementMedium", t), o && n.append("widgetType", o), e && n.append("locale", e), `?${n.toString()}`;
327
332
  }
328
333
  /*!
329
334
  * domready (c) Dustin Diaz 2014 - License MIT
330
335
  *
331
336
  */
332
- function X(o, t) {
333
- let e = [], i, n = o, s = n.documentElement.doScroll, r = "DOMContentLoaded", a = (s ? /^loaded|^c/ : /^loaded|^i|^c/).test(n.readyState);
334
- return a || n.addEventListener(
337
+ function Q(o, t) {
338
+ let e = [], n, i = o, s = i.documentElement.doScroll, r = "DOMContentLoaded", a = (s ? /^loaded|^c/ : /^loaded|^i|^c/).test(i.readyState);
339
+ return a || i.addEventListener(
335
340
  r,
336
- i = () => {
337
- for (n.removeEventListener(r, i), a = !0; i = e.shift(); ) i();
341
+ n = () => {
342
+ for (i.removeEventListener(r, n), a = !0; n = e.shift(); ) n();
338
343
  }
339
344
  ), a ? setTimeout(t, 0) : e.push(t);
340
345
  }
341
- function M({
346
+ function L({
342
347
  value: o,
343
348
  unit: t
344
349
  }) {
@@ -351,7 +356,7 @@ function M({
351
356
  return `${o}px`;
352
357
  }
353
358
  }
354
- class ae {
359
+ class he {
355
360
  /**
356
361
  * Initialize a new {@link AnalyticsApi} instance.
357
362
  *
@@ -361,26 +366,283 @@ class ae {
361
366
  */
362
367
  constructor(t) {
363
368
  l(this, "domain");
364
- var n;
365
- const i = qe(t);
366
- this.domain = (i == null ? void 0 : i.domain) || ((n = Q()) == null ? void 0 : n.domain) || A;
369
+ var i;
370
+ const n = Ue(t);
371
+ this.domain = (n == null ? void 0 : n.domain) || ((i = Y()) == null ? void 0 : i.domain) || A;
367
372
  }
368
373
  pushAnalyticsLoadEvent(t) {
369
374
  if (!t.externalUserId || !t.externalAccountId) return;
370
- const e = encodeURIComponent(t.tenantAlias), i = encodeURIComponent(t.externalAccountId), n = encodeURIComponent(t.externalUserId), s = encodeURIComponent(t.engagementMedium), r = t.programId ? `&programId=${encodeURIComponent(t.programId)}` : "", a = `/a/${e}/widgets/analytics/loaded?externalAccountId=${i}&externalUserId=${n}&engagementMedium=${s}${r}`, c = this.domain + a;
371
- return V(c, JSON.stringify({}));
375
+ const e = encodeURIComponent(t.tenantAlias), n = encodeURIComponent(t.externalAccountId), i = encodeURIComponent(t.externalUserId), s = encodeURIComponent(t.engagementMedium), r = t.programId ? `&programId=${encodeURIComponent(t.programId)}` : "", a = `/a/${e}/widgets/analytics/loaded?externalAccountId=${n}&externalUserId=${i}&engagementMedium=${s}${r}`, d = this.domain + a;
376
+ return X(d, JSON.stringify({}));
372
377
  }
373
378
  pushAnalyticsShareClickedEvent(t) {
374
- const e = encodeURIComponent(t.tenantAlias), i = encodeURIComponent(t.externalAccountId), n = encodeURIComponent(t.externalUserId), s = encodeURIComponent(t.engagementMedium), r = encodeURIComponent(t.shareMedium), a = `/a/${e}/widgets/analytics/shared?externalAccountId=${i}&externalUserId=${n}&engagementMedium=${s}&shareMedium=${r}`, c = this.domain + a;
375
- return V(c, JSON.stringify({}));
379
+ const e = encodeURIComponent(t.tenantAlias), n = encodeURIComponent(t.externalAccountId), i = encodeURIComponent(t.externalUserId), s = encodeURIComponent(t.engagementMedium), r = encodeURIComponent(t.shareMedium), a = `/a/${e}/widgets/analytics/shared?externalAccountId=${n}&externalUserId=${i}&engagementMedium=${s}&shareMedium=${r}`, d = this.domain + a;
380
+ return X(d, JSON.stringify({}));
376
381
  }
377
382
  }
378
- function qe(o) {
383
+ function Ue(o) {
379
384
  if (!I(o)) throw new Error("'options' should be an object");
380
385
  return o;
381
386
  }
382
- const w = E("squatch-js:widget");
383
- class ce {
387
+ const ue = ({
388
+ type: o = "verified-access",
389
+ height: t = "500px"
390
+ }) => {
391
+ const e = "#e0e0e0";
392
+ return `
393
+ <style>
394
+ * {
395
+ box-sizing: border-box;
396
+ padding: 0;
397
+ margin: 0;
398
+ }
399
+
400
+ .widget-container {
401
+ background: white;
402
+ width: 100%;
403
+ padding: 40px;
404
+ box-sizing: border-box;
405
+ overflow: hidden;
406
+ }
407
+
408
+ @keyframes shimmer {
409
+ 0% { background-position: -100% 0; }
410
+ 100% { background-position: 100% 0; }
411
+ }
412
+
413
+ .skeleton {
414
+ background: ${e};
415
+ background: linear-gradient(
416
+ 90deg,
417
+ ${e} 25%,
418
+ #f5f5f5 50%,
419
+ ${e} 75%
420
+ );
421
+ background-size: 200% 100%;
422
+ animation: shimmer 1.5s infinite linear;
423
+ border-radius: 6px;
424
+ margin-bottom: 12px;
425
+ }
426
+
427
+ /* Typography Skeletons */
428
+ .sk-title-lg { height: 36px; width: 80%; margin-bottom: 16px; }
429
+ .sk-title-md { height: 28px; width: 30%; margin-bottom: 20px; margin-top: 40px; }
430
+ .sk-text { height: 16px; width: 90%; margin-bottom: 8px; }
431
+ .sk-text-short { width: 40%; }
432
+ .sk-label { height: 14px; width: 25%; margin-bottom: 10px; }
433
+
434
+ /* Layouts */
435
+ .hero-section {
436
+ display: flex;
437
+ gap: 40px;
438
+ margin-bottom: 40px;
439
+ padding-bottom: 40px;
440
+ flex-direction: row;
441
+ height: 100%;
442
+ /* Removed border-bottom */
443
+ }
444
+
445
+ .hero-content {
446
+ flex: 1;
447
+ display: flex;
448
+ flex-direction: column;
449
+ justify-content: center;
450
+ }
451
+
452
+ .hero-image {
453
+ flex: 1;
454
+ height: 300px;
455
+ border-radius: 12px;
456
+ }
457
+
458
+ /* -- Specific Instant Access Overrides -- */
459
+ .instant-access-layout {
460
+ margin-bottom: 0;
461
+ padding-bottom: 0;
462
+ align-items: center;
463
+ }
464
+ .ia-image {
465
+ height: 400px;
466
+ }
467
+ .ia-center {
468
+ margin-left: auto;
469
+ margin-right: auto;
470
+ }
471
+ .ia-content {
472
+ align-items: center;
473
+ text-align: center;
474
+ }
475
+ .sk-btn-action {
476
+ height: 45px;
477
+ width: 140px;
478
+ border-radius: 6px;
479
+ margin: 24px auto;
480
+ }
481
+ .input-group {
482
+ display: flex;
483
+ gap: 10px;
484
+ width: 100%;
485
+ max-width: 400px;
486
+ }
487
+ .sk-btn-copy {
488
+ height: 50px;
489
+ width: 120px;
490
+ border-radius: 8px;
491
+ }
492
+ /* ------------------------------------- */
493
+
494
+ .share-section { margin-bottom: 40px; }
495
+ .sk-input { height: 50px; width: 100%; border-radius: 8px; margin-bottom: 16px; }
496
+
497
+ .social-buttons { display: flex; gap: 12px; }
498
+ .sk-btn-social { flex: 1; height: 50px; border-radius: 8px; }
499
+
500
+ .stats-section {
501
+ display: flex;
502
+ gap: 24px;
503
+ margin-bottom: 40px;
504
+ padding: 30px 0;
505
+ /* Removed border-top and border-bottom */
506
+ }
507
+ .stat-card { flex: 1; display: flex; flex-direction: column; align-items: center; }
508
+ .stat-divider { padding-left: 24px; }
509
+ .sk-stat-num { height: 48px; width: 120px; margin-bottom: 8px; }
510
+ .sk-stat-label { height: 18px; width: 80px; }
511
+
512
+ /* Table Styles */
513
+ .table-header { display: flex; gap: 16px; margin-bottom: 16px; }
514
+ .sk-th { height: 16px; }
515
+ .table-row {
516
+ display: flex;
517
+ align-items: center;
518
+ gap: 16px;
519
+ padding: 16px 0;
520
+ /* Removed border-bottom */
521
+ }
522
+
523
+ .col-user { flex: 2; }
524
+ .col-status { flex: 1; }
525
+ .col-reward { flex: 2; }
526
+ .col-date { flex: 1; }
527
+
528
+ .sk-badge { height: 28px; width: 90px; border-radius: 14px; }
529
+ .sk-reward-block { height: 36px; width: 100%; border-radius: 6px; }
530
+
531
+ .pagination { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }
532
+ .sk-btn-page { height: 36px; width: 64px; border-radius: 6px; margin-bottom: 0; }
533
+
534
+ @media (max-width: 768px) {
535
+ body { padding: 20px; }
536
+ .widget-container { padding: 24px; }
537
+
538
+ .hero-section { flex-direction: column-reverse; gap: 24px; }
539
+ .instant-access-layout { flex-direction: column; }
540
+
541
+ .hero-image { height: 220px; width: 100%; }
542
+ .sk-title-lg { width: 100%; }
543
+
544
+ .col-date { display: none; }
545
+ }
546
+ </style>
547
+
548
+ <div class="widget-container">
549
+ ${o === "verified-access" ? `
550
+ <div class="hero-section">
551
+ <div class="hero-content">
552
+ <div class="skeleton sk-title-lg"></div>
553
+ <div class="skeleton sk-text"></div>
554
+ <div class="skeleton sk-text sk-text-short"></div>
555
+ </div>
556
+ <div class="skeleton hero-image"></div>
557
+ </div>
558
+
559
+ <div class="share-section">
560
+ <div class="skeleton sk-label"></div>
561
+ <div class="skeleton sk-input"></div>
562
+ <div class="social-buttons">
563
+ <div class="skeleton sk-btn-social"></div>
564
+ <div class="skeleton sk-btn-social"></div>
565
+ <div class="skeleton sk-btn-social"></div>
566
+ <div class="skeleton sk-btn-social"></div>
567
+ </div>
568
+ </div>
569
+
570
+ <div class="skeleton sk-title-md" style="margin-top: 0; width: 30%; margin-left: auto; margin-right: auto"></div>
571
+ <div class="skeleton sk-text" style="width: 60%; margin-left: auto; margin-right: auto"></div>
572
+
573
+ <div class="stats-section">
574
+ <div class="stat-card">
575
+ <div class="skeleton sk-stat-num"></div>
576
+ <div class="skeleton sk-stat-label"></div>
577
+ </div>
578
+ <div class="stat-card stat-divider">
579
+ <div class="skeleton sk-stat-num"></div>
580
+ <div class="skeleton sk-stat-label"></div>
581
+ </div>
582
+ </div>
583
+
584
+ <div class="skeleton sk-title-md"></div>
585
+
586
+ <div class="table-header">
587
+ <div class="skeleton sk-th col-user"></div>
588
+ <div class="skeleton sk-th col-status"></div>
589
+ <div class="skeleton sk-th col-reward"></div>
590
+ <div class="skeleton sk-th col-date"></div>
591
+ </div>
592
+
593
+ <div class="table-row">
594
+ <div class="col-user"><div class="skeleton sk-text" style="width: 70%; margin: 0"></div></div>
595
+ <div class="col-status"><div class="skeleton sk-badge" style="margin: 0"></div></div>
596
+ <div class="col-reward"><div class="skeleton sk-reward-block" style="margin: 0"></div></div>
597
+ <div class="col-date"><div class="skeleton sk-text" style="width: 80%; margin: 0"></div></div>
598
+ </div>
599
+
600
+ <div class="table-row">
601
+ <div class="col-user"><div class="skeleton sk-text" style="width: 60%; margin: 0"></div></div>
602
+ <div class="col-status"><div class="skeleton sk-badge" style="margin: 0"></div></div>
603
+ <div class="col-reward"><div class="skeleton sk-reward-block" style="margin: 0"></div></div>
604
+ <div class="col-date"><div class="skeleton sk-text" style="width: 80%; margin: 0"></div></div>
605
+ </div>
606
+
607
+ <div class="table-row">
608
+ <div class="col-user"><div class="skeleton sk-text" style="width: 75%; margin: 0"></div></div>
609
+ <div class="col-status"><div class="skeleton sk-badge" style="margin: 0"></div></div>
610
+ <div class="col-reward"><div class="skeleton sk-reward-block" style="margin: 0"></div></div>
611
+ <div class="col-date"><div class="skeleton sk-text" style="width: 80%; margin: 0"></div></div>
612
+ </div>
613
+
614
+ <div class="pagination">
615
+ <div class="skeleton sk-btn-page"></div>
616
+ <div class="skeleton sk-btn-page"></div>
617
+ </div>
618
+ ` : `
619
+ <div class="hero-section instant-access-layout">
620
+ <div class="skeleton hero-image ia-image"></div>
621
+
622
+ <div class="hero-content ia-content">
623
+ <div class="skeleton sk-title-lg ia-center"></div>
624
+ <div class="skeleton sk-text ia-center"></div>
625
+
626
+ <div class="skeleton sk-btn-action"></div>
627
+
628
+ <div class="skeleton sk-label"></div>
629
+ <div class="input-group">
630
+ <div class="skeleton sk-input"></div>
631
+ <div class="skeleton sk-btn-copy"></div>
632
+ </div>
633
+
634
+ <div class="skeleton sk-text-short ia-center" style="margin-top: 20px; width: 30%"></div>
635
+ <div class="skeleton sk-text-short ia-center" style="width: 20%"></div>
636
+ </div>
637
+ </div>
638
+ `}
639
+ </div>
640
+ `;
641
+ }, Pe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
642
+ __proto__: null,
643
+ getSkeleton: ue
644
+ }, Symbol.toStringTag, { value: "Module" })), y = k("squatch-js:widget");
645
+ class pe {
384
646
  constructor(t) {
385
647
  l(this, "type");
386
648
  l(this, "content");
@@ -391,11 +653,11 @@ class ce {
391
653
  l(this, "container");
392
654
  l(this, "loadEventListener", null);
393
655
  var e;
394
- w("widget initializing ..."), this.content = t.content === "error" ? this._error(t.rsCode) : t.content, this.type = t.type, this.widgetApi = t.api, this.npmCdn = t.npmCdn, this.analyticsApi = new ae({ domain: t.domain }), this.context = t.context, this.container = ((e = t.context) == null ? void 0 : e.container) || t.container;
656
+ y("widget initializing ..."), this.content = t.content === "error" ? this._error(t.rsCode) : t.content, this.type = t.type, this.widgetApi = t.api, this.npmCdn = t.npmCdn, this.analyticsApi = new he({ domain: t.domain }), this.context = t.context, this.container = ((e = t.context) == null ? void 0 : e.container) || t.container;
395
657
  }
396
658
  _findElement() {
397
659
  let t;
398
- if (typeof this.container == "string" ? (t = document.querySelector(this.container), w("loading widget with selector", t)) : this.container instanceof HTMLElement ? (t = this.container, w("loading widget with container", t)) : this.container ? (t = null, w("container must be an HTMLElement or string", this.container)) : (t = document.querySelector("#squatchembed") || document.querySelector(".squatchembed") || document.querySelector("#impactembed") || document.querySelector(".impactembed"), w("loading widget with default selector", t)), !(t instanceof HTMLElement))
660
+ if (typeof this.container == "string" ? (t = document.querySelector(this.container), y("loading widget with selector", t)) : this.container instanceof HTMLElement ? (t = this.container, y("loading widget with container", t)) : this.container ? (t = null, y("container must be an HTMLElement or string", this.container)) : (t = document.querySelector("#squatchembed") || document.querySelector(".squatchembed") || document.querySelector("#impactembed") || document.querySelector(".impactembed"), y("loading widget with default selector", t)), !(t instanceof HTMLElement))
399
661
  throw new Error(
400
662
  `element with selector '${this.container || "#squatchembed, .squatchembed, #impactembed, or .impactembed"}' not found.'`
401
663
  );
@@ -405,8 +667,8 @@ class ce {
405
667
  const e = document.createElement("iframe");
406
668
  return e.squatchJsApi = this, e.id = "squatchFrame", e.width = "100%", e.src = "about:blank", e.scrolling = "no", e.setAttribute(
407
669
  "style",
408
- "border: 0; background-color: none; width: 1px; min-width: 100%;"
409
- ), t != null && t.minWidth && (e.style.minWidth = t.minWidth), t != null && t.maxWidth && (e.style.maxWidth = t.maxWidth), (t != null && t.maxWidth || t != null && t.minWidth) && (e.style.width = "100%"), t != null && t.initialHeight && (e.height = t.initialHeight), e;
670
+ "border: 0; background-color: none; width: 1px; min-width: 100%; display: block;"
671
+ ), t != null && t.minWidth && (e.style.minWidth = t.minWidth), t != null && t.maxWidth && (e.style.maxWidth = t.maxWidth), (t != null && t.maxWidth || t != null && t.minWidth) && (e.style.width = "100%"), t != null && t.initialHeight && (e.height = String(t.initialHeight)), e;
410
672
  }
411
673
  _findFrame() {
412
674
  const t = this.container ? this._findElement() : document.body;
@@ -421,16 +683,16 @@ class ce {
421
683
  ), this.loadEventListener = null);
422
684
  }
423
685
  _attachLoadEventListener(t, e) {
424
- this.loadEventListener === null && (this.loadEventListener = (i) => {
686
+ this.loadEventListener === null && (this.loadEventListener = (n) => {
425
687
  this._loadEvent({
426
688
  ...e,
427
- userId: i.detail.userId,
428
- accountId: i.detail.accountId
689
+ userId: n.detail.userId,
690
+ accountId: n.detail.accountId
429
691
  });
430
692
  }, t.addEventListener("sq:user-registration", this.loadEventListener));
431
693
  }
432
694
  _loadEvent(t) {
433
- var i;
695
+ var n;
434
696
  if (!t) return;
435
697
  if (!I(t))
436
698
  throw new Error("Widget Load event identity property is not an object");
@@ -446,18 +708,18 @@ class ce {
446
708
  programId: t.programId
447
709
  };
448
710
  } else {
449
- const { analytics: n, mode: s } = t;
711
+ const { analytics: i, mode: s } = t;
450
712
  e = {
451
- tenantAlias: n.attributes.tenant,
452
- externalAccountId: n.attributes.accountId,
453
- externalUserId: n.attributes.userId,
713
+ tenantAlias: i.attributes.tenant,
714
+ externalAccountId: i.attributes.accountId,
715
+ externalUserId: i.attributes.userId,
454
716
  engagementMedium: s.widgetMode
455
717
  };
456
718
  }
457
- (i = this.analyticsApi.pushAnalyticsLoadEvent(e)) == null || i.then((n) => {
458
- w(`${e.engagementMedium} loaded event recorded.`);
459
- }).catch((n) => {
460
- w(`ERROR: pushAnalyticsLoadEvent() ${n}`);
719
+ (n = this.analyticsApi.pushAnalyticsLoadEvent(e)) == null || n.then((i) => {
720
+ y(`${e.engagementMedium} loaded event recorded.`);
721
+ }).catch((i) => {
722
+ y(`ERROR: pushAnalyticsLoadEvent() ${i}`);
461
723
  });
462
724
  }
463
725
  _shareEvent(t, e) {
@@ -467,15 +729,15 @@ class ce {
467
729
  externalUserId: t.analytics.attributes.userId,
468
730
  engagementMedium: t.mode.widgetMode,
469
731
  shareMedium: e
470
- }).then((i) => {
471
- w(
472
- `${t.mode.widgetMode} share ${e} event recorded. ${i}`
732
+ }).then((n) => {
733
+ y(
734
+ `${t.mode.widgetMode} share ${e} event recorded. ${n}`
473
735
  );
474
- }).catch((i) => {
475
- w(`ERROR: pushAnalyticsShareClickedEvent() ${i}`);
736
+ }).catch((n) => {
737
+ y(`ERROR: pushAnalyticsShareClickedEvent() ${n}`);
476
738
  });
477
739
  }
478
- _error(t, e = "modal", i = "") {
740
+ _error(t, e = "modal", n = "") {
479
741
  return `<!DOCTYPE html>
480
742
  <!--[if IE 7]><html class="ie7 oldie" lang="en"><![endif]-->
481
743
  <!--[if IE 8]><html class="ie8 oldie" lang="en"><![endif]-->
@@ -483,7 +745,7 @@ class ce {
483
745
  <head>
484
746
  <link rel="stylesheet" media="all" href="https://fast.ssqt.io/assets/css/widget/errorpage.css">
485
747
  <style>
486
- ${i}
748
+ ${n}
487
749
  </style>
488
750
  </head>
489
751
  <body>
@@ -512,15 +774,38 @@ class ce {
512
774
  const { contentWindow: e } = t;
513
775
  if (!e)
514
776
  throw new Error("Squatch.js frame inner frame is empty");
515
- const i = e.document;
516
- function n() {
517
- const r = i.getElementsByTagName("sqh-global-container"), a = i.getElementsByClassName("squatch-container");
777
+ const n = e.document;
778
+ function i() {
779
+ const r = n.getElementsByTagName("sqh-global-container"), a = n.getElementsByClassName("squatch-container");
518
780
  return r.length > 0 ? r[0] : a.length > 0 ? a[0] : null;
519
781
  }
520
782
  let s = null;
521
- for (let r = 0; r < 5 && (s = n(), !s); r++)
522
- await Te(100);
523
- return s || i.body;
783
+ for (let r = 0; r < 5 && (s = i(), !s); r++)
784
+ await Me(100);
785
+ return s || n.body;
786
+ }
787
+ /**
788
+ * Returns HTML for an in-iframe skeleton preload overlay that is removed
789
+ * once all Stencil component chunks have loaded and been hydrated.
790
+ *
791
+ * Uses a MutationObserver to detect when components receive the `hydrated`
792
+ * class, debouncing removal so the skeleton stays visible until all chunks
793
+ * have finished loading. Includes a timeout fallback.
794
+ *
795
+ * Only generates content for mint-components widgets; returns empty string otherwise.
796
+ */
797
+ _getSkeletonPreloadHTML(t, e) {
798
+ if (!t) return "";
799
+ const n = this.context.type === "passwordless" ? "instant-access" : "verified-access", i = ue({
800
+ type: n,
801
+ height: "100%"
802
+ });
803
+ return `
804
+ <div id="sq-preload" style="visibility: visible; position: absolute; top: 0; left: 0; width: 100%; z-index: 9999; background: ${e || "white"};">
805
+ ${i}
806
+ </div>
807
+ <script>(${Le.toString()})()<\/script>
808
+ `;
524
809
  }
525
810
  /**
526
811
  * Reloads the current widget, makes updated request to API and renders result.
@@ -528,30 +813,30 @@ class ce {
528
813
  * @param param0 Form field values
529
814
  * @param jwt JWT for API authentication
530
815
  */
531
- reload({ email: t, firstName: e, lastName: i }, n) {
816
+ reload({ email: t, firstName: e, lastName: n }, i) {
532
817
  const s = this._findFrame();
533
818
  if (!s) throw new Error("Could not find widget iframe");
534
819
  const r = s.contentWindow, a = this.context.engagementMedium || "POPUP";
535
820
  if (!r)
536
821
  throw new Error("Frame needs a content window");
537
- let c;
822
+ let d;
538
823
  if (this.context.type === "upsert") {
539
824
  if (!this.context.user) throw new Error("Can't reload without user ids");
540
- let d = {
825
+ let c = {
541
826
  email: t || null,
542
827
  firstName: e || null,
543
- lastName: i || null,
828
+ lastName: n || null,
544
829
  id: this.context.user.id,
545
830
  accountId: this.context.user.accountId
546
831
  };
547
- c = this.widgetApi.upsertUser({
548
- user: d,
832
+ d = this.widgetApi.upsertUser({
833
+ user: c,
549
834
  engagementMedium: a,
550
835
  widgetType: this.type,
551
- jwt: n
836
+ jwt: i
552
837
  });
553
838
  } else if (this.context.type === "passwordless")
554
- c = this.widgetApi.render({
839
+ d = this.widgetApi.render({
555
840
  user: void 0,
556
841
  engagementMedium: a,
557
842
  widgetType: this.type,
@@ -559,79 +844,104 @@ class ce {
559
844
  });
560
845
  else
561
846
  throw new Error("can't reload an error widget");
562
- c.then(({ template: d }) => {
563
- d && (this.content = d, this.__deprecated__register(
847
+ d.then(({ template: c }) => {
848
+ c && (this.content = c, this.__deprecated__register(
564
849
  s,
565
850
  { email: t, engagementMedium: a },
566
851
  () => {
567
852
  this.load(), a === "POPUP" && this.open();
568
853
  }
569
854
  ));
570
- }).catch(({ message: d }) => {
571
- w(`${d}`);
855
+ }).catch(({ message: c }) => {
856
+ y(`${c}`);
572
857
  });
573
858
  }
574
- __deprecated__register(t, e, i) {
859
+ __deprecated__register(t, e, n) {
575
860
  const s = t.contentWindow.document, r = s.createElement("button"), a = s.getElementsByClassName("squatch-register")[0];
576
861
  if (a) {
577
862
  r.className = "btn btn-primary", r.id = "show-stats-btn", r.textContent = this.type === "REFERRER_WIDGET" ? "Show Stats" : "Show Reward";
578
- const c = e.engagementMedium === "POPUP" ? "margin-top: 10px; max-width: 130px; width: 100%;" : "margin-top: 10px;";
579
- r.setAttribute("style", c), r.onclick = i, a.style.paddingTop = "30px", a.innerHTML = `<p><strong>${e.email}</strong><br>Has been successfully registered</p>`, a.appendChild(r);
863
+ const d = e.engagementMedium === "POPUP" ? "margin-top: 10px; max-width: 130px; width: 100%;" : "margin-top: 10px;";
864
+ r.setAttribute("style", d), r.onclick = n, a.style.paddingTop = "30px", a.innerHTML = `<p><strong>${e.email}</strong><br>Has been successfully registered</p>`, a.appendChild(r);
580
865
  }
581
866
  }
582
867
  }
583
- function Te(o) {
868
+ function Me(o) {
584
869
  return new Promise((t) => {
585
870
  setTimeout(t, o);
586
871
  });
587
872
  }
588
- const b = E("squatch-js:EMBEDwidget");
589
- class L extends ce {
590
- constructor(e, i) {
873
+ function Le() {
874
+ var o = setTimeout(t, 1e4);
875
+ function t() {
876
+ var n = document.getElementById("sq-preload");
877
+ n && n.remove(), clearTimeout(o);
878
+ }
879
+ function e() {
880
+ var n = /* @__PURE__ */ new Set();
881
+ if (document.querySelectorAll("*").forEach(function(i) {
882
+ i.tagName.includes("-") && n.add(i.tagName.toLowerCase());
883
+ }), !n.size) return t();
884
+ Promise.all(
885
+ Array.from(n).map(function(i) {
886
+ return customElements.whenDefined(i);
887
+ })
888
+ ).then(function() {
889
+ requestAnimationFrame(function() {
890
+ requestAnimationFrame(t);
891
+ });
892
+ });
893
+ }
894
+ document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", e) : setTimeout(e, 0);
895
+ }
896
+ const E = k("squatch-js:EMBEDwidget");
897
+ class O extends pe {
898
+ constructor(e, n) {
591
899
  super(e);
592
900
  l(this, "show", this.open);
593
901
  l(this, "hide", this.close);
594
- i && (this.container = i);
902
+ n && (this.container = n);
595
903
  }
596
904
  async load() {
597
- var m, p, g, f, _, C, Z;
598
- const e = (p = (m = this.context.widgetConfig) == null ? void 0 : m.values) == null ? void 0 : p.brandingConfig, i = e == null ? void 0 : e.loadingHeight, n = (g = e == null ? void 0 : e.widgetSize) == null ? void 0 : g.embeddedWidgets, s = n != null && n.maxWidth ? M(n.maxWidth) : "", r = n != null && n.minWidth ? M(n.minWidth) : "", a = this._createFrame({
599
- minWidth: r,
600
- maxWidth: s,
905
+ var m, w, b, f, _, ee, te, ne, ie;
906
+ const e = (w = (m = this.context.widgetConfig) == null ? void 0 : m.values) == null ? void 0 : w.brandingConfig, n = (b = this.content) == null ? void 0 : b.includes("mint-components"), i = (e == null ? void 0 : e.loadingHeight) || 500, s = (f = e == null ? void 0 : e.widgetSize) == null ? void 0 : f.embeddedWidgets, r = s != null && s.maxWidth ? L(s.maxWidth) : "", a = s != null && s.minWidth ? L(s.minWidth) : "", d = this._createFrame({
907
+ minWidth: a,
908
+ maxWidth: r,
601
909
  initialHeight: i
602
910
  }), c = this._findElement();
603
- (f = this.context) != null && f.container && (c.style.visibility = "hidden", c.style.height = "0", c.style["overflow-y"] = "hidden"), this.container ? c.shadowRoot ? ((_ = c.shadowRoot.lastChild) == null ? void 0 : _.nodeName) === "IFRAME" ? c.shadowRoot.replaceChild(a, c.shadowRoot.lastChild) : c.shadowRoot.appendChild(a) : c.firstChild ? c.replaceChild(a, c.firstChild) : c.appendChild(a) : (!c.firstChild || c.firstChild.nodeName === "#text") && c.appendChild(a);
604
- const { contentWindow: d } = a;
605
- if (!d)
911
+ (_ = this.context) != null && _.container && (c.style.visibility = "hidden", c.style.height = "0", c.style["overflow-y"] = "hidden"), this.container ? c.shadowRoot ? ((ee = c.shadowRoot.lastChild) == null ? void 0 : ee.nodeName) === "IFRAME" ? c.shadowRoot.replaceChild(d, c.shadowRoot.lastChild) : c.shadowRoot.appendChild(d) : c.firstChild ? c.replaceChild(d, c.firstChild) : c.appendChild(d) : (!c.firstChild || c.firstChild.nodeName === "#text") && c.appendChild(d);
912
+ const { contentWindow: h } = d;
913
+ if (!h)
606
914
  throw new Error("Frame needs a content window");
607
- const h = d.document;
608
- h.open();
609
- const u = this.widgetApi.domain;
610
- h.write(`
611
- ${(C = e == null ? void 0 : e.main) != null && C.brandFont ? `
612
- <link rel="preconnect" href="https://fast${u === "https://staging.referralsaasquatch.com" && "-staging"}.ssqt.io">
915
+ const u = h.document;
916
+ u.open();
917
+ const g = this.widgetApi.domain === "https://staging.referralsaasquatch.com" ? "-staging" : "";
918
+ u.write(`
919
+ ${(te = e == null ? void 0 : e.main) != null && te.brandFont ? `
920
+ <link rel="preconnect" href="https://fast${g}.ssqt.io">
613
921
  <link rel="preconnect" href="https://fonts.gstatic.com">
614
922
  <link rel="preconnect" href="https://fonts.googleapis.com">
615
923
  <link rel="preload" href="https://fonts.googleapis.com/css2?family=${encodeURIComponent(
616
- (Z = e == null ? void 0 : e.main) == null ? void 0 : Z.brandFont
924
+ (ne = e == null ? void 0 : e.main) == null ? void 0 : ne.brandFont
617
925
  )}" as="style">` : ""}
618
926
  <link rel="dns-prefetch" href="https://res.cloudinary.com">
619
927
  <link rel="preconnect" href="https://res.cloudinary.com" crossorigin>
928
+ ${n ? `
620
929
  <style data-styles>
621
- html { visibility:hidden;}
622
- </style>
930
+ html { visibility: hidden; }
931
+ </style>` : ""}
932
+ ${this._getSkeletonPreloadHTML(n, (ie = e == null ? void 0 : e.color) == null ? void 0 : ie.backgroundColor)}
623
933
  ${this.content}
624
-
625
- `), h.close(), X(h, async () => {
626
- const ee = d.squatch || d.widgetIdent;
627
- a.height = i || h.body.scrollHeight;
628
- const me = new ResizeObserver((ge) => {
629
- for (const fe of ge) {
630
- const { height: we } = fe.contentRect;
631
- a.height = we;
934
+ <script src="${this.npmCdn}/resize-observer-polyfill@1.5.x"><\/script>
935
+ `), u.close(), Q(u, async () => {
936
+ const oe = h.squatch || h.widgetIdent;
937
+ d.height = i;
938
+ const ye = new h.ResizeObserver((ke) => {
939
+ for (const be of ke) {
940
+ const { height: xe } = be.contentRect;
941
+ d.height = xe;
632
942
  }
633
- }), pe = await this._findInnerContainer(a);
634
- me.observe(pe), this._shouldFireLoadEvent() ? (this._loadEvent(ee), b("loaded")) : h && this._attachLoadEventListener(h, ee);
943
+ }), ve = await this._findInnerContainer(d);
944
+ ye.observe(ve), this._shouldFireLoadEvent() ? (this._loadEvent(oe), E("loaded")) : u && this._attachLoadEventListener(u, oe);
635
945
  });
636
946
  }
637
947
  /**
@@ -639,43 +949,43 @@ class L extends ce {
639
949
  */
640
950
  open() {
641
951
  const e = this._findFrame();
642
- if (!e) return b("no target element to open");
643
- if (!e.contentWindow) return b("Frame needs a content window");
644
- const i = this._findElement();
645
- i.style.visibility = "unset", i.style.height = "auto", i.style["overflow-y"] = "auto", e.contentWindow.document.dispatchEvent(new CustomEvent("sq:refresh"));
646
- const n = e.contentWindow.squatch || e.contentWindow.widgetIdent;
952
+ if (!e) return E("no target element to open");
953
+ if (!e.contentWindow) return E("Frame needs a content window");
954
+ const n = this._findElement();
955
+ n.style.visibility = "unset", n.style.height = "auto", n.style["overflow-y"] = "auto", e.contentWindow.document.dispatchEvent(new CustomEvent("sq:refresh"));
956
+ const i = e.contentWindow.squatch || e.contentWindow.widgetIdent;
647
957
  if (this.context.user)
648
- this._loadEvent(n), b("loaded");
958
+ this._loadEvent(i), E("loaded");
649
959
  else {
650
960
  if (!e.contentDocument) return;
651
- this._attachLoadEventListener(e.contentDocument, n);
961
+ this._attachLoadEventListener(e.contentDocument, i);
652
962
  }
653
963
  }
654
964
  close() {
655
965
  const e = this._findFrame();
656
- if (!e) return b("no target element to close");
966
+ if (!e) return E("no target element to close");
657
967
  e.contentDocument && this._detachLoadEventListener(e.contentDocument);
658
- const i = this._findElement();
659
- i.style.visibility = "hidden", i.style.height = "0", i.style["overflow-y"] = "hidden", b("Embed widget closed");
968
+ const n = this._findElement();
969
+ n.style.visibility = "hidden", n.style.height = "0", n.style["overflow-y"] = "hidden", E("Embed widget closed");
660
970
  }
661
- _error(e, i = "embed", n = "") {
662
- return super._error(e, i, n);
971
+ _error(e, n = "embed", i = "") {
972
+ return super._error(e, n, i);
663
973
  }
664
974
  _shouldFireLoadEvent() {
665
- const e = !this.container, i = this.container instanceof HTMLElement && (this.container.tagName.startsWith("SQUATCH-") || this.container.tagName.startsWith("IMPACT-"));
666
- return !!this.context.user && (e || i);
975
+ const e = !this.container, n = this.container instanceof HTMLElement && (this.container.tagName.startsWith("SQUATCH-") || this.container.tagName.startsWith("IMPACT-"));
976
+ return !!this.context.user && (e || n);
667
977
  }
668
978
  }
669
- const k = E("squatch-js:POPUPwidget");
670
- let R = 0;
671
- class O extends ce {
672
- constructor(e, i = ".squatchpop") {
979
+ const T = k("squatch-js:POPUPwidget");
980
+ let U = 0;
981
+ class j extends pe {
982
+ constructor(e, n = ".squatchpop") {
673
983
  super(e);
674
984
  l(this, "trigger");
675
985
  l(this, "id");
676
986
  l(this, "show", this.open);
677
987
  l(this, "hide", this.close);
678
- this.trigger = i, this.container ? this.id = "squatchModal" : (this.id = R === 0 ? "squatchModal" : `squatchModal__${R}`, R = R + 1), document.head.insertAdjacentHTML(
988
+ this.trigger = n, this.container ? this.id = "squatchModal" : (this.id = U === 0 ? "squatchModal" : `squatchModal__${U}`, U = U + 1), document.head.insertAdjacentHTML(
679
989
  "beforeend",
680
990
  `<style>#${this.id}::-webkit-scrollbar { display: none; }</style>`
681
991
  );
@@ -684,41 +994,41 @@ class O extends ce {
684
994
  if (!this.trigger) return;
685
995
  let e;
686
996
  try {
687
- e = document.querySelector(this.trigger) || document.querySelector(".impactpop"), this.trigger && !e && k("No element found with trigger selector", this.trigger);
997
+ e = document.querySelector(this.trigger) || document.querySelector(".impactpop"), this.trigger && !e && T("No element found with trigger selector", this.trigger);
688
998
  } catch {
689
- k("Not a valid selector", this.trigger);
999
+ T("Not a valid selector", this.trigger);
690
1000
  }
691
1001
  e && (e.onclick = () => {
692
1002
  this.open();
693
1003
  });
694
1004
  }
695
1005
  _createPopupDialog(e) {
696
- var c;
697
- const i = document.createElement("dialog"), n = (c = e == null ? void 0 : e.widgetSize) == null ? void 0 : c.popupWidgets, s = n != null && n.minWidth ? M(n.minWidth) : "auto", r = n != null && n.maxWidth ? M(n.maxWidth) : "500px";
698
- i.id = this.id, i.setAttribute(
1006
+ var d;
1007
+ const n = document.createElement("dialog"), i = (d = e == null ? void 0 : e.widgetSize) == null ? void 0 : d.popupWidgets, s = i != null && i.minWidth ? L(i.minWidth) : "auto", r = i != null && i.maxWidth ? L(i.maxWidth) : "500px";
1008
+ n.id = this.id, n.setAttribute(
699
1009
  "style",
700
1010
  `width: 100%; min-width: ${s}; max-width: ${r}; border: none; padding: 0;`
701
1011
  );
702
- const a = (d) => {
703
- d.stopPropagation(), d.target === i && i.close();
1012
+ const a = (c) => {
1013
+ c.stopPropagation(), c.target === n && n.close();
704
1014
  };
705
- return i.addEventListener("click", a), i;
1015
+ return n.addEventListener("click", a), n;
706
1016
  }
707
1017
  async load() {
708
- var u, m, p, g, f;
709
- const e = (m = (u = this.context.widgetConfig) == null ? void 0 : u.values) == null ? void 0 : m.brandingConfig, i = e == null ? void 0 : e.loadingHeight, n = this._createFrame({ initialHeight: i });
710
- this._initialiseCTA();
711
- const s = this.container ? this._findElement() : document.body, r = s.shadowRoot || s, a = this._createPopupDialog(e);
712
- a.appendChild(n), ((p = r.lastChild) == null ? void 0 : p.nodeName) === "DIALOG" ? r.replaceChild(a, r.lastChild) : r.appendChild(a);
713
- const { contentWindow: c } = n;
1018
+ var p, g, m, w, b, f, _;
1019
+ const e = (g = (p = this.context.widgetConfig) == null ? void 0 : p.values) == null ? void 0 : g.brandingConfig, n = (e == null ? void 0 : e.loadingHeight) || 500, i = (m = this.content) == null ? void 0 : m.includes("mint-components"), s = this._createFrame();
1020
+ s.style.height = n + "px", this._initialiseCTA();
1021
+ const r = this.container ? this._findElement() : document.body, a = (r == null ? void 0 : r.shadowRoot) || r, d = this._createPopupDialog(e);
1022
+ d.appendChild(s), ((w = a.lastChild) == null ? void 0 : w.nodeName) === "DIALOG" ? a.replaceChild(d, a.lastChild) : a.appendChild(d);
1023
+ const { contentWindow: c } = s;
714
1024
  if (!c)
715
1025
  throw new Error("Frame needs a content window");
716
- const d = c.document;
717
- d.open();
718
- const h = this.widgetApi.domain;
719
- d.write(`
720
- ${(g = e == null ? void 0 : e.main) != null && g.brandFont ? `
721
- <link rel="preconnect" href="https://fast${h === "https://staging.referralsaasquatch.com" && "-staging"}.ssqt.io">
1026
+ const h = c.document;
1027
+ h.open();
1028
+ const u = this.widgetApi.domain;
1029
+ h.write(`
1030
+ ${(b = e == null ? void 0 : e.main) != null && b.brandFont ? `
1031
+ <link rel="preconnect" href="https://fast${u === "https://staging.referralsaasquatch.com" ? "-staging" : ""}.ssqt.io">
722
1032
  <link rel="preconnect" href="https://fonts.gstatic.com">
723
1033
  <link rel="preconnect" href="https://fonts.googleapis.com">
724
1034
  <link rel="preload" href="https://fonts.googleapis.com/css2?family=${encodeURIComponent(
@@ -726,57 +1036,61 @@ class O extends ce {
726
1036
  )}" as="style">` : ""}
727
1037
  <link rel="dns-prefetch" href="https://res.cloudinary.com">
728
1038
  <link rel="preconnect" href="https://res.cloudinary.com" crossorigin>
1039
+ ${i ? `
729
1040
  <style data-styles>
730
- html { visibility:hidden;}
731
- </style>
1041
+ html { visibility: hidden; }
1042
+ </style>` : ""}
1043
+ ${this._getSkeletonPreloadHTML(i, (_ = e == null ? void 0 : e.color) == null ? void 0 : _.backgroundColor)}
732
1044
  ${this.content}
733
-
734
- `), d.close(), k("Popup template loaded into iframe"), await this._setupResizeHandler(n, i);
1045
+ <script src="${this.npmCdn}/resize-observer-polyfill@1.5.x"><\/script>
1046
+ `), h.close(), T("Popup template loaded into iframe"), await this._setupResizeHandler(s);
735
1047
  }
736
- async _setupResizeHandler(e, i) {
1048
+ async _setupResizeHandler(e) {
737
1049
  const { contentWindow: n } = e;
738
1050
  if (!n)
739
1051
  throw new Error("Frame needs a content window");
740
- const s = n.document;
741
- X(s, async () => {
742
- s.body.style.overflowY = "hidden", e.height = i || s.body.offsetHeight, new ResizeObserver((a) => {
743
- for (const c of a) {
744
- const { top: d, bottom: h } = c.contentRect, u = h + d;
745
- e.height = u + "", c.target.style = "";
1052
+ const i = n.document;
1053
+ Q(i, async () => {
1054
+ i.body.style.overflowY = "hidden";
1055
+ let s = !0;
1056
+ new n.ResizeObserver((a) => {
1057
+ for (const d of a) {
1058
+ const { top: c, bottom: h } = d.contentRect, u = h + c;
1059
+ u <= 0 || (s ? (s = !1, e.style.height = "0", e.height = i.body.scrollHeight + "", e.style.height = "") : e.height = u + "", d.target.style = "");
746
1060
  }
747
1061
  }).observe(await this._findInnerContainer(e));
748
1062
  });
749
1063
  }
750
1064
  open() {
751
- const e = this.container ? this._findElement() : document.body, n = (e.shadowRoot || e).querySelector(`#${this.id}`);
752
- if (!n) throw new Error("Could not determine container div");
753
- n.showModal();
1065
+ const e = this.container ? this._findElement() : document.body, i = (e.shadowRoot || e).querySelector(`#${this.id}`);
1066
+ if (!i) throw new Error("Could not determine container div");
1067
+ i.showModal();
754
1068
  const s = this._findFrame();
755
1069
  if (!s) throw new Error("Could not find iframe");
756
1070
  const { contentWindow: r } = s;
757
1071
  if (!r) throw new Error("Squatch.js has an empty iframe");
758
1072
  const a = r.document;
759
- X(a, () => {
760
- var d;
761
- const c = r.squatch || r.widgetIdent;
762
- (d = s.contentDocument) == null || d.dispatchEvent(new CustomEvent("sq:refresh")), this.context.user ? (this._loadEvent(c), k("Popup opened")) : this._attachLoadEventListener(a, c);
1073
+ Q(a, () => {
1074
+ var c;
1075
+ const d = r.squatch || r.widgetIdent;
1076
+ (c = s.contentDocument) == null || c.dispatchEvent(new CustomEvent("sq:refresh")), this.context.user ? (this._loadEvent(d), T("Popup opened")) : this._attachLoadEventListener(a, d);
763
1077
  });
764
1078
  }
765
1079
  close() {
766
1080
  const e = this._findFrame();
767
1081
  e != null && e.contentDocument && this._detachLoadEventListener(e.contentDocument);
768
- const i = this.container ? this._findElement() : document.body, s = (i.shadowRoot || i).querySelector(`#${this.id}`);
1082
+ const n = this.container ? this._findElement() : document.body, s = (n.shadowRoot || n).querySelector(`#${this.id}`);
769
1083
  if (!s) throw new Error("Could not determine container div");
770
- s.close(), k("Popup closed");
1084
+ s.close(), T("Popup closed");
771
1085
  }
772
1086
  _clickedOutside({ target: e }) {
773
1087
  }
774
- _error(e, i = "modal", n = "") {
775
- return super._error(e, i, n || "body { margin: 0; } .modal { box-shadow: none; border: 0; }");
1088
+ _error(e, n = "modal", i = "") {
1089
+ return super._error(e, n, i || "body { margin: 0; } .modal { box-shadow: none; border: 0; }");
776
1090
  }
777
1091
  }
778
- const y = E("squatch-js:widgets");
779
- class j {
1092
+ const v = k("squatch-js:widgets");
1093
+ class D {
780
1094
  /**
781
1095
  * Initialize a new {@link Widgets} instance.
782
1096
  *
@@ -812,8 +1126,8 @@ class j {
812
1126
  * @default "https://fast.ssqt.io/npm"
813
1127
  */
814
1128
  l(this, "npmCdn");
815
- const e = W(t);
816
- this.tenantAlias = e.tenantAlias, this.domain = e.domain, this.npmCdn = e.npmCdn, this.api = new Y(e);
1129
+ const e = q(t);
1130
+ this.tenantAlias = e.tenantAlias, this.domain = e.domain, this.npmCdn = e.npmCdn, this.api = new K(e);
817
1131
  }
818
1132
  /**
819
1133
  * This function calls the {@link WidgetApi.upsertUser} method, and it renders
@@ -832,26 +1146,26 @@ class j {
832
1146
  * @return {Promise<WidgetResult>} json object if true, with a Widget and user details
833
1147
  */
834
1148
  async upsertUser(t) {
835
- const i = se(t);
1149
+ const n = ce(t);
836
1150
  try {
837
- const n = await this.api.upsertUser(i);
1151
+ const i = await this.api.upsertUser(n);
838
1152
  return {
839
- widget: this._renderWidget(n, i, {
1153
+ widget: this._renderWidget(i, n, {
840
1154
  type: "upsert",
841
- user: i.user,
1155
+ user: n.user,
842
1156
  engagementMedium: t.engagementMedium,
843
1157
  container: t.container,
844
1158
  trigger: t.trigger,
845
1159
  widgetConfig: {
846
1160
  values: {
847
- brandingConfig: n == null ? void 0 : n.brandingConfig
1161
+ brandingConfig: i == null ? void 0 : i.brandingConfig
848
1162
  }
849
1163
  }
850
1164
  }),
851
- user: n.user
1165
+ user: i.user
852
1166
  };
853
- } catch (n) {
854
- throw y(n), n.apiErrorCode && this._renderErrorWidget(n, t.engagementMedium), new Error(n);
1167
+ } catch (i) {
1168
+ throw v(i), i.apiErrorCode && this._renderErrorWidget(i, t.engagementMedium), new Error(i);
855
1169
  }
856
1170
  }
857
1171
  /**
@@ -870,21 +1184,21 @@ class j {
870
1184
  * @return {Promise<WidgetResult>} json object if true, with a Widget and user details
871
1185
  */
872
1186
  async render(t) {
873
- const i = re(t);
1187
+ const n = le(t);
874
1188
  try {
875
- const n = await this.api.render(i);
1189
+ const i = await this.api.render(n);
876
1190
  return {
877
- widget: this._renderWidget(n, i, {
1191
+ widget: this._renderWidget(i, n, {
878
1192
  type: "passwordless",
879
- engagementMedium: i.engagementMedium,
880
- container: i.container,
881
- trigger: i.trigger,
882
- widgetConfig: n == null ? void 0 : n.widgetConfig
1193
+ engagementMedium: n.engagementMedium,
1194
+ container: n.container,
1195
+ trigger: n.trigger,
1196
+ widgetConfig: i == null ? void 0 : i.widgetConfig
883
1197
  }),
884
- user: n.user
1198
+ user: i.user
885
1199
  };
886
- } catch (n) {
887
- throw n.apiErrorCode && this._renderErrorWidget(n, i.engagementMedium), new Error(n);
1200
+ } catch (i) {
1201
+ throw i.apiErrorCode && this._renderErrorWidget(i, n.engagementMedium), new Error(i);
888
1202
  }
889
1203
  }
890
1204
  /**
@@ -901,20 +1215,20 @@ class j {
901
1215
  const s = await this.api.squatchReferralCookie();
902
1216
  e(s);
903
1217
  } catch (s) {
904
- throw y("Autofill error", s), new Error(s);
1218
+ throw v("Autofill error", s), new Error(s);
905
1219
  }
906
1220
  return;
907
1221
  }
908
1222
  if (typeof e != "string")
909
1223
  throw new Error("Autofill accepts a string or function");
910
- let i = document.querySelectorAll(e), n;
911
- if (i.length > 0)
912
- n = i[0];
1224
+ let n = document.querySelectorAll(e), i;
1225
+ if (n.length > 0)
1226
+ i = n[0];
913
1227
  else
914
- throw y("Element id/class or function missing"), new Error("Element id/class or function missing");
1228
+ throw v("Element id/class or function missing"), new Error("Element id/class or function missing");
915
1229
  try {
916
1230
  const s = await this.api.squatchReferralCookie();
917
- n.value = s.codes[0];
1231
+ i.value = s.codes[0];
918
1232
  } catch (s) {
919
1233
  throw new Error(s);
920
1234
  }
@@ -927,41 +1241,41 @@ class j {
927
1241
  * @param {string} config.engagementMedium (POPUP, EMBED)
928
1242
  * @returns {Widget} widget (PopupWidget or EmbedWidget)
929
1243
  */
930
- _renderWidget(t, e, i) {
931
- var c;
932
- if (y("Rendering Widget..."), !t) throw new Error("Unable to get a response");
933
- let n, s = !!e.displayOnLoad;
1244
+ _renderWidget(t, e, n) {
1245
+ var d;
1246
+ if (v("Rendering Widget..."), !t) throw new Error("Unable to get a response");
1247
+ let i, s = !!e.displayOnLoad;
934
1248
  const r = t.jsOptions || {}, a = {
935
1249
  content: t.template,
936
- type: e.widgetType || ((c = r.widget) == null ? void 0 : c.defaultWidgetType),
1250
+ type: e.widgetType || ((d = r.widget) == null ? void 0 : d.defaultWidgetType),
937
1251
  api: this.api,
938
1252
  domain: this.domain,
939
1253
  npmCdn: this.npmCdn,
940
- context: i
1254
+ context: n
941
1255
  };
942
- return r.widgetUrlMappings && r.widgetUrlMappings.forEach((d) => {
1256
+ return r.widgetUrlMappings && r.widgetUrlMappings.forEach((c) => {
943
1257
  var h, u;
944
- j._matchesUrl(d.url) && (d.widgetType !== "CONVERSION_WIDGET" || (u = (h = t.user) == null ? void 0 : h.referredBy) != null && u.code ? (s = d.displayOnLoad, y(`Display ${d.widgetType} on ${d.url}`)) : y(
945
- `Don't display ${d.widgetType} when no referral on widget rule match ${d.url}`
1258
+ D._matchesUrl(c.url) && (c.widgetType !== "CONVERSION_WIDGET" || (u = (h = t.user) == null ? void 0 : h.referredBy) != null && u.code ? (s = c.displayOnLoad, v(`Display ${c.widgetType} on ${c.url}`)) : v(
1259
+ `Don't display ${c.widgetType} when no referral on widget rule match ${c.url}`
946
1260
  ));
947
- }), r.fuelTankAutofillUrls && (y("We found a fuel tank autofill!"), r.fuelTankAutofillUrls.forEach(({ url: d, formSelector: h }) => {
948
- var u, m, p;
949
- if (j._matchesUrl(d) && (y("Fuel Tank URL matches"), (m = (u = t.user) == null ? void 0 : u.referredBy) != null && m.code)) {
950
- const g = document.querySelector(h);
951
- g ? g.value = ((p = t.user.referredBy.referredReward) == null ? void 0 : p.fuelTankCode) || "" : y(
1261
+ }), r.fuelTankAutofillUrls && (v("We found a fuel tank autofill!"), r.fuelTankAutofillUrls.forEach(({ url: c, formSelector: h }) => {
1262
+ var u, p, g;
1263
+ if (D._matchesUrl(c) && (v("Fuel Tank URL matches"), (p = (u = t.user) == null ? void 0 : u.referredBy) != null && p.code)) {
1264
+ const m = document.querySelector(h);
1265
+ m ? m.value = ((g = t.user.referredBy.referredReward) == null ? void 0 : g.fuelTankCode) || "" : v(
952
1266
  new Error(
953
1267
  `Element with id/class ${h} was not found.`
954
1268
  )
955
1269
  );
956
1270
  }
957
- })), e.engagementMedium === "EMBED" ? n = this._renderEmbedWidget(a) : (n = this._renderPopupWidget(a), s && n.open()), n;
1271
+ })), e.engagementMedium === "EMBED" ? i = this._renderEmbedWidget(a) : (i = this._renderPopupWidget(a), s && i.open()), i;
958
1272
  }
959
1273
  _renderPopupWidget(t) {
960
- const e = new O(t, t.context.trigger);
1274
+ const e = new j(t, t.context.trigger);
961
1275
  return e.load(), e;
962
1276
  }
963
1277
  _renderEmbedWidget(t) {
964
- const e = new L(t, t.context.container);
1278
+ const e = new O(t, t.context.container);
965
1279
  return e.load(), e;
966
1280
  }
967
1281
  /**
@@ -971,11 +1285,11 @@ class j {
971
1285
  * @returns {void}
972
1286
  */
973
1287
  _renderErrorWidget(t, e = "POPUP") {
974
- const { apiErrorCode: i, rsCode: n, message: s } = t;
975
- y(new Error(`${i} (${n}) ${s}`));
1288
+ const { apiErrorCode: n, rsCode: i, message: s } = t;
1289
+ v(new Error(`${n} (${i}) ${s}`));
976
1290
  const r = {
977
1291
  content: "error",
978
- rsCode: n,
1292
+ rsCode: i,
979
1293
  api: this.api,
980
1294
  domain: this.domain,
981
1295
  npmCdn: this.npmCdn,
@@ -983,7 +1297,7 @@ class j {
983
1297
  context: { type: "error" }
984
1298
  };
985
1299
  let a;
986
- e === "EMBED" ? (a = new L(r), a.load()) : e === "POPUP" && (a = new O(r), a.load());
1300
+ e === "EMBED" ? (a = new O(r), a.load()) : e === "POPUP" && (a = new j(r), a.load());
987
1301
  }
988
1302
  /**
989
1303
  * @hidden
@@ -994,7 +1308,7 @@ class j {
994
1308
  return !!window.location.href.match(new RegExp(t));
995
1309
  }
996
1310
  }
997
- class Ue {
1311
+ class Oe {
998
1312
  /**
999
1313
  * Initialize a new {@link EventsApi} instance.
1000
1314
  *
@@ -1014,8 +1328,8 @@ class Ue {
1014
1328
  constructor(t) {
1015
1329
  l(this, "tenantAlias");
1016
1330
  l(this, "domain");
1017
- const i = W(t);
1018
- this.tenantAlias = i.tenantAlias, this.domain = i.domain;
1331
+ const n = q(t);
1332
+ this.tenantAlias = n.tenantAlias, this.domain = n.domain;
1019
1333
  }
1020
1334
  /**
1021
1335
  * Track an event for a user
@@ -1026,11 +1340,11 @@ class Ue {
1026
1340
  * @return An ID to confirm the event has been accepted for asynchronous processing
1027
1341
  */
1028
1342
  track(t, e) {
1029
- const i = t, n = e, s = Re(i), { jwt: r } = $e(n), a = encodeURIComponent(this.tenantAlias), c = encodeURIComponent(s.userId), d = encodeURIComponent(s.accountId), h = `/api/v1/${a}/open/account/${d}/user/${c}/events`, u = this.domain + h;
1030
- return V(u, JSON.stringify(s), r);
1343
+ const n = t, i = e, s = je(n), { jwt: r } = De(i), a = encodeURIComponent(this.tenantAlias), d = encodeURIComponent(s.userId), c = encodeURIComponent(s.accountId), h = `/api/v1/${a}/open/account/${c}/user/${d}/events`, u = this.domain + h;
1344
+ return X(u, JSON.stringify(s), r);
1031
1345
  }
1032
1346
  }
1033
- function Re(o) {
1347
+ function je(o) {
1034
1348
  if (!I(o)) throw new Error("tracking parameter must be an object");
1035
1349
  if (!(o != null && o.accountId)) throw new Error("accountId field is required");
1036
1350
  if (!(o != null && o.events)) throw new Error("events field is required");
@@ -1040,68 +1354,68 @@ function Re(o) {
1040
1354
  throw new Error("'events' should be an array");
1041
1355
  return t;
1042
1356
  }
1043
- function $e(o) {
1357
+ function De(o) {
1044
1358
  if (!I(o)) throw new Error("'options' should be an object");
1045
1359
  return o;
1046
1360
  }
1047
- function Pe() {
1048
- var n;
1049
- const o = window[J] ? J : U, t = ((n = window["_" + o]) == null ? void 0 : n.ready) || [], e = window.impactOnReady || window.squatchOnReady, i = [...t, e].filter((s) => !!s);
1361
+ function Ne() {
1362
+ var i;
1363
+ const o = window[z] ? z : R, t = ((i = window["_" + o]) == null ? void 0 : i.ready) || [], e = window.impactOnReady || window.squatchOnReady, n = [...t, e].filter((s) => !!s);
1050
1364
  setTimeout(() => {
1051
- window[U] && (window[J] = window[U], i.forEach((s) => s()), window[U]._auto(), window["_" + o] = void 0, delete window["_" + o]);
1365
+ window[R] && (window[z] = window[R], n.forEach((s) => s()), window[R]._auto(), window["_" + o] = void 0, delete window["_" + o]);
1052
1366
  }, 0);
1053
1367
  }
1054
- const v = E("squatch-js"), te = (o) => typeof o == "object" && !Array.isArray(o), de = (o, t) => {
1055
- const e = (n) => te(t[n]) && o.hasOwnProperty(n) && te(o[n]), i = Object.getOwnPropertyNames(t).map((n) => ({
1056
- [n]: e(n) ? de(o[n], t[n]) : t[n]
1057
- })).reduce((n, s) => ({ ...n, ...s }), {});
1368
+ const x = k("squatch-js"), se = (o) => typeof o == "object" && !Array.isArray(o), me = (o, t) => {
1369
+ const e = (i) => se(t[i]) && o.hasOwnProperty(i) && se(o[i]), n = Object.getOwnPropertyNames(t).map((i) => ({
1370
+ [i]: e(i) ? me(o[i], t[i]) : t[i]
1371
+ })).reduce((i, s) => ({ ...i, ...s }), {});
1058
1372
  return {
1059
1373
  ...o,
1060
- ...i
1374
+ ...n
1061
1375
  };
1062
1376
  };
1063
- function D(o) {
1377
+ function N(o) {
1064
1378
  const t = atob(o.replace(/_/g, "/").replace(/-/g, "+")), e = new Uint8Array(t.length);
1065
- for (let i = 0; i < t.length; i++)
1066
- e[i] = t.charCodeAt(i);
1379
+ for (let n = 0; n < t.length; n++)
1380
+ e[n] = t.charCodeAt(n);
1067
1381
  return new TextDecoder("utf8").decode(e);
1068
1382
  }
1069
- function ne(o) {
1383
+ function re(o) {
1070
1384
  const t = new TextEncoder().encode(o), e = Array.from(
1071
1385
  t,
1072
- (i) => String.fromCodePoint(i)
1386
+ (n) => String.fromCodePoint(n)
1073
1387
  ).join("");
1074
1388
  return btoa(e).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
1075
1389
  }
1076
- function Se() {
1077
- var o, t, e = "weird_get_top_level_domain=cookie", i = document.location.hostname.split(".");
1078
- for (o = i.length - 1; o >= 0; o--)
1079
- if (t = i.slice(o).join("."), document.cookie = e + ";domain=." + t + ";", document.cookie.indexOf(e) > -1)
1390
+ function Fe() {
1391
+ var o, t, e = "weird_get_top_level_domain=cookie", n = document.location.hostname.split(".");
1392
+ for (o = n.length - 1; o >= 0; o--)
1393
+ if (t = n.slice(o).join("."), document.cookie = e + ";domain=." + t + ";", document.cookie.indexOf(e) > -1)
1080
1394
  return document.cookie = e.split("=")[0] + "=;domain=." + t + ";expires=Thu, 01 Jan 1970 00:00:01 GMT;", t;
1081
1395
  }
1082
- function Me() {
1396
+ function He() {
1083
1397
  const o = window.location.search, e = new URLSearchParams(o).get("_saasquatch") || "";
1084
1398
  if (e) {
1085
- let i = "", n = "", s = "";
1399
+ let n = "", i = "", s = "";
1086
1400
  try {
1087
- i = JSON.parse(D(e));
1401
+ n = JSON.parse(N(e));
1088
1402
  } catch (r) {
1089
- v("Unable to decode params", r);
1403
+ x("Unable to decode params", r);
1090
1404
  return;
1091
1405
  }
1092
1406
  try {
1093
- n = JSON.parse(D(S.get("_saasquatch"))), v("existing cookie", n);
1407
+ i = JSON.parse(N(M.get("_saasquatch"))), x("existing cookie", i);
1094
1408
  } catch (r) {
1095
- v("Unable to retrieve cookie", r);
1409
+ x("Unable to retrieve cookie", r);
1096
1410
  }
1097
1411
  try {
1098
- const r = Se();
1099
- if (v("domain retrieved:", r), n) {
1100
- const a = de(n, i);
1101
- s = ne(JSON.stringify(a)), v("cookie to store:", a);
1412
+ const r = Fe();
1413
+ if (x("domain retrieved:", r), i) {
1414
+ const a = me(i, n);
1415
+ s = re(JSON.stringify(a)), x("cookie to store:", a);
1102
1416
  } else
1103
- s = ne(JSON.stringify(i)), v("cookie to store:", i);
1104
- S.set("_saasquatch", s, {
1417
+ s = re(JSON.stringify(n)), x("cookie to store:", n);
1418
+ M.set("_saasquatch", s, {
1105
1419
  expires: 365,
1106
1420
  secure: !1,
1107
1421
  sameSite: "Lax",
@@ -1109,67 +1423,67 @@ function Me() {
1109
1423
  path: "/"
1110
1424
  });
1111
1425
  } catch (r) {
1112
- v("Unable to set cookie", r);
1426
+ x("Unable to set cookie", r);
1113
1427
  }
1114
1428
  }
1115
1429
  }
1116
- const $ = E("squatch-js");
1117
- function Le() {
1430
+ const P = k("squatch-js");
1431
+ function Be() {
1118
1432
  var u;
1119
1433
  const o = window.location.search, e = new URLSearchParams(o).get("_saasquatchExtra") || "";
1120
1434
  if (!e) {
1121
- $("No _saasquatchExtra param");
1435
+ P("No _saasquatchExtra param");
1122
1436
  return;
1123
1437
  }
1124
- const i = W({
1438
+ const n = q({
1125
1439
  tenantAlias: "UNKNOWN"
1126
1440
  });
1127
- if (!i.domain) {
1128
- $("domain must be provided in config to use _saasquatchExtra");
1441
+ if (!n.domain) {
1442
+ P("domain must be provided in config to use _saasquatchExtra");
1129
1443
  return;
1130
1444
  }
1131
- let n;
1445
+ let i;
1132
1446
  try {
1133
- n = JSON.parse(D(e));
1447
+ i = JSON.parse(N(e));
1134
1448
  } catch {
1135
- $("Unable to decode _saasquatchExtra config");
1449
+ P("Unable to decode _saasquatchExtra config");
1136
1450
  return;
1137
1451
  }
1138
- function s(m) {
1139
- return m.replace(/^https?:\/\//, "");
1452
+ function s(p) {
1453
+ return p.replace(/^https?:\/\//, "");
1140
1454
  }
1141
- const r = s(i.domain), a = Object.keys((n == null ? void 0 : n[r]) || {})[0], c = (u = n == null ? void 0 : n[r]) == null ? void 0 : u[a];
1142
- if (!c) {
1143
- $("_saasquatchExtra did not have an expected structure");
1455
+ const r = s(n.domain), a = Object.keys((i == null ? void 0 : i[r]) || {})[0], d = (u = i == null ? void 0 : i[r]) == null ? void 0 : u[a];
1456
+ if (!d) {
1457
+ P("_saasquatchExtra did not have an expected structure");
1144
1458
  return;
1145
1459
  }
1146
- const { autoPopupWidgetType: d, ...h } = c;
1460
+ const { autoPopupWidgetType: c, ...h } = d;
1147
1461
  return {
1148
1462
  widgetConfig: {
1149
- widgetType: d,
1463
+ widgetType: c,
1150
1464
  displayOnLoad: !0,
1151
1465
  ...h
1152
1466
  },
1153
1467
  squatchConfig: {
1154
- ...i,
1468
+ ...n,
1155
1469
  tenantAlias: a
1156
1470
  }
1157
1471
  };
1158
1472
  }
1159
- const Oe = E("squatch-js:decodeUserJwt");
1160
- function je(o) {
1473
+ const Je = k("squatch-js:decodeUserJwt");
1474
+ function ze(o) {
1161
1475
  var t;
1162
1476
  try {
1163
1477
  const e = o.split(".")[1];
1164
1478
  if (e === void 0) return null;
1165
- const i = D(e);
1166
- return (t = JSON.parse(i)) == null ? void 0 : t.user;
1479
+ const n = N(e);
1480
+ return (t = JSON.parse(n)) == null ? void 0 : t.user;
1167
1481
  } catch (e) {
1168
- return Oe(e), null;
1482
+ return Je(e), null;
1169
1483
  }
1170
1484
  }
1171
- const ie = E("squatch-js:DeclarativeWidget");
1172
- class le extends HTMLElement {
1485
+ const ae = k("squatch-js:DeclarativeWidget");
1486
+ class ge extends HTMLElement {
1173
1487
  constructor() {
1174
1488
  super();
1175
1489
  /**
@@ -1222,28 +1536,28 @@ class le extends HTMLElement {
1222
1536
  * @hidden
1223
1537
  */
1224
1538
  l(this, "loaded");
1225
- l(this, "_setWidget", (e, i) => {
1539
+ l(this, "_setWidget", (e, n) => {
1226
1540
  var s;
1227
- const n = {
1541
+ const i = {
1228
1542
  api: this.widgetApi,
1229
1543
  content: e.template,
1230
1544
  context: {
1231
- type: i.type,
1232
- user: i.user,
1545
+ type: n.type,
1546
+ user: n.user,
1233
1547
  container: this.container || void 0,
1234
1548
  engagementMedium: this.type,
1235
1549
  widgetConfig: e.widgetConfig
1236
1550
  },
1237
1551
  type: this.widgetType,
1238
1552
  domain: ((s = this.config) == null ? void 0 : s.domain) || A,
1239
- npmCdn: z,
1553
+ npmCdn: V,
1240
1554
  container: this
1241
1555
  };
1242
1556
  if (this.type === "EMBED")
1243
- return new L(n);
1557
+ return new O(i);
1244
1558
  {
1245
1559
  const r = this.firstChild ? null : void 0;
1246
- return new O(n, r);
1560
+ return new j(i, r);
1247
1561
  }
1248
1562
  });
1249
1563
  /**
@@ -1251,8 +1565,8 @@ class le extends HTMLElement {
1251
1565
  * @returns Instance of either {@link EmbedWidget} or {@link PopupWidget} depending on `this.type`
1252
1566
  */
1253
1567
  l(this, "setErrorWidget", (e) => {
1254
- var n;
1255
- const i = {
1568
+ var i;
1569
+ const n = {
1256
1570
  api: this.widgetApi,
1257
1571
  content: "error",
1258
1572
  context: {
@@ -1260,15 +1574,15 @@ class le extends HTMLElement {
1260
1574
  container: this.container || void 0
1261
1575
  },
1262
1576
  type: "ERROR_WIDGET",
1263
- domain: ((n = this.config) == null ? void 0 : n.domain) || A,
1264
- npmCdn: z,
1577
+ domain: ((i = this.config) == null ? void 0 : i.domain) || A,
1578
+ npmCdn: V,
1265
1579
  container: this
1266
1580
  };
1267
1581
  if (this.type === "EMBED")
1268
- return new L(i);
1582
+ return new O(n);
1269
1583
  {
1270
1584
  const s = this.firstChild ? null : void 0;
1271
- return new O(i, s);
1585
+ return new j(n, s);
1272
1586
  }
1273
1587
  });
1274
1588
  l(this, "reload", this.renderWidget);
@@ -1276,23 +1590,23 @@ class le extends HTMLElement {
1276
1590
  l(this, "hide", this.close);
1277
1591
  this.attachShadow({
1278
1592
  mode: "open"
1279
- }).innerHTML = "<style>:host { display: block; }</style><slot></slot>", this.config = Q(), this.token = q(), this.tenant = window.squatchTenant, this.container = this;
1593
+ }).innerHTML = "<style>:host { display: block; }</style><slot></slot>", this.config = Y(), this.token = W(), this.tenant = window.squatchTenant, this.container = this;
1280
1594
  }
1281
1595
  _setupApis(e) {
1282
- var i, n;
1596
+ var n, i;
1283
1597
  if (!this.tenant) throw new Error("tenantAlias not provided");
1284
- this.widgetApi = new Y({
1598
+ this.widgetApi = new K({
1285
1599
  tenantAlias: (e == null ? void 0 : e.tenantAlias) || this.tenant,
1286
- domain: (e == null ? void 0 : e.domain) || ((i = this.config) == null ? void 0 : i.domain) || A
1287
- }), this.analyticsApi = new ae({
1288
1600
  domain: (e == null ? void 0 : e.domain) || ((n = this.config) == null ? void 0 : n.domain) || A
1601
+ }), this.analyticsApi = new he({
1602
+ domain: (e == null ? void 0 : e.domain) || ((i = this.config) == null ? void 0 : i.domain) || A
1289
1603
  });
1290
1604
  }
1291
1605
  getWidgetType(e) {
1292
1606
  return e && (e.includes("websiteReferralWidget") || e.includes("friendWidget")) ? "instant-access" : "verified-access";
1293
1607
  }
1294
1608
  async renderPasswordlessVariant() {
1295
- return this._setupApis(), ie("Rendering as an Instant Access widget"), await this.widgetApi.render({
1609
+ return this._setupApis(), ae("Rendering as an Instant Access widget"), await this.widgetApi.render({
1296
1610
  engagementMedium: this.type,
1297
1611
  widgetType: this.widgetType,
1298
1612
  locale: this.locale
@@ -1300,8 +1614,8 @@ class le extends HTMLElement {
1300
1614
  }
1301
1615
  async renderUserUpsertVariant() {
1302
1616
  this._setupApis();
1303
- const e = je(this.token);
1304
- return e ? (ie("Rendering as a Verified widget"), await this.widgetApi.upsertUser({
1617
+ const e = ze(this.token);
1618
+ return e ? (ae("Rendering as a Verified widget"), await this.widgetApi.upsertUser({
1305
1619
  user: e,
1306
1620
  locale: this.locale,
1307
1621
  engagementMedium: this.type,
@@ -1311,7 +1625,7 @@ class le extends HTMLElement {
1311
1625
  locale: this.locale,
1312
1626
  engagementMedium: this.type,
1313
1627
  widgetType: this.widgetType
1314
- }).then((n) => this._setWidget(n, { type: "upsert", user: e })).catch(this.setErrorWidget)) : this.setErrorWidget(Error("No user object in token."));
1628
+ }).then((i) => this._setWidget(i, { type: "upsert", user: e })).catch(this.setErrorWidget)) : this.setErrorWidget(Error("No user object in token."));
1315
1629
  }
1316
1630
  /**
1317
1631
  * Fetches widget content from SaaSquatch and builds a Widget instance to support rendering the widget in the DOM
@@ -1348,8 +1662,8 @@ class le extends HTMLElement {
1348
1662
  static get observedAttributes() {
1349
1663
  return ["widget", "locale"];
1350
1664
  }
1351
- attributeChangedCallback(e, i, n) {
1352
- if (!(i === n || !this.loaded))
1665
+ attributeChangedCallback(e, n, i) {
1666
+ if (!(n === i || !this.loaded))
1353
1667
  switch (e) {
1354
1668
  case "locale":
1355
1669
  case "widget":
@@ -1359,15 +1673,15 @@ class le extends HTMLElement {
1359
1673
  }
1360
1674
  async connectedCallback() {
1361
1675
  this.loaded = !0, this.container = this.getAttribute("container"), this.widgetType = this.getAttribute("widget") || void 0;
1362
- const e = this.getWidgetType(this.widgetType), { getSkeleton: i } = await import("./SkeletonTemplate-CIRGs_GB.js"), n = i({
1676
+ const e = this.getWidgetType(this.widgetType), { getSkeleton: n } = await Promise.resolve().then(() => Pe), i = n({
1363
1677
  height: "100%",
1364
1678
  type: e
1365
1679
  }), s = document.createElement("div");
1366
- s.id = "loading-skeleton", s.innerHTML = n;
1680
+ s.id = "loading-skeleton", s.innerHTML = i;
1367
1681
  const r = this.shadowRoot || this.attachShadow({ mode: "open" });
1368
1682
  if (this.type === "POPUP") {
1369
- const c = r.getElementById("#squatchModal");
1370
- c && (c.innerHTML = "", c.appendChild(s));
1683
+ const d = r.getElementById("#squatchModal");
1684
+ d && (d.innerHTML = "", d.appendChild(s));
1371
1685
  } else
1372
1686
  r.innerHTML = "", r.appendChild(s);
1373
1687
  await this.renderWidget();
@@ -1375,93 +1689,93 @@ class le extends HTMLElement {
1375
1689
  a && a.remove(), this.getAttribute("open") !== null && this.open();
1376
1690
  }
1377
1691
  }
1378
- class he extends le {
1692
+ class fe extends ge {
1379
1693
  constructor() {
1380
1694
  super(), this.type = "EMBED", this.loaded = !1;
1381
1695
  }
1382
1696
  }
1383
- class ue extends le {
1697
+ class we extends ge {
1384
1698
  constructor() {
1385
1699
  super(), this.type = "POPUP", this.loaded = !1, this.addEventListener("click", (t) => {
1386
1700
  t.stopPropagation(), this.open();
1387
1701
  });
1388
1702
  }
1389
1703
  }
1390
- class De extends he {
1704
+ class Ge extends fe {
1391
1705
  }
1392
- class Ne extends ue {
1706
+ class Ve extends we {
1393
1707
  }
1394
- class Fe extends he {
1708
+ class Xe extends fe {
1395
1709
  }
1396
- class He extends ue {
1710
+ class Qe extends we {
1397
1711
  }
1398
- window.customElements.get("squatch-embed") || window.customElements.define("squatch-embed", De);
1399
- window.customElements.get("impact-embed") || window.customElements.define("impact-embed", Fe);
1400
- window.customElements.get("squatch-popup") || window.customElements.define("squatch-popup", Ne);
1401
- window.customElements.get("impact-popup") || window.customElements.define("impact-popup", He);
1402
- function Ge() {
1712
+ window.customElements.get("squatch-embed") || window.customElements.define("squatch-embed", Ge);
1713
+ window.customElements.get("impact-embed") || window.customElements.define("impact-embed", Xe);
1714
+ window.customElements.get("squatch-popup") || window.customElements.define("squatch-popup", Ve);
1715
+ window.customElements.get("impact-popup") || window.customElements.define("impact-popup", Qe);
1716
+ function Ze() {
1403
1717
  console.log(
1404
1718
  "Having trouble using Squatch.js? Go to https://docs.referralsaasquatch.com/developer/ for tutorials, references and error codes."
1405
1719
  );
1406
1720
  }
1407
- const x = E("squatch-js");
1408
- let N = null, F = null, H = null;
1409
- function ze() {
1410
- return N || B({}), N;
1721
+ const $ = k("squatch-js");
1722
+ let F = null, H = null, B = null;
1723
+ function et() {
1724
+ return F || J({}), F;
1411
1725
  }
1412
- function K() {
1413
- return F || B({}), F;
1726
+ function Z() {
1727
+ return H || J({}), H;
1414
1728
  }
1415
- function Ve() {
1416
- return H || B({}), H;
1729
+ function tt() {
1730
+ return B || J({}), B;
1417
1731
  }
1418
- function Xe(o) {
1732
+ function nt(o) {
1419
1733
  var t;
1420
- return (t = K()) == null ? void 0 : t.render(o);
1734
+ return (t = Z()) == null ? void 0 : t.render(o);
1421
1735
  }
1422
- function Qe() {
1736
+ function it() {
1423
1737
  var t;
1424
- const o = Le();
1738
+ const o = Be();
1425
1739
  if (o) {
1426
- const { squatchConfig: e, widgetConfig: i } = o;
1427
- return B(e), (t = K()) == null ? void 0 : t.render(i);
1740
+ const { squatchConfig: e, widgetConfig: n } = o;
1741
+ return J(e), (t = Z()) == null ? void 0 : t.render(n);
1428
1742
  }
1429
1743
  }
1430
- function B(o) {
1431
- const e = W(o);
1432
- e.tenantAlias.match("^test") || e.debug ? Ce("squatch-js*") : ve(), x("initializing ..."), N = new Y(e), F = new j(e), H = new Ue(e), x("Widget API instance", N), x("Widgets instance", F), x("Events API instance", H);
1744
+ function J(o) {
1745
+ const e = q(o);
1746
+ e.tenantAlias.match("^test") || e.debug ? Ae("squatch-js*") : Ie(), $("initializing ..."), F = new K(e), H = new D(e), B = new Oe(e), $("Widget API instance", F), $("Widgets instance", H), $("Events API instance", B);
1433
1747
  }
1434
- function Ye(o) {
1748
+ function ot(o) {
1435
1749
  o();
1436
1750
  }
1437
- function Ke(o) {
1438
- K().autofill(o);
1751
+ function st(o) {
1752
+ Z().autofill(o);
1439
1753
  }
1440
- function Be() {
1441
- Me();
1754
+ function Ye() {
1755
+ He();
1442
1756
  }
1443
- typeof document < "u" && !window.SaaSquatchDoNotAutoDrop && Be();
1444
- var oe;
1445
- (oe = window.squatch) != null && oe.init && x(
1757
+ typeof document < "u" && !window.SaaSquatchDoNotAutoDrop && Ye();
1758
+ var de;
1759
+ (de = window.squatch) != null && de.init && $(
1446
1760
  "Squatchjs is being loaded more than once. This may lead to multiple load events being sent, duplicated widgets, and inaccurate analytics."
1447
1761
  );
1448
- typeof document < "u" && Pe();
1762
+ typeof document < "u" && Ne();
1449
1763
  export {
1450
- he as DeclarativeEmbedWidget,
1451
- ue as DeclarativePopupWidget,
1452
- L as EmbedWidget,
1453
- O as PopupWidget,
1454
- Y as WidgetApi,
1455
- j as Widgets,
1456
- Qe as _auto,
1457
- ze as api,
1458
- Ke as autofill,
1459
- Ve as events,
1460
- Ge as help,
1461
- B as init,
1462
- Be as pushCookie,
1463
- Ye as ready,
1464
- Xe as widget,
1465
- K as widgets
1764
+ fe as DeclarativeEmbedWidget,
1765
+ we as DeclarativePopupWidget,
1766
+ O as EmbedWidget,
1767
+ j as PopupWidget,
1768
+ K as WidgetApi,
1769
+ D as Widgets,
1770
+ it as _auto,
1771
+ et as api,
1772
+ st as autofill,
1773
+ tt as events,
1774
+ Ze as help,
1775
+ J as init,
1776
+ Ye as pushCookie,
1777
+ ot as ready,
1778
+ nt as widget,
1779
+ Z as widgets
1466
1780
  };
1467
1781
  //# sourceMappingURL=squatch.esm.js.map