@sprig-technologies/sprig-browser 2.33.3 → 2.34.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,7 +1,7 @@
1
1
  var It = Object.defineProperty;
2
- var kt = (t, e, n) => e in t ? It(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var W = (t, e, n) => kt(t, typeof e != "symbol" ? e + "" : e, n);
4
- import { l as R, g as P, s as et, e as y, S as w, v as tt, m as S, b as q, h as rt, E as re, D as M, c as Et, r as $, i as _t, j as xt, k as Rt, n as He, o as Ve, d as Dt, a as At, p as it, q as nt } from "./metricsReporter-qetrFwEv.js";
2
+ var kt = (r, t, n) => t in r ? It(r, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : r[t] = n;
3
+ var W = (r, t, n) => kt(r, typeof t != "symbol" ? t + "" : t, n);
4
+ import { l as x, g as P, s as et, e as y, S as w, v as tt, m as S, b as q, h as rt, E as re, D as M, c as Et, r as $, i as _t, j as Rt, k as xt, n as He, o as Ve, d as Dt, a as At, p as it, q as nt } from "./metricsReporter-BzXI6BiM.js";
5
5
  const nr = 360, or = "ul-app", sr = "#e6e6e6", ar = "#bd282a", dr = 1030, We = () => {
6
6
  try {
7
7
  return window.parent.Intercom;
@@ -9,149 +9,149 @@ const nr = 360, or = "ul-app", sr = "#e6e6e6", ar = "#bd282a", dr = 1030, We = (
9
9
  return null;
10
10
  }
11
11
  }, Be = [Object.freeze(Object.defineProperty({ __proto__: null, disable: () => {
12
- const t = We();
13
- t && (t.ul_wasVisible = !!document.querySelector("iframe.intercom-launcher-frame"), t.ul_wasVisible && t("update", { hide_default_launcher: !0 }));
12
+ const r = We();
13
+ r && (r.ul_wasVisible = !!document.querySelector("iframe.intercom-launcher-frame"), r.ul_wasVisible && r("update", { hide_default_launcher: !0 }));
14
14
  }, enable: () => {
15
- const t = We();
16
- t && (t.ul_wasVisible && t("update", { hide_default_launcher: !1 }), delete t.ul_wasVisible);
15
+ const r = We();
16
+ r && (r.ul_wasVisible && r("update", { hide_default_launcher: !1 }), delete r.ul_wasVisible);
17
17
  } }, Symbol.toStringTag, { value: "Module" }))];
18
18
  class Ot {
19
19
  static disable() {
20
- Be.forEach((e) => e.disable());
20
+ Be.forEach((t) => t.disable());
21
21
  }
22
22
  static enable() {
23
- Be.forEach((e) => e.enable());
23
+ Be.forEach((t) => t.enable());
24
24
  }
25
25
  }
26
26
  const Ne = "ul-view-sdk-script", Ct = ["ios", "android"], F = "visitors", z = "environments";
27
- async function O(t, e) {
27
+ async function O(r, t) {
28
28
  var i, o, a;
29
- const { shouldDropOnRateLimit: n, ...s } = e;
29
+ const { shouldDropOnRateLimit: n, ...s } = t;
30
30
  s.headers = Object.assign(P(window.UserLeap), s.headers);
31
- const r = await et(t, { ...s, shouldDropOnRateLimit: n });
32
- if (r.ok) {
33
- const l = (i = r.headers) == null ? void 0 : i.get("Authorization"), p = l ? l.split(" ") : void 0, d = p && p.length === 2 ? p[1] : void 0, c = (o = r.headers) == null ? void 0 : o.get("x-ul-visitor-id");
31
+ const e = await et(r, { ...s, shouldDropOnRateLimit: n });
32
+ if (e.ok) {
33
+ const l = (i = e.headers) == null ? void 0 : i.get("Authorization"), p = l ? l.split(" ") : void 0, d = p && p.length === 2 ? p[1] : void 0, c = (o = e.headers) == null ? void 0 : o.get("x-ul-visitor-id");
34
34
  if (window.UserLeap.userId && c === window.UserLeap.visitorId) {
35
- const g = R.getItemObject("sprig.anon.env.vid.map");
36
- g && g[window.UserLeap.envId] === c && (delete g[window.UserLeap.envId], R.setItemObject("sprig.anon.env.vid.map", g));
35
+ const g = x.getItemObject("sprig.anon.env.vid.map");
36
+ g && g[window.UserLeap.envId] === c && (delete g[window.UserLeap.envId], x.setItemObject("sprig.anon.env.vid.map", g));
37
37
  }
38
- d && c && (c !== window.UserLeap.visitorId || window.UserLeap.token !== d) && (x("token", d), x("vid", c), y.emit(w.VisitorIDUpdated, { visitorId: c }), window.UserLeap.token = d, window.UserLeap.visitorId = c);
38
+ d && c && (c !== window.UserLeap.visitorId || window.UserLeap.token !== d) && (R("token", d), R("vid", c), y.emit(w.VisitorIDUpdated, { visitorId: c }), window.UserLeap.token = d, window.UserLeap.visitorId = c);
39
39
  }
40
- return (a = r.json) != null && a.logMessage && console.warn(`[Sprig] ${r.json.logMessage}`), r;
40
+ return (a = e.json) != null && a.logMessage && console.warn(`[Sprig] ${e.json.logMessage}`), e;
41
41
  }
42
- function x(t, e) {
43
- const n = R.getItemObject("userleap.ids");
42
+ function R(r, t) {
43
+ const n = x.getItemObject("userleap.ids");
44
44
  let s = n[window.UserLeap.envId];
45
- s ? s[t] = e : s = { [t]: e }, n[window.UserLeap.envId] = s, R.setItemObject("userleap.ids", n);
45
+ s ? s[r] = t : s = { [r]: t }, n[window.UserLeap.envId] = s, x.setItemObject("userleap.ids", n);
46
46
  }
47
- function Re() {
47
+ function xe() {
48
48
  return window.previewMode ? "0" : window.UserLeap.visitorId ?? "";
49
49
  }
50
- function A(t, e, n) {
51
- const s = [window.UserLeap._API_URL, "sdk", t];
52
- return e && e.forEach((r) => {
53
- s.push(r), r === z ? s.push(window.UserLeap.envId) : r === F && s.push(Re());
50
+ function A(r, t, n) {
51
+ const s = [window.UserLeap._API_URL, "sdk", r];
52
+ return t && t.forEach((e) => {
53
+ s.push(e), e === z ? s.push(window.UserLeap.envId) : e === F && s.push(xe());
54
54
  }), n && s.push(n), s.join("/");
55
55
  }
56
- const X = async (t, e, n) => {
56
+ const X = async (r, t, n) => {
57
57
  var Me, qe, Fe;
58
- const { context: s, delay: r, forceBrandedLogo: i, endCard: o, isFeedback: a = !1, heatmap: l, locale: p, previewMode: d, productConfig: c, questions: g, responseGroupUid: f, surveyId: u, uuid: E, vid: _, sessionReplay: m, studyType: U } = t, b = P(window.UserLeap), I = ie(b), T = ge(b);
59
- if (m) if (I) y.emit(w.ReplayCapture, { responseGroupUid: f, hasQuestions: !!(g != null && g.length), surveyId: u, uploadId: m.uploadId, replayType: m.replayDurationType ?? "before", seconds: m.replayDurationSeconds, generateVideoUploadUrlPayload: { mediaRecordingUid: tt(), mediaType: "screen", questionId: 1, responseGroupUid: f, surveyId: u, updatedAt: (/* @__PURE__ */ new Date()).toISOString(), visitorId: window.UserLeap.visitorId, isReplay: !0 } });
58
+ const { context: s, delay: e, forceBrandedLogo: i, endCard: o, isFeedback: a = !1, heatmap: l, locale: p, previewMode: d, productConfig: c, questions: g, responseGroupUid: m, surveyId: u, uuid: E, vid: f, sessionReplay: v, studyType: L } = r, b = P(window.UserLeap), _ = ie(b), T = ge(b);
59
+ if (v) if (_) y.emit(w.ReplayCapture, { responseGroupUid: m, hasQuestions: !!(g != null && g.length), surveyId: u, uploadId: v.uploadId, replayType: v.replayDurationType ?? "before", seconds: v.replayDurationSeconds, generateVideoUploadUrlPayload: { mediaRecordingUid: tt(), mediaType: "screen", questionId: 1, responseGroupUid: m, surveyId: u, updatedAt: (/* @__PURE__ */ new Date()).toISOString(), visitorId: window.UserLeap.visitorId, isReplay: !0 } });
60
60
  else {
61
61
  if (!S.replay) return window.UserLeap.reportError("displayQuestions", new Error("Replay module not registered")), { success: !1, message: "Replay module not registered", surveyState: "no survey" };
62
- S.replay.scheduleOrCaptureReplay({ responseGroupId: f, surveyId: u, visitorId: _, replayParams: m, completeUploadHeaders: b, apiUrl: window.UserLeap._API_URL, triggerTimestamp: Date.now(), isStandalone: g.length === 0 });
62
+ S.replay.scheduleOrCaptureReplay({ responseGroupId: m, surveyId: u, visitorId: f, replayParams: v, completeUploadHeaders: b, apiUrl: window.UserLeap._API_URL, triggerTimestamp: Date.now(), isStandalone: g.length === 0 });
63
63
  }
64
64
  if (l) {
65
65
  if (!S.replay) return window.UserLeap.reportError("displayQuestions", new Error("Replay module not registered")), { success: !1, message: "Replay module not registered", surveyState: "no survey" };
66
- const { eventId: L, replayParams: J, responseGroupUid: fe, surveyId: ve } = l;
66
+ const { eventId: I, replayParams: J, responseGroupUid: fe, surveyId: ve } = l;
67
67
  await S.replay.initializeReplay({ maxReplayDurationSeconds: 300, maxInflightRequests: window.UserLeap.maxInflightReplayRequests, teardownAfter: !0, apiUrl: window.UserLeap._API_URL, replaySettings: n }), S.replay.tryReplayAction(() => {
68
68
  var ze;
69
- return (ze = S.replay) == null ? void 0 : ze.scheduleCapture({ apiUrl: window.UserLeap._API_URL, completeUploadHeaders: b, eventId: L, isHeatmap: !0, replayParams: J, responseGroupId: fe, surveyId: ve, triggerTimestamp: Date.now(), visitorId: _ });
69
+ return (ze = S.replay) == null ? void 0 : ze.scheduleCapture({ apiUrl: window.UserLeap._API_URL, completeUploadHeaders: b, eventId: I, isHeatmap: !0, replayParams: J, responseGroupId: fe, surveyId: ve, triggerTimestamp: Date.now(), visitorId: f });
70
70
  }, "Error in scheduling/capturing replay");
71
71
  }
72
- if (_ == null || !(g != null && g.length)) return q.info("CannotDisplaySurvey", { vid: _ }), { success: !1, message: "[Sprig] no survey found", surveyState: "no survey" };
72
+ if (f == null || !(g != null && g.length)) return q.info("CannotDisplaySurvey", { vid: f }), { success: !1, message: "[Sprig] no survey found", surveyState: "no survey" };
73
73
  if (window.UserLeap.container) {
74
74
  q.info("AlreadyDisplayingSurvey");
75
- const L = "[Sprig] (ERR-409) Found an existing Survey container, aborting rendering of this survey";
76
- return console.warn(L), { success: !1, message: L, surveyState: "no survey" };
75
+ const I = "[Sprig] (ERR-409) Found an existing Survey container, aborting rendering of this survey";
76
+ return console.warn(I), { success: !1, message: I, surveyState: "no survey" };
77
77
  }
78
- if (_ !== window.UserLeap.visitorId && E !== window.UserLeap.visitorId && !window.previewMode) {
79
- const L = "Attempted to display survey to a different visitor";
80
- return window.UserLeap.reportError("DisplaySurvey", new Error(L)), { success: !1, message: L, surveyState: "no survey" };
78
+ if (f !== window.UserLeap.visitorId && E !== window.UserLeap.visitorId && !window.previewMode) {
79
+ const I = "Attempted to display survey to a different visitor";
80
+ return window.UserLeap.reportError("DisplaySurvey", new Error(I)), { success: !1, message: I, surveyState: "no survey" };
81
81
  }
82
82
  q.info("ShowingSurvey", { surveyId: u }), (Me = S.replay) == null || Me.RecordSurveyShown({ id: u, userAgent: window.navigator.userAgent }), Ot.disable(), y.emit(w.SurveyWillPresent, { name: w.SurveyWillPresent, "survey.id": u });
83
- let v, D, k, H, V = document.createElement("div");
84
- const Ce = (L) => {
85
- const { "view.version": J } = L;
83
+ let U, D, k, H, V = document.createElement("div");
84
+ const Ce = (I) => {
85
+ const { "view.version": J } = I;
86
86
  J !== b["x-ul-sdk-version"] && st(), y.removeListener("verify.view.version", Ce);
87
87
  };
88
- y.on("verify.view.version", Ce), window.UserLeap.useMobileStyling = T, rt(b) ? (v = "ul-direct-embeded-frame", D = document.head, k = window, H = !1, (() => {
89
- const L = P(window.UserLeap), J = ie(L), fe = window.UserLeap.forceDirectEmbed, ve = L["userleap-platform"] === "web";
88
+ y.on("verify.view.version", Ce), window.UserLeap.useMobileStyling = T, rt(b) ? (U = "ul-direct-embeded-frame", D = document.head, k = window, H = !1, (() => {
89
+ const I = P(window.UserLeap), J = ie(I), fe = window.UserLeap.forceDirectEmbed, ve = I["userleap-platform"] === "web";
90
90
  return J || fe && ve;
91
- })() && (ot(u, a), V.id = v, window.UserLeap.container.appendChild(V), at(), y.emit(w.SurveyLifeCycle, { state: "presented" }), y.emit(w.SurveyPresented, { name: w.SurveyPresented, "survey.id": u }))) : { frameId: v, contentWinDocHead: D, contentWindow: k, hasOverlay: H, iframe: V } = Tt({ productConfig: c, useMobileStyling: T, surveyId: u, isFeedback: a }), window.UserLeap.frameId = v;
92
- const G = { apiURL: window.UserLeap._API_URL, cards: g, configureExitOnOverlayClick: (L) => {
93
- y.once(w.CloseSurveyOnOverlayClick, L);
94
- }, context: s, endCard: o, envId: window.UserLeap.envId, eventEmitFn: y.emit.bind(y), fontFamily: window.UserLeap.fontFamily, fontFamilyURL: window.UserLeap.fontFamilyURL, forceBrandedLogo: i, frame: V, headers: b, locale: p, mobileSDKVersion: window.UserLeap.mobileSDKVersion, previewKey: R.getItem("sprig.previewKey"), previewMode: d, productConfig: { framePosition: c == null ? void 0 : c.framePosition, desktopDisplay: c == null ? void 0 : c.desktopDisplay, placement: c == null ? void 0 : c.placement }, responseGroupUid: f, startingQuestionIdx: (qe = window.UserLeap.config) == null ? void 0 : qe.startingQuestionIdx, studyType: U, styleNonce: window.UserLeap.styleNonce, surveyId: u, tabTitle: document.title, trackPageViewUrl: e, ulEvents: re, upchunkLibraryURL: window.UserLeap.upchunkLibraryURL, useMobileStyling: T, userId: E, viewDocument: k == null ? void 0 : k.document, viewWindow: k, visitorAttributes: { externalUserId: window.UserLeap.userId, email: window.UserLeap.email }, ...window.UserLeap._config };
91
+ })() && (ot(u, a), V.id = U, window.UserLeap.container.appendChild(V), at(), y.emit(w.SurveyLifeCycle, { state: "presented" }), y.emit(w.SurveyPresented, { name: w.SurveyPresented, "survey.id": u }))) : { frameId: U, contentWinDocHead: D, contentWindow: k, hasOverlay: H, iframe: V } = Tt({ productConfig: c, useMobileStyling: T, surveyId: u, isFeedback: a }), window.UserLeap.frameId = U;
92
+ const G = { apiURL: window.UserLeap._API_URL, cards: g, configureExitOnOverlayClick: (I) => {
93
+ y.once(w.CloseSurveyOnOverlayClick, I);
94
+ }, context: s, endCard: o, envId: window.UserLeap.envId, eventEmitFn: y.emit.bind(y), fontFamily: window.UserLeap.fontFamily, fontFamilyURL: window.UserLeap.fontFamilyURL, forceBrandedLogo: i, frame: V, headers: b, locale: p, mobileSDKVersion: window.UserLeap.mobileSDKVersion, previewKey: x.getItem("sprig.previewKey"), previewMode: d, productConfig: { framePosition: c == null ? void 0 : c.framePosition, desktopDisplay: c == null ? void 0 : c.desktopDisplay, placement: c == null ? void 0 : c.placement }, responseGroupUid: m, startingQuestionIdx: (qe = window.UserLeap.config) == null ? void 0 : qe.startingQuestionIdx, studyType: L, styleNonce: window.UserLeap.styleNonce, surveyId: u, tabTitle: document.title, trackPageViewUrl: t, ulEvents: re, upchunkLibraryURL: window.UserLeap.upchunkLibraryURL, useMobileStyling: T, userId: E, viewDocument: k == null ? void 0 : k.document, viewWindow: k, visitorAttributes: { externalUserId: window.UserLeap.userId, email: window.UserLeap.email }, ...window.UserLeap._config };
95
95
  (Fe = window.UserLeap._config) != null && Fe.startingQuestionIdx && (window.UserLeap._config = { ...window.UserLeap._config, startingQuestionIdx: null });
96
96
  const St = (a ? window.UserLeap.feedbackCustomStyles : window.UserLeap.customStyles) ?? c.customStyles;
97
97
  G.customStyles = St, k && (k.__cfg = G);
98
98
  const ye = window.UserLeap.viewSDKURL ? window.UserLeap.viewSDKURL : G.path, Pe = document.getElementById(Ne);
99
99
  Pe && Pe.remove();
100
100
  const me = function() {
101
- const L = document.createElement("script");
102
- return window.UserLeap.nonce && L.setAttribute("nonce", window.UserLeap.nonce), L.id = Ne, L;
101
+ const I = document.createElement("script");
102
+ return window.UserLeap.nonce && I.setAttribute("nonce", window.UserLeap.nonce), I.id = Ne, I;
103
103
  }(), Te = () => {
104
104
  window.UserLeap.container && Object.assign(window.UserLeap.container.style, { display: "flex" });
105
105
  };
106
106
  if (G.installationMethod === "web-npm" || G.installationMethod === "web-npm-bundled") {
107
- const { default: L } = await import("./view-Bml35A_s.js");
108
- L.configure(G), H && window.UserLeap.container && Te();
107
+ const { default: I } = await import("./view-CDp4O3a5.js");
108
+ I.configure(G), H && window.UserLeap.container && Te();
109
109
  } else ye && (me.src = ye, H && me.addEventListener("load", () => {
110
110
  window.UserLeap.container && Te();
111
- }), k == null || k.addEventListener("error", (L) => {
112
- L.target instanceof HTMLScriptElement && L.target.src === ye && window.UserLeap.reportError("loadFrameScript", new Error("Frame script failed to load"));
111
+ }), k == null || k.addEventListener("error", (I) => {
112
+ I.target instanceof HTMLScriptElement && I.target.src === ye && window.UserLeap.reportError("loadFrameScript", new Error("Frame script failed to load"));
113
113
  }, { capture: !0, once: !0 }));
114
114
  D == null || D.appendChild(me);
115
- const je = { success: !0, surveyState: "ready", surveyId: u, responseGroupUid: f };
116
- return window.UserLeap.isMobileSDK && r && (je.delay = r), je;
115
+ const je = { success: !0, surveyState: "ready", surveyId: u, responseGroupUid: m };
116
+ return window.UserLeap.isMobileSDK && e && (je.delay = e), je;
117
117
  };
118
- function ge(t) {
118
+ function ge(r) {
119
119
  var n;
120
120
  if (window.UserLeap.useMobileStyling !== void 0) return window.UserLeap.useMobileStyling;
121
- const e = ((n = window.UserLeap.windowDimensions) == null ? void 0 : n.width) ?? document.body.clientWidth;
122
- return ie(t) || e > 10 && e < 500;
121
+ const t = ((n = window.UserLeap.windowDimensions) == null ? void 0 : n.width) ?? document.body.clientWidth;
122
+ return ie(r) || t > 10 && t < 500;
123
123
  }
124
- function ie(t) {
125
- return Ct.includes(t["userleap-platform"]);
124
+ function ie(r) {
125
+ return Ct.includes(r["userleap-platform"]);
126
126
  }
127
127
  const De = "ul-frame";
128
128
  window.UserLeap && window.Sprig && (window.Sprig._gtm ? window.Sprig = window.UserLeap : window.UserLeap = window.Sprig), window.UserLeap || (window.UserLeap = window.Sprig), window.Sprig || (window.Sprig = window.UserLeap);
129
- const he = "0px", ot = (t, e, n) => {
130
- window.UserLeap.container = document.createElement("div"), window.UserLeap.container.className = "ul-container" + (e ? " ul-container-feedback" : ""), t && (window.UserLeap.container.dataset.studyId = t.toString());
129
+ const he = "0px", ot = (r, t, n) => {
130
+ window.UserLeap.container = document.createElement("div"), window.UserLeap.container.className = "ul-container" + (t ? " ul-container-feedback" : ""), r && (window.UserLeap.container.dataset.studyId = r.toString());
131
131
  const s = lt();
132
132
  n && s && !window.UserLeap.useMobileStyling ? s.appendChild(window.UserLeap.container) : document.body.appendChild(window.UserLeap.container);
133
- }, st = (t, e) => {
133
+ }, st = (r, t) => {
134
134
  var s;
135
135
  Mt();
136
136
  const n = window.UserLeap.container;
137
137
  if (n) try {
138
- (s = n.parentNode) == null || s.removeChild(n), window.UserLeap.container = null, x("trackStartUrl", null), y.emit(w.SurveyLifeCycle, { state: "dismissed" }), y.emit(w.SurveyClosed, { name: w.SurveyClosed, initiator: t, "survey.id": parseInt(n.dataset.studyId), ...e && { studyType: e } });
139
- } catch (r) {
140
- console.warn(`[Sprig] (ERR-412) Error removing UserLeap container by ${t} ` + n), r instanceof Error && window.UserLeap.reportError("dismissActiveSurvey", r);
138
+ (s = n.parentNode) == null || s.removeChild(n), window.UserLeap.container = null, R("trackStartUrl", null), y.emit(w.SurveyLifeCycle, { state: "dismissed" }), y.emit(w.SurveyClosed, { name: w.SurveyClosed, initiator: r, "survey.id": parseInt(n.dataset.studyId), ...t && { studyType: t } });
139
+ } catch (e) {
140
+ console.warn(`[Sprig] (ERR-412) Error removing UserLeap container by ${r} ` + n), e instanceof Error && window.UserLeap.reportError("dismissActiveSurvey", e);
141
141
  }
142
142
  }, at = () => {
143
- y.once(w.SurveyWillClose, ({ initiator: t, studyType: e }) => {
144
- y.removeAllListeners(w.CloseSurveyOnOverlayClick), st(t, e);
143
+ y.once(w.SurveyWillClose, ({ initiator: r, studyType: t }) => {
144
+ y.removeAllListeners(w.CloseSurveyOnOverlayClick), st(r, t);
145
145
  });
146
- }, Pt = (t, e, n, s) => {
146
+ }, Pt = (r, t, n, s) => {
147
147
  var d, c;
148
- const r = { position: "fixed", bottom: "0px", right: he, border: 0, backgroundColor: "rgba(0,0,0,0)", zIndex: 2147483646, transition: "height 0.2s ease-in-out", maxWidth: "100%" }, i = Object.assign({}, e, window.UserLeap), { desktopDisplay: o } = e || {}, a = o === "center-modal";
148
+ const e = { position: "fixed", bottom: "0px", right: he, border: 0, backgroundColor: "rgba(0,0,0,0)", zIndex: 2147483646, transition: "height 0.2s ease-in-out", maxWidth: "100%" }, i = Object.assign({}, t, window.UserLeap), { desktopDisplay: o } = t || {}, a = o === "center-modal";
149
149
  let l;
150
150
  a && (i.framePosition = "center");
151
151
  let p = !1;
152
- if (n) (d = window.UserLeap.windowDimensions) != null && d.width ? r.width = `${window.UserLeap.windowDimensions.width}px` : r.width = "100%", (c = window.UserLeap.windowDimensions) != null && c.height ? r.maxHeight = window.UserLeap.windowDimensions.height - 20 + "px" : window.UserLeap.maxHeight ? r.maxHeight = window.UserLeap.maxHeight : r.maxHeight = document.body.clientHeight - 20 + "px", ["light", "dark"].includes(i.overlayStyleMobile) && (p = !0);
152
+ if (n) (d = window.UserLeap.windowDimensions) != null && d.width ? e.width = `${window.UserLeap.windowDimensions.width}px` : e.width = "100%", (c = window.UserLeap.windowDimensions) != null && c.height ? e.maxHeight = window.UserLeap.windowDimensions.height - 20 + "px" : window.UserLeap.maxHeight ? e.maxHeight = window.UserLeap.maxHeight : e.maxHeight = document.body.clientHeight - 20 + "px", ["light", "dark"].includes(i.overlayStyleMobile) && (p = !0);
153
153
  else {
154
- r.width = "360px", r.maxHeight = window.UserLeap.maxHeight || "66vh";
154
+ e.width = "360px", e.maxHeight = window.UserLeap.maxHeight || "66vh";
155
155
  const g = () => {
156
156
  p = !0, l = { margin: "auto", position: "static" };
157
157
  };
@@ -170,17 +170,17 @@ const he = "0px", ot = (t, e, n) => {
170
170
  g();
171
171
  }
172
172
  }
173
- return p && ((g, f) => {
174
- const u = { position: "fixed", overflow: "auto", top: "0px", left: "0px", display: "none", height: "100%", width: "100%", transition: "background-color 0.3s ease-out", zIndex: 2147483646 }, E = f ? g.overlayStyleMobile : g.overlayStyle;
175
- u["background-color"] = E === "light" ? "rgba(255,255,255, 0.95)" : "rgba(0,0,0,0.9)", f || (u.margin = "auto"), window.UserLeap.container && Object.assign(window.UserLeap.container.style, u);
176
- })(i, n), Object.assign(t.style, r, l), p;
177
- }, Tt = ({ productConfig: t, useMobileStyling: e, surveyId: n, isFeedback: s }) => {
178
- var g, f;
179
- const r = De, i = s && t.desktopDisplay === "slider";
173
+ return p && ((g, m) => {
174
+ const u = { position: "fixed", overflow: "auto", top: "0px", left: "0px", display: "none", height: "100%", width: "100%", transition: "background-color 0.3s ease-out", zIndex: 2147483646 }, E = m ? g.overlayStyleMobile : g.overlayStyle;
175
+ u["background-color"] = E === "light" ? "rgba(255,255,255, 0.95)" : "rgba(0,0,0,0.9)", m || (u.margin = "auto"), window.UserLeap.container && Object.assign(window.UserLeap.container.style, u);
176
+ })(i, n), Object.assign(r.style, e, l), p;
177
+ }, Tt = ({ productConfig: r, useMobileStyling: t, surveyId: n, isFeedback: s }) => {
178
+ var g, m;
179
+ const e = De, i = s && r.desktopDisplay === "slider";
180
180
  ot(n, s, i), jt();
181
181
  const o = document.createElement("iframe");
182
- o.id = r, o.setAttribute("title", "Sprig User Feedback Dialog");
183
- const a = Pt(o, t, e, s);
182
+ o.id = e, o.setAttribute("title", "Sprig User Feedback Dialog");
183
+ const a = Pt(o, r, t, s);
184
184
  at();
185
185
  let l = !1;
186
186
  o.setHeight = (u) => {
@@ -189,161 +189,161 @@ const he = "0px", ot = (t, e, n) => {
189
189
  let p = !1;
190
190
  o.setWidth = (u) => {
191
191
  parseInt(o.style.width) == u && p || (p = !0, o.style.width = `${u}px`, y.emit(w.SurveyWidth, { name: w.SurveyWidth, contentFrameWidth: u, "survey.id": n }));
192
- }, (g = window.UserLeap.container) == null || g.appendChild(o), t && (e ? t.exitOnOverlayClickMobile : t.exitOnOverlayClick) && window.UserLeap.container && (window.UserLeap.container.onclick = () => {
192
+ }, (g = window.UserLeap.container) == null || g.appendChild(o), r && (t ? r.exitOnOverlayClickMobile : r.exitOnOverlayClick) && window.UserLeap.container && (window.UserLeap.container.onclick = () => {
193
193
  y.emit(w.CloseSurveyOnOverlayClick);
194
194
  }), y.emit(w.SurveyLifeCycle, { state: "presented" }), y.emit(w.SurveyPresented, { name: w.SurveyPresented, "survey.id": n });
195
- const d = (f = o.contentWindow) == null ? void 0 : f.document;
196
- if (d && (d.open("text/html", "replace"), d.write("<!doctype html><head></head><body></body></html>"), d.close(), !e)) {
195
+ const d = (m = o.contentWindow) == null ? void 0 : m.document;
196
+ if (d && (d.open("text/html", "replace"), d.write("<!doctype html><head></head><body></body></html>"), d.close(), !t)) {
197
197
  const u = d.body;
198
198
  u.style.display = "flex", u.style.alignItems = "center";
199
199
  }
200
200
  const c = d == null ? void 0 : d.head;
201
- return { frameId: r, contentWinDocHead: c, contentWindow: o.contentWindow, hasOverlay: a, iframe: o };
201
+ return { frameId: e, contentWinDocHead: c, contentWindow: o.contentWindow, hasOverlay: a, iframe: o };
202
202
  }, dt = { [w.SurveyFadingOut]: () => {
203
203
  window.UserLeap.container && Object.assign(window.UserLeap.container.style, { "background-color": "rgba(0,0,0,0)" });
204
204
  } }, jt = () => {
205
- Object.entries(dt).forEach(([t, e]) => {
206
- y.on(t, e);
205
+ Object.entries(dt).forEach(([r, t]) => {
206
+ y.on(r, t);
207
207
  });
208
208
  }, Mt = () => {
209
- Object.entries(dt).forEach(([t, e]) => {
210
- y.off(t, e);
209
+ Object.entries(dt).forEach(([r, t]) => {
210
+ y.off(r, t);
211
211
  });
212
- }, j = (t) => !!t && t.nodeType === Node.ELEMENT_NODE, $e = (t) => t instanceof HTMLElement || t instanceof SVGElement, se = ({ document: t, elementId: e, styleString: n, nonce: s }) => {
213
- const r = t.getElementById(e);
214
- if (r) return void (r.textContent = n);
215
- const i = t.createElement("style");
216
- s && (i.nonce = s), i.textContent = n, i.id = e, t.head.appendChild(i);
217
- }, qt = (t, e) => {
218
- const n = e.querySelector(".sprig-question-body");
219
- if (!j(n)) return t;
212
+ }, j = (r) => !!r && r.nodeType === Node.ELEMENT_NODE, $e = (r) => r instanceof HTMLElement || r instanceof SVGElement, se = ({ document: r, elementId: t, styleString: n, nonce: s }) => {
213
+ const e = r.getElementById(t);
214
+ if (e) return void (e.textContent = n);
215
+ const i = r.createElement("style");
216
+ s && (i.nonce = s), i.textContent = n, i.id = t, r.head.appendChild(i);
217
+ }, qt = (r, t) => {
218
+ const n = t.querySelector(".sprig-question-body");
219
+ if (!j(n)) return r;
220
220
  const s = n.scrollHeight;
221
- return s < 100 ? t : t - (s - 100);
222
- }, Ge = (t, e) => {
223
- const n = e.querySelector(t);
221
+ return s < 100 ? r : r - (s - 100);
222
+ }, Ge = (r, t) => {
223
+ const n = t.querySelector(r);
224
224
  if (!j(n)) return 0;
225
225
  const s = getComputedStyle(n);
226
226
  return parseFloat(s.paddingLeft) + parseFloat(s.paddingRight) + (parseFloat(s.marginLeft) + parseFloat(s.marginRight)) + (parseFloat(s.borderLeftWidth) + parseFloat(s.borderRightWidth));
227
- }, Ft = (t, e, n) => {
228
- const s = t.querySelector(".ul-card__container"), r = t.querySelector(".ul-app");
227
+ }, Ft = (r, t, n) => {
228
+ const s = r.querySelector(".ul-card__container"), e = r.querySelector(".ul-app");
229
229
  let i = 600, o = 360, a = 0;
230
- if (j(s) && j(r)) {
231
- const l = s.querySelector(".ul-card--matrix_grid"), p = !l && e && n;
230
+ if (j(s) && j(e)) {
231
+ const l = s.querySelector(".ul-card--matrix_grid"), p = !l && t && n;
232
232
  try {
233
- p && (r.style.width = "360px"), i = s.clientHeight, i += ((g) => {
234
- const f = g.querySelector(".sprig-question-body"), u = g.querySelector(".ul-card"), E = g.querySelector(".ul-card-main-content"), _ = g.querySelector(".ul-footer"), m = g.querySelector(".sprig-container");
235
- let U = 0;
236
- return j(u) && (U += u.scrollHeight - u.clientHeight), j(E) && (U += E.scrollHeight - E.clientHeight), j(f) && (U += f.scrollHeight - f.clientHeight), j(_) && j(m) && m.clientHeight === 0 && (U += _.clientHeight), U;
237
- })(t);
233
+ p && (e.style.width = "360px"), i = s.clientHeight, i += ((g) => {
234
+ const m = g.querySelector(".sprig-question-body"), u = g.querySelector(".ul-card"), E = g.querySelector(".ul-card-main-content"), f = g.querySelector(".ul-footer"), v = g.querySelector(".sprig-container");
235
+ let L = 0;
236
+ return j(u) && (L += u.scrollHeight - u.clientHeight), j(E) && (L += E.scrollHeight - E.clientHeight), j(m) && (L += m.scrollHeight - m.clientHeight), j(f) && j(v) && v.clientHeight === 0 && (L += f.clientHeight), L;
237
+ })(r);
238
238
  const d = getComputedStyle(s);
239
239
  a = i;
240
240
  const c = parseFloat(d.marginTop) + parseFloat(d.marginBottom);
241
- i += c + (parseFloat(d.borderTopWidth) + parseFloat(d.borderBottomWidth)), l && (o = l.scrollWidth, o += Ge(".ul-card__container", t), o += Ge(".sprig-question-body", t));
241
+ i += c + (parseFloat(d.borderTopWidth) + parseFloat(d.borderBottomWidth)), l && (o = l.scrollWidth, o += Ge(".ul-card__container", r), o += Ge(".sprig-question-body", r));
242
242
  } finally {
243
- p && r.style.removeProperty("width");
243
+ p && e.style.removeProperty("width");
244
244
  }
245
245
  }
246
- return [i + 1, o, qt(a, t)];
247
- }, lr = (t) => {
248
- const e = t.querySelector(".ul-card__container");
249
- e && (e.scrollTop = 0);
246
+ return [i + 1, o, qt(a, r)];
247
+ }, lr = (r) => {
248
+ const t = r.querySelector(".ul-card__container");
249
+ t && (t.scrollTop = 0);
250
250
  }, lt = () => h, K = () => document.getElementById("sprig-feedback-container"), Se = () => document.getElementById("sprig-feedback-loading-animation"), ct = () => !!document.getElementById(De);
251
251
  let Ke = !1, h = null, C = null, Ae = !1, Z = null, B = null;
252
252
  const zt = ["bottom-left", "bottom-right", "center-left", "center-right"], ae = () => {
253
- var e;
254
- const t = window.UserLeap.container;
255
- return ((e = t == null ? void 0 : t.parentElement) == null ? void 0 : e.id) === "sprig-feedback-loading-container";
253
+ var t;
254
+ const r = window.UserLeap.container;
255
+ return ((t = r == null ? void 0 : r.parentElement) == null ? void 0 : t.id) === "sprig-feedback-loading-container";
256
256
  }, pt = () => document.getElementById("sprig-feedback-error-container"), ut = () => {
257
257
  if (!h) return 0;
258
- const t = h == null ? void 0 : h.clientWidth, e = window.getComputedStyle(h);
259
- return t + parseInt(e.borderRightWidth || "0") + parseInt(e.borderLeftWidth || "0");
260
- }, de = (t) => {
261
- const e = K();
262
- e && (B != null && B.endsWith("right") ? e.style.right = `${t}px` : B != null && B.endsWith("left") && (e.style.left = `${t}px`));
258
+ const r = h == null ? void 0 : h.clientWidth, t = window.getComputedStyle(h);
259
+ return r + parseInt(t.borderRightWidth || "0") + parseInt(t.borderLeftWidth || "0");
260
+ }, de = (r) => {
261
+ const t = K();
262
+ t && (B != null && B.endsWith("right") ? t.style.right = `${r}px` : B != null && B.endsWith("left") && (t.style.left = `${r}px`));
263
263
  }, be = () => {
264
264
  if (h && (ae() || pt())) {
265
265
  y.off(w.SurveyAppeared, Y), Ie();
266
- const t = ut();
267
- return de(-t), !0;
266
+ const r = ut();
267
+ return de(-r), !0;
268
268
  }
269
269
  return !1;
270
270
  }, Y = () => {
271
271
  if (!h || !C) return;
272
- const t = Se();
273
- t && t.remove(), h.style.height = "auto", h.style.width = "auto", C.disabled = !1, Ae = !1;
272
+ const r = Se();
273
+ r && r.remove(), h.style.height = "auto", h.style.width = "auto", C.disabled = !1, Ae = !1;
274
274
  }, Ie = () => {
275
275
  if (h && !Se()) {
276
- const t = (() => {
276
+ const r = (() => {
277
277
  if (Se()) return;
278
- const e = document.createElement("div");
279
- return e.className = "ul-loading-spinner-container", e.id = "sprig-feedback-loading-animation", e.role = "progressbar", e.setAttribute("aria-live", "polite"), e.setAttribute("aria-busy", "true"), e.setAttribute("aria-label", "Processing..."), e.innerHTML = `
278
+ const t = document.createElement("div");
279
+ return t.className = "ul-loading-spinner-container", t.id = "sprig-feedback-loading-animation", t.role = "progressbar", t.setAttribute("aria-live", "polite"), t.setAttribute("aria-busy", "true"), t.setAttribute("aria-label", "Processing..."), t.innerHTML = `
280
280
  <div class="ul-loading-spinner">
281
281
  <div class="first"></div>
282
282
  <div class="second"></div>
283
283
  <div class="third"></div>
284
284
  <div class="fourth"></div>
285
285
  </div>
286
- `, e;
286
+ `, t;
287
287
  })();
288
- t && (h.style.height = "300px", h.style.width = "360px", h.appendChild(t));
288
+ r && (h.style.height = "300px", h.style.width = "360px", h.appendChild(r));
289
289
  }
290
290
  }, Je = () => {
291
291
  h && C && (de(0), C.disabled = !0, Ae = !0);
292
- }, wt = async (t, e, n) => {
293
- const { buttonTheme: s, customStyles: r, eventId: i, placement: o, desktopDisplay: a, feedbackLabel: l, surveyUuid: p, surveyId: d } = t;
292
+ }, wt = async (r, t, n) => {
293
+ const { buttonTheme: s, customStyles: e, eventId: i, placement: o, desktopDisplay: a, feedbackLabel: l, surveyUuid: p, surveyId: d } = r;
294
294
  window.UserLeap.feedbackCustomStyles = void 0;
295
295
  let c = K();
296
296
  if (c) {
297
- if (!e && i === Z) return;
297
+ if (!t && i === Z) return;
298
298
  c.remove(), y.off(re.SURVEY_FADING_OUT, be);
299
299
  }
300
- Z = i, se({ document, elementId: "sprig-feedback-style", styleString: '.ul-loading-spinner-container{font-size:1.8rem;flex-grow:1;width:100%;height:100%;display:flex;align-items:center;justify-content:center}.ul-loading-spinner{display:inline-block;position:relative;width:6rem;height:6rem}.ul-loading-spinner div{box-sizing:border-box;display:block;position:absolute;width:80%;height:80%;margin:5px;border:5px solid #152e3e;border-radius:50%;animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:#152e3e transparent transparent transparent}.ul-loading-spinner .first{animation-delay:-.45s}.ul-loading-spinner .second{animation-delay:-.3s}.ul-loading-spinner .third{animation-delay:-.15s}@keyframes lds-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.fade-in-transition{animation:fadeIn .4s ease-in}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}#sprig-feedback-button{border-left:0;border-radius:0 8px 8px 0;display:grid;padding:8px;text-align:center;transition:all ease-in-out 1s;z-index:inherit}#sprig-feedback-button:hover{cursor:pointer}.sprig-feedback-button-label{writing-mode:vertical-lr;text-orientation:sideways}.sprig-feedback-button-right{transform:rotate(180deg)}.sprig-feedback-button-bottom{align-self:flex-end;margin-bottom:20px}.sprig-feedback-button-light{background:#efefee;color:#000;border:1px solid #e2e3e1}.sprig-feedback-button-dark{background:#000;color:#fff;border:1px solid #000000}#sprig-feedback-container{display:flex;align-items:center;position:fixed;transition:right .2s linear,left .2s linear;z-index:2147483646}.sprig-feedback-container-left{flex-flow:row-reverse}.sprig-feedback-container-center{top:50%;transform:translateY(-50%)}.sprig-feedback-container-bottom{bottom:0%;margin-bottom:15px}.sprig-feedback-loading-container{align-items:center;background-color:#fff;border:2px solid var(--feedback-border);display:flex;max-height:90vh;max-width:90vw;min-width:0px}.sprig-feedback-loading-container-left{border-left:none;border-radius:0 8px 8px 0}.sprig-feedback-loading-container-right{border-right:none;border-radius:8px 0 0 8px}#sprig-feedback-error-container{margin:auto;text-align:center;width:360px}.sprig-feedback-error-text{font-weight:400;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol}#sprig-feedback-loading-container .ul-container{position:relative;max-height:inherit}#sprig-feedback-loading-animation{position:absolute}.sprig-feedback-loading-container-previews iframe{max-height:inherit!important}', nonce: window.UserLeap.styleNonce }), se({ document, elementId: "ul-custom-style", styleString: r ?? "", nonce: window.UserLeap.styleNonce }), Ke = a === "center-modal", B = o;
301
- const [g, f] = o.split("-");
302
- ((m) => {
303
- if (K() || !zt.includes(m)) return;
304
- const [U, b] = m.split("-"), I = document.createElement("div");
305
- I.id = "sprig-feedback-container", I.classList.add(`sprig-feedback-container-${b}`, `sprig-feedback-container-${U}`), document.body.appendChild(I);
300
+ Z = i, se({ document, elementId: "sprig-feedback-style", styleString: '.ul-loading-spinner-container{font-size:1.8rem;flex-grow:1;width:100%;height:100%;display:flex;align-items:center;justify-content:center}.ul-loading-spinner{display:inline-block;position:relative;width:6rem;height:6rem}.ul-loading-spinner div{box-sizing:border-box;display:block;position:absolute;width:80%;height:80%;margin:5px;border:5px solid #152e3e;border-radius:50%;animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:#152e3e transparent transparent transparent}.ul-loading-spinner .first{animation-delay:-.45s}.ul-loading-spinner .second{animation-delay:-.3s}.ul-loading-spinner .third{animation-delay:-.15s}@keyframes lds-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.fade-in-transition{animation:fadeIn .4s ease-in}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}#sprig-feedback-button{border-left:0;border-radius:0 8px 8px 0;display:grid;padding:8px;text-align:center;transition:all ease-in-out 1s;z-index:inherit}#sprig-feedback-button:hover{cursor:pointer}.sprig-feedback-button-label{writing-mode:vertical-lr;text-orientation:sideways}.sprig-feedback-button-right{transform:rotate(180deg)}.sprig-feedback-button-bottom{align-self:flex-end;margin-bottom:20px}.sprig-feedback-button-light{background:#efefee;color:#000;border:1px solid #e2e3e1}.sprig-feedback-button-dark{background:#000;color:#fff;border:1px solid #000000}#sprig-feedback-container{display:flex;align-items:center;position:fixed;transition:right .2s linear,left .2s linear;z-index:2147483646}.sprig-feedback-container-left{flex-flow:row-reverse}.sprig-feedback-container-center{top:50%;transform:translateY(-50%)}.sprig-feedback-container-bottom{bottom:0%;margin-bottom:15px}.sprig-feedback-loading-container{align-items:center;background-color:#fff;border:2px solid var(--feedback-border);display:flex;max-height:90vh;max-width:90vw;min-width:0px}.sprig-feedback-loading-container-left{border-left:none;border-radius:0 8px 8px 0}.sprig-feedback-loading-container-right{border-right:none;border-radius:8px 0 0 8px}#sprig-feedback-error-container{margin:auto;text-align:center;width:360px}.sprig-feedback-error-text{font-weight:400;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol}#sprig-feedback-loading-container .ul-container{position:relative;max-height:inherit}#sprig-feedback-loading-animation{position:absolute}.sprig-feedback-loading-container-previews iframe{max-height:inherit!important}', nonce: window.UserLeap.styleNonce }), se({ document, elementId: "ul-custom-style", styleString: e ?? "", nonce: window.UserLeap.styleNonce }), Ke = a === "center-modal", B = o;
301
+ const [g, m] = o.split("-");
302
+ ((v) => {
303
+ if (K() || !zt.includes(v)) return;
304
+ const [L, b] = v.split("-"), _ = document.createElement("div");
305
+ _.id = "sprig-feedback-container", _.classList.add(`sprig-feedback-container-${b}`, `sprig-feedback-container-${L}`), document.body.appendChild(_);
306
306
  })(o), c = K(), C = document.createElement("button");
307
307
  const u = document.createElement("div");
308
- u.className = "sprig-feedback-button-label", u.innerText = l, C.appendChild(u), C.id = "sprig-feedback-button", C.classList.add(`sprig-feedback-button-${f}`, `sprig-feedback-button-${g}`, `sprig-feedback-button-${s}`, "fade-in-transition"), y.on(re.SURVEY_FADING_OUT, be), C.addEventListener("click", async () => {
309
- const m = document.getElementById("sprig-feedback-error-container");
308
+ u.className = "sprig-feedback-button-label", u.innerText = l, C.appendChild(u), C.id = "sprig-feedback-button", C.classList.add(`sprig-feedback-button-${m}`, `sprig-feedback-button-${g}`, `sprig-feedback-button-${s}`, "fade-in-transition"), y.on(re.SURVEY_FADING_OUT, be), C.addEventListener("click", async () => {
309
+ const v = document.getElementById("sprig-feedback-error-container");
310
310
  if (ct() || pt()) {
311
311
  if (be()) {
312
312
  y.emit(w.SurveyCloseRequested, { name: w.SurveyCloseRequested, initiator: M.FeedbackClosed, studyType: "feedbackButton", "survey.id": d }), y.emit(w.SurveyWillClose, { name: w.SurveyWillClose, initiator: M.FeedbackClosed, studyType: "feedbackButton", "survey.id": d });
313
313
  const b = K();
314
- m && b && (b.remove(), Z = null, h = null);
314
+ v && b && (b.remove(), Z = null, h = null);
315
315
  }
316
316
  return;
317
317
  }
318
- if (ge(P(window.UserLeap)) || Ae || Je(), e) return h && h.classList.add("sprig-feedback-loading-container-previews"), await X(e), void Y();
319
- const U = await (async (b) => {
320
- const I = await O(A("1", [F], "startFeedbackStudy"), { body: JSON.stringify({ surveyUuid: b }), method: "POST" });
321
- return I.ok ? I.json : null;
318
+ if (ge(P(window.UserLeap)) || Ae || Je(), t) return h && h.classList.add("sprig-feedback-loading-container-previews"), await X(t), void Y();
319
+ const L = await (async (b) => {
320
+ const _ = await O(A("1", [F], "startFeedbackStudy"), { body: JSON.stringify({ surveyUuid: b }), method: "POST" });
321
+ return _.ok ? _.json : null;
322
322
  })(p);
323
- if (U) y.once(w.SurveyAppeared, Y), X({ ...U, studyType: "feedbackButton" }, n);
323
+ if (L) y.once(w.SurveyAppeared, Y), X({ ...L, studyType: "feedbackButton" }, n);
324
324
  else if (h) {
325
325
  const b = Ht();
326
326
  h.appendChild(b), Y(), h.style.height = "300px", h.style.width = "360px";
327
327
  }
328
328
  }), c == null || c.appendChild(C), y.emit(w.FeedbackButtonLoaded, { name: w.FeedbackButtonLoaded, "survey.id": d });
329
- const { useMobileStyling: E, _config: { border: _ } } = window.UserLeap;
329
+ const { useMobileStyling: E, _config: { border: f } } = window.UserLeap;
330
330
  if (Ke || E) de(0);
331
331
  else {
332
- const m = document.createElement("div");
333
- m.id = "sprig-feedback-loading-container", m.className = `sprig-feedback-loading-container sprig-feedback-loading-container-${f}`, m.style.setProperty("--feedback-border", _), h = m, Ie(), c == null || c.appendChild(m);
334
- const U = ut();
335
- de(-U);
332
+ const v = document.createElement("div");
333
+ v.id = "sprig-feedback-loading-container", v.className = `sprig-feedback-loading-container sprig-feedback-loading-container-${m}`, v.style.setProperty("--feedback-border", f), h = v, Ie(), c == null || c.appendChild(v);
334
+ const L = ut();
335
+ de(-L);
336
336
  }
337
- window.UserLeap._config.isOnQuestionsTab && e && !ae() && h && (Je(), Ie(), h && h.classList.add("sprig-feedback-loading-container-previews"), X(e), Y());
337
+ window.UserLeap._config.isOnQuestionsTab && t && !ae() && h && (Je(), Ie(), h && h.classList.add("sprig-feedback-loading-container-previews"), X(t), Y());
338
338
  }, Ht = () => {
339
- const t = document.createElement("div");
340
- t.id = "sprig-feedback-error-container", t.innerHTML = `<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40" fill="none">
339
+ const r = document.createElement("div");
340
+ r.id = "sprig-feedback-error-container", r.innerHTML = `<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40" fill="none">
341
341
  <circle cx="20" cy="20" r="14.5" stroke="#B0B5B7" stroke-width="3"/>
342
342
  <path d="M20 12L20 21.6" stroke="#B0B5B7" stroke-width="3" stroke-linecap="round"/>
343
343
  <circle cx="19.9984" cy="27.6" r="1.6" fill="#B0B5B7"/>
344
344
  </svg>`;
345
- const e = document.createElement("h3");
346
- return e.className = "sprig-feedback-error-text", e.innerText = "There was an error while loading the survey", t.appendChild(e), t;
345
+ const t = document.createElement("h3");
346
+ return t.className = "sprig-feedback-error-text", t.innerText = "There was an error while loading the survey", r.appendChild(t), r;
347
347
  }, ke = new class {
348
348
  constructor() {
349
349
  W(this, "_ldData", {});
@@ -351,13 +351,13 @@ const zt = ["bottom-left", "bottom-right", "center-left", "center-right"], ae =
351
351
  getAllLaunchDarklyVariations() {
352
352
  return this._ldData;
353
353
  }
354
- setLDFlagsVariations(t) {
354
+ setLDFlagsVariations(r) {
355
355
  try {
356
- return !(!t || typeof t != "object" || Array.isArray(t)) && (Object.keys(this._ldData).forEach((e) => {
357
- delete this._ldData[e];
358
- }), Object.keys(t).forEach((e) => this._ldData[`!launch_darkly_${e}`] = (t[e] ?? 0) + 1), !0);
359
- } catch (e) {
360
- return e instanceof Error && window.UserLeap.reportError("setAllLDFlagsVariations", e), console.warn("[Sprig] An issue had occured when setting LaunchDarkly flags and variations."), !1;
356
+ return !(!r || typeof r != "object" || Array.isArray(r)) && (Object.keys(this._ldData).forEach((t) => {
357
+ delete this._ldData[t];
358
+ }), Object.keys(r).forEach((t) => this._ldData[`!launch_darkly_${t}`] = (r[t] ?? 0) + 1), !0);
359
+ } catch (t) {
360
+ return t instanceof Error && window.UserLeap.reportError("setAllLDFlagsVariations", t), console.warn("[Sprig] An issue had occured when setting LaunchDarkly flags and variations."), !1;
361
361
  }
362
362
  }
363
363
  }();
@@ -366,14 +366,14 @@ const oe = new class {
366
366
  constructor() {
367
367
  W(this, "_optimizelyData", {});
368
368
  }
369
- setOptimizelyExperiment(t, e = !0) {
370
- if (!t || typeof t != "object") return !1;
371
- const { experiments: n } = t;
369
+ setOptimizelyExperiment(r, t = !0) {
370
+ if (!r || typeof r != "object") return !1;
371
+ const { experiments: n } = r;
372
372
  try {
373
- return e && Object.keys(this._optimizelyData).map((s) => {
373
+ return t && Object.keys(this._optimizelyData).map((s) => {
374
374
  delete this._optimizelyData[s];
375
375
  }), n && n.map((s) => {
376
- const { id: r, variation: i } = s, o = this.transformExperimentId(r);
376
+ const { id: e, variation: i } = s, o = this.transformExperimentId(e);
377
377
  i && typeof i == "string" && (this._optimizelyData[o] = i);
378
378
  }), !0;
379
379
  } catch (s) {
@@ -383,43 +383,43 @@ const oe = new class {
383
383
  getAllOptimizelyExperiments() {
384
384
  return this._optimizelyData;
385
385
  }
386
- getOptimizelyVariationName(t) {
387
- return this._optimizelyData[this.transformExperimentId(t)];
386
+ getOptimizelyVariationName(r) {
387
+ return this._optimizelyData[this.transformExperimentId(r)];
388
388
  }
389
- transformExperimentId(t) {
390
- return "!optimizely_experiments_" + t;
389
+ transformExperimentId(r) {
390
+ return "!optimizely_experiments_" + r;
391
391
  }
392
392
  getAndSetWebOptimizelyExperiments() {
393
- var t;
393
+ var r;
394
394
  try {
395
395
  if (window && window.optimizely && typeof window.optimizely.get == "function") {
396
- const e = (t = window.optimizely.get("state")) == null ? void 0 : t.getExperimentStates({ isActive: !0 });
397
- if (e) {
398
- const n = Object.keys(e).map((s) => {
399
- var r, i;
400
- return (r = e[s].variation) != null && r.name ? { id: s, variation: (i = e[s].variation) == null ? void 0 : i.name } : { id: s, variation: "Original" };
396
+ const t = (r = window.optimizely.get("state")) == null ? void 0 : r.getExperimentStates({ isActive: !0 });
397
+ if (t) {
398
+ const n = Object.keys(t).map((s) => {
399
+ var e, i;
400
+ return (e = t[s].variation) != null && e.name ? { id: s, variation: (i = t[s].variation) == null ? void 0 : i.name } : { id: s, variation: "Original" };
401
401
  });
402
402
  return this.setOptimizelyExperiment({ experiments: n }, !1), !0;
403
403
  }
404
404
  return !1;
405
405
  }
406
406
  return !1;
407
- } catch (e) {
408
- return e instanceof Error && window.UserLeap.reportError("getAndSetWebOptimizely", e), !1;
407
+ } catch (t) {
408
+ return t instanceof Error && window.UserLeap.reportError("getAndSetWebOptimizely", t), !1;
409
409
  }
410
410
  }
411
411
  }();
412
412
  Object.freeze(oe);
413
413
  class Vt {
414
- constructor(e, n) {
414
+ constructor(t, n) {
415
415
  W(this, "paused");
416
416
  W(this, "queue");
417
417
  W(this, "ul");
418
- this.ul = e, this.paused = !1, this.queue = [], this.flush(n);
418
+ this.ul = t, this.paused = !1, this.queue = [], this.flush(n);
419
419
  }
420
- flush(e) {
421
- const n = e.length;
422
- if (n) for (let s = 0; s < n; s++) this.push(e[s]);
420
+ flush(t) {
421
+ const n = t.length;
422
+ if (n) for (let s = 0; s < n; s++) this.push(t[s]);
423
423
  }
424
424
  isPaused() {
425
425
  return this.paused;
@@ -429,110 +429,110 @@ class Vt {
429
429
  }
430
430
  unpause() {
431
431
  this.paused = !1;
432
- const e = this.queue.slice();
433
- this.empty(), this.flush(e);
432
+ const t = this.queue.slice();
433
+ this.empty(), this.flush(t);
434
434
  }
435
- push(e) {
436
- if (this.paused) this.queue.push(e);
437
- else if (e instanceof Function) e();
435
+ push(t) {
436
+ if (this.paused) this.queue.push(t);
437
+ else if (t instanceof Function) t();
438
438
  else {
439
- const n = Array.prototype.slice.call(e, 1), s = e[0], r = this.ul[s];
440
- r instanceof Function ? r.apply(this.ul, n) : s && console.warn("[Sprig] (ERR-100) No valid UserLeap action called", s);
439
+ const n = Array.prototype.slice.call(t, 1), s = t[0], e = this.ul[s];
440
+ e instanceof Function ? e.apply(this.ul, n) : s && console.warn("[Sprig] (ERR-100) No valid UserLeap action called", s);
441
441
  }
442
442
  }
443
- perform(e) {
443
+ perform(t) {
444
444
  if (this.paused) {
445
445
  let n = () => {
446
446
  };
447
- const s = new Promise(function(r) {
447
+ const s = new Promise(function(e) {
448
448
  n = function() {
449
- r(e());
449
+ e(t());
450
450
  };
451
451
  });
452
452
  return this.queue.push(n), s;
453
453
  }
454
- return e();
454
+ return t();
455
455
  }
456
456
  empty() {
457
457
  this.queue.length = 0;
458
458
  }
459
459
  }
460
460
  let gt, yt;
461
- const Ee = (t) => {
462
- let e = 0, n = t.firstElementChild;
463
- for (; n; ) e += Ee(n), n.shadowRoot && (e += Ee(n.shadowRoot)), n = n.nextElementSibling, e++;
464
- return e;
461
+ const Ee = (r) => {
462
+ let t = 0, n = r.firstElementChild;
463
+ for (; n; ) t += Ee(n), n.shadowRoot && (t += Ee(n.shadowRoot)), n = n.nextElementSibling, t++;
464
+ return t;
465
465
  }, Qe = () => {
466
466
  gt.report(Ee(document.body)), yt.report(document.documentElement.innerHTML.length);
467
- }, _e = (t, e) => {
467
+ }, _e = (r, t) => {
468
468
  const n = performance.now();
469
- document.hidden ? setTimeout(() => _e(t, e), t) : setTimeout(() => {
469
+ document.hidden ? setTimeout(() => _e(r, t), r) : setTimeout(() => {
470
470
  const s = performance.now() - n;
471
- e.report(s / 1e3), setTimeout(() => _e(t, e), t);
471
+ t.report(s / 1e3), setTimeout(() => _e(r, t), r);
472
472
  }, 0);
473
473
  };
474
474
  let le, ce, pe, ue, Ye, N = {};
475
- const ne = (t, e = 1) => {
476
- const { name: n } = t;
477
- N[n] = (N[n] || 0) + e;
478
- }, mt = (t) => {
479
- let e = 1;
480
- return t.childNodes.forEach((n) => {
481
- e += mt(n);
482
- }), e;
483
- }, Xe = (t) => {
484
- let e = 0;
485
- return t.forEach((n) => {
486
- e += mt(n);
487
- }), e;
488
- }, Wt = (t) => {
489
- switch (t.type) {
475
+ const ne = (r, t = 1) => {
476
+ const { name: n } = r;
477
+ N[n] = (N[n] || 0) + t;
478
+ }, mt = (r) => {
479
+ let t = 1;
480
+ return r.childNodes.forEach((n) => {
481
+ t += mt(n);
482
+ }), t;
483
+ }, Xe = (r) => {
484
+ let t = 0;
485
+ return r.forEach((n) => {
486
+ t += mt(n);
487
+ }), t;
488
+ }, Wt = (r) => {
489
+ switch (r.type) {
490
490
  case "childList":
491
- return ne(le, Xe(t.addedNodes)), void ne(ce, Xe(t.removedNodes));
491
+ return ne(le, Xe(r.addedNodes)), void ne(ce, Xe(r.removedNodes));
492
492
  case "attributes":
493
493
  return void ne(pe);
494
494
  case "characterData":
495
495
  return void ne(ue);
496
496
  }
497
- }, Bt = (t) => t.forEach(Wt), Nt = () => {
497
+ }, Bt = (r) => r.forEach(Wt), Nt = () => {
498
498
  le.report(N[le.name] || 0), ce.report(N[ce.name] || 0), pe.report(N[pe.name] || 0), ue.report(N[ue.name] || 0), N = {};
499
- }, $t = (t = 1e3) => {
500
- le = $("sdk_mutations_nodes_added"), ce = $("sdk_mutations_nodes_removed"), pe = $("sdk_mutations_attributes_changed"), ue = $("sdk_mutations_character_data"), Ye = new MutationObserver(Bt), Ye.observe(document, { attributes: !0, attributeOldValue: !0, characterData: !0, characterDataOldValue: !0, childList: !0, subtree: !0 }), setInterval(Nt, t);
501
- }, Gt = ({ isWeb: t, reportingIntervalSeconds: e, thresholds: n, postMetrics: s }) => {
502
- _t(n, (r, i) => {
499
+ }, $t = (r = 1e3) => {
500
+ le = $("sdk_mutations_nodes_added"), ce = $("sdk_mutations_nodes_removed"), pe = $("sdk_mutations_attributes_changed"), ue = $("sdk_mutations_character_data"), Ye = new MutationObserver(Bt), Ye.observe(document, { attributes: !0, attributeOldValue: !0, characterData: !0, characterDataOldValue: !0, childList: !0, subtree: !0 }), setInterval(Nt, r);
501
+ }, Gt = ({ isWeb: r, reportingIntervalSeconds: t, thresholds: n, postMetrics: s }) => {
502
+ _t(n, (e, i) => {
503
503
  var o, a;
504
504
  if ((o = S.replay) != null && o.isReplayRecording()) {
505
- const l = `Value: ${r} on ${i.metric} violated threshold of ${i.type} ${i.value}`;
506
- (a = S.replay) == null || a.disableRecording("Threshold violated", new Error(l), { reportError: !1 }), window.UserLeap.reportError("Sdk Performance Metric threshold violated", new Error("Sdk Performance Metric threshold violated"), { metricName: i.metric, type: i.type, value: i.value }, { metricName: i.metric }), Rt();
505
+ const l = `Value: ${e} on ${i.metric} violated threshold of ${i.type} ${i.value}`;
506
+ (a = S.replay) == null || a.disableRecording("Threshold violated", new Error(l), { reportError: !1 }), window.UserLeap.reportError("Sdk Performance Metric threshold violated", new Error("Sdk Performance Metric threshold violated"), { metricName: i.metric, type: i.type, value: i.value }, { metricName: i.metric }), xt();
507
507
  }
508
- }), xt({ reportingIntervalSeconds: e, postMetrics: s }), t && (((r = 1e3) => {
508
+ }), Rt({ reportingIntervalSeconds: t, postMetrics: s }), r && (((e = 1e3) => {
509
509
  const i = $("sdk_event_queue_latency_seconds");
510
- _e(r, i);
511
- })(), ((r = 1e4) => {
512
- gt = $("sdk_dom_nodes_count"), yt = $("sdk_page_html_characters"), Qe(), setInterval(Qe, r);
510
+ _e(e, i);
511
+ })(), ((e = 1e4) => {
512
+ gt = $("sdk_dom_nodes_count"), yt = $("sdk_page_html_characters"), Qe(), setInterval(Qe, e);
513
513
  })(), $t());
514
514
  }, Kt = "test", Jt = ["popState", "pushState", "replaceState"];
515
515
  let Oe, ee;
516
516
  const we = {}, Q = "!email", ft = "pageUrl";
517
517
  let Le = window.location.href;
518
- function te(t) {
518
+ function te(r) {
519
519
  var a, l;
520
- const { pageUrlEvents: e, interactiveEvents: n, dismissOnPageChange: s, platform: r } = window.UserLeap._config;
521
- if (r && r !== "web") return;
520
+ const { pageUrlEvents: t, interactiveEvents: n, dismissOnPageChange: s, platform: e } = window.UserLeap._config;
521
+ if (e && e !== "web") return;
522
522
  Le !== window.location.href && q.navigation("LocationChange", { from: Le, to: window.location.href }), Le = window.location.href;
523
523
  const i = bt().trackStartUrl, o = i ? String(i) : null;
524
- e && Ut(window.location.href), n && (ht(), Qt()), lt() && (() => {
524
+ t && Ut(window.location.href), n && (ht(), Qt()), lt() && (() => {
525
525
  if (ae()) return;
526
526
  const p = K();
527
527
  p && (Et(Z) || (p.remove(), Z = null, h = null));
528
528
  })(), At.getItem("sprig.isCapturingHeatmap") && ((l = (a = S.replay) == null ? void 0 : a.checkPendingHeatmapsUrl()) == null || l.then((p) => {
529
529
  var d;
530
530
  p && ((d = S.replay) == null || d.uploadReadyPendingCaptures(!0));
531
- })), !ae() && s && o && o !== window.location.href && t && Jt.includes(t.type) && window.UserLeap("dismissActiveSurvey", M.PageChange);
531
+ })), !ae() && s && o && o !== window.location.href && r && Jt.includes(r.type) && window.UserLeap("dismissActiveSurvey", M.PageChange);
532
532
  }
533
533
  const vt = { capture: !0 }, Qt = () => {
534
- const t = window.UserLeap._config.interactiveEvents.filter((n) => it(n, window.location.href)).map((n) => {
535
- const { name: s, properties: r } = n, { selector: i, innerText: o } = r;
534
+ const r = window.UserLeap._config.interactiveEvents.filter((n) => it(n, window.location.href)).map((n) => {
535
+ const { name: s, properties: e } = n, { selector: i, innerText: o } = e;
536
536
  return i ? (a) => {
537
537
  if ($e(a.target)) try {
538
538
  a.target.closest(i) && window.UserLeap("track", s);
@@ -540,155 +540,155 @@ const vt = { capture: !0 }, Qt = () => {
540
540
  }
541
541
  return !1;
542
542
  } : (a) => ($e(a.target) && a.target.innerText === o && window.UserLeap("track", s), !1);
543
- }), e = (n) => t.forEach((s) => s(n));
544
- window.UserLeap._config.interactiveEventsHandler = e, window.addEventListener("click", e, vt);
543
+ }), t = (n) => r.forEach((s) => s(n));
544
+ window.UserLeap._config.interactiveEventsHandler = t, window.addEventListener("click", t, vt);
545
545
  }, ht = () => {
546
546
  window.UserLeap._config.interactiveEventsHandler && window.removeEventListener("click", window.UserLeap._config.interactiveEventsHandler, vt), delete window.UserLeap._config.interactiveEventsHandler;
547
547
  };
548
548
  function bt() {
549
- const t = R.getItemObject("userleap.ids");
550
- return t && t[window.UserLeap.envId] || {};
549
+ const r = x.getItemObject("userleap.ids");
550
+ return r && r[window.UserLeap.envId] || {};
551
551
  }
552
552
  function Lt() {
553
553
  if (window.previewMode) return;
554
- const t = R.getItemObject("sprig.anon.env.vid.map") || {}, e = t[window.UserLeap.envId];
555
- window.UserLeap.visitorId = e || tt(), q.info("NewVid", { vid: window.UserLeap.visitorId }), x("vid", window.UserLeap.visitorId), e || (t[window.UserLeap.envId] = window.UserLeap.visitorId, R.setItemObject("sprig.anon.env.vid.map", t)), y.emit(w.VisitorIDUpdated, { visitorId: window.UserLeap.visitorId });
554
+ const r = x.getItemObject("sprig.anon.env.vid.map") || {}, t = r[window.UserLeap.envId];
555
+ window.UserLeap.visitorId = t || tt(), q.info("NewVid", { vid: window.UserLeap.visitorId }), R("vid", window.UserLeap.visitorId), t || (r[window.UserLeap.envId] = window.UserLeap.visitorId, x.setItemObject("sprig.anon.env.vid.map", r)), y.emit(w.VisitorIDUpdated, { visitorId: window.UserLeap.visitorId });
556
556
  }
557
- function Ut(t, e, n, s) {
558
- var r, i;
557
+ function Ut(r, t, n, s) {
558
+ var e, i;
559
559
  try {
560
- if (t.endsWith("mock_snippet.html")) return;
561
- q.info("PageView", { url: t });
562
- const o = (r = document == null ? void 0 : document.querySelector('meta[name="description"]')) == null ? void 0 : r.getAttribute("content");
563
- (i = S.replay) == null || i.RecordPageView({ ...o && { description: o }, url: t, referrer: document.referrer, pageTitle: document.title });
560
+ if (r.endsWith("mock_snippet.html")) return;
561
+ q.info("PageView", { url: r });
562
+ const o = (e = document == null ? void 0 : document.querySelector('meta[name="description"]')) == null ? void 0 : e.getAttribute("content");
563
+ (i = S.replay) == null || i.RecordPageView({ ...o && { description: o }, url: r, referrer: document.referrer, pageTitle: document.title });
564
564
  const a = window.UserLeap._config.pageUrlEvents;
565
565
  let l = !1;
566
- if (a && a.length) for (let d = 0; d < a.length && (l = it(a[d], t), !l); d++) ;
566
+ if (a && a.length) for (let d = 0; d < a.length && (l = it(a[d], r), !l); d++) ;
567
567
  if (!l) return;
568
- window.UserLeap.debugMode && console.info("[DEBUG] Sprig trackPageView", t);
569
- const p = { url: t };
570
- s && (p.trackPageView = !0), window.UserLeap._queue.push(["track", ft, e, p, n]);
568
+ window.UserLeap.debugMode && console.info("[DEBUG] Sprig trackPageView", r);
569
+ const p = { url: r };
570
+ s && (p.trackPageView = !0), window.UserLeap._queue.push(["track", ft, t, p, n]);
571
571
  } catch (o) {
572
- o instanceof Error && (o.stack = t, window.UserLeap.reportError("trackPageView", o)), console.warn("[Sprig] (ERR-428) Failed to track page view", o);
572
+ o instanceof Error && (o.stack = r, window.UserLeap.reportError("trackPageView", o)), console.warn("[Sprig] (ERR-428) Failed to track page view", o);
573
573
  }
574
574
  }
575
575
  function Yt() {
576
- const t = "Backbone" in window && window.Backbone && window.Backbone.history ? window.Backbone.history : window.history;
577
- "pushState" in t && (t.pushState = /* @__PURE__ */ ((e) => function(...n) {
578
- const s = e.apply(this, n), r = new Event("pushState");
579
- return window.dispatchEvent(r), te(r), s;
580
- })(t.pushState)), "replaceState" in t && (t.replaceState = /* @__PURE__ */ ((e) => function(...n) {
581
- const s = e.apply(this, n), r = new Event("replaceState");
582
- return window.dispatchEvent(r), te(r), s;
583
- })(t.replaceState)), ["hashchange", "popstate"].forEach((e) => window.addEventListener(e, te, !0));
576
+ const r = "Backbone" in window && window.Backbone && window.Backbone.history ? window.Backbone.history : window.history;
577
+ "pushState" in r && (r.pushState = /* @__PURE__ */ ((t) => function(...n) {
578
+ const s = t.apply(this, n), e = new Event("pushState");
579
+ return window.dispatchEvent(e), te(e), s;
580
+ })(r.pushState)), "replaceState" in r && (r.replaceState = /* @__PURE__ */ ((t) => function(...n) {
581
+ const s = t.apply(this, n), e = new Event("replaceState");
582
+ return window.dispatchEvent(e), te(e), s;
583
+ })(r.replaceState)), ["hashchange", "popstate"].forEach((t) => window.addEventListener(t, te, !0));
584
584
  }
585
- async function Ue(t, e) {
586
- const n = Re();
587
- t && !e && (window.UserLeap._config.mode = Kt);
588
- const s = ge(P(window.UserLeap)), r = await O(function(i) {
585
+ async function Ue(r, t) {
586
+ const n = xe();
587
+ r && !t && (window.UserLeap._config.mode = Kt);
588
+ const s = ge(P(window.UserLeap)), e = await O(function(i) {
589
589
  const o = new URL(A("1", [z], "questions"));
590
590
  return Object.entries(i || {}).forEach(([a, l]) => {
591
591
  l && o.searchParams.append(a, String(l));
592
592
  }), o.toString();
593
- }({ desktopDisplay: window.UserLeap._config.desktopDisplay, isMobile: s, previewLanguage: window.UserLeap._config.previewLanguage, surveyid: t == null ? void 0 : t.surveyId, surveytemplateid: t == null ? void 0 : t.surveyTemplateId, vid: n }), { shouldDropOnRateLimit: !0 });
594
- if (!r.ok) return r.reportError && r.error && (console.warn("[Sprig] (ERR-414) Failed to request questions from the server", r.error), window.UserLeap.reportError("getQuestions", r.error)), { success: !1, surveyState: "no survey" };
595
- if (r.json.delay && await nt(r.json.delay), !r.json.isFeedback) return X(r.json, ee, Oe);
593
+ }({ desktopDisplay: window.UserLeap._config.desktopDisplay, isMobile: s, previewLanguage: window.UserLeap._config.previewLanguage, surveyid: r == null ? void 0 : r.surveyId, surveytemplateid: r == null ? void 0 : r.surveyTemplateId, vid: n }), { shouldDropOnRateLimit: !0 });
594
+ if (!e.ok) return e.reportError && e.error && (console.warn("[Sprig] (ERR-414) Failed to request questions from the server", e.error), window.UserLeap.reportError("getQuestions", e.error)), { success: !1, surveyState: "no survey" };
595
+ if (e.json.delay && await nt(e.json.delay), !e.json.isFeedback) return X(e.json, ee, Oe);
596
596
  {
597
- const { feedbackLabel: i, productConfig: o, surveyUuid: a, feedbackCustomStyles: l } = r.json, { buttonTheme: p, placement: d, desktopDisplay: c } = o;
598
- wt({ customStyles: l, buttonTheme: p, desktopDisplay: c, eventId: 0, feedbackLabel: i, placement: d, surveyUuid: a, surveyId: t == null ? void 0 : t.surveyId }, r.json);
597
+ const { feedbackLabel: i, productConfig: o, surveyUuid: a, feedbackCustomStyles: l } = e.json, { buttonTheme: p, placement: d, desktopDisplay: c } = o;
598
+ wt({ customStyles: l, buttonTheme: p, desktopDisplay: c, eventId: 0, feedbackLabel: i, placement: d, surveyUuid: a, surveyId: r == null ? void 0 : r.surveyId }, e.json);
599
599
  }
600
600
  }
601
- function Xt(t) {
602
- if (!t) return;
603
- window.UserLeap._config = t, t.mute && window.UserLeap._queue.pause();
604
- const { interactiveEvents: e, pageUrlEvents: n, dismissOnPageChange: s } = t;
605
- e && function(r) {
606
- let i = r.length;
601
+ function Xt(r) {
602
+ if (!r) return;
603
+ window.UserLeap._config = r, r.mute && window.UserLeap._queue.pause();
604
+ const { interactiveEvents: t, pageUrlEvents: n, dismissOnPageChange: s } = r;
605
+ t && function(e) {
606
+ let i = e.length;
607
607
  for (; i; ) {
608
608
  const o = Math.floor(Math.random() * i);
609
609
  i -= 1;
610
- const a = r[i];
611
- r[i] = r[o], r[o] = a;
610
+ const a = e[i];
611
+ e[i] = e[o], e[o] = a;
612
612
  }
613
- }(e), (e || n || s) && (Yt(), te());
613
+ }(t), (t || n || s) && (Yt(), te());
614
614
  }
615
- const Zt = function(t) {
615
+ const Zt = function(r) {
616
616
  if (!window.UserLeap) return;
617
- const e = async (r = {}) => {
618
- var m, U, b, I, T;
619
- const { userId: i, anonymousId: o, metadata: a = {}, properties: l, showSurveyCallback: p } = r;
620
- let { eventName: d } = r;
621
- if (window.UserLeap.debugMode && d !== ft && console.info("[DEBUG] Sprig track", r), t.mode === "test") return;
622
- const c = R.getItem("sprig.previewKey") ?? void 0;
623
- if (t.requireUserIdForTracking && !window.UserLeap.userId && !i) {
624
- const v = "[Sprig] - Skipping tracking without userId";
625
- return console.warn(v), { success: !1, message: v, surveyState: "no survey" };
617
+ const t = async (e = {}) => {
618
+ var v, L, b, _, T;
619
+ const { userId: i, anonymousId: o, metadata: a = {}, properties: l, showSurveyCallback: p } = e;
620
+ let { eventName: d } = e;
621
+ if (window.UserLeap.debugMode && d !== ft && console.info("[DEBUG] Sprig track", e), r.mode === "test") return;
622
+ const c = x.getItem("sprig.previewKey") ?? void 0;
623
+ if (r.requireUserIdForTracking && !window.UserLeap.userId && !i) {
624
+ const U = "[Sprig] - Skipping tracking without userId";
625
+ return console.warn(U), { success: !1, message: U, surveyState: "no survey" };
626
626
  }
627
627
  if (!d || d.trim().length === 0) {
628
628
  d = d ? String(d) : "";
629
- const v = "[Sprig] - Invalid event name " + d;
630
- return console.warn(v), { success: !1, message: v, surveyState: "no survey" };
629
+ const U = "[Sprig] - Invalid event name " + d;
630
+ return console.warn(U), { success: !1, message: U, surveyState: "no survey" };
631
631
  }
632
632
  const g = ee ?? window.location.href;
633
- a.url || (a.url = g), x("trackStartUrl", g), (U = (m = window.UserLeap) == null ? void 0 : m._config) != null && U.optimizelyEnabled && (ie(P(window.UserLeap)) || oe.getAndSetWebOptimizelyExperiments(), a.optimizelyExperiments = Object.assign({}, oe.getAllOptimizelyExperiments())), (I = (b = window.UserLeap) == null ? void 0 : b._config) != null && I.launchDarklyEnabled && (a.launchDarklyFlags = ke.getAllLaunchDarklyVariations()), i && (window.UserLeap.userId = i), o && (window.UserLeap.partnerAnonymousId = o), l && (a.eventProperties = l), (T = S.replay) == null || T.RecordEvent({ name: d, url: a.url }), q.info("TrackEvent", { eventName: d });
634
- const f = window.UserLeap.delayingSurvey || ct() ? await O(A("1", [F], "events/batch"), { body: JSON.stringify({ events: [{ event: d, metadata: a }], previewKey: c }), method: "POST", shouldDropOnRateLimit: !0 }) : await O(A("1", [F], "events"), { body: JSON.stringify({ event: d, metadata: a, previewKey: c }), method: "POST", shouldDropOnRateLimit: !0 });
635
- if (!f.ok) {
636
- const v = "[Sprig] (ERR-421) Failed to track event";
637
- return f.reportError && (console.warn(v, f.error), f.error && window.UserLeap.reportError("track", f.error)), { success: !1, message: v, error: f.error, surveyState: "no survey" };
633
+ a.url || (a.url = g), R("trackStartUrl", g), (L = (v = window.UserLeap) == null ? void 0 : v._config) != null && L.optimizelyEnabled && (ie(P(window.UserLeap)) || oe.getAndSetWebOptimizelyExperiments(), a.optimizelyExperiments = Object.assign({}, oe.getAllOptimizelyExperiments())), (_ = (b = window.UserLeap) == null ? void 0 : b._config) != null && _.launchDarklyEnabled && (a.launchDarklyFlags = ke.getAllLaunchDarklyVariations()), i && (window.UserLeap.userId = i), o && (window.UserLeap.partnerAnonymousId = o), l && (a.eventProperties = l), (T = S.replay) == null || T.RecordEvent({ name: d, url: a.url }), q.info("TrackEvent", { eventName: d });
634
+ const m = window.UserLeap.delayingSurvey || ct() ? await O(A("1", [F], "events/batch"), { body: JSON.stringify({ events: [{ event: d, metadata: a }], previewKey: c }), method: "POST", shouldDropOnRateLimit: !0 }) : await O(A("1", [F], "events"), { body: JSON.stringify({ event: d, metadata: a, previewKey: c }), method: "POST", shouldDropOnRateLimit: !0 });
635
+ if (!m.ok) {
636
+ const U = "[Sprig] (ERR-421) Failed to track event";
637
+ return m.reportError && (console.warn(U, m.error), m.error && window.UserLeap.reportError("track", m.error)), { success: !1, message: U, error: m.error, surveyState: "no survey" };
638
638
  }
639
- i && x("uid", i), o && x("aid", o);
640
- const u = f.json;
641
- u.invalidPreviewKey && R.removeItem("sprig.previewKey");
639
+ i && R("uid", i), o && R("aid", o);
640
+ const u = m.json;
641
+ u.invalidPreviewKey && x.removeItem("sprig.previewKey");
642
642
  const E = a.trackPageView ? a.url : void 0;
643
- return u != null && u.feedbackButton && wt(u.feedbackButton, void 0, E), await async function(v, D) {
643
+ return u != null && u.feedbackButton && wt(u.feedbackButton, void 0, E), await async function(U, D) {
644
644
  var H, V;
645
645
  let k = !0;
646
- return !(D && ((H = v == null ? void 0 : v.json) != null && H.surveyId) && (window.UserLeap.delayingSurvey = !0, k = await D(v.json.surveyId), window.UserLeap.delayingSurvey = !1, !k)) && ((V = v == null ? void 0 : v.json) != null && V.delay && !window.UserLeap.isMobileSDK && (window.UserLeap.delayingSurvey = !0, await nt(v.json.delay), window.UserLeap.delayingSurvey = !1), k);
647
- }(f, p) ? function(v) {
646
+ return !(D && ((H = U == null ? void 0 : U.json) != null && H.surveyId) && (window.UserLeap.delayingSurvey = !0, k = await D(U.json.surveyId), window.UserLeap.delayingSurvey = !1, !k)) && ((V = U == null ? void 0 : U.json) != null && V.delay && !window.UserLeap.isMobileSDK && (window.UserLeap.delayingSurvey = !0, await nt(U.json.delay), window.UserLeap.delayingSurvey = !1), k);
647
+ }(m, p) ? function(U) {
648
648
  if (!window.UserLeap._config.dismissOnPageChange) return !0;
649
- const D = new URL(v), k = new URL(ee ?? window.location.href);
649
+ const D = new URL(U), k = new URL(ee ?? window.location.href);
650
650
  return D.hostname === k.hostname && D.pathname === k.pathname;
651
651
  }(g) ? X(u, E, Oe) : { success: !1, message: "Study should not be displayed after page navigation", surveyState: "no survey" } : { success: !1, message: "[Sprig] Callback returned false, aborting rendering of survey", surveyState: "no survey" };
652
- }, n = (r, i) => {
652
+ }, n = (e, i) => {
653
653
  var a;
654
- const o = (a = r == null ? void 0 : r.querySelector(`[id="${De}"]`)) == null ? void 0 : a.contentDocument;
654
+ const o = (a = e == null ? void 0 : e.querySelector(`[id="${De}"]`)) == null ? void 0 : a.contentDocument;
655
655
  o && se({ document: o, elementId: "ul-custom-style", styleString: i });
656
- }, s = { displaySurvey: async (r) => (console.warn("[Sprig] displaySurvey should only be used to debug your studies; not intended for production usage."), window.UserLeap("dismissActiveSurvey", M.Override), Ue({ surveyId: r }, !0)), _previewSurvey(r) {
657
- window.UserLeap("dismissActiveSurvey", M.Override), Ue({ surveyTemplateId: r }, !1);
658
- }, _reviewSurvey(r) {
659
- window.UserLeap("dismissActiveSurvey", M.Override), Ue({ surveyId: r }, !1);
660
- }, previewSurvey(r) {
661
- s._previewSurvey(r);
662
- }, reviewSurvey(r) {
663
- s._reviewSurvey(r);
656
+ }, s = { displaySurvey: async (e) => (console.warn("[Sprig] displaySurvey should only be used to debug your studies; not intended for production usage."), window.UserLeap("dismissActiveSurvey", M.Override), Ue({ surveyId: e }, !0)), _previewSurvey(e) {
657
+ window.UserLeap("dismissActiveSurvey", M.Override), Ue({ surveyTemplateId: e }, !1);
658
+ }, _reviewSurvey(e) {
659
+ window.UserLeap("dismissActiveSurvey", M.Override), Ue({ surveyId: e }, !1);
660
+ }, previewSurvey(e) {
661
+ s._previewSurvey(e);
662
+ }, reviewSurvey(e) {
663
+ s._reviewSurvey(e);
664
664
  }, mute() {
665
665
  window.UserLeap._queue.pause();
666
666
  }, unmute() {
667
667
  window.UserLeap._queue.unpause();
668
668
  }, setVisitorToken() {
669
669
  console.warn("[Sprig] setVisitorToken is deprecated.");
670
- }, dismissActiveSurvey(r = M.API) {
671
- window.UserLeap.container && (r === M.Closed && window.Sprig.trackHistory && window.Sprig.trackHistory({ event: "closed" }), y.emit(w.SurveyCloseRequested, { name: w.SurveyCloseRequested, initiator: r, "survey.id": parseInt(window.UserLeap.container.dataset.studyId) }), y.emit(w.SurveyWillClose, { name: w.SurveyWillClose, initiator: r, "survey.id": parseInt(window.UserLeap.container.dataset.studyId) }));
672
- }, async setAttribute(r, i) {
673
- if (!r || !i && i !== 0 && i !== !1) {
670
+ }, dismissActiveSurvey(e = M.API) {
671
+ window.UserLeap.container && (e === M.Closed && window.Sprig.trackHistory && window.Sprig.trackHistory({ event: "closed" }), y.emit(w.SurveyCloseRequested, { name: w.SurveyCloseRequested, initiator: e, "survey.id": parseInt(window.UserLeap.container.dataset.studyId) }), y.emit(w.SurveyWillClose, { name: w.SurveyWillClose, initiator: e, "survey.id": parseInt(window.UserLeap.container.dataset.studyId) }));
672
+ }, async setAttribute(e, i) {
673
+ if (!e || !i && i !== 0 && i !== !1) {
674
674
  const o = "[Sprig] - Disregarding empty attribute / value provided";
675
675
  return console.warn(o), { success: !1, message: o };
676
676
  }
677
- return this.setAttributes({ [r]: i });
678
- }, async setAttributes(r) {
679
- if (r == null || Object.keys(r).length === 0) {
677
+ return this.setAttributes({ [e]: i });
678
+ }, async setAttributes(e) {
679
+ if (e == null || Object.keys(e).length === 0) {
680
680
  const i = "[Sprig] - Disregarding empty attributes provided";
681
681
  return console.warn(i), { success: !1, message: i };
682
682
  }
683
- return this.identifyAndSetAttributes({ attributes: r });
684
- }, async identifyAndSetAttributes(r) {
685
- if (window.UserLeap.debugMode && console.info("[DEBUG] Sprig identifyAndSetAttributes", r), t.mode === "test") return;
686
- if (r === null || typeof r != "object" || !(r.userId || r.anonymousId || r.attributes)) {
683
+ return this.identifyAndSetAttributes({ attributes: e });
684
+ }, async identifyAndSetAttributes(e) {
685
+ if (window.UserLeap.debugMode && console.info("[DEBUG] Sprig identifyAndSetAttributes", e), r.mode === "test") return;
686
+ if (e === null || typeof e != "object" || !(e.userId || e.anonymousId || e.attributes)) {
687
687
  const d = "[Sprig] - Disregarding empty payload provided";
688
688
  return console.warn(d), { success: !1, message: d };
689
689
  }
690
- const { userId: i, anonymousId: o, attributes: a } = r;
691
- if (t.requireUserIdForTracking && !window.UserLeap.userId && !i) {
690
+ const { userId: i, anonymousId: o, attributes: a } = e;
691
+ if (r.requireUserIdForTracking && !window.UserLeap.userId && !i) {
692
692
  const d = "[Sprig] - Skipping tracking without userId";
693
693
  return console.warn(d), { success: !1, message: d };
694
694
  }
@@ -700,86 +700,86 @@ const Zt = function(t) {
700
700
  if (!(a && Object.keys(a).length !== 0 || i && window.UserLeap.userId !== i || o && window.UserLeap.partnerAnonymousId !== o)) return { success: !0 };
701
701
  const l = {};
702
702
  let p;
703
- return i && (l.userId = window.UserLeap.userId = i), o && (l.partnerAnonymousId = window.UserLeap.partnerAnonymousId = o), a && Object.keys(a).length > 0 ? (p = await O(A("1", [z, F], "attributes"), { body: JSON.stringify(a), method: "PUT" }), p.ok ? Object.assign(we, a) : p.reportError && (console.warn("[Sprig] (ERR-432) identifyAndSetAttributes failed", p.error), p.error && window.UserLeap.reportError("identifyAndSetAttributes", p.error))) : p = await O(A("1", [z, F]), { body: JSON.stringify(l), method: "PUT" }), a && a[Q] && (window.UserLeap.email = a[Q]), p.ok && (i && x("uid", i), o && x("aid", o)), { success: !!p.ok };
704
- }, async removeAttributes(r) {
705
- if (window.UserLeap.debugMode && console.info("[DEBUG] Sprig removeAttributes", r), t.mode === "test") return;
706
- if (r == null || r.length === 0) {
703
+ return i && (l.userId = window.UserLeap.userId = i), o && (l.partnerAnonymousId = window.UserLeap.partnerAnonymousId = o), a && Object.keys(a).length > 0 ? (p = await O(A("1", [z, F], "attributes"), { body: JSON.stringify(a), method: "PUT" }), p.ok ? Object.assign(we, a) : p.reportError && (console.warn("[Sprig] (ERR-432) identifyAndSetAttributes failed", p.error), p.error && window.UserLeap.reportError("identifyAndSetAttributes", p.error))) : p = await O(A("1", [z, F]), { body: JSON.stringify(l), method: "PUT" }), a && a[Q] && (window.UserLeap.email = a[Q]), p.ok && (i && R("uid", i), o && R("aid", o)), { success: !!p.ok };
704
+ }, async removeAttributes(e) {
705
+ if (window.UserLeap.debugMode && console.info("[DEBUG] Sprig removeAttributes", e), r.mode === "test") return;
706
+ if (e == null || e.length === 0) {
707
707
  const o = "[Sprig] - Disregarding empty attributes provided";
708
708
  return console.warn(o), { success: !1, message: o };
709
709
  }
710
- if (t.requireUserIdForTracking && !window.UserLeap.userId) {
710
+ if (r.requireUserIdForTracking && !window.UserLeap.userId) {
711
711
  const o = "[Sprig] - Skipping tracking without userId";
712
712
  return console.warn(o), { success: !1, message: o };
713
713
  }
714
- const i = await O(A("1", [z, F], "attributes"), { body: JSON.stringify({ delete: r }), method: "DELETE" });
714
+ const i = await O(A("1", [z, F], "attributes"), { body: JSON.stringify({ delete: e }), method: "DELETE" });
715
715
  return !i.ok && i.reportError && (console.warn("[Sprig] (ERR-433) Remove attributes failed", i.error), i.error && window.UserLeap.reportError("removeAttributes", i.error)), { success: !!i.ok };
716
- }, async addSurveyListener(r) {
717
- y.on(w.SurveyLifeCycle, r);
718
- }, async removeSurveyListener(r) {
719
- y.removeListener(w.SurveyLifeCycle, r);
720
- }, async addListener(r, i) {
721
- y.on(r, i);
722
- }, async removeListener(r, i) {
723
- y.removeListener(r, i);
716
+ }, async addSurveyListener(e) {
717
+ y.on(w.SurveyLifeCycle, e);
718
+ }, async removeSurveyListener(e) {
719
+ y.removeListener(w.SurveyLifeCycle, e);
720
+ }, async addListener(e, i) {
721
+ y.on(e, i);
722
+ }, async removeListener(e, i) {
723
+ y.removeListener(e, i);
724
724
  }, async removeAllListeners() {
725
725
  y.removeAllListeners();
726
- }, setPreviewKey(r) {
727
- r && typeof r == "string" && R.isStorageAvailable && r && R.setItem("sprig.previewKey", r);
728
- }, async setUserId(r) {
726
+ }, setPreviewKey(e) {
727
+ e && typeof e == "string" && x.isStorageAvailable && e && x.setItem("sprig.previewKey", e);
728
+ }, async setUserId(e) {
729
729
  var a;
730
- if (window.UserLeap.debugMode && console.info("[DEBUG] Sprig setUserId", r), r == null) {
731
- const l = `[Sprig] - Invalid userId ${r}`;
730
+ if (window.UserLeap.debugMode && console.info("[DEBUG] Sprig setUserId", e), e == null) {
731
+ const l = `[Sprig] - Invalid userId ${e}`;
732
732
  return console.warn(l), { success: !1, message: l };
733
733
  }
734
- if (t.mode === "test" || r === window.UserLeap.userId) return;
735
- window.UserLeap.userId = r;
736
- const i = window.UserLeap.visitorId, o = await O(A("1", [z, F]), { body: JSON.stringify({ userId: r }), method: "PUT" });
737
- o.ok ? (i !== window.UserLeap.visitorId && ((a = S.replay) == null || a.clearUserReplayData()), x("uid", r)) : o.reportError && (console.warn("[Sprig] (ERR-420) Failed to set user id", o.error), o.error && window.UserLeap.reportError("setUserId", o.error));
738
- }, async setPartnerAnonymousId(r) {
739
- if (window.UserLeap.debugMode && console.info("[DEBUG] Sprig setPartnerAnonymousId", r), r == null) {
740
- const i = `[Sprig] - Invalid partnerAnonymousId ${r}`;
734
+ if (r.mode === "test" || e === window.UserLeap.userId) return;
735
+ window.UserLeap.userId = e;
736
+ const i = window.UserLeap.visitorId, o = await O(A("1", [z, F]), { body: JSON.stringify({ userId: e }), method: "PUT" });
737
+ o.ok ? (i !== window.UserLeap.visitorId && ((a = S.replay) == null || a.clearUserReplayData()), R("uid", e)) : o.reportError && (console.warn("[Sprig] (ERR-420) Failed to set user id", o.error), o.error && window.UserLeap.reportError("setUserId", o.error));
738
+ }, async setPartnerAnonymousId(e) {
739
+ if (window.UserLeap.debugMode && console.info("[DEBUG] Sprig setPartnerAnonymousId", e), e == null) {
740
+ const i = `[Sprig] - Invalid partnerAnonymousId ${e}`;
741
741
  return console.warn(i), { success: !1, message: i };
742
742
  }
743
- return window.UserLeap.partnerAnonymousId = r, x("aid", r), { success: !0 };
744
- }, track: async (r, i, o = {}, a = void 0) => e({ eventName: r, properties: i, metadata: o, showSurveyCallback: a }), identifyAndTrack: async (r) => await e(r), trackPageView(r, i = void 0, o = void 0, a = !0) {
745
- ee = r, Ut(r, i, o, a);
746
- }, applyFeedbackStyles({ button: r = "", view: i = "" }) {
747
- window.UserLeap.feedbackCustomStyles = i, document.getElementById("sprig-feedback-style") && se({ document, elementId: "ul-custom-style", styleString: r, nonce: window.UserLeap.styleNonce }), n(document.querySelector(".ul-container-feedback"), i);
748
- }, applyStyles(r) {
749
- window.UserLeap.customStyles = r, n(window.UserLeap.container, r);
750
- }, setWindowDimensions(r, i) {
751
- var g, f;
752
- const o = typeof r == "string" ? parseInt(r, 10) : r, a = typeof i == "string" ? parseInt(i, 10) : i;
743
+ return window.UserLeap.partnerAnonymousId = e, R("aid", e), { success: !0 };
744
+ }, track: async (e, i, o = {}, a = void 0) => t({ eventName: e, properties: i, metadata: o, showSurveyCallback: a }), identifyAndTrack: async (e) => await t(e), trackPageView(e, i = void 0, o = void 0, a = !0) {
745
+ ee = e, Ut(e, i, o, a);
746
+ }, applyFeedbackStyles({ button: e = "", view: i = "" }) {
747
+ window.UserLeap.feedbackCustomStyles = i, document.getElementById("sprig-feedback-style") && se({ document, elementId: "ul-custom-style", styleString: e, nonce: window.UserLeap.styleNonce }), n(document.querySelector(".ul-container-feedback"), i);
748
+ }, applyStyles(e) {
749
+ window.UserLeap.customStyles = e, n(window.UserLeap.container, e);
750
+ }, setWindowDimensions(e, i) {
751
+ var g, m;
752
+ const o = typeof e == "string" ? parseInt(e, 10) : e, a = typeof i == "string" ? parseInt(i, 10) : i;
753
753
  isNaN(o) || isNaN(a) || (window.UserLeap.windowDimensions = { width: o, height: a });
754
754
  const l = P(window.UserLeap), p = ge(l), d = l["userleap-platform"] === "web";
755
755
  if (!window.UserLeap.frameId) return;
756
756
  const c = document.getElementById(window.UserLeap.frameId);
757
- c && (window.UserLeap.useMobileStyling && ((g = window.UserLeap.windowDimensions) != null && g.width && (c.style.width = `${window.UserLeap.windowDimensions.width}px`), (f = window.UserLeap.windowDimensions) != null && f.height && (c.style.maxHeight = window.UserLeap.windowDimensions.height - 20 + "px"), c.contentDocument && (c.style.height = String(Ft(c.contentDocument, d && !p, rt(l))[0]) + "px")), y.emit(w.SurveyDimensions, { name: w.SurveyDimensions, contentFrameWidth: c.clientWidth, contentFrameHeight: c.clientHeight, "survey.id": parseInt(window.UserLeap.container.dataset.studyId) }));
757
+ c && (window.UserLeap.useMobileStyling && ((g = window.UserLeap.windowDimensions) != null && g.width && (c.style.width = `${window.UserLeap.windowDimensions.width}px`), (m = window.UserLeap.windowDimensions) != null && m.height && (c.style.maxHeight = window.UserLeap.windowDimensions.height - 20 + "px"), c.contentDocument && (c.style.height = String(Ft(c.contentDocument, d && !p, rt(l))[0]) + "px")), y.emit(w.SurveyDimensions, { name: w.SurveyDimensions, contentFrameWidth: c.clientWidth, contentFrameHeight: c.clientHeight, "survey.id": parseInt(window.UserLeap.container.dataset.studyId) }));
758
758
  }, logoutUser() {
759
- var r;
760
- window.UserLeap.debugMode && console.info("[DEBUG] Sprig logout"), q.info("LogOut", { vid: window.UserLeap.visitorId, userId: window.UserLeap.userId }), window.UserLeap.visitorId = null, window.UserLeap.userId = null, window.UserLeap.partnerAnonymousId = null, window.UserLeap.token = null, window.UserLeap.email = null, R.removeItem("userleap.ids"), window.UserLeap._queue.isPaused() && window.UserLeap._queue.empty(), Lt(), (r = S.replay) == null || r.clearUserReplayData(), window.UserLeap._queue.unpause();
759
+ var e;
760
+ window.UserLeap.debugMode && console.info("[DEBUG] Sprig logout"), q.info("LogOut", { vid: window.UserLeap.visitorId, userId: window.UserLeap.userId }), window.UserLeap.visitorId = null, window.UserLeap.userId = null, window.UserLeap.partnerAnonymousId = null, window.UserLeap.token = null, window.UserLeap.email = null, x.removeItem("userleap.ids"), window.UserLeap._queue.isPaused() && window.UserLeap._queue.empty(), Lt(), (e = S.replay) == null || e.clearUserReplayData(), window.UserLeap._queue.unpause();
761
761
  }, teardown() {
762
- ["hashchange", "popstate"].forEach((r) => window.removeEventListener(r, te, !0)), window.UserLeap._config.interactiveEvents && ht(), window.UserLeap("dismissActiveSurvey", M.API), delete window.UserLeap, delete window.Sprig, delete window._Sprig;
763
- }, integrateOptimizely(r, i = !0) {
762
+ ["hashchange", "popstate"].forEach((e) => window.removeEventListener(e, te, !0)), window.UserLeap._config.interactiveEvents && ht(), window.UserLeap("dismissActiveSurvey", M.API), delete window.UserLeap, delete window.Sprig, delete window._Sprig;
763
+ }, integrateOptimizely(e, i = !0) {
764
764
  var o, a;
765
765
  if ((a = (o = window.UserLeap) == null ? void 0 : o._config) != null && a.optimizelyEnabled) try {
766
- const l = typeof r == "string" ? JSON.parse(r) : r;
766
+ const l = typeof e == "string" ? JSON.parse(e) : e;
767
767
  oe.setOptimizelyExperiment(l, i);
768
768
  } catch (l) {
769
769
  console.warn("[Sprig] Error with integrating Optimizely data"), l instanceof Error && window.UserLeap.reportError("integrateOptimizely", l);
770
770
  }
771
771
  else console.warn("[SPRIG] Optimizely integration is currently not enabled for your product.");
772
- }, integrateOptimizelyClient(r) {
772
+ }, integrateOptimizelyClient(e) {
773
773
  var i, o;
774
774
  if (!((o = (i = window.UserLeap) == null ? void 0 : i._config) != null && o.optimizelyEnabled)) return void console.warn("[SPRIG] Optimizely integration is currently not enabled for your product.");
775
- r.notificationCenter.addNotificationListener("ACTIVATE:experiment, user_id,attributes, variation, event", ({ experiment: a, variation: l }) => {
775
+ e.notificationCenter.addNotificationListener("ACTIVATE:experiment, user_id,attributes, variation, event", ({ experiment: a, variation: l }) => {
776
776
  const p = { experiments: [{ id: a.id, variation: l.key }] };
777
777
  window.UserLeap("integrateOptimizely", p, !1);
778
778
  });
779
- }, importLaunchDarklyData(r) {
779
+ }, importLaunchDarklyData(e) {
780
780
  var i, o;
781
- (o = (i = window.UserLeap) == null ? void 0 : i._config) != null && o.launchDarklyEnabled ? ke.setLDFlagsVariations(r) : console.warn("[SPRIG] LaunchDarkly integration is currently not enabled for your product.");
782
- }, setVisitorAttribute: (r, i) => (console.warn("[Sprig] setVisitorAttribute is deprecated. Please use setAttribute"), s.setAttribute(r, i)), setEmail: async (r) => s.setAttribute(Q, r), setVisitorEmail: async (r) => (console.warn("[Sprig] setVisitorEmail is deprecated. Please use setEmail"), s.setEmail(r)), _generateVideoUploadUrl: async (r) => async function(i) {
781
+ (o = (i = window.UserLeap) == null ? void 0 : i._config) != null && o.launchDarklyEnabled ? ke.setLDFlagsVariations(e) : console.warn("[SPRIG] LaunchDarkly integration is currently not enabled for your product.");
782
+ }, setVisitorAttribute: (e, i) => (console.warn("[Sprig] setVisitorAttribute is deprecated. Please use setAttribute"), s.setAttribute(e, i)), setEmail: async (e) => s.setAttribute(Q, e), setVisitorEmail: async (e) => (console.warn("[Sprig] setVisitorEmail is deprecated. Please use setEmail"), s.setEmail(e)), _generateVideoUploadUrl: async (e) => async function(i) {
783
783
  var a;
784
784
  if (!i) return;
785
785
  const o = `${window.UserLeap._API_URL}/2/environments/integrations/upload`;
@@ -793,72 +793,80 @@ const Zt = function(t) {
793
793
  } catch (l) {
794
794
  console.warn("[Sprig] Error with generating video upload url"), l instanceof Error && window.UserLeap.reportError("generateVideoUploadUrl", l);
795
795
  }
796
- }(r), _reportMetric(r, i) {
797
- Dt(r, i);
798
- }, _completeSessionReplay: async ({ surveyId: r, responseGroupUuid: i, eventDigest: o }) => {
796
+ }(e), _reportMetric(e, i) {
797
+ Dt(e, i);
798
+ }, _completeSessionReplay: async ({ surveyId: e, responseGroupUuid: i, eventDigest: o }) => {
799
799
  var a;
800
- return S.replay ? (a = S.replay) == null ? void 0 : a._completeSessionReplay({ surveyId: r, responseGroupUuid: i, eventDigest: o, headers: P(window.UserLeap) }) : (window.UserLeap.reportError("_completeSessionReplay", new Error("Replay module not registered")), !1);
800
+ return S.replay ? (a = S.replay) == null ? void 0 : a._completeSessionReplay({ surveyId: e, responseGroupUuid: i, eventDigest: o, headers: P(window.UserLeap) }) : (window.UserLeap.reportError("_completeSessionReplay", new Error("Replay module not registered")), !1);
801
+ }, pauseReplayRecording() {
802
+ var e, i, o, a;
803
+ (i = (e = S.replay) == null ? void 0 : e.isReplayPaused) != null && i.call(e) || ((a = (o = S.replay) == null ? void 0 : o.recordReplayPaused) == null || a.call(o));
804
+ }, resumeReplayRecording() {
805
+ var e, i, o, a, l, p;
806
+ (i = (e = S.replay) == null ? void 0 : e.isReplayPaused) != null && i.call(e) && ((a = (o = S.replay) == null ? void 0 : o.recordReplayResumed) == null || a.call(o), (p = (l = S.replay) == null ? void 0 : l.recordFullSnapshot) == null || p.call(l));
801
807
  } };
802
808
  Object.assign(window.UserLeap, s);
803
809
  };
804
- async function er(t, e, n = {}, s = {}) {
805
- const r = window.__cfg && window.__cfg.mode, i = Re(), o = window.UserLeap.envId, a = window.document.documentElement, l = { mode: r, screenWidth: window.screen.width, screenHeight: window.screen.height, clientWidth: a.clientWidth, clientHeight: a.clientHeight, location: ee ?? window.location.href, language: window.navigator.language, ...n }, p = { action: t, breadcrumbs: q.breadcrumbs, err: { message: `${e == null ? void 0 : e.name} - ${e == null ? void 0 : e.message}`, stack: e == null ? void 0 : e.stack }, meta: l, vid: i, envId: o, ...s };
806
- (await O(A("1", null, "errors"), { method: "POST", headers: { "x-ul-error": window.btoa(`userleap-${Date.now()}-error`) }, body: JSON.stringify(p), shouldDropOnRateLimit: !0 })).ok || console.warn("[Sprig] (ERR-444) Failed to report error to API", e);
810
+ async function er(r, t, n = {}, s = {}) {
811
+ const e = window.__cfg && window.__cfg.mode, i = xe(), o = window.UserLeap.envId, a = window.document.documentElement, l = { mode: e, screenWidth: window.screen.width, screenHeight: window.screen.height, clientWidth: a.clientWidth, clientHeight: a.clientHeight, location: ee ?? window.location.href, language: window.navigator.language, ...n }, p = { action: r, breadcrumbs: q.breadcrumbs, err: { message: `${t == null ? void 0 : t.name} - ${t == null ? void 0 : t.message}`, stack: t == null ? void 0 : t.stack }, meta: l, vid: i, envId: o, ...s };
812
+ (await O(A("1", null, "errors"), { method: "POST", headers: { "x-ul-error": window.btoa(`userleap-${Date.now()}-error`) }, body: JSON.stringify(p), shouldDropOnRateLimit: !0 })).ok || console.warn("[Sprig] (ERR-444) Failed to report error to API", t);
807
813
  }
808
- function tr(t = {}) {
814
+ function tr(r = {}) {
809
815
  var s;
810
816
  (s = window.SprigLoggerCallback) == null || s.call(window, "Initializing Sprig");
811
- const e = new URLSearchParams(window.location.search).get("sprigPreviewKey") ?? "";
817
+ const t = new URLSearchParams(window.location.search).get("sprigPreviewKey") ?? "";
812
818
  async function n() {
813
- var g, f, u, E, _;
819
+ var c, g, m, u, E;
814
820
  if (window.UserLeap.loaded) return;
815
- if ((g = window.SprigLoggerCallback) == null || g.call(window, "Loading Sprig"), window.UserLeap.reportError = er, window.UserLeap.loaded = !0, window.UserLeap._config = Object.assign({}, t, window.UserLeap.config), window.UserLeap.delayingSurvey = !1, window.UserLeap._config && typeof window.UserLeap._config == "object") for (const m in window.UserLeap._config) window.UserLeap[m] = window.UserLeap._config[m];
816
- if (!window.UserLeap.envId) {
821
+ if ((c = window.SprigLoggerCallback) == null || c.call(window, "Loading Sprig"), window.UserLeap.reportError = er, window.UserLeap.loaded = !0, window.UserLeap._config = Object.assign({}, r, window.UserLeap.config), window.UserLeap.delayingSurvey = !1, window.UserLeap._config && typeof window.UserLeap._config == "object") for (const f in window.UserLeap._config) window.UserLeap[f] = window.UserLeap._config[f];
822
+ if (window.Sprig.outstandingTransactionLimit !== void 0 && (r.outstandingTransactionLimit = window.Sprig.outstandingTransactionLimit), !window.UserLeap.envId) {
817
823
  if (!window.UserLeap.appId) throw new Error("Missing Environment id");
818
824
  window.UserLeap.envId = window.UserLeap.appId;
819
825
  }
820
826
  window.UserLeap.debugMode && console.info("[DEBUG] Sprig debug mode enabled");
821
- const r = bt(), i = window.UserLeap.sampleRate;
822
- let o = r.sampled;
827
+ const e = bt(), i = window.UserLeap.sampleRate;
828
+ let o = e.sampled;
823
829
  if (i) {
824
- if (o === null && (o = Math.random() < i, x("sampled", o)), !o) return;
825
- } else o !== null && x("sampled", null);
830
+ if (o === null && (o = Math.random() < i, R("sampled", o)), !o) return;
831
+ } else o !== null && R("sampled", null);
826
832
  window.UserLeap._API_URL || (window.UserLeap._API_URL = "https://api.sprig.com");
827
833
  const a = [...window.UserLeap._queue];
828
834
  window.UserLeap._queue = new Vt(window.UserLeap, []), window.UserLeap._queue.pause();
829
- for (let m = 0; m < a.length; m++) window.UserLeap._queue.push(a[m]);
830
- const l = r.token;
831
- l ? (window.UserLeap.token = l, window.UserLeap.visitorId = r.vid ?? null, window.UserLeap.userId = r.uid ?? null, window.UserLeap.partnerAnonymousId = r.aid ?? null) : Lt();
835
+ for (let f = 0; f < a.length; f++) window.UserLeap._queue.push(a[f]);
836
+ const l = e.token;
837
+ l ? (window.UserLeap.token = l, window.UserLeap.visitorId = e.vid ?? null, window.UserLeap.userId = e.uid ?? null, window.UserLeap.partnerAnonymousId = e.aid ?? null) : Lt();
832
838
  const p = ie(P(window.UserLeap));
833
- (f = window.SprigLoggerCallback) == null || f.call(window, "Sprig fetching config");
834
- const d = await async function(m) {
835
- var T, v;
836
- const U = P(window.UserLeap);
839
+ (g = window.SprigLoggerCallback) == null || g.call(window, "Sprig fetching config");
840
+ const d = await async function(f) {
841
+ var _, T;
842
+ const v = P(window.UserLeap);
837
843
  document.addEventListener("securitypolicyviolation", He);
838
- const b = await et(A("1", [z], "config"), { headers: U });
839
- if (document.removeEventListener("securitypolicyviolation", He), !b.ok) return (T = window.SprigLoggerCallback) == null || T.call(window, "Sprig config fetch failed"), b.reportError && (console.warn("[Sprig] (ERR-422) Failed to load configuration", b.error), b.error && window.UserLeap.reportError("applyRemoteConfig", b.error)), Ve("Disabled: failed to fetch configuration"), m;
840
- const I = b.json;
841
- return I != null && I.disabled ? ((v = window.SprigLoggerCallback) == null || v.call(window, "Sprig config fetch disabled"), Ve(`Disabled: ${I.disabled}`), { disabled: I.disabled }) : Object.assign({}, I, m);
842
- }(t);
843
- (u = window.SprigLoggerCallback) == null || u.call(window, "Sprig fetched config"), Gt({ isWeb: !p, reportingIntervalSeconds: d.metricsReportingEnabled || d.mobileMetricsReportingEnabled ? d.metricsReportingIntervalSeconds : 0, thresholds: d.metricThresholds, postMetrics: async (m) => {
844
- var U;
845
- await O(A("1", [z], "metrics"), { body: m, method: "POST", headers: { "x-ul-replay-enabled": `${!!((U = S.replay) != null && U.isReplayRecording())}` }, shouldDropOnRateLimit: !0 });
846
- } });
847
- const c = d.alwaysOnReplay ? { userAgent: window.navigator.userAgent, surveyId: d.alwaysOnReplay.surveyId, responseGroupUuid: d.alwaysOnReplay.responseGroupUuid, sdkVersion: "2.33.3", maxDurationSeconds: d.alwaysOnReplay.maxDurationSeconds } : void 0;
848
- await ((E = S.replay) == null ? void 0 : E.initializeReplay({ maxReplayDurationSeconds: d.maxReplayDurationSeconds, maxInflightRequests: window.UserLeap.maxInflightReplayRequests ?? 2, replaySettings: d.replaySettings, apiUrl: window.UserLeap._API_URL, alwaysOnConfig: c })), Oe = d.replaySettings, Zt(d), await Xt(d), window.UserLeap._queue.unpause(), (_ = window.SprigLoggerCallback) == null || _.call(window, "SdkReady"), y.emit(w.SDKReady, { mobileMetricsReportingEnabled: !!d.mobileMetricsReportingEnabled, metricsReportingInterval: d.metricsReportingIntervalSeconds || 0, metricsThresholds: d.metricThresholds || [], maxMobileReplayDurationSeconds: d.maxMobileReplayDurationSeconds, mobileReplaySettings: d.mobileReplaySettings }), y.emit(w.VisitorIDUpdated, { visitorId: window.UserLeap.visitorId }), y.on(w.VisitorIDUpdated, () => {
849
- for (const m in we) delete we[m];
844
+ const L = await et(A("1", [z], "config"), { headers: v });
845
+ if (document.removeEventListener("securitypolicyviolation", He), !L.ok) return (_ = window.SprigLoggerCallback) == null || _.call(window, "Sprig config fetch failed"), L.reportError && (console.warn("[Sprig] (ERR-422) Failed to load configuration", L.error), L.error && window.UserLeap.reportError("applyRemoteConfig", L.error)), Ve("Disabled: failed to fetch configuration"), f;
846
+ const b = L.json;
847
+ return b != null && b.disabled ? ((T = window.SprigLoggerCallback) == null || T.call(window, "Sprig config fetch disabled"), Ve(`Disabled: ${b.disabled}`), { disabled: b.disabled }) : Object.assign({}, b, f);
848
+ }(r);
849
+ if ((m = window.SprigLoggerCallback) == null || m.call(window, "Sprig fetched config"), Gt({ isWeb: !p, reportingIntervalSeconds: d.metricsReportingEnabled || d.mobileMetricsReportingEnabled ? d.metricsReportingIntervalSeconds : 0, thresholds: d.metricThresholds, postMetrics: async (f) => {
850
+ var v;
851
+ await O(A("1", [z], "metrics"), { body: f, method: "POST", headers: { "x-ul-replay-enabled": `${!!((v = S.replay) != null && v.isReplayRecording())}` }, shouldDropOnRateLimit: !0 });
852
+ } }), !p) {
853
+ const f = d.alwaysOnReplay ? { userAgent: window.navigator.userAgent, surveyId: d.alwaysOnReplay.surveyId, responseGroupUuid: d.alwaysOnReplay.responseGroupUuid, sdkVersion: "2.34.2", maxDurationSeconds: d.alwaysOnReplay.maxDurationSeconds } : void 0;
854
+ await ((u = S.replay) == null ? void 0 : u.initializeReplay({ maxReplayDurationSeconds: d.maxReplayDurationSeconds, maxInflightRequests: window.UserLeap.maxInflightReplayRequests ?? 2, replaySettings: d.replaySettings, apiUrl: window.UserLeap._API_URL, alwaysOnConfig: f })), Oe = d.replaySettings;
855
+ }
856
+ Zt(d), await Xt(d), window.UserLeap._queue.unpause(), (E = window.SprigLoggerCallback) == null || E.call(window, "SdkReady"), y.emit(w.SDKReady, { mobileMetricsReportingEnabled: !!d.mobileMetricsReportingEnabled, metricsReportingInterval: d.metricsReportingIntervalSeconds || 0, metricsThresholds: d.metricThresholds || [], maxMobileReplayDurationSeconds: d.maxMobileReplayDurationSeconds, mobileReplaySettings: d.mobileReplaySettings }), y.emit(w.VisitorIDUpdated, { visitorId: window.UserLeap.visitorId }), y.on(w.VisitorIDUpdated, () => {
857
+ for (const f in we) delete we[f];
850
858
  });
851
859
  }
852
- window.UserLeap.UPDATES = re, window.UserLeap("setPreviewKey", e), document.readyState === "complete" ? n() : window.attachEvent ? window.attachEvent("onload", n) : window.addEventListener("load", () => {
860
+ window.UserLeap.UPDATES = re, window.UserLeap("setPreviewKey", t), document.readyState === "complete" ? n() : window.attachEvent ? window.attachEvent("onload", n) : window.addEventListener("load", () => {
853
861
  n();
854
862
  }, !1);
855
863
  }
856
- class xe {
864
+ class Re {
857
865
  constructor() {
858
866
  W(this, "UPDATES", re);
859
867
  }
860
- displaySurvey(e) {
861
- window.Sprig("displaySurvey", e);
868
+ displaySurvey(t) {
869
+ window.Sprig("displaySurvey", t);
862
870
  }
863
871
  mute() {
864
872
  window.Sprig("mute");
@@ -869,50 +877,50 @@ class xe {
869
877
  dismissActiveSurvey() {
870
878
  window.Sprig("dismissActiveSurvey");
871
879
  }
872
- setAttribute(e, n) {
873
- window.Sprig("setAttribute", e, n);
880
+ setAttribute(t, n) {
881
+ window.Sprig("setAttribute", t, n);
874
882
  }
875
- setAttributes(e) {
876
- window.Sprig("setAttributes", e);
883
+ setAttributes(t) {
884
+ window.Sprig("setAttributes", t);
877
885
  }
878
- identifyAndSetAttributes(e) {
879
- window.Sprig("identifyAndSetAttributes", e);
886
+ identifyAndSetAttributes(t) {
887
+ window.Sprig("identifyAndSetAttributes", t);
880
888
  }
881
- removeAttributes(e) {
882
- window.Sprig("removeAttributes", e);
889
+ removeAttributes(t) {
890
+ window.Sprig("removeAttributes", t);
883
891
  }
884
- addListener(e, n) {
885
- window.Sprig("addListener", e, n);
892
+ addListener(t, n) {
893
+ window.Sprig("addListener", t, n);
886
894
  }
887
- removeListener(e, n) {
888
- window.Sprig("removeListener", e, n);
895
+ removeListener(t, n) {
896
+ window.Sprig("removeListener", t, n);
889
897
  }
890
898
  removeAllListeners() {
891
899
  window.Sprig("removeAllListeners");
892
900
  }
893
- setEmail(e) {
894
- window.Sprig("setAttribute", "!email", e);
901
+ setEmail(t) {
902
+ window.Sprig("setAttribute", "!email", t);
895
903
  }
896
- setUserId(e) {
897
- window.Sprig("setUserId", e);
904
+ setUserId(t) {
905
+ window.Sprig("setUserId", t);
898
906
  }
899
- setPartnerAnonymousId(e) {
900
- window.Sprig("setPartnerAnonymousId", e);
907
+ setPartnerAnonymousId(t) {
908
+ window.Sprig("setPartnerAnonymousId", t);
901
909
  }
902
- track(e, n = {}, s = {}) {
903
- window.Sprig("track", e, n, s);
910
+ track(t, n = {}, s = {}) {
911
+ window.Sprig("track", t, n, s);
904
912
  }
905
- identifyAndTrack(e) {
906
- window.Sprig("identifyAndTrack", e);
913
+ identifyAndTrack(t) {
914
+ window.Sprig("identifyAndTrack", t);
907
915
  }
908
- trackPageView(e, n, s) {
909
- window.Sprig("trackPageView", e, n, s);
916
+ trackPageView(t, n, s) {
917
+ window.Sprig("trackPageView", t, n, s);
910
918
  }
911
- applyStyles(e) {
912
- window.Sprig("applyStyles", e);
919
+ applyStyles(t) {
920
+ window.Sprig("applyStyles", t);
913
921
  }
914
- setWindowDimensions(e, n) {
915
- window.Sprig("setWindowDimensions", e, n);
922
+ setWindowDimensions(t, n) {
923
+ window.Sprig("setWindowDimensions", t, n);
916
924
  }
917
925
  logoutUser() {
918
926
  window.Sprig("logoutUser");
@@ -920,24 +928,30 @@ class xe {
920
928
  teardown() {
921
929
  window.Sprig("teardown");
922
930
  }
931
+ pauseReplayRecording() {
932
+ window.Sprig("pauseReplayRecording");
933
+ }
934
+ resumeReplayRecording() {
935
+ window.Sprig("resumeReplayRecording");
936
+ }
923
937
  }
924
- const Ze = { configure: (t) => {
925
- if (!t.envId && !t.environmentId) throw new Error("Initialization Error: Sprig configure requires an environmentId");
926
- if (t.envId || (t.envId = t.environmentId ?? ""), t.installationMethod = "web-npm", window.Sprig) return window.Sprig;
938
+ const Ze = { configure: (r) => {
939
+ if (!r.envId && !r.environmentId) throw new Error("Initialization Error: Sprig configure requires an environmentId");
940
+ if (r.envId || (r.envId = r.environmentId ?? ""), r.installationMethod = "web-npm", window.Sprig) return window.Sprig;
927
941
  window.Sprig = function() {
928
942
  window.Sprig._queue.push(arguments);
929
- }, Object.getOwnPropertyNames(xe.prototype).map((n) => {
930
- n !== "constructor" && (window.Sprig[n] = xe.prototype[n]);
943
+ }, Object.getOwnPropertyNames(Re.prototype).map((n) => {
944
+ n !== "constructor" && (window.Sprig[n] = Re.prototype[n]);
931
945
  });
932
- const e = window.Sprig;
933
- return e.appId = t.envId, e._queue = [], window.UserLeap = e, tr(t), window.Sprig;
934
- } }, cr = { sprig: Ze, SprigAPI: xe, configure: Ze.configure };
946
+ const t = window.Sprig;
947
+ return t.appId = r.envId, t._queue = [], window.UserLeap = t, tr(r), window.Sprig;
948
+ } }, cr = { sprig: Ze, SprigAPI: Re, configure: Ze.configure };
935
949
  export {
936
950
  or as A,
937
951
  Ot as C,
938
952
  nr as D,
939
953
  dr as E,
940
- xe as S,
954
+ Re as S,
941
955
  Ft as a,
942
956
  ar as b,
943
957
  cr as c,