@sprig-technologies/sprig-bundled 2.36.1 → 2.37.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.
@@ -1,2245 +0,0 @@
1
- import { e as rt, A as We, s as Nt, D as ki, c as wi, S as ce, a as Ht, C as ur, b as cr, d as Ci, i as Si, E as Ti, f as nt, g as le, h as Gt, r as Ii, j as Ei, v as dr, k as mr } from "./index-BmLWLmjC.js";
2
- var st, O, an, Ve, pr, sn, At, un, at = {}, cn = [], Li = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, wt = Array.isArray;
3
- function Ie(e, t) {
4
- for (var r in t) e[r] = t[r];
5
- return e;
6
- }
7
- function dn(e) {
8
- var t = e.parentNode;
9
- t && t.removeChild(e);
10
- }
11
- function ae(e, t, r) {
12
- var n, i, o, a = {};
13
- for (o in t) o == "key" ? n = t[o] : o == "ref" ? i = t[o] : a[o] = t[o];
14
- if (arguments.length > 2 && (a.children = arguments.length > 3 ? st.call(arguments, 2) : r), typeof e == "function" && e.defaultProps != null) for (o in e.defaultProps) a[o] === void 0 && (a[o] = e.defaultProps[o]);
15
- return it(e, a, n, i, null);
16
- }
17
- function it(e, t, r, n, i) {
18
- var o = { type: e, props: t, key: r, ref: n, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: i ?? ++an, __i: -1, __u: 0 };
19
- return i == null && O.vnode != null && O.vnode(o), o;
20
- }
21
- function mn() {
22
- return { current: null };
23
- }
24
- function K(e) {
25
- return e.children;
26
- }
27
- function be(e, t) {
28
- this.props = e, this.context = t;
29
- }
30
- function Ze(e, t) {
31
- if (t == null) return e.__ ? Ze(e.__, e.__i + 1) : null;
32
- for (var r; t < e.__k.length; t++) if ((r = e.__k[t]) != null && r.__e != null) return r.__e;
33
- return typeof e.type == "function" ? Ze(e) : null;
34
- }
35
- function pn(e) {
36
- var t, r;
37
- if ((e = e.__) != null && e.__c != null) {
38
- for (e.__e = e.__c.base = null, t = 0; t < e.__k.length; t++) if ((r = e.__k[t]) != null && r.__e != null) {
39
- e.__e = e.__c.base = r.__e;
40
- break;
41
- }
42
- return pn(e);
43
- }
44
- }
45
- function Vt(e) {
46
- (!e.__d && (e.__d = !0) && Ve.push(e) && !yt.__r++ || pr !== O.debounceRendering) && ((pr = O.debounceRendering) || sn)(yt);
47
- }
48
- function yt() {
49
- var e, t, r, n, i, o, a, s, c;
50
- for (Ve.sort(At); e = Ve.shift(); ) e.__d && (t = Ve.length, n = void 0, o = (i = (r = e).__v).__e, s = [], c = [], (a = r.__P) && ((n = Ie({}, i)).__v = i.__v + 1, O.vnode && O.vnode(n), Kt(a, n, i, r.__n, a.ownerSVGElement !== void 0, 32 & i.__u ? [o] : null, s, o ?? Ze(i), !!(32 & i.__u), c), n.__.__k[n.__i] = n, vn(s, n, c), n.__e != o && pn(n)), Ve.length > t && Ve.sort(At));
51
- yt.__r = 0;
52
- }
53
- function fn(e, t, r, n, i, o, a, s, c, m, d) {
54
- var u, f, b, p, g, h = n && n.__k || cn, k = t.length;
55
- for (r.__d = c, function(N, w, C) {
56
- var x, T, y, L, I, P = w.length, v = C.length, _ = v, S = 0;
57
- for (N.__k = [], x = 0; x < P; x++) (T = N.__k[x] = (T = w[x]) == null || typeof T == "boolean" || typeof T == "function" ? null : typeof T == "string" || typeof T == "number" || typeof T == "bigint" || T.constructor == String ? it(null, T, null, null, T) : wt(T) ? it(K, { children: T }, null, null, null) : T.constructor === void 0 && T.__b > 0 ? it(T.type, T.props, T.key, T.ref ? T.ref : null, T.__v) : T) != null ? (T.__ = N, T.__b = N.__b + 1, I = Oi(T, C, L = x + S, _), T.__i = I, y = null, I !== -1 && (_--, (y = C[I]) && (y.__u |= 131072)), y == null || y.__v === null ? (I == -1 && S--, typeof T.type != "function" && (T.__u |= 65536)) : I !== L && (I === L + 1 ? S++ : I > L ? _ > P - L ? S += I - L : S-- : S = I < L && I == L - 1 ? I - L : 0, I !== x + S && (T.__u |= 65536))) : (y = C[x]) && y.key == null && y.__e && (y.__e == N.__d && (N.__d = Ze(y)), Bt(y, y, !1), C[x] = null, _--);
58
- if (_) for (x = 0; x < v; x++) (y = C[x]) != null && !(131072 & y.__u) && (y.__e == N.__d && (N.__d = Ze(y)), Bt(y, y));
59
- }(r, t, h), c = r.__d, u = 0; u < k; u++) (b = r.__k[u]) != null && typeof b != "boolean" && typeof b != "function" && (f = b.__i === -1 ? at : h[b.__i] || at, b.__i = u, Kt(e, b, f, i, o, a, s, c, m, d), p = b.__e, b.ref && f.ref != b.ref && (f.ref && Yt(f.ref, null, b), d.push(b.ref, b.__c || p, b)), g == null && p != null && (g = p), 65536 & b.__u || f.__k === b.__k ? c = bn(b, c, e) : typeof b.type == "function" && b.__d !== void 0 ? c = b.__d : p && (c = p.nextSibling), b.__d = void 0, b.__u &= -196609);
60
- r.__d = c, r.__e = g;
61
- }
62
- function bn(e, t, r) {
63
- var n, i;
64
- if (typeof e.type == "function") {
65
- for (n = e.__k, i = 0; n && i < n.length; i++) n[i] && (n[i].__ = e, t = bn(n[i], t, r));
66
- return t;
67
- }
68
- return e.__e != t && (r.insertBefore(e.__e, t || null), t = e.__e), t && t.nextSibling;
69
- }
70
- function Ee(e, t) {
71
- return t = t || [], e == null || typeof e == "boolean" || (wt(e) ? e.some(function(r) {
72
- Ee(r, t);
73
- }) : t.push(e)), t;
74
- }
75
- function Oi(e, t, r, n) {
76
- var i = e.key, o = e.type, a = r - 1, s = r + 1, c = t[r];
77
- if (c === null || c && i == c.key && o === c.type) return r;
78
- if (n > (c == null || 131072 & c.__u ? 0 : 1)) for (; a >= 0 || s < t.length; ) {
79
- if (a >= 0) {
80
- if ((c = t[a]) && !(131072 & c.__u) && i == c.key && o === c.type) return a;
81
- a--;
82
- }
83
- if (s < t.length) {
84
- if ((c = t[s]) && !(131072 & c.__u) && i == c.key && o === c.type) return s;
85
- s++;
86
- }
87
- }
88
- return -1;
89
- }
90
- function fr(e, t, r) {
91
- t[0] === "-" ? e.setProperty(t, r ?? "") : e[t] = r == null ? "" : typeof r != "number" || Li.test(t) ? r : r + "px";
92
- }
93
- function pt(e, t, r, n, i) {
94
- var o;
95
- e: if (t === "style") if (typeof r == "string") e.style.cssText = r;
96
- else {
97
- if (typeof n == "string" && (e.style.cssText = n = ""), n) for (t in n) r && t in r || fr(e.style, t, "");
98
- if (r) for (t in r) n && r[t] === n[t] || fr(e.style, t, r[t]);
99
- }
100
- else if (t[0] === "o" && t[1] === "n") o = 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 + o] = r, r ? n ? r.u = n.u : (r.u = Date.now(), e.addEventListener(t, o ? vr : br, o)) : e.removeEventListener(t, o ? vr : br, o);
101
- else {
102
- if (i) t = t.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
103
- 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 {
104
- e[t] = r ?? "";
105
- break e;
106
- } catch {
107
- }
108
- typeof r == "function" || (r == null || r === !1 && t[4] !== "-" ? e.removeAttribute(t) : e.setAttribute(t, r));
109
- }
110
- }
111
- function br(e) {
112
- var t = this.l[e.type + !1];
113
- if (e.t) {
114
- if (e.t <= t.u) return;
115
- } else e.t = Date.now();
116
- return t(O.event ? O.event(e) : e);
117
- }
118
- function vr(e) {
119
- return this.l[e.type + !0](O.event ? O.event(e) : e);
120
- }
121
- function Kt(e, t, r, n, i, o, a, s, c, m) {
122
- var d, u, f, b, p, g, h, k, N, w, C, x, T, y, L, I = t.type;
123
- if (t.constructor !== void 0) return null;
124
- 128 & r.__u && (c = !!(32 & r.__u), o = [s = t.__e = r.__e]), (d = O.__b) && d(t);
125
- e: if (typeof I == "function") try {
126
- if (k = t.props, N = (d = I.contextType) && n[d.__c], w = d ? N ? N.props.value : d.__ : n, r.__c ? h = (u = t.__c = r.__c).__ = u.__E : ("prototype" in I && I.prototype.render ? t.__c = u = new I(k, w) : (t.__c = u = new be(k, w), u.constructor = I, u.render = Ri), N && N.sub(u), u.props = k, u.state || (u.state = {}), u.context = w, u.__n = n, f = u.__d = !0, u.__h = [], u._sb = []), u.__s == null && (u.__s = u.state), I.getDerivedStateFromProps != null && (u.__s == u.state && (u.__s = Ie({}, u.__s)), Ie(u.__s, I.getDerivedStateFromProps(k, u.__s))), b = u.props, p = u.state, u.__v = t, f) I.getDerivedStateFromProps == null && u.componentWillMount != null && u.componentWillMount(), u.componentDidMount != null && u.__h.push(u.componentDidMount);
127
- else {
128
- if (I.getDerivedStateFromProps == null && k !== b && u.componentWillReceiveProps != null && u.componentWillReceiveProps(k, w), !u.__e && (u.shouldComponentUpdate != null && u.shouldComponentUpdate(k, u.__s, w) === !1 || t.__v === r.__v)) {
129
- for (t.__v !== r.__v && (u.props = k, u.state = u.__s, u.__d = !1), t.__e = r.__e, t.__k = r.__k, t.__k.forEach(function(P) {
130
- P && (P.__ = t);
131
- }), C = 0; C < u._sb.length; C++) u.__h.push(u._sb[C]);
132
- u._sb = [], u.__h.length && a.push(u);
133
- break e;
134
- }
135
- u.componentWillUpdate != null && u.componentWillUpdate(k, u.__s, w), u.componentDidUpdate != null && u.__h.push(function() {
136
- u.componentDidUpdate(b, p, g);
137
- });
138
- }
139
- if (u.context = w, u.props = k, u.__P = e, u.__e = !1, x = O.__r, T = 0, "prototype" in I && I.prototype.render) {
140
- for (u.state = u.__s, u.__d = !1, x && x(t), d = u.render(u.props, u.state, u.context), y = 0; y < u._sb.length; y++) u.__h.push(u._sb[y]);
141
- u._sb = [];
142
- } else do
143
- u.__d = !1, x && x(t), d = u.render(u.props, u.state, u.context), u.state = u.__s;
144
- while (u.__d && ++T < 25);
145
- u.state = u.__s, u.getChildContext != null && (n = Ie(Ie({}, n), u.getChildContext())), f || u.getSnapshotBeforeUpdate == null || (g = u.getSnapshotBeforeUpdate(b, p)), fn(e, wt(L = d != null && d.type === K && d.key == null ? d.props.children : d) ? L : [L], t, r, n, i, o, a, s, c, m), u.base = t.__e, t.__u &= -161, u.__h.length && a.push(u), h && (u.__E = u.__ = null);
146
- } catch (P) {
147
- t.__v = null, c || o != null ? (t.__e = s, t.__u |= c ? 160 : 32, o[o.indexOf(s)] = null) : (t.__e = r.__e, t.__k = r.__k), O.__e(P, t, r);
148
- }
149
- else o == null && t.__v === r.__v ? (t.__k = r.__k, t.__e = r.__e) : t.__e = Pi(r.__e, t, r, n, i, o, a, c, m);
150
- (d = O.diffed) && d(t);
151
- }
152
- function vn(e, t, r) {
153
- t.__d = void 0;
154
- for (var n = 0; n < r.length; n++) Yt(r[n], r[++n], r[++n]);
155
- O.__c && O.__c(t, e), e.some(function(i) {
156
- try {
157
- e = i.__h, i.__h = [], e.some(function(o) {
158
- o.call(i);
159
- });
160
- } catch (o) {
161
- O.__e(o, i.__v);
162
- }
163
- });
164
- }
165
- function Pi(e, t, r, n, i, o, a, s, c) {
166
- var m, d, u, f, b, p, g, h = r.props, k = t.props, N = t.type;
167
- if (N === "svg" && (i = !0), o != null) {
168
- for (m = 0; m < o.length; m++) if ((b = o[m]) && "setAttribute" in b == !!N && (N ? b.localName === N : b.nodeType === 3)) {
169
- e = b, o[m] = null;
170
- break;
171
- }
172
- }
173
- if (e == null) {
174
- if (N === null) return document.createTextNode(k);
175
- e = i ? document.createElementNS("http://www.w3.org/2000/svg", N) : document.createElement(N, k.is && k), o = null, s = !1;
176
- }
177
- if (N === null) h === k || s && e.data === k || (e.data = k);
178
- else {
179
- if (o = o && st.call(e.childNodes), h = r.props || at, !s && o != null) for (h = {}, m = 0; m < e.attributes.length; m++) h[(b = e.attributes[m]).name] = b.value;
180
- for (m in h) b = h[m], m == "children" || (m == "dangerouslySetInnerHTML" ? u = b : m === "key" || m in k || pt(e, m, null, b, i));
181
- for (m in k) b = k[m], m == "children" ? f = b : m == "dangerouslySetInnerHTML" ? d = b : m == "value" ? p = b : m == "checked" ? g = b : m === "key" || s && typeof b != "function" || h[m] === b || pt(e, m, b, h[m], i);
182
- if (d) s || u && (d.__html === u.__html || d.__html === e.innerHTML) || (e.innerHTML = d.__html), t.__k = [];
183
- else if (u && (e.innerHTML = ""), fn(e, wt(f) ? f : [f], t, r, n, i && N !== "foreignObject", o, a, o ? o[0] : r.__k && Ze(r, 0), s, c), o != null) for (m = o.length; m--; ) o[m] != null && dn(o[m]);
184
- s || (m = "value", p !== void 0 && (p !== e[m] || N === "progress" && !p || N === "option" && p !== h[m]) && pt(e, m, p, h[m], !1), m = "checked", g !== void 0 && g !== e[m] && pt(e, m, g, h[m], !1));
185
- }
186
- return e;
187
- }
188
- function Yt(e, t, r) {
189
- try {
190
- typeof e == "function" ? e(t) : e.current = t;
191
- } catch (n) {
192
- O.__e(n, r);
193
- }
194
- }
195
- function Bt(e, t, r) {
196
- var n, i;
197
- if (O.unmount && O.unmount(e), (n = e.ref) && (n.current && n.current !== e.__e || Yt(n, null, t)), (n = e.__c) != null) {
198
- if (n.componentWillUnmount) try {
199
- n.componentWillUnmount();
200
- } catch (o) {
201
- O.__e(o, t);
202
- }
203
- n.base = n.__P = null, e.__c = void 0;
204
- }
205
- if (n = e.__k) for (i = 0; i < n.length; i++) n[i] && Bt(n[i], t, r || typeof e.type != "function");
206
- r || e.__e == null || dn(e.__e), e.__ = e.__e = e.__d = void 0;
207
- }
208
- function Ri(e, t, r) {
209
- return this.constructor(e, r);
210
- }
211
- function Ge(e, t, r) {
212
- var n, i, o, a;
213
- O.__ && O.__(e, t), i = (n = typeof r == "function") ? null : r && r.__k || t.__k, o = [], a = [], Kt(t, e = (!n && r || t).__k = ae(K, null, [e]), i || at, at, t.ownerSVGElement !== void 0, !n && r ? [r] : i ? null : t.firstChild ? st.call(t.childNodes) : null, o, !n && r ? r : i ? i.__e : t.firstChild, n, a), vn(o, e, a);
214
- }
215
- function hn(e, t) {
216
- Ge(e, t, hn);
217
- }
218
- function Mi(e, t, r) {
219
- var n, i, o, a, s = Ie({}, e.props);
220
- for (o in e.type && e.type.defaultProps && (a = e.type.defaultProps), t) o == "key" ? n = t[o] : o == "ref" ? i = t[o] : s[o] = t[o] === void 0 && a !== void 0 ? a[o] : t[o];
221
- return arguments.length > 2 && (s.children = arguments.length > 3 ? st.call(arguments, 2) : r), it(e.type, s, n || e.key, i || e.ref, null);
222
- }
223
- function gn(e, t) {
224
- var r = { __c: t = "__cC" + un++, __: e, Consumer: function(n, i) {
225
- return n.children(i);
226
- }, Provider: function(n) {
227
- var i, o;
228
- return this.getChildContext || (i = [], (o = {})[t] = this, this.getChildContext = function() {
229
- return o;
230
- }, this.shouldComponentUpdate = function(a) {
231
- this.props.value !== a.value && i.some(function(s) {
232
- s.__e = !0, Vt(s);
233
- });
234
- }, this.sub = function(a) {
235
- i.push(a);
236
- var s = a.componentWillUnmount;
237
- a.componentWillUnmount = function() {
238
- i.splice(i.indexOf(a), 1), s && s.call(a);
239
- };
240
- }), n.children;
241
- } };
242
- return r.Provider.__ = r.Consumer.contextType = r;
243
- }
244
- function q(e, t) {
245
- return O.__a && O.__a(t), e;
246
- }
247
- st = cn.slice, O = { __e: function(e, t, r, n) {
248
- for (var i, o, a; t = t.__; ) if ((i = t.__c) && !i.__) try {
249
- if ((o = i.constructor) && o.getDerivedStateFromError != null && (i.setState(o.getDerivedStateFromError(e)), a = i.__d), i.componentDidCatch != null && (i.componentDidCatch(e, n || {}), a = i.__d), a) return i.__E = i;
250
- } catch (s) {
251
- e = s;
252
- }
253
- throw e;
254
- } }, an = 0, be.prototype.setState = function(e, t) {
255
- var r;
256
- r = this.__s != null && this.__s !== this.state ? this.__s : this.__s = Ie({}, this.state), typeof e == "function" && (e = e(Ie({}, r), this.props)), e && Ie(r, e), e != null && this.__v && (t && this._sb.push(t), Vt(this));
257
- }, be.prototype.forceUpdate = function(e) {
258
- this.__v && (this.__e = !0, e && this.__h.push(e), Vt(this));
259
- }, be.prototype.render = K, Ve = [], sn = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, At = function(e, t) {
260
- return e.__v.__b - t.__v.__b;
261
- }, yt.__r = 0, un = 0, typeof window < "u" && window.__PREACT_DEVTOOLS__ && window.__PREACT_DEVTOOLS__.attachPreact("10.19.3", O, { Fragment: K, Component: be });
262
- var Le, $, Pt, hr, Ke = 0, _n = [], ht = [], gr = O.__b, _r = O.__r, Nr = O.diffed, yr = O.__c, xr = O.unmount;
263
- function je(e, t) {
264
- O.__h && O.__h($, e, Ke || t), Ke = 0;
265
- var r = $.__H || ($.__H = { __: [], __h: [] });
266
- return e >= r.__.length && r.__.push({ __V: ht }), r.__[e];
267
- }
268
- function j(e) {
269
- return Ke = 1, Jt(kn, e);
270
- }
271
- function Jt(e, t, r) {
272
- var n = je(Le++, 2);
273
- if (n.t = e, !n.__c && (n.__ = [r ? r(t) : kn(void 0, t), function(s) {
274
- var c = n.__N ? n.__N[0] : n.__[0], m = n.t(c, s);
275
- c !== m && (n.__N = [m, n.__[1]], n.__c.setState({}));
276
- }], n.__c = $, !$.u)) {
277
- var i = function(s, c, m) {
278
- if (!n.__c.__H) return !0;
279
- var d = n.__c.__H.__.filter(function(f) {
280
- return f.__c;
281
- });
282
- if (d.every(function(f) {
283
- return !f.__N;
284
- })) return !o || o.call(this, s, c, m);
285
- var u = !1;
286
- return d.forEach(function(f) {
287
- if (f.__N) {
288
- var b = f.__[0];
289
- f.__ = f.__N, f.__N = void 0, b !== f.__[0] && (u = !0);
290
- }
291
- }), !(!u && n.__c.props === s) && (!o || o.call(this, s, c, m));
292
- };
293
- $.u = !0;
294
- var o = $.shouldComponentUpdate, a = $.componentWillUpdate;
295
- $.componentWillUpdate = function(s, c, m) {
296
- if (this.__e) {
297
- var d = o;
298
- o = void 0, i(s, c, m), o = d;
299
- }
300
- a && a.call(this, s, c, m);
301
- }, $.shouldComponentUpdate = i;
302
- }
303
- return n.__N || n.__;
304
- }
305
- function Q(e, t) {
306
- var r = je(Le++, 3);
307
- !O.__s && er(r.__H, t) && (r.__ = e, r.i = t, $.__H.__h.push(r));
308
- }
309
- function ut(e, t) {
310
- var r = je(Le++, 4);
311
- !O.__s && er(r.__H, t) && (r.__ = e, r.i = t, $.__h.push(r));
312
- }
313
- function X(e) {
314
- return Ke = 5, Ne(function() {
315
- return { current: e };
316
- }, []);
317
- }
318
- function Nn(e, t, r) {
319
- Ke = 6, ut(function() {
320
- return typeof e == "function" ? (e(t()), function() {
321
- return e(null);
322
- }) : e ? (e.current = t(), function() {
323
- return e.current = null;
324
- }) : void 0;
325
- }, r == null ? r : r.concat(e));
326
- }
327
- function Ne(e, t) {
328
- var r = je(Le++, 7);
329
- return er(r.__H, t) ? (r.__V = e(), r.i = t, r.__h = e, r.__V) : r.__;
330
- }
331
- function Fe(e, t) {
332
- return Ke = 8, Ne(function() {
333
- return e;
334
- }, t);
335
- }
336
- function yn(e) {
337
- var t = $.context[e.__c], r = je(Le++, 9);
338
- return r.c = e, t ? (r.__ == null && (r.__ = !0, t.sub($)), t.props.value) : e.__;
339
- }
340
- function Xt(e, t) {
341
- O.useDebugValue && O.useDebugValue(t ? t(e) : e);
342
- }
343
- function xn() {
344
- var e = je(Le++, 11);
345
- if (!e.__) {
346
- for (var t = $.__v; t !== null && !t.__m && t.__ !== null; ) t = t.__;
347
- var r = t.__m || (t.__m = [0, 0]);
348
- e.__ = "P" + r[0] + "-" + r[1]++;
349
- }
350
- return e.__;
351
- }
352
- function Ui() {
353
- for (var e; e = _n.shift(); ) if (e.__P && e.__H) try {
354
- e.__H.__h.forEach(gt), e.__H.__h.forEach(Ft), e.__H.__h = [];
355
- } catch (t) {
356
- e.__H.__h = [], O.__e(t, e.__v);
357
- }
358
- }
359
- O.__b = function(e) {
360
- $ = null, gr && gr(e);
361
- }, O.__r = function(e) {
362
- _r && _r(e), Le = 0;
363
- var t = ($ = e.__c).__H;
364
- t && (Pt === $ ? (t.__h = [], $.__h = [], t.__.forEach(function(r) {
365
- r.__N && (r.__ = r.__N), r.__V = ht, r.__N = r.i = void 0;
366
- })) : (t.__h.forEach(gt), t.__h.forEach(Ft), t.__h = [], Le = 0)), Pt = $;
367
- }, O.diffed = function(e) {
368
- Nr && Nr(e);
369
- var t = e.__c;
370
- t && t.__H && (t.__H.__h.length && (_n.push(t) !== 1 && hr === O.requestAnimationFrame || ((hr = O.requestAnimationFrame) || qi)(Ui)), t.__H.__.forEach(function(r) {
371
- r.i && (r.__H = r.i), r.__V !== ht && (r.__ = r.__V), r.i = void 0, r.__V = ht;
372
- })), Pt = $ = null;
373
- }, O.__c = function(e, t) {
374
- t.some(function(r) {
375
- try {
376
- r.__h.forEach(gt), r.__h = r.__h.filter(function(n) {
377
- return !n.__ || Ft(n);
378
- });
379
- } catch (n) {
380
- t.some(function(i) {
381
- i.__h && (i.__h = []);
382
- }), t = [], O.__e(n, r.__v);
383
- }
384
- }), yr && yr(e, t);
385
- }, O.unmount = function(e) {
386
- xr && xr(e);
387
- var t, r = e.__c;
388
- r && r.__H && (r.__H.__.forEach(function(n) {
389
- try {
390
- gt(n);
391
- } catch (i) {
392
- t = i;
393
- }
394
- }), r.__H = void 0, t && O.__e(t, r.__v));
395
- };
396
- var kr = typeof requestAnimationFrame == "function";
397
- function qi(e) {
398
- var t, r = function() {
399
- clearTimeout(n), kr && cancelAnimationFrame(t), setTimeout(e);
400
- }, n = setTimeout(r, 100);
401
- kr && (t = requestAnimationFrame(r));
402
- }
403
- function gt(e) {
404
- var t = $, r = e.__c;
405
- typeof r == "function" && (e.__c = void 0, r()), $ = t;
406
- }
407
- function Ft(e) {
408
- var t = $;
409
- e.__c = e.__(), $ = t;
410
- }
411
- function er(e, t) {
412
- return !e || e.length !== t.length || t.some(function(r, n) {
413
- return r !== e[n];
414
- });
415
- }
416
- function kn(e, t) {
417
- return typeof t == "function" ? t(e) : t;
418
- }
419
- function wn(e, t) {
420
- for (var r in t) e[r] = t[r];
421
- return e;
422
- }
423
- function jt(e, t) {
424
- for (var r in e) if (r !== "__source" && !(r in t)) return !0;
425
- for (var n in t) if (n !== "__source" && e[n] !== t[n]) return !0;
426
- return !1;
427
- }
428
- function xt(e) {
429
- this.props = e;
430
- }
431
- function Cn(e, t) {
432
- function r(i) {
433
- var o = this.props.ref, a = o == i.ref;
434
- return !a && o && (o.call ? o(null) : o.current = null), t ? !t(this.props, i) || !a : jt(this.props, i);
435
- }
436
- function n(i) {
437
- return this.shouldComponentUpdate = r, ae(e, i);
438
- }
439
- return n.displayName = "Memo(" + (e.displayName || e.name) + ")", n.prototype.isReactComponent = !0, n.__f = !0, n;
440
- }
441
- (xt.prototype = new be()).isPureReactComponent = !0, xt.prototype.shouldComponentUpdate = function(e, t) {
442
- return jt(this.props, e) || jt(this.state, t);
443
- };
444
- var wr = O.__b;
445
- O.__b = function(e) {
446
- e.type && e.type.__f && e.ref && (e.props.ref = e.ref, e.ref = null), wr && wr(e);
447
- };
448
- var Di = typeof Symbol < "u" && Symbol.for && Symbol.for("react.forward_ref") || 3911;
449
- function tr(e) {
450
- function t(r) {
451
- var n = wn({}, r);
452
- return delete n.ref, e(n, r.ref || null);
453
- }
454
- return t.$$typeof = Di, t.render = t, t.prototype.isReactComponent = t.__f = !0, t.displayName = "ForwardRef(" + (e.displayName || e.name) + ")", t;
455
- }
456
- var Cr = function(e, t) {
457
- return e == null ? null : Ee(Ee(e).map(t));
458
- }, Sn = { map: Cr, forEach: Cr, count: function(e) {
459
- return e ? Ee(e).length : 0;
460
- }, only: function(e) {
461
- var t = Ee(e);
462
- if (t.length !== 1) throw "Children.only";
463
- return t[0];
464
- }, toArray: Ee }, Hi = O.__e;
465
- O.__e = function(e, t, r, n) {
466
- if (e.then) {
467
- for (var i, o = t; o = o.__; ) if ((i = o.__c) && i.__c) return t.__e == null && (t.__e = r.__e, t.__k = r.__k), i.__c(e, t);
468
- }
469
- Hi(e, t, r, n);
470
- };
471
- var Sr = O.unmount;
472
- function Tn(e, t, r) {
473
- return e && (e.__c && e.__c.__H && (e.__c.__H.__.forEach(function(n) {
474
- typeof n.__c == "function" && n.__c();
475
- }), e.__c.__H = null), (e = wn({}, e)).__c != null && (e.__c.__P === r && (e.__c.__P = t), e.__c = null), e.__k = e.__k && e.__k.map(function(n) {
476
- return Tn(n, t, r);
477
- })), e;
478
- }
479
- function In(e, t, r) {
480
- return e && r && (e.__v = null, e.__k = e.__k && e.__k.map(function(n) {
481
- return In(n, t, r);
482
- }), e.__c && e.__c.__P === t && (e.__e && r.appendChild(e.__e), e.__c.__e = !0, e.__c.__P = r)), e;
483
- }
484
- function ot() {
485
- this.__u = 0, this.t = null, this.__b = null;
486
- }
487
- function En(e) {
488
- var t = e.__.__c;
489
- return t && t.__a && t.__a(e);
490
- }
491
- function Ln(e) {
492
- var t, r, n;
493
- function i(o) {
494
- if (t || (t = e()).then(function(a) {
495
- r = a.default || a;
496
- }, function(a) {
497
- n = a;
498
- }), n) throw n;
499
- if (!r) throw t;
500
- return ae(r, o);
501
- }
502
- return i.displayName = "Lazy", i.__f = !0, i;
503
- }
504
- function Qe() {
505
- this.u = null, this.o = null;
506
- }
507
- O.unmount = function(e) {
508
- var t = e.__c;
509
- t && t.__R && t.__R(), t && 32 & e.__u && (e.type = null), Sr && Sr(e);
510
- }, (ot.prototype = new be()).__c = function(e, t) {
511
- var r = t.__c, n = this;
512
- n.t == null && (n.t = []), n.t.push(r);
513
- var i = En(n.__v), o = !1, a = function() {
514
- o || (o = !0, r.__R = null, i ? i(s) : s());
515
- };
516
- r.__R = a;
517
- var s = function() {
518
- if (!--n.__u) {
519
- if (n.state.__a) {
520
- var c = n.state.__a;
521
- n.__v.__k[0] = In(c, c.__c.__P, c.__c.__O);
522
- }
523
- var m;
524
- for (n.setState({ __a: n.__b = null }); m = n.t.pop(); ) m.forceUpdate();
525
- }
526
- };
527
- n.__u++ || 32 & t.__u || n.setState({ __a: n.__b = n.__v.__k[0] }), e.then(a, a);
528
- }, ot.prototype.componentWillUnmount = function() {
529
- this.t = [];
530
- }, ot.prototype.render = function(e, t) {
531
- if (this.__b) {
532
- if (this.__v.__k) {
533
- var r = document.createElement("div"), n = this.__v.__k[0].__c;
534
- this.__v.__k[0] = Tn(this.__b, r, n.__O = n.__P);
535
- }
536
- this.__b = null;
537
- }
538
- var i = t.__a && ae(K, null, e.fallback);
539
- return i && (i.__u &= -33), [ae(K, null, t.__a ? null : e.children), i];
540
- };
541
- var Tr = function(e, t, r) {
542
- if (++r[1] === r[0] && e.o.delete(t), e.props.revealOrder && (e.props.revealOrder[0] !== "t" || !e.o.size)) for (r = e.u; r; ) {
543
- for (; r.length > 3; ) r.pop()();
544
- if (r[1] < r[0]) break;
545
- e.u = r = r[2];
546
- }
547
- };
548
- function Ai(e) {
549
- return this.getChildContext = function() {
550
- return e.context;
551
- }, e.children;
552
- }
553
- function Vi(e) {
554
- var t = this, r = e.i;
555
- t.componentWillUnmount = function() {
556
- Ge(null, t.l), t.l = null, t.i = null;
557
- }, t.i && t.i !== r && t.componentWillUnmount(), t.l || (t.i = r, t.l = { nodeType: 1, parentNode: r, childNodes: [], appendChild: function(n) {
558
- this.childNodes.push(n), t.i.appendChild(n);
559
- }, insertBefore: function(n, i) {
560
- this.childNodes.push(n), t.i.appendChild(n);
561
- }, removeChild: function(n) {
562
- this.childNodes.splice(this.childNodes.indexOf(n) >>> 1, 1), t.i.removeChild(n);
563
- } }), Ge(ae(Ai, { context: t.context }, e.__v), t.l);
564
- }
565
- function On(e, t) {
566
- var r = ae(Vi, { __v: e, i: t });
567
- return r.containerInfo = t, r;
568
- }
569
- (Qe.prototype = new be()).__a = function(e) {
570
- var t = this, r = En(t.__v), n = t.o.get(e);
571
- return n[0]++, function(i) {
572
- var o = function() {
573
- t.props.revealOrder ? (n.push(i), Tr(t, e, n)) : i();
574
- };
575
- r ? r(o) : o();
576
- };
577
- }, Qe.prototype.render = function(e) {
578
- this.u = null, this.o = /* @__PURE__ */ new Map();
579
- var t = Ee(e.children);
580
- e.revealOrder && e.revealOrder[0] === "b" && t.reverse();
581
- for (var r = t.length; r--; ) this.o.set(t[r], this.u = [1, 0, this.u]);
582
- return e.children;
583
- }, Qe.prototype.componentDidUpdate = Qe.prototype.componentDidMount = function() {
584
- var e = this;
585
- this.o.forEach(function(t, r) {
586
- Tr(e, r, t);
587
- });
588
- };
589
- var Pn = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, Bi = /^(?: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]/, Fi = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, ji = /[A-Z0-9]/g, $i = typeof document < "u", zi = function(e) {
590
- return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(e);
591
- };
592
- function Rn(e, t, r) {
593
- return t.__k == null && (t.textContent = ""), Ge(e, t), typeof r == "function" && r(), e ? e.__c : null;
594
- }
595
- function Mn(e, t, r) {
596
- return hn(e, t), typeof r == "function" && r(), e ? e.__c : null;
597
- }
598
- be.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(e) {
599
- Object.defineProperty(be.prototype, e, { configurable: !0, get: function() {
600
- return this["UNSAFE_" + e];
601
- }, set: function(t) {
602
- Object.defineProperty(this, e, { configurable: !0, writable: !0, value: t });
603
- } });
604
- });
605
- var Ir = O.event;
606
- function Qi() {
607
- }
608
- function Wi() {
609
- return this.cancelBubble;
610
- }
611
- function Zi() {
612
- return this.defaultPrevented;
613
- }
614
- O.event = function(e) {
615
- return Ir && (e = Ir(e)), e.persist = Qi, e.isPropagationStopped = Wi, e.isDefaultPrevented = Zi, e.nativeEvent = e;
616
- };
617
- var rr, Gi = { enumerable: !1, configurable: !0, get: function() {
618
- return this.class;
619
- } }, Er = O.vnode;
620
- O.vnode = function(e) {
621
- typeof e.type == "string" && function(t) {
622
- var r = t.props, n = t.type, i = {};
623
- for (var o in r) {
624
- var a = r[o];
625
- if (!(o === "value" && "defaultValue" in r && a == null || $i && o === "children" && n === "noscript" || o === "class" || o === "className")) {
626
- var s = o.toLowerCase();
627
- o === "defaultValue" && "value" in r && r.value == null ? o = "value" : o === "download" && a === !0 ? a = "" : s === "ondoubleclick" ? o = "ondblclick" : s !== "onchange" || n !== "input" && n !== "textarea" || zi(r.type) ? s === "onfocus" ? o = "onfocusin" : s === "onblur" ? o = "onfocusout" : Fi.test(o) ? o = s : n.indexOf("-") === -1 && Bi.test(o) ? o = o.replace(ji, "-$&").toLowerCase() : a === null && (a = void 0) : s = o = "oninput", s === "oninput" && i[o = s] && (o = "oninputCapture"), i[o] = a;
628
- }
629
- }
630
- n == "select" && i.multiple && Array.isArray(i.value) && (i.value = Ee(r.children).forEach(function(c) {
631
- c.props.selected = i.value.indexOf(c.props.value) != -1;
632
- })), n == "select" && i.defaultValue != null && (i.value = Ee(r.children).forEach(function(c) {
633
- c.props.selected = i.multiple ? i.defaultValue.indexOf(c.props.value) != -1 : i.defaultValue == c.props.value;
634
- })), r.class && !r.className ? (i.class = r.class, Object.defineProperty(i, "className", Gi)) : (r.className && !r.class || r.class && r.className) && (i.class = i.className = r.className), t.props = i;
635
- }(e), e.$$typeof = Pn, Er && Er(e);
636
- };
637
- var Lr = O.__r;
638
- O.__r = function(e) {
639
- Lr && Lr(e), rr = e.__c;
640
- };
641
- var Or = O.diffed;
642
- O.diffed = function(e) {
643
- Or && Or(e);
644
- var t = e.props, r = e.__e;
645
- r != null && e.type === "textarea" && "value" in t && t.value !== r.value && (r.value = t.value == null ? "" : t.value), rr = null;
646
- };
647
- var Un = { ReactCurrentDispatcher: { current: { readContext: function(e) {
648
- return rr.__n[e.__c].props.value;
649
- } } } };
650
- function qn(e) {
651
- return ae.bind(null, e);
652
- }
653
- function ct(e) {
654
- return !!e && e.$$typeof === Pn;
655
- }
656
- function Dn(e) {
657
- return ct(e) && e.type === K;
658
- }
659
- function Hn(e) {
660
- return ct(e) ? Mi.apply(null, arguments) : e;
661
- }
662
- function nr(e) {
663
- return !!e.__k && (Ge(null, e), !0);
664
- }
665
- function An(e) {
666
- return e && (e.base || e.nodeType === 1 && e) || null;
667
- }
668
- var Vn = function(e, t) {
669
- return e(t);
670
- }, Bn = function(e, t) {
671
- return e(t);
672
- }, Fn = K;
673
- function ir(e) {
674
- e();
675
- }
676
- function jn(e) {
677
- return e;
678
- }
679
- function $n() {
680
- return [!1, ir];
681
- }
682
- var zn = ut, Qn = ct;
683
- function Wn(e, t) {
684
- var r = t(), n = j({ h: { __: r, v: t } }), i = n[0].h, o = n[1];
685
- return ut(function() {
686
- i.__ = r, i.v = t, Rt(i) && o({ h: i });
687
- }, [e, r, t]), Q(function() {
688
- return Rt(i) && o({ h: i }), e(function() {
689
- Rt(i) && o({ h: i });
690
- });
691
- }, [e]), r;
692
- }
693
- function Rt(e) {
694
- var t, r, n = e.v, i = e.__;
695
- try {
696
- var o = n();
697
- return !((t = i) === (r = o) && (t !== 0 || 1 / t == 1 / r) || t != t && r != r);
698
- } catch {
699
- return !0;
700
- }
701
- }
702
- var Ki = { useState: j, useId: xn, useReducer: Jt, useEffect: Q, useLayoutEffect: ut, useInsertionEffect: zn, useTransition: $n, useDeferredValue: jn, useSyncExternalStore: Wn, startTransition: ir, useRef: X, useImperativeHandle: Nn, useMemo: Ne, useCallback: Fe, useContext: yn, useDebugValue: Xt, version: "17.0.2", Children: Sn, render: Rn, hydrate: Mn, unmountComponentAtNode: nr, createPortal: On, createElement: ae, createContext: gn, createFactory: qn, cloneElement: Hn, createRef: mn, Fragment: K, isValidElement: ct, isElement: Qn, isFragment: Dn, findDOMNode: An, Component: be, PureComponent: xt, memo: Cn, forwardRef: tr, flushSync: Bn, unstable_batchedUpdates: Vn, StrictMode: Fn, Suspense: ot, SuspenseList: Qe, lazy: Ln, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: Un };
703
- const Yi = Object.freeze(Object.defineProperty({ __proto__: null, Children: Sn, Component: be, Fragment: K, PureComponent: xt, StrictMode: Fn, Suspense: ot, SuspenseList: Qe, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: Un, cloneElement: Hn, createContext: gn, createElement: ae, createFactory: qn, createPortal: On, createRef: mn, default: Ki, findDOMNode: An, flushSync: Bn, forwardRef: tr, hydrate: Mn, isElement: Qn, isFragment: Dn, isValidElement: ct, lazy: Ln, memo: Cn, render: Rn, startTransition: ir, unmountComponentAtNode: nr, unstable_batchedUpdates: Vn, useCallback: Fe, useContext: yn, useDebugValue: Xt, useDeferredValue: jn, useEffect: Q, useErrorBoundary: function(e) {
704
- var t = je(Le++, 10), r = j();
705
- return t.__ = e, $.componentDidCatch || ($.componentDidCatch = function(n, i) {
706
- t.__ && t.__(n, i), r[1](n);
707
- }), [r[0], function() {
708
- r[1](void 0);
709
- }];
710
- }, useId: xn, useImperativeHandle: Nn, useInsertionEffect: zn, useLayoutEffect: ut, useMemo: Ne, useReducer: Jt, useRef: X, useState: j, useSyncExternalStore: Wn, useTransition: $n, version: "17.0.2" }, Symbol.toStringTag, { value: "Module" })), Pr = (e) => {
711
- let t;
712
- const r = /* @__PURE__ */ new Set(), n = (a, s) => {
713
- const c = typeof a == "function" ? a(t) : a;
714
- if (!Object.is(c, t)) {
715
- const m = t;
716
- t = s ?? typeof c != "object" ? c : Object.assign({}, t, c), r.forEach((d) => d(t, m));
717
- }
718
- }, i = () => t, o = { setState: n, getState: i, subscribe: (a) => (r.add(a), () => r.delete(a)), destroy: () => r.clear() };
719
- return t = e(n, i, o), o;
720
- };
721
- function Ji(e) {
722
- return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
723
- }
724
- function Xi(e) {
725
- if (Object.prototype.hasOwnProperty.call(e, "__esModule")) return e;
726
- var t = e.default;
727
- if (typeof t == "function") {
728
- var r = function n() {
729
- return this instanceof n ? Reflect.construct(t, arguments, this.constructor) : t.apply(this, arguments);
730
- };
731
- r.prototype = t.prototype;
732
- } else r = {};
733
- return Object.defineProperty(r, "__esModule", { value: !0 }), Object.keys(e).forEach(function(n) {
734
- var i = Object.getOwnPropertyDescriptor(e, n);
735
- Object.defineProperty(r, n, i.get ? i : { enumerable: !0, get: function() {
736
- return e[n];
737
- } });
738
- }), r;
739
- }
740
- var Rr = { exports: {} }, Mr = {};
741
- const Zn = Xi(Yi);
742
- var Ur, qr, Dr, Hr, Ar = { exports: {} }, Vr = {};
743
- function eo() {
744
- return Ur || (Ur = 1, function() {
745
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
746
- var e = Zn, t = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
747
- function r(b) {
748
- for (var p = arguments.length, g = new Array(p > 1 ? p - 1 : 0), h = 1; h < p; h++) g[h - 1] = arguments[h];
749
- (function(k, N, w) {
750
- var C = t.ReactDebugCurrentFrame.getStackAddendum();
751
- C !== "" && (N += "%s", w = w.concat([C]));
752
- var x = w.map(function(T) {
753
- return String(T);
754
- });
755
- x.unshift("Warning: " + N), Function.prototype.apply.call(console[k], console, x);
756
- })("error", b, g);
757
- }
758
- var n = typeof Object.is == "function" ? Object.is : function(b, p) {
759
- return b === p && (b !== 0 || 1 / b == 1 / p) || b != b && p != p;
760
- }, i = e.useState, o = e.useEffect, a = e.useLayoutEffect, s = e.useDebugValue, c = !1, m = !1;
761
- function d(b) {
762
- var p = b.getSnapshot, g = b.value;
763
- try {
764
- var h = p();
765
- return !n(g, h);
766
- } catch {
767
- return !0;
768
- }
769
- }
770
- var u = typeof window > "u" || window.document === void 0 || window.document.createElement === void 0 ? function(b, p, g) {
771
- return p();
772
- } : function(b, p, g) {
773
- c || e.startTransition !== void 0 && (c = !0, r("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));
774
- var h = p();
775
- if (!m) {
776
- var k = p();
777
- n(h, k) || (r("The result of getSnapshot should be cached to avoid an infinite loop"), m = !0);
778
- }
779
- var N = i({ inst: { value: h, getSnapshot: p } }), w = N[0].inst, C = N[1];
780
- return a(function() {
781
- w.value = h, w.getSnapshot = p, d(w) && C({ inst: w });
782
- }, [b, h, p]), o(function() {
783
- return d(w) && C({ inst: w }), b(function() {
784
- d(w) && C({ inst: w });
785
- });
786
- }, [b]), s(h), h;
787
- }, f = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : u;
788
- Vr.useSyncExternalStore = f, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
789
- }()), Vr;
790
- }
791
- function to() {
792
- return qr || (qr = 1, Ar.exports = eo()), Ar.exports;
793
- }
794
- var ro = (Hr || (Hr = 1, Rr.exports = (Dr || (Dr = 1, function() {
795
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
796
- var e = Zn, t = to(), r = typeof Object.is == "function" ? Object.is : function(c, m) {
797
- return c === m && (c !== 0 || 1 / c == 1 / m) || c != c && m != m;
798
- }, n = t.useSyncExternalStore, i = e.useRef, o = e.useEffect, a = e.useMemo, s = e.useDebugValue;
799
- Mr.useSyncExternalStoreWithSelector = function(c, m, d, u, f) {
800
- var b, p = i(null);
801
- p.current === null ? (b = { hasValue: !1, value: null }, p.current = b) : b = p.current;
802
- var g = a(function() {
803
- var w, C, x = !1, T = function(L) {
804
- if (!x) {
805
- x = !0, w = L;
806
- var I = u(L);
807
- if (f !== void 0 && b.hasValue) {
808
- var P = b.value;
809
- if (f(P, I)) return C = P, P;
810
- }
811
- return C = I, I;
812
- }
813
- var v = C;
814
- if (r(w, L)) return v;
815
- var _ = u(L);
816
- return f !== void 0 && f(v, _) ? v : (w = L, C = _, _);
817
- }, y = d === void 0 ? null : d;
818
- return [function() {
819
- return T(m());
820
- }, y === null ? void 0 : function() {
821
- return T(y());
822
- }];
823
- }, [m, d, u, f]), h = g[0], k = g[1], N = n(c, h, k);
824
- return o(function() {
825
- b.hasValue = !0, b.value = N;
826
- }, [N]), s(N), N;
827
- }, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
828
- }()), Mr)), Rr.exports);
829
- const no = Ji(ro), { useSyncExternalStoreWithSelector: io } = no, Br = (e) => {
830
- const t = typeof e == "function" ? ((n) => n ? Pr(n) : Pr)(e) : e, r = (n, i) => function(o, a = o.getState, s) {
831
- const c = io(o.subscribe, o.getState, o.getServerState || o.getState, a, s);
832
- return Xt(c), c;
833
- }(t, n, i);
834
- return Object.assign(r, t), r;
835
- }, Gn = (e) => e ? Br(e) : Br, oo = 1, lo = 2, or = { eq: (e, t) => e == t, neq(e, t) {
836
- return !this.eq(e, t);
837
- }, 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((r) => e.indexOf(r) === -1), list_alo(e, t) {
838
- if (!Array.isArray(t)) return !1;
839
- const r = Array.isArray(e) ? e : [e], n = new Set(r);
840
- return t.some((i) => n.has(i));
841
- }, list_dni(e, t) {
842
- if (!Array.isArray(t)) return !1;
843
- const r = Array.isArray(e) ? e : [e], n = new Set(r);
844
- return t.every((i) => !n.has(i));
845
- }, contains(e, t) {
846
- const r = e.toLowerCase(), n = t.toLowerCase();
847
- return r.includes(n);
848
- }, notcontains(e, t) {
849
- return !this.contains(e, t);
850
- } }, ao = (e, t, r) => {
851
- switch (t) {
852
- case "videovoice":
853
- return !!(e && e.value);
854
- case "open":
855
- return !!r;
856
- case "multipleselect":
857
- return !!(r && Object.keys(r).length);
858
- case "recordedtask":
859
- return (r == null ? void 0 : r.taskStatus) === "completed";
860
- case "texturlprompt":
861
- return !e.value;
862
- case "consentlegal":
863
- case "nps":
864
- case "likert":
865
- return r !== null;
866
- case "multiplechoice":
867
- return r !== void 0;
868
- case "matrix":
869
- return !!(r && Object.values(r).every((n) => n !== null));
870
- default:
871
- return !0;
872
- }
873
- }, Kn = (e, t) => {
874
- if (t === "matrix") {
875
- const r = Object.keys(e).length, n = Object.values(e).filter((i) => i !== null).length;
876
- return n > 0 && n < r;
877
- }
878
- return !1;
879
- }, Yn = ({ cards: e, index: t, hasEndCard: r, allResponses: n, uploadProgress: i = {} }) => {
880
- if (t >= e.length || t < 0) return null;
881
- const o = e[t];
882
- let a = t + 1;
883
- const s = o.props.routingOptions || [];
884
- for (let d = 0; d < s.length; d++) {
885
- const { group: u, target: f } = s[d];
886
- if (!(u != null && u.length)) continue;
887
- const b = u[0];
888
- if (b.questionIndex === void 0 || b.questionIndex > n.length) continue;
889
- let p = Fr({ comparator: b.comparator, response: n[b.questionIndex], type: o.type, value: b.value });
890
- for (let g = 1; g < u.length; g += 2) {
891
- const h = u[g], k = u[g + 1], N = Fr({ comparator: k.comparator, response: n[k.questionIndex], type: e[k.questionIndex].type, value: k.value });
892
- h === oo ? p && (p = N) : h === lo && (p || (p = N));
893
- }
894
- if (p) {
895
- a = f === -1 && r ? e.length - 1 : f;
896
- break;
897
- }
898
- }
899
- const c = e.findIndex((d) => d.type === "uploading");
900
- let m;
901
- return m = c > 0 ? r ? e.length - 3 : e.length - 2 : e.length - 1, t >= m || a === -1 || a !== null && a > m ? c > 0 && Object.values(i).some((u) => u.isSubmitted && !u.isComplete) ? c : r ? e.length - 1 : null : a === -1 ? null : a;
902
- }, Fr = ({ comparator: e, response: t, type: r, value: n }) => {
903
- if (e === "answered") switch (r) {
904
- case "texturlprompt":
905
- return t === void 0;
906
- case "consentlegal":
907
- return t && t.submitted === !0;
908
- case "recordedtask":
909
- return "taskStatus" in t && t.taskStatus === "completed";
910
- case "likert":
911
- case "nps":
912
- return Number.isInteger(t);
913
- case "rankorder":
914
- case "matrix":
915
- return Object.values(t).every((i) => i !== null);
916
- case "multiplechoice":
917
- return t !== void 0;
918
- case "multipleselect":
919
- return (t == null ? void 0 : t.length) > 0;
920
- case "open":
921
- return t && t.length > 0;
922
- case "videovoice":
923
- return !!(t != null && t.mediaRecordingUid);
924
- default:
925
- return !1;
926
- }
927
- if (e === "given_up") return r !== "recordedtask" || "taskStatus" in t && t.taskStatus === "given.up";
928
- if (e === "partial") return r === "matrix" && Kn(t, r);
929
- if (e === "skipped") switch (r) {
930
- case "texturlprompt":
931
- return t == null ? void 0 : t.skipped;
932
- case "consentlegal":
933
- case "likert":
934
- case "nps":
935
- case "videovoice":
936
- return t === null;
937
- case "recordedtask":
938
- return "taskStatus" in t && t.taskStatus === "abandoned";
939
- case "open":
940
- return t === null || (t == null ? void 0 : t.length) === 0;
941
- case "multiplechoice":
942
- return t === void 0;
943
- case "multipleselect":
944
- return (t == null ? void 0 : t.length) === 0;
945
- case "matrix":
946
- return Object.values(t).every((i) => i === null);
947
- case "rankorder":
948
- return t === null || Object.values(t).some((i) => i === null);
949
- default:
950
- return !1;
951
- }
952
- return or[e](t, n);
953
- }, so = (e) => {
954
- var n, i, o;
955
- switch (e.type) {
956
- case "multipleselect":
957
- return e && e.props && e.props.options ? e.props.options.length > 13 ? e.props.options.map((a) => [a.value]) : (t = e.props.options.map((a) => a.value), r = !e.props.properties.required, t.reduce((a, s) => a.concat(a.map((c) => [...c, s])), [[]]).filter((a) => r || a.length > 0)) : null;
958
- case "multiplechoice": {
959
- if (!e || !e.props || !e.props.options) return null;
960
- const a = e.props.options.map((s) => s.value);
961
- return e.props.properties.required || a.push(void 0), a;
962
- }
963
- case "matrix": {
964
- if (!((n = e == null ? void 0 : e.props) != null && n.options)) return null;
965
- const a = e.props.properties.matrixColumn, s = e.props.options, c = s.reduce((d, u) => (d[u.id] = null, d), {}), m = [{ ...c, [s[0].id]: a[0].value }, s.reduce((d, u) => (d[u.id] = a[0].value, d), {})];
966
- return e.props.properties.required || m.push(c), m;
967
- }
968
- case "likert": {
969
- const a = Number((o = (i = e.props) == null ? void 0 : i.properties) == null ? void 0 : o.range) || 5;
970
- return [...Array.from(Array(a).keys()).map((c) => c + 1), ...e.props.properties.required ? [] : [null]];
971
- }
972
- case "nps":
973
- return [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ...e.props.properties.required ? [] : [null]];
974
- case "videovoice":
975
- case "open":
976
- return ["1", ...e.props.properties.required ? [] : [""]];
977
- case "recordedtask": {
978
- const a = [{ taskStatus: "completed" }, { taskStatus: "given.up" }];
979
- return e.props.properties.required || a.push({ taskStatus: "abandoned" }), a;
980
- }
981
- case "texturlprompt":
982
- return [void 0, ...e.props.properties.required ? [] : [{ skipped: !0 }]];
983
- case "consentlegal":
984
- return [1, ...e.props.properties.required ? [] : [null]];
985
- default:
986
- return [1];
987
- }
988
- var t, r;
989
- }, uo = (e) => e in or, co = (e) => typeof e == "object" && e !== null && "taskStatus" in e, mo = (e, t = []) => t.reduce((r, n) => {
990
- const { group: i, target: o } = n;
991
- if (!(i != null && i.length)) return [...r];
992
- const a = i.filter((s) => !!Number(s) || typeof s == "object" && s.questionIndex === e).map((s) => {
993
- const { comparator: c, value: m } = s;
994
- return { comparator: c, target: o, value: m };
995
- });
996
- return [...r, ...a];
997
- }, []), Mt = /* @__PURE__ */ new Set(["thanks", "uploading"]), V = Gn()((e, t) => ({ allResponses: [], answers: void 0, apiURL: "", border: "#000000", cards: [], close: async (r = We) => {
998
- const n = t(), { fadeout: i, remove: o, trackHistory: a, studyType: s } = n;
999
- await i(r), Ut(n) || a({ event: "closed" }), Ci.info("SurveyClosing", { surveyId: n.surveyId }), ur.enable(), o({ initiator: cr.Closed, studyType: s });
1000
- }, configureExitOnOverlayClick: () => {
1001
- }, customMetadata: {}, destroy: async (r) => {
1002
- const { eventEmitFn: n, fadeout: i, remove: o, studyType: a, surveyId: s } = t();
1003
- n("survey.complete", s), await i(r), ur.enable(), o({ initiator: cr.Complete, studyType: a });
1004
- }, endCard: { headline: "" }, envId: "", eventEmitFn: rt.emit.bind(rt), fadeout: async (r) => {
1005
- const { eventEmitFn: n, headers: i, viewDocument: o } = t();
1006
- return Nt(i) ? Promise.resolve() : (n(ce.SurveyFadingOut), new Promise((a) => {
1007
- const s = o.getElementById(r);
1008
- s ? (s.addEventListener("transitionend", () => {
1009
- a();
1010
- }), s.classList.remove("ul-app--visible")) : a();
1011
- }));
1012
- }, forceBrandedLogo: !1, frame: document.createElement("iframe"), handleClickEmbedButton: (r) => {
1013
- const { cards: n, eventEmitFn: i, index: o } = t();
1014
- i(r, { qid: n[o].name, props: n[o].props }), e(() => ({ hasViewedEmbed: !0 }));
1015
- }, handleUploadUpdate: ({ mediaRecordingUid: r, isComplete: n, progressPct: i, isSubmitted: o }) => {
1016
- var b, p, g;
1017
- const { cards: a, destroy: s, index: c, uploadProgress: m } = t(), d = n || ((b = m[r]) == null ? void 0 : b.isComplete), u = { ...m, [r]: { progressPct: d ? 100 : i || ((p = m[r]) == null ? void 0 : p.progressPct), isComplete: d, isSubmitted: o || ((g = m[r]) == null ? void 0 : g.isSubmitted) } };
1018
- if (e({ uploadProgress: u }), a[c].type !== "uploading") return;
1019
- const f = Object.entries(m).every(([h, k]) => !k.isSubmitted || k.isComplete || r == h && n);
1020
- if (f && c >= a.length - 1) return s(We);
1021
- e({ index: f ? c + 1 : c, uploadingCardViewed: !0 });
1022
- }, 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: (r) => {
1023
- const { allResponses: n, cards: i, eventEmitFn: o, index: a, responseGroupUid: s, submit: c, trackHistory: m, uploadProgress: d, viewedCardCount: u } = t();
1024
- e({ minScrollableHeight: void 0 });
1025
- const f = Array.isArray(r.data) ? r.data : [r.data], b = Date.now(), p = [...i], g = { response: [], responseGroupUid: s, questionIndex: a };
1026
- let h = null;
1027
- const k = n.slice(0);
1028
- f.forEach((C, x) => {
1029
- const T = p[a + x], { type: y, ...L } = C, I = { ...L, answeredAt: b }, P = I.value;
1030
- ((_) => _ && !Mt.has(_.type))(T) && (T.value = P, T.secondaryValue = I.secondaryValue || null), g.response.push(I);
1031
- let v = P;
1032
- y !== "multipleselect" && y !== "multiplechoice" || P === null || (v = y === "multiplechoice" ? Object.values(P).find((_) => _ !== !1) : P, y === "multipleselect" && (v = p[a + x].props.options.reduce((_, S) => (P[S.id] && _.push(S.value), _), []))), k[a + x] = v, h = Yn({ cards: p, index: a + x, hasEndCard: !!r.endCard, uploadProgress: d, allResponses: k });
1033
- }), e({ allResponses: k }), (h === null || Mt.has(p[h].type)) && (g.completedAt = b);
1034
- const N = c(g);
1035
- if (h === null) return void r.completeSurvey();
1036
- h && !Mt.has(p[h].type) && N.finally(() => {
1037
- m({ event: "seen", index: h });
1038
- });
1039
- const w = p[h];
1040
- p[h] && o && o("survey.question", { qid: w.name, props: w.props }), e({ cards: p, hasViewedEmbed: !1, index: h, viewedCardCount: u + 1 });
1041
- }, pendingRemoveIframeReason: null, previewKey: null, previewMode: void 0, recorder: () => {
1042
- }, recorderEventEmitter: rt, resolveTrackedPromise: () => {
1043
- const { removeIframeIfReady: r } = t();
1044
- e((n) => ({ unresolvedRequestCount: n.unresolvedRequestCount - 1 })), r();
1045
- }, responseGroupUid: "", remove: ({ initiator: r, studyType: n }) => {
1046
- const { eventEmitFn: i, removeIframeIfReady: o, surveyId: a } = t();
1047
- e({ pendingRemoveIframeReason: r, studyType: n }), i(ce.SurveyCloseRequested, { name: ce.SurveyCloseRequested, initiator: r, studyType: n, "survey.id": a }), o();
1048
- }, removeIframeIfReady: () => {
1049
- const { eventEmitFn: r, pendingRemoveIframeReason: n, unresolvedRequestCount: i, studyType: o, surveyId: a } = t();
1050
- n && i === 0 && (r(ce.SurveyWillClose, { name: ce.SurveyWillClose, initiator: n, studyType: o, "survey.id": a }), e({ pendingRemoveIframeReason: null, studyType: o }));
1051
- }, seen: async () => {
1052
- const { trackHistory: r } = t();
1053
- return r({ event: "seen", isNew: !0 });
1054
- }, slugName: null, showStripes: !1, showSurveyBrand: !1, styleNonce: "", submit: async ({ completedAt: r, questionIndex: n, response: i, responseGroupUid: o }) => {
1055
- const a = t();
1056
- if (!o || Ut(a)) return;
1057
- const s = { responseGroupUid: o, meta: a.meta, customMetadata: a.customMetadata, responses: i, completedAt: r, previewKey: a.previewKey }, c = await a.trackPromise(Ht(`${a.apiURL}/sdk/1/environments/${a.envId}/visitors/${a.userId}/responses/submit`, { body: JSON.stringify(s), headers: a.headers, method: "POST" }));
1058
- c.ok ? i.forEach((m, d) => {
1059
- a.eventEmitFn(ce.QuestionAnswered, { ...m, questionIndex: n ? n + d : void 0, "survey.id": a.surveyId });
1060
- }) : c.reportError && (console.warn("[Sprig] (ERR-427) Failed to submit response", c.error), await a.trackPromise(jr(a, "submitResponse", c.error)));
1061
- }, surveyId: 0, tabTitle: "", trackHistory: async ({ event: r, index: n, isNew: i = !1 }) => {
1062
- const o = t();
1063
- if (Ut(o)) return;
1064
- const { cards: a, index: s } = o;
1065
- let c = n ?? s, m = a[c];
1066
- for (; m; ) {
1067
- const d = { sid: o.surveyId, qid: m.name, action: r, vid: o.userId, eid: o.envId, isNew: i, responseGroupUid: o.responseGroupUid, previewKey: o.previewKey }, u = await o.trackPromise(Ht(`${o.apiURL}/sdk/1/visitors/${o.userId}/surveys/${o.surveyId}/history`, { method: "POST", headers: o.headers, body: JSON.stringify(d) }));
1068
- !u.ok && u.reportError && (console.warn("[Sprig] (ERR-428) Failed to track survey event", u.error), await o.trackPromise(jr(o, "trackHistory", u.error)));
1069
- const f = a[c + 1];
1070
- if (!m.groupId || !(f != null && f.groupId) || f.groupId !== m.groupId) break;
1071
- c++, m = f, i = !1;
1072
- }
1073
- }, trackPromise: async (r) => {
1074
- const { resolveTrackedPromise: n } = t();
1075
- return e((i) => ({ unresolvedRequestCount: i.unresolvedRequestCount + 1 })), r.then((i) => (n(), i)).catch((i) => {
1076
- throw n(), i;
1077
- });
1078
- }, unresolvedRequestCount: 0, update: () => {
1079
- const { cards: r, index: n, headers: i, eventEmitFn: o, frame: a, useMobileStyling: s, surveyId: c, viewDocument: m } = t(), d = i["userleap-platform"] === "web", u = Nt(i), f = r[n], b = f.type === "matrix" && !(f.props.properties.displayMatrixAsAccordion || s);
1080
- e({ minScrollableHeight: void 0 }), setTimeout(() => {
1081
- var k, N, w;
1082
- !u && !s && ((k = a == null ? void 0 : a.setWidth) == null || k.call(a, ki));
1083
- const [p, g, h] = wi(m, d && !s, u);
1084
- u ? (o(ce.SurveyHeight, { name: ce.SurveyHeight, contentFrameHeight: p, "survey.id": c }), o(ce.SurveyWidth, { name: ce.SurveyWidth, contentFrameWidth: g, "survey.id": c })) : ((N = a.setHeight) == null || N.call(a, p), e({ minScrollableHeight: h }), !s && b && ((w = a.setWidth) == null || w.call(a, g)));
1085
- }, 100);
1086
- }, uploadingCardViewed: !1, uploadProgress: {}, useDesktopPrototype: void 0, useMobileStyling: !1, userId: "", viewDocument: window.document, viewedCardCount: 0, focusedQuestionId: null, setFocusedQuestionId: (r) => e({ focusedQuestionId: r }) })), Ut = (e) => !e.userId || e.meta && e.meta.mode === "test" || e.isPreview || e.previewMode, jr = async (e, t, r) => {
1087
- const { mode: n, userId: i, envId: o, apiURL: a, headers: s, viewDocument: c } = e, m = c.documentElement, d = { mode: n, screenWidth: window.screen.width, screenHeight: window.screen.height, clientWidth: m.clientWidth, clientHeight: m.clientHeight, location: window.location.href, language: window.navigator.language }, u = { action: t, err: { message: `${r == null ? void 0 : r.name} - ${r == null ? void 0 : r.message}`, stack: r == null ? void 0 : r.stack }, meta: d, vid: i, envId: o };
1088
- (await Ht(`${a}/sdk/1/errors`, { method: "POST", headers: Object.assign({ "x-ul-error": window.btoa(`userleap-${Date.now()}-error`) }, s), body: JSON.stringify(u) })).ok || console.warn("[Sprig] (ERR-444) Failed to report error to API", r);
1089
- }, Jn = (e) => ae("svg", { fill: "none", height: 24, viewBox: "0 0 24 24", width: 24, xmlns: "http://www.w3.org/2000/svg", ...e }, ae("path", { d: "M17 10L12 15L7 10", stroke: "#0B2330", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5 })), Xn = (e) => ae("svg", { fill: "none", height: 10, viewBox: "0 0 10 10", width: 10, xmlns: "http://www.w3.org/2000/svg", ...e }, ae("path", { d: "M9.15377 1.30774L4.07685 8.23082L1.30762 5.00005", stroke: "white", strokeLinecap: "round", strokeWidth: 2 }));
1090
- var po = 0;
1091
- function l(e, t, r, n, i, o) {
1092
- var a, s, c = {};
1093
- for (s in t) s == "ref" ? a = t[s] : c[s] = t[s];
1094
- var m = { type: e, props: c, key: r, ref: a, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: --po, __i: -1, __u: 0, __source: i, __self: o };
1095
- if (typeof e == "function" && (a = e.defaultProps)) for (s in a) c[s] === void 0 && (c[s] = a[s]);
1096
- return O.vnode && O.vnode(m), m;
1097
- }
1098
- var Ce = "/Users/toben/git-local/sdk/platform/web/src/view/components/accordion.tsx";
1099
- const fo = ({ visible: e }) => l("div", { className: "sprig-check-background", style: { opacity: e ? 1 : 0 }, children: l(Xn, { className: "sprig-check" }, void 0, 0, { fileName: Ce, lineNumber: 21, columnNumber: 7 }, void 0) }, void 0, 0, { fileName: Ce, lineNumber: 17, columnNumber: 5 }, void 0), $r = "250ms", bo = tr(({ animate: e, children: t, header: r, isOpen: n, onClick: i, showHeaderCheck: o }, a) => {
1100
- const s = q(X(null), "wrapperRef"), [c, m] = q(j(0), "height"), [d, u] = q(j("none"), "transition"), [f, b] = q(j(!0), "isInitialRender");
1101
- return Q(() => {
1102
- var g;
1103
- const p = (g = s.current) == null ? void 0 : g.getBoundingClientRect();
1104
- m(n && p ? p.height : 0);
1105
- }, [n]), Q(() => {
1106
- !c && n || !f || b(!1), u(e && !f ? `height ${$r} ease` : "none");
1107
- }, [e, f, c, n]), l("div", { className: "sprig-accordion", ref: a, children: [l("button", { className: "sprig-accordion-header-container", onClick: i, type: "button", children: [l("div", { className: "sprig-header-label-container", children: [l("span", { className: "sprig-header-label", children: r }, void 0, 0, { fileName: Ce, lineNumber: 60, columnNumber: 13 }, void 0), l(fo, { visible: o }, void 0, 0, { fileName: Ce, lineNumber: 61, columnNumber: 13 }, void 0)] }, void 0, 0, { fileName: Ce, lineNumber: 59, columnNumber: 11 }, void 0), l(Jn, { className: "sprig-caret", style: { transitionDuration: e ? $r : "0", transform: n ? "rotate(-180deg)" : "none" } }, void 0, 0, { fileName: Ce, lineNumber: 63, columnNumber: 11 }, void 0)] }, void 0, 0, { fileName: Ce, lineNumber: 54, columnNumber: 9 }, void 0), l("div", { className: "sprig-accordion-body", style: { transition: d, height: c }, children: l("div", { ref: s, children: t }, void 0, 0, { fileName: Ce, lineNumber: 72, columnNumber: 11 }, void 0) }, void 0, 0, { fileName: Ce, lineNumber: 71, columnNumber: 9 }, void 0)] }, void 0, 0, { fileName: Ce, lineNumber: 53, columnNumber: 7 }, void 0);
1108
- });
1109
- var qt = "/Users/toben/git-local/sdk/platform/web/src/view/components/arrow.tsx";
1110
- const lr = ({ style: e, stroke: t = "black" }) => l("svg", { fill: "none", height: "10", style: e, viewBox: "0 0 12 10", width: "12", xmlns: "http://www.w3.org/2000/svg", children: [l("path", { d: "M1.47839 5.2085L10.9384 5.2085", stroke: t, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.35" }, void 0, 0, { fileName: qt, lineNumber: 17, columnNumber: 7 }, void 0), l("path", { d: "M7.0686 1.15845L10.9386 5.20845L7.0686 9.25845", stroke: t, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.35" }, void 0, 0, { fileName: qt, lineNumber: 24, columnNumber: 7 }, void 0)] }, void 0, 0, { fileName: qt, lineNumber: 9, columnNumber: 5 }, void 0), D = (...e) => e.filter(Boolean).join(" "), te = (e, t, r) => {
1111
- const n = t ? "--mobile" : "--desktop";
1112
- return `${e + n} ${e + (r ? `${n}_${r}` : "")} ${e}`;
1113
- }, vo = (e, t) => `${e} ${e}__${t}`, ie = (e) => l("button", { ...e, className: D("ul-card-text__button", e.className), id: "ul-card-text__button" }, void 0, 0, { fileName: "/Users/toben/git-local/sdk/platform/web/src/view/components/button.tsx", lineNumber: 7, columnNumber: 5 }, void 0), ei = () => {
1114
- const { viewDocument: e } = V((n) => ({ viewDocument: n.viewDocument })), [t, r] = q(j(!1), "isScrollable");
1115
- return Q(() => {
1116
- const n = e.querySelector(".sprig-question-body"), i = new ResizeObserver(() => {
1117
- window.requestAnimationFrame(() => {
1118
- r(!!(n && Si(n) && n.scrollHeight > n.offsetHeight));
1119
- });
1120
- });
1121
- return n && i.observe(n), () => {
1122
- n && i.disconnect();
1123
- };
1124
- }, [e]), t;
1125
- };
1126
- var _e = "/Users/toben/git-local/sdk/platform/web/src/view/components/header.tsx";
1127
- const zr = ({ plainText: e, richText: t, id: r, className: n, isHeader: i }) => t ? l("div", { className: n, dangerouslySetInnerHTML: { __html: t }, id: r }, void 0, 0, { fileName: _e, lineNumber: 32, columnNumber: 7 }, void 0) : e ? i ? l("h1", { className: n, id: r, children: e }, void 0, 0, { fileName: _e, lineNumber: 41, columnNumber: 7 }, void 0) : l("p", { className: n, id: r, children: e }, void 0, 0, { fileName: _e, lineNumber: 46, columnNumber: 5 }, void 0) : null, ho = () => {
1128
- const { cards: e, close: t, endCard: r, headers: n, index: i } = V((s) => ({ cards: s.cards, close: s.close, endCard: s.endCard, headers: s.headers, index: s.index, useMobileStyling: s.useMobileStyling })), o = e.length, a = q(Ne(() => () => t(We), [t]), "closeApp");
1129
- return ["email", "link"].includes(n["userleap-platform"]) || r && i + 1 === o ? null : l("div", { "aria-label": "Close button", className: "close-btn", onClick: a, onKeyPress: (s) => {
1130
- s.key === "Enter" && a();
1131
- }, role: "button", tabIndex: 0, children: l("svg", { fill: "none", height: "16px", viewBox: "0 0 13 13", width: "16px", xmlns: "http://www.w3.org/2000/svg", children: l("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" }, void 0, 0, { fileName: _e, lineNumber: 98, columnNumber: 9 }, void 0) }, void 0, 0, { fileName: _e, lineNumber: 91, columnNumber: 7 }, void 0) }, void 0, 0, { fileName: _e, lineNumber: 83, columnNumber: 5 }, void 0);
1132
- }, ye = ({ message: e, properties: t }) => {
1133
- const r = q(X(null), "ref"), n = t == null ? void 0 : t.captionText, i = ei();
1134
- return l("div", { className: D("question-header-container", "sprig-header-container", i ? "sprig-border-bottom" : null), ref: r, children: [l("div", { className: "question-header-button-container", children: [l(zr, { className: "ul-question", id: "ul-question", isHeader: !0, plainText: e, richText: t == null ? void 0 : t.questionHtml }, void 0, 0, { fileName: _e, lineNumber: 121, columnNumber: 9 }, void 0), l(ho, {}, void 0, 0, { fileName: _e, lineNumber: 128, columnNumber: 9 }, void 0)] }, void 0, 0, { fileName: _e, lineNumber: 120, columnNumber: 7 }, void 0), l(zr, { className: "ul-caption", id: "ul-caption", plainText: n, richText: t == null ? void 0 : t.captionHtml }, void 0, 0, { fileName: _e, lineNumber: 130, columnNumber: 7 }, void 0)] }, void 0, 0, { fileName: _e, lineNumber: 112, columnNumber: 5 }, void 0);
1135
- };
1136
- var lt = "/Users/toben/git-local/sdk/platform/web/src/view/components/longformSubmitButton.tsx";
1137
- const go = () => l("svg", { fill: "none", height: "10", viewBox: "0 0 13 10", width: "13", xmlns: "http://www.w3.org/2000/svg", children: l("path", { d: "M11.5 1.5L4.5 8.5L1 5", stroke: "#FFFFFF", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5" }, void 0, 0, { fileName: lt, lineNumber: 10, columnNumber: 5 }, void 0) }, void 0, 0, { fileName: lt, lineNumber: 3, columnNumber: 3 }, void 0), Ct = ({ isSubmitDisabled: e, handleSubmit: t }) => l("div", { className: "ul-card-longform__submit-button-container", children: l(ie, { className: "ul-card-longform__submit-button", disabled: e, onClick: t, children: ["OK ", l(go, {}, void 0, 0, { fileName: lt, lineNumber: 36, columnNumber: 10 }, void 0)] }, void 0, 0, { fileName: lt, lineNumber: 31, columnNumber: 5 }, void 0) }, void 0, 0, { fileName: lt, lineNumber: 30, columnNumber: 3 }, void 0);
1138
- var $t = "/Users/toben/git-local/sdk/platform/web/src/view/components/mobileEmbedView.tsx";
1139
- const Qr = ({ buttonText: e = "View Prototype", handleClick: t }) => l("button", { className: "prototype-button", onClick: t, children: e }, "prototype-btn", 0, { fileName: $t, lineNumber: 14, columnNumber: 3 }, void 0), Oe = ({ defaultBody: e, embeddedType: t = "prototype", properties: r }) => {
1140
- var u;
1141
- const { handleClickEmbedButton: n, hasViewedEmbed: i, headers: o, useDesktopPrototype: a } = V((f) => ({ handleClickEmbedButton: f.handleClickEmbedButton, hasViewedEmbed: f.hasViewedEmbed, headers: f.headers, useDesktopPrototype: f.useDesktopPrototype })), s = (r == null ? void 0 : r.conceptUrl) || ((u = r == null ? void 0 : r.consentDocument) == null ? void 0 : u.url), c = window.innerWidth < Ti, m = o["userleap-platform"], d = (f, b) => {
1142
- f.preventDefault(), n(b);
1143
- };
1144
- if (!a && c && !i && s && ["email", "link"].includes(m)) {
1145
- if (t === "prototype") return l(Qr, { handleClick: (f) => {
1146
- d(f, "question.prototype.click");
1147
- } }, void 0, 0, { fileName: $t, lineNumber: 77, columnNumber: 9 }, void 0);
1148
- if (t === "pdf") return l(Qr, { buttonText: (r == null ? void 0 : r.viewDocumentText) || "View Document", handleClick: (f) => {
1149
- d(f, "question.agreement.click");
1150
- } }, void 0, 0, { fileName: $t, lineNumber: 85, columnNumber: 9 }, void 0);
1151
- }
1152
- return e();
1153
- };
1154
- var Wr = "/Users/toben/git-local/sdk/platform/web/src/view/components/checkbox.tsx";
1155
- const ti = ({ isSelected: e, id: t, divId: r, themeColor: n }) => l("div", { "aria-checked": e, "aria-labelledby": `label-${t}`, className: "select-checkbox", id: r, role: "checkbox", style: e ? { backgroundColor: n, borderColor: n, boxShadow: "none" } : {}, tabIndex: 0, children: e && l(Xn, {}, void 0, 0, { fileName: Wr, lineNumber: 32, columnNumber: 22 }, void 0) }, void 0, 0, { fileName: Wr, lineNumber: 15, columnNumber: 5 }, void 0), ri = (e, t) => {
1156
- const r = q(X(0), "heightRef");
1157
- return () => {
1158
- if (e.current) {
1159
- const n = e.current;
1160
- n.style.height = "1px";
1161
- const i = n.scrollHeight + (n.offsetHeight - n.clientHeight), o = parseInt(window.getComputedStyle(n).getPropertyValue("max-height")), a = i <= o ? i : o;
1162
- r.current !== a && t(), r.current = a, n.style.height = `${a}px`;
1163
- }
1164
- };
1165
- };
1166
- var Me = "/Users/toben/git-local/sdk/platform/web/src/view/components/option.tsx";
1167
- const St = ({ ariaLabel: e, border: t, choiceStyle: r = {}, label: n, isSelected: i, value: o, text: a, id: s, isRadio: c, useMobileStyling: m, error: d, allowTextEntry: u, noneOfTheAbove: f, promptText: b, onUserInputChanged: p }) => {
1168
- const { styleNonce: g, viewDocument: h } = V((_) => ({ styleNonce: _.styleNonce, viewDocument: _.viewDocument })), [k, N] = q(j(!1), "isActive");
1169
- No(h, t, g);
1170
- const w = ({ isSelected: _, userText: S }) => {
1171
- p && p({ id: s, selected: _, value: o, userText: S, noneOfTheAbove: f });
1172
- }, C = (_) => {
1173
- _.stopPropagation(), w({ isSelected: c || !i, userText: a }), N(!1);
1174
- }, x = () => {
1175
- k || N(!0);
1176
- }, T = () => {
1177
- k && N(!1);
1178
- }, y = { onClick: (_) => C(_), onKeyPress: (_) => ((S) => {
1179
- S.key !== "Enter" && S.key !== " " || C(S);
1180
- })(_) };
1181
- "ontouchstart" in h.documentElement ? (y.onTouchStart = T, y.onTouchCancel = T, y.onTouchEnd = T) : (y.onMouseDown = x, y.onMouseLeave = T);
1182
- const L = c ? `radio-${s}` : `checkbox-${s}`, I = i || k ? [_t] : [], P = [...d ? [ni] : [], ...I], v = n ? { "aria-labelledby": `label-${s}` } : { "aria-label": e };
1183
- return l("div", { className: D(te("choice", m), ...P), id: `choice-div-${s}`, style: { ...r, ...d ? { borderColor: nt } : {} }, ...y, children: [l("div", { className: D("choice-label-container"), children: [c ? l("div", { ...v, className: D("select-radio", ...I), id: L, role: "radio", tabIndex: 0 }, void 0, 0, { fileName: Me, lineNumber: 141, columnNumber: 11 }, void 0) : l(ti, { divId: L, id: s, isSelected: i, themeColor: t }, void 0, 0, { fileName: Me, lineNumber: 134, columnNumber: 11 }, void 0), n && l("label", { className: D(te("select-label", m)), htmlFor: L, id: `label-${s}`, children: n }, void 0, 0, { fileName: Me, lineNumber: 150, columnNumber: 11 }, void 0)] }, void 0, 0, { fileName: Me, lineNumber: 132, columnNumber: 7 }, void 0), u && i && l("div", { className: D("choice-text-entry-container", ...I), children: l(_o, { onTextChange: (_) => w({ isSelected: i, userText: _ }), promptText: b || "Please specify", textValue: a, useMobileStyling: m }, void 0, 0, { fileName: Me, lineNumber: 166, columnNumber: 11 }, void 0) }, void 0, 0, { fileName: Me, lineNumber: 160, columnNumber: 9 }, void 0)] }, void 0, 0, { fileName: Me, lineNumber: 120, columnNumber: 5 }, void 0);
1184
- }, _o = ({ promptText: e, textValue: t, onTextChange: r, useMobileStyling: n }) => {
1185
- const i = q(X(null), "inputRef"), { update: o } = V((s) => ({ update: s.update })), a = ri(i, () => o());
1186
- return Q(() => (a(), i.current && i.current.focus(), () => {
1187
- o();
1188
- }), []), l("textarea", { "aria-label": e, "aria-multiline": "true", "aria-placeholder": e, className: D(te("choice-text-input", n)), "data-gramm": "false", maxLength: 5e3, name: "text", onChange: (s) => {
1189
- a(), s.stopPropagation(), r(s.currentTarget.value);
1190
- }, onClick: (s) => {
1191
- s.stopPropagation();
1192
- }, onKeyPress: (s) => {
1193
- s.stopPropagation();
1194
- }, placeholder: e, ref: i, role: "textbox", rows: 1, value: t }, void 0, 0, { fileName: Me, lineNumber: 208, columnNumber: 5 }, void 0);
1195
- }, Zr = "ul-select-style-element", _t = "ul-select-active-dynamic-style", ni = "ul-select-error-dynamic-style", No = (e, t, r) => {
1196
- let n = e.getElementById(Zr), i = !1;
1197
- n || (n = e.createElement("style"), i = !0), n.tagName.toLowerCase() === "style" && (n.id = Zr, r && (n.nonce = r), n.textContent = yo(t), i && e.head.appendChild(n));
1198
- }, yo = (e) => `
1199
- .${_t} {
1200
- border-color: ${e};
1201
- }
1202
- .${_t} .select-radio, .${_t}.select-radio {
1203
- border: 6px solid ${e};
1204
- box-shadow: none;
1205
- }
1206
- .${ni} {
1207
- border-color: ${nt};
1208
- }
1209
- `, Pe = ({ children: e }) => l("div", { className: "sprig-question-body", children: e }, void 0, 0, { fileName: "/Users/toben/git-local/sdk/platform/web/src/view/components/questionBody.tsx", lineNumber: 7, columnNumber: 5 }, void 0), Ue = ({ children: e }) => {
1210
- const t = ei();
1211
- return l("div", { className: D("sprig-question-footer-container", t ? "sprig-border-top" : null), children: e }, void 0, 0, { fileName: "/Users/toben/git-local/sdk/platform/web/src/view/components/questionBodyFooterContainer.tsx", lineNumber: 14, columnNumber: 5 }, void 0);
1212
- };
1213
- var He = "/Users/toben/git-local/sdk/platform/web/src/view/logo.tsx";
1214
- const ii = ({ logoOnly: e = !1, style: t = {} }) => l("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 && l("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" }, void 0, 0, { fileName: He, lineNumber: 11, columnNumber: 11 }, void 0), l("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" }, void 0, 0, { fileName: He, lineNumber: 13, columnNumber: 7 }, void 0), l("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" }, void 0, 0, { fileName: He, lineNumber: 14, columnNumber: 7 }, void 0), l("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" }, void 0, 0, { fileName: He, lineNumber: 15, columnNumber: 7 }, void 0), l("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" }, void 0, 0, { fileName: He, lineNumber: 16, columnNumber: 7 }, void 0), l("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" }, void 0, 0, { fileName: He, lineNumber: 17, columnNumber: 7 }, void 0)] }, void 0, 0, { fileName: He, lineNumber: 9, columnNumber: 5 }, void 0);
1215
- var et = "/Users/toben/git-local/sdk/platform/web/src/view/components/sprigBrandLogo.tsx";
1216
- const oi = ({ forceBrandedLogo: e, marketingUrlLink: t }) => l("div", { className: e ? "yellow-footer-logo" : "", style: { marginTop: "4px", marginBottom: "4px" }, children: l("a", { href: t, rel: "noreferrer", target: "_blank", children: l("div", { style: { display: "flex" }, children: [l(ii, { logoOnly: !1 }, void 0, 0, { fileName: et, lineNumber: 17, columnNumber: 9 }, void 0), e && l(lr, { style: { display: "block", margin: "auto 0 auto 4px", transform: "rotateY(0deg) rotate(-45deg)" } }, void 0, 0, { fileName: et, lineNumber: 19, columnNumber: 11 }, void 0)] }, void 0, 0, { fileName: et, lineNumber: 16, columnNumber: 7 }, void 0) }, void 0, 0, { fileName: et, lineNumber: 15, columnNumber: 5 }, void 0) }, void 0, 0, { fileName: et, lineNumber: 11, columnNumber: 3 }, void 0);
1217
- var Ae = "/Users/toben/git-local/sdk/platform/web/src/view/components/thankYouLink.tsx";
1218
- const li = ({ marketingUrlLink: e }) => l("a", { dir: "ltr", href: e, rel: "noreferrer", target: "_blank", children: l("div", { className: "thank-you-card-link", children: [l("div", { className: "sprig-box-logo", children: l(ii, { logoOnly: !0, style: { margin: "auto" } }, void 0, 0, { fileName: Ae, lineNumber: 10, columnNumber: 11 }, void 0) }, void 0, 0, { fileName: Ae, lineNumber: 9, columnNumber: 9 }, void 0), l("div", { children: l("p", { children: ["Capture insights about your own product", l(lr, { style: { display: "inline-flex", marginInlineStart: "4px", verticalAlign: "middle" } }, void 0, 0, { fileName: Ae, lineNumber: 15, columnNumber: 13 }, void 0)] }, void 0, 0, { fileName: Ae, lineNumber: 13, columnNumber: 11 }, void 0) }, void 0, 0, { fileName: Ae, lineNumber: 12, columnNumber: 9 }, void 0)] }, void 0, 0, { fileName: Ae, lineNumber: 8, columnNumber: 7 }, void 0) }, void 0, 0, { fileName: Ae, lineNumber: 7, columnNumber: 5 }, void 0), $e = (e) => (e == null ? void 0 : e.buttonText) || "Next", ai = (e) => (e == null ? void 0 : e.skipButtonText) || "Skip", si = ({ marketingUrl: e, slugName: t, surveyId: r, forceBrandedLogo: n }) => `${e}?utm_source=survey_branding&utm_medium=website&utm_campaign=${t}&utm_content=${r}${n ? "&utm_term=poweredby_pill" : ""}`;
1219
- var de = "/Users/toben/git-local/sdk/platform/web/src/view/cards/consentLegalCard.tsx";
1220
- const xo = ({ className: e, message: t, next: r, properties: n, questionId: i, type: o }) => {
1221
- const { useMobileStyling: a, border: s, isLongFormSurvey: c, focusedQuestionId: m } = V((_) => ({ useMobileStyling: _.useMobileStyling, border: _.border, isLongFormSurvey: le(_.studyType), focusedQuestionId: _.focusedQuestionId })), [d, u] = q(j(!1), "isConsentSelected"), [f, b] = q(j(""), "name"), [p, g] = q(j(!1), "hasValidationError"), h = c && m === i, k = n == null ? void 0 : n.collectName, N = (n == null ? void 0 : n.nameLabelText) || "Full Name", w = (n == null ? void 0 : n.consentText) || "I agree to the stated conditions", C = (n == null ? void 0 : n.submitButtonText) || "Submit", x = !!f.trim(), T = d && (!k || x), y = (_, S = !1) => {
1222
- _.preventDefault(), _.stopPropagation();
1223
- let M = null;
1224
- if (!S) {
1225
- if (!T) return void g(!0);
1226
- M = { submitted: !0 }, k && (M.name = f);
1227
- }
1228
- r({ value: M, questionId: i, type: o }, T);
1229
- }, L = (_) => {
1230
- _.preventDefault(), _.stopPropagation(), b(_.currentTarget.value);
1231
- }, I = (_) => {
1232
- _.currentTarget.style.borderColor = p && !x ? nt : s;
1233
- }, P = (_) => {
1234
- _.currentTarget.style.borderColor = p && !x ? nt : Gt;
1235
- }, v = () => l(Ue, { children: [l("div", { className: "sprig-stretch", children: [l(St, { allowTextEntry: !1, border: s, error: p && !d, id: "consent", isRadio: !1, isSelected: d, label: w, onUserInputChanged: ({ selected: _ }) => {
1236
- _ !== d && u(!d);
1237
- }, useMobileStyling: a }, void 0, 0, { fileName: de, lineNumber: 93, columnNumber: 9 }, void 0), k && l("input", { "aria-label": N, "aria-placeholder": N, className: D(te("ul-consent-legal__name-input", a)), "data-gramm": "false", maxLength: 250, name: "name", onBlur: P, onFocus: I, onInput: L, placeholder: N, style: p && !x ? { borderColor: nt } : {}, tabIndex: 0, value: f }, void 0, 0, { fileName: de, lineNumber: 109, columnNumber: 11 }, void 0)] }, void 0, 0, { fileName: de, lineNumber: 92, columnNumber: 7 }, void 0), l("div", { className: "ul-card__button-wrapper ul-card-vertical__button-wrapper", children: [l(ie, { className: T ? "" : "sprig-button-disabled", onClick: y, children: C }, void 0, 0, { fileName: de, lineNumber: 133, columnNumber: 9 }, void 0), n.required === !1 && !c && l("button", { className: "ul-card-skip__button", onClick: (_) => y(_, !0), children: ai(n) }, void 0, 0, { fileName: de, lineNumber: 144, columnNumber: 11 }, void 0)] }, void 0, 0, { fileName: de, lineNumber: 132, columnNumber: 7 }, void 0)] }, void 0, 0, { fileName: de, lineNumber: 91, columnNumber: 5 }, void 0);
1238
- return l("div", { className: D(e, c && !h && "ul-card--unfocused", "ul-card__consent-legal", "fade-in-transition"), children: [l(ye, { message: t, properties: { questionHtml: n.questionHtml } }, void 0, 0, { fileName: de, lineNumber: 192, columnNumber: 7 }, void 0), l(K, { children: [n != null && n.richTextBody ? l(Pe, { children: l("div", { className: "ul-rich-text-body", dangerouslySetInnerHTML: n != null && n.richTextBody ? { __html: n.richTextBody } : void 0, id: "ul-card__consent-legal-body-container" }, void 0, 0, { fileName: de, lineNumber: 160, columnNumber: 13 }, void 0) }, void 0, 0, { fileName: de, lineNumber: 159, columnNumber: 11 }, void 0) : null, l(Oe, { properties: n, defaultBody: v, embeddedType: "pdf" }, void 0, 0, { fileName: de, lineNumber: 171, columnNumber: 9 }, void 0)] }, void 0)] }, i, 0, { fileName: de, lineNumber: 183, columnNumber: 5 }, void 0);
1239
- }, ko = ({ icon: e, scaleLabelType: t, value: r, selectedValue: n }) => {
1240
- if (t === "smiley" && r === n) {
1241
- let i = 0;
1242
- return e.replace(/black/g, () => ++i == 1 ? "black" : "white");
1243
- }
1244
- return e;
1245
- }, wo = ({ activeValue: e, border: t, icon: r, isPressed: n, onSubmit: i, range: o, scaleLabelType: a, selectedValue: s, setSelectedValue: c, setActiveValue: m, setIsPressed: d, useMobileStyling: u, value: f, viewDocument: b }) => {
1246
- const { isLongFormSurvey: p } = V((y) => ({ isLongFormSurvey: le(y.studyType) })), g = `option-${f}`, h = a === "number", k = a === "star", N = a === "smiley", w = h && f === e || f === s, [C, x] = (() => {
1247
- const y = k && s !== null && f <= s;
1248
- return k && f <= e || N && f === e || y || f === e || f === s ? [t, n || y || f === s ? 1 : 0.3] : ["", 1];
1249
- })(), T = q(Ne(() => {
1250
- const y = { borderColor: w ? C : "", fillOpacity: w ? "" : x, zIndex: w ? 3 : "auto", color: s === f ? "#fff" : "" };
1251
- return h ? { ...y, backgroundColor: s === f ? C : "" } : { ...y, color: k || N || s === f ? C : "" };
1252
- }, [w, C, x, s, f, h, k, N]), "buttonStyles");
1253
- return l("button", { "aria-label": h ? void 0 : String(f), className: (() => {
1254
- switch (a) {
1255
- case "star":
1256
- return D(te("likert-star", u), te(`likert-star-${f}`, u));
1257
- case "smiley":
1258
- return D(te("likert-smiley", u), te(`likert-smiley-${f}`, u));
1259
- default:
1260
- return f === o ? D(te("likert-number", u), te(`likert-number-${f}`, u), te("likert-last-option", u)) : D(te("likert-number", u), te(`likert-number-${f}`, u));
1261
- }
1262
- })(), dangerouslySetInnerHTML: { __html: ko({ icon: r, scaleLabelType: a, value: f, selectedValue: s }) }, id: g, onClick: (y) => {
1263
- p && (y.preventDefault(), y.stopPropagation(), c(f)), i();
1264
- }, onKeyDown: (y) => {
1265
- var P, v;
1266
- const L = b.querySelectorAll(`.likert-${a ?? "number"}`), I = f - 1;
1267
- y.key === "ArrowRight" ? (P = L[I + 1]) == null || P.focus() : y.key === "ArrowLeft" ? (v = L[I - 1]) == null || v.focus() : y.key !== "Enter" && y.key !== " " || (p && (y.preventDefault(), y.stopPropagation(), c(f)), i());
1268
- }, onPointerDown: () => d(!0), onPointerEnter: () => m(f), onPointerLeave: () => {
1269
- m(-1), d(!1);
1270
- }, style: T, tabIndex: 0 }, void 0, 0, { fileName: "/Users/toben/git-local/sdk/platform/web/src/view/cards/likertCard/likertOption.tsx", lineNumber: 148, columnNumber: 5 }, void 0);
1271
- };
1272
- var me = "/Users/toben/git-local/sdk/platform/web/src/view/cards/likertCard/likertCard.tsx";
1273
- const Co = ({ className: e, labels: t, message: r, next: n, properties: i, questionId: o, type: a }) => {
1274
- const { border: s, useMobileStyling: c, viewDocument: m, isLongFormSurvey: d, focusedQuestionId: u } = V((S) => ({ border: S.border, useMobileStyling: S.useMobileStyling, viewDocument: S.viewDocument, isLongFormSurvey: le(S.studyType), focusedQuestionId: S.focusedQuestionId })), [f, b] = q(j(-1), "activeValue"), [p, g] = q(j(!1), "isPressed"), [h, k] = q(j(null), "selectedValue"), N = d && u === o, w = t && t.left, C = t && t.right;
1275
- let x;
1276
- const { range: T, scaleLabelType: y, ratingIcons: L } = i;
1277
- T && (x = Number(T));
1278
- const I = x || 5, P = (S) => {
1279
- var M, R;
1280
- switch (y) {
1281
- case "star":
1282
- return (M = L[0]) == null ? void 0 : M.svg;
1283
- case "smiley":
1284
- return (R = L[S]) == null ? void 0 : R.svg;
1285
- default:
1286
- return String(S + 1);
1287
- }
1288
- }, v = [...Array(I)].map((S, M) => {
1289
- const R = M + 1;
1290
- return l(wo, { activeValue: f, border: s, icon: P(M), isPressed: p, onSubmit: () => n({ value: R, questionId: o, type: a }, !0), range: I, scaleLabelType: y, selectedValue: h, setActiveValue: b, setIsPressed: g, setSelectedValue: k, useMobileStyling: c, value: R, viewDocument: m }, M, 0, { fileName: me, lineNumber: 73, columnNumber: 7 }, void 0);
1291
- }), _ = (S) => {
1292
- S.preventDefault(), S.stopPropagation(), n({ value: null, questionId: o, type: a }, !0);
1293
- };
1294
- return l("form", { className: D(e, "ul-card--likert", "fade-in-transition", d && !N && "ul-card--unfocused"), children: [l(ye, { message: r, properties: i }, void 0, 0, { fileName: me, lineNumber: 138, columnNumber: 7 }, void 0), l(Oe, { properties: i, defaultBody: () => l(K, { children: [l(Pe, { children: [l("div", { "aria-label": `Rating (1 - ${I})`, className: "ul-card--likert__numbers", role: "radiogroup", children: v }, void 0, 0, { fileName: me, lineNumber: 103, columnNumber: 11 }, void 0), l("div", { className: "ul-card--likert__labels", children: [l("span", { children: w }, void 0, 0, { fileName: me, lineNumber: 111, columnNumber: 13 }, void 0), l("span", { children: C }, void 0, 0, { fileName: me, lineNumber: 112, columnNumber: 13 }, void 0)] }, void 0, 0, { fileName: me, lineNumber: 110, columnNumber: 11 }, void 0)] }, void 0, 0, { fileName: me, lineNumber: 102, columnNumber: 9 }, void 0), !i.required && !d && l(Ue, { children: l("div", { className: "ul-vertical-centered-container", children: l(ie, { onClick: _, children: $e(i) }, void 0, 0, { fileName: me, lineNumber: 118, columnNumber: 15 }, void 0) }, void 0, 0, { fileName: me, lineNumber: 117, columnNumber: 13 }, void 0) }, void 0, 0, { fileName: me, lineNumber: 116, columnNumber: 11 }, void 0)] }, void 0) }, void 0, 0, { fileName: me, lineNumber: 139, columnNumber: 7 }, void 0)] }, o, 0, { fileName: me, lineNumber: 129, columnNumber: 5 }, void 0);
1295
- };
1296
- var ft = "/Users/toben/git-local/sdk/platform/web/src/view/cards/matrixViews/matrixAccordionView.tsx";
1297
- const ui = (e) => e && (e.scrollHeight > e.offsetHeight ? e : ui(e.parentElement)), So = (e) => {
1298
- if (!e || !((r) => r instanceof HTMLElement)(e)) return 0;
1299
- const t = getComputedStyle(e);
1300
- return parseFloat(t.marginTop) + parseFloat(t.marginBottom) + (parseFloat(t.borderTopWidth) + parseFloat(t.borderBottomWidth));
1301
- }, To = ({ columns: e, onSelect: t, options: r, selectedOptions: n }) => {
1302
- const i = q(X([]), "refs"), { border: o, useMobileStyling: a } = V((f) => ({ border: f.border, useMobileStyling: f.useMobileStyling })), s = r.findIndex((f) => n[f.id] === null), [c, m] = q(j(s), "focusedIndex"), d = Fe((f, b) => {
1303
- t(f, b);
1304
- const p = c + 1, g = r[p];
1305
- if (g && n[g.id] === null) {
1306
- m(p);
1307
- const h = i.current[c];
1308
- if (h != null && h.firstElementChild) {
1309
- const k = ui(h), N = h.firstElementChild, w = So(h) + N.clientHeight;
1310
- k == null || k.scrollTo(0, h.offsetTop + w);
1311
- }
1312
- }
1313
- }, [t, r, n, c]), u = Fe((f, b) => {
1314
- const p = c === f;
1315
- return l(bo, { animate: !0, header: b.label, isOpen: p, onClick: () => m(p && !window.UserLeap.isMobileSDK ? -1 : f), ref: (g) => {
1316
- g && (i.current[f] = g);
1317
- }, showHeaderCheck: n[b.id] !== null, children: l("div", { style: { paddingTop: "12px" }, children: e.map((g) => l(St, { allowTextEntry: !1, ariaLabel: `${b.label}-${g.label}`, border: o, error: !1, id: `${b.id}-${g.value}`, isRadio: !0, isSelected: n[b.id] === g.value, label: g.label, onUserInputChanged: () => d(b.id, g.value), useMobileStyling: a }, g.label, 0, { fileName: ft, lineNumber: 93, columnNumber: 17 }, void 0)) }, void 0, 0, { fileName: ft, lineNumber: 90, columnNumber: 11 }, void 0) }, b.id, 0, { fileName: ft, lineNumber: 71, columnNumber: 9 }, void 0);
1318
- }, [o, e, c, d, n, a]);
1319
- return l("div", { children: r.map((f, b) => u(b, f)) }, void 0, 0, { fileName: ft, lineNumber: 114, columnNumber: 10 }, void 0);
1320
- };
1321
- var ne = "/Users/toben/git-local/sdk/platform/web/src/view/cards/matrixViews/matrixTableView.tsx";
1322
- const Io = ({ columns: e, onSelect: t, options: r, selectedOptions: n }) => {
1323
- const { border: i, useMobileStyling: o, isLongFormSurvey: a } = V((p) => ({ border: p.border, useMobileStyling: p.useMobileStyling, isLongFormSurvey: le(p.studyType) })), s = r.length, c = e.length, m = q(X(null), "matrixContainerRef"), [d, u] = q(j(!1), "showGradient"), [f, b] = q(j(!1), "hasScrollableWidth");
1324
- return Q(() => {
1325
- const p = m.current, g = new ResizeObserver((h) => {
1326
- window.requestAnimationFrame(() => {
1327
- p && (u(Math.round(h[0].contentRect.width) < p.scrollWidth), b(Math.round(h[0].contentRect.width) < p.scrollWidth));
1328
- });
1329
- });
1330
- return p && g.observe(p), () => {
1331
- p && g.unobserve(p);
1332
- };
1333
- }, []), l("div", { className: "ul-card--matrix_question_container", children: [l("div", { className: D("ul-card--matrix_container", d && "ul-matrix-scroll-gradient"), onScroll: () => {
1334
- (() => {
1335
- const p = m.current;
1336
- p && u(p.clientWidth + Math.abs(p.scrollLeft) < p.scrollWidth);
1337
- })();
1338
- }, ref: m, children: l("div", { className: D(a && "ul-card--matrix_grid_longform", "ul-card--matrix_grid"), style: `--numColumns: ${c}; --numRows: ${s + 1};`, children: [l("div", {}, void 0, 0, { fileName: ne, lineNumber: 108, columnNumber: 11 }, void 0), " ", e.map((p) => l("div", { className: "ul-matrix-column-label", children: p.label }, p.label, 0, { fileName: ne, lineNumber: 110, columnNumber: 13 }, void 0)), r.map((p) => l(K, { children: [l("div", { "aria-label": p.label, className: "ul-matrix-row-label", children: p.label }, p.label, 0, { fileName: ne, lineNumber: 117, columnNumber: 17 }, void 0), l("div", { className: "ul-matrix-row-options", role: "radiogroup", children: e.map((g, h) => l("div", { className: D("ul-matrix-option-wrapper", h === c - 1 && "ul-matrix-last-option"), children: l(St, { allowTextEntry: !1, ariaLabel: `${p.label}-${g.label}`, border: i, choiceStyle: { background: "transparent", border: "none", marginBottom: "0", padding: "0" }, error: !1, id: `${p.id}-${g.value}`, isRadio: !0, isSelected: n[p.id] === g.value, onUserInputChanged: () => t(p.id, g.value), useMobileStyling: o }, void 0, 0, { fileName: ne, lineNumber: 135, columnNumber: 25 }, void 0) }, g.value, 0, { fileName: ne, lineNumber: 128, columnNumber: 23 }, void 0)) }, void 0, 0, { fileName: ne, lineNumber: 124, columnNumber: 17 }, void 0)] }, void 0))] }, void 0, 0, { fileName: ne, lineNumber: 100, columnNumber: 9 }, void 0) }, void 0, 0, { fileName: ne, lineNumber: 90, columnNumber: 7 }, void 0), (d || f) && l("button", { className: f && !d ? "ul-matrix-scroll-arrow left" : "ul-matrix-scroll-arrow", onClick: f && !d ? (p) => {
1339
- p.preventDefault();
1340
- const g = m.current;
1341
- if (g) {
1342
- const h = getComputedStyle(g).direction === "rtl";
1343
- g.scrollTo({ left: h ? g.scrollWidth - g.clientWidth : 0, behavior: "smooth" });
1344
- }
1345
- } : (p) => {
1346
- p.preventDefault();
1347
- const g = m.current;
1348
- if (g) {
1349
- const h = getComputedStyle(g).direction === "rtl";
1350
- g.scrollTo({ left: h ? g.clientWidth - g.scrollWidth : g.scrollWidth, behavior: "smooth" });
1351
- }
1352
- }, children: f && !d ? l(Eo, {}, void 0, 0, { fileName: ne, lineNumber: 175, columnNumber: 13 }, void 0) : l(Lo, {}, void 0, 0, { fileName: ne, lineNumber: 177, columnNumber: 13 }, void 0) }, void 0, 0, { fileName: ne, lineNumber: 164, columnNumber: 9 }, void 0)] }, void 0, 0, { fileName: ne, lineNumber: 89, columnNumber: 5 }, void 0);
1353
- }, Eo = () => l("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: l("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" }, void 0, 0, { fileName: ne, lineNumber: 195, columnNumber: 5 }, void 0) }, void 0, 0, { fileName: ne, lineNumber: 186, columnNumber: 3 }, void 0), Lo = () => l("svg", { fill: "currentColor", height: "32", viewBox: "0 0 256 256", width: "32", xmlns: "http://www.w3.org/2000/svg", children: l("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" }, void 0, 0, { fileName: ne, lineNumber: 207, columnNumber: 5 }, void 0) }, void 0, 0, { fileName: ne, lineNumber: 200, columnNumber: 3 }, void 0);
1354
- var ke = "/Users/toben/git-local/sdk/platform/web/src/view/cards/matrixCard.tsx";
1355
- const Oo = ({ className: e, message: t, next: r, options: n, properties: i, questionId: o, type: a, showIndividualSubmit: s = !1, onSubmitButtonClick: c }) => {
1356
- const { useMobileStyling: m, isLongFormSurvey: d, focusedQuestionId: u, setFocusedQuestionId: f } = V((y) => ({ useMobileStyling: y.useMobileStyling, isLongFormSurvey: le(y.studyType), focusedQuestionId: y.focusedQuestionId, setFocusedQuestionId: y.setFocusedQuestionId })), b = i.matrixColumn, p = i.required, g = d && u === o, h = (y) => {
1357
- y.preventDefault(), y.stopPropagation(), r({ value: N, questionId: o, type: a }, !0), c && c();
1358
- }, k = n.reduce((y, L) => (y[L.id] = null, y), {}), [N, w] = q(j(k), "optionSelectedMap"), C = (y) => p && Object.values(y).every((L) => L == null), x = (y, L) => {
1359
- d && r({ value: { ...N, [y]: L }, questionId: o, type: a }, !C({ ...N, [y]: L })), w((I) => ({ ...I, [y]: L }));
1360
- }, T = i.displayMatrixAsAccordion || m;
1361
- return l("form", { className: D(e, !d && "ul-card__matrix", "fade-in-transition", d && !g && "ul-card--unfocused"), id: "text-form", onClick: () => {
1362
- g && f(o);
1363
- }, onSubmit: h, children: [l(ye, { message: t, properties: i }, void 0, 0, { fileName: ke, lineNumber: 156, columnNumber: 7 }, void 0), l(Oe, { properties: i, defaultBody: () => l(K, { children: [l(Pe, { children: [T ? l(To, { columns: b, onSelect: x, options: n, selectedOptions: N }, void 0, 0, { fileName: ke, lineNumber: 110, columnNumber: 13 }, void 0) : l(Io, { columns: b, onSelect: x, options: n, selectedOptions: N }, void 0, 0, { fileName: ke, lineNumber: 117, columnNumber: 13 }, void 0), s && l(Ct, { handleSubmit: h, isSubmitDisabled: C(N) }, void 0, 0, { fileName: ke, lineNumber: 125, columnNumber: 13 }, void 0)] }, void 0, 0, { fileName: ke, lineNumber: 108, columnNumber: 9 }, void 0), !d && l(Ue, { children: l("div", { className: "ul-card__button-wrapper", children: l(ie, { disabled: C(N), children: $e(i) }, void 0, 0, { fileName: ke, lineNumber: 134, columnNumber: 15 }, void 0) }, void 0, 0, { fileName: ke, lineNumber: 133, columnNumber: 13 }, void 0) }, void 0, 0, { fileName: ke, lineNumber: 132, columnNumber: 11 }, void 0)] }, void 0) }, void 0, 0, { fileName: ke, lineNumber: 157, columnNumber: 7 }, void 0)] }, o, 0, { fileName: ke, lineNumber: 144, columnNumber: 5 }, void 0);
1364
- };
1365
- var Be = "/Users/toben/git-local/sdk/platform/web/src/view/components/select/select.tsx";
1366
- const Po = ({ options: e, selectItem: t, selectedOptions: r, showCheckbox: n }) => {
1367
- const { themeColor: i } = V((o) => ({ doc: o.viewDocument, themeColor: o.border }));
1368
- return l("div", { className: "select-list", children: e.map((o) => {
1369
- return l("div", { className: "select-option", onClick: (s) => {
1370
- t(o), s.stopPropagation();
1371
- }, role: "option", children: [n && l(ti, { divId: (a = o.id, `checkbox-div-${a}`), id: o.id, isSelected: r.includes(o), themeColor: i }, void 0, 0, { fileName: Be, lineNumber: 47, columnNumber: 13 }, void 0), o.label] }, o.id, 0, { fileName: Be, lineNumber: 37, columnNumber: 9 }, void 0);
1372
- var a;
1373
- }) }, void 0, 0, { fileName: Be, lineNumber: 35, columnNumber: 5 }, void 0);
1374
- }, Ro = ({ isMultiSelect: e = !1, multiselectText: t = "choices selected", onChange: r, options: n, placeholderText: i, value: o }) => {
1375
- const [a, s] = q(j(!1), "isOpen"), { viewDocument: c, update: m } = V((f) => ({ viewDocument: f.viewDocument, update: f.update })), d = () => {
1376
- s(!a), m();
1377
- };
1378
- Q(() => {
1379
- var b;
1380
- const f = () => {
1381
- s(!1), m();
1382
- };
1383
- c.addEventListener("click", f);
1384
- try {
1385
- (b = window.parent) == null || b.addEventListener("click", f);
1386
- } catch {
1387
- window.addEventListener("click", f);
1388
- }
1389
- return () => {
1390
- var p;
1391
- c.removeEventListener("click", f);
1392
- try {
1393
- (p = window.parent) == null || p.removeEventListener("click", f);
1394
- } catch {
1395
- window.removeEventListener("click", f);
1396
- }
1397
- };
1398
- }, [c, m]);
1399
- const u = o.length === 0 ? ["select-button-placeholder"] : [];
1400
- return l(K, { children: [l("button", { "aria-label": "choice dropdown button", className: D("select-button", ...u), onClick: (f) => {
1401
- f.stopPropagation(), d();
1402
- }, type: "button", children: [l("span", { children: o.length === 0 ? i : o.length === 1 ? o[0].label : `${o.length} ${t}` }, void 0, 0, { fileName: Be, lineNumber: 154, columnNumber: 9 }, void 0), l(Jn, {}, void 0, 0, { fileName: Be, lineNumber: 155, columnNumber: 9 }, void 0)] }, void 0, 0, { fileName: Be, lineNumber: 145, columnNumber: 7 }, void 0), a && l(Po, { options: n, selectedOptions: o, selectItem: (f) => {
1403
- var g;
1404
- const b = o.some((h) => h.id === f.id), p = o.some((h) => {
1405
- var k;
1406
- return (k = h.optionProperties) == null ? void 0 : k.noneOfTheAbove;
1407
- });
1408
- (g = f.optionProperties) != null && g.noneOfTheAbove && !b ? r([f]) : e ? r(b ? o.filter((h) => h.id !== f.id) : p ? [f] : [...o, f]) : b || r([f]), e || d();
1409
- }, showCheckbox: e }, void 0, 0, { fileName: Be, lineNumber: 158, columnNumber: 9 }, void 0)] }, void 0);
1410
- };
1411
- var ve = "/Users/toben/git-local/sdk/platform/web/src/view/cards/multipleChoice/baseMultiChoiceCard.tsx";
1412
- const ci = ({ className: e, message: t, onSubmit: r, options: n = [], properties: i, questionId: o, type: a, showIndividualSubmit: s = !1, onSubmitButtonClick: c }) => {
1413
- const { border: m, useMobileStyling: d, isLongFormSurvey: u, focusedQuestionId: f, setFocusedQuestionId: b } = V((v) => ({ border: v.border, useMobileStyling: v.useMobileStyling, isLongFormSurvey: le(v.studyType), focusedQuestionId: v.focusedQuestionId, setFocusedQuestionId: v.setFocusedQuestionId })), p = u && f === o, g = n.reduce((v, _) => (v[_.id] = { isSelected: !1 }, v), {}), [h, k] = q(j(g), "optionSelectedMap"), N = a === "multiplechoice", w = i.required, C = n.find((v) => {
1414
- var _;
1415
- return (_ = v.optionProperties) == null ? void 0 : _.noneOfTheAbove;
1416
- }), x = (v) => ((_) => Object.entries(_).some(([S, M]) => {
1417
- var U;
1418
- const R = n.find((B) => `${B.id}` === S), E = M.userText === void 0 || M.userText.trim() === "";
1419
- return ((U = R == null ? void 0 : R.optionProperties) == null ? void 0 : U.allowsTextEntry) && E && M.isSelected;
1420
- }))(v) || w && !((_) => Object.values(_).some((S) => S.isSelected))(v), T = Object.entries(h).some(([v, _]) => {
1421
- var S, M;
1422
- return _.isSelected && ((M = (S = n.find((R) => `${R.id}` === v)) == null ? void 0 : S.optionProperties) == null ? void 0 : M.allowsTextEntry);
1423
- }), y = s && (!N || T), L = n.map(({ id: v, label: _, value: S, optionProperties: M }) => {
1424
- var B, W;
1425
- const R = `${v}`, { allowsTextEntry: E, noneOfTheAbove: U } = { allowsTextEntry: !1, noneOfTheAbove: !1, ...M };
1426
- return l(St, { allowTextEntry: E, border: m, error: !1, id: R, isRadio: N, isSelected: !!((B = h[R]) != null && B.isSelected), label: _, noneOfTheAbove: U, onUserInputChanged: (Y) => {
1427
- P(Y.id, Y.selected, Y.userText, Y.noneOfTheAbove), Y.selected && u && !N && !p && b(o);
1428
- }, promptText: "Please specify", text: (W = h[v]) == null ? void 0 : W.userText, useMobileStyling: d, value: S }, R, 0, { fileName: ve, lineNumber: 132, columnNumber: 7 }, void 0);
1429
- }), I = (v) => {
1430
- v.preventDefault(), v.stopPropagation(), r(h, !0), c && c();
1431
- }, P = (v, _, S, M) => {
1432
- const R = Object.assign({}, h);
1433
- if ((N || M) && _) for (const B of Object.values(R)) B.isSelected = !1, delete B.userText;
1434
- else C && !M && h[C.id].isSelected && (R[C.id].isSelected = !1);
1435
- R[v] = { isSelected: _, userText: S };
1436
- const E = N && Object.entries(R).some(([B, W]) => {
1437
- var Y, se;
1438
- return W.isSelected && ((se = (Y = n.find((re) => `${re.id}` === B)) == null ? void 0 : Y.optionProperties) == null ? void 0 : se.allowsTextEntry);
1439
- }), U = !x(R);
1440
- u && (r(R, U), N && !E && U && c && c()), k(R);
1441
- };
1442
- return l("form", { className: D(e, "ul-card--multiple", "fade-in-transition", u && !p && "ul-card--unfocused"), id: "text-form", onClick: a === "multipleselect" ? () => {
1443
- u && f !== o && a === "multipleselect" && b(o);
1444
- } : void 0, onSubmit: I, children: [l(ye, { message: t, properties: i }, void 0, 0, { fileName: ve, lineNumber: 302, columnNumber: 7 }, void 0), l(Oe, { properties: i, defaultBody: () => l(K, { children: [l(Pe, { children: [i.isDropdown ? l(Ro, { isMultiSelect: !N, multiselectText: i.dropdownMultiselectedText ?? "choices selected", onChange: (v) => {
1445
- const _ = { ...h };
1446
- for (const S of n) v.includes(S) ? _[S.id].isSelected = !0 : _[S.id].isSelected = !1;
1447
- u && r(_, !x(_)), k(_);
1448
- }, options: n, placeholderText: i.dropdownPlaceholderText ?? (N ? "Select choice" : "Select choice(s)"), value: n.filter((v) => h[v.id].isSelected) }, void 0, 0, { fileName: ve, lineNumber: 233, columnNumber: 13 }, void 0) : l("div", { className: D(te("ul-card__choices", d)), role: N ? "radiogroup" : "group", children: L }, void 0, 0, { fileName: ve, lineNumber: 260, columnNumber: 13 }, void 0), y && l(Ct, { handleSubmit: I, isSubmitDisabled: x(h) }, void 0, 0, { fileName: ve, lineNumber: 268, columnNumber: 13 }, void 0)] }, void 0, 0, { fileName: ve, lineNumber: 231, columnNumber: 9 }, void 0), !u && l(Ue, { children: l("div", { className: "ul-card__button-wrapper", children: l(ie, { disabled: x(h), onClick: I, children: $e(i) }, void 0, 0, { fileName: ve, lineNumber: 277, columnNumber: 15 }, void 0) }, void 0, 0, { fileName: ve, lineNumber: 276, columnNumber: 13 }, void 0) }, void 0, 0, { fileName: ve, lineNumber: 275, columnNumber: 11 }, void 0)] }, void 0) }, void 0, 0, { fileName: ve, lineNumber: 303, columnNumber: 7 }, void 0)] }, o, 0, { fileName: ve, lineNumber: 290, columnNumber: 5 }, void 0);
1449
- }, Mo = (e) => {
1450
- const { questionId: t, type: r, next: n, options: i } = e, { setFocusedQuestionId: o } = V((a) => ({ setFocusedQuestionId: a.setFocusedQuestionId }));
1451
- return l(ci, { ...e, onSubmit: (a, s) => {
1452
- var b;
1453
- const c = Object.entries(a).find(([, p]) => p.isSelected) || [void 0, void 0], [m, d] = c, u = i.find((p) => `${p.id}` === m);
1454
- !((b = u == null ? void 0 : u.optionProperties) != null && b.allowsTextEntry) || d != null && d.userText && d.userText.trim() !== "" || o(t);
1455
- const f = d != null && d.userText ? { [m]: { userText: d.userText } } : null;
1456
- n({ value: u && m ? { [m]: u.value } : {}, secondaryValue: f, questionId: t, type: r }, s);
1457
- } }, void 0, 0, { fileName: "/Users/toben/git-local/sdk/platform/web/src/view/cards/multipleChoice/singleSelectCard.tsx", lineNumber: 51, columnNumber: 10 }, void 0);
1458
- }, Uo = (e) => {
1459
- const { questionId: t, type: r, next: n } = e;
1460
- return l(ci, { ...e, onSubmit: (i, o) => {
1461
- const a = Object.entries(i).reduce((c, [m, d]) => (c[m] = d.isSelected, c), {}), s = Object.entries(i).reduce((c, [m, d]) => {
1462
- if (!d.userText) return c;
1463
- const u = c || {};
1464
- return u[m] = { userText: d.userText }, u;
1465
- }, null);
1466
- n({ value: a, secondaryValue: s, questionId: t, type: r }, o);
1467
- } }, void 0, 0, { fileName: "/Users/toben/git-local/sdk/platform/web/src/view/cards/multipleChoice/multiSelectCard.tsx", lineNumber: 41, columnNumber: 10 }, void 0);
1468
- };
1469
- var pe = "/Users/toben/git-local/sdk/platform/web/src/view/cards/npsCard.tsx";
1470
- const qo = ({ className: e, labels: t, message: r, properties: n, next: i, questionId: o, type: a }) => {
1471
- const [s, c] = q(j(null), "selectedValue"), { border: m, useMobileStyling: d, viewDocument: u, isLongFormSurvey: f, focusedQuestionId: b } = V((w) => ({ border: w.border, useMobileStyling: w.useMobileStyling, viewDocument: w.viewDocument, isLongFormSurvey: le(w.studyType), focusedQuestionId: w.focusedQuestionId })), p = f && b === o, g = t && t.left, h = t && t.right, k = [...Array(11)].map((w, C) => l("button", { className: D(te("nps-number", d), te(`nps-number-${C}`, d)), id: `option-${C}`, onClick: (x) => {
1472
- f && (x.preventDefault(), x.stopPropagation(), c(C)), i({ value: C, questionId: o, type: a }, !0);
1473
- }, onKeyDown: (x) => {
1474
- var y, L;
1475
- const T = u.querySelectorAll("button.nps-number");
1476
- x.key === "ArrowRight" ? (y = T[C + 1]) == null || y.focus() : x.key === "ArrowLeft" ? (L = T[C - 1]) == null || L.focus() : x.key !== "Enter" && x.key !== " " || (f && (x.preventDefault(), x.stopPropagation(), c(C)), i({ value: C, questionId: o, type: a }, !0));
1477
- }, onPointerDown: (x) => {
1478
- x.currentTarget.style.zIndex = "2", x.currentTarget.style.borderColor = m;
1479
- }, onPointerLeave: (x) => {
1480
- x.currentTarget.style.zIndex = "auto", x.currentTarget.style.borderColor = Gt;
1481
- }, style: s === C ? { backgroundColor: m, color: "#fff" } : void 0, tabIndex: 0, children: C }, C, 0, { fileName: pe, lineNumber: 51, columnNumber: 5 }, void 0)), N = (w) => {
1482
- w.preventDefault(), w.stopPropagation(), i({ value: null, questionId: o, type: a }, !0);
1483
- };
1484
- return l("form", { className: D(e, "ul-card--nps", "fade-in-transition", f && !p && "ul-card--unfocused"), children: [l(ye, { message: r, properties: n }, void 0, 0, { fileName: pe, lineNumber: 140, columnNumber: 7 }, void 0), l(Oe, { properties: n, defaultBody: () => l(K, { children: [l(Pe, { children: [l("div", { className: "ul-card--nps__numbers", children: k }, void 0, 0, { fileName: pe, lineNumber: 111, columnNumber: 11 }, void 0), l("div", { className: "ul-card--nps__labels", children: [l("span", { children: g }, void 0, 0, { fileName: pe, lineNumber: 113, columnNumber: 13 }, void 0), l("span", { children: h }, void 0, 0, { fileName: pe, lineNumber: 114, columnNumber: 13 }, void 0)] }, void 0, 0, { fileName: pe, lineNumber: 112, columnNumber: 11 }, void 0)] }, void 0, 0, { fileName: pe, lineNumber: 110, columnNumber: 9 }, void 0), !n.required && !f && l(Ue, { children: l("div", { className: "ul-vertical-centered-container", children: l(ie, { onClick: N, children: $e(n) }, void 0, 0, { fileName: pe, lineNumber: 120, columnNumber: 15 }, void 0) }, void 0, 0, { fileName: pe, lineNumber: 119, columnNumber: 13 }, void 0) }, void 0, 0, { fileName: pe, lineNumber: 118, columnNumber: 11 }, void 0)] }, void 0) }, void 0, 0, { fileName: pe, lineNumber: 141, columnNumber: 7 }, void 0)] }, o, 0, { fileName: pe, lineNumber: 131, columnNumber: 5 }, void 0);
1485
- };
1486
- var he = "/Users/toben/git-local/sdk/platform/web/src/view/cards/openTextCard.tsx";
1487
- const Do = ({ className: e, message: t, next: r, properties: n, questionId: i, type: o, showIndividualSubmit: a = !1, onSubmitButtonClick: s }) => {
1488
- const { border: c, useMobileStyling: m, update: d, isLongFormSurvey: u, focusedQuestionId: f, setFocusedQuestionId: b, isPreview: p } = V((v) => ({ border: v.border, useMobileStyling: v.useMobileStyling, update: v.update, isLongFormSurvey: le(v.studyType), focusedQuestionId: v.focusedQuestionId, setFocusedQuestionId: v.setFocusedQuestionId, isPreview: v.isPreview })), [g, h] = q(j(""), "value"), k = q(X(null), "textRef"), N = u && f === i;
1489
- Q(() => {
1490
- var v, _;
1491
- u && !p && (N ? (v = k.current) == null || v.focus() : (_ = k.current) == null || _.blur());
1492
- }, [u, N, p]);
1493
- const w = g.trim(), C = n.required === !0 && !w, x = ri(k, () => d()), T = (v) => {
1494
- const { value: _ } = v.currentTarget;
1495
- if (x(), v.preventDefault(), v.stopPropagation(), h(_), u) {
1496
- const S = _.trim().length > 0;
1497
- r({ value: _, questionId: i, type: o }, S);
1498
- }
1499
- }, y = (v) => {
1500
- v.preventDefault(), v.stopPropagation(), r({ value: g, questionId: i, type: o }, w.length > 0), s && s();
1501
- }, L = n && n.openTextPlaceholder ? n.openTextPlaceholder : "", I = (v) => {
1502
- v.currentTarget.style.borderColor = c, b(i);
1503
- }, P = (v) => {
1504
- v.currentTarget.style.borderColor = Gt;
1505
- };
1506
- return l("form", { className: D(e, "ul-card-text", "fade-in-transition", u && !N && "ul-card--unfocused"), id: "text-form", onClick: () => {
1507
- u && f !== i && b(i);
1508
- }, children: [l(ye, { message: t, properties: n }, void 0, 0, { fileName: he, lineNumber: 175, columnNumber: 7 }, void 0), l(Oe, { defaultBody: () => l("div", { className: "ul-card-text", children: l(Pe, { children: [l("div", { className: "ul-card-text__container", children: l("textarea", { "aria-describedby": "ul-caption", "aria-labelledby": "ul-question", "aria-multiline": "true", "aria-placeholder": L, className: D(te("ul-card-text__input", m)), "data-gramm": "false", maxLength: 5e3, name: "text", onBlur: P, onChange: T, onFocus: I, placeholder: L, ref: k, role: "textbox", tabIndex: 0 }, void 0, 0, { fileName: he, lineNumber: 119, columnNumber: 13 }, void 0) }, void 0, 0, { fileName: he, lineNumber: 118, columnNumber: 11 }, void 0), n.footerHtml && l("div", { className: "footer", dangerouslySetInnerHTML: { __html: n.footerHtml } }, void 0, 0, { fileName: he, lineNumber: 140, columnNumber: 13 }, void 0), a && l(Ct, { handleSubmit: y, isSubmitDisabled: C }, void 0, 0, { fileName: he, lineNumber: 146, columnNumber: 13 }, void 0), l(Ue, { children: !u && l(ie, { disabled: C, onClick: y, children: $e(n) }, void 0, 0, { fileName: he, lineNumber: 153, columnNumber: 15 }, void 0) }, void 0, 0, { fileName: he, lineNumber: 151, columnNumber: 11 }, void 0)] }, void 0, 0, { fileName: he, lineNumber: 117, columnNumber: 9 }, void 0) }, void 0, 0, { fileName: he, lineNumber: 116, columnNumber: 7 }, void 0), properties: n }, void 0, 0, { fileName: he, lineNumber: 176, columnNumber: 7 }, void 0)] }, i, 0, { fileName: he, lineNumber: 164, columnNumber: 5 }, void 0);
1509
- };
1510
- var G = "/Users/toben/git-local/sdk/platform/web/src/view/cards/rankOrder/rankOrderQuestionCard.tsx";
1511
- const Ho = ({ className: e, labels: t, message: r, next: n, properties: i, questionId: o, type: a, onSubmitButtonClick: s, options: c, showIndividualSubmit: m = !1 }) => {
1512
- const d = q(X(null), "dragIndex"), u = q(X(0), "touchStartY"), f = q(X(0), "touchCurrentY"), b = q(X(null), "draggedElement"), p = q(X(!1), "isDragging"), g = q(X([]), "listItemRefs"), [h, k] = q(j(() => (i == null ? void 0 : i.required) === !0), "isDisabled"), [N, w] = q(j(() => c.map((H) => ({ ...H, rank: null }))), "rankOptions"), C = q(Ne(() => Array.from({ length: c.length }, (H, z) => z + 1), [c.length]), "ranks"), { isLongFormSurvey: x, focusedQuestionId: T, setFocusedQuestionId: y, useMobileStyling: L, isPreview: I } = V((H) => ({ useMobileStyling: H.useMobileStyling, isLongFormSurvey: le(H.studyType), focusedQuestionId: H.focusedQuestionId, setFocusedQuestionId: H.setFocusedQuestionId, isPreview: H.isPreview })), P = L && !I, v = x && T === o, _ = (H) => {
1513
- H.preventDefault(), W(N), s && s();
1514
- }, S = (H, z) => {
1515
- for (let Z = 0; Z < g.current.length; Z++) {
1516
- const F = g.current[Z];
1517
- if (!F || F === b.current) continue;
1518
- const oe = F.getBoundingClientRect();
1519
- if (H >= oe.left && H <= oe.right && z >= oe.top && z <= oe.bottom) return { element: F, index: Z };
1520
- }
1521
- return null;
1522
- }, M = (H) => (z) => {
1523
- if (!P) return;
1524
- z.preventDefault(), z.stopPropagation(), p.current = !0, d.current = H;
1525
- const Z = z.touches[0];
1526
- u.current = Z.clientY, f.current = Z.clientY;
1527
- const F = z.currentTarget.closest(".ul-card-rank__option");
1528
- F && (b.current = F, F.classList.add("is-dragging"));
1529
- }, R = (H) => {
1530
- if (!P || !p.current || d.current === null) return;
1531
- H.preventDefault(), H.stopPropagation();
1532
- const z = H.touches[0];
1533
- f.current = z.clientY;
1534
- const Z = f.current - u.current;
1535
- b.current && (b.current.style.transform = `translateY(${Z}px)`, b.current.style.zIndex = "1000"), g.current.forEach((oe) => {
1536
- oe && oe !== b.current && oe.classList.remove("is-drop-target");
1537
- });
1538
- const F = S(z.clientX, z.clientY);
1539
- F && F.element.classList.add("is-drop-target");
1540
- }, E = (H) => {
1541
- if (!P || !p.current || d.current === null) return;
1542
- H.preventDefault(), H.stopPropagation();
1543
- const z = H.changedTouches[0], Z = S(z.clientX, z.clientY);
1544
- b.current && (b.current.style.transform = "", b.current.style.zIndex = "", b.current.classList.remove("is-dragging")), g.current.forEach((F) => {
1545
- F && F.classList.remove("is-drop-target");
1546
- }), Z && Z.index !== d.current && U(d.current, Z.index), d.current = null, b.current = null, p.current = !1;
1547
- }, U = (H, z) => {
1548
- w((Z) => {
1549
- const F = Z.map((qe) => ({ ...qe })), [oe] = F.splice(H, 1);
1550
- return F.splice(z, 0, oe), F.forEach((qe, ee) => {
1551
- qe.rank = ee + 1;
1552
- }), Y(F), F;
1553
- });
1554
- }, B = (H) => {
1555
- H.preventDefault(), H.dataTransfer && (H.dataTransfer.dropEffect = "move");
1556
- }, W = (H) => {
1557
- const z = {};
1558
- H.reduce((Z, F) => (Z[F.id] = F.rank, Z), z), n({ value: z, questionId: o, type: a }, !0);
1559
- }, Y = (H) => {
1560
- k(!1), x && W(H);
1561
- }, { left: se, right: re } = t, Ye = c.length, ze = (H) => {
1562
- H.preventDefault(), H.currentTarget.classList.add("is-drop-target");
1563
- }, Et = (H) => {
1564
- H.currentTarget.classList.remove("is-drop-target");
1565
- }, xi = (H) => {
1566
- d.current = null, H.currentTarget.classList.remove("is-dragging");
1567
- };
1568
- return l("form", { className: D(e, "ul-card-rank", "fade-in-transition", x && !v && "ul-card--unfocused"), onClick: () => {
1569
- x && T !== o && y(o);
1570
- }, onSubmit: _, children: [l(ye, { message: r, properties: i }, void 0, 0, { fileName: G, lineNumber: 470, columnNumber: 7 }, void 0), l(Oe, { properties: i, defaultBody: () => l(K, { children: [l(Pe, { children: [l("div", { className: "ul-card--rank__question-inner-container", children: [l("div", { className: "ul-card-rank__labels", children: l("span", { children: ["1 - ", se] }, void 0, 0, { fileName: G, lineNumber: 337, columnNumber: 13 }, void 0) }, void 0, 0, { fileName: G, lineNumber: 336, columnNumber: 11 }, void 0), l("ol", { className: "ul-card-rank__list", onDragOver: B, children: N.map(({ id: H, label: z, rank: Z }, F) => {
1571
- return l("li", { className: "ul-card-rank__option", draggable: !P, onDragEnd: P ? void 0 : xi, onDragEnter: P ? void 0 : ze, onDragLeave: P ? void 0 : Et, onDragStart: P ? void 0 : (qe = F, (ee) => {
1572
- d.current = qe, ee.dataTransfer && (ee.dataTransfer.effectAllowed = "move", ee.dataTransfer.setData("text/plain", String(qe)), ee.currentTarget.classList.add("is-dragging"));
1573
- }), onDrop: P ? void 0 : (oe = F, (ee) => {
1574
- var dt, Je;
1575
- ee.preventDefault(), ee.currentTarget.classList.remove("is-drop-target");
1576
- const De = d.current;
1577
- d.current = null, (Je = (dt = ee.currentTarget.closest(".ul-card-rank__list")) == null ? void 0 : dt.querySelector(".is-dragging")) == null || Je.classList.remove("is-dragging"), De != null && De !== oe && U(De, oe);
1578
- }), ref: (ee) => g.current[F] = ee, children: [l("select", { "aria-label": `Rank for ${z}`, className: D("ul-card-rank__select", Z == null && "ul-card-rank__select--placeholder"), name: `rank[${H}]`, onChange: (ee) => ((De, dt) => {
1579
- w((Je) => {
1580
- const Xe = parseInt(dt), xe = Je.map((J) => ({ ...J }));
1581
- xe.some((J) => J.rank == null) && xe.forEach((J, Ot) => J.rank = Ot + 1);
1582
- const Lt = xe.findIndex((J) => J.id === De);
1583
- if (Lt === -1) return Je;
1584
- const mt = xe[Lt].rank;
1585
- return Xe < mt ? xe.forEach((J) => {
1586
- J.id !== De && J.rank >= Xe && J.rank < mt && (J.rank = J.rank + 1);
1587
- }) : Xe > mt && xe.forEach((J) => {
1588
- J.id !== De && J.rank > mt && J.rank <= Xe && (J.rank = J.rank - 1);
1589
- }), xe[Lt].rank = Xe, xe.sort((J, Ot) => J.rank - Ot.rank), Y(xe), xe;
1590
- });
1591
- })(H, ee.currentTarget.value), value: Z ?? "", children: [Z == null && l("option", { className: "ul-card-rank__select-option", disabled: !0, value: "", children: "-" }, void 0, 0, { fileName: G, lineNumber: 371, columnNumber: 21 }, void 0), C.map((ee) => l("option", { className: "ul-card-rank__select-option", value: ee, children: ee }, ee, 0, { fileName: G, lineNumber: 381, columnNumber: 23 }, void 0))] }, void 0, 0, { fileName: G, lineNumber: 360, columnNumber: 17 }, void 0), l("span", { children: z }, void 0, 0, { fileName: G, lineNumber: 391, columnNumber: 17 }, void 0), l("button", { "aria-label": `Drag ${z} to reorder`, className: "ul-card-rank__drag-btn", onTouchEnd: P ? E : void 0, onTouchMove: P ? R : void 0, onTouchStart: P ? M(F) : void 0, title: "Drag to reorder", type: "button", children: l("svg", { fill: "none", height: "17", viewBox: "0 0 16 17", width: "16", xmlns: "http://www.w3.org/2000/svg", children: l("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" }, void 0, 0, { fileName: G, lineNumber: 420, columnNumber: 21 }, void 0) }, void 0, 0, { fileName: G, lineNumber: 413, columnNumber: 19 }, void 0) }, void 0, 0, { fileName: G, lineNumber: 392, columnNumber: 17 }, void 0)] }, H, 0, { fileName: G, lineNumber: 341, columnNumber: 15 }, void 0);
1592
- var oe, qe;
1593
- }) }, void 0, 0, { fileName: G, lineNumber: 339, columnNumber: 11 }, void 0), l("div", { className: "ul-card-rank__labels", children: l("span", { children: [Ye, " - ", re] }, void 0, 0, { fileName: G, lineNumber: 430, columnNumber: 13 }, void 0) }, void 0, 0, { fileName: G, lineNumber: 429, columnNumber: 11 }, void 0)] }, void 0, 0, { fileName: G, lineNumber: 335, columnNumber: 9 }, void 0), m && l(Ct, { handleSubmit: _, isSubmitDisabled: h }, void 0, 0, { fileName: G, lineNumber: 436, columnNumber: 11 }, void 0)] }, void 0, 0, { fileName: G, lineNumber: 334, columnNumber: 7 }, void 0), !x && l(Ue, { children: l("div", { className: "ul-card__button-wrapper", children: l(ie, { disabled: h, children: $e(i) }, void 0, 0, { fileName: G, lineNumber: 445, columnNumber: 13 }, void 0) }, void 0, 0, { fileName: G, lineNumber: 444, columnNumber: 11 }, void 0) }, void 0, 0, { fileName: G, lineNumber: 443, columnNumber: 9 }, void 0)] }, void 0) }, void 0, 0, { fileName: G, lineNumber: 471, columnNumber: 7 }, void 0)] }, o, 0, { fileName: G, lineNumber: 459, columnNumber: 5 }, void 0);
1594
- };
1595
- var ue = "/Users/toben/git-local/sdk/platform/web/src/view/cards/pageCard/DisplayQuestion.tsx";
1596
- const Ao = /* @__PURE__ */ new Set(["open", "matrix", "multipleselect", "multiplechoice", "rankorder"]), Gr = ({ cardInstance: e, moveToNextQuestion: t, showIndividualSubmit: r, submitQuestion: n, updateCardValues: i }) => {
1597
- const { isLongFormSurvey: o } = V((f) => ({ isLongFormSurvey: le(f.studyType) }));
1598
- if (!e) return null;
1599
- const { name: a, type: s, props: c } = e, m = r && Ao.has(s), d = { className: "ul-card", next: (f, b) => n(f, b), questionId: a, type: s, showIndividualSubmit: r, ...m ? { next: (f, b) => {
1600
- i(f.questionId, f, b ?? !0);
1601
- }, onSubmitButtonClick: () => t(a) } : {} }, u = (() => {
1602
- switch (s) {
1603
- case "consentlegal":
1604
- return l(xo, { ...d, ...c }, void 0, 0, { fileName: ue, lineNumber: 84, columnNumber: 16 }, void 0);
1605
- case "likert":
1606
- return l(Co, { ...d, ...c }, void 0, 0, { fileName: ue, lineNumber: 87, columnNumber: 16 }, void 0);
1607
- case "matrix":
1608
- return l(Oo, { ...d, ...c }, void 0, 0, { fileName: ue, lineNumber: 90, columnNumber: 16 }, void 0);
1609
- case "multiplechoice":
1610
- return l(Mo, { ...d, ...c }, void 0, 0, { fileName: ue, lineNumber: 93, columnNumber: 16 }, void 0);
1611
- case "multipleselect":
1612
- return l(Uo, { ...d, ...c }, void 0, 0, { fileName: ue, lineNumber: 96, columnNumber: 16 }, void 0);
1613
- case "nps":
1614
- return l(qo, { ...d, ...c }, void 0, 0, { fileName: ue, lineNumber: 99, columnNumber: 16 }, void 0);
1615
- case "open":
1616
- return l(Do, { ...d, ...c }, void 0, 0, { fileName: ue, lineNumber: 102, columnNumber: 16 }, void 0);
1617
- case "rankorder":
1618
- return l(Ho, { ...d, ...c }, void 0, 0, { fileName: ue, lineNumber: 105, columnNumber: 16 }, void 0);
1619
- case "recordedtask":
1620
- return l(Xo, { ...d, ...c }, void 0, 0, { fileName: ue, lineNumber: 108, columnNumber: 16 }, void 0);
1621
- case "texturlprompt":
1622
- return l(tl, { ...d, ...c }, void 0, 0, { fileName: ue, lineNumber: 111, columnNumber: 16 }, void 0);
1623
- case "thanks":
1624
- return l(rl, { ...d, ...c }, void 0, 0, { fileName: ue, lineNumber: 114, columnNumber: 16 }, void 0);
1625
- case "uploading":
1626
- return l(nl, { ...d, ...c }, void 0, 0, { fileName: ue, lineNumber: 117, columnNumber: 16 }, void 0);
1627
- default:
1628
- return null;
1629
- }
1630
- })();
1631
- return u ? o ? l("div", { className: "ul-card-scroll-wrapper", children: u }, a, 0, { fileName: ue, lineNumber: 134, columnNumber: 5 }, void 0) : u : null;
1632
- };
1633
- var Re = "/Users/toben/git-local/sdk/platform/web/src/view/cards/pageCard/longFormQuestionsFooter.tsx";
1634
- const Vo = ({ isSubmitDisabled: e = !1, onSubmit: t, buttonText: r }) => {
1635
- var b;
1636
- const { cards: n, forceBrandedLogo: i, index: o, marketingUrl: a, showSurveyBrand: s, slugName: c, surveyId: m, useMobileStyling: d } = V((p) => ({ cards: p.cards, forceBrandedLogo: p.forceBrandedLogo, index: p.index, marketingUrl: p.marketingUrl, showSurveyBrand: p.showSurveyBrand, slugName: p.slugName, surveyId: p.surveyId, useMobileStyling: p.useMobileStyling })), u = ((b = n[o]) == null ? void 0 : b.type) === "thanks", f = si({ marketingUrl: a, slugName: c, surveyId: m, forceBrandedLogo: i });
1637
- return l("footer", { className: D("long-form-question-footer-container", d && "long-form-question-footer-container--mobile", u && "long-form-question-footer-container-center"), children: [u && i ? l(li, { marketingUrlLink: f }, void 0, 0, { fileName: Re, lineNumber: 59, columnNumber: 9 }, void 0) : l("div", { className: "long-form-question-footer-container-logo", children: s ? l(oi, { forceBrandedLogo: i, marketingUrlLink: f }, void 0, 0, { fileName: Re, lineNumber: 67, columnNumber: 13 }, void 0) : null }, void 0, 0, { fileName: Re, lineNumber: 61, columnNumber: 9 }, void 0), !u && l("div", { className: D("ul-card__button-wrapper", "ul-card-vertical__button-wrapper", "long-form-question-footer-container-actions"), children: l(ie, { className: D("long-form-button", e && "sprig-button-disabled"), disabled: e, onClick: t, children: l("span", { className: "long-form-button-text-container", children: r ?? l(lr, { stroke: "white" }, void 0, 0, { fileName: Re, lineNumber: 96, columnNumber: 30 }, void 0) }, void 0, 0, { fileName: Re, lineNumber: 91, columnNumber: 13 }, void 0) }, void 0, 0, { fileName: Re, lineNumber: 82, columnNumber: 11 }, void 0) }, void 0, 0, { fileName: Re, lineNumber: 75, columnNumber: 9 }, void 0)] }, void 0, 0, { fileName: Re, lineNumber: 50, columnNumber: 5 }, void 0);
1638
- }, Bo = /<piped-value\b([^>]*)>.*?<\/piped-value>/gis, Kr = ["questionHtml", "captionHtml", "footerHtml", "richTextBody"], di = (e) => !!e.props && typeof e.props == "object" && "properties" in e.props, Dt = (e) => !!e.props && typeof e.props == "object" && "options" in e.props && Array.isArray(e.props.options), Yr = (e) => ["string", "number"].includes(typeof e), Jr = (e) => e.length === 0 ? "" : e.length === 1 ? e[0] : e.join(", "), Fo = (e) => {
1639
- var r, n;
1640
- const t = ((i) => i != null && typeof i == "object" && "value" in i)(e) ? e.value : void 0;
1641
- if (t != null) {
1642
- if (e.type === "multipleselect" && Dt(e) && ((i) => !!i && typeof i == "object" && !Array.isArray(i))(t)) {
1643
- const i = e.secondaryValue ?? null, o = e.props.options.filter((a) => t[String(a.id)] === !0).map((a) => {
1644
- var s;
1645
- return a.label + ((s = i == null ? void 0 : i[String(a.id)]) != null && s.userText ? `: ${i[String(a.id)].userText}` : "");
1646
- });
1647
- return o.length ? Jr(o) : "No options selected";
1648
- }
1649
- if (e.type === "multiplechoice" && typeof t == "object" && t !== null) {
1650
- const i = e.secondaryValue ?? null, o = Object.keys(t)[0];
1651
- if (o) {
1652
- const a = e.props.options.find((s) => String(s.id) === o);
1653
- return (a == null ? void 0 : a.label) + ((r = i == null ? void 0 : i[o]) != null && r.userText ? `: ${(n = i == null ? void 0 : i[o]) == null ? void 0 : n.userText}` : "");
1654
- }
1655
- }
1656
- if (e.type === "matrix" && Dt(e) && ((i) => {
1657
- if (!di(i)) return !1;
1658
- const o = i.props.properties;
1659
- return !!o && typeof o == "object" && "matrixColumn" in o;
1660
- })(e)) {
1661
- const i = e.props.options, o = e.props.properties.matrixColumn, a = [];
1662
- for (const [s, c] of Object.entries(t)) {
1663
- const m = i.find((p) => String(p.id) === s), d = (m == null ? void 0 : m.label) ?? s, u = Yr(c) ? String(c) : JSON.stringify(c), f = o.find((p) => p.value === u), b = (f == null ? void 0 : f.label) ?? u;
1664
- a.push(`${d}: ${b}`);
1665
- }
1666
- return a.join("; ");
1667
- }
1668
- if (e.type === "rankorder" && Dt(e)) {
1669
- const i = e.props.options.reduce((a, s) => (a[String(s.id)] = s.label, a), {}), o = [];
1670
- for (const [a, s] of Object.entries(t)) {
1671
- const c = i[a];
1672
- c && (o[s - 1] = c);
1673
- }
1674
- return Jr(o);
1675
- }
1676
- if (Yr(t)) {
1677
- const i = String(t).replaceAll(/[\u200B-\u200D\uFEFF]/g, "").trim();
1678
- return i === "" ? void 0 : i;
1679
- }
1680
- try {
1681
- return JSON.stringify(t);
1682
- } catch {
1683
- return String(t);
1684
- }
1685
- }
1686
- }, Xr = (e, t) => {
1687
- const r = new RegExp(`${t}="([^"]*)"`, "i").exec(e);
1688
- return (r == null ? void 0 : r[1]) ?? null;
1689
- }, jo = (e, t) => {
1690
- if (e == null) return e;
1691
- let r = !1;
1692
- const n = e.replace(Bo, (i, o) => {
1693
- r = !0;
1694
- const a = Xr(o, "answer-id"), s = Xr(o, "fallback-text") ?? "", c = a ? Number(a) : Number.NaN;
1695
- if (Number.isFinite(c) && Object.hasOwn(t, c)) {
1696
- const m = t[c];
1697
- return String(m);
1698
- }
1699
- return s;
1700
- });
1701
- return r ? n : e;
1702
- }, mi = (e) => {
1703
- const t = {};
1704
- for (const r of e) {
1705
- const n = Fo(r);
1706
- n !== void 0 && (t[r.name] = n);
1707
- }
1708
- return t;
1709
- };
1710
- var bt = "/Users/toben/git-local/sdk/platform/web/src/view/cards/pageCard/pageCard.tsx";
1711
- const $o = ({ cards: e, next: t, previousResponses: r }) => {
1712
- var P;
1713
- const [n, i] = q(j({}), "cardValues"), [o, a] = q(j({}), "questionHasValidState"), s = q(Ne(() => ({ ...r, ...mi(e.map((v) => {
1714
- var _, S;
1715
- return { ...v, value: ((_ = n[v.name]) == null ? void 0 : _.value) ?? null, secondaryValue: ((S = n[v.name]) == null ? void 0 : S.secondaryValue) ?? null };
1716
- })) }), [r, n, e]), "allResponses"), c = (m = s, e.map((v) => {
1717
- if (!di(v) || v.props.properties === void 0 || v.props.properties === null) return v;
1718
- const _ = v.props.properties;
1719
- if (_ === null || typeof _ != "object" || !Kr.some((R) => R in _)) return v;
1720
- let S = !1;
1721
- const M = {};
1722
- for (const R of Kr) {
1723
- const E = _[R];
1724
- if (E !== void 0) {
1725
- const U = jo(E, m);
1726
- M[R] = U, U !== E && (S = !0);
1727
- }
1728
- }
1729
- return S ? { ...v, props: { ...v.props, properties: { ..._, ...M } } } : v;
1730
- }));
1731
- var m;
1732
- const { isLongFormSurvey: d, focusedQuestionId: u, setFocusedQuestionId: f } = V((v) => ({ isLongFormSurvey: le(v.studyType), focusedQuestionId: v.focusedQuestionId, setFocusedQuestionId: v.setFocusedQuestionId })), b = q(X(null), "listRef"), p = q(X(!1), "isScrollingProgrammatically"), g = q(X(null), "expectedFocusFromManualScroll"), h = Fe((v) => {
1733
- var R, E;
1734
- p.current = !0;
1735
- const _ = e.findIndex((U) => U.name === v);
1736
- if (!d || v === null || _ === -1) return void (p.current = !1);
1737
- const S = (R = b.current) == null ? void 0 : R.querySelectorAll(".ul-card-scroll-wrapper")[_], M = (E = b.current) == null ? void 0 : E.closest(".ul-card__container");
1738
- if (S && M) {
1739
- if (S && M) {
1740
- const U = S.getBoundingClientRect(), B = M.getBoundingClientRect(), W = U.top - B.top + M.scrollTop, Y = W + U.height / 2, se = window.innerHeight - 157;
1741
- let re;
1742
- U.height >= se ? re = W : re = Y - M.clientHeight / 2;
1743
- const Ye = M.clientHeight, ze = M.scrollHeight - Ye, Et = Math.max(0, Math.min(re, ze));
1744
- M.scrollTo({ top: Et, behavior: "smooth" }), setTimeout(() => {
1745
- p.current = !1;
1746
- }, 500);
1747
- }
1748
- } else p.current = !1;
1749
- }, [d, e]);
1750
- function k(v, _) {
1751
- return v.map((S) => _[S.name]);
1752
- }
1753
- Q(() => {
1754
- u !== null && e.findIndex((v) => v.name === u) !== -1 || f(e[0].name);
1755
- }, [e, u, f]);
1756
- const N = (v) => {
1757
- if (!d) return;
1758
- const _ = e.findIndex((S) => S.name === v) + 1;
1759
- if (_ < e.length) {
1760
- const S = e[_].name;
1761
- f(S);
1762
- } else f(v);
1763
- };
1764
- Q(() => {
1765
- d && u !== null && (g.current !== u ? h(u) : g.current = null);
1766
- }, [u, d, h]);
1767
- const w = Fe(() => {
1768
- var B, W;
1769
- if (p.current) return;
1770
- const v = (B = b.current) == null ? void 0 : B.closest(".ul-card__container");
1771
- if (!v) return;
1772
- const _ = (W = b.current) == null ? void 0 : W.querySelectorAll(".ul-card-scroll-wrapper");
1773
- if (!_ || _.length === 0) return;
1774
- const S = v.getBoundingClientRect(), M = S.top + S.height / 2;
1775
- let R = 0, E = 1 / 0;
1776
- _.forEach((Y, se) => {
1777
- const re = Y.getBoundingClientRect(), Ye = re.top + re.height / 2, ze = Math.abs(M - Ye);
1778
- ze < E && (E = ze, R = se);
1779
- });
1780
- const U = e[R];
1781
- g.current = U.name, f(U.name);
1782
- }, [e, f]);
1783
- Q(() => {
1784
- var _;
1785
- if (!d) return;
1786
- const v = ((_ = b.current) == null ? void 0 : _.closest(".ul-card__container")) || null;
1787
- return v && v.addEventListener("scroll", w, { passive: !0 }), () => {
1788
- v && v.removeEventListener("scroll", w);
1789
- };
1790
- }, [w, d]);
1791
- const C = q(Ne(() => Object.values(o).every((v) => v), [o]), "canSubmit"), x = async (v, _, S) => {
1792
- return a((R) => ({ ...R, [v]: S })), await (M = (R) => ({ ...R, [v]: _ }), new Promise((R) => {
1793
- i((E) => {
1794
- const U = M(E);
1795
- return R(U), U;
1796
- });
1797
- }));
1798
- var M;
1799
- };
1800
- Q(() => {
1801
- if (!d) return;
1802
- const v = {};
1803
- e.forEach((_) => {
1804
- var M, R;
1805
- const S = _;
1806
- (R = (M = S.props) == null ? void 0 : M.properties) != null && R.required || (v[S.name] = { value: null, questionId: S.name, type: S.type });
1807
- }), i(v), a({});
1808
- }, [e, d]);
1809
- const T = async (v, _) => {
1810
- if (d) {
1811
- const S = await x(v.questionId, v, _), M = y(v.type), R = L(v.type);
1812
- if (M && N(v.questionId), R && _) {
1813
- const E = k(e, S);
1814
- t(E);
1815
- }
1816
- } else t([v]);
1817
- }, y = (v) => (/* @__PURE__ */ new Set(["nps", "likert", "multiplechoice"])).has(v), L = (v) => (/* @__PURE__ */ new Set(["videovoice", "consentlegal", "texturlprompt"])).has(v), I = ((P = e[0]) == null ? void 0 : P.type) === "thanks";
1818
- return d ? l("div", { className: "ul-card-list-container--longform", ref: b, children: [c.map((v, _) => l(Gr, { cardInstance: v, moveToNextQuestion: N, showIndividualSubmit: d && e.length > 1 && _ < e.length - 1, submitQuestion: T, updateCardValues: x }, (v == null ? void 0 : v.name) || _, 0, { fileName: bt, lineNumber: 345, columnNumber: 9 }, void 0)), !I && l(Vo, { isSubmitDisabled: Object.keys(n).length < e.length || !C, onSubmit: function() {
1819
- const v = k(e, n);
1820
- t(v);
1821
- } }, void 0, 0, { fileName: bt, lineNumber: 358, columnNumber: 9 }, void 0)] }, void 0, 0, { fileName: bt, lineNumber: 343, columnNumber: 5 }, void 0) : l(K, { children: c.map((v, _) => l(Gr, { cardInstance: v, moveToNextQuestion: N, showIndividualSubmit: d && e.length > 1 && _ < e.length - 1, submitQuestion: T, updateCardValues: x }, (v == null ? void 0 : v.name) || _, 0, { fileName: bt, lineNumber: 367, columnNumber: 9 }, void 0)) }, void 0);
1822
- }, zt = 1, pi = 2, fi = 3, kt = (e) => e.type === "av_permission", en = (e) => e.type === "screen_permission", bi = (e, t) => e === void 0 ? zt : e ? ((r, n) => !(kt(n) ? n.permissionDescriptors : []).includes("camera") || r.getVideoTracks().length > 0)(e, t) ? fi : zt : pi, tn = { avStream: null, currentPage: null, mediaRecordingUids: null, nextQuestion: () => {
1823
- }, passthroughData: void 0, recordingMediaTypes: void 0, screenPermissionRequested: !1, type: void 0 }, Se = Gn((e) => ({ ...tn, reset: () => {
1824
- e(tn);
1825
- }, updatePage: (t) => {
1826
- e(t);
1827
- } }));
1828
- function Qt({ currentPage: e, pages: t }) {
1829
- const { avStream: r, recordingMediaTypes: n, updatePage: i } = Se.getState(), { recorderEventEmitter: o } = V.getState();
1830
- o.emit("av.permission", { "permission.descriptors": e.permissionDescriptors, "stream.ready": (a, s) => {
1831
- if (r === a) return;
1832
- let c = e;
1833
- if (a && !e.permissionDescriptors.includes("camera")) {
1834
- const m = t.indexOf(e), d = s != null && s.active ? m + 2 : m + 1;
1835
- s != null && s.active && n && o.emit("begin.recording", { "recording.media.types": n, "start.recording.callback": (u) => i({ mediaRecordingUids: u }) }), c = t[d];
1836
- }
1837
- i({ currentPage: c, avStream: a });
1838
- } });
1839
- }
1840
- function Wt({ status: e }) {
1841
- const { nextQuestion: t, passthroughData: r, mediaRecordingUids: n, reset: i } = Se.getState(), { recorderEventEmitter: o, handleUploadUpdate: a, index: s } = V.getState(), c = { value: { taskStatus: e }, type: "recordedtask", questionId: (r == null ? void 0 : r.questionId) || 1 };
1842
- r && o.emit("finish.task", { "begin.callback": (m) => {
1843
- a({ mediaRecordingUid: m, isSubmitted: !0, progressPct: 0, isComplete: !1 });
1844
- }, "progress.callback": (m, d) => {
1845
- a({ mediaRecordingUid: m, progressPct: d.detail, isSubmitted: !1, isComplete: !1 });
1846
- }, "upload.callback": (m) => {
1847
- m && a({ mediaRecordingUid: m, isComplete: !0, isSubmitted: !0, progressPct: 100 });
1848
- }, "passthrough.data": r, "current.index": s, "task.response": c, "task.complete.callback": (m) => {
1849
- c.value.taskDurationMillisecond = m, n && (c.value.mediaRecordingUids = n), i(), t(c);
1850
- } });
1851
- }
1852
- function ar({ pages: e, setIsRequestingPermission: t }) {
1853
- const { recorderEventEmitter: r, eventEmitFn: n } = V.getState(), { updatePage: i, currentPage: o, recordingMediaTypes: a, screenPermissionRequested: s } = Se.getState();
1854
- if (!o) return;
1855
- const c = e.indexOf(o);
1856
- switch (o.type) {
1857
- case "av_permission": {
1858
- const m = s ? c + 2 : c + 1;
1859
- return s && a && r.emit("begin.recording", { "recording.media.types": a, "start.recording.callback": (d) => {
1860
- i({ mediaRecordingUids: d });
1861
- } }), void i({ currentPage: e[m] });
1862
- }
1863
- case "screen_permission":
1864
- return void r.emit("screen.permission", { "screen.permission.requested": t, "stream.ready.callback": (m, d) => {
1865
- const u = d ? e[c + 1] : o;
1866
- d && a && r.emit("begin.recording", { "recording.media.types": a, "start.recording.callback": (f) => {
1867
- i({ captureStream: d, mediaRecordingUids: f });
1868
- } }), i({ currentPage: u, screenPermissionRequested: !0, captureStream: d });
1869
- } });
1870
- case "start_task":
1871
- return n("recorded.task.start"), r.emit("recorded.task.start"), r.emit("start.task"), void i({ currentPage: e[c + 1], screenPermissionRequested: !0 });
1872
- case "complete_task":
1873
- return;
1874
- }
1875
- }
1876
- var A = "/Users/toben/git-local/sdk/platform/web/src/view/cards/recordedTask/components.tsx";
1877
- const vi = "ul-permission-graphics-container", hi = "ul-permission-body", gi = D(vi, "ul_recorded-task-inset-spacing"), Tt = D("ul-horizontal-button-container", "ul-horizontal-button-container-left"), _i = ({ richTextBody: e }) => l("div", { className: "ul-rich-text-body", dangerouslySetInnerHTML: { __html: e }, id: "ul-task-detail-container" }, void 0, 0, { fileName: A, lineNumber: 33, columnNumber: 5 }, void 0), It = ({ required: e, skipButtonText: t, bottom: r = !1 }) => e ? null : l(ie, { className: D(r && "ul-skip-button-below", "ul-button-inactive"), onClick: Wt.bind(null, { status: "abandoned" }), children: t || "Skip" }, void 0, 0, { fileName: A, lineNumber: 52, columnNumber: 5 }, void 0), sr = (e) => {
1878
- const { avStream: t, captureStream: r, recordingMediaTypes: n, updatePage: i } = Se.getState(), o = (n == null ? void 0 : n.includes("audio")) || (n == null ? void 0 : n.includes("video"));
1879
- Q(() => {
1880
- const a = setInterval(() => {
1881
- o && t && !t.active ? i({ avStream: null, currentPage: e[0] }) : r && r.active || i({ captureStream: void 0, currentPage: e[o ? 1 : 0] });
1882
- }, 1e3);
1883
- return () => clearInterval(a);
1884
- }, [t, r, o, e, n, i]);
1885
- }, zo = ({ content: e, pages: t, required: r }) => {
1886
- const { buttonText: n, skipButtonText: i, taskDetail: o } = e;
1887
- return sr(t), l("div", { className: "ul-task-page", children: [o && l(_i, { richTextBody: o }, void 0, 0, { fileName: A, lineNumber: 106, columnNumber: 22 }, void 0), l("div", { className: Tt, children: [l(ie, { onClick: ar.bind(null, { pages: t }), children: n }, void 0, 0, { fileName: A, lineNumber: 108, columnNumber: 9 }, void 0), l(It, { required: r, skipButtonText: i }, void 0, 0, { fileName: A, lineNumber: 109, columnNumber: 9 }, void 0)] }, void 0, 0, { fileName: A, lineNumber: 107, columnNumber: 7 }, void 0)] }, "start-task", 0, { fileName: A, lineNumber: 105, columnNumber: 5 }, void 0);
1888
- }, Qo = ({ content: e, pages: t, properties: r }) => {
1889
- const { buttonText: n, skipButtonText: i } = e;
1890
- sr(t);
1891
- const o = l(Oe, { properties: r, defaultBody: () => l("div", { className: Tt, children: [l(ie, { className: "ul-complete-task-button", onClick: Wt.bind(null, { status: "completed" }), children: n }, void 0, 0, { fileName: A, lineNumber: 129, columnNumber: 7 }, void 0), l(ie, { className: D("ul-button-inactive"), onClick: Wt.bind(null, { status: "given.up" }), children: i }, void 0, 0, { fileName: A, lineNumber: 135, columnNumber: 7 }, void 0)] }, void 0, 0, { fileName: A, lineNumber: 128, columnNumber: 5 }, void 0) }, void 0, 0, { fileName: A, lineNumber: 145, columnNumber: 5 }, void 0);
1892
- return l("div", { className: "ul-task-page", children: [e.taskDetail && l(_i, { richTextBody: e.taskDetail }, void 0, 0, { fileName: A, lineNumber: 155, columnNumber: 9 }, void 0), o] }, "complete-task", 0, { fileName: A, lineNumber: 153, columnNumber: 5 }, void 0);
1893
- }, Wo = ({ content: e, pages: t, required: r }) => {
1894
- const { buttonText: n, skipButtonText: i } = e, [o] = V((c) => [c.tabTitle]), [a, s] = q(j(!1), "isRequestingPermission");
1895
- return l("div", { children: [l("div", { className: gi, children: [l("p", { style: { marginTop: "auto" }, children: e.selectTabText }, void 0, 0, { fileName: A, lineNumber: 177, columnNumber: 9 }, void 0), l("div", { className: "ul-select-tab-container", children: l("p", { className: hi, children: o }, void 0, 0, { fileName: A, lineNumber: 179, columnNumber: 11 }, void 0) }, void 0, 0, { fileName: A, lineNumber: 178, columnNumber: 9 }, void 0)] }, void 0, 0, { fileName: A, lineNumber: 176, columnNumber: 7 }, void 0), l("div", { className: r ? "" : Tt, children: [l(ie, { disabled: a, onClick: ar.bind(null, { pages: t, setIsRequestingPermission: s }), children: n }, void 0, 0, { fileName: A, lineNumber: 183, columnNumber: 9 }, void 0), l(It, { required: r, skipButtonText: i }, void 0, 0, { fileName: A, lineNumber: 189, columnNumber: 9 }, void 0)] }, void 0, 0, { fileName: A, lineNumber: 182, columnNumber: 7 }, void 0)] }, void 0, 0, { fileName: A, lineNumber: 175, columnNumber: 5 }, void 0);
1896
- }, Zo = ({ content: e }) => l("div", { className: D(vi, "ul_permission_svg_container", "ul_recorded-task-inset-spacing", "ul-center-horizontally"), dangerouslySetInnerHTML: { __html: e.svg } }, "ul-permission-request-graphic", 0, { fileName: A, lineNumber: 201, columnNumber: 5 }, void 0), Go = ({ content: e, pages: t, required: r }) => {
1897
- const { permissionDeniedHeadline: n, permissionDeniedBody: i, skipButtonText: o, tryAgainButtonText: a } = e, s = kt(t[0]) ? t[0] : null;
1898
- return Q(() => {
1899
- const c = setInterval(() => {
1900
- s !== null && Qt({ currentPage: s, pages: t });
1901
- }, 1e3);
1902
- return () => clearInterval(c);
1903
- }, [s, t]), s ? l("div", { children: [l("div", { className: gi, children: l("p", { className: "ul-av-permission-denied-paragraph", children: [l("span", { className: "ul-av-permission-denied-headline", children: n }, void 0, 0, { fileName: A, lineNumber: 249, columnNumber: 11 }, void 0), l("span", { className: hi, children: i }, void 0, 0, { fileName: A, lineNumber: 252, columnNumber: 11 }, void 0)] }, void 0, 0, { fileName: A, lineNumber: 248, columnNumber: 9 }, void 0) }, void 0, 0, { fileName: A, lineNumber: 247, columnNumber: 7 }, void 0), l("div", { className: Tt, children: [l(ie, { onClick: Qt.bind(null, { currentPage: s, pages: t }), children: a }, void 0, 0, { fileName: A, lineNumber: 256, columnNumber: 9 }, void 0), l(It, { required: r, skipButtonText: o }, void 0, 0, { fileName: A, lineNumber: 264, columnNumber: 9 }, void 0)] }, void 0, 0, { fileName: A, lineNumber: 255, columnNumber: 7 }, void 0)] }, void 0, 0, { fileName: A, lineNumber: 246, columnNumber: 5 }, void 0) : null;
1904
- }, Ko = ({ stream: e }) => l("video", { autoPlay: !0, className: D("ul_recorded-task-inset-spacing"), id: "ul-record-task-video-preview", muted: !0, ref: (t) => {
1905
- t && (t.srcObject = e || null);
1906
- } }, void 0, 0, { fileName: A, lineNumber: 276, columnNumber: 5 }, void 0), Yo = ({ content: e, pages: t, required: r }) => {
1907
- const { skipButtonText: n } = e, { avStream: i } = Se.getState();
1908
- return sr(t), l("div", { children: [l(Ko, { stream: i }, void 0, 0, { fileName: A, lineNumber: 305, columnNumber: 7 }, void 0), l("div", { className: "ul-vertical-button-container-center", children: [l(ie, { onClick: ar.bind(null, { pages: t }), children: e.buttonText }, void 0, 0, { fileName: A, lineNumber: 307, columnNumber: 9 }, void 0), l(It, { bottom: !0, required: r, skipButtonText: n }, void 0, 0, { fileName: A, lineNumber: 310, columnNumber: 9 }, void 0)] }, void 0, 0, { fileName: A, lineNumber: 306, columnNumber: 7 }, void 0)] }, void 0, 0, { fileName: A, lineNumber: 304, columnNumber: 5 }, void 0);
1909
- }, Jo = ({ properties: e }) => {
1910
- const { pages: t, required: r } = e, { avStream: n, currentPage: i } = Se.getState();
1911
- if (i === void 0) return null;
1912
- switch (i == null ? void 0 : i.type) {
1913
- case "av_permission": {
1914
- const o = bi(n, i);
1915
- return o === zt ? l(Zo, { content: i }, void 0, 0, { fileName: A, lineNumber: 335, columnNumber: 16 }, void 0) : o === pi ? l(Go, { content: i, pages: t, required: r }, void 0, 0, { fileName: A, lineNumber: 338, columnNumber: 11 }, void 0) : l(Yo, { content: i, pages: t, required: r }, void 0, 0, { fileName: A, lineNumber: 346, columnNumber: 11 }, void 0);
1916
- }
1917
- case "screen_permission":
1918
- return l(Wo, { content: i, pages: t, required: r }, void 0, 0, { fileName: A, lineNumber: 356, columnNumber: 9 }, void 0);
1919
- case "start_task":
1920
- return l(zo, { content: i, pages: t, required: r }, void 0, 0, { fileName: A, lineNumber: 364, columnNumber: 9 }, void 0);
1921
- case "complete_task":
1922
- return l(Qo, { content: i, pages: t, properties: e }, void 0, 0, { fileName: A, lineNumber: 372, columnNumber: 9 }, void 0);
1923
- default:
1924
- return null;
1925
- }
1926
- };
1927
- var vt = "/Users/toben/git-local/sdk/platform/web/src/view/cards/recordedTask/card.tsx";
1928
- const Xo = ({ className: e, properties: t, next: r, questionId: n }) => {
1929
- const i = V(), { surveyId: o, responseGroupUid: a, userId: s } = i, c = Se(), { screenPermissionRequested: m } = c, d = Se((g) => g.avStream);
1930
- let u = Se((g) => g.currentPage);
1931
- u || (u = function({ pages: g, userId: h, responseGroupUid: k, surveyId: N, questionId: w, next: C }) {
1932
- const { updatePage: x } = Se.getState(), { eventEmitFn: T, recorderEventEmitter: y } = V.getState(), L = { questionId: w, surveyId: N, visitorId: h, responseGroupUid: k };
1933
- let I = 0;
1934
- y.emit("recorded.task.permission.screen"), T("recorded.task.permission.screen"), y.emit("permission.status", { "permission.status.callback": (v, _, S, M) => {
1935
- const R = g[I], { type: E } = R, U = ["screen"];
1936
- if (kt(R)) {
1937
- const { permissionDescriptors: B } = R, W = B == null ? void 0 : B.includes("microphone"), Y = B == null ? void 0 : B.includes("camera");
1938
- W && U.push("audio"), Y && U.push("video"), (v != null && v.active && !Y || v != null && v.active && _) && I++;
1939
- }
1940
- en(g[I]) && S && (I++, y.emit("begin.recording", { "recording.media.types": U, "start.recording.callback": (B) => x({ mediaRecordingUids: B }) })), x({ currentPage: g[I], avStream: v, screenPermissionRequested: S, nextQuestion: C, type: E, passthroughData: L, recordingMediaTypes: U, captureStream: M });
1941
- } });
1942
- const P = g[I];
1943
- return P.type === "av_permission" && Qt({ currentPage: P, pages: g }), P;
1944
- }({ questionId: n, surveyId: o, next: (g) => {
1945
- r(g, !0);
1946
- }, pages: t.pages, responseGroupUid: a, userId: s }));
1947
- let f = u.headline, b = u.captionText;
1948
- const p = bi(d, u);
1949
- return en(u) && m && (f = u.permissionDeniedHeadline, b = u.permissionDeniedCaptionText), kt(u) && p === fi && (f = u.permissionGrantedHeadline, b = u.permissionGrantedCaptionText), l("div", { className: D(e, "ul-center-horizontally", "fade-in-transition"), children: [l(ye, { message: f, properties: { captionText: b } }, void 0, 0, { fileName: vt, lineNumber: 73, columnNumber: 7 }, void 0), l(Pe, { children: l(Jo, { properties: t }, void 0, 0, { fileName: vt, lineNumber: 75, columnNumber: 9 }, void 0) }, void 0, 0, { fileName: vt, lineNumber: 74, columnNumber: 7 }, void 0)] }, void 0, 0, { fileName: vt, lineNumber: 66, columnNumber: 5 }, void 0);
1950
- };
1951
- var Ni = ((e) => (e.CONTINUE = "CONTINUE", e.EXTERNAL = "EXTERNAL", e.NO_BUTTON = "NO_BUTTON", e))(Ni || {});
1952
- const el = { "{{user_id}}": "externalUserId", "{{email}}": "email" };
1953
- var ge = "/Users/toben/git-local/sdk/platform/web/src/view/cards/textUrlPromptCard.tsx";
1954
- const tl = ({ className: e, message: t, next: r, properties: n, questionId: i, type: o }) => {
1955
- const { visitorAttributes: a, isLongFormSurvey: s } = V((p) => ({ visitorAttributes: p.visitorAttributes, isLongFormSurvey: le(p.studyType) })), c = (p, g = !1) => {
1956
- r({ value: g ? { skipped: !0 } : void 0, questionId: i, type: o }, !0);
1957
- }, m = (p) => {
1958
- p.key !== "Enter" && p.key !== " " || r({ value: void 0, questionId: i, type: o }, !0);
1959
- }, d = ((p, g = {}) => {
1960
- if (!p) return p;
1961
- try {
1962
- /^https?:\/\//i.test(p) || (p = `http://${p}`);
1963
- const C = new URL(p);
1964
- if (!C.protocol || C.protocol !== "http:" && C.protocol !== "https:") return;
1965
- } catch {
1966
- return;
1967
- }
1968
- let h = p;
1969
- const k = [];
1970
- for (const [C, x] of Object.entries(el)) if (h.toLowerCase().includes(C)) if (g[x]) {
1971
- const T = new RegExp(C, "gi");
1972
- h = h.replace(T, g[x]);
1973
- } else k.push(C);
1974
- if (k.length === 0 || !h.includes("?")) return h;
1975
- const N = h.slice(0, h.indexOf("?")), w = h.slice(h.indexOf("?") + 1).split("&").map((C) => C.split("=")).filter((C) => !k.includes(C[1]));
1976
- return w.length === 0 ? N : `${N}?${w.map((C) => C.join("=")).join("&")}`;
1977
- })(n && n.buttonUrl, a), u = s && n.promptActionType === Ni.NO_BUTTON ? () => l(K, {}, void 0) : () => l(Ue, { children: l("div", { className: "ul-card-button-group", children: [l("a", { className: "ul-card-text__button ul-card__text-url-prompt-button", href: d, id: "ul-card-text__button", onClick: c, onKeyPress: m, rel: "noreferrer", role: d ? "link" : "button", tabIndex: 0, target: "_blank", children: $e(n) }, void 0, 0, { fileName: ge, lineNumber: 81, columnNumber: 13 }, void 0), n.required === !1 && l("button", { className: "ul-card-skip__button", onClick: (p) => c(0, !0), children: ai(n) }, void 0, 0, { fileName: ge, lineNumber: 95, columnNumber: 15 }, void 0)] }, void 0, 0, { fileName: ge, lineNumber: 80, columnNumber: 11 }, void 0) }, void 0, 0, { fileName: ge, lineNumber: 79, columnNumber: 9 }, void 0);
1978
- return l("div", { className: D(e, "ul-card__text-url-prompt", "fade-in-transition"), children: [l(ye, { message: t, properties: { questionHtml: n.questionHtml } }, void 0, 0, { fileName: ge, lineNumber: 116, columnNumber: 7 }, void 0), l(Pe, { children: (f = n == null ? void 0 : n.richTextBody, b = n == null ? void 0 : n.body, f ? l("div", { className: "ul-rich-text-body", dangerouslySetInnerHTML: { __html: f }, id: "ul-card__text-url-body-container" }, void 0, 0, { fileName: ge, lineNumber: 48, columnNumber: 9 }, void 0) : b ? l("div", { className: "ul-rich-text-body", id: "ul-card__text-url-body-container", children: (b ? b.split(/\n\s*\n/g) : []).map((p, g) => l("p", { children: p }, g, 0, { fileName: ge, lineNumber: 61, columnNumber: 20 }, void 0)) }, void 0, 0, { fileName: ge, lineNumber: 58, columnNumber: 7 }, void 0) : null) }, void 0, 0, { fileName: ge, lineNumber: 120, columnNumber: 7 }, void 0), l(Oe, { defaultBody: u, properties: n }, void 0, 0, { fileName: ge, lineNumber: 123, columnNumber: 7 }, void 0)] }, i, 0, { fileName: ge, lineNumber: 108, columnNumber: 5 }, void 0);
1979
- var f, b;
1980
- };
1981
- var we = "/Users/toben/git-local/sdk/platform/web/src/view/cards/thanksCard.tsx";
1982
- const rl = ({ className: e, questionId: t }) => {
1983
- const { border: r, destroy: n, endCard: i, forceBrandedLogo: o } = V((c) => ({ border: c.border, destroy: c.destroy, endCard: c.endCard, forceBrandedLogo: c.forceBrandedLogo }));
1984
- Q(() => {
1985
- setTimeout(() => {
1986
- n(We);
1987
- }, o ? 4e3 : 2e3);
1988
- }, [n, o]);
1989
- const a = i && i.subheader ? l("p", { className: "ul-caption", children: i.subheader }, void 0, 0, { fileName: we, lineNumber: 30, columnNumber: 7 }, void 0) : null, s = i && i.headline ? i.headline : "";
1990
- return l("div", { className: D(e, "ul-card--thanks", "fade-in-transition"), children: l("div", { children: l("div", { className: "ul-card--thanks-content", children: [l("div", { className: "ul-thanks-check", children: l("svg", { "aria-labelledby": "title", fill: "none", height: "99", viewBox: "0 0 81 99", width: "81", xmlns: "http://www.w3.org/2000/svg", children: [l("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: r, fillRule: "evenodd" }, void 0, 0, { fileName: we, lineNumber: 54, columnNumber: 15 }, void 0), l("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: r, fillRule: "evenodd" }, void 0, 0, { fileName: we, lineNumber: 60, columnNumber: 15 }, void 0), l("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" }, void 0, 0, { fileName: we, lineNumber: 66, columnNumber: 15 }, void 0)] }, void 0, 0, { fileName: we, lineNumber: 46, columnNumber: 13 }, void 0) }, void 0, 0, { fileName: we, lineNumber: 45, columnNumber: 11 }, void 0), l(ye, { message: s }, void 0, 0, { fileName: we, lineNumber: 73, columnNumber: 11 }, void 0), a] }, void 0, 0, { fileName: we, lineNumber: 44, columnNumber: 9 }, void 0) }, void 0, 0, { fileName: we, lineNumber: 43, columnNumber: 7 }, void 0) }, t, 0, { fileName: we, lineNumber: 35, columnNumber: 5 }, void 0);
1991
- };
1992
- var Te = "/Users/toben/git-local/sdk/platform/web/src/view/cards/uploadingCard.tsx";
1993
- const nl = ({ className: e }) => {
1994
- const { uploadProgress: t } = V((o) => ({ uploadProgress: o.uploadProgress }));
1995
- let r, n;
1996
- Object.values(t).filter((o) => o.isSubmitted).length > 1 ? (r = "Your responses are processing", n = "Please keep this tab open until your responses are fully processed.") : (r = "Your response is processing", n = "Please keep this tab open until your response is fully processed.");
1997
- const i = Math.round(Math.min(99, ...Object.values(t).filter((o) => o.isSubmitted).map((o) => o.progressPct || 0)));
1998
- return l("div", { className: D(e, "ul-card--uploading", "fade-in-transition"), children: [l("div", { "aria-busy": "true", "aria-label": "Processing...", "aria-live": "polite", className: "ul-loading-spinner-container", role: "progressbar", children: l("div", { className: "ul-loading-spinner", children: [l("div", { className: "first" }, void 0, 0, { fileName: Te, lineNumber: 55, columnNumber: 11 }, void 0), l("div", { className: "second" }, void 0, 0, { fileName: Te, lineNumber: 56, columnNumber: 11 }, void 0), l("div", { className: "third" }, void 0, 0, { fileName: Te, lineNumber: 57, columnNumber: 11 }, void 0), l("div", { className: "fourth" }, void 0, 0, { fileName: Te, lineNumber: 58, columnNumber: 11 }, void 0)] }, void 0, 0, { fileName: Te, lineNumber: 54, columnNumber: 9 }, void 0) }, void 0, 0, { fileName: Te, lineNumber: 47, columnNumber: 7 }, void 0), l(ye, { message: `${r} (${i}% complete)` }, void 0, 0, { fileName: Te, lineNumber: 61, columnNumber: 7 }, void 0), l("p", { className: "ul-caption", children: n }, void 0, 0, { fileName: Te, lineNumber: 62, columnNumber: 7 }, void 0)] }, void 0, 0, { fileName: Te, lineNumber: 40, columnNumber: 5 }, void 0);
1999
- };
2000
- var tt = "/Users/toben/git-local/sdk/platform/web/src/view/footer.tsx";
2001
- const il = () => {
2002
- var k;
2003
- const { border: e, cards: t, forceBrandedLogo: r, headers: n, index: i, marketingUrl: o, showSurveyBrand: a, slugName: s, surveyId: c, viewedCardCount: m } = V((N) => ({ border: N.border, cards: N.cards, forceBrandedLogo: N.forceBrandedLogo, headers: N.headers, index: N.index, marketingUrl: N.marketingUrl, showSurveyBrand: N.showSurveyBrand, slugName: N.slugName, surveyId: N.surveyId, viewedCardCount: N.viewedCardCount })), d = q(X(null), "progressRef"), u = t.filter((N) => N.type !== "uploading" && N.type !== "thanks"), f = ((N, w) => {
2004
- const C = /* @__PURE__ */ new Set(["thanks", "uploading"]);
2005
- if (w >= N.length || w < 0 || C.has(N[w].type)) return 0;
2006
- const x = N.filter((y) => !C.has(y.type));
2007
- if (w === x.length - 1) return 1;
2008
- const T = { [x.length - 1]: 1, [-1]: 0 };
2009
- for (let y = x.length - 2; y >= w; y--) {
2010
- const L = x[y], I = mo(y, L.props.routingOptions);
2011
- if (I.length === 0) {
2012
- T[y] = T[y + 1] + 1;
2013
- continue;
2014
- }
2015
- let P = 0, v = so(L);
2016
- if (v === null) return x.length - 1 - w;
2017
- for (let _ = 0; _ < I.length && v.length !== 0; _++) {
2018
- const { comparator: S, target: M, value: R } = I[_], E = v.filter((U) => {
2019
- const B = ao({ value: U }, L.type, U), W = Kn(U, L.type);
2020
- return !(B && S === "answered" || W && S === "partial" || !B && !W && S === "skipped" || S === "given_up" && co(U) && U.taskStatus === "given.up" || B && L.type === "open" && (S === "contains" || S === "notcontains") || B && uo(S) && or[S](U, R));
2021
- });
2022
- if (E.length < v.length) {
2023
- const U = parseInt(String(M), 10);
2024
- if (U !== -1 && U <= y || U >= x.length) return x.length - 1 - w;
2025
- P = Math.max(T[U] + 1, P);
2026
- }
2027
- v = E;
2028
- }
2029
- v.length > 0 && (P = Math.max(T[y + 1] + 1, P)), T[y] = P;
2030
- }
2031
- return T[w];
2032
- })(t, i), b = m + 1, p = b / (b + f), g = si({ marketingUrl: o, slugName: s, surveyId: c, forceBrandedLogo: r });
2033
- Q(() => {
2034
- d.current && (d.current.style.width = 100 * p + "%");
2035
- }, [p]);
2036
- const h = ((k = t[i]) == null ? void 0 : k.type) === "thanks";
2037
- return l("footer", { className: "ul-footer " + (n["userleap-platform"] === "link" ? "ul-footer__link" : ""), children: h && r ? l(li, { marketingUrlLink: g }, void 0, 0, { fileName: tt, lineNumber: 95, columnNumber: 9 }, void 0) : l(K, { children: [u.length > 1 && l("div", { className: "ul-progress-bar-container ul-progress-bar-container__footer", children: l("div", { className: "ul-progress-bar-current", ref: d, style: { border: `1px solid ${e || "#000"}` } }, void 0, 0, { fileName: tt, lineNumber: 67, columnNumber: 13 }, void 0) }, void 0, 0, { fileName: tt, lineNumber: 66, columnNumber: 11 }, void 0), a ? l(oi, { forceBrandedLogo: r, marketingUrlLink: g }, void 0, 0, { fileName: tt, lineNumber: 78, columnNumber: 11 }, void 0) : null] }, void 0) }, void 0, 0, { fileName: tt, lineNumber: 89, columnNumber: 5 }, void 0);
2038
- };
2039
- var rn = "/Users/toben/git-local/sdk/platform/web/src/view/progressBar.tsx";
2040
- const ol = () => {
2041
- const e = V((a) => a.border), t = V((a) => a.cards), r = V((a) => a.index), n = V((a) => a.focusedQuestionId), { totalQuestions: i, fraction: o } = q(Ne(() => {
2042
- var m;
2043
- const a = t.filter((d) => d.type !== "uploading" && d.type !== "thanks"), s = a.length;
2044
- if (s <= 1) return { totalQuestions: s, fraction: 0 };
2045
- if (((m = t[r]) == null ? void 0 : m.type) === "thanks") return { totalQuestions: s, fraction: 1 };
2046
- const c = a.findIndex((d) => d.name === n);
2047
- return { totalQuestions: s, fraction: (c >= 0 ? c : 0) / s };
2048
- }, [t, r, n]), "totalQuestions");
2049
- return i <= 1 ? null : l("div", { className: "ul-progress-bar-container ul-progress-bar-container__header", children: l("div", { className: "ul-progress-bar-current", style: { width: 100 * o + "%", border: `1px solid ${e ?? "#000"}` } }, void 0, 0, { fileName: rn, lineNumber: 33, columnNumber: 7 }, void 0) }, void 0, 0, { fileName: rn, lineNumber: 32, columnNumber: 5 }, void 0);
2050
- };
2051
- var fe = "/Users/toben/git-local/sdk/platform/web/src/view/app.tsx";
2052
- const ll = () => {
2053
- const { answers: e, border: t, cards: r, close: n, configureExitOnOverlayClick: i, destroy: o, endCard: a, eventEmitFn: s, fontFamily: c, headers: m, index: d, minScrollableHeight: u, next: f, previewMode: b, productConfig: p, seen: g, showStripes: h, studyType: k, surveyId: N, update: w, useMobileStyling: C, viewDocument: x } = V((E) => ({ answers: E.answers, border: E.border, cards: E.cards, close: E.close, configureExitOnOverlayClick: E.configureExitOnOverlayClick, destroy: E.destroy, endCard: E.endCard, eventEmitFn: E.eventEmitFn, fontFamily: E.fontFamily, headers: E.headers, index: E.index, previewMode: E.previewMode, productConfig: E.productConfig, minScrollableHeight: E.minScrollableHeight, next: E.next, seen: E.seen, showStripes: E.showStripes, studyType: E.studyType, surveyId: E.surveyId, update: E.update, useMobileStyling: E.useMobileStyling, viewDocument: E.viewDocument })), T = q(X(null), "appRef"), y = q(X(!1), "firedAppeared"), L = m["userleap-platform"], { props: I, type: P, name: v } = r[d];
2054
- Q(() => {
2055
- if (window.Sprig) return window.Sprig.trackHistory = (E) => V.getState().trackHistory(E), () => {
2056
- window.Sprig.trackHistory = void 0;
2057
- };
2058
- }, []), Q(() => {
2059
- T.current && (T.current.classList.contains("ul-app--visible") || T.current.classList.add("ul-app--visible"), !y.current && s && (y.current = !0, s(ce.SurveyAppeared, { name: ce.SurveyAppeared, "survey.id": N })));
2060
- }, [s, N]), Q(() => {
2061
- const E = () => {
2062
- x.visibilityState === "visible" && (g(), x.removeEventListener("visibilitychange", E));
2063
- };
2064
- return x.addEventListener("visibilitychange", E), E(), () => {
2065
- x.removeEventListener("visibilitychange", E);
2066
- };
2067
- }, [g, x]), Q(() => {
2068
- w();
2069
- }, [d, w]), Q(() => {
2070
- i(() => n());
2071
- }, [n, i]);
2072
- const _ = q(Ne(() => Ei(r, d), [r, d]), "groupedCards"), S = mi(r), M = Fe((E) => {
2073
- f({ data: E, completeSurvey: () => o(We), endCard: a }), Ii(x);
2074
- }, [f, o, a, x]);
2075
- if (e) {
2076
- for (const E of e) if (E.questionId === v) {
2077
- let U;
2078
- if (P === "multiplechoice") {
2079
- const B = I.options.find(({ value: W }) => W === E.value);
2080
- if (!B) break;
2081
- U = { [B.id]: B.value };
2082
- } else U = E.value;
2083
- M({ value: U, type: P, questionId: E.questionId });
2084
- break;
2085
- }
2086
- }
2087
- const R = !C && ((p == null ? void 0 : p.framePosition) === "center" || (p == null ? void 0 : p.desktopDisplay) === "center-modal" || ((p == null ? void 0 : p.placement) || "").includes("center"));
2088
- return l("div", { className: D("ul-app", Nt(m) ? "ul-app--visible" : "ul-app--overlay"), dir: "auto", id: We, onClick: (E) => {
2089
- var Y;
2090
- const U = window.sprigAPI, B = E.target;
2091
- if (!U || !B) return;
2092
- const W = [B, B.parentElement];
2093
- for (const se of W) if (((Y = se == null ? void 0 : se.tagName) == null ? void 0 : Y.toLowerCase()) === "a") {
2094
- E.preventDefault();
2095
- try {
2096
- const re = new URL(se.href);
2097
- re.protocol !== "http:" && re.protocol !== "https:" || (U == null || U.openUrl(re.toString()));
2098
- } catch (re) {
2099
- console.error(re);
2100
- }
2101
- return;
2102
- }
2103
- }, ref: T, style: { "--theme": t, ...c ? { fontFamily: c.replace(";", "") } : {}, ...R ? { position: "relative" } : {} }, children: l("div", { className: "ul-app__container", children: l("div", { className: D(te("ul-card__container", C, k)), style: { ...k !== "feedbackButton" || (p == null ? void 0 : p.desktopDisplay) === "center-modal" ? { borderColor: t } : {}, ...(p == null ? void 0 : p.desktopDisplay) === "slider" ? { margin: "0px" } : {} }, children: l("div", { className: "sprig-container", style: { minHeight: u }, children: [h && l("div", { className: "ul-header__container", dir: "ltr", children: l("div", { className: "ul-header", children: "For development purposes only" }, void 0, 0, { fileName: fe, lineNumber: 238, columnNumber: 17 }, void 0) }, void 0, 0, { fileName: fe, lineNumber: 237, columnNumber: 15 }, void 0), b && l("div", { className: "ul-header__container", dir: "ltr", children: l("div", { className: "ul-header", children: "Preview Mode: Response will not be recorded." }, void 0, 0, { fileName: fe, lineNumber: 243, columnNumber: 17 }, void 0) }, void 0, 0, { fileName: fe, lineNumber: 242, columnNumber: 15 }, void 0), le(k) && l(ol, {}, void 0, 0, { fileName: fe, lineNumber: 248, columnNumber: 45 }, void 0), l("div", { className: D(vo("ul-card-main-content", L)), children: l($o, { cards: _, next: M, previousResponses: S }, void 0, 0, { fileName: fe, lineNumber: 252, columnNumber: 15 }, void 0) }, void 0, 0, { fileName: fe, lineNumber: 249, columnNumber: 13 }, void 0), !le(k) && l(il, {}, void 0, 0, { fileName: fe, lineNumber: 258, columnNumber: 46 }, void 0)] }, void 0, 0, { fileName: fe, lineNumber: 230, columnNumber: 11 }, void 0) }, void 0, 0, { fileName: fe, lineNumber: 212, columnNumber: 9 }, void 0) }, void 0, 0, { fileName: fe, lineNumber: 211, columnNumber: 7 }, void 0) }, void 0, 0, { fileName: fe, lineNumber: 196, columnNumber: 5 }, void 0);
2104
- }, yi = () => MediaRecorder.isTypeSupported("video/webm") ? "video/webm" : "video/mp4", nn = (e) => {
2105
- const t = { audioBitsPerSecond: 128e3, videoBitsPerSecond: 25e5, mimeType: yi() };
2106
- return new MediaRecorder(e, t);
2107
- }, on = (e, t, r) => {
2108
- r[t] = [], e.ondataavailable = function(n) {
2109
- r[t].push(n.data);
2110
- }, e.currentMediaRecordingUid = t, e.start();
2111
- };
2112
- function ln(e, t, r, n, i, o) {
2113
- if (e && e.state !== "inactive") {
2114
- const { "begin.callback": a } = n, s = e.currentMediaRecordingUid;
2115
- if (!s) return;
2116
- a && a(s), e.onstop = () => async function(c, m, d, u, f, b, p) {
2117
- const g = V.getState().viewDocument, { "upload.callback": h, "progress.callback": k } = u, N = { mediaType: d, updatedAt: (/* @__PURE__ */ new Date()).toISOString(), mediaRecordingUid: f, ...u["passthrough.data"] }, w = await (async (y, L) => {
2118
- var P;
2119
- const I = await fetch(L, { method: "POST", cache: "no-cache", headers: { "Content-Type": "application/json" }, body: JSON.stringify(y) });
2120
- if (I.ok) {
2121
- const v = await I.json();
2122
- return (P = v == null ? void 0 : v.upload) == null ? void 0 : P.url;
2123
- }
2124
- return null;
2125
- })(N, c);
2126
- if (!w) return void (h && h(null, { message: "failed to get upload url" }));
2127
- const C = new Blob(p, { type: yi() });
2128
- if (!g.defaultView) return;
2129
- const x = new g.defaultView.File([C], `recording video ${Date.now()}`), T = b.createUpload({ endpoint: w, file: x, chunkSize: 5120 });
2130
- T.on("error", (y) => {
2131
- h && h(null, y);
2132
- }), T.on("progress", (y) => {
2133
- k && k(f, y);
2134
- }), T.on("success", () => {
2135
- h && h(f, !0);
2136
- });
2137
- }(t, 0, r, n, s, i, o), e.stop();
2138
- }
2139
- }
2140
- const al = { state: { chunks: {} }, stopRecording(e) {
2141
- const { uploadApiEndpoint: t, avRecorder: r, screenRecorder: n, UpChunk: i } = this.state, o = this.state.avStream && this.state.avStream.getVideoTracks().length > 0 ? "video" : "audio";
2142
- this.state.chunks && t && i && (r != null && r.currentMediaRecordingUid && ln(r, t, o, e, i, this.state.chunks[r == null ? void 0 : r.currentMediaRecordingUid]), n != null && n.currentMediaRecordingUid && ln(n, t, "screen", e, i, this.state.chunks[n == null ? void 0 : n.currentMediaRecordingUid]));
2143
- }, handleCancelledStream(e) {
2144
- const t = e.getVideoTracks(), r = e.getAudioTracks();
2145
- let n = t.length && t[0];
2146
- n = n || r.length && r[0], n && n.addEventListener("ended", () => {
2147
- [this.state.avRecorder, this.state.screenRecorder].map((i) => {
2148
- i && (i.state === "recording" && i.stop(), i.stream.getTracks().map((o) => {
2149
- o.readyState === "live" && o.stop();
2150
- }));
2151
- }), Object.assign(this.state, { avStream: null, captureStream: null, avRecorder: null, screenRecorder: null });
2152
- });
2153
- }, taskDurationMillisecond() {
2154
- return this.state.startTime ? (/* @__PURE__ */ new Date()).getTime() - this.state.startTime.getTime() : 0;
2155
- }, setUpChunk(e) {
2156
- this.state.UpChunk = e;
2157
- }, configure(e, t) {
2158
- Object.assign(this.state, t), this.state.uploadApiEndpoint = `${t.apiURL}/2/environments/integrations/upload`, this.state.chunks = {}, e.on("permission.status", this.permissionStatusCallback.bind(this)), e.on("av.permission", async (r) => {
2159
- this.avPermissionCallback(r);
2160
- }), e.on("begin.recording", this.beginRecordingCallback.bind(this)), e.on("start.task", this.startTaskCallback.bind(this)), e.on("screen.permission", async (r) => {
2161
- this.screenPermissionCallback(r);
2162
- }), e.on("finish.task", async (r) => {
2163
- this.finishTaskCallback(r);
2164
- });
2165
- }, async avPermissionCallback(e) {
2166
- var n, i, o;
2167
- const { "stream.ready": t, "permission.descriptors": r } = e;
2168
- try {
2169
- (n = this.state.avStream) != null && n.active && (this.state.avStream.getTracks().map((a) => a.readyState === "live" && a.stop()), ((i = this.state.captureStream) == null ? void 0 : i.getAudioTracks().length) === 1 && this.state.captureStream.removeTrack(this.state.captureStream.getAudioTracks()[0])), this.state.avStream = await navigator.mediaDevices.getUserMedia({ video: r.includes("camera"), audio: !0 }), ((o = this.state.captureStream) == null ? void 0 : o.getAudioTracks().length) === 0 && this.state.captureStream.addTrack(this.state.avStream.getAudioTracks()[0]), this.handleCancelledStream(this.state.avStream);
2170
- } catch (a) {
2171
- return console.warn("Error: failed to get permissions: " + a), void (t && t(null, null));
2172
- }
2173
- t && t(this.state.avStream, this.state.captureStream);
2174
- }, async screenPermissionCallback(e) {
2175
- const { "screen.permission.requested": t, "stream.ready.callback": r } = e;
2176
- t == null || t(!0);
2177
- try {
2178
- this.state.captureStream = await navigator.mediaDevices.getDisplayMedia({ video: !0, cursor: "always", displaySurface: "browser", preferCurrentTab: !0 });
2179
- } catch (n) {
2180
- return t == null || t(!1), console.warn("Error: failed to get permissions: " + n), void (r && r(null, null));
2181
- }
2182
- t == null || t(!1), this.state.avStream && this.state.avStream.getAudioTracks().length > 0 && this.state.captureStream.addTrack(this.state.avStream.getAudioTracks()[0]), this.handleCancelledStream(this.state.captureStream), r && r(this.state.avStream || null, this.state.captureStream);
2183
- }, beginRecordingCallback(e) {
2184
- const { "recording.media.types": t, "start.recording.callback": r = () => {
2185
- } } = e;
2186
- if (!t) return;
2187
- const n = [];
2188
- if (t.includes("video") && this.state.avStream) {
2189
- this.state.avRecorder = nn(this.state.avStream);
2190
- const i = dr();
2191
- on(this.state.avRecorder, i, this.state.chunks), n.push(i);
2192
- }
2193
- if (t.includes("screen") && this.state.captureStream) {
2194
- this.state.screenRecorder = nn(this.state.captureStream);
2195
- const i = dr();
2196
- on(this.state.screenRecorder, i, this.state.chunks), n.push(i);
2197
- }
2198
- n && r && r(n);
2199
- }, async finishTaskCallback(e) {
2200
- const { "current.index": t, "task.response": r, "task.complete.callback": n } = e;
2201
- await this.stopRecording(e), n && n(this.taskDurationMillisecond()), this.state.cards && this.state.hasEndCard !== void 0 && this.lookAheadAndStopStream(t, r, this.state.cards, this.state.hasEndCard);
2202
- }, startTaskCallback() {
2203
- this.state.startTime = /* @__PURE__ */ new Date();
2204
- }, permissionStatusCallback(e) {
2205
- var n;
2206
- const { "permission.status.callback": t } = e, r = this.state.avStream;
2207
- t && t(r, !!r && (r == null ? void 0 : r.getVideoTracks().length) > 0, !!((n = this.state.captureStream) != null && n.active), this.state.captureStream);
2208
- }, lookAheadAndStopStream(e, t, r, n) {
2209
- const { avRecorder: i, screenRecorder: o } = this.state, { allResponses: a } = V.getState(), s = Yn({ cards: r, index: e, hasEndCard: n, allResponses: a });
2210
- s !== null && r[s].type === "recordedtask" || [i, o].map((c) => {
2211
- c && (c.state === "recording" && c.stop(), c.stream.getTracks().map((m) => {
2212
- m.readyState === "live" && m.stop();
2213
- }));
2214
- });
2215
- } }, Zt = Object.create(al);
2216
- Object.freeze(Zt);
2217
- const sl = ({ mode: e = null, viewWindow: t, viewDocument: r, trackPageViewUrl: n }) => {
2218
- const i = r.documentElement;
2219
- let o;
2220
- try {
2221
- o = t.parent.location.href;
2222
- } catch {
2223
- o = t.location.href;
2224
- }
2225
- return { mode: e, sw: t.screen.width, sh: t.screen.height, cw: i.clientWidth, ch: i.clientHeight, p: n ?? o, l: t.navigator.language };
2226
- }, cl = { configure: function(e, t = !0) {
2227
- var k;
2228
- const { answers: r, apiURL: n, endCard: i, eventEmitFn: o, fontFamilyURL: a, frame: s, previewKey: c, viewDocument: m, viewWindow: d } = e, u = Nt(e.headers) ? e.frame : m.body, f = e.UpChunk || window.UpChunk, b = rt, p = ((N, w) => {
2229
- const C = [...N], x = /* @__PURE__ */ new Set(["videovoice", "recordedtask"]);
2230
- return N.some((T) => x.has(T.type)) && C.push({ name: -2, props: { routingOptions: [] }, type: "uploading" }), w && C.push({ name: -1, props: { routingOptions: [] }, type: "thanks" }), C;
2231
- })(e.cards, !!i);
2232
- Zt.configure(b, { cards: p, hasEndCard: !!i, apiURL: n, UpChunk: f }), V.setState({ apiURL: n, answers: r, border: e.border, index: e.startingQuestionIdx || 0, cards: p, configureExitOnOverlayClick: e.configureExitOnOverlayClick, customMetadata: e.customMetadata, endCard: e.endCard, envId: e.envId, eventEmitFn: o, fontFamily: e.fontFamily, forceBrandedLogo: e.forceBrandedLogo, frame: s, headers: e.headers, hasViewedEmbed: !1, isPreview: e.isPreview, marketingUrl: "https://sprig.com", meta: sl({ mode: e.mode, viewWindow: d, viewDocument: m, trackPageViewUrl: e.trackPageViewUrl }), mode: e.mode, previewKey: c, previewMode: e.previewMode, productConfig: e.productConfig, recorder: Zt, recorderEventEmitter: b, 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 });
2233
- const { head: g } = m;
2234
- if (mr({ document: m, 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;transition:none}.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;pointer-events:none}.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;pointer-events:auto}.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 && mr({ document: m, elementId: "ul-custom-style", styleString: e.customStyles, nonce: e.styleNonce }), e.fontFamily && a && parent) {
2235
- const N = m.createElement("link");
2236
- N.rel = "stylesheet", N.href = a, g.appendChild(N);
2237
- }
2238
- const h = o || ((k = s.eventEmitter) == null ? void 0 : k.emit);
2239
- h == null || h("verify.view.version", { "view.version": "2.36.1" }), u && t && (Ge(l(ll, {}, void 0, 0, { fileName: "/Users/toben/git-local/sdk/platform/web/src/view/view.tsx", lineNumber: 203, columnNumber: 12 }, this), u), rt.once(ce.SurveyClosed, () => {
2240
- nr(u);
2241
- }));
2242
- } };
2243
- export {
2244
- cl as default
2245
- };