@sprig-technologies/sprig-browser 2.34.0 → 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.
@@ -0,0 +1,2979 @@
1
+ import { A as je, D as ro, a as oo, C as Ft, i as io, E as so, b as Pe, d as Et, r as ao, e as Vt } from "./core-9nFfVPj6.js";
2
+ import { e as Re, h as We, S as ie, s as gt, D as zt, b as lo, t as re, v as ft, u as co } from "./metricsReporter-BzXI6BiM.js";
3
+ var He, P, Hn, we, $t, Bn, vt, qn, Ue = {}, An = [], uo = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, Je = Array.isArray;
4
+ function ge(e, t) {
5
+ for (var n in t) e[n] = t[n];
6
+ return e;
7
+ }
8
+ function Fn(e) {
9
+ var t = e.parentNode;
10
+ t && t.removeChild(e);
11
+ }
12
+ function oe(e, t, n) {
13
+ var r, o, i, s = {};
14
+ for (i in t) i == "key" ? r = t[i] : i == "ref" ? o = t[i] : s[i] = t[i];
15
+ if (arguments.length > 2 && (s.children = arguments.length > 3 ? He.call(arguments, 2) : n), typeof e == "function" && e.defaultProps != null) for (i in e.defaultProps) s[i] === void 0 && (s[i] = e.defaultProps[i]);
16
+ return Me(e, s, r, o, null);
17
+ }
18
+ function Me(e, t, n, r, o) {
19
+ var i = { type: e, props: t, key: n, ref: r, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: o ?? ++Hn, __i: -1, __u: 0 };
20
+ return o == null && P.vnode != null && P.vnode(i), i;
21
+ }
22
+ function Vn() {
23
+ return { current: null };
24
+ }
25
+ function Z(e) {
26
+ return e.children;
27
+ }
28
+ function le(e, t) {
29
+ this.props = e, this.context = t;
30
+ }
31
+ function Te(e, t) {
32
+ if (t == null) return e.__ ? Te(e.__, e.__i + 1) : null;
33
+ for (var n; t < e.__k.length; t++) if ((n = e.__k[t]) != null && n.__e != null) return n.__e;
34
+ return typeof e.type == "function" ? Te(e) : null;
35
+ }
36
+ function zn(e) {
37
+ var t, n;
38
+ if ((e = e.__) != null && e.__c != null) {
39
+ for (e.__e = e.__c.base = null, t = 0; t < e.__k.length; t++) if ((n = e.__k[t]) != null && n.__e != null) {
40
+ e.__e = e.__c.base = n.__e;
41
+ break;
42
+ }
43
+ return zn(e);
44
+ }
45
+ }
46
+ function _t(e) {
47
+ (!e.__d && (e.__d = !0) && we.push(e) && !Ze.__r++ || $t !== P.debounceRendering) && (($t = P.debounceRendering) || Bn)(Ze);
48
+ }
49
+ function Ze() {
50
+ var e, t, n, r, o, i, s, d, l;
51
+ for (we.sort(vt); e = we.shift(); ) e.__d && (t = we.length, r = void 0, i = (o = (n = e).__v).__e, d = [], l = [], (s = n.__P) && ((r = ge({}, o)).__v = o.__v + 1, P.vnode && P.vnode(r), It(s, r, o, n.__n, s.ownerSVGElement !== void 0, 32 & o.__u ? [i] : null, d, i ?? Te(o), !!(32 & o.__u), l), r.__.__k[r.__i] = r, Wn(d, r, l), r.__e != i && zn(r)), we.length > t && we.sort(vt));
52
+ Ze.__r = 0;
53
+ }
54
+ function $n(e, t, n, r, o, i, s, d, l, u, m) {
55
+ var c, p, v, h, y, _ = r && r.__k || An, k = t.length;
56
+ for (n.__d = l, function(x, L, I) {
57
+ var w, S, g, N, T, C = L.length, f = I.length, b = f, j = 0;
58
+ for (x.__k = [], w = 0; w < C; w++) (S = x.__k[w] = (S = L[w]) == null || typeof S == "boolean" || typeof S == "function" ? null : typeof S == "string" || typeof S == "number" || typeof S == "bigint" || S.constructor == String ? Me(null, S, null, null, S) : Je(S) ? Me(Z, { children: S }, null, null, null) : S.constructor === void 0 && S.__b > 0 ? Me(S.type, S.props, S.key, S.ref ? S.ref : null, S.__v) : S) != null ? (S.__ = x, S.__b = x.__b + 1, T = po(S, I, N = w + j, b), S.__i = T, g = null, T !== -1 && (b--, (g = I[T]) && (g.__u |= 131072)), g == null || g.__v === null ? (T == -1 && j--, typeof S.type != "function" && (S.__u |= 65536)) : T !== N && (T === N + 1 ? j++ : T > N ? b > C - N ? j += T - N : j-- : j = T < N && T == N - 1 ? T - N : 0, T !== w + j && (S.__u |= 65536))) : (g = I[w]) && g.key == null && g.__e && (g.__e == x.__d && (x.__d = Te(g)), bt(g, g, !1), I[w] = null, b--);
59
+ if (b) for (w = 0; w < f; w++) (g = I[w]) != null && !(131072 & g.__u) && (g.__e == x.__d && (x.__d = Te(g)), bt(g, g));
60
+ }(n, t, _), l = n.__d, c = 0; c < k; c++) (v = n.__k[c]) != null && typeof v != "boolean" && typeof v != "function" && (p = v.__i === -1 ? Ue : _[v.__i] || Ue, v.__i = c, It(e, v, p, o, i, s, d, l, u, m), h = v.__e, v.ref && p.ref != v.ref && (p.ref && jt(p.ref, null, v), m.push(v.ref, v.__c || h, v)), y == null && h != null && (y = h), 65536 & v.__u || p.__k === v.__k ? l = Qn(v, l, e) : typeof v.type == "function" && v.__d !== void 0 ? l = v.__d : h && (l = h.nextSibling), v.__d = void 0, v.__u &= -196609);
61
+ n.__d = l, n.__e = y;
62
+ }
63
+ function Qn(e, t, n) {
64
+ var r, o;
65
+ if (typeof e.type == "function") {
66
+ for (r = e.__k, o = 0; r && o < r.length; o++) r[o] && (r[o].__ = e, t = Qn(r[o], t, n));
67
+ return t;
68
+ }
69
+ return e.__e != t && (n.insertBefore(e.__e, t || null), t = e.__e), t && t.nextSibling;
70
+ }
71
+ function fe(e, t) {
72
+ return t = t || [], e == null || typeof e == "boolean" || (Je(e) ? e.some(function(n) {
73
+ fe(n, t);
74
+ }) : t.push(e)), t;
75
+ }
76
+ function po(e, t, n, r) {
77
+ var o = e.key, i = e.type, s = n - 1, d = n + 1, l = t[n];
78
+ if (l === null || l && o == l.key && i === l.type) return n;
79
+ if (r > (l == null || 131072 & l.__u ? 0 : 1)) for (; s >= 0 || d < t.length; ) {
80
+ if (s >= 0) {
81
+ if ((l = t[s]) && !(131072 & l.__u) && o == l.key && i === l.type) return s;
82
+ s--;
83
+ }
84
+ if (d < t.length) {
85
+ if ((l = t[d]) && !(131072 & l.__u) && o == l.key && i === l.type) return d;
86
+ d++;
87
+ }
88
+ }
89
+ return -1;
90
+ }
91
+ function Qt(e, t, n) {
92
+ t[0] === "-" ? e.setProperty(t, n ?? "") : e[t] = n == null ? "" : typeof n != "number" || uo.test(t) ? n : n + "px";
93
+ }
94
+ function Ae(e, t, n, r, o) {
95
+ var i;
96
+ e: if (t === "style") if (typeof n == "string") e.style.cssText = n;
97
+ else {
98
+ if (typeof r == "string" && (e.style.cssText = r = ""), r) for (t in r) n && t in n || Qt(e.style, t, "");
99
+ if (n) for (t in n) r && n[t] === r[t] || Qt(e.style, t, n[t]);
100
+ }
101
+ else if (t[0] === "o" && t[1] === "n") i = t !== (t = t.replace(/(PointerCapture)$|Capture$/, "$1")), t = t.toLowerCase() in e ? t.toLowerCase().slice(2) : t.slice(2), e.l || (e.l = {}), e.l[t + i] = n, n ? r ? n.u = r.u : (n.u = Date.now(), e.addEventListener(t, i ? Zt : Wt, i)) : e.removeEventListener(t, i ? Zt : Wt, i);
102
+ else {
103
+ if (o) t = t.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
104
+ else if (t !== "width" && t !== "height" && t !== "href" && t !== "list" && t !== "form" && t !== "tabIndex" && t !== "download" && t !== "rowSpan" && t !== "colSpan" && t !== "role" && t in e) try {
105
+ e[t] = n ?? "";
106
+ break e;
107
+ } catch {
108
+ }
109
+ typeof n == "function" || (n == null || n === !1 && t[4] !== "-" ? e.removeAttribute(t) : e.setAttribute(t, n));
110
+ }
111
+ }
112
+ function Wt(e) {
113
+ var t = this.l[e.type + !1];
114
+ if (e.t) {
115
+ if (e.t <= t.u) return;
116
+ } else e.t = Date.now();
117
+ return t(P.event ? P.event(e) : e);
118
+ }
119
+ function Zt(e) {
120
+ return this.l[e.type + !0](P.event ? P.event(e) : e);
121
+ }
122
+ function It(e, t, n, r, o, i, s, d, l, u) {
123
+ var m, c, p, v, h, y, _, k, x, L, I, w, S, g, N, T = t.type;
124
+ if (t.constructor !== void 0) return null;
125
+ 128 & n.__u && (l = !!(32 & n.__u), i = [d = t.__e = n.__e]), (m = P.__b) && m(t);
126
+ e: if (typeof T == "function") try {
127
+ if (k = t.props, x = (m = T.contextType) && r[m.__c], L = m ? x ? x.props.value : m.__ : r, n.__c ? _ = (c = t.__c = n.__c).__ = c.__E : ("prototype" in T && T.prototype.render ? t.__c = c = new T(k, L) : (t.__c = c = new le(k, L), c.constructor = T, c.render = ho), x && x.sub(c), c.props = k, c.state || (c.state = {}), c.context = L, c.__n = r, p = c.__d = !0, c.__h = [], c._sb = []), c.__s == null && (c.__s = c.state), T.getDerivedStateFromProps != null && (c.__s == c.state && (c.__s = ge({}, c.__s)), ge(c.__s, T.getDerivedStateFromProps(k, c.__s))), v = c.props, h = c.state, c.__v = t, p) T.getDerivedStateFromProps == null && c.componentWillMount != null && c.componentWillMount(), c.componentDidMount != null && c.__h.push(c.componentDidMount);
128
+ else {
129
+ if (T.getDerivedStateFromProps == null && k !== v && c.componentWillReceiveProps != null && c.componentWillReceiveProps(k, L), !c.__e && (c.shouldComponentUpdate != null && c.shouldComponentUpdate(k, c.__s, L) === !1 || t.__v === n.__v)) {
130
+ for (t.__v !== n.__v && (c.props = k, c.state = c.__s, c.__d = !1), t.__e = n.__e, t.__k = n.__k, t.__k.forEach(function(C) {
131
+ C && (C.__ = t);
132
+ }), I = 0; I < c._sb.length; I++) c.__h.push(c._sb[I]);
133
+ c._sb = [], c.__h.length && s.push(c);
134
+ break e;
135
+ }
136
+ c.componentWillUpdate != null && c.componentWillUpdate(k, c.__s, L), c.componentDidUpdate != null && c.__h.push(function() {
137
+ c.componentDidUpdate(v, h, y);
138
+ });
139
+ }
140
+ if (c.context = L, c.props = k, c.__P = e, c.__e = !1, w = P.__r, S = 0, "prototype" in T && T.prototype.render) {
141
+ for (c.state = c.__s, c.__d = !1, w && w(t), m = c.render(c.props, c.state, c.context), g = 0; g < c._sb.length; g++) c.__h.push(c._sb[g]);
142
+ c._sb = [];
143
+ } else do
144
+ c.__d = !1, w && w(t), m = c.render(c.props, c.state, c.context), c.state = c.__s;
145
+ while (c.__d && ++S < 25);
146
+ c.state = c.__s, c.getChildContext != null && (r = ge(ge({}, r), c.getChildContext())), p || c.getSnapshotBeforeUpdate == null || (y = c.getSnapshotBeforeUpdate(v, h)), $n(e, Je(N = m != null && m.type === Z && m.key == null ? m.props.children : m) ? N : [N], t, n, r, o, i, s, d, l, u), c.base = t.__e, t.__u &= -161, c.__h.length && s.push(c), _ && (c.__E = c.__ = null);
147
+ } catch (C) {
148
+ t.__v = null, l || i != null ? (t.__e = d, t.__u |= l ? 160 : 32, i[i.indexOf(d)] = null) : (t.__e = n.__e, t.__k = n.__k), P.__e(C, t, n);
149
+ }
150
+ else i == null && t.__v === n.__v ? (t.__k = n.__k, t.__e = n.__e) : t.__e = mo(n.__e, t, n, r, o, i, s, l, u);
151
+ (m = P.diffed) && m(t);
152
+ }
153
+ function Wn(e, t, n) {
154
+ t.__d = void 0;
155
+ for (var r = 0; r < n.length; r++) jt(n[r], n[++r], n[++r]);
156
+ P.__c && P.__c(t, e), e.some(function(o) {
157
+ try {
158
+ e = o.__h, o.__h = [], e.some(function(i) {
159
+ i.call(o);
160
+ });
161
+ } catch (i) {
162
+ P.__e(i, o.__v);
163
+ }
164
+ });
165
+ }
166
+ function mo(e, t, n, r, o, i, s, d, l) {
167
+ var u, m, c, p, v, h, y, _ = n.props, k = t.props, x = t.type;
168
+ if (x === "svg" && (o = !0), i != null) {
169
+ for (u = 0; u < i.length; u++) if ((v = i[u]) && "setAttribute" in v == !!x && (x ? v.localName === x : v.nodeType === 3)) {
170
+ e = v, i[u] = null;
171
+ break;
172
+ }
173
+ }
174
+ if (e == null) {
175
+ if (x === null) return document.createTextNode(k);
176
+ e = o ? document.createElementNS("http://www.w3.org/2000/svg", x) : document.createElement(x, k.is && k), i = null, d = !1;
177
+ }
178
+ if (x === null) _ === k || d && e.data === k || (e.data = k);
179
+ else {
180
+ if (i = i && He.call(e.childNodes), _ = n.props || Ue, !d && i != null) for (_ = {}, u = 0; u < e.attributes.length; u++) _[(v = e.attributes[u]).name] = v.value;
181
+ for (u in _) v = _[u], u == "children" || (u == "dangerouslySetInnerHTML" ? c = v : u === "key" || u in k || Ae(e, u, null, v, o));
182
+ for (u in k) v = k[u], u == "children" ? p = v : u == "dangerouslySetInnerHTML" ? m = v : u == "value" ? h = v : u == "checked" ? y = v : u === "key" || d && typeof v != "function" || _[u] === v || Ae(e, u, v, _[u], o);
183
+ if (m) d || c && (m.__html === c.__html || m.__html === e.innerHTML) || (e.innerHTML = m.__html), t.__k = [];
184
+ else if (c && (e.innerHTML = ""), $n(e, Je(p) ? p : [p], t, n, r, o && x !== "foreignObject", i, s, i ? i[0] : n.__k && Te(n, 0), d, l), i != null) for (u = i.length; u--; ) i[u] != null && Fn(i[u]);
185
+ d || (u = "value", h !== void 0 && (h !== e[u] || x === "progress" && !h || x === "option" && h !== _[u]) && Ae(e, u, h, _[u], !1), u = "checked", y !== void 0 && y !== e[u] && Ae(e, u, y, _[u], !1));
186
+ }
187
+ return e;
188
+ }
189
+ function jt(e, t, n) {
190
+ try {
191
+ typeof e == "function" ? e(t) : e.current = t;
192
+ } catch (r) {
193
+ P.__e(r, n);
194
+ }
195
+ }
196
+ function bt(e, t, n) {
197
+ var r, o;
198
+ if (P.unmount && P.unmount(e), (r = e.ref) && (r.current && r.current !== e.__e || jt(r, null, t)), (r = e.__c) != null) {
199
+ if (r.componentWillUnmount) try {
200
+ r.componentWillUnmount();
201
+ } catch (i) {
202
+ P.__e(i, t);
203
+ }
204
+ r.base = r.__P = null, e.__c = void 0;
205
+ }
206
+ if (r = e.__k) for (o = 0; o < r.length; o++) r[o] && bt(r[o], t, n || typeof e.type != "function");
207
+ n || e.__e == null || Fn(e.__e), e.__ = e.__e = e.__d = void 0;
208
+ }
209
+ function ho(e, t, n) {
210
+ return this.constructor(e, n);
211
+ }
212
+ function Le(e, t, n) {
213
+ var r, o, i, s;
214
+ P.__ && P.__(e, t), o = (r = typeof n == "function") ? null : n && n.__k || t.__k, i = [], s = [], It(t, e = (!r && n || t).__k = oe(Z, null, [e]), o || Ue, Ue, t.ownerSVGElement !== void 0, !r && n ? [n] : o ? null : t.firstChild ? He.call(t.childNodes) : null, i, !r && n ? n : o ? o.__e : t.firstChild, r, s), Wn(i, e, s);
215
+ }
216
+ function Zn(e, t) {
217
+ Le(e, t, Zn);
218
+ }
219
+ function go(e, t, n) {
220
+ var r, o, i, s, d = ge({}, e.props);
221
+ for (i in e.type && e.type.defaultProps && (s = e.type.defaultProps), t) i == "key" ? r = t[i] : i == "ref" ? o = t[i] : d[i] = t[i] === void 0 && s !== void 0 ? s[i] : t[i];
222
+ return arguments.length > 2 && (d.children = arguments.length > 3 ? He.call(arguments, 2) : n), Me(e.type, d, r || e.key, o || e.ref, null);
223
+ }
224
+ function Gn(e, t) {
225
+ var n = { __c: t = "__cC" + qn++, __: e, Consumer: function(r, o) {
226
+ return r.children(o);
227
+ }, Provider: function(r) {
228
+ var o, i;
229
+ return this.getChildContext || (o = [], (i = {})[t] = this, this.getChildContext = function() {
230
+ return i;
231
+ }, this.shouldComponentUpdate = function(s) {
232
+ this.props.value !== s.value && o.some(function(d) {
233
+ d.__e = !0, _t(d);
234
+ });
235
+ }, this.sub = function(s) {
236
+ o.push(s);
237
+ var d = s.componentWillUnmount;
238
+ s.componentWillUnmount = function() {
239
+ o.splice(o.indexOf(s), 1), d && d.call(s);
240
+ };
241
+ }), r.children;
242
+ } };
243
+ return n.Provider.__ = n.Consumer.contextType = n;
244
+ }
245
+ He = An.slice, P = { __e: function(e, t, n, r) {
246
+ for (var o, i, s; t = t.__; ) if ((o = t.__c) && !o.__) try {
247
+ if ((i = o.constructor) && i.getDerivedStateFromError != null && (o.setState(i.getDerivedStateFromError(e)), s = o.__d), o.componentDidCatch != null && (o.componentDidCatch(e, r || {}), s = o.__d), s) return o.__E = o;
248
+ } catch (d) {
249
+ e = d;
250
+ }
251
+ throw e;
252
+ } }, Hn = 0, le.prototype.setState = function(e, t) {
253
+ var n;
254
+ n = this.__s != null && this.__s !== this.state ? this.__s : this.__s = ge({}, this.state), typeof e == "function" && (e = e(ge({}, n), this.props)), e && ge(n, e), e != null && this.__v && (t && this._sb.push(t), _t(this));
255
+ }, le.prototype.forceUpdate = function(e) {
256
+ this.__v && (this.__e = !0, e && this.__h.push(e), _t(this));
257
+ }, le.prototype.render = Z, we = [], Bn = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, vt = function(e, t) {
258
+ return e.__v.__b - t.__v.__b;
259
+ }, Ze.__r = 0, qn = 0;
260
+ var fo = 0;
261
+ function a(e, t, n, r, o, i) {
262
+ var s, d, l = {};
263
+ for (d in t) d == "ref" ? s = t[d] : l[d] = t[d];
264
+ var u = { type: e, props: l, key: n, ref: s, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: --fo, __i: -1, __u: 0, __source: o, __self: i };
265
+ if (typeof e == "function" && (s = e.defaultProps)) for (d in s) l[d] === void 0 && (l[d] = s[d]);
266
+ return P.vnode && P.vnode(u), u;
267
+ }
268
+ var ve, $, ot, Gt, Ne = 0, Kn = [], Fe = [], Kt = P.__b, Yt = P.__r, Jt = P.diffed, Xt = P.__c, en = P.unmount;
269
+ function Ee(e, t) {
270
+ P.__h && P.__h($, e, Ne || t), Ne = 0;
271
+ var n = $.__H || ($.__H = { __: [], __h: [] });
272
+ return e >= n.__.length && n.__.push({ __V: Fe }), n.__[e];
273
+ }
274
+ function V(e) {
275
+ return Ne = 1, Tt(er, e);
276
+ }
277
+ function Tt(e, t, n) {
278
+ var r = Ee(ve++, 2);
279
+ if (r.t = e, !r.__c && (r.__ = [n ? n(t) : er(void 0, t), function(d) {
280
+ var l = r.__N ? r.__N[0] : r.__[0], u = r.t(l, d);
281
+ l !== u && (r.__N = [u, r.__[1]], r.__c.setState({}));
282
+ }], r.__c = $, !$.u)) {
283
+ var o = function(d, l, u) {
284
+ if (!r.__c.__H) return !0;
285
+ var m = r.__c.__H.__.filter(function(p) {
286
+ return p.__c;
287
+ });
288
+ if (m.every(function(p) {
289
+ return !p.__N;
290
+ })) return !i || i.call(this, d, l, u);
291
+ var c = !1;
292
+ return m.forEach(function(p) {
293
+ if (p.__N) {
294
+ var v = p.__[0];
295
+ p.__ = p.__N, p.__N = void 0, v !== p.__[0] && (c = !0);
296
+ }
297
+ }), !(!c && r.__c.props === d) && (!i || i.call(this, d, l, u));
298
+ };
299
+ $.u = !0;
300
+ var i = $.shouldComponentUpdate, s = $.componentWillUpdate;
301
+ $.componentWillUpdate = function(d, l, u) {
302
+ if (this.__e) {
303
+ var m = i;
304
+ i = void 0, o(d, l, u), i = m;
305
+ }
306
+ s && s.call(this, d, l, u);
307
+ }, $.shouldComponentUpdate = o;
308
+ }
309
+ return r.__N || r.__;
310
+ }
311
+ function Q(e, t) {
312
+ var n = Ee(ve++, 3);
313
+ !P.__s && Nt(n.__H, t) && (n.__ = e, n.i = t, $.__H.__h.push(n));
314
+ }
315
+ function Be(e, t) {
316
+ var n = Ee(ve++, 4);
317
+ !P.__s && Nt(n.__H, t) && (n.__ = e, n.i = t, $.__h.push(n));
318
+ }
319
+ function J(e) {
320
+ return Ne = 5, ue(function() {
321
+ return { current: e };
322
+ }, []);
323
+ }
324
+ function Yn(e, t, n) {
325
+ Ne = 6, Be(function() {
326
+ return typeof e == "function" ? (e(t()), function() {
327
+ return e(null);
328
+ }) : e ? (e.current = t(), function() {
329
+ return e.current = null;
330
+ }) : void 0;
331
+ }, n == null ? n : n.concat(e));
332
+ }
333
+ function ue(e, t) {
334
+ var n = Ee(ve++, 7);
335
+ return Nt(n.__H, t) ? (n.__V = e(), n.i = t, n.__h = e, n.__V) : n.__;
336
+ }
337
+ function Se(e, t) {
338
+ return Ne = 8, ue(function() {
339
+ return e;
340
+ }, t);
341
+ }
342
+ function Jn(e) {
343
+ var t = $.context[e.__c], n = Ee(ve++, 9);
344
+ return n.c = e, t ? (n.__ == null && (n.__ = !0, t.sub($)), t.props.value) : e.__;
345
+ }
346
+ function Lt(e, t) {
347
+ P.useDebugValue && P.useDebugValue(t ? t(e) : e);
348
+ }
349
+ function Xn() {
350
+ var e = Ee(ve++, 11);
351
+ if (!e.__) {
352
+ for (var t = $.__v; t !== null && !t.__m && t.__ !== null; ) t = t.__;
353
+ var n = t.__m || (t.__m = [0, 0]);
354
+ e.__ = "P" + n[0] + "-" + n[1]++;
355
+ }
356
+ return e.__;
357
+ }
358
+ function vo() {
359
+ for (var e; e = Kn.shift(); ) if (e.__P && e.__H) try {
360
+ e.__H.__h.forEach(Ve), e.__H.__h.forEach(yt), e.__H.__h = [];
361
+ } catch (t) {
362
+ e.__H.__h = [], P.__e(t, e.__v);
363
+ }
364
+ }
365
+ P.__b = function(e) {
366
+ $ = null, Kt && Kt(e);
367
+ }, P.__r = function(e) {
368
+ Yt && Yt(e), ve = 0;
369
+ var t = ($ = e.__c).__H;
370
+ t && (ot === $ ? (t.__h = [], $.__h = [], t.__.forEach(function(n) {
371
+ n.__N && (n.__ = n.__N), n.__V = Fe, n.__N = n.i = void 0;
372
+ })) : (t.__h.forEach(Ve), t.__h.forEach(yt), t.__h = [], ve = 0)), ot = $;
373
+ }, P.diffed = function(e) {
374
+ Jt && Jt(e);
375
+ var t = e.__c;
376
+ t && t.__H && (t.__H.__h.length && (Kn.push(t) !== 1 && Gt === P.requestAnimationFrame || ((Gt = P.requestAnimationFrame) || _o)(vo)), t.__H.__.forEach(function(n) {
377
+ n.i && (n.__H = n.i), n.__V !== Fe && (n.__ = n.__V), n.i = void 0, n.__V = Fe;
378
+ })), ot = $ = null;
379
+ }, P.__c = function(e, t) {
380
+ t.some(function(n) {
381
+ try {
382
+ n.__h.forEach(Ve), n.__h = n.__h.filter(function(r) {
383
+ return !r.__ || yt(r);
384
+ });
385
+ } catch (r) {
386
+ t.some(function(o) {
387
+ o.__h && (o.__h = []);
388
+ }), t = [], P.__e(r, n.__v);
389
+ }
390
+ }), Xt && Xt(e, t);
391
+ }, P.unmount = function(e) {
392
+ en && en(e);
393
+ var t, n = e.__c;
394
+ n && n.__H && (n.__H.__.forEach(function(r) {
395
+ try {
396
+ Ve(r);
397
+ } catch (o) {
398
+ t = o;
399
+ }
400
+ }), n.__H = void 0, t && P.__e(t, n.__v));
401
+ };
402
+ var tn = typeof requestAnimationFrame == "function";
403
+ function _o(e) {
404
+ var t, n = function() {
405
+ clearTimeout(r), tn && cancelAnimationFrame(t), setTimeout(e);
406
+ }, r = setTimeout(n, 100);
407
+ tn && (t = requestAnimationFrame(n));
408
+ }
409
+ function Ve(e) {
410
+ var t = $, n = e.__c;
411
+ typeof n == "function" && (e.__c = void 0, n()), $ = t;
412
+ }
413
+ function yt(e) {
414
+ var t = $;
415
+ e.__c = e.__(), $ = t;
416
+ }
417
+ function Nt(e, t) {
418
+ return !e || e.length !== t.length || t.some(function(n, r) {
419
+ return n !== e[r];
420
+ });
421
+ }
422
+ function er(e, t) {
423
+ return typeof t == "function" ? t(e) : t;
424
+ }
425
+ function tr(e, t) {
426
+ for (var n in t) e[n] = t[n];
427
+ return e;
428
+ }
429
+ function xt(e, t) {
430
+ for (var n in e) if (n !== "__source" && !(n in t)) return !0;
431
+ for (var r in t) if (r !== "__source" && e[r] !== t[r]) return !0;
432
+ return !1;
433
+ }
434
+ function Ge(e) {
435
+ this.props = e;
436
+ }
437
+ function nr(e, t) {
438
+ function n(o) {
439
+ var i = this.props.ref, s = i == o.ref;
440
+ return !s && i && (i.call ? i(null) : i.current = null), t ? !t(this.props, o) || !s : xt(this.props, o);
441
+ }
442
+ function r(o) {
443
+ return this.shouldComponentUpdate = n, oe(e, o);
444
+ }
445
+ return r.displayName = "Memo(" + (e.displayName || e.name) + ")", r.prototype.isReactComponent = !0, r.__f = !0, r;
446
+ }
447
+ (Ge.prototype = new le()).isPureReactComponent = !0, Ge.prototype.shouldComponentUpdate = function(e, t) {
448
+ return xt(this.props, e) || xt(this.state, t);
449
+ };
450
+ var nn = P.__b;
451
+ P.__b = function(e) {
452
+ e.type && e.type.__f && e.ref && (e.props.ref = e.ref, e.ref = null), nn && nn(e);
453
+ };
454
+ var bo = typeof Symbol < "u" && Symbol.for && Symbol.for("react.forward_ref") || 3911;
455
+ function Dt(e) {
456
+ function t(n) {
457
+ var r = tr({}, n);
458
+ return delete r.ref, e(r, n.ref || null);
459
+ }
460
+ return t.$$typeof = bo, t.render = t, t.prototype.isReactComponent = t.__f = !0, t.displayName = "ForwardRef(" + (e.displayName || e.name) + ")", t;
461
+ }
462
+ var rn = function(e, t) {
463
+ return e == null ? null : fe(fe(e).map(t));
464
+ }, rr = { map: rn, forEach: rn, count: function(e) {
465
+ return e ? fe(e).length : 0;
466
+ }, only: function(e) {
467
+ var t = fe(e);
468
+ if (t.length !== 1) throw "Children.only";
469
+ return t[0];
470
+ }, toArray: fe }, yo = P.__e;
471
+ P.__e = function(e, t, n, r) {
472
+ if (e.then) {
473
+ for (var o, i = t; i = i.__; ) if ((o = i.__c) && o.__c) return t.__e == null && (t.__e = n.__e, t.__k = n.__k), o.__c(e, t);
474
+ }
475
+ yo(e, t, n, r);
476
+ };
477
+ var on = P.unmount;
478
+ function or(e, t, n) {
479
+ return e && (e.__c && e.__c.__H && (e.__c.__H.__.forEach(function(r) {
480
+ typeof r.__c == "function" && r.__c();
481
+ }), e.__c.__H = null), (e = tr({}, e)).__c != null && (e.__c.__P === n && (e.__c.__P = t), e.__c = null), e.__k = e.__k && e.__k.map(function(r) {
482
+ return or(r, t, n);
483
+ })), e;
484
+ }
485
+ function ir(e, t, n) {
486
+ return e && n && (e.__v = null, e.__k = e.__k && e.__k.map(function(r) {
487
+ return ir(r, t, n);
488
+ }), e.__c && e.__c.__P === t && (e.__e && n.appendChild(e.__e), e.__c.__e = !0, e.__c.__P = n)), e;
489
+ }
490
+ function Oe() {
491
+ this.__u = 0, this.t = null, this.__b = null;
492
+ }
493
+ function sr(e) {
494
+ var t = e.__.__c;
495
+ return t && t.__a && t.__a(e);
496
+ }
497
+ function ar(e) {
498
+ var t, n, r;
499
+ function o(i) {
500
+ if (t || (t = e()).then(function(s) {
501
+ n = s.default || s;
502
+ }, function(s) {
503
+ r = s;
504
+ }), r) throw r;
505
+ if (!n) throw t;
506
+ return oe(n, i);
507
+ }
508
+ return o.displayName = "Lazy", o.__f = !0, o;
509
+ }
510
+ function Ie() {
511
+ this.u = null, this.o = null;
512
+ }
513
+ P.unmount = function(e) {
514
+ var t = e.__c;
515
+ t && t.__R && t.__R(), t && 32 & e.__u && (e.type = null), on && on(e);
516
+ }, (Oe.prototype = new le()).__c = function(e, t) {
517
+ var n = t.__c, r = this;
518
+ r.t == null && (r.t = []), r.t.push(n);
519
+ var o = sr(r.__v), i = !1, s = function() {
520
+ i || (i = !0, n.__R = null, o ? o(d) : d());
521
+ };
522
+ n.__R = s;
523
+ var d = function() {
524
+ if (!--r.__u) {
525
+ if (r.state.__a) {
526
+ var l = r.state.__a;
527
+ r.__v.__k[0] = ir(l, l.__c.__P, l.__c.__O);
528
+ }
529
+ var u;
530
+ for (r.setState({ __a: r.__b = null }); u = r.t.pop(); ) u.forceUpdate();
531
+ }
532
+ };
533
+ r.__u++ || 32 & t.__u || r.setState({ __a: r.__b = r.__v.__k[0] }), e.then(s, s);
534
+ }, Oe.prototype.componentWillUnmount = function() {
535
+ this.t = [];
536
+ }, Oe.prototype.render = function(e, t) {
537
+ if (this.__b) {
538
+ if (this.__v.__k) {
539
+ var n = document.createElement("div"), r = this.__v.__k[0].__c;
540
+ this.__v.__k[0] = or(this.__b, n, r.__O = r.__P);
541
+ }
542
+ this.__b = null;
543
+ }
544
+ var o = t.__a && oe(Z, null, e.fallback);
545
+ return o && (o.__u &= -33), [oe(Z, null, t.__a ? null : e.children), o];
546
+ };
547
+ var sn = function(e, t, n) {
548
+ if (++n[1] === n[0] && e.o.delete(t), e.props.revealOrder && (e.props.revealOrder[0] !== "t" || !e.o.size)) for (n = e.u; n; ) {
549
+ for (; n.length > 3; ) n.pop()();
550
+ if (n[1] < n[0]) break;
551
+ e.u = n = n[2];
552
+ }
553
+ };
554
+ function xo(e) {
555
+ return this.getChildContext = function() {
556
+ return e.context;
557
+ }, e.children;
558
+ }
559
+ function ko(e) {
560
+ var t = this, n = e.i;
561
+ t.componentWillUnmount = function() {
562
+ Le(null, t.l), t.l = null, t.i = null;
563
+ }, t.i && t.i !== n && t.componentWillUnmount(), t.l || (t.i = n, t.l = { nodeType: 1, parentNode: n, childNodes: [], appendChild: function(r) {
564
+ this.childNodes.push(r), t.i.appendChild(r);
565
+ }, insertBefore: function(r, o) {
566
+ this.childNodes.push(r), t.i.appendChild(r);
567
+ }, removeChild: function(r) {
568
+ this.childNodes.splice(this.childNodes.indexOf(r) >>> 1, 1), t.i.removeChild(r);
569
+ } }), Le(oe(xo, { context: t.context }, e.__v), t.l);
570
+ }
571
+ function lr(e, t) {
572
+ var n = oe(ko, { __v: e, i: t });
573
+ return n.containerInfo = t, n;
574
+ }
575
+ (Ie.prototype = new le()).__a = function(e) {
576
+ var t = this, n = sr(t.__v), r = t.o.get(e);
577
+ return r[0]++, function(o) {
578
+ var i = function() {
579
+ t.props.revealOrder ? (r.push(o), sn(t, e, r)) : o();
580
+ };
581
+ n ? n(i) : i();
582
+ };
583
+ }, Ie.prototype.render = function(e) {
584
+ this.u = null, this.o = /* @__PURE__ */ new Map();
585
+ var t = fe(e.children);
586
+ e.revealOrder && e.revealOrder[0] === "b" && t.reverse();
587
+ for (var n = t.length; n--; ) this.o.set(t[n], this.u = [1, 0, this.u]);
588
+ return e.children;
589
+ }, Ie.prototype.componentDidUpdate = Ie.prototype.componentDidMount = function() {
590
+ var e = this;
591
+ this.o.forEach(function(t, n) {
592
+ sn(e, n, t);
593
+ });
594
+ };
595
+ var dr = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, wo = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, Co = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, So = /[A-Z0-9]/g, Eo = typeof document < "u", Io = function(e) {
596
+ return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(e);
597
+ };
598
+ function cr(e, t, n) {
599
+ return t.__k == null && (t.textContent = ""), Le(e, t), typeof n == "function" && n(), e ? e.__c : null;
600
+ }
601
+ function ur(e, t, n) {
602
+ return Zn(e, t), typeof n == "function" && n(), e ? e.__c : null;
603
+ }
604
+ le.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(e) {
605
+ Object.defineProperty(le.prototype, e, { configurable: !0, get: function() {
606
+ return this["UNSAFE_" + e];
607
+ }, set: function(t) {
608
+ Object.defineProperty(this, e, { configurable: !0, writable: !0, value: t });
609
+ } });
610
+ });
611
+ var an = P.event;
612
+ function jo() {
613
+ }
614
+ function To() {
615
+ return this.cancelBubble;
616
+ }
617
+ function Lo() {
618
+ return this.defaultPrevented;
619
+ }
620
+ P.event = function(e) {
621
+ return an && (e = an(e)), e.persist = jo, e.isPropagationStopped = To, e.isDefaultPrevented = Lo, e.nativeEvent = e;
622
+ };
623
+ var Pt, No = { enumerable: !1, configurable: !0, get: function() {
624
+ return this.class;
625
+ } }, ln = P.vnode;
626
+ P.vnode = function(e) {
627
+ typeof e.type == "string" && function(t) {
628
+ var n = t.props, r = t.type, o = {};
629
+ for (var i in n) {
630
+ var s = n[i];
631
+ if (!(i === "value" && "defaultValue" in n && s == null || Eo && i === "children" && r === "noscript" || i === "class" || i === "className")) {
632
+ var d = i.toLowerCase();
633
+ i === "defaultValue" && "value" in n && n.value == null ? i = "value" : i === "download" && s === !0 ? s = "" : d === "ondoubleclick" ? i = "ondblclick" : d !== "onchange" || r !== "input" && r !== "textarea" || Io(n.type) ? d === "onfocus" ? i = "onfocusin" : d === "onblur" ? i = "onfocusout" : Co.test(i) ? i = d : r.indexOf("-") === -1 && wo.test(i) ? i = i.replace(So, "-$&").toLowerCase() : s === null && (s = void 0) : d = i = "oninput", d === "oninput" && o[i = d] && (i = "oninputCapture"), o[i] = s;
634
+ }
635
+ }
636
+ r == "select" && o.multiple && Array.isArray(o.value) && (o.value = fe(n.children).forEach(function(l) {
637
+ l.props.selected = o.value.indexOf(l.props.value) != -1;
638
+ })), r == "select" && o.defaultValue != null && (o.value = fe(n.children).forEach(function(l) {
639
+ l.props.selected = o.multiple ? o.defaultValue.indexOf(l.props.value) != -1 : o.defaultValue == l.props.value;
640
+ })), n.class && !n.className ? (o.class = n.class, Object.defineProperty(o, "className", No)) : (n.className && !n.class || n.class && n.className) && (o.class = o.className = n.className), t.props = o;
641
+ }(e), e.$$typeof = dr, ln && ln(e);
642
+ };
643
+ var dn = P.__r;
644
+ P.__r = function(e) {
645
+ dn && dn(e), Pt = e.__c;
646
+ };
647
+ var cn = P.diffed;
648
+ P.diffed = function(e) {
649
+ cn && cn(e);
650
+ var t = e.props, n = e.__e;
651
+ n != null && e.type === "textarea" && "value" in t && t.value !== n.value && (n.value = t.value == null ? "" : t.value), Pt = null;
652
+ };
653
+ var pr = { ReactCurrentDispatcher: { current: { readContext: function(e) {
654
+ return Pt.__n[e.__c].props.value;
655
+ } } } };
656
+ function mr(e) {
657
+ return oe.bind(null, e);
658
+ }
659
+ function qe(e) {
660
+ return !!e && e.$$typeof === dr;
661
+ }
662
+ function hr(e) {
663
+ return qe(e) && e.type === Z;
664
+ }
665
+ function gr(e) {
666
+ return qe(e) ? go.apply(null, arguments) : e;
667
+ }
668
+ function Rt(e) {
669
+ return !!e.__k && (Le(null, e), !0);
670
+ }
671
+ function fr(e) {
672
+ return e && (e.base || e.nodeType === 1 && e) || null;
673
+ }
674
+ var vr = function(e, t) {
675
+ return e(t);
676
+ }, _r = function(e, t) {
677
+ return e(t);
678
+ }, br = Z;
679
+ function Mt(e) {
680
+ e();
681
+ }
682
+ function yr(e) {
683
+ return e;
684
+ }
685
+ function xr() {
686
+ return [!1, Mt];
687
+ }
688
+ var kr = Be, wr = qe;
689
+ function Cr(e, t) {
690
+ var n = t(), r = V({ h: { __: n, v: t } }), o = r[0].h, i = r[1];
691
+ return Be(function() {
692
+ o.__ = n, o.v = t, it(o) && i({ h: o });
693
+ }, [e, n, t]), Q(function() {
694
+ return it(o) && i({ h: o }), e(function() {
695
+ it(o) && i({ h: o });
696
+ });
697
+ }, [e]), n;
698
+ }
699
+ function it(e) {
700
+ var t, n, r = e.v, o = e.__;
701
+ try {
702
+ var i = r();
703
+ return !((t = o) === (n = i) && (t !== 0 || 1 / t == 1 / n) || t != t && n != n);
704
+ } catch {
705
+ return !0;
706
+ }
707
+ }
708
+ var Do = { useState: V, useId: Xn, useReducer: Tt, useEffect: Q, useLayoutEffect: Be, useInsertionEffect: kr, useTransition: xr, useDeferredValue: yr, useSyncExternalStore: Cr, startTransition: Mt, useRef: J, useImperativeHandle: Yn, useMemo: ue, useCallback: Se, useContext: Jn, useDebugValue: Lt, version: "17.0.2", Children: rr, render: cr, hydrate: ur, unmountComponentAtNode: Rt, createPortal: lr, createElement: oe, createContext: Gn, createFactory: mr, cloneElement: gr, createRef: Vn, Fragment: Z, isValidElement: qe, isElement: wr, isFragment: hr, findDOMNode: fr, Component: le, PureComponent: Ge, memo: nr, forwardRef: Dt, flushSync: _r, unstable_batchedUpdates: vr, StrictMode: br, Suspense: Oe, SuspenseList: Ie, lazy: ar, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: pr };
709
+ const Po = Object.freeze(Object.defineProperty({ __proto__: null, Children: rr, Component: le, Fragment: Z, PureComponent: Ge, StrictMode: br, Suspense: Oe, SuspenseList: Ie, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: pr, cloneElement: gr, createContext: Gn, createElement: oe, createFactory: mr, createPortal: lr, createRef: Vn, default: Do, findDOMNode: fr, flushSync: _r, forwardRef: Dt, hydrate: ur, isElement: wr, isFragment: hr, isValidElement: qe, lazy: ar, memo: nr, render: cr, startTransition: Mt, unmountComponentAtNode: Rt, unstable_batchedUpdates: vr, useCallback: Se, useContext: Jn, useDebugValue: Lt, useDeferredValue: yr, useEffect: Q, useErrorBoundary: function(e) {
710
+ var t = Ee(ve++, 10), n = V();
711
+ return t.__ = e, $.componentDidCatch || ($.componentDidCatch = function(r, o) {
712
+ t.__ && t.__(r, o), n[1](r);
713
+ }), [n[0], function() {
714
+ n[1](void 0);
715
+ }];
716
+ }, useId: Xn, useImperativeHandle: Yn, useInsertionEffect: kr, useLayoutEffect: Be, useMemo: ue, useReducer: Tt, useRef: J, useState: V, useSyncExternalStore: Cr, useTransition: xr, version: "17.0.2" }, Symbol.toStringTag, { value: "Module" })), un = (e) => {
717
+ let t;
718
+ const n = /* @__PURE__ */ new Set(), r = (s, d) => {
719
+ const l = typeof s == "function" ? s(t) : s;
720
+ if (!Object.is(l, t)) {
721
+ const u = t;
722
+ t = d ?? typeof l != "object" ? l : Object.assign({}, t, l), n.forEach((m) => m(t, u));
723
+ }
724
+ }, o = () => t, i = { setState: r, getState: o, subscribe: (s) => (n.add(s), () => n.delete(s)), destroy: () => n.clear() };
725
+ return t = e(r, o, i), i;
726
+ };
727
+ function Ro(e) {
728
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
729
+ }
730
+ function Mo(e) {
731
+ if (Object.prototype.hasOwnProperty.call(e, "__esModule")) return e;
732
+ var t = e.default;
733
+ if (typeof t == "function") {
734
+ var n = function r() {
735
+ return this instanceof r ? Reflect.construct(t, arguments, this.constructor) : t.apply(this, arguments);
736
+ };
737
+ n.prototype = t.prototype;
738
+ } else n = {};
739
+ return Object.defineProperty(n, "__esModule", { value: !0 }), Object.keys(e).forEach(function(r) {
740
+ var o = Object.getOwnPropertyDescriptor(e, r);
741
+ Object.defineProperty(n, r, o.get ? o : { enumerable: !0, get: function() {
742
+ return e[r];
743
+ } });
744
+ }), n;
745
+ }
746
+ var pn = { exports: {} }, st = {};
747
+ const Sr = Mo(Po);
748
+ var mn, hn, gn, fn, vn = { exports: {} }, at = {};
749
+ function Oo() {
750
+ return hn || (hn = 1, vn.exports = function() {
751
+ if (mn) return at;
752
+ mn = 1;
753
+ var e = Sr, t = typeof Object.is == "function" ? Object.is : function(l, u) {
754
+ return l === u && (l !== 0 || 1 / l == 1 / u) || l != l && u != u;
755
+ }, n = e.useState, r = e.useEffect, o = e.useLayoutEffect, i = e.useDebugValue;
756
+ function s(l) {
757
+ var u = l.getSnapshot;
758
+ l = l.value;
759
+ try {
760
+ var m = u();
761
+ return !t(l, m);
762
+ } catch {
763
+ return !0;
764
+ }
765
+ }
766
+ var d = typeof window > "u" || window.document === void 0 || window.document.createElement === void 0 ? function(l, u) {
767
+ return u();
768
+ } : function(l, u) {
769
+ var m = u(), c = n({ inst: { value: m, getSnapshot: u } }), p = c[0].inst, v = c[1];
770
+ return o(function() {
771
+ p.value = m, p.getSnapshot = u, s(p) && v({ inst: p });
772
+ }, [l, m, u]), r(function() {
773
+ return s(p) && v({ inst: p }), l(function() {
774
+ s(p) && v({ inst: p });
775
+ });
776
+ }, [l]), i(m), m;
777
+ };
778
+ return at.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : d, at;
779
+ }()), vn.exports;
780
+ }
781
+ var Uo = (fn || (fn = 1, pn.exports = function() {
782
+ if (gn) return st;
783
+ gn = 1;
784
+ var e = Sr, t = Oo(), n = typeof Object.is == "function" ? Object.is : function(l, u) {
785
+ return l === u && (l !== 0 || 1 / l == 1 / u) || l != l && u != u;
786
+ }, r = t.useSyncExternalStore, o = e.useRef, i = e.useEffect, s = e.useMemo, d = e.useDebugValue;
787
+ return st.useSyncExternalStoreWithSelector = function(l, u, m, c, p) {
788
+ var v = o(null);
789
+ if (v.current === null) {
790
+ var h = { hasValue: !1, value: null };
791
+ v.current = h;
792
+ } else h = v.current;
793
+ v = s(function() {
794
+ function _(w) {
795
+ if (!L) {
796
+ if (L = !0, k = w, w = c(w), p !== void 0 && h.hasValue) {
797
+ var S = h.value;
798
+ if (p(S, w)) return x = S;
799
+ }
800
+ return x = w;
801
+ }
802
+ if (S = x, n(k, w)) return S;
803
+ var g = c(w);
804
+ return p !== void 0 && p(S, g) ? S : (k = w, x = g);
805
+ }
806
+ var k, x, L = !1, I = m === void 0 ? null : m;
807
+ return [function() {
808
+ return _(u());
809
+ }, I === null ? void 0 : function() {
810
+ return _(I());
811
+ }];
812
+ }, [u, m, c, p]);
813
+ var y = r(l, v[0], v[1]);
814
+ return i(function() {
815
+ h.hasValue = !0, h.value = y;
816
+ }, [y]), d(y), y;
817
+ }, st;
818
+ }()), pn.exports);
819
+ const Ho = Ro(Uo), { useSyncExternalStoreWithSelector: Bo } = Ho, _n = (e) => {
820
+ const t = typeof e == "function" ? ((r) => r ? un(r) : un)(e) : e, n = (r, o) => function(i, s = i.getState, d) {
821
+ const l = Bo(i.subscribe, i.getState, i.getServerState || i.getState, s, d);
822
+ return Lt(l), l;
823
+ }(t, r, o);
824
+ return Object.assign(n, t), n;
825
+ }, Er = (e) => e ? _n(e) : _n, qo = 1, Ao = 2, Ot = { eq: (e, t) => e == t, neq(e, t) {
826
+ return !this.eq(e, t);
827
+ }, gt: (e, t) => e > t, gte: (e, t) => e >= t, lt: (e, t) => e < t, lte: (e, t) => e <= t, list_exact: (e, t) => !(!Array.isArray(e) || !Array.isArray(t)) && e.slice().sort().join(",") === t.slice().sort().join(","), list_all: (e, t) => !(!Array.isArray(e) || !Array.isArray(t)) && !t.some((n) => e.indexOf(n) === -1), list_alo(e, t) {
828
+ if (!Array.isArray(t)) return !1;
829
+ const n = Array.isArray(e) ? e : [e], r = new Set(n);
830
+ return t.some((o) => r.has(o));
831
+ }, list_dni(e, t) {
832
+ if (!Array.isArray(t)) return !1;
833
+ const n = Array.isArray(e) ? e : [e], r = new Set(n);
834
+ return t.every((o) => !r.has(o));
835
+ }, contains(e, t) {
836
+ const n = e.toLowerCase(), r = t.toLowerCase();
837
+ return n.includes(r);
838
+ }, notcontains(e, t) {
839
+ return !this.contains(e, t);
840
+ } }, Fo = (e, t, n) => {
841
+ switch (t) {
842
+ case "videovoice":
843
+ return !!(e && e.value);
844
+ case "open":
845
+ return !!n;
846
+ case "multipleselect":
847
+ return !!(n && Object.keys(n).length);
848
+ case "recordedtask":
849
+ return (n == null ? void 0 : n.taskStatus) === "completed";
850
+ case "texturlprompt":
851
+ return !e.value;
852
+ case "consentlegal":
853
+ case "nps":
854
+ case "likert":
855
+ return n !== null;
856
+ case "multiplechoice":
857
+ return n !== void 0;
858
+ case "matrix":
859
+ return !!(n && Object.values(n).every((r) => r !== null));
860
+ default:
861
+ return !0;
862
+ }
863
+ }, Ir = (e, t) => {
864
+ if (t === "matrix") {
865
+ const n = Object.keys(e).length, r = Object.values(e).filter((o) => o !== null).length;
866
+ return r > 0 && r < n;
867
+ }
868
+ return !1;
869
+ }, jr = ({ cards: e, index: t, hasEndCard: n, allResponses: r, uploadProgress: o = {} }) => {
870
+ if (t >= e.length || t < 0) return null;
871
+ const i = e[t];
872
+ let s = t + 1;
873
+ const d = i.props.routingOptions || [];
874
+ for (let m = 0; m < d.length; m++) {
875
+ const { group: c, target: p } = d[m];
876
+ if (!(c != null && c.length)) continue;
877
+ const v = c[0];
878
+ if (v.questionIndex === void 0 || v.questionIndex > r.length) continue;
879
+ let h = bn({ comparator: v.comparator, response: r[v.questionIndex], type: i.type, value: v.value });
880
+ for (let y = 1; y < c.length; y += 2) {
881
+ const _ = c[y], k = c[y + 1], x = bn({ comparator: k.comparator, response: r[k.questionIndex], type: e[k.questionIndex].type, value: k.value });
882
+ _ === qo ? h && (h = x) : _ === Ao && (h || (h = x));
883
+ }
884
+ if (h) {
885
+ s = p === -1 && n ? e.length - 1 : p;
886
+ break;
887
+ }
888
+ }
889
+ const l = e.findIndex((m) => m.type === "uploading");
890
+ let u;
891
+ return u = l > 0 ? n ? e.length - 3 : e.length - 2 : e.length - 1, t >= u || s === -1 || s !== null && s > u ? l > 0 && Object.values(o).some((c) => c.isSubmitted && !c.isComplete) ? l : n ? e.length - 1 : null : s === -1 ? null : s;
892
+ }, bn = ({ comparator: e, response: t, type: n, value: r }) => {
893
+ if (e === "answered") switch (n) {
894
+ case "texturlprompt":
895
+ return t === void 0;
896
+ case "consentlegal":
897
+ return t && t.submitted === !0;
898
+ case "recordedtask":
899
+ return "taskStatus" in t && t.taskStatus === "completed";
900
+ case "likert":
901
+ case "nps":
902
+ return Number.isInteger(t);
903
+ case "rankorder":
904
+ case "matrix":
905
+ return Object.values(t).every((o) => o !== null);
906
+ case "multiplechoice":
907
+ return t !== void 0;
908
+ case "multipleselect":
909
+ return (t == null ? void 0 : t.length) > 0;
910
+ case "open":
911
+ return t && t.length > 0;
912
+ case "videovoice":
913
+ return !!(t != null && t.mediaRecordingUid);
914
+ default:
915
+ return !1;
916
+ }
917
+ if (e === "given_up") return n !== "recordedtask" || "taskStatus" in t && t.taskStatus === "given.up";
918
+ if (e === "partial") return n === "matrix" && Ir(t, n);
919
+ if (e === "skipped") switch (n) {
920
+ case "texturlprompt":
921
+ return t == null ? void 0 : t.skipped;
922
+ case "consentlegal":
923
+ case "likert":
924
+ case "nps":
925
+ case "videovoice":
926
+ return t === null;
927
+ case "recordedtask":
928
+ return "taskStatus" in t && t.taskStatus === "abandoned";
929
+ case "open":
930
+ case "multipleselect":
931
+ return (t == null ? void 0 : t.length) === 0;
932
+ case "multiplechoice":
933
+ return t === void 0;
934
+ case "matrix":
935
+ return Object.values(t).every((o) => o === null);
936
+ case "rankorder":
937
+ return t === null || Object.values(t).some((o) => o === null);
938
+ default:
939
+ return !1;
940
+ }
941
+ return Ot[e](t, r);
942
+ }, Vo = (e) => {
943
+ var r, o, i;
944
+ switch (e.type) {
945
+ case "multipleselect":
946
+ return e && e.props && e.props.options ? e.props.options.length > 13 ? e.props.options.map((s) => [s.value]) : (t = e.props.options.map((s) => s.value), n = !e.props.properties.required, t.reduce((s, d) => s.concat(s.map((l) => [...l, d])), [[]]).filter((s) => n || s.length > 0)) : null;
947
+ case "multiplechoice": {
948
+ if (!e || !e.props || !e.props.options) return null;
949
+ const s = e.props.options.map((d) => d.value);
950
+ return e.props.properties.required || s.push(void 0), s;
951
+ }
952
+ case "matrix": {
953
+ if (!((r = e == null ? void 0 : e.props) != null && r.options)) return null;
954
+ const s = e.props.properties.matrixColumn, d = e.props.options, l = d.reduce((m, c) => (m[c.id] = null, m), {}), u = [{ ...l, [d[0].id]: s[0].value }, d.reduce((m, c) => (m[c.id] = s[0].value, m), {})];
955
+ return e.props.properties.required || u.push(l), u;
956
+ }
957
+ case "likert": {
958
+ const s = Number((i = (o = e.props) == null ? void 0 : o.properties) == null ? void 0 : i.range) || 5;
959
+ return [...Array.from(Array(s).keys()).map((l) => l + 1), ...e.props.properties.required ? [] : [null]];
960
+ }
961
+ case "nps":
962
+ return [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ...e.props.properties.required ? [] : [null]];
963
+ case "videovoice":
964
+ case "open":
965
+ return ["1", ...e.props.properties.required ? [] : [""]];
966
+ case "recordedtask": {
967
+ const s = [{ taskStatus: "completed" }, { taskStatus: "given.up" }];
968
+ return e.props.properties.required || s.push({ taskStatus: "abandoned" }), s;
969
+ }
970
+ case "texturlprompt":
971
+ return [void 0, ...e.props.properties.required ? [] : [{ skipped: !0 }]];
972
+ case "consentlegal":
973
+ return [1, ...e.props.properties.required ? [] : [null]];
974
+ default:
975
+ return [1];
976
+ }
977
+ var t, n;
978
+ }, zo = (e) => e in Ot, $o = (e) => typeof e == "object" && e !== null && "taskStatus" in e, Qo = (e, t = []) => t.reduce((n, r) => {
979
+ const { group: o, target: i } = r;
980
+ if (!(o != null && o.length)) return [...n];
981
+ const s = o.filter((d) => !!Number(d) || typeof d == "object" && d.questionIndex === e).map((d) => {
982
+ const { comparator: l, value: u } = d;
983
+ return { comparator: l, target: i, value: u };
984
+ });
985
+ return [...n, ...s];
986
+ }, []), lt = /* @__PURE__ */ new Set(["thanks", "uploading"]), B = Er()((e, t) => ({ allResponses: [], answers: void 0, apiURL: "", border: "#000000", cards: [], close: async (n = je) => {
987
+ const r = t(), { fadeout: o, remove: i, trackHistory: s, studyType: d } = r;
988
+ await o(n), dt(r) || s({ event: "closed" }), lo.info("SurveyClosing", { surveyId: r.surveyId }), Ft.enable(), i({ initiator: zt.Closed, studyType: d });
989
+ }, configureExitOnOverlayClick: () => {
990
+ }, customMetadata: {}, destroy: async (n) => {
991
+ const { eventEmitFn: r, fadeout: o, remove: i, studyType: s, surveyId: d } = t();
992
+ r("survey.complete", d), await o(n), Ft.enable(), i({ initiator: zt.Complete, studyType: s });
993
+ }, endCard: { headline: "" }, envId: "", eventEmitFn: Re.emit.bind(Re), fadeout: async (n) => {
994
+ const { eventEmitFn: r, headers: o, viewDocument: i } = t();
995
+ return We(o) ? Promise.resolve() : (r(ie.SurveyFadingOut), new Promise((s) => {
996
+ const d = i.getElementById(n);
997
+ d ? (d.addEventListener("transitionend", () => {
998
+ s();
999
+ }), d.classList.remove("ul-app--visible")) : s();
1000
+ }));
1001
+ }, forceBrandedLogo: !1, frame: document.createElement("iframe"), handleClickEmbedButton: (n) => {
1002
+ const { cards: r, eventEmitFn: o, index: i } = t();
1003
+ o(n, { qid: r[i].name, props: r[i].props }), e(() => ({ hasViewedEmbed: !0 }));
1004
+ }, handleUploadUpdate: ({ mediaRecordingUid: n, isComplete: r, progressPct: o, isSubmitted: i }) => {
1005
+ var v, h, y;
1006
+ const { cards: s, destroy: d, index: l, uploadProgress: u } = t(), m = r || ((v = u[n]) == null ? void 0 : v.isComplete), c = { ...u, [n]: { progressPct: m ? 100 : o || ((h = u[n]) == null ? void 0 : h.progressPct), isComplete: m, isSubmitted: i || ((y = u[n]) == null ? void 0 : y.isSubmitted) } };
1007
+ if (e({ uploadProgress: c }), s[l].type !== "uploading") return;
1008
+ const p = Object.entries(u).every(([_, k]) => !k.isSubmitted || k.isComplete || n == _ && r);
1009
+ if (p && l >= s.length - 1) return d(je);
1010
+ e({ index: p ? l + 1 : l, uploadingCardViewed: !0 });
1011
+ }, hasViewedEmbed: !1, headers: { Authorization: "", "Content-Type": "", "userleap-platform": "web", "x-ul-environment-id": "", "x-ul-installation-method": "web-snippet", "x-ul-sdk-version": "", "x-ul-visitor-id": "" }, index: 0, isPreview: !1, marketingUrl: "https://sprig.com", meta: { ch: 0, cw: 0, l: "", mode: null, p: "", sh: 0, sw: 0 }, mode: void 0, next: (n) => {
1012
+ const { allResponses: r, cards: o, eventEmitFn: i, index: s, responseGroupUid: d, submit: l, trackHistory: u, uploadProgress: m, viewedCardCount: c } = t();
1013
+ e({ minScrollableHeight: void 0 });
1014
+ const p = Array.isArray(n.data) ? n.data : [n.data], v = Date.now(), h = [...o], y = { response: [], responseGroupUid: d, questionIndex: s };
1015
+ let _ = null;
1016
+ const k = r.slice(0);
1017
+ p.forEach((I, w) => {
1018
+ const S = h[s + w], { type: g, ...N } = I, T = { ...N, answeredAt: v }, C = T.value;
1019
+ ((b) => b && !lt.has(b.type))(S) && (S.value = C), y.response.push(T);
1020
+ let f = C;
1021
+ g !== "multipleselect" && g !== "multiplechoice" || C === null || (f = g === "multiplechoice" ? Object.values(C).find((b) => b !== !1) : C, g === "multipleselect" && (f = h[s + w].props.options.reduce((b, j) => (C[j.id] && b.push(j.value), b), []))), k[s + w] = f, _ = jr({ cards: h, index: s + w, hasEndCard: !!n.endCard, uploadProgress: m, allResponses: k });
1022
+ }), e({ allResponses: k }), (_ === null || lt.has(h[_].type)) && (y.completedAt = v);
1023
+ const x = l(y);
1024
+ if (_ === null) return void n.completeSurvey();
1025
+ _ && !lt.has(h[_].type) && x.finally(() => {
1026
+ u({ event: "seen", index: _ });
1027
+ });
1028
+ const L = h[_];
1029
+ h[_] && i && i("survey.question", { qid: L.name, props: L.props }), e({ cards: h, hasViewedEmbed: !1, index: _, viewedCardCount: c + 1 });
1030
+ }, pendingRemoveIframeReason: null, previewKey: null, previewMode: void 0, recorder: () => {
1031
+ }, recorderEventEmitter: Re, resolveTrackedPromise: () => {
1032
+ const { removeIframeIfReady: n } = t();
1033
+ e((r) => ({ unresolvedRequestCount: r.unresolvedRequestCount - 1 })), n();
1034
+ }, responseGroupUid: "", remove: ({ initiator: n, studyType: r }) => {
1035
+ const { eventEmitFn: o, removeIframeIfReady: i, surveyId: s } = t();
1036
+ e({ pendingRemoveIframeReason: n, studyType: r }), o(ie.SurveyCloseRequested, { name: ie.SurveyCloseRequested, initiator: n, studyType: r, "survey.id": s }), i();
1037
+ }, removeIframeIfReady: () => {
1038
+ const { eventEmitFn: n, pendingRemoveIframeReason: r, unresolvedRequestCount: o, studyType: i, surveyId: s } = t();
1039
+ r && o === 0 && (n(ie.SurveyWillClose, { name: ie.SurveyWillClose, initiator: r, studyType: i, "survey.id": s }), e({ pendingRemoveIframeReason: null, studyType: i }));
1040
+ }, seen: async () => {
1041
+ const { trackHistory: n } = t();
1042
+ return n({ event: "seen", isNew: !0 });
1043
+ }, slugName: null, showStripes: !1, showSurveyBrand: !1, styleNonce: "", submit: async ({ completedAt: n, questionIndex: r, response: o, responseGroupUid: i }) => {
1044
+ const s = t();
1045
+ if (!i || dt(s)) return;
1046
+ const d = { responseGroupUid: i, meta: s.meta, customMetadata: s.customMetadata, responses: o, completedAt: n, previewKey: s.previewKey }, l = await s.trackPromise(gt(`${s.apiURL}/sdk/1/environments/${s.envId}/visitors/${s.userId}/responses/submit`, { body: JSON.stringify(d), headers: s.headers, method: "POST" }));
1047
+ l.ok ? o.forEach((u, m) => {
1048
+ s.eventEmitFn(ie.QuestionAnswered, { ...u, questionIndex: r ? r + m : void 0, "survey.id": s.surveyId });
1049
+ }) : l.reportError && (console.warn("[Sprig] (ERR-427) Failed to submit response", l.error), await s.trackPromise(yn(s, "submitResponse", l.error)));
1050
+ }, surveyId: 0, tabTitle: "", trackHistory: async ({ event: n, index: r, isNew: o = !1 }) => {
1051
+ const i = t();
1052
+ if (dt(i)) return;
1053
+ const { cards: s, index: d } = i;
1054
+ let l = r ?? d, u = s[l];
1055
+ for (; u; ) {
1056
+ const m = { sid: i.surveyId, qid: u.name, action: n, vid: i.userId, eid: i.envId, isNew: o, responseGroupUid: i.responseGroupUid, previewKey: i.previewKey }, c = await i.trackPromise(gt(`${i.apiURL}/sdk/1/visitors/${i.userId}/surveys/${i.surveyId}/history`, { method: "POST", headers: i.headers, body: JSON.stringify(m) }));
1057
+ !c.ok && c.reportError && (console.warn("[Sprig] (ERR-428) Failed to track survey event", c.error), await i.trackPromise(yn(i, "trackHistory", c.error)));
1058
+ const p = s[l + 1];
1059
+ if (!u.groupId || !(p != null && p.groupId) || p.groupId !== u.groupId) break;
1060
+ l++, u = p, o = !1;
1061
+ }
1062
+ }, trackPromise: async (n) => {
1063
+ const { resolveTrackedPromise: r } = t();
1064
+ return e((o) => ({ unresolvedRequestCount: o.unresolvedRequestCount + 1 })), n.then((o) => (r(), o)).catch((o) => {
1065
+ throw r(), o;
1066
+ });
1067
+ }, unresolvedRequestCount: 0, update: () => {
1068
+ const { cards: n, index: r, headers: o, eventEmitFn: i, frame: s, useMobileStyling: d, surveyId: l, viewDocument: u } = t(), m = o["userleap-platform"] === "web", c = We(o), p = n[r], v = p.type === "matrix" && !(p.props.properties.displayMatrixAsAccordion || d);
1069
+ e({ minScrollableHeight: void 0 }), setTimeout(() => {
1070
+ var k, x, L;
1071
+ !c && !d && ((k = s == null ? void 0 : s.setWidth) == null || k.call(s, ro));
1072
+ const [h, y, _] = oo(u, m && !d, c);
1073
+ c ? (i(ie.SurveyHeight, { name: ie.SurveyHeight, contentFrameHeight: h, "survey.id": l }), i(ie.SurveyWidth, { name: ie.SurveyWidth, contentFrameWidth: y, "survey.id": l })) : ((x = s.setHeight) == null || x.call(s, h), e({ minScrollableHeight: _ }), !d && v && ((L = s.setWidth) == null || L.call(s, y)));
1074
+ }, 100);
1075
+ }, uploadingCardViewed: !1, uploadProgress: {}, useDesktopPrototype: void 0, useMobileStyling: !1, userId: "", viewDocument: window.document, viewedCardCount: 0, focusedQuestionId: null, setFocusedQuestionId: (n) => e({ focusedQuestionId: n }) })), dt = (e) => !e.userId || e.meta && e.meta.mode === "test" || e.isPreview || e.previewMode, yn = async (e, t, n) => {
1076
+ const { mode: r, userId: o, envId: i, apiURL: s, headers: d, viewDocument: l } = e, u = l.documentElement, m = { mode: r, screenWidth: window.screen.width, screenHeight: window.screen.height, clientWidth: u.clientWidth, clientHeight: u.clientHeight, location: window.location.href, language: window.navigator.language }, c = { action: t, err: { message: `${n == null ? void 0 : n.name} - ${n == null ? void 0 : n.message}`, stack: n == null ? void 0 : n.stack }, meta: m, vid: o, envId: i };
1077
+ (await gt(`${s}/sdk/1/errors`, { method: "POST", headers: Object.assign({ "x-ul-error": window.btoa(`userleap-${Date.now()}-error`) }, d), body: JSON.stringify(c) })).ok || console.warn("[Sprig] (ERR-444) Failed to report error to API", n);
1078
+ }, Tr = (e) => oe("svg", { fill: "none", height: 24, viewBox: "0 0 24 24", width: 24, xmlns: "http://www.w3.org/2000/svg", ...e }, oe("path", { d: "M17 10L12 15L7 10", stroke: "#0B2330", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5 })), Lr = (e) => oe("svg", { fill: "none", height: 10, viewBox: "0 0 10 10", width: 10, xmlns: "http://www.w3.org/2000/svg", ...e }, oe("path", { d: "M9.15377 1.30774L4.07685 8.23082L1.30762 5.00005", stroke: "white", strokeLinecap: "round", strokeWidth: 2 })), Wo = ({ visible: e }) => a("div", { className: "sprig-check-background", style: { opacity: e ? 1 : 0 }, children: a(Lr, { className: "sprig-check" }) }), xn = "250ms", Zo = Dt(({ animate: e, children: t, header: n, isOpen: r, onClick: o, showHeaderCheck: i }, s) => {
1079
+ const d = J(null), [l, u] = V(0), [m, c] = V("none"), [p, v] = V(!0);
1080
+ return Q(() => {
1081
+ var y;
1082
+ const h = (y = d.current) == null ? void 0 : y.getBoundingClientRect();
1083
+ u(r && h ? h.height : 0);
1084
+ }, [r]), Q(() => {
1085
+ !l && r || !p || v(!1), c(e && !p ? `height ${xn} ease` : "none");
1086
+ }, [e, p, l, r]), a("div", { className: "sprig-accordion", ref: s, children: [a("button", { className: "sprig-accordion-header-container", onClick: o, type: "button", children: [a("div", { className: "sprig-header-label-container", children: [a("span", { className: "sprig-header-label", children: n }), a(Wo, { visible: i })] }), a(Tr, { className: "sprig-caret", style: { transitionDuration: e ? xn : "0", transform: r ? "rotate(-180deg)" : "none" } })] }), a("div", { className: "sprig-accordion-body", style: { transition: m, height: l }, children: a("div", { ref: d, children: t }) })] });
1087
+ }), Ut = ({ style: e, stroke: t = "black" }) => a("svg", { fill: "none", height: "10", style: e, viewBox: "0 0 12 10", width: "12", xmlns: "http://www.w3.org/2000/svg", children: [a("path", { d: "M1.47839 5.2085L10.9384 5.2085", stroke: t, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.35" }), a("path", { d: "M7.0686 1.15845L10.9386 5.20845L7.0686 9.25845", stroke: t, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.35" })] }), H = (...e) => e.filter(Boolean).join(" "), Y = (e, t, n) => {
1088
+ const r = t ? "--mobile" : "--desktop";
1089
+ return `${e + r} ${e + (n ? `${r}_${n}` : "")} ${e}`;
1090
+ }, Go = (e, t) => `${e} ${e}__${t}`, X = (e) => a("button", { ...e, className: H("ul-card-text__button", e.className), id: "ul-card-text__button" }), Nr = () => {
1091
+ const { viewDocument: e } = B((r) => ({ viewDocument: r.viewDocument })), [t, n] = V(!1);
1092
+ return Q(() => {
1093
+ const r = e.querySelector(".sprig-question-body"), o = new ResizeObserver(() => {
1094
+ window.requestAnimationFrame(() => {
1095
+ n(!!(r && io(r) && r.scrollHeight > r.offsetHeight));
1096
+ });
1097
+ });
1098
+ return r && o.observe(r), () => {
1099
+ r && o.disconnect();
1100
+ };
1101
+ }, [e]), t;
1102
+ }, kn = ({ plainText: e, richText: t, id: n, className: r, isHeader: o }) => t ? a("div", { className: r, dangerouslySetInnerHTML: { __html: t }, id: n }) : e ? a(o ? "h1" : "p", { className: r, id: n, children: e }) : null, Ko = () => {
1103
+ const { cards: e, close: t, endCard: n, headers: r, index: o } = B((d) => ({ cards: d.cards, close: d.close, endCard: d.endCard, headers: d.headers, index: d.index, useMobileStyling: d.useMobileStyling })), i = e.length, s = ue(() => () => t(je), [t]);
1104
+ return ["email", "link"].includes(r["userleap-platform"]) || n && o + 1 === i ? null : a("div", { "aria-label": "Close button", className: "close-btn", onClick: s, onKeyPress: (d) => {
1105
+ d.key === "Enter" && s();
1106
+ }, role: "button", tabIndex: 0, children: a("svg", { fill: "none", height: "16px", viewBox: "0 0 13 13", width: "16px", xmlns: "http://www.w3.org/2000/svg", children: a("path", { d: "M2.54964 1.78369L1.78369 2.54964L5.73405 6.5L1.78369 10.4504L2.54964 11.2163L6.5 7.26595L10.4504 11.2163L11.2163 10.4504L7.26595 6.5L11.2163 2.54964L10.4504 1.78369L6.5 5.73405L2.54964 1.78369Z", fill: "#262136" }) }) });
1107
+ }, se = ({ message: e, properties: t }) => {
1108
+ const n = J(null), r = t == null ? void 0 : t.captionText, o = Nr();
1109
+ return a("div", { className: H("question-header-container", "sprig-header-container", o ? "sprig-border-bottom" : null), ref: n, children: [a("div", { className: "question-header-button-container", children: [a(kn, { className: "ul-question", id: "ul-question", isHeader: !0, plainText: e, richText: t == null ? void 0 : t.questionHtml }), a(Ko, {})] }), a(kn, { className: "ul-caption", id: "ul-caption", plainText: r, richText: t == null ? void 0 : t.captionHtml })] });
1110
+ }, Yo = () => a("svg", { fill: "none", height: "10", viewBox: "0 0 13 10", width: "13", xmlns: "http://www.w3.org/2000/svg", children: a("path", { d: "M11.5 1.5L4.5 8.5L1 5", stroke: "#FFFFFF", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5" }) }), Xe = ({ isSubmitDisabled: e, handleSubmit: t }) => a("div", { className: "ul-card-longform__submit-button-container", children: a(X, { className: "ul-card-longform__submit-button", disabled: e, onClick: t, children: ["OK ", a(Yo, {})] }) }), wn = ({ buttonText: e = "View Prototype", handleClick: t }) => a("button", { className: "prototype-button", onClick: t, children: e }, "prototype-btn"), pe = ({ defaultBody: e, embeddedType: t = "prototype", properties: n }) => {
1111
+ var c;
1112
+ const { handleClickEmbedButton: r, hasViewedEmbed: o, headers: i, useDesktopPrototype: s } = B((p) => ({ handleClickEmbedButton: p.handleClickEmbedButton, hasViewedEmbed: p.hasViewedEmbed, headers: p.headers, useDesktopPrototype: p.useDesktopPrototype })), d = (n == null ? void 0 : n.conceptUrl) || ((c = n == null ? void 0 : n.consentDocument) == null ? void 0 : c.url), l = window.innerWidth < so, u = i["userleap-platform"], m = (p, v) => {
1113
+ p.preventDefault(), r(v);
1114
+ };
1115
+ if (!s && l && !o && d && ["email", "link"].includes(u)) {
1116
+ if (t === "prototype") return a(wn, { handleClick: (p) => {
1117
+ m(p, "question.prototype.click");
1118
+ } });
1119
+ if (t === "pdf") return a(wn, { buttonText: (n == null ? void 0 : n.viewDocumentText) || "View Document", handleClick: (p) => {
1120
+ m(p, "question.agreement.click");
1121
+ } });
1122
+ }
1123
+ return e();
1124
+ }, Dr = ({ isSelected: e, id: t, divId: n, themeColor: r }) => a("div", { "aria-checked": e, "aria-labelledby": `label-${t}`, className: "select-checkbox", id: n, role: "checkbox", style: e ? { backgroundColor: r, borderColor: r, boxShadow: "none" } : {}, tabIndex: 0, children: e && a(Lr, {}) }), Pr = (e, t) => {
1125
+ const n = J(0);
1126
+ return () => {
1127
+ if (e.current) {
1128
+ const r = e.current;
1129
+ r.style.height = "1px";
1130
+ const o = r.scrollHeight + (r.offsetHeight - r.clientHeight), i = parseInt(window.getComputedStyle(r).getPropertyValue("max-height")), s = o <= i ? o : i;
1131
+ n.current !== s && t(), n.current = s, r.style.height = `${s}px`;
1132
+ }
1133
+ };
1134
+ }, et = ({ ariaLabel: e, border: t, choiceStyle: n = {}, label: r, isSelected: o, value: i, text: s, id: d, isRadio: l, useMobileStyling: u, error: m, allowTextEntry: c, noneOfTheAbove: p, promptText: v, onUserInputChanged: h }) => {
1135
+ const { styleNonce: y, viewDocument: _ } = B((b) => ({ styleNonce: b.styleNonce, viewDocument: b.viewDocument })), [k, x] = V(!1);
1136
+ Xo(_, t, y);
1137
+ const L = ({ isSelected: b, userText: j }) => {
1138
+ h && h({ id: d, selected: b, value: i, userText: j, noneOfTheAbove: p });
1139
+ }, I = (b) => {
1140
+ b.stopPropagation(), L({ isSelected: l || !o, userText: s }), x(!1);
1141
+ }, w = () => {
1142
+ k || x(!0);
1143
+ }, S = () => {
1144
+ k && x(!1);
1145
+ }, g = { onClick: (b) => I(b), onKeyPress: (b) => ((j) => {
1146
+ j.key !== "Enter" && j.key !== " " || I(j);
1147
+ })(b) };
1148
+ "ontouchstart" in _.documentElement ? (g.onTouchStart = S, g.onTouchCancel = S, g.onTouchEnd = S) : (g.onMouseDown = w, g.onMouseLeave = S);
1149
+ const N = l ? `radio-${d}` : `checkbox-${d}`, T = o || k ? [ze] : [], C = [...m ? [Rr] : [], ...T], f = r ? { "aria-labelledby": `label-${d}` } : { "aria-label": e };
1150
+ return a("div", { className: H(Y("choice", u), ...C), id: `choice-div-${d}`, style: { ...n, ...m ? { borderColor: Pe } : {} }, ...g, children: [a("div", { className: H("choice-label-container"), children: [l ? a("div", { ...f, className: H("select-radio", ...T), id: N, role: "radio", tabIndex: 0 }) : a(Dr, { divId: N, id: d, isSelected: o, themeColor: t }), r && a("label", { className: H(Y("select-label", u)), htmlFor: N, id: `label-${d}`, children: r })] }), c && o && a("div", { className: H("choice-text-entry-container", ...T), children: a(Jo, { onTextChange: (b) => L({ isSelected: o, userText: b }), promptText: v || "Please specify", textValue: s, useMobileStyling: u }) })] });
1151
+ }, Jo = ({ promptText: e, textValue: t, onTextChange: n, useMobileStyling: r }) => {
1152
+ const o = J(null), { update: i } = B((d) => ({ update: d.update })), s = Pr(o, () => i());
1153
+ return Q(() => (s(), o.current && o.current.focus(), () => {
1154
+ i();
1155
+ }), []), a("textarea", { "aria-label": e, "aria-multiline": "true", "aria-placeholder": e, className: H(Y("choice-text-input", r)), "data-gramm": "false", maxLength: 5e3, name: "text", onChange: (d) => {
1156
+ s(), d.stopPropagation(), n(d.currentTarget.value);
1157
+ }, onClick: (d) => {
1158
+ d.stopPropagation();
1159
+ }, onKeyPress: (d) => {
1160
+ d.stopPropagation();
1161
+ }, placeholder: e, ref: o, role: "textbox", rows: 1, value: t });
1162
+ }, Cn = "ul-select-style-element", ze = "ul-select-active-dynamic-style", Rr = "ul-select-error-dynamic-style", Xo = (e, t, n) => {
1163
+ let r = e.getElementById(Cn), o = !1;
1164
+ r || (r = e.createElement("style"), o = !0), r.tagName.toLowerCase() === "style" && (r.id = Cn, n && (r.nonce = n), r.textContent = ei(t), o && e.head.appendChild(r));
1165
+ }, ei = (e) => `
1166
+ .${ze} {
1167
+ border-color: ${e};
1168
+ }
1169
+ .${ze} .select-radio, .${ze}.select-radio {
1170
+ border: 6px solid ${e};
1171
+ box-shadow: none;
1172
+ }
1173
+ .${Rr} {
1174
+ border-color: ${Pe};
1175
+ }
1176
+ `, me = ({ children: e }) => a("div", { className: "sprig-question-body", children: e }), _e = ({ children: e }) => {
1177
+ const t = Nr();
1178
+ return a("div", { className: H("sprig-question-footer-container", t ? "sprig-border-top" : null), children: e });
1179
+ }, Mr = ({ logoOnly: e = !1, style: t = {} }) => a("svg", { alt: (e ? "Powered by " : "") + "Sprig", width: e ? "35" : "112", height: "15", viewBox: e ? "79 0 31 15" : "0 0 112 15", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: { display: "block", ...t }, children: [!e && a("path", { d: "M0.648926 12.0181V2.8584H4.21631C6.0127 2.8584 7.25684 4.06445 7.25684 5.86084V5.87354C7.25684 7.66357 6.0127 8.88867 4.21631 8.88867H2.0708V12.0181H0.648926ZM3.86084 4.05811H2.0708V7.69531H3.86084C5.09229 7.69531 5.80957 7.02881 5.80957 5.87988V5.86719C5.80957 4.72461 5.09229 4.05811 3.86084 4.05811ZM11.6621 12.1514C9.63721 12.1514 8.39941 10.7993 8.39941 8.57764V8.56494C8.39941 6.34961 9.64355 4.99121 11.6621 4.99121C13.6743 4.99121 14.9185 6.34326 14.9185 8.56494V8.57764C14.9185 10.7993 13.6807 12.1514 11.6621 12.1514ZM11.6621 11.0024C12.8428 11.0024 13.5156 10.1011 13.5156 8.57764V8.56494C13.5156 7.03516 12.8428 6.14014 11.6621 6.14014C10.4751 6.14014 9.80859 7.03516 9.80859 8.56494V8.57764C9.80859 10.1074 10.4751 11.0024 11.6621 11.0024ZM17.6226 12.0181L15.7183 5.12451H17.1021L18.3398 10.4438H18.4414L19.8633 5.12451H21.1709L22.5928 10.4438H22.7007L23.9321 5.12451H25.2969L23.3989 12.0181H21.9834L20.5552 6.87646H20.4473L19.0254 12.0181H17.6226ZM29.334 12.1514C27.3154 12.1514 26.0967 10.7739 26.0967 8.59033V8.58398C26.0967 6.43213 27.3408 4.99121 29.2642 4.99121C31.1875 4.99121 32.3682 6.38135 32.3682 8.45068V8.93311H27.4805C27.5059 10.2534 28.2295 11.0215 29.3657 11.0215C30.248 11.0215 30.7749 10.5835 30.9399 10.228L30.9653 10.1772L32.292 10.1709L32.2793 10.228C32.0508 11.1357 31.0986 12.1514 29.334 12.1514ZM29.2705 6.12109C28.3311 6.12109 27.6201 6.76221 27.4995 7.94922H31.0034C30.8955 6.71777 30.2036 6.12109 29.2705 6.12109ZM34.0059 12.0181V5.12451H35.3833V6.16553H35.4849C35.7324 5.43555 36.3735 5.00391 37.2939 5.00391C37.5161 5.00391 37.7573 5.03564 37.897 5.06738V6.33691C37.6494 6.28613 37.4146 6.25439 37.1543 6.25439C36.1006 6.25439 35.3833 6.90186 35.3833 7.89844V12.0181H34.0059ZM41.9277 12.1514C39.9092 12.1514 38.6904 10.7739 38.6904 8.59033V8.58398C38.6904 6.43213 39.9346 4.99121 41.8579 4.99121C43.7812 4.99121 44.9619 6.38135 44.9619 8.45068V8.93311H40.0742C40.0996 10.2534 40.8232 11.0215 41.9595 11.0215C42.8418 11.0215 43.3687 10.5835 43.5337 10.228L43.5591 10.1772L44.8857 10.1709L44.873 10.228C44.6445 11.1357 43.6924 12.1514 41.9277 12.1514ZM41.8643 6.12109C40.9248 6.12109 40.2139 6.76221 40.0933 7.94922H43.5972C43.4893 6.71777 42.7974 6.12109 41.8643 6.12109ZM49.1133 12.1323C47.3804 12.1323 46.2568 10.7422 46.2568 8.57764V8.56494C46.2568 6.38135 47.3613 5.00391 49.1133 5.00391C50.0591 5.00391 50.8652 5.47363 51.2334 6.21631H51.3413V2.42041H52.7124V12.0181H51.3413V10.9326H51.2334C50.8335 11.688 50.0781 12.1323 49.1133 12.1323ZM49.5068 10.958C50.6558 10.958 51.3604 10.0503 51.3604 8.57764V8.56494C51.3604 7.09229 50.6494 6.18457 49.5068 6.18457C48.3516 6.18457 47.6597 7.08594 47.6597 8.56494V8.57764C47.6597 10.0566 48.3516 10.958 49.5068 10.958ZM61.98 12.1323C61.0151 12.1323 60.2598 11.688 59.8599 10.9326H59.7583V12.0181H58.3809V2.42041H59.7583V6.21631H59.8599C60.228 5.47363 61.0342 5.00391 61.98 5.00391C63.7319 5.00391 64.8364 6.38135 64.8364 8.56494V8.57764C64.8364 10.7422 63.7192 12.1323 61.98 12.1323ZM61.5928 10.958C62.7417 10.958 63.4336 10.0566 63.4336 8.57764V8.56494C63.4336 7.08594 62.7417 6.18457 61.5928 6.18457C60.4438 6.18457 59.7329 7.09229 59.7329 8.56494V8.57764C59.7329 10.0503 60.4438 10.958 61.5928 10.958ZM66.8867 14.4429C66.7153 14.4429 66.5122 14.4302 66.3345 14.4111V13.3257C66.4678 13.3447 66.6392 13.3511 66.7979 13.3511C67.439 13.3511 67.8262 13.0781 68.0293 12.3799L68.1309 12.0244L65.6299 5.12451H67.1152L68.8418 10.6343H68.9624L70.6826 5.12451H72.1299L69.5654 12.2847C68.9814 13.9287 68.2832 14.4429 66.8867 14.4429Z", fill: "black", fillOpacity: "0.7" }), a("path", { d: "M81.1088 6.63629C79.6878 6.32154 78.9672 5.76865 78.9672 4.99369C78.9672 4.19299 79.736 3.5886 80.7556 3.5886C81.8066 3.5886 82.5995 4.25285 82.5995 5.13336V5.20352H84.0518V5.13336C84.0518 3.52424 82.6405 2.30774 80.7693 2.30774C79.8676 2.30774 79.0414 2.58451 78.4433 3.08655C78.1463 3.33144 77.9077 3.63818 77.7448 3.98479C77.5818 4.33141 77.4984 4.70934 77.5005 5.09153C77.4946 5.44197 77.5675 5.78934 77.714 6.10857C77.8605 6.42779 78.0769 6.71092 78.3475 6.93752C78.8512 7.37584 79.5659 7.70024 80.4709 7.90299C81.9949 8.23898 82.7676 8.81054 82.7676 9.60094C82.7676 10.4576 81.9258 11.1032 80.813 11.1032C79.6571 11.1032 78.7854 10.3856 78.7854 9.43424V9.36408H77.3318V9.43424C77.3318 11.1167 78.8219 12.3847 80.7973 12.3847C81.7421 12.3847 82.6093 12.0983 83.2393 11.5769C83.5519 11.3237 83.8034 11.0048 83.9753 10.6433C84.1472 10.2818 84.2352 9.88702 84.2329 9.48766C84.2329 8.05875 83.1833 7.09907 81.1088 6.63629Z", fill: "black", fillOpacity: "0.7" }), a("path", { d: "M89.2394 4.68276C88.6963 4.67605 88.1596 4.79915 87.6751 5.04156C87.1905 5.28397 86.7725 5.63851 86.4566 6.07497V4.85204H85.0747V14.8479H86.4566V11.0356C86.7725 11.472 87.1906 11.8265 87.6751 12.0688C88.1596 12.3111 88.6963 12.434 89.2394 12.4272C91.3836 12.4272 93 10.7627 93 8.55495C93 6.34723 91.3836 4.68276 89.2394 4.68276ZM91.5608 8.84202C91.5057 9.41605 91.2512 9.95356 90.8406 10.3633C90.4299 10.773 89.8883 11.0296 89.3078 11.0896C88.5363 11.1669 87.8177 10.9461 87.2841 10.4692C86.7505 9.99222 86.4566 9.3106 86.4566 8.55495C86.4566 7.10159 87.5538 6.00546 89.0087 6.00546C89.7619 6.00546 90.4421 6.29124 90.9171 6.81002C91.407 7.34232 91.6357 8.06385 91.5608 8.84202Z", fill: "black", fillOpacity: "0.7" }), a("path", { d: "M109.95 4.85407V6.06349C109.298 5.18298 108.292 4.68286 107.153 4.68286C105.017 4.68286 103.406 6.31709 103.406 8.48426C103.406 10.6514 105.017 12.285 107.153 12.285C108.296 12.285 109.303 11.79 109.95 10.9185V11.1046C109.95 12.6101 108.993 13.5826 107.513 13.5826C106.513 13.5826 105.68 13.1494 105.284 12.424L105.264 12.3867H103.838L103.871 12.48C104.112 13.1892 104.583 13.8001 105.211 14.2179C105.841 14.6324 106.637 14.8512 107.513 14.8512C108.637 14.8512 109.594 14.4972 110.28 13.8285C110.967 13.1597 111.332 12.2194 111.332 11.1213V4.85407H109.95ZM109.175 10.3502C108.588 10.905 107.752 11.138 106.879 10.9887C106.361 10.8984 105.886 10.6475 105.523 10.2725C105.16 9.89751 104.927 9.41787 104.859 8.90328C104.736 8.03757 104.999 7.21756 105.581 6.655C106.069 6.19093 106.723 5.93643 107.401 5.94699C107.565 5.94713 107.729 5.96026 107.891 5.98625C108.946 6.15489 109.781 7.01609 109.921 8.0852C110.039 8.96507 109.766 9.78958 109.175 10.3502Z", fill: "black", fillOpacity: "0.7" }), a("path", { d: "M101.89 2.12378C101.63 2.06766 101.358 2.11486 101.133 2.25518C100.908 2.39551 100.747 2.61769 100.687 2.87371C100.626 3.12973 100.67 3.39902 100.809 3.62339C100.947 3.84775 101.17 4.00917 101.428 4.07275C101.503 4.08936 101.58 4.09778 101.657 4.09786C101.906 4.09824 102.146 4.0083 102.331 3.84518C102.517 3.68206 102.636 3.45714 102.664 3.21327C102.693 2.9694 102.63 2.72361 102.487 2.5227C102.344 2.32179 102.132 2.17981 101.89 2.12378Z", fill: "black", fillOpacity: "0.7" }), a("path", { d: "M100.967 10.934H99.7755C98.9285 10.934 98.4196 10.3644 98.4196 9.40982C98.4196 8.4791 98.8757 7.36945 99.8054 6.01778L99.8178 5.99976V5.61807L95.8571 5.06453C95.8585 4.90331 95.8162 4.74466 95.7346 4.60501C95.653 4.46536 95.5352 4.34979 95.3932 4.27027C95.0381 4.07718 94.6498 4.07717 94.3279 4.26383C94.1667 4.35799 94.035 4.4945 93.9476 4.65816C93.8602 4.82182 93.8205 5.00623 93.8328 5.19087C93.8452 5.37552 93.9092 5.55315 94.0176 5.70402C94.1261 5.85489 94.2748 5.97309 94.4472 6.04546L93.2151 12.258H94.5833L95.7196 6.35891L97.8593 6.7155C97.284 7.73439 96.9921 8.68442 96.9921 9.53919C96.9921 11.1168 97.9577 12.1498 99.5187 12.2496V12.258H102.346V4.87723H100.967V10.934Z", fill: "black", fillOpacity: "0.7" })] }), Or = ({ forceBrandedLogo: e, marketingUrlLink: t }) => a("div", { className: e ? "yellow-footer-logo" : "", style: { marginTop: "4px", marginBottom: "4px" }, children: a("a", { href: t, rel: "noreferrer", target: "_blank", children: a("div", { style: { display: "flex" }, children: [a(Mr, { logoOnly: !1 }), e && a(Ut, { style: { display: "block", margin: "auto 0 auto 4px", transform: "rotateY(0deg) rotate(-45deg)" } })] }) }) }), Ur = ({ marketingUrlLink: e }) => a("a", { dir: "ltr", href: e, rel: "noreferrer", target: "_blank", children: a("div", { className: "thank-you-card-link", children: [a("div", { className: "sprig-box-logo", children: a(Mr, { logoOnly: !0, style: { margin: "auto" } }) }), a("div", { children: a("p", { children: ["Capture insights about your own product", a(Ut, { style: { display: "inline-flex", marginInlineStart: "4px", verticalAlign: "middle" } })] }) })] }) }), xe = (e) => (e == null ? void 0 : e.buttonText) || "Next", Ht = (e) => (e == null ? void 0 : e.skipButtonText) || "Skip", Hr = ({ marketingUrl: e, slugName: t, surveyId: n, forceBrandedLogo: r }) => `${e}?utm_source=survey_branding&utm_medium=website&utm_campaign=${t}&utm_content=${n}${r ? "&utm_term=poweredby_pill" : ""}`, ti = ({ className: e, message: t, next: n, properties: r, questionId: o, type: i }) => {
1180
+ const { useMobileStyling: s, border: d, isLongFormSurvey: l, focusedQuestionId: u } = B((b) => ({ useMobileStyling: b.useMobileStyling, border: b.border, isLongFormSurvey: re(b.studyType), focusedQuestionId: b.focusedQuestionId })), [m, c] = V(!1), [p, v] = V(""), [h, y] = V(!1), _ = l && u === o, k = r == null ? void 0 : r.collectName, x = (r == null ? void 0 : r.nameLabelText) || "Full Name", L = (r == null ? void 0 : r.consentText) || "I agree to the stated conditions", I = (r == null ? void 0 : r.submitButtonText) || "Submit", w = !!p.trim(), S = m && (!k || w), g = (b, j = !1) => {
1181
+ b.preventDefault(), b.stopPropagation();
1182
+ let D = null;
1183
+ if (!j) {
1184
+ if (!S) return void y(!0);
1185
+ D = { submitted: !0 }, k && (D.name = p);
1186
+ }
1187
+ n({ value: D, questionId: o, type: i }, S);
1188
+ }, N = (b) => {
1189
+ b.preventDefault(), b.stopPropagation(), v(b.currentTarget.value);
1190
+ }, T = (b) => {
1191
+ b.currentTarget.style.borderColor = h && !w ? Pe : d;
1192
+ }, C = (b) => {
1193
+ b.currentTarget.style.borderColor = h && !w ? Pe : Et;
1194
+ }, f = () => a(_e, { children: [a("div", { className: "sprig-stretch", children: [a(et, { allowTextEntry: !1, border: d, error: h && !m, id: "consent", isRadio: !1, isSelected: m, label: L, onUserInputChanged: ({ selected: b }) => {
1195
+ b !== m && c(!m);
1196
+ }, useMobileStyling: s }), k && a("input", { "aria-label": x, "aria-placeholder": x, className: H(Y("ul-consent-legal__name-input", s)), "data-gramm": "false", maxLength: 250, name: "name", onBlur: C, onFocus: T, onInput: N, placeholder: x, style: h && !w ? { borderColor: Pe } : {}, tabIndex: 0, value: p })] }), a("div", { className: "ul-card__button-wrapper ul-card-vertical__button-wrapper", children: [a(X, { className: S ? "" : "sprig-button-disabled", onClick: g, children: I }), r.required === !1 && !l && a("button", { className: "ul-card-skip__button", onClick: (b) => g(b, !0), children: Ht(r) })] })] });
1197
+ return a("div", { className: H(e, l && !_ && "ul-card--unfocused", "ul-card__consent-legal", "fade-in-transition"), children: [a(se, { message: t, properties: { questionHtml: r.questionHtml } }), a(Z, { children: [r != null && r.richTextBody ? a(me, { children: a("div", { className: "ul-rich-text-body", dangerouslySetInnerHTML: r != null && r.richTextBody ? { __html: r.richTextBody } : void 0, id: "ul-card__consent-legal-body-container" }) }) : null, a(pe, { properties: r, defaultBody: f, embeddedType: "pdf" })] })] }, o);
1198
+ }, ni = ({ icon: e, scaleLabelType: t, value: n, selectedValue: r }) => {
1199
+ if (t === "smiley" && n === r) {
1200
+ let o = 0;
1201
+ return e.replace(/black/g, () => ++o == 1 ? "black" : "white");
1202
+ }
1203
+ return e;
1204
+ }, ri = ({ activeValue: e, border: t, icon: n, isPressed: r, onSubmit: o, range: i, scaleLabelType: s, selectedValue: d, setSelectedValue: l, setActiveValue: u, setIsPressed: m, useMobileStyling: c, value: p, viewDocument: v }) => {
1205
+ const { isLongFormSurvey: h } = B((g) => ({ isLongFormSurvey: re(g.studyType) })), y = `option-${p}`, _ = s === "number", k = s === "star", x = s === "smiley", L = _ && p === e || p === d, [I, w] = (() => {
1206
+ const g = k && d !== null && p <= d;
1207
+ return k && p <= e || x && p === e || g || p === e || p === d ? [t, r || g || p === d ? 1 : 0.3] : ["", 1];
1208
+ })(), S = ue(() => {
1209
+ const g = { borderColor: L ? I : "", fillOpacity: L ? "" : w, zIndex: L ? 3 : "auto", color: d === p ? "#fff" : "" };
1210
+ return _ ? { ...g, backgroundColor: d === p ? I : "" } : { ...g, color: k || x || d === p ? I : "" };
1211
+ }, [L, I, w, d, p, _, k, x]);
1212
+ return a("button", { "aria-label": _ ? void 0 : String(p), className: (() => {
1213
+ switch (s) {
1214
+ case "star":
1215
+ return H(Y("likert-star", c), Y(`likert-star-${p}`, c));
1216
+ case "smiley":
1217
+ return H(Y("likert-smiley", c), Y(`likert-smiley-${p}`, c));
1218
+ default:
1219
+ return p === i ? H(Y("likert-number", c), Y(`likert-number-${p}`, c), Y("likert-last-option", c)) : H(Y("likert-number", c), Y(`likert-number-${p}`, c));
1220
+ }
1221
+ })(), dangerouslySetInnerHTML: { __html: ni({ icon: n, scaleLabelType: s, value: p, selectedValue: d }) }, id: y, onClick: (g) => {
1222
+ h && (g.preventDefault(), g.stopPropagation(), l(p)), o();
1223
+ }, onKeyDown: (g) => {
1224
+ var C, f;
1225
+ const N = v.querySelectorAll(`.likert-${s ?? "number"}`), T = p - 1;
1226
+ g.key === "ArrowRight" ? (C = N[T + 1]) == null || C.focus() : g.key === "ArrowLeft" ? (f = N[T - 1]) == null || f.focus() : g.key !== "Enter" && g.key !== " " || (h && (g.preventDefault(), g.stopPropagation(), l(p)), o());
1227
+ }, onPointerDown: () => m(!0), onPointerEnter: () => u(p), onPointerLeave: () => {
1228
+ u(-1), m(!1);
1229
+ }, style: S, tabIndex: 0 });
1230
+ }, oi = ({ className: e, labels: t, message: n, next: r, properties: o, questionId: i, type: s }) => {
1231
+ const { border: d, useMobileStyling: l, viewDocument: u, isLongFormSurvey: m, focusedQuestionId: c } = B((j) => ({ border: j.border, useMobileStyling: j.useMobileStyling, viewDocument: j.viewDocument, isLongFormSurvey: re(j.studyType), focusedQuestionId: j.focusedQuestionId })), [p, v] = V(-1), [h, y] = V(!1), [_, k] = V(null), x = m && c === i, L = t && t.left, I = t && t.right;
1232
+ let w;
1233
+ const { range: S, scaleLabelType: g, ratingIcons: N } = o;
1234
+ S && (w = Number(S));
1235
+ const T = w || 5, C = (j) => {
1236
+ var D, E;
1237
+ switch (g) {
1238
+ case "star":
1239
+ return (D = N[0]) == null ? void 0 : D.svg;
1240
+ case "smiley":
1241
+ return (E = N[j]) == null ? void 0 : E.svg;
1242
+ default:
1243
+ return String(j + 1);
1244
+ }
1245
+ }, f = [...Array(T)].map((j, D) => {
1246
+ const E = D + 1;
1247
+ return a(ri, { activeValue: p, border: d, icon: C(D), isPressed: h, onSubmit: () => r({ value: E, questionId: i, type: s }, !0), range: T, scaleLabelType: g, selectedValue: _, setActiveValue: v, setIsPressed: y, setSelectedValue: k, useMobileStyling: l, value: E, viewDocument: u }, D);
1248
+ }), b = (j) => {
1249
+ j.preventDefault(), j.stopPropagation(), r({ value: null, questionId: i, type: s }, !0);
1250
+ };
1251
+ return a("form", { className: H(e, "ul-card--likert", "fade-in-transition", m && !x && "ul-card--unfocused"), children: [a(se, { message: n, properties: o }), a(pe, { properties: o, defaultBody: () => a(Z, { children: [a(me, { children: [a("div", { "aria-label": `Rating (1 - ${T})`, className: "ul-card--likert__numbers", role: "radiogroup", children: f }), a("div", { className: "ul-card--likert__labels", children: [a("span", { children: L }), a("span", { children: I })] })] }), !o.required && !m && a(_e, { children: a("div", { className: "ul-vertical-centered-container", children: a(X, { onClick: b, children: xe(o) }) }) })] }) })] }, i);
1252
+ }, Br = (e) => e && (e.scrollHeight > e.offsetHeight ? e : Br(e.parentElement)), ii = (e) => {
1253
+ if (!e || !((n) => n instanceof HTMLElement)(e)) return 0;
1254
+ const t = getComputedStyle(e);
1255
+ return parseFloat(t.marginTop) + parseFloat(t.marginBottom) + (parseFloat(t.borderTopWidth) + parseFloat(t.borderBottomWidth));
1256
+ }, si = ({ columns: e, onSelect: t, options: n, selectedOptions: r }) => {
1257
+ const o = J([]), { border: i, useMobileStyling: s } = B((p) => ({ border: p.border, useMobileStyling: p.useMobileStyling })), d = n.findIndex((p) => r[p.id] === null), [l, u] = V(d), m = Se((p, v) => {
1258
+ t(p, v);
1259
+ const h = l + 1, y = n[h];
1260
+ if (y && r[y.id] === null) {
1261
+ u(h);
1262
+ const _ = o.current[l];
1263
+ if (_ != null && _.firstElementChild) {
1264
+ const k = Br(_), x = _.firstElementChild, L = ii(_) + x.clientHeight;
1265
+ k == null || k.scrollTo(0, _.offsetTop + L);
1266
+ }
1267
+ }
1268
+ }, [t, n, r, l]), c = Se((p, v) => {
1269
+ const h = l === p;
1270
+ return a(Zo, { animate: !0, header: v.label, isOpen: h, onClick: () => u(h && !window.UserLeap.isMobileSDK ? -1 : p), ref: (y) => {
1271
+ y && (o.current[p] = y);
1272
+ }, showHeaderCheck: r[v.id] !== null, children: a("div", { style: { paddingTop: "12px" }, children: e.map((y) => a(et, { allowTextEntry: !1, ariaLabel: `${v.label}-${y.label}`, border: i, error: !1, id: `${v.id}-${y.value}`, isRadio: !0, isSelected: r[v.id] === y.value, label: y.label, onUserInputChanged: () => m(v.id, y.value), useMobileStyling: s }, y.label)) }) }, v.id);
1273
+ }, [i, e, l, m, r, s]);
1274
+ return a("div", { children: n.map((p, v) => c(v, p)) });
1275
+ }, ai = ({ columns: e, onSelect: t, options: n, selectedOptions: r }) => {
1276
+ const { border: o, useMobileStyling: i, isLongFormSurvey: s } = B((h) => ({ border: h.border, useMobileStyling: h.useMobileStyling, isLongFormSurvey: re(h.studyType) })), d = n.length, l = e.length, u = J(null), [m, c] = V(!1), [p, v] = V(!1);
1277
+ return Q(() => {
1278
+ const h = u.current, y = new ResizeObserver((_) => {
1279
+ window.requestAnimationFrame(() => {
1280
+ h && (c(Math.round(_[0].contentRect.width) < h.scrollWidth), v(Math.round(_[0].contentRect.width) < h.scrollWidth));
1281
+ });
1282
+ });
1283
+ return h && y.observe(h), () => {
1284
+ h && y.unobserve(h);
1285
+ };
1286
+ }, []), a("div", { className: "ul-card--matrix_question_container", children: [a("div", { className: H("ul-card--matrix_container", m && "ul-matrix-scroll-gradient"), onScroll: () => {
1287
+ (() => {
1288
+ const h = u.current;
1289
+ h && c(h.clientWidth + Math.abs(h.scrollLeft) < h.scrollWidth);
1290
+ })();
1291
+ }, ref: u, children: a("div", { className: H(s && "ul-card--matrix_grid_longform", "ul-card--matrix_grid"), style: `--numColumns: ${l}; --numRows: ${d + 1};`, children: [a("div", {}), " ", e.map((h) => a("div", { className: "ul-matrix-column-label", children: h.label }, h.label)), n.map((h) => a(Z, { children: [a("div", { "aria-label": h.label, className: "ul-matrix-row-label", children: h.label }, h.label), a("div", { className: "ul-matrix-row-options", role: "radiogroup", children: e.map((y, _) => a("div", { className: H("ul-matrix-option-wrapper", _ === l - 1 && "ul-matrix-last-option"), children: a(et, { allowTextEntry: !1, ariaLabel: `${h.label}-${y.label}`, border: o, choiceStyle: { background: "transparent", border: "none", marginBottom: "0", padding: "0" }, error: !1, id: `${h.id}-${y.value}`, isRadio: !0, isSelected: r[h.id] === y.value, onUserInputChanged: () => t(h.id, y.value), useMobileStyling: i }) }, y.value)) })] }))] }) }), (m || p) && a("button", { className: p && !m ? "ul-matrix-scroll-arrow left" : "ul-matrix-scroll-arrow", onClick: p && !m ? (h) => {
1292
+ h.preventDefault();
1293
+ const y = u.current;
1294
+ if (y) {
1295
+ const _ = getComputedStyle(y).direction === "rtl";
1296
+ y.scrollTo({ left: _ ? y.scrollWidth - y.clientWidth : 0, behavior: "smooth" });
1297
+ }
1298
+ } : (h) => {
1299
+ h.preventDefault();
1300
+ const y = u.current;
1301
+ if (y) {
1302
+ const _ = getComputedStyle(y).direction === "rtl";
1303
+ y.scrollTo({ left: _ ? y.clientWidth - y.scrollWidth : y.scrollWidth, behavior: "smooth" });
1304
+ }
1305
+ }, children: a(p && !m ? li : di, {}) })] });
1306
+ }, li = () => a("svg", { fill: "currentColor", height: "32", transform: "matrix(-1,0,0,1,0,0)", version: "1.1", viewBox: "0 0 256 256", width: "32", xmlns: "http://www.w3.org/2000/svg", children: a("path", { d: "M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z" }) }), di = () => a("svg", { fill: "currentColor", height: "32", viewBox: "0 0 256 256", width: "32", xmlns: "http://www.w3.org/2000/svg", children: a("path", { d: "M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z" }) }), ci = ({ className: e, message: t, next: n, options: r, properties: o, questionId: i, type: s, showIndividualSubmit: d = !1, onSubmitButtonClick: l }) => {
1307
+ const { useMobileStyling: u, isLongFormSurvey: m, focusedQuestionId: c, setFocusedQuestionId: p } = B((g) => ({ useMobileStyling: g.useMobileStyling, isLongFormSurvey: re(g.studyType), focusedQuestionId: g.focusedQuestionId, setFocusedQuestionId: g.setFocusedQuestionId })), v = o.matrixColumn, h = o.required, y = m && c === i, _ = (g) => {
1308
+ g.preventDefault(), g.stopPropagation(), n({ value: x, questionId: i, type: s }, !0), l && l();
1309
+ }, k = r.reduce((g, N) => (g[N.id] = null, g), {}), [x, L] = V(k), I = (g) => h && Object.values(g).every((N) => N == null), w = (g, N) => {
1310
+ m && n({ value: { ...x, [g]: N }, questionId: i, type: s }, !I({ ...x, [g]: N })), L((T) => ({ ...T, [g]: N }));
1311
+ }, S = o.displayMatrixAsAccordion || u;
1312
+ return a("form", { className: H(e, !m && "ul-card__matrix", "fade-in-transition", m && !y && "ul-card--unfocused"), id: "text-form", onClick: () => {
1313
+ y && p(i);
1314
+ }, onSubmit: _, children: [a(se, { message: t, properties: o }), a(pe, { properties: o, defaultBody: () => a(Z, { children: [a(me, { children: [a(S ? si : ai, { columns: v, onSelect: w, options: r, selectedOptions: x }), d && a(Xe, { handleSubmit: _, isSubmitDisabled: I(x) })] }), !m && a(_e, { children: a("div", { className: "ul-card__button-wrapper", children: a(X, { disabled: I(x), children: xe(o) }) }) })] }) })] }, i);
1315
+ }, ui = ({ options: e, selectItem: t, selectedOptions: n, showCheckbox: r }) => {
1316
+ const { themeColor: o } = B((i) => ({ doc: i.viewDocument, themeColor: i.border }));
1317
+ return a("div", { className: "select-list", children: e.map((i) => {
1318
+ return a("div", { className: "select-option", onClick: (d) => {
1319
+ t(i), d.stopPropagation();
1320
+ }, role: "option", children: [r && a(Dr, { divId: (s = i.id, `checkbox-div-${s}`), id: i.id, isSelected: n.includes(i), themeColor: o }), i.label] }, i.id);
1321
+ var s;
1322
+ }) });
1323
+ }, pi = ({ isMultiSelect: e = !1, multiselectText: t = "choices selected", onChange: n, options: r, placeholderText: o, value: i }) => {
1324
+ const [s, d] = V(!1), { viewDocument: l, update: u } = B((p) => ({ viewDocument: p.viewDocument, update: p.update })), m = () => {
1325
+ d(!s), u();
1326
+ };
1327
+ Q(() => {
1328
+ var v;
1329
+ const p = () => {
1330
+ d(!1), u();
1331
+ };
1332
+ l.addEventListener("click", p);
1333
+ try {
1334
+ (v = window.parent) == null || v.addEventListener("click", p);
1335
+ } catch {
1336
+ window.addEventListener("click", p);
1337
+ }
1338
+ return () => {
1339
+ var h;
1340
+ l.removeEventListener("click", p);
1341
+ try {
1342
+ (h = window.parent) == null || h.removeEventListener("click", p);
1343
+ } catch {
1344
+ window.removeEventListener("click", p);
1345
+ }
1346
+ };
1347
+ }, [l, u]);
1348
+ const c = i.length === 0 ? ["select-button-placeholder"] : [];
1349
+ return a(Z, { children: [a("button", { "aria-label": "choice dropdown button", className: H("select-button", ...c), onClick: (p) => {
1350
+ p.stopPropagation(), m();
1351
+ }, type: "button", children: [a("span", { children: i.length === 0 ? o : i.length === 1 ? i[0].label : `${i.length} ${t}` }), a(Tr, {})] }), s && a(ui, { options: r, selectedOptions: i, selectItem: (p) => {
1352
+ var y;
1353
+ const v = i.some((_) => _.id === p.id), h = i.some((_) => {
1354
+ var k;
1355
+ return (k = _.optionProperties) == null ? void 0 : k.noneOfTheAbove;
1356
+ });
1357
+ (y = p.optionProperties) != null && y.noneOfTheAbove && !v ? n([p]) : e ? n(v ? i.filter((_) => _.id !== p.id) : h ? [p] : [...i, p]) : v || n([p]), e || m();
1358
+ }, showCheckbox: e })] });
1359
+ }, qr = ({ className: e, message: t, onSubmit: n, options: r = [], properties: o, questionId: i, type: s, showIndividualSubmit: d = !1, onSubmitButtonClick: l }) => {
1360
+ const { border: u, useMobileStyling: m, isLongFormSurvey: c, focusedQuestionId: p, setFocusedQuestionId: v } = B((f) => ({ border: f.border, useMobileStyling: f.useMobileStyling, isLongFormSurvey: re(f.studyType), focusedQuestionId: f.focusedQuestionId, setFocusedQuestionId: f.setFocusedQuestionId })), h = c && p === i, y = r.reduce((f, b) => (f[b.id] = { isSelected: !1 }, f), {}), [_, k] = V(y), x = s === "multiplechoice", L = o.required, I = r.find((f) => {
1361
+ var b;
1362
+ return (b = f.optionProperties) == null ? void 0 : b.noneOfTheAbove;
1363
+ }), w = (f) => ((b) => Object.entries(b).some(([j, D]) => {
1364
+ var R;
1365
+ const E = r.find((M) => `${M.id}` === j), q = D.userText === void 0 || D.userText.trim() === "";
1366
+ return ((R = E == null ? void 0 : E.optionProperties) == null ? void 0 : R.allowsTextEntry) && q && D.isSelected;
1367
+ }))(f) || L && !((b) => Object.values(b).some((j) => j.isSelected))(f), S = Object.entries(_).some(([f, b]) => {
1368
+ var j, D;
1369
+ return b.isSelected && ((D = (j = r.find((E) => `${E.id}` === f)) == null ? void 0 : j.optionProperties) == null ? void 0 : D.allowsTextEntry);
1370
+ }), g = d && (!x || S), N = r.map(({ id: f, label: b, value: j, optionProperties: D }) => {
1371
+ var M, z;
1372
+ const E = `${f}`, { allowsTextEntry: q, noneOfTheAbove: R } = { allowsTextEntry: !1, noneOfTheAbove: !1, ...D };
1373
+ return a(et, { allowTextEntry: q, border: u, error: !1, id: E, isRadio: x, isSelected: !!((M = _[E]) != null && M.isSelected), label: b, noneOfTheAbove: R, onUserInputChanged: (U) => {
1374
+ C(U.id, U.selected, U.userText, U.noneOfTheAbove), U.selected && c && !x && !h && v(i);
1375
+ }, promptText: "Please specify", text: (z = _[f]) == null ? void 0 : z.userText, useMobileStyling: m, value: j }, E);
1376
+ }), T = (f) => {
1377
+ f.preventDefault(), f.stopPropagation(), n(_, !0), l && l();
1378
+ }, C = (f, b, j, D) => {
1379
+ const E = Object.assign({}, _);
1380
+ if ((x || D) && b) for (const M of Object.values(E)) M.isSelected = !1, delete M.userText;
1381
+ else I && !D && _[I.id].isSelected && (E[I.id].isSelected = !1);
1382
+ E[f] = { isSelected: b, userText: j };
1383
+ const q = x && Object.entries(E).some(([M, z]) => {
1384
+ var U, F;
1385
+ return z.isSelected && ((F = (U = r.find((te) => `${te.id}` === M)) == null ? void 0 : U.optionProperties) == null ? void 0 : F.allowsTextEntry);
1386
+ }), R = !w(E);
1387
+ c && (n(E, R), x && !q && R && l && l()), k(E);
1388
+ };
1389
+ return a("form", { className: H(e, "ul-card--multiple", "fade-in-transition", c && !h && "ul-card--unfocused"), id: "text-form", onClick: s === "multipleselect" ? () => {
1390
+ c && p !== i && s === "multipleselect" && v(i);
1391
+ } : void 0, onSubmit: T, children: [a(se, { message: t, properties: o }), a(pe, { properties: o, defaultBody: () => a(Z, { children: [a(me, { children: [o.isDropdown ? a(pi, { isMultiSelect: !x, multiselectText: o.dropdownMultiselectedText ?? "choices selected", onChange: (f) => {
1392
+ const b = { ..._ };
1393
+ for (const j of r) f.includes(j) ? b[j.id].isSelected = !0 : b[j.id].isSelected = !1;
1394
+ c && n(b, !w(b)), k(b);
1395
+ }, options: r, placeholderText: o.dropdownPlaceholderText ?? (x ? "Select choice" : "Select choice(s)"), value: r.filter((f) => _[f.id].isSelected) }) : a("div", { className: H(Y("ul-card__choices", m)), role: x ? "radiogroup" : "group", children: N }), g && a(Xe, { handleSubmit: T, isSubmitDisabled: w(_) })] }), !c && a(_e, { children: a("div", { className: "ul-card__button-wrapper", children: a(X, { disabled: w(_), onClick: T, children: xe(o) }) }) })] }) })] }, i);
1396
+ }, mi = (e) => {
1397
+ const { questionId: t, type: n, next: r, options: o } = e, { setFocusedQuestionId: i } = B((s) => ({ setFocusedQuestionId: s.setFocusedQuestionId }));
1398
+ return a(qr, { ...e, onSubmit: (s, d) => {
1399
+ var v;
1400
+ const l = Object.entries(s).find(([, h]) => h.isSelected) || [void 0, void 0], [u, m] = l, c = o.find((h) => `${h.id}` === u);
1401
+ !((v = c == null ? void 0 : c.optionProperties) != null && v.allowsTextEntry) || m != null && m.userText && m.userText.trim() !== "" || i(t);
1402
+ const p = m != null && m.userText ? { [u]: { userText: m.userText } } : null;
1403
+ r({ value: c && u ? { [u]: c.value } : {}, secondaryValue: p, questionId: t, type: n }, d);
1404
+ } });
1405
+ }, hi = (e) => {
1406
+ const { questionId: t, type: n, next: r } = e;
1407
+ return a(qr, { ...e, onSubmit: (o, i) => {
1408
+ const s = Object.entries(o).reduce((l, [u, m]) => (l[u] = m.isSelected, l), {}), d = Object.entries(o).reduce((l, [u, m]) => {
1409
+ if (!m.userText) return l;
1410
+ const c = l || {};
1411
+ return c[u] = { userText: m.userText }, c;
1412
+ }, null);
1413
+ r({ value: s, secondaryValue: d, questionId: t, type: n }, i);
1414
+ } });
1415
+ }, gi = ({ className: e, labels: t, message: n, properties: r, next: o, questionId: i, type: s }) => {
1416
+ const [d, l] = V(null), { border: u, useMobileStyling: m, viewDocument: c, isLongFormSurvey: p, focusedQuestionId: v } = B((L) => ({ border: L.border, useMobileStyling: L.useMobileStyling, viewDocument: L.viewDocument, isLongFormSurvey: re(L.studyType), focusedQuestionId: L.focusedQuestionId })), h = p && v === i, y = t && t.left, _ = t && t.right, k = [...Array(11)].map((L, I) => a("button", { className: H(Y("nps-number", m), Y(`nps-number-${I}`, m)), id: `option-${I}`, onClick: (w) => {
1417
+ p && (w.preventDefault(), w.stopPropagation(), l(I)), o({ value: I, questionId: i, type: s }, !0);
1418
+ }, onKeyDown: (w) => {
1419
+ var g, N;
1420
+ const S = c.querySelectorAll("button.nps-number");
1421
+ w.key === "ArrowRight" ? (g = S[I + 1]) == null || g.focus() : w.key === "ArrowLeft" ? (N = S[I - 1]) == null || N.focus() : w.key !== "Enter" && w.key !== " " || (p && (w.preventDefault(), w.stopPropagation(), l(I)), o({ value: I, questionId: i, type: s }, !0));
1422
+ }, onPointerDown: (w) => {
1423
+ w.currentTarget.style.zIndex = "2", w.currentTarget.style.borderColor = u;
1424
+ }, onPointerLeave: (w) => {
1425
+ w.currentTarget.style.zIndex = "auto", w.currentTarget.style.borderColor = Et;
1426
+ }, style: d === I ? { backgroundColor: u, color: "#fff" } : void 0, tabIndex: 0, children: I }, I)), x = (L) => {
1427
+ L.preventDefault(), L.stopPropagation(), o({ value: null, questionId: i, type: s }, !0);
1428
+ };
1429
+ return a("form", { className: H(e, "ul-card--nps", "fade-in-transition", p && !h && "ul-card--unfocused"), children: [a(se, { message: n, properties: r }), a(pe, { properties: r, defaultBody: () => a(Z, { children: [a(me, { children: [a("div", { className: "ul-card--nps__numbers", children: k }), a("div", { className: "ul-card--nps__labels", children: [a("span", { children: y }), a("span", { children: _ })] })] }), !r.required && !p && a(_e, { children: a("div", { className: "ul-vertical-centered-container", children: a(X, { onClick: x, children: xe(r) }) }) })] }) })] }, i);
1430
+ }, fi = ({ className: e, message: t, next: n, properties: r, questionId: o, type: i, showIndividualSubmit: s = !1, onSubmitButtonClick: d }) => {
1431
+ const { border: l, useMobileStyling: u, update: m, isLongFormSurvey: c, focusedQuestionId: p, setFocusedQuestionId: v, isPreview: h } = B((f) => ({ border: f.border, useMobileStyling: f.useMobileStyling, update: f.update, isLongFormSurvey: re(f.studyType), focusedQuestionId: f.focusedQuestionId, setFocusedQuestionId: f.setFocusedQuestionId, isPreview: f.isPreview })), [y, _] = V(""), k = J(null), x = c && p === o;
1432
+ Q(() => {
1433
+ var f, b;
1434
+ c && !h && (x ? (f = k.current) == null || f.focus() : (b = k.current) == null || b.blur());
1435
+ }, [c, x, h]);
1436
+ const L = y.trim(), I = r.required === !0 && !L, w = Pr(k, () => m()), S = (f) => {
1437
+ const { value: b } = f.currentTarget;
1438
+ if (w(), f.preventDefault(), f.stopPropagation(), _(b), c) {
1439
+ const j = b.trim().length > 0;
1440
+ n({ value: b, questionId: o, type: i }, j);
1441
+ }
1442
+ }, g = (f) => {
1443
+ f.preventDefault(), f.stopPropagation(), n({ value: y, questionId: o, type: i }, L.length > 0), d && d();
1444
+ }, N = r && r.openTextPlaceholder ? r.openTextPlaceholder : "", T = (f) => {
1445
+ f.currentTarget.style.borderColor = l, v(o);
1446
+ }, C = (f) => {
1447
+ f.currentTarget.style.borderColor = Et;
1448
+ };
1449
+ return a("form", { className: H(e, "ul-card-text", "fade-in-transition", c && !x && "ul-card--unfocused"), id: "text-form", onClick: () => {
1450
+ c && p !== o && v(o);
1451
+ }, children: [a(se, { message: t, properties: r }), a(pe, { defaultBody: () => a("div", { className: "ul-card-text", children: [a(me, { children: [a("div", { className: "ul-card-text__container", children: a("textarea", { "aria-describedby": "ul-caption", "aria-labelledby": "ul-question", "aria-multiline": "true", "aria-placeholder": N, className: H(Y("ul-card-text__input", u)), "data-gramm": "false", maxLength: 5e3, name: "text", onBlur: C, onChange: S, onFocus: T, placeholder: N, ref: k, role: "textbox", tabIndex: 0 }) }), s && a(Xe, { handleSubmit: g, isSubmitDisabled: I })] }), !c && a(_e, { children: [a(X, { disabled: I, onClick: g, children: xe(r) }), r.footerHtml && a("div", { className: "footer", dangerouslySetInnerHTML: { __html: r.footerHtml } })] })] }), properties: r })] }, o);
1452
+ }, vi = ({ className: e, labels: t, message: n, next: r, properties: o, questionId: i, type: s, onSubmitButtonClick: d, options: l, showIndividualSubmit: u = !1 }) => {
1453
+ const m = J(null), [c, p] = V(() => (o == null ? void 0 : o.required) === !0), [v, h] = V(() => l.map((D) => ({ ...D, rank: null }))), y = ue(() => Array.from({ length: l.length }, (D, E) => E + 1), [l.length]), { isLongFormSurvey: _, focusedQuestionId: k, setFocusedQuestionId: x } = B((D) => ({ useMobileStyling: D.useMobileStyling, border: D.border, isLongFormSurvey: re(D.studyType), focusedQuestionId: D.focusedQuestionId, setFocusedQuestionId: D.setFocusedQuestionId })), L = _ && k === i, I = (D) => {
1454
+ D.preventDefault(), S(v), d && d();
1455
+ }, w = (D) => {
1456
+ D.preventDefault(), D.dataTransfer && (D.dataTransfer.dropEffect = "move");
1457
+ }, S = (D) => {
1458
+ const E = {};
1459
+ D.reduce((q, R) => (q[R.id] = R.rank, q), E), r({ value: E, questionId: i, type: s }, !0);
1460
+ }, g = (D) => {
1461
+ p(!1), _ && S(D);
1462
+ }, { left: N, right: T } = t, C = l.length, f = (D) => {
1463
+ D.preventDefault(), D.currentTarget.classList.add("is-drop-target");
1464
+ }, b = (D) => {
1465
+ D.currentTarget.classList.remove("is-drop-target");
1466
+ }, j = (D) => {
1467
+ m.current = null, D.currentTarget.classList.remove("is-dragging");
1468
+ };
1469
+ return a("form", { className: H(e, "ul-card-rank", "fade-in-transition", _ && !L && "ul-card--unfocused"), onClick: () => {
1470
+ _ && k !== i && x(i);
1471
+ }, onSubmit: I, children: [a(se, { message: n, properties: o }), a(pe, { properties: o, defaultBody: () => a(Z, { children: [a(me, { children: [a("div", { className: "ul-card--rank__question-inner-container", children: [a("div", { className: "ul-card-rank__labels", children: a("span", { children: ["1 - ", N] }) }), a("ol", { className: "ul-card-rank__list", onDragOver: w, children: v.map(({ id: D, label: E, rank: q }, R) => {
1472
+ return a("li", { className: "ul-card-rank__option", draggable: !0, onDragEnd: j, onDragEnter: f, onDragLeave: b, onDragStart: (z = R, (U) => {
1473
+ m.current = z, U.dataTransfer && (U.dataTransfer.effectAllowed = "move", U.dataTransfer.setData("text/plain", String(z)), U.currentTarget.classList.add("is-dragging"));
1474
+ }), onDrop: (M = R, (U) => {
1475
+ var te, ne;
1476
+ U.preventDefault(), U.currentTarget.classList.remove("is-drop-target");
1477
+ const F = m.current;
1478
+ m.current = null, (ne = (te = U.currentTarget.closest(".ul-card-rank__list")) == null ? void 0 : te.querySelector(".is-dragging")) == null || ne.classList.remove("is-dragging"), F != null && F !== M && h((K) => {
1479
+ const G = K.map((be) => ({ ...be })), [De] = G.splice(F, 1);
1480
+ return G.splice(M, 0, De), G.forEach((be, W) => {
1481
+ be.rank = W + 1;
1482
+ }), g(G), G;
1483
+ });
1484
+ }), children: [a("select", { "aria-label": `Rank for ${E}`, className: H("ul-card-rank__select", q == null && "ul-card-rank__select--placeholder"), name: `rank[${D}]`, onChange: (U) => ((F, te) => {
1485
+ h((ne) => {
1486
+ const K = parseInt(te), G = ne.map((W) => ({ ...W }));
1487
+ G.some((W) => W.rank == null) && G.forEach((W, rt) => W.rank = rt + 1);
1488
+ const De = G.findIndex((W) => W.id === F);
1489
+ if (De === -1) return ne;
1490
+ const be = G[De].rank;
1491
+ return K < be ? G.forEach((W) => {
1492
+ W.id !== F && W.rank >= K && W.rank < be && (W.rank = W.rank + 1);
1493
+ }) : K > be && G.forEach((W) => {
1494
+ W.id !== F && W.rank > be && W.rank <= K && (W.rank = W.rank - 1);
1495
+ }), G[De].rank = K, G.sort((W, rt) => W.rank - rt.rank), g(G), G;
1496
+ });
1497
+ })(D, U.currentTarget.value), value: q ?? "", children: [q == null && a("option", { className: "ul-card-rank__select-option", disabled: !0, value: "", children: "-" }), y.map((U) => a("option", { className: "ul-card-rank__select-option", value: U, children: U }, U))] }), a("span", { children: E }), a("button", { "aria-label": `Drag ${E} to reorder`, className: "ul-card-rank__drag-btn", title: "Drag to reorder", type: "button", children: a("svg", { fill: "none", height: "17", viewBox: "0 0 16 17", width: "16", xmlns: "http://www.w3.org/2000/svg", children: a("path", { d: "M5.75 11.625C6.37132 11.625 6.875 12.1287 6.875 12.75C6.875 13.3713 6.37132 13.875 5.75 13.875C5.12868 13.875 4.625 13.3713 4.625 12.75C4.625 12.1287 5.12868 11.625 5.75 11.625ZM10.25 11.625C10.8713 11.625 11.375 12.1287 11.375 12.75C11.375 13.3713 10.8713 13.875 10.25 13.875C9.62868 13.875 9.125 13.3713 9.125 12.75C9.125 12.1287 9.62868 11.625 10.25 11.625ZM5.75 7.375C6.37132 7.375 6.875 7.87868 6.875 8.5C6.875 9.12132 6.37132 9.625 5.75 9.625C5.12868 9.625 4.625 9.12132 4.625 8.5C4.625 7.87868 5.12868 7.375 5.75 7.375ZM10.25 7.375C10.8713 7.375 11.375 7.87868 11.375 8.5C11.375 9.12132 10.8713 9.625 10.25 9.625C9.62868 9.625 9.125 9.12132 9.125 8.5C9.125 7.87868 9.62868 7.375 10.25 7.375ZM5.75 3.125C6.37132 3.125 6.875 3.62868 6.875 4.25C6.875 4.87132 6.37132 5.375 5.75 5.375C5.12868 5.375 4.625 4.87132 4.625 4.25C4.625 3.62868 5.12868 3.125 5.75 3.125ZM10.25 3.125C10.8713 3.125 11.375 3.62868 11.375 4.25C11.375 4.87132 10.8713 5.375 10.25 5.375C9.62868 5.375 9.125 4.87132 9.125 4.25C9.125 3.62868 9.62868 3.125 10.25 3.125Z", fill: "currentColor" }) }) })] }, D);
1498
+ var M, z;
1499
+ }) }), a("div", { className: "ul-card-rank__labels", children: a("span", { children: [C, " - ", T] }) })] }), u && a(Xe, { handleSubmit: I, isSubmitDisabled: c })] }), !_ && a(_e, { children: a("div", { className: "ul-card__button-wrapper", children: a(X, { disabled: c, children: xe(o) }) }) })] }) })] }, i);
1500
+ }, _i = /* @__PURE__ */ new Set(["open", "matrix", "multipleselect", "multiplechoice", "rankorder"]), Sn = ({ cardInstance: e, moveToNextQuestion: t, showIndividualSubmit: n, submitQuestion: r, updateCardValues: o }) => {
1501
+ const { isLongFormSurvey: i } = B((p) => ({ isLongFormSurvey: re(p.studyType) }));
1502
+ if (!e) return null;
1503
+ const { name: s, type: d, props: l } = e, u = n && _i.has(d), m = { className: "ul-card", next: (p, v) => r(p, v), questionId: s, type: d, showIndividualSubmit: n, ...u ? { next: (p, v) => {
1504
+ o(p.questionId, p, v ?? !0);
1505
+ }, onSubmitButtonClick: () => t(s) } : {} }, c = (() => {
1506
+ switch (d) {
1507
+ case "consentlegal":
1508
+ return a(ti, { ...m, ...l });
1509
+ case "likert":
1510
+ return a(oi, { ...m, ...l });
1511
+ case "matrix":
1512
+ return a(ci, { ...m, ...l });
1513
+ case "multiplechoice":
1514
+ return a(mi, { ...m, ...l });
1515
+ case "multipleselect":
1516
+ return a(hi, { ...m, ...l });
1517
+ case "nps":
1518
+ return a(gi, { ...m, ...l });
1519
+ case "open":
1520
+ return a(fi, { ...m, ...l });
1521
+ case "rankorder":
1522
+ return a(vi, { ...m, ...l });
1523
+ case "recordedtask":
1524
+ return a(Ti, { ...m, ...l });
1525
+ case "texturlprompt":
1526
+ return a(Ni, { ...m, ...l });
1527
+ case "thanks":
1528
+ return a(Di, { ...m, ...l });
1529
+ case "uploading":
1530
+ return a(qi, { ...m, ...l });
1531
+ case "videovoice":
1532
+ return a(Bi, { ...m, ...l });
1533
+ default:
1534
+ return null;
1535
+ }
1536
+ })();
1537
+ return c ? i ? a("div", { className: "ul-card-scroll-wrapper", children: c }, s) : c : null;
1538
+ }, bi = ({ isSubmitDisabled: e = !1, onSubmit: t, buttonText: n }) => {
1539
+ var v;
1540
+ const { cards: r, forceBrandedLogo: o, index: i, marketingUrl: s, showSurveyBrand: d, slugName: l, surveyId: u, useMobileStyling: m } = B((h) => ({ cards: h.cards, forceBrandedLogo: h.forceBrandedLogo, index: h.index, marketingUrl: h.marketingUrl, showSurveyBrand: h.showSurveyBrand, slugName: h.slugName, surveyId: h.surveyId, useMobileStyling: h.useMobileStyling })), c = ((v = r[i]) == null ? void 0 : v.type) === "thanks", p = Hr({ marketingUrl: s, slugName: l, surveyId: u, forceBrandedLogo: o });
1541
+ return a("footer", { className: H("long-form-question-footer-container", m && "long-form-question-footer-container--mobile", c && "long-form-question-footer-container-center"), children: [c && o ? a(Ur, { marketingUrlLink: p }) : a("div", { className: "long-form-question-footer-container-logo", children: d ? a(Or, { forceBrandedLogo: o, marketingUrlLink: p }) : null }), !c && a("div", { className: H("ul-card__button-wrapper", "ul-card-vertical__button-wrapper", "long-form-question-footer-container-actions"), children: a(X, { className: H("long-form-button", e && "sprig-button-disabled"), disabled: e, onClick: t, children: a("span", { className: "long-form-button-text-container", children: n ?? a(Ut, { stroke: "white" }) }) }) })] });
1542
+ }, yi = ({ cards: e, next: t }) => {
1543
+ var S;
1544
+ const [n, r] = V({}), [o, i] = V({}), { isLongFormSurvey: s, focusedQuestionId: d, setFocusedQuestionId: l } = B((g) => ({ isLongFormSurvey: re(g.studyType), focusedQuestionId: g.focusedQuestionId, setFocusedQuestionId: g.setFocusedQuestionId })), u = J(null), m = J(!1), c = J(null), p = Se((g) => {
1545
+ var f, b;
1546
+ m.current = !0;
1547
+ const N = e.findIndex((j) => j.name === g);
1548
+ if (!s || g === null || N === -1) return void (m.current = !1);
1549
+ const T = (f = u.current) == null ? void 0 : f.querySelectorAll(".ul-card-scroll-wrapper")[N], C = (b = u.current) == null ? void 0 : b.closest(".ul-card__container");
1550
+ if (T && C) {
1551
+ if (T && C) {
1552
+ const j = T.getBoundingClientRect(), D = C.getBoundingClientRect(), E = j.top - D.top + C.scrollTop, q = E + j.height / 2, R = window.innerHeight - 157;
1553
+ let M;
1554
+ j.height >= R ? M = E : M = q - C.clientHeight / 2;
1555
+ const z = C.clientHeight, U = C.scrollHeight - z, F = Math.max(0, Math.min(M, U));
1556
+ C.scrollTo({ top: F, behavior: "smooth" }), setTimeout(() => {
1557
+ m.current = !1;
1558
+ }, 500);
1559
+ }
1560
+ } else m.current = !1;
1561
+ }, [s, e]);
1562
+ function v(g, N) {
1563
+ return g.map((T) => N[T.name]);
1564
+ }
1565
+ Q(() => {
1566
+ d !== null && e.findIndex((g) => g.name === d) !== -1 || l(e[0].name);
1567
+ }, [e, d, l]);
1568
+ const h = (g) => {
1569
+ if (!s) return;
1570
+ const N = e.findIndex((T) => T.name === g) + 1;
1571
+ if (N < e.length) {
1572
+ const T = e[N].name;
1573
+ l(T);
1574
+ } else l(g);
1575
+ };
1576
+ Q(() => {
1577
+ s && d !== null && (c.current !== d ? p(d) : c.current = null);
1578
+ }, [d, s, p]);
1579
+ const y = Se(() => {
1580
+ var D, E;
1581
+ if (m.current) return;
1582
+ const g = (D = u.current) == null ? void 0 : D.closest(".ul-card__container");
1583
+ if (!g) return;
1584
+ const N = (E = u.current) == null ? void 0 : E.querySelectorAll(".ul-card-scroll-wrapper");
1585
+ if (!N || N.length === 0) return;
1586
+ const T = g.getBoundingClientRect(), C = T.top + T.height / 2;
1587
+ let f = 0, b = 1 / 0;
1588
+ N.forEach((q, R) => {
1589
+ const M = q.getBoundingClientRect(), z = M.top + M.height / 2, U = Math.abs(C - z);
1590
+ U < b && (b = U, f = R);
1591
+ });
1592
+ const j = e[f];
1593
+ c.current = j.name, l(j.name);
1594
+ }, [e, l]);
1595
+ Q(() => {
1596
+ var N;
1597
+ if (!s) return;
1598
+ const g = ((N = u.current) == null ? void 0 : N.closest(".ul-card__container")) || null;
1599
+ return g && g.addEventListener("scroll", y, { passive: !0 }), () => {
1600
+ g && g.removeEventListener("scroll", y);
1601
+ };
1602
+ }, [y, s]);
1603
+ const _ = ue(() => Object.values(o).every((g) => g), [o]), k = async (g, N, T) => {
1604
+ return i((f) => ({ ...f, [g]: T })), await (C = (f) => ({ ...f, [g]: N }), new Promise((f) => {
1605
+ r((b) => {
1606
+ const j = C(b);
1607
+ return f(j), j;
1608
+ });
1609
+ }));
1610
+ var C;
1611
+ };
1612
+ Q(() => {
1613
+ if (!s) return;
1614
+ const g = {};
1615
+ e.forEach((N) => {
1616
+ var C, f;
1617
+ const T = N;
1618
+ (f = (C = T.props) == null ? void 0 : C.properties) != null && f.required || (g[T.name] = { value: null, questionId: T.name, type: T.type });
1619
+ }), r(g), i({});
1620
+ }, [e, s]);
1621
+ const x = async (g, N) => {
1622
+ if (s) {
1623
+ const T = await k(g.questionId, g, N), C = L(g.type), f = I(g.type);
1624
+ if (C && h(g.questionId), f && N) {
1625
+ const b = v(e, T);
1626
+ t(b);
1627
+ }
1628
+ } else t([g]);
1629
+ }, L = (g) => (/* @__PURE__ */ new Set(["nps", "likert", "multiplechoice"])).has(g), I = (g) => (/* @__PURE__ */ new Set(["videovoice", "consentlegal", "texturlprompt"])).has(g), w = ((S = e[0]) == null ? void 0 : S.type) === "thanks";
1630
+ return s ? a("div", { className: "ul-card-list-container--longform", ref: u, children: [e.map((g, N) => a(Sn, { cardInstance: g, moveToNextQuestion: h, showIndividualSubmit: s && e.length > 1 && N < e.length - 1, submitQuestion: x, updateCardValues: k }, (g == null ? void 0 : g.name) || N)), !w && a(bi, { isSubmitDisabled: Object.keys(n).length < e.length || !_, onSubmit: function() {
1631
+ const g = v(e, n);
1632
+ t(g);
1633
+ } })] }) : a(Z, { children: e.map((g, N) => a(Sn, { cardInstance: g, moveToNextQuestion: h, showIndividualSubmit: s && e.length > 1 && N < e.length - 1, submitQuestion: x, updateCardValues: k }, (g == null ? void 0 : g.name) || N)) });
1634
+ }, kt = 1, Ar = 2, Fr = 3, Ke = (e) => e.type === "av_permission", En = (e) => e.type === "screen_permission", Vr = (e, t) => e === void 0 ? kt : e ? ((n, r) => !(Ke(r) ? r.permissionDescriptors : []).includes("camera") || n.getVideoTracks().length > 0)(e, t) ? Fr : kt : Ar, In = { avStream: null, currentPage: null, mediaRecordingUids: null, nextQuestion: () => {
1635
+ }, passthroughData: void 0, recordingMediaTypes: void 0, screenPermissionRequested: !1, type: void 0 }, ce = Er((e) => ({ ...In, reset: () => {
1636
+ e(In);
1637
+ }, updatePage: (t) => {
1638
+ e(t);
1639
+ } }));
1640
+ function wt({ currentPage: e, pages: t }) {
1641
+ const { avStream: n, recordingMediaTypes: r, updatePage: o } = ce.getState(), { recorderEventEmitter: i } = B.getState();
1642
+ i.emit("av.permission", { "permission.descriptors": e.permissionDescriptors, "stream.ready": (s, d) => {
1643
+ if (n === s) return;
1644
+ let l = e;
1645
+ if (s && !e.permissionDescriptors.includes("camera")) {
1646
+ const u = t.indexOf(e), m = d != null && d.active ? u + 2 : u + 1;
1647
+ d != null && d.active && r && i.emit("begin.recording", { "recording.media.types": r, "start.recording.callback": (c) => o({ mediaRecordingUids: c }) }), l = t[m];
1648
+ }
1649
+ o({ currentPage: l, avStream: s });
1650
+ } });
1651
+ }
1652
+ function Ct({ status: e }) {
1653
+ const { nextQuestion: t, passthroughData: n, mediaRecordingUids: r, reset: o } = ce.getState(), { recorderEventEmitter: i, handleUploadUpdate: s, index: d } = B.getState(), l = { value: { taskStatus: e }, type: "recordedtask", questionId: (n == null ? void 0 : n.questionId) || 1 };
1654
+ n && i.emit("finish.task", { "begin.callback": (u) => {
1655
+ s({ mediaRecordingUid: u, isSubmitted: !0, progressPct: 0, isComplete: !1 });
1656
+ }, "progress.callback": (u, m) => {
1657
+ s({ mediaRecordingUid: u, progressPct: m.detail, isSubmitted: !1, isComplete: !1 });
1658
+ }, "upload.callback": (u) => {
1659
+ u && s({ mediaRecordingUid: u, isComplete: !0, isSubmitted: !0, progressPct: 100 });
1660
+ }, "passthrough.data": n, "current.index": d, "task.response": l, "task.complete.callback": (u) => {
1661
+ l.value.taskDurationMillisecond = u, r && (l.value.mediaRecordingUids = r), o(), t(l);
1662
+ } });
1663
+ }
1664
+ function Bt({ pages: e, setIsRequestingPermission: t }) {
1665
+ const { recorderEventEmitter: n, eventEmitFn: r } = B.getState(), { updatePage: o, currentPage: i, recordingMediaTypes: s, screenPermissionRequested: d } = ce.getState();
1666
+ if (!i) return;
1667
+ const l = e.indexOf(i);
1668
+ switch (i.type) {
1669
+ case "av_permission": {
1670
+ const u = d ? l + 2 : l + 1;
1671
+ return d && s && n.emit("begin.recording", { "recording.media.types": s, "start.recording.callback": (m) => {
1672
+ o({ mediaRecordingUids: m });
1673
+ } }), void o({ currentPage: e[u] });
1674
+ }
1675
+ case "screen_permission":
1676
+ return void n.emit("screen.permission", { "screen.permission.requested": t, "stream.ready.callback": (u, m) => {
1677
+ const c = m ? e[l + 1] : i;
1678
+ m && s && n.emit("begin.recording", { "recording.media.types": s, "start.recording.callback": (p) => {
1679
+ o({ captureStream: m, mediaRecordingUids: p });
1680
+ } }), o({ currentPage: c, screenPermissionRequested: !0, captureStream: m });
1681
+ } });
1682
+ case "start_task":
1683
+ return r("recorded.task.start"), n.emit("recorded.task.start"), n.emit("start.task"), void o({ currentPage: e[l + 1], screenPermissionRequested: !0 });
1684
+ case "complete_task":
1685
+ return;
1686
+ }
1687
+ }
1688
+ const zr = "ul-permission-graphics-container", $r = "ul-permission-body", Qr = H(zr, "ul_recorded-task-inset-spacing"), tt = H("ul-horizontal-button-container", "ul-horizontal-button-container-left"), Wr = ({ richTextBody: e }) => a("div", { className: "ul-rich-text-body", dangerouslySetInnerHTML: { __html: e }, id: "ul-task-detail-container" }), nt = ({ required: e, skipButtonText: t, bottom: n = !1 }) => e ? null : a(X, { className: H(n && "ul-skip-button-below", "ul-button-inactive"), onClick: Ct.bind(null, { status: "abandoned" }), children: t || "Skip" }), qt = (e) => {
1689
+ const { avStream: t, captureStream: n, recordingMediaTypes: r, updatePage: o } = ce.getState(), i = (r == null ? void 0 : r.includes("audio")) || (r == null ? void 0 : r.includes("video"));
1690
+ Q(() => {
1691
+ const s = setInterval(() => {
1692
+ i && t && !t.active ? o({ avStream: null, currentPage: e[0] }) : n && n.active || o({ captureStream: void 0, currentPage: e[i ? 1 : 0] });
1693
+ }, 1e3);
1694
+ return () => clearInterval(s);
1695
+ }, [t, n, i, e, r, o]);
1696
+ }, xi = ({ content: e, pages: t, required: n }) => {
1697
+ const { buttonText: r, skipButtonText: o, taskDetail: i } = e;
1698
+ return qt(t), a("div", { className: "ul-task-page", children: [i && a(Wr, { richTextBody: i }), a("div", { className: tt, children: [a(X, { onClick: Bt.bind(null, { pages: t }), children: r }), a(nt, { required: n, skipButtonText: o })] })] }, "start-task");
1699
+ }, ki = ({ content: e, pages: t, properties: n }) => {
1700
+ const { buttonText: r, skipButtonText: o } = e;
1701
+ qt(t);
1702
+ const i = a(pe, { properties: n, defaultBody: () => a("div", { className: tt, children: [a(X, { className: "ul-complete-task-button", onClick: Ct.bind(null, { status: "completed" }), children: r }), a(X, { className: H("ul-button-inactive"), onClick: Ct.bind(null, { status: "given.up" }), children: o })] }) });
1703
+ return a("div", { className: "ul-task-page", children: [e.taskDetail && a(Wr, { richTextBody: e.taskDetail }), i] }, "complete-task");
1704
+ }, wi = ({ content: e, pages: t, required: n }) => {
1705
+ const { buttonText: r, skipButtonText: o } = e, [i] = B((l) => [l.tabTitle]), [s, d] = V(!1);
1706
+ return a("div", { children: [a("div", { className: Qr, children: [a("p", { style: { marginTop: "auto" }, children: e.selectTabText }), a("div", { className: "ul-select-tab-container", children: a("p", { className: $r, children: i }) })] }), a("div", { className: n ? "" : tt, children: [a(X, { disabled: s, onClick: Bt.bind(null, { pages: t, setIsRequestingPermission: d }), children: r }), a(nt, { required: n, skipButtonText: o })] })] });
1707
+ }, Ci = ({ content: e }) => a("div", { className: H(zr, "ul_permission_svg_container", "ul_recorded-task-inset-spacing", "ul-center-horizontally"), dangerouslySetInnerHTML: { __html: e.svg } }, "ul-permission-request-graphic"), Si = ({ content: e, pages: t, required: n }) => {
1708
+ const { permissionDeniedHeadline: r, permissionDeniedBody: o, skipButtonText: i, tryAgainButtonText: s } = e, d = Ke(t[0]) ? t[0] : null;
1709
+ return Q(() => {
1710
+ const l = setInterval(() => {
1711
+ d !== null && wt({ currentPage: d, pages: t });
1712
+ }, 1e3);
1713
+ return () => clearInterval(l);
1714
+ }, [d, t]), d ? a("div", { children: [a("div", { className: Qr, children: a("p", { className: "ul-av-permission-denied-paragraph", children: [a("span", { className: "ul-av-permission-denied-headline", children: r }), a("span", { className: $r, children: o })] }) }), a("div", { className: tt, children: [a(X, { onClick: wt.bind(null, { currentPage: d, pages: t }), children: s }), a(nt, { required: n, skipButtonText: i })] })] }) : null;
1715
+ }, Ei = ({ stream: e }) => a("video", { autoPlay: !0, className: H("ul_recorded-task-inset-spacing"), id: "ul-record-task-video-preview", muted: !0, ref: (t) => {
1716
+ t && (t.srcObject = e || null);
1717
+ } }), Ii = ({ content: e, pages: t, required: n }) => {
1718
+ const { skipButtonText: r } = e, { avStream: o } = ce.getState();
1719
+ return qt(t), a("div", { children: [a(Ei, { stream: o }), a("div", { className: "ul-vertical-button-container-center", children: [a(X, { onClick: Bt.bind(null, { pages: t }), children: e.buttonText }), a(nt, { bottom: !0, required: n, skipButtonText: r })] })] });
1720
+ }, ji = ({ properties: e }) => {
1721
+ const { pages: t, required: n } = e, { avStream: r, currentPage: o } = ce.getState();
1722
+ if (o === void 0) return null;
1723
+ switch (o == null ? void 0 : o.type) {
1724
+ case "av_permission": {
1725
+ const i = Vr(r, o);
1726
+ return i === kt ? a(Ci, { content: o }) : a(i === Ar ? Si : Ii, { content: o, pages: t, required: n });
1727
+ }
1728
+ case "screen_permission":
1729
+ return a(wi, { content: o, pages: t, required: n });
1730
+ case "start_task":
1731
+ return a(xi, { content: o, pages: t, required: n });
1732
+ case "complete_task":
1733
+ return a(ki, { content: o, pages: t, properties: e });
1734
+ default:
1735
+ return null;
1736
+ }
1737
+ }, Ti = ({ className: e, properties: t, next: n, questionId: r }) => {
1738
+ const o = B(), { surveyId: i, responseGroupUid: s, userId: d } = o, l = ce(), { screenPermissionRequested: u } = l, m = ce((y) => y.avStream);
1739
+ let c = ce((y) => y.currentPage);
1740
+ c || (c = function({ pages: y, userId: _, responseGroupUid: k, surveyId: x, questionId: L, next: I }) {
1741
+ const { updatePage: w } = ce.getState(), { eventEmitFn: S, recorderEventEmitter: g } = B.getState(), N = { questionId: L, surveyId: x, visitorId: _, responseGroupUid: k };
1742
+ let T = 0;
1743
+ g.emit("recorded.task.permission.screen"), S("recorded.task.permission.screen"), g.emit("permission.status", { "permission.status.callback": (f, b, j, D) => {
1744
+ const E = y[T], { type: q } = E, R = ["screen"];
1745
+ if (Ke(E)) {
1746
+ const { permissionDescriptors: M } = E, z = M == null ? void 0 : M.includes("microphone"), U = M == null ? void 0 : M.includes("camera");
1747
+ z && R.push("audio"), U && R.push("video"), (f != null && f.active && !U || f != null && f.active && b) && T++;
1748
+ }
1749
+ En(y[T]) && j && (T++, g.emit("begin.recording", { "recording.media.types": R, "start.recording.callback": (M) => w({ mediaRecordingUids: M }) })), w({ currentPage: y[T], avStream: f, screenPermissionRequested: j, nextQuestion: I, type: q, passthroughData: N, recordingMediaTypes: R, captureStream: D });
1750
+ } });
1751
+ const C = y[T];
1752
+ return C.type === "av_permission" && wt({ currentPage: C, pages: y }), C;
1753
+ }({ questionId: r, surveyId: i, next: (y) => {
1754
+ n(y, !0);
1755
+ }, pages: t.pages, responseGroupUid: s, userId: d }));
1756
+ let p = c.headline, v = c.captionText;
1757
+ const h = Vr(m, c);
1758
+ return En(c) && u && (p = c.permissionDeniedHeadline, v = c.permissionDeniedCaptionText), Ke(c) && h === Fr && (p = c.permissionGrantedHeadline, v = c.permissionGrantedCaptionText), a("div", { className: H(e, "ul-center-horizontally", "fade-in-transition"), children: [a(se, { message: p, properties: { captionText: v } }), a(me, { children: a(ji, { properties: t }) })] });
1759
+ };
1760
+ var Zr = ((e) => (e.CONTINUE = "CONTINUE", e.EXTERNAL = "EXTERNAL", e.NO_BUTTON = "NO_BUTTON", e))(Zr || {});
1761
+ const Li = { "{{user_id}}": "externalUserId", "{{email}}": "email" }, Ni = ({ className: e, message: t, next: n, properties: r, questionId: o, type: i }) => {
1762
+ const { visitorAttributes: s, isLongFormSurvey: d } = B((h) => ({ visitorAttributes: h.visitorAttributes, isLongFormSurvey: re(h.studyType) })), l = (h, y = !1) => {
1763
+ n({ value: y ? { skipped: !0 } : void 0, questionId: o, type: i }, !0);
1764
+ }, u = (h) => {
1765
+ h.key !== "Enter" && h.key !== " " || n({ value: void 0, questionId: o, type: i }, !0);
1766
+ }, m = ((h, y = {}) => {
1767
+ if (!h) return h;
1768
+ try {
1769
+ /^https?:\/\//i.test(h) || (h = `http://${h}`);
1770
+ const I = new URL(h);
1771
+ if (!I.protocol || I.protocol !== "http:" && I.protocol !== "https:") return;
1772
+ } catch {
1773
+ return;
1774
+ }
1775
+ let _ = h;
1776
+ const k = [];
1777
+ for (const [I, w] of Object.entries(Li)) if (_.toLowerCase().includes(I)) if (y[w]) {
1778
+ const S = new RegExp(I, "gi");
1779
+ _ = _.replace(S, y[w]);
1780
+ } else k.push(I);
1781
+ if (k.length === 0 || !_.includes("?")) return _;
1782
+ const x = _.slice(0, _.indexOf("?")), L = _.slice(_.indexOf("?") + 1).split("&").map((I) => I.split("=")).filter((I) => !k.includes(I[1]));
1783
+ return L.length === 0 ? x : `${x}?${L.map((I) => I.join("=")).join("&")}`;
1784
+ })(r && r.buttonUrl, s), c = d && r.promptActionType === Zr.NO_BUTTON ? () => a(Z, {}) : () => a(_e, { children: a("div", { className: "ul-card-button-group", children: [a("a", { className: "ul-card-text__button ul-card__text-url-prompt-button", href: m, id: "ul-card-text__button", onClick: l, onKeyPress: u, rel: "noreferrer", role: m ? "link" : "button", tabIndex: 0, target: "_blank", children: xe(r) }), r.required === !1 && a("button", { className: "ul-card-skip__button", onClick: (h) => l(0, !0), children: Ht(r) })] }) });
1785
+ return a("div", { className: H(e, "ul-card__text-url-prompt", "fade-in-transition"), children: [a(se, { message: t, properties: { questionHtml: r.questionHtml } }), a(me, { children: (p = r == null ? void 0 : r.richTextBody, v = r == null ? void 0 : r.body, p ? a("div", { className: "ul-rich-text-body", dangerouslySetInnerHTML: { __html: p }, id: "ul-card__text-url-body-container" }) : v ? a("div", { className: "ul-rich-text-body", id: "ul-card__text-url-body-container", children: (v ? v.split(/\n\s*\n/g) : []).map((h, y) => a("p", { children: h }, y)) }) : null) }), a(pe, { defaultBody: c, properties: r })] }, o);
1786
+ var p, v;
1787
+ }, Di = ({ className: e, questionId: t }) => {
1788
+ const { border: n, destroy: r, endCard: o, forceBrandedLogo: i } = B((l) => ({ border: l.border, destroy: l.destroy, endCard: l.endCard, forceBrandedLogo: l.forceBrandedLogo }));
1789
+ Q(() => {
1790
+ setTimeout(() => {
1791
+ r(je);
1792
+ }, i ? 4e3 : 2e3);
1793
+ }, [r, i]);
1794
+ const s = o && o.subheader ? a("p", { className: "ul-caption", children: o.subheader }) : null, d = o && o.headline ? o.headline : "";
1795
+ return a("div", { className: H(e, "ul-card--thanks", "fade-in-transition"), children: a("div", { children: a("div", { className: "ul-card--thanks-content", children: [a("div", { className: "ul-thanks-check", children: a("svg", { "aria-labelledby": "title", fill: "none", height: "99", viewBox: "0 0 81 99", width: "81", xmlns: "http://www.w3.org/2000/svg", children: [a("path", { clipRule: "evenodd", d: "M40.5 77C60.9345 77 77.5 60.4345 77.5 40C77.5 19.5655 60.9345 3 40.5 3C20.0655 3 3.5 19.5655 3.5 40C3.5 60.4345 20.0655 77 40.5 77ZM80.5 40C80.5 62.0914 62.5914 80 40.5 80C18.4086 80 0.5 62.0914 0.5 40C0.5 17.9086 18.4086 0 40.5 0C62.5914 0 80.5 17.9086 80.5 40Z", fill: n, fillRule: "evenodd" }), a("path", { clipRule: "evenodd", d: "M55.025 22.9046C55.6299 23.4705 55.6616 24.4198 55.0956 25.0247C54.8724 25.2634 54.6109 25.5285 54.3157 25.8277C52.2547 27.9168 48.5549 31.667 44.8135 39.6658C43.2818 42.9406 42.0864 45.8386 41.0823 48.2729C40.6539 49.3116 40.2603 50.2659 39.8902 51.129C39.287 52.5359 38.7248 53.7508 38.1744 54.625C37.8997 55.0613 37.5806 55.4905 37.2017 55.8245C36.8201 56.1607 36.2613 56.5 35.5457 56.5C34.6742 56.5 34.0892 55.9692 33.7774 55.6083C33.4502 55.2296 33.1752 54.7511 32.9396 54.301C32.7305 53.9013 32.5088 53.4367 32.2797 52.9565C32.2429 52.8794 32.2059 52.8019 32.1688 52.7243C31.8942 52.1499 31.5959 51.534 31.2537 50.8868C29.8886 48.305 27.8539 45.2878 24.2343 43.1382C23.522 42.7152 23.2875 41.7949 23.7105 41.0826C24.1335 40.3703 25.0539 40.1358 25.7662 40.5588C30.0556 43.1062 32.4149 46.6647 33.9058 49.4845C34.2776 50.1876 34.5973 50.8487 34.8753 51.4302C34.9147 51.5124 34.9529 51.5926 34.9902 51.6707C35.2222 52.1567 35.4164 52.5637 35.5978 52.9102C35.6151 52.9434 35.6321 52.9754 35.6485 53.0061C36.0565 52.3531 36.5341 51.3434 37.133 49.9468C37.4781 49.1418 37.8572 48.2229 38.2761 47.2074C39.2886 44.7532 40.5339 41.7347 42.0961 38.3948C46.0591 29.9221 50.0641 25.8648 52.1535 23.7482C52.4423 23.4556 52.6944 23.2002 52.9048 22.9753C53.4708 22.3703 54.42 22.3387 55.025 22.9046ZM35.1994 53.5892C35.1994 53.5892 35.2 53.5888 35.2012 53.5879C35.2 53.5889 35.1994 53.5893 35.1994 53.5892ZM36.0666 53.6682C36.0732 53.674 36.0765 53.6775 36.0765 53.6777C36.0765 53.678 36.0732 53.6751 36.0666 53.6682Z", fill: n, fillRule: "evenodd" }), a("path", { d: "M69.5 97C69.5 98.1046 56.2924 99 40 99C23.7076 99 10.5 98.1046 10.5 97C10.5 95.8954 23.7076 95 40 95C56.2924 95 69.5 95.8954 69.5 97Z", fill: "black", fillOpacity: "0.2" })] }) }), a(se, { message: d }), s] }) }) }, t);
1796
+ }, Ce = "https://cdn.sprig.com", O = { document: void 0, videojs: void 0 }, At = (e) => e + "-loading-spiner", ee = "hidden", jn = ".m3u8", ct = "questionId", ut = "ul-video-recorder-camera-off-button", pt = "ul-recording-in-session", Pi = [{ type: "link", content: `${Ce}/dependencies/videojs-record-4.5.0.min.css` }, { type: "script", content: `${Ce}/dependencies/RecordRTC-5.6.2.js` }, { type: "script", content: `${Ce}/dependencies/adapter.8.0.0.min.js` }, { type: "script", content: `${Ce}/dependencies/videojs-record-4.5.0.min.js` }, { type: "script", content: `${Ce}/userleap-web-upchunk-v2.2.2.js` }], Gr = [{ type: "link", content: `${Ce}/dependencies/video-js-7.18.0.min.css` }, { type: "script", content: `${Ce}/dependencies/video-js-7.18.0.min.js` }, { type: "style", content: `/* progress control styles */
1797
+ .video-js .vjs-control {
1798
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
1799
+ }
1800
+
1801
+ .video-js .vjs-progress-control .vjs-progress-holder {
1802
+ margin: 0 0px;
1803
+ }
1804
+
1805
+ .video-js .vjs-progress-control {
1806
+ position: absolute;
1807
+ height: 3px;
1808
+ width: 100%;
1809
+ }
1810
+ /* position and align the buttons and button texts */
1811
+ .ul-control-panel {
1812
+ bottom: 0;
1813
+ width: 100%;
1814
+ flex-direction: column;
1815
+ background-color: white;
1816
+ height: fit-content;
1817
+ z-index: 2;
1818
+ }
1819
+
1820
+ .ul-buttons-panel {
1821
+ color: black;
1822
+ display: flex;
1823
+ gap: 20px;
1824
+ height: 50px;
1825
+ justify-content: center;
1826
+ margin: 10px;
1827
+ padding: 2px 14px 0;
1828
+ }
1829
+
1830
+ .video-js .vjs-volume-panel {
1831
+ height: 30px;
1832
+ width: 40px;
1833
+ }
1834
+
1835
+ .ul-inactive {
1836
+ opacity: 0.3;
1837
+ cursor: default;
1838
+ pointer-events: none;
1839
+ }
1840
+
1841
+ /* buttons */
1842
+ .ul-buttons-panel > .vjs-button {
1843
+ background-color: rgba(0, 0, 0, 0.05);
1844
+ border-radius: 50%;
1845
+ display: flex;
1846
+ height: 3em;
1847
+ justify-content: center;
1848
+ width: 3em;
1849
+ }
1850
+
1851
+ .vjs-button>.vjs-icon-placeholder:before {
1852
+ align-items: center;
1853
+ display: flex;
1854
+ font-size: unset;
1855
+ line-height: 0.5;
1856
+ justify-content: center;
1857
+ }
1858
+
1859
+ span.ul-button-text {
1860
+ align-self: flex-end;
1861
+ position: relative;
1862
+ top: 14px;
1863
+ }
1864
+
1865
+ #ul-camera-button {
1866
+ white-space: nowrap;
1867
+ }
1868
+
1869
+ .video-js .vjs-volume-control.vjs-volume-horizontal {
1870
+ background-color: #fff;
1871
+ z-index: 1;
1872
+ }
1873
+
1874
+ .vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level {
1875
+ background-color: black;
1876
+ }
1877
+
1878
+ .video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,
1879
+ .video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,
1880
+ .video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active {
1881
+ width: 40px;
1882
+ }
1883
+
1884
+ .video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active,
1885
+ .video-js .vjs-volume-panel .vjs-volume-control:active,
1886
+ .video-js .vjs-volume-panel.vjs-hover .vjs-mute-control ~ .vjs-volume-control,
1887
+ .video-js .vjs-volume-panel.vjs-hover .vjs-volume-control,
1888
+ .video-js .vjs-volume-panel:active .vjs-volume-control,
1889
+ .video-js .vjs-volume-panel:focus .vjs-volume-control {
1890
+ visibility: visible;
1891
+ left: 40px;
1892
+ position: absolute;
1893
+ transition: visibility 0.1s, opacity 0.1s, height 0.1s, width 0.1s, left 0s, top 0s;
1894
+ }
1895
+
1896
+ /* play button customization */
1897
+ .video-js .vjs-play-control {
1898
+ color: black;
1899
+ }
1900
+
1901
+ .video-js .vjs-play-control .vjs-icon-placeholder:before {
1902
+ content: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.5363 6.40226L1.93958 10.7006C1.64037 10.8502 1.28833 10.6326 1.28833 10.2981V1.7014C1.28833 1.36688 1.64037 1.14931 1.93958 1.29891L10.5363 5.59727C10.868 5.76311 10.868 6.23642 10.5363 6.40226Z' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
1903
+ }
1904
+
1905
+ /* position and style the current timer */
1906
+ .ul-time-panel {
1907
+ position: absolute;
1908
+ bottom: 80px;
1909
+ left: 10px;
1910
+ height: 22px;
1911
+ color: black;
1912
+ border: 1px solid #e0e0eb;
1913
+ border-radius: 23px;
1914
+ background-color: white;
1915
+ width: fit-content;
1916
+ }
1917
+
1918
+ .video-js .vjs-current-time,
1919
+ .vjs-no-flex .vjs-current-time {
1920
+ display: flex;
1921
+ align-items: center;
1922
+ text-align: center;
1923
+ }
1924
+
1925
+ /* remove the dot progress indicator */
1926
+ .video-js .vjs-play-progress:before,
1927
+ .video-js .vjs-volume-level:before,
1928
+ .vjs-icon-circle:before,
1929
+ .vjs-seek-to-live-control .vjs-icon-placeholder:before {
1930
+ content: none;
1931
+ }
1932
+
1933
+ .video-js .vjs-mute-control .vjs-icon-placeholder:before {
1934
+ content: url("data:image/svg+xml,%3Csvg width='19' height='14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.825.324A.75.75 0 019.25 1v11.667a.75.75 0 01-1.219.585l-3.96-3.169H1a.75.75 0 01-.75-.75v-5a.75.75 0 01.75-.75h3.07L8.031.414a.75.75 0 01.794-.09zM7.75 2.56L4.802 4.92a.75.75 0 01-.469.164H1.75v3.5h2.583a.75.75 0 01.469.165l2.948 2.358V2.56zM14.911.47a.75.75 0 011.061 0 9.084 9.084 0 010 12.844.75.75 0 01-1.06-1.06 7.584 7.584 0 000-10.724.75.75 0 010-1.06zM11.97 3.41a.75.75 0 011.06 0 4.917 4.917 0 010 6.953.75.75 0 11-1.06-1.06 3.417 3.417 0 000-4.832.75.75 0 010-1.06z' fill='%23262136'/%3E%3C/svg%3E");
1935
+ }
1936
+
1937
+ .video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before {
1938
+ content: url("data:image/svg+xml,%3Csvg width='19' height='14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.5 1.167L4.333 4.5H1v5h3.333L8.5 12.833V1.167zM17.17 4.5l-5 5M12.17 4.5l5 5' stroke='%23262136' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
1939
+ }
1940
+
1941
+ .video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before {
1942
+ content: url("data:image/svg+xml,%3Csvg width='19' height='14' viewBox='0 0 19 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.82489 0.32403C9.08474 0.44892 9.25 0.711703 9.25 1.00001V12.6667C9.25 12.955 9.08474 13.2178 8.82489 13.3427C8.56504 13.4675 8.25661 13.4324 8.03148 13.2523L4.07025 10.0833H1C0.585786 10.0833 0.25 9.74755 0.25 9.33334V4.33334C0.25 3.91913 0.585786 3.58334 1 3.58334H4.07025L8.03148 0.414355C8.25661 0.234253 8.56504 0.19914 8.82489 0.32403ZM7.75 2.56048L4.80185 4.91899C4.66887 5.02538 4.50364 5.08334 4.33333 5.08334H1.75V8.58334H4.33333C4.50364 8.58334 4.66887 8.6413 4.80185 8.74769L7.75 11.1062V2.56048Z' fill='%23262136'/%3E%3C/svg%3E%0A");
1943
+ }
1944
+
1945
+ .video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before {
1946
+ content: url("data:image/svg+xml,%3Csvg width='19' height='14' viewBox='0 0 19 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.82489 0.32403C9.08474 0.44892 9.25 0.711703 9.25 1.00001V12.6667C9.25 12.955 9.08474 13.2178 8.82489 13.3427C8.56504 13.4675 8.25661 13.4324 8.03148 13.2523L4.07025 10.0833H1C0.585786 10.0833 0.25 9.74755 0.25 9.33334V4.33334C0.25 3.91913 0.585786 3.58334 1 3.58334H4.07025L8.03148 0.414355C8.25661 0.234253 8.56504 0.19914 8.82489 0.32403ZM7.75 2.56048L4.80185 4.91899C4.66887 5.02538 4.50364 5.08334 4.33333 5.08334H1.75V8.58334H4.33333C4.50364 8.58334 4.66887 8.6413 4.80185 8.74769L7.75 11.1062V2.56048Z' fill='%23262136'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M11.9698 3.41124C12.2627 3.11839 12.7376 3.11846 13.0304 3.4114C13.9521 4.33341 14.4699 5.58376 14.4699 6.88748C14.4699 8.19121 13.9521 9.44156 13.0304 10.3636C12.7376 10.6565 12.2627 10.6566 11.9698 10.3637C11.6768 10.0709 11.6767 9.596 11.9696 9.30307C12.6101 8.66235 12.9699 7.79346 12.9699 6.88748C12.9699 5.98151 12.6101 5.11262 11.9696 4.4719C11.6767 4.17896 11.6768 3.70409 11.9698 3.41124Z' fill='%23262136'/%3E%3C/svg%3E%0A");
1947
+ }
1948
+
1949
+ .video-js .vjs-volume-control:hover .vjs-mouse-display {
1950
+ display: none !important;
1951
+ }
1952
+
1953
+ .video-js .vjs-play-progress {
1954
+ background-color: black;
1955
+ }
1956
+
1957
+ /* position video player inside the container */
1958
+ .video-js .vjs-tech {
1959
+ position: static;
1960
+ }
1961
+
1962
+ .video-js .vjs-time-tooltip {
1963
+ padding: 0.25em 0.75em;
1964
+ align-items: center;
1965
+ color: #333;
1966
+ background: #FCFCFD;
1967
+ border-radius: 99px;
1968
+ text-align: center;
1969
+ border: 1px solid #E0E0EB;
1970
+ display: flex;
1971
+ align-items: center;
1972
+ justify-content: center;
1973
+ top: -25px;
1974
+ font-size: 12px !important;
1975
+ width: 50px !important;
1976
+ }
1977
+
1978
+ .video-js .vjs-play-progress.vjs-slider-bar .vjs-time-tooltip {
1979
+ visibility: hidden !important;
1980
+ }
1981
+
1982
+ .video-js .vjs-progress-control .vjs-mouse-display {
1983
+ z-index: 2;
1984
+ }
1985
+
1986
+ .ul-video-player {
1987
+ width: 100%;
1988
+ display: flex;
1989
+ flex-direction: column;
1990
+ height: auto;
1991
+ border: 1px solid #E6E6E6;
1992
+ background-color: white;
1993
+ box-sizing: border-box;
1994
+ border-radius: 4px;
1995
+ background-clip: border-box;
1996
+ overflow: hidden;
1997
+ }
1998
+
1999
+ .video-js.vjs-fullscreen:not(.vjs-ios-native-fs) {
2000
+ border: none;
2001
+ }
2002
+
2003
+ #video-response-player-secondary-video-player {
2004
+ max-width: 200px;
2005
+ margin-right: 20px;
2006
+ background-color: transparent;
2007
+ }
2008
+
2009
+ #ul-card-video__player_recorder-video-recorder.vjs-fullscreen {
2010
+ display: table;
2011
+ }
2012
+
2013
+ .video-js div.vjs-progress-control {
2014
+ margin-top: -3px;
2015
+ }
2016
+
2017
+ .video-js .vjs-progress-control .vjs-slider {
2018
+ background-color: #B2BBBD;
2019
+ }
2020
+
2021
+ .vjs-record.video-js .vjs-control.vjs-button.vjs-fullscreen-control {
2022
+ position:relative;
2023
+ }
2024
+
2025
+ .video-js .vjs-fullscreen-control .vjs-icon-placeholder:before {
2026
+ content: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9.82143 2.54004L12.2614 2.54004C12.9242 2.54004 13.4614 3.0773 13.4614 3.74004L13.4614 6.18004' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M6.17955 13.46L3.73955 13.46C3.07681 13.46 2.53955 12.9227 2.53955 12.26L2.53955 9.81996' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M12.7772 3.22266L9.36475 6.63516' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M6.29434 9.70605L2.88184 13.1186' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
2027
+ }
2028
+
2029
+ .video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before {
2030
+ content: url("data:image/svg+xml,%3Csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.583 9.813H5.25a1 1 0 011 1v3.666M5.375 10.688L1 15.061M14.917 5.813H11.25a1 1 0 01-1-1V1.146M15.063 1l-4.376 4.375' stroke='%23262136' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
2031
+ }
2032
+
2033
+ .video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before, .video-js .vjs-icon-replay:before {
2034
+ content: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.5363 6.40226L1.93958 10.7006C1.64037 10.8502 1.28833 10.6326 1.28833 10.2981V1.7014C1.28833 1.36688 1.64037 1.14931 1.93958 1.29891L10.5363 5.59727C10.868 5.76311 10.868 6.23642 10.5363 6.40226Z' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
2035
+ }
2036
+
2037
+ .video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before, .vjs-icon-pause:before {
2038
+ content: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='3.61885' y='2.06074' width='3.16185' height='11.88' rx='0.9' fill='black' stroke='%23EDEDED' stroke-width='0.6' stroke-linecap='round'/%3E%3Crect x='9.21797' y='2.06074' width='3.16185' height='11.88' rx='0.9' fill='black' stroke='%23EDEDED' stroke-width='0.6' stroke-linecap='round'/%3E%3C/svg%3E%0A");
2039
+ padding: 2px;
2040
+ }
2041
+
2042
+ .vjs-error-display {
2043
+ display: none;
2044
+ }
2045
+
2046
+ .ul-video-player-video {
2047
+ position: relative;
2048
+ top: 0;
2049
+ left: 0;
2050
+ width: 100%;
2051
+ }
2052
+
2053
+ .ul-video-container {
2054
+ width: 100%;
2055
+ height: auto;
2056
+ left: 0px;
2057
+ top: 0px;
2058
+
2059
+ background-color: transparent;
2060
+ border-radius: 4px;
2061
+
2062
+ align-items: start;
2063
+ display: flex;
2064
+ flex-direction: column;
2065
+
2066
+ /* Inside Auto Layout */
2067
+
2068
+ flex: none;
2069
+ order: 0;
2070
+ flex-grow: 0;
2071
+ margin: 10px 0px;
2072
+ position: relative;
2073
+ }
2074
+
2075
+ .vjs-record button.vjs-device-button.vjs-control {
2076
+ background: rgba(255, 255, 255, 96);
2077
+ width: 100%;
2078
+ height: 100%;
2079
+ left: 0;
2080
+ top: 0;
2081
+ margin: 0;
2082
+ border-radius: 0;
2083
+ line-height: 0.6;
2084
+ padding: 10px;
2085
+ display: flex;
2086
+ align-items: center;
2087
+ flex-direction: column;
2088
+ justify-content: center;
2089
+ z-index: 3;
2090
+ }
2091
+
2092
+ .vjs-record .vjs-device-button.vjs-control:before {
2093
+ font-size: 14px !important;
2094
+ color: #333;
2095
+ content: "Your browser needs to access your camera and microphone for video recording";
2096
+ line-height: 135%;
2097
+ }
2098
+
2099
+ .vjs-record .vjs-device-button.vjs-control.permission-denied:before {
2100
+ font-size: 16px !important;
2101
+ color: #262136;
2102
+ content: "Unable to access your camera and microphone";
2103
+ }
2104
+
2105
+ .vjs-record .vjs-device-button.vjs-control:after {
2106
+ display: inline-block;
2107
+ background: #F0F0F5;
2108
+ font-size: 13px;
2109
+ border-radius: 4px;
2110
+ content: "Request Permissions";
2111
+ padding: 1em 2em;
2112
+ color: #333;
2113
+ margin-top: 20px;
2114
+ }
2115
+
2116
+ .vjs-record .vjs-device-button.vjs-control.permission-denied:after {
2117
+ display: inline-block;
2118
+ background: white;
2119
+ font-size: 13px;
2120
+ content: "Please go to your browser settings and update permissions to enable recording";
2121
+ padding: 1em;
2122
+ color: #4B575D;
2123
+ margin: 5px;
2124
+ line-height: 135%;
2125
+ text-align: center;
2126
+ }
2127
+
2128
+ .vjs-control.vjs-button.ul-video-recorder-delete-button, .vjs-control.vjs-button.ul-video-recorder-toggle-button, .vjs-control.vjs-button.ul-video-recorder-camera-off-button-audio-only, .vjs-control.vjs-button.ul-video-recorder-camera-off-button {
2129
+ cursor: pointer;
2130
+ }
2131
+
2132
+ .ul-video-recorder-delete-button .vjs-icon-placeholder:before {
2133
+ content: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9.21234 7.37549V11.1193M2.53931 4.25595H13.4593H2.53931ZM5.57234 4.25595V3.00833C5.57222 2.84433 5.60354 2.68192 5.6645 2.53038C5.72546 2.37884 5.81488 2.24115 5.92762 2.12519C6.04037 2.00922 6.17424 1.91726 6.32158 1.85456C6.46892 1.79185 6.62683 1.75964 6.78628 1.75977H9.21234C9.37179 1.75964 9.5297 1.79185 9.67703 1.85456C9.82437 1.91726 9.95824 2.00922 10.071 2.12519C10.1837 2.24115 10.2732 2.37884 10.3341 2.53038C10.3951 2.68192 10.4264 2.84433 10.4263 3.00833V4.25595H5.57234ZM12.2463 4.25595V12.9912C12.2463 13.3223 12.1184 13.6399 11.8907 13.8741C11.6631 14.1082 11.3543 14.2398 11.0323 14.2398H4.96628C4.64432 14.2398 4.33555 14.1082 4.10789 13.8741C3.88023 13.6399 3.75234 13.3223 3.75234 12.9912V4.25595H12.2463ZM6.78628 7.37549V11.1193V7.37549Z' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A");
2134
+ }
2135
+
2136
+ .ul-video-recorder-toggle-button .vjs-icon-placeholder:before {
2137
+ content: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 0C12.4183 0 16 3.58172 16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0Z' fill='%23D15153'/%3E%3C/svg%3E");
2138
+ }
2139
+
2140
+ .ul-video-recorder-toggle-button.ul-recording-in-session .vjs-icon-placeholder:before {
2141
+ content: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 10L12 2C12 0.89543 11.1046 -4.85396e-07 10 -4.37114e-07L2 -8.74228e-08C0.89543 -3.91405e-08 -4.85396e-07 0.895431 -4.37114e-07 2L-8.74228e-08 10C-3.91405e-08 11.1046 0.895431 12 2 12L10 12C11.1046 12 12 11.1046 12 10Z' fill='%23D15153'/%3E%3C/svg%3E%0A");
2142
+ }
2143
+
2144
+ .ul-video-recorder-camera-off-button .vjs-icon-placeholder:before {
2145
+ content: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_2645_4654)'%3E%3Cpath d='M15.1491 4.75L10.5991 8L15.1491 11.25V4.75Z' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M9.29912 3.4502H2.14912C1.43115 3.4502 0.849121 4.03223 0.849121 4.7502V11.2502C0.849121 11.9682 1.43115 12.5502 2.14912 12.5502H9.29912C10.0171 12.5502 10.5991 11.9682 10.5991 11.2502V4.7502C10.5991 4.03223 10.0171 3.4502 9.29912 3.4502Z' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_2645_4654'%3E%3Crect width='15.6' height='15.6' fill='white' transform='translate(0.199951 0.200195)'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E");
2146
+ }
2147
+
2148
+ .ul-video-recorder-camera-off-button-audio-only .vjs-icon-placeholder:before {
2149
+ content: url("data:image/svg+xml,%3Csvg width='22' height='15' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M.75 3A2.75 2.75 0 013.5.25h9.081A2.75 2.75 0 0115.331 3v9a2.75 2.75 0 01-2.75 2.75H3.5A2.75 2.75 0 01.75 12V3zM3.5 1.75c-.69 0-1.25.56-1.25 1.25v9c0 .69.56 1.25 1.25 1.25h9.081c.69 0 1.25-.56 1.25-1.25V3c0-.69-.56-1.25-1.25-1.25H3.5z' fill='%23262136'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M14.53 2.03l-12 12-1.06-1.06 12-12 1.06 1.06zM20.87 1.525a.75.75 0 01.38.652v10.588a.75.75 0 01-1.134.644l-5.92-3.53a.75.75 0 01-.365-.643v-3.53a.75.75 0 01.366-.644l5.919-3.53a.75.75 0 01.754-.007zm-5.539 4.607V8.81l4.419 2.635V3.497l-4.419 2.635z' fill='%23262136'/%3E%3C/svg%3E");
2150
+ transform: scale(0.75);
2151
+ }
2152
+
2153
+ .ul-upload-progress-label {
2154
+ padding: 0.15em 0.75em;
2155
+ align-items: center;
2156
+ font-size: 12px;
2157
+ color: #333;
2158
+ background: #FCFCFD;
2159
+ border-radius: 99px;
2160
+ text-align: center;
2161
+ border: 1px solid #E0E0EB;
2162
+ display: flex;
2163
+ align-items: center;
2164
+ justify-content: center;
2165
+ position: absolute;
2166
+ bottom: 75px;
2167
+ left: calc(50% - 65px);
2168
+ width: 130px;
2169
+ z-index: 5;
2170
+ }
2171
+
2172
+ .ul-upload-progress-label__time {
2173
+ display: inline-flex;
2174
+ margin-left: 0.8em;
2175
+ align-items: center;
2176
+ }
2177
+
2178
+ .ul-upload-progress-label__time:before {
2179
+ content: "";
2180
+ display: inline-flex;
2181
+ width: 1px;
2182
+ height: 12px;
2183
+ background-color: #E0E0EB;
2184
+ margin-right: 0.8em;
2185
+ }
2186
+
2187
+ @keyframes grow {
2188
+ 0% {
2189
+ transform: scale(1);
2190
+ background-color: #EEECFC;
2191
+ }
2192
+ 50% {
2193
+ transform: scale(1.2);
2194
+ background-color: #E1DFF4;
2195
+ }
2196
+ 100% {
2197
+ transform: scale(1);
2198
+ background-color: #EEECFC;
2199
+ }
2200
+ }
2201
+
2202
+ .ul-audio-recorder-placeholder:before {
2203
+ width: 80px;
2204
+ height: 80px;
2205
+ border-radius: 120px;
2206
+ background-color: #EEECFC;
2207
+ content: "";
2208
+ position: absolute;
2209
+ left: calc(50% - 40px);
2210
+ top: calc(50% - 40px);
2211
+ animation: 6s infinite grow;
2212
+ transform-origin: 50% 60%;
2213
+ }
2214
+
2215
+ .ul-audio-recorder-placeholder:after {
2216
+ content: url("data:image/svg+xml,%3Csvg width='98' height='98' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cmask id='a' maskUnits='userSpaceOnUse' x='0' y='0' width='98' height='98'%3E%3Ccircle cx='49' cy='49' r='49' fill='%23EDECF8'/%3E%3C/mask%3E%3Cg mask='url(%23a)'%3E%3Ccircle cx='49' cy='49' r='50' fill='%23645CC2'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M11.422 81.812c5.405-15.547 20.187-26.706 37.576-26.706 17.39 0 32.172 11.159 37.577 26.707-9.164 10.43-22.601 17.013-37.576 17.013-14.976 0-28.414-6.583-37.577-17.014z' fill='%23fff' fill-opacity='.6'/%3E%3Ccircle cx='49' cy='29' r='17' fill='%23fff' fill-opacity='.7'/%3E%3C/g%3E%3C/svg%3E");
2217
+ position: absolute;
2218
+ left: 50%;
2219
+ top: 50%;
2220
+ transform: translate(-50%, -50%);
2221
+ transform: translate(-50%, -50%) scale(0.6);
2222
+ }
2223
+
2224
+ .ul-audio-recorder-placeholder {
2225
+ min-height: 150px;
2226
+ width: 100%;
2227
+ background-color: #fcfcfd;
2228
+ display: block;
2229
+ position: relative;
2230
+ }
2231
+
2232
+ .vjs-fullscreen .ul-audio-recorder-placeholder {
2233
+ vertical-align: middle;
2234
+ display: table-cell;
2235
+ }
2236
+
2237
+ .vjs-fullscreen .ul-control-panel {
2238
+ height: 80px;
2239
+ position: absolute;
2240
+ bottom: 0;
2241
+ left: 0;
2242
+ width: 100%;
2243
+ max-width: 100%;
2244
+ background-color: #F8F8F8;
2245
+ }
2246
+
2247
+ .vjs-playback-rate .vjs-playback-rate-value {
2248
+ align-items: center;
2249
+ display: flex;
2250
+ font-size: 12px;
2251
+ justify-content: center;
2252
+ }
2253
+
2254
+ .vjs-playback-rate .vjs-menu {
2255
+ left: -5px;
2256
+ bottom: 3px;
2257
+ }
2258
+
2259
+ .vjs-menu-button-popup .vjs-menu .vjs-menu-content {
2260
+ background-color: white;
2261
+ border: 1px solid rgba(0, 0, 0, 0.1);
2262
+ box-sizing: border-box;
2263
+ border-radius: 4px;
2264
+ }
2265
+
2266
+ .vjs-menu li {
2267
+ font-size: 12px;
2268
+ padding: 5px 0;
2269
+ }
2270
+
2271
+ .vjs-menu li.vjs-selected {
2272
+ color: lightgray;
2273
+ }
2274
+
2275
+ .vjs-menu li.vjs-menu-item:hover {
2276
+ background-color: rgba(0, 0, 0, 0.05);
2277
+ }
2278
+
2279
+ .vjs-fullscreen .ul-buttons-panel {
2280
+ top: calc(50% - 30px);
2281
+ position: relative;
2282
+ }
2283
+
2284
+ .vjs-fullscreen .vjs-record-indicator.vjs-control {
2285
+ bottom: 90px !important;
2286
+ }
2287
+
2288
+ .vjs-record.video-js div.vjs-control.vjs-record-indicator {
2289
+ padding: 0.3em 0.75em 0.15em 15px;
2290
+ align-items: center;
2291
+ font-size: 12px;
2292
+ color: #333;
2293
+ background: #FCFCFD;
2294
+ border-radius: 99px;
2295
+ text-align: center;
2296
+ border: 1px solid #E0E0EB;
2297
+ display: flex;
2298
+ justify-content: center;
2299
+ align-items: center;
2300
+ position: absolute;
2301
+ bottom: 75px;
2302
+ top: auto;
2303
+ left: calc(50% - 21px);
2304
+ width: 43px;
2305
+ height: 16px;
2306
+ z-index: 4;
2307
+ }
2308
+
2309
+ .vjs-record.video-js div.vjs-control.vjs-record-indicator:after {
2310
+ content: "";
2311
+ background-color: #EB5757;
2312
+ width: 6px;
2313
+ height: 6px;
2314
+ border-radius: 8px;
2315
+ animation: none;
2316
+ top: 4px;
2317
+ left: 5px;
2318
+ }
2319
+
2320
+ .vjs-record.video-js div.vjs-control.vjs-record-indicator:before {
2321
+ position: relative;
2322
+ font-size: 9px;
2323
+ animation: none;
2324
+ opacity: 1;
2325
+ color: #333;
2326
+ top: auto;
2327
+ left: auto;
2328
+ }
2329
+
2330
+ .ul-video-player-loading {
2331
+ display: inline-block;
2332
+ position: relative;
2333
+ width: 6rem;
2334
+ height: 6rem;
2335
+
2336
+ }
2337
+ .ul-video-player-loading div {
2338
+ box-sizing: border-box;
2339
+ position: absolute;
2340
+ display: block;
2341
+ width: 80%;
2342
+ height: 80%;
2343
+ margin: 5px;
2344
+ border: 5px solid #666;
2345
+ border-radius: 50%;
2346
+ animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
2347
+ border-color: #666 transparent transparent transparent;
2348
+ }
2349
+
2350
+ .first {
2351
+ animation-delay: -0.45s;
2352
+ }
2353
+ .second {
2354
+ animation-delay: -0.3s;
2355
+ }
2356
+ .third {
2357
+ animation-delay: -0.15s;
2358
+ }
2359
+
2360
+ @keyframes lds-ring {
2361
+ 0% {
2362
+ transform: rotate(0deg);
2363
+ }
2364
+ 100% {
2365
+ transform: rotate(360deg);
2366
+ }
2367
+ }
2368
+
2369
+ .ul-video-btn {
2370
+ width: 100%;
2371
+ border: 1px solid #E6E6E6;
2372
+ border-radius: 4px;
2373
+ background-color: rgba(0, 0, 0, 0.02);
2374
+ padding: 8px;
2375
+ font-weight: 500;
2376
+ font-size: 15px;
2377
+ }
2378
+
2379
+ .ul-record-response-btn:before, .ul-record-response-btn:after, .ul-back-question-btn:before, .ul-back-question-btn:after {
2380
+ margin: 0 5px;
2381
+ vertical-align: middle;
2382
+ }
2383
+
2384
+ .ul-record-response-btn:before {
2385
+ content: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_2645_4654)'%3E%3Cpath d='M15.1491 4.75L10.5991 8L15.1491 11.25V4.75Z' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M9.29912 3.4502H2.14912C1.43115 3.4502 0.849121 4.03223 0.849121 4.7502V11.2502C0.849121 11.9682 1.43115 12.5502 2.14912 12.5502H9.29912C10.0171 12.5502 10.5991 11.9682 10.5991 11.2502V4.7502C10.5991 4.03223 10.0171 3.4502 9.29912 3.4502Z' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_2645_4654'%3E%3Crect width='15.6' height='15.6' fill='white' transform='translate(0.199951 0.200195)'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E");
2386
+ display: inline-block;
2387
+ transform: translate(0px, 2px);
2388
+ }
2389
+
2390
+ .ul-record-response-btn:after {
2391
+ content: 'Record your Response';
2392
+ }
2393
+
2394
+ .ul-back-question-btn:before {
2395
+ content: url("data:image/svg+xml,%3Csvg width='15' height='16' viewBox='0 0 15 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.8757 8.22361L1.1118 14.6056C0.945578 14.6887 0.75 14.5678 0.75 14.382V1.61803C0.75 1.43219 0.945579 1.31131 1.1118 1.39443L13.8757 7.77639C14.06 7.86852 14.06 8.13148 13.8757 8.22361Z' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
2396
+ display: inline-block;
2397
+ transform: scale(0.85) translate(0, 1px);
2398
+ -moz-transform: scale(0.85) translate(0, 2px);
2399
+ }
2400
+
2401
+ .ul-back-question-btn:after {
2402
+ content: 'Back to Question';
2403
+ }
2404
+
2405
+ .hidden {
2406
+ display: none !important;
2407
+ opacity: 0;
2408
+ visibility: hidden;
2409
+ }
2410
+
2411
+ .visible {
2412
+ visibility: visible;
2413
+ opacity: 1;
2414
+ animation: fade 0.3s;
2415
+ }
2416
+
2417
+ @keyframes fade {
2418
+ 0% {
2419
+ opacity: 0;
2420
+ }
2421
+
2422
+ 100% {
2423
+ opacity: 1;
2424
+ }
2425
+ }
2426
+
2427
+ #ul-recording-countdown-screen {
2428
+ width: 100%;
2429
+ height: 100%;
2430
+ color: black;
2431
+ background-color: rgba(255, 255, 255, 0.8);
2432
+ position: absolute;
2433
+ text-align: center;
2434
+ font-size: 15px;
2435
+ z-index: 1;
2436
+ display: table;
2437
+ }
2438
+
2439
+ .ul-countdown-text {
2440
+ vertical-align: middle;
2441
+ display: table-cell;
2442
+ transform: translate(0, -25px);
2443
+ }
2444
+
2445
+ .vjs-fullscreen > #ul-recording-countdown-screen {
2446
+ font-size: 25px;
2447
+ transform: unset;
2448
+ }
2449
+
2450
+ .vjs-poster {
2451
+ background-size: cover;
2452
+ }
2453
+ ` }], Kr = "-video-player", Tn = "-secondary-video-player", Ln = "-video-recorder";
2454
+ let de, Nn;
2455
+ const ye = async ({ event: e, apiBase: t, headers: n, visitorId: r, envId: o, metadata: i }) => {
2456
+ const s = O.document.documentElement;
2457
+ if (!r || !o) return;
2458
+ const d = { event: `SDK - ${e}`, visitorId: r, environmentId: o, metadata: { ...i || {}, screenWidth: window.screen.width, screenHeight: window.screen.height, clientWidth: s.clientWidth, clientHeight: s.clientHeight, location: window.location.href, language: navigator.language } };
2459
+ (await fetch(`${t}/sdk/1/visitors/${r}/analytics`, { method: "POST", cache: "no-cache", headers: n, body: JSON.stringify(d) })).ok || console.warn("[Sprig] (ERR-444) Failed to track analytics", e);
2460
+ }, he = async (e, t, n, r, o, i) => {
2461
+ ye({ event: `Video Error ${t}`, apiBase: n, headers: r, visitorId: o, envId: i, metadata: { errorMessage: e.message } });
2462
+ const s = O.document.documentElement, d = { screenWidth: window.screen.width, screenHeight: window.screen.height, clientWidth: s.clientWidth, clientHeight: s.clientHeight, location: window.location.href, language: navigator.language }, l = { action: t, err: { message: e.message, stack: e.stack }, meta: d, vid: o, envId: i };
2463
+ (await fetch(`${n}/sdk/1/errors`, { method: "POST", cache: "no-cache", headers: { ...r, "userleap-platform": "video_recorder", "x-ul-error": window.btoa(`userleap-${Date.now()}-error`) }, body: JSON.stringify(l) })).ok || console.warn("[Sprig] (ERR-444) Failed to report error to API", e);
2464
+ }, Yr = (e, t) => {
2465
+ if (e.length === 0) return t && t();
2466
+ Promise.all(e.reduce((n, r) => (n.push(((o, { type: i, content: s }) => new Promise(function(d, l) {
2467
+ let u;
2468
+ i === "script" ? (u = O.document.createElement("script"), u.src = s) : i === "link" ? (u = O.document.createElement("link"), u.rel = "stylesheet", u.href = s, u.type = "text/css") : (u = O.document.createElement("style"), u.innerHTML = s), u.onload = function() {
2469
+ d(s);
2470
+ }, u.onerror = function() {
2471
+ l(s);
2472
+ }, u.async = !1, u.id = btoa(s), o.appendChild(u);
2473
+ }))(O.document.head, r)), n), [])).then(() => {
2474
+ O.videojs = O.document.defaultView.videojs, t && t();
2475
+ }).catch(function(n) {
2476
+ console.log(n + " failed to load");
2477
+ });
2478
+ }, Dn = (e, t, n) => {
2479
+ if (t === "start" && (e.style.visibility = "visible"), t === "none") e.style.visibility = ee;
2480
+ else if (t === "success") e.style.visibility = ee, e.innerHTML = "Upload succeeded!";
2481
+ else {
2482
+ const r = Math.round(parseFloat(n));
2483
+ e.innerHTML = `Uploading <span class="ul-upload-progress-label__time">${r}%</span>`, e.style.background = `linear-gradient(to right, #E0E0EB 0%, #E0E0EB ${r}%, #FCFCFD ${r}%, #FCFCFD 100%)`;
2484
+ }
2485
+ }, mt = (e, t) => {
2486
+ const n = O.videojs(e.id());
2487
+ return n == null ? void 0 : n.payload[t];
2488
+ }, Jr = (e, t) => {
2489
+ const n = new (O.videojs.getComponent("Component"))(e);
2490
+ return n.addClass("ul-buttons-panel"), t.map((r) => {
2491
+ n.addChild(r);
2492
+ }), Ri(n), n;
2493
+ }, Ri = (e) => {
2494
+ e.children().forEach((t) => {
2495
+ if (ae[t.name_]) {
2496
+ const n = $e(ae[t.name_], `ul-${ae[t.name_]}`);
2497
+ t.el_.appendChild(n);
2498
+ }
2499
+ });
2500
+ }, $e = (e, t = "") => {
2501
+ const n = O.document.createElement("span");
2502
+ return n.className = "ul-button-text", n.innerHTML = e, n.id = t, n;
2503
+ }, Xr = (e, t, n, r, o = !1, i) => {
2504
+ e.addClass("ul-video-player");
2505
+ const s = new (O.videojs.getComponent("Component"))(e);
2506
+ s.addClass("ul-control-panel"), e.progressBar = s.addChild("ProgressControl"), n && e.src(n), e.audioPlayerPlaceholder = new (O.videojs.getComponent("Component"))(e), e.audioPlayerPlaceholder.addClass("ul-audio-recorder-placeholder");
2507
+ const d = n && n.src ? Hi(n.src) : null;
2508
+ !n || !o && d ? (e.audioPlayerPlaceholder.hide(), O.document.getElementById(`${e.id()}_html5_api`).style.height = "100%", d && e.poster(d)) : (e.children()[0].classList.add("vjs-hidden"), O.document.getElementById(`${e.id()}_html5_api`).style.height = "0px"), e.on("play", () => {
2509
+ o || !n || d || Oi(e), i == null || i.play();
2510
+ }), e.on("pause", () => {
2511
+ i == null || i.pause();
2512
+ }), e.on("seeked", () => {
2513
+ i == null || i.currentTime(e.currentTime());
2514
+ }), e.on("ratechange", () => {
2515
+ i == null || i.playbackRate(e.playbackRate());
2516
+ }), e.addChild(e.audioPlayerPlaceholder, {}, 1), s.addChild(t), e.addChild(s), r && r(e);
2517
+ }, Mi = (e, t, n, r, o, i, s, d = !1) => {
2518
+ Nn = Date.now();
2519
+ const l = Ye(t, { controls: !1, bigPlayButton: !1, fluid: !1, width: 1280, height: 720, playsinline: !0, plugins: { record: { audio: !0, video: { mandatory: { minWidth: 1280, minHeight: 720 } }, frameWidth: 1280, frameHeight: 720, maxLength: 600, autoMuteDevice: !0 } } });
2520
+ if (!l) return;
2521
+ l.payload = n;
2522
+ const { surveyId: u, questionId: m, responseGroupUid: c, visitorId: p, envId: v } = n;
2523
+ let h;
2524
+ const y = (C) => {
2525
+ const f = ut, b = ut + "-audio-only";
2526
+ Dn(l.uploadProgressLabel, "none"), de && de.startTime >= Nn && de.abort();
2527
+ const j = O.document.getElementById("ul-camera-button");
2528
+ C ? (l.children()[0].classList.add("vjs-hidden"), L.removeClass(f), L.addClass(b), j.innerHTML = ae.TurnOnCamera, l.audioPlayerPlaceholder.removeClass("vjs-hidden"), h == null || h.getTracks().forEach((D) => {
2529
+ D.stop();
2530
+ }), window.navigator.mediaDevices.getUserMedia({ video: !0, audio: !0 }).then((D) => {
2531
+ h = D, D.getVideoTracks().forEach((E) => {
2532
+ E.enabled = !1;
2533
+ }), l.record().onDeviceReady(D);
2534
+ }).catch(l.record().onDeviceError.bind(l.record()))) : (h == null || h.getVideoTracks().forEach((D) => {
2535
+ D.enabled = !0;
2536
+ }), l.children()[0].classList.remove("vjs-hidden"), l.record().getDevice(), L.removeClass(b), L.addClass(f), j.innerHTML = ae.TurnOffCamera, l.audioPlayerPlaceholder.addClass("vjs-hidden"));
2537
+ }, _ = new (O.videojs.getComponent("Button"))(l, { clickHandler: () => {
2538
+ _.hasClass(ee) || (ye({ event: "Video Delete Button Clicked", apiBase: r, headers: s, visitorId: p, envId: v, metadata: { questionId: m, responseGroupUid: c, surveyId: u } }), y(l.cameraOff), o(A.DELETE, {}), L.removeClass(ee), _.addClass(ee));
2539
+ } });
2540
+ _.addClass("ul-video-recorder-delete-button"), _.el_.appendChild($e(ae.DeleteButton, "ul-delete-button"));
2541
+ const k = O.document.getElementById(t), x = () => {
2542
+ k.classList.contains("vjs-fullscreen") && l.cameraOff ? k.style.display = "table" : k.style.display = "flex";
2543
+ };
2544
+ x();
2545
+ const L = new (O.videojs.getComponent("Button"))(l, { clickHandler: () => {
2546
+ l.record().isRecording() || (l.cameraOff = !l.cameraOff, ye({ event: "Video Camera Button Clicked", apiBase: r, headers: s, visitorId: n.visitorId, envId: n.envId, metadata: { questionId: m, responseGroupUid: c, surveyId: u, cameraOff: l.cameraOff } }), y(l.cameraOff), !_.hasClass(ee) && _.addClass(ee), o(A.DELETE, {}), x());
2547
+ } });
2548
+ L.addClass(ut), L.el_.appendChild($e(ae.TurnOffCamera, "ul-camera-button"));
2549
+ const I = new (O.videojs.getComponent("Button"))(l, { clickHandler: () => {
2550
+ const C = O.document.getElementById("ul-recorder-toggle");
2551
+ if (l.record().isRecording()) l.record().stop(), C && (C.innerHTML = ae.RecordButton), I.removeClass(pt), _.removeClass(ee);
2552
+ else {
2553
+ const f = O.document.getElementById("ul-recording-countdown-screen");
2554
+ if (f) f.remove(), C && (C.innerHTML = ae.RecordButton), y(l.cameraOff), o(A.DELETE, {}), L.removeClass(ee), _.addClass(ee), I.removeClass(pt), g.show();
2555
+ else {
2556
+ I.addClass(pt), g.hide(), L.addClass(ee), _.addClass(ee), C && (C.innerHTML = ae.StopButton);
2557
+ const b = O.document.createElement("div");
2558
+ b.id = "ul-recording-countdown-screen", k.insertBefore(b, k.children[1]), b.style.height = `${k.offsetHeight}px`, eo(l, 3);
2559
+ }
2560
+ }
2561
+ } });
2562
+ I.addClass("ul-video-recorder-toggle-button"), I.el_.appendChild($e(ae.RecordButton, "ul-recorder-toggle"));
2563
+ const w = O.document.createElement("p");
2564
+ w.style.visibility = "hidden", w.className = "ul-upload-progress-label", e.appendChild(w), l.uploadProgressLabel = w;
2565
+ const S = Jr(l, [_, L, "PlayToggle", I, "FullscreenToggle"]), g = S.children().find((C) => C.name_ === "FullscreenToggle");
2566
+ g.hasClass("vjs-disabled") && g.hide();
2567
+ const N = S.children().find((C) => C.name_ === "PlayToggle");
2568
+ N.hide(), _.addClass(ee), Xr(l, S, i, !1, d), l.on("stopRecord", () => {
2569
+ I.hide(), N.show(), g.show(), _.removeClass(ee);
2570
+ }), l.on("deviceReady", () => {
2571
+ I.show(), N.hide(), _.addClass(ee);
2572
+ }), ((C, f, b, j, D) => {
2573
+ const { surveyId: E, responseGroupUid: q, visitorId: R, envId: M } = C.payload;
2574
+ C.on("deviceError", function() {
2575
+ console.warn("device error: ", C.deviceErrorCode), C.deviceErrorCode.message === "Permission denied" ? (C.deviceButton.addClass("permission-denied"), b && b(A.ERROR, { type: A.PERMISSION_DENIED }), ye({ event: "Video Permission Denied", apiBase: f, headers: D, visitorId: R, envId: M, metadata: { questionId: mt(C, ct), responseGroupUid: q, surveyId: E } })) : (b && b(A.ERROR, { type: A.OTHER }), he(new Error(C.deviceErrorCode.message), "recorderDeviceError", f, D, R, M));
2576
+ }), C.on("error", function(z, U) {
2577
+ he(U || C.error(), "recorderError", f, D, R, M);
2578
+ }), C.on("startRecord", function(z, U) {
2579
+ j(C.uploadProgressLabel, "none"), ye({ event: "Video Record Start", apiBase: f, headers: D, visitorId: R, envId: M, metadata: { questionId: mt(C, ct), responseGroupUid: q, surveyId: E } });
2580
+ }), C.on("finishRecord", async function() {
2581
+ j(C.uploadProgressLabel, "start", 0);
2582
+ const z = mt(C, ct);
2583
+ if (!E) {
2584
+ const K = "internal error: missing fields in payload";
2585
+ return b && b(A.ERROR, { type: A.OTHER }), he(new Error(K), "finishRecord", f, D, R, M), null;
2586
+ }
2587
+ C.record().stopDevice();
2588
+ const U = C.cameraOff ? A.MEDIA_TYPE_AUDIO : A.MEDIA_TYPE_VIDEO, F = ft();
2589
+ ye({ event: "Video Record Finish", apiBase: f, headers: D, visitorId: R, envId: M, metadata: { mediaRecordingUid: F, questionId: z, responseGroupUid: q, surveyId: E, mediaType: U } });
2590
+ const te = { surveyId: E, updatedAt: (/* @__PURE__ */ new Date()).toISOString(), mediaType: U, mediaRecordingUid: F };
2591
+ z && (te.questionId = z), q && (te.responseGroupUid = q), R && (te.visitorId = R);
2592
+ const ne = await (async () => {
2593
+ const K = await fetch(`${f}/2/environments/integrations/upload`, { method: "POST", cache: "no-cache", headers: { "Content-Type": "application/json" }, body: JSON.stringify(te) });
2594
+ if (K.ok) {
2595
+ const G = await K.json();
2596
+ return b && b(A.UPLOAD_STARTED, { [A.UPLOAD_ID]: G.upload.id, [A.MEDIA_TYPE]: U, [A.MEDIA_RECORDING_UID]: F }), G.upload.url;
2597
+ }
2598
+ return b && b(A.ERROR, { type: A.OTHER, response: K }), he(new Error("failed to get upload response with url"), "finishRecord", f, D, R, M), null;
2599
+ })();
2600
+ ne && (de = O.document.defaultView.UpChunk.createUpload({ endpoint: ne, file: new O.document.defaultView.File([C.recordedData], `recording ${U} ${Date.now()}`), chunkSize: 5120 }), de.startTime = Date.now(), ye({ event: "Video Upload Start", apiBase: f, headers: D, visitorId: R, envId: M, metadata: { mediaRecordingUid: F, questionId: z, responseGroupUid: q, surveyId: E, mediaType: U, url: ne } }), de.on("error", (K) => {
2601
+ j(C.uploadProgressLabel, "none"), b && b(A.UPLOAD_FINISHED, { [A.MEDIA_RECORDING_UID]: F }), he(K, "finishRecord", f, D, R, M);
2602
+ }), de.on("progress", (K) => {
2603
+ b && b(A.UPLOAD_PROGRESS, { [A.MEDIA_RECORDING_UID]: F, [A.UPLOAD_PROGRESS_PCT]: K.detail }), j(C.uploadProgressLabel, "progress", K.detail);
2604
+ }), de.on("success", () => {
2605
+ j(C.uploadProgressLabel, "success"), b && b(A.UPLOAD_FINISHED, { [A.MEDIA_RECORDING_UID]: F }), ye({ event: "Video Upload Success", apiBase: f, headers: D, visitorId: R, envId: M, metadata: { mediaRecordingUid: F, questionId: z, responseGroupUid: q, surveyId: E, mediaType: U, url: ne, elapsedMs: de.startTime && Date.now() - de.startTime } });
2606
+ }));
2607
+ });
2608
+ })(l, r, o, Dn, s);
2609
+ const T = [{ name: "microphone" }];
2610
+ !l.cameraOff && T.push({ name: "camera" }), Promise.all(T.map((C) => {
2611
+ var f;
2612
+ return (f = navigator == null ? void 0 : navigator.permissions) == null ? void 0 : f.query(C);
2613
+ })).then((C) => {
2614
+ C.reduce((f, b) => f & b.state === "granted", !0) && l && (l.deviceButton && l.deviceButton.hide(), l.record().getDevice());
2615
+ }).catch((C) => {
2616
+ });
2617
+ }, eo = (e, t = 3) => {
2618
+ const n = O.document.getElementById("ul-recording-countdown-screen");
2619
+ n && t === 0 ? (n.remove(), e.record().start()) : n && (n.innerHTML = `<span class='ul-countdown-text'>Recording in... ${t}</span>`, setTimeout(() => {
2620
+ eo(e, t - 1);
2621
+ }, 1e3));
2622
+ }, to = (e) => {
2623
+ const t = O.document.createElement("div");
2624
+ return t.className = "ul-video-container", t.appendChild(((n) => {
2625
+ const r = O.document.createElement("div");
2626
+ return r.className = "ul-video-player-loading", r.id = At(n), ["first", "second", "third", "fourth"].map((o) => {
2627
+ const i = O.document.createElement("div");
2628
+ i.className = o, r.appendChild(i);
2629
+ }), r;
2630
+ })(e)), t;
2631
+ }, St = (e, t) => {
2632
+ const n = O.document.createElement("video");
2633
+ n.id = e, n.className = "video-js vjs-default-skin ul-video-player-video";
2634
+ const r = O.document.createElement("p");
2635
+ r.className = "vjs-no-js", r.innerHTML = "To view this video please enable JavaScript, and consider upgrading to a web browser that";
2636
+ const o = O.document.createElement("a");
2637
+ return o.href = "https://videojs.com/html5-video-support/", o.target = "_blank", o.innerHTML = "supports HTML5 video", r.appendChild(o), n.appendChild(r), t.appendChild(n), t;
2638
+ }, Oi = (e, t) => {
2639
+ e.children()[0].classList.remove("vjs-hidden"), e.audioPlayerPlaceholder.hide(), O.document.getElementById(`${e.id()}_html5_api`).style.height = "100%";
2640
+ }, Ye = (e, t) => O.document.getElementById(e) ? t ? O.videojs(e, t) : O.videojs(e) : (console.error(`Error in finding player element with ID, ${e}`), null), Ui = (e, t, n, r = !1, o = "https://api.sprig.com", i = document, s = null, d = null) => {
2641
+ O.document = i;
2642
+ const l = e + Kr, u = to(l);
2643
+ return O.document.addEventListener("securitypolicyviolation", (m) => {
2644
+ he(new Error(`Voice & Video feature violates ${m.violatedDirective} web page CSP policies for the question player.`), "playerDeviceError", o, {});
2645
+ }), Yr(Gr, () => {
2646
+ O.document.getElementById(At(l)).remove(), St(l, u);
2647
+ const m = { playsinline: !0, playbackRates: [0.5, 1, 1.5, 2], fill: !0 };
2648
+ try {
2649
+ const c = e + Tn;
2650
+ St(c, u);
2651
+ const p = Ye(l, m), v = Ye(c, { muted: !0, ...m });
2652
+ if (!p || !v) return;
2653
+ ((_, k, x) => {
2654
+ _.addClass(`ul${Tn}`);
2655
+ const L = new (O.videojs.getComponent("Component"))(_);
2656
+ k && _.src(k), _.addChild(L), x && x(_);
2657
+ })(v, s, d), s || v.addClass(ee);
2658
+ const h = Jr(p, ["PlaybackRateMenuButton", "PlayToggle", "FullscreenToggle"]), y = h.children().find((_) => _.name_ === "FullscreenToggle");
2659
+ y.hasClass("vjs-disabled") && y.hide(), Xr(p, h, t, n, r, v);
2660
+ } catch (c) {
2661
+ return void he(new Error(`Error when creating video player object ${c}`), "playerDeviceError", o, {});
2662
+ }
2663
+ }), u;
2664
+ }, Hi = (e) => {
2665
+ if (!e) return null;
2666
+ const t = e.match(/https:\/\/stream.mux.com\/(.*)/);
2667
+ let n = t ? t[1] : null;
2668
+ return n.includes(jn) && (n = n.replace(jn, "")), n ? `https://image.mux.com/${n}/thumbnail.jpg?time=0` : null;
2669
+ }, A = { UPLOAD_STARTED: "upload.started", UPLOAD_PROGRESS: "upload.progress", UPLOAD_FINISHED: "upload.finished", DELETE: "delete", ERROR: "error", MEDIA_TYPE: "media.type", PERMISSION_DENIED: "permission_denied", OTHER: "other", UPLOAD_ID: "upload.id", UPLOAD_PROGRESS_PCT: "upload.progress.pct", MEDIA_RECORDING_UID: "media.recording.uid", MEDIA_TYPE_VIDEO: "video", MEDIA_TYPE_AUDIO: "audio" }, ae = { PlaybackRateMenuButton: "Speed", PlayToggle: "Play", FullscreenToggle: "Expand", TurnOnCamera: "Turn on", TurnOffCamera: "Turn off", DeleteButton: "Delete", RecordButton: "Record", StopButton: "Stop", PauseButton: "Pause" }, ke = "ul-card-video__player_recorder", Pn = "ul-video-btn", ht = 0, Rn = 1, Bi = ({ className: e, message: t, next: n, properties: r, questionId: o, type: i }) => {
2670
+ const { apiURL: s, envId: d, handleUploadUpdate: l, headers: u, responseGroupUid: m, surveyId: c, update: p, viewDocument: v, visitorId: h } = B((f) => ({ apiURL: f.apiURL, envId: f.envId, handleUploadUpdate: f.handleUploadUpdate, headers: f.headers, responseGroupUid: f.responseGroupUid, surveyId: f.surveyId, update: f.update, viewDocument: f.viewDocument, visitorId: f.userId })), [y, _] = V(!1), [k, x] = V(null), [L, I] = V(null), [w, S] = V(ht), g = J(null), N = r && r.videoUrl;
2671
+ Q(() => {
2672
+ const f = g.current, b = new ResizeObserver(() => {
2673
+ p();
2674
+ });
2675
+ return f && b.observe(f), () => {
2676
+ f && b.unobserve(f);
2677
+ };
2678
+ }, [p]);
2679
+ const T = (f, b) => {
2680
+ f === A.UPLOAD_STARTED ? (x(b[A.UPLOAD_ID]), I(b[A.MEDIA_RECORDING_UID]), _(!0)) : f === A.DELETE ? (x(null), I(null), _(!1)) : f === A.UPLOAD_PROGRESS ? isNaN(b[A.UPLOAD_PROGRESS_PCT]) ? l({ mediaRecordingUid: b[A.MEDIA_RECORDING_UID], isComplete: !0 }) : l({ mediaRecordingUid: b[A.MEDIA_RECORDING_UID], progressPct: b[A.UPLOAD_PROGRESS_PCT] }) : f === A.UPLOAD_FINISHED && l({ mediaRecordingUid: b[A.MEDIA_RECORDING_UID], isComplete: !0 });
2681
+ }, C = (f) => {
2682
+ f.preventDefault(), f.stopPropagation(), document.getElementById(ke) && ((b) => {
2683
+ const j = b + Ln;
2684
+ if (O.document.getElementById(j) && O.videojs) {
2685
+ try {
2686
+ if (!O.videojs(j).record().stream) return;
2687
+ } catch {
2688
+ return;
2689
+ }
2690
+ O.videojs(j).record().stop(), O.videojs(j).record().stopDevice();
2691
+ }
2692
+ })(ke), k && L ? (l({ mediaRecordingUid: L, isSubmitted: !0 }), n({ value: { mediaRecordingUid: L }, questionId: o, type: i }, !0)) : n({ value: null, questionId: o, type: i }, !0);
2693
+ };
2694
+ return a("form", { className: H(e, "ul-card--video", "fade-in-transition"), id: "ul-video-interview-form", children: [a(se, { message: t, properties: r }), a(me, { children: [a("div", { id: "ul-question-player-container", ref: g, style: { display: w === ht ? "" : "none" }, children: [a("div", { id: ke, ref: (f) => {
2695
+ if (f && f.children.length === 0 && !r.hideRecordedPrompt) {
2696
+ const b = Ui(ke, { src: N, type: "application/x-mpegURL" }, void 0, r.mediaType === A.MEDIA_TYPE_AUDIO, s, v);
2697
+ f.appendChild(b);
2698
+ }
2699
+ } }), a(pe, { defaultBody: () => a("button", { className: `${Pn} ul-record-response-btn`, onClick: (f) => {
2700
+ f.preventDefault(), f.stopPropagation(), document.getElementById(ke) && ((b) => {
2701
+ const j = Ye(b + Kr);
2702
+ j == null || j.pause();
2703
+ })(ke), S(Rn);
2704
+ } }), properties: r })] }), a("div", { style: { display: w === Rn ? "block" : "none" }, children: [a("button", { className: `${Pn} ul-back-question-btn`, onClick: (f) => {
2705
+ f.preventDefault(), f.stopPropagation(), S(ht);
2706
+ }, style: { display: r.hideRecordedPrompt ? "none" : "block" } }), a("div", { id: "ul-recorder-player-container", ref: (f) => {
2707
+ if (f && f.children.length === 0) {
2708
+ const b = ((j, D = {}, E = "https://api.userleap.com", q, R, M, z = !1, U = document) => {
2709
+ O.document = U;
2710
+ const F = j + Ln, te = to(F);
2711
+ return O.document.addEventListener("securitypolicyviolation", (ne) => {
2712
+ he(new Error(`Voice & Video feature violates ${ne.violatedDirective} web page CSP policies for the recorder player.`), "recorderDeviceError", E, M, D.visitorId, D.envId);
2713
+ }), Yr(Gr.concat(Pi), () => {
2714
+ St(F, te), O.document.getElementById(At(F)).remove();
2715
+ try {
2716
+ Mi(te, F, D, E, q, R, M, z);
2717
+ } catch (ne) {
2718
+ return void he(new Error(`Error when creating video recorder player object ${ne}`), "recorderDeviceError", E, M, D.visitorId, D.envId);
2719
+ }
2720
+ }), te;
2721
+ })(ke, { surveyId: c, responseGroupUid: m, questionId: o, visitorId: h, envId: d }, s, T, void 0, { ...u, "x-ul-video-recorder-origin": "sdk" }, r.mediaType === A.MEDIA_TYPE_AUDIO, v);
2722
+ f.appendChild(b);
2723
+ }
2724
+ } })] })] }), a(_e, { children: [a(X, { disabled: !y, onClick: C, children: xe(r) }), a("button", { className: "ul-card-text__button ul-button-inactive ul-card-skip__button", id: "ul-card-video__skip_button", onClick: C, style: { display: r.required ? "none" : "block", ...y ? { display: "none" } : {} }, children: Ht(r) })] })] });
2725
+ }, qi = ({ className: e }) => {
2726
+ const { uploadProgress: t } = B((i) => ({ uploadProgress: i.uploadProgress }));
2727
+ let n, r;
2728
+ Object.values(t).filter((i) => i.isSubmitted).length > 1 ? (n = "Your responses are processing", r = "Please keep this tab open until your responses are fully processed.") : (n = "Your response is processing", r = "Please keep this tab open until your response is fully processed.");
2729
+ const o = Math.round(Math.min(99, ...Object.values(t).filter((i) => i.isSubmitted).map((i) => i.progressPct || 0)));
2730
+ return a("div", { className: H(e, "ul-card--uploading", "fade-in-transition"), children: [a("div", { "aria-busy": "true", "aria-label": "Processing...", "aria-live": "polite", className: "ul-loading-spinner-container", role: "progressbar", children: a("div", { className: "ul-loading-spinner", children: [a("div", { className: "first" }), a("div", { className: "second" }), a("div", { className: "third" }), a("div", { className: "fourth" })] }) }), a(se, { message: `${n} (${o}% complete)` }), a("p", { className: "ul-caption", children: r })] });
2731
+ }, Ai = () => {
2732
+ var k;
2733
+ const { border: e, cards: t, forceBrandedLogo: n, headers: r, index: o, marketingUrl: i, showSurveyBrand: s, slugName: d, surveyId: l, viewedCardCount: u } = B((x) => ({ border: x.border, cards: x.cards, forceBrandedLogo: x.forceBrandedLogo, headers: x.headers, index: x.index, marketingUrl: x.marketingUrl, showSurveyBrand: x.showSurveyBrand, slugName: x.slugName, surveyId: x.surveyId, viewedCardCount: x.viewedCardCount })), m = J(null), c = t.filter((x) => x.type !== "uploading" && x.type !== "thanks"), p = ((x, L) => {
2734
+ const I = /* @__PURE__ */ new Set(["thanks", "uploading"]);
2735
+ if (L >= x.length || L < 0 || I.has(x[L].type)) return 0;
2736
+ const w = x.filter((g) => !I.has(g.type));
2737
+ if (L === w.length - 1) return 1;
2738
+ const S = { [w.length - 1]: 1, [-1]: 0 };
2739
+ for (let g = w.length - 2; g >= L; g--) {
2740
+ const N = w[g], T = Qo(g, N.props.routingOptions);
2741
+ if (T.length === 0) {
2742
+ S[g] = S[g + 1] + 1;
2743
+ continue;
2744
+ }
2745
+ let C = 0, f = Vo(N);
2746
+ if (f === null) return w.length - 1 - L;
2747
+ for (let b = 0; b < T.length && f.length !== 0; b++) {
2748
+ const { comparator: j, target: D, value: E } = T[b], q = f.filter((R) => {
2749
+ const M = Fo({ value: R }, N.type, R), z = Ir(R, N.type);
2750
+ return !(M && j === "answered" || z && j === "partial" || !M && !z && j === "skipped" || j === "given_up" && $o(R) && R.taskStatus === "given.up" || M && N.type === "open" && (j === "contains" || j === "notcontains") || M && zo(j) && Ot[j](R, E));
2751
+ });
2752
+ if (q.length < f.length) {
2753
+ const R = parseInt(String(D), 10);
2754
+ if (R !== -1 && R <= g || R >= w.length) return w.length - 1 - L;
2755
+ C = Math.max(S[R] + 1, C);
2756
+ }
2757
+ f = q;
2758
+ }
2759
+ f.length > 0 && (C = Math.max(S[g + 1] + 1, C)), S[g] = C;
2760
+ }
2761
+ return S[L];
2762
+ })(t, o), v = u + 1, h = v / (v + p), y = Hr({ marketingUrl: i, slugName: d, surveyId: l, forceBrandedLogo: n });
2763
+ Q(() => {
2764
+ m.current && (m.current.style.width = 100 * h + "%");
2765
+ }, [h]);
2766
+ const _ = ((k = t[o]) == null ? void 0 : k.type) === "thanks";
2767
+ return a("footer", { className: "ul-footer " + (r["userleap-platform"] === "link" ? "ul-footer__link" : ""), children: _ && n ? a(Ur, { marketingUrlLink: y }) : a(Z, { children: [c.length > 1 && a("div", { className: "ul-progress-bar-container ul-progress-bar-container__footer", children: a("div", { className: "ul-progress-bar-current", ref: m, style: { border: `1px solid ${e || "#000"}` } }) }), s ? a(Or, { forceBrandedLogo: n, marketingUrlLink: y }) : null] }) });
2768
+ }, Fi = () => {
2769
+ const e = B((s) => s.border), t = B((s) => s.cards), n = B((s) => s.index), r = B((s) => s.focusedQuestionId), { totalQuestions: o, fraction: i } = ue(() => {
2770
+ var u;
2771
+ const s = t.filter((m) => m.type !== "uploading" && m.type !== "thanks"), d = s.length;
2772
+ if (d <= 1) return { totalQuestions: d, fraction: 0 };
2773
+ if (((u = t[n]) == null ? void 0 : u.type) === "thanks") return { totalQuestions: d, fraction: 1 };
2774
+ const l = s.findIndex((m) => m.name === r);
2775
+ return { totalQuestions: d, fraction: (l >= 0 ? l : 0) / d };
2776
+ }, [t, n, r]);
2777
+ return o <= 1 ? null : a("div", { className: "ul-progress-bar-container ul-progress-bar-container__header", children: a("div", { className: "ul-progress-bar-current", style: { width: 100 * i + "%", border: `1px solid ${e ?? "#000"}` } }) });
2778
+ }, Vi = () => {
2779
+ const { answers: e, border: t, cards: n, close: r, configureExitOnOverlayClick: o, destroy: i, endCard: s, eventEmitFn: d, fontFamily: l, headers: u, index: m, minScrollableHeight: c, next: p, previewMode: v, productConfig: h, seen: y, showStripes: _, studyType: k, surveyId: x, update: L, useMobileStyling: I, viewDocument: w } = B((E) => ({ answers: E.answers, border: E.border, cards: E.cards, close: E.close, configureExitOnOverlayClick: E.configureExitOnOverlayClick, destroy: E.destroy, endCard: E.endCard, eventEmitFn: E.eventEmitFn, fontFamily: E.fontFamily, headers: E.headers, index: E.index, previewMode: E.previewMode, productConfig: E.productConfig, minScrollableHeight: E.minScrollableHeight, next: E.next, seen: E.seen, showStripes: E.showStripes, studyType: E.studyType, surveyId: E.surveyId, update: E.update, useMobileStyling: E.useMobileStyling, viewDocument: E.viewDocument })), S = J(null), g = J(!1), N = u["userleap-platform"], { props: T, type: C, name: f } = n[m];
2780
+ Q(() => {
2781
+ if (window.Sprig) return window.Sprig.trackHistory = (E) => B.getState().trackHistory(E), () => {
2782
+ window.Sprig.trackHistory = void 0;
2783
+ };
2784
+ }, []), Q(() => {
2785
+ S.current && (S.current.classList.contains("ul-app--visible") || S.current.classList.add("ul-app--visible"), !g.current && d && (g.current = !0, d(ie.SurveyAppeared, { name: ie.SurveyAppeared, "survey.id": x })));
2786
+ }, [d, x]), Q(() => {
2787
+ const E = () => {
2788
+ w.visibilityState === "visible" && (y(), w.removeEventListener("visibilitychange", E));
2789
+ };
2790
+ return w.addEventListener("visibilitychange", E), E(), () => {
2791
+ w.removeEventListener("visibilitychange", E);
2792
+ };
2793
+ }, [y, w]), Q(() => {
2794
+ L();
2795
+ }, [m, L]), Q(() => {
2796
+ o(() => r());
2797
+ }, [r, o]);
2798
+ const b = ue(() => co(n, m), [n, m]), j = Se((E) => {
2799
+ p({ data: E, completeSurvey: () => i(je), endCard: s }), ao(w);
2800
+ }, [p, i, s, w]);
2801
+ if (e) {
2802
+ for (const E of e) if (E.questionId === f) {
2803
+ let q;
2804
+ if (C === "multiplechoice") {
2805
+ const R = T.options.find(({ value: M }) => M === E.value);
2806
+ if (!R) break;
2807
+ q = { [R.id]: R.value };
2808
+ } else q = E.value;
2809
+ j({ value: q, type: C, questionId: E.questionId });
2810
+ break;
2811
+ }
2812
+ }
2813
+ const D = !I && ((h == null ? void 0 : h.framePosition) === "center" || (h == null ? void 0 : h.desktopDisplay) === "center-modal" || ((h == null ? void 0 : h.placement) || "").includes("center"));
2814
+ return a("div", { className: H("ul-app", We(u) ? "ul-app--visible" : "ul-app--overlay"), dir: "auto", id: je, onClick: (E) => {
2815
+ var z;
2816
+ const q = window.sprigAPI, R = E.target;
2817
+ if (!q || !R) return;
2818
+ const M = [R, R.parentElement];
2819
+ for (const U of M) if (((z = U == null ? void 0 : U.tagName) == null ? void 0 : z.toLowerCase()) === "a") {
2820
+ E.preventDefault();
2821
+ try {
2822
+ const F = new URL(U.href);
2823
+ F.protocol !== "http:" && F.protocol !== "https:" || (q == null || q.openUrl(F.toString()));
2824
+ } catch (F) {
2825
+ console.error(F);
2826
+ }
2827
+ return;
2828
+ }
2829
+ }, ref: S, style: { "--theme": t, ...l ? { fontFamily: l.replace(";", "") } : {}, ...D ? { position: "relative" } : {} }, children: a("div", { className: "ul-app__container", children: a("div", { className: H(Y("ul-card__container", I, k)), style: { ...k !== "feedbackButton" || (h == null ? void 0 : h.desktopDisplay) === "center-modal" ? { borderColor: t } : {}, ...(h == null ? void 0 : h.desktopDisplay) === "slider" ? { margin: "0px" } : {} }, children: a("div", { className: "sprig-container", style: { minHeight: c }, children: [_ && a("div", { className: "ul-header__container", dir: "ltr", children: a("div", { className: "ul-header", children: "For development purposes only" }) }), v && a("div", { className: "ul-header__container", dir: "ltr", children: a("div", { className: "ul-header", children: "Preview Mode: Response will not be recorded." }) }), re(k) && a(Fi, {}), a("div", { className: H(Go("ul-card-main-content", N)), children: a(yi, { cards: b, next: j }) }), !re(k) && a(Ai, {})] }) }) }) });
2830
+ }, no = () => MediaRecorder.isTypeSupported("video/webm") ? "video/webm" : "video/mp4", Mn = (e) => {
2831
+ const t = { audioBitsPerSecond: 128e3, videoBitsPerSecond: 25e5, mimeType: no() };
2832
+ return new MediaRecorder(e, t);
2833
+ }, On = (e, t, n) => {
2834
+ n[t] = [], e.ondataavailable = function(r) {
2835
+ n[t].push(r.data);
2836
+ }, e.currentMediaRecordingUid = t, e.start();
2837
+ };
2838
+ function Un(e, t, n, r, o, i) {
2839
+ if (e && e.state !== "inactive") {
2840
+ const { "begin.callback": s } = r, d = e.currentMediaRecordingUid;
2841
+ if (!d) return;
2842
+ s && s(d), e.onstop = () => async function(l, u, m, c, p, v, h) {
2843
+ const y = B.getState().viewDocument, { "upload.callback": _, "progress.callback": k } = c, x = { mediaType: m, updatedAt: (/* @__PURE__ */ new Date()).toISOString(), mediaRecordingUid: p, ...c["passthrough.data"] }, L = await (async (g, N) => {
2844
+ var C;
2845
+ const T = await fetch(N, { method: "POST", cache: "no-cache", headers: { "Content-Type": "application/json" }, body: JSON.stringify(g) });
2846
+ if (T.ok) {
2847
+ const f = await T.json();
2848
+ return (C = f == null ? void 0 : f.upload) == null ? void 0 : C.url;
2849
+ }
2850
+ return null;
2851
+ })(x, l);
2852
+ if (!L) return void (_ && _(null, { message: "failed to get upload url" }));
2853
+ const I = new Blob(h, { type: no() });
2854
+ if (!y.defaultView) return;
2855
+ const w = new y.defaultView.File([I], `recording video ${Date.now()}`), S = v.createUpload({ endpoint: L, file: w, chunkSize: 5120 });
2856
+ S.on("error", (g) => {
2857
+ _ && _(null, g);
2858
+ }), S.on("progress", (g) => {
2859
+ k && k(p, g);
2860
+ }), S.on("success", () => {
2861
+ _ && _(p, !0);
2862
+ });
2863
+ }(t, 0, n, r, d, o, i), e.stop();
2864
+ }
2865
+ }
2866
+ const zi = { state: { chunks: {} }, stopRecording(e) {
2867
+ const { uploadApiEndpoint: t, avRecorder: n, screenRecorder: r, UpChunk: o } = this.state, i = this.state.avStream && this.state.avStream.getVideoTracks().length > 0 ? "video" : "audio";
2868
+ this.state.chunks && t && o && (n != null && n.currentMediaRecordingUid && Un(n, t, i, e, o, this.state.chunks[n == null ? void 0 : n.currentMediaRecordingUid]), r != null && r.currentMediaRecordingUid && Un(r, t, "screen", e, o, this.state.chunks[r == null ? void 0 : r.currentMediaRecordingUid]));
2869
+ }, handleCancelledStream(e) {
2870
+ const t = e.getVideoTracks(), n = e.getAudioTracks();
2871
+ let r = t.length && t[0];
2872
+ r = r || n.length && n[0], r && r.addEventListener("ended", () => {
2873
+ [this.state.avRecorder, this.state.screenRecorder].map((o) => {
2874
+ o && (o.state === "recording" && o.stop(), o.stream.getTracks().map((i) => {
2875
+ i.readyState === "live" && i.stop();
2876
+ }));
2877
+ }), Object.assign(this.state, { avStream: null, captureStream: null, avRecorder: null, screenRecorder: null });
2878
+ });
2879
+ }, taskDurationMillisecond() {
2880
+ return this.state.startTime ? (/* @__PURE__ */ new Date()).getTime() - this.state.startTime.getTime() : 0;
2881
+ }, setUpChunk(e) {
2882
+ this.state.UpChunk = e;
2883
+ }, configure(e, t) {
2884
+ Object.assign(this.state, t), this.state.uploadApiEndpoint = `${t.apiURL}/2/environments/integrations/upload`, this.state.chunks = {}, e.on("permission.status", this.permissionStatusCallback.bind(this)), e.on("av.permission", async (n) => {
2885
+ this.avPermissionCallback(n);
2886
+ }), e.on("begin.recording", this.beginRecordingCallback.bind(this)), e.on("start.task", this.startTaskCallback.bind(this)), e.on("screen.permission", async (n) => {
2887
+ this.screenPermissionCallback(n);
2888
+ }), e.on("finish.task", async (n) => {
2889
+ this.finishTaskCallback(n);
2890
+ });
2891
+ }, async avPermissionCallback(e) {
2892
+ var r, o, i;
2893
+ const { "stream.ready": t, "permission.descriptors": n } = e;
2894
+ try {
2895
+ (r = this.state.avStream) != null && r.active && (this.state.avStream.getTracks().map((s) => s.readyState === "live" && s.stop()), ((o = this.state.captureStream) == null ? void 0 : o.getAudioTracks().length) === 1 && this.state.captureStream.removeTrack(this.state.captureStream.getAudioTracks()[0])), this.state.avStream = await navigator.mediaDevices.getUserMedia({ video: n.includes("camera"), audio: !0 }), ((i = this.state.captureStream) == null ? void 0 : i.getAudioTracks().length) === 0 && this.state.captureStream.addTrack(this.state.avStream.getAudioTracks()[0]), this.handleCancelledStream(this.state.avStream);
2896
+ } catch (s) {
2897
+ return console.warn("Error: failed to get permissions: " + s), void (t && t(null, null));
2898
+ }
2899
+ t && t(this.state.avStream, this.state.captureStream);
2900
+ }, async screenPermissionCallback(e) {
2901
+ const { "screen.permission.requested": t, "stream.ready.callback": n } = e;
2902
+ t == null || t(!0);
2903
+ try {
2904
+ this.state.captureStream = await navigator.mediaDevices.getDisplayMedia({ video: !0, cursor: "always", displaySurface: "browser", preferCurrentTab: !0 });
2905
+ } catch (r) {
2906
+ return t == null || t(!1), console.warn("Error: failed to get permissions: " + r), void (n && n(null, null));
2907
+ }
2908
+ t == null || t(!1), this.state.avStream && this.state.avStream.getAudioTracks().length > 0 && this.state.captureStream.addTrack(this.state.avStream.getAudioTracks()[0]), this.handleCancelledStream(this.state.captureStream), n && n(this.state.avStream || null, this.state.captureStream);
2909
+ }, beginRecordingCallback(e) {
2910
+ const { "recording.media.types": t, "start.recording.callback": n = () => {
2911
+ } } = e;
2912
+ if (!t) return;
2913
+ const r = [];
2914
+ if (t.includes("video") && this.state.avStream) {
2915
+ this.state.avRecorder = Mn(this.state.avStream);
2916
+ const o = ft();
2917
+ On(this.state.avRecorder, o, this.state.chunks), r.push(o);
2918
+ }
2919
+ if (t.includes("screen") && this.state.captureStream) {
2920
+ this.state.screenRecorder = Mn(this.state.captureStream);
2921
+ const o = ft();
2922
+ On(this.state.screenRecorder, o, this.state.chunks), r.push(o);
2923
+ }
2924
+ r && n && n(r);
2925
+ }, async finishTaskCallback(e) {
2926
+ const { "current.index": t, "task.response": n, "task.complete.callback": r } = e;
2927
+ await this.stopRecording(e), r && r(this.taskDurationMillisecond()), this.state.cards && this.state.hasEndCard !== void 0 && this.lookAheadAndStopStream(t, n, this.state.cards, this.state.hasEndCard);
2928
+ }, startTaskCallback() {
2929
+ this.state.startTime = /* @__PURE__ */ new Date();
2930
+ }, permissionStatusCallback(e) {
2931
+ var r;
2932
+ const { "permission.status.callback": t } = e, n = this.state.avStream;
2933
+ t && t(n, !!n && (n == null ? void 0 : n.getVideoTracks().length) > 0, !!((r = this.state.captureStream) != null && r.active), this.state.captureStream);
2934
+ }, lookAheadAndStopStream(e, t, n, r) {
2935
+ const { avRecorder: o, screenRecorder: i } = this.state, { allResponses: s } = B.getState(), d = jr({ cards: n, index: e, hasEndCard: r, allResponses: s });
2936
+ d !== null && n[d].type === "recordedtask" || [o, i].map((l) => {
2937
+ l && (l.state === "recording" && l.stop(), l.stream.getTracks().map((u) => {
2938
+ u.readyState === "live" && u.stop();
2939
+ }));
2940
+ });
2941
+ } }, Qe = Object.create(zi);
2942
+ Object.freeze(Qe);
2943
+ const $i = ({ mode: e = null, viewWindow: t, viewDocument: n, trackPageViewUrl: r }) => {
2944
+ const o = n.documentElement;
2945
+ let i;
2946
+ try {
2947
+ i = t.parent.location.href;
2948
+ } catch {
2949
+ i = t.location.href;
2950
+ }
2951
+ return { mode: e, sw: t.screen.width, sh: t.screen.height, cw: o.clientWidth, ch: o.clientHeight, p: r ?? i, l: t.navigator.language };
2952
+ }, Zi = { configure: function(e, t = !0) {
2953
+ var k;
2954
+ const { answers: n, apiURL: r, endCard: o, eventEmitFn: i, fontFamilyURL: s, frame: d, previewKey: l, viewDocument: u, viewWindow: m } = e, c = We(e.headers) ? e.frame : u.body, p = e.UpChunk || window.UpChunk, v = Re, h = ((x, L) => {
2955
+ const I = [...x], w = /* @__PURE__ */ new Set(["videovoice", "recordedtask"]);
2956
+ return x.some((S) => w.has(S.type)) && I.push({ name: -2, props: { routingOptions: [] }, type: "uploading" }), L && I.push({ name: -1, props: { routingOptions: [] }, type: "thanks" }), I;
2957
+ })(e.cards, !!o);
2958
+ Qe.configure(v, { cards: h, hasEndCard: !!o, apiURL: r, UpChunk: p }), B.setState({ apiURL: r, answers: n, border: e.border, index: e.startingQuestionIdx || 0, cards: h, configureExitOnOverlayClick: e.configureExitOnOverlayClick, customMetadata: e.customMetadata, endCard: e.endCard, envId: e.envId, eventEmitFn: i, fontFamily: e.fontFamily, forceBrandedLogo: e.forceBrandedLogo, frame: d, headers: e.headers, hasViewedEmbed: !1, isPreview: e.isPreview, marketingUrl: "https://sprig.com", meta: $i({ mode: e.mode, viewWindow: m, viewDocument: u, trackPageViewUrl: e.trackPageViewUrl }), mode: e.mode, previewKey: l, previewMode: e.previewMode, productConfig: e.productConfig, recorder: Qe, recorderEventEmitter: v, responseGroupUid: e.responseGroupUid, showStripes: e.showStripes, showSurveyBrand: e.showSurveyBrand, slugName: e.slugName, styleNonce: e.styleNonce, studyType: e.studyType, surveyId: e.surveyId, tabTitle: e.tabTitle, uploadingCardViewed: !1, uploadProgress: {}, useMobileStyling: e.useMobileStyling, useDesktopPrototype: e.useDesktopPrototype, userId: e.userId, viewDocument: e.viewDocument, visitorAttributes: e.visitorAttributes, viewedCardCount: e.startingQuestionIdx || 0 });
2959
+ const { head: y } = u;
2960
+ if (Vt({ document: u, elementId: "sprig-style", styleString: `html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}button,input,select,textarea{margin:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}ol,ul{padding-inline-start:1em}.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}}.ul-card{flex:1 1 auto;border-radius:2px;display:flex;flex-direction:column;font-size:17px;line-height:19px;text-align:start;min-width:200px;justify-content:center;animation:enable-transitions 0s .3s forwards;min-height:0}@keyframes enable-transitions{to{transition:opacity .2s ease-in-out}}.ul-focus-transitions-active .ul-card,.ul-card--with-transitions{transition:opacity .2s ease-in-out}.ul-card__container--desktop{border:2px solid #fff;box-shadow:0 0 15px #00000026;margin:15px}.ul-card__container--mobile{border-width:0;box-shadow:0 0 5px #00000040;margin-top:5px}.ul-card__container--desktop_longFormSurvey,.ul-card__container--mobile_longFormSurvey{margin:0}.sprig-container{display:flex;flex-direction:column;width:100%;height:fit-content;flex:1 1 auto;min-height:0;justify-content:center}.ul-card__container{background:#fff;border-radius:6px;display:flex;flex-direction:column;flex-grow:1;flex:1 1 auto;font-size:17px;line-height:23px;padding:0;min-height:0;position:relative;text-align:center;word-break:normal;overflow:auto}.ul-card__container--desktop_feedbackButton{box-shadow:unset}.ul-card-vertical__button-wrapper{flex-direction:column;align-items:center}.ul-card__button-wrapper{margin-top:4px;display:flex;gap:16px;justify-content:center;align-self:stretch}.sprig-question-footer-container{align-items:center;width:100%;height:fit-content;display:flex;flex-direction:column;padding:12px 20px 0}.long-form-question-footer-container{position:fixed;bottom:0;left:0;width:100%;display:flex;justify-content:space-between;align-items:center;overflow:visible;z-index:1000;pointer-events:none;padding:32px}.long-form-question-footer-container--mobile{background-color:#fff;border-top:1px solid #e6e6e6;padding:16px 24px}.long-form-question-footer-container-center{justify-content:center}.long-form-question-footer-container .long-form-question-footer-container-logo{width:auto;pointer-events:auto}.long-form-question-footer-container-center .long-form-question-footer-container-logo{margin-left:0}.long-form-question-footer-container .long-form-question-footer-container-actions{display:flex;gap:8px;pointer-events:auto}.long-form-question-footer-container .long-form-question-footer-container-actions .long-form-button{display:flex;justify-content:center;align-items:center;gap:8px;padding:12px;border-radius:8px;height:40px;width:40px}.long-form-question-footer-container .long-form-question-footer-container-actions .long-form-button .long-form-button-text-container{display:flex;align-items:center}.ul-rich-text-body{min-height:2em}.ul-rich-text-body,.ul-rich-text-body p{margin-top:10px;margin-bottom:10px}.ul-rich-text-body li{margin:5px 0}.ul-rich-text-body p,.ul-rich-text-body li{font-size:15px;line-height:130.35%;letter-spacing:.02em;color:#343442;text-align:start;white-space:pre-line}.ul-rich-text-body:last-child,.ul-rich-text-body li:last-child{margin-bottom:15px}.ul-card-main-content__link,.ul-card-main-content__email,.ul-card-main-content__web,.ul-card-main-content__android,.ul-card-main-content__ios{display:flex;flex:1 1 auto;min-height:0;flex-direction:column;z-index:2;height:fit-content}.sprig-border-bottom{border-bottom:1px solid rgba(0,0,0,.1)}.sprig-border-top{border-top:1px solid rgba(0,0,0,.1)}.question-header-container{z-index:1}.sprig-header-container{padding:16px}.question-header-button-container{display:grid;grid-template-columns:97fr 3fr;align-items:center;justify-content:space-between;width:100%;height:fit-content}.ul-card--thanks-content .question-header-button-container{justify-content:center}.sprig-question-body{padding:0 20px;min-height:0;flex-shrink:1;overflow:auto;position:relative;align-self:stretch;width:100%}.sprig-stretch{align-self:stretch}.ul-question{color:#343442;display:block;font-size:17px;line-height:125%;font-weight:500;cursor:default;text-align:start}.ul-question ol,.ul-question ul,.ul-caption ol,.ul-caption ul{margin-left:1em}.ul-caption{flex:1 0 auto;font-size:14px;line-height:130.35%;letter-spacing:.02em;color:#6c6c6e;text-align:start;margin-top:4px}.ul-card__choices{margin:5px 0 0;flex:1 0}.choice--mobile{border:2px solid #e6e6e6}.choice--desktop{border:1px solid #e6e6e6}.choice{align-items:flex-start;color:#262136;cursor:pointer;display:flex;justify-content:flex-start;flex-direction:column;box-sizing:border-box;border-radius:3px;margin-bottom:7px;font-size:15px;line-height:20px;padding:10px 20px 10px 15px;background-color:#00000003}.choice--desktop:hover,.choice--desktop:active,.choice--mobile:active{background-color:#0000000d}.choice-label-container{align-items:center;display:flex;flex-direction:row;flex:0 0 fit-content;gap:15px;height:fit-content;justify-content:flex-start;width:100%}.choice-text-entry-container{width:100%;height:fit-content;flex:0 1 fit-content;overflow:hidden}.choice .choice-text-input--mobile{max-height:63px}.choice .choice-text-input--desktop{max-height:150px}.choice .choice-text-input{box-sizing:border-box;background-color:transparent;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;min-height:20px;max-height:60px;padding:0;margin-top:8px;resize:none;width:100%;font-size:14px;line-height:20px;outline:none;border:none;overflow-wrap:break-word}.choice .choice-text-input::placeholder{color:#6c6c6e80}.ul-thanks-check{text-align:center;margin-bottom:20px}.ul-card--thanks-content{padding:20px 0 10px}.ul-card--thanks .ul-question{padding-top:0;text-align:center}.ul-card--thanks .ul-caption{padding-top:0;text-align:center;overflow-wrap:break-word;-webkit-hyphens:auto;hyphens:auto;hyphenate-limit-lines:no-limit}.ul-card--uploading .ul-question{padding-top:15px;text-align:center}.ul-card--uploading .ul-caption{padding-top:5px;text-align:center;overflow-wrap:break-word}.select-checkbox{height:16px;width:16px;display:flex;box-sizing:border-box;background-color:"transparent";align-items:center;justify-content:center;border-radius:4px;border:1px solid #b0b5b7;flex-shrink:0}.select-radio{height:16px;width:16px;border-radius:16px;border:1px solid #323232;display:flex;box-sizing:border-box;box-shadow:inset 2px 2px #0000001a;background-color:"transparent";align-items:center;justify-content:center}.footer{width:100%;margin-top:12px;font-size:12px;line-height:12px;color:#000000b3}[class^=CenteredSurveyLayout] .ul-header__container,[class^=QuestionConceptTestLayout] .ul-header__container,.ul-websurvey-frame .ul-card__container,.ul-websurvey-frame-mobile .ul-card__container{margin-bottom:unset}[class^=CenteredSurveyLayout] .ul-card__container,[class^=QuestionConceptTestLayout] .ul-card__container,.ul-websurvey-frame .ul-card__container,.ul-websurvey-frame-mobile .ul-card__container{align-self:center;box-shadow:unset;border-radius:unset;border:none!important;position:unset;width:100%}@media only screen and (min-height: 600px) and (width: 600px){.ul-card{position:relative;top:-20px}}.ul-vertical-centered-container{display:flex;flex-direction:column;align-items:center;align-self:stretch}.sprig-accordion{width:100%;margin-bottom:8px}.sprig-accordion-body{width:100%;overflow:hidden}.sprig-accordion-header-container{background:transparent;border:none;display:flex;flex-direction:row;align-items:center;justify-content:space-between;width:100%;cursor:pointer;margin:8px 0 0;padding:0;font-family:inherit}.sprig-header-label-container{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:8px;flex:1 1 0}.sprig-header-label{color:#343442;font-size:15px;font-weight:590;line-height:21px;text-align:start;overflow:hidden}.sprig-check-background{flex:0 0 16px;height:16px;width:16px;border-radius:8px;margin-right:8px;background-color:#efefee;display:flex;align-items:center;justify-content:center}.sprig-check{height:9px;width:9px;margin-left:-1px}.sprig-check path{stroke:#506067;stroke-width:1.5}.sprig-caret{height:20px;width:20px;transition-property:transform}.sprig-caret path{stroke:#000}.ul-card-longform__submit-button-container{display:flex;justify-content:flex-end}.ul-card-longform__submit-button-container .ul-card-longform__submit-button{display:flex;flex-direction:row;align-items:center;white-space:nowrap;gap:4px;border-radius:8px;color:#fff;cursor:pointer}.ul-card-longform__submit-button-container .ul-card-longform__submit-button:disabled{opacity:.5;cursor:not-allowed}.ul-card-list-container--longform{display:flex;flex-direction:column;gap:2rem;width:100%;align-items:center;padding-block-start:calc(40vh - 100px);padding-block-end:calc(50vh - 100px);height:auto}@media (min-height: 1200px){.ul-card-list-container--longform{padding-block-start:calc(50vh - 100px)}}.ul-card-scroll-wrapper{width:100%;max-width:100vw;position:relative;display:flex;justify-content:center}.ul-card--unfocused{opacity:.3;transition:opacity .3s ease-in-out}.ul-consent-legal__name-input--mobile{border:2px solid #e6e6e6}.ul-consent-legal__name-input--desktop{border:1px solid #e6e6e6}.ul-consent-legal__name-input{background:#00000003;box-sizing:border-box;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;padding:10px 20px 10px 15px;border-radius:3px;font-size:15px;line-height:20px;margin-bottom:7px;width:100%}.ul-consent-legal__name-input::placeholder{color:#6c6c6e80}.ul-consent-legal__name-input:focus{outline:none;background:#fff}.ul-consent-legal__name-input--desktop:hover:not(:focus){background-color:#0000000d}.ul-card__consent-legal .choice{font-size:15px;padding:10px 15px;background-color:#00000003}.ul-card__consent-legal .choice--desktop:hover,.ul-card__consent-legal .choice--desktop:active,.ul-card__consent-legal .choice--mobile:active{background-color:#0000000d}.ul-card--likert__numbers{align-items:center;border-radius:5px;display:flex;flex-direction:row;flex:1 0;justify-content:center;margin:5px 0 0}.ul-card--likert__numbers>button{padding:unset}.likert-number--mobile{border:2px solid #e6e6e6}.likert-number--mobile:not(:first-child){margin-inline-start:-2px}.likert-number--desktop{border:1px solid #e6e6e6}.likert-number--desktop:not(:first-child){margin-inline-start:-1px}.likert-number{align-items:center;cursor:pointer;display:flex;justify-content:center;flex:1 0;background-color:#00000003;font-size:18px;line-height:24px;height:67px}.likert-number:first-child{border-start-start-radius:5px;border-end-start-radius:5px}.likert-number:last-child{border-start-end-radius:5px;border-end-end-radius:5px}.likert-number:active,.likert-number--desktop:hover{background-color:#0000000d;font-weight:500}.likert-star--mobile:not(:first-child){margin-inline-start:-2px}.likert-star--desktop:not(:first-child){margin-inline-start:-1px}.likert-star{align-items:center;cursor:pointer;display:flex;justify-content:space-between;flex:1 0;color:transparent;font-size:18px;line-height:24px;height:67px;background:unset;border:unset}.likert-smiley--mobile:not(:first-child){margin-inline-start:-2px}.likert-smiley--desktop:not(:first-child){margin-inline-start:-1px}.likert-smiley{align-items:center;cursor:pointer;display:flex;justify-content:space-between;flex:1 0;color:transparent;line-height:24px;height:67px;background:unset;border:unset}.likert-smiley>svg{margin:0 auto}.likert-smiley circle:not(:first-child){fill-opacity:1}.ul-card--likert__labels{align-items:center;color:#262136;display:flex;flex-direction:row;flex:1 0;font-weight:500;font-size:13px;line-height:15px;justify-content:space-between;margin:7px 0 10px}.ul-card--likert__labels>span:last-child{margin-left:auto;flex:1 1 auto;min-width:0;text-align:right}.ul-card--matrix_grid{display:grid;grid-template-columns:max-content repeat(var(--numColumns),minmax(107px,1fr));grid-template-rows:repeat(var(--numRows),min-content);margin:0 auto;row-gap:4px;width:max-content}.ul-card--matrix_grid_longform{width:100%}.ul-matrix-row-options{display:grid;grid-column:2/-1;grid-template-columns:subgrid}.ul-matrix-column-label{font-size:15px;max-width:150px;padding:10px 12px;text-align:center}.ul-card--matrix_container{margin-bottom:16px;overflow:auto}.ul-card--matrix_question_container{display:flex;flex-direction:column}.ul-matrix-scroll-gradient{-webkit-mask-image:linear-gradient(90deg,#000 90%,transparent);mask-image:linear-gradient(90deg,#000 90%,transparent)}.ul-matrix-scroll-gradient:dir(rtl){-webkit-mask-image:linear-gradient(270deg,#000,90%,transparent);mask-image:linear-gradient(270deg,#000,90%,transparent)}.ul-matrix-scroll-gradient:dir(rtl)+.ul-matrix-scroll-arrow{rotate:180deg}.ul-matrix-scroll-arrow{align-self:flex-end;background:none;border:none;color:#000;padding:0;position:absolute;top:45%}.ul-matrix-scroll-arrow:hover{cursor:pointer}.ul-matrix-option-wrapper{align-items:center;background:#f9f9f8;display:flex;justify-content:center;padding:10px 12px}.ul-matrix-last-option{border-start-end-radius:4px;border-end-end-radius:4px}.ul-matrix-row-label{align-items:center;background:#f9f9f8;border-end-start-radius:4px;border-start-start-radius:4px;display:flex;font-size:15px;left:0;right:0;max-width:200px;min-width:100px;padding:10px 12px;position:sticky}.ul-matrix-option-selected{border:6px solid var(--border);box-shadow:none}.ul-card__matrix{max-width:100%}.select-label{cursor:pointer;flex:1;overflow-wrap:anywhere;text-align:start}.ul-card--nps__numbers{align-items:center;border-radius:5px;display:flex;flex-direction:row;flex:1 0;justify-content:center;margin:5px 0 0}.nps-number--mobile{border:2px solid #e6e6e6}.nps-number--mobile:not(:first-child){margin-inline-start:-2px}.nps-number--desktop{border:1px solid #e6e6e6}.nps-number--desktop:not(:first-child){margin-inline-start:-1px}.nps-number{align-items:center;cursor:pointer;display:flex;justify-content:center;flex:1 0;background-color:#00000003;font-size:18px;line-height:24px;height:67px;padding:unset}.nps-number:first-child{border-start-start-radius:5px;border-end-start-radius:5px}.nps-number:last-child{border-start-end-radius:5px;border-end-end-radius:5px}.nps-number:active,.nps-number--desktop:hover{background-color:#0000000d;font-weight:500}.ul-card--nps__labels{align-items:center;color:#262136;display:flex;flex-direction:row;flex:1 0;font-weight:500;font-size:13px;line-height:15px;justify-content:space-between;margin:7px 0 10px}.ul-card-rank__labels{font-size:14px;font-style:normal;font-weight:600;line-height:150%}.ul-card--rank__question-inner-container{padding:0 16px}.ul-card-rank__list{list-style-type:none;padding-inline-start:0;margin:4px 0}.ul-card-rank__option{display:flex;align-items:center;padding:8px;gap:8px;align-self:stretch;border:1px solid #e2e3e1;border-radius:8px;margin-bottom:4px}.ul-card-rank__option:last-child{margin-bottom:0}.ul-card-rank__drag-btn{display:inline-flex;align-items:center;justify-content:center;line-height:0;padding:0;width:25px;height:25px;margin-left:auto;color:#0b2330;cursor:grab;background:transparent;border:0}.ul-card-rank__drag-btn:active,.ul-card-rank__option:active{cursor:grabbing}.ul-card-rank__option svg{display:block}.ul-card-rank__option.is-dragging{opacity:1;box-shadow:0 8px 25px #00000026,0 3px 10px #0000001a;z-index:1000;background:#fff;border-color:#0b2330}.ul-card-rank__option.is-drop-target{background:#0b23301a;border-radius:8px;border-color:#0b23301a}.ul-card-rank__option.is-drop-target select,.ul-card-rank__option.is-drop-target span,.ul-card-rank__option.is-drop-target button{visibility:hidden}.ul-card-rank__option span{font-size:14px;font-weight:400}.ul-card-rank__select{appearance:none;-webkit-appearance:none;-moz-appearance:none;box-sizing:border-box;height:25px;min-height:25px;border:1px solid #E2E3E1;border-radius:4px;font-size:14px;line-height:1.4;padding:2px 28px 2px 8px;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='13' viewBox='0 0 12 13' fill='none'><path d='M9.75 5L6 8.75L2.25 5' stroke='%230B2330' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");background-repeat:no-repeat;background-position:right 8px center;background-size:12px 12px;background-color:#fff;cursor:pointer}.ul-card-rank__select.ul-card-rank__select--placeholder{color:#b0b5b7}.ul-card-text{margin-top:2px;margin-bottom:3px;display:flex;flex-direction:column;justify-content:center;padding:0;width:100%}.ul-card-text__container{align-items:center;box-sizing:border-box;border-radius:3px;display:flex;justify-content:center;margin-bottom:12px;flex:1 0 100%}.ul-card-text__input--mobile{border:2px solid #e6e6e6;max-height:63px}.ul-card-text__input--desktop{border:1px solid #e6e6e6;max-height:150px}.ul-card-text__input{background:#00000003;box-sizing:border-box;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;min-height:63px;overflow:auto;padding:12px;resize:none;width:100%;border-radius:3px;font-size:15px;line-height:20px;overflow-wrap:break-word}.ul-card-text__input::placeholder{color:#6c6c6e80}.ul-card-text__input:focus{outline:none;background:#fff}.ul-card-text__input--desktop:hover:not(:focus){background-color:#0000000d}.ul-card__text-url-prompt-button{text-decoration:none;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;max-width:-webkit-fill-available}#ul-card-video__player_recorder{width:100%;width:-moz-available;width:-webkit-fill-available;width:fill-available}.ul-card-record__task{flex:1 0 auto;margin-top:2px;margin-bottom:3px;align-items:center;display:flex;flex-wrap:wrap;justify-content:center;padding:0}#ul-record-task-upload-progress,#ul-record-task-video-preview{width:100%;height:150px}.ul-permission-graphics-container{width:100%;height:150px;background-color:#0000000d;text-align:center;flex-direction:column;margin-left:auto;margin-right:auto;border-radius:5px;display:flex;align-items:center;font-size:15px;color:#000000b3}.ul-av-permission-denied-paragraph{margin:auto 15px;font-size:12px}.ul-av-permission-denied-headline{font-size:14px;color:#262136;text-decoration:underline;font-size:12px}.ul-permission-body{color:#000;margin:5px auto 5px 5px;line-height:135%;text-align:center}.ul-select-tab-container{width:240px;height:46px;background:#fff;border-radius:5px;text-align:start;align-items:center;display:flex;padding:0 5px;margin-top:20px;margin-bottom:auto}.ul-select-tab-text{color:#4b575d;margin:5px;line-height:135%;text-align:center}button.ul-task-skip-button{color:#000;background-color:#fff}#ul-task-detail-container{margin-top:0;margin-bottom:0;overflow:auto}#ul-task-detail-container.ul-rich-text-body p,#ul-task-detail-container.ul-rich-text-body li,#ul-task-detail-container.ul-rich-text-body{color:#4c4c4c}#ul-task-detail-container :first-child{margin-top:0}#ul-task-detail-container :last-child{margin-bottom:20px}.ul-horizontal-button-container{width:100%;display:flex;flex-direction:row}.ul-skip-button-below{margin-top:5px}.ul-horizontal-button-container-center{justify-content:center}.ul-vertical-button-container-center{display:flex;flex-direction:column;align-items:center}.ul-horizontal-button-container-left{justify-content:flex-start}.ul_recorded-task-inset-spacing{margin-top:5px;margin-bottom:24px}.ul_permission_svg_container{justify-content:center}.ul-card-text__button{background-color:var(--theme);border-radius:3px;border:none;color:#fff;cursor:pointer;font-size:15px;font-weight:500;line-height:18px;padding:10.5px 21px}.ul-card-text__button:disabled,.ul-card-text__button.sprig-button-disabled{background-color:#0000001a;color:#0003}.ul-card-text__button:disabled>svg path,.ul-card-text__button.sprig-button-disabled>svg path{stroke:#0003}.ul-card-text__button.ul-button-inactive{background-color:#fff!important;color:#5d696f!important}.ul-card-skip__button{color:#00000080;background:none;border:none;font-size:15px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;cursor:pointer}.ul-card-button-group{align-items:center;display:flex;gap:15px;justify-content:center;flex-direction:column}.select-button{align-items:center;background-color:transparent;border-radius:8px;border:1px solid #0b2330;box-shadow:0 0 0 2px #c8cccc;cursor:pointer;display:flex;font-size:15px;justify-content:space-between;margin-bottom:8px;padding:4px 8px 4px 16px;width:100%}.select-button:hover{background-color:#f3f3f3}.select-button:active{background-color:#eee}.select-button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select-button.select-button-placeholder{color:#b0b5b7}.select-button svg{flex-shrink:0}.select-list{position:relative;height:fit-content;padding:4px 0;z-index:100;background-color:#fff;border:1px solid #E2E3E1;box-shadow:0 16px 24px #0b23300d,0 4px 12px #0b233008;border-radius:8px;overflow-y:scroll;width:100%}.select-option{align-items:center;cursor:pointer;display:flex;font-size:15px;gap:16px;line-height:20px;padding:8px 16px}.select-option:hover{background-color:#f3f3f3}html,body{cursor:default;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;height:100%;overflow:hidden;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;-webkit-touch-callout:none}b{font-weight:500}form{margin-block-end:0;margin-block-start:0}#ul-app{opacity:0;width:100%;flex-grow:2;display:flex}#ul-app.ul-app--overlay{position:absolute;bottom:0;transition:opacity .1s ease-out;transition-delay:.1s}#ul-app.ul-app--visible{opacity:1;bottom:0}.ul-app__container{width:100%;display:flex;flex-direction:column;max-height:100vh}.ul-header__container{margin-bottom:15px}.ul-header{align-items:center;background:repeating-linear-gradient(120deg,#ebebeb,#ebebeb 24px,#fff 24px,#fff 48px);border-bottom:2px solid #ebebeb;display:flex;font-size:14px;font-weight:500;height:40px;justify-content:center;width:100%}.ul-footer{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;margin-top:auto;flex-grow:0;width:100%;min-height:10px;height:fit-content;flex-shrink:0}.ul-footer>.yellow-footer-logo{background:#fad133;border:1px solid #f9c600;border-radius:14px;padding:6px 12px}.ul-footer>.yellow-footer-logo:hover{background:#f9c600}.ul-footer .thank-you-card-link{background:#00000003;border:1px solid #e6e6e6;border-radius:8px;cursor:pointer;display:inline-flex;font-size:14px;gap:12px;margin-bottom:15px;padding:12px;text-align:initial;width:280px}.ul-footer .thank-you-card-link:hover{background:#00000008}.ul-footer>a{color:inherit}.ul-footer-bubble{display:inline-block;margin:0 3px;width:7px;height:7px;border-radius:3px;border:1px solid transparent}.sprig-box-logo{background:#f9c600;border-radius:5px;display:flex;padding:4px}.close-container{display:flex;justify-content:flex-end;width:100%;height:0}.close-btn{cursor:pointer;height:16px;margin-inline-end:-10px;position:relative;top:-10px;width:16px;z-index:1;align-self:flex-start;justify-self:end;flex-shrink:0}.ul-app__container{transition:opacity .3s ease-out}.ul-center-horizontally{text-align:center}.ul-progress-bar-container{width:100%;height:2px;background-color:#0000001a;border-radius:2px}.ul-progress-bar-container__footer{max-width:250px;margin:16px 0}.ul-progress-bar-container__header{position:fixed;top:80px;max-width:unset;margin:0;z-index:3}.ul-progress-bar-current{transition:width 1s ease;width:0%;height:0;border-radius:2px}.prototype-button{align-self:stretch;background:#00000003;border:1.5px solid #e6e6e6;border-radius:4px 0 0 4px;flex:none;flex-grow:0;height:fit-content;line-height:16.5px;margin:0 20px;padding:20px 0;font-size:14px;font-family:inherit;text-decoration:underline}.prototype-button:hover{cursor:pointer}` }), e.customStyles && Vt({ document: u, elementId: "ul-custom-style", styleString: e.customStyles, nonce: e.styleNonce }), e.fontFamily && s && parent) {
2961
+ const x = u.createElement("link");
2962
+ x.rel = "stylesheet", x.href = s, y.appendChild(x);
2963
+ }
2964
+ if (!p && e.cards.some((x) => x.type === "recordedtask")) {
2965
+ const x = u.createElement("script");
2966
+ x.src = e.upchunkLibraryURL ?? "https://cdn.sprig.com/userleap-web-upchunk-v2.2.2.js", x.onload = () => {
2967
+ Qe.setUpChunk(m.UpChunk);
2968
+ }, x.onerror = () => {
2969
+ console.warn("[Sprig] - recording functionality not configured due to UpChunk library load failure");
2970
+ }, y.appendChild(x);
2971
+ }
2972
+ const _ = i || ((k = d.eventEmitter) == null ? void 0 : k.emit);
2973
+ _ == null || _("verify.view.version", { "view.version": "2.34.2" }), c && t && (Le(a(Vi, {}), c), Re.once(ie.SurveyClosed, () => {
2974
+ Rt(c);
2975
+ }));
2976
+ } };
2977
+ export {
2978
+ Zi as default
2979
+ };