@sprig-technologies/sprig-browser 2.34.2 → 2.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{core-B84vH8bq.cjs → core-B-mNVA8c.cjs} +2 -2
- package/dist/{core-9nFfVPj6.js → core-PNM_2mYx.js} +3 -3
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +4 -0
- package/dist/core.js +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +2 -2
- package/dist/{metricsReporter-BzXI6BiM.js → metricsReporter-B_p_qsZJ.js} +1 -1
- package/dist/{metricsReporter-Dy3EDEs8.cjs → metricsReporter-CWGtDAqh.cjs} +1 -1
- package/dist/replay.cjs +1 -1
- package/dist/replay.js +1 -1
- package/dist/{view-CDp4O3a5.js → view-C3-nqngP.js} +1259 -1169
- package/dist/view-Cji0PL_w.cjs +669 -0
- package/package.json +1 -1
- package/dist/view-DJLfkjCB.cjs +0 -669
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { A as je, D as
|
|
2
|
-
import { e as Re, h as We, S as ie, s as
|
|
3
|
-
var He,
|
|
1
|
+
import { A as je, D as uo, a as po, C as Vt, i as mo, E as ho, b as Pe, d as It, r as go, e as zt } from "./core-PNM_2mYx.js";
|
|
2
|
+
import { e as Re, h as We, S as ie, s as ft, D as $t, b as fo, t as re, v as vt, u as vo } from "./metricsReporter-B_p_qsZJ.js";
|
|
3
|
+
var He, M, Vn, we, Qt, zn, bt, $n, Ue = {}, Qn = [], bo = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, Je = Array.isArray;
|
|
4
4
|
function ge(e, t) {
|
|
5
5
|
for (var n in t) e[n] = t[n];
|
|
6
6
|
return e;
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function Wn(e) {
|
|
9
9
|
var t = e.parentNode;
|
|
10
10
|
t && t.removeChild(e);
|
|
11
11
|
}
|
|
@@ -16,13 +16,13 @@ function oe(e, t, n) {
|
|
|
16
16
|
return Me(e, s, r, o, null);
|
|
17
17
|
}
|
|
18
18
|
function Me(e, t, n, r, o) {
|
|
19
|
-
var i = { type: e, props: t, key: n, ref: r, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: o ?? ++
|
|
20
|
-
return o == null &&
|
|
19
|
+
var i = { type: e, props: t, key: n, ref: r, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: o ?? ++Vn, __i: -1, __u: 0 };
|
|
20
|
+
return o == null && M.vnode != null && M.vnode(i), i;
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function Zn() {
|
|
23
23
|
return { current: null };
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function Y(e) {
|
|
26
26
|
return e.children;
|
|
27
27
|
}
|
|
28
28
|
function le(e, t) {
|
|
@@ -33,37 +33,37 @@ function Te(e, t) {
|
|
|
33
33
|
for (var n; t < e.__k.length; t++) if ((n = e.__k[t]) != null && n.__e != null) return n.__e;
|
|
34
34
|
return typeof e.type == "function" ? Te(e) : null;
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function Gn(e) {
|
|
37
37
|
var t, n;
|
|
38
38
|
if ((e = e.__) != null && e.__c != null) {
|
|
39
39
|
for (e.__e = e.__c.base = null, t = 0; t < e.__k.length; t++) if ((n = e.__k[t]) != null && n.__e != null) {
|
|
40
40
|
e.__e = e.__c.base = n.__e;
|
|
41
41
|
break;
|
|
42
42
|
}
|
|
43
|
-
return
|
|
43
|
+
return Gn(e);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
function _t(e) {
|
|
47
|
-
(!e.__d && (e.__d = !0) && we.push(e) && !Ze.__r++ ||
|
|
47
|
+
(!e.__d && (e.__d = !0) && we.push(e) && !Ze.__r++ || Qt !== M.debounceRendering) && ((Qt = M.debounceRendering) || zn)(Ze);
|
|
48
48
|
}
|
|
49
49
|
function Ze() {
|
|
50
50
|
var e, t, n, r, o, i, s, d, l;
|
|
51
|
-
for (we.sort(
|
|
51
|
+
for (we.sort(bt); e = we.shift(); ) e.__d && (t = we.length, r = void 0, i = (o = (n = e).__v).__e, d = [], l = [], (s = n.__P) && ((r = ge({}, o)).__v = o.__v + 1, M.vnode && M.vnode(r), jt(s, r, o, n.__n, s.ownerSVGElement !== void 0, 32 & o.__u ? [i] : null, d, i ?? Te(o), !!(32 & o.__u), l), r.__.__k[r.__i] = r, Jn(d, r, l), r.__e != i && Gn(r)), we.length > t && we.sort(bt));
|
|
52
52
|
Ze.__r = 0;
|
|
53
53
|
}
|
|
54
|
-
function
|
|
55
|
-
var c,
|
|
56
|
-
for (n.__d = l, function(
|
|
57
|
-
var
|
|
58
|
-
for (
|
|
59
|
-
if (
|
|
60
|
-
}(n, t,
|
|
61
|
-
n.__d = l, n.__e =
|
|
54
|
+
function Kn(e, t, n, r, o, i, s, d, l, u, h) {
|
|
55
|
+
var c, m, v, g, _, b = r && r.__k || Qn, k = t.length;
|
|
56
|
+
for (n.__d = l, function(y, j, I) {
|
|
57
|
+
var C, E, x, R, N, T = j.length, p = I.length, f = p, w = 0;
|
|
58
|
+
for (y.__k = [], C = 0; C < T; C++) (E = y.__k[C] = (E = j[C]) == null || typeof E == "boolean" || typeof E == "function" ? null : typeof E == "string" || typeof E == "number" || typeof E == "bigint" || E.constructor == String ? Me(null, E, null, null, E) : Je(E) ? Me(Y, { children: E }, null, null, null) : E.constructor === void 0 && E.__b > 0 ? Me(E.type, E.props, E.key, E.ref ? E.ref : null, E.__v) : E) != null ? (E.__ = y, E.__b = y.__b + 1, N = _o(E, I, R = C + w, f), E.__i = N, x = null, N !== -1 && (f--, (x = I[N]) && (x.__u |= 131072)), x == null || x.__v === null ? (N == -1 && w--, typeof E.type != "function" && (E.__u |= 65536)) : N !== R && (N === R + 1 ? w++ : N > R ? f > T - R ? w += N - R : w-- : w = N < R && N == R - 1 ? N - R : 0, N !== C + w && (E.__u |= 65536))) : (x = I[C]) && x.key == null && x.__e && (x.__e == y.__d && (y.__d = Te(x)), yt(x, x, !1), I[C] = null, f--);
|
|
59
|
+
if (f) for (C = 0; C < p; C++) (x = I[C]) != null && !(131072 & x.__u) && (x.__e == y.__d && (y.__d = Te(x)), yt(x, x));
|
|
60
|
+
}(n, t, b), l = n.__d, c = 0; c < k; c++) (v = n.__k[c]) != null && typeof v != "boolean" && typeof v != "function" && (m = v.__i === -1 ? Ue : b[v.__i] || Ue, v.__i = c, jt(e, v, m, o, i, s, d, l, u, h), g = v.__e, v.ref && m.ref != v.ref && (m.ref && Tt(m.ref, null, v), h.push(v.ref, v.__c || g, v)), _ == null && g != null && (_ = g), 65536 & v.__u || m.__k === v.__k ? l = Yn(v, l, e) : typeof v.type == "function" && v.__d !== void 0 ? l = v.__d : g && (l = g.nextSibling), v.__d = void 0, v.__u &= -196609);
|
|
61
|
+
n.__d = l, n.__e = _;
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function Yn(e, t, n) {
|
|
64
64
|
var r, o;
|
|
65
65
|
if (typeof e.type == "function") {
|
|
66
|
-
for (r = e.__k, o = 0; r && o < r.length; o++) r[o] && (r[o].__ = e, t =
|
|
66
|
+
for (r = e.__k, o = 0; r && o < r.length; o++) r[o] && (r[o].__ = e, t = Yn(r[o], t, n));
|
|
67
67
|
return t;
|
|
68
68
|
}
|
|
69
69
|
return e.__e != t && (n.insertBefore(e.__e, t || null), t = e.__e), t && t.nextSibling;
|
|
@@ -73,7 +73,7 @@ function fe(e, t) {
|
|
|
73
73
|
fe(n, t);
|
|
74
74
|
}) : t.push(e)), t;
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function _o(e, t, n, r) {
|
|
77
77
|
var o = e.key, i = e.type, s = n - 1, d = n + 1, l = t[n];
|
|
78
78
|
if (l === null || l && o == l.key && i === l.type) return n;
|
|
79
79
|
if (r > (l == null || 131072 & l.__u ? 0 : 1)) for (; s >= 0 || d < t.length; ) {
|
|
@@ -88,17 +88,17 @@ function po(e, t, n, r) {
|
|
|
88
88
|
}
|
|
89
89
|
return -1;
|
|
90
90
|
}
|
|
91
|
-
function
|
|
92
|
-
t[0] === "-" ? e.setProperty(t, n ?? "") : e[t] = n == null ? "" : typeof n != "number" ||
|
|
91
|
+
function Wt(e, t, n) {
|
|
92
|
+
t[0] === "-" ? e.setProperty(t, n ?? "") : e[t] = n == null ? "" : typeof n != "number" || bo.test(t) ? n : n + "px";
|
|
93
93
|
}
|
|
94
94
|
function Ae(e, t, n, r, o) {
|
|
95
95
|
var i;
|
|
96
96
|
e: if (t === "style") if (typeof n == "string") e.style.cssText = n;
|
|
97
97
|
else {
|
|
98
|
-
if (typeof r == "string" && (e.style.cssText = r = ""), r) for (t in r) n && t in n ||
|
|
99
|
-
if (n) for (t in n) r && n[t] === r[t] ||
|
|
98
|
+
if (typeof r == "string" && (e.style.cssText = r = ""), r) for (t in r) n && t in n || Wt(e.style, t, "");
|
|
99
|
+
if (n) for (t in n) r && n[t] === r[t] || Wt(e.style, t, n[t]);
|
|
100
100
|
}
|
|
101
|
-
else if (t[0] === "o" && t[1] === "n") i = t !== (t = t.replace(/(PointerCapture)$|Capture$/, "$1")), t = t.toLowerCase() in e ? t.toLowerCase().slice(2) : t.slice(2), e.l || (e.l = {}), e.l[t + i] = n, n ? r ? n.u = r.u : (n.u = Date.now(), e.addEventListener(t, i ?
|
|
101
|
+
else if (t[0] === "o" && t[1] === "n") i = t !== (t = t.replace(/(PointerCapture)$|Capture$/, "$1")), t = t.toLowerCase() in e ? t.toLowerCase().slice(2) : t.slice(2), e.l || (e.l = {}), e.l[t + i] = n, n ? r ? n.u = r.u : (n.u = Date.now(), e.addEventListener(t, i ? Gt : Zt, i)) : e.removeEventListener(t, i ? Gt : Zt, i);
|
|
102
102
|
else {
|
|
103
103
|
if (o) t = t.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
|
|
104
104
|
else if (t !== "width" && t !== "height" && t !== "href" && t !== "list" && t !== "form" && t !== "tabIndex" && t !== "download" && t !== "rowSpan" && t !== "colSpan" && t !== "role" && t in e) try {
|
|
@@ -109,120 +109,120 @@ function Ae(e, t, n, r, o) {
|
|
|
109
109
|
typeof n == "function" || (n == null || n === !1 && t[4] !== "-" ? e.removeAttribute(t) : e.setAttribute(t, n));
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function Zt(e) {
|
|
113
113
|
var t = this.l[e.type + !1];
|
|
114
114
|
if (e.t) {
|
|
115
115
|
if (e.t <= t.u) return;
|
|
116
116
|
} else e.t = Date.now();
|
|
117
|
-
return t(
|
|
117
|
+
return t(M.event ? M.event(e) : e);
|
|
118
118
|
}
|
|
119
|
-
function
|
|
120
|
-
return this.l[e.type + !0](
|
|
119
|
+
function Gt(e) {
|
|
120
|
+
return this.l[e.type + !0](M.event ? M.event(e) : e);
|
|
121
121
|
}
|
|
122
|
-
function
|
|
123
|
-
var
|
|
122
|
+
function jt(e, t, n, r, o, i, s, d, l, u) {
|
|
123
|
+
var h, c, m, v, g, _, b, k, y, j, I, C, E, x, R, N = t.type;
|
|
124
124
|
if (t.constructor !== void 0) return null;
|
|
125
|
-
128 & n.__u && (l = !!(32 & n.__u), i = [d = t.__e = n.__e]), (
|
|
126
|
-
e: if (typeof
|
|
127
|
-
if (k = t.props,
|
|
125
|
+
128 & n.__u && (l = !!(32 & n.__u), i = [d = t.__e = n.__e]), (h = M.__b) && h(t);
|
|
126
|
+
e: if (typeof N == "function") try {
|
|
127
|
+
if (k = t.props, y = (h = N.contextType) && r[h.__c], j = h ? y ? y.props.value : h.__ : r, n.__c ? b = (c = t.__c = n.__c).__ = c.__E : ("prototype" in N && N.prototype.render ? t.__c = c = new N(k, j) : (t.__c = c = new le(k, j), c.constructor = N, c.render = xo), y && y.sub(c), c.props = k, c.state || (c.state = {}), c.context = j, c.__n = r, m = c.__d = !0, c.__h = [], c._sb = []), c.__s == null && (c.__s = c.state), N.getDerivedStateFromProps != null && (c.__s == c.state && (c.__s = ge({}, c.__s)), ge(c.__s, N.getDerivedStateFromProps(k, c.__s))), v = c.props, g = c.state, c.__v = t, m) N.getDerivedStateFromProps == null && c.componentWillMount != null && c.componentWillMount(), c.componentDidMount != null && c.__h.push(c.componentDidMount);
|
|
128
128
|
else {
|
|
129
|
-
if (
|
|
130
|
-
for (t.__v !== n.__v && (c.props = k, c.state = c.__s, c.__d = !1), t.__e = n.__e, t.__k = n.__k, t.__k.forEach(function(
|
|
131
|
-
|
|
129
|
+
if (N.getDerivedStateFromProps == null && k !== v && c.componentWillReceiveProps != null && c.componentWillReceiveProps(k, j), !c.__e && (c.shouldComponentUpdate != null && c.shouldComponentUpdate(k, c.__s, j) === !1 || t.__v === n.__v)) {
|
|
130
|
+
for (t.__v !== n.__v && (c.props = k, c.state = c.__s, c.__d = !1), t.__e = n.__e, t.__k = n.__k, t.__k.forEach(function(T) {
|
|
131
|
+
T && (T.__ = t);
|
|
132
132
|
}), I = 0; I < c._sb.length; I++) c.__h.push(c._sb[I]);
|
|
133
133
|
c._sb = [], c.__h.length && s.push(c);
|
|
134
134
|
break e;
|
|
135
135
|
}
|
|
136
|
-
c.componentWillUpdate != null && c.componentWillUpdate(k, c.__s,
|
|
137
|
-
c.componentDidUpdate(v,
|
|
136
|
+
c.componentWillUpdate != null && c.componentWillUpdate(k, c.__s, j), c.componentDidUpdate != null && c.__h.push(function() {
|
|
137
|
+
c.componentDidUpdate(v, g, _);
|
|
138
138
|
});
|
|
139
139
|
}
|
|
140
|
-
if (c.context =
|
|
141
|
-
for (c.state = c.__s, c.__d = !1,
|
|
140
|
+
if (c.context = j, c.props = k, c.__P = e, c.__e = !1, C = M.__r, E = 0, "prototype" in N && N.prototype.render) {
|
|
141
|
+
for (c.state = c.__s, c.__d = !1, C && C(t), h = c.render(c.props, c.state, c.context), x = 0; x < c._sb.length; x++) c.__h.push(c._sb[x]);
|
|
142
142
|
c._sb = [];
|
|
143
143
|
} else do
|
|
144
|
-
c.__d = !1,
|
|
145
|
-
while (c.__d && ++
|
|
146
|
-
c.state = c.__s, c.getChildContext != null && (r = ge(ge({}, r), c.getChildContext())),
|
|
147
|
-
} catch (
|
|
148
|
-
t.__v = null, l || i != null ? (t.__e = d, t.__u |= l ? 160 : 32, i[i.indexOf(d)] = null) : (t.__e = n.__e, t.__k = n.__k),
|
|
144
|
+
c.__d = !1, C && C(t), h = c.render(c.props, c.state, c.context), c.state = c.__s;
|
|
145
|
+
while (c.__d && ++E < 25);
|
|
146
|
+
c.state = c.__s, c.getChildContext != null && (r = ge(ge({}, r), c.getChildContext())), m || c.getSnapshotBeforeUpdate == null || (_ = c.getSnapshotBeforeUpdate(v, g)), Kn(e, Je(R = h != null && h.type === Y && h.key == null ? h.props.children : h) ? R : [R], t, n, r, o, i, s, d, l, u), c.base = t.__e, t.__u &= -161, c.__h.length && s.push(c), b && (c.__E = c.__ = null);
|
|
147
|
+
} catch (T) {
|
|
148
|
+
t.__v = null, l || i != null ? (t.__e = d, t.__u |= l ? 160 : 32, i[i.indexOf(d)] = null) : (t.__e = n.__e, t.__k = n.__k), M.__e(T, t, n);
|
|
149
149
|
}
|
|
150
|
-
else i == null && t.__v === n.__v ? (t.__k = n.__k, t.__e = n.__e) : t.__e =
|
|
151
|
-
(
|
|
150
|
+
else i == null && t.__v === n.__v ? (t.__k = n.__k, t.__e = n.__e) : t.__e = yo(n.__e, t, n, r, o, i, s, l, u);
|
|
151
|
+
(h = M.diffed) && h(t);
|
|
152
152
|
}
|
|
153
|
-
function
|
|
153
|
+
function Jn(e, t, n) {
|
|
154
154
|
t.__d = void 0;
|
|
155
|
-
for (var r = 0; r < n.length; r++)
|
|
156
|
-
|
|
155
|
+
for (var r = 0; r < n.length; r++) Tt(n[r], n[++r], n[++r]);
|
|
156
|
+
M.__c && M.__c(t, e), e.some(function(o) {
|
|
157
157
|
try {
|
|
158
158
|
e = o.__h, o.__h = [], e.some(function(i) {
|
|
159
159
|
i.call(o);
|
|
160
160
|
});
|
|
161
161
|
} catch (i) {
|
|
162
|
-
|
|
162
|
+
M.__e(i, o.__v);
|
|
163
163
|
}
|
|
164
164
|
});
|
|
165
165
|
}
|
|
166
|
-
function
|
|
167
|
-
var u,
|
|
168
|
-
if (
|
|
169
|
-
for (u = 0; u < i.length; u++) if ((v = i[u]) && "setAttribute" in v == !!
|
|
166
|
+
function yo(e, t, n, r, o, i, s, d, l) {
|
|
167
|
+
var u, h, c, m, v, g, _, b = n.props, k = t.props, y = t.type;
|
|
168
|
+
if (y === "svg" && (o = !0), i != null) {
|
|
169
|
+
for (u = 0; u < i.length; u++) if ((v = i[u]) && "setAttribute" in v == !!y && (y ? v.localName === y : v.nodeType === 3)) {
|
|
170
170
|
e = v, i[u] = null;
|
|
171
171
|
break;
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
174
|
if (e == null) {
|
|
175
|
-
if (
|
|
176
|
-
e = o ? document.createElementNS("http://www.w3.org/2000/svg",
|
|
175
|
+
if (y === null) return document.createTextNode(k);
|
|
176
|
+
e = o ? document.createElementNS("http://www.w3.org/2000/svg", y) : document.createElement(y, k.is && k), i = null, d = !1;
|
|
177
177
|
}
|
|
178
|
-
if (
|
|
178
|
+
if (y === null) b === k || d && e.data === k || (e.data = k);
|
|
179
179
|
else {
|
|
180
|
-
if (i = i && He.call(e.childNodes),
|
|
181
|
-
for (u in
|
|
182
|
-
for (u in k) v = k[u], u == "children" ?
|
|
183
|
-
if (
|
|
184
|
-
else if (c && (e.innerHTML = ""),
|
|
185
|
-
d || (u = "value",
|
|
180
|
+
if (i = i && He.call(e.childNodes), b = n.props || Ue, !d && i != null) for (b = {}, u = 0; u < e.attributes.length; u++) b[(v = e.attributes[u]).name] = v.value;
|
|
181
|
+
for (u in b) v = b[u], u == "children" || (u == "dangerouslySetInnerHTML" ? c = v : u === "key" || u in k || Ae(e, u, null, v, o));
|
|
182
|
+
for (u in k) v = k[u], u == "children" ? m = v : u == "dangerouslySetInnerHTML" ? h = v : u == "value" ? g = v : u == "checked" ? _ = v : u === "key" || d && typeof v != "function" || b[u] === v || Ae(e, u, v, b[u], o);
|
|
183
|
+
if (h) d || c && (h.__html === c.__html || h.__html === e.innerHTML) || (e.innerHTML = h.__html), t.__k = [];
|
|
184
|
+
else if (c && (e.innerHTML = ""), Kn(e, Je(m) ? m : [m], t, n, r, o && y !== "foreignObject", i, s, i ? i[0] : n.__k && Te(n, 0), d, l), i != null) for (u = i.length; u--; ) i[u] != null && Wn(i[u]);
|
|
185
|
+
d || (u = "value", g !== void 0 && (g !== e[u] || y === "progress" && !g || y === "option" && g !== b[u]) && Ae(e, u, g, b[u], !1), u = "checked", _ !== void 0 && _ !== e[u] && Ae(e, u, _, b[u], !1));
|
|
186
186
|
}
|
|
187
187
|
return e;
|
|
188
188
|
}
|
|
189
|
-
function
|
|
189
|
+
function Tt(e, t, n) {
|
|
190
190
|
try {
|
|
191
191
|
typeof e == "function" ? e(t) : e.current = t;
|
|
192
192
|
} catch (r) {
|
|
193
|
-
|
|
193
|
+
M.__e(r, n);
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
|
-
function
|
|
196
|
+
function yt(e, t, n) {
|
|
197
197
|
var r, o;
|
|
198
|
-
if (
|
|
198
|
+
if (M.unmount && M.unmount(e), (r = e.ref) && (r.current && r.current !== e.__e || Tt(r, null, t)), (r = e.__c) != null) {
|
|
199
199
|
if (r.componentWillUnmount) try {
|
|
200
200
|
r.componentWillUnmount();
|
|
201
201
|
} catch (i) {
|
|
202
|
-
|
|
202
|
+
M.__e(i, t);
|
|
203
203
|
}
|
|
204
204
|
r.base = r.__P = null, e.__c = void 0;
|
|
205
205
|
}
|
|
206
|
-
if (r = e.__k) for (o = 0; o < r.length; o++) r[o] &&
|
|
207
|
-
n || e.__e == null ||
|
|
206
|
+
if (r = e.__k) for (o = 0; o < r.length; o++) r[o] && yt(r[o], t, n || typeof e.type != "function");
|
|
207
|
+
n || e.__e == null || Wn(e.__e), e.__ = e.__e = e.__d = void 0;
|
|
208
208
|
}
|
|
209
|
-
function
|
|
209
|
+
function xo(e, t, n) {
|
|
210
210
|
return this.constructor(e, n);
|
|
211
211
|
}
|
|
212
212
|
function Le(e, t, n) {
|
|
213
213
|
var r, o, i, s;
|
|
214
|
-
|
|
214
|
+
M.__ && M.__(e, t), o = (r = typeof n == "function") ? null : n && n.__k || t.__k, i = [], s = [], jt(t, e = (!r && n || t).__k = oe(Y, null, [e]), o || Ue, Ue, t.ownerSVGElement !== void 0, !r && n ? [n] : o ? null : t.firstChild ? He.call(t.childNodes) : null, i, !r && n ? n : o ? o.__e : t.firstChild, r, s), Jn(i, e, s);
|
|
215
215
|
}
|
|
216
|
-
function
|
|
217
|
-
Le(e, t,
|
|
216
|
+
function Xn(e, t) {
|
|
217
|
+
Le(e, t, Xn);
|
|
218
218
|
}
|
|
219
|
-
function
|
|
219
|
+
function ko(e, t, n) {
|
|
220
220
|
var r, o, i, s, d = ge({}, e.props);
|
|
221
221
|
for (i in e.type && e.type.defaultProps && (s = e.type.defaultProps), t) i == "key" ? r = t[i] : i == "ref" ? o = t[i] : d[i] = t[i] === void 0 && s !== void 0 ? s[i] : t[i];
|
|
222
222
|
return arguments.length > 2 && (d.children = arguments.length > 3 ? He.call(arguments, 2) : n), Me(e.type, d, r || e.key, o || e.ref, null);
|
|
223
223
|
}
|
|
224
|
-
function
|
|
225
|
-
var n = { __c: t = "__cC" +
|
|
224
|
+
function er(e, t) {
|
|
225
|
+
var n = { __c: t = "__cC" + $n++, __: e, Consumer: function(r, o) {
|
|
226
226
|
return r.children(o);
|
|
227
227
|
}, Provider: function(r) {
|
|
228
228
|
var o, i;
|
|
@@ -242,86 +242,86 @@ function Gn(e, t) {
|
|
|
242
242
|
} };
|
|
243
243
|
return n.Provider.__ = n.Consumer.contextType = n;
|
|
244
244
|
}
|
|
245
|
-
He =
|
|
245
|
+
He = Qn.slice, M = { __e: function(e, t, n, r) {
|
|
246
246
|
for (var o, i, s; t = t.__; ) if ((o = t.__c) && !o.__) try {
|
|
247
247
|
if ((i = o.constructor) && i.getDerivedStateFromError != null && (o.setState(i.getDerivedStateFromError(e)), s = o.__d), o.componentDidCatch != null && (o.componentDidCatch(e, r || {}), s = o.__d), s) return o.__E = o;
|
|
248
248
|
} catch (d) {
|
|
249
249
|
e = d;
|
|
250
250
|
}
|
|
251
251
|
throw e;
|
|
252
|
-
} },
|
|
252
|
+
} }, Vn = 0, le.prototype.setState = function(e, t) {
|
|
253
253
|
var n;
|
|
254
254
|
n = this.__s != null && this.__s !== this.state ? this.__s : this.__s = ge({}, this.state), typeof e == "function" && (e = e(ge({}, n), this.props)), e && ge(n, e), e != null && this.__v && (t && this._sb.push(t), _t(this));
|
|
255
255
|
}, le.prototype.forceUpdate = function(e) {
|
|
256
256
|
this.__v && (this.__e = !0, e && this.__h.push(e), _t(this));
|
|
257
|
-
}, le.prototype.render =
|
|
257
|
+
}, le.prototype.render = Y, we = [], zn = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, bt = function(e, t) {
|
|
258
258
|
return e.__v.__b - t.__v.__b;
|
|
259
|
-
}, Ze.__r = 0,
|
|
260
|
-
var
|
|
259
|
+
}, Ze.__r = 0, $n = 0;
|
|
260
|
+
var wo = 0;
|
|
261
261
|
function a(e, t, n, r, o, i) {
|
|
262
262
|
var s, d, l = {};
|
|
263
263
|
for (d in t) d == "ref" ? s = t[d] : l[d] = t[d];
|
|
264
|
-
var u = { type: e, props: l, key: n, ref: s, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: --
|
|
264
|
+
var u = { type: e, props: l, key: n, ref: s, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: --wo, __i: -1, __u: 0, __source: o, __self: i };
|
|
265
265
|
if (typeof e == "function" && (s = e.defaultProps)) for (d in s) l[d] === void 0 && (l[d] = s[d]);
|
|
266
|
-
return
|
|
266
|
+
return M.vnode && M.vnode(u), u;
|
|
267
267
|
}
|
|
268
|
-
var ve,
|
|
268
|
+
var ve, Q, ot, Kt, Ne = 0, tr = [], Fe = [], Yt = M.__b, Jt = M.__r, Xt = M.diffed, en = M.__c, tn = M.unmount;
|
|
269
269
|
function Ee(e, t) {
|
|
270
|
-
|
|
271
|
-
var n =
|
|
270
|
+
M.__h && M.__h(Q, e, Ne || t), Ne = 0;
|
|
271
|
+
var n = Q.__H || (Q.__H = { __: [], __h: [] });
|
|
272
272
|
return e >= n.__.length && n.__.push({ __V: Fe }), n.__[e];
|
|
273
273
|
}
|
|
274
|
-
function
|
|
275
|
-
return Ne = 1,
|
|
274
|
+
function z(e) {
|
|
275
|
+
return Ne = 1, Lt(ir, e);
|
|
276
276
|
}
|
|
277
|
-
function
|
|
277
|
+
function Lt(e, t, n) {
|
|
278
278
|
var r = Ee(ve++, 2);
|
|
279
|
-
if (r.t = e, !r.__c && (r.__ = [n ? n(t) :
|
|
279
|
+
if (r.t = e, !r.__c && (r.__ = [n ? n(t) : ir(void 0, t), function(d) {
|
|
280
280
|
var l = r.__N ? r.__N[0] : r.__[0], u = r.t(l, d);
|
|
281
281
|
l !== u && (r.__N = [u, r.__[1]], r.__c.setState({}));
|
|
282
|
-
}], r.__c =
|
|
282
|
+
}], r.__c = Q, !Q.u)) {
|
|
283
283
|
var o = function(d, l, u) {
|
|
284
284
|
if (!r.__c.__H) return !0;
|
|
285
|
-
var
|
|
286
|
-
return
|
|
285
|
+
var h = r.__c.__H.__.filter(function(m) {
|
|
286
|
+
return m.__c;
|
|
287
287
|
});
|
|
288
|
-
if (
|
|
289
|
-
return !
|
|
288
|
+
if (h.every(function(m) {
|
|
289
|
+
return !m.__N;
|
|
290
290
|
})) return !i || i.call(this, d, l, u);
|
|
291
291
|
var c = !1;
|
|
292
|
-
return
|
|
293
|
-
if (
|
|
294
|
-
var v =
|
|
295
|
-
|
|
292
|
+
return h.forEach(function(m) {
|
|
293
|
+
if (m.__N) {
|
|
294
|
+
var v = m.__[0];
|
|
295
|
+
m.__ = m.__N, m.__N = void 0, v !== m.__[0] && (c = !0);
|
|
296
296
|
}
|
|
297
297
|
}), !(!c && r.__c.props === d) && (!i || i.call(this, d, l, u));
|
|
298
298
|
};
|
|
299
|
-
|
|
300
|
-
var i =
|
|
301
|
-
|
|
299
|
+
Q.u = !0;
|
|
300
|
+
var i = Q.shouldComponentUpdate, s = Q.componentWillUpdate;
|
|
301
|
+
Q.componentWillUpdate = function(d, l, u) {
|
|
302
302
|
if (this.__e) {
|
|
303
|
-
var
|
|
304
|
-
i = void 0, o(d, l, u), i =
|
|
303
|
+
var h = i;
|
|
304
|
+
i = void 0, o(d, l, u), i = h;
|
|
305
305
|
}
|
|
306
306
|
s && s.call(this, d, l, u);
|
|
307
|
-
},
|
|
307
|
+
}, Q.shouldComponentUpdate = o;
|
|
308
308
|
}
|
|
309
309
|
return r.__N || r.__;
|
|
310
310
|
}
|
|
311
|
-
function
|
|
311
|
+
function W(e, t) {
|
|
312
312
|
var n = Ee(ve++, 3);
|
|
313
|
-
!
|
|
313
|
+
!M.__s && Dt(n.__H, t) && (n.__ = e, n.i = t, Q.__H.__h.push(n));
|
|
314
314
|
}
|
|
315
315
|
function Be(e, t) {
|
|
316
316
|
var n = Ee(ve++, 4);
|
|
317
|
-
!
|
|
317
|
+
!M.__s && Dt(n.__H, t) && (n.__ = e, n.i = t, Q.__h.push(n));
|
|
318
318
|
}
|
|
319
|
-
function
|
|
320
|
-
return Ne = 5,
|
|
319
|
+
function ee(e) {
|
|
320
|
+
return Ne = 5, de(function() {
|
|
321
321
|
return { current: e };
|
|
322
322
|
}, []);
|
|
323
323
|
}
|
|
324
|
-
function
|
|
324
|
+
function nr(e, t, n) {
|
|
325
325
|
Ne = 6, Be(function() {
|
|
326
326
|
return typeof e == "function" ? (e(t()), function() {
|
|
327
327
|
return e(null);
|
|
@@ -330,66 +330,66 @@ function Yn(e, t, n) {
|
|
|
330
330
|
}) : void 0;
|
|
331
331
|
}, n == null ? n : n.concat(e));
|
|
332
332
|
}
|
|
333
|
-
function
|
|
333
|
+
function de(e, t) {
|
|
334
334
|
var n = Ee(ve++, 7);
|
|
335
|
-
return
|
|
335
|
+
return Dt(n.__H, t) ? (n.__V = e(), n.i = t, n.__h = e, n.__V) : n.__;
|
|
336
336
|
}
|
|
337
337
|
function Se(e, t) {
|
|
338
|
-
return Ne = 8,
|
|
338
|
+
return Ne = 8, de(function() {
|
|
339
339
|
return e;
|
|
340
340
|
}, t);
|
|
341
341
|
}
|
|
342
|
-
function
|
|
343
|
-
var t =
|
|
344
|
-
return n.c = e, t ? (n.__ == null && (n.__ = !0, t.sub(
|
|
342
|
+
function rr(e) {
|
|
343
|
+
var t = Q.context[e.__c], n = Ee(ve++, 9);
|
|
344
|
+
return n.c = e, t ? (n.__ == null && (n.__ = !0, t.sub(Q)), t.props.value) : e.__;
|
|
345
345
|
}
|
|
346
|
-
function
|
|
347
|
-
|
|
346
|
+
function Nt(e, t) {
|
|
347
|
+
M.useDebugValue && M.useDebugValue(t ? t(e) : e);
|
|
348
348
|
}
|
|
349
|
-
function
|
|
349
|
+
function or() {
|
|
350
350
|
var e = Ee(ve++, 11);
|
|
351
351
|
if (!e.__) {
|
|
352
|
-
for (var t =
|
|
352
|
+
for (var t = Q.__v; t !== null && !t.__m && t.__ !== null; ) t = t.__;
|
|
353
353
|
var n = t.__m || (t.__m = [0, 0]);
|
|
354
354
|
e.__ = "P" + n[0] + "-" + n[1]++;
|
|
355
355
|
}
|
|
356
356
|
return e.__;
|
|
357
357
|
}
|
|
358
|
-
function
|
|
359
|
-
for (var e; e =
|
|
360
|
-
e.__H.__h.forEach(Ve), e.__H.__h.forEach(
|
|
358
|
+
function Co() {
|
|
359
|
+
for (var e; e = tr.shift(); ) if (e.__P && e.__H) try {
|
|
360
|
+
e.__H.__h.forEach(Ve), e.__H.__h.forEach(xt), e.__H.__h = [];
|
|
361
361
|
} catch (t) {
|
|
362
|
-
e.__H.__h = [],
|
|
362
|
+
e.__H.__h = [], M.__e(t, e.__v);
|
|
363
363
|
}
|
|
364
364
|
}
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
},
|
|
368
|
-
|
|
369
|
-
var t = (
|
|
370
|
-
t && (ot ===
|
|
365
|
+
M.__b = function(e) {
|
|
366
|
+
Q = null, Yt && Yt(e);
|
|
367
|
+
}, M.__r = function(e) {
|
|
368
|
+
Jt && Jt(e), ve = 0;
|
|
369
|
+
var t = (Q = e.__c).__H;
|
|
370
|
+
t && (ot === Q ? (t.__h = [], Q.__h = [], t.__.forEach(function(n) {
|
|
371
371
|
n.__N && (n.__ = n.__N), n.__V = Fe, n.__N = n.i = void 0;
|
|
372
|
-
})) : (t.__h.forEach(Ve), t.__h.forEach(
|
|
373
|
-
},
|
|
374
|
-
|
|
372
|
+
})) : (t.__h.forEach(Ve), t.__h.forEach(xt), t.__h = [], ve = 0)), ot = Q;
|
|
373
|
+
}, M.diffed = function(e) {
|
|
374
|
+
Xt && Xt(e);
|
|
375
375
|
var t = e.__c;
|
|
376
|
-
t && t.__H && (t.__H.__h.length && (
|
|
376
|
+
t && t.__H && (t.__H.__h.length && (tr.push(t) !== 1 && Kt === M.requestAnimationFrame || ((Kt = M.requestAnimationFrame) || So)(Co)), t.__H.__.forEach(function(n) {
|
|
377
377
|
n.i && (n.__H = n.i), n.__V !== Fe && (n.__ = n.__V), n.i = void 0, n.__V = Fe;
|
|
378
|
-
})), ot =
|
|
379
|
-
},
|
|
378
|
+
})), ot = Q = null;
|
|
379
|
+
}, M.__c = function(e, t) {
|
|
380
380
|
t.some(function(n) {
|
|
381
381
|
try {
|
|
382
382
|
n.__h.forEach(Ve), n.__h = n.__h.filter(function(r) {
|
|
383
|
-
return !r.__ ||
|
|
383
|
+
return !r.__ || xt(r);
|
|
384
384
|
});
|
|
385
385
|
} catch (r) {
|
|
386
386
|
t.some(function(o) {
|
|
387
387
|
o.__h && (o.__h = []);
|
|
388
|
-
}), t = [],
|
|
388
|
+
}), t = [], M.__e(r, n.__v);
|
|
389
389
|
}
|
|
390
|
-
}),
|
|
391
|
-
},
|
|
392
|
-
|
|
390
|
+
}), en && en(e, t);
|
|
391
|
+
}, M.unmount = function(e) {
|
|
392
|
+
tn && tn(e);
|
|
393
393
|
var t, n = e.__c;
|
|
394
394
|
n && n.__H && (n.__H.__.forEach(function(r) {
|
|
395
395
|
try {
|
|
@@ -397,36 +397,36 @@ P.__b = function(e) {
|
|
|
397
397
|
} catch (o) {
|
|
398
398
|
t = o;
|
|
399
399
|
}
|
|
400
|
-
}), n.__H = void 0, t &&
|
|
400
|
+
}), n.__H = void 0, t && M.__e(t, n.__v));
|
|
401
401
|
};
|
|
402
|
-
var
|
|
403
|
-
function
|
|
402
|
+
var nn = typeof requestAnimationFrame == "function";
|
|
403
|
+
function So(e) {
|
|
404
404
|
var t, n = function() {
|
|
405
|
-
clearTimeout(r),
|
|
405
|
+
clearTimeout(r), nn && cancelAnimationFrame(t), setTimeout(e);
|
|
406
406
|
}, r = setTimeout(n, 100);
|
|
407
|
-
|
|
407
|
+
nn && (t = requestAnimationFrame(n));
|
|
408
408
|
}
|
|
409
409
|
function Ve(e) {
|
|
410
|
-
var t =
|
|
411
|
-
typeof n == "function" && (e.__c = void 0, n()),
|
|
410
|
+
var t = Q, n = e.__c;
|
|
411
|
+
typeof n == "function" && (e.__c = void 0, n()), Q = t;
|
|
412
412
|
}
|
|
413
|
-
function
|
|
414
|
-
var t =
|
|
415
|
-
e.__c = e.__(),
|
|
413
|
+
function xt(e) {
|
|
414
|
+
var t = Q;
|
|
415
|
+
e.__c = e.__(), Q = t;
|
|
416
416
|
}
|
|
417
|
-
function
|
|
417
|
+
function Dt(e, t) {
|
|
418
418
|
return !e || e.length !== t.length || t.some(function(n, r) {
|
|
419
419
|
return n !== e[r];
|
|
420
420
|
});
|
|
421
421
|
}
|
|
422
|
-
function
|
|
422
|
+
function ir(e, t) {
|
|
423
423
|
return typeof t == "function" ? t(e) : t;
|
|
424
424
|
}
|
|
425
|
-
function
|
|
425
|
+
function sr(e, t) {
|
|
426
426
|
for (var n in t) e[n] = t[n];
|
|
427
427
|
return e;
|
|
428
428
|
}
|
|
429
|
-
function
|
|
429
|
+
function kt(e, t) {
|
|
430
430
|
for (var n in e) if (n !== "__source" && !(n in t)) return !0;
|
|
431
431
|
for (var r in t) if (r !== "__source" && e[r] !== t[r]) return !0;
|
|
432
432
|
return !1;
|
|
@@ -434,10 +434,10 @@ function xt(e, t) {
|
|
|
434
434
|
function Ge(e) {
|
|
435
435
|
this.props = e;
|
|
436
436
|
}
|
|
437
|
-
function
|
|
437
|
+
function ar(e, t) {
|
|
438
438
|
function n(o) {
|
|
439
439
|
var i = this.props.ref, s = i == o.ref;
|
|
440
|
-
return !s && i && (i.call ? i(null) : i.current = null), t ? !t(this.props, o) || !s :
|
|
440
|
+
return !s && i && (i.call ? i(null) : i.current = null), t ? !t(this.props, o) || !s : kt(this.props, o);
|
|
441
441
|
}
|
|
442
442
|
function r(o) {
|
|
443
443
|
return this.shouldComponentUpdate = n, oe(e, o);
|
|
@@ -445,56 +445,56 @@ function nr(e, t) {
|
|
|
445
445
|
return r.displayName = "Memo(" + (e.displayName || e.name) + ")", r.prototype.isReactComponent = !0, r.__f = !0, r;
|
|
446
446
|
}
|
|
447
447
|
(Ge.prototype = new le()).isPureReactComponent = !0, Ge.prototype.shouldComponentUpdate = function(e, t) {
|
|
448
|
-
return
|
|
448
|
+
return kt(this.props, e) || kt(this.state, t);
|
|
449
449
|
};
|
|
450
|
-
var
|
|
451
|
-
|
|
452
|
-
e.type && e.type.__f && e.ref && (e.props.ref = e.ref, e.ref = null),
|
|
450
|
+
var rn = M.__b;
|
|
451
|
+
M.__b = function(e) {
|
|
452
|
+
e.type && e.type.__f && e.ref && (e.props.ref = e.ref, e.ref = null), rn && rn(e);
|
|
453
453
|
};
|
|
454
|
-
var
|
|
455
|
-
function
|
|
454
|
+
var Eo = typeof Symbol < "u" && Symbol.for && Symbol.for("react.forward_ref") || 3911;
|
|
455
|
+
function Pt(e) {
|
|
456
456
|
function t(n) {
|
|
457
|
-
var r =
|
|
457
|
+
var r = sr({}, n);
|
|
458
458
|
return delete r.ref, e(r, n.ref || null);
|
|
459
459
|
}
|
|
460
|
-
return t.$$typeof =
|
|
460
|
+
return t.$$typeof = Eo, t.render = t, t.prototype.isReactComponent = t.__f = !0, t.displayName = "ForwardRef(" + (e.displayName || e.name) + ")", t;
|
|
461
461
|
}
|
|
462
|
-
var
|
|
462
|
+
var on = function(e, t) {
|
|
463
463
|
return e == null ? null : fe(fe(e).map(t));
|
|
464
|
-
},
|
|
464
|
+
}, lr = { map: on, forEach: on, count: function(e) {
|
|
465
465
|
return e ? fe(e).length : 0;
|
|
466
466
|
}, only: function(e) {
|
|
467
467
|
var t = fe(e);
|
|
468
468
|
if (t.length !== 1) throw "Children.only";
|
|
469
469
|
return t[0];
|
|
470
|
-
}, toArray: fe },
|
|
471
|
-
|
|
470
|
+
}, toArray: fe }, Io = M.__e;
|
|
471
|
+
M.__e = function(e, t, n, r) {
|
|
472
472
|
if (e.then) {
|
|
473
473
|
for (var o, i = t; i = i.__; ) if ((o = i.__c) && o.__c) return t.__e == null && (t.__e = n.__e, t.__k = n.__k), o.__c(e, t);
|
|
474
474
|
}
|
|
475
|
-
|
|
475
|
+
Io(e, t, n, r);
|
|
476
476
|
};
|
|
477
|
-
var
|
|
478
|
-
function
|
|
477
|
+
var sn = M.unmount;
|
|
478
|
+
function dr(e, t, n) {
|
|
479
479
|
return e && (e.__c && e.__c.__H && (e.__c.__H.__.forEach(function(r) {
|
|
480
480
|
typeof r.__c == "function" && r.__c();
|
|
481
|
-
}), e.__c.__H = null), (e =
|
|
482
|
-
return
|
|
481
|
+
}), e.__c.__H = null), (e = sr({}, e)).__c != null && (e.__c.__P === n && (e.__c.__P = t), e.__c = null), e.__k = e.__k && e.__k.map(function(r) {
|
|
482
|
+
return dr(r, t, n);
|
|
483
483
|
})), e;
|
|
484
484
|
}
|
|
485
|
-
function
|
|
485
|
+
function cr(e, t, n) {
|
|
486
486
|
return e && n && (e.__v = null, e.__k = e.__k && e.__k.map(function(r) {
|
|
487
|
-
return
|
|
487
|
+
return cr(r, t, n);
|
|
488
488
|
}), e.__c && e.__c.__P === t && (e.__e && n.appendChild(e.__e), e.__c.__e = !0, e.__c.__P = n)), e;
|
|
489
489
|
}
|
|
490
490
|
function Oe() {
|
|
491
491
|
this.__u = 0, this.t = null, this.__b = null;
|
|
492
492
|
}
|
|
493
|
-
function
|
|
493
|
+
function ur(e) {
|
|
494
494
|
var t = e.__.__c;
|
|
495
495
|
return t && t.__a && t.__a(e);
|
|
496
496
|
}
|
|
497
|
-
function
|
|
497
|
+
function pr(e) {
|
|
498
498
|
var t, n, r;
|
|
499
499
|
function o(i) {
|
|
500
500
|
if (t || (t = e()).then(function(s) {
|
|
@@ -510,13 +510,13 @@ function ar(e) {
|
|
|
510
510
|
function Ie() {
|
|
511
511
|
this.u = null, this.o = null;
|
|
512
512
|
}
|
|
513
|
-
|
|
513
|
+
M.unmount = function(e) {
|
|
514
514
|
var t = e.__c;
|
|
515
|
-
t && t.__R && t.__R(), t && 32 & e.__u && (e.type = null),
|
|
515
|
+
t && t.__R && t.__R(), t && 32 & e.__u && (e.type = null), sn && sn(e);
|
|
516
516
|
}, (Oe.prototype = new le()).__c = function(e, t) {
|
|
517
517
|
var n = t.__c, r = this;
|
|
518
518
|
r.t == null && (r.t = []), r.t.push(n);
|
|
519
|
-
var o =
|
|
519
|
+
var o = ur(r.__v), i = !1, s = function() {
|
|
520
520
|
i || (i = !0, n.__R = null, o ? o(d) : d());
|
|
521
521
|
};
|
|
522
522
|
n.__R = s;
|
|
@@ -524,7 +524,7 @@ P.unmount = function(e) {
|
|
|
524
524
|
if (!--r.__u) {
|
|
525
525
|
if (r.state.__a) {
|
|
526
526
|
var l = r.state.__a;
|
|
527
|
-
r.__v.__k[0] =
|
|
527
|
+
r.__v.__k[0] = cr(l, l.__c.__P, l.__c.__O);
|
|
528
528
|
}
|
|
529
529
|
var u;
|
|
530
530
|
for (r.setState({ __a: r.__b = null }); u = r.t.pop(); ) u.forceUpdate();
|
|
@@ -537,26 +537,26 @@ P.unmount = function(e) {
|
|
|
537
537
|
if (this.__b) {
|
|
538
538
|
if (this.__v.__k) {
|
|
539
539
|
var n = document.createElement("div"), r = this.__v.__k[0].__c;
|
|
540
|
-
this.__v.__k[0] =
|
|
540
|
+
this.__v.__k[0] = dr(this.__b, n, r.__O = r.__P);
|
|
541
541
|
}
|
|
542
542
|
this.__b = null;
|
|
543
543
|
}
|
|
544
|
-
var o = t.__a && oe(
|
|
545
|
-
return o && (o.__u &= -33), [oe(
|
|
544
|
+
var o = t.__a && oe(Y, null, e.fallback);
|
|
545
|
+
return o && (o.__u &= -33), [oe(Y, null, t.__a ? null : e.children), o];
|
|
546
546
|
};
|
|
547
|
-
var
|
|
547
|
+
var an = function(e, t, n) {
|
|
548
548
|
if (++n[1] === n[0] && e.o.delete(t), e.props.revealOrder && (e.props.revealOrder[0] !== "t" || !e.o.size)) for (n = e.u; n; ) {
|
|
549
549
|
for (; n.length > 3; ) n.pop()();
|
|
550
550
|
if (n[1] < n[0]) break;
|
|
551
551
|
e.u = n = n[2];
|
|
552
552
|
}
|
|
553
553
|
};
|
|
554
|
-
function
|
|
554
|
+
function jo(e) {
|
|
555
555
|
return this.getChildContext = function() {
|
|
556
556
|
return e.context;
|
|
557
557
|
}, e.children;
|
|
558
558
|
}
|
|
559
|
-
function
|
|
559
|
+
function To(e) {
|
|
560
560
|
var t = this, n = e.i;
|
|
561
561
|
t.componentWillUnmount = function() {
|
|
562
562
|
Le(null, t.l), t.l = null, t.i = null;
|
|
@@ -566,17 +566,17 @@ function ko(e) {
|
|
|
566
566
|
this.childNodes.push(r), t.i.appendChild(r);
|
|
567
567
|
}, removeChild: function(r) {
|
|
568
568
|
this.childNodes.splice(this.childNodes.indexOf(r) >>> 1, 1), t.i.removeChild(r);
|
|
569
|
-
} }), Le(oe(
|
|
569
|
+
} }), Le(oe(jo, { context: t.context }, e.__v), t.l);
|
|
570
570
|
}
|
|
571
|
-
function
|
|
572
|
-
var n = oe(
|
|
571
|
+
function mr(e, t) {
|
|
572
|
+
var n = oe(To, { __v: e, i: t });
|
|
573
573
|
return n.containerInfo = t, n;
|
|
574
574
|
}
|
|
575
575
|
(Ie.prototype = new le()).__a = function(e) {
|
|
576
|
-
var t = this, n =
|
|
576
|
+
var t = this, n = ur(t.__v), r = t.o.get(e);
|
|
577
577
|
return r[0]++, function(o) {
|
|
578
578
|
var i = function() {
|
|
579
|
-
t.props.revealOrder ? (r.push(o),
|
|
579
|
+
t.props.revealOrder ? (r.push(o), an(t, e, r)) : o();
|
|
580
580
|
};
|
|
581
581
|
n ? n(i) : i();
|
|
582
582
|
};
|
|
@@ -589,17 +589,17 @@ function lr(e, t) {
|
|
|
589
589
|
}, Ie.prototype.componentDidUpdate = Ie.prototype.componentDidMount = function() {
|
|
590
590
|
var e = this;
|
|
591
591
|
this.o.forEach(function(t, n) {
|
|
592
|
-
|
|
592
|
+
an(e, n, t);
|
|
593
593
|
});
|
|
594
594
|
};
|
|
595
|
-
var
|
|
595
|
+
var hr = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, Lo = /^(?: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]/, No = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, Do = /[A-Z0-9]/g, Po = typeof document < "u", Ro = function(e) {
|
|
596
596
|
return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(e);
|
|
597
597
|
};
|
|
598
|
-
function
|
|
598
|
+
function gr(e, t, n) {
|
|
599
599
|
return t.__k == null && (t.textContent = ""), Le(e, t), typeof n == "function" && n(), e ? e.__c : null;
|
|
600
600
|
}
|
|
601
|
-
function
|
|
602
|
-
return
|
|
601
|
+
function fr(e, t, n) {
|
|
602
|
+
return Xn(e, t), typeof n == "function" && n(), e ? e.__c : null;
|
|
603
603
|
}
|
|
604
604
|
le.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(e) {
|
|
605
605
|
Object.defineProperty(le.prototype, e, { configurable: !0, get: function() {
|
|
@@ -608,89 +608,89 @@ le.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceive
|
|
|
608
608
|
Object.defineProperty(this, e, { configurable: !0, writable: !0, value: t });
|
|
609
609
|
} });
|
|
610
610
|
});
|
|
611
|
-
var
|
|
612
|
-
function
|
|
611
|
+
var ln = M.event;
|
|
612
|
+
function Mo() {
|
|
613
613
|
}
|
|
614
|
-
function
|
|
614
|
+
function Oo() {
|
|
615
615
|
return this.cancelBubble;
|
|
616
616
|
}
|
|
617
|
-
function
|
|
617
|
+
function Uo() {
|
|
618
618
|
return this.defaultPrevented;
|
|
619
619
|
}
|
|
620
|
-
|
|
621
|
-
return
|
|
620
|
+
M.event = function(e) {
|
|
621
|
+
return ln && (e = ln(e)), e.persist = Mo, e.isPropagationStopped = Oo, e.isDefaultPrevented = Uo, e.nativeEvent = e;
|
|
622
622
|
};
|
|
623
|
-
var
|
|
623
|
+
var Rt, Ho = { enumerable: !1, configurable: !0, get: function() {
|
|
624
624
|
return this.class;
|
|
625
|
-
} },
|
|
626
|
-
|
|
625
|
+
} }, dn = M.vnode;
|
|
626
|
+
M.vnode = function(e) {
|
|
627
627
|
typeof e.type == "string" && function(t) {
|
|
628
628
|
var n = t.props, r = t.type, o = {};
|
|
629
629
|
for (var i in n) {
|
|
630
630
|
var s = n[i];
|
|
631
|
-
if (!(i === "value" && "defaultValue" in n && s == null ||
|
|
631
|
+
if (!(i === "value" && "defaultValue" in n && s == null || Po && i === "children" && r === "noscript" || i === "class" || i === "className")) {
|
|
632
632
|
var d = i.toLowerCase();
|
|
633
|
-
i === "defaultValue" && "value" in n && n.value == null ? i = "value" : i === "download" && s === !0 ? s = "" : d === "ondoubleclick" ? i = "ondblclick" : d !== "onchange" || r !== "input" && r !== "textarea" ||
|
|
633
|
+
i === "defaultValue" && "value" in n && n.value == null ? i = "value" : i === "download" && s === !0 ? s = "" : d === "ondoubleclick" ? i = "ondblclick" : d !== "onchange" || r !== "input" && r !== "textarea" || Ro(n.type) ? d === "onfocus" ? i = "onfocusin" : d === "onblur" ? i = "onfocusout" : No.test(i) ? i = d : r.indexOf("-") === -1 && Lo.test(i) ? i = i.replace(Do, "-$&").toLowerCase() : s === null && (s = void 0) : d = i = "oninput", d === "oninput" && o[i = d] && (i = "oninputCapture"), o[i] = s;
|
|
634
634
|
}
|
|
635
635
|
}
|
|
636
636
|
r == "select" && o.multiple && Array.isArray(o.value) && (o.value = fe(n.children).forEach(function(l) {
|
|
637
637
|
l.props.selected = o.value.indexOf(l.props.value) != -1;
|
|
638
638
|
})), r == "select" && o.defaultValue != null && (o.value = fe(n.children).forEach(function(l) {
|
|
639
639
|
l.props.selected = o.multiple ? o.defaultValue.indexOf(l.props.value) != -1 : o.defaultValue == l.props.value;
|
|
640
|
-
})), n.class && !n.className ? (o.class = n.class, Object.defineProperty(o, "className",
|
|
641
|
-
}(e), e.$$typeof =
|
|
640
|
+
})), n.class && !n.className ? (o.class = n.class, Object.defineProperty(o, "className", Ho)) : (n.className && !n.class || n.class && n.className) && (o.class = o.className = n.className), t.props = o;
|
|
641
|
+
}(e), e.$$typeof = hr, dn && dn(e);
|
|
642
642
|
};
|
|
643
|
-
var
|
|
644
|
-
|
|
645
|
-
|
|
643
|
+
var cn = M.__r;
|
|
644
|
+
M.__r = function(e) {
|
|
645
|
+
cn && cn(e), Rt = e.__c;
|
|
646
646
|
};
|
|
647
|
-
var
|
|
648
|
-
|
|
649
|
-
|
|
647
|
+
var un = M.diffed;
|
|
648
|
+
M.diffed = function(e) {
|
|
649
|
+
un && un(e);
|
|
650
650
|
var t = e.props, n = e.__e;
|
|
651
|
-
n != null && e.type === "textarea" && "value" in t && t.value !== n.value && (n.value = t.value == null ? "" : t.value),
|
|
651
|
+
n != null && e.type === "textarea" && "value" in t && t.value !== n.value && (n.value = t.value == null ? "" : t.value), Rt = null;
|
|
652
652
|
};
|
|
653
|
-
var
|
|
654
|
-
return
|
|
653
|
+
var vr = { ReactCurrentDispatcher: { current: { readContext: function(e) {
|
|
654
|
+
return Rt.__n[e.__c].props.value;
|
|
655
655
|
} } } };
|
|
656
|
-
function
|
|
656
|
+
function br(e) {
|
|
657
657
|
return oe.bind(null, e);
|
|
658
658
|
}
|
|
659
659
|
function qe(e) {
|
|
660
|
-
return !!e && e.$$typeof ===
|
|
660
|
+
return !!e && e.$$typeof === hr;
|
|
661
661
|
}
|
|
662
|
-
function
|
|
663
|
-
return qe(e) && e.type ===
|
|
662
|
+
function _r(e) {
|
|
663
|
+
return qe(e) && e.type === Y;
|
|
664
664
|
}
|
|
665
|
-
function
|
|
666
|
-
return qe(e) ?
|
|
665
|
+
function yr(e) {
|
|
666
|
+
return qe(e) ? ko.apply(null, arguments) : e;
|
|
667
667
|
}
|
|
668
|
-
function
|
|
668
|
+
function Mt(e) {
|
|
669
669
|
return !!e.__k && (Le(null, e), !0);
|
|
670
670
|
}
|
|
671
|
-
function
|
|
671
|
+
function xr(e) {
|
|
672
672
|
return e && (e.base || e.nodeType === 1 && e) || null;
|
|
673
673
|
}
|
|
674
|
-
var
|
|
674
|
+
var kr = function(e, t) {
|
|
675
675
|
return e(t);
|
|
676
|
-
},
|
|
676
|
+
}, wr = function(e, t) {
|
|
677
677
|
return e(t);
|
|
678
|
-
},
|
|
679
|
-
function
|
|
678
|
+
}, Cr = Y;
|
|
679
|
+
function Ot(e) {
|
|
680
680
|
e();
|
|
681
681
|
}
|
|
682
|
-
function
|
|
682
|
+
function Sr(e) {
|
|
683
683
|
return e;
|
|
684
684
|
}
|
|
685
|
-
function
|
|
686
|
-
return [!1,
|
|
685
|
+
function Er() {
|
|
686
|
+
return [!1, Ot];
|
|
687
687
|
}
|
|
688
|
-
var
|
|
689
|
-
function
|
|
690
|
-
var n = t(), r =
|
|
688
|
+
var Ir = Be, jr = qe;
|
|
689
|
+
function Tr(e, t) {
|
|
690
|
+
var n = t(), r = z({ h: { __: n, v: t } }), o = r[0].h, i = r[1];
|
|
691
691
|
return Be(function() {
|
|
692
692
|
o.__ = n, o.v = t, it(o) && i({ h: o });
|
|
693
|
-
}, [e, n, t]),
|
|
693
|
+
}, [e, n, t]), W(function() {
|
|
694
694
|
return it(o) && i({ h: o }), e(function() {
|
|
695
695
|
it(o) && i({ h: o });
|
|
696
696
|
});
|
|
@@ -705,29 +705,29 @@ function it(e) {
|
|
|
705
705
|
return !0;
|
|
706
706
|
}
|
|
707
707
|
}
|
|
708
|
-
var
|
|
709
|
-
const
|
|
710
|
-
var t = Ee(ve++, 10), n =
|
|
711
|
-
return t.__ = e,
|
|
708
|
+
var Bo = { useState: z, useId: or, useReducer: Lt, useEffect: W, useLayoutEffect: Be, useInsertionEffect: Ir, useTransition: Er, useDeferredValue: Sr, useSyncExternalStore: Tr, startTransition: Ot, useRef: ee, useImperativeHandle: nr, useMemo: de, useCallback: Se, useContext: rr, useDebugValue: Nt, version: "17.0.2", Children: lr, render: gr, hydrate: fr, unmountComponentAtNode: Mt, createPortal: mr, createElement: oe, createContext: er, createFactory: br, cloneElement: yr, createRef: Zn, Fragment: Y, isValidElement: qe, isElement: jr, isFragment: _r, findDOMNode: xr, Component: le, PureComponent: Ge, memo: ar, forwardRef: Pt, flushSync: wr, unstable_batchedUpdates: kr, StrictMode: Cr, Suspense: Oe, SuspenseList: Ie, lazy: pr, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: vr };
|
|
709
|
+
const qo = Object.freeze(Object.defineProperty({ __proto__: null, Children: lr, Component: le, Fragment: Y, PureComponent: Ge, StrictMode: Cr, Suspense: Oe, SuspenseList: Ie, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: vr, cloneElement: yr, createContext: er, createElement: oe, createFactory: br, createPortal: mr, createRef: Zn, default: Bo, findDOMNode: xr, flushSync: wr, forwardRef: Pt, hydrate: fr, isElement: jr, isFragment: _r, isValidElement: qe, lazy: pr, memo: ar, render: gr, startTransition: Ot, unmountComponentAtNode: Mt, unstable_batchedUpdates: kr, useCallback: Se, useContext: rr, useDebugValue: Nt, useDeferredValue: Sr, useEffect: W, useErrorBoundary: function(e) {
|
|
710
|
+
var t = Ee(ve++, 10), n = z();
|
|
711
|
+
return t.__ = e, Q.componentDidCatch || (Q.componentDidCatch = function(r, o) {
|
|
712
712
|
t.__ && t.__(r, o), n[1](r);
|
|
713
713
|
}), [n[0], function() {
|
|
714
714
|
n[1](void 0);
|
|
715
715
|
}];
|
|
716
|
-
}, useId:
|
|
716
|
+
}, useId: or, useImperativeHandle: nr, useInsertionEffect: Ir, useLayoutEffect: Be, useMemo: de, useReducer: Lt, useRef: ee, useState: z, useSyncExternalStore: Tr, useTransition: Er, version: "17.0.2" }, Symbol.toStringTag, { value: "Module" })), pn = (e) => {
|
|
717
717
|
let t;
|
|
718
718
|
const n = /* @__PURE__ */ new Set(), r = (s, d) => {
|
|
719
719
|
const l = typeof s == "function" ? s(t) : s;
|
|
720
720
|
if (!Object.is(l, t)) {
|
|
721
721
|
const u = t;
|
|
722
|
-
t = d ?? typeof l != "object" ? l : Object.assign({}, t, l), n.forEach((
|
|
722
|
+
t = d ?? typeof l != "object" ? l : Object.assign({}, t, l), n.forEach((h) => h(t, u));
|
|
723
723
|
}
|
|
724
724
|
}, o = () => t, i = { setState: r, getState: o, subscribe: (s) => (n.add(s), () => n.delete(s)), destroy: () => n.clear() };
|
|
725
725
|
return t = e(r, o, i), i;
|
|
726
726
|
};
|
|
727
|
-
function
|
|
727
|
+
function Ao(e) {
|
|
728
728
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
729
729
|
}
|
|
730
|
-
function
|
|
730
|
+
function Fo(e) {
|
|
731
731
|
if (Object.prototype.hasOwnProperty.call(e, "__esModule")) return e;
|
|
732
732
|
var t = e.default;
|
|
733
733
|
if (typeof t == "function") {
|
|
@@ -743,22 +743,22 @@ function Mo(e) {
|
|
|
743
743
|
} });
|
|
744
744
|
}), n;
|
|
745
745
|
}
|
|
746
|
-
var
|
|
747
|
-
const
|
|
748
|
-
var
|
|
749
|
-
function
|
|
750
|
-
return
|
|
751
|
-
if (
|
|
752
|
-
|
|
753
|
-
var e =
|
|
746
|
+
var mn = { exports: {} }, st = {};
|
|
747
|
+
const Lr = Fo(qo);
|
|
748
|
+
var hn, gn, fn, vn, bn = { exports: {} }, at = {};
|
|
749
|
+
function Vo() {
|
|
750
|
+
return gn || (gn = 1, bn.exports = function() {
|
|
751
|
+
if (hn) return at;
|
|
752
|
+
hn = 1;
|
|
753
|
+
var e = Lr, t = typeof Object.is == "function" ? Object.is : function(l, u) {
|
|
754
754
|
return l === u && (l !== 0 || 1 / l == 1 / u) || l != l && u != u;
|
|
755
755
|
}, n = e.useState, r = e.useEffect, o = e.useLayoutEffect, i = e.useDebugValue;
|
|
756
756
|
function s(l) {
|
|
757
757
|
var u = l.getSnapshot;
|
|
758
758
|
l = l.value;
|
|
759
759
|
try {
|
|
760
|
-
var
|
|
761
|
-
return !t(l,
|
|
760
|
+
var h = u();
|
|
761
|
+
return !t(l, h);
|
|
762
762
|
} catch {
|
|
763
763
|
return !0;
|
|
764
764
|
}
|
|
@@ -766,63 +766,63 @@ function Oo() {
|
|
|
766
766
|
var d = typeof window > "u" || window.document === void 0 || window.document.createElement === void 0 ? function(l, u) {
|
|
767
767
|
return u();
|
|
768
768
|
} : function(l, u) {
|
|
769
|
-
var
|
|
769
|
+
var h = u(), c = n({ inst: { value: h, getSnapshot: u } }), m = c[0].inst, v = c[1];
|
|
770
770
|
return o(function() {
|
|
771
|
-
|
|
772
|
-
}, [l,
|
|
773
|
-
return s(
|
|
774
|
-
s(
|
|
771
|
+
m.value = h, m.getSnapshot = u, s(m) && v({ inst: m });
|
|
772
|
+
}, [l, h, u]), r(function() {
|
|
773
|
+
return s(m) && v({ inst: m }), l(function() {
|
|
774
|
+
s(m) && v({ inst: m });
|
|
775
775
|
});
|
|
776
|
-
}, [l]), i(
|
|
776
|
+
}, [l]), i(h), h;
|
|
777
777
|
};
|
|
778
778
|
return at.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : d, at;
|
|
779
|
-
}()),
|
|
779
|
+
}()), bn.exports;
|
|
780
780
|
}
|
|
781
|
-
var
|
|
782
|
-
if (
|
|
783
|
-
|
|
784
|
-
var e =
|
|
781
|
+
var zo = (vn || (vn = 1, mn.exports = function() {
|
|
782
|
+
if (fn) return st;
|
|
783
|
+
fn = 1;
|
|
784
|
+
var e = Lr, t = Vo(), n = typeof Object.is == "function" ? Object.is : function(l, u) {
|
|
785
785
|
return l === u && (l !== 0 || 1 / l == 1 / u) || l != l && u != u;
|
|
786
786
|
}, r = t.useSyncExternalStore, o = e.useRef, i = e.useEffect, s = e.useMemo, d = e.useDebugValue;
|
|
787
|
-
return st.useSyncExternalStoreWithSelector = function(l, u,
|
|
787
|
+
return st.useSyncExternalStoreWithSelector = function(l, u, h, c, m) {
|
|
788
788
|
var v = o(null);
|
|
789
789
|
if (v.current === null) {
|
|
790
|
-
var
|
|
791
|
-
v.current =
|
|
792
|
-
} else
|
|
790
|
+
var g = { hasValue: !1, value: null };
|
|
791
|
+
v.current = g;
|
|
792
|
+
} else g = v.current;
|
|
793
793
|
v = s(function() {
|
|
794
|
-
function
|
|
795
|
-
if (!
|
|
796
|
-
if (
|
|
797
|
-
var
|
|
798
|
-
if (
|
|
794
|
+
function b(C) {
|
|
795
|
+
if (!j) {
|
|
796
|
+
if (j = !0, k = C, C = c(C), m !== void 0 && g.hasValue) {
|
|
797
|
+
var E = g.value;
|
|
798
|
+
if (m(E, C)) return y = E;
|
|
799
799
|
}
|
|
800
|
-
return
|
|
800
|
+
return y = C;
|
|
801
801
|
}
|
|
802
|
-
if (
|
|
803
|
-
var
|
|
804
|
-
return
|
|
802
|
+
if (E = y, n(k, C)) return E;
|
|
803
|
+
var x = c(C);
|
|
804
|
+
return m !== void 0 && m(E, x) ? E : (k = C, y = x);
|
|
805
805
|
}
|
|
806
|
-
var k,
|
|
806
|
+
var k, y, j = !1, I = h === void 0 ? null : h;
|
|
807
807
|
return [function() {
|
|
808
|
-
return
|
|
808
|
+
return b(u());
|
|
809
809
|
}, I === null ? void 0 : function() {
|
|
810
|
-
return
|
|
810
|
+
return b(I());
|
|
811
811
|
}];
|
|
812
|
-
}, [u,
|
|
813
|
-
var
|
|
812
|
+
}, [u, h, c, m]);
|
|
813
|
+
var _ = r(l, v[0], v[1]);
|
|
814
814
|
return i(function() {
|
|
815
|
-
|
|
816
|
-
}, [
|
|
815
|
+
g.hasValue = !0, g.value = _;
|
|
816
|
+
}, [_]), d(_), _;
|
|
817
817
|
}, st;
|
|
818
|
-
}()),
|
|
819
|
-
const
|
|
820
|
-
const t = typeof e == "function" ? ((r) => r ?
|
|
821
|
-
const l =
|
|
822
|
-
return
|
|
818
|
+
}()), mn.exports);
|
|
819
|
+
const $o = Ao(zo), { useSyncExternalStoreWithSelector: Qo } = $o, _n = (e) => {
|
|
820
|
+
const t = typeof e == "function" ? ((r) => r ? pn(r) : pn)(e) : e, n = (r, o) => function(i, s = i.getState, d) {
|
|
821
|
+
const l = Qo(i.subscribe, i.getState, i.getServerState || i.getState, s, d);
|
|
822
|
+
return Nt(l), l;
|
|
823
823
|
}(t, r, o);
|
|
824
824
|
return Object.assign(n, t), n;
|
|
825
|
-
},
|
|
825
|
+
}, Nr = (e) => e ? _n(e) : _n, Wo = 1, Zo = 2, Ut = { eq: (e, t) => e == t, neq(e, t) {
|
|
826
826
|
return !this.eq(e, t);
|
|
827
827
|
}, gt: (e, t) => e > t, gte: (e, t) => e >= t, lt: (e, t) => e < t, lte: (e, t) => e <= t, list_exact: (e, t) => !(!Array.isArray(e) || !Array.isArray(t)) && e.slice().sort().join(",") === t.slice().sort().join(","), list_all: (e, t) => !(!Array.isArray(e) || !Array.isArray(t)) && !t.some((n) => e.indexOf(n) === -1), list_alo(e, t) {
|
|
828
828
|
if (!Array.isArray(t)) return !1;
|
|
@@ -837,7 +837,7 @@ const Ho = Ro(Uo), { useSyncExternalStoreWithSelector: Bo } = Ho, _n = (e) => {
|
|
|
837
837
|
return n.includes(r);
|
|
838
838
|
}, notcontains(e, t) {
|
|
839
839
|
return !this.contains(e, t);
|
|
840
|
-
} },
|
|
840
|
+
} }, Go = (e, t, n) => {
|
|
841
841
|
switch (t) {
|
|
842
842
|
case "videovoice":
|
|
843
843
|
return !!(e && e.value);
|
|
@@ -860,36 +860,36 @@ const Ho = Ro(Uo), { useSyncExternalStoreWithSelector: Bo } = Ho, _n = (e) => {
|
|
|
860
860
|
default:
|
|
861
861
|
return !0;
|
|
862
862
|
}
|
|
863
|
-
},
|
|
863
|
+
}, Dr = (e, t) => {
|
|
864
864
|
if (t === "matrix") {
|
|
865
865
|
const n = Object.keys(e).length, r = Object.values(e).filter((o) => o !== null).length;
|
|
866
866
|
return r > 0 && r < n;
|
|
867
867
|
}
|
|
868
868
|
return !1;
|
|
869
|
-
},
|
|
869
|
+
}, Pr = ({ cards: e, index: t, hasEndCard: n, allResponses: r, uploadProgress: o = {} }) => {
|
|
870
870
|
if (t >= e.length || t < 0) return null;
|
|
871
871
|
const i = e[t];
|
|
872
872
|
let s = t + 1;
|
|
873
873
|
const d = i.props.routingOptions || [];
|
|
874
|
-
for (let
|
|
875
|
-
const { group: c, target:
|
|
874
|
+
for (let h = 0; h < d.length; h++) {
|
|
875
|
+
const { group: c, target: m } = d[h];
|
|
876
876
|
if (!(c != null && c.length)) continue;
|
|
877
877
|
const v = c[0];
|
|
878
878
|
if (v.questionIndex === void 0 || v.questionIndex > r.length) continue;
|
|
879
|
-
let
|
|
880
|
-
for (let
|
|
881
|
-
const
|
|
882
|
-
|
|
879
|
+
let g = yn({ comparator: v.comparator, response: r[v.questionIndex], type: i.type, value: v.value });
|
|
880
|
+
for (let _ = 1; _ < c.length; _ += 2) {
|
|
881
|
+
const b = c[_], k = c[_ + 1], y = yn({ comparator: k.comparator, response: r[k.questionIndex], type: e[k.questionIndex].type, value: k.value });
|
|
882
|
+
b === Wo ? g && (g = y) : b === Zo && (g || (g = y));
|
|
883
883
|
}
|
|
884
|
-
if (
|
|
885
|
-
s =
|
|
884
|
+
if (g) {
|
|
885
|
+
s = m === -1 && n ? e.length - 1 : m;
|
|
886
886
|
break;
|
|
887
887
|
}
|
|
888
888
|
}
|
|
889
|
-
const l = e.findIndex((
|
|
889
|
+
const l = e.findIndex((h) => h.type === "uploading");
|
|
890
890
|
let u;
|
|
891
891
|
return u = l > 0 ? n ? e.length - 3 : e.length - 2 : e.length - 1, t >= u || s === -1 || s !== null && s > u ? l > 0 && Object.values(o).some((c) => c.isSubmitted && !c.isComplete) ? l : n ? e.length - 1 : null : s === -1 ? null : s;
|
|
892
|
-
},
|
|
892
|
+
}, yn = ({ comparator: e, response: t, type: n, value: r }) => {
|
|
893
893
|
if (e === "answered") switch (n) {
|
|
894
894
|
case "texturlprompt":
|
|
895
895
|
return t === void 0;
|
|
@@ -915,7 +915,7 @@ const Ho = Ro(Uo), { useSyncExternalStoreWithSelector: Bo } = Ho, _n = (e) => {
|
|
|
915
915
|
return !1;
|
|
916
916
|
}
|
|
917
917
|
if (e === "given_up") return n !== "recordedtask" || "taskStatus" in t && t.taskStatus === "given.up";
|
|
918
|
-
if (e === "partial") return n === "matrix" &&
|
|
918
|
+
if (e === "partial") return n === "matrix" && Dr(t, n);
|
|
919
919
|
if (e === "skipped") switch (n) {
|
|
920
920
|
case "texturlprompt":
|
|
921
921
|
return t == null ? void 0 : t.skipped;
|
|
@@ -938,8 +938,8 @@ const Ho = Ro(Uo), { useSyncExternalStoreWithSelector: Bo } = Ho, _n = (e) => {
|
|
|
938
938
|
default:
|
|
939
939
|
return !1;
|
|
940
940
|
}
|
|
941
|
-
return
|
|
942
|
-
},
|
|
941
|
+
return Ut[e](t, r);
|
|
942
|
+
}, Ko = (e) => {
|
|
943
943
|
var r, o, i;
|
|
944
944
|
switch (e.type) {
|
|
945
945
|
case "multipleselect":
|
|
@@ -951,7 +951,7 @@ const Ho = Ro(Uo), { useSyncExternalStoreWithSelector: Bo } = Ho, _n = (e) => {
|
|
|
951
951
|
}
|
|
952
952
|
case "matrix": {
|
|
953
953
|
if (!((r = e == null ? void 0 : e.props) != null && r.options)) return null;
|
|
954
|
-
const s = e.props.properties.matrixColumn, d = e.props.options, l = d.reduce((
|
|
954
|
+
const s = e.props.properties.matrixColumn, d = e.props.options, l = d.reduce((h, c) => (h[c.id] = null, h), {}), u = [{ ...l, [d[0].id]: s[0].value }, d.reduce((h, c) => (h[c.id] = s[0].value, h), {})];
|
|
955
955
|
return e.props.properties.required || u.push(l), u;
|
|
956
956
|
}
|
|
957
957
|
case "likert": {
|
|
@@ -975,7 +975,7 @@ const Ho = Ro(Uo), { useSyncExternalStoreWithSelector: Bo } = Ho, _n = (e) => {
|
|
|
975
975
|
return [1];
|
|
976
976
|
}
|
|
977
977
|
var t, n;
|
|
978
|
-
},
|
|
978
|
+
}, Yo = (e) => e in Ut, Jo = (e) => typeof e == "object" && e !== null && "taskStatus" in e, Xo = (e, t = []) => t.reduce((n, r) => {
|
|
979
979
|
const { group: o, target: i } = r;
|
|
980
980
|
if (!(o != null && o.length)) return [...n];
|
|
981
981
|
const s = o.filter((d) => !!Number(d) || typeof d == "object" && d.questionIndex === e).map((d) => {
|
|
@@ -983,13 +983,13 @@ const Ho = Ro(Uo), { useSyncExternalStoreWithSelector: Bo } = Ho, _n = (e) => {
|
|
|
983
983
|
return { comparator: l, target: i, value: u };
|
|
984
984
|
});
|
|
985
985
|
return [...n, ...s];
|
|
986
|
-
}, []), lt = /* @__PURE__ */ new Set(["thanks", "uploading"]),
|
|
986
|
+
}, []), lt = /* @__PURE__ */ new Set(["thanks", "uploading"]), q = Nr()((e, t) => ({ allResponses: [], answers: void 0, apiURL: "", border: "#000000", cards: [], close: async (n = je) => {
|
|
987
987
|
const r = t(), { fadeout: o, remove: i, trackHistory: s, studyType: d } = r;
|
|
988
|
-
await o(n), dt(r) || s({ event: "closed" }),
|
|
988
|
+
await o(n), dt(r) || s({ event: "closed" }), fo.info("SurveyClosing", { surveyId: r.surveyId }), Vt.enable(), i({ initiator: $t.Closed, studyType: d });
|
|
989
989
|
}, configureExitOnOverlayClick: () => {
|
|
990
990
|
}, customMetadata: {}, destroy: async (n) => {
|
|
991
991
|
const { eventEmitFn: r, fadeout: o, remove: i, studyType: s, surveyId: d } = t();
|
|
992
|
-
r("survey.complete", d), await o(n),
|
|
992
|
+
r("survey.complete", d), await o(n), Vt.enable(), i({ initiator: $t.Complete, studyType: s });
|
|
993
993
|
}, endCard: { headline: "" }, envId: "", eventEmitFn: Re.emit.bind(Re), fadeout: async (n) => {
|
|
994
994
|
const { eventEmitFn: r, headers: o, viewDocument: i } = t();
|
|
995
995
|
return We(o) ? Promise.resolve() : (r(ie.SurveyFadingOut), new Promise((s) => {
|
|
@@ -1002,31 +1002,31 @@ const Ho = Ro(Uo), { useSyncExternalStoreWithSelector: Bo } = Ho, _n = (e) => {
|
|
|
1002
1002
|
const { cards: r, eventEmitFn: o, index: i } = t();
|
|
1003
1003
|
o(n, { qid: r[i].name, props: r[i].props }), e(() => ({ hasViewedEmbed: !0 }));
|
|
1004
1004
|
}, handleUploadUpdate: ({ mediaRecordingUid: n, isComplete: r, progressPct: o, isSubmitted: i }) => {
|
|
1005
|
-
var v,
|
|
1006
|
-
const { cards: s, destroy: d, index: l, uploadProgress: u } = t(),
|
|
1005
|
+
var v, g, _;
|
|
1006
|
+
const { cards: s, destroy: d, index: l, uploadProgress: u } = t(), h = r || ((v = u[n]) == null ? void 0 : v.isComplete), c = { ...u, [n]: { progressPct: h ? 100 : o || ((g = u[n]) == null ? void 0 : g.progressPct), isComplete: h, isSubmitted: i || ((_ = u[n]) == null ? void 0 : _.isSubmitted) } };
|
|
1007
1007
|
if (e({ uploadProgress: c }), s[l].type !== "uploading") return;
|
|
1008
|
-
const
|
|
1009
|
-
if (
|
|
1010
|
-
e({ index:
|
|
1008
|
+
const m = Object.entries(u).every(([b, k]) => !k.isSubmitted || k.isComplete || n == b && r);
|
|
1009
|
+
if (m && l >= s.length - 1) return d(je);
|
|
1010
|
+
e({ index: m ? l + 1 : l, uploadingCardViewed: !0 });
|
|
1011
1011
|
}, hasViewedEmbed: !1, headers: { Authorization: "", "Content-Type": "", "userleap-platform": "web", "x-ul-environment-id": "", "x-ul-installation-method": "web-snippet", "x-ul-sdk-version": "", "x-ul-visitor-id": "" }, index: 0, isPreview: !1, marketingUrl: "https://sprig.com", meta: { ch: 0, cw: 0, l: "", mode: null, p: "", sh: 0, sw: 0 }, mode: void 0, next: (n) => {
|
|
1012
|
-
const { allResponses: r, cards: o, eventEmitFn: i, index: s, responseGroupUid: d, submit: l, trackHistory: u, uploadProgress:
|
|
1012
|
+
const { allResponses: r, cards: o, eventEmitFn: i, index: s, responseGroupUid: d, submit: l, trackHistory: u, uploadProgress: h, viewedCardCount: c } = t();
|
|
1013
1013
|
e({ minScrollableHeight: void 0 });
|
|
1014
|
-
const
|
|
1015
|
-
let
|
|
1014
|
+
const m = Array.isArray(n.data) ? n.data : [n.data], v = Date.now(), g = [...o], _ = { response: [], responseGroupUid: d, questionIndex: s };
|
|
1015
|
+
let b = null;
|
|
1016
1016
|
const k = r.slice(0);
|
|
1017
|
-
|
|
1018
|
-
const
|
|
1019
|
-
((
|
|
1020
|
-
let
|
|
1021
|
-
|
|
1022
|
-
}), e({ allResponses: k }), (
|
|
1023
|
-
const
|
|
1024
|
-
if (
|
|
1025
|
-
|
|
1026
|
-
u({ event: "seen", index:
|
|
1017
|
+
m.forEach((I, C) => {
|
|
1018
|
+
const E = g[s + C], { type: x, ...R } = I, N = { ...R, answeredAt: v }, T = N.value;
|
|
1019
|
+
((f) => f && !lt.has(f.type))(E) && (E.value = T, E.secondaryValue = N.secondaryValue || null), _.response.push(N);
|
|
1020
|
+
let p = T;
|
|
1021
|
+
x !== "multipleselect" && x !== "multiplechoice" || T === null || (p = x === "multiplechoice" ? Object.values(T).find((f) => f !== !1) : T, x === "multipleselect" && (p = g[s + C].props.options.reduce((f, w) => (T[w.id] && f.push(w.value), f), []))), k[s + C] = p, b = Pr({ cards: g, index: s + C, hasEndCard: !!n.endCard, uploadProgress: h, allResponses: k });
|
|
1022
|
+
}), e({ allResponses: k }), (b === null || lt.has(g[b].type)) && (_.completedAt = v);
|
|
1023
|
+
const y = l(_);
|
|
1024
|
+
if (b === null) return void n.completeSurvey();
|
|
1025
|
+
b && !lt.has(g[b].type) && y.finally(() => {
|
|
1026
|
+
u({ event: "seen", index: b });
|
|
1027
1027
|
});
|
|
1028
|
-
const
|
|
1029
|
-
|
|
1028
|
+
const j = g[b];
|
|
1029
|
+
g[b] && i && i("survey.question", { qid: j.name, props: j.props }), e({ cards: g, hasViewedEmbed: !1, index: b, viewedCardCount: c + 1 });
|
|
1030
1030
|
}, pendingRemoveIframeReason: null, previewKey: null, previewMode: void 0, recorder: () => {
|
|
1031
1031
|
}, recorderEventEmitter: Re, resolveTrackedPromise: () => {
|
|
1032
1032
|
const { removeIframeIfReady: n } = t();
|
|
@@ -1043,21 +1043,21 @@ const Ho = Ro(Uo), { useSyncExternalStoreWithSelector: Bo } = Ho, _n = (e) => {
|
|
|
1043
1043
|
}, slugName: null, showStripes: !1, showSurveyBrand: !1, styleNonce: "", submit: async ({ completedAt: n, questionIndex: r, response: o, responseGroupUid: i }) => {
|
|
1044
1044
|
const s = t();
|
|
1045
1045
|
if (!i || dt(s)) return;
|
|
1046
|
-
const d = { responseGroupUid: i, meta: s.meta, customMetadata: s.customMetadata, responses: o, completedAt: n, previewKey: s.previewKey }, l = await s.trackPromise(
|
|
1047
|
-
l.ok ? o.forEach((u,
|
|
1048
|
-
s.eventEmitFn(ie.QuestionAnswered, { ...u, questionIndex: r ? r +
|
|
1049
|
-
}) : l.reportError && (console.warn("[Sprig] (ERR-427) Failed to submit response", l.error), await s.trackPromise(
|
|
1046
|
+
const d = { responseGroupUid: i, meta: s.meta, customMetadata: s.customMetadata, responses: o, completedAt: n, previewKey: s.previewKey }, l = await s.trackPromise(ft(`${s.apiURL}/sdk/1/environments/${s.envId}/visitors/${s.userId}/responses/submit`, { body: JSON.stringify(d), headers: s.headers, method: "POST" }));
|
|
1047
|
+
l.ok ? o.forEach((u, h) => {
|
|
1048
|
+
s.eventEmitFn(ie.QuestionAnswered, { ...u, questionIndex: r ? r + h : void 0, "survey.id": s.surveyId });
|
|
1049
|
+
}) : l.reportError && (console.warn("[Sprig] (ERR-427) Failed to submit response", l.error), await s.trackPromise(xn(s, "submitResponse", l.error)));
|
|
1050
1050
|
}, surveyId: 0, tabTitle: "", trackHistory: async ({ event: n, index: r, isNew: o = !1 }) => {
|
|
1051
1051
|
const i = t();
|
|
1052
1052
|
if (dt(i)) return;
|
|
1053
1053
|
const { cards: s, index: d } = i;
|
|
1054
1054
|
let l = r ?? d, u = s[l];
|
|
1055
1055
|
for (; u; ) {
|
|
1056
|
-
const
|
|
1057
|
-
!c.ok && c.reportError && (console.warn("[Sprig] (ERR-428) Failed to track survey event", c.error), await i.trackPromise(
|
|
1058
|
-
const
|
|
1059
|
-
if (!u.groupId || !(
|
|
1060
|
-
l++, u =
|
|
1056
|
+
const h = { sid: i.surveyId, qid: u.name, action: n, vid: i.userId, eid: i.envId, isNew: o, responseGroupUid: i.responseGroupUid, previewKey: i.previewKey }, c = await i.trackPromise(ft(`${i.apiURL}/sdk/1/visitors/${i.userId}/surveys/${i.surveyId}/history`, { method: "POST", headers: i.headers, body: JSON.stringify(h) }));
|
|
1057
|
+
!c.ok && c.reportError && (console.warn("[Sprig] (ERR-428) Failed to track survey event", c.error), await i.trackPromise(xn(i, "trackHistory", c.error)));
|
|
1058
|
+
const m = s[l + 1];
|
|
1059
|
+
if (!u.groupId || !(m != null && m.groupId) || m.groupId !== u.groupId) break;
|
|
1060
|
+
l++, u = m, o = !1;
|
|
1061
1061
|
}
|
|
1062
1062
|
}, trackPromise: async (n) => {
|
|
1063
1063
|
const { resolveTrackedPromise: r } = t();
|
|
@@ -1065,64 +1065,64 @@ const Ho = Ro(Uo), { useSyncExternalStoreWithSelector: Bo } = Ho, _n = (e) => {
|
|
|
1065
1065
|
throw r(), o;
|
|
1066
1066
|
});
|
|
1067
1067
|
}, unresolvedRequestCount: 0, update: () => {
|
|
1068
|
-
const { cards: n, index: r, headers: o, eventEmitFn: i, frame: s, useMobileStyling: d, surveyId: l, viewDocument: u } = t(),
|
|
1068
|
+
const { cards: n, index: r, headers: o, eventEmitFn: i, frame: s, useMobileStyling: d, surveyId: l, viewDocument: u } = t(), h = o["userleap-platform"] === "web", c = We(o), m = n[r], v = m.type === "matrix" && !(m.props.properties.displayMatrixAsAccordion || d);
|
|
1069
1069
|
e({ minScrollableHeight: void 0 }), setTimeout(() => {
|
|
1070
|
-
var k,
|
|
1071
|
-
!c && !d && ((k = s == null ? void 0 : s.setWidth) == null || k.call(s,
|
|
1072
|
-
const [
|
|
1073
|
-
c ? (i(ie.SurveyHeight, { name: ie.SurveyHeight, contentFrameHeight:
|
|
1070
|
+
var k, y, j;
|
|
1071
|
+
!c && !d && ((k = s == null ? void 0 : s.setWidth) == null || k.call(s, uo));
|
|
1072
|
+
const [g, _, b] = po(u, h && !d, c);
|
|
1073
|
+
c ? (i(ie.SurveyHeight, { name: ie.SurveyHeight, contentFrameHeight: g, "survey.id": l }), i(ie.SurveyWidth, { name: ie.SurveyWidth, contentFrameWidth: _, "survey.id": l })) : ((y = s.setHeight) == null || y.call(s, g), e({ minScrollableHeight: b }), !d && v && ((j = s.setWidth) == null || j.call(s, _)));
|
|
1074
1074
|
}, 100);
|
|
1075
|
-
}, uploadingCardViewed: !1, uploadProgress: {}, useDesktopPrototype: void 0, useMobileStyling: !1, userId: "", viewDocument: window.document, viewedCardCount: 0, focusedQuestionId: null, setFocusedQuestionId: (n) => e({ focusedQuestionId: n }) })), dt = (e) => !e.userId || e.meta && e.meta.mode === "test" || e.isPreview || e.previewMode,
|
|
1076
|
-
const { mode: r, userId: o, envId: i, apiURL: s, headers: d, viewDocument: l } = e, u = l.documentElement,
|
|
1077
|
-
(await
|
|
1078
|
-
},
|
|
1079
|
-
const d =
|
|
1080
|
-
return
|
|
1081
|
-
var
|
|
1082
|
-
const
|
|
1083
|
-
u(r &&
|
|
1084
|
-
}, [r]),
|
|
1085
|
-
!l && r || !
|
|
1086
|
-
}, [e,
|
|
1087
|
-
}),
|
|
1075
|
+
}, uploadingCardViewed: !1, uploadProgress: {}, useDesktopPrototype: void 0, useMobileStyling: !1, userId: "", viewDocument: window.document, viewedCardCount: 0, focusedQuestionId: null, setFocusedQuestionId: (n) => e({ focusedQuestionId: n }) })), dt = (e) => !e.userId || e.meta && e.meta.mode === "test" || e.isPreview || e.previewMode, xn = async (e, t, n) => {
|
|
1076
|
+
const { mode: r, userId: o, envId: i, apiURL: s, headers: d, viewDocument: l } = e, u = l.documentElement, h = { mode: r, screenWidth: window.screen.width, screenHeight: window.screen.height, clientWidth: u.clientWidth, clientHeight: u.clientHeight, location: window.location.href, language: window.navigator.language }, c = { action: t, err: { message: `${n == null ? void 0 : n.name} - ${n == null ? void 0 : n.message}`, stack: n == null ? void 0 : n.stack }, meta: h, vid: o, envId: i };
|
|
1077
|
+
(await ft(`${s}/sdk/1/errors`, { method: "POST", headers: Object.assign({ "x-ul-error": window.btoa(`userleap-${Date.now()}-error`) }, d), body: JSON.stringify(c) })).ok || console.warn("[Sprig] (ERR-444) Failed to report error to API", n);
|
|
1078
|
+
}, Rr = (e) => oe("svg", { fill: "none", height: 24, viewBox: "0 0 24 24", width: 24, xmlns: "http://www.w3.org/2000/svg", ...e }, oe("path", { d: "M17 10L12 15L7 10", stroke: "#0B2330", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5 })), Mr = (e) => oe("svg", { fill: "none", height: 10, viewBox: "0 0 10 10", width: 10, xmlns: "http://www.w3.org/2000/svg", ...e }, oe("path", { d: "M9.15377 1.30774L4.07685 8.23082L1.30762 5.00005", stroke: "white", strokeLinecap: "round", strokeWidth: 2 })), ei = ({ visible: e }) => a("div", { className: "sprig-check-background", style: { opacity: e ? 1 : 0 }, children: a(Mr, { className: "sprig-check" }) }), kn = "250ms", ti = Pt(({ animate: e, children: t, header: n, isOpen: r, onClick: o, showHeaderCheck: i }, s) => {
|
|
1079
|
+
const d = ee(null), [l, u] = z(0), [h, c] = z("none"), [m, v] = z(!0);
|
|
1080
|
+
return W(() => {
|
|
1081
|
+
var _;
|
|
1082
|
+
const g = (_ = d.current) == null ? void 0 : _.getBoundingClientRect();
|
|
1083
|
+
u(r && g ? g.height : 0);
|
|
1084
|
+
}, [r]), W(() => {
|
|
1085
|
+
!l && r || !m || v(!1), c(e && !m ? `height ${kn} ease` : "none");
|
|
1086
|
+
}, [e, m, l, r]), a("div", { className: "sprig-accordion", ref: s, children: [a("button", { className: "sprig-accordion-header-container", onClick: o, type: "button", children: [a("div", { className: "sprig-header-label-container", children: [a("span", { className: "sprig-header-label", children: n }), a(ei, { visible: i })] }), a(Rr, { className: "sprig-caret", style: { transitionDuration: e ? kn : "0", transform: r ? "rotate(-180deg)" : "none" } })] }), a("div", { className: "sprig-accordion-body", style: { transition: h, height: l }, children: a("div", { ref: d, children: t }) })] });
|
|
1087
|
+
}), Ht = ({ style: e, stroke: t = "black" }) => a("svg", { fill: "none", height: "10", style: e, viewBox: "0 0 12 10", width: "12", xmlns: "http://www.w3.org/2000/svg", children: [a("path", { d: "M1.47839 5.2085L10.9384 5.2085", stroke: t, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.35" }), a("path", { d: "M7.0686 1.15845L10.9386 5.20845L7.0686 9.25845", stroke: t, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.35" })] }), H = (...e) => e.filter(Boolean).join(" "), X = (e, t, n) => {
|
|
1088
1088
|
const r = t ? "--mobile" : "--desktop";
|
|
1089
1089
|
return `${e + r} ${e + (n ? `${r}_${n}` : "")} ${e}`;
|
|
1090
|
-
},
|
|
1091
|
-
const { viewDocument: e } =
|
|
1092
|
-
return
|
|
1090
|
+
}, ni = (e, t) => `${e} ${e}__${t}`, te = (e) => a("button", { ...e, className: H("ul-card-text__button", e.className), id: "ul-card-text__button" }), Or = () => {
|
|
1091
|
+
const { viewDocument: e } = q((r) => ({ viewDocument: r.viewDocument })), [t, n] = z(!1);
|
|
1092
|
+
return W(() => {
|
|
1093
1093
|
const r = e.querySelector(".sprig-question-body"), o = new ResizeObserver(() => {
|
|
1094
1094
|
window.requestAnimationFrame(() => {
|
|
1095
|
-
n(!!(r &&
|
|
1095
|
+
n(!!(r && mo(r) && r.scrollHeight > r.offsetHeight));
|
|
1096
1096
|
});
|
|
1097
1097
|
});
|
|
1098
1098
|
return r && o.observe(r), () => {
|
|
1099
1099
|
r && o.disconnect();
|
|
1100
1100
|
};
|
|
1101
1101
|
}, [e]), t;
|
|
1102
|
-
},
|
|
1103
|
-
const { cards: e, close: t, endCard: n, headers: r, index: o } =
|
|
1102
|
+
}, wn = ({ plainText: e, richText: t, id: n, className: r, isHeader: o }) => t ? a("div", { className: r, dangerouslySetInnerHTML: { __html: t }, id: n }) : e ? a(o ? "h1" : "p", { className: r, id: n, children: e }) : null, ri = () => {
|
|
1103
|
+
const { cards: e, close: t, endCard: n, headers: r, index: o } = q((d) => ({ cards: d.cards, close: d.close, endCard: d.endCard, headers: d.headers, index: d.index, useMobileStyling: d.useMobileStyling })), i = e.length, s = de(() => () => t(je), [t]);
|
|
1104
1104
|
return ["email", "link"].includes(r["userleap-platform"]) || n && o + 1 === i ? null : a("div", { "aria-label": "Close button", className: "close-btn", onClick: s, onKeyPress: (d) => {
|
|
1105
1105
|
d.key === "Enter" && s();
|
|
1106
1106
|
}, role: "button", tabIndex: 0, children: a("svg", { fill: "none", height: "16px", viewBox: "0 0 13 13", width: "16px", xmlns: "http://www.w3.org/2000/svg", children: a("path", { d: "M2.54964 1.78369L1.78369 2.54964L5.73405 6.5L1.78369 10.4504L2.54964 11.2163L6.5 7.26595L10.4504 11.2163L11.2163 10.4504L7.26595 6.5L11.2163 2.54964L10.4504 1.78369L6.5 5.73405L2.54964 1.78369Z", fill: "#262136" }) }) });
|
|
1107
1107
|
}, se = ({ message: e, properties: t }) => {
|
|
1108
|
-
const n =
|
|
1109
|
-
return a("div", { className: H("question-header-container", "sprig-header-container", o ? "sprig-border-bottom" : null), ref: n, children: [a("div", { className: "question-header-button-container", children: [a(
|
|
1110
|
-
},
|
|
1108
|
+
const n = ee(null), r = t == null ? void 0 : t.captionText, o = Or();
|
|
1109
|
+
return a("div", { className: H("question-header-container", "sprig-header-container", o ? "sprig-border-bottom" : null), ref: n, children: [a("div", { className: "question-header-button-container", children: [a(wn, { className: "ul-question", id: "ul-question", isHeader: !0, plainText: e, richText: t == null ? void 0 : t.questionHtml }), a(ri, {})] }), a(wn, { className: "ul-caption", id: "ul-caption", plainText: r, richText: t == null ? void 0 : t.captionHtml })] });
|
|
1110
|
+
}, oi = () => a("svg", { fill: "none", height: "10", viewBox: "0 0 13 10", width: "13", xmlns: "http://www.w3.org/2000/svg", children: a("path", { d: "M11.5 1.5L4.5 8.5L1 5", stroke: "#FFFFFF", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5" }) }), Xe = ({ isSubmitDisabled: e, handleSubmit: t }) => a("div", { className: "ul-card-longform__submit-button-container", children: a(te, { className: "ul-card-longform__submit-button", disabled: e, onClick: t, children: ["OK ", a(oi, {})] }) }), Cn = ({ buttonText: e = "View Prototype", handleClick: t }) => a("button", { className: "prototype-button", onClick: t, children: e }, "prototype-btn"), pe = ({ defaultBody: e, embeddedType: t = "prototype", properties: n }) => {
|
|
1111
1111
|
var c;
|
|
1112
|
-
const { handleClickEmbedButton: r, hasViewedEmbed: o, headers: i, useDesktopPrototype: s } =
|
|
1113
|
-
|
|
1112
|
+
const { handleClickEmbedButton: r, hasViewedEmbed: o, headers: i, useDesktopPrototype: s } = q((m) => ({ handleClickEmbedButton: m.handleClickEmbedButton, hasViewedEmbed: m.hasViewedEmbed, headers: m.headers, useDesktopPrototype: m.useDesktopPrototype })), d = (n == null ? void 0 : n.conceptUrl) || ((c = n == null ? void 0 : n.consentDocument) == null ? void 0 : c.url), l = window.innerWidth < ho, u = i["userleap-platform"], h = (m, v) => {
|
|
1113
|
+
m.preventDefault(), r(v);
|
|
1114
1114
|
};
|
|
1115
1115
|
if (!s && l && !o && d && ["email", "link"].includes(u)) {
|
|
1116
|
-
if (t === "prototype") return a(
|
|
1117
|
-
m
|
|
1116
|
+
if (t === "prototype") return a(Cn, { handleClick: (m) => {
|
|
1117
|
+
h(m, "question.prototype.click");
|
|
1118
1118
|
} });
|
|
1119
|
-
if (t === "pdf") return a(
|
|
1120
|
-
m
|
|
1119
|
+
if (t === "pdf") return a(Cn, { buttonText: (n == null ? void 0 : n.viewDocumentText) || "View Document", handleClick: (m) => {
|
|
1120
|
+
h(m, "question.agreement.click");
|
|
1121
1121
|
} });
|
|
1122
1122
|
}
|
|
1123
1123
|
return e();
|
|
1124
|
-
},
|
|
1125
|
-
const n =
|
|
1124
|
+
}, Ur = ({ isSelected: e, id: t, divId: n, themeColor: r }) => a("div", { "aria-checked": e, "aria-labelledby": `label-${t}`, className: "select-checkbox", id: n, role: "checkbox", style: e ? { backgroundColor: r, borderColor: r, boxShadow: "none" } : {}, tabIndex: 0, children: e && a(Mr, {}) }), Hr = (e, t) => {
|
|
1125
|
+
const n = ee(0);
|
|
1126
1126
|
return () => {
|
|
1127
1127
|
if (e.current) {
|
|
1128
1128
|
const r = e.current;
|
|
@@ -1131,38 +1131,38 @@ const Ho = Ro(Uo), { useSyncExternalStoreWithSelector: Bo } = Ho, _n = (e) => {
|
|
|
1131
1131
|
n.current !== s && t(), n.current = s, r.style.height = `${s}px`;
|
|
1132
1132
|
}
|
|
1133
1133
|
};
|
|
1134
|
-
}, et = ({ ariaLabel: e, border: t, choiceStyle: n = {}, label: r, isSelected: o, value: i, text: s, id: d, isRadio: l, useMobileStyling: u, error:
|
|
1135
|
-
const { styleNonce:
|
|
1136
|
-
|
|
1137
|
-
const
|
|
1138
|
-
|
|
1139
|
-
}, I = (
|
|
1140
|
-
|
|
1141
|
-
},
|
|
1142
|
-
k ||
|
|
1143
|
-
},
|
|
1144
|
-
k &&
|
|
1145
|
-
},
|
|
1146
|
-
|
|
1147
|
-
})(
|
|
1148
|
-
"ontouchstart" in
|
|
1149
|
-
const
|
|
1150
|
-
return a("div", { className: H(
|
|
1151
|
-
},
|
|
1152
|
-
const o =
|
|
1153
|
-
return
|
|
1134
|
+
}, et = ({ ariaLabel: e, border: t, choiceStyle: n = {}, label: r, isSelected: o, value: i, text: s, id: d, isRadio: l, useMobileStyling: u, error: h, allowTextEntry: c, noneOfTheAbove: m, promptText: v, onUserInputChanged: g }) => {
|
|
1135
|
+
const { styleNonce: _, viewDocument: b } = q((f) => ({ styleNonce: f.styleNonce, viewDocument: f.viewDocument })), [k, y] = z(!1);
|
|
1136
|
+
si(b, t, _);
|
|
1137
|
+
const j = ({ isSelected: f, userText: w }) => {
|
|
1138
|
+
g && g({ id: d, selected: f, value: i, userText: w, noneOfTheAbove: m });
|
|
1139
|
+
}, I = (f) => {
|
|
1140
|
+
f.stopPropagation(), j({ isSelected: l || !o, userText: s }), y(!1);
|
|
1141
|
+
}, C = () => {
|
|
1142
|
+
k || y(!0);
|
|
1143
|
+
}, E = () => {
|
|
1144
|
+
k && y(!1);
|
|
1145
|
+
}, x = { onClick: (f) => I(f), onKeyPress: (f) => ((w) => {
|
|
1146
|
+
w.key !== "Enter" && w.key !== " " || I(w);
|
|
1147
|
+
})(f) };
|
|
1148
|
+
"ontouchstart" in b.documentElement ? (x.onTouchStart = E, x.onTouchCancel = E, x.onTouchEnd = E) : (x.onMouseDown = C, x.onMouseLeave = E);
|
|
1149
|
+
const R = l ? `radio-${d}` : `checkbox-${d}`, N = o || k ? [ze] : [], T = [...h ? [Br] : [], ...N], p = r ? { "aria-labelledby": `label-${d}` } : { "aria-label": e };
|
|
1150
|
+
return a("div", { className: H(X("choice", u), ...T), id: `choice-div-${d}`, style: { ...n, ...h ? { borderColor: Pe } : {} }, ...x, children: [a("div", { className: H("choice-label-container"), children: [l ? a("div", { ...p, className: H("select-radio", ...N), id: R, role: "radio", tabIndex: 0 }) : a(Ur, { divId: R, id: d, isSelected: o, themeColor: t }), r && a("label", { className: H(X("select-label", u)), htmlFor: R, id: `label-${d}`, children: r })] }), c && o && a("div", { className: H("choice-text-entry-container", ...N), children: a(ii, { onTextChange: (f) => j({ isSelected: o, userText: f }), promptText: v || "Please specify", textValue: s, useMobileStyling: u }) })] });
|
|
1151
|
+
}, ii = ({ promptText: e, textValue: t, onTextChange: n, useMobileStyling: r }) => {
|
|
1152
|
+
const o = ee(null), { update: i } = q((d) => ({ update: d.update })), s = Hr(o, () => i());
|
|
1153
|
+
return W(() => (s(), o.current && o.current.focus(), () => {
|
|
1154
1154
|
i();
|
|
1155
|
-
}), []), a("textarea", { "aria-label": e, "aria-multiline": "true", "aria-placeholder": e, className: H(
|
|
1155
|
+
}), []), a("textarea", { "aria-label": e, "aria-multiline": "true", "aria-placeholder": e, className: H(X("choice-text-input", r)), "data-gramm": "false", maxLength: 5e3, name: "text", onChange: (d) => {
|
|
1156
1156
|
s(), d.stopPropagation(), n(d.currentTarget.value);
|
|
1157
1157
|
}, onClick: (d) => {
|
|
1158
1158
|
d.stopPropagation();
|
|
1159
1159
|
}, onKeyPress: (d) => {
|
|
1160
1160
|
d.stopPropagation();
|
|
1161
1161
|
}, placeholder: e, ref: o, role: "textbox", rows: 1, value: t });
|
|
1162
|
-
},
|
|
1163
|
-
let r = e.getElementById(
|
|
1164
|
-
r || (r = e.createElement("style"), o = !0), r.tagName.toLowerCase() === "style" && (r.id =
|
|
1165
|
-
},
|
|
1162
|
+
}, Sn = "ul-select-style-element", ze = "ul-select-active-dynamic-style", Br = "ul-select-error-dynamic-style", si = (e, t, n) => {
|
|
1163
|
+
let r = e.getElementById(Sn), o = !1;
|
|
1164
|
+
r || (r = e.createElement("style"), o = !0), r.tagName.toLowerCase() === "style" && (r.id = Sn, n && (r.nonce = n), r.textContent = ai(t), o && e.head.appendChild(r));
|
|
1165
|
+
}, ai = (e) => `
|
|
1166
1166
|
.${ze} {
|
|
1167
1167
|
border-color: ${e};
|
|
1168
1168
|
}
|
|
@@ -1170,514 +1170,604 @@ const Ho = Ro(Uo), { useSyncExternalStoreWithSelector: Bo } = Ho, _n = (e) => {
|
|
|
1170
1170
|
border: 6px solid ${e};
|
|
1171
1171
|
box-shadow: none;
|
|
1172
1172
|
}
|
|
1173
|
-
.${
|
|
1173
|
+
.${Br} {
|
|
1174
1174
|
border-color: ${Pe};
|
|
1175
1175
|
}
|
|
1176
|
-
`, me = ({ children: e }) => a("div", { className: "sprig-question-body", children: e }),
|
|
1177
|
-
const t =
|
|
1176
|
+
`, me = ({ children: e }) => a("div", { className: "sprig-question-body", children: e }), be = ({ children: e }) => {
|
|
1177
|
+
const t = Or();
|
|
1178
1178
|
return a("div", { className: H("sprig-question-footer-container", t ? "sprig-border-top" : null), children: e });
|
|
1179
|
-
},
|
|
1180
|
-
const { useMobileStyling: s, border: d, isLongFormSurvey: l, focusedQuestionId: u } =
|
|
1181
|
-
|
|
1182
|
-
let
|
|
1183
|
-
if (!
|
|
1184
|
-
if (!
|
|
1185
|
-
|
|
1179
|
+
}, qr = ({ logoOnly: e = !1, style: t = {} }) => a("svg", { alt: (e ? "Powered by " : "") + "Sprig", width: e ? "35" : "112", height: "15", viewBox: e ? "79 0 31 15" : "0 0 112 15", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: { display: "block", ...t }, children: [!e && a("path", { d: "M0.648926 12.0181V2.8584H4.21631C6.0127 2.8584 7.25684 4.06445 7.25684 5.86084V5.87354C7.25684 7.66357 6.0127 8.88867 4.21631 8.88867H2.0708V12.0181H0.648926ZM3.86084 4.05811H2.0708V7.69531H3.86084C5.09229 7.69531 5.80957 7.02881 5.80957 5.87988V5.86719C5.80957 4.72461 5.09229 4.05811 3.86084 4.05811ZM11.6621 12.1514C9.63721 12.1514 8.39941 10.7993 8.39941 8.57764V8.56494C8.39941 6.34961 9.64355 4.99121 11.6621 4.99121C13.6743 4.99121 14.9185 6.34326 14.9185 8.56494V8.57764C14.9185 10.7993 13.6807 12.1514 11.6621 12.1514ZM11.6621 11.0024C12.8428 11.0024 13.5156 10.1011 13.5156 8.57764V8.56494C13.5156 7.03516 12.8428 6.14014 11.6621 6.14014C10.4751 6.14014 9.80859 7.03516 9.80859 8.56494V8.57764C9.80859 10.1074 10.4751 11.0024 11.6621 11.0024ZM17.6226 12.0181L15.7183 5.12451H17.1021L18.3398 10.4438H18.4414L19.8633 5.12451H21.1709L22.5928 10.4438H22.7007L23.9321 5.12451H25.2969L23.3989 12.0181H21.9834L20.5552 6.87646H20.4473L19.0254 12.0181H17.6226ZM29.334 12.1514C27.3154 12.1514 26.0967 10.7739 26.0967 8.59033V8.58398C26.0967 6.43213 27.3408 4.99121 29.2642 4.99121C31.1875 4.99121 32.3682 6.38135 32.3682 8.45068V8.93311H27.4805C27.5059 10.2534 28.2295 11.0215 29.3657 11.0215C30.248 11.0215 30.7749 10.5835 30.9399 10.228L30.9653 10.1772L32.292 10.1709L32.2793 10.228C32.0508 11.1357 31.0986 12.1514 29.334 12.1514ZM29.2705 6.12109C28.3311 6.12109 27.6201 6.76221 27.4995 7.94922H31.0034C30.8955 6.71777 30.2036 6.12109 29.2705 6.12109ZM34.0059 12.0181V5.12451H35.3833V6.16553H35.4849C35.7324 5.43555 36.3735 5.00391 37.2939 5.00391C37.5161 5.00391 37.7573 5.03564 37.897 5.06738V6.33691C37.6494 6.28613 37.4146 6.25439 37.1543 6.25439C36.1006 6.25439 35.3833 6.90186 35.3833 7.89844V12.0181H34.0059ZM41.9277 12.1514C39.9092 12.1514 38.6904 10.7739 38.6904 8.59033V8.58398C38.6904 6.43213 39.9346 4.99121 41.8579 4.99121C43.7812 4.99121 44.9619 6.38135 44.9619 8.45068V8.93311H40.0742C40.0996 10.2534 40.8232 11.0215 41.9595 11.0215C42.8418 11.0215 43.3687 10.5835 43.5337 10.228L43.5591 10.1772L44.8857 10.1709L44.873 10.228C44.6445 11.1357 43.6924 12.1514 41.9277 12.1514ZM41.8643 6.12109C40.9248 6.12109 40.2139 6.76221 40.0933 7.94922H43.5972C43.4893 6.71777 42.7974 6.12109 41.8643 6.12109ZM49.1133 12.1323C47.3804 12.1323 46.2568 10.7422 46.2568 8.57764V8.56494C46.2568 6.38135 47.3613 5.00391 49.1133 5.00391C50.0591 5.00391 50.8652 5.47363 51.2334 6.21631H51.3413V2.42041H52.7124V12.0181H51.3413V10.9326H51.2334C50.8335 11.688 50.0781 12.1323 49.1133 12.1323ZM49.5068 10.958C50.6558 10.958 51.3604 10.0503 51.3604 8.57764V8.56494C51.3604 7.09229 50.6494 6.18457 49.5068 6.18457C48.3516 6.18457 47.6597 7.08594 47.6597 8.56494V8.57764C47.6597 10.0566 48.3516 10.958 49.5068 10.958ZM61.98 12.1323C61.0151 12.1323 60.2598 11.688 59.8599 10.9326H59.7583V12.0181H58.3809V2.42041H59.7583V6.21631H59.8599C60.228 5.47363 61.0342 5.00391 61.98 5.00391C63.7319 5.00391 64.8364 6.38135 64.8364 8.56494V8.57764C64.8364 10.7422 63.7192 12.1323 61.98 12.1323ZM61.5928 10.958C62.7417 10.958 63.4336 10.0566 63.4336 8.57764V8.56494C63.4336 7.08594 62.7417 6.18457 61.5928 6.18457C60.4438 6.18457 59.7329 7.09229 59.7329 8.56494V8.57764C59.7329 10.0503 60.4438 10.958 61.5928 10.958ZM66.8867 14.4429C66.7153 14.4429 66.5122 14.4302 66.3345 14.4111V13.3257C66.4678 13.3447 66.6392 13.3511 66.7979 13.3511C67.439 13.3511 67.8262 13.0781 68.0293 12.3799L68.1309 12.0244L65.6299 5.12451H67.1152L68.8418 10.6343H68.9624L70.6826 5.12451H72.1299L69.5654 12.2847C68.9814 13.9287 68.2832 14.4429 66.8867 14.4429Z", fill: "black", fillOpacity: "0.7" }), a("path", { d: "M81.1088 6.63629C79.6878 6.32154 78.9672 5.76865 78.9672 4.99369C78.9672 4.19299 79.736 3.5886 80.7556 3.5886C81.8066 3.5886 82.5995 4.25285 82.5995 5.13336V5.20352H84.0518V5.13336C84.0518 3.52424 82.6405 2.30774 80.7693 2.30774C79.8676 2.30774 79.0414 2.58451 78.4433 3.08655C78.1463 3.33144 77.9077 3.63818 77.7448 3.98479C77.5818 4.33141 77.4984 4.70934 77.5005 5.09153C77.4946 5.44197 77.5675 5.78934 77.714 6.10857C77.8605 6.42779 78.0769 6.71092 78.3475 6.93752C78.8512 7.37584 79.5659 7.70024 80.4709 7.90299C81.9949 8.23898 82.7676 8.81054 82.7676 9.60094C82.7676 10.4576 81.9258 11.1032 80.813 11.1032C79.6571 11.1032 78.7854 10.3856 78.7854 9.43424V9.36408H77.3318V9.43424C77.3318 11.1167 78.8219 12.3847 80.7973 12.3847C81.7421 12.3847 82.6093 12.0983 83.2393 11.5769C83.5519 11.3237 83.8034 11.0048 83.9753 10.6433C84.1472 10.2818 84.2352 9.88702 84.2329 9.48766C84.2329 8.05875 83.1833 7.09907 81.1088 6.63629Z", fill: "black", fillOpacity: "0.7" }), a("path", { d: "M89.2394 4.68276C88.6963 4.67605 88.1596 4.79915 87.6751 5.04156C87.1905 5.28397 86.7725 5.63851 86.4566 6.07497V4.85204H85.0747V14.8479H86.4566V11.0356C86.7725 11.472 87.1906 11.8265 87.6751 12.0688C88.1596 12.3111 88.6963 12.434 89.2394 12.4272C91.3836 12.4272 93 10.7627 93 8.55495C93 6.34723 91.3836 4.68276 89.2394 4.68276ZM91.5608 8.84202C91.5057 9.41605 91.2512 9.95356 90.8406 10.3633C90.4299 10.773 89.8883 11.0296 89.3078 11.0896C88.5363 11.1669 87.8177 10.9461 87.2841 10.4692C86.7505 9.99222 86.4566 9.3106 86.4566 8.55495C86.4566 7.10159 87.5538 6.00546 89.0087 6.00546C89.7619 6.00546 90.4421 6.29124 90.9171 6.81002C91.407 7.34232 91.6357 8.06385 91.5608 8.84202Z", fill: "black", fillOpacity: "0.7" }), a("path", { d: "M109.95 4.85407V6.06349C109.298 5.18298 108.292 4.68286 107.153 4.68286C105.017 4.68286 103.406 6.31709 103.406 8.48426C103.406 10.6514 105.017 12.285 107.153 12.285C108.296 12.285 109.303 11.79 109.95 10.9185V11.1046C109.95 12.6101 108.993 13.5826 107.513 13.5826C106.513 13.5826 105.68 13.1494 105.284 12.424L105.264 12.3867H103.838L103.871 12.48C104.112 13.1892 104.583 13.8001 105.211 14.2179C105.841 14.6324 106.637 14.8512 107.513 14.8512C108.637 14.8512 109.594 14.4972 110.28 13.8285C110.967 13.1597 111.332 12.2194 111.332 11.1213V4.85407H109.95ZM109.175 10.3502C108.588 10.905 107.752 11.138 106.879 10.9887C106.361 10.8984 105.886 10.6475 105.523 10.2725C105.16 9.89751 104.927 9.41787 104.859 8.90328C104.736 8.03757 104.999 7.21756 105.581 6.655C106.069 6.19093 106.723 5.93643 107.401 5.94699C107.565 5.94713 107.729 5.96026 107.891 5.98625C108.946 6.15489 109.781 7.01609 109.921 8.0852C110.039 8.96507 109.766 9.78958 109.175 10.3502Z", fill: "black", fillOpacity: "0.7" }), a("path", { d: "M101.89 2.12378C101.63 2.06766 101.358 2.11486 101.133 2.25518C100.908 2.39551 100.747 2.61769 100.687 2.87371C100.626 3.12973 100.67 3.39902 100.809 3.62339C100.947 3.84775 101.17 4.00917 101.428 4.07275C101.503 4.08936 101.58 4.09778 101.657 4.09786C101.906 4.09824 102.146 4.0083 102.331 3.84518C102.517 3.68206 102.636 3.45714 102.664 3.21327C102.693 2.9694 102.63 2.72361 102.487 2.5227C102.344 2.32179 102.132 2.17981 101.89 2.12378Z", fill: "black", fillOpacity: "0.7" }), a("path", { d: "M100.967 10.934H99.7755C98.9285 10.934 98.4196 10.3644 98.4196 9.40982C98.4196 8.4791 98.8757 7.36945 99.8054 6.01778L99.8178 5.99976V5.61807L95.8571 5.06453C95.8585 4.90331 95.8162 4.74466 95.7346 4.60501C95.653 4.46536 95.5352 4.34979 95.3932 4.27027C95.0381 4.07718 94.6498 4.07717 94.3279 4.26383C94.1667 4.35799 94.035 4.4945 93.9476 4.65816C93.8602 4.82182 93.8205 5.00623 93.8328 5.19087C93.8452 5.37552 93.9092 5.55315 94.0176 5.70402C94.1261 5.85489 94.2748 5.97309 94.4472 6.04546L93.2151 12.258H94.5833L95.7196 6.35891L97.8593 6.7155C97.284 7.73439 96.9921 8.68442 96.9921 9.53919C96.9921 11.1168 97.9577 12.1498 99.5187 12.2496V12.258H102.346V4.87723H100.967V10.934Z", fill: "black", fillOpacity: "0.7" })] }), Ar = ({ forceBrandedLogo: e, marketingUrlLink: t }) => a("div", { className: e ? "yellow-footer-logo" : "", style: { marginTop: "4px", marginBottom: "4px" }, children: a("a", { href: t, rel: "noreferrer", target: "_blank", children: a("div", { style: { display: "flex" }, children: [a(qr, { logoOnly: !1 }), e && a(Ht, { style: { display: "block", margin: "auto 0 auto 4px", transform: "rotateY(0deg) rotate(-45deg)" } })] }) }) }), Fr = ({ marketingUrlLink: e }) => a("a", { dir: "ltr", href: e, rel: "noreferrer", target: "_blank", children: a("div", { className: "thank-you-card-link", children: [a("div", { className: "sprig-box-logo", children: a(qr, { logoOnly: !0, style: { margin: "auto" } }) }), a("div", { children: a("p", { children: ["Capture insights about your own product", a(Ht, { style: { display: "inline-flex", marginInlineStart: "4px", verticalAlign: "middle" } })] }) })] }) }), xe = (e) => (e == null ? void 0 : e.buttonText) || "Next", Bt = (e) => (e == null ? void 0 : e.skipButtonText) || "Skip", Vr = ({ marketingUrl: e, slugName: t, surveyId: n, forceBrandedLogo: r }) => `${e}?utm_source=survey_branding&utm_medium=website&utm_campaign=${t}&utm_content=${n}${r ? "&utm_term=poweredby_pill" : ""}`, li = ({ className: e, message: t, next: n, properties: r, questionId: o, type: i }) => {
|
|
1180
|
+
const { useMobileStyling: s, border: d, isLongFormSurvey: l, focusedQuestionId: u } = q((f) => ({ useMobileStyling: f.useMobileStyling, border: f.border, isLongFormSurvey: re(f.studyType), focusedQuestionId: f.focusedQuestionId })), [h, c] = z(!1), [m, v] = z(""), [g, _] = z(!1), b = l && u === o, k = r == null ? void 0 : r.collectName, y = (r == null ? void 0 : r.nameLabelText) || "Full Name", j = (r == null ? void 0 : r.consentText) || "I agree to the stated conditions", I = (r == null ? void 0 : r.submitButtonText) || "Submit", C = !!m.trim(), E = h && (!k || C), x = (f, w = !1) => {
|
|
1181
|
+
f.preventDefault(), f.stopPropagation();
|
|
1182
|
+
let S = null;
|
|
1183
|
+
if (!w) {
|
|
1184
|
+
if (!E) return void _(!0);
|
|
1185
|
+
S = { submitted: !0 }, k && (S.name = m);
|
|
1186
1186
|
}
|
|
1187
|
-
n({ value:
|
|
1188
|
-
},
|
|
1189
|
-
|
|
1190
|
-
},
|
|
1191
|
-
|
|
1192
|
-
},
|
|
1193
|
-
|
|
1194
|
-
},
|
|
1195
|
-
|
|
1196
|
-
}, useMobileStyling: s }), k && a("input", { "aria-label":
|
|
1197
|
-
return a("div", { className: H(e, l && !
|
|
1198
|
-
},
|
|
1187
|
+
n({ value: S, questionId: o, type: i }, E);
|
|
1188
|
+
}, R = (f) => {
|
|
1189
|
+
f.preventDefault(), f.stopPropagation(), v(f.currentTarget.value);
|
|
1190
|
+
}, N = (f) => {
|
|
1191
|
+
f.currentTarget.style.borderColor = g && !C ? Pe : d;
|
|
1192
|
+
}, T = (f) => {
|
|
1193
|
+
f.currentTarget.style.borderColor = g && !C ? Pe : It;
|
|
1194
|
+
}, p = () => a(be, { children: [a("div", { className: "sprig-stretch", children: [a(et, { allowTextEntry: !1, border: d, error: g && !h, id: "consent", isRadio: !1, isSelected: h, label: j, onUserInputChanged: ({ selected: f }) => {
|
|
1195
|
+
f !== h && c(!h);
|
|
1196
|
+
}, useMobileStyling: s }), k && a("input", { "aria-label": y, "aria-placeholder": y, className: H(X("ul-consent-legal__name-input", s)), "data-gramm": "false", maxLength: 250, name: "name", onBlur: T, onFocus: N, onInput: R, placeholder: y, style: g && !C ? { borderColor: Pe } : {}, tabIndex: 0, value: m })] }), a("div", { className: "ul-card__button-wrapper ul-card-vertical__button-wrapper", children: [a(te, { className: E ? "" : "sprig-button-disabled", onClick: x, children: I }), r.required === !1 && !l && a("button", { className: "ul-card-skip__button", onClick: (f) => x(f, !0), children: Bt(r) })] })] });
|
|
1197
|
+
return a("div", { className: H(e, l && !b && "ul-card--unfocused", "ul-card__consent-legal", "fade-in-transition"), children: [a(se, { message: t, properties: { questionHtml: r.questionHtml } }), a(Y, { children: [r != null && r.richTextBody ? a(me, { children: a("div", { className: "ul-rich-text-body", dangerouslySetInnerHTML: r != null && r.richTextBody ? { __html: r.richTextBody } : void 0, id: "ul-card__consent-legal-body-container" }) }) : null, a(pe, { properties: r, defaultBody: p, embeddedType: "pdf" })] })] }, o);
|
|
1198
|
+
}, di = ({ icon: e, scaleLabelType: t, value: n, selectedValue: r }) => {
|
|
1199
1199
|
if (t === "smiley" && n === r) {
|
|
1200
1200
|
let o = 0;
|
|
1201
1201
|
return e.replace(/black/g, () => ++o == 1 ? "black" : "white");
|
|
1202
1202
|
}
|
|
1203
1203
|
return e;
|
|
1204
|
-
},
|
|
1205
|
-
const { isLongFormSurvey:
|
|
1206
|
-
const
|
|
1207
|
-
return k &&
|
|
1208
|
-
})(),
|
|
1209
|
-
const
|
|
1210
|
-
return
|
|
1211
|
-
}, [
|
|
1212
|
-
return a("button", { "aria-label":
|
|
1204
|
+
}, ci = ({ activeValue: e, border: t, icon: n, isPressed: r, onSubmit: o, range: i, scaleLabelType: s, selectedValue: d, setSelectedValue: l, setActiveValue: u, setIsPressed: h, useMobileStyling: c, value: m, viewDocument: v }) => {
|
|
1205
|
+
const { isLongFormSurvey: g } = q((x) => ({ isLongFormSurvey: re(x.studyType) })), _ = `option-${m}`, b = s === "number", k = s === "star", y = s === "smiley", j = b && m === e || m === d, [I, C] = (() => {
|
|
1206
|
+
const x = k && d !== null && m <= d;
|
|
1207
|
+
return k && m <= e || y && m === e || x || m === e || m === d ? [t, r || x || m === d ? 1 : 0.3] : ["", 1];
|
|
1208
|
+
})(), E = de(() => {
|
|
1209
|
+
const x = { borderColor: j ? I : "", fillOpacity: j ? "" : C, zIndex: j ? 3 : "auto", color: d === m ? "#fff" : "" };
|
|
1210
|
+
return b ? { ...x, backgroundColor: d === m ? I : "" } : { ...x, color: k || y || d === m ? I : "" };
|
|
1211
|
+
}, [j, I, C, d, m, b, k, y]);
|
|
1212
|
+
return a("button", { "aria-label": b ? void 0 : String(m), className: (() => {
|
|
1213
1213
|
switch (s) {
|
|
1214
1214
|
case "star":
|
|
1215
|
-
return H(
|
|
1215
|
+
return H(X("likert-star", c), X(`likert-star-${m}`, c));
|
|
1216
1216
|
case "smiley":
|
|
1217
|
-
return H(
|
|
1217
|
+
return H(X("likert-smiley", c), X(`likert-smiley-${m}`, c));
|
|
1218
1218
|
default:
|
|
1219
|
-
return
|
|
1219
|
+
return m === i ? H(X("likert-number", c), X(`likert-number-${m}`, c), X("likert-last-option", c)) : H(X("likert-number", c), X(`likert-number-${m}`, c));
|
|
1220
1220
|
}
|
|
1221
|
-
})(), dangerouslySetInnerHTML: { __html:
|
|
1222
|
-
|
|
1223
|
-
}, onKeyDown: (
|
|
1224
|
-
var
|
|
1225
|
-
const
|
|
1226
|
-
|
|
1227
|
-
}, onPointerDown: () =>
|
|
1228
|
-
u(-1),
|
|
1229
|
-
}, style:
|
|
1230
|
-
},
|
|
1231
|
-
const { border: d, useMobileStyling: l, viewDocument: u, isLongFormSurvey:
|
|
1232
|
-
let
|
|
1233
|
-
const { range:
|
|
1234
|
-
|
|
1235
|
-
const
|
|
1236
|
-
var
|
|
1237
|
-
switch (
|
|
1221
|
+
})(), dangerouslySetInnerHTML: { __html: di({ icon: n, scaleLabelType: s, value: m, selectedValue: d }) }, id: _, onClick: (x) => {
|
|
1222
|
+
g && (x.preventDefault(), x.stopPropagation(), l(m)), o();
|
|
1223
|
+
}, onKeyDown: (x) => {
|
|
1224
|
+
var T, p;
|
|
1225
|
+
const R = v.querySelectorAll(`.likert-${s ?? "number"}`), N = m - 1;
|
|
1226
|
+
x.key === "ArrowRight" ? (T = R[N + 1]) == null || T.focus() : x.key === "ArrowLeft" ? (p = R[N - 1]) == null || p.focus() : x.key !== "Enter" && x.key !== " " || (g && (x.preventDefault(), x.stopPropagation(), l(m)), o());
|
|
1227
|
+
}, onPointerDown: () => h(!0), onPointerEnter: () => u(m), onPointerLeave: () => {
|
|
1228
|
+
u(-1), h(!1);
|
|
1229
|
+
}, style: E, tabIndex: 0 });
|
|
1230
|
+
}, ui = ({ className: e, labels: t, message: n, next: r, properties: o, questionId: i, type: s }) => {
|
|
1231
|
+
const { border: d, useMobileStyling: l, viewDocument: u, isLongFormSurvey: h, focusedQuestionId: c } = q((w) => ({ border: w.border, useMobileStyling: w.useMobileStyling, viewDocument: w.viewDocument, isLongFormSurvey: re(w.studyType), focusedQuestionId: w.focusedQuestionId })), [m, v] = z(-1), [g, _] = z(!1), [b, k] = z(null), y = h && c === i, j = t && t.left, I = t && t.right;
|
|
1232
|
+
let C;
|
|
1233
|
+
const { range: E, scaleLabelType: x, ratingIcons: R } = o;
|
|
1234
|
+
E && (C = Number(E));
|
|
1235
|
+
const N = C || 5, T = (w) => {
|
|
1236
|
+
var S, D;
|
|
1237
|
+
switch (x) {
|
|
1238
1238
|
case "star":
|
|
1239
|
-
return (
|
|
1239
|
+
return (S = R[0]) == null ? void 0 : S.svg;
|
|
1240
1240
|
case "smiley":
|
|
1241
|
-
return (
|
|
1241
|
+
return (D = R[w]) == null ? void 0 : D.svg;
|
|
1242
1242
|
default:
|
|
1243
|
-
return String(
|
|
1243
|
+
return String(w + 1);
|
|
1244
1244
|
}
|
|
1245
|
-
},
|
|
1246
|
-
const
|
|
1247
|
-
return a(
|
|
1248
|
-
}),
|
|
1249
|
-
|
|
1245
|
+
}, p = [...Array(N)].map((w, S) => {
|
|
1246
|
+
const D = S + 1;
|
|
1247
|
+
return a(ci, { activeValue: m, border: d, icon: T(S), isPressed: g, onSubmit: () => r({ value: D, questionId: i, type: s }, !0), range: N, scaleLabelType: x, selectedValue: b, setActiveValue: v, setIsPressed: _, setSelectedValue: k, useMobileStyling: l, value: D, viewDocument: u }, S);
|
|
1248
|
+
}), f = (w) => {
|
|
1249
|
+
w.preventDefault(), w.stopPropagation(), r({ value: null, questionId: i, type: s }, !0);
|
|
1250
1250
|
};
|
|
1251
|
-
return a("form", { className: H(e, "ul-card--likert", "fade-in-transition",
|
|
1252
|
-
},
|
|
1251
|
+
return a("form", { className: H(e, "ul-card--likert", "fade-in-transition", h && !y && "ul-card--unfocused"), children: [a(se, { message: n, properties: o }), a(pe, { properties: o, defaultBody: () => a(Y, { children: [a(me, { children: [a("div", { "aria-label": `Rating (1 - ${N})`, className: "ul-card--likert__numbers", role: "radiogroup", children: p }), a("div", { className: "ul-card--likert__labels", children: [a("span", { children: j }), a("span", { children: I })] })] }), !o.required && !h && a(be, { children: a("div", { className: "ul-vertical-centered-container", children: a(te, { onClick: f, children: xe(o) }) }) })] }) })] }, i);
|
|
1252
|
+
}, zr = (e) => e && (e.scrollHeight > e.offsetHeight ? e : zr(e.parentElement)), pi = (e) => {
|
|
1253
1253
|
if (!e || !((n) => n instanceof HTMLElement)(e)) return 0;
|
|
1254
1254
|
const t = getComputedStyle(e);
|
|
1255
1255
|
return parseFloat(t.marginTop) + parseFloat(t.marginBottom) + (parseFloat(t.borderTopWidth) + parseFloat(t.borderBottomWidth));
|
|
1256
|
-
},
|
|
1257
|
-
const o =
|
|
1258
|
-
t(
|
|
1259
|
-
const
|
|
1260
|
-
if (
|
|
1261
|
-
u(
|
|
1262
|
-
const
|
|
1263
|
-
if (
|
|
1264
|
-
const k =
|
|
1265
|
-
k == null || k.scrollTo(0,
|
|
1256
|
+
}, mi = ({ columns: e, onSelect: t, options: n, selectedOptions: r }) => {
|
|
1257
|
+
const o = ee([]), { border: i, useMobileStyling: s } = q((m) => ({ border: m.border, useMobileStyling: m.useMobileStyling })), d = n.findIndex((m) => r[m.id] === null), [l, u] = z(d), h = Se((m, v) => {
|
|
1258
|
+
t(m, v);
|
|
1259
|
+
const g = l + 1, _ = n[g];
|
|
1260
|
+
if (_ && r[_.id] === null) {
|
|
1261
|
+
u(g);
|
|
1262
|
+
const b = o.current[l];
|
|
1263
|
+
if (b != null && b.firstElementChild) {
|
|
1264
|
+
const k = zr(b), y = b.firstElementChild, j = pi(b) + y.clientHeight;
|
|
1265
|
+
k == null || k.scrollTo(0, b.offsetTop + j);
|
|
1266
1266
|
}
|
|
1267
1267
|
}
|
|
1268
|
-
}, [t, n, r, l]), c = Se((
|
|
1269
|
-
const
|
|
1270
|
-
return a(
|
|
1271
|
-
|
|
1272
|
-
}, showHeaderCheck: r[v.id] !== null, children: a("div", { style: { paddingTop: "12px" }, children: e.map((
|
|
1273
|
-
}, [i, e, l,
|
|
1274
|
-
return a("div", { children: n.map((
|
|
1275
|
-
},
|
|
1276
|
-
const { border: o, useMobileStyling: i, isLongFormSurvey: s } =
|
|
1277
|
-
return
|
|
1278
|
-
const
|
|
1268
|
+
}, [t, n, r, l]), c = Se((m, v) => {
|
|
1269
|
+
const g = l === m;
|
|
1270
|
+
return a(ti, { animate: !0, header: v.label, isOpen: g, onClick: () => u(g && !window.UserLeap.isMobileSDK ? -1 : m), ref: (_) => {
|
|
1271
|
+
_ && (o.current[m] = _);
|
|
1272
|
+
}, showHeaderCheck: r[v.id] !== null, children: a("div", { style: { paddingTop: "12px" }, children: e.map((_) => a(et, { allowTextEntry: !1, ariaLabel: `${v.label}-${_.label}`, border: i, error: !1, id: `${v.id}-${_.value}`, isRadio: !0, isSelected: r[v.id] === _.value, label: _.label, onUserInputChanged: () => h(v.id, _.value), useMobileStyling: s }, _.label)) }) }, v.id);
|
|
1273
|
+
}, [i, e, l, h, r, s]);
|
|
1274
|
+
return a("div", { children: n.map((m, v) => c(v, m)) });
|
|
1275
|
+
}, hi = ({ columns: e, onSelect: t, options: n, selectedOptions: r }) => {
|
|
1276
|
+
const { border: o, useMobileStyling: i, isLongFormSurvey: s } = q((g) => ({ border: g.border, useMobileStyling: g.useMobileStyling, isLongFormSurvey: re(g.studyType) })), d = n.length, l = e.length, u = ee(null), [h, c] = z(!1), [m, v] = z(!1);
|
|
1277
|
+
return W(() => {
|
|
1278
|
+
const g = u.current, _ = new ResizeObserver((b) => {
|
|
1279
1279
|
window.requestAnimationFrame(() => {
|
|
1280
|
-
|
|
1280
|
+
g && (c(Math.round(b[0].contentRect.width) < g.scrollWidth), v(Math.round(b[0].contentRect.width) < g.scrollWidth));
|
|
1281
1281
|
});
|
|
1282
1282
|
});
|
|
1283
|
-
return
|
|
1284
|
-
|
|
1283
|
+
return g && _.observe(g), () => {
|
|
1284
|
+
g && _.unobserve(g);
|
|
1285
1285
|
};
|
|
1286
|
-
}, []), a("div", { className: "ul-card--matrix_question_container", children: [a("div", { className: H("ul-card--matrix_container",
|
|
1286
|
+
}, []), a("div", { className: "ul-card--matrix_question_container", children: [a("div", { className: H("ul-card--matrix_container", h && "ul-matrix-scroll-gradient"), onScroll: () => {
|
|
1287
1287
|
(() => {
|
|
1288
|
-
const
|
|
1289
|
-
|
|
1288
|
+
const g = u.current;
|
|
1289
|
+
g && c(g.clientWidth + Math.abs(g.scrollLeft) < g.scrollWidth);
|
|
1290
1290
|
})();
|
|
1291
|
-
}, ref: u, children: a("div", { className: H(s && "ul-card--matrix_grid_longform", "ul-card--matrix_grid"), style: `--numColumns: ${l}; --numRows: ${d + 1};`, children: [a("div", {}), " ", e.map((
|
|
1292
|
-
|
|
1293
|
-
const
|
|
1294
|
-
if (
|
|
1295
|
-
const
|
|
1296
|
-
|
|
1291
|
+
}, ref: u, children: a("div", { className: H(s && "ul-card--matrix_grid_longform", "ul-card--matrix_grid"), style: `--numColumns: ${l}; --numRows: ${d + 1};`, children: [a("div", {}), " ", e.map((g) => a("div", { className: "ul-matrix-column-label", children: g.label }, g.label)), n.map((g) => a(Y, { children: [a("div", { "aria-label": g.label, className: "ul-matrix-row-label", children: g.label }, g.label), a("div", { className: "ul-matrix-row-options", role: "radiogroup", children: e.map((_, b) => a("div", { className: H("ul-matrix-option-wrapper", b === l - 1 && "ul-matrix-last-option"), children: a(et, { allowTextEntry: !1, ariaLabel: `${g.label}-${_.label}`, border: o, choiceStyle: { background: "transparent", border: "none", marginBottom: "0", padding: "0" }, error: !1, id: `${g.id}-${_.value}`, isRadio: !0, isSelected: r[g.id] === _.value, onUserInputChanged: () => t(g.id, _.value), useMobileStyling: i }) }, _.value)) })] }))] }) }), (h || m) && a("button", { className: m && !h ? "ul-matrix-scroll-arrow left" : "ul-matrix-scroll-arrow", onClick: m && !h ? (g) => {
|
|
1292
|
+
g.preventDefault();
|
|
1293
|
+
const _ = u.current;
|
|
1294
|
+
if (_) {
|
|
1295
|
+
const b = getComputedStyle(_).direction === "rtl";
|
|
1296
|
+
_.scrollTo({ left: b ? _.scrollWidth - _.clientWidth : 0, behavior: "smooth" });
|
|
1297
1297
|
}
|
|
1298
|
-
} : (
|
|
1299
|
-
|
|
1300
|
-
const
|
|
1301
|
-
if (
|
|
1302
|
-
const
|
|
1303
|
-
|
|
1298
|
+
} : (g) => {
|
|
1299
|
+
g.preventDefault();
|
|
1300
|
+
const _ = u.current;
|
|
1301
|
+
if (_) {
|
|
1302
|
+
const b = getComputedStyle(_).direction === "rtl";
|
|
1303
|
+
_.scrollTo({ left: b ? _.clientWidth - _.scrollWidth : _.scrollWidth, behavior: "smooth" });
|
|
1304
1304
|
}
|
|
1305
|
-
}, children: a(
|
|
1306
|
-
},
|
|
1307
|
-
const { useMobileStyling: u, isLongFormSurvey:
|
|
1308
|
-
|
|
1309
|
-
}, k = r.reduce((
|
|
1310
|
-
|
|
1311
|
-
},
|
|
1312
|
-
return a("form", { className: H(e, !
|
|
1313
|
-
|
|
1314
|
-
}, onSubmit:
|
|
1315
|
-
},
|
|
1316
|
-
const { themeColor: o } =
|
|
1305
|
+
}, children: a(m && !h ? gi : fi, {}) })] });
|
|
1306
|
+
}, gi = () => a("svg", { fill: "currentColor", height: "32", transform: "matrix(-1,0,0,1,0,0)", version: "1.1", viewBox: "0 0 256 256", width: "32", xmlns: "http://www.w3.org/2000/svg", children: a("path", { d: "M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z" }) }), fi = () => a("svg", { fill: "currentColor", height: "32", viewBox: "0 0 256 256", width: "32", xmlns: "http://www.w3.org/2000/svg", children: a("path", { d: "M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z" }) }), vi = ({ className: e, message: t, next: n, options: r, properties: o, questionId: i, type: s, showIndividualSubmit: d = !1, onSubmitButtonClick: l }) => {
|
|
1307
|
+
const { useMobileStyling: u, isLongFormSurvey: h, focusedQuestionId: c, setFocusedQuestionId: m } = q((x) => ({ useMobileStyling: x.useMobileStyling, isLongFormSurvey: re(x.studyType), focusedQuestionId: x.focusedQuestionId, setFocusedQuestionId: x.setFocusedQuestionId })), v = o.matrixColumn, g = o.required, _ = h && c === i, b = (x) => {
|
|
1308
|
+
x.preventDefault(), x.stopPropagation(), n({ value: y, questionId: i, type: s }, !0), l && l();
|
|
1309
|
+
}, k = r.reduce((x, R) => (x[R.id] = null, x), {}), [y, j] = z(k), I = (x) => g && Object.values(x).every((R) => R == null), C = (x, R) => {
|
|
1310
|
+
h && n({ value: { ...y, [x]: R }, questionId: i, type: s }, !I({ ...y, [x]: R })), j((N) => ({ ...N, [x]: R }));
|
|
1311
|
+
}, E = o.displayMatrixAsAccordion || u;
|
|
1312
|
+
return a("form", { className: H(e, !h && "ul-card__matrix", "fade-in-transition", h && !_ && "ul-card--unfocused"), id: "text-form", onClick: () => {
|
|
1313
|
+
_ && m(i);
|
|
1314
|
+
}, onSubmit: b, children: [a(se, { message: t, properties: o }), a(pe, { properties: o, defaultBody: () => a(Y, { children: [a(me, { children: [a(E ? mi : hi, { columns: v, onSelect: C, options: r, selectedOptions: y }), d && a(Xe, { handleSubmit: b, isSubmitDisabled: I(y) })] }), !h && a(be, { children: a("div", { className: "ul-card__button-wrapper", children: a(te, { disabled: I(y), children: xe(o) }) }) })] }) })] }, i);
|
|
1315
|
+
}, bi = ({ options: e, selectItem: t, selectedOptions: n, showCheckbox: r }) => {
|
|
1316
|
+
const { themeColor: o } = q((i) => ({ doc: i.viewDocument, themeColor: i.border }));
|
|
1317
1317
|
return a("div", { className: "select-list", children: e.map((i) => {
|
|
1318
1318
|
return a("div", { className: "select-option", onClick: (d) => {
|
|
1319
1319
|
t(i), d.stopPropagation();
|
|
1320
|
-
}, role: "option", children: [r && a(
|
|
1320
|
+
}, role: "option", children: [r && a(Ur, { divId: (s = i.id, `checkbox-div-${s}`), id: i.id, isSelected: n.includes(i), themeColor: o }), i.label] }, i.id);
|
|
1321
1321
|
var s;
|
|
1322
1322
|
}) });
|
|
1323
|
-
},
|
|
1324
|
-
const [s, d] =
|
|
1323
|
+
}, _i = ({ isMultiSelect: e = !1, multiselectText: t = "choices selected", onChange: n, options: r, placeholderText: o, value: i }) => {
|
|
1324
|
+
const [s, d] = z(!1), { viewDocument: l, update: u } = q((m) => ({ viewDocument: m.viewDocument, update: m.update })), h = () => {
|
|
1325
1325
|
d(!s), u();
|
|
1326
1326
|
};
|
|
1327
|
-
|
|
1327
|
+
W(() => {
|
|
1328
1328
|
var v;
|
|
1329
|
-
const
|
|
1329
|
+
const m = () => {
|
|
1330
1330
|
d(!1), u();
|
|
1331
1331
|
};
|
|
1332
|
-
l.addEventListener("click",
|
|
1332
|
+
l.addEventListener("click", m);
|
|
1333
1333
|
try {
|
|
1334
|
-
(v = window.parent) == null || v.addEventListener("click",
|
|
1334
|
+
(v = window.parent) == null || v.addEventListener("click", m);
|
|
1335
1335
|
} catch {
|
|
1336
|
-
window.addEventListener("click",
|
|
1336
|
+
window.addEventListener("click", m);
|
|
1337
1337
|
}
|
|
1338
1338
|
return () => {
|
|
1339
|
-
var
|
|
1340
|
-
l.removeEventListener("click",
|
|
1339
|
+
var g;
|
|
1340
|
+
l.removeEventListener("click", m);
|
|
1341
1341
|
try {
|
|
1342
|
-
(
|
|
1342
|
+
(g = window.parent) == null || g.removeEventListener("click", m);
|
|
1343
1343
|
} catch {
|
|
1344
|
-
window.removeEventListener("click",
|
|
1344
|
+
window.removeEventListener("click", m);
|
|
1345
1345
|
}
|
|
1346
1346
|
};
|
|
1347
1347
|
}, [l, u]);
|
|
1348
1348
|
const c = i.length === 0 ? ["select-button-placeholder"] : [];
|
|
1349
|
-
return a(
|
|
1350
|
-
|
|
1351
|
-
}, type: "button", children: [a("span", { children: i.length === 0 ? o : i.length === 1 ? i[0].label : `${i.length} ${t}` }), a(
|
|
1352
|
-
var
|
|
1353
|
-
const v = i.some((
|
|
1349
|
+
return a(Y, { children: [a("button", { "aria-label": "choice dropdown button", className: H("select-button", ...c), onClick: (m) => {
|
|
1350
|
+
m.stopPropagation(), h();
|
|
1351
|
+
}, type: "button", children: [a("span", { children: i.length === 0 ? o : i.length === 1 ? i[0].label : `${i.length} ${t}` }), a(Rr, {})] }), s && a(bi, { options: r, selectedOptions: i, selectItem: (m) => {
|
|
1352
|
+
var _;
|
|
1353
|
+
const v = i.some((b) => b.id === m.id), g = i.some((b) => {
|
|
1354
1354
|
var k;
|
|
1355
|
-
return (k =
|
|
1355
|
+
return (k = b.optionProperties) == null ? void 0 : k.noneOfTheAbove;
|
|
1356
1356
|
});
|
|
1357
|
-
(
|
|
1357
|
+
(_ = m.optionProperties) != null && _.noneOfTheAbove && !v ? n([m]) : e ? n(v ? i.filter((b) => b.id !== m.id) : g ? [m] : [...i, m]) : v || n([m]), e || h();
|
|
1358
1358
|
}, showCheckbox: e })] });
|
|
1359
|
-
},
|
|
1360
|
-
const { border: u, useMobileStyling:
|
|
1361
|
-
var
|
|
1362
|
-
return (
|
|
1363
|
-
}),
|
|
1364
|
-
var
|
|
1365
|
-
const
|
|
1366
|
-
return ((
|
|
1367
|
-
}))(
|
|
1368
|
-
var
|
|
1369
|
-
return
|
|
1370
|
-
}),
|
|
1371
|
-
var
|
|
1372
|
-
const
|
|
1373
|
-
return a(et, { allowTextEntry:
|
|
1374
|
-
|
|
1375
|
-
}, promptText: "Please specify", text: (
|
|
1376
|
-
}),
|
|
1377
|
-
|
|
1378
|
-
},
|
|
1379
|
-
const
|
|
1380
|
-
if ((
|
|
1381
|
-
else I && !
|
|
1382
|
-
|
|
1383
|
-
const
|
|
1384
|
-
var
|
|
1385
|
-
return
|
|
1386
|
-
}),
|
|
1387
|
-
c && (n(
|
|
1359
|
+
}, $r = ({ className: e, message: t, onSubmit: n, options: r = [], properties: o, questionId: i, type: s, showIndividualSubmit: d = !1, onSubmitButtonClick: l }) => {
|
|
1360
|
+
const { border: u, useMobileStyling: h, isLongFormSurvey: c, focusedQuestionId: m, setFocusedQuestionId: v } = q((p) => ({ border: p.border, useMobileStyling: p.useMobileStyling, isLongFormSurvey: re(p.studyType), focusedQuestionId: p.focusedQuestionId, setFocusedQuestionId: p.setFocusedQuestionId })), g = c && m === i, _ = r.reduce((p, f) => (p[f.id] = { isSelected: !1 }, p), {}), [b, k] = z(_), y = s === "multiplechoice", j = o.required, I = r.find((p) => {
|
|
1361
|
+
var f;
|
|
1362
|
+
return (f = p.optionProperties) == null ? void 0 : f.noneOfTheAbove;
|
|
1363
|
+
}), C = (p) => ((f) => Object.entries(f).some(([w, S]) => {
|
|
1364
|
+
var P;
|
|
1365
|
+
const D = r.find((O) => `${O.id}` === w), L = S.userText === void 0 || S.userText.trim() === "";
|
|
1366
|
+
return ((P = D == null ? void 0 : D.optionProperties) == null ? void 0 : P.allowsTextEntry) && L && S.isSelected;
|
|
1367
|
+
}))(p) || j && !((f) => Object.values(f).some((w) => w.isSelected))(p), E = Object.entries(b).some(([p, f]) => {
|
|
1368
|
+
var w, S;
|
|
1369
|
+
return f.isSelected && ((S = (w = r.find((D) => `${D.id}` === p)) == null ? void 0 : w.optionProperties) == null ? void 0 : S.allowsTextEntry);
|
|
1370
|
+
}), x = d && (!y || E), R = r.map(({ id: p, label: f, value: w, optionProperties: S }) => {
|
|
1371
|
+
var O, F;
|
|
1372
|
+
const D = `${p}`, { allowsTextEntry: L, noneOfTheAbove: P } = { allowsTextEntry: !1, noneOfTheAbove: !1, ...S };
|
|
1373
|
+
return a(et, { allowTextEntry: L, border: u, error: !1, id: D, isRadio: y, isSelected: !!((O = b[D]) != null && O.isSelected), label: f, noneOfTheAbove: P, onUserInputChanged: (B) => {
|
|
1374
|
+
T(B.id, B.selected, B.userText, B.noneOfTheAbove), B.selected && c && !y && !g && v(i);
|
|
1375
|
+
}, promptText: "Please specify", text: (F = b[p]) == null ? void 0 : F.userText, useMobileStyling: h, value: w }, D);
|
|
1376
|
+
}), N = (p) => {
|
|
1377
|
+
p.preventDefault(), p.stopPropagation(), n(b, !0), l && l();
|
|
1378
|
+
}, T = (p, f, w, S) => {
|
|
1379
|
+
const D = Object.assign({}, b);
|
|
1380
|
+
if ((y || S) && f) for (const O of Object.values(D)) O.isSelected = !1, delete O.userText;
|
|
1381
|
+
else I && !S && b[I.id].isSelected && (D[I.id].isSelected = !1);
|
|
1382
|
+
D[p] = { isSelected: f, userText: w };
|
|
1383
|
+
const L = y && Object.entries(D).some(([O, F]) => {
|
|
1384
|
+
var B, V;
|
|
1385
|
+
return F.isSelected && ((V = (B = r.find(($) => `${$.id}` === O)) == null ? void 0 : B.optionProperties) == null ? void 0 : V.allowsTextEntry);
|
|
1386
|
+
}), P = !C(D);
|
|
1387
|
+
c && (n(D, P), y && !L && P && l && l()), k(D);
|
|
1388
1388
|
};
|
|
1389
|
-
return a("form", { className: H(e, "ul-card--multiple", "fade-in-transition", c && !
|
|
1390
|
-
c &&
|
|
1391
|
-
} : void 0, onSubmit:
|
|
1392
|
-
const
|
|
1393
|
-
for (const
|
|
1394
|
-
c && n(
|
|
1395
|
-
}, options: r, placeholderText: o.dropdownPlaceholderText ?? (
|
|
1396
|
-
},
|
|
1397
|
-
const { questionId: t, type: n, next: r, options: o } = e, { setFocusedQuestionId: i } =
|
|
1398
|
-
return a(
|
|
1389
|
+
return a("form", { className: H(e, "ul-card--multiple", "fade-in-transition", c && !g && "ul-card--unfocused"), id: "text-form", onClick: s === "multipleselect" ? () => {
|
|
1390
|
+
c && m !== i && s === "multipleselect" && v(i);
|
|
1391
|
+
} : void 0, onSubmit: N, children: [a(se, { message: t, properties: o }), a(pe, { properties: o, defaultBody: () => a(Y, { children: [a(me, { children: [o.isDropdown ? a(_i, { isMultiSelect: !y, multiselectText: o.dropdownMultiselectedText ?? "choices selected", onChange: (p) => {
|
|
1392
|
+
const f = { ...b };
|
|
1393
|
+
for (const w of r) p.includes(w) ? f[w.id].isSelected = !0 : f[w.id].isSelected = !1;
|
|
1394
|
+
c && n(f, !C(f)), k(f);
|
|
1395
|
+
}, options: r, placeholderText: o.dropdownPlaceholderText ?? (y ? "Select choice" : "Select choice(s)"), value: r.filter((p) => b[p.id].isSelected) }) : a("div", { className: H(X("ul-card__choices", h)), role: y ? "radiogroup" : "group", children: R }), x && a(Xe, { handleSubmit: N, isSubmitDisabled: C(b) })] }), !c && a(be, { children: a("div", { className: "ul-card__button-wrapper", children: a(te, { disabled: C(b), onClick: N, children: xe(o) }) }) })] }) })] }, i);
|
|
1396
|
+
}, yi = (e) => {
|
|
1397
|
+
const { questionId: t, type: n, next: r, options: o } = e, { setFocusedQuestionId: i } = q((s) => ({ setFocusedQuestionId: s.setFocusedQuestionId }));
|
|
1398
|
+
return a($r, { ...e, onSubmit: (s, d) => {
|
|
1399
1399
|
var v;
|
|
1400
|
-
const l = Object.entries(s).find(([,
|
|
1401
|
-
!((v = c == null ? void 0 : c.optionProperties) != null && v.allowsTextEntry) ||
|
|
1402
|
-
const
|
|
1403
|
-
r({ value: c && u ? { [u]: c.value } : {}, secondaryValue:
|
|
1400
|
+
const l = Object.entries(s).find(([, g]) => g.isSelected) || [void 0, void 0], [u, h] = l, c = o.find((g) => `${g.id}` === u);
|
|
1401
|
+
!((v = c == null ? void 0 : c.optionProperties) != null && v.allowsTextEntry) || h != null && h.userText && h.userText.trim() !== "" || i(t);
|
|
1402
|
+
const m = h != null && h.userText ? { [u]: { userText: h.userText } } : null;
|
|
1403
|
+
r({ value: c && u ? { [u]: c.value } : {}, secondaryValue: m, questionId: t, type: n }, d);
|
|
1404
1404
|
} });
|
|
1405
|
-
},
|
|
1405
|
+
}, xi = (e) => {
|
|
1406
1406
|
const { questionId: t, type: n, next: r } = e;
|
|
1407
|
-
return a(
|
|
1408
|
-
const s = Object.entries(o).reduce((l, [u,
|
|
1409
|
-
if (!
|
|
1407
|
+
return a($r, { ...e, onSubmit: (o, i) => {
|
|
1408
|
+
const s = Object.entries(o).reduce((l, [u, h]) => (l[u] = h.isSelected, l), {}), d = Object.entries(o).reduce((l, [u, h]) => {
|
|
1409
|
+
if (!h.userText) return l;
|
|
1410
1410
|
const c = l || {};
|
|
1411
|
-
return c[u] = { userText:
|
|
1411
|
+
return c[u] = { userText: h.userText }, c;
|
|
1412
1412
|
}, null);
|
|
1413
1413
|
r({ value: s, secondaryValue: d, questionId: t, type: n }, i);
|
|
1414
1414
|
} });
|
|
1415
|
-
},
|
|
1416
|
-
const [d, l] =
|
|
1417
|
-
|
|
1418
|
-
}, onKeyDown: (
|
|
1419
|
-
var
|
|
1420
|
-
const
|
|
1421
|
-
|
|
1422
|
-
}, onPointerDown: (
|
|
1423
|
-
|
|
1424
|
-
}, onPointerLeave: (
|
|
1425
|
-
|
|
1426
|
-
}, style: d === I ? { backgroundColor: u, color: "#fff" } : void 0, tabIndex: 0, children: I }, I)),
|
|
1427
|
-
|
|
1415
|
+
}, ki = ({ className: e, labels: t, message: n, properties: r, next: o, questionId: i, type: s }) => {
|
|
1416
|
+
const [d, l] = z(null), { border: u, useMobileStyling: h, viewDocument: c, isLongFormSurvey: m, focusedQuestionId: v } = q((j) => ({ border: j.border, useMobileStyling: j.useMobileStyling, viewDocument: j.viewDocument, isLongFormSurvey: re(j.studyType), focusedQuestionId: j.focusedQuestionId })), g = m && v === i, _ = t && t.left, b = t && t.right, k = [...Array(11)].map((j, I) => a("button", { className: H(X("nps-number", h), X(`nps-number-${I}`, h)), id: `option-${I}`, onClick: (C) => {
|
|
1417
|
+
m && (C.preventDefault(), C.stopPropagation(), l(I)), o({ value: I, questionId: i, type: s }, !0);
|
|
1418
|
+
}, onKeyDown: (C) => {
|
|
1419
|
+
var x, R;
|
|
1420
|
+
const E = c.querySelectorAll("button.nps-number");
|
|
1421
|
+
C.key === "ArrowRight" ? (x = E[I + 1]) == null || x.focus() : C.key === "ArrowLeft" ? (R = E[I - 1]) == null || R.focus() : C.key !== "Enter" && C.key !== " " || (m && (C.preventDefault(), C.stopPropagation(), l(I)), o({ value: I, questionId: i, type: s }, !0));
|
|
1422
|
+
}, onPointerDown: (C) => {
|
|
1423
|
+
C.currentTarget.style.zIndex = "2", C.currentTarget.style.borderColor = u;
|
|
1424
|
+
}, onPointerLeave: (C) => {
|
|
1425
|
+
C.currentTarget.style.zIndex = "auto", C.currentTarget.style.borderColor = It;
|
|
1426
|
+
}, style: d === I ? { backgroundColor: u, color: "#fff" } : void 0, tabIndex: 0, children: I }, I)), y = (j) => {
|
|
1427
|
+
j.preventDefault(), j.stopPropagation(), o({ value: null, questionId: i, type: s }, !0);
|
|
1428
1428
|
};
|
|
1429
|
-
return a("form", { className: H(e, "ul-card--nps", "fade-in-transition",
|
|
1430
|
-
},
|
|
1431
|
-
const { border: l, useMobileStyling: u, update:
|
|
1432
|
-
|
|
1433
|
-
var
|
|
1434
|
-
c && !
|
|
1435
|
-
}, [c,
|
|
1436
|
-
const
|
|
1437
|
-
const { value:
|
|
1438
|
-
if (
|
|
1439
|
-
const
|
|
1440
|
-
n({ value:
|
|
1429
|
+
return a("form", { className: H(e, "ul-card--nps", "fade-in-transition", m && !g && "ul-card--unfocused"), children: [a(se, { message: n, properties: r }), a(pe, { properties: r, defaultBody: () => a(Y, { children: [a(me, { children: [a("div", { className: "ul-card--nps__numbers", children: k }), a("div", { className: "ul-card--nps__labels", children: [a("span", { children: _ }), a("span", { children: b })] })] }), !r.required && !m && a(be, { children: a("div", { className: "ul-vertical-centered-container", children: a(te, { onClick: y, children: xe(r) }) }) })] }) })] }, i);
|
|
1430
|
+
}, wi = ({ className: e, message: t, next: n, properties: r, questionId: o, type: i, showIndividualSubmit: s = !1, onSubmitButtonClick: d }) => {
|
|
1431
|
+
const { border: l, useMobileStyling: u, update: h, isLongFormSurvey: c, focusedQuestionId: m, setFocusedQuestionId: v, isPreview: g } = q((p) => ({ border: p.border, useMobileStyling: p.useMobileStyling, update: p.update, isLongFormSurvey: re(p.studyType), focusedQuestionId: p.focusedQuestionId, setFocusedQuestionId: p.setFocusedQuestionId, isPreview: p.isPreview })), [_, b] = z(""), k = ee(null), y = c && m === o;
|
|
1432
|
+
W(() => {
|
|
1433
|
+
var p, f;
|
|
1434
|
+
c && !g && (y ? (p = k.current) == null || p.focus() : (f = k.current) == null || f.blur());
|
|
1435
|
+
}, [c, y, g]);
|
|
1436
|
+
const j = _.trim(), I = r.required === !0 && !j, C = Hr(k, () => h()), E = (p) => {
|
|
1437
|
+
const { value: f } = p.currentTarget;
|
|
1438
|
+
if (C(), p.preventDefault(), p.stopPropagation(), b(f), c) {
|
|
1439
|
+
const w = f.trim().length > 0;
|
|
1440
|
+
n({ value: f, questionId: o, type: i }, w);
|
|
1441
1441
|
}
|
|
1442
|
-
},
|
|
1443
|
-
|
|
1444
|
-
},
|
|
1445
|
-
|
|
1446
|
-
},
|
|
1447
|
-
|
|
1442
|
+
}, x = (p) => {
|
|
1443
|
+
p.preventDefault(), p.stopPropagation(), n({ value: _, questionId: o, type: i }, j.length > 0), d && d();
|
|
1444
|
+
}, R = r && r.openTextPlaceholder ? r.openTextPlaceholder : "", N = (p) => {
|
|
1445
|
+
p.currentTarget.style.borderColor = l, v(o);
|
|
1446
|
+
}, T = (p) => {
|
|
1447
|
+
p.currentTarget.style.borderColor = It;
|
|
1448
1448
|
};
|
|
1449
|
-
return a("form", { className: H(e, "ul-card-text", "fade-in-transition", c && !
|
|
1450
|
-
c &&
|
|
1451
|
-
}, children: [a(se, { message: t, properties: r }), a(pe, { defaultBody: () => a("div", { className: "ul-card-text", children:
|
|
1452
|
-
},
|
|
1453
|
-
const
|
|
1454
|
-
|
|
1455
|
-
},
|
|
1456
|
-
|
|
1457
|
-
},
|
|
1458
|
-
const
|
|
1459
|
-
|
|
1460
|
-
},
|
|
1461
|
-
|
|
1462
|
-
}, { left:
|
|
1463
|
-
|
|
1464
|
-
},
|
|
1465
|
-
|
|
1466
|
-
},
|
|
1467
|
-
|
|
1449
|
+
return a("form", { className: H(e, "ul-card-text", "fade-in-transition", c && !y && "ul-card--unfocused"), id: "text-form", onClick: () => {
|
|
1450
|
+
c && m !== o && v(o);
|
|
1451
|
+
}, children: [a(se, { message: t, properties: r }), a(pe, { defaultBody: () => a("div", { className: "ul-card-text", children: a(me, { children: [a("div", { className: "ul-card-text__container", children: a("textarea", { "aria-describedby": "ul-caption", "aria-labelledby": "ul-question", "aria-multiline": "true", "aria-placeholder": R, className: H(X("ul-card-text__input", u)), "data-gramm": "false", maxLength: 5e3, name: "text", onBlur: T, onChange: E, onFocus: N, placeholder: R, ref: k, role: "textbox", tabIndex: 0 }) }), r.footerHtml && a("div", { className: "footer", dangerouslySetInnerHTML: { __html: r.footerHtml } }), s && a(Xe, { handleSubmit: x, isSubmitDisabled: I }), a(be, { children: !c && a(te, { disabled: I, onClick: x, children: xe(r) }) })] }) }), properties: r })] }, o);
|
|
1452
|
+
}, Ci = ({ className: e, labels: t, message: n, next: r, properties: o, questionId: i, type: s, onSubmitButtonClick: d, options: l, showIndividualSubmit: u = !1 }) => {
|
|
1453
|
+
const h = ee(null), [c, m] = z(() => (o == null ? void 0 : o.required) === !0), [v, g] = z(() => l.map((S) => ({ ...S, rank: null }))), _ = de(() => Array.from({ length: l.length }, (S, D) => D + 1), [l.length]), { isLongFormSurvey: b, focusedQuestionId: k, setFocusedQuestionId: y } = q((S) => ({ useMobileStyling: S.useMobileStyling, border: S.border, isLongFormSurvey: re(S.studyType), focusedQuestionId: S.focusedQuestionId, setFocusedQuestionId: S.setFocusedQuestionId })), j = b && k === i, I = (S) => {
|
|
1454
|
+
S.preventDefault(), E(v), d && d();
|
|
1455
|
+
}, C = (S) => {
|
|
1456
|
+
S.preventDefault(), S.dataTransfer && (S.dataTransfer.dropEffect = "move");
|
|
1457
|
+
}, E = (S) => {
|
|
1458
|
+
const D = {};
|
|
1459
|
+
S.reduce((L, P) => (L[P.id] = P.rank, L), D), r({ value: D, questionId: i, type: s }, !0);
|
|
1460
|
+
}, x = (S) => {
|
|
1461
|
+
m(!1), b && E(S);
|
|
1462
|
+
}, { left: R, right: N } = t, T = l.length, p = (S) => {
|
|
1463
|
+
S.preventDefault(), S.currentTarget.classList.add("is-drop-target");
|
|
1464
|
+
}, f = (S) => {
|
|
1465
|
+
S.currentTarget.classList.remove("is-drop-target");
|
|
1466
|
+
}, w = (S) => {
|
|
1467
|
+
h.current = null, S.currentTarget.classList.remove("is-dragging");
|
|
1468
1468
|
};
|
|
1469
|
-
return a("form", { className: H(e, "ul-card-rank", "fade-in-transition",
|
|
1470
|
-
|
|
1471
|
-
}, onSubmit: I, children: [a(se, { message: n, properties: o }), a(pe, { properties: o, defaultBody: () => a(
|
|
1472
|
-
return a("li", { className: "ul-card-rank__option", draggable: !0, onDragEnd:
|
|
1473
|
-
|
|
1474
|
-
}), onDrop: (
|
|
1475
|
-
var
|
|
1476
|
-
|
|
1477
|
-
const
|
|
1478
|
-
|
|
1479
|
-
const
|
|
1480
|
-
return
|
|
1481
|
-
|
|
1482
|
-
}),
|
|
1469
|
+
return a("form", { className: H(e, "ul-card-rank", "fade-in-transition", b && !j && "ul-card--unfocused"), onClick: () => {
|
|
1470
|
+
b && k !== i && y(i);
|
|
1471
|
+
}, onSubmit: I, children: [a(se, { message: n, properties: o }), a(pe, { properties: o, defaultBody: () => a(Y, { children: [a(me, { children: [a("div", { className: "ul-card--rank__question-inner-container", children: [a("div", { className: "ul-card-rank__labels", children: a("span", { children: ["1 - ", R] }) }), a("ol", { className: "ul-card-rank__list", onDragOver: C, children: v.map(({ id: S, label: D, rank: L }, P) => {
|
|
1472
|
+
return a("li", { className: "ul-card-rank__option", draggable: !0, onDragEnd: w, onDragEnter: p, onDragLeave: f, onDragStart: (F = P, (B) => {
|
|
1473
|
+
h.current = F, B.dataTransfer && (B.dataTransfer.effectAllowed = "move", B.dataTransfer.setData("text/plain", String(F)), B.currentTarget.classList.add("is-dragging"));
|
|
1474
|
+
}), onDrop: (O = P, (B) => {
|
|
1475
|
+
var $, J;
|
|
1476
|
+
B.preventDefault(), B.currentTarget.classList.remove("is-drop-target");
|
|
1477
|
+
const V = h.current;
|
|
1478
|
+
h.current = null, (J = ($ = B.currentTarget.closest(".ul-card-rank__list")) == null ? void 0 : $.querySelector(".is-dragging")) == null || J.classList.remove("is-dragging"), V != null && V !== O && g((Z) => {
|
|
1479
|
+
const K = Z.map((_e) => ({ ..._e })), [De] = K.splice(V, 1);
|
|
1480
|
+
return K.splice(O, 0, De), K.forEach((_e, G) => {
|
|
1481
|
+
_e.rank = G + 1;
|
|
1482
|
+
}), x(K), K;
|
|
1483
1483
|
});
|
|
1484
|
-
}), children: [a("select", { "aria-label": `Rank for ${
|
|
1485
|
-
|
|
1486
|
-
const
|
|
1487
|
-
|
|
1488
|
-
const De =
|
|
1489
|
-
if (De === -1) return
|
|
1490
|
-
const
|
|
1491
|
-
return
|
|
1492
|
-
|
|
1493
|
-
}) :
|
|
1494
|
-
|
|
1495
|
-
}),
|
|
1484
|
+
}), children: [a("select", { "aria-label": `Rank for ${D}`, className: H("ul-card-rank__select", L == null && "ul-card-rank__select--placeholder"), name: `rank[${S}]`, onChange: (B) => ((V, $) => {
|
|
1485
|
+
g((J) => {
|
|
1486
|
+
const Z = parseInt($), K = J.map((G) => ({ ...G }));
|
|
1487
|
+
K.some((G) => G.rank == null) && K.forEach((G, rt) => G.rank = rt + 1);
|
|
1488
|
+
const De = K.findIndex((G) => G.id === V);
|
|
1489
|
+
if (De === -1) return J;
|
|
1490
|
+
const _e = K[De].rank;
|
|
1491
|
+
return Z < _e ? K.forEach((G) => {
|
|
1492
|
+
G.id !== V && G.rank >= Z && G.rank < _e && (G.rank = G.rank + 1);
|
|
1493
|
+
}) : Z > _e && K.forEach((G) => {
|
|
1494
|
+
G.id !== V && G.rank > _e && G.rank <= Z && (G.rank = G.rank - 1);
|
|
1495
|
+
}), K[De].rank = Z, K.sort((G, rt) => G.rank - rt.rank), x(K), K;
|
|
1496
1496
|
});
|
|
1497
|
-
})(
|
|
1498
|
-
var
|
|
1499
|
-
}) }), a("div", { className: "ul-card-rank__labels", children: a("span", { children: [
|
|
1500
|
-
},
|
|
1501
|
-
const { isLongFormSurvey: i } =
|
|
1497
|
+
})(S, B.currentTarget.value), value: L ?? "", children: [L == null && a("option", { className: "ul-card-rank__select-option", disabled: !0, value: "", children: "-" }), _.map((B) => a("option", { className: "ul-card-rank__select-option", value: B, children: B }, B))] }), a("span", { children: D }), a("button", { "aria-label": `Drag ${D} to reorder`, className: "ul-card-rank__drag-btn", title: "Drag to reorder", type: "button", children: a("svg", { fill: "none", height: "17", viewBox: "0 0 16 17", width: "16", xmlns: "http://www.w3.org/2000/svg", children: a("path", { d: "M5.75 11.625C6.37132 11.625 6.875 12.1287 6.875 12.75C6.875 13.3713 6.37132 13.875 5.75 13.875C5.12868 13.875 4.625 13.3713 4.625 12.75C4.625 12.1287 5.12868 11.625 5.75 11.625ZM10.25 11.625C10.8713 11.625 11.375 12.1287 11.375 12.75C11.375 13.3713 10.8713 13.875 10.25 13.875C9.62868 13.875 9.125 13.3713 9.125 12.75C9.125 12.1287 9.62868 11.625 10.25 11.625ZM5.75 7.375C6.37132 7.375 6.875 7.87868 6.875 8.5C6.875 9.12132 6.37132 9.625 5.75 9.625C5.12868 9.625 4.625 9.12132 4.625 8.5C4.625 7.87868 5.12868 7.375 5.75 7.375ZM10.25 7.375C10.8713 7.375 11.375 7.87868 11.375 8.5C11.375 9.12132 10.8713 9.625 10.25 9.625C9.62868 9.625 9.125 9.12132 9.125 8.5C9.125 7.87868 9.62868 7.375 10.25 7.375ZM5.75 3.125C6.37132 3.125 6.875 3.62868 6.875 4.25C6.875 4.87132 6.37132 5.375 5.75 5.375C5.12868 5.375 4.625 4.87132 4.625 4.25C4.625 3.62868 5.12868 3.125 5.75 3.125ZM10.25 3.125C10.8713 3.125 11.375 3.62868 11.375 4.25C11.375 4.87132 10.8713 5.375 10.25 5.375C9.62868 5.375 9.125 4.87132 9.125 4.25C9.125 3.62868 9.62868 3.125 10.25 3.125Z", fill: "currentColor" }) }) })] }, S);
|
|
1498
|
+
var O, F;
|
|
1499
|
+
}) }), a("div", { className: "ul-card-rank__labels", children: a("span", { children: [T, " - ", N] }) })] }), u && a(Xe, { handleSubmit: I, isSubmitDisabled: c })] }), !b && a(be, { children: a("div", { className: "ul-card__button-wrapper", children: a(te, { disabled: c, children: xe(o) }) }) })] }) })] }, i);
|
|
1500
|
+
}, Si = /* @__PURE__ */ new Set(["open", "matrix", "multipleselect", "multiplechoice", "rankorder"]), En = ({ cardInstance: e, moveToNextQuestion: t, showIndividualSubmit: n, submitQuestion: r, updateCardValues: o }) => {
|
|
1501
|
+
const { isLongFormSurvey: i } = q((m) => ({ isLongFormSurvey: re(m.studyType) }));
|
|
1502
1502
|
if (!e) return null;
|
|
1503
|
-
const { name: s, type: d, props: l } = e, u = n &&
|
|
1504
|
-
o(
|
|
1503
|
+
const { name: s, type: d, props: l } = e, u = n && Si.has(d), h = { className: "ul-card", next: (m, v) => r(m, v), questionId: s, type: d, showIndividualSubmit: n, ...u ? { next: (m, v) => {
|
|
1504
|
+
o(m.questionId, m, v ?? !0);
|
|
1505
1505
|
}, onSubmitButtonClick: () => t(s) } : {} }, c = (() => {
|
|
1506
1506
|
switch (d) {
|
|
1507
1507
|
case "consentlegal":
|
|
1508
|
-
return a(
|
|
1508
|
+
return a(li, { ...h, ...l });
|
|
1509
1509
|
case "likert":
|
|
1510
|
-
return a(
|
|
1510
|
+
return a(ui, { ...h, ...l });
|
|
1511
1511
|
case "matrix":
|
|
1512
|
-
return a(
|
|
1512
|
+
return a(vi, { ...h, ...l });
|
|
1513
1513
|
case "multiplechoice":
|
|
1514
|
-
return a(
|
|
1514
|
+
return a(yi, { ...h, ...l });
|
|
1515
1515
|
case "multipleselect":
|
|
1516
|
-
return a(
|
|
1516
|
+
return a(xi, { ...h, ...l });
|
|
1517
1517
|
case "nps":
|
|
1518
|
-
return a(
|
|
1518
|
+
return a(ki, { ...h, ...l });
|
|
1519
1519
|
case "open":
|
|
1520
|
-
return a(
|
|
1520
|
+
return a(wi, { ...h, ...l });
|
|
1521
1521
|
case "rankorder":
|
|
1522
|
-
return a(
|
|
1522
|
+
return a(Ci, { ...h, ...l });
|
|
1523
1523
|
case "recordedtask":
|
|
1524
|
-
return a(
|
|
1524
|
+
return a(Bi, { ...h, ...l });
|
|
1525
1525
|
case "texturlprompt":
|
|
1526
|
-
return a(
|
|
1526
|
+
return a(Ai, { ...h, ...l });
|
|
1527
1527
|
case "thanks":
|
|
1528
|
-
return a(
|
|
1528
|
+
return a(Fi, { ...h, ...l });
|
|
1529
1529
|
case "uploading":
|
|
1530
|
-
return a(
|
|
1530
|
+
return a(Ki, { ...h, ...l });
|
|
1531
1531
|
case "videovoice":
|
|
1532
|
-
return a(
|
|
1532
|
+
return a(Gi, { ...h, ...l });
|
|
1533
1533
|
default:
|
|
1534
1534
|
return null;
|
|
1535
1535
|
}
|
|
1536
1536
|
})();
|
|
1537
1537
|
return c ? i ? a("div", { className: "ul-card-scroll-wrapper", children: c }, s) : c : null;
|
|
1538
|
-
},
|
|
1538
|
+
}, Ei = ({ isSubmitDisabled: e = !1, onSubmit: t, buttonText: n }) => {
|
|
1539
1539
|
var v;
|
|
1540
|
-
const { cards: r, forceBrandedLogo: o, index: i, marketingUrl: s, showSurveyBrand: d, slugName: l, surveyId: u, useMobileStyling:
|
|
1541
|
-
return a("footer", { className: H("long-form-question-footer-container",
|
|
1542
|
-
},
|
|
1543
|
-
var
|
|
1544
|
-
const
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1540
|
+
const { cards: r, forceBrandedLogo: o, index: i, marketingUrl: s, showSurveyBrand: d, slugName: l, surveyId: u, useMobileStyling: h } = q((g) => ({ cards: g.cards, forceBrandedLogo: g.forceBrandedLogo, index: g.index, marketingUrl: g.marketingUrl, showSurveyBrand: g.showSurveyBrand, slugName: g.slugName, surveyId: g.surveyId, useMobileStyling: g.useMobileStyling })), c = ((v = r[i]) == null ? void 0 : v.type) === "thanks", m = Vr({ marketingUrl: s, slugName: l, surveyId: u, forceBrandedLogo: o });
|
|
1541
|
+
return a("footer", { className: H("long-form-question-footer-container", h && "long-form-question-footer-container--mobile", c && "long-form-question-footer-container-center"), children: [c && o ? a(Fr, { marketingUrlLink: m }) : a("div", { className: "long-form-question-footer-container-logo", children: d ? a(Ar, { forceBrandedLogo: o, marketingUrlLink: m }) : null }), !c && a("div", { className: H("ul-card__button-wrapper", "ul-card-vertical__button-wrapper", "long-form-question-footer-container-actions"), children: a(te, { className: H("long-form-button", e && "sprig-button-disabled"), disabled: e, onClick: t, children: a("span", { className: "long-form-button-text-container", children: n ?? a(Ht, { stroke: "white" }) }) }) })] });
|
|
1542
|
+
}, Ii = /<piped-value\b([^>]*)>.*?<\/piped-value>/gi, In = ["questionHtml", "captionHtml", "footerHtml"], Qr = (e) => !!e.props && typeof e.props == "object" && "properties" in e.props, ct = (e) => !!e.props && typeof e.props == "object" && "options" in e.props && Array.isArray(e.props.options), jn = (e) => ["string", "number"].includes(typeof e), Tn = (e) => e.length === 0 ? "" : e.length === 1 ? e[0] : e.join(", "), ji = (e) => {
|
|
1543
|
+
var n, r;
|
|
1544
|
+
const t = ((o) => o != null && typeof o == "object" && "value" in o)(e) ? e.value : void 0;
|
|
1545
|
+
if (t != null) {
|
|
1546
|
+
if (e.type === "multipleselect" && ct(e) && ((o) => !!o && typeof o == "object" && !Array.isArray(o))(t)) {
|
|
1547
|
+
const o = e.secondaryValue ?? null, i = e.props.options.filter((s) => t[String(s.id)] === !0).map((s) => {
|
|
1548
|
+
var d;
|
|
1549
|
+
return s.label + ((d = o == null ? void 0 : o[String(s.id)]) != null && d.userText ? `: ${o[String(s.id)].userText}` : "");
|
|
1550
|
+
});
|
|
1551
|
+
return i.length ? Tn(i) : "No options selected";
|
|
1552
|
+
}
|
|
1553
|
+
if (e.type === "multiplechoice" && typeof t == "object" && t !== null) {
|
|
1554
|
+
const o = e.secondaryValue ?? null, i = Object.keys(t)[0];
|
|
1555
|
+
if (i) {
|
|
1556
|
+
const s = e.props.options.find((d) => String(d.id) === i);
|
|
1557
|
+
return (s == null ? void 0 : s.label) + ((n = o == null ? void 0 : o[i]) != null && n.userText ? `: ${(r = o == null ? void 0 : o[i]) == null ? void 0 : r.userText}` : "");
|
|
1558
|
+
}
|
|
1559
|
+
}
|
|
1560
|
+
if (e.type === "matrix" && ct(e) && ((o) => {
|
|
1561
|
+
if (!Qr(o)) return !1;
|
|
1562
|
+
const i = o.props.properties;
|
|
1563
|
+
return !!i && typeof i == "object" && "matrixColumn" in i;
|
|
1564
|
+
})(e)) {
|
|
1565
|
+
const o = e.props.options, i = e.props.properties.matrixColumn, s = [];
|
|
1566
|
+
for (const [d, l] of Object.entries(t)) {
|
|
1567
|
+
const u = o.find((g) => String(g.id) === d), h = (u == null ? void 0 : u.label) ?? d, c = jn(l) ? String(l) : JSON.stringify(l), m = i.find((g) => g.value === c), v = (m == null ? void 0 : m.label) ?? c;
|
|
1568
|
+
s.push(`${h}: ${v}`);
|
|
1569
|
+
}
|
|
1570
|
+
return s.join("; ");
|
|
1571
|
+
}
|
|
1572
|
+
if (e.type === "rankorder" && ct(e)) {
|
|
1573
|
+
const o = e.props.options.reduce((s, d) => (s[String(d.id)] = d.label, s), {}), i = [];
|
|
1574
|
+
for (const [s, d] of Object.entries(t)) {
|
|
1575
|
+
const l = o[s];
|
|
1576
|
+
l && (i[d - 1] = l);
|
|
1577
|
+
}
|
|
1578
|
+
return Tn(i);
|
|
1579
|
+
}
|
|
1580
|
+
if (jn(t)) {
|
|
1581
|
+
const o = String(t).replaceAll(/[\u200B-\u200D\uFEFF]/g, "").trim();
|
|
1582
|
+
return o === "" ? void 0 : o;
|
|
1583
|
+
}
|
|
1584
|
+
try {
|
|
1585
|
+
return JSON.stringify(t);
|
|
1586
|
+
} catch {
|
|
1587
|
+
return String(t);
|
|
1588
|
+
}
|
|
1589
|
+
}
|
|
1590
|
+
}, Ln = (e, t) => {
|
|
1591
|
+
const n = new RegExp(`${t}="([^"]*)"`, "i").exec(e);
|
|
1592
|
+
return (n == null ? void 0 : n[1]) ?? null;
|
|
1593
|
+
}, Ti = (e, t) => {
|
|
1594
|
+
if (e == null) return e;
|
|
1595
|
+
let n = !1;
|
|
1596
|
+
const r = e.replace(Ii, (o, i) => {
|
|
1597
|
+
n = !0;
|
|
1598
|
+
const s = Ln(i, "answer-id"), d = Ln(i, "fallback-text") ?? "", l = s ? Number(s) : Number.NaN;
|
|
1599
|
+
if (Number.isFinite(l) && Object.hasOwn(t, l)) {
|
|
1600
|
+
const u = t[l];
|
|
1601
|
+
return String(u);
|
|
1602
|
+
}
|
|
1603
|
+
return d;
|
|
1604
|
+
});
|
|
1605
|
+
return n ? r : e;
|
|
1606
|
+
}, Wr = (e) => {
|
|
1607
|
+
const t = {};
|
|
1608
|
+
for (const n of e) {
|
|
1609
|
+
const r = ji(n);
|
|
1610
|
+
r !== void 0 && (t[n.name] = r);
|
|
1611
|
+
}
|
|
1612
|
+
return t;
|
|
1613
|
+
}, Li = ({ cards: e, next: t, previousResponses: n }) => {
|
|
1614
|
+
var T;
|
|
1615
|
+
const [r, o] = z({}), [i, s] = z({}), d = de(() => ({ ...n, ...Wr(e.map((p) => {
|
|
1616
|
+
var f, w;
|
|
1617
|
+
return { ...p, value: ((f = r[p.name]) == null ? void 0 : f.value) ?? null, secondaryValue: ((w = r[p.name]) == null ? void 0 : w.secondaryValue) ?? null };
|
|
1618
|
+
})) }), [n, r, e]), l = (u = d, e.map((p) => {
|
|
1619
|
+
if (!Qr(p) || p.props.properties === void 0 || p.props.properties === null) return p;
|
|
1620
|
+
const f = p.props.properties;
|
|
1621
|
+
if (f === null || typeof f != "object" || !In.some((D) => D in f)) return p;
|
|
1622
|
+
let w = !1;
|
|
1623
|
+
const S = {};
|
|
1624
|
+
for (const D of In) {
|
|
1625
|
+
const L = f[D];
|
|
1626
|
+
if (L !== void 0) {
|
|
1627
|
+
const P = Ti(L, u);
|
|
1628
|
+
S[D] = P, P !== L && (w = !0);
|
|
1629
|
+
}
|
|
1630
|
+
}
|
|
1631
|
+
return w ? { ...p, props: { ...p.props, properties: { ...f, ...S } } } : p;
|
|
1632
|
+
}));
|
|
1633
|
+
var u;
|
|
1634
|
+
const { isLongFormSurvey: h, focusedQuestionId: c, setFocusedQuestionId: m } = q((p) => ({ isLongFormSurvey: re(p.studyType), focusedQuestionId: p.focusedQuestionId, setFocusedQuestionId: p.setFocusedQuestionId })), v = ee(null), g = ee(!1), _ = ee(null), b = Se((p) => {
|
|
1635
|
+
var D, L;
|
|
1636
|
+
g.current = !0;
|
|
1637
|
+
const f = e.findIndex((P) => P.name === p);
|
|
1638
|
+
if (!h || p === null || f === -1) return void (g.current = !1);
|
|
1639
|
+
const w = (D = v.current) == null ? void 0 : D.querySelectorAll(".ul-card-scroll-wrapper")[f], S = (L = v.current) == null ? void 0 : L.closest(".ul-card__container");
|
|
1640
|
+
if (w && S) {
|
|
1641
|
+
if (w && S) {
|
|
1642
|
+
const P = w.getBoundingClientRect(), O = S.getBoundingClientRect(), F = P.top - O.top + S.scrollTop, B = F + P.height / 2, V = window.innerHeight - 157;
|
|
1643
|
+
let $;
|
|
1644
|
+
P.height >= V ? $ = F : $ = B - S.clientHeight / 2;
|
|
1645
|
+
const J = S.clientHeight, Z = S.scrollHeight - J, K = Math.max(0, Math.min($, Z));
|
|
1646
|
+
S.scrollTo({ top: K, behavior: "smooth" }), setTimeout(() => {
|
|
1647
|
+
g.current = !1;
|
|
1558
1648
|
}, 500);
|
|
1559
1649
|
}
|
|
1560
|
-
} else
|
|
1561
|
-
}, [
|
|
1562
|
-
function
|
|
1563
|
-
return
|
|
1650
|
+
} else g.current = !1;
|
|
1651
|
+
}, [h, e]);
|
|
1652
|
+
function k(p, f) {
|
|
1653
|
+
return p.map((w) => f[w.name]);
|
|
1564
1654
|
}
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
}, [e,
|
|
1568
|
-
const
|
|
1569
|
-
if (!
|
|
1570
|
-
const
|
|
1571
|
-
if (
|
|
1572
|
-
const
|
|
1573
|
-
|
|
1574
|
-
} else
|
|
1655
|
+
W(() => {
|
|
1656
|
+
c !== null && e.findIndex((p) => p.name === c) !== -1 || m(e[0].name);
|
|
1657
|
+
}, [e, c, m]);
|
|
1658
|
+
const y = (p) => {
|
|
1659
|
+
if (!h) return;
|
|
1660
|
+
const f = e.findIndex((w) => w.name === p) + 1;
|
|
1661
|
+
if (f < e.length) {
|
|
1662
|
+
const w = e[f].name;
|
|
1663
|
+
m(w);
|
|
1664
|
+
} else m(p);
|
|
1575
1665
|
};
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
}, [
|
|
1579
|
-
const
|
|
1580
|
-
var
|
|
1581
|
-
if (
|
|
1582
|
-
const
|
|
1583
|
-
if (!
|
|
1584
|
-
const
|
|
1585
|
-
if (!
|
|
1586
|
-
const
|
|
1587
|
-
let
|
|
1588
|
-
|
|
1589
|
-
const
|
|
1590
|
-
|
|
1666
|
+
W(() => {
|
|
1667
|
+
h && c !== null && (_.current !== c ? b(c) : _.current = null);
|
|
1668
|
+
}, [c, h, b]);
|
|
1669
|
+
const j = Se(() => {
|
|
1670
|
+
var O, F;
|
|
1671
|
+
if (g.current) return;
|
|
1672
|
+
const p = (O = v.current) == null ? void 0 : O.closest(".ul-card__container");
|
|
1673
|
+
if (!p) return;
|
|
1674
|
+
const f = (F = v.current) == null ? void 0 : F.querySelectorAll(".ul-card-scroll-wrapper");
|
|
1675
|
+
if (!f || f.length === 0) return;
|
|
1676
|
+
const w = p.getBoundingClientRect(), S = w.top + w.height / 2;
|
|
1677
|
+
let D = 0, L = 1 / 0;
|
|
1678
|
+
f.forEach((B, V) => {
|
|
1679
|
+
const $ = B.getBoundingClientRect(), J = $.top + $.height / 2, Z = Math.abs(S - J);
|
|
1680
|
+
Z < L && (L = Z, D = V);
|
|
1591
1681
|
});
|
|
1592
|
-
const
|
|
1593
|
-
|
|
1594
|
-
}, [e,
|
|
1595
|
-
|
|
1596
|
-
var
|
|
1597
|
-
if (!
|
|
1598
|
-
const
|
|
1599
|
-
return
|
|
1600
|
-
|
|
1682
|
+
const P = e[D];
|
|
1683
|
+
_.current = P.name, m(P.name);
|
|
1684
|
+
}, [e, m]);
|
|
1685
|
+
W(() => {
|
|
1686
|
+
var f;
|
|
1687
|
+
if (!h) return;
|
|
1688
|
+
const p = ((f = v.current) == null ? void 0 : f.closest(".ul-card__container")) || null;
|
|
1689
|
+
return p && p.addEventListener("scroll", j, { passive: !0 }), () => {
|
|
1690
|
+
p && p.removeEventListener("scroll", j);
|
|
1601
1691
|
};
|
|
1602
|
-
}, [
|
|
1603
|
-
const
|
|
1604
|
-
return
|
|
1605
|
-
|
|
1606
|
-
const
|
|
1607
|
-
return
|
|
1692
|
+
}, [j, h]);
|
|
1693
|
+
const I = de(() => Object.values(i).every((p) => p), [i]), C = async (p, f, w) => {
|
|
1694
|
+
return s((D) => ({ ...D, [p]: w })), await (S = (D) => ({ ...D, [p]: f }), new Promise((D) => {
|
|
1695
|
+
o((L) => {
|
|
1696
|
+
const P = S(L);
|
|
1697
|
+
return D(P), P;
|
|
1608
1698
|
});
|
|
1609
1699
|
}));
|
|
1610
|
-
var
|
|
1700
|
+
var S;
|
|
1611
1701
|
};
|
|
1612
|
-
|
|
1613
|
-
if (!
|
|
1614
|
-
const
|
|
1615
|
-
e.forEach((
|
|
1616
|
-
var
|
|
1617
|
-
const
|
|
1618
|
-
(
|
|
1619
|
-
}),
|
|
1620
|
-
}, [e,
|
|
1621
|
-
const
|
|
1622
|
-
if (
|
|
1623
|
-
const
|
|
1624
|
-
if (
|
|
1625
|
-
const
|
|
1626
|
-
t(
|
|
1702
|
+
W(() => {
|
|
1703
|
+
if (!h) return;
|
|
1704
|
+
const p = {};
|
|
1705
|
+
e.forEach((f) => {
|
|
1706
|
+
var S, D;
|
|
1707
|
+
const w = f;
|
|
1708
|
+
(D = (S = w.props) == null ? void 0 : S.properties) != null && D.required || (p[w.name] = { value: null, questionId: w.name, type: w.type });
|
|
1709
|
+
}), o(p), s({});
|
|
1710
|
+
}, [e, h]);
|
|
1711
|
+
const E = async (p, f) => {
|
|
1712
|
+
if (h) {
|
|
1713
|
+
const w = await C(p.questionId, p, f), S = x(p.type), D = R(p.type);
|
|
1714
|
+
if (S && y(p.questionId), D && f) {
|
|
1715
|
+
const L = k(e, w);
|
|
1716
|
+
t(L);
|
|
1627
1717
|
}
|
|
1628
|
-
} else t([
|
|
1629
|
-
},
|
|
1630
|
-
return
|
|
1631
|
-
const
|
|
1632
|
-
t(
|
|
1633
|
-
} })] }) : a(
|
|
1634
|
-
},
|
|
1635
|
-
}, passthroughData: void 0, recordingMediaTypes: void 0, screenPermissionRequested: !1, type: void 0 },
|
|
1636
|
-
e(
|
|
1718
|
+
} else t([p]);
|
|
1719
|
+
}, x = (p) => (/* @__PURE__ */ new Set(["nps", "likert", "multiplechoice"])).has(p), R = (p) => (/* @__PURE__ */ new Set(["videovoice", "consentlegal", "texturlprompt"])).has(p), N = ((T = e[0]) == null ? void 0 : T.type) === "thanks";
|
|
1720
|
+
return h ? a("div", { className: "ul-card-list-container--longform", ref: v, children: [l.map((p, f) => a(En, { cardInstance: p, moveToNextQuestion: y, showIndividualSubmit: h && e.length > 1 && f < e.length - 1, submitQuestion: E, updateCardValues: C }, (p == null ? void 0 : p.name) || f)), !N && a(Ei, { isSubmitDisabled: Object.keys(r).length < e.length || !I, onSubmit: function() {
|
|
1721
|
+
const p = k(e, r);
|
|
1722
|
+
t(p);
|
|
1723
|
+
} })] }) : a(Y, { children: l.map((p, f) => a(En, { cardInstance: p, moveToNextQuestion: y, showIndividualSubmit: h && e.length > 1 && f < e.length - 1, submitQuestion: E, updateCardValues: C }, (p == null ? void 0 : p.name) || f)) });
|
|
1724
|
+
}, wt = 1, Zr = 2, Gr = 3, Ke = (e) => e.type === "av_permission", Nn = (e) => e.type === "screen_permission", Kr = (e, t) => e === void 0 ? wt : e ? ((n, r) => !(Ke(r) ? r.permissionDescriptors : []).includes("camera") || n.getVideoTracks().length > 0)(e, t) ? Gr : wt : Zr, Dn = { avStream: null, currentPage: null, mediaRecordingUids: null, nextQuestion: () => {
|
|
1725
|
+
}, passthroughData: void 0, recordingMediaTypes: void 0, screenPermissionRequested: !1, type: void 0 }, ue = Nr((e) => ({ ...Dn, reset: () => {
|
|
1726
|
+
e(Dn);
|
|
1637
1727
|
}, updatePage: (t) => {
|
|
1638
1728
|
e(t);
|
|
1639
1729
|
} }));
|
|
1640
|
-
function
|
|
1641
|
-
const { avStream: n, recordingMediaTypes: r, updatePage: o } =
|
|
1730
|
+
function Ct({ currentPage: e, pages: t }) {
|
|
1731
|
+
const { avStream: n, recordingMediaTypes: r, updatePage: o } = ue.getState(), { recorderEventEmitter: i } = q.getState();
|
|
1642
1732
|
i.emit("av.permission", { "permission.descriptors": e.permissionDescriptors, "stream.ready": (s, d) => {
|
|
1643
1733
|
if (n === s) return;
|
|
1644
1734
|
let l = e;
|
|
1645
1735
|
if (s && !e.permissionDescriptors.includes("camera")) {
|
|
1646
|
-
const u = t.indexOf(e),
|
|
1647
|
-
d != null && d.active && r && i.emit("begin.recording", { "recording.media.types": r, "start.recording.callback": (c) => o({ mediaRecordingUids: c }) }), l = t[
|
|
1736
|
+
const u = t.indexOf(e), h = d != null && d.active ? u + 2 : u + 1;
|
|
1737
|
+
d != null && d.active && r && i.emit("begin.recording", { "recording.media.types": r, "start.recording.callback": (c) => o({ mediaRecordingUids: c }) }), l = t[h];
|
|
1648
1738
|
}
|
|
1649
1739
|
o({ currentPage: l, avStream: s });
|
|
1650
1740
|
} });
|
|
1651
1741
|
}
|
|
1652
|
-
function
|
|
1653
|
-
const { nextQuestion: t, passthroughData: n, mediaRecordingUids: r, reset: o } =
|
|
1742
|
+
function St({ status: e }) {
|
|
1743
|
+
const { nextQuestion: t, passthroughData: n, mediaRecordingUids: r, reset: o } = ue.getState(), { recorderEventEmitter: i, handleUploadUpdate: s, index: d } = q.getState(), l = { value: { taskStatus: e }, type: "recordedtask", questionId: (n == null ? void 0 : n.questionId) || 1 };
|
|
1654
1744
|
n && i.emit("finish.task", { "begin.callback": (u) => {
|
|
1655
1745
|
s({ mediaRecordingUid: u, isSubmitted: !0, progressPct: 0, isComplete: !1 });
|
|
1656
|
-
}, "progress.callback": (u,
|
|
1657
|
-
s({ mediaRecordingUid: u, progressPct:
|
|
1746
|
+
}, "progress.callback": (u, h) => {
|
|
1747
|
+
s({ mediaRecordingUid: u, progressPct: h.detail, isSubmitted: !1, isComplete: !1 });
|
|
1658
1748
|
}, "upload.callback": (u) => {
|
|
1659
1749
|
u && s({ mediaRecordingUid: u, isComplete: !0, isSubmitted: !0, progressPct: 100 });
|
|
1660
1750
|
}, "passthrough.data": n, "current.index": d, "task.response": l, "task.complete.callback": (u) => {
|
|
1661
1751
|
l.value.taskDurationMillisecond = u, r && (l.value.mediaRecordingUids = r), o(), t(l);
|
|
1662
1752
|
} });
|
|
1663
1753
|
}
|
|
1664
|
-
function
|
|
1665
|
-
const { recorderEventEmitter: n, eventEmitFn: r } =
|
|
1754
|
+
function qt({ pages: e, setIsRequestingPermission: t }) {
|
|
1755
|
+
const { recorderEventEmitter: n, eventEmitFn: r } = q.getState(), { updatePage: o, currentPage: i, recordingMediaTypes: s, screenPermissionRequested: d } = ue.getState();
|
|
1666
1756
|
if (!i) return;
|
|
1667
1757
|
const l = e.indexOf(i);
|
|
1668
1758
|
switch (i.type) {
|
|
1669
1759
|
case "av_permission": {
|
|
1670
1760
|
const u = d ? l + 2 : l + 1;
|
|
1671
|
-
return d && s && n.emit("begin.recording", { "recording.media.types": s, "start.recording.callback": (
|
|
1672
|
-
o({ mediaRecordingUids:
|
|
1761
|
+
return d && s && n.emit("begin.recording", { "recording.media.types": s, "start.recording.callback": (h) => {
|
|
1762
|
+
o({ mediaRecordingUids: h });
|
|
1673
1763
|
} }), void o({ currentPage: e[u] });
|
|
1674
1764
|
}
|
|
1675
1765
|
case "screen_permission":
|
|
1676
|
-
return void n.emit("screen.permission", { "screen.permission.requested": t, "stream.ready.callback": (u,
|
|
1677
|
-
const c =
|
|
1678
|
-
|
|
1679
|
-
o({ captureStream:
|
|
1680
|
-
} }), o({ currentPage: c, screenPermissionRequested: !0, captureStream:
|
|
1766
|
+
return void n.emit("screen.permission", { "screen.permission.requested": t, "stream.ready.callback": (u, h) => {
|
|
1767
|
+
const c = h ? e[l + 1] : i;
|
|
1768
|
+
h && s && n.emit("begin.recording", { "recording.media.types": s, "start.recording.callback": (m) => {
|
|
1769
|
+
o({ captureStream: h, mediaRecordingUids: m });
|
|
1770
|
+
} }), o({ currentPage: c, screenPermissionRequested: !0, captureStream: h });
|
|
1681
1771
|
} });
|
|
1682
1772
|
case "start_task":
|
|
1683
1773
|
return r("recorded.task.start"), n.emit("recorded.task.start"), n.emit("start.task"), void o({ currentPage: e[l + 1], screenPermissionRequested: !0 });
|
|
@@ -1685,115 +1775,115 @@ function Bt({ pages: e, setIsRequestingPermission: t }) {
|
|
|
1685
1775
|
return;
|
|
1686
1776
|
}
|
|
1687
1777
|
}
|
|
1688
|
-
const
|
|
1689
|
-
const { avStream: t, captureStream: n, recordingMediaTypes: r, updatePage: o } =
|
|
1690
|
-
|
|
1778
|
+
const Yr = "ul-permission-graphics-container", Jr = "ul-permission-body", Xr = H(Yr, "ul_recorded-task-inset-spacing"), tt = H("ul-horizontal-button-container", "ul-horizontal-button-container-left"), eo = ({ richTextBody: e }) => a("div", { className: "ul-rich-text-body", dangerouslySetInnerHTML: { __html: e }, id: "ul-task-detail-container" }), nt = ({ required: e, skipButtonText: t, bottom: n = !1 }) => e ? null : a(te, { className: H(n && "ul-skip-button-below", "ul-button-inactive"), onClick: St.bind(null, { status: "abandoned" }), children: t || "Skip" }), At = (e) => {
|
|
1779
|
+
const { avStream: t, captureStream: n, recordingMediaTypes: r, updatePage: o } = ue.getState(), i = (r == null ? void 0 : r.includes("audio")) || (r == null ? void 0 : r.includes("video"));
|
|
1780
|
+
W(() => {
|
|
1691
1781
|
const s = setInterval(() => {
|
|
1692
1782
|
i && t && !t.active ? o({ avStream: null, currentPage: e[0] }) : n && n.active || o({ captureStream: void 0, currentPage: e[i ? 1 : 0] });
|
|
1693
1783
|
}, 1e3);
|
|
1694
1784
|
return () => clearInterval(s);
|
|
1695
1785
|
}, [t, n, i, e, r, o]);
|
|
1696
|
-
},
|
|
1786
|
+
}, Ni = ({ content: e, pages: t, required: n }) => {
|
|
1697
1787
|
const { buttonText: r, skipButtonText: o, taskDetail: i } = e;
|
|
1698
|
-
return
|
|
1699
|
-
},
|
|
1788
|
+
return At(t), a("div", { className: "ul-task-page", children: [i && a(eo, { richTextBody: i }), a("div", { className: tt, children: [a(te, { onClick: qt.bind(null, { pages: t }), children: r }), a(nt, { required: n, skipButtonText: o })] })] }, "start-task");
|
|
1789
|
+
}, Di = ({ content: e, pages: t, properties: n }) => {
|
|
1700
1790
|
const { buttonText: r, skipButtonText: o } = e;
|
|
1701
|
-
|
|
1702
|
-
const i = a(pe, { properties: n, defaultBody: () => a("div", { className: tt, children: [a(
|
|
1703
|
-
return a("div", { className: "ul-task-page", children: [e.taskDetail && a(
|
|
1704
|
-
},
|
|
1705
|
-
const { buttonText: r, skipButtonText: o } = e, [i] =
|
|
1706
|
-
return a("div", { children: [a("div", { className:
|
|
1707
|
-
},
|
|
1791
|
+
At(t);
|
|
1792
|
+
const i = a(pe, { properties: n, defaultBody: () => a("div", { className: tt, children: [a(te, { className: "ul-complete-task-button", onClick: St.bind(null, { status: "completed" }), children: r }), a(te, { className: H("ul-button-inactive"), onClick: St.bind(null, { status: "given.up" }), children: o })] }) });
|
|
1793
|
+
return a("div", { className: "ul-task-page", children: [e.taskDetail && a(eo, { richTextBody: e.taskDetail }), i] }, "complete-task");
|
|
1794
|
+
}, Pi = ({ content: e, pages: t, required: n }) => {
|
|
1795
|
+
const { buttonText: r, skipButtonText: o } = e, [i] = q((l) => [l.tabTitle]), [s, d] = z(!1);
|
|
1796
|
+
return a("div", { children: [a("div", { className: Xr, children: [a("p", { style: { marginTop: "auto" }, children: e.selectTabText }), a("div", { className: "ul-select-tab-container", children: a("p", { className: Jr, children: i }) })] }), a("div", { className: n ? "" : tt, children: [a(te, { disabled: s, onClick: qt.bind(null, { pages: t, setIsRequestingPermission: d }), children: r }), a(nt, { required: n, skipButtonText: o })] })] });
|
|
1797
|
+
}, Ri = ({ content: e }) => a("div", { className: H(Yr, "ul_permission_svg_container", "ul_recorded-task-inset-spacing", "ul-center-horizontally"), dangerouslySetInnerHTML: { __html: e.svg } }, "ul-permission-request-graphic"), Mi = ({ content: e, pages: t, required: n }) => {
|
|
1708
1798
|
const { permissionDeniedHeadline: r, permissionDeniedBody: o, skipButtonText: i, tryAgainButtonText: s } = e, d = Ke(t[0]) ? t[0] : null;
|
|
1709
|
-
return
|
|
1799
|
+
return W(() => {
|
|
1710
1800
|
const l = setInterval(() => {
|
|
1711
|
-
d !== null &&
|
|
1801
|
+
d !== null && Ct({ currentPage: d, pages: t });
|
|
1712
1802
|
}, 1e3);
|
|
1713
1803
|
return () => clearInterval(l);
|
|
1714
|
-
}, [d, t]), d ? a("div", { children: [a("div", { className:
|
|
1715
|
-
},
|
|
1804
|
+
}, [d, t]), d ? a("div", { children: [a("div", { className: Xr, children: a("p", { className: "ul-av-permission-denied-paragraph", children: [a("span", { className: "ul-av-permission-denied-headline", children: r }), a("span", { className: Jr, children: o })] }) }), a("div", { className: tt, children: [a(te, { onClick: Ct.bind(null, { currentPage: d, pages: t }), children: s }), a(nt, { required: n, skipButtonText: i })] })] }) : null;
|
|
1805
|
+
}, Oi = ({ stream: e }) => a("video", { autoPlay: !0, className: H("ul_recorded-task-inset-spacing"), id: "ul-record-task-video-preview", muted: !0, ref: (t) => {
|
|
1716
1806
|
t && (t.srcObject = e || null);
|
|
1717
|
-
} }),
|
|
1718
|
-
const { skipButtonText: r } = e, { avStream: o } =
|
|
1719
|
-
return
|
|
1720
|
-
},
|
|
1721
|
-
const { pages: t, required: n } = e, { avStream: r, currentPage: o } =
|
|
1807
|
+
} }), Ui = ({ content: e, pages: t, required: n }) => {
|
|
1808
|
+
const { skipButtonText: r } = e, { avStream: o } = ue.getState();
|
|
1809
|
+
return At(t), a("div", { children: [a(Oi, { stream: o }), a("div", { className: "ul-vertical-button-container-center", children: [a(te, { onClick: qt.bind(null, { pages: t }), children: e.buttonText }), a(nt, { bottom: !0, required: n, skipButtonText: r })] })] });
|
|
1810
|
+
}, Hi = ({ properties: e }) => {
|
|
1811
|
+
const { pages: t, required: n } = e, { avStream: r, currentPage: o } = ue.getState();
|
|
1722
1812
|
if (o === void 0) return null;
|
|
1723
1813
|
switch (o == null ? void 0 : o.type) {
|
|
1724
1814
|
case "av_permission": {
|
|
1725
|
-
const i =
|
|
1726
|
-
return i ===
|
|
1815
|
+
const i = Kr(r, o);
|
|
1816
|
+
return i === wt ? a(Ri, { content: o }) : a(i === Zr ? Mi : Ui, { content: o, pages: t, required: n });
|
|
1727
1817
|
}
|
|
1728
1818
|
case "screen_permission":
|
|
1729
|
-
return a(
|
|
1819
|
+
return a(Pi, { content: o, pages: t, required: n });
|
|
1730
1820
|
case "start_task":
|
|
1731
|
-
return a(
|
|
1821
|
+
return a(Ni, { content: o, pages: t, required: n });
|
|
1732
1822
|
case "complete_task":
|
|
1733
|
-
return a(
|
|
1823
|
+
return a(Di, { content: o, pages: t, properties: e });
|
|
1734
1824
|
default:
|
|
1735
1825
|
return null;
|
|
1736
1826
|
}
|
|
1737
|
-
},
|
|
1738
|
-
const o =
|
|
1739
|
-
let c =
|
|
1740
|
-
c || (c = function({ pages:
|
|
1741
|
-
const { updatePage:
|
|
1742
|
-
let
|
|
1743
|
-
|
|
1744
|
-
const
|
|
1745
|
-
if (Ke(
|
|
1746
|
-
const { permissionDescriptors:
|
|
1747
|
-
|
|
1827
|
+
}, Bi = ({ className: e, properties: t, next: n, questionId: r }) => {
|
|
1828
|
+
const o = q(), { surveyId: i, responseGroupUid: s, userId: d } = o, l = ue(), { screenPermissionRequested: u } = l, h = ue((_) => _.avStream);
|
|
1829
|
+
let c = ue((_) => _.currentPage);
|
|
1830
|
+
c || (c = function({ pages: _, userId: b, responseGroupUid: k, surveyId: y, questionId: j, next: I }) {
|
|
1831
|
+
const { updatePage: C } = ue.getState(), { eventEmitFn: E, recorderEventEmitter: x } = q.getState(), R = { questionId: j, surveyId: y, visitorId: b, responseGroupUid: k };
|
|
1832
|
+
let N = 0;
|
|
1833
|
+
x.emit("recorded.task.permission.screen"), E("recorded.task.permission.screen"), x.emit("permission.status", { "permission.status.callback": (p, f, w, S) => {
|
|
1834
|
+
const D = _[N], { type: L } = D, P = ["screen"];
|
|
1835
|
+
if (Ke(D)) {
|
|
1836
|
+
const { permissionDescriptors: O } = D, F = O == null ? void 0 : O.includes("microphone"), B = O == null ? void 0 : O.includes("camera");
|
|
1837
|
+
F && P.push("audio"), B && P.push("video"), (p != null && p.active && !B || p != null && p.active && f) && N++;
|
|
1748
1838
|
}
|
|
1749
|
-
|
|
1839
|
+
Nn(_[N]) && w && (N++, x.emit("begin.recording", { "recording.media.types": P, "start.recording.callback": (O) => C({ mediaRecordingUids: O }) })), C({ currentPage: _[N], avStream: p, screenPermissionRequested: w, nextQuestion: I, type: L, passthroughData: R, recordingMediaTypes: P, captureStream: S });
|
|
1750
1840
|
} });
|
|
1751
|
-
const
|
|
1752
|
-
return
|
|
1753
|
-
}({ questionId: r, surveyId: i, next: (
|
|
1754
|
-
n(
|
|
1841
|
+
const T = _[N];
|
|
1842
|
+
return T.type === "av_permission" && Ct({ currentPage: T, pages: _ }), T;
|
|
1843
|
+
}({ questionId: r, surveyId: i, next: (_) => {
|
|
1844
|
+
n(_, !0);
|
|
1755
1845
|
}, pages: t.pages, responseGroupUid: s, userId: d }));
|
|
1756
|
-
let
|
|
1757
|
-
const
|
|
1758
|
-
return
|
|
1846
|
+
let m = c.headline, v = c.captionText;
|
|
1847
|
+
const g = Kr(h, c);
|
|
1848
|
+
return Nn(c) && u && (m = c.permissionDeniedHeadline, v = c.permissionDeniedCaptionText), Ke(c) && g === Gr && (m = c.permissionGrantedHeadline, v = c.permissionGrantedCaptionText), a("div", { className: H(e, "ul-center-horizontally", "fade-in-transition"), children: [a(se, { message: m, properties: { captionText: v } }), a(me, { children: a(Hi, { properties: t }) })] });
|
|
1759
1849
|
};
|
|
1760
|
-
var
|
|
1761
|
-
const
|
|
1762
|
-
const { visitorAttributes: s, isLongFormSurvey: d } =
|
|
1763
|
-
n({ value:
|
|
1764
|
-
}, u = (
|
|
1765
|
-
|
|
1766
|
-
},
|
|
1767
|
-
if (!
|
|
1850
|
+
var to = ((e) => (e.CONTINUE = "CONTINUE", e.EXTERNAL = "EXTERNAL", e.NO_BUTTON = "NO_BUTTON", e))(to || {});
|
|
1851
|
+
const qi = { "{{user_id}}": "externalUserId", "{{email}}": "email" }, Ai = ({ className: e, message: t, next: n, properties: r, questionId: o, type: i }) => {
|
|
1852
|
+
const { visitorAttributes: s, isLongFormSurvey: d } = q((g) => ({ visitorAttributes: g.visitorAttributes, isLongFormSurvey: re(g.studyType) })), l = (g, _ = !1) => {
|
|
1853
|
+
n({ value: _ ? { skipped: !0 } : void 0, questionId: o, type: i }, !0);
|
|
1854
|
+
}, u = (g) => {
|
|
1855
|
+
g.key !== "Enter" && g.key !== " " || n({ value: void 0, questionId: o, type: i }, !0);
|
|
1856
|
+
}, h = ((g, _ = {}) => {
|
|
1857
|
+
if (!g) return g;
|
|
1768
1858
|
try {
|
|
1769
|
-
/^https?:\/\//i.test(
|
|
1770
|
-
const I = new URL(
|
|
1859
|
+
/^https?:\/\//i.test(g) || (g = `http://${g}`);
|
|
1860
|
+
const I = new URL(g);
|
|
1771
1861
|
if (!I.protocol || I.protocol !== "http:" && I.protocol !== "https:") return;
|
|
1772
1862
|
} catch {
|
|
1773
1863
|
return;
|
|
1774
1864
|
}
|
|
1775
|
-
let
|
|
1865
|
+
let b = g;
|
|
1776
1866
|
const k = [];
|
|
1777
|
-
for (const [I,
|
|
1778
|
-
const
|
|
1779
|
-
|
|
1867
|
+
for (const [I, C] of Object.entries(qi)) if (b.toLowerCase().includes(I)) if (_[C]) {
|
|
1868
|
+
const E = new RegExp(I, "gi");
|
|
1869
|
+
b = b.replace(E, _[C]);
|
|
1780
1870
|
} else k.push(I);
|
|
1781
|
-
if (k.length === 0 || !
|
|
1782
|
-
const
|
|
1783
|
-
return
|
|
1784
|
-
})(r && r.buttonUrl, s), c = d && r.promptActionType ===
|
|
1785
|
-
return a("div", { className: H(e, "ul-card__text-url-prompt", "fade-in-transition"), children: [a(se, { message: t, properties: { questionHtml: r.questionHtml } }), a(me, { children: (
|
|
1786
|
-
var
|
|
1787
|
-
},
|
|
1788
|
-
const { border: n, destroy: r, endCard: o, forceBrandedLogo: i } =
|
|
1789
|
-
|
|
1871
|
+
if (k.length === 0 || !b.includes("?")) return b;
|
|
1872
|
+
const y = b.slice(0, b.indexOf("?")), j = b.slice(b.indexOf("?") + 1).split("&").map((I) => I.split("=")).filter((I) => !k.includes(I[1]));
|
|
1873
|
+
return j.length === 0 ? y : `${y}?${j.map((I) => I.join("=")).join("&")}`;
|
|
1874
|
+
})(r && r.buttonUrl, s), c = d && r.promptActionType === to.NO_BUTTON ? () => a(Y, {}) : () => a(be, { children: a("div", { className: "ul-card-button-group", children: [a("a", { className: "ul-card-text__button ul-card__text-url-prompt-button", href: h, id: "ul-card-text__button", onClick: l, onKeyPress: u, rel: "noreferrer", role: h ? "link" : "button", tabIndex: 0, target: "_blank", children: xe(r) }), r.required === !1 && a("button", { className: "ul-card-skip__button", onClick: (g) => l(0, !0), children: Bt(r) })] }) });
|
|
1875
|
+
return a("div", { className: H(e, "ul-card__text-url-prompt", "fade-in-transition"), children: [a(se, { message: t, properties: { questionHtml: r.questionHtml } }), a(me, { children: (m = r == null ? void 0 : r.richTextBody, v = r == null ? void 0 : r.body, m ? a("div", { className: "ul-rich-text-body", dangerouslySetInnerHTML: { __html: m }, id: "ul-card__text-url-body-container" }) : v ? a("div", { className: "ul-rich-text-body", id: "ul-card__text-url-body-container", children: (v ? v.split(/\n\s*\n/g) : []).map((g, _) => a("p", { children: g }, _)) }) : null) }), a(pe, { defaultBody: c, properties: r })] }, o);
|
|
1876
|
+
var m, v;
|
|
1877
|
+
}, Fi = ({ className: e, questionId: t }) => {
|
|
1878
|
+
const { border: n, destroy: r, endCard: o, forceBrandedLogo: i } = q((l) => ({ border: l.border, destroy: l.destroy, endCard: l.endCard, forceBrandedLogo: l.forceBrandedLogo }));
|
|
1879
|
+
W(() => {
|
|
1790
1880
|
setTimeout(() => {
|
|
1791
1881
|
r(je);
|
|
1792
1882
|
}, i ? 4e3 : 2e3);
|
|
1793
1883
|
}, [r, i]);
|
|
1794
1884
|
const s = o && o.subheader ? a("p", { className: "ul-caption", children: o.subheader }) : null, d = o && o.headline ? o.headline : "";
|
|
1795
1885
|
return a("div", { className: H(e, "ul-card--thanks", "fade-in-transition"), children: a("div", { children: a("div", { className: "ul-card--thanks-content", children: [a("div", { className: "ul-thanks-check", children: a("svg", { "aria-labelledby": "title", fill: "none", height: "99", viewBox: "0 0 81 99", width: "81", xmlns: "http://www.w3.org/2000/svg", children: [a("path", { clipRule: "evenodd", d: "M40.5 77C60.9345 77 77.5 60.4345 77.5 40C77.5 19.5655 60.9345 3 40.5 3C20.0655 3 3.5 19.5655 3.5 40C3.5 60.4345 20.0655 77 40.5 77ZM80.5 40C80.5 62.0914 62.5914 80 40.5 80C18.4086 80 0.5 62.0914 0.5 40C0.5 17.9086 18.4086 0 40.5 0C62.5914 0 80.5 17.9086 80.5 40Z", fill: n, fillRule: "evenodd" }), a("path", { clipRule: "evenodd", d: "M55.025 22.9046C55.6299 23.4705 55.6616 24.4198 55.0956 25.0247C54.8724 25.2634 54.6109 25.5285 54.3157 25.8277C52.2547 27.9168 48.5549 31.667 44.8135 39.6658C43.2818 42.9406 42.0864 45.8386 41.0823 48.2729C40.6539 49.3116 40.2603 50.2659 39.8902 51.129C39.287 52.5359 38.7248 53.7508 38.1744 54.625C37.8997 55.0613 37.5806 55.4905 37.2017 55.8245C36.8201 56.1607 36.2613 56.5 35.5457 56.5C34.6742 56.5 34.0892 55.9692 33.7774 55.6083C33.4502 55.2296 33.1752 54.7511 32.9396 54.301C32.7305 53.9013 32.5088 53.4367 32.2797 52.9565C32.2429 52.8794 32.2059 52.8019 32.1688 52.7243C31.8942 52.1499 31.5959 51.534 31.2537 50.8868C29.8886 48.305 27.8539 45.2878 24.2343 43.1382C23.522 42.7152 23.2875 41.7949 23.7105 41.0826C24.1335 40.3703 25.0539 40.1358 25.7662 40.5588C30.0556 43.1062 32.4149 46.6647 33.9058 49.4845C34.2776 50.1876 34.5973 50.8487 34.8753 51.4302C34.9147 51.5124 34.9529 51.5926 34.9902 51.6707C35.2222 52.1567 35.4164 52.5637 35.5978 52.9102C35.6151 52.9434 35.6321 52.9754 35.6485 53.0061C36.0565 52.3531 36.5341 51.3434 37.133 49.9468C37.4781 49.1418 37.8572 48.2229 38.2761 47.2074C39.2886 44.7532 40.5339 41.7347 42.0961 38.3948C46.0591 29.9221 50.0641 25.8648 52.1535 23.7482C52.4423 23.4556 52.6944 23.2002 52.9048 22.9753C53.4708 22.3703 54.42 22.3387 55.025 22.9046ZM35.1994 53.5892C35.1994 53.5892 35.2 53.5888 35.2012 53.5879C35.2 53.5889 35.1994 53.5893 35.1994 53.5892ZM36.0666 53.6682C36.0732 53.674 36.0765 53.6775 36.0765 53.6777C36.0765 53.678 36.0732 53.6751 36.0666 53.6682Z", fill: n, fillRule: "evenodd" }), a("path", { d: "M69.5 97C69.5 98.1046 56.2924 99 40 99C23.7076 99 10.5 98.1046 10.5 97C10.5 95.8954 23.7076 95 40 95C56.2924 95 69.5 95.8954 69.5 97Z", fill: "black", fillOpacity: "0.2" })] }) }), a(se, { message: d }), s] }) }) }, t);
|
|
1796
|
-
}, Ce = "https://cdn.sprig.com",
|
|
1886
|
+
}, Ce = "https://cdn.sprig.com", U = { document: void 0, videojs: void 0 }, Ft = (e) => e + "-loading-spiner", ne = "hidden", Pn = ".m3u8", ut = "questionId", pt = "ul-video-recorder-camera-off-button", mt = "ul-recording-in-session", Vi = [{ type: "link", content: `${Ce}/dependencies/videojs-record-4.5.0.min.css` }, { type: "script", content: `${Ce}/dependencies/RecordRTC-5.6.2.js` }, { type: "script", content: `${Ce}/dependencies/adapter.8.0.0.min.js` }, { type: "script", content: `${Ce}/dependencies/videojs-record-4.5.0.min.js` }, { type: "script", content: `${Ce}/userleap-web-upchunk-v2.2.2.js` }], no = [{ type: "link", content: `${Ce}/dependencies/video-js-7.18.0.min.css` }, { type: "script", content: `${Ce}/dependencies/video-js-7.18.0.min.js` }, { type: "style", content: `/* progress control styles */
|
|
1797
1887
|
.video-js .vjs-control {
|
|
1798
1888
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
|
|
1799
1889
|
}
|
|
@@ -2450,47 +2540,47 @@ span.ul-button-text {
|
|
|
2450
2540
|
.vjs-poster {
|
|
2451
2541
|
background-size: cover;
|
|
2452
2542
|
}
|
|
2453
|
-
` }],
|
|
2454
|
-
let
|
|
2543
|
+
` }], ro = "-video-player", Rn = "-secondary-video-player", Mn = "-video-recorder";
|
|
2544
|
+
let ce, On;
|
|
2455
2545
|
const ye = async ({ event: e, apiBase: t, headers: n, visitorId: r, envId: o, metadata: i }) => {
|
|
2456
|
-
const s =
|
|
2546
|
+
const s = U.document.documentElement;
|
|
2457
2547
|
if (!r || !o) return;
|
|
2458
2548
|
const d = { event: `SDK - ${e}`, visitorId: r, environmentId: o, metadata: { ...i || {}, screenWidth: window.screen.width, screenHeight: window.screen.height, clientWidth: s.clientWidth, clientHeight: s.clientHeight, location: window.location.href, language: navigator.language } };
|
|
2459
2549
|
(await fetch(`${t}/sdk/1/visitors/${r}/analytics`, { method: "POST", cache: "no-cache", headers: n, body: JSON.stringify(d) })).ok || console.warn("[Sprig] (ERR-444) Failed to track analytics", e);
|
|
2460
2550
|
}, he = async (e, t, n, r, o, i) => {
|
|
2461
2551
|
ye({ event: `Video Error ${t}`, apiBase: n, headers: r, visitorId: o, envId: i, metadata: { errorMessage: e.message } });
|
|
2462
|
-
const s =
|
|
2552
|
+
const s = U.document.documentElement, d = { screenWidth: window.screen.width, screenHeight: window.screen.height, clientWidth: s.clientWidth, clientHeight: s.clientHeight, location: window.location.href, language: navigator.language }, l = { action: t, err: { message: e.message, stack: e.stack }, meta: d, vid: o, envId: i };
|
|
2463
2553
|
(await fetch(`${n}/sdk/1/errors`, { method: "POST", cache: "no-cache", headers: { ...r, "userleap-platform": "video_recorder", "x-ul-error": window.btoa(`userleap-${Date.now()}-error`) }, body: JSON.stringify(l) })).ok || console.warn("[Sprig] (ERR-444) Failed to report error to API", e);
|
|
2464
|
-
},
|
|
2554
|
+
}, oo = (e, t) => {
|
|
2465
2555
|
if (e.length === 0) return t && t();
|
|
2466
2556
|
Promise.all(e.reduce((n, r) => (n.push(((o, { type: i, content: s }) => new Promise(function(d, l) {
|
|
2467
2557
|
let u;
|
|
2468
|
-
i === "script" ? (u =
|
|
2558
|
+
i === "script" ? (u = U.document.createElement("script"), u.src = s) : i === "link" ? (u = U.document.createElement("link"), u.rel = "stylesheet", u.href = s, u.type = "text/css") : (u = U.document.createElement("style"), u.innerHTML = s), u.onload = function() {
|
|
2469
2559
|
d(s);
|
|
2470
2560
|
}, u.onerror = function() {
|
|
2471
2561
|
l(s);
|
|
2472
2562
|
}, u.async = !1, u.id = btoa(s), o.appendChild(u);
|
|
2473
|
-
}))(
|
|
2474
|
-
|
|
2563
|
+
}))(U.document.head, r)), n), [])).then(() => {
|
|
2564
|
+
U.videojs = U.document.defaultView.videojs, t && t();
|
|
2475
2565
|
}).catch(function(n) {
|
|
2476
2566
|
console.log(n + " failed to load");
|
|
2477
2567
|
});
|
|
2478
|
-
},
|
|
2479
|
-
if (t === "start" && (e.style.visibility = "visible"), t === "none") e.style.visibility =
|
|
2480
|
-
else if (t === "success") e.style.visibility =
|
|
2568
|
+
}, Un = (e, t, n) => {
|
|
2569
|
+
if (t === "start" && (e.style.visibility = "visible"), t === "none") e.style.visibility = ne;
|
|
2570
|
+
else if (t === "success") e.style.visibility = ne, e.innerHTML = "Upload succeeded!";
|
|
2481
2571
|
else {
|
|
2482
2572
|
const r = Math.round(parseFloat(n));
|
|
2483
2573
|
e.innerHTML = `Uploading <span class="ul-upload-progress-label__time">${r}%</span>`, e.style.background = `linear-gradient(to right, #E0E0EB 0%, #E0E0EB ${r}%, #FCFCFD ${r}%, #FCFCFD 100%)`;
|
|
2484
2574
|
}
|
|
2485
|
-
},
|
|
2486
|
-
const n =
|
|
2575
|
+
}, ht = (e, t) => {
|
|
2576
|
+
const n = U.videojs(e.id());
|
|
2487
2577
|
return n == null ? void 0 : n.payload[t];
|
|
2488
|
-
},
|
|
2489
|
-
const n = new (
|
|
2578
|
+
}, io = (e, t) => {
|
|
2579
|
+
const n = new (U.videojs.getComponent("Component"))(e);
|
|
2490
2580
|
return n.addClass("ul-buttons-panel"), t.map((r) => {
|
|
2491
2581
|
n.addChild(r);
|
|
2492
|
-
}),
|
|
2493
|
-
},
|
|
2582
|
+
}), zi(n), n;
|
|
2583
|
+
}, zi = (e) => {
|
|
2494
2584
|
e.children().forEach((t) => {
|
|
2495
2585
|
if (ae[t.name_]) {
|
|
2496
2586
|
const n = $e(ae[t.name_], `ul-${ae[t.name_]}`);
|
|
@@ -2498,15 +2588,15 @@ const ye = async ({ event: e, apiBase: t, headers: n, visitorId: r, envId: o, me
|
|
|
2498
2588
|
}
|
|
2499
2589
|
});
|
|
2500
2590
|
}, $e = (e, t = "") => {
|
|
2501
|
-
const n =
|
|
2591
|
+
const n = U.document.createElement("span");
|
|
2502
2592
|
return n.className = "ul-button-text", n.innerHTML = e, n.id = t, n;
|
|
2503
|
-
},
|
|
2593
|
+
}, so = (e, t, n, r, o = !1, i) => {
|
|
2504
2594
|
e.addClass("ul-video-player");
|
|
2505
|
-
const s = new (
|
|
2506
|
-
s.addClass("ul-control-panel"), e.progressBar = s.addChild("ProgressControl"), n && e.src(n), e.audioPlayerPlaceholder = new (
|
|
2507
|
-
const d = n && n.src ?
|
|
2508
|
-
!n || !o && d ? (e.audioPlayerPlaceholder.hide(),
|
|
2509
|
-
o || !n || d ||
|
|
2595
|
+
const s = new (U.videojs.getComponent("Component"))(e);
|
|
2596
|
+
s.addClass("ul-control-panel"), e.progressBar = s.addChild("ProgressControl"), n && e.src(n), e.audioPlayerPlaceholder = new (U.videojs.getComponent("Component"))(e), e.audioPlayerPlaceholder.addClass("ul-audio-recorder-placeholder");
|
|
2597
|
+
const d = n && n.src ? Zi(n.src) : null;
|
|
2598
|
+
!n || !o && d ? (e.audioPlayerPlaceholder.hide(), U.document.getElementById(`${e.id()}_html5_api`).style.height = "100%", d && e.poster(d)) : (e.children()[0].classList.add("vjs-hidden"), U.document.getElementById(`${e.id()}_html5_api`).style.height = "0px"), e.on("play", () => {
|
|
2599
|
+
o || !n || d || Qi(e), i == null || i.play();
|
|
2510
2600
|
}), e.on("pause", () => {
|
|
2511
2601
|
i == null || i.pause();
|
|
2512
2602
|
}), e.on("seeked", () => {
|
|
@@ -2514,358 +2604,358 @@ const ye = async ({ event: e, apiBase: t, headers: n, visitorId: r, envId: o, me
|
|
|
2514
2604
|
}), e.on("ratechange", () => {
|
|
2515
2605
|
i == null || i.playbackRate(e.playbackRate());
|
|
2516
2606
|
}), e.addChild(e.audioPlayerPlaceholder, {}, 1), s.addChild(t), e.addChild(s), r && r(e);
|
|
2517
|
-
},
|
|
2518
|
-
|
|
2607
|
+
}, $i = (e, t, n, r, o, i, s, d = !1) => {
|
|
2608
|
+
On = Date.now();
|
|
2519
2609
|
const l = Ye(t, { controls: !1, bigPlayButton: !1, fluid: !1, width: 1280, height: 720, playsinline: !0, plugins: { record: { audio: !0, video: { mandatory: { minWidth: 1280, minHeight: 720 } }, frameWidth: 1280, frameHeight: 720, maxLength: 600, autoMuteDevice: !0 } } });
|
|
2520
2610
|
if (!l) return;
|
|
2521
2611
|
l.payload = n;
|
|
2522
|
-
const { surveyId: u, questionId:
|
|
2523
|
-
let
|
|
2524
|
-
const
|
|
2525
|
-
const
|
|
2526
|
-
|
|
2527
|
-
const
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
}), window.navigator.mediaDevices.getUserMedia({ video: !0, audio: !0 }).then((
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
}), l.record().onDeviceReady(
|
|
2534
|
-
}).catch(l.record().onDeviceError.bind(l.record()))) : (
|
|
2535
|
-
|
|
2536
|
-
}), l.children()[0].classList.remove("vjs-hidden"), l.record().getDevice(),
|
|
2537
|
-
},
|
|
2538
|
-
|
|
2612
|
+
const { surveyId: u, questionId: h, responseGroupUid: c, visitorId: m, envId: v } = n;
|
|
2613
|
+
let g;
|
|
2614
|
+
const _ = (T) => {
|
|
2615
|
+
const p = pt, f = pt + "-audio-only";
|
|
2616
|
+
Un(l.uploadProgressLabel, "none"), ce && ce.startTime >= On && ce.abort();
|
|
2617
|
+
const w = U.document.getElementById("ul-camera-button");
|
|
2618
|
+
T ? (l.children()[0].classList.add("vjs-hidden"), j.removeClass(p), j.addClass(f), w.innerHTML = ae.TurnOnCamera, l.audioPlayerPlaceholder.removeClass("vjs-hidden"), g == null || g.getTracks().forEach((S) => {
|
|
2619
|
+
S.stop();
|
|
2620
|
+
}), window.navigator.mediaDevices.getUserMedia({ video: !0, audio: !0 }).then((S) => {
|
|
2621
|
+
g = S, S.getVideoTracks().forEach((D) => {
|
|
2622
|
+
D.enabled = !1;
|
|
2623
|
+
}), l.record().onDeviceReady(S);
|
|
2624
|
+
}).catch(l.record().onDeviceError.bind(l.record()))) : (g == null || g.getVideoTracks().forEach((S) => {
|
|
2625
|
+
S.enabled = !0;
|
|
2626
|
+
}), l.children()[0].classList.remove("vjs-hidden"), l.record().getDevice(), j.removeClass(f), j.addClass(p), w.innerHTML = ae.TurnOffCamera, l.audioPlayerPlaceholder.addClass("vjs-hidden"));
|
|
2627
|
+
}, b = new (U.videojs.getComponent("Button"))(l, { clickHandler: () => {
|
|
2628
|
+
b.hasClass(ne) || (ye({ event: "Video Delete Button Clicked", apiBase: r, headers: s, visitorId: m, envId: v, metadata: { questionId: h, responseGroupUid: c, surveyId: u } }), _(l.cameraOff), o(A.DELETE, {}), j.removeClass(ne), b.addClass(ne));
|
|
2539
2629
|
} });
|
|
2540
|
-
|
|
2541
|
-
const k =
|
|
2630
|
+
b.addClass("ul-video-recorder-delete-button"), b.el_.appendChild($e(ae.DeleteButton, "ul-delete-button"));
|
|
2631
|
+
const k = U.document.getElementById(t), y = () => {
|
|
2542
2632
|
k.classList.contains("vjs-fullscreen") && l.cameraOff ? k.style.display = "table" : k.style.display = "flex";
|
|
2543
2633
|
};
|
|
2544
|
-
|
|
2545
|
-
const
|
|
2546
|
-
l.record().isRecording() || (l.cameraOff = !l.cameraOff, ye({ event: "Video Camera Button Clicked", apiBase: r, headers: s, visitorId: n.visitorId, envId: n.envId, metadata: { questionId:
|
|
2634
|
+
y();
|
|
2635
|
+
const j = new (U.videojs.getComponent("Button"))(l, { clickHandler: () => {
|
|
2636
|
+
l.record().isRecording() || (l.cameraOff = !l.cameraOff, ye({ event: "Video Camera Button Clicked", apiBase: r, headers: s, visitorId: n.visitorId, envId: n.envId, metadata: { questionId: h, responseGroupUid: c, surveyId: u, cameraOff: l.cameraOff } }), _(l.cameraOff), !b.hasClass(ne) && b.addClass(ne), o(A.DELETE, {}), y());
|
|
2547
2637
|
} });
|
|
2548
|
-
|
|
2549
|
-
const I = new (
|
|
2550
|
-
const
|
|
2551
|
-
if (l.record().isRecording()) l.record().stop(),
|
|
2638
|
+
j.addClass(pt), j.el_.appendChild($e(ae.TurnOffCamera, "ul-camera-button"));
|
|
2639
|
+
const I = new (U.videojs.getComponent("Button"))(l, { clickHandler: () => {
|
|
2640
|
+
const T = U.document.getElementById("ul-recorder-toggle");
|
|
2641
|
+
if (l.record().isRecording()) l.record().stop(), T && (T.innerHTML = ae.RecordButton), I.removeClass(mt), b.removeClass(ne);
|
|
2552
2642
|
else {
|
|
2553
|
-
const
|
|
2554
|
-
if (
|
|
2643
|
+
const p = U.document.getElementById("ul-recording-countdown-screen");
|
|
2644
|
+
if (p) p.remove(), T && (T.innerHTML = ae.RecordButton), _(l.cameraOff), o(A.DELETE, {}), j.removeClass(ne), b.addClass(ne), I.removeClass(mt), x.show();
|
|
2555
2645
|
else {
|
|
2556
|
-
I.addClass(
|
|
2557
|
-
const
|
|
2558
|
-
|
|
2646
|
+
I.addClass(mt), x.hide(), j.addClass(ne), b.addClass(ne), T && (T.innerHTML = ae.StopButton);
|
|
2647
|
+
const f = U.document.createElement("div");
|
|
2648
|
+
f.id = "ul-recording-countdown-screen", k.insertBefore(f, k.children[1]), f.style.height = `${k.offsetHeight}px`, ao(l, 3);
|
|
2559
2649
|
}
|
|
2560
2650
|
}
|
|
2561
2651
|
} });
|
|
2562
2652
|
I.addClass("ul-video-recorder-toggle-button"), I.el_.appendChild($e(ae.RecordButton, "ul-recorder-toggle"));
|
|
2563
|
-
const
|
|
2564
|
-
|
|
2565
|
-
const
|
|
2566
|
-
|
|
2567
|
-
const
|
|
2568
|
-
|
|
2569
|
-
I.hide(),
|
|
2653
|
+
const C = U.document.createElement("p");
|
|
2654
|
+
C.style.visibility = "hidden", C.className = "ul-upload-progress-label", e.appendChild(C), l.uploadProgressLabel = C;
|
|
2655
|
+
const E = io(l, [b, j, "PlayToggle", I, "FullscreenToggle"]), x = E.children().find((T) => T.name_ === "FullscreenToggle");
|
|
2656
|
+
x.hasClass("vjs-disabled") && x.hide();
|
|
2657
|
+
const R = E.children().find((T) => T.name_ === "PlayToggle");
|
|
2658
|
+
R.hide(), b.addClass(ne), so(l, E, i, !1, d), l.on("stopRecord", () => {
|
|
2659
|
+
I.hide(), R.show(), x.show(), b.removeClass(ne);
|
|
2570
2660
|
}), l.on("deviceReady", () => {
|
|
2571
|
-
I.show(),
|
|
2572
|
-
}), ((
|
|
2573
|
-
const { surveyId:
|
|
2574
|
-
|
|
2575
|
-
console.warn("device error: ",
|
|
2576
|
-
}),
|
|
2577
|
-
he(
|
|
2578
|
-
}),
|
|
2579
|
-
|
|
2580
|
-
}),
|
|
2581
|
-
|
|
2582
|
-
const
|
|
2583
|
-
if (!
|
|
2584
|
-
const
|
|
2585
|
-
return
|
|
2661
|
+
I.show(), R.hide(), b.addClass(ne);
|
|
2662
|
+
}), ((T, p, f, w, S) => {
|
|
2663
|
+
const { surveyId: D, responseGroupUid: L, visitorId: P, envId: O } = T.payload;
|
|
2664
|
+
T.on("deviceError", function() {
|
|
2665
|
+
console.warn("device error: ", T.deviceErrorCode), T.deviceErrorCode.message === "Permission denied" ? (T.deviceButton.addClass("permission-denied"), f && f(A.ERROR, { type: A.PERMISSION_DENIED }), ye({ event: "Video Permission Denied", apiBase: p, headers: S, visitorId: P, envId: O, metadata: { questionId: ht(T, ut), responseGroupUid: L, surveyId: D } })) : (f && f(A.ERROR, { type: A.OTHER }), he(new Error(T.deviceErrorCode.message), "recorderDeviceError", p, S, P, O));
|
|
2666
|
+
}), T.on("error", function(F, B) {
|
|
2667
|
+
he(B || T.error(), "recorderError", p, S, P, O);
|
|
2668
|
+
}), T.on("startRecord", function(F, B) {
|
|
2669
|
+
w(T.uploadProgressLabel, "none"), ye({ event: "Video Record Start", apiBase: p, headers: S, visitorId: P, envId: O, metadata: { questionId: ht(T, ut), responseGroupUid: L, surveyId: D } });
|
|
2670
|
+
}), T.on("finishRecord", async function() {
|
|
2671
|
+
w(T.uploadProgressLabel, "start", 0);
|
|
2672
|
+
const F = ht(T, ut);
|
|
2673
|
+
if (!D) {
|
|
2674
|
+
const Z = "internal error: missing fields in payload";
|
|
2675
|
+
return f && f(A.ERROR, { type: A.OTHER }), he(new Error(Z), "finishRecord", p, S, P, O), null;
|
|
2586
2676
|
}
|
|
2587
|
-
|
|
2588
|
-
const
|
|
2589
|
-
ye({ event: "Video Record Finish", apiBase:
|
|
2590
|
-
const
|
|
2591
|
-
|
|
2592
|
-
const
|
|
2593
|
-
const
|
|
2594
|
-
if (
|
|
2595
|
-
const
|
|
2596
|
-
return
|
|
2677
|
+
T.record().stopDevice();
|
|
2678
|
+
const B = T.cameraOff ? A.MEDIA_TYPE_AUDIO : A.MEDIA_TYPE_VIDEO, V = vt();
|
|
2679
|
+
ye({ event: "Video Record Finish", apiBase: p, headers: S, visitorId: P, envId: O, metadata: { mediaRecordingUid: V, questionId: F, responseGroupUid: L, surveyId: D, mediaType: B } });
|
|
2680
|
+
const $ = { surveyId: D, updatedAt: (/* @__PURE__ */ new Date()).toISOString(), mediaType: B, mediaRecordingUid: V };
|
|
2681
|
+
F && ($.questionId = F), L && ($.responseGroupUid = L), P && ($.visitorId = P);
|
|
2682
|
+
const J = await (async () => {
|
|
2683
|
+
const Z = await fetch(`${p}/2/environments/integrations/upload`, { method: "POST", cache: "no-cache", headers: { "Content-Type": "application/json" }, body: JSON.stringify($) });
|
|
2684
|
+
if (Z.ok) {
|
|
2685
|
+
const K = await Z.json();
|
|
2686
|
+
return f && f(A.UPLOAD_STARTED, { [A.UPLOAD_ID]: K.upload.id, [A.MEDIA_TYPE]: B, [A.MEDIA_RECORDING_UID]: V }), K.upload.url;
|
|
2597
2687
|
}
|
|
2598
|
-
return
|
|
2688
|
+
return f && f(A.ERROR, { type: A.OTHER, response: Z }), he(new Error("failed to get upload response with url"), "finishRecord", p, S, P, O), null;
|
|
2599
2689
|
})();
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
}),
|
|
2603
|
-
|
|
2604
|
-
}),
|
|
2605
|
-
|
|
2690
|
+
J && (ce = U.document.defaultView.UpChunk.createUpload({ endpoint: J, file: new U.document.defaultView.File([T.recordedData], `recording ${B} ${Date.now()}`), chunkSize: 5120 }), ce.startTime = Date.now(), ye({ event: "Video Upload Start", apiBase: p, headers: S, visitorId: P, envId: O, metadata: { mediaRecordingUid: V, questionId: F, responseGroupUid: L, surveyId: D, mediaType: B, url: J } }), ce.on("error", (Z) => {
|
|
2691
|
+
w(T.uploadProgressLabel, "none"), f && f(A.UPLOAD_FINISHED, { [A.MEDIA_RECORDING_UID]: V }), he(Z, "finishRecord", p, S, P, O);
|
|
2692
|
+
}), ce.on("progress", (Z) => {
|
|
2693
|
+
f && f(A.UPLOAD_PROGRESS, { [A.MEDIA_RECORDING_UID]: V, [A.UPLOAD_PROGRESS_PCT]: Z.detail }), w(T.uploadProgressLabel, "progress", Z.detail);
|
|
2694
|
+
}), ce.on("success", () => {
|
|
2695
|
+
w(T.uploadProgressLabel, "success"), f && f(A.UPLOAD_FINISHED, { [A.MEDIA_RECORDING_UID]: V }), ye({ event: "Video Upload Success", apiBase: p, headers: S, visitorId: P, envId: O, metadata: { mediaRecordingUid: V, questionId: F, responseGroupUid: L, surveyId: D, mediaType: B, url: J, elapsedMs: ce.startTime && Date.now() - ce.startTime } });
|
|
2606
2696
|
}));
|
|
2607
2697
|
});
|
|
2608
|
-
})(l, r, o,
|
|
2609
|
-
const
|
|
2610
|
-
!l.cameraOff &&
|
|
2611
|
-
var
|
|
2612
|
-
return (
|
|
2613
|
-
})).then((
|
|
2614
|
-
|
|
2615
|
-
}).catch((
|
|
2698
|
+
})(l, r, o, Un, s);
|
|
2699
|
+
const N = [{ name: "microphone" }];
|
|
2700
|
+
!l.cameraOff && N.push({ name: "camera" }), Promise.all(N.map((T) => {
|
|
2701
|
+
var p;
|
|
2702
|
+
return (p = navigator == null ? void 0 : navigator.permissions) == null ? void 0 : p.query(T);
|
|
2703
|
+
})).then((T) => {
|
|
2704
|
+
T.reduce((p, f) => p & f.state === "granted", !0) && l && (l.deviceButton && l.deviceButton.hide(), l.record().getDevice());
|
|
2705
|
+
}).catch((T) => {
|
|
2616
2706
|
});
|
|
2617
|
-
},
|
|
2618
|
-
const n =
|
|
2707
|
+
}, ao = (e, t = 3) => {
|
|
2708
|
+
const n = U.document.getElementById("ul-recording-countdown-screen");
|
|
2619
2709
|
n && t === 0 ? (n.remove(), e.record().start()) : n && (n.innerHTML = `<span class='ul-countdown-text'>Recording in... ${t}</span>`, setTimeout(() => {
|
|
2620
|
-
|
|
2710
|
+
ao(e, t - 1);
|
|
2621
2711
|
}, 1e3));
|
|
2622
|
-
},
|
|
2623
|
-
const t =
|
|
2712
|
+
}, lo = (e) => {
|
|
2713
|
+
const t = U.document.createElement("div");
|
|
2624
2714
|
return t.className = "ul-video-container", t.appendChild(((n) => {
|
|
2625
|
-
const r =
|
|
2626
|
-
return r.className = "ul-video-player-loading", r.id =
|
|
2627
|
-
const i =
|
|
2715
|
+
const r = U.document.createElement("div");
|
|
2716
|
+
return r.className = "ul-video-player-loading", r.id = Ft(n), ["first", "second", "third", "fourth"].map((o) => {
|
|
2717
|
+
const i = U.document.createElement("div");
|
|
2628
2718
|
i.className = o, r.appendChild(i);
|
|
2629
2719
|
}), r;
|
|
2630
2720
|
})(e)), t;
|
|
2631
|
-
},
|
|
2632
|
-
const n =
|
|
2721
|
+
}, Et = (e, t) => {
|
|
2722
|
+
const n = U.document.createElement("video");
|
|
2633
2723
|
n.id = e, n.className = "video-js vjs-default-skin ul-video-player-video";
|
|
2634
|
-
const r =
|
|
2724
|
+
const r = U.document.createElement("p");
|
|
2635
2725
|
r.className = "vjs-no-js", r.innerHTML = "To view this video please enable JavaScript, and consider upgrading to a web browser that";
|
|
2636
|
-
const o =
|
|
2726
|
+
const o = U.document.createElement("a");
|
|
2637
2727
|
return o.href = "https://videojs.com/html5-video-support/", o.target = "_blank", o.innerHTML = "supports HTML5 video", r.appendChild(o), n.appendChild(r), t.appendChild(n), t;
|
|
2638
|
-
},
|
|
2639
|
-
e.children()[0].classList.remove("vjs-hidden"), e.audioPlayerPlaceholder.hide(),
|
|
2640
|
-
}, Ye = (e, t) =>
|
|
2641
|
-
|
|
2642
|
-
const l = e +
|
|
2643
|
-
return
|
|
2644
|
-
he(new Error(`Voice & Video feature violates ${
|
|
2645
|
-
}),
|
|
2646
|
-
|
|
2647
|
-
const
|
|
2728
|
+
}, Qi = (e, t) => {
|
|
2729
|
+
e.children()[0].classList.remove("vjs-hidden"), e.audioPlayerPlaceholder.hide(), U.document.getElementById(`${e.id()}_html5_api`).style.height = "100%";
|
|
2730
|
+
}, Ye = (e, t) => U.document.getElementById(e) ? t ? U.videojs(e, t) : U.videojs(e) : (console.error(`Error in finding player element with ID, ${e}`), null), Wi = (e, t, n, r = !1, o = "https://api.sprig.com", i = document, s = null, d = null) => {
|
|
2731
|
+
U.document = i;
|
|
2732
|
+
const l = e + ro, u = lo(l);
|
|
2733
|
+
return U.document.addEventListener("securitypolicyviolation", (h) => {
|
|
2734
|
+
he(new Error(`Voice & Video feature violates ${h.violatedDirective} web page CSP policies for the question player.`), "playerDeviceError", o, {});
|
|
2735
|
+
}), oo(no, () => {
|
|
2736
|
+
U.document.getElementById(Ft(l)).remove(), Et(l, u);
|
|
2737
|
+
const h = { playsinline: !0, playbackRates: [0.5, 1, 1.5, 2], fill: !0 };
|
|
2648
2738
|
try {
|
|
2649
|
-
const c = e +
|
|
2650
|
-
|
|
2651
|
-
const
|
|
2652
|
-
if (!
|
|
2653
|
-
((
|
|
2654
|
-
|
|
2655
|
-
const
|
|
2656
|
-
k &&
|
|
2657
|
-
})(v, s, d), s || v.addClass(
|
|
2658
|
-
const
|
|
2659
|
-
|
|
2739
|
+
const c = e + Rn;
|
|
2740
|
+
Et(c, u);
|
|
2741
|
+
const m = Ye(l, h), v = Ye(c, { muted: !0, ...h });
|
|
2742
|
+
if (!m || !v) return;
|
|
2743
|
+
((b, k, y) => {
|
|
2744
|
+
b.addClass(`ul${Rn}`);
|
|
2745
|
+
const j = new (U.videojs.getComponent("Component"))(b);
|
|
2746
|
+
k && b.src(k), b.addChild(j), y && y(b);
|
|
2747
|
+
})(v, s, d), s || v.addClass(ne);
|
|
2748
|
+
const g = io(m, ["PlaybackRateMenuButton", "PlayToggle", "FullscreenToggle"]), _ = g.children().find((b) => b.name_ === "FullscreenToggle");
|
|
2749
|
+
_.hasClass("vjs-disabled") && _.hide(), so(m, g, t, n, r, v);
|
|
2660
2750
|
} catch (c) {
|
|
2661
2751
|
return void he(new Error(`Error when creating video player object ${c}`), "playerDeviceError", o, {});
|
|
2662
2752
|
}
|
|
2663
2753
|
}), u;
|
|
2664
|
-
},
|
|
2754
|
+
}, Zi = (e) => {
|
|
2665
2755
|
if (!e) return null;
|
|
2666
2756
|
const t = e.match(/https:\/\/stream.mux.com\/(.*)/);
|
|
2667
2757
|
let n = t ? t[1] : null;
|
|
2668
|
-
return n.includes(
|
|
2669
|
-
}, A = { UPLOAD_STARTED: "upload.started", UPLOAD_PROGRESS: "upload.progress", UPLOAD_FINISHED: "upload.finished", DELETE: "delete", ERROR: "error", MEDIA_TYPE: "media.type", PERMISSION_DENIED: "permission_denied", OTHER: "other", UPLOAD_ID: "upload.id", UPLOAD_PROGRESS_PCT: "upload.progress.pct", MEDIA_RECORDING_UID: "media.recording.uid", MEDIA_TYPE_VIDEO: "video", MEDIA_TYPE_AUDIO: "audio" }, ae = { PlaybackRateMenuButton: "Speed", PlayToggle: "Play", FullscreenToggle: "Expand", TurnOnCamera: "Turn on", TurnOffCamera: "Turn off", DeleteButton: "Delete", RecordButton: "Record", StopButton: "Stop", PauseButton: "Pause" }, ke = "ul-card-video__player_recorder",
|
|
2670
|
-
const { apiURL: s, envId: d, handleUploadUpdate: l, headers: u, responseGroupUid:
|
|
2671
|
-
|
|
2672
|
-
const
|
|
2673
|
-
|
|
2758
|
+
return n.includes(Pn) && (n = n.replace(Pn, "")), n ? `https://image.mux.com/${n}/thumbnail.jpg?time=0` : null;
|
|
2759
|
+
}, A = { UPLOAD_STARTED: "upload.started", UPLOAD_PROGRESS: "upload.progress", UPLOAD_FINISHED: "upload.finished", DELETE: "delete", ERROR: "error", MEDIA_TYPE: "media.type", PERMISSION_DENIED: "permission_denied", OTHER: "other", UPLOAD_ID: "upload.id", UPLOAD_PROGRESS_PCT: "upload.progress.pct", MEDIA_RECORDING_UID: "media.recording.uid", MEDIA_TYPE_VIDEO: "video", MEDIA_TYPE_AUDIO: "audio" }, ae = { PlaybackRateMenuButton: "Speed", PlayToggle: "Play", FullscreenToggle: "Expand", TurnOnCamera: "Turn on", TurnOffCamera: "Turn off", DeleteButton: "Delete", RecordButton: "Record", StopButton: "Stop", PauseButton: "Pause" }, ke = "ul-card-video__player_recorder", Hn = "ul-video-btn", gt = 0, Bn = 1, Gi = ({ className: e, message: t, next: n, properties: r, questionId: o, type: i }) => {
|
|
2760
|
+
const { apiURL: s, envId: d, handleUploadUpdate: l, headers: u, responseGroupUid: h, surveyId: c, update: m, viewDocument: v, visitorId: g } = q((p) => ({ apiURL: p.apiURL, envId: p.envId, handleUploadUpdate: p.handleUploadUpdate, headers: p.headers, responseGroupUid: p.responseGroupUid, surveyId: p.surveyId, update: p.update, viewDocument: p.viewDocument, visitorId: p.userId })), [_, b] = z(!1), [k, y] = z(null), [j, I] = z(null), [C, E] = z(gt), x = ee(null), R = r && r.videoUrl;
|
|
2761
|
+
W(() => {
|
|
2762
|
+
const p = x.current, f = new ResizeObserver(() => {
|
|
2763
|
+
m();
|
|
2674
2764
|
});
|
|
2675
|
-
return
|
|
2676
|
-
|
|
2765
|
+
return p && f.observe(p), () => {
|
|
2766
|
+
p && f.unobserve(p);
|
|
2677
2767
|
};
|
|
2678
|
-
}, [
|
|
2679
|
-
const
|
|
2680
|
-
|
|
2681
|
-
},
|
|
2682
|
-
|
|
2683
|
-
const
|
|
2684
|
-
if (
|
|
2768
|
+
}, [m]);
|
|
2769
|
+
const N = (p, f) => {
|
|
2770
|
+
p === A.UPLOAD_STARTED ? (y(f[A.UPLOAD_ID]), I(f[A.MEDIA_RECORDING_UID]), b(!0)) : p === A.DELETE ? (y(null), I(null), b(!1)) : p === A.UPLOAD_PROGRESS ? isNaN(f[A.UPLOAD_PROGRESS_PCT]) ? l({ mediaRecordingUid: f[A.MEDIA_RECORDING_UID], isComplete: !0 }) : l({ mediaRecordingUid: f[A.MEDIA_RECORDING_UID], progressPct: f[A.UPLOAD_PROGRESS_PCT] }) : p === A.UPLOAD_FINISHED && l({ mediaRecordingUid: f[A.MEDIA_RECORDING_UID], isComplete: !0 });
|
|
2771
|
+
}, T = (p) => {
|
|
2772
|
+
p.preventDefault(), p.stopPropagation(), document.getElementById(ke) && ((f) => {
|
|
2773
|
+
const w = f + Mn;
|
|
2774
|
+
if (U.document.getElementById(w) && U.videojs) {
|
|
2685
2775
|
try {
|
|
2686
|
-
if (!
|
|
2776
|
+
if (!U.videojs(w).record().stream) return;
|
|
2687
2777
|
} catch {
|
|
2688
2778
|
return;
|
|
2689
2779
|
}
|
|
2690
|
-
|
|
2780
|
+
U.videojs(w).record().stop(), U.videojs(w).record().stopDevice();
|
|
2691
2781
|
}
|
|
2692
|
-
})(ke), k &&
|
|
2782
|
+
})(ke), k && j ? (l({ mediaRecordingUid: j, isSubmitted: !0 }), n({ value: { mediaRecordingUid: j }, questionId: o, type: i }, !0)) : n({ value: null, questionId: o, type: i }, !0);
|
|
2693
2783
|
};
|
|
2694
|
-
return a("form", { className: H(e, "ul-card--video", "fade-in-transition"), id: "ul-video-interview-form", children: [a(se, { message: t, properties: r }), a(me, { children: [a("div", { id: "ul-question-player-container", ref:
|
|
2695
|
-
if (
|
|
2696
|
-
const
|
|
2697
|
-
|
|
2784
|
+
return a("form", { className: H(e, "ul-card--video", "fade-in-transition"), id: "ul-video-interview-form", children: [a(se, { message: t, properties: r }), a(me, { children: [a("div", { id: "ul-question-player-container", ref: x, style: { display: C === gt ? "" : "none" }, children: [a("div", { id: ke, ref: (p) => {
|
|
2785
|
+
if (p && p.children.length === 0 && !r.hideRecordedPrompt) {
|
|
2786
|
+
const f = Wi(ke, { src: R, type: "application/x-mpegURL" }, void 0, r.mediaType === A.MEDIA_TYPE_AUDIO, s, v);
|
|
2787
|
+
p.appendChild(f);
|
|
2698
2788
|
}
|
|
2699
|
-
} }), a(pe, { defaultBody: () => a("button", { className: `${
|
|
2700
|
-
|
|
2701
|
-
const
|
|
2702
|
-
|
|
2703
|
-
})(ke),
|
|
2704
|
-
} }), properties: r })] }), a("div", { style: { display:
|
|
2705
|
-
|
|
2706
|
-
}, style: { display: r.hideRecordedPrompt ? "none" : "block" } }), a("div", { id: "ul-recorder-player-container", ref: (
|
|
2707
|
-
if (
|
|
2708
|
-
const
|
|
2709
|
-
|
|
2710
|
-
const
|
|
2711
|
-
return
|
|
2712
|
-
he(new Error(`Voice & Video feature violates ${
|
|
2713
|
-
}),
|
|
2714
|
-
|
|
2789
|
+
} }), a(pe, { defaultBody: () => a("button", { className: `${Hn} ul-record-response-btn`, onClick: (p) => {
|
|
2790
|
+
p.preventDefault(), p.stopPropagation(), document.getElementById(ke) && ((f) => {
|
|
2791
|
+
const w = Ye(f + ro);
|
|
2792
|
+
w == null || w.pause();
|
|
2793
|
+
})(ke), E(Bn);
|
|
2794
|
+
} }), properties: r })] }), a("div", { style: { display: C === Bn ? "block" : "none" }, children: [a("button", { className: `${Hn} ul-back-question-btn`, onClick: (p) => {
|
|
2795
|
+
p.preventDefault(), p.stopPropagation(), E(gt);
|
|
2796
|
+
}, style: { display: r.hideRecordedPrompt ? "none" : "block" } }), a("div", { id: "ul-recorder-player-container", ref: (p) => {
|
|
2797
|
+
if (p && p.children.length === 0) {
|
|
2798
|
+
const f = ((w, S = {}, D = "https://api.userleap.com", L, P, O, F = !1, B = document) => {
|
|
2799
|
+
U.document = B;
|
|
2800
|
+
const V = w + Mn, $ = lo(V);
|
|
2801
|
+
return U.document.addEventListener("securitypolicyviolation", (J) => {
|
|
2802
|
+
he(new Error(`Voice & Video feature violates ${J.violatedDirective} web page CSP policies for the recorder player.`), "recorderDeviceError", D, O, S.visitorId, S.envId);
|
|
2803
|
+
}), oo(no.concat(Vi), () => {
|
|
2804
|
+
Et(V, $), U.document.getElementById(Ft(V)).remove();
|
|
2715
2805
|
try {
|
|
2716
|
-
|
|
2717
|
-
} catch (
|
|
2718
|
-
return void he(new Error(`Error when creating video recorder player object ${
|
|
2806
|
+
$i($, V, S, D, L, P, O, F);
|
|
2807
|
+
} catch (J) {
|
|
2808
|
+
return void he(new Error(`Error when creating video recorder player object ${J}`), "recorderDeviceError", D, O, S.visitorId, S.envId);
|
|
2719
2809
|
}
|
|
2720
|
-
}),
|
|
2721
|
-
})(ke, { surveyId: c, responseGroupUid:
|
|
2722
|
-
|
|
2810
|
+
}), $;
|
|
2811
|
+
})(ke, { surveyId: c, responseGroupUid: h, questionId: o, visitorId: g, envId: d }, s, N, void 0, { ...u, "x-ul-video-recorder-origin": "sdk" }, r.mediaType === A.MEDIA_TYPE_AUDIO, v);
|
|
2812
|
+
p.appendChild(f);
|
|
2723
2813
|
}
|
|
2724
|
-
} })] })] }), a(
|
|
2725
|
-
},
|
|
2726
|
-
const { uploadProgress: t } =
|
|
2814
|
+
} })] })] }), a(be, { children: [a(te, { disabled: !_, onClick: T, children: xe(r) }), a("button", { className: "ul-card-text__button ul-button-inactive ul-card-skip__button", id: "ul-card-video__skip_button", onClick: T, style: { display: r.required ? "none" : "block", ..._ ? { display: "none" } : {} }, children: Bt(r) })] })] });
|
|
2815
|
+
}, Ki = ({ className: e }) => {
|
|
2816
|
+
const { uploadProgress: t } = q((i) => ({ uploadProgress: i.uploadProgress }));
|
|
2727
2817
|
let n, r;
|
|
2728
2818
|
Object.values(t).filter((i) => i.isSubmitted).length > 1 ? (n = "Your responses are processing", r = "Please keep this tab open until your responses are fully processed.") : (n = "Your response is processing", r = "Please keep this tab open until your response is fully processed.");
|
|
2729
2819
|
const o = Math.round(Math.min(99, ...Object.values(t).filter((i) => i.isSubmitted).map((i) => i.progressPct || 0)));
|
|
2730
2820
|
return a("div", { className: H(e, "ul-card--uploading", "fade-in-transition"), children: [a("div", { "aria-busy": "true", "aria-label": "Processing...", "aria-live": "polite", className: "ul-loading-spinner-container", role: "progressbar", children: a("div", { className: "ul-loading-spinner", children: [a("div", { className: "first" }), a("div", { className: "second" }), a("div", { className: "third" }), a("div", { className: "fourth" })] }) }), a(se, { message: `${n} (${o}% complete)` }), a("p", { className: "ul-caption", children: r })] });
|
|
2731
|
-
},
|
|
2821
|
+
}, Yi = () => {
|
|
2732
2822
|
var k;
|
|
2733
|
-
const { border: e, cards: t, forceBrandedLogo: n, headers: r, index: o, marketingUrl: i, showSurveyBrand: s, slugName: d, surveyId: l, viewedCardCount: u } =
|
|
2823
|
+
const { border: e, cards: t, forceBrandedLogo: n, headers: r, index: o, marketingUrl: i, showSurveyBrand: s, slugName: d, surveyId: l, viewedCardCount: u } = q((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 })), h = ee(null), c = t.filter((y) => y.type !== "uploading" && y.type !== "thanks"), m = ((y, j) => {
|
|
2734
2824
|
const I = /* @__PURE__ */ new Set(["thanks", "uploading"]);
|
|
2735
|
-
if (
|
|
2736
|
-
const
|
|
2737
|
-
if (
|
|
2738
|
-
const
|
|
2739
|
-
for (let
|
|
2740
|
-
const
|
|
2741
|
-
if (
|
|
2742
|
-
|
|
2825
|
+
if (j >= y.length || j < 0 || I.has(y[j].type)) return 0;
|
|
2826
|
+
const C = y.filter((x) => !I.has(x.type));
|
|
2827
|
+
if (j === C.length - 1) return 1;
|
|
2828
|
+
const E = { [C.length - 1]: 1, [-1]: 0 };
|
|
2829
|
+
for (let x = C.length - 2; x >= j; x--) {
|
|
2830
|
+
const R = C[x], N = Xo(x, R.props.routingOptions);
|
|
2831
|
+
if (N.length === 0) {
|
|
2832
|
+
E[x] = E[x + 1] + 1;
|
|
2743
2833
|
continue;
|
|
2744
2834
|
}
|
|
2745
|
-
let
|
|
2746
|
-
if (
|
|
2747
|
-
for (let
|
|
2748
|
-
const { comparator:
|
|
2749
|
-
const
|
|
2750
|
-
return !(
|
|
2835
|
+
let T = 0, p = Ko(R);
|
|
2836
|
+
if (p === null) return C.length - 1 - j;
|
|
2837
|
+
for (let f = 0; f < N.length && p.length !== 0; f++) {
|
|
2838
|
+
const { comparator: w, target: S, value: D } = N[f], L = p.filter((P) => {
|
|
2839
|
+
const O = Go({ value: P }, R.type, P), F = Dr(P, R.type);
|
|
2840
|
+
return !(O && w === "answered" || F && w === "partial" || !O && !F && w === "skipped" || w === "given_up" && Jo(P) && P.taskStatus === "given.up" || O && R.type === "open" && (w === "contains" || w === "notcontains") || O && Yo(w) && Ut[w](P, D));
|
|
2751
2841
|
});
|
|
2752
|
-
if (
|
|
2753
|
-
const
|
|
2754
|
-
if (
|
|
2755
|
-
|
|
2842
|
+
if (L.length < p.length) {
|
|
2843
|
+
const P = parseInt(String(S), 10);
|
|
2844
|
+
if (P !== -1 && P <= x || P >= C.length) return C.length - 1 - j;
|
|
2845
|
+
T = Math.max(E[P] + 1, T);
|
|
2756
2846
|
}
|
|
2757
|
-
|
|
2847
|
+
p = L;
|
|
2758
2848
|
}
|
|
2759
|
-
|
|
2849
|
+
p.length > 0 && (T = Math.max(E[x + 1] + 1, T)), E[x] = T;
|
|
2760
2850
|
}
|
|
2761
|
-
return
|
|
2762
|
-
})(t, o), v = u + 1,
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
}, [
|
|
2766
|
-
const
|
|
2767
|
-
return a("footer", { className: "ul-footer " + (r["userleap-platform"] === "link" ? "ul-footer__link" : ""), children:
|
|
2768
|
-
},
|
|
2769
|
-
const e =
|
|
2851
|
+
return E[j];
|
|
2852
|
+
})(t, o), v = u + 1, g = v / (v + m), _ = Vr({ marketingUrl: i, slugName: d, surveyId: l, forceBrandedLogo: n });
|
|
2853
|
+
W(() => {
|
|
2854
|
+
h.current && (h.current.style.width = 100 * g + "%");
|
|
2855
|
+
}, [g]);
|
|
2856
|
+
const b = ((k = t[o]) == null ? void 0 : k.type) === "thanks";
|
|
2857
|
+
return a("footer", { className: "ul-footer " + (r["userleap-platform"] === "link" ? "ul-footer__link" : ""), children: b && n ? a(Fr, { marketingUrlLink: _ }) : a(Y, { children: [c.length > 1 && a("div", { className: "ul-progress-bar-container ul-progress-bar-container__footer", children: a("div", { className: "ul-progress-bar-current", ref: h, style: { border: `1px solid ${e || "#000"}` } }) }), s ? a(Ar, { forceBrandedLogo: n, marketingUrlLink: _ }) : null] }) });
|
|
2858
|
+
}, Ji = () => {
|
|
2859
|
+
const e = q((s) => s.border), t = q((s) => s.cards), n = q((s) => s.index), r = q((s) => s.focusedQuestionId), { totalQuestions: o, fraction: i } = de(() => {
|
|
2770
2860
|
var u;
|
|
2771
|
-
const s = t.filter((
|
|
2861
|
+
const s = t.filter((h) => h.type !== "uploading" && h.type !== "thanks"), d = s.length;
|
|
2772
2862
|
if (d <= 1) return { totalQuestions: d, fraction: 0 };
|
|
2773
2863
|
if (((u = t[n]) == null ? void 0 : u.type) === "thanks") return { totalQuestions: d, fraction: 1 };
|
|
2774
|
-
const l = s.findIndex((
|
|
2864
|
+
const l = s.findIndex((h) => h.name === r);
|
|
2775
2865
|
return { totalQuestions: d, fraction: (l >= 0 ? l : 0) / d };
|
|
2776
2866
|
}, [t, n, r]);
|
|
2777
2867
|
return o <= 1 ? null : a("div", { className: "ul-progress-bar-container ul-progress-bar-container__header", children: a("div", { className: "ul-progress-bar-current", style: { width: 100 * i + "%", border: `1px solid ${e ?? "#000"}` } }) });
|
|
2778
|
-
},
|
|
2779
|
-
const { answers: e, border: t, cards: n, close: r, configureExitOnOverlayClick: o, destroy: i, endCard: s, eventEmitFn: d, fontFamily: l, headers: u, index:
|
|
2780
|
-
|
|
2781
|
-
if (window.Sprig) return window.Sprig.trackHistory = (
|
|
2868
|
+
}, Xi = () => {
|
|
2869
|
+
const { answers: e, border: t, cards: n, close: r, configureExitOnOverlayClick: o, destroy: i, endCard: s, eventEmitFn: d, fontFamily: l, headers: u, index: h, minScrollableHeight: c, next: m, previewMode: v, productConfig: g, seen: _, showStripes: b, studyType: k, surveyId: y, update: j, useMobileStyling: I, viewDocument: C } = q((L) => ({ answers: L.answers, border: L.border, cards: L.cards, close: L.close, configureExitOnOverlayClick: L.configureExitOnOverlayClick, destroy: L.destroy, endCard: L.endCard, eventEmitFn: L.eventEmitFn, fontFamily: L.fontFamily, headers: L.headers, index: L.index, previewMode: L.previewMode, productConfig: L.productConfig, minScrollableHeight: L.minScrollableHeight, next: L.next, seen: L.seen, showStripes: L.showStripes, studyType: L.studyType, surveyId: L.surveyId, update: L.update, useMobileStyling: L.useMobileStyling, viewDocument: L.viewDocument })), E = ee(null), x = ee(!1), R = u["userleap-platform"], { props: N, type: T, name: p } = n[h];
|
|
2870
|
+
W(() => {
|
|
2871
|
+
if (window.Sprig) return window.Sprig.trackHistory = (L) => q.getState().trackHistory(L), () => {
|
|
2782
2872
|
window.Sprig.trackHistory = void 0;
|
|
2783
2873
|
};
|
|
2784
|
-
}, []),
|
|
2785
|
-
|
|
2786
|
-
}, [d,
|
|
2787
|
-
const
|
|
2788
|
-
|
|
2874
|
+
}, []), W(() => {
|
|
2875
|
+
E.current && (E.current.classList.contains("ul-app--visible") || E.current.classList.add("ul-app--visible"), !x.current && d && (x.current = !0, d(ie.SurveyAppeared, { name: ie.SurveyAppeared, "survey.id": y })));
|
|
2876
|
+
}, [d, y]), W(() => {
|
|
2877
|
+
const L = () => {
|
|
2878
|
+
C.visibilityState === "visible" && (_(), C.removeEventListener("visibilitychange", L));
|
|
2789
2879
|
};
|
|
2790
|
-
return
|
|
2791
|
-
|
|
2880
|
+
return C.addEventListener("visibilitychange", L), L(), () => {
|
|
2881
|
+
C.removeEventListener("visibilitychange", L);
|
|
2792
2882
|
};
|
|
2793
|
-
}, [
|
|
2794
|
-
|
|
2795
|
-
}, [
|
|
2883
|
+
}, [_, C]), W(() => {
|
|
2884
|
+
j();
|
|
2885
|
+
}, [h, j]), W(() => {
|
|
2796
2886
|
o(() => r());
|
|
2797
2887
|
}, [r, o]);
|
|
2798
|
-
const
|
|
2799
|
-
|
|
2800
|
-
}, [
|
|
2888
|
+
const f = de(() => vo(n, h), [n, h]), w = Wr(n), S = Se((L) => {
|
|
2889
|
+
m({ data: L, completeSurvey: () => i(je), endCard: s }), go(C);
|
|
2890
|
+
}, [m, i, s, C]);
|
|
2801
2891
|
if (e) {
|
|
2802
|
-
for (const
|
|
2803
|
-
let
|
|
2804
|
-
if (
|
|
2805
|
-
const
|
|
2806
|
-
if (!
|
|
2807
|
-
|
|
2808
|
-
} else
|
|
2809
|
-
|
|
2892
|
+
for (const L of e) if (L.questionId === p) {
|
|
2893
|
+
let P;
|
|
2894
|
+
if (T === "multiplechoice") {
|
|
2895
|
+
const O = N.options.find(({ value: F }) => F === L.value);
|
|
2896
|
+
if (!O) break;
|
|
2897
|
+
P = { [O.id]: O.value };
|
|
2898
|
+
} else P = L.value;
|
|
2899
|
+
S({ value: P, type: T, questionId: L.questionId });
|
|
2810
2900
|
break;
|
|
2811
2901
|
}
|
|
2812
2902
|
}
|
|
2813
|
-
const D = !I && ((
|
|
2814
|
-
return a("div", { className: H("ul-app", We(u) ? "ul-app--visible" : "ul-app--overlay"), dir: "auto", id: je, onClick: (
|
|
2815
|
-
var
|
|
2816
|
-
const
|
|
2817
|
-
if (!
|
|
2818
|
-
const
|
|
2819
|
-
for (const
|
|
2820
|
-
|
|
2903
|
+
const D = !I && ((g == null ? void 0 : g.framePosition) === "center" || (g == null ? void 0 : g.desktopDisplay) === "center-modal" || ((g == null ? void 0 : g.placement) || "").includes("center"));
|
|
2904
|
+
return a("div", { className: H("ul-app", We(u) ? "ul-app--visible" : "ul-app--overlay"), dir: "auto", id: je, onClick: (L) => {
|
|
2905
|
+
var B;
|
|
2906
|
+
const P = window.sprigAPI, O = L.target;
|
|
2907
|
+
if (!P || !O) return;
|
|
2908
|
+
const F = [O, O.parentElement];
|
|
2909
|
+
for (const V of F) if (((B = V == null ? void 0 : V.tagName) == null ? void 0 : B.toLowerCase()) === "a") {
|
|
2910
|
+
L.preventDefault();
|
|
2821
2911
|
try {
|
|
2822
|
-
const
|
|
2823
|
-
|
|
2824
|
-
} catch (
|
|
2825
|
-
console.error(
|
|
2912
|
+
const $ = new URL(V.href);
|
|
2913
|
+
$.protocol !== "http:" && $.protocol !== "https:" || (P == null || P.openUrl($.toString()));
|
|
2914
|
+
} catch ($) {
|
|
2915
|
+
console.error($);
|
|
2826
2916
|
}
|
|
2827
2917
|
return;
|
|
2828
2918
|
}
|
|
2829
|
-
}, ref:
|
|
2830
|
-
},
|
|
2831
|
-
const t = { audioBitsPerSecond: 128e3, videoBitsPerSecond: 25e5, mimeType:
|
|
2919
|
+
}, ref: E, style: { "--theme": t, ...l ? { fontFamily: l.replace(";", "") } : {}, ...D ? { position: "relative" } : {} }, children: a("div", { className: "ul-app__container", children: a("div", { className: H(X("ul-card__container", I, k)), style: { ...k !== "feedbackButton" || (g == null ? void 0 : g.desktopDisplay) === "center-modal" ? { borderColor: t } : {}, ...(g == null ? void 0 : g.desktopDisplay) === "slider" ? { margin: "0px" } : {} }, children: a("div", { className: "sprig-container", style: { minHeight: c }, children: [b && a("div", { className: "ul-header__container", dir: "ltr", children: a("div", { className: "ul-header", children: "For development purposes only" }) }), v && a("div", { className: "ul-header__container", dir: "ltr", children: a("div", { className: "ul-header", children: "Preview Mode: Response will not be recorded." }) }), re(k) && a(Ji, {}), a("div", { className: H(ni("ul-card-main-content", R)), children: a(Li, { cards: f, next: S, previousResponses: w }) }), !re(k) && a(Yi, {})] }) }) }) });
|
|
2920
|
+
}, co = () => MediaRecorder.isTypeSupported("video/webm") ? "video/webm" : "video/mp4", qn = (e) => {
|
|
2921
|
+
const t = { audioBitsPerSecond: 128e3, videoBitsPerSecond: 25e5, mimeType: co() };
|
|
2832
2922
|
return new MediaRecorder(e, t);
|
|
2833
|
-
},
|
|
2923
|
+
}, An = (e, t, n) => {
|
|
2834
2924
|
n[t] = [], e.ondataavailable = function(r) {
|
|
2835
2925
|
n[t].push(r.data);
|
|
2836
2926
|
}, e.currentMediaRecordingUid = t, e.start();
|
|
2837
2927
|
};
|
|
2838
|
-
function
|
|
2928
|
+
function Fn(e, t, n, r, o, i) {
|
|
2839
2929
|
if (e && e.state !== "inactive") {
|
|
2840
2930
|
const { "begin.callback": s } = r, d = e.currentMediaRecordingUid;
|
|
2841
2931
|
if (!d) return;
|
|
2842
|
-
s && s(d), e.onstop = () => async function(l, u,
|
|
2843
|
-
const
|
|
2844
|
-
var
|
|
2845
|
-
const
|
|
2846
|
-
if (
|
|
2847
|
-
const
|
|
2848
|
-
return (
|
|
2932
|
+
s && s(d), e.onstop = () => async function(l, u, h, c, m, v, g) {
|
|
2933
|
+
const _ = q.getState().viewDocument, { "upload.callback": b, "progress.callback": k } = c, y = { mediaType: h, updatedAt: (/* @__PURE__ */ new Date()).toISOString(), mediaRecordingUid: m, ...c["passthrough.data"] }, j = await (async (x, R) => {
|
|
2934
|
+
var T;
|
|
2935
|
+
const N = await fetch(R, { method: "POST", cache: "no-cache", headers: { "Content-Type": "application/json" }, body: JSON.stringify(x) });
|
|
2936
|
+
if (N.ok) {
|
|
2937
|
+
const p = await N.json();
|
|
2938
|
+
return (T = p == null ? void 0 : p.upload) == null ? void 0 : T.url;
|
|
2849
2939
|
}
|
|
2850
2940
|
return null;
|
|
2851
|
-
})(
|
|
2852
|
-
if (!
|
|
2853
|
-
const I = new Blob(
|
|
2854
|
-
if (!
|
|
2855
|
-
const
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
}),
|
|
2859
|
-
k && k(
|
|
2860
|
-
}),
|
|
2861
|
-
|
|
2941
|
+
})(y, l);
|
|
2942
|
+
if (!j) return void (b && b(null, { message: "failed to get upload url" }));
|
|
2943
|
+
const I = new Blob(g, { type: co() });
|
|
2944
|
+
if (!_.defaultView) return;
|
|
2945
|
+
const C = new _.defaultView.File([I], `recording video ${Date.now()}`), E = v.createUpload({ endpoint: j, file: C, chunkSize: 5120 });
|
|
2946
|
+
E.on("error", (x) => {
|
|
2947
|
+
b && b(null, x);
|
|
2948
|
+
}), E.on("progress", (x) => {
|
|
2949
|
+
k && k(m, x);
|
|
2950
|
+
}), E.on("success", () => {
|
|
2951
|
+
b && b(m, !0);
|
|
2862
2952
|
});
|
|
2863
2953
|
}(t, 0, n, r, d, o, i), e.stop();
|
|
2864
2954
|
}
|
|
2865
2955
|
}
|
|
2866
|
-
const
|
|
2956
|
+
const es = { state: { chunks: {} }, stopRecording(e) {
|
|
2867
2957
|
const { uploadApiEndpoint: t, avRecorder: n, screenRecorder: r, UpChunk: o } = this.state, i = this.state.avStream && this.state.avStream.getVideoTracks().length > 0 ? "video" : "audio";
|
|
2868
|
-
this.state.chunks && t && o && (n != null && n.currentMediaRecordingUid &&
|
|
2958
|
+
this.state.chunks && t && o && (n != null && n.currentMediaRecordingUid && Fn(n, t, i, e, o, this.state.chunks[n == null ? void 0 : n.currentMediaRecordingUid]), r != null && r.currentMediaRecordingUid && Fn(r, t, "screen", e, o, this.state.chunks[r == null ? void 0 : r.currentMediaRecordingUid]));
|
|
2869
2959
|
}, handleCancelledStream(e) {
|
|
2870
2960
|
const t = e.getVideoTracks(), n = e.getAudioTracks();
|
|
2871
2961
|
let r = t.length && t[0];
|
|
@@ -2912,14 +3002,14 @@ const zi = { state: { chunks: {} }, stopRecording(e) {
|
|
|
2912
3002
|
if (!t) return;
|
|
2913
3003
|
const r = [];
|
|
2914
3004
|
if (t.includes("video") && this.state.avStream) {
|
|
2915
|
-
this.state.avRecorder =
|
|
2916
|
-
const o =
|
|
2917
|
-
|
|
3005
|
+
this.state.avRecorder = qn(this.state.avStream);
|
|
3006
|
+
const o = vt();
|
|
3007
|
+
An(this.state.avRecorder, o, this.state.chunks), r.push(o);
|
|
2918
3008
|
}
|
|
2919
3009
|
if (t.includes("screen") && this.state.captureStream) {
|
|
2920
|
-
this.state.screenRecorder =
|
|
2921
|
-
const o =
|
|
2922
|
-
|
|
3010
|
+
this.state.screenRecorder = qn(this.state.captureStream);
|
|
3011
|
+
const o = vt();
|
|
3012
|
+
An(this.state.screenRecorder, o, this.state.chunks), r.push(o);
|
|
2923
3013
|
}
|
|
2924
3014
|
r && n && n(r);
|
|
2925
3015
|
}, async finishTaskCallback(e) {
|
|
@@ -2932,15 +3022,15 @@ const zi = { state: { chunks: {} }, stopRecording(e) {
|
|
|
2932
3022
|
const { "permission.status.callback": t } = e, n = this.state.avStream;
|
|
2933
3023
|
t && t(n, !!n && (n == null ? void 0 : n.getVideoTracks().length) > 0, !!((r = this.state.captureStream) != null && r.active), this.state.captureStream);
|
|
2934
3024
|
}, lookAheadAndStopStream(e, t, n, r) {
|
|
2935
|
-
const { avRecorder: o, screenRecorder: i } = this.state, { allResponses: s } =
|
|
3025
|
+
const { avRecorder: o, screenRecorder: i } = this.state, { allResponses: s } = q.getState(), d = Pr({ cards: n, index: e, hasEndCard: r, allResponses: s });
|
|
2936
3026
|
d !== null && n[d].type === "recordedtask" || [o, i].map((l) => {
|
|
2937
3027
|
l && (l.state === "recording" && l.stop(), l.stream.getTracks().map((u) => {
|
|
2938
3028
|
u.readyState === "live" && u.stop();
|
|
2939
3029
|
}));
|
|
2940
3030
|
});
|
|
2941
|
-
} }, Qe = Object.create(
|
|
3031
|
+
} }, Qe = Object.create(es);
|
|
2942
3032
|
Object.freeze(Qe);
|
|
2943
|
-
const
|
|
3033
|
+
const ts = ({ mode: e = null, viewWindow: t, viewDocument: n, trackPageViewUrl: r }) => {
|
|
2944
3034
|
const o = n.documentElement;
|
|
2945
3035
|
let i;
|
|
2946
3036
|
try {
|
|
@@ -2949,31 +3039,31 @@ const $i = ({ mode: e = null, viewWindow: t, viewDocument: n, trackPageViewUrl:
|
|
|
2949
3039
|
i = t.location.href;
|
|
2950
3040
|
}
|
|
2951
3041
|
return { mode: e, sw: t.screen.width, sh: t.screen.height, cw: o.clientWidth, ch: o.clientHeight, p: r ?? i, l: t.navigator.language };
|
|
2952
|
-
},
|
|
3042
|
+
}, os = { configure: function(e, t = !0) {
|
|
2953
3043
|
var k;
|
|
2954
|
-
const { answers: n, apiURL: r, endCard: o, eventEmitFn: i, fontFamilyURL: s, frame: d, previewKey: l, viewDocument: u, viewWindow:
|
|
2955
|
-
const I = [...
|
|
2956
|
-
return
|
|
3044
|
+
const { answers: n, apiURL: r, endCard: o, eventEmitFn: i, fontFamilyURL: s, frame: d, previewKey: l, viewDocument: u, viewWindow: h } = e, c = We(e.headers) ? e.frame : u.body, m = e.UpChunk || window.UpChunk, v = Re, g = ((y, j) => {
|
|
3045
|
+
const I = [...y], C = /* @__PURE__ */ new Set(["videovoice", "recordedtask"]);
|
|
3046
|
+
return y.some((E) => C.has(E.type)) && I.push({ name: -2, props: { routingOptions: [] }, type: "uploading" }), j && I.push({ name: -1, props: { routingOptions: [] }, type: "thanks" }), I;
|
|
2957
3047
|
})(e.cards, !!o);
|
|
2958
|
-
Qe.configure(v, { cards:
|
|
2959
|
-
const { head:
|
|
2960
|
-
if (Vt({ document: u, elementId: "sprig-style", styleString: `html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}button,input,select,textarea{margin:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}ol,ul{padding-inline-start:1em}.ul-loading-spinner-container{font-size:1.8rem;flex-grow:1;width:100%;height:100%;display:flex;align-items:center;justify-content:center}.ul-loading-spinner{display:inline-block;position:relative;width:6rem;height:6rem}.ul-loading-spinner div{box-sizing:border-box;display:block;position:absolute;width:80%;height:80%;margin:5px;border:5px solid #152e3e;border-radius:50%;animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:#152e3e transparent transparent transparent}.ul-loading-spinner .first{animation-delay:-.45s}.ul-loading-spinner .second{animation-delay:-.3s}.ul-loading-spinner .third{animation-delay:-.15s}@keyframes lds-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.fade-in-transition{animation:fadeIn .4s ease-in}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.ul-card{flex:1 1 auto;border-radius:2px;display:flex;flex-direction:column;font-size:17px;line-height:19px;text-align:start;min-width:200px;justify-content:center;animation:enable-transitions 0s .3s forwards;min-height:0}@keyframes enable-transitions{to{transition:opacity .2s ease-in-out}}.ul-focus-transitions-active .ul-card,.ul-card--with-transitions{transition:opacity .2s ease-in-out}.ul-card__container--desktop{border:2px solid #fff;box-shadow:0 0 15px #00000026;margin:15px}.ul-card__container--mobile{border-width:0;box-shadow:0 0 5px #00000040;margin-top:5px}.ul-card__container--desktop_longFormSurvey,.ul-card__container--mobile_longFormSurvey{margin:0}.sprig-container{display:flex;flex-direction:column;width:100%;height:fit-content;flex:1 1 auto;min-height:0;justify-content:center}.ul-card__container{background:#fff;border-radius:6px;display:flex;flex-direction:column;flex-grow:1;flex:1 1 auto;font-size:17px;line-height:23px;padding:0;min-height:0;position:relative;text-align:center;word-break:normal;overflow:auto}.ul-card__container--desktop_feedbackButton{box-shadow:unset}.ul-card-vertical__button-wrapper{flex-direction:column;align-items:center}.ul-card__button-wrapper{margin-top:4px;display:flex;gap:16px;justify-content:center;align-self:stretch}.sprig-question-footer-container{align-items:center;width:100%;height:fit-content;display:flex;flex-direction:column;padding:12px 20px 0}.long-form-question-footer-container{position:fixed;bottom:0;left:0;width:100%;display:flex;justify-content:space-between;align-items:center;overflow:visible;z-index:1000;pointer-events:none;padding:32px}.long-form-question-footer-container--mobile{background-color:#fff;border-top:1px solid #e6e6e6;padding:16px 24px}.long-form-question-footer-container-center{justify-content:center}.long-form-question-footer-container .long-form-question-footer-container-logo{width:auto;pointer-events:auto}.long-form-question-footer-container-center .long-form-question-footer-container-logo{margin-left:0}.long-form-question-footer-container .long-form-question-footer-container-actions{display:flex;gap:8px;pointer-events:auto}.long-form-question-footer-container .long-form-question-footer-container-actions .long-form-button{display:flex;justify-content:center;align-items:center;gap:8px;padding:12px;border-radius:8px;height:40px;width:40px}.long-form-question-footer-container .long-form-question-footer-container-actions .long-form-button .long-form-button-text-container{display:flex;align-items:center}.ul-rich-text-body{min-height:2em}.ul-rich-text-body,.ul-rich-text-body p{margin-top:10px;margin-bottom:10px}.ul-rich-text-body li{margin:5px 0}.ul-rich-text-body p,.ul-rich-text-body li{font-size:15px;line-height:130.35%;letter-spacing:.02em;color:#343442;text-align:start;white-space:pre-line}.ul-rich-text-body:last-child,.ul-rich-text-body li:last-child{margin-bottom:15px}.ul-card-main-content__link,.ul-card-main-content__email,.ul-card-main-content__web,.ul-card-main-content__android,.ul-card-main-content__ios{display:flex;flex:1 1 auto;min-height:0;flex-direction:column;z-index:2;height:fit-content}.sprig-border-bottom{border-bottom:1px solid rgba(0,0,0,.1)}.sprig-border-top{border-top:1px solid rgba(0,0,0,.1)}.question-header-container{z-index:1}.sprig-header-container{padding:16px}.question-header-button-container{display:grid;grid-template-columns:97fr 3fr;align-items:center;justify-content:space-between;width:100%;height:fit-content}.ul-card--thanks-content .question-header-button-container{justify-content:center}.sprig-question-body{padding:0 20px;min-height:0;flex-shrink:1;overflow:auto;position:relative;align-self:stretch;width:100%}.sprig-stretch{align-self:stretch}.ul-question{color:#343442;display:block;font-size:17px;line-height:125%;font-weight:500;cursor:default;text-align:start}.ul-question ol,.ul-question ul,.ul-caption ol,.ul-caption ul{margin-left:1em}.ul-caption{flex:1 0 auto;font-size:14px;line-height:130.35%;letter-spacing:.02em;color:#6c6c6e;text-align:start;margin-top:4px}.ul-card__choices{margin:5px 0 0;flex:1 0}.choice--mobile{border:2px solid #e6e6e6}.choice--desktop{border:1px solid #e6e6e6}.choice{align-items:flex-start;color:#262136;cursor:pointer;display:flex;justify-content:flex-start;flex-direction:column;box-sizing:border-box;border-radius:3px;margin-bottom:7px;font-size:15px;line-height:20px;padding:10px 20px 10px 15px;background-color:#00000003}.choice--desktop:hover,.choice--desktop:active,.choice--mobile:active{background-color:#0000000d}.choice-label-container{align-items:center;display:flex;flex-direction:row;flex:0 0 fit-content;gap:15px;height:fit-content;justify-content:flex-start;width:100%}.choice-text-entry-container{width:100%;height:fit-content;flex:0 1 fit-content;overflow:hidden}.choice .choice-text-input--mobile{max-height:63px}.choice .choice-text-input--desktop{max-height:150px}.choice .choice-text-input{box-sizing:border-box;background-color:transparent;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;min-height:20px;max-height:60px;padding:0;margin-top:8px;resize:none;width:100%;font-size:14px;line-height:20px;outline:none;border:none;overflow-wrap:break-word}.choice .choice-text-input::placeholder{color:#6c6c6e80}.ul-thanks-check{text-align:center;margin-bottom:20px}.ul-card--thanks-content{padding:20px 0 10px}.ul-card--thanks .ul-question{padding-top:0;text-align:center}.ul-card--thanks .ul-caption{padding-top:0;text-align:center;overflow-wrap:break-word;-webkit-hyphens:auto;hyphens:auto;hyphenate-limit-lines:no-limit}.ul-card--uploading .ul-question{padding-top:15px;text-align:center}.ul-card--uploading .ul-caption{padding-top:5px;text-align:center;overflow-wrap:break-word}.select-checkbox{height:16px;width:16px;display:flex;box-sizing:border-box;background-color:"transparent";align-items:center;justify-content:center;border-radius:4px;border:1px solid #b0b5b7;flex-shrink:0}.select-radio{height:16px;width:16px;border-radius:16px;border:1px solid #323232;display:flex;box-sizing:border-box;box-shadow:inset 2px 2px #0000001a;background-color:"transparent";align-items:center;justify-content:center}.footer{width:100%;margin-top:12px;font-size:12px;line-height:12px;color:#000000b3}[class^=CenteredSurveyLayout] .ul-header__container,[class^=QuestionConceptTestLayout] .ul-header__container,.ul-websurvey-frame .ul-card__container,.ul-websurvey-frame-mobile .ul-card__container{margin-bottom:unset}[class^=CenteredSurveyLayout] .ul-card__container,[class^=QuestionConceptTestLayout] .ul-card__container,.ul-websurvey-frame .ul-card__container,.ul-websurvey-frame-mobile .ul-card__container{align-self:center;box-shadow:unset;border-radius:unset;border:none!important;position:unset;width:100%}@media only screen and (min-height: 600px) and (width: 600px){.ul-card{position:relative;top:-20px}}.ul-vertical-centered-container{display:flex;flex-direction:column;align-items:center;align-self:stretch}.sprig-accordion{width:100%;margin-bottom:8px}.sprig-accordion-body{width:100%;overflow:hidden}.sprig-accordion-header-container{background:transparent;border:none;display:flex;flex-direction:row;align-items:center;justify-content:space-between;width:100%;cursor:pointer;margin:8px 0 0;padding:0;font-family:inherit}.sprig-header-label-container{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:8px;flex:1 1 0}.sprig-header-label{color:#343442;font-size:15px;font-weight:590;line-height:21px;text-align:start;overflow:hidden}.sprig-check-background{flex:0 0 16px;height:16px;width:16px;border-radius:8px;margin-right:8px;background-color:#efefee;display:flex;align-items:center;justify-content:center}.sprig-check{height:9px;width:9px;margin-left:-1px}.sprig-check path{stroke:#506067;stroke-width:1.5}.sprig-caret{height:20px;width:20px;transition-property:transform}.sprig-caret path{stroke:#000}.ul-card-longform__submit-button-container{display:flex;justify-content:flex-end}.ul-card-longform__submit-button-container .ul-card-longform__submit-button{display:flex;flex-direction:row;align-items:center;white-space:nowrap;gap:4px;border-radius:8px;color:#fff;cursor:pointer}.ul-card-longform__submit-button-container .ul-card-longform__submit-button:disabled{opacity:.5;cursor:not-allowed}.ul-card-list-container--longform{display:flex;flex-direction:column;gap:2rem;width:100%;align-items:center;padding-block-start:calc(40vh - 100px);padding-block-end:calc(50vh - 100px);height:auto}@media (min-height: 1200px){.ul-card-list-container--longform{padding-block-start:calc(50vh - 100px)}}.ul-card-scroll-wrapper{width:100%;max-width:100vw;position:relative;display:flex;justify-content:center}.ul-card--unfocused{opacity:.3;transition:opacity .3s ease-in-out}.ul-consent-legal__name-input--mobile{border:2px solid #e6e6e6}.ul-consent-legal__name-input--desktop{border:1px solid #e6e6e6}.ul-consent-legal__name-input{background:#00000003;box-sizing:border-box;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;padding:10px 20px 10px 15px;border-radius:3px;font-size:15px;line-height:20px;margin-bottom:7px;width:100%}.ul-consent-legal__name-input::placeholder{color:#6c6c6e80}.ul-consent-legal__name-input:focus{outline:none;background:#fff}.ul-consent-legal__name-input--desktop:hover:not(:focus){background-color:#0000000d}.ul-card__consent-legal .choice{font-size:15px;padding:10px 15px;background-color:#00000003}.ul-card__consent-legal .choice--desktop:hover,.ul-card__consent-legal .choice--desktop:active,.ul-card__consent-legal .choice--mobile:active{background-color:#0000000d}.ul-card--likert__numbers{align-items:center;border-radius:5px;display:flex;flex-direction:row;flex:1 0;justify-content:center;margin:5px 0 0}.ul-card--likert__numbers>button{padding:unset}.likert-number--mobile{border:2px solid #e6e6e6}.likert-number--mobile:not(:first-child){margin-inline-start:-2px}.likert-number--desktop{border:1px solid #e6e6e6}.likert-number--desktop:not(:first-child){margin-inline-start:-1px}.likert-number{align-items:center;cursor:pointer;display:flex;justify-content:center;flex:1 0;background-color:#00000003;font-size:18px;line-height:24px;height:67px}.likert-number:first-child{border-start-start-radius:5px;border-end-start-radius:5px}.likert-number:last-child{border-start-end-radius:5px;border-end-end-radius:5px}.likert-number:active,.likert-number--desktop:hover{background-color:#0000000d;font-weight:500}.likert-star--mobile:not(:first-child){margin-inline-start:-2px}.likert-star--desktop:not(:first-child){margin-inline-start:-1px}.likert-star{align-items:center;cursor:pointer;display:flex;justify-content:space-between;flex:1 0;color:transparent;font-size:18px;line-height:24px;height:67px;background:unset;border:unset}.likert-smiley--mobile:not(:first-child){margin-inline-start:-2px}.likert-smiley--desktop:not(:first-child){margin-inline-start:-1px}.likert-smiley{align-items:center;cursor:pointer;display:flex;justify-content:space-between;flex:1 0;color:transparent;line-height:24px;height:67px;background:unset;border:unset}.likert-smiley>svg{margin:0 auto}.likert-smiley circle:not(:first-child){fill-opacity:1}.ul-card--likert__labels{align-items:center;color:#262136;display:flex;flex-direction:row;flex:1 0;font-weight:500;font-size:13px;line-height:15px;justify-content:space-between;margin:7px 0 10px}.ul-card--likert__labels>span:last-child{margin-left:auto;flex:1 1 auto;min-width:0;text-align:right}.ul-card--matrix_grid{display:grid;grid-template-columns:max-content repeat(var(--numColumns),minmax(107px,1fr));grid-template-rows:repeat(var(--numRows),min-content);margin:0 auto;row-gap:4px;width:max-content}.ul-card--matrix_grid_longform{width:100%}.ul-matrix-row-options{display:grid;grid-column:2/-1;grid-template-columns:subgrid}.ul-matrix-column-label{font-size:15px;max-width:150px;padding:10px 12px;text-align:center}.ul-card--matrix_container{margin-bottom:16px;overflow:auto}.ul-card--matrix_question_container{display:flex;flex-direction:column}.ul-matrix-scroll-gradient{-webkit-mask-image:linear-gradient(90deg,#000 90%,transparent);mask-image:linear-gradient(90deg,#000 90%,transparent)}.ul-matrix-scroll-gradient:dir(rtl){-webkit-mask-image:linear-gradient(270deg,#000,90%,transparent);mask-image:linear-gradient(270deg,#000,90%,transparent)}.ul-matrix-scroll-gradient:dir(rtl)+.ul-matrix-scroll-arrow{rotate:180deg}.ul-matrix-scroll-arrow{align-self:flex-end;background:none;border:none;color:#000;padding:0;position:absolute;top:45%}.ul-matrix-scroll-arrow:hover{cursor:pointer}.ul-matrix-option-wrapper{align-items:center;background:#f9f9f8;display:flex;justify-content:center;padding:10px 12px}.ul-matrix-last-option{border-start-end-radius:4px;border-end-end-radius:4px}.ul-matrix-row-label{align-items:center;background:#f9f9f8;border-end-start-radius:4px;border-start-start-radius:4px;display:flex;font-size:15px;left:0;right:0;max-width:200px;min-width:100px;padding:10px 12px;position:sticky}.ul-matrix-option-selected{border:6px solid var(--border);box-shadow:none}.ul-card__matrix{max-width:100%}.select-label{cursor:pointer;flex:1;overflow-wrap:anywhere;text-align:start}.ul-card--nps__numbers{align-items:center;border-radius:5px;display:flex;flex-direction:row;flex:1 0;justify-content:center;margin:5px 0 0}.nps-number--mobile{border:2px solid #e6e6e6}.nps-number--mobile:not(:first-child){margin-inline-start:-2px}.nps-number--desktop{border:1px solid #e6e6e6}.nps-number--desktop:not(:first-child){margin-inline-start:-1px}.nps-number{align-items:center;cursor:pointer;display:flex;justify-content:center;flex:1 0;background-color:#00000003;font-size:18px;line-height:24px;height:67px;padding:unset}.nps-number:first-child{border-start-start-radius:5px;border-end-start-radius:5px}.nps-number:last-child{border-start-end-radius:5px;border-end-end-radius:5px}.nps-number:active,.nps-number--desktop:hover{background-color:#0000000d;font-weight:500}.ul-card--nps__labels{align-items:center;color:#262136;display:flex;flex-direction:row;flex:1 0;font-weight:500;font-size:13px;line-height:15px;justify-content:space-between;margin:7px 0 10px}.ul-card-rank__labels{font-size:14px;font-style:normal;font-weight:600;line-height:150%}.ul-card--rank__question-inner-container{padding:0 16px}.ul-card-rank__list{list-style-type:none;padding-inline-start:0;margin:4px 0}.ul-card-rank__option{display:flex;align-items:center;padding:8px;gap:8px;align-self:stretch;border:1px solid #e2e3e1;border-radius:8px;margin-bottom:4px}.ul-card-rank__option:last-child{margin-bottom:0}.ul-card-rank__drag-btn{display:inline-flex;align-items:center;justify-content:center;line-height:0;padding:0;width:25px;height:25px;margin-left:auto;color:#0b2330;cursor:grab;background:transparent;border:0}.ul-card-rank__drag-btn:active,.ul-card-rank__option:active{cursor:grabbing}.ul-card-rank__option svg{display:block}.ul-card-rank__option.is-dragging{opacity:1;box-shadow:0 8px 25px #00000026,0 3px 10px #0000001a;z-index:1000;background:#fff;border-color:#0b2330}.ul-card-rank__option.is-drop-target{background:#0b23301a;border-radius:8px;border-color:#0b23301a}.ul-card-rank__option.is-drop-target select,.ul-card-rank__option.is-drop-target span,.ul-card-rank__option.is-drop-target button{visibility:hidden}.ul-card-rank__option span{font-size:14px;font-weight:400}.ul-card-rank__select{appearance:none;-webkit-appearance:none;-moz-appearance:none;box-sizing:border-box;height:25px;min-height:25px;border:1px solid #E2E3E1;border-radius:4px;font-size:14px;line-height:1.4;padding:2px 28px 2px 8px;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='13' viewBox='0 0 12 13' fill='none'><path d='M9.75 5L6 8.75L2.25 5' stroke='%230B2330' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");background-repeat:no-repeat;background-position:right 8px center;background-size:12px 12px;background-color:#fff;cursor:pointer}.ul-card-rank__select.ul-card-rank__select--placeholder{color:#b0b5b7}.ul-card-text{margin-top:2px;margin-bottom:3px;display:flex;flex-direction:column;justify-content:center;padding:0;width:100%}.ul-card-text__container{align-items:center;box-sizing:border-box;border-radius:3px;display:flex;justify-content:center;margin-bottom:12px;flex:1 0 100%}.ul-card-text__input--mobile{border:2px solid #e6e6e6;max-height:63px}.ul-card-text__input--desktop{border:1px solid #e6e6e6;max-height:150px}.ul-card-text__input{background:#00000003;box-sizing:border-box;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;min-height:63px;overflow:auto;padding:12px;resize:none;width:100%;border-radius:3px;font-size:15px;line-height:20px;overflow-wrap:break-word}.ul-card-text__input::placeholder{color:#6c6c6e80}.ul-card-text__input:focus{outline:none;background:#fff}.ul-card-text__input--desktop:hover:not(:focus){background-color:#0000000d}.ul-card__text-url-prompt-button{text-decoration:none;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;max-width:-webkit-fill-available}#ul-card-video__player_recorder{width:100%;width:-moz-available;width:-webkit-fill-available;width:fill-available}.ul-card-record__task{flex:1 0 auto;margin-top:2px;margin-bottom:3px;align-items:center;display:flex;flex-wrap:wrap;justify-content:center;padding:0}#ul-record-task-upload-progress,#ul-record-task-video-preview{width:100%;height:150px}.ul-permission-graphics-container{width:100%;height:150px;background-color:#0000000d;text-align:center;flex-direction:column;margin-left:auto;margin-right:auto;border-radius:5px;display:flex;align-items:center;font-size:15px;color:#000000b3}.ul-av-permission-denied-paragraph{margin:auto 15px;font-size:12px}.ul-av-permission-denied-headline{font-size:14px;color:#262136;text-decoration:underline;font-size:12px}.ul-permission-body{color:#000;margin:5px auto 5px 5px;line-height:135%;text-align:center}.ul-select-tab-container{width:240px;height:46px;background:#fff;border-radius:5px;text-align:start;align-items:center;display:flex;padding:0 5px;margin-top:20px;margin-bottom:auto}.ul-select-tab-text{color:#4b575d;margin:5px;line-height:135%;text-align:center}button.ul-task-skip-button{color:#000;background-color:#fff}#ul-task-detail-container{margin-top:0;margin-bottom:0;overflow:auto}#ul-task-detail-container.ul-rich-text-body p,#ul-task-detail-container.ul-rich-text-body li,#ul-task-detail-container.ul-rich-text-body{color:#4c4c4c}#ul-task-detail-container :first-child{margin-top:0}#ul-task-detail-container :last-child{margin-bottom:20px}.ul-horizontal-button-container{width:100%;display:flex;flex-direction:row}.ul-skip-button-below{margin-top:5px}.ul-horizontal-button-container-center{justify-content:center}.ul-vertical-button-container-center{display:flex;flex-direction:column;align-items:center}.ul-horizontal-button-container-left{justify-content:flex-start}.ul_recorded-task-inset-spacing{margin-top:5px;margin-bottom:24px}.ul_permission_svg_container{justify-content:center}.ul-card-text__button{background-color:var(--theme);border-radius:3px;border:none;color:#fff;cursor:pointer;font-size:15px;font-weight:500;line-height:18px;padding:10.5px 21px}.ul-card-text__button:disabled,.ul-card-text__button.sprig-button-disabled{background-color:#0000001a;color:#0003}.ul-card-text__button:disabled>svg path,.ul-card-text__button.sprig-button-disabled>svg path{stroke:#0003}.ul-card-text__button.ul-button-inactive{background-color:#fff!important;color:#5d696f!important}.ul-card-skip__button{color:#00000080;background:none;border:none;font-size:15px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;cursor:pointer}.ul-card-button-group{align-items:center;display:flex;gap:15px;justify-content:center;flex-direction:column}.select-button{align-items:center;background-color:transparent;border-radius:8px;border:1px solid #0b2330;box-shadow:0 0 0 2px #c8cccc;cursor:pointer;display:flex;font-size:15px;justify-content:space-between;margin-bottom:8px;padding:4px 8px 4px 16px;width:100%}.select-button:hover{background-color:#f3f3f3}.select-button:active{background-color:#eee}.select-button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select-button.select-button-placeholder{color:#b0b5b7}.select-button svg{flex-shrink:0}.select-list{position:relative;height:fit-content;padding:4px 0;z-index:100;background-color:#fff;border:1px solid #E2E3E1;box-shadow:0 16px 24px #0b23300d,0 4px 12px #0b233008;border-radius:8px;overflow-y:scroll;width:100%}.select-option{align-items:center;cursor:pointer;display:flex;font-size:15px;gap:16px;line-height:20px;padding:8px 16px}.select-option:hover{background-color:#f3f3f3}html,body{cursor:default;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;height:100%;overflow:hidden;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;-webkit-touch-callout:none}b{font-weight:500}form{margin-block-end:0;margin-block-start:0}#ul-app{opacity:0;width:100%;flex-grow:2;display:flex}#ul-app.ul-app--overlay{position:absolute;bottom:0;transition:opacity .1s ease-out;transition-delay:.1s}#ul-app.ul-app--visible{opacity:1;bottom:0}.ul-app__container{width:100%;display:flex;flex-direction:column;max-height:100vh}.ul-header__container{margin-bottom:15px}.ul-header{align-items:center;background:repeating-linear-gradient(120deg,#ebebeb,#ebebeb 24px,#fff 24px,#fff 48px);border-bottom:2px solid #ebebeb;display:flex;font-size:14px;font-weight:500;height:40px;justify-content:center;width:100%}.ul-footer{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;margin-top:auto;flex-grow:0;width:100%;min-height:10px;height:fit-content;flex-shrink:0}.ul-footer>.yellow-footer-logo{background:#fad133;border:1px solid #f9c600;border-radius:14px;padding:6px 12px}.ul-footer>.yellow-footer-logo:hover{background:#f9c600}.ul-footer .thank-you-card-link{background:#00000003;border:1px solid #e6e6e6;border-radius:8px;cursor:pointer;display:inline-flex;font-size:14px;gap:12px;margin-bottom:15px;padding:12px;text-align:initial;width:280px}.ul-footer .thank-you-card-link:hover{background:#00000008}.ul-footer>a{color:inherit}.ul-footer-bubble{display:inline-block;margin:0 3px;width:7px;height:7px;border-radius:3px;border:1px solid transparent}.sprig-box-logo{background:#f9c600;border-radius:5px;display:flex;padding:4px}.close-container{display:flex;justify-content:flex-end;width:100%;height:0}.close-btn{cursor:pointer;height:16px;margin-inline-end:-10px;position:relative;top:-10px;width:16px;z-index:1;align-self:flex-start;justify-self:end;flex-shrink:0}.ul-app__container{transition:opacity .3s ease-out}.ul-center-horizontally{text-align:center}.ul-progress-bar-container{width:100%;height:2px;background-color:#0000001a;border-radius:2px}.ul-progress-bar-container__footer{max-width:250px;margin:16px 0}.ul-progress-bar-container__header{position:fixed;top:80px;max-width:unset;margin:0;z-index:3}.ul-progress-bar-current{transition:width 1s ease;width:0%;height:0;border-radius:2px}.prototype-button{align-self:stretch;background:#00000003;border:1.5px solid #e6e6e6;border-radius:4px 0 0 4px;flex:none;flex-grow:0;height:fit-content;line-height:16.5px;margin:0 20px;padding:20px 0;font-size:14px;font-family:inherit;text-decoration:underline}.prototype-button:hover{cursor:pointer}` }), e.customStyles && Vt({ document: u, elementId: "ul-custom-style", styleString: e.customStyles, nonce: e.styleNonce }), e.fontFamily && s && parent) {
|
|
2961
|
-
const
|
|
2962
|
-
|
|
3048
|
+
Qe.configure(v, { cards: g, hasEndCard: !!o, apiURL: r, UpChunk: m }), q.setState({ apiURL: r, answers: n, border: e.border, index: e.startingQuestionIdx || 0, cards: g, configureExitOnOverlayClick: e.configureExitOnOverlayClick, customMetadata: e.customMetadata, endCard: e.endCard, envId: e.envId, eventEmitFn: i, fontFamily: e.fontFamily, forceBrandedLogo: e.forceBrandedLogo, frame: d, headers: e.headers, hasViewedEmbed: !1, isPreview: e.isPreview, marketingUrl: "https://sprig.com", meta: ts({ mode: e.mode, viewWindow: h, viewDocument: u, trackPageViewUrl: e.trackPageViewUrl }), mode: e.mode, previewKey: l, previewMode: e.previewMode, productConfig: e.productConfig, recorder: Qe, recorderEventEmitter: v, responseGroupUid: e.responseGroupUid, showStripes: e.showStripes, showSurveyBrand: e.showSurveyBrand, slugName: e.slugName, styleNonce: e.styleNonce, studyType: e.studyType, surveyId: e.surveyId, tabTitle: e.tabTitle, uploadingCardViewed: !1, uploadProgress: {}, useMobileStyling: e.useMobileStyling, useDesktopPrototype: e.useDesktopPrototype, userId: e.userId, viewDocument: e.viewDocument, visitorAttributes: e.visitorAttributes, viewedCardCount: e.startingQuestionIdx || 0 });
|
|
3049
|
+
const { head: _ } = u;
|
|
3050
|
+
if (zt({ document: u, elementId: "sprig-style", styleString: `html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}button,input,select,textarea{margin:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}ol,ul{padding-inline-start:1em}.ul-loading-spinner-container{font-size:1.8rem;flex-grow:1;width:100%;height:100%;display:flex;align-items:center;justify-content:center}.ul-loading-spinner{display:inline-block;position:relative;width:6rem;height:6rem}.ul-loading-spinner div{box-sizing:border-box;display:block;position:absolute;width:80%;height:80%;margin:5px;border:5px solid #152e3e;border-radius:50%;animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:#152e3e transparent transparent transparent}.ul-loading-spinner .first{animation-delay:-.45s}.ul-loading-spinner .second{animation-delay:-.3s}.ul-loading-spinner .third{animation-delay:-.15s}@keyframes lds-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.fade-in-transition{animation:fadeIn .4s ease-in}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.ul-card{flex:1 1 auto;border-radius:2px;display:flex;flex-direction:column;font-size:17px;line-height:19px;text-align:start;min-width:200px;justify-content:center;animation:enable-transitions 0s .3s forwards;min-height:0}@keyframes enable-transitions{to{transition:opacity .2s ease-in-out}}.ul-focus-transitions-active .ul-card,.ul-card--with-transitions{transition:opacity .2s ease-in-out}.ul-card__container--desktop{border:2px solid #fff;box-shadow:0 0 15px #00000026;margin:15px}.ul-card__container--mobile{border-width:0;box-shadow:0 0 5px #00000040;margin-top:5px}.ul-card__container--desktop_longFormSurvey,.ul-card__container--mobile_longFormSurvey{margin:0}.sprig-container{display:flex;flex-direction:column;width:100%;height:fit-content;flex:1 1 auto;min-height:0;justify-content:center}.ul-card__container{background:#fff;border-radius:6px;display:flex;flex-direction:column;flex-grow:1;flex:1 1 auto;font-size:17px;line-height:23px;padding:0;min-height:0;position:relative;text-align:center;word-break:normal;overflow:auto}.ul-card__container--desktop_feedbackButton{box-shadow:unset}.ul-card-vertical__button-wrapper{flex-direction:column;align-items:center}.ul-card__button-wrapper{margin-top:4px;display:flex;gap:16px;justify-content:center;align-self:stretch}.sprig-question-footer-container{align-items:center;width:100%;height:fit-content;display:flex;flex-direction:column;padding:12px 20px 0}.long-form-question-footer-container{position:fixed;bottom:0;left:0;width:100%;display:flex;justify-content:space-between;align-items:center;overflow:visible;z-index:1000;pointer-events:none;padding:32px}.long-form-question-footer-container--mobile{background-color:#fff;border-top:1px solid #e6e6e6;padding:16px 24px}.long-form-question-footer-container-center{justify-content:center}.long-form-question-footer-container .long-form-question-footer-container-logo{width:auto;pointer-events:auto}.long-form-question-footer-container-center .long-form-question-footer-container-logo{margin-left:0}.long-form-question-footer-container .long-form-question-footer-container-actions{display:flex;gap:8px;pointer-events:auto}.long-form-question-footer-container .long-form-question-footer-container-actions .long-form-button{display:flex;justify-content:center;align-items:center;gap:8px;padding:12px;border-radius:8px;height:40px;width:40px}.long-form-question-footer-container .long-form-question-footer-container-actions .long-form-button .long-form-button-text-container{display:flex;align-items:center}.ul-rich-text-body{min-height:2em}.ul-rich-text-body,.ul-rich-text-body p{margin-top:10px;margin-bottom:10px}.ul-rich-text-body li{margin:5px 0}.ul-rich-text-body p,.ul-rich-text-body li{font-size:15px;line-height:130.35%;letter-spacing:.02em;color:#343442;text-align:start;white-space:pre-line}.ul-rich-text-body:last-child,.ul-rich-text-body li:last-child{margin-bottom:15px}.ul-card-main-content__link,.ul-card-main-content__email,.ul-card-main-content__web,.ul-card-main-content__android,.ul-card-main-content__ios{display:flex;flex:1 1 auto;min-height:0;flex-direction:column;z-index:2;height:fit-content}.sprig-border-bottom{border-bottom:1px solid rgba(0,0,0,.1)}.sprig-border-top{border-top:1px solid rgba(0,0,0,.1)}.question-header-container{z-index:1}.sprig-header-container{padding:16px}.question-header-button-container{display:grid;grid-template-columns:97fr 3fr;align-items:center;justify-content:space-between;width:100%;height:fit-content}.ul-card--thanks-content .question-header-button-container{justify-content:center}.sprig-question-body{padding:0 20px;min-height:0;flex-shrink:1;overflow:auto;position:relative;align-self:stretch;width:100%}.sprig-stretch{align-self:stretch}.ul-question{color:#343442;display:block;font-size:17px;line-height:125%;font-weight:500;cursor:default;text-align:start}.ul-question ol,.ul-question ul,.ul-caption ol,.ul-caption ul{margin-left:1em}.ul-caption{flex:1 0 auto;font-size:14px;line-height:130.35%;letter-spacing:.02em;color:#6c6c6e;text-align:start;margin-top:4px}.ul-card__choices{margin:5px 0 0;flex:1 0}.choice--mobile{border:2px solid #e6e6e6}.choice--desktop{border:1px solid #e6e6e6}.choice{align-items:flex-start;color:#262136;cursor:pointer;display:flex;justify-content:flex-start;flex-direction:column;box-sizing:border-box;border-radius:3px;margin-bottom:7px;font-size:15px;line-height:20px;padding:10px 20px 10px 15px;background-color:#00000003}.choice--desktop:hover,.choice--desktop:active,.choice--mobile:active{background-color:#0000000d}.choice-label-container{align-items:center;display:flex;flex-direction:row;flex:0 0 fit-content;gap:15px;height:fit-content;justify-content:flex-start;width:100%}.choice-text-entry-container{width:100%;height:fit-content;flex:0 1 fit-content;overflow:hidden}.choice .choice-text-input--mobile{max-height:63px}.choice .choice-text-input--desktop{max-height:150px}.choice .choice-text-input{box-sizing:border-box;background-color:transparent;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;min-height:20px;max-height:60px;padding:0;margin-top:8px;resize:none;width:100%;font-size:14px;line-height:20px;outline:none;border:none;overflow-wrap:break-word}.choice .choice-text-input::placeholder{color:#6c6c6e80}.ul-thanks-check{text-align:center;margin-bottom:20px}.ul-card--thanks-content{padding:20px 0 10px}.ul-card--thanks .ul-question{padding-top:0;text-align:center}.ul-card--thanks .ul-caption{padding-top:0;text-align:center;overflow-wrap:break-word;-webkit-hyphens:auto;hyphens:auto;hyphenate-limit-lines:no-limit}.ul-card--uploading .ul-question{padding-top:15px;text-align:center}.ul-card--uploading .ul-caption{padding-top:5px;text-align:center;overflow-wrap:break-word}.select-checkbox{height:16px;width:16px;display:flex;box-sizing:border-box;background-color:"transparent";align-items:center;justify-content:center;border-radius:4px;border:1px solid #b0b5b7;flex-shrink:0}.select-radio{height:16px;width:16px;border-radius:16px;border:1px solid #323232;display:flex;box-sizing:border-box;box-shadow:inset 2px 2px #0000001a;background-color:"transparent";align-items:center;justify-content:center}.footer{width:100%;margin-top:12px;font-size:12px;line-height:12px;color:#000000b3}[class^=CenteredSurveyLayout] .ul-header__container,[class^=QuestionConceptTestLayout] .ul-header__container,.ul-websurvey-frame .ul-card__container,.ul-websurvey-frame-mobile .ul-card__container{margin-bottom:unset}[class^=CenteredSurveyLayout] .ul-card__container,[class^=QuestionConceptTestLayout] .ul-card__container,.ul-websurvey-frame .ul-card__container,.ul-websurvey-frame-mobile .ul-card__container{align-self:center;box-shadow:unset;border-radius:unset;border:none!important;position:unset;width:100%}@media only screen and (min-height: 600px) and (width: 600px){.ul-card{position:relative;top:-20px}}.ul-vertical-centered-container{display:flex;flex-direction:column;align-items:center;align-self:stretch}.sprig-accordion{width:100%;margin-bottom:8px}.sprig-accordion-body{width:100%;overflow:hidden}.sprig-accordion-header-container{background:transparent;border:none;display:flex;flex-direction:row;align-items:center;justify-content:space-between;width:100%;cursor:pointer;margin:8px 0 0;padding:0;font-family:inherit}.sprig-header-label-container{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:8px;flex:1 1 0}.sprig-header-label{color:#343442;font-size:15px;font-weight:590;line-height:21px;text-align:start;overflow:hidden}.sprig-check-background{flex:0 0 16px;height:16px;width:16px;border-radius:8px;margin-right:8px;background-color:#efefee;display:flex;align-items:center;justify-content:center}.sprig-check{height:9px;width:9px;margin-left:-1px}.sprig-check path{stroke:#506067;stroke-width:1.5}.sprig-caret{height:20px;width:20px;transition-property:transform}.sprig-caret path{stroke:#000}.ul-card-longform__submit-button-container{display:flex;justify-content:flex-end}.ul-card-longform__submit-button-container .ul-card-longform__submit-button{display:flex;flex-direction:row;align-items:center;white-space:nowrap;gap:4px;border-radius:8px;color:#fff;cursor:pointer}.ul-card-longform__submit-button-container .ul-card-longform__submit-button:disabled{opacity:.5;cursor:not-allowed}.ul-card-list-container--longform{display:flex;flex-direction:column;gap:2rem;width:100%;align-items:center;padding-block-start:calc(40vh - 100px);padding-block-end:calc(50vh - 100px);height:auto}@media (min-height: 1200px){.ul-card-list-container--longform{padding-block-start:calc(50vh - 100px)}}.ul-card-scroll-wrapper{width:100%;max-width:100vw;position:relative;display:flex;justify-content:center}.ul-card--unfocused{opacity:.3;transition:opacity .3s ease-in-out}.ul-consent-legal__name-input--mobile{border:2px solid #e6e6e6}.ul-consent-legal__name-input--desktop{border:1px solid #e6e6e6}.ul-consent-legal__name-input{background:#00000003;box-sizing:border-box;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;padding:10px 20px 10px 15px;border-radius:3px;font-size:15px;line-height:20px;margin-bottom:7px;width:100%}.ul-consent-legal__name-input::placeholder{color:#6c6c6e80}.ul-consent-legal__name-input:focus{outline:none;background:#fff}.ul-consent-legal__name-input--desktop:hover:not(:focus){background-color:#0000000d}.ul-card__consent-legal .choice{font-size:15px;padding:10px 15px;background-color:#00000003}.ul-card__consent-legal .choice--desktop:hover,.ul-card__consent-legal .choice--desktop:active,.ul-card__consent-legal .choice--mobile:active{background-color:#0000000d}.ul-card--likert__numbers{align-items:center;border-radius:5px;display:flex;flex-direction:row;flex:1 0;justify-content:center;margin:5px 0 0}.ul-card--likert__numbers>button{padding:unset}.likert-number--mobile{border:2px solid #e6e6e6}.likert-number--mobile:not(:first-child){margin-inline-start:-2px}.likert-number--desktop{border:1px solid #e6e6e6}.likert-number--desktop:not(:first-child){margin-inline-start:-1px}.likert-number{align-items:center;cursor:pointer;display:flex;justify-content:center;flex:1 0;background-color:#00000003;font-size:18px;line-height:24px;height:67px}.likert-number:first-child{border-start-start-radius:5px;border-end-start-radius:5px}.likert-number:last-child{border-start-end-radius:5px;border-end-end-radius:5px}.likert-number:active,.likert-number--desktop:hover{background-color:#0000000d;font-weight:500}.likert-star--mobile:not(:first-child){margin-inline-start:-2px}.likert-star--desktop:not(:first-child){margin-inline-start:-1px}.likert-star{align-items:center;cursor:pointer;display:flex;justify-content:space-between;flex:1 0;color:transparent;font-size:18px;line-height:24px;height:67px;background:unset;border:unset}.likert-smiley--mobile:not(:first-child){margin-inline-start:-2px}.likert-smiley--desktop:not(:first-child){margin-inline-start:-1px}.likert-smiley{align-items:center;cursor:pointer;display:flex;justify-content:space-between;flex:1 0;color:transparent;line-height:24px;height:67px;background:unset;border:unset}.likert-smiley>svg{margin:0 auto}.likert-smiley circle:not(:first-child){fill-opacity:1}.ul-card--likert__labels{align-items:center;color:#262136;display:flex;flex-direction:row;flex:1 0;font-weight:500;font-size:13px;line-height:15px;justify-content:space-between;margin:7px 0 10px}.ul-card--likert__labels>span:last-child{margin-left:auto;flex:1 1 auto;min-width:0;text-align:right}.ul-card--matrix_grid{display:grid;grid-template-columns:max-content repeat(var(--numColumns),minmax(107px,1fr));grid-template-rows:repeat(var(--numRows),min-content);margin:0 auto;row-gap:4px;width:max-content}.ul-card--matrix_grid_longform{width:100%}.ul-matrix-row-options{display:grid;grid-column:2/-1;grid-template-columns:subgrid}.ul-matrix-column-label{font-size:15px;max-width:150px;padding:10px 12px;text-align:center}.ul-card--matrix_container{margin-bottom:16px;overflow:auto}.ul-card--matrix_question_container{display:flex;flex-direction:column}.ul-matrix-scroll-gradient{-webkit-mask-image:linear-gradient(90deg,#000 90%,transparent);mask-image:linear-gradient(90deg,#000 90%,transparent)}.ul-matrix-scroll-gradient:dir(rtl){-webkit-mask-image:linear-gradient(270deg,#000,90%,transparent);mask-image:linear-gradient(270deg,#000,90%,transparent)}.ul-matrix-scroll-gradient:dir(rtl)+.ul-matrix-scroll-arrow{rotate:180deg}.ul-matrix-scroll-arrow{align-self:flex-end;background:none;border:none;color:#000;padding:0;position:absolute;top:45%}.ul-matrix-scroll-arrow:hover{cursor:pointer}.ul-matrix-option-wrapper{align-items:center;background:#f9f9f8;display:flex;justify-content:center;padding:10px 12px}.ul-matrix-last-option{border-start-end-radius:4px;border-end-end-radius:4px}.ul-matrix-row-label{align-items:center;background:#f9f9f8;border-end-start-radius:4px;border-start-start-radius:4px;display:flex;font-size:15px;left:0;right:0;max-width:200px;min-width:100px;padding:10px 12px;position:sticky}.ul-matrix-option-selected{border:6px solid var(--border);box-shadow:none}.ul-card__matrix{max-width:100%}.select-label{cursor:pointer;flex:1;overflow-wrap:anywhere;text-align:start}.ul-card--nps__numbers{align-items:center;border-radius:5px;display:flex;flex-direction:row;flex:1 0;justify-content:center;margin:5px 0 0}.nps-number--mobile{border:2px solid #e6e6e6}.nps-number--mobile:not(:first-child){margin-inline-start:-2px}.nps-number--desktop{border:1px solid #e6e6e6}.nps-number--desktop:not(:first-child){margin-inline-start:-1px}.nps-number{align-items:center;cursor:pointer;display:flex;justify-content:center;flex:1 0;background-color:#00000003;font-size:18px;line-height:24px;height:67px;padding:unset}.nps-number:first-child{border-start-start-radius:5px;border-end-start-radius:5px}.nps-number:last-child{border-start-end-radius:5px;border-end-end-radius:5px}.nps-number:active,.nps-number--desktop:hover{background-color:#0000000d;font-weight:500}.ul-card--nps__labels{align-items:center;color:#262136;display:flex;flex-direction:row;flex:1 0;font-weight:500;font-size:13px;line-height:15px;justify-content:space-between;margin:7px 0 10px}.ul-card-rank__labels{font-size:14px;font-style:normal;font-weight:600;line-height:150%}.ul-card--rank__question-inner-container{padding:0 16px}.ul-card-rank__list{list-style-type:none;padding-inline-start:0;margin:4px 0}.ul-card-rank__option{display:flex;align-items:center;padding:8px;gap:8px;align-self:stretch;border:1px solid #e2e3e1;border-radius:8px;margin-bottom:4px}.ul-card-rank__option:last-child{margin-bottom:0}.ul-card-rank__drag-btn{display:inline-flex;align-items:center;justify-content:center;line-height:0;padding:0;width:25px;height:25px;margin-left:auto;color:#0b2330;cursor:grab;background:transparent;border:0}.ul-card-rank__drag-btn:active,.ul-card-rank__option:active{cursor:grabbing}.ul-card-rank__option svg{display:block}.ul-card-rank__option.is-dragging{opacity:1;box-shadow:0 8px 25px #00000026,0 3px 10px #0000001a;z-index:1000;background:#fff;border-color:#0b2330}.ul-card-rank__option.is-drop-target{background:#0b23301a;border-radius:8px;border-color:#0b23301a}.ul-card-rank__option.is-drop-target select,.ul-card-rank__option.is-drop-target span,.ul-card-rank__option.is-drop-target button{visibility:hidden}.ul-card-rank__option span{font-size:14px;font-weight:400}.ul-card-rank__select{appearance:none;-webkit-appearance:none;-moz-appearance:none;box-sizing:border-box;height:25px;min-height:25px;border:1px solid #E2E3E1;border-radius:4px;font-size:14px;line-height:1.4;padding:2px 28px 2px 8px;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='13' viewBox='0 0 12 13' fill='none'><path d='M9.75 5L6 8.75L2.25 5' stroke='%230B2330' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");background-repeat:no-repeat;background-position:right 8px center;background-size:12px 12px;background-color:#fff;cursor:pointer}.ul-card-rank__select.ul-card-rank__select--placeholder{color:#b0b5b7}.ul-card-text{margin-top:2px;margin-bottom:3px;display:flex;flex-direction:column;justify-content:center;padding:0;width:100%}.ul-card-text__container{align-items:center;box-sizing:border-box;border-radius:3px;display:flex;justify-content:center;margin-bottom:12px;flex:1 0 100%}.ul-card-text__input--mobile{border:2px solid #e6e6e6;max-height:63px}.ul-card-text__input--desktop{border:1px solid #e6e6e6;max-height:150px}.ul-card-text__input{background:#00000003;box-sizing:border-box;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;min-height:63px;overflow:auto;padding:12px;resize:none;width:100%;border-radius:3px;font-size:15px;line-height:20px;overflow-wrap:break-word}.ul-card-text__input::placeholder{color:#6c6c6e80}.ul-card-text__input:focus{outline:none;background:#fff}.ul-card-text__input--desktop:hover:not(:focus){background-color:#0000000d}.ul-card__text-url-prompt-button{text-decoration:none;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;max-width:-webkit-fill-available}#ul-card-video__player_recorder{width:100%;width:-moz-available;width:-webkit-fill-available;width:fill-available}.ul-card-record__task{flex:1 0 auto;margin-top:2px;margin-bottom:3px;align-items:center;display:flex;flex-wrap:wrap;justify-content:center;padding:0}#ul-record-task-upload-progress,#ul-record-task-video-preview{width:100%;height:150px}.ul-permission-graphics-container{width:100%;height:150px;background-color:#0000000d;text-align:center;flex-direction:column;margin-left:auto;margin-right:auto;border-radius:5px;display:flex;align-items:center;font-size:15px;color:#000000b3}.ul-av-permission-denied-paragraph{margin:auto 15px;font-size:12px}.ul-av-permission-denied-headline{font-size:14px;color:#262136;text-decoration:underline;font-size:12px}.ul-permission-body{color:#000;margin:5px auto 5px 5px;line-height:135%;text-align:center}.ul-select-tab-container{width:240px;height:46px;background:#fff;border-radius:5px;text-align:start;align-items:center;display:flex;padding:0 5px;margin-top:20px;margin-bottom:auto}.ul-select-tab-text{color:#4b575d;margin:5px;line-height:135%;text-align:center}button.ul-task-skip-button{color:#000;background-color:#fff}#ul-task-detail-container{margin-top:0;margin-bottom:0;overflow:auto}#ul-task-detail-container.ul-rich-text-body p,#ul-task-detail-container.ul-rich-text-body li,#ul-task-detail-container.ul-rich-text-body{color:#4c4c4c}#ul-task-detail-container :first-child{margin-top:0}#ul-task-detail-container :last-child{margin-bottom:20px}.ul-horizontal-button-container{width:100%;display:flex;flex-direction:row}.ul-skip-button-below{margin-top:5px}.ul-horizontal-button-container-center{justify-content:center}.ul-vertical-button-container-center{display:flex;flex-direction:column;align-items:center}.ul-horizontal-button-container-left{justify-content:flex-start}.ul_recorded-task-inset-spacing{margin-top:5px;margin-bottom:24px}.ul_permission_svg_container{justify-content:center}.ul-card-text__button{background-color:var(--theme);border-radius:3px;border:none;color:#fff;cursor:pointer;font-size:15px;font-weight:500;line-height:18px;padding:10.5px 21px}.ul-card-text__button:disabled,.ul-card-text__button.sprig-button-disabled{background-color:#0000001a;color:#0003}.ul-card-text__button:disabled>svg path,.ul-card-text__button.sprig-button-disabled>svg path{stroke:#0003}.ul-card-text__button.ul-button-inactive{background-color:#fff!important;color:#5d696f!important}.ul-card-skip__button{color:#00000080;background:none;border:none;font-size:15px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;cursor:pointer}.ul-card-button-group{align-items:center;display:flex;gap:15px;justify-content:center;flex-direction:column}.select-button{align-items:center;background-color:transparent;border-radius:8px;border:1px solid #0b2330;box-shadow:0 0 0 2px #c8cccc;cursor:pointer;display:flex;font-size:15px;justify-content:space-between;margin-bottom:8px;padding:4px 8px 4px 16px;width:100%}.select-button:hover{background-color:#f3f3f3}.select-button:active{background-color:#eee}.select-button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select-button.select-button-placeholder{color:#b0b5b7}.select-button svg{flex-shrink:0}.select-list{position:relative;height:fit-content;padding:4px 0;z-index:100;background-color:#fff;border:1px solid #E2E3E1;box-shadow:0 16px 24px #0b23300d,0 4px 12px #0b233008;border-radius:8px;overflow-y:scroll;width:100%}.select-option{align-items:center;cursor:pointer;display:flex;font-size:15px;gap:16px;line-height:20px;padding:8px 16px}.select-option:hover{background-color:#f3f3f3}html,body{cursor:default;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;height:100%;overflow:hidden;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;-webkit-touch-callout:none}b{font-weight:500}form{margin-block-end:0;margin-block-start:0}#ul-app{opacity:0;width:100%;flex-grow:2;display:flex}#ul-app.ul-app--overlay{position:absolute;bottom:0;transition:opacity .1s ease-out;transition-delay:.1s}#ul-app.ul-app--visible{opacity:1;bottom:0}.ul-app__container{width:100%;display:flex;flex-direction:column;max-height:100vh}.ul-header__container{margin-bottom:15px}.ul-header{align-items:center;background:repeating-linear-gradient(120deg,#ebebeb,#ebebeb 24px,#fff 24px,#fff 48px);border-bottom:2px solid #ebebeb;display:flex;font-size:14px;font-weight:500;height:40px;justify-content:center;width:100%}.ul-footer{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;margin-top:auto;flex-grow:0;width:100%;min-height:10px;height:fit-content;flex-shrink:0}.ul-footer>.yellow-footer-logo{background:#fad133;border:1px solid #f9c600;border-radius:14px;padding:6px 12px}.ul-footer>.yellow-footer-logo:hover{background:#f9c600}.ul-footer .thank-you-card-link{background:#00000003;border:1px solid #e6e6e6;border-radius:8px;cursor:pointer;display:inline-flex;font-size:14px;gap:12px;margin-bottom:15px;padding:12px;text-align:initial;width:280px}.ul-footer .thank-you-card-link:hover{background:#00000008}.ul-footer>a{color:inherit}.ul-footer-bubble{display:inline-block;margin:0 3px;width:7px;height:7px;border-radius:3px;border:1px solid transparent}.sprig-box-logo{background:#f9c600;border-radius:5px;display:flex;padding:4px}.close-container{display:flex;justify-content:flex-end;width:100%;height:0}.close-btn{cursor:pointer;height:16px;margin-inline-end:-10px;position:relative;top:-10px;width:16px;z-index:1;align-self:flex-start;justify-self:end;flex-shrink:0}.ul-app__container{transition:opacity .3s ease-out}.ul-center-horizontally{text-align:center}.ul-progress-bar-container{width:100%;height:2px;background-color:#0000001a;border-radius:2px}.ul-progress-bar-container__footer{max-width:250px;margin:16px 0}.ul-progress-bar-container__header{position:fixed;top:80px;max-width:unset;margin:0;z-index:3}.ul-progress-bar-current{transition:width 1s ease;width:0%;height:0;border-radius:2px}.prototype-button{align-self:stretch;background:#00000003;border:1.5px solid #e6e6e6;border-radius:4px 0 0 4px;flex:none;flex-grow:0;height:fit-content;line-height:16.5px;margin:0 20px;padding:20px 0;font-size:14px;font-family:inherit;text-decoration:underline}.prototype-button:hover{cursor:pointer}` }), e.customStyles && zt({ document: u, elementId: "ul-custom-style", styleString: e.customStyles, nonce: e.styleNonce }), e.fontFamily && s && parent) {
|
|
3051
|
+
const y = u.createElement("link");
|
|
3052
|
+
y.rel = "stylesheet", y.href = s, _.appendChild(y);
|
|
2963
3053
|
}
|
|
2964
|
-
if (!
|
|
2965
|
-
const
|
|
2966
|
-
|
|
2967
|
-
Qe.setUpChunk(
|
|
2968
|
-
},
|
|
3054
|
+
if (!m && e.cards.some((y) => y.type === "recordedtask")) {
|
|
3055
|
+
const y = u.createElement("script");
|
|
3056
|
+
y.src = e.upchunkLibraryURL ?? "https://cdn.sprig.com/userleap-web-upchunk-v2.2.2.js", y.onload = () => {
|
|
3057
|
+
Qe.setUpChunk(h.UpChunk);
|
|
3058
|
+
}, y.onerror = () => {
|
|
2969
3059
|
console.warn("[Sprig] - recording functionality not configured due to UpChunk library load failure");
|
|
2970
|
-
},
|
|
3060
|
+
}, _.appendChild(y);
|
|
2971
3061
|
}
|
|
2972
|
-
const
|
|
2973
|
-
|
|
2974
|
-
|
|
3062
|
+
const b = i || ((k = d.eventEmitter) == null ? void 0 : k.emit);
|
|
3063
|
+
b == null || b("verify.view.version", { "view.version": "2.36.0" }), c && t && (Le(a(Xi, {}), c), Re.once(ie.SurveyClosed, () => {
|
|
3064
|
+
Mt(c);
|
|
2975
3065
|
}));
|
|
2976
3066
|
} };
|
|
2977
3067
|
export {
|
|
2978
|
-
|
|
3068
|
+
os as default
|
|
2979
3069
|
};
|