@sprig-technologies/sprig-browser 2.32.5 → 2.32.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2831 +0,0 @@
1
- import { C as Ot, A as Ce, a as Fr, D as Wr, E as Zr, b as Pe, d as kt, r as Gr, e as Ut } from "./core-CvUGAzD0.js";
2
- import { b as Kr, D as Ht, e as Be, h as Fe, S as fe, s as ut, v as pt } from "./metricsReporter-CNRFRN0r.js";
3
- var Le, D, Pn, be, Bt, Dn, mt, Rn, Ne = {}, Nn = [], Yr = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, We = Array.isArray;
4
- function ue(e, t) {
5
- for (var n in t)
6
- e[n] = t[n];
7
- return e;
8
- }
9
- function Mn(e) {
10
- var t = e.parentNode;
11
- t && t.removeChild(e);
12
- }
13
- function z(e, t, n) {
14
- var r, o, i, a = {};
15
- for (i in t)
16
- i == "key" ? r = t[i] : i == "ref" ? o = t[i] : a[i] = t[i];
17
- if (arguments.length > 2 && (a.children = arguments.length > 3 ? Le.call(arguments, 2) : n), typeof e == "function" && e.defaultProps != null)
18
- for (i in e.defaultProps)
19
- a[i] === void 0 && (a[i] = e.defaultProps[i]);
20
- return De(e, a, r, o, null);
21
- }
22
- function De(e, t, n, r, o) {
23
- 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 ?? ++Pn, __i: -1, __u: 0 };
24
- return o == null && D.vnode != null && D.vnode(i), i;
25
- }
26
- function Ln() {
27
- return { current: null };
28
- }
29
- function J(e) {
30
- return e.children;
31
- }
32
- function oe(e, t) {
33
- this.props = e, this.context = t;
34
- }
35
- function Ee(e, t) {
36
- if (t == null)
37
- return e.__ ? Ee(e.__, e.__i + 1) : null;
38
- for (var n; t < e.__k.length; t++)
39
- if ((n = e.__k[t]) != null && n.__e != null)
40
- return n.__e;
41
- return typeof e.type == "function" ? Ee(e) : null;
42
- }
43
- function On(e) {
44
- var t, n;
45
- if ((e = e.__) != null && e.__c != null) {
46
- for (e.__e = e.__c.base = null, t = 0; t < e.__k.length; t++)
47
- if ((n = e.__k[t]) != null && n.__e != null) {
48
- e.__e = e.__c.base = n.__e;
49
- break;
50
- }
51
- return On(e);
52
- }
53
- }
54
- function ht(e) {
55
- (!e.__d && (e.__d = !0) && be.push(e) && !Ze.__r++ || Bt !== D.debounceRendering) && ((Bt = D.debounceRendering) || Dn)(Ze);
56
- }
57
- function Ze() {
58
- var e, t, n, r, o, i, a, c, s;
59
- for (be.sort(mt); e = be.shift(); )
60
- e.__d && (t = be.length, r = void 0, i = (o = (n = e).__v).__e, c = [], s = [], (a = n.__P) && ((r = ue({}, o)).__v = o.__v + 1, D.vnode && D.vnode(r), wt(a, r, o, n.__n, a.ownerSVGElement !== void 0, 32 & o.__u ? [i] : null, c, i ?? Ee(o), !!(32 & o.__u), s), r.__.__k[r.__i] = r, Hn(c, r, s), r.__e != i && On(r)), be.length > t && be.sort(mt));
61
- Ze.__r = 0;
62
- }
63
- function At(e, t, n, r, o, i, a, c, s, p, u) {
64
- var l, m, h, _, b, f = r && r.__k || Nn, y = t.length;
65
- for (n.__d = s, function(x, T, S) {
66
- var C, k, j, w, g, v = T.length, P = S.length, I = P, L = 0;
67
- for (x.__k = [], C = 0; C < v; C++)
68
- (k = x.__k[C] = (k = T[C]) == null || typeof k == "boolean" || typeof k == "function" ? null : typeof k == "string" || typeof k == "number" || typeof k == "bigint" || k.constructor == String ? De(null, k, null, null, k) : We(k) ? De(J, { children: k }, null, null, null) : k.constructor === void 0 && k.__b > 0 ? De(k.type, k.props, k.key, k.ref ? k.ref : null, k.__v) : k) != null ? (k.__ = x, k.__b = x.__b + 1, g = Qr(k, S, w = C + L, I), k.__i = g, j = null, g !== -1 && (I--, (j = S[g]) && (j.__u |= 131072)), j == null || j.__v === null ? (g == -1 && L--, typeof k.type != "function" && (k.__u |= 65536)) : g !== w && (g === w + 1 ? L++ : g > w ? I > v - w ? L += g - w : L-- : L = g < w && g == w - 1 ? g - w : 0, g !== C + L && (k.__u |= 65536))) : (j = S[C]) && j.key == null && j.__e && (j.__e == x.__d && (x.__d = Ee(j)), vt(j, j, !1), S[C] = null, I--);
69
- if (I)
70
- for (C = 0; C < P; C++)
71
- (j = S[C]) != null && !(131072 & j.__u) && (j.__e == x.__d && (x.__d = Ee(j)), vt(j, j));
72
- }(n, t, f), s = n.__d, l = 0; l < y; l++)
73
- (h = n.__k[l]) != null && typeof h != "boolean" && typeof h != "function" && (m = h.__i === -1 ? Ne : f[h.__i] || Ne, h.__i = l, wt(e, h, m, o, i, a, c, s, p, u), _ = h.__e, h.ref && m.ref != h.ref && (m.ref && Ct(m.ref, null, h), u.push(h.ref, h.__c || _, h)), b == null && _ != null && (b = _), 65536 & h.__u || m.__k === h.__k ? s = Un(h, s, e) : typeof h.type == "function" && h.__d !== void 0 ? s = h.__d : _ && (s = _.nextSibling), h.__d = void 0, h.__u &= -196609);
74
- n.__d = s, n.__e = b;
75
- }
76
- function Un(e, t, n) {
77
- var r, o;
78
- if (typeof e.type == "function") {
79
- for (r = e.__k, o = 0; r && o < r.length; o++)
80
- r[o] && (r[o].__ = e, t = Un(r[o], t, n));
81
- return t;
82
- }
83
- return e.__e != t && (n.insertBefore(e.__e, t || null), t = e.__e), t && t.nextSibling;
84
- }
85
- function pe(e, t) {
86
- return t = t || [], e == null || typeof e == "boolean" || (We(e) ? e.some(function(n) {
87
- pe(n, t);
88
- }) : t.push(e)), t;
89
- }
90
- function Qr(e, t, n, r) {
91
- var o = e.key, i = e.type, a = n - 1, c = n + 1, s = t[n];
92
- if (s === null || s && o == s.key && i === s.type)
93
- return n;
94
- if (r > (s == null || 131072 & s.__u ? 0 : 1))
95
- for (; a >= 0 || c < t.length; ) {
96
- if (a >= 0) {
97
- if ((s = t[a]) && !(131072 & s.__u) && o == s.key && i === s.type)
98
- return a;
99
- a--;
100
- }
101
- if (c < t.length) {
102
- if ((s = t[c]) && !(131072 & s.__u) && o == s.key && i === s.type)
103
- return c;
104
- c++;
105
- }
106
- }
107
- return -1;
108
- }
109
- function Vt(e, t, n) {
110
- t[0] === "-" ? e.setProperty(t, n ?? "") : e[t] = n == null ? "" : typeof n != "number" || Yr.test(t) ? n : n + "px";
111
- }
112
- function He(e, t, n, r, o) {
113
- var i;
114
- e:
115
- if (t === "style")
116
- if (typeof n == "string")
117
- e.style.cssText = n;
118
- else {
119
- if (typeof r == "string" && (e.style.cssText = r = ""), r)
120
- for (t in r)
121
- n && t in n || Vt(e.style, t, "");
122
- if (n)
123
- for (t in n)
124
- r && n[t] === r[t] || Vt(e.style, t, n[t]);
125
- }
126
- else if (t[0] === "o" && t[1] === "n")
127
- 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 ? $t : qt, i)) : e.removeEventListener(t, i ? $t : qt, i);
128
- else {
129
- if (o)
130
- t = t.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
131
- 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)
132
- try {
133
- e[t] = n ?? "";
134
- break e;
135
- } catch {
136
- }
137
- typeof n == "function" || (n == null || n === !1 && t[4] !== "-" ? e.removeAttribute(t) : e.setAttribute(t, n));
138
- }
139
- }
140
- function qt(e) {
141
- var t = this.l[e.type + !1];
142
- if (e.t) {
143
- if (e.t <= t.u)
144
- return;
145
- } else
146
- e.t = Date.now();
147
- return t(D.event ? D.event(e) : e);
148
- }
149
- function $t(e) {
150
- return this.l[e.type + !0](D.event ? D.event(e) : e);
151
- }
152
- function wt(e, t, n, r, o, i, a, c, s, p) {
153
- var u, l, m, h, _, b, f, y, x, T, S, C, k, j, w, g = t.type;
154
- if (t.constructor !== void 0)
155
- return null;
156
- 128 & n.__u && (s = !!(32 & n.__u), i = [c = t.__e = n.__e]), (u = D.__b) && u(t);
157
- e:
158
- if (typeof g == "function")
159
- try {
160
- if (y = t.props, x = (u = g.contextType) && r[u.__c], T = u ? x ? x.props.value : u.__ : r, n.__c ? f = (l = t.__c = n.__c).__ = l.__E : ("prototype" in g && g.prototype.render ? t.__c = l = new g(y, T) : (t.__c = l = new oe(y, T), l.constructor = g, l.render = Jr), x && x.sub(l), l.props = y, l.state || (l.state = {}), l.context = T, l.__n = r, m = l.__d = !0, l.__h = [], l._sb = []), l.__s == null && (l.__s = l.state), g.getDerivedStateFromProps != null && (l.__s == l.state && (l.__s = ue({}, l.__s)), ue(l.__s, g.getDerivedStateFromProps(y, l.__s))), h = l.props, _ = l.state, l.__v = t, m)
161
- g.getDerivedStateFromProps == null && l.componentWillMount != null && l.componentWillMount(), l.componentDidMount != null && l.__h.push(l.componentDidMount);
162
- else {
163
- if (g.getDerivedStateFromProps == null && y !== h && l.componentWillReceiveProps != null && l.componentWillReceiveProps(y, T), !l.__e && (l.shouldComponentUpdate != null && l.shouldComponentUpdate(y, l.__s, T) === !1 || t.__v === n.__v)) {
164
- for (t.__v !== n.__v && (l.props = y, l.state = l.__s, l.__d = !1), t.__e = n.__e, t.__k = n.__k, t.__k.forEach(function(v) {
165
- v && (v.__ = t);
166
- }), S = 0; S < l._sb.length; S++)
167
- l.__h.push(l._sb[S]);
168
- l._sb = [], l.__h.length && a.push(l);
169
- break e;
170
- }
171
- l.componentWillUpdate != null && l.componentWillUpdate(y, l.__s, T), l.componentDidUpdate != null && l.__h.push(function() {
172
- l.componentDidUpdate(h, _, b);
173
- });
174
- }
175
- if (l.context = T, l.props = y, l.__P = e, l.__e = !1, C = D.__r, k = 0, "prototype" in g && g.prototype.render) {
176
- for (l.state = l.__s, l.__d = !1, C && C(t), u = l.render(l.props, l.state, l.context), j = 0; j < l._sb.length; j++)
177
- l.__h.push(l._sb[j]);
178
- l._sb = [];
179
- } else
180
- do
181
- l.__d = !1, C && C(t), u = l.render(l.props, l.state, l.context), l.state = l.__s;
182
- while (l.__d && ++k < 25);
183
- l.state = l.__s, l.getChildContext != null && (r = ue(ue({}, r), l.getChildContext())), m || l.getSnapshotBeforeUpdate == null || (b = l.getSnapshotBeforeUpdate(h, _)), At(e, We(w = u != null && u.type === J && u.key == null ? u.props.children : u) ? w : [w], t, n, r, o, i, a, c, s, p), l.base = t.__e, t.__u &= -161, l.__h.length && a.push(l), f && (l.__E = l.__ = null);
184
- } catch (v) {
185
- t.__v = null, s || i != null ? (t.__e = c, t.__u |= s ? 160 : 32, i[i.indexOf(c)] = null) : (t.__e = n.__e, t.__k = n.__k), D.__e(v, t, n);
186
- }
187
- else
188
- i == null && t.__v === n.__v ? (t.__k = n.__k, t.__e = n.__e) : t.__e = function(v, P, I, L, U, E, B, M, A) {
189
- var R, q, G, le, F, K, ge, te = I.props, de = P.props, ne = P.type;
190
- if (ne === "svg" && (U = !0), E != null) {
191
- for (R = 0; R < E.length; R++)
192
- if ((F = E[R]) && "setAttribute" in F == !!ne && (ne ? F.localName === ne : F.nodeType === 3)) {
193
- v = F, E[R] = null;
194
- break;
195
- }
196
- }
197
- if (v == null) {
198
- if (ne === null)
199
- return document.createTextNode(de);
200
- v = U ? document.createElementNS("http://www.w3.org/2000/svg", ne) : document.createElement(ne, de.is && de), E = null, M = !1;
201
- }
202
- if (ne === null)
203
- te === de || M && v.data === de || (v.data = de);
204
- else {
205
- if (E = E && Le.call(v.childNodes), te = I.props || Ne, !M && E != null)
206
- for (te = {}, R = 0; R < v.attributes.length; R++)
207
- te[(F = v.attributes[R]).name] = F.value;
208
- for (R in te)
209
- F = te[R], R == "children" || (R == "dangerouslySetInnerHTML" ? G = F : R === "key" || R in de || He(v, R, null, F, U));
210
- for (R in de)
211
- F = de[R], R == "children" ? le = F : R == "dangerouslySetInnerHTML" ? q = F : R == "value" ? K = F : R == "checked" ? ge = F : R === "key" || M && typeof F != "function" || te[R] === F || He(v, R, F, te[R], U);
212
- if (q)
213
- M || G && (q.__html === G.__html || q.__html === v.innerHTML) || (v.innerHTML = q.__html), P.__k = [];
214
- else if (G && (v.innerHTML = ""), At(v, We(le) ? le : [le], P, I, L, U && ne !== "foreignObject", E, B, E ? E[0] : I.__k && Ee(I, 0), M, A), E != null)
215
- for (R = E.length; R--; )
216
- E[R] != null && Mn(E[R]);
217
- M || (R = "value", K !== void 0 && (K !== v[R] || ne === "progress" && !K || ne === "option" && K !== te[R]) && He(v, R, K, te[R], !1), R = "checked", ge !== void 0 && ge !== v[R] && He(v, R, ge, te[R], !1));
218
- }
219
- return v;
220
- }(n.__e, t, n, r, o, i, a, s, p);
221
- (u = D.diffed) && u(t);
222
- }
223
- function Hn(e, t, n) {
224
- t.__d = void 0;
225
- for (var r = 0; r < n.length; r++)
226
- Ct(n[r], n[++r], n[++r]);
227
- D.__c && D.__c(t, e), e.some(function(o) {
228
- try {
229
- e = o.__h, o.__h = [], e.some(function(i) {
230
- i.call(o);
231
- });
232
- } catch (i) {
233
- D.__e(i, o.__v);
234
- }
235
- });
236
- }
237
- function Ct(e, t, n) {
238
- try {
239
- typeof e == "function" ? e(t) : e.current = t;
240
- } catch (r) {
241
- D.__e(r, n);
242
- }
243
- }
244
- function vt(e, t, n) {
245
- var r, o;
246
- if (D.unmount && D.unmount(e), (r = e.ref) && (r.current && r.current !== e.__e || Ct(r, null, t)), (r = e.__c) != null) {
247
- if (r.componentWillUnmount)
248
- try {
249
- r.componentWillUnmount();
250
- } catch (i) {
251
- D.__e(i, t);
252
- }
253
- r.base = r.__P = null, e.__c = void 0;
254
- }
255
- if (r = e.__k)
256
- for (o = 0; o < r.length; o++)
257
- r[o] && vt(r[o], t, n || typeof e.type != "function");
258
- n || e.__e == null || Mn(e.__e), e.__ = e.__e = e.__d = void 0;
259
- }
260
- function Jr(e, t, n) {
261
- return this.constructor(e, n);
262
- }
263
- function Se(e, t, n) {
264
- var r, o, i, a;
265
- D.__ && D.__(e, t), o = (r = typeof n == "function") ? null : n && n.__k || t.__k, i = [], a = [], wt(t, e = (!r && n || t).__k = z(J, null, [e]), o || Ne, Ne, t.ownerSVGElement !== void 0, !r && n ? [n] : o ? null : t.firstChild ? Le.call(t.childNodes) : null, i, !r && n ? n : o ? o.__e : t.firstChild, r, a), Hn(i, e, a);
266
- }
267
- function Bn(e, t) {
268
- Se(e, t, Bn);
269
- }
270
- function Xr(e, t, n) {
271
- var r, o, i, a, c = ue({}, e.props);
272
- for (i in e.type && e.type.defaultProps && (a = e.type.defaultProps), t)
273
- i == "key" ? r = t[i] : i == "ref" ? o = t[i] : c[i] = t[i] === void 0 && a !== void 0 ? a[i] : t[i];
274
- return arguments.length > 2 && (c.children = arguments.length > 3 ? Le.call(arguments, 2) : n), De(e.type, c, r || e.key, o || e.ref, null);
275
- }
276
- function An(e, t) {
277
- var n = { __c: t = "__cC" + Rn++, __: e, Consumer: function(r, o) {
278
- return r.children(o);
279
- }, Provider: function(r) {
280
- var o, i;
281
- return this.getChildContext || (o = [], (i = {})[t] = this, this.getChildContext = function() {
282
- return i;
283
- }, this.shouldComponentUpdate = function(a) {
284
- this.props.value !== a.value && o.some(function(c) {
285
- c.__e = !0, ht(c);
286
- });
287
- }, this.sub = function(a) {
288
- o.push(a);
289
- var c = a.componentWillUnmount;
290
- a.componentWillUnmount = function() {
291
- o.splice(o.indexOf(a), 1), c && c.call(a);
292
- };
293
- }), r.children;
294
- } };
295
- return n.Provider.__ = n.Consumer.contextType = n;
296
- }
297
- Le = Nn.slice, D = { __e: function(e, t, n, r) {
298
- for (var o, i, a; t = t.__; )
299
- if ((o = t.__c) && !o.__)
300
- try {
301
- if ((i = o.constructor) && i.getDerivedStateFromError != null && (o.setState(i.getDerivedStateFromError(e)), a = o.__d), o.componentDidCatch != null && (o.componentDidCatch(e, r || {}), a = o.__d), a)
302
- return o.__E = o;
303
- } catch (c) {
304
- e = c;
305
- }
306
- throw e;
307
- } }, Pn = 0, oe.prototype.setState = function(e, t) {
308
- var n;
309
- n = this.__s != null && this.__s !== this.state ? this.__s : this.__s = ue({}, this.state), typeof e == "function" && (e = e(ue({}, n), this.props)), e && ue(n, e), e != null && this.__v && (t && this._sb.push(t), ht(this));
310
- }, oe.prototype.forceUpdate = function(e) {
311
- this.__v && (this.__e = !0, e && this.__h.push(e), ht(this));
312
- }, oe.prototype.render = J, be = [], Dn = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, mt = function(e, t) {
313
- return e.__v.__b - t.__v.__b;
314
- }, Ze.__r = 0, Rn = 0;
315
- var me, $, tt, zt, je = 0, Vn = [], Ae = [], Ft = D.__b, Wt = D.__r, Zt = D.diffed, Gt = D.__c, Kt = D.unmount;
316
- function xe(e, t) {
317
- D.__h && D.__h($, e, je || t), je = 0;
318
- var n = $.__H || ($.__H = { __: [], __h: [] });
319
- return e >= n.__.length && n.__.push({ __V: Ae }), n.__[e];
320
- }
321
- function W(e) {
322
- return je = 1, Et(Fn, e);
323
- }
324
- function Et(e, t, n) {
325
- var r = xe(me++, 2);
326
- if (r.t = e, !r.__c && (r.__ = [n ? n(t) : Fn(void 0, t), function(c) {
327
- var s = r.__N ? r.__N[0] : r.__[0], p = r.t(s, c);
328
- s !== p && (r.__N = [p, r.__[1]], r.__c.setState({}));
329
- }], r.__c = $, !$.u)) {
330
- var o = function(c, s, p) {
331
- if (!r.__c.__H)
332
- return !0;
333
- var u = r.__c.__H.__.filter(function(m) {
334
- return m.__c;
335
- });
336
- if (u.every(function(m) {
337
- return !m.__N;
338
- }))
339
- return !i || i.call(this, c, s, p);
340
- var l = !1;
341
- return u.forEach(function(m) {
342
- if (m.__N) {
343
- var h = m.__[0];
344
- m.__ = m.__N, m.__N = void 0, h !== m.__[0] && (l = !0);
345
- }
346
- }), !(!l && r.__c.props === c) && (!i || i.call(this, c, s, p));
347
- };
348
- $.u = !0;
349
- var i = $.shouldComponentUpdate, a = $.componentWillUpdate;
350
- $.componentWillUpdate = function(c, s, p) {
351
- if (this.__e) {
352
- var u = i;
353
- i = void 0, o(c, s, p), i = u;
354
- }
355
- a && a.call(this, c, s, p);
356
- }, $.shouldComponentUpdate = o;
357
- }
358
- return r.__N || r.__;
359
- }
360
- function Q(e, t) {
361
- var n = xe(me++, 3);
362
- !D.__s && jt(n.__H, t) && (n.__ = e, n.i = t, $.__H.__h.push(n));
363
- }
364
- function Oe(e, t) {
365
- var n = xe(me++, 4);
366
- !D.__s && jt(n.__H, t) && (n.__ = e, n.i = t, $.__h.push(n));
367
- }
368
- function ee(e) {
369
- return je = 5, Te(function() {
370
- return { current: e };
371
- }, []);
372
- }
373
- function qn(e, t, n) {
374
- je = 6, Oe(function() {
375
- return typeof e == "function" ? (e(t()), function() {
376
- return e(null);
377
- }) : e ? (e.current = t(), function() {
378
- return e.current = null;
379
- }) : void 0;
380
- }, n == null ? n : n.concat(e));
381
- }
382
- function Te(e, t) {
383
- var n = xe(me++, 7);
384
- return jt(n.__H, t) ? (n.__V = e(), n.i = t, n.__h = e, n.__V) : n.__;
385
- }
386
- function Me(e, t) {
387
- return je = 8, Te(function() {
388
- return e;
389
- }, t);
390
- }
391
- function $n(e) {
392
- var t = $.context[e.__c], n = xe(me++, 9);
393
- return n.c = e, t ? (n.__ == null && (n.__ = !0, t.sub($)), t.props.value) : e.__;
394
- }
395
- function St(e, t) {
396
- D.useDebugValue && D.useDebugValue(t ? t(e) : e);
397
- }
398
- function zn() {
399
- var e = xe(me++, 11);
400
- if (!e.__) {
401
- for (var t = $.__v; t !== null && !t.__m && t.__ !== null; )
402
- t = t.__;
403
- var n = t.__m || (t.__m = [0, 0]);
404
- e.__ = "P" + n[0] + "-" + n[1]++;
405
- }
406
- return e.__;
407
- }
408
- function eo() {
409
- for (var e; e = Vn.shift(); )
410
- if (e.__P && e.__H)
411
- try {
412
- e.__H.__h.forEach(Ve), e.__H.__h.forEach(ft), e.__H.__h = [];
413
- } catch (t) {
414
- e.__H.__h = [], D.__e(t, e.__v);
415
- }
416
- }
417
- D.__b = function(e) {
418
- $ = null, Ft && Ft(e);
419
- }, D.__r = function(e) {
420
- Wt && Wt(e), me = 0;
421
- var t = ($ = e.__c).__H;
422
- t && (tt === $ ? (t.__h = [], $.__h = [], t.__.forEach(function(n) {
423
- n.__N && (n.__ = n.__N), n.__V = Ae, n.__N = n.i = void 0;
424
- })) : (t.__h.forEach(Ve), t.__h.forEach(ft), t.__h = [], me = 0)), tt = $;
425
- }, D.diffed = function(e) {
426
- Zt && Zt(e);
427
- var t = e.__c;
428
- t && t.__H && (t.__H.__h.length && (Vn.push(t) !== 1 && zt === D.requestAnimationFrame || ((zt = D.requestAnimationFrame) || to)(eo)), t.__H.__.forEach(function(n) {
429
- n.i && (n.__H = n.i), n.__V !== Ae && (n.__ = n.__V), n.i = void 0, n.__V = Ae;
430
- })), tt = $ = null;
431
- }, D.__c = function(e, t) {
432
- t.some(function(n) {
433
- try {
434
- n.__h.forEach(Ve), n.__h = n.__h.filter(function(r) {
435
- return !r.__ || ft(r);
436
- });
437
- } catch (r) {
438
- t.some(function(o) {
439
- o.__h && (o.__h = []);
440
- }), t = [], D.__e(r, n.__v);
441
- }
442
- }), Gt && Gt(e, t);
443
- }, D.unmount = function(e) {
444
- Kt && Kt(e);
445
- var t, n = e.__c;
446
- n && n.__H && (n.__H.__.forEach(function(r) {
447
- try {
448
- Ve(r);
449
- } catch (o) {
450
- t = o;
451
- }
452
- }), n.__H = void 0, t && D.__e(t, n.__v));
453
- };
454
- var Yt = typeof requestAnimationFrame == "function";
455
- function to(e) {
456
- var t, n = function() {
457
- clearTimeout(r), Yt && cancelAnimationFrame(t), setTimeout(e);
458
- }, r = setTimeout(n, 100);
459
- Yt && (t = requestAnimationFrame(n));
460
- }
461
- function Ve(e) {
462
- var t = $, n = e.__c;
463
- typeof n == "function" && (e.__c = void 0, n()), $ = t;
464
- }
465
- function ft(e) {
466
- var t = $;
467
- e.__c = e.__(), $ = t;
468
- }
469
- function jt(e, t) {
470
- return !e || e.length !== t.length || t.some(function(n, r) {
471
- return n !== e[r];
472
- });
473
- }
474
- function Fn(e, t) {
475
- return typeof t == "function" ? t(e) : t;
476
- }
477
- function Wn(e, t) {
478
- for (var n in t)
479
- e[n] = t[n];
480
- return e;
481
- }
482
- function gt(e, t) {
483
- for (var n in e)
484
- if (n !== "__source" && !(n in t))
485
- return !0;
486
- for (var r in t)
487
- if (r !== "__source" && e[r] !== t[r])
488
- return !0;
489
- return !1;
490
- }
491
- function Ge(e) {
492
- this.props = e;
493
- }
494
- function Zn(e, t) {
495
- function n(o) {
496
- var i = this.props.ref, a = i == o.ref;
497
- return !a && i && (i.call ? i(null) : i.current = null), t ? !t(this.props, o) || !a : gt(this.props, o);
498
- }
499
- function r(o) {
500
- return this.shouldComponentUpdate = n, z(e, o);
501
- }
502
- return r.displayName = "Memo(" + (e.displayName || e.name) + ")", r.prototype.isReactComponent = !0, r.__f = !0, r;
503
- }
504
- (Ge.prototype = new oe()).isPureReactComponent = !0, Ge.prototype.shouldComponentUpdate = function(e, t) {
505
- return gt(this.props, e) || gt(this.state, t);
506
- };
507
- var Qt = D.__b;
508
- D.__b = function(e) {
509
- e.type && e.type.__f && e.ref && (e.props.ref = e.ref, e.ref = null), Qt && Qt(e);
510
- };
511
- var no = typeof Symbol < "u" && Symbol.for && Symbol.for("react.forward_ref") || 3911;
512
- function It(e) {
513
- function t(n) {
514
- var r = Wn({}, n);
515
- return delete r.ref, e(r, n.ref || null);
516
- }
517
- return t.$$typeof = no, t.render = t, t.prototype.isReactComponent = t.__f = !0, t.displayName = "ForwardRef(" + (e.displayName || e.name) + ")", t;
518
- }
519
- var Jt = function(e, t) {
520
- return e == null ? null : pe(pe(e).map(t));
521
- }, Gn = { map: Jt, forEach: Jt, count: function(e) {
522
- return e ? pe(e).length : 0;
523
- }, only: function(e) {
524
- var t = pe(e);
525
- if (t.length !== 1)
526
- throw "Children.only";
527
- return t[0];
528
- }, toArray: pe }, ro = D.__e;
529
- D.__e = function(e, t, n, r) {
530
- if (e.then) {
531
- for (var o, i = t; i = i.__; )
532
- if ((o = i.__c) && o.__c)
533
- return t.__e == null && (t.__e = n.__e, t.__k = n.__k), o.__c(e, t);
534
- }
535
- ro(e, t, n, r);
536
- };
537
- var Xt = D.unmount;
538
- function Kn(e, t, n) {
539
- return e && (e.__c && e.__c.__H && (e.__c.__H.__.forEach(function(r) {
540
- typeof r.__c == "function" && r.__c();
541
- }), e.__c.__H = null), (e = Wn({}, e)).__c != null && (e.__c.__P === n && (e.__c.__P = t), e.__c = null), e.__k = e.__k && e.__k.map(function(r) {
542
- return Kn(r, t, n);
543
- })), e;
544
- }
545
- function Yn(e, t, n) {
546
- return e && n && (e.__v = null, e.__k = e.__k && e.__k.map(function(r) {
547
- return Yn(r, t, n);
548
- }), e.__c && e.__c.__P === t && (e.__e && n.appendChild(e.__e), e.__c.__e = !0, e.__c.__P = n)), e;
549
- }
550
- function Re() {
551
- this.__u = 0, this.t = null, this.__b = null;
552
- }
553
- function Qn(e) {
554
- var t = e.__.__c;
555
- return t && t.__a && t.__a(e);
556
- }
557
- function Jn(e) {
558
- var t, n, r;
559
- function o(i) {
560
- if (t || (t = e()).then(function(a) {
561
- n = a.default || a;
562
- }, function(a) {
563
- r = a;
564
- }), r)
565
- throw r;
566
- if (!n)
567
- throw t;
568
- return z(n, i);
569
- }
570
- return o.displayName = "Lazy", o.__f = !0, o;
571
- }
572
- function we() {
573
- this.u = null, this.o = null;
574
- }
575
- D.unmount = function(e) {
576
- var t = e.__c;
577
- t && t.__R && t.__R(), t && 32 & e.__u && (e.type = null), Xt && Xt(e);
578
- }, (Re.prototype = new oe()).__c = function(e, t) {
579
- var n = t.__c, r = this;
580
- r.t == null && (r.t = []), r.t.push(n);
581
- var o = Qn(r.__v), i = !1, a = function() {
582
- i || (i = !0, n.__R = null, o ? o(c) : c());
583
- };
584
- n.__R = a;
585
- var c = function() {
586
- if (!--r.__u) {
587
- if (r.state.__a) {
588
- var s = r.state.__a;
589
- r.__v.__k[0] = Yn(s, s.__c.__P, s.__c.__O);
590
- }
591
- var p;
592
- for (r.setState({ __a: r.__b = null }); p = r.t.pop(); )
593
- p.forceUpdate();
594
- }
595
- };
596
- r.__u++ || 32 & t.__u || r.setState({ __a: r.__b = r.__v.__k[0] }), e.then(a, a);
597
- }, Re.prototype.componentWillUnmount = function() {
598
- this.t = [];
599
- }, Re.prototype.render = function(e, t) {
600
- if (this.__b) {
601
- if (this.__v.__k) {
602
- var n = document.createElement("div"), r = this.__v.__k[0].__c;
603
- this.__v.__k[0] = Kn(this.__b, n, r.__O = r.__P);
604
- }
605
- this.__b = null;
606
- }
607
- var o = t.__a && z(J, null, e.fallback);
608
- return o && (o.__u &= -33), [z(J, null, t.__a ? null : e.children), o];
609
- };
610
- var en = function(e, t, n) {
611
- if (++n[1] === n[0] && e.o.delete(t), e.props.revealOrder && (e.props.revealOrder[0] !== "t" || !e.o.size))
612
- for (n = e.u; n; ) {
613
- for (; n.length > 3; )
614
- n.pop()();
615
- if (n[1] < n[0])
616
- break;
617
- e.u = n = n[2];
618
- }
619
- };
620
- function oo(e) {
621
- return this.getChildContext = function() {
622
- return e.context;
623
- }, e.children;
624
- }
625
- function io(e) {
626
- var t = this, n = e.i;
627
- t.componentWillUnmount = function() {
628
- Se(null, t.l), t.l = null, t.i = null;
629
- }, t.i && t.i !== n && t.componentWillUnmount(), t.l || (t.i = n, t.l = { nodeType: 1, parentNode: n, childNodes: [], appendChild: function(r) {
630
- this.childNodes.push(r), t.i.appendChild(r);
631
- }, insertBefore: function(r, o) {
632
- this.childNodes.push(r), t.i.appendChild(r);
633
- }, removeChild: function(r) {
634
- this.childNodes.splice(this.childNodes.indexOf(r) >>> 1, 1), t.i.removeChild(r);
635
- } }), Se(z(oo, { context: t.context }, e.__v), t.l);
636
- }
637
- function Xn(e, t) {
638
- var n = z(io, { __v: e, i: t });
639
- return n.containerInfo = t, n;
640
- }
641
- (we.prototype = new oe()).__a = function(e) {
642
- var t = this, n = Qn(t.__v), r = t.o.get(e);
643
- return r[0]++, function(o) {
644
- var i = function() {
645
- t.props.revealOrder ? (r.push(o), en(t, e, r)) : o();
646
- };
647
- n ? n(i) : i();
648
- };
649
- }, we.prototype.render = function(e) {
650
- this.u = null, this.o = /* @__PURE__ */ new Map();
651
- var t = pe(e.children);
652
- e.revealOrder && e.revealOrder[0] === "b" && t.reverse();
653
- for (var n = t.length; n--; )
654
- this.o.set(t[n], this.u = [1, 0, this.u]);
655
- return e.children;
656
- }, we.prototype.componentDidUpdate = we.prototype.componentDidMount = function() {
657
- var e = this;
658
- this.o.forEach(function(t, n) {
659
- en(e, n, t);
660
- });
661
- };
662
- var er = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, ao = /^(?: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]/, so = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, lo = /[A-Z0-9]/g, co = typeof document < "u", uo = function(e) {
663
- return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(e);
664
- };
665
- function tr(e, t, n) {
666
- return t.__k == null && (t.textContent = ""), Se(e, t), typeof n == "function" && n(), e ? e.__c : null;
667
- }
668
- function nr(e, t, n) {
669
- return Bn(e, t), typeof n == "function" && n(), e ? e.__c : null;
670
- }
671
- oe.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(e) {
672
- Object.defineProperty(oe.prototype, e, { configurable: !0, get: function() {
673
- return this["UNSAFE_" + e];
674
- }, set: function(t) {
675
- Object.defineProperty(this, e, { configurable: !0, writable: !0, value: t });
676
- } });
677
- });
678
- var tn = D.event;
679
- function po() {
680
- }
681
- function mo() {
682
- return this.cancelBubble;
683
- }
684
- function ho() {
685
- return this.defaultPrevented;
686
- }
687
- D.event = function(e) {
688
- return tn && (e = tn(e)), e.persist = po, e.isPropagationStopped = mo, e.isDefaultPrevented = ho, e.nativeEvent = e;
689
- };
690
- var Tt, vo = { enumerable: !1, configurable: !0, get: function() {
691
- return this.class;
692
- } }, nn = D.vnode;
693
- D.vnode = function(e) {
694
- typeof e.type == "string" && function(t) {
695
- var n = t.props, r = t.type, o = {};
696
- for (var i in n) {
697
- var a = n[i];
698
- if (!(i === "value" && "defaultValue" in n && a == null || co && i === "children" && r === "noscript" || i === "class" || i === "className")) {
699
- var c = i.toLowerCase();
700
- i === "defaultValue" && "value" in n && n.value == null ? i = "value" : i === "download" && a === !0 ? a = "" : c === "ondoubleclick" ? i = "ondblclick" : c !== "onchange" || r !== "input" && r !== "textarea" || uo(n.type) ? c === "onfocus" ? i = "onfocusin" : c === "onblur" ? i = "onfocusout" : so.test(i) ? i = c : r.indexOf("-") === -1 && ao.test(i) ? i = i.replace(lo, "-$&").toLowerCase() : a === null && (a = void 0) : c = i = "oninput", c === "oninput" && o[i = c] && (i = "oninputCapture"), o[i] = a;
701
- }
702
- }
703
- r == "select" && o.multiple && Array.isArray(o.value) && (o.value = pe(n.children).forEach(function(s) {
704
- s.props.selected = o.value.indexOf(s.props.value) != -1;
705
- })), r == "select" && o.defaultValue != null && (o.value = pe(n.children).forEach(function(s) {
706
- s.props.selected = o.multiple ? o.defaultValue.indexOf(s.props.value) != -1 : o.defaultValue == s.props.value;
707
- })), n.class && !n.className ? (o.class = n.class, Object.defineProperty(o, "className", vo)) : (n.className && !n.class || n.class && n.className) && (o.class = o.className = n.className), t.props = o;
708
- }(e), e.$$typeof = er, nn && nn(e);
709
- };
710
- var rn = D.__r;
711
- D.__r = function(e) {
712
- rn && rn(e), Tt = e.__c;
713
- };
714
- var on = D.diffed;
715
- D.diffed = function(e) {
716
- on && on(e);
717
- var t = e.props, n = e.__e;
718
- n != null && e.type === "textarea" && "value" in t && t.value !== n.value && (n.value = t.value == null ? "" : t.value), Tt = null;
719
- };
720
- var rr = { ReactCurrentDispatcher: { current: { readContext: function(e) {
721
- return Tt.__n[e.__c].props.value;
722
- } } } };
723
- function or(e) {
724
- return z.bind(null, e);
725
- }
726
- function Ue(e) {
727
- return !!e && e.$$typeof === er;
728
- }
729
- function ir(e) {
730
- return Ue(e) && e.type === J;
731
- }
732
- function ar(e) {
733
- return Ue(e) ? Xr.apply(null, arguments) : e;
734
- }
735
- function sr(e) {
736
- return !!e.__k && (Se(null, e), !0);
737
- }
738
- function lr(e) {
739
- return e && (e.base || e.nodeType === 1 && e) || null;
740
- }
741
- var dr = function(e, t) {
742
- return e(t);
743
- }, cr = function(e, t) {
744
- return e(t);
745
- }, ur = J;
746
- function Pt(e) {
747
- e();
748
- }
749
- function pr(e) {
750
- return e;
751
- }
752
- function mr() {
753
- return [!1, Pt];
754
- }
755
- var hr = Oe, vr = Ue;
756
- function fr(e, t) {
757
- var n = t(), r = W({ h: { __: n, v: t } }), o = r[0].h, i = r[1];
758
- return Oe(function() {
759
- o.__ = n, o.v = t, nt(o) && i({ h: o });
760
- }, [e, n, t]), Q(function() {
761
- return nt(o) && i({ h: o }), e(function() {
762
- nt(o) && i({ h: o });
763
- });
764
- }, [e]), n;
765
- }
766
- function nt(e) {
767
- var t, n, r = e.v, o = e.__;
768
- try {
769
- var i = r();
770
- return !((t = o) === (n = i) && (t !== 0 || 1 / t == 1 / n) || t != t && n != n);
771
- } catch {
772
- return !0;
773
- }
774
- }
775
- var fo = { useState: W, useId: zn, useReducer: Et, useEffect: Q, useLayoutEffect: Oe, useInsertionEffect: hr, useTransition: mr, useDeferredValue: pr, useSyncExternalStore: fr, startTransition: Pt, useRef: ee, useImperativeHandle: qn, useMemo: Te, useCallback: Me, useContext: $n, useDebugValue: St, version: "17.0.2", Children: Gn, render: tr, hydrate: nr, unmountComponentAtNode: sr, createPortal: Xn, createElement: z, createContext: An, createFactory: or, cloneElement: ar, createRef: Ln, Fragment: J, isValidElement: Ue, isElement: vr, isFragment: ir, findDOMNode: lr, Component: oe, PureComponent: Ge, memo: Zn, forwardRef: It, flushSync: cr, unstable_batchedUpdates: dr, StrictMode: ur, Suspense: Re, SuspenseList: we, lazy: Jn, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: rr };
776
- const go = Object.freeze(Object.defineProperty({ __proto__: null, Children: Gn, Component: oe, Fragment: J, PureComponent: Ge, StrictMode: ur, Suspense: Re, SuspenseList: we, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: rr, cloneElement: ar, createContext: An, createElement: z, createFactory: or, createPortal: Xn, createRef: Ln, default: fo, findDOMNode: lr, flushSync: cr, forwardRef: It, hydrate: nr, isElement: vr, isFragment: ir, isValidElement: Ue, lazy: Jn, memo: Zn, render: tr, startTransition: Pt, unmountComponentAtNode: sr, unstable_batchedUpdates: dr, useCallback: Me, useContext: $n, useDebugValue: St, useDeferredValue: pr, useEffect: Q, useErrorBoundary: function(e) {
777
- var t = xe(me++, 10), n = W();
778
- return t.__ = e, $.componentDidCatch || ($.componentDidCatch = function(r, o) {
779
- t.__ && t.__(r, o), n[1](r);
780
- }), [n[0], function() {
781
- n[1](void 0);
782
- }];
783
- }, useId: zn, useImperativeHandle: qn, useInsertionEffect: hr, useLayoutEffect: Oe, useMemo: Te, useReducer: Et, useRef: ee, useState: W, useSyncExternalStore: fr, useTransition: mr, version: "17.0.2" }, Symbol.toStringTag, { value: "Module" })), an = (e) => {
784
- let t;
785
- const n = /* @__PURE__ */ new Set(), r = (a, c) => {
786
- const s = typeof a == "function" ? a(t) : a;
787
- if (!Object.is(s, t)) {
788
- const p = t;
789
- t = c ?? typeof s != "object" ? s : Object.assign({}, t, s), n.forEach((u) => u(t, p));
790
- }
791
- }, o = () => t, i = { setState: r, getState: o, subscribe: (a) => (n.add(a), () => n.delete(a)), destroy: () => n.clear() };
792
- return t = e(r, o, i), i;
793
- };
794
- function _o(e) {
795
- return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
796
- }
797
- function bo(e) {
798
- if (e.__esModule)
799
- return e;
800
- var t = e.default;
801
- if (typeof t == "function") {
802
- var n = function r() {
803
- return this instanceof r ? Reflect.construct(t, arguments, this.constructor) : t.apply(this, arguments);
804
- };
805
- n.prototype = t.prototype;
806
- } else
807
- n = {};
808
- return Object.defineProperty(n, "__esModule", { value: !0 }), Object.keys(e).forEach(function(r) {
809
- var o = Object.getOwnPropertyDescriptor(e, r);
810
- Object.defineProperty(n, r, o.get ? o : { enumerable: !0, get: function() {
811
- return e[r];
812
- } });
813
- }), n;
814
- }
815
- var gr = { exports: {} }, sn = {};
816
- const _r = bo(go);
817
- var br = { exports: {} }, ln = {}, Ie = _r, yo = typeof Object.is == "function" ? Object.is : function(e, t) {
818
- return e === t && (e !== 0 || 1 / e == 1 / t) || e != e && t != t;
819
- }, xo = Ie.useState, ko = Ie.useEffect, wo = Ie.useLayoutEffect, Co = Ie.useDebugValue;
820
- function rt(e) {
821
- var t = e.getSnapshot;
822
- e = e.value;
823
- try {
824
- var n = t();
825
- return !yo(e, n);
826
- } catch {
827
- return !0;
828
- }
829
- }
830
- var Eo = typeof window > "u" || window.document === void 0 || window.document.createElement === void 0 ? function(e, t) {
831
- return t();
832
- } : function(e, t) {
833
- var n = t(), r = xo({ inst: { value: n, getSnapshot: t } }), o = r[0].inst, i = r[1];
834
- return wo(function() {
835
- o.value = n, o.getSnapshot = t, rt(o) && i({ inst: o });
836
- }, [e, n, t]), ko(function() {
837
- return rt(o) && i({ inst: o }), e(function() {
838
- rt(o) && i({ inst: o });
839
- });
840
- }, [e]), Co(n), n;
841
- };
842
- ln.useSyncExternalStore = Ie.useSyncExternalStore !== void 0 ? Ie.useSyncExternalStore : Eo, br.exports = ln;
843
- var Qe = _r, So = br.exports, jo = typeof Object.is == "function" ? Object.is : function(e, t) {
844
- return e === t && (e !== 0 || 1 / e == 1 / t) || e != e && t != t;
845
- }, Io = So.useSyncExternalStore, To = Qe.useRef, Po = Qe.useEffect, Do = Qe.useMemo, Ro = Qe.useDebugValue;
846
- sn.useSyncExternalStoreWithSelector = function(e, t, n, r, o) {
847
- var i = To(null);
848
- if (i.current === null) {
849
- var a = { hasValue: !1, value: null };
850
- i.current = a;
851
- } else
852
- a = i.current;
853
- i = Do(function() {
854
- function s(h) {
855
- if (!l) {
856
- if (l = !0, p = h, h = r(h), o !== void 0 && a.hasValue) {
857
- var _ = a.value;
858
- if (o(_, h))
859
- return u = _;
860
- }
861
- return u = h;
862
- }
863
- if (_ = u, jo(p, h))
864
- return _;
865
- var b = r(h);
866
- return o !== void 0 && o(_, b) ? _ : (p = h, u = b);
867
- }
868
- var p, u, l = !1, m = n === void 0 ? null : n;
869
- return [function() {
870
- return s(t());
871
- }, m === null ? void 0 : function() {
872
- return s(m());
873
- }];
874
- }, [t, n, r, o]);
875
- var c = Io(e, i[0], i[1]);
876
- return Po(function() {
877
- a.hasValue = !0, a.value = c;
878
- }, [c]), Ro(c), c;
879
- }, gr.exports = sn;
880
- const No = _o(gr.exports), { useSyncExternalStoreWithSelector: Mo } = No, dn = (e) => {
881
- const t = typeof e == "function" ? ((r) => r ? an(r) : an)(e) : e, n = (r, o) => function(i, a = i.getState, c) {
882
- const s = Mo(i.subscribe, i.getState, i.getServerState || i.getState, a, c);
883
- return St(s), s;
884
- }(t, r, o);
885
- return Object.assign(n, t), n;
886
- }, yr = (e) => e ? dn(e) : dn, Lo = 1, Oo = 2, Dt = { eq: (e, t) => e == t, neq(e, t) {
887
- return !this.eq(e, t);
888
- }, 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) {
889
- if (!Array.isArray(t))
890
- return !1;
891
- const n = Array.isArray(e) ? e : [e], r = new Set(n);
892
- return t.some((o) => r.has(o));
893
- }, list_dni(e, t) {
894
- if (!Array.isArray(t))
895
- return !1;
896
- const n = Array.isArray(e) ? e : [e], r = new Set(n);
897
- return t.every((o) => !r.has(o));
898
- }, contains(e, t) {
899
- const n = e.toLowerCase(), r = t.toLowerCase();
900
- return n.includes(r);
901
- }, notcontains(e, t) {
902
- return !this.contains(e, t);
903
- } }, Uo = (e, t, n) => {
904
- switch (t) {
905
- case "videovoice":
906
- return !!(e && e.value);
907
- case "open":
908
- return !!n;
909
- case "multipleselect":
910
- return !!(n && Object.keys(n).length);
911
- case "recordedtask":
912
- return (n == null ? void 0 : n.taskStatus) === "completed";
913
- case "texturlprompt":
914
- return !e.value;
915
- case "consentlegal":
916
- case "nps":
917
- case "likert":
918
- return n !== null;
919
- case "multiplechoice":
920
- return n !== void 0;
921
- case "matrix":
922
- return !!(n && Object.values(n).every((r) => r !== null));
923
- default:
924
- return !0;
925
- }
926
- }, xr = (e, t) => {
927
- if (t === "matrix") {
928
- const n = Object.keys(e).length, r = Object.values(e).filter((o) => o !== null).length;
929
- return r > 0 && r < n;
930
- }
931
- return !1;
932
- }, kr = ({ cards: e, index: t, hasEndCard: n, allResponses: r, uploadProgress: o = {} }) => {
933
- if (t >= e.length || t < 0)
934
- return null;
935
- const i = e[t];
936
- let a = t + 1;
937
- const c = i.props.routingOptions || [];
938
- for (let u = 0; u < c.length; u++) {
939
- const { group: l, target: m } = c[u];
940
- if (!(l != null && l.length))
941
- continue;
942
- const h = l[0];
943
- if (h.questionIndex === void 0 || h.questionIndex > r.length)
944
- continue;
945
- let _ = cn({ comparator: h.comparator, response: r[h.questionIndex], type: i.type, value: h.value });
946
- for (let b = 1; b < l.length; b += 2) {
947
- const f = l[b], y = l[b + 1], x = cn({ comparator: y.comparator, response: r[y.questionIndex], type: e[y.questionIndex].type, value: y.value });
948
- f === Lo ? _ && (_ = x) : f === Oo && (_ || (_ = x));
949
- }
950
- if (_) {
951
- a = m === -1 && n ? e.length - 1 : m;
952
- break;
953
- }
954
- }
955
- const s = e.findIndex((u) => u.type === "uploading");
956
- let p;
957
- return p = s > 0 ? n ? e.length - 3 : e.length - 2 : e.length - 1, t >= p || a === -1 || a !== null && a > p ? s > 0 && Object.values(o).some((l) => l.isSubmitted && !l.isComplete) ? s : n ? e.length - 1 : null : a === -1 ? null : a;
958
- }, cn = ({ comparator: e, response: t, type: n, value: r }) => {
959
- if (e === "answered")
960
- switch (n) {
961
- case "texturlprompt":
962
- return t === void 0;
963
- case "consentlegal":
964
- return t && t.submitted === !0;
965
- case "recordedtask":
966
- return "taskStatus" in t && t.taskStatus === "completed";
967
- case "likert":
968
- case "nps":
969
- return Number.isInteger(t);
970
- case "matrix":
971
- return Object.values(t).every((o) => o !== null);
972
- case "multiplechoice":
973
- return t !== void 0;
974
- case "multipleselect":
975
- return (t == null ? void 0 : t.length) > 0;
976
- case "open":
977
- return t && t.length > 0;
978
- case "videovoice":
979
- return !!(t != null && t.mediaRecordingUid);
980
- default:
981
- return !1;
982
- }
983
- if (e === "given_up")
984
- return n !== "recordedtask" || "taskStatus" in t && t.taskStatus === "given.up";
985
- if (e === "partial")
986
- return n === "matrix" && xr(t, n);
987
- if (e === "skipped")
988
- switch (n) {
989
- case "texturlprompt":
990
- return t == null ? void 0 : t.skipped;
991
- case "consentlegal":
992
- case "likert":
993
- case "nps":
994
- case "videovoice":
995
- return t === null;
996
- case "recordedtask":
997
- return "taskStatus" in t && t.taskStatus === "abandoned";
998
- case "open":
999
- case "multipleselect":
1000
- return (t == null ? void 0 : t.length) === 0;
1001
- case "multiplechoice":
1002
- return t === void 0;
1003
- case "matrix":
1004
- return Object.values(t).every((o) => o === null);
1005
- default:
1006
- return !1;
1007
- }
1008
- return Dt[e](t, r);
1009
- }, Ho = (e) => {
1010
- var r, o, i;
1011
- switch (e.type) {
1012
- case "multipleselect":
1013
- return e && e.props && e.props.options ? e.props.options.length > 13 ? e.props.options.map((a) => [a.value]) : (t = e.props.options.map((a) => a.value), n = !e.props.properties.required, t.reduce((a, c) => a.concat(a.map((s) => [...s, c])), [[]]).filter((a) => n || a.length > 0)) : null;
1014
- case "multiplechoice": {
1015
- if (!e || !e.props || !e.props.options)
1016
- return null;
1017
- const a = e.props.options.map((c) => c.value);
1018
- return e.props.properties.required || a.push(void 0), a;
1019
- }
1020
- case "matrix": {
1021
- if (!((r = e == null ? void 0 : e.props) != null && r.options))
1022
- return null;
1023
- const a = e.props.properties.matrixColumn, c = e.props.options, s = c.reduce((u, l) => (u[l.id] = null, u), {}), p = [{ ...s, [c[0].id]: a[0].value }, c.reduce((u, l) => (u[l.id] = a[0].value, u), {})];
1024
- return e.props.properties.required || p.push(s), p;
1025
- }
1026
- case "likert": {
1027
- const a = Number((i = (o = e.props) == null ? void 0 : o.properties) == null ? void 0 : i.range) || 5;
1028
- return [...Array.from(Array(a).keys()).map((s) => s + 1), ...e.props.properties.required ? [] : [null]];
1029
- }
1030
- case "nps":
1031
- return [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ...e.props.properties.required ? [] : [null]];
1032
- case "videovoice":
1033
- case "open":
1034
- return ["1", ...e.props.properties.required ? [] : [""]];
1035
- case "recordedtask": {
1036
- const a = [{ taskStatus: "completed" }, { taskStatus: "given.up" }];
1037
- return e.props.properties.required || a.push({ taskStatus: "abandoned" }), a;
1038
- }
1039
- case "texturlprompt":
1040
- return [void 0, ...e.props.properties.required ? [] : [{ skipped: !0 }]];
1041
- case "consentlegal":
1042
- return [1, ...e.props.properties.required ? [] : [null]];
1043
- default:
1044
- return [1];
1045
- }
1046
- var t, n;
1047
- }, Bo = (e) => e in Dt, Ao = (e) => typeof e == "object" && e !== null && "taskStatus" in e, Vo = (e, t = []) => t.reduce((n, r) => {
1048
- const { group: o, target: i } = r;
1049
- if (!(o != null && o.length))
1050
- return [...n];
1051
- const a = o.filter((c) => !!Number(c) || typeof c == "object" && c.questionIndex === e).map((c) => {
1052
- const { comparator: s, value: p } = c;
1053
- return { comparator: s, target: i, value: p };
1054
- });
1055
- return [...n, ...a];
1056
- }, []), ot = /* @__PURE__ */ new Set(["thanks", "uploading"]), V = yr()((e, t) => ({ allResponses: [], answers: void 0, apiURL: "", border: "#000000", cards: [], close: async (n = Ce) => {
1057
- const r = t(), { fadeout: o, remove: i, trackHistory: a, studyType: c } = r;
1058
- await o(n), it(r) || a({ event: "closed" }), Kr.info("SurveyClosing", { surveyId: r.surveyId }), Ot.enable(), i({ initiator: Ht.Closed, studyType: c });
1059
- }, configureExitOnOverlayClick: () => {
1060
- }, customMetadata: {}, destroy: async (n) => {
1061
- const { eventEmitFn: r, fadeout: o, remove: i, studyType: a, surveyId: c } = t();
1062
- r("survey.complete", c), await o(n), Ot.enable(), i({ initiator: Ht.Complete, studyType: a });
1063
- }, endCard: { headline: "" }, envId: "", eventEmitFn: Be.emit.bind(Be), fadeout: async (n) => {
1064
- const { eventEmitFn: r, headers: o, viewDocument: i } = t();
1065
- return Fe(o) ? Promise.resolve() : (r(fe.SurveyFadingOut), new Promise((a) => {
1066
- const c = i.getElementById(n);
1067
- c ? (c.addEventListener("transitionend", () => {
1068
- a();
1069
- }), c.classList.remove("ul-app--visible")) : a();
1070
- }));
1071
- }, forceBrandedLogo: !1, frame: document.createElement("iframe"), handleClickEmbedButton: (n) => {
1072
- const { cards: r, eventEmitFn: o, index: i } = t();
1073
- o(n, { qid: r[i].name, props: r[i].props }), e(() => ({ hasViewedEmbed: !0 }));
1074
- }, handleUploadUpdate: ({ mediaRecordingUid: n, isComplete: r, progressPct: o, isSubmitted: i }) => {
1075
- var h, _, b;
1076
- const { cards: a, destroy: c, index: s, uploadProgress: p } = t(), u = r || ((h = p[n]) == null ? void 0 : h.isComplete), l = { ...p, [n]: { progressPct: u ? 100 : o || ((_ = p[n]) == null ? void 0 : _.progressPct), isComplete: u, isSubmitted: i || ((b = p[n]) == null ? void 0 : b.isSubmitted) } };
1077
- if (e({ uploadProgress: l }), a[s].type !== "uploading")
1078
- return;
1079
- const m = Object.entries(p).every(([f, y]) => !y.isSubmitted || y.isComplete || n == f && r);
1080
- if (m && s >= a.length - 1)
1081
- return c(Ce);
1082
- e({ index: m ? s + 1 : s, uploadingCardViewed: !0 });
1083
- }, 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) => {
1084
- const { allResponses: r, cards: o, eventEmitFn: i, index: a, responseGroupUid: c, submit: s, trackHistory: p, uploadProgress: u, viewedCardCount: l } = t(), m = Date.now(), h = [...o], _ = h[a], { type: b } = n.data, f = { ...n.data }, y = f.value;
1085
- ((w) => !ot.has(w.type))(_) && (_.value = y), f.answeredAt = m, delete f.type;
1086
- const x = { response: f, responseGroupUid: c, questionIndex: a };
1087
- let T = b === "multiplechoice" ? Object.values(y).find((w) => w !== !1) : y;
1088
- b === "multipleselect" && (T = h[a].props.options.reduce((w, g) => (y[g.id] && w.push(g.value), w), []));
1089
- const S = r.slice(0);
1090
- S[a] = T, e({ allResponses: S });
1091
- const C = kr({ cards: h, index: a, hasEndCard: !!n.endCard, uploadProgress: u, allResponses: S });
1092
- if (C === null)
1093
- return x.completedAt = m, s(x), void n.completeSurvey();
1094
- ot.has(h[C].type) && (x.completedAt = m);
1095
- const k = s(x);
1096
- ot.has(h[C].type) || k.finally(() => {
1097
- p({ event: "seen", index: C });
1098
- });
1099
- const j = h[C];
1100
- h[C] && i && i("survey.question", { qid: j.name, props: j.props }), e({ cards: h, hasViewedEmbed: !1, index: C, viewedCardCount: l + 1 });
1101
- }, pendingRemoveIframeReason: null, previewKey: null, previewMode: void 0, recorder: () => {
1102
- }, recorderEventEmitter: Be, resolveTrackedPromise: () => {
1103
- const { removeIframeIfReady: n } = t();
1104
- e((r) => ({ unresolvedRequestCount: r.unresolvedRequestCount - 1 })), n();
1105
- }, responseGroupUid: "", remove: ({ initiator: n, studyType: r }) => {
1106
- const { removeIframeIfReady: o } = t();
1107
- e({ pendingRemoveIframeReason: n, studyType: r }), o();
1108
- }, removeIframeIfReady: () => {
1109
- const { eventEmitFn: n, pendingRemoveIframeReason: r, unresolvedRequestCount: o, studyType: i, surveyId: a } = t();
1110
- r && o === 0 && (n(fe.SurveyWillClose, { name: fe.SurveyWillClose, initiator: r, studyType: i, "survey.id": a }), e({ pendingRemoveIframeReason: null, studyType: i }));
1111
- }, seen: async () => {
1112
- const { trackHistory: n } = t();
1113
- return n({ event: "seen", isNew: !0 });
1114
- }, slugName: null, showStripes: !1, showSurveyBrand: !1, styleNonce: "", submit: async ({ completedAt: n, questionIndex: r, response: o, responseGroupUid: i }) => {
1115
- const a = t();
1116
- if (!i || it(a))
1117
- return;
1118
- const c = { responseGroupUid: i, meta: a.meta, customMetadata: a.customMetadata, responses: [o], completedAt: n, previewKey: a.previewKey }, s = await a.trackPromise(ut(`${a.apiURL}/sdk/1/environments/${a.envId}/visitors/${a.userId}/responses/submit`, { body: JSON.stringify(c), headers: a.headers, method: "POST" }));
1119
- s.ok ? a.eventEmitFn(fe.QuestionAnswered, { ...o, questionIndex: r }) : s.reportError && (console.warn("[Sprig] (ERR-427) Failed to submit response", s.error), await a.trackPromise(un(a, "submitResponse", s.error)));
1120
- }, surveyId: 0, tabTitle: "", trackHistory: async ({ event: n, index: r, isNew: o = !1 }) => {
1121
- const i = t();
1122
- if (it(i))
1123
- return;
1124
- const { cards: a, index: c } = i, s = r !== void 0 ? a[r] : a[c], p = { sid: i.surveyId, qid: s.name, action: n, vid: i.userId, eid: i.envId, isNew: o, responseGroupUid: i.responseGroupUid, previewKey: i.previewKey }, u = await i.trackPromise(ut(`${i.apiURL}/sdk/1/visitors/${i.userId}/surveys/${i.surveyId}/history`, { body: JSON.stringify(p), headers: i.headers, method: "POST" }));
1125
- !u.ok && u.reportError && (console.warn("[Sprig] (ERR-428) Failed to track survey event", u.error), await i.trackPromise(un(i, "trackHistory", u.error)));
1126
- }, trackPromise: async (n) => {
1127
- const { resolveTrackedPromise: r } = t();
1128
- return e((o) => ({ unresolvedRequestCount: o.unresolvedRequestCount + 1 })), n.then((o) => (r(), o)).catch((o) => {
1129
- throw r(), o;
1130
- });
1131
- }, unresolvedRequestCount: 0, update: () => {
1132
- const { cards: n, index: r, headers: o, eventEmitFn: i, frame: a, useMobileStyling: c, surveyId: s, viewDocument: p } = t(), u = n[r], l = u.type === "matrix" && !(u.props.properties.displayMatrixAsAccordion || c);
1133
- setTimeout(() => {
1134
- var _, b;
1135
- const [m, h] = Fr(p);
1136
- Fe(o) ? i(fe.SurveyHeight, { name: fe.SurveyHeight, contentFrameHeight: m, "survey.id": s }) : ((_ = a.setHeight) == null || _.call(a, m), c || ((b = a.setWidth) == null || b.call(a, l ? h : parseInt(Wr))));
1137
- }, 100);
1138
- }, uploadingCardViewed: !1, uploadProgress: {}, useDesktopPrototype: void 0, useMobileStyling: !1, userId: "", viewDocument: window.document, viewedCardCount: 0 })), it = (e) => !e.userId || e.meta && e.meta.mode === "test" || e.isPreview || e.previewMode, un = async (e, t, n) => {
1139
- const { mode: r, userId: o, envId: i, apiURL: a, headers: c, viewDocument: s } = e, p = s.documentElement, u = { mode: r, screenWidth: window.screen.width, screenHeight: window.screen.height, clientWidth: p.clientWidth, clientHeight: p.clientHeight, location: window.location.href, language: window.navigator.language }, l = { action: t, err: { message: `${n == null ? void 0 : n.name} - ${n == null ? void 0 : n.message}`, stack: n == null ? void 0 : n.stack }, meta: u, vid: o, envId: i };
1140
- (await ut(`${a}/sdk/1/errors`, { method: "POST", headers: Object.assign({ "x-ul-error": window.btoa(`userleap-${Date.now()}-error`) }, c), body: JSON.stringify(l) })).ok || console.warn("[Sprig] (ERR-444) Failed to report error to API", n);
1141
- }, wr = (e) => z("svg", { fill: "none", height: 24, viewBox: "0 0 24 24", width: 24, xmlns: "http://www.w3.org/2000/svg", ...e }, z("path", { d: "M17 10L12 15L7 10", stroke: "#0B2330", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5 })), Cr = (e) => z("svg", { fill: "none", height: 10, viewBox: "0 0 10 10", width: 10, xmlns: "http://www.w3.org/2000/svg", ...e }, z("path", { d: "M9.15377 1.30774L4.07685 8.23082L1.30762 5.00005", stroke: "white", strokeLinecap: "round", strokeWidth: 2 }));
1142
- var qo = 0;
1143
- function d(e, t, n, r, o, i) {
1144
- var a, c, s = {};
1145
- for (c in t)
1146
- c == "ref" ? a = t[c] : s[c] = t[c];
1147
- var p = { type: e, props: s, key: n, ref: a, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: --qo, __i: -1, __u: 0, __source: o, __self: i };
1148
- if (typeof e == "function" && (a = e.defaultProps))
1149
- for (c in a)
1150
- s[c] === void 0 && (s[c] = a[c]);
1151
- return D.vnode && D.vnode(p), p;
1152
- }
1153
- const $o = ({ visible: e }) => d("div", { className: "sprig-check-background", style: { opacity: e ? 1 : 0 }, children: d(Cr, { className: "sprig-check" }) }), pn = "250ms", zo = It(({ animate: e, children: t, header: n, isOpen: r, onClick: o, showHeaderCheck: i }, a) => {
1154
- const c = ee(null), [s, p] = W(0);
1155
- Q(() => {
1156
- var m;
1157
- const l = (m = c.current) == null ? void 0 : m.getBoundingClientRect();
1158
- p(r && l ? l.height : 0);
1159
- }, [r]);
1160
- const u = Te(() => ({ transition: e ? `height ${pn} ease` : "none", height: s }), [s, e]);
1161
- return d("div", { className: "sprig-accordion", ref: a, children: [d("button", { className: "sprig-accordion-header-container", onClick: o, type: "button", children: [d("div", { className: "sprig-header-label-container", children: [d("span", { className: "sprig-header-label", children: n }), d($o, { visible: i })] }), d(wr, { className: "sprig-caret", style: { transitionDuration: e ? pn : "0", transform: r ? "rotate(-180deg)" : "none" } })] }), d("div", { className: "sprig-accordion-body", style: u, children: d("div", { ref: c, children: t }) })] });
1162
- }), O = (...e) => e.filter(Boolean).join(" "), Z = (e, t, n) => {
1163
- const r = t ? "--mobile" : "--desktop";
1164
- return `${e + r} ${e + (n ? `${r}_${n}` : "")} ${e}`;
1165
- }, Fo = (e, t) => `${e} ${e}__${t}`, X = (e) => d("button", { ...e, className: O("ul-card-text__button", e.className), id: "ul-card-text__button" }), mn = ({ plainText: e, richText: t, id: n, className: r, isHeader: o }) => t ? d("div", { className: r, dangerouslySetInnerHTML: { __html: t }, id: n }) : e ? d(o ? "h1" : "p", { className: r, id: n, children: e }) : null, ie = ({ message: e, properties: t }) => {
1166
- const n = t == null ? void 0 : t.captionText;
1167
- return d("div", { className: "question-header-container", children: [d(mn, { className: "ul-question", id: "ul-question", isHeader: !0, plainText: e, richText: t == null ? void 0 : t.questionHtml }), d(mn, { className: "ul-caption", id: "ul-caption", plainText: n, richText: t == null ? void 0 : t.captionHtml })] });
1168
- }, hn = ({ buttonText: e = "View Prototype", handleClick: t }) => d("button", { className: "prototype-button", onClick: t, children: e }, "prototype-btn"), he = ({ defaultBody: e, embeddedType: t = "prototype", properties: n }) => {
1169
- var l;
1170
- const { handleClickEmbedButton: r, hasViewedEmbed: o, headers: i, useDesktopPrototype: a } = V((m) => ({ handleClickEmbedButton: m.handleClickEmbedButton, hasViewedEmbed: m.hasViewedEmbed, headers: m.headers, useDesktopPrototype: m.useDesktopPrototype })), c = (n == null ? void 0 : n.conceptUrl) || ((l = n == null ? void 0 : n.consentDocument) == null ? void 0 : l.url), s = window.innerWidth < Zr, p = i["userleap-platform"], u = (m, h) => {
1171
- m.preventDefault(), r(h);
1172
- };
1173
- if (!a && s && !o && c && ["email", "link"].includes(p)) {
1174
- if (t === "prototype")
1175
- return d(hn, { handleClick: (m) => {
1176
- u(m, "question.prototype.click");
1177
- } });
1178
- if (t === "pdf")
1179
- return d(hn, { buttonText: (n == null ? void 0 : n.viewDocumentText) || "View Document", handleClick: (m) => {
1180
- u(m, "question.agreement.click");
1181
- } });
1182
- }
1183
- return e();
1184
- }, Er = ({ isSelected: e, id: t, divId: n, themeColor: r }) => d("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 && d(Cr, {}) }), Sr = (e, t) => {
1185
- const n = ee(0), r = () => {
1186
- if (e.current) {
1187
- const o = e.current;
1188
- o.style.height = "1px";
1189
- const i = o.scrollHeight + (o.offsetHeight - o.clientHeight), a = parseInt(window.getComputedStyle(o).getPropertyValue("max-height")), c = i <= a ? i : a;
1190
- n.current !== c && t(), n.current = c, o.style.height = `${c}px`;
1191
- }
1192
- };
1193
- return Q(r, []), r;
1194
- }, Je = ({ ariaLabel: e, border: t, choiceStyle: n = {}, label: r, isSelected: o, value: i, text: a, id: c, isRadio: s, useMobileStyling: p, error: u, allowTextEntry: l, noneOfTheAbove: m, promptText: h, onUserInputChanged: _ }) => {
1195
- const { styleNonce: b, viewDocument: f } = V((I) => ({ styleNonce: I.styleNonce, viewDocument: I.viewDocument })), [y, x] = W(!1);
1196
- Zo(f, t, b);
1197
- const T = ({ isSelected: I, userText: L }) => {
1198
- _ && _({ id: c, selected: I, value: i, userText: L, noneOfTheAbove: m });
1199
- }, S = (I) => {
1200
- I.stopPropagation(), T({ isSelected: s || !o, userText: a }), x(!1);
1201
- }, C = () => {
1202
- y || x(!0);
1203
- }, k = () => {
1204
- y && x(!1);
1205
- }, j = { onClick: (I) => S(I), onKeyPress: (I) => ((L) => {
1206
- L.key !== "Enter" && L.key !== " " || S(L);
1207
- })(I) };
1208
- "ontouchstart" in f.documentElement ? (j.onTouchStart = k, j.onTouchCancel = k, j.onTouchEnd = k) : (j.onMouseDown = C, j.onMouseLeave = k);
1209
- const w = s ? `radio-${c}` : `checkbox-${c}`, g = o || y ? [qe] : [], v = [...u ? [jr] : [], ...g], P = r ? { "aria-labelledby": `label-${c}` } : { "aria-label": e };
1210
- return d("div", { className: O(Z("choice", p), ...v), id: `choice-div-${c}`, style: { ...n, ...u ? { borderColor: Pe } : {} }, ...j, children: [d("div", { className: O("choice-label-container"), children: [s ? d("div", { ...P, className: O("select-radio", ...g), id: w, role: "radio", tabIndex: 0 }) : d(Er, { divId: w, id: c, isSelected: o, themeColor: t }), r && d("label", { className: O(Z("select-label", p)), htmlFor: w, id: `label-${c}`, children: r })] }), l && o && d("div", { className: O("choice-text-entry-container", ...g), children: d(Wo, { onTextChange: (I) => T({ isSelected: o, userText: I }), promptText: h || "Please specify", textValue: a, useMobileStyling: p }) })] });
1211
- }, Wo = ({ promptText: e, textValue: t, onTextChange: n, useMobileStyling: r }) => {
1212
- const o = ee(null), { update: i } = V((c) => ({ update: c.update })), a = Sr(o, () => i());
1213
- return Q(() => {
1214
- o.current && o.current.focus();
1215
- }, []), d("textarea", { "aria-label": e, "aria-multiline": "true", "aria-placeholder": e, className: O(Z("choice-text-input", r)), "data-gramm": "false", maxLength: 5e3, name: "text", onChange: (c) => {
1216
- a(), c.stopPropagation(), n(c.currentTarget.value);
1217
- }, onClick: (c) => {
1218
- c.stopPropagation();
1219
- }, onKeyPress: (c) => {
1220
- c.stopPropagation();
1221
- }, placeholder: e, ref: o, role: "textbox", rows: 1, value: t });
1222
- }, vn = "ul-select-style-element", qe = "ul-select-active-dynamic-style", jr = "ul-select-error-dynamic-style", Zo = (e, t, n) => {
1223
- let r = e.getElementById(vn), o = !1;
1224
- r || (r = e.createElement("style"), o = !0), r.tagName.toLowerCase() === "style" && (r.id = vn, n && (r.nonce = n), r.textContent = Go(t), o && e.head.appendChild(r));
1225
- }, Go = (e) => `
1226
- .${qe} {
1227
- border-color: ${e};
1228
- }
1229
- .${qe} .select-radio, .${qe}.select-radio {
1230
- border: 6px solid ${e};
1231
- box-shadow: none;
1232
- }
1233
- .${jr} {
1234
- border-color: ${Pe};
1235
- }
1236
- `, ke = (e) => (e == null ? void 0 : e.buttonText) || "Next", Rt = (e) => (e == null ? void 0 : e.skipButtonText) || "Skip", Ko = ({ className: e, message: t, next: n, properties: r, questionId: o, type: i }) => {
1237
- const { useMobileStyling: a, border: c } = V((w) => ({ useMobileStyling: w.useMobileStyling, border: w.border })), [s, p] = W(!1), [u, l] = W(""), [m, h] = W(!1), _ = r == null ? void 0 : r.collectName, b = (r == null ? void 0 : r.nameLabelText) || "Full Name", f = (r == null ? void 0 : r.consentText) || "I agree to the stated conditions", y = (r == null ? void 0 : r.submitButtonText) || "Submit", x = !!u.trim(), T = s && (!_ || x), S = (w, g = !1) => {
1238
- w.preventDefault(), w.stopPropagation();
1239
- let v = null;
1240
- if (!g) {
1241
- if (!T)
1242
- return void h(!0);
1243
- v = { submitted: !0 }, _ && (v.name = u);
1244
- }
1245
- n({ value: v, questionId: o, type: i });
1246
- }, C = (w) => {
1247
- w.preventDefault(), w.stopPropagation(), l(w.currentTarget.value);
1248
- }, k = (w) => {
1249
- w.currentTarget.style.borderColor = m && !x ? Pe : c;
1250
- }, j = (w) => {
1251
- w.currentTarget.style.borderColor = m && !x ? Pe : kt;
1252
- };
1253
- return d("div", { className: O(e, "ul-card__consent-legal", "fade-in-transition"), children: [d(ie, { message: t }), d("div", { className: "ul-rich-text-body", dangerouslySetInnerHTML: r != null && r.richTextBody ? { __html: r.richTextBody } : void 0, id: "ul-card__consent-legal-body-container" }), d(he, { properties: r, defaultBody: () => d("div", { children: [d(Je, { allowTextEntry: !1, border: c, error: m && !s, id: "consent", isRadio: !1, isSelected: s, label: f, onUserInputChanged: ({ selected: w }) => {
1254
- w !== s && p(!s);
1255
- }, useMobileStyling: a }), _ && d("input", { "aria-label": b, "aria-placeholder": b, className: O(Z("ul-consent-legal__name-input", a)), "data-gramm": "false", maxLength: 250, name: "name", onBlur: j, onFocus: k, onInput: C, placeholder: b, style: m && !x ? { borderColor: Pe } : {}, tabIndex: 0, value: u }), d("div", { className: "ul-card__button-wrapper ul-card-vertical__button-wrapper", children: [d(X, { className: T ? "" : "sprig-button-disabled", onClick: S, children: y }), r.required === !1 && d("button", { className: "ul-card-skip__button", onClick: (w) => S(w, !0), children: Rt(r) })] })] }), embeddedType: "pdf" })] }, o);
1256
- }, Yo = ({ activeValue: e, border: t, icon: n, isPressed: r, onSubmit: o, range: i, scaleLabelType: a, setActiveValue: c, setIsPressed: s, useMobileStyling: p, value: u, viewDocument: l }) => {
1257
- const m = `option-${u}`, h = a === "number", _ = a === "star", b = h && u === e, [f, y] = u <= e && _ || u === e ? r ? [t, 1] : [t, 0.3] : ["", 1];
1258
- return d("button", { "aria-label": h ? void 0 : String(u), className: (() => {
1259
- switch (a) {
1260
- case "star":
1261
- return O(Z("likert-star", p), Z(`likert-star-${u}`, p));
1262
- case "smiley":
1263
- return O(Z("likert-smiley", p), Z(`likert-smiley-${u}`, p));
1264
- default:
1265
- return u === i ? O(Z("likert-number", p), Z(`likert-number-${u}`, p), Z("likert-last-option", p)) : O(Z("likert-number", p), Z(`likert-number-${u}`, p));
1266
- }
1267
- })(), dangerouslySetInnerHTML: { __html: n }, id: m, onClick: () => o(), onKeyDown: (x) => {
1268
- var C, k;
1269
- const T = l.querySelectorAll(`.likert-${a ?? "number"}`), S = u - 1;
1270
- x.key === "ArrowRight" ? (C = T[S + 1]) == null || C.focus() : x.key === "ArrowLeft" ? (k = T[S - 1]) == null || k.focus() : x.key !== "Enter" && x.key !== " " || o();
1271
- }, onPointerDown: () => s(!0), onPointerEnter: () => c(u), onPointerLeave: () => {
1272
- c(-1), s(!1);
1273
- }, style: { color: h ? "" : f, borderColor: b ? f : "", fillOpacity: b ? "" : y, zIndex: b ? 3 : "auto" }, tabIndex: 0 });
1274
- }, Qo = ({ className: e, labels: t, message: n, next: r, properties: o, questionId: i, type: a }) => {
1275
- const { border: c, useMobileStyling: s, viewDocument: p } = V((w) => ({ border: w.border, useMobileStyling: w.useMobileStyling, viewDocument: w.viewDocument })), [u, l] = W(-1), [m, h] = W(!1), _ = t && t.left, b = t && t.right;
1276
- let f;
1277
- const { range: y, scaleLabelType: x, ratingIcons: T } = o;
1278
- y && (f = Number(y));
1279
- const S = f || 5, C = (w) => {
1280
- var g, v;
1281
- switch (x) {
1282
- case "star":
1283
- return (g = T[0]) == null ? void 0 : g.svg;
1284
- case "smiley":
1285
- return (v = T[w]) == null ? void 0 : v.svg;
1286
- default:
1287
- return String(w + 1);
1288
- }
1289
- }, k = [...Array(S)].map((w, g) => {
1290
- const v = g + 1;
1291
- return d(Yo, { activeValue: u, border: c, icon: C(g), isPressed: m, onSubmit: () => r({ value: v, questionId: i, type: a }), range: S, scaleLabelType: x, setActiveValue: l, setIsPressed: h, useMobileStyling: s, value: v, viewDocument: p }, g);
1292
- }), j = (w) => {
1293
- w.preventDefault(), w.stopPropagation(), r({ value: null, questionId: i, type: a });
1294
- };
1295
- return d("form", { className: O(e, "ul-card--likert", "fade-in-transition"), children: [d(ie, { message: n, properties: o }), d(he, { properties: o, defaultBody: () => d(J, { children: [d("div", { "aria-label": `Rating (1 - ${S})`, className: "ul-card--likert__numbers", role: "radiogroup", children: k }), d("div", { className: "ul-card--likert__labels", children: [d("span", { children: _ }), d("span", { children: b })] }), !o.required && d("div", { className: "ul-vertical-centered-container", children: d(X, { onClick: j, children: ke(o) }) })] }) })] }, i);
1296
- }, Ir = (e) => e && (e.scrollHeight > e.offsetHeight ? e : Ir(e.parentElement)), Jo = (e) => {
1297
- if (!e || !((n) => n instanceof HTMLElement)(e))
1298
- return 0;
1299
- const t = getComputedStyle(e);
1300
- return parseFloat(t.marginTop) + parseFloat(t.marginBottom) + (parseFloat(t.borderTopWidth) + parseFloat(t.borderBottomWidth));
1301
- }, Xo = ({ columns: e, onSelect: t, options: n, selectedOptions: r }) => {
1302
- const o = ee([]), { border: i, useMobileStyling: a } = V((m) => ({ border: m.border, useMobileStyling: m.useMobileStyling })), c = n.findIndex((m) => r[m.id] === null), [s, p] = W(c), u = Me((m, h) => {
1303
- t(m, h);
1304
- const _ = s + 1, b = n[_];
1305
- if (b && r[b.id] === null) {
1306
- p(_);
1307
- const f = o.current[s];
1308
- if (f != null && f.firstElementChild) {
1309
- const y = Ir(f), x = f.firstElementChild, T = Jo(f) + x.clientHeight;
1310
- y == null || y.scrollTo(0, f.offsetTop + T);
1311
- }
1312
- }
1313
- }, [t, n, r, s]), l = Me((m, h) => {
1314
- const _ = s === m;
1315
- return d(zo, { animate: !0, header: h.label, isOpen: _, onClick: () => p(_ && !window.UserLeap.isMobileSDK ? -1 : m), ref: (b) => {
1316
- b && (o.current[m] = b);
1317
- }, showHeaderCheck: r[h.id] !== null, children: d("div", { style: { paddingTop: "12px" }, children: e.map((b) => d(Je, { allowTextEntry: !1, ariaLabel: `${h.label}-${b.label}`, border: i, error: !1, id: `${h.id}-${b.value}`, isRadio: !0, isSelected: r[h.id] === b.value, label: b.label, onUserInputChanged: () => u(h.id, b.value), useMobileStyling: a }, b.label)) }) }, h.id);
1318
- }, [i, e, s, u, r, a]);
1319
- return d("div", { children: n.map((m, h) => l(h, m)) });
1320
- }, ei = ({ columns: e, onSelect: t, options: n, selectedOptions: r }) => {
1321
- const { border: o, useMobileStyling: i } = V((l) => ({ border: l.border, useMobileStyling: l.useMobileStyling })), a = n.length, c = e.length, s = ee(null), [p, u] = W(!1);
1322
- return Q(() => {
1323
- const l = s.current, m = new ResizeObserver((h) => {
1324
- window.requestAnimationFrame(() => {
1325
- l && u(Math.round(h[0].contentRect.width) < l.scrollWidth);
1326
- });
1327
- });
1328
- return l && m.observe(l), () => {
1329
- l && m.unobserve(l);
1330
- };
1331
- }, []), d("div", { className: "ul-card--matrix_question_container", children: [d("div", { className: O("ul-card--matrix_container", p && "ul-matrix-scroll-gradient"), onScroll: () => {
1332
- (() => {
1333
- const l = s.current;
1334
- l && u(l.clientWidth + Math.abs(l.scrollLeft) < l.scrollWidth);
1335
- })();
1336
- }, ref: s, children: d("div", { className: "ul-card--matrix_grid", style: `--numColumns: ${c}; --numRows: ${a + 1}`, children: [d("div", {}), " ", e.map((l) => d("div", { className: "ul-matrix-column-label", children: l.label }, l.label)), n.map((l) => d(J, { children: [d("div", { "aria-label": l.label, className: "ul-matrix-row-label", children: l.label }, l.label), d("div", { className: "ul-matrix-row-options", role: "radiogroup", children: e.map((m, h) => d("div", { className: O("ul-matrix-option-wrapper", h === c - 1 && "ul-matrix-last-option"), children: d(Je, { allowTextEntry: !1, ariaLabel: `${l.label}-${m.label}`, border: o, choiceStyle: { background: "transparent", border: "none", marginBottom: "0", padding: "0" }, error: !1, id: `${l.id}-${m.value}`, isRadio: !0, isSelected: r[l.id] === m.value, onUserInputChanged: () => t(l.id, m.value), useMobileStyling: i }) }, m.value)) })] }))] }) }), p && d("button", { className: "ul-matrix-scroll-arrow", onClick: (l) => {
1337
- l.preventDefault();
1338
- const m = s.current;
1339
- if (m) {
1340
- const h = getComputedStyle(m).direction === "rtl";
1341
- m.scrollLeft = h ? m.clientWidth - m.scrollWidth : m.scrollWidth;
1342
- }
1343
- }, children: d("svg", { fill: "currentColor", height: "32", viewBox: "0 0 256 256", width: "32", xmlns: "http://www.w3.org/2000/svg", children: d("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" }) }) })] });
1344
- }, ti = ({ className: e, message: t, next: n, options: r, properties: o, questionId: i, type: a }) => {
1345
- const { useMobileStyling: c } = V((f) => ({ useMobileStyling: f.useMobileStyling })), s = o.matrixColumn, p = o.required, u = r.reduce((f, y) => (f[y.id] = null, f), {}), [l, m] = W(u), h = (f, y) => {
1346
- m((x) => ({ ...x, [f]: y }));
1347
- }, _ = p && Object.values(l).every((f) => f == null), b = o.displayMatrixAsAccordion || c;
1348
- return d("form", { className: O(e, "fade-in-transition", "ul-card__matrix"), id: "text-form", onSubmit: (f) => {
1349
- f.preventDefault(), f.stopPropagation(), n({ value: l, questionId: i, type: a });
1350
- }, children: [d(ie, { message: t, properties: o }), d(he, { properties: o, defaultBody: () => d("div", { className: "ul-card--matrix_question_container", children: [d(b ? Xo : ei, { columns: s, onSelect: h, options: r, selectedOptions: l }), d("div", { className: "ul-card__button-wrapper", children: d(X, { disabled: _, children: ke(o) }) })] }) })] }, i);
1351
- }, ni = ({ options: e, selectItem: t, selectedOptions: n, showCheckbox: r }) => {
1352
- const [o, i] = W("0px"), a = ee(!1), { themeColor: c, doc: s } = V((u) => ({ doc: u.viewDocument, themeColor: u.border })), p = Me((u) => {
1353
- if (a.current)
1354
- return;
1355
- const l = s.documentElement.clientHeight - 30;
1356
- let m = (u == null ? void 0 : u.getBoundingClientRect().height) ?? 0;
1357
- const h = (u == null ? void 0 : u.getBoundingClientRect().bottom) ?? 0;
1358
- h > l && (m -= h - l), i(`-${m}px`), a.current = !0;
1359
- }, [s.documentElement.clientHeight]);
1360
- return d("div", { className: "select-list", ref: p, style: { marginBottom: o }, children: e.map((u) => {
1361
- return d("div", { className: "select-option", onClick: (m) => {
1362
- t(u), m.stopPropagation();
1363
- }, role: "option", children: [r && d(Er, { divId: (l = u.id, `checkbox-div-${l}`), id: u.id, isSelected: n.includes(u), themeColor: c }), u.label] }, u.id);
1364
- var l;
1365
- }) });
1366
- }, ri = ({ isMultiSelect: e = !1, multiselectText: t = "choices selected", onChange: n, options: r, placeholderText: o, value: i }) => {
1367
- const [a, c] = W(!1), { viewDocument: s, update: p } = V((m) => ({ viewDocument: m.viewDocument, update: m.update })), u = () => {
1368
- c(!a), p();
1369
- };
1370
- Q(() => {
1371
- var h;
1372
- const m = () => {
1373
- c(!1), p();
1374
- };
1375
- return s.addEventListener("click", m), (h = window.parent) == null || h.addEventListener("click", m), () => {
1376
- var _;
1377
- (_ = window.parent) == null || _.removeEventListener("click", m), s.removeEventListener("click", m);
1378
- };
1379
- }, [s, p]);
1380
- const l = i.length === 0 ? ["select-button-placeholder"] : [];
1381
- return d(J, { children: [d("button", { "aria-label": "choice dropdown button", className: O("select-button", ...l), onClick: (m) => {
1382
- m.stopPropagation(), u();
1383
- }, type: "button", children: [d("span", { children: i.length === 0 ? o : i.length === 1 ? i[0].label : `${i.length} ${t}` }), d(wr, {})] }), a && d(ni, { options: r, selectedOptions: i, selectItem: (m) => {
1384
- var b;
1385
- const h = i.some((f) => f.id === m.id), _ = i.some((f) => {
1386
- var y;
1387
- return (y = f.optionProperties) == null ? void 0 : y.noneOfTheAbove;
1388
- });
1389
- (b = m.optionProperties) != null && b.noneOfTheAbove && !h ? n([m]) : e ? n(h ? i.filter((f) => f.id !== m.id) : _ ? [m] : [...i, m]) : h || n([m]), e || u();
1390
- }, showCheckbox: e })] });
1391
- }, Tr = ({ className: e, message: t, onSubmit: n, options: r = [], properties: o, questionId: i, type: a }) => {
1392
- const { border: c, useMobileStyling: s } = V((C) => ({ border: C.border, useMobileStyling: C.useMobileStyling })), p = r.reduce((C, k) => (C[k.id] = { isSelected: !1 }, C), {}), [u, l] = W(p), m = a === "multiplechoice", h = o.required, _ = r.find((C) => {
1393
- var k;
1394
- return (k = C.optionProperties) == null ? void 0 : k.noneOfTheAbove;
1395
- }), b = Object.entries(u).some(([C, k]) => {
1396
- var g;
1397
- const j = r.find((v) => `${v.id}` === C), w = k.userText === void 0 || k.userText.trim() === "";
1398
- return ((g = j == null ? void 0 : j.optionProperties) == null ? void 0 : g.allowsTextEntry) && w && k.isSelected;
1399
- }), f = Object.values(u).some((C) => C.isSelected), y = b || h && !f, x = r.map(({ id: C, label: k, value: j, optionProperties: w }) => {
1400
- var I, L;
1401
- const g = `${C}`, { allowsTextEntry: v, noneOfTheAbove: P } = { allowsTextEntry: !1, noneOfTheAbove: !1, ...w };
1402
- return d(Je, { allowTextEntry: v, border: c, error: !1, id: g, isRadio: m, isSelected: !!((I = u[g]) != null && I.isSelected), label: k, noneOfTheAbove: P, onUserInputChanged: (U) => S(U.id, U.selected, U.userText, U.noneOfTheAbove), promptText: "Please specify", text: (L = u[C]) == null ? void 0 : L.userText, useMobileStyling: s, value: j }, g);
1403
- }), T = (C) => {
1404
- C.preventDefault(), C.stopPropagation(), n(u);
1405
- }, S = (C, k, j, w) => {
1406
- const g = Object.assign({}, u);
1407
- if ((m || w) && k)
1408
- for (const v of Object.values(g))
1409
- v.isSelected = !1, delete v.userText;
1410
- else
1411
- _ && !w && u[_.id].isSelected && (g[_.id].isSelected = !1);
1412
- g[C] = { isSelected: k, userText: j }, l(g);
1413
- };
1414
- return d("form", { className: O(e, "ul-card--multiple", "fade-in-transition"), id: "text-form", onSubmit: T, children: [d(ie, { message: t, properties: o }), d(he, { properties: o, defaultBody: () => d("div", { children: [o.isDropdown ? d(ri, { isMultiSelect: !m, multiselectText: o.dropdownMultiselectedText ?? "choices selected", onChange: (C) => {
1415
- const k = { ...u };
1416
- for (const j of r)
1417
- C.includes(j) ? k[j.id].isSelected = !0 : k[j.id].isSelected = !1;
1418
- l(k);
1419
- }, options: r, placeholderText: o.dropdownPlaceholderText ?? (m ? "Select choice" : "Select choice(s)"), value: r.filter((C) => u[C.id].isSelected) }) : d("div", { className: O(Z("ul-card__choices", s)), role: m ? "radiogroup" : "group", children: x }), d("div", { className: "ul-card__button-wrapper", children: d(X, { disabled: y, onClick: T, children: ke(o) }) })] }) })] }, i);
1420
- }, oi = (e) => {
1421
- const { questionId: t, type: n, next: r, options: o } = e;
1422
- return d(Tr, { ...e, onSubmit: (i) => {
1423
- const a = Object.entries(i).find(([, l]) => l.isSelected) || [void 0, void 0], [c, s] = a, p = o.find((l) => `${l.id}` === c), u = s != null && s.userText ? { [c]: { userText: s.userText } } : null;
1424
- r({ value: p && c ? { [c]: p.value } : {}, secondaryValue: u, questionId: t, type: n });
1425
- } });
1426
- }, ii = (e) => {
1427
- const { questionId: t, type: n, next: r } = e;
1428
- return d(Tr, { ...e, onSubmit: (o) => {
1429
- const i = Object.entries(o).reduce((c, [s, p]) => (c[s] = p.isSelected, c), {}), a = Object.entries(o).reduce((c, [s, p]) => {
1430
- if (!p.userText)
1431
- return c;
1432
- const u = c || {};
1433
- return u[s] = { userText: p.userText }, u;
1434
- }, null);
1435
- r({ value: i, secondaryValue: a, questionId: t, type: n });
1436
- } });
1437
- }, ai = ({ className: e, props: { labels: t, message: n, properties: r }, next: o, questionId: i, type: a }) => {
1438
- const { border: c, useMobileStyling: s, viewDocument: p } = V((_) => ({ border: _.border, useMobileStyling: _.useMobileStyling, viewDocument: _.viewDocument })), u = t && t.left, l = t && t.right, m = [...Array(11)].map((_, b) => d("button", { className: O(Z("nps-number", s), Z(`nps-number-${b}`, s)), id: `option-${b}`, onClick: () => o({ value: b, questionId: i, type: a }), onKeyDown: (f) => {
1439
- var x, T;
1440
- const y = p.querySelectorAll("button.nps-number");
1441
- f.key === "ArrowRight" ? (x = y[b + 1]) == null || x.focus() : f.key === "ArrowLeft" ? (T = y[b - 1]) == null || T.focus() : f.key !== "Enter" && f.key !== " " || o({ value: b, questionId: i, type: a });
1442
- }, onPointerDown: (f) => {
1443
- f.currentTarget.style.zIndex = "2", f.currentTarget.style.borderColor = c;
1444
- }, onPointerLeave: (f) => {
1445
- f.currentTarget.style.zIndex = "auto", f.currentTarget.style.borderColor = kt;
1446
- }, tabIndex: 0, children: b }, b)), h = (_) => {
1447
- _.preventDefault(), _.stopPropagation(), o({ value: null, questionId: i, type: a });
1448
- };
1449
- return d("form", { className: O(e, "ul-card--nps", "fade-in-transition"), children: [d(ie, { message: n, properties: r }), d(he, { properties: r, defaultBody: () => d("div", { children: [d("div", { className: "ul-card--nps__numbers", children: m }), d("div", { className: "ul-card--nps__labels", children: [d("span", { children: u }), d("span", { children: l })] }), !r.required && d("div", { className: "ul-vertical-centered-container", children: d(X, { onClick: h, children: ke(r) }) })] }) })] }, i);
1450
- }, si = ({ className: e, message: t, next: n, properties: r, questionId: o, type: i }) => {
1451
- const { border: a, useMobileStyling: c, update: s } = V((S) => ({ border: S.border, useMobileStyling: S.useMobileStyling, update: S.update })), [p, u] = W(""), l = ee(null), m = p.trim(), h = r.required === !0 && !m, _ = Sr(l, () => s()), b = (S) => {
1452
- _(), S.preventDefault(), S.stopPropagation(), u(S.currentTarget.value);
1453
- }, f = (S) => {
1454
- S.preventDefault(), S.stopPropagation(), n({ value: p, questionId: o, type: i });
1455
- }, y = r && r.openTextPlaceholder ? r.openTextPlaceholder : "", x = (S) => {
1456
- S.currentTarget.style.borderColor = a;
1457
- }, T = (S) => {
1458
- S.currentTarget.style.borderColor = kt;
1459
- };
1460
- return d("form", { className: O(e, "ul-card--text", "fade-in-transition"), id: "text-form", children: [d(ie, { message: t, properties: r }), d(he, { defaultBody: () => d("div", { className: "ul-card-text", children: [d("div", { className: "ul-card-text__container", children: d("textarea", { "aria-labelledby": "ul-question", "aria-describedby": "ul-caption", "aria-multiline": "true", "aria-placeholder": y, className: O(Z("ul-card-text__input", c)), "data-gramm": "false", maxLength: 5e3, name: "text", onBlur: T, onChange: b, onFocus: x, placeholder: y, ref: l, role: "textbox", tabIndex: 0 }) }), d(X, { disabled: h, onClick: f, style: { backgroundColor: h ? "" : a }, children: ke(r) }), r.footerHtml && d("div", { className: "footer", dangerouslySetInnerHTML: { __html: r.footerHtml } })] }), properties: r })] }, o);
1461
- }, _t = 1, Pr = 2, Dr = 3, Ke = (e) => e.type === "av_permission", fn = (e) => e.type === "screen_permission", Rr = (e, t) => e === void 0 ? _t : e ? ((n, r) => !(Ke(r) ? r.permissionDescriptors : []).includes("camera") || n.getVideoTracks().length > 0)(e, t) ? Dr : _t : Pr, gn = { avStream: null, currentPage: null, mediaRecordingUids: null, nextQuestion: () => {
1462
- }, passthroughData: void 0, recordingMediaTypes: void 0, screenPermissionRequested: !1, type: void 0 }, se = yr((e) => ({ ...gn, reset: () => {
1463
- e(gn);
1464
- }, updatePage: (t) => {
1465
- e(t);
1466
- } }));
1467
- function bt({ currentPage: e, pages: t }) {
1468
- const { avStream: n, recordingMediaTypes: r, updatePage: o } = se.getState(), { recorderEventEmitter: i } = V.getState();
1469
- i.emit("av.permission", { "permission.descriptors": e.permissionDescriptors, "stream.ready": (a, c) => {
1470
- if (n === a)
1471
- return;
1472
- let s = e;
1473
- if (a && !e.permissionDescriptors.includes("camera")) {
1474
- const p = t.indexOf(e), u = c != null && c.active ? p + 2 : p + 1;
1475
- c != null && c.active && r && i.emit("begin.recording", { "recording.media.types": r, "start.recording.callback": (l) => o({ mediaRecordingUids: l }) }), s = t[u];
1476
- }
1477
- o({ currentPage: s, avStream: a });
1478
- } });
1479
- }
1480
- function yt({ status: e }) {
1481
- const { nextQuestion: t, passthroughData: n, mediaRecordingUids: r, reset: o } = se.getState(), { recorderEventEmitter: i, handleUploadUpdate: a, index: c } = V.getState(), s = { value: { taskStatus: e }, type: "recordedtask", questionId: (n == null ? void 0 : n.questionId) || 1 };
1482
- n && i.emit("finish.task", { "begin.callback": (p) => {
1483
- a({ mediaRecordingUid: p, isSubmitted: !0, progressPct: 0, isComplete: !1 });
1484
- }, "progress.callback": (p, u) => {
1485
- a({ mediaRecordingUid: p, progressPct: u.detail, isSubmitted: !1, isComplete: !1 });
1486
- }, "upload.callback": (p) => {
1487
- p && a({ mediaRecordingUid: p, isComplete: !0, isSubmitted: !0, progressPct: 100 });
1488
- }, "passthrough.data": n, "current.index": c, "task.response": s, "task.complete.callback": (p) => {
1489
- s.value.taskDurationMillisecond = p, r && (s.value.mediaRecordingUids = r), o(), t(s);
1490
- } });
1491
- }
1492
- function Nt({ pages: e, setIsRequestingPermission: t }) {
1493
- const { recorderEventEmitter: n, eventEmitFn: r } = V.getState(), { updatePage: o, currentPage: i, recordingMediaTypes: a, screenPermissionRequested: c } = se.getState();
1494
- if (!i)
1495
- return;
1496
- const s = e.indexOf(i);
1497
- switch (i.type) {
1498
- case "av_permission": {
1499
- const p = c ? s + 2 : s + 1;
1500
- return c && a && n.emit("begin.recording", { "recording.media.types": a, "start.recording.callback": (u) => {
1501
- o({ mediaRecordingUids: u });
1502
- } }), void o({ currentPage: e[p] });
1503
- }
1504
- case "screen_permission":
1505
- return void n.emit("screen.permission", { "screen.permission.requested": t, "stream.ready.callback": (p, u) => {
1506
- const l = u ? e[s + 1] : i;
1507
- u && a && n.emit("begin.recording", { "recording.media.types": a, "start.recording.callback": (m) => {
1508
- o({ captureStream: u, mediaRecordingUids: m });
1509
- } }), o({ currentPage: l, screenPermissionRequested: !0, captureStream: u });
1510
- } });
1511
- case "start_task":
1512
- return r("recorded.task.start"), n.emit("recorded.task.start"), n.emit("start.task"), void o({ currentPage: e[s + 1], screenPermissionRequested: !0 });
1513
- case "complete_task":
1514
- return;
1515
- }
1516
- }
1517
- const Nr = "ul-permission-graphics-container", Mr = "ul-permission-body", Lr = O(Nr, "ul_recorded-task-inset-spacing"), Xe = O("ul-horizontal-button-container", "ul-horizontal-button-container-left"), Or = ({ richTextBody: e }) => d("div", { className: "ul-rich-text-body", dangerouslySetInnerHTML: { __html: e }, id: "ul-task-detail-container" }), et = ({ required: e, skipButtonText: t, bottom: n = !1 }) => e ? null : d(X, { className: O(n && "ul-skip-button-below", "ul-button-inactive"), onClick: yt.bind(null, { status: "abandoned" }), children: t || "Skip" }), Mt = (e) => {
1518
- const { avStream: t, captureStream: n, recordingMediaTypes: r, updatePage: o } = se.getState(), i = (r == null ? void 0 : r.includes("audio")) || (r == null ? void 0 : r.includes("video"));
1519
- Q(() => {
1520
- const a = setInterval(() => {
1521
- i && t && !t.active ? o({ avStream: null, currentPage: e[0] }) : n && n.active || o({ captureStream: void 0, currentPage: e[i ? 1 : 0] });
1522
- }, 1e3);
1523
- return () => clearInterval(a);
1524
- }, [t, n, i, e, r, o]);
1525
- }, li = ({ content: e, pages: t, required: n }) => {
1526
- const { buttonText: r, skipButtonText: o, taskDetail: i } = e;
1527
- return Mt(t), d("div", { className: "ul-task-page", children: [i && d(Or, { richTextBody: i }), d("div", { className: Xe, children: [d(X, { onClick: Nt.bind(null, { pages: t }), children: r }), d(et, { required: n, skipButtonText: o })] })] }, "start-task");
1528
- }, di = ({ content: e, pages: t, properties: n }) => {
1529
- const { buttonText: r, skipButtonText: o } = e;
1530
- Mt(t);
1531
- const i = d(he, { properties: n, defaultBody: () => d("div", { className: Xe, children: [d(X, { className: "ul-complete-task-button", onClick: yt.bind(null, { status: "completed" }), children: r }), d(X, { className: O("ul-button-inactive"), onClick: yt.bind(null, { status: "given.up" }), children: o })] }) });
1532
- return d("div", { className: "ul-task-page", children: [e.taskDetail && d(Or, { richTextBody: e.taskDetail }), i] }, "complete-task");
1533
- }, ci = ({ content: e, pages: t, required: n }) => {
1534
- const { buttonText: r, skipButtonText: o } = e, [i] = V((s) => [s.tabTitle]), [a, c] = W(!1);
1535
- return d("div", { children: [d("div", { className: Lr, children: [d("p", { style: { marginTop: "auto" }, children: e.selectTabText }), d("div", { className: "ul-select-tab-container", children: d("p", { className: Mr, children: i }) })] }), d("div", { className: n ? "" : Xe, children: [d(X, { disabled: a, onClick: Nt.bind(null, { pages: t, setIsRequestingPermission: c }), children: r }), d(et, { required: n, skipButtonText: o })] })] });
1536
- }, ui = ({ content: e }) => d("div", { className: O(Nr, "ul_permission_svg_container", "ul_recorded-task-inset-spacing", "ul-center-horizontally"), dangerouslySetInnerHTML: { __html: e.svg } }, "ul-permission-request-graphic"), pi = ({ content: e, pages: t, required: n }) => {
1537
- const { permissionDeniedHeadline: r, permissionDeniedBody: o, skipButtonText: i, tryAgainButtonText: a } = e, c = Ke(t[0]) ? t[0] : null;
1538
- return Q(() => {
1539
- const s = setInterval(() => {
1540
- c !== null && bt({ currentPage: c, pages: t });
1541
- }, 1e3);
1542
- return () => clearInterval(s);
1543
- }, [c, t]), c ? d("div", { children: [d("div", { className: Lr, children: d("p", { className: "ul-av-permission-denied-paragraph", children: [d("span", { className: "ul-av-permission-denied-headline", children: r }), d("span", { className: Mr, children: o })] }) }), d("div", { className: Xe, children: [d(X, { onClick: bt.bind(null, { currentPage: c, pages: t }), children: a }), d(et, { required: n, skipButtonText: i })] })] }) : null;
1544
- }, mi = ({ stream: e }) => d("video", { autoPlay: !0, className: O("ul_recorded-task-inset-spacing"), id: "ul-record-task-video-preview", muted: !0, ref: (t) => {
1545
- t && (t.srcObject = e || null);
1546
- } }), hi = ({ content: e, pages: t, required: n }) => {
1547
- const { skipButtonText: r } = e, { avStream: o } = se.getState();
1548
- return Mt(t), d("div", { children: [d(mi, { stream: o }), d("div", { className: "ul-vertical-button-container-center", children: [d(X, { onClick: Nt.bind(null, { pages: t }), children: e.buttonText }), d(et, { bottom: !0, required: n, skipButtonText: r })] })] });
1549
- }, vi = ({ properties: e }) => {
1550
- const { pages: t, required: n } = e, { avStream: r, currentPage: o } = se.getState();
1551
- if (o === void 0)
1552
- return null;
1553
- switch (o == null ? void 0 : o.type) {
1554
- case "av_permission": {
1555
- const i = Rr(r, o);
1556
- return i === _t ? d(ui, { content: o }) : d(i === Pr ? pi : hi, { content: o, pages: t, required: n });
1557
- }
1558
- case "screen_permission":
1559
- return d(ci, { content: o, pages: t, required: n });
1560
- case "start_task":
1561
- return d(li, { content: o, pages: t, required: n });
1562
- case "complete_task":
1563
- return d(di, { content: o, pages: t, properties: e });
1564
- default:
1565
- return null;
1566
- }
1567
- }, fi = ({ className: e, properties: t, next: n, questionId: r }) => {
1568
- const o = V(), { surveyId: i, responseGroupUid: a, userId: c } = o, s = se(), { screenPermissionRequested: p } = s, u = se((b) => b.avStream);
1569
- let l = se((b) => b.currentPage);
1570
- l || (l = function({ pages: b, userId: f, responseGroupUid: y, surveyId: x, questionId: T, next: S }) {
1571
- const { updatePage: C } = se.getState(), { eventEmitFn: k, recorderEventEmitter: j } = V.getState(), w = { questionId: T, surveyId: x, visitorId: f, responseGroupUid: y };
1572
- let g = 0;
1573
- j.emit("recorded.task.permission.screen"), k("recorded.task.permission.screen"), j.emit("permission.status", { "permission.status.callback": (P, I, L, U) => {
1574
- const E = b[g], { type: B } = E, M = ["screen"];
1575
- if (Ke(E)) {
1576
- const { permissionDescriptors: A } = E, R = A == null ? void 0 : A.includes("microphone"), q = A == null ? void 0 : A.includes("camera");
1577
- R && M.push("audio"), q && M.push("video"), (P != null && P.active && !q || P != null && P.active && I) && g++;
1578
- }
1579
- fn(b[g]) && L && (g++, j.emit("begin.recording", { "recording.media.types": M, "start.recording.callback": (A) => C({ mediaRecordingUids: A }) })), C({ currentPage: b[g], avStream: P, screenPermissionRequested: L, nextQuestion: S, type: B, passthroughData: w, recordingMediaTypes: M, captureStream: U });
1580
- } });
1581
- const v = b[g];
1582
- return v.type === "av_permission" && bt({ currentPage: v, pages: b }), v;
1583
- }({ questionId: r, surveyId: i, next: (b) => {
1584
- n(b);
1585
- }, pages: t.pages, responseGroupUid: a, userId: c }));
1586
- let m = l.headline, h = l.captionText;
1587
- const _ = Rr(u, l);
1588
- return fn(l) && p && (m = l.permissionDeniedHeadline, h = l.permissionDeniedCaptionText), Ke(l) && _ === Dr && (m = l.permissionGrantedHeadline, h = l.permissionGrantedCaptionText), d("div", { className: O(e, "ul-center-horizontally", "fade-in-transition"), children: [d(ie, { message: m, properties: { captionText: h } }), d(vi, { properties: t })] });
1589
- }, gi = { "{{user_id}}": "externalUserId", "{{email}}": "email" }, _i = ({ className: e, message: t, next: n, properties: r, questionId: o, type: i }) => {
1590
- const { visitorAttributes: a } = V((l) => ({ visitorAttributes: l.visitorAttributes })), c = (l, m = !1) => {
1591
- n({ value: m ? { skipped: !0 } : void 0, questionId: o, type: i });
1592
- }, s = (l) => {
1593
- l.key !== "Enter" && l.key !== " " || n({ value: void 0, questionId: o, type: i });
1594
- };
1595
- return d("div", { className: O(e, "ul-card__text-url-prompt", "fade-in-transition"), children: [d(ie, { message: t }), (p = r == null ? void 0 : r.richTextBody, u = r == null ? void 0 : r.body, d("div", p ? { className: "ul-rich-text-body", dangerouslySetInnerHTML: { __html: p }, id: "ul-card__text-url-body-container" } : { className: "ul-rich-text-body", id: "ul-card__text-url-body-container", children: (u ? u.split(/\n\s*\n/g) : []).map((l, m) => d("p", { children: l }, m)) })), d(he, { defaultBody: () => {
1596
- const l = ((m, h = {}) => {
1597
- if (!m)
1598
- return m;
1599
- let _ = m;
1600
- const b = [];
1601
- for (const [x, T] of Object.entries(gi))
1602
- if (_.toLowerCase().includes(x))
1603
- if (h[T]) {
1604
- const S = new RegExp(x, "gi");
1605
- _ = _.replace(S, h[T]);
1606
- } else
1607
- b.push(x);
1608
- if (b.length === 0 || !_.includes("?"))
1609
- return _;
1610
- const f = _.slice(0, _.indexOf("?")), y = _.slice(_.indexOf("?") + 1).split("&").map((x) => x.split("=")).filter((x) => !b.includes(x[1]));
1611
- return y.length === 0 ? f : `${f}?${y.map((x) => x.join("=")).join("&")}`;
1612
- })(r && r.buttonUrl, a);
1613
- return d("div", { className: "ul-card-button-group", children: [d("a", { className: "ul-card-text__button ul-card__text-url-prompt-button", href: l, id: "ul-card-text__button", onClick: c, onKeyPress: s, rel: "noreferrer", role: l ? "link" : "button", tabIndex: 0, target: "_blank", children: ke(r) }), r.required === !1 && d("button", { className: "ul-card-skip__button", onClick: (m) => c(0, !0), children: Rt(r) })] });
1614
- }, properties: r })] }, o);
1615
- var p, u;
1616
- }, bi = ({ className: e, questionId: t }) => {
1617
- const { border: n, destroy: r, endCard: o, forceBrandedLogo: i } = V((s) => ({ border: s.border, destroy: s.destroy, endCard: s.endCard, forceBrandedLogo: s.forceBrandedLogo }));
1618
- Q(() => {
1619
- setTimeout(() => {
1620
- r(Ce);
1621
- }, i ? 4e3 : 2e3);
1622
- }, [r, i]);
1623
- const a = o && o.subheader ? d("p", { className: "ul-caption", children: o.subheader }) : null, c = o && o.headline ? o.headline : "";
1624
- return d("div", { className: O(e, "ul-card--thanks", "fade-in-transition"), children: d("div", { children: d("div", { className: "ul-card--thanks-content", children: [d("div", { className: "ul-thanks-check", children: d("svg", { "aria-labelledby": "title", fill: "none", height: "99", viewBox: "0 0 81 99", width: "81", xmlns: "http://www.w3.org/2000/svg", children: [d("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" }), d("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" }), d("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" })] }) }), d(ie, { message: c }), a] }) }) }, t);
1625
- }, ye = "https://cdn.sprig.com", N = { document: void 0, videojs: void 0 }, Lt = (e) => e + "-loading-spiner", Y = "hidden", _n = ".m3u8", at = "questionId", st = "ul-video-recorder-camera-off-button", lt = "ul-recording-in-session", yi = [{ type: "link", content: `${ye}/dependencies/videojs-record-4.5.0.min.css` }, { type: "script", content: `${ye}/dependencies/RecordRTC-5.6.2.js` }, { type: "script", content: `${ye}/dependencies/adapter.8.0.0.min.js` }, { type: "script", content: `${ye}/dependencies/videojs-record-4.5.0.min.js` }, { type: "script", content: `${ye}/userleap-web-upchunk-v2.2.2.js` }], Ur = [{ type: "link", content: `${ye}/dependencies/video-js-7.18.0.min.css` }, { type: "script", content: `${ye}/dependencies/video-js-7.18.0.min.js` }, { type: "style", content: `/* progress control styles */
1626
- .video-js .vjs-control {
1627
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
1628
- }
1629
-
1630
- .video-js .vjs-progress-control .vjs-progress-holder {
1631
- margin: 0 0px;
1632
- }
1633
-
1634
- .video-js .vjs-progress-control {
1635
- position: absolute;
1636
- height: 3px;
1637
- width: 100%;
1638
- }
1639
- /* position and align the buttons and button texts */
1640
- .ul-control-panel {
1641
- bottom: 0;
1642
- width: 100%;
1643
- flex-direction: column;
1644
- background-color: white;
1645
- height: fit-content;
1646
- z-index: 2;
1647
- }
1648
-
1649
- .ul-buttons-panel {
1650
- color: black;
1651
- display: flex;
1652
- gap: 20px;
1653
- height: 50px;
1654
- justify-content: center;
1655
- margin: 10px;
1656
- padding: 2px 14px 0;
1657
- }
1658
-
1659
- .video-js .vjs-volume-panel {
1660
- height: 30px;
1661
- width: 40px;
1662
- }
1663
-
1664
- .ul-inactive {
1665
- opacity: 0.3;
1666
- cursor: default;
1667
- pointer-events: none;
1668
- }
1669
-
1670
- /* buttons */
1671
- .ul-buttons-panel > .vjs-button {
1672
- background-color: rgba(0, 0, 0, 0.05);
1673
- border-radius: 50%;
1674
- display: flex;
1675
- height: 3em;
1676
- justify-content: center;
1677
- width: 3em;
1678
- }
1679
-
1680
- .vjs-button>.vjs-icon-placeholder:before {
1681
- align-items: center;
1682
- display: flex;
1683
- font-size: unset;
1684
- line-height: 0.5;
1685
- justify-content: center;
1686
- }
1687
-
1688
- span.ul-button-text {
1689
- align-self: flex-end;
1690
- position: relative;
1691
- top: 14px;
1692
- }
1693
-
1694
- #ul-camera-button {
1695
- white-space: nowrap;
1696
- }
1697
-
1698
- .video-js .vjs-volume-control.vjs-volume-horizontal {
1699
- background-color: #fff;
1700
- z-index: 1;
1701
- }
1702
-
1703
- .vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level {
1704
- background-color: black;
1705
- }
1706
-
1707
- .video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,
1708
- .video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,
1709
- .video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active {
1710
- width: 40px;
1711
- }
1712
-
1713
- .video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active,
1714
- .video-js .vjs-volume-panel .vjs-volume-control:active,
1715
- .video-js .vjs-volume-panel.vjs-hover .vjs-mute-control ~ .vjs-volume-control,
1716
- .video-js .vjs-volume-panel.vjs-hover .vjs-volume-control,
1717
- .video-js .vjs-volume-panel:active .vjs-volume-control,
1718
- .video-js .vjs-volume-panel:focus .vjs-volume-control {
1719
- visibility: visible;
1720
- left: 40px;
1721
- position: absolute;
1722
- transition: visibility 0.1s, opacity 0.1s, height 0.1s, width 0.1s, left 0s, top 0s;
1723
- }
1724
-
1725
- /* play button customization */
1726
- .video-js .vjs-play-control {
1727
- color: black;
1728
- }
1729
-
1730
- .video-js .vjs-play-control .vjs-icon-placeholder:before {
1731
- 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");
1732
- }
1733
-
1734
- /* position and style the current timer */
1735
- .ul-time-panel {
1736
- position: absolute;
1737
- bottom: 80px;
1738
- left: 10px;
1739
- height: 22px;
1740
- color: black;
1741
- border: 1px solid #e0e0eb;
1742
- border-radius: 23px;
1743
- background-color: white;
1744
- width: fit-content;
1745
- }
1746
-
1747
- .video-js .vjs-current-time,
1748
- .vjs-no-flex .vjs-current-time {
1749
- display: flex;
1750
- align-items: center;
1751
- text-align: center;
1752
- }
1753
-
1754
- /* remove the dot progress indicator */
1755
- .video-js .vjs-play-progress:before,
1756
- .video-js .vjs-volume-level:before,
1757
- .vjs-icon-circle:before,
1758
- .vjs-seek-to-live-control .vjs-icon-placeholder:before {
1759
- content: none;
1760
- }
1761
-
1762
- .video-js .vjs-mute-control .vjs-icon-placeholder:before {
1763
- 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");
1764
- }
1765
-
1766
- .video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before {
1767
- 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");
1768
- }
1769
-
1770
- .video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before {
1771
- 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");
1772
- }
1773
-
1774
- .video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before {
1775
- 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");
1776
- }
1777
-
1778
- .video-js .vjs-volume-control:hover .vjs-mouse-display {
1779
- display: none !important;
1780
- }
1781
-
1782
- .video-js .vjs-play-progress {
1783
- background-color: black;
1784
- }
1785
-
1786
- /* position video player inside the container */
1787
- .video-js .vjs-tech {
1788
- position: static;
1789
- }
1790
-
1791
- .video-js .vjs-time-tooltip {
1792
- padding: 0.25em 0.75em;
1793
- align-items: center;
1794
- color: #333;
1795
- background: #FCFCFD;
1796
- border-radius: 99px;
1797
- text-align: center;
1798
- border: 1px solid #E0E0EB;
1799
- display: flex;
1800
- align-items: center;
1801
- justify-content: center;
1802
- top: -25px;
1803
- font-size: 12px !important;
1804
- width: 50px !important;
1805
- }
1806
-
1807
- .video-js .vjs-play-progress.vjs-slider-bar .vjs-time-tooltip {
1808
- visibility: hidden !important;
1809
- }
1810
-
1811
- .video-js .vjs-progress-control .vjs-mouse-display {
1812
- z-index: 2;
1813
- }
1814
-
1815
- .ul-video-player {
1816
- width: 100%;
1817
- display: flex;
1818
- flex-direction: column;
1819
- height: auto;
1820
- border: 1px solid #E6E6E6;
1821
- background-color: white;
1822
- box-sizing: border-box;
1823
- border-radius: 4px;
1824
- background-clip: border-box;
1825
- overflow: hidden;
1826
- }
1827
-
1828
- .video-js.vjs-fullscreen:not(.vjs-ios-native-fs) {
1829
- border: none;
1830
- }
1831
-
1832
- #video-response-player-secondary-video-player {
1833
- max-width: 200px;
1834
- margin-right: 20px;
1835
- background-color: transparent;
1836
- }
1837
-
1838
- #ul-card-video__player_recorder-video-recorder.vjs-fullscreen {
1839
- display: table;
1840
- }
1841
-
1842
- .video-js div.vjs-progress-control {
1843
- margin-top: -3px;
1844
- }
1845
-
1846
- .video-js .vjs-progress-control .vjs-slider {
1847
- background-color: #B2BBBD;
1848
- }
1849
-
1850
- .vjs-record.video-js .vjs-control.vjs-button.vjs-fullscreen-control {
1851
- position:relative;
1852
- }
1853
-
1854
- .video-js .vjs-fullscreen-control .vjs-icon-placeholder:before {
1855
- 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");
1856
- }
1857
-
1858
- .video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before {
1859
- 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");
1860
- }
1861
-
1862
- .video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before, .video-js .vjs-icon-replay:before {
1863
- 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");
1864
- }
1865
-
1866
- .video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before, .vjs-icon-pause:before {
1867
- 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");
1868
- padding: 2px;
1869
- }
1870
-
1871
- .vjs-error-display {
1872
- display: none;
1873
- }
1874
-
1875
- .ul-video-player-video {
1876
- position: relative;
1877
- top: 0;
1878
- left: 0;
1879
- width: 100%;
1880
- }
1881
-
1882
- .ul-video-container {
1883
- width: 100%;
1884
- height: auto;
1885
- left: 0px;
1886
- top: 0px;
1887
-
1888
- background-color: transparent;
1889
- border-radius: 4px;
1890
-
1891
- align-items: start;
1892
- display: flex;
1893
- flex-direction: column;
1894
-
1895
- /* Inside Auto Layout */
1896
-
1897
- flex: none;
1898
- order: 0;
1899
- flex-grow: 0;
1900
- margin: 10px 0px;
1901
- position: relative;
1902
- }
1903
-
1904
- .vjs-record button.vjs-device-button.vjs-control {
1905
- background: rgba(255, 255, 255, 96);
1906
- width: 100%;
1907
- height: 100%;
1908
- left: 0;
1909
- top: 0;
1910
- margin: 0;
1911
- border-radius: 0;
1912
- line-height: 0.6;
1913
- padding: 10px;
1914
- display: flex;
1915
- align-items: center;
1916
- flex-direction: column;
1917
- justify-content: center;
1918
- z-index: 3;
1919
- }
1920
-
1921
- .vjs-record .vjs-device-button.vjs-control:before {
1922
- font-size: 14px !important;
1923
- color: #333;
1924
- content: "Your browser needs to access your camera and microphone for video recording";
1925
- line-height: 135%;
1926
- }
1927
-
1928
- .vjs-record .vjs-device-button.vjs-control.permission-denied:before {
1929
- font-size: 16px !important;
1930
- color: #262136;
1931
- content: "Unable to access your camera and microphone";
1932
- }
1933
-
1934
- .vjs-record .vjs-device-button.vjs-control:after {
1935
- display: inline-block;
1936
- background: #F0F0F5;
1937
- font-size: 13px;
1938
- border-radius: 4px;
1939
- content: "Request Permissions";
1940
- padding: 1em 2em;
1941
- color: #333;
1942
- margin-top: 20px;
1943
- }
1944
-
1945
- .vjs-record .vjs-device-button.vjs-control.permission-denied:after {
1946
- display: inline-block;
1947
- background: white;
1948
- font-size: 13px;
1949
- content: "Please go to your browser settings and update permissions to enable recording";
1950
- padding: 1em;
1951
- color: #4B575D;
1952
- margin: 5px;
1953
- line-height: 135%;
1954
- text-align: center;
1955
- }
1956
-
1957
- .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 {
1958
- cursor: pointer;
1959
- }
1960
-
1961
- .ul-video-recorder-delete-button .vjs-icon-placeholder:before {
1962
- 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");
1963
- }
1964
-
1965
- .ul-video-recorder-toggle-button .vjs-icon-placeholder:before {
1966
- 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");
1967
- }
1968
-
1969
- .ul-video-recorder-toggle-button.ul-recording-in-session .vjs-icon-placeholder:before {
1970
- 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");
1971
- }
1972
-
1973
- .ul-video-recorder-camera-off-button .vjs-icon-placeholder:before {
1974
- 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");
1975
- }
1976
-
1977
- .ul-video-recorder-camera-off-button-audio-only .vjs-icon-placeholder:before {
1978
- 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");
1979
- transform: scale(0.75);
1980
- }
1981
-
1982
- .ul-upload-progress-label {
1983
- padding: 0.15em 0.75em;
1984
- align-items: center;
1985
- font-size: 12px;
1986
- color: #333;
1987
- background: #FCFCFD;
1988
- border-radius: 99px;
1989
- text-align: center;
1990
- border: 1px solid #E0E0EB;
1991
- display: flex;
1992
- align-items: center;
1993
- justify-content: center;
1994
- position: absolute;
1995
- bottom: 75px;
1996
- left: calc(50% - 65px);
1997
- width: 130px;
1998
- z-index: 5;
1999
- }
2000
-
2001
- .ul-upload-progress-label__time {
2002
- display: inline-flex;
2003
- margin-left: 0.8em;
2004
- align-items: center;
2005
- }
2006
-
2007
- .ul-upload-progress-label__time:before {
2008
- content: "";
2009
- display: inline-flex;
2010
- width: 1px;
2011
- height: 12px;
2012
- background-color: #E0E0EB;
2013
- margin-right: 0.8em;
2014
- }
2015
-
2016
- @keyframes grow {
2017
- 0% {
2018
- transform: scale(1);
2019
- background-color: #EEECFC;
2020
- }
2021
- 50% {
2022
- transform: scale(1.2);
2023
- background-color: #E1DFF4;
2024
- }
2025
- 100% {
2026
- transform: scale(1);
2027
- background-color: #EEECFC;
2028
- }
2029
- }
2030
-
2031
- .ul-audio-recorder-placeholder:before {
2032
- width: 80px;
2033
- height: 80px;
2034
- border-radius: 120px;
2035
- background-color: #EEECFC;
2036
- content: "";
2037
- position: absolute;
2038
- left: calc(50% - 40px);
2039
- top: calc(50% - 40px);
2040
- animation: 6s infinite grow;
2041
- transform-origin: 50% 60%;
2042
- }
2043
-
2044
- .ul-audio-recorder-placeholder:after {
2045
- 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");
2046
- position: absolute;
2047
- left: 50%;
2048
- top: 50%;
2049
- transform: translate(-50%, -50%);
2050
- transform: translate(-50%, -50%) scale(0.6);
2051
- }
2052
-
2053
- .ul-audio-recorder-placeholder {
2054
- min-height: 150px;
2055
- width: 100%;
2056
- background-color: #fcfcfd;
2057
- display: block;
2058
- position: relative;
2059
- }
2060
-
2061
- .vjs-fullscreen .ul-audio-recorder-placeholder {
2062
- vertical-align: middle;
2063
- display: table-cell;
2064
- }
2065
-
2066
- .vjs-fullscreen .ul-control-panel {
2067
- height: 80px;
2068
- position: absolute;
2069
- bottom: 0;
2070
- left: 0;
2071
- width: 100%;
2072
- max-width: 100%;
2073
- background-color: #F8F8F8;
2074
- }
2075
-
2076
- .vjs-playback-rate .vjs-playback-rate-value {
2077
- align-items: center;
2078
- display: flex;
2079
- font-size: 12px;
2080
- justify-content: center;
2081
- }
2082
-
2083
- .vjs-playback-rate .vjs-menu {
2084
- left: -5px;
2085
- bottom: 3px;
2086
- }
2087
-
2088
- .vjs-menu-button-popup .vjs-menu .vjs-menu-content {
2089
- background-color: white;
2090
- border: 1px solid rgba(0, 0, 0, 0.1);
2091
- box-sizing: border-box;
2092
- border-radius: 4px;
2093
- }
2094
-
2095
- .vjs-menu li {
2096
- font-size: 12px;
2097
- padding: 5px 0;
2098
- }
2099
-
2100
- .vjs-menu li.vjs-selected {
2101
- color: lightgray;
2102
- }
2103
-
2104
- .vjs-menu li.vjs-menu-item:hover {
2105
- background-color: rgba(0, 0, 0, 0.05);
2106
- }
2107
-
2108
- .vjs-fullscreen .ul-buttons-panel {
2109
- top: calc(50% - 30px);
2110
- position: relative;
2111
- }
2112
-
2113
- .vjs-fullscreen .vjs-record-indicator.vjs-control {
2114
- bottom: 90px !important;
2115
- }
2116
-
2117
- .vjs-record.video-js div.vjs-control.vjs-record-indicator {
2118
- padding: 0.3em 0.75em 0.15em 15px;
2119
- align-items: center;
2120
- font-size: 12px;
2121
- color: #333;
2122
- background: #FCFCFD;
2123
- border-radius: 99px;
2124
- text-align: center;
2125
- border: 1px solid #E0E0EB;
2126
- display: flex;
2127
- justify-content: center;
2128
- align-items: center;
2129
- position: absolute;
2130
- bottom: 75px;
2131
- top: auto;
2132
- left: calc(50% - 21px);
2133
- width: 43px;
2134
- height: 16px;
2135
- z-index: 4;
2136
- }
2137
-
2138
- .vjs-record.video-js div.vjs-control.vjs-record-indicator:after {
2139
- content: "";
2140
- background-color: #EB5757;
2141
- width: 6px;
2142
- height: 6px;
2143
- border-radius: 8px;
2144
- animation: none;
2145
- top: 4px;
2146
- left: 5px;
2147
- }
2148
-
2149
- .vjs-record.video-js div.vjs-control.vjs-record-indicator:before {
2150
- position: relative;
2151
- font-size: 9px;
2152
- animation: none;
2153
- opacity: 1;
2154
- color: #333;
2155
- top: auto;
2156
- left: auto;
2157
- }
2158
-
2159
- .ul-video-player-loading {
2160
- display: inline-block;
2161
- position: relative;
2162
- width: 6rem;
2163
- height: 6rem;
2164
-
2165
- }
2166
- .ul-video-player-loading div {
2167
- box-sizing: border-box;
2168
- position: absolute;
2169
- display: block;
2170
- width: 80%;
2171
- height: 80%;
2172
- margin: 5px;
2173
- border: 5px solid #666;
2174
- border-radius: 50%;
2175
- animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
2176
- border-color: #666 transparent transparent transparent;
2177
- }
2178
-
2179
- .first {
2180
- animation-delay: -0.45s;
2181
- }
2182
- .second {
2183
- animation-delay: -0.3s;
2184
- }
2185
- .third {
2186
- animation-delay: -0.15s;
2187
- }
2188
-
2189
- @keyframes lds-ring {
2190
- 0% {
2191
- transform: rotate(0deg);
2192
- }
2193
- 100% {
2194
- transform: rotate(360deg);
2195
- }
2196
- }
2197
-
2198
- .ul-video-btn {
2199
- width: 100%;
2200
- border: 1px solid #E6E6E6;
2201
- border-radius: 4px;
2202
- background-color: rgba(0, 0, 0, 0.02);
2203
- padding: 8px;
2204
- font-weight: 500;
2205
- font-size: 15px;
2206
- }
2207
-
2208
- .ul-record-response-btn:before, .ul-record-response-btn:after, .ul-back-question-btn:before, .ul-back-question-btn:after {
2209
- margin: 0 5px;
2210
- vertical-align: middle;
2211
- }
2212
-
2213
- .ul-record-response-btn:before {
2214
- 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");
2215
- display: inline-block;
2216
- transform: translate(0px, 2px);
2217
- }
2218
-
2219
- .ul-record-response-btn:after {
2220
- content: 'Record your Response';
2221
- }
2222
-
2223
- .ul-back-question-btn:before {
2224
- 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");
2225
- display: inline-block;
2226
- transform: scale(0.85) translate(0, 1px);
2227
- -moz-transform: scale(0.85) translate(0, 2px);
2228
- }
2229
-
2230
- .ul-back-question-btn:after {
2231
- content: 'Back to Question';
2232
- }
2233
-
2234
- .hidden {
2235
- display: none !important;
2236
- opacity: 0;
2237
- visibility: hidden;
2238
- }
2239
-
2240
- .visible {
2241
- visibility: visible;
2242
- opacity: 1;
2243
- animation: fade 0.3s;
2244
- }
2245
-
2246
- @keyframes fade {
2247
- 0% {
2248
- opacity: 0;
2249
- }
2250
-
2251
- 100% {
2252
- opacity: 1;
2253
- }
2254
- }
2255
-
2256
- #ul-recording-countdown-screen {
2257
- width: 100%;
2258
- height: 100%;
2259
- color: black;
2260
- background-color: rgba(255, 255, 255, 0.8);
2261
- position: absolute;
2262
- text-align: center;
2263
- font-size: 15px;
2264
- z-index: 1;
2265
- display: table;
2266
- }
2267
-
2268
- .ul-countdown-text {
2269
- vertical-align: middle;
2270
- display: table-cell;
2271
- transform: translate(0, -25px);
2272
- }
2273
-
2274
- .vjs-fullscreen > #ul-recording-countdown-screen {
2275
- font-size: 25px;
2276
- transform: unset;
2277
- }
2278
-
2279
- .vjs-poster {
2280
- background-size: cover;
2281
- }
2282
- ` }], Hr = "-video-player", bn = "-secondary-video-player", yn = "-video-recorder";
2283
- let ae, xn;
2284
- const ve = async ({ event: e, apiBase: t, headers: n, visitorId: r, envId: o, metadata: i }) => {
2285
- const a = N.document.documentElement;
2286
- if (!r || !o)
2287
- return;
2288
- const c = { event: `SDK - ${e}`, visitorId: r, environmentId: o, metadata: { ...i || {}, screenWidth: window.screen.width, screenHeight: window.screen.height, clientWidth: a.clientWidth, clientHeight: a.clientHeight, location: window.location.href, language: navigator.language } };
2289
- (await fetch(`${t}/sdk/1/visitors/${r}/analytics`, { method: "POST", cache: "no-cache", headers: n, body: JSON.stringify(c) })).ok || console.warn("[Sprig] (ERR-444) Failed to track analytics", e);
2290
- }, ce = async (e, t, n, r, o, i) => {
2291
- ve({ event: `Video Error ${t}`, apiBase: n, headers: r, visitorId: o, envId: i, metadata: { errorMessage: e.message } });
2292
- const a = N.document.documentElement, c = { screenWidth: window.screen.width, screenHeight: window.screen.height, clientWidth: a.clientWidth, clientHeight: a.clientHeight, location: window.location.href, language: navigator.language }, s = { action: t, err: { message: e.message, stack: e.stack }, meta: c, vid: o, envId: i };
2293
- (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(s) })).ok || console.warn("[Sprig] (ERR-444) Failed to report error to API", e);
2294
- }, Br = (e, t) => {
2295
- if (e.length === 0)
2296
- return t && t();
2297
- Promise.all(e.reduce((n, r) => (n.push(((o, { type: i, content: a }) => new Promise(function(c, s) {
2298
- let p;
2299
- i === "script" ? (p = N.document.createElement("script"), p.src = a) : i === "link" ? (p = N.document.createElement("link"), p.rel = "stylesheet", p.href = a, p.type = "text/css") : (p = N.document.createElement("style"), p.innerHTML = a), p.onload = function() {
2300
- c(a);
2301
- }, p.onerror = function() {
2302
- s(a);
2303
- }, p.async = !1, p.id = btoa(a), o.appendChild(p);
2304
- }))(N.document.head, r)), n), [])).then(() => {
2305
- N.videojs = N.document.defaultView.videojs, t && t();
2306
- }).catch(function(n) {
2307
- console.log(n + " failed to load");
2308
- });
2309
- }, kn = (e, t, n) => {
2310
- if (t === "start" && (e.style.visibility = "visible"), t === "none")
2311
- e.style.visibility = Y;
2312
- else if (t === "success")
2313
- e.style.visibility = Y, e.innerHTML = "Upload succeeded!";
2314
- else {
2315
- const r = Math.round(parseFloat(n));
2316
- 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%)`;
2317
- }
2318
- }, dt = (e, t) => {
2319
- const n = N.videojs(e.id());
2320
- return n == null ? void 0 : n.payload[t];
2321
- }, Ar = (e, t) => {
2322
- const n = new (N.videojs.getComponent("Component"))(e);
2323
- return n.addClass("ul-buttons-panel"), t.map((r) => {
2324
- n.addChild(r);
2325
- }), xi(n), n;
2326
- }, xi = (e) => {
2327
- e.children().forEach((t) => {
2328
- if (re[t.name_]) {
2329
- const n = $e(re[t.name_], `ul-${re[t.name_]}`);
2330
- t.el_.appendChild(n);
2331
- }
2332
- });
2333
- }, $e = (e, t = "") => {
2334
- const n = N.document.createElement("span");
2335
- return n.className = "ul-button-text", n.innerHTML = e, n.id = t, n;
2336
- }, Vr = (e, t, n, r, o = !1, i) => {
2337
- e.addClass("ul-video-player");
2338
- const a = new (N.videojs.getComponent("Component"))(e);
2339
- a.addClass("ul-control-panel"), e.progressBar = a.addChild("ProgressControl"), n && e.src(n), e.audioPlayerPlaceholder = new (N.videojs.getComponent("Component"))(e), e.audioPlayerPlaceholder.addClass("ul-audio-recorder-placeholder");
2340
- const c = n && n.src ? Ei(n.src) : null;
2341
- !n || !o && c ? (e.audioPlayerPlaceholder.hide(), N.document.getElementById(`${e.id()}_html5_api`).style.height = "100%", c && e.poster(c)) : (e.children()[0].classList.add("vjs-hidden"), N.document.getElementById(`${e.id()}_html5_api`).style.height = "0px"), e.on("play", () => {
2342
- o || !n || c || wi(e), i == null || i.play();
2343
- }), e.on("pause", () => {
2344
- i == null || i.pause();
2345
- }), e.on("seeked", () => {
2346
- i == null || i.currentTime(e.currentTime());
2347
- }), e.on("ratechange", () => {
2348
- i == null || i.playbackRate(e.playbackRate());
2349
- }), e.addChild(e.audioPlayerPlaceholder, {}, 1), a.addChild(t), e.addChild(a), r && r(e);
2350
- }, ki = (e, t, n, r, o, i, a, c = !1) => {
2351
- xn = Date.now();
2352
- const s = 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 } } });
2353
- if (!s)
2354
- return;
2355
- s.payload = n;
2356
- const { surveyId: p, questionId: u, responseGroupUid: l, visitorId: m, envId: h } = n;
2357
- let _;
2358
- const b = (v) => {
2359
- const P = st, I = st + "-audio-only";
2360
- kn(s.uploadProgressLabel, "none"), ae && ae.startTime >= xn && ae.abort();
2361
- const L = N.document.getElementById("ul-camera-button");
2362
- v ? (s.children()[0].classList.add("vjs-hidden"), T.removeClass(P), T.addClass(I), L.innerHTML = re.TurnOnCamera, s.audioPlayerPlaceholder.removeClass("vjs-hidden"), _ == null || _.getTracks().forEach((U) => {
2363
- U.stop();
2364
- }), window.navigator.mediaDevices.getUserMedia({ video: !0, audio: !0 }).then((U) => {
2365
- _ = U, U.getVideoTracks().forEach((E) => {
2366
- E.enabled = !1;
2367
- }), s.record().onDeviceReady(U);
2368
- }).catch(s.record().onDeviceError.bind(s.record()))) : (_ == null || _.getVideoTracks().forEach((U) => {
2369
- U.enabled = !0;
2370
- }), s.children()[0].classList.remove("vjs-hidden"), s.record().getDevice(), T.removeClass(I), T.addClass(P), L.innerHTML = re.TurnOffCamera, s.audioPlayerPlaceholder.addClass("vjs-hidden"));
2371
- }, f = new (N.videojs.getComponent("Button"))(s, { clickHandler: () => {
2372
- f.hasClass(Y) || (ve({ event: "Video Delete Button Clicked", apiBase: r, headers: a, visitorId: m, envId: h, metadata: { questionId: u, responseGroupUid: l, surveyId: p } }), b(s.cameraOff), o(H.DELETE, {}), T.removeClass(Y), f.addClass(Y));
2373
- } });
2374
- f.addClass("ul-video-recorder-delete-button"), f.el_.appendChild($e(re.DeleteButton, "ul-delete-button"));
2375
- const y = N.document.getElementById(t), x = () => {
2376
- y.classList.contains("vjs-fullscreen") && s.cameraOff ? y.style.display = "table" : y.style.display = "flex";
2377
- };
2378
- x();
2379
- const T = new (N.videojs.getComponent("Button"))(s, { clickHandler: () => {
2380
- s.record().isRecording() || (s.cameraOff = !s.cameraOff, ve({ event: "Video Camera Button Clicked", apiBase: r, headers: a, visitorId: n.visitorId, envId: n.envId, metadata: { questionId: u, responseGroupUid: l, surveyId: p, cameraOff: s.cameraOff } }), b(s.cameraOff), !f.hasClass(Y) && f.addClass(Y), o(H.DELETE, {}), x());
2381
- } });
2382
- T.addClass(st), T.el_.appendChild($e(re.TurnOffCamera, "ul-camera-button"));
2383
- const S = new (N.videojs.getComponent("Button"))(s, { clickHandler: () => {
2384
- const v = N.document.getElementById("ul-recorder-toggle");
2385
- if (s.record().isRecording())
2386
- s.record().stop(), v && (v.innerHTML = re.RecordButton), S.removeClass(lt), f.removeClass(Y);
2387
- else {
2388
- const P = N.document.getElementById("ul-recording-countdown-screen");
2389
- if (P)
2390
- P.remove(), v && (v.innerHTML = re.RecordButton), b(s.cameraOff), o(H.DELETE, {}), T.removeClass(Y), f.addClass(Y), S.removeClass(lt), j.show();
2391
- else {
2392
- S.addClass(lt), j.hide(), T.addClass(Y), f.addClass(Y), v && (v.innerHTML = re.StopButton);
2393
- const I = N.document.createElement("div");
2394
- I.id = "ul-recording-countdown-screen", y.insertBefore(I, y.children[1]), I.style.height = `${y.offsetHeight}px`, qr(s, 3);
2395
- }
2396
- }
2397
- } });
2398
- S.addClass("ul-video-recorder-toggle-button"), S.el_.appendChild($e(re.RecordButton, "ul-recorder-toggle"));
2399
- const C = N.document.createElement("p");
2400
- C.style.visibility = "hidden", C.className = "ul-upload-progress-label", e.appendChild(C), s.uploadProgressLabel = C;
2401
- const k = Ar(s, [f, T, "PlayToggle", S, "FullscreenToggle"]), j = k.children().find((v) => v.name_ === "FullscreenToggle");
2402
- j.hasClass("vjs-disabled") && j.hide();
2403
- const w = k.children().find((v) => v.name_ === "PlayToggle");
2404
- w.hide(), f.addClass(Y), Vr(s, k, i, !1, c), s.on("stopRecord", () => {
2405
- S.hide(), w.show(), j.show(), f.removeClass(Y);
2406
- }), s.on("deviceReady", () => {
2407
- S.show(), w.hide(), f.addClass(Y);
2408
- }), ((v, P, I, L, U) => {
2409
- const { surveyId: E, responseGroupUid: B, visitorId: M, envId: A } = v.payload;
2410
- v.on("deviceError", function() {
2411
- console.warn("device error: ", v.deviceErrorCode), v.deviceErrorCode.message === "Permission denied" ? (v.deviceButton.addClass("permission-denied"), I && I(H.ERROR, { type: H.PERMISSION_DENIED }), ve({ event: "Video Permission Denied", apiBase: P, headers: U, visitorId: M, envId: A, metadata: { questionId: dt(v, at), responseGroupUid: B, surveyId: E } })) : (I && I(H.ERROR, { type: H.OTHER }), ce(new Error(v.deviceErrorCode.message), "recorderDeviceError", P, U, M, A));
2412
- }), v.on("error", function(R, q) {
2413
- ce(q || v.error(), "recorderError", P, U, M, A);
2414
- }), v.on("startRecord", function(R, q) {
2415
- L(v.uploadProgressLabel, "none"), ve({ event: "Video Record Start", apiBase: P, headers: U, visitorId: M, envId: A, metadata: { questionId: dt(v, at), responseGroupUid: B, surveyId: E } });
2416
- }), v.on("finishRecord", async function() {
2417
- L(v.uploadProgressLabel, "start", 0);
2418
- const R = dt(v, at);
2419
- if (!E) {
2420
- const K = "internal error: missing fields in payload";
2421
- return I && I(H.ERROR, { type: H.OTHER }), ce(new Error(K), "finishRecord", P, U, M, A), null;
2422
- }
2423
- v.record().stopDevice();
2424
- const q = v.cameraOff ? H.MEDIA_TYPE_AUDIO : H.MEDIA_TYPE_VIDEO, G = pt();
2425
- ve({ event: "Video Record Finish", apiBase: P, headers: U, visitorId: M, envId: A, metadata: { mediaRecordingUid: G, questionId: R, responseGroupUid: B, surveyId: E, mediaType: q } });
2426
- const le = { surveyId: E, updatedAt: (/* @__PURE__ */ new Date()).toISOString(), mediaType: q, mediaRecordingUid: G };
2427
- R && (le.questionId = R), B && (le.responseGroupUid = B), M && (le.visitorId = M);
2428
- const F = await (async () => {
2429
- const K = await fetch(`${P}/2/environments/integrations/upload`, { method: "POST", cache: "no-cache", headers: { "Content-Type": "application/json" }, body: JSON.stringify(le) });
2430
- if (K.ok) {
2431
- const ge = await K.json();
2432
- return I && I(H.UPLOAD_STARTED, { [H.UPLOAD_ID]: ge.upload.id, [H.MEDIA_TYPE]: q, [H.MEDIA_RECORDING_UID]: G }), ge.upload.url;
2433
- }
2434
- return I && I(H.ERROR, { type: H.OTHER, response: K }), ce(new Error("failed to get upload response with url"), "finishRecord", P, U, M, A), null;
2435
- })();
2436
- F && (ae = N.document.defaultView.UpChunk.createUpload({ endpoint: F, file: new N.document.defaultView.File([v.recordedData], `recording ${q} ${Date.now()}`), chunkSize: 5120 }), ae.startTime = Date.now(), ve({ event: "Video Upload Start", apiBase: P, headers: U, visitorId: M, envId: A, metadata: { mediaRecordingUid: G, questionId: R, responseGroupUid: B, surveyId: E, mediaType: q, url: F } }), ae.on("error", (K) => {
2437
- L(v.uploadProgressLabel, "none"), I && I(H.UPLOAD_FINISHED, { [H.MEDIA_RECORDING_UID]: G }), ce(K, "finishRecord", P, U, M, A);
2438
- }), ae.on("progress", (K) => {
2439
- I && I(H.UPLOAD_PROGRESS, { [H.MEDIA_RECORDING_UID]: G, [H.UPLOAD_PROGRESS_PCT]: K.detail }), L(v.uploadProgressLabel, "progress", K.detail);
2440
- }), ae.on("success", () => {
2441
- L(v.uploadProgressLabel, "success"), I && I(H.UPLOAD_FINISHED, { [H.MEDIA_RECORDING_UID]: G }), ve({ event: "Video Upload Success", apiBase: P, headers: U, visitorId: M, envId: A, metadata: { mediaRecordingUid: G, questionId: R, responseGroupUid: B, surveyId: E, mediaType: q, url: F, elapsedMs: ae.startTime && Date.now() - ae.startTime } });
2442
- }));
2443
- });
2444
- })(s, r, o, kn, a);
2445
- const g = [{ name: "microphone" }];
2446
- !s.cameraOff && g.push({ name: "camera" }), Promise.all(g.map((v) => {
2447
- var P;
2448
- return (P = navigator == null ? void 0 : navigator.permissions) == null ? void 0 : P.query(v);
2449
- })).then((v) => {
2450
- v.reduce((P, I) => P & I.state === "granted", !0) && s && (s.deviceButton && s.deviceButton.hide(), s.record().getDevice());
2451
- }).catch((v) => {
2452
- });
2453
- }, qr = (e, t = 3) => {
2454
- const n = N.document.getElementById("ul-recording-countdown-screen");
2455
- n && t === 0 ? (n.remove(), e.record().start()) : n && (n.innerHTML = `<span class='ul-countdown-text'>Recording in... ${t}</span>`, setTimeout(() => {
2456
- qr(e, t - 1);
2457
- }, 1e3));
2458
- }, $r = (e) => {
2459
- const t = N.document.createElement("div");
2460
- return t.className = "ul-video-container", t.appendChild(((n) => {
2461
- const r = N.document.createElement("div");
2462
- return r.className = "ul-video-player-loading", r.id = Lt(n), ["first", "second", "third", "fourth"].map((o) => {
2463
- const i = N.document.createElement("div");
2464
- i.className = o, r.appendChild(i);
2465
- }), r;
2466
- })(e)), t;
2467
- }, xt = (e, t) => {
2468
- const n = N.document.createElement("video");
2469
- n.id = e, n.className = "video-js vjs-default-skin ul-video-player-video";
2470
- const r = N.document.createElement("p");
2471
- r.className = "vjs-no-js", r.innerHTML = "To view this video please enable JavaScript, and consider upgrading to a web browser that";
2472
- const o = N.document.createElement("a");
2473
- 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;
2474
- }, wi = (e, t) => {
2475
- e.children()[0].classList.remove("vjs-hidden"), e.audioPlayerPlaceholder.hide(), N.document.getElementById(`${e.id()}_html5_api`).style.height = "100%";
2476
- }, Ye = (e, t) => N.document.getElementById(e) ? t ? N.videojs(e, t) : N.videojs(e) : (console.error(`Error in finding player element with ID, ${e}`), null), Ci = (e, t, n, r = !1, o = "https://api.sprig.com", i = document, a = null, c = null) => {
2477
- N.document = i;
2478
- const s = e + Hr, p = $r(s);
2479
- return N.document.addEventListener("securitypolicyviolation", (u) => {
2480
- ce(new Error(`Voice & Video feature violates ${u.violatedDirective} web page CSP policies for the question player.`), "playerDeviceError", o, {});
2481
- }), Br(Ur, () => {
2482
- N.document.getElementById(Lt(s)).remove(), xt(s, p);
2483
- const u = { playsinline: !0, playbackRates: [0.5, 1, 1.5, 2], fill: !0 };
2484
- try {
2485
- const l = e + bn;
2486
- xt(l, p);
2487
- const m = Ye(s, u), h = Ye(l, { muted: !0, ...u });
2488
- if (!m || !h)
2489
- return;
2490
- ((f, y, x) => {
2491
- f.addClass(`ul${bn}`);
2492
- const T = new (N.videojs.getComponent("Component"))(f);
2493
- y && f.src(y), f.addChild(T), x && x(f);
2494
- })(h, a, c), a || h.addClass(Y);
2495
- const _ = Ar(m, ["PlaybackRateMenuButton", "PlayToggle", "FullscreenToggle"]), b = _.children().find((f) => f.name_ === "FullscreenToggle");
2496
- b.hasClass("vjs-disabled") && b.hide(), Vr(m, _, t, n, r, h);
2497
- } catch (l) {
2498
- return void ce(new Error(`Error when creating video player object ${l}`), "playerDeviceError", o, {});
2499
- }
2500
- }), p;
2501
- }, Ei = (e) => {
2502
- if (!e)
2503
- return null;
2504
- const t = e.match(/https:\/\/stream.mux.com\/(.*)/);
2505
- let n = t ? t[1] : null;
2506
- return n.includes(_n) && (n = n.replace(_n, "")), n ? `https://image.mux.com/${n}/thumbnail.jpg?time=0` : null;
2507
- }, H = { 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" }, re = { PlaybackRateMenuButton: "Speed", PlayToggle: "Play", FullscreenToggle: "Expand", TurnOnCamera: "Turn on", TurnOffCamera: "Turn off", DeleteButton: "Delete", RecordButton: "Record", StopButton: "Stop", PauseButton: "Pause" }, _e = "ul-card-video__player_recorder", wn = "ul-video-btn", ct = 0, Cn = 1, Si = ({ className: e, message: t, next: n, properties: r, questionId: o, type: i }) => {
2508
- const { apiURL: a, envId: c, handleUploadUpdate: s, headers: p, responseGroupUid: u, surveyId: l, viewDocument: m, visitorId: h } = V((g) => ({ apiURL: g.apiURL, envId: g.envId, handleUploadUpdate: g.handleUploadUpdate, headers: g.headers, responseGroupUid: g.responseGroupUid, surveyId: g.surveyId, viewDocument: g.viewDocument, visitorId: g.userId })), [_, b] = W(!1), [f, y] = W(null), [x, T] = W(null), [S, C] = W(ct), k = r && r.videoUrl, j = (g, v) => {
2509
- g === H.UPLOAD_STARTED ? (y(v[H.UPLOAD_ID]), T(v[H.MEDIA_RECORDING_UID]), b(!0)) : g === H.DELETE ? (y(null), T(null), b(!1)) : g === H.UPLOAD_PROGRESS ? isNaN(v[H.UPLOAD_PROGRESS_PCT]) ? s({ mediaRecordingUid: v[H.MEDIA_RECORDING_UID], isComplete: !0 }) : s({ mediaRecordingUid: v[H.MEDIA_RECORDING_UID], progressPct: v[H.UPLOAD_PROGRESS_PCT] }) : g === H.UPLOAD_FINISHED && s({ mediaRecordingUid: v[H.MEDIA_RECORDING_UID], isComplete: !0 });
2510
- }, w = (g) => {
2511
- g.preventDefault(), g.stopPropagation(), document.getElementById(_e) && ((v) => {
2512
- const P = v + yn;
2513
- if (N.document.getElementById(P) && N.videojs) {
2514
- try {
2515
- if (!N.videojs(P).record().stream)
2516
- return;
2517
- } catch {
2518
- return;
2519
- }
2520
- N.videojs(P).record().stop(), N.videojs(P).record().stopDevice();
2521
- }
2522
- })(_e), f && x ? (s({ mediaRecordingUid: x, isSubmitted: !0 }), n({ value: { mediaRecordingUid: x }, questionId: o, type: i })) : n({ value: null, questionId: o, type: i });
2523
- };
2524
- return d("form", { className: O(e, "ul-card--video", "fade-in-transition"), id: "ul-video-interview-form", children: [d(ie, { message: t, properties: r }), d("div", { id: "ul-card-voice__video", children: [d("div", { children: [d("div", { id: "ul-question-player-container", style: { display: S === ct ? "" : "none" }, children: [d("div", { id: _e, ref: (g) => {
2525
- if (g && g.children.length === 0 && !r.hideRecordedPrompt) {
2526
- const v = Ci(_e, { src: k, type: "application/x-mpegURL" }, void 0, r.mediaType === H.MEDIA_TYPE_AUDIO, a, m);
2527
- g.appendChild(v);
2528
- }
2529
- } }), d(he, { defaultBody: () => d("button", { className: `${wn} ul-record-response-btn`, onClick: (g) => {
2530
- g.preventDefault(), g.stopPropagation(), document.getElementById(_e) && ((v) => {
2531
- const P = Ye(v + Hr);
2532
- P == null || P.pause();
2533
- })(_e), C(Cn);
2534
- } }), properties: r })] }), d("div", { style: { display: S === Cn ? "block" : "none" }, children: [d("button", { className: `${wn} ul-back-question-btn`, onClick: (g) => {
2535
- g.preventDefault(), g.stopPropagation(), C(ct);
2536
- }, style: { display: r.hideRecordedPrompt ? "none" : "block" } }), d("div", { id: "ul-recorder-player-container", ref: (g) => {
2537
- if (g && g.children.length === 0) {
2538
- const v = ((P, I = {}, L = "https://api.userleap.com", U, E, B, M = !1, A = document) => {
2539
- N.document = A;
2540
- const R = P + yn, q = $r(R);
2541
- return N.document.addEventListener("securitypolicyviolation", (G) => {
2542
- ce(new Error(`Voice & Video feature violates ${G.violatedDirective} web page CSP policies for the recorder player.`), "recorderDeviceError", L, B, I.visitorId, I.envId);
2543
- }), Br(Ur.concat(yi), () => {
2544
- xt(R, q), N.document.getElementById(Lt(R)).remove();
2545
- try {
2546
- ki(q, R, I, L, U, E, B, M);
2547
- } catch (G) {
2548
- return void ce(new Error(`Error when creating video recorder player object ${G}`), "recorderDeviceError", L, B, I.visitorId, I.envId);
2549
- }
2550
- }), q;
2551
- })(_e, { surveyId: l, responseGroupUid: u, questionId: o, visitorId: h, envId: c }, a, j, void 0, { ...p, "x-ul-video-recorder-origin": "sdk" }, r.mediaType === H.MEDIA_TYPE_AUDIO, m);
2552
- g.appendChild(v);
2553
- }
2554
- } })] })] }), d(X, { disabled: !_, onClick: w, children: ke(r) }), d("button", { className: "ul-card-text__button ul-button-inactive ul-card-skip__button", id: "ul-card-video__skip_button", onClick: w, style: { display: r.required ? "none" : "block", ..._ ? { display: "none" } : {} }, children: Rt(r) })] })] });
2555
- }, ji = ({ className: e }) => {
2556
- const { uploadProgress: t } = V((i) => ({ uploadProgress: i.uploadProgress }));
2557
- let n, r;
2558
- 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.");
2559
- const o = Math.round(Math.min(99, ...Object.values(t).filter((i) => i.isSubmitted).map((i) => i.progressPct || 0)));
2560
- return d("div", { className: O(e, "ul-card--uploading", "fade-in-transition"), children: [d("div", { "aria-busy": "true", "aria-label": "Processing...", "aria-live": "polite", className: "ul-loading-spinner-container", role: "progressbar", children: d("div", { className: "ul-loading-spinner", children: [d("div", { className: "first" }), d("div", { className: "second" }), d("div", { className: "third" }), d("div", { className: "fourth" })] }) }), d(ie, { message: `${n} (${o}% complete)` }), d("p", { className: "ul-caption", children: r })] });
2561
- }, En = ({ logoOnly: e = !1, style: t = {} }) => d("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 && d("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" }), d("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" }), d("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" }), d("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" }), d("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" }), d("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" })] }), Ii = () => {
2562
- const { border: e, cards: t, forceBrandedLogo: n, headers: r, index: o, marketingUrl: i, showSurveyBrand: a, slugName: c, surveyId: s, viewedCardCount: p } = V((y) => ({ border: y.border, cards: y.cards, forceBrandedLogo: y.forceBrandedLogo, headers: y.headers, index: y.index, marketingUrl: y.marketingUrl, showSurveyBrand: y.showSurveyBrand, slugName: y.slugName, surveyId: y.surveyId, viewedCardCount: y.viewedCardCount })), u = ee(null), l = t.filter((y) => y.type !== "uploading" && y.type !== "thanks"), m = ((y, x) => {
2563
- const T = /* @__PURE__ */ new Set(["thanks", "uploading"]);
2564
- if (x >= y.length || x < 0 || T.has(y[x].type))
2565
- return 0;
2566
- const S = y.filter((k) => !T.has(k.type));
2567
- if (x === S.length - 1)
2568
- return 1;
2569
- const C = { [S.length - 1]: 1, [-1]: 0 };
2570
- for (let k = S.length - 2; k >= x; k--) {
2571
- const j = S[k], w = Vo(k, j.props.routingOptions);
2572
- if (w.length === 0) {
2573
- C[k] = C[k + 1] + 1;
2574
- continue;
2575
- }
2576
- let g = 0, v = Ho(j);
2577
- if (v === null)
2578
- return S.length - 1 - x;
2579
- for (let P = 0; P < w.length && v.length !== 0; P++) {
2580
- const { comparator: I, target: L, value: U } = w[P], E = v.filter((B) => {
2581
- const M = Uo({ value: B }, j.type, B), A = xr(B, j.type);
2582
- return !(M && I === "answered" || A && I === "partial" || !M && !A && I === "skipped" || I === "given_up" && Ao(B) && B.taskStatus === "given.up" || M && j.type === "open" && (I === "contains" || I === "notcontains") || M && Bo(I) && Dt[I](B, U));
2583
- });
2584
- if (E.length < v.length) {
2585
- const B = parseInt(String(L), 10);
2586
- if (B !== -1 && B <= k || B >= S.length)
2587
- return S.length - 1 - x;
2588
- g = Math.max(C[B] + 1, g);
2589
- }
2590
- v = E;
2591
- }
2592
- v.length > 0 && (g = Math.max(C[k + 1] + 1, g)), C[k] = g;
2593
- }
2594
- return C[x];
2595
- })(t, o), h = p + 1, _ = h / (h + m), b = `${i}?utm_source=survey_branding&utm_medium=website&utm_campaign=${c}&utm_content=${s}${n && "&utm_term=poweredby_pill"}`;
2596
- Q(() => {
2597
- u.current && (u.current.style.width = 100 * _ + "%");
2598
- }, [_]);
2599
- const f = t[o].type === "thanks";
2600
- return d("footer", { className: "ul-footer " + (r["userleap-platform"] === "link" ? "ul-footer__link" : ""), style: a ? {} : { marginBottom: "10px" }, children: f && n ? d("a", { dir: "ltr", href: b, rel: "noreferrer", target: "_blank", children: d("div", { className: "thank-you-card-link", children: [d("div", { className: "sprig-box-logo", children: d(En, { logoOnly: !0, style: { margin: "auto" } }) }), d("div", { children: d("p", { children: ["Capture insights about your own product", d(Sn, { style: { display: "inline-flex", marginInlineStart: "4px", verticalAlign: "middle" } })] }) })] }) }) : d(J, { children: [l.length > 1 && d("div", { id: "ul-progress-bar-container", children: d("div", { id: "ul-progress-bar-current", ref: u, style: { border: `1px solid ${e || "#000"}` } }) }), a ? d("div", { className: n ? "yellow-footer-logo" : "", style: { marginTop: "4px" }, children: d("a", { href: b, rel: "noreferrer", target: "_blank", children: d("div", { style: { display: "flex" }, children: [d(En, { logoOnly: !1 }), n && d(Sn, { style: { display: "block", margin: "auto 0 auto 4px", transform: "rotateY(0deg) rotate(-45deg)" } })] }) }) }) : null] }) });
2601
- }, Sn = ({ style: e }) => d("svg", { fill: "none", height: "10", style: e, viewBox: "0 0 12 10", width: "12", xmlns: "http://www.w3.org/2000/svg", children: [d("path", { d: "M1.47839 5.2085L10.9384 5.2085", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.35" }), d("path", { d: "M7.0686 1.15845L10.9386 5.20845L7.0686 9.25845", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.35" })] }), Ti = () => {
2602
- const { answers: e, border: t, cards: n, close: r, configureExitOnOverlayClick: o, destroy: i, endCard: a, eventEmitFn: c, fontFamily: s, headers: p, index: u, next: l, previewMode: m, productConfig: h, seen: _, showStripes: b, studyType: f, surveyId: y, update: x, useMobileStyling: T, viewDocument: S } = V((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, next: E.next, seen: E.seen, showStripes: E.showStripes, studyType: E.studyType, surveyId: E.surveyId, update: E.update, useMobileStyling: E.useMobileStyling, viewDocument: E.viewDocument })), C = ee(null), k = ee(!1), j = p["userleap-platform"], { props: w, type: g, name: v } = n[u], P = n.length;
2603
- Q(() => {
2604
- C.current && (C.current.classList.contains("ul-app--visible") || C.current.classList.add("ul-app--visible"), !k.current && c && (k.current = !0, c(fe.SurveyAppeared, { name: fe.SurveyAppeared, "survey.id": y })));
2605
- }, [c, y]), Q(() => {
2606
- const E = () => {
2607
- S.visibilityState === "visible" && (_(), S.removeEventListener("visibilitychange", E));
2608
- };
2609
- return S.addEventListener("visibilitychange", E), E(), () => {
2610
- S.removeEventListener("visibilitychange", E);
2611
- };
2612
- }, [_, S]), Q(() => {
2613
- x();
2614
- }, [u, x]), Q(() => {
2615
- o(() => r());
2616
- }, [r, o]);
2617
- const I = Te(() => () => r(Ce), [r]), L = async function(E) {
2618
- l({ data: E, completeSurvey: () => {
2619
- i(Ce);
2620
- }, endCard: a }), Gr(S);
2621
- };
2622
- if (e) {
2623
- for (const E of e)
2624
- if (E.questionId === v) {
2625
- let B;
2626
- if (g === "multiplechoice") {
2627
- const M = w.options.find(({ value: A }) => A === E.value);
2628
- if (!M)
2629
- break;
2630
- B = { [M.id]: M.value };
2631
- } else
2632
- B = E.value;
2633
- L({ value: B, type: g, questionId: E.questionId });
2634
- break;
2635
- }
2636
- }
2637
- const U = !T && ((h == null ? void 0 : h.framePosition) === "center" || (h == null ? void 0 : h.desktopDisplay) === "center-modal" || ((h == null ? void 0 : h.placement) || "").includes("center"));
2638
- return d("div", { className: O("ul-app", Fe(p) ? "ul-app--visible" : "ul-app--overlay"), dir: "auto", id: Ce, onClick: (E) => {
2639
- var R;
2640
- const B = window.sprigAPI, M = E.target;
2641
- if (!B || !M)
2642
- return;
2643
- const A = [M, M.parentElement];
2644
- for (const q of A)
2645
- if (((R = q == null ? void 0 : q.tagName) == null ? void 0 : R.toLowerCase()) === "a")
2646
- return E.preventDefault(), void (B == null ? void 0 : B.openUrl(q.href));
2647
- }, ref: C, style: { "--theme": t, ...s ? { fontFamily: s.replace(";", "") } : {}, ...U ? { position: "relative" } : {} }, children: d("div", { className: "ul-app__container", children: d("div", { className: O(Z("ul-card__container", T, f)), style: { ...f !== "feedbackButton" || (h == null ? void 0 : h.desktopDisplay) === "center-modal" ? { borderColor: t } : {}, ...(h == null ? void 0 : h.desktopDisplay) === "slider" ? { margin: "0px" } : {} }, children: [!["email", "link"].includes(p["userleap-platform"]) && (!a || u + 1 !== P) && d("div", { className: O(Z("close-container", T)), children: d("div", { "aria-label": "Close button", className: "close-btn", onClick: I, onKeyPress: (E) => {
2648
- E.key === "Enter" && I();
2649
- }, role: "button", tabIndex: 0, children: d("svg", { fill: "none", height: "18px", viewBox: "0 0 13 13", width: "18px", xmlns: "http://www.w3.org/2000/svg", children: d("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" }) }) }) }), b && d("div", { className: "ul-header__container", dir: "ltr", children: d("div", { className: "ul-header", children: "For development purposes only" }) }), m && d("div", { className: "ul-header__container", dir: "ltr", children: d("div", { className: "ul-header", children: "Preview Mode: Response will not be recorded." }) }), d("div", { className: O(Fo("ul-card-main-content", j)), children: (() => {
2650
- const E = { className: "ul-card", next: L, questionId: v, type: g };
2651
- switch (g) {
2652
- case "consentlegal":
2653
- return z(Ko, { ...E, ...w, key: v });
2654
- case "likert":
2655
- return z(Qo, { ...E, ...w, key: v });
2656
- case "matrix":
2657
- return z(ti, { ...E, ...w, key: v });
2658
- case "multiplechoice":
2659
- return z(oi, { ...E, ...w, key: v });
2660
- case "multipleselect":
2661
- return z(ii, { ...E, ...w, key: v });
2662
- case "nps":
2663
- return z(ai, { ...E, key: v, props: w });
2664
- case "open":
2665
- return z(si, { ...E, ...w, key: v });
2666
- case "recordedtask":
2667
- return z(fi, { ...E, ...w, key: v });
2668
- case "texturlprompt":
2669
- return z(_i, { ...E, ...w, key: v });
2670
- case "thanks":
2671
- return z(bi, { ...E, ...w, key: v });
2672
- case "uploading":
2673
- return z(ji, { ...E, ...w, key: v });
2674
- case "videovoice":
2675
- return z(Si, { ...E, ...w, key: v });
2676
- default:
2677
- return null;
2678
- }
2679
- })() }), d(Ii, {})] }) }) });
2680
- }, zr = () => MediaRecorder.isTypeSupported("video/webm") ? "video/webm" : "video/mp4", jn = (e) => {
2681
- const t = { audioBitsPerSecond: 128e3, videoBitsPerSecond: 25e5, mimeType: zr() };
2682
- return new MediaRecorder(e, t);
2683
- }, In = (e, t, n) => {
2684
- n[t] = [], e.ondataavailable = function(r) {
2685
- n[t].push(r.data);
2686
- }, e.currentMediaRecordingUid = t, e.start();
2687
- };
2688
- function Tn(e, t, n, r, o, i) {
2689
- if (e && e.state !== "inactive") {
2690
- const { "begin.callback": a } = r, c = e.currentMediaRecordingUid;
2691
- if (!c)
2692
- return;
2693
- a && a(c), e.onstop = () => async function(s, p, u, l, m, h, _) {
2694
- const b = V.getState().viewDocument, { "upload.callback": f, "progress.callback": y } = l, x = { mediaType: u, updatedAt: (/* @__PURE__ */ new Date()).toISOString(), mediaRecordingUid: m, ...l["passthrough.data"] }, T = await (async (j, w) => {
2695
- var v;
2696
- const g = await fetch(w, { method: "POST", cache: "no-cache", headers: { "Content-Type": "application/json" }, body: JSON.stringify(j) });
2697
- if (g.ok) {
2698
- const P = await g.json();
2699
- return (v = P == null ? void 0 : P.upload) == null ? void 0 : v.url;
2700
- }
2701
- return null;
2702
- })(x, s);
2703
- if (!T)
2704
- return void (f && f(null, { message: "failed to get upload url" }));
2705
- const S = new Blob(_, { type: zr() });
2706
- if (!b.defaultView)
2707
- return;
2708
- const C = new b.defaultView.File([S], `recording video ${Date.now()}`), k = h.createUpload({ endpoint: T, file: C, chunkSize: 5120 });
2709
- k.on("error", (j) => {
2710
- f && f(null, j);
2711
- }), k.on("progress", (j) => {
2712
- y && y(m, j);
2713
- }), k.on("success", () => {
2714
- f && f(m, !0);
2715
- });
2716
- }(t, 0, n, r, c, o, i), e.stop();
2717
- }
2718
- }
2719
- const Pi = { state: { chunks: {} }, stopRecording(e) {
2720
- const { uploadApiEndpoint: t, avRecorder: n, screenRecorder: r, UpChunk: o } = this.state, i = this.state.avStream && this.state.avStream.getVideoTracks().length > 0 ? "video" : "audio";
2721
- this.state.chunks && t && o && (n != null && n.currentMediaRecordingUid && Tn(n, t, i, e, o, this.state.chunks[n == null ? void 0 : n.currentMediaRecordingUid]), r != null && r.currentMediaRecordingUid && Tn(r, t, "screen", e, o, this.state.chunks[r == null ? void 0 : r.currentMediaRecordingUid]));
2722
- }, handleCancelledStream(e) {
2723
- const t = e.getVideoTracks(), n = e.getAudioTracks();
2724
- let r = t.length && t[0];
2725
- r = r || n.length && n[0], r && r.addEventListener("ended", () => {
2726
- [this.state.avRecorder, this.state.screenRecorder].map((o) => {
2727
- o && (o.state === "recording" && o.stop(), o.stream.getTracks().map((i) => {
2728
- i.readyState === "live" && i.stop();
2729
- }));
2730
- }), Object.assign(this.state, { avStream: null, captureStream: null, avRecorder: null, screenRecorder: null });
2731
- });
2732
- }, taskDurationMillisecond() {
2733
- return this.state.startTime ? (/* @__PURE__ */ new Date()).getTime() - this.state.startTime.getTime() : 0;
2734
- }, setUpChunk(e) {
2735
- this.state.UpChunk = e;
2736
- }, configure(e, t) {
2737
- 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) => {
2738
- this.avPermissionCallback(n);
2739
- }), e.on("begin.recording", this.beginRecordingCallback.bind(this)), e.on("start.task", this.startTaskCallback.bind(this)), e.on("screen.permission", async (n) => {
2740
- this.screenPermissionCallback(n);
2741
- }), e.on("finish.task", async (n) => {
2742
- this.finishTaskCallback(n);
2743
- });
2744
- }, async avPermissionCallback(e) {
2745
- var r, o, i;
2746
- const { "stream.ready": t, "permission.descriptors": n } = e;
2747
- try {
2748
- (r = this.state.avStream) != null && r.active && (this.state.avStream.getTracks().map((a) => a.readyState === "live" && a.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);
2749
- } catch (a) {
2750
- return console.warn("Error: failed to get permissions: " + a), void (t && t(null, null));
2751
- }
2752
- t && t(this.state.avStream, this.state.captureStream);
2753
- }, async screenPermissionCallback(e) {
2754
- const { "screen.permission.requested": t, "stream.ready.callback": n } = e;
2755
- t == null || t(!0);
2756
- try {
2757
- this.state.captureStream = await navigator.mediaDevices.getDisplayMedia({ video: !0, cursor: "always", displaySurface: "browser", preferCurrentTab: !0 });
2758
- } catch (r) {
2759
- return t == null || t(!1), console.warn("Error: failed to get permissions: " + r), void (n && n(null, null));
2760
- }
2761
- 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);
2762
- }, beginRecordingCallback(e) {
2763
- const { "recording.media.types": t, "start.recording.callback": n = () => {
2764
- } } = e;
2765
- if (!t)
2766
- return;
2767
- const r = [];
2768
- if (t.includes("video") && this.state.avStream) {
2769
- this.state.avRecorder = jn(this.state.avStream);
2770
- const o = pt();
2771
- In(this.state.avRecorder, o, this.state.chunks), r.push(o);
2772
- }
2773
- if (t.includes("screen") && this.state.captureStream) {
2774
- this.state.screenRecorder = jn(this.state.captureStream);
2775
- const o = pt();
2776
- In(this.state.screenRecorder, o, this.state.chunks), r.push(o);
2777
- }
2778
- r && n && n(r);
2779
- }, async finishTaskCallback(e) {
2780
- const { "current.index": t, "task.response": n, "task.complete.callback": r } = e;
2781
- 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);
2782
- }, startTaskCallback() {
2783
- this.state.startTime = /* @__PURE__ */ new Date();
2784
- }, permissionStatusCallback(e) {
2785
- var r;
2786
- const { "permission.status.callback": t } = e, n = this.state.avStream;
2787
- t && t(n, !!n && (n == null ? void 0 : n.getVideoTracks().length) > 0, !!((r = this.state.captureStream) != null && r.active), this.state.captureStream);
2788
- }, lookAheadAndStopStream(e, t, n, r) {
2789
- const { avRecorder: o, screenRecorder: i } = this.state, { allResponses: a } = V.getState(), c = kr({ cards: n, index: e, hasEndCard: r, allResponses: a });
2790
- c !== null && n[c].type === "recordedtask" || [o, i].map((s) => {
2791
- s && (s.state === "recording" && s.stop(), s.stream.getTracks().map((p) => {
2792
- p.readyState === "live" && p.stop();
2793
- }));
2794
- });
2795
- } }, ze = Object.create(Pi);
2796
- Object.freeze(ze);
2797
- const Di = ({ mode: e = null, viewWindow: t, viewDocument: n, trackPageViewUrl: r }) => {
2798
- const o = n.documentElement;
2799
- let i;
2800
- try {
2801
- i = t.parent.location.href;
2802
- } catch {
2803
- i = t.location.href;
2804
- }
2805
- return { mode: e, sw: t.screen.width, sh: t.screen.height, cw: o.clientWidth, ch: o.clientHeight, p: r ?? i, l: t.navigator.language };
2806
- }, Mi = { configure: function(e, t = !0) {
2807
- var y;
2808
- const { answers: n, apiURL: r, endCard: o, eventEmitFn: i, fontFamilyURL: a, frame: c, previewKey: s, viewDocument: p, viewWindow: u } = e, l = Fe(e.headers) ? e.frame : p.body, m = e.UpChunk || window.UpChunk, h = Be, _ = ((x, T) => {
2809
- const S = [...x], C = /* @__PURE__ */ new Set(["videovoice", "recordedtask"]);
2810
- return x.some((k) => C.has(k.type)) && S.push({ name: -2, props: { routingOptions: [] }, type: "uploading" }), T && S.push({ name: -1, props: { routingOptions: [] }, type: "thanks" }), S;
2811
- })(e.cards, !!o);
2812
- ze.configure(h, { cards: _, hasEndCard: !!o, apiURL: r, UpChunk: m }), V.setState({ apiURL: r, answers: n, border: e.border, index: e.startingQuestionIdx || 0, cards: _, configureExitOnOverlayClick: e.configureExitOnOverlayClick, customMetadata: e.customMetadata, endCard: e.endCard, envId: e.envId, eventEmitFn: i, fontFamily: e.fontFamily, forceBrandedLogo: e.forceBrandedLogo, frame: c, headers: e.headers, hasViewedEmbed: !1, isPreview: e.isPreview, marketingUrl: "https://sprig.com", meta: Di({ mode: e.mode, viewWindow: u, viewDocument: p, trackPageViewUrl: e.trackPageViewUrl }), mode: e.mode, previewKey: s, previewMode: e.previewMode, productConfig: e.productConfig, recorder: ze, recorderEventEmitter: h, 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 });
2813
- const { head: b } = p;
2814
- if (Ut({ document: p, 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;margin:auto;text-align:start;min-width:200px}.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{background:#fff;border-radius:6px;display:flex;flex-direction:column;flex-grow:1;flex:1 1 auto;font-size:17px;line-height:23px;overflow:auto;padding:20px 20px 5px;position:relative;text-align:center;word-break:break-word}.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;margin-bottom:3px;display:flex;gap:16px;justify-content: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{flex-grow:55;display:flex}.ul-card-main-content__web,.ul-card-main-content__android,.ul-card-main-content__ios{margin-bottom:5px}.question-header-container{margin-bottom:15px}.ul-question{color:#343442;display:block;font-size:20px;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:15px;line-height:130.35%;letter-spacing:.02em;color:#6c6c6e;text-align:start;margin-top:8px}.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}.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-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--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-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-text{flex:1 0 auto;margin-top:2px;margin-bottom:3px;align-items:center;display:flex;flex-wrap:wrap;justify-content:center;padding:0}.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-voice__video{align-items:center;display:flex;flex-direction:column}#ul-card-voice__video>div{margin-bottom:10px;width:100%}#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.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;max-height:190px;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}#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;left:0;position:absolute;top:0;width:100%}.ul-footer{display:flex;flex-direction:column;align-items:center;justify-content:center;margin-top:auto;flex-grow:1;width:100%}.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%}.close-btn{cursor:pointer;height:18px;margin-inline-end:-10px;position:relative;top:-10px;width:18px;z-index:1}.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;max-width:250px;margin:25px 0}#ul-progress-bar-current{transition:width 1s ease;width:0%;height:0;border-radius:2px}.prototype-button{width:100%;background:#00000003;border:1.5px solid #e6e6e6;border-radius:4px 0 0 4px;flex:none;flex-grow:1;margin:0;padding:20px 0;font-size:14px;font-family:inherit;text-decoration:underline}.prototype-button:hover{cursor:pointer}' }), e.customStyles && Ut({ document: p, elementId: "ul-custom-style", styleString: e.customStyles, nonce: e.styleNonce }), e.fontFamily && a && parent) {
2815
- const x = p.createElement("link");
2816
- x.rel = "stylesheet", x.href = a, b.appendChild(x);
2817
- }
2818
- if (!m && e.cards.some((x) => x.type === "recordedtask")) {
2819
- const x = p.createElement("script");
2820
- x.src = e.upchunkLibraryURL ?? "https://cdn.sprig.com/userleap-web-upchunk-v2.2.2.js", x.onload = () => {
2821
- ze.setUpChunk(u.UpChunk);
2822
- }, x.onerror = () => {
2823
- console.warn("[Sprig] - recording functionality not configured due to UpChunk library load failure");
2824
- }, b.appendChild(x);
2825
- }
2826
- const f = i || ((y = c.eventEmitter) == null ? void 0 : y.emit);
2827
- f == null || f("verify.view.version", { "view.version": "2.32.5" }), l && t && Se(d(Ti, {}), l);
2828
- } };
2829
- export {
2830
- Mi as default
2831
- };