motion-surveyjs-ui 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,17 +1,17 @@
1
- import Re, { useEffect as ie, useState as G, forwardRef as Se, createElement as je, useRef as oe, useMemo as pe, useReducer as ve } from "react";
2
- import { Question as ue, Model as Ee } from "survey-core";
3
- import { useAnimationControls as Ie, motion as y, AnimatePresence as D, useDragControls as Pe, Reorder as _e } from "motion/react";
4
- import * as fe from "@radix-ui/react-label";
5
- import * as V from "@radix-ui/react-radio-group";
6
- import * as ce from "@radix-ui/react-checkbox";
7
- import * as $ from "@radix-ui/react-select";
8
- var le = { exports: {} }, K = {};
9
- var ge;
10
- function Ae() {
11
- if (ge) return K;
12
- ge = 1;
1
+ import Me, { useEffect as me, useState as J, forwardRef as Ee, createElement as pe, useRef as he, useMemo as ye, useReducer as be } from "react";
2
+ import { Question as je, Model as Oe } from "survey-core";
3
+ import { useAnimationControls as De, motion as v, AnimatePresence as V, useDragControls as Fe, Reorder as ge } from "motion/react";
4
+ import * as ve from "@radix-ui/react-label";
5
+ import * as H from "@radix-ui/react-radio-group";
6
+ import * as xe from "@radix-ui/react-checkbox";
7
+ import * as D from "@radix-ui/react-select";
8
+ var de = { exports: {} }, ae = {};
9
+ var Ne;
10
+ function Be() {
11
+ if (Ne) return ae;
12
+ Ne = 1;
13
13
  var n = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
14
- function a(r, i, o) {
14
+ function a(s, i, o) {
15
15
  var c = null;
16
16
  if (o !== void 0 && (c = "" + o), i.key !== void 0 && (c = "" + i.key), "key" in i) {
17
17
  o = {};
@@ -20,258 +20,258 @@ function Ae() {
20
20
  } else o = i;
21
21
  return i = o.ref, {
22
22
  $$typeof: n,
23
- type: r,
23
+ type: s,
24
24
  key: c,
25
25
  ref: i !== void 0 ? i : null,
26
26
  props: o
27
27
  };
28
28
  }
29
- return K.Fragment = t, K.jsx = a, K.jsxs = a, K;
29
+ return ae.Fragment = t, ae.jsx = a, ae.jsxs = a, ae;
30
30
  }
31
- var q = {};
32
- var ye;
33
- function Le() {
34
- return ye || (ye = 1, process.env.NODE_ENV !== "production" && (function() {
35
- function n(s) {
36
- if (s == null) return null;
37
- if (typeof s == "function")
38
- return s.$$typeof === de ? null : s.displayName || s.name || null;
39
- if (typeof s == "string") return s;
40
- switch (s) {
31
+ var se = {};
32
+ var ke;
33
+ function Ve() {
34
+ return ke || (ke = 1, process.env.NODE_ENV !== "production" && (function() {
35
+ function n(l) {
36
+ if (l == null) return null;
37
+ if (typeof l == "function")
38
+ return l.$$typeof === q ? null : l.displayName || l.name || null;
39
+ if (typeof l == "string") return l;
40
+ switch (l) {
41
41
  case b:
42
42
  return "Fragment";
43
43
  case k:
44
44
  return "Profiler";
45
45
  case g:
46
46
  return "StrictMode";
47
- case z:
47
+ case K:
48
48
  return "Suspense";
49
- case I:
49
+ case P:
50
50
  return "SuspenseList";
51
- case Q:
51
+ case O:
52
52
  return "Activity";
53
53
  }
54
- if (typeof s == "object")
55
- switch (typeof s.tag == "number" && console.error(
54
+ if (typeof l == "object")
55
+ switch (typeof l.tag == "number" && console.error(
56
56
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
57
- ), s.$$typeof) {
58
- case v:
57
+ ), l.$$typeof) {
58
+ case p:
59
59
  return "Portal";
60
- case C:
61
- return s.displayName || "Context";
62
- case E:
63
- return (s._context.displayName || "Context") + ".Consumer";
64
- case B:
65
- var _ = s.render;
66
- return s = s.displayName, s || (s = _.displayName || _.name || "", s = s !== "" ? "ForwardRef(" + s + ")" : "ForwardRef"), s;
67
- case F:
68
- return _ = s.displayName || null, _ !== null ? _ : n(s.type) || "Memo";
60
+ case $:
61
+ return l.displayName || "Context";
62
+ case I:
63
+ return (l._context.displayName || "Context") + ".Consumer";
64
+ case Q:
65
+ var y = l.render;
66
+ return l = l.displayName, l || (l = y.displayName || y.name || "", l = l !== "" ? "ForwardRef(" + l + ")" : "ForwardRef"), l;
67
+ case Y:
68
+ return y = l.displayName || null, y !== null ? y : n(l.type) || "Memo";
69
69
  case U:
70
- _ = s._payload, s = s._init;
70
+ y = l._payload, l = l._init;
71
71
  try {
72
- return n(s(_));
72
+ return n(l(y));
73
73
  } catch {
74
74
  }
75
75
  }
76
76
  return null;
77
77
  }
78
- function t(s) {
79
- return "" + s;
78
+ function t(l) {
79
+ return "" + l;
80
80
  }
81
- function a(s) {
81
+ function a(l) {
82
82
  try {
83
- t(s);
84
- var _ = !1;
83
+ t(l);
84
+ var y = !1;
85
85
  } catch {
86
- _ = !0;
86
+ y = !0;
87
87
  }
88
- if (_) {
89
- _ = console;
90
- var f = _.error, N = typeof Symbol == "function" && Symbol.toStringTag && s[Symbol.toStringTag] || s.constructor.name || "Object";
91
- return f.call(
92
- _,
88
+ if (y) {
89
+ y = console;
90
+ var w = y.error, R = typeof Symbol == "function" && Symbol.toStringTag && l[Symbol.toStringTag] || l.constructor.name || "Object";
91
+ return w.call(
92
+ y,
93
93
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
94
- N
95
- ), t(s);
94
+ R
95
+ ), t(l);
96
96
  }
97
97
  }
98
- function r(s) {
99
- if (s === b) return "<>";
100
- if (typeof s == "object" && s !== null && s.$$typeof === U)
98
+ function s(l) {
99
+ if (l === b) return "<>";
100
+ if (typeof l == "object" && l !== null && l.$$typeof === U)
101
101
  return "<...>";
102
102
  try {
103
- var _ = n(s);
104
- return _ ? "<" + _ + ">" : "<...>";
103
+ var y = n(l);
104
+ return y ? "<" + y + ">" : "<...>";
105
105
  } catch {
106
106
  return "<...>";
107
107
  }
108
108
  }
109
109
  function i() {
110
- var s = W.A;
111
- return s === null ? null : s.getOwner();
110
+ var l = Z.A;
111
+ return l === null ? null : l.getOwner();
112
112
  }
113
113
  function o() {
114
114
  return Error("react-stack-top-frame");
115
115
  }
116
- function c(s) {
117
- if (ee.call(s, "key")) {
118
- var _ = Object.getOwnPropertyDescriptor(s, "key").get;
119
- if (_ && _.isReactWarning) return !1;
116
+ function c(l) {
117
+ if (le.call(l, "key")) {
118
+ var y = Object.getOwnPropertyDescriptor(l, "key").get;
119
+ if (y && y.isReactWarning) return !1;
120
120
  }
121
- return s.key !== void 0;
121
+ return l.key !== void 0;
122
122
  }
123
- function m(s, _) {
124
- function f() {
125
- ne || (ne = !0, console.error(
123
+ function m(l, y) {
124
+ function w() {
125
+ B || (B = !0, console.error(
126
126
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
127
- _
127
+ y
128
128
  ));
129
129
  }
130
- f.isReactWarning = !0, Object.defineProperty(s, "key", {
131
- get: f,
130
+ w.isReactWarning = !0, Object.defineProperty(l, "key", {
131
+ get: w,
132
132
  configurable: !0
133
133
  });
134
134
  }
135
135
  function d() {
136
- var s = n(this.type);
137
- return ae[s] || (ae[s] = !0, console.error(
136
+ var l = n(this.type);
137
+ return oe[l] || (oe[l] = !0, console.error(
138
138
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
139
- )), s = this.props.ref, s !== void 0 ? s : null;
139
+ )), l = this.props.ref, l !== void 0 ? l : null;
140
140
  }
141
- function u(s, _, f, N, L, O) {
142
- var w = f.ref;
143
- return s = {
144
- $$typeof: p,
145
- type: s,
146
- key: _,
147
- props: f,
148
- _owner: N
149
- }, (w !== void 0 ? w : null) !== null ? Object.defineProperty(s, "ref", {
141
+ function u(l, y, w, R, G, X) {
142
+ var _ = w.ref;
143
+ return l = {
144
+ $$typeof: f,
145
+ type: l,
146
+ key: y,
147
+ props: w,
148
+ _owner: R
149
+ }, (_ !== void 0 ? _ : null) !== null ? Object.defineProperty(l, "ref", {
150
150
  enumerable: !1,
151
151
  get: d
152
- }) : Object.defineProperty(s, "ref", { enumerable: !1, value: null }), s._store = {}, Object.defineProperty(s._store, "validated", {
152
+ }) : Object.defineProperty(l, "ref", { enumerable: !1, value: null }), l._store = {}, Object.defineProperty(l._store, "validated", {
153
153
  configurable: !1,
154
154
  enumerable: !1,
155
155
  writable: !0,
156
156
  value: 0
157
- }), Object.defineProperty(s, "_debugInfo", {
157
+ }), Object.defineProperty(l, "_debugInfo", {
158
158
  configurable: !1,
159
159
  enumerable: !1,
160
160
  writable: !0,
161
161
  value: null
162
- }), Object.defineProperty(s, "_debugStack", {
162
+ }), Object.defineProperty(l, "_debugStack", {
163
163
  configurable: !1,
164
164
  enumerable: !1,
165
165
  writable: !0,
166
- value: L
167
- }), Object.defineProperty(s, "_debugTask", {
166
+ value: G
167
+ }), Object.defineProperty(l, "_debugTask", {
168
168
  configurable: !1,
169
169
  enumerable: !1,
170
170
  writable: !0,
171
- value: O
172
- }), Object.freeze && (Object.freeze(s.props), Object.freeze(s)), s;
171
+ value: X
172
+ }), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
173
173
  }
174
- function l(s, _, f, N, L, O) {
175
- var w = _.children;
176
- if (w !== void 0)
177
- if (N)
178
- if (te(w)) {
179
- for (N = 0; N < w.length; N++)
180
- x(w[N]);
181
- Object.freeze && Object.freeze(w);
174
+ function r(l, y, w, R, G, X) {
175
+ var _ = y.children;
176
+ if (_ !== void 0)
177
+ if (R)
178
+ if (ie(_)) {
179
+ for (R = 0; R < _.length; R++)
180
+ x(_[R]);
181
+ Object.freeze && Object.freeze(_);
182
182
  } else
183
183
  console.error(
184
184
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
185
185
  );
186
- else x(w);
187
- if (ee.call(_, "key")) {
188
- w = n(s);
189
- var Y = Object.keys(_).filter(function(me) {
190
- return me !== "key";
186
+ else x(_);
187
+ if (le.call(y, "key")) {
188
+ _ = n(l);
189
+ var S = Object.keys(y).filter(function(A) {
190
+ return A !== "key";
191
191
  });
192
- N = 0 < Y.length ? "{key: someKey, " + Y.join(": ..., ") + ": ...}" : "{key: someKey}", X[w + N] || (Y = 0 < Y.length ? "{" + Y.join(": ..., ") + ": ...}" : "{}", console.error(
192
+ R = 0 < S.length ? "{key: someKey, " + S.join(": ..., ") + ": ...}" : "{key: someKey}", te[_ + R] || (S = 0 < S.length ? "{" + S.join(": ..., ") + ": ...}" : "{}", console.error(
193
193
  `A props object containing a "key" prop is being spread into JSX:
194
194
  let props = %s;
195
195
  <%s {...props} />
196
196
  React keys must be passed directly to JSX without using spread:
197
197
  let props = %s;
198
198
  <%s key={someKey} {...props} />`,
199
- N,
200
- w,
201
- Y,
202
- w
203
- ), X[w + N] = !0);
199
+ R,
200
+ _,
201
+ S,
202
+ _
203
+ ), te[_ + R] = !0);
204
204
  }
205
- if (w = null, f !== void 0 && (a(f), w = "" + f), c(_) && (a(_.key), w = "" + _.key), "key" in _) {
206
- f = {};
207
- for (var J in _)
208
- J !== "key" && (f[J] = _[J]);
209
- } else f = _;
210
- return w && m(
211
- f,
212
- typeof s == "function" ? s.displayName || s.name || "Unknown" : s
205
+ if (_ = null, w !== void 0 && (a(w), _ = "" + w), c(y) && (a(y.key), _ = "" + y.key), "key" in y) {
206
+ w = {};
207
+ for (var N in y)
208
+ N !== "key" && (w[N] = y[N]);
209
+ } else w = y;
210
+ return _ && m(
211
+ w,
212
+ typeof l == "function" ? l.displayName || l.name || "Unknown" : l
213
213
  ), u(
214
- s,
214
+ l,
215
+ _,
215
216
  w,
216
- f,
217
217
  i(),
218
- L,
219
- O
218
+ G,
219
+ X
220
220
  );
221
221
  }
222
- function x(s) {
223
- h(s) ? s._store && (s._store.validated = 1) : typeof s == "object" && s !== null && s.$$typeof === U && (s._payload.status === "fulfilled" ? h(s._payload.value) && s._payload.value._store && (s._payload.value._store.validated = 1) : s._store && (s._store.validated = 1));
222
+ function x(l) {
223
+ h(l) ? l._store && (l._store.validated = 1) : typeof l == "object" && l !== null && l.$$typeof === U && (l._payload.status === "fulfilled" ? h(l._payload.value) && l._payload.value._store && (l._payload.value._store.validated = 1) : l._store && (l._store.validated = 1));
224
224
  }
225
- function h(s) {
226
- return typeof s == "object" && s !== null && s.$$typeof === p;
225
+ function h(l) {
226
+ return typeof l == "object" && l !== null && l.$$typeof === f;
227
227
  }
228
- var j = Re, p = Symbol.for("react.transitional.element"), v = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), g = Symbol.for("react.strict_mode"), k = Symbol.for("react.profiler"), E = Symbol.for("react.consumer"), C = Symbol.for("react.context"), B = Symbol.for("react.forward_ref"), z = Symbol.for("react.suspense"), I = Symbol.for("react.suspense_list"), F = Symbol.for("react.memo"), U = Symbol.for("react.lazy"), Q = Symbol.for("react.activity"), de = Symbol.for("react.client.reference"), W = j.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ee = Object.prototype.hasOwnProperty, te = Array.isArray, H = console.createTask ? console.createTask : function() {
228
+ var j = Me, f = Symbol.for("react.transitional.element"), p = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), g = Symbol.for("react.strict_mode"), k = Symbol.for("react.profiler"), I = Symbol.for("react.consumer"), $ = Symbol.for("react.context"), Q = Symbol.for("react.forward_ref"), K = Symbol.for("react.suspense"), P = Symbol.for("react.suspense_list"), Y = Symbol.for("react.memo"), U = Symbol.for("react.lazy"), O = Symbol.for("react.activity"), q = Symbol.for("react.client.reference"), Z = j.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, le = Object.prototype.hasOwnProperty, ie = Array.isArray, z = console.createTask ? console.createTask : function() {
229
229
  return null;
230
230
  };
231
231
  j = {
232
- react_stack_bottom_frame: function(s) {
233
- return s();
232
+ react_stack_bottom_frame: function(l) {
233
+ return l();
234
234
  }
235
235
  };
236
- var ne, ae = {}, se = j.react_stack_bottom_frame.bind(
236
+ var B, oe = {}, ee = j.react_stack_bottom_frame.bind(
237
237
  j,
238
238
  o
239
- )(), re = H(r(o)), X = {};
240
- q.Fragment = b, q.jsx = function(s, _, f) {
241
- var N = 1e4 > W.recentlyCreatedOwnerStacks++;
242
- return l(
243
- s,
244
- _,
245
- f,
239
+ )(), ce = z(s(o)), te = {};
240
+ se.Fragment = b, se.jsx = function(l, y, w) {
241
+ var R = 1e4 > Z.recentlyCreatedOwnerStacks++;
242
+ return r(
243
+ l,
244
+ y,
245
+ w,
246
246
  !1,
247
- N ? Error("react-stack-top-frame") : se,
248
- N ? H(r(s)) : re
247
+ R ? Error("react-stack-top-frame") : ee,
248
+ R ? z(s(l)) : ce
249
249
  );
250
- }, q.jsxs = function(s, _, f) {
251
- var N = 1e4 > W.recentlyCreatedOwnerStacks++;
252
- return l(
253
- s,
254
- _,
255
- f,
250
+ }, se.jsxs = function(l, y, w) {
251
+ var R = 1e4 > Z.recentlyCreatedOwnerStacks++;
252
+ return r(
253
+ l,
254
+ y,
255
+ w,
256
256
  !0,
257
- N ? Error("react-stack-top-frame") : se,
258
- N ? H(r(s)) : re
257
+ R ? Error("react-stack-top-frame") : ee,
258
+ R ? z(s(l)) : ce
259
259
  );
260
260
  };
261
- })()), q;
261
+ })()), se;
262
262
  }
263
- var be;
264
- function $e() {
265
- return be || (be = 1, process.env.NODE_ENV === "production" ? le.exports = Ae() : le.exports = Le()), le.exports;
263
+ var we;
264
+ function He() {
265
+ return we || (we = 1, process.env.NODE_ENV === "production" ? de.exports = Be() : de.exports = Ve()), de.exports;
266
266
  }
267
- var e = $e();
268
- function T({
267
+ var e = He();
268
+ function C({
269
269
  element: n,
270
270
  opts: t,
271
271
  children: a
272
272
  }) {
273
- const i = n instanceof ue ? n : null, o = t.validationSeq > 0 && i && typeof i.hasErrors == "function" ? i.hasErrors() : !1, c = Ie();
274
- ie(() => {
273
+ const i = n instanceof je ? n : null, o = t.validationSeq > 0 && i && typeof i.hasErrors == "function" ? i.hasErrors() : !1, c = De();
274
+ me(() => {
275
275
  t.animate && o && c.start({
276
276
  x: [0, -6, 6, -4, 0],
277
277
  transition: { duration: 0.32, ease: "easeInOut" }
@@ -279,7 +279,7 @@ function T({
279
279
  }, [c, o, t.animate, t.validationSeq]);
280
280
  const m = n.name;
281
281
  return /* @__PURE__ */ e.jsx(
282
- y.div,
282
+ v.div,
283
283
  {
284
284
  className: o ? "msj__question msj__question--invalid" : "msj__question",
285
285
  "data-msj-element": m,
@@ -288,13 +288,13 @@ function T({
288
288
  whileInView: t.animate ? { opacity: 1, y: 0 } : void 0,
289
289
  viewport: { amount: 0.25, once: !0 },
290
290
  transition: { duration: t.duration },
291
- children: /* @__PURE__ */ e.jsx(y.div, { className: "msj__questionInner", animate: c, children: a })
291
+ children: /* @__PURE__ */ e.jsx(v.div, { className: "msj__questionInner", animate: c, children: a })
292
292
  }
293
293
  );
294
294
  }
295
- function P({ errors: n, opts: t }) {
296
- return n.length === 0 ? null : /* @__PURE__ */ e.jsx(D, { initial: !1, children: n.map((a) => /* @__PURE__ */ e.jsx(
297
- y.div,
295
+ function L({ errors: n, opts: t }) {
296
+ return n.length === 0 ? null : /* @__PURE__ */ e.jsx(V, { initial: !1, children: n.map((a) => /* @__PURE__ */ e.jsx(
297
+ v.div,
298
298
  {
299
299
  className: "msj__error",
300
300
  layout: !0,
@@ -307,36 +307,36 @@ function P({ errors: n, opts: t }) {
307
307
  a
308
308
  )) });
309
309
  }
310
- function R(n, t) {
310
+ function E(n, t) {
311
311
  const a = (n.title ?? "") || n.name;
312
312
  return t.showQuestionNumbers === "off" || t.showQuestionNumbers === "on" && t.globalQuestionIndex < 0 || t.showQuestionNumbers === "onPage" && t.questionIndex < 0 ? a : `${t.showQuestionNumbers === "on" ? t.globalQuestionIndex + 1 : t.questionIndex + 1}. ${a}`;
313
313
  }
314
- function Me(n) {
314
+ function Qe(n) {
315
315
  const t = n;
316
316
  return (typeof t.getText == "function" ? t.getText() : t.text) ?? "";
317
317
  }
318
- function A(n) {
319
- return (n.errors ?? []).map(Me).filter(Boolean);
318
+ function M(n) {
319
+ return (n.errors ?? []).map(Qe).filter(Boolean);
320
320
  }
321
- function S(n, t) {
322
- if (n instanceof ue) {
323
- const a = n, r = a.survey;
324
- if (r && typeof r.setValue == "function" && a.name) {
325
- r.setValue(a.name, t);
321
+ function T(n, t) {
322
+ if (n instanceof je) {
323
+ const a = n, s = a.survey;
324
+ if (s && typeof s.setValue == "function" && a.name) {
325
+ s.setValue(a.name, t);
326
326
  return;
327
327
  }
328
328
  }
329
329
  Reflect.set(n, "value", t);
330
330
  }
331
- function Oe({ question: n, opts: t }) {
332
- const a = n, r = R(a, t), i = t.validationSeq > 0 ? A(a) : [], [o, c] = G(!1);
333
- return /* @__PURE__ */ e.jsxs(T, { element: a, opts: t, children: [
334
- /* @__PURE__ */ e.jsxs(fe.Root, { className: "msj__label", htmlFor: a.id, children: [
335
- r,
331
+ function Ye({ question: n, opts: t }) {
332
+ const a = n, s = E(a, t), i = t.validationSeq > 0 ? M(a) : [], [o, c] = J(!1);
333
+ return /* @__PURE__ */ e.jsxs(C, { element: a, opts: t, children: [
334
+ /* @__PURE__ */ e.jsxs(ve.Root, { className: "msj__label", htmlFor: a.id, children: [
335
+ s,
336
336
  a.isRequired ? /* @__PURE__ */ e.jsx("span", { "aria-hidden": !0, children: " *" }) : null
337
337
  ] }),
338
338
  /* @__PURE__ */ e.jsx(
339
- y.div,
339
+ v.div,
340
340
  {
341
341
  className: "msj__inputWrap",
342
342
  initial: !1,
@@ -348,28 +348,28 @@ function Oe({ question: n, opts: t }) {
348
348
  id: a.id,
349
349
  className: "msj__input",
350
350
  value: a.value ?? "",
351
- onChange: (m) => S(a, m.currentTarget.value),
351
+ onChange: (m) => T(a, m.currentTarget.value),
352
352
  onFocus: () => c(!0),
353
353
  onBlur: () => c(!1)
354
354
  }
355
355
  )
356
356
  }
357
357
  ),
358
- /* @__PURE__ */ e.jsx(P, { errors: i, opts: t })
358
+ /* @__PURE__ */ e.jsx(L, { errors: i, opts: t })
359
359
  ] });
360
360
  }
361
- function De({
361
+ function We({
362
362
  question: n,
363
363
  opts: t
364
364
  }) {
365
- const a = n, r = R(a, t), i = t.validationSeq > 0 ? A(a) : [], [o, c] = G(!1), m = String(a.value ?? ""), d = a.maxWordCount ?? a.maxWords ?? 200, l = (m.trim() ? m.trim().split(/\s+/).filter(Boolean) : []).length, x = l >= d * 0.9;
366
- return /* @__PURE__ */ e.jsxs(T, { element: a, opts: t, children: [
367
- /* @__PURE__ */ e.jsxs(fe.Root, { className: "msj__label", htmlFor: a.id, children: [
368
- r,
365
+ const a = n, s = E(a, t), i = t.validationSeq > 0 ? M(a) : [], [o, c] = J(!1), m = String(a.value ?? ""), d = a.maxWordCount ?? a.maxWords ?? 200, r = (m.trim() ? m.trim().split(/\s+/).filter(Boolean) : []).length, x = r >= d * 0.9;
366
+ return /* @__PURE__ */ e.jsxs(C, { element: a, opts: t, children: [
367
+ /* @__PURE__ */ e.jsxs(ve.Root, { className: "msj__label", htmlFor: a.id, children: [
368
+ s,
369
369
  a.isRequired ? /* @__PURE__ */ e.jsx("span", { "aria-hidden": !0, children: " *" }) : null
370
370
  ] }),
371
371
  /* @__PURE__ */ e.jsxs(
372
- y.div,
372
+ v.div,
373
373
  {
374
374
  className: "msj__textareaWrap",
375
375
  initial: !1,
@@ -385,96 +385,96 @@ function De({
385
385
  onFocus: () => c(!0),
386
386
  onBlur: () => c(!1),
387
387
  onChange: (h) => {
388
- const j = h.currentTarget.value, p = j.trim() ? j.trim().split(/\s+/).filter(Boolean) : [];
389
- if (p.length <= d) {
390
- S(a, j);
388
+ const j = h.currentTarget.value, f = j.trim() ? j.trim().split(/\s+/).filter(Boolean) : [];
389
+ if (f.length <= d) {
390
+ T(a, j);
391
391
  return;
392
392
  }
393
- S(a, `${p.slice(0, d).join(" ")} `);
393
+ T(a, `${f.slice(0, d).join(" ")} `);
394
394
  }
395
395
  }
396
396
  ),
397
397
  /* @__PURE__ */ e.jsx(
398
- y.div,
398
+ v.div,
399
399
  {
400
400
  className: "msj__counter",
401
401
  initial: !1,
402
402
  animate: x ? { scale: 1.05, color: "#dc2626" } : { scale: 1, color: "#64748b" },
403
403
  transition: { type: "spring", stiffness: 400, damping: 25 },
404
- children: t.t("wordCount", { count: l, max: d })
404
+ children: t.t("wordCount", { count: r, max: d })
405
405
  }
406
406
  )
407
407
  ]
408
408
  }
409
409
  ),
410
- /* @__PURE__ */ e.jsx(P, { errors: i, opts: t })
410
+ /* @__PURE__ */ e.jsx(L, { errors: i, opts: t })
411
411
  ] });
412
412
  }
413
- function Ve({
413
+ function Ue({
414
414
  question: n,
415
415
  opts: t
416
416
  }) {
417
- const a = n, r = R(a, t), i = t.validationSeq > 0 ? A(a) : [], o = a.labelTrue || "Yes", c = a.labelFalse || "No", m = a.valueTrue ?? !0, d = a.valueFalse ?? !1, u = a.swapOrder === !0;
418
- let l;
419
- a.value === m ? l = "true" : a.value === d ? l = "false" : a.value === !0 ? l = "true" : a.value === !1 && (l = "false");
420
- const x = (E) => {
421
- S(a, E === "true" ? m : d);
417
+ const a = n, s = E(a, t), i = t.validationSeq > 0 ? M(a) : [], o = a.labelTrue || "Yes", c = a.labelFalse || "No", m = a.valueTrue ?? !0, d = a.valueFalse ?? !1, u = a.swapOrder === !0;
418
+ let r;
419
+ a.value === m ? r = "true" : a.value === d ? r = "false" : a.value === !0 ? r = "true" : a.value === !1 && (r = "false");
420
+ const x = (I) => {
421
+ T(a, I === "true" ? m : d);
422
422
  };
423
- let h = "50%", j = "-50%", p = "40px";
424
- l === "true" ? (p = "calc(50% - 6px)", u ? (h = "0%", j = "4px") : (h = "100%", j = "calc(-100% - 4px)")) : l === "false" && (p = "calc(50% - 6px)", u ? (h = "100%", j = "calc(-100% - 4px)") : (h = "0%", j = "4px"));
425
- const v = u ? o : c, b = u ? c : o, g = u ? "true" : "false", k = u ? "false" : "true";
426
- return /* @__PURE__ */ e.jsxs(T, { element: a, opts: t, children: [
423
+ let h = "50%", j = "-50%", f = "40px";
424
+ r === "true" ? (f = "calc(50% - 6px)", u ? (h = "0%", j = "4px") : (h = "100%", j = "calc(-100% - 4px)")) : r === "false" && (f = "calc(50% - 6px)", u ? (h = "100%", j = "calc(-100% - 4px)") : (h = "0%", j = "4px"));
425
+ const p = u ? o : c, b = u ? c : o, g = u ? "true" : "false", k = u ? "false" : "true";
426
+ return /* @__PURE__ */ e.jsxs(C, { element: a, opts: t, children: [
427
427
  /* @__PURE__ */ e.jsxs("div", { className: "msj__label", children: [
428
- r,
428
+ s,
429
429
  a.isRequired ? /* @__PURE__ */ e.jsx("span", { "aria-hidden": !0, children: " *" }) : null
430
430
  ] }),
431
431
  /* @__PURE__ */ e.jsxs(
432
- V.Root,
432
+ H.Root,
433
433
  {
434
434
  className: "msj__toggleSwitch",
435
- value: l,
435
+ value: r,
436
436
  onValueChange: x,
437
437
  children: [
438
438
  /* @__PURE__ */ e.jsxs("div", { className: "msj__toggleTrack", "aria-hidden": "true", children: [
439
- /* @__PURE__ */ e.jsx("div", { className: "msj__toggleTrackLabel msj__toggleTrackLabel--left", children: v }),
439
+ /* @__PURE__ */ e.jsx("div", { className: "msj__toggleTrackLabel msj__toggleTrackLabel--left", children: p }),
440
440
  /* @__PURE__ */ e.jsx("div", { className: "msj__toggleTrackLabel msj__toggleTrackLabel--right", children: b }),
441
441
  /* @__PURE__ */ e.jsx(
442
- y.div,
442
+ v.div,
443
443
  {
444
- className: `msj__toggleHandle ${l === "true" ? "msj__toggleHandle--true" : l === "false" ? "msj__toggleHandle--false" : ""}`,
444
+ className: `msj__toggleHandle ${r === "true" ? "msj__toggleHandle--true" : r === "false" ? "msj__toggleHandle--false" : ""}`,
445
445
  initial: !1,
446
- animate: { left: h, x: j, width: p },
446
+ animate: { left: h, x: j, width: f },
447
447
  transition: { type: "spring", stiffness: 500, damping: 30 },
448
448
  children: /* @__PURE__ */ e.jsx(
449
- y.span,
449
+ v.span,
450
450
  {
451
451
  initial: { opacity: 0, scale: 0.8 },
452
452
  animate: { opacity: 1, scale: 1 },
453
453
  exit: { opacity: 0, scale: 0.8 },
454
- children: l === "true" ? o : l === "false" ? c : ""
454
+ children: r === "true" ? o : r === "false" ? c : ""
455
455
  },
456
- l || "empty"
456
+ r || "empty"
457
457
  )
458
458
  }
459
459
  )
460
460
  ] }),
461
461
  /* @__PURE__ */ e.jsxs("div", { className: "msj__toggleInputs", children: [
462
- /* @__PURE__ */ e.jsx(V.Item, { value: g, className: "msj__toggleInput", "aria-label": v }),
463
- /* @__PURE__ */ e.jsx(V.Item, { value: k, className: "msj__toggleInput", "aria-label": b })
462
+ /* @__PURE__ */ e.jsx(H.Item, { value: g, className: "msj__toggleInput", "aria-label": p }),
463
+ /* @__PURE__ */ e.jsx(H.Item, { value: k, className: "msj__toggleInput", "aria-label": b })
464
464
  ] })
465
465
  ]
466
466
  }
467
467
  ),
468
- /* @__PURE__ */ e.jsx(P, { errors: i, opts: t })
468
+ /* @__PURE__ */ e.jsx(L, { errors: i, opts: t })
469
469
  ] });
470
470
  }
471
- function Te({
471
+ function Ie({
472
472
  active: n,
473
473
  duration: t,
474
474
  size: a = 14
475
475
  }) {
476
476
  return /* @__PURE__ */ e.jsx(
477
- y.svg,
477
+ v.svg,
478
478
  {
479
479
  className: "msj__checkmark",
480
480
  width: a,
@@ -483,7 +483,7 @@ function Te({
483
483
  fill: "none",
484
484
  "aria-hidden": !0,
485
485
  children: /* @__PURE__ */ e.jsx(
486
- y.path,
486
+ v.path,
487
487
  {
488
488
  d: "M3.2 8.4 6.6 11.8 12.8 4.8",
489
489
  stroke: "currentColor",
@@ -499,32 +499,32 @@ function Te({
499
499
  }
500
500
  );
501
501
  }
502
- function Ne({
502
+ function Se({
503
503
  question: n,
504
504
  isMulti: t,
505
505
  opts: a
506
506
  }) {
507
- const r = n, i = R(r, a), o = a.validationSeq > 0 ? A(r) : [], c = r.visibleChoices ?? [];
507
+ const s = n, i = E(s, a), o = a.validationSeq > 0 ? M(s) : [], c = s.visibleChoices ?? [];
508
508
  if (!t) {
509
- const d = r.value == null ? "" : String(r.value);
510
- return /* @__PURE__ */ e.jsxs(T, { element: r, opts: a, children: [
509
+ const d = s.value == null ? "" : String(s.value);
510
+ return /* @__PURE__ */ e.jsxs(C, { element: s, opts: a, children: [
511
511
  /* @__PURE__ */ e.jsxs("div", { className: "msj__label", children: [
512
512
  i,
513
- r.isRequired ? /* @__PURE__ */ e.jsx("span", { "aria-hidden": !0, children: " *" }) : null
513
+ s.isRequired ? /* @__PURE__ */ e.jsx("span", { "aria-hidden": !0, children: " *" }) : null
514
514
  ] }),
515
515
  /* @__PURE__ */ e.jsx(
516
- V.Root,
516
+ H.Root,
517
517
  {
518
518
  className: "msj__choiceList",
519
519
  value: d,
520
520
  onValueChange: (u) => {
521
- const l = c.find((x) => String(x.value) === u);
522
- S(r, l ? l.value : void 0);
521
+ const r = c.find((x) => String(x.value) === u);
522
+ T(s, r ? r.value : void 0);
523
523
  },
524
524
  children: c.map((u) => {
525
- const l = String(u.value), x = u.text ?? l, h = d === l, j = `msj-radio-bg-${r.id}`;
526
- return /* @__PURE__ */ e.jsx(V.Item, { value: l, asChild: !0, children: /* @__PURE__ */ e.jsxs(
527
- y.button,
525
+ const r = String(u.value), x = u.text ?? r, h = d === r, j = `msj-radio-bg-${s.id}`;
526
+ return /* @__PURE__ */ e.jsx(H.Item, { value: r, asChild: !0, children: /* @__PURE__ */ e.jsxs(
527
+ v.button,
528
528
  {
529
529
  type: "button",
530
530
  className: "msj__choiceOption",
@@ -532,7 +532,7 @@ function Ne({
532
532
  transition: { duration: a.duration },
533
533
  children: [
534
534
  h ? /* @__PURE__ */ e.jsx(
535
- y.span,
535
+ v.span,
536
536
  {
537
537
  className: "msj__choiceOptionBg",
538
538
  layoutId: j,
@@ -541,8 +541,8 @@ function Ne({
541
541
  ) : null,
542
542
  /* @__PURE__ */ e.jsxs("span", { className: "msj__choiceOptionContent", children: [
543
543
  /* @__PURE__ */ e.jsxs("span", { className: "msj__radioItem", children: [
544
- /* @__PURE__ */ e.jsx(V.Indicator, { forceMount: !0, asChild: !0, children: /* @__PURE__ */ e.jsx(
545
- y.span,
544
+ /* @__PURE__ */ e.jsx(H.Indicator, { forceMount: !0, asChild: !0, children: /* @__PURE__ */ e.jsx(
545
+ v.span,
546
546
  {
547
547
  className: "msj__radioIndicator",
548
548
  initial: !1,
@@ -551,35 +551,35 @@ function Ne({
551
551
  }
552
552
  ) }),
553
553
  h ? /* @__PURE__ */ e.jsx(
554
- y.span,
554
+ v.span,
555
555
  {
556
556
  className: "msj__radioPulse",
557
557
  initial: { scale: 0.8, opacity: 0.28 },
558
558
  animate: { scale: 2.2, opacity: 0 },
559
559
  transition: { duration: Math.max(0.22, a.duration * 1.4) }
560
560
  },
561
- `${l}-pulse`
561
+ `${r}-pulse`
562
562
  ) : null
563
563
  ] }),
564
564
  /* @__PURE__ */ e.jsx("span", { children: x })
565
565
  ] })
566
566
  ]
567
567
  }
568
- ) }, l);
568
+ ) }, r);
569
569
  })
570
570
  }
571
571
  ),
572
- /* @__PURE__ */ e.jsx(P, { errors: o, opts: a })
572
+ /* @__PURE__ */ e.jsx(L, { errors: o, opts: a })
573
573
  ] });
574
574
  }
575
- const m = new Set(Array.isArray(r.value) ? r.value : []);
576
- return /* @__PURE__ */ e.jsxs(T, { element: r, opts: a, children: [
575
+ const m = new Set(Array.isArray(s.value) ? s.value : []);
576
+ return /* @__PURE__ */ e.jsxs(C, { element: s, opts: a, children: [
577
577
  /* @__PURE__ */ e.jsxs("div", { className: "msj__label", children: [
578
578
  i,
579
- r.isRequired ? /* @__PURE__ */ e.jsx("span", { "aria-hidden": !0, children: " *" }) : null
579
+ s.isRequired ? /* @__PURE__ */ e.jsx("span", { "aria-hidden": !0, children: " *" }) : null
580
580
  ] }),
581
581
  /* @__PURE__ */ e.jsx("div", { className: "msj__choiceList", children: c.map((d) => {
582
- const u = d.value, l = String(u), x = d.text ?? l, h = m.has(u);
582
+ const u = d.value, r = String(u), x = d.text ?? r, h = m.has(u);
583
583
  return /* @__PURE__ */ e.jsxs(
584
584
  "label",
585
585
  {
@@ -587,7 +587,7 @@ function Ne({
587
587
  "data-state": h ? "checked" : "unchecked",
588
588
  children: [
589
589
  /* @__PURE__ */ e.jsx(
590
- y.span,
590
+ v.span,
591
591
  {
592
592
  className: "msj__choiceOptionBg",
593
593
  "aria-hidden": !0,
@@ -597,22 +597,22 @@ function Ne({
597
597
  ),
598
598
  /* @__PURE__ */ e.jsxs("span", { className: "msj__choiceOptionContent", children: [
599
599
  /* @__PURE__ */ e.jsx(
600
- ce.Root,
600
+ xe.Root,
601
601
  {
602
602
  className: "msj__checkbox",
603
603
  checked: h,
604
604
  onCheckedChange: (j) => {
605
- const p = new Set(Array.isArray(r.value) ? r.value : []);
606
- j === !0 ? p.add(u) : p.delete(u), S(r, Array.from(p));
605
+ const f = new Set(Array.isArray(s.value) ? s.value : []);
606
+ j === !0 ? f.add(u) : f.delete(u), T(s, Array.from(f));
607
607
  },
608
- children: /* @__PURE__ */ e.jsx(ce.Indicator, { forceMount: !0, asChild: !0, children: /* @__PURE__ */ e.jsx(
609
- y.span,
608
+ children: /* @__PURE__ */ e.jsx(xe.Indicator, { forceMount: !0, asChild: !0, children: /* @__PURE__ */ e.jsx(
609
+ v.span,
610
610
  {
611
611
  className: "msj__checkboxIndicator",
612
612
  initial: !1,
613
613
  animate: h ? { opacity: 1, scale: 1 } : { opacity: 0, scale: 0.9 },
614
614
  transition: { duration: Math.max(0.12, a.duration * 0.5) },
615
- children: /* @__PURE__ */ e.jsx(Te, { active: h, duration: Math.max(0.22, a.duration * 1.2) })
615
+ children: /* @__PURE__ */ e.jsx(Ie, { active: h, duration: Math.max(0.22, a.duration * 1.2) })
616
616
  }
617
617
  ) })
618
618
  }
@@ -621,53 +621,53 @@ function Ne({
621
621
  ] })
622
622
  ]
623
623
  },
624
- l
624
+ r
625
625
  );
626
626
  }) }),
627
- /* @__PURE__ */ e.jsx(P, { errors: o, opts: a })
627
+ /* @__PURE__ */ e.jsx(L, { errors: o, opts: a })
628
628
  ] });
629
629
  }
630
- function Be({
630
+ function ze({
631
631
  question: n,
632
632
  opts: t
633
633
  }) {
634
- const a = n, r = R(a, t), i = t.validationSeq > 0 ? A(a) : [], o = a.visibleChoices ?? [], c = "__msj-empty__", m = a.value == null ? c : String(a.value), d = o.find((h) => String(h.value) === m), u = m === c ? t.t("selectPlaceholder") : d?.text ?? m, [l, x] = G(!1);
635
- return /* @__PURE__ */ e.jsxs(T, { element: a, opts: t, children: [
634
+ const a = n, s = E(a, t), i = t.validationSeq > 0 ? M(a) : [], o = a.visibleChoices ?? [], c = "__msj-empty__", m = a.value == null ? c : String(a.value), d = o.find((h) => String(h.value) === m), u = m === c ? t.t("selectPlaceholder") : d?.text ?? m, [r, x] = J(!1);
635
+ return /* @__PURE__ */ e.jsxs(C, { element: a, opts: t, children: [
636
636
  /* @__PURE__ */ e.jsxs("div", { className: "msj__label", children: [
637
- r,
637
+ s,
638
638
  a.isRequired ? /* @__PURE__ */ e.jsx("span", { "aria-hidden": !0, children: " *" }) : null
639
639
  ] }),
640
640
  /* @__PURE__ */ e.jsxs(
641
- $.Root,
641
+ D.Root,
642
642
  {
643
- open: l,
643
+ open: r,
644
644
  onOpenChange: x,
645
645
  value: m,
646
646
  onValueChange: (h) => {
647
647
  if (h === c) {
648
- S(a, void 0);
648
+ T(a, void 0);
649
649
  return;
650
650
  }
651
- const j = o.find((p) => String(p.value) === h);
652
- S(a, j ? j.value : h);
651
+ const j = o.find((f) => String(f.value) === h);
652
+ T(a, j ? j.value : h);
653
653
  },
654
654
  children: [
655
- /* @__PURE__ */ e.jsxs($.Trigger, { className: "msj__selectTrigger", "aria-label": r, children: [
656
- /* @__PURE__ */ e.jsx($.Value, { className: m === c ? "msj__selectValue msj__selectValue--placeholder" : "msj__selectValue", children: u }),
657
- /* @__PURE__ */ e.jsx($.Icon, { className: "msj__selectIcon", children: "▾" })
655
+ /* @__PURE__ */ e.jsxs(D.Trigger, { className: "msj__selectTrigger", "aria-label": s, children: [
656
+ /* @__PURE__ */ e.jsx(D.Value, { className: m === c ? "msj__selectValue msj__selectValue--placeholder" : "msj__selectValue", children: u }),
657
+ /* @__PURE__ */ e.jsx(D.Icon, { className: "msj__selectIcon", children: "▾" })
658
658
  ] }),
659
- /* @__PURE__ */ e.jsx($.Portal, { container: t.portalContainer ?? void 0, children: /* @__PURE__ */ e.jsx(D, { children: l ? /* @__PURE__ */ e.jsx($.Content, { className: "msj__selectContent", position: "popper", asChild: !0, children: /* @__PURE__ */ e.jsx(
660
- y.div,
659
+ /* @__PURE__ */ e.jsx(D.Portal, { container: t.portalContainer ?? void 0, children: /* @__PURE__ */ e.jsx(V, { children: r ? /* @__PURE__ */ e.jsx(D.Content, { className: "msj__selectContent", position: "popper", asChild: !0, children: /* @__PURE__ */ e.jsx(
660
+ v.div,
661
661
  {
662
662
  initial: { opacity: 0, y: -6, scale: 0.98 },
663
663
  animate: { opacity: 1, y: 0, scale: 1 },
664
664
  exit: { opacity: 0, y: -6, scale: 0.98 },
665
665
  transition: { type: "spring", stiffness: 650, damping: 40 },
666
- children: /* @__PURE__ */ e.jsxs($.Viewport, { className: "msj__selectViewport", children: [
667
- /* @__PURE__ */ e.jsx($.Item, { value: c, className: "msj__selectItem", children: /* @__PURE__ */ e.jsx($.ItemText, { children: t.t("selectPlaceholder") }) }),
666
+ children: /* @__PURE__ */ e.jsxs(D.Viewport, { className: "msj__selectViewport", children: [
667
+ /* @__PURE__ */ e.jsx(D.Item, { value: c, className: "msj__selectItem", children: /* @__PURE__ */ e.jsx(D.ItemText, { children: t.t("selectPlaceholder") }) }),
668
668
  o.map((h) => {
669
669
  const j = String(h.value);
670
- return /* @__PURE__ */ e.jsx($.Item, { value: j, className: "msj__selectItem", children: /* @__PURE__ */ e.jsx($.ItemText, { children: h.text ?? j }) }, j);
670
+ return /* @__PURE__ */ e.jsx(D.Item, { value: j, className: "msj__selectItem", children: /* @__PURE__ */ e.jsx(D.ItemText, { children: h.text ?? j }) }, j);
671
671
  })
672
672
  ] })
673
673
  }
@@ -675,45 +675,45 @@ function Be({
675
675
  ]
676
676
  }
677
677
  ),
678
- /* @__PURE__ */ e.jsx(P, { errors: i, opts: t })
678
+ /* @__PURE__ */ e.jsx(L, { errors: i, opts: t })
679
679
  ] });
680
680
  }
681
- function Fe({ question: n, opts: t }) {
682
- const a = n, r = a.html ?? "";
683
- return /* @__PURE__ */ e.jsxs(T, { element: n, opts: t, children: [
684
- a.title ? /* @__PURE__ */ e.jsx("div", { className: "msj__label", children: R(n, t) }) : null,
685
- /* @__PURE__ */ e.jsx("div", { className: "msj__html", dangerouslySetInnerHTML: { __html: r } })
681
+ function Ge({ question: n, opts: t }) {
682
+ const a = n, s = a.html ?? "";
683
+ return /* @__PURE__ */ e.jsxs(C, { element: n, opts: t, children: [
684
+ a.title ? /* @__PURE__ */ e.jsx("div", { className: "msj__label", children: E(n, t) }) : null,
685
+ /* @__PURE__ */ e.jsx("div", { className: "msj__html", dangerouslySetInnerHTML: { __html: s } })
686
686
  ] });
687
687
  }
688
- function Qe({ question: n, opts: t }) {
689
- const a = n, r = a.imageLink ?? "", i = a.title ?? a.name;
690
- return /* @__PURE__ */ e.jsxs(T, { element: n, opts: t, children: [
691
- a.title ? /* @__PURE__ */ e.jsx("div", { className: "msj__label", children: R(n, t) }) : null,
692
- r ? /* @__PURE__ */ e.jsx("img", { className: "msj__image", src: r, alt: i }) : null
688
+ function Xe({ question: n, opts: t }) {
689
+ const a = n, s = a.imageLink ?? "", i = a.title ?? a.name;
690
+ return /* @__PURE__ */ e.jsxs(C, { element: n, opts: t, children: [
691
+ a.title ? /* @__PURE__ */ e.jsx("div", { className: "msj__label", children: E(n, t) }) : null,
692
+ s ? /* @__PURE__ */ e.jsx("img", { className: "msj__image", src: s, alt: i }) : null
693
693
  ] });
694
694
  }
695
- function Ye({ question: n, opts: t }) {
696
- const a = n, r = R(n, t), i = a.displayValue ?? a.value;
697
- return /* @__PURE__ */ e.jsxs(T, { element: n, opts: t, children: [
698
- /* @__PURE__ */ e.jsx("div", { className: "msj__label", children: r }),
695
+ function Je({ question: n, opts: t }) {
696
+ const a = n, s = E(n, t), i = a.displayValue ?? a.value;
697
+ return /* @__PURE__ */ e.jsxs(C, { element: n, opts: t, children: [
698
+ /* @__PURE__ */ e.jsx("div", { className: "msj__label", children: s }),
699
699
  /* @__PURE__ */ e.jsx("div", { className: "msj__expression", children: i == null ? "" : String(i) })
700
700
  ] });
701
701
  }
702
- function He({ question: n, opts: t }) {
702
+ function Ke({ question: n, opts: t }) {
703
703
  return null;
704
704
  }
705
- const Ue = (n) => n.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), We = (n) => n.replace(
705
+ const qe = (n) => n.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Ze = (n) => n.replace(
706
706
  /^([A-Z])|[\s-_]+(\w)/g,
707
- (t, a, r) => r ? r.toUpperCase() : a.toLowerCase()
708
- ), ke = (n) => {
709
- const t = We(n);
707
+ (t, a, s) => s ? s.toUpperCase() : a.toLowerCase()
708
+ ), Te = (n) => {
709
+ const t = Ze(n);
710
710
  return t.charAt(0).toUpperCase() + t.slice(1);
711
- }, Ce = (...n) => n.filter((t, a, r) => !!t && t.trim() !== "" && r.indexOf(t) === a).join(" ").trim(), Ge = (n) => {
711
+ }, Pe = (...n) => n.filter((t, a, s) => !!t && t.trim() !== "" && s.indexOf(t) === a).join(" ").trim(), et = (n) => {
712
712
  for (const t in n)
713
713
  if (t.startsWith("aria-") || t === "role" || t === "title")
714
714
  return !0;
715
715
  };
716
- var ze = {
716
+ var tt = {
717
717
  xmlns: "http://www.w3.org/2000/svg",
718
718
  width: 24,
719
719
  height: 24,
@@ -724,103 +724,103 @@ var ze = {
724
724
  strokeLinecap: "round",
725
725
  strokeLinejoin: "round"
726
726
  };
727
- const Xe = Se(
727
+ const nt = Ee(
728
728
  ({
729
729
  color: n = "currentColor",
730
730
  size: t = 24,
731
731
  strokeWidth: a = 2,
732
- absoluteStrokeWidth: r,
732
+ absoluteStrokeWidth: s,
733
733
  className: i = "",
734
734
  children: o,
735
735
  iconNode: c,
736
736
  ...m
737
- }, d) => je(
737
+ }, d) => pe(
738
738
  "svg",
739
739
  {
740
740
  ref: d,
741
- ...ze,
741
+ ...tt,
742
742
  width: t,
743
743
  height: t,
744
744
  stroke: n,
745
- strokeWidth: r ? Number(a) * 24 / Number(t) : a,
746
- className: Ce("lucide", i),
747
- ...!o && !Ge(m) && { "aria-hidden": "true" },
745
+ strokeWidth: s ? Number(a) * 24 / Number(t) : a,
746
+ className: Pe("lucide", i),
747
+ ...!o && !et(m) && { "aria-hidden": "true" },
748
748
  ...m
749
749
  },
750
750
  [
751
- ...c.map(([u, l]) => je(u, l)),
751
+ ...c.map(([u, r]) => pe(u, r)),
752
752
  ...Array.isArray(o) ? o : [o]
753
753
  ]
754
754
  )
755
755
  );
756
- const M = (n, t) => {
757
- const a = Se(
758
- ({ className: r, ...i }, o) => je(Xe, {
756
+ const F = (n, t) => {
757
+ const a = Ee(
758
+ ({ className: s, ...i }, o) => pe(nt, {
759
759
  ref: o,
760
760
  iconNode: t,
761
- className: Ce(
762
- `lucide-${Ue(ke(n))}`,
761
+ className: Pe(
762
+ `lucide-${qe(Te(n))}`,
763
763
  `lucide-${n}`,
764
- r
764
+ s
765
765
  ),
766
766
  ...i
767
767
  })
768
768
  );
769
- return a.displayName = ke(n), a;
769
+ return a.displayName = Te(n), a;
770
770
  };
771
- const Je = [
771
+ const at = [
772
772
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
773
773
  ["path", { d: "M16 16s-1.5-2-4-2-4 2-4 2", key: "epbg0q" }],
774
774
  ["path", { d: "M7.5 8 10 9", key: "olxxln" }],
775
775
  ["path", { d: "m14 9 2.5-1", key: "1j6cij" }],
776
776
  ["path", { d: "M9 10h.01", key: "qbtxuw" }],
777
777
  ["path", { d: "M15 10h.01", key: "1qmjsl" }]
778
- ], Ke = M("angry", Je);
779
- const qe = [
778
+ ], st = F("angry", at);
779
+ const rt = [
780
780
  ["path", { d: "M12 5v14", key: "s699le" }],
781
781
  ["path", { d: "m19 12-7 7-7-7", key: "1idqje" }]
782
- ], Ze = M("arrow-down", qe);
783
- const et = [
782
+ ], lt = F("arrow-down", rt);
783
+ const it = [
784
784
  ["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }],
785
785
  ["path", { d: "M12 19V5", key: "x0mq9r" }]
786
- ], tt = M("arrow-up", et);
787
- const nt = [
786
+ ], ot = F("arrow-up", it);
787
+ const ct = [
788
788
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
789
789
  ["path", { d: "M16 16s-1.5-2-4-2-4 2-4 2", key: "epbg0q" }],
790
790
  ["line", { x1: "9", x2: "9.01", y1: "9", y2: "9", key: "yxxnd0" }],
791
791
  ["line", { x1: "15", x2: "15.01", y1: "9", y2: "9", key: "1p4y9e" }]
792
- ], at = M("frown", nt);
793
- const st = [
792
+ ], ut = F("frown", ct);
793
+ const dt = [
794
794
  ["circle", { cx: "9", cy: "12", r: "1", key: "1vctgf" }],
795
795
  ["circle", { cx: "9", cy: "5", r: "1", key: "hp0tcf" }],
796
796
  ["circle", { cx: "9", cy: "19", r: "1", key: "fkjjf6" }],
797
797
  ["circle", { cx: "15", cy: "12", r: "1", key: "1tmaij" }],
798
798
  ["circle", { cx: "15", cy: "5", r: "1", key: "19l28e" }],
799
799
  ["circle", { cx: "15", cy: "19", r: "1", key: "f4zoj3" }]
800
- ], rt = M("grip-vertical", st);
801
- const lt = [
800
+ ], mt = F("grip-vertical", dt);
801
+ const ht = [
802
802
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
803
803
  ["path", { d: "M18 13a6 6 0 0 1-6 5 6 6 0 0 1-6-5h12Z", key: "b2q4dd" }],
804
804
  ["line", { x1: "9", x2: "9.01", y1: "9", y2: "9", key: "yxxnd0" }],
805
805
  ["line", { x1: "15", x2: "15.01", y1: "9", y2: "9", key: "1p4y9e" }]
806
- ], it = M("laugh", lt);
807
- const ot = [
806
+ ], xt = F("laugh", ht);
807
+ const jt = [
808
808
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
809
809
  ["line", { x1: "8", x2: "16", y1: "15", y2: "15", key: "1xb1d9" }],
810
810
  ["line", { x1: "9", x2: "9.01", y1: "9", y2: "9", key: "yxxnd0" }],
811
811
  ["line", { x1: "15", x2: "15.01", y1: "9", y2: "9", key: "1p4y9e" }]
812
- ], ct = M("meh", ot);
813
- const ut = [
812
+ ], _t = F("meh", jt);
813
+ const ft = [
814
814
  ["path", { d: "M5 12h14", key: "1ays0h" }],
815
815
  ["path", { d: "M12 5v14", key: "s699le" }]
816
- ], dt = M("plus", ut);
817
- const mt = [
816
+ ], pt = F("plus", ft);
817
+ const gt = [
818
818
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
819
819
  ["path", { d: "M8 14s1.5 2 4 2 4-2 4-2", key: "1y1vjs" }],
820
820
  ["line", { x1: "9", x2: "9.01", y1: "9", y2: "9", key: "yxxnd0" }],
821
821
  ["line", { x1: "15", x2: "15.01", y1: "9", y2: "9", key: "1p4y9e" }]
822
- ], ht = M("smile", mt);
823
- const xt = [
822
+ ], vt = F("smile", gt);
823
+ const yt = [
824
824
  [
825
825
  "path",
826
826
  {
@@ -828,46 +828,46 @@ const xt = [
828
828
  key: "r04s7s"
829
829
  }
830
830
  ]
831
- ], jt = M("star", xt);
832
- const _t = [
831
+ ], bt = F("star", yt);
832
+ const Nt = [
833
833
  ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
834
834
  ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
835
- ], ft = M("x", _t);
836
- function pt({ active: n }) {
837
- return /* @__PURE__ */ e.jsx(jt, { size: 24, fill: n ? "currentColor" : "none", strokeWidth: 2 });
835
+ ], kt = F("x", Nt);
836
+ function wt({ active: n }) {
837
+ return /* @__PURE__ */ e.jsx(bt, { size: 24, fill: n ? "currentColor" : "none", strokeWidth: 2 });
838
838
  }
839
- function vt({ idx: n, total: t }) {
839
+ function St({ idx: n, total: t }) {
840
840
  const a = t > 1 ? n / (t - 1) : 0.5;
841
- return a < 0.2 ? /* @__PURE__ */ e.jsx(Ke, { size: 24 }) : a < 0.4 ? /* @__PURE__ */ e.jsx(at, { size: 24 }) : a < 0.6 ? /* @__PURE__ */ e.jsx(ct, { size: 24 }) : a < 0.8 ? /* @__PURE__ */ e.jsx(ht, { size: 24 }) : /* @__PURE__ */ e.jsx(it, { size: 24 });
841
+ return a < 0.2 ? /* @__PURE__ */ e.jsx(st, { size: 24 }) : a < 0.4 ? /* @__PURE__ */ e.jsx(ut, { size: 24 }) : a < 0.6 ? /* @__PURE__ */ e.jsx(_t, { size: 24 }) : a < 0.8 ? /* @__PURE__ */ e.jsx(vt, { size: 24 }) : /* @__PURE__ */ e.jsx(xt, { size: 24 });
842
842
  }
843
- function gt({ question: n, opts: t }) {
844
- const a = n, r = R(n, t), i = t.validationSeq > 0 ? A(n) : [], o = a.visibleRateValues ?? [], c = n.value == null ? "" : String(n.value), m = `msj-rating-bg-${n.id}`, d = a.rateType ?? "labels", u = a.scaleColorMode, l = a.minRateDescription, x = a.maxRateDescription, h = a.displayRateDescriptionsAsExtremeItems, j = o.findIndex((p) => String(p.value) === c);
845
- return /* @__PURE__ */ e.jsxs(T, { element: n, opts: t, children: [
843
+ function Tt({ question: n, opts: t }) {
844
+ const a = n, s = E(n, t), i = t.validationSeq > 0 ? M(n) : [], o = a.visibleRateValues ?? [], c = n.value == null ? "" : String(n.value), m = `msj-rating-bg-${n.id}`, d = a.rateType ?? "labels", u = a.scaleColorMode, r = a.minRateDescription, x = a.maxRateDescription, h = a.displayRateDescriptionsAsExtremeItems, j = o.findIndex((f) => String(f.value) === c);
845
+ return /* @__PURE__ */ e.jsxs(C, { element: n, opts: t, children: [
846
846
  /* @__PURE__ */ e.jsxs("div", { className: "msj__label", children: [
847
- r,
847
+ s,
848
848
  n.isRequired ? /* @__PURE__ */ e.jsx("span", { "aria-hidden": !0, children: " *" }) : null
849
849
  ] }),
850
850
  /* @__PURE__ */ e.jsxs("div", { className: "msj__rating", "data-type": d, "data-color-mode": u, children: [
851
- l && !h ? /* @__PURE__ */ e.jsx("span", { className: "msj__ratingDescription msj__ratingDescription--min", children: l }) : null,
852
- o.map((p, v) => {
853
- const b = String(p.value);
854
- let g = p.text ?? b;
855
- h && (v === 0 && l && (g = l), v === o.length - 1 && x && (g = x));
856
- const k = c === b, E = d === "stars" && j >= 0 ? v <= j : k;
857
- let C;
858
- return u === "colored" && (C = { "--msj-rating-color": `hsl(${o.length > 1 ? v / (o.length - 1) * 120 : 60}, 70%, 50%)` }), /* @__PURE__ */ e.jsxs(
859
- y.button,
851
+ r && !h ? /* @__PURE__ */ e.jsx("span", { className: "msj__ratingDescription msj__ratingDescription--min", children: r }) : null,
852
+ o.map((f, p) => {
853
+ const b = String(f.value);
854
+ let g = f.text ?? b;
855
+ h && (p === 0 && r && (g = r), p === o.length - 1 && x && (g = x));
856
+ const k = c === b, I = d === "stars" && j >= 0 ? p <= j : k;
857
+ let $;
858
+ return u === "colored" && ($ = { "--msj-rating-color": `hsl(${o.length > 1 ? p / (o.length - 1) * 120 : 60}, 70%, 50%)` }), /* @__PURE__ */ e.jsxs(
859
+ v.button,
860
860
  {
861
861
  type: "button",
862
862
  className: "msj__ratingItem",
863
- onClick: () => S(n, p.value),
863
+ onClick: () => T(n, f.value),
864
864
  layout: !0,
865
865
  transition: { duration: t.duration },
866
866
  "aria-label": g,
867
- style: C,
867
+ style: $,
868
868
  children: [
869
869
  k ? /* @__PURE__ */ e.jsx(
870
- y.span,
870
+ v.span,
871
871
  {
872
872
  className: "msj__ratingItemBg",
873
873
  layoutId: m,
@@ -875,8 +875,8 @@ function gt({ question: n, opts: t }) {
875
875
  }
876
876
  ) : null,
877
877
  /* @__PURE__ */ e.jsxs("span", { className: "msj__ratingItemContent", children: [
878
- d === "stars" ? /* @__PURE__ */ e.jsx(pt, { active: E }) : null,
879
- d === "smileys" ? /* @__PURE__ */ e.jsx(vt, { idx: v, total: o.length }) : null,
878
+ d === "stars" ? /* @__PURE__ */ e.jsx(wt, { active: I }) : null,
879
+ d === "smileys" ? /* @__PURE__ */ e.jsx(St, { idx: p, total: o.length }) : null,
880
880
  d === "labels" ? g : null
881
881
  ] })
882
882
  ]
@@ -886,35 +886,35 @@ function gt({ question: n, opts: t }) {
886
886
  }),
887
887
  x && !h ? /* @__PURE__ */ e.jsx("span", { className: "msj__ratingDescription msj__ratingDescription--max", children: x }) : null
888
888
  ] }),
889
- /* @__PURE__ */ e.jsx(P, { errors: i, opts: t })
889
+ /* @__PURE__ */ e.jsx(L, { errors: i, opts: t })
890
890
  ] });
891
891
  }
892
- function yt({ question: n, opts: t }) {
893
- const a = n, r = R(n, t), i = t.validationSeq > 0 ? A(n) : [], o = a.items ?? [], c = n.value ?? {};
894
- return /* @__PURE__ */ e.jsxs(T, { element: n, opts: t, children: [
892
+ function Ct({ question: n, opts: t }) {
893
+ const a = n, s = E(n, t), i = t.validationSeq > 0 ? M(n) : [], o = a.items ?? [], c = n.value ?? {};
894
+ return /* @__PURE__ */ e.jsxs(C, { element: n, opts: t, children: [
895
895
  /* @__PURE__ */ e.jsxs("div", { className: "msj__label", children: [
896
- r,
896
+ s,
897
897
  n.isRequired ? /* @__PURE__ */ e.jsx("span", { "aria-hidden": !0, children: " *" }) : null
898
898
  ] }),
899
899
  /* @__PURE__ */ e.jsx("div", { className: "msj__multipleText", children: o.map((m, d) => {
900
900
  const u = `${n.id}-${m.name}`;
901
901
  return /* @__PURE__ */ e.jsxs(
902
- y.div,
902
+ v.div,
903
903
  {
904
904
  className: "msj__multipleTextRow",
905
905
  initial: { opacity: 0, x: -8 },
906
906
  animate: { opacity: 1, x: 0 },
907
907
  transition: { delay: d * 0.05, duration: t.duration },
908
908
  children: [
909
- /* @__PURE__ */ e.jsx(fe.Root, { className: "msj__labelInline", htmlFor: u, children: m.title ?? m.name }),
909
+ /* @__PURE__ */ e.jsx(ve.Root, { className: "msj__labelInline", htmlFor: u, children: m.title ?? m.name }),
910
910
  /* @__PURE__ */ e.jsx(
911
911
  "input",
912
912
  {
913
913
  id: u,
914
914
  className: "msj__input",
915
915
  value: c[m.name] ?? "",
916
- onChange: (l) => {
917
- S(n, { ...c, [m.name]: l.currentTarget.value });
916
+ onChange: (r) => {
917
+ T(n, { ...c, [m.name]: r.currentTarget.value });
918
918
  }
919
919
  }
920
920
  )
@@ -923,35 +923,35 @@ function yt({ question: n, opts: t }) {
923
923
  m.name
924
924
  );
925
925
  }) }),
926
- /* @__PURE__ */ e.jsx(P, { errors: i, opts: t })
926
+ /* @__PURE__ */ e.jsx(L, { errors: i, opts: t })
927
927
  ] });
928
928
  }
929
- function bt({ question: n, opts: t }) {
930
- const a = n, r = R(n, t), i = t.validationSeq > 0 ? A(n) : [], o = a.visibleChoices ?? [], c = !!a.multiSelect, m = new Set(
929
+ function Rt({ question: n, opts: t }) {
930
+ const a = n, s = E(n, t), i = t.validationSeq > 0 ? M(n) : [], o = a.visibleChoices ?? [], c = !!a.multiSelect, m = new Set(
931
931
  c ? Array.isArray(n.value) ? n.value : [] : [n.value]
932
932
  ), d = {
933
933
  rest: { opacity: 0 },
934
934
  hover: { opacity: 1 }
935
935
  };
936
- return /* @__PURE__ */ e.jsxs(T, { element: n, opts: t, children: [
936
+ return /* @__PURE__ */ e.jsxs(C, { element: n, opts: t, children: [
937
937
  /* @__PURE__ */ e.jsxs("div", { className: "msj__label", children: [
938
- r,
938
+ s,
939
939
  n.isRequired ? /* @__PURE__ */ e.jsx("span", { "aria-hidden": !0, children: " *" }) : null
940
940
  ] }),
941
941
  /* @__PURE__ */ e.jsx("div", { className: "msj__imagePicker", children: o.map((u) => {
942
- const l = String(u.value), x = m.has(u.value), h = `msj-imagePicker-bg-${n.id}`;
942
+ const r = String(u.value), x = m.has(u.value), h = `msj-imagePicker-bg-${n.id}`;
943
943
  return /* @__PURE__ */ e.jsxs(
944
- y.button,
944
+ v.button,
945
945
  {
946
946
  type: "button",
947
947
  className: x ? "msj__imagePickerItem msj__imagePickerItem--active" : "msj__imagePickerItem",
948
948
  onClick: () => {
949
949
  if (!c) {
950
- S(n, u.value);
950
+ T(n, u.value);
951
951
  return;
952
952
  }
953
953
  const j = new Set(Array.isArray(n.value) ? n.value : []);
954
- j.has(u.value) ? j.delete(u.value) : j.add(u.value), S(n, Array.from(j));
954
+ j.has(u.value) ? j.delete(u.value) : j.add(u.value), T(n, Array.from(j));
955
955
  },
956
956
  layout: !0,
957
957
  initial: "rest",
@@ -959,7 +959,7 @@ function bt({ question: n, opts: t }) {
959
959
  transition: { duration: t.duration },
960
960
  children: [
961
961
  x ? null : /* @__PURE__ */ e.jsx(
962
- y.span,
962
+ v.span,
963
963
  {
964
964
  className: "msj__imagePickerHoverBg",
965
965
  variants: d,
@@ -967,43 +967,43 @@ function bt({ question: n, opts: t }) {
967
967
  }
968
968
  ),
969
969
  x ? /* @__PURE__ */ e.jsx(
970
- y.span,
970
+ v.span,
971
971
  {
972
972
  className: "msj__imagePickerItemBg",
973
973
  layoutId: h,
974
974
  transition: { type: "spring", stiffness: 700, damping: 40 }
975
975
  }
976
976
  ) : null,
977
- u.imageLink ? /* @__PURE__ */ e.jsx("img", { className: "msj__imagePickerImg", src: u.imageLink, alt: u.text ?? l }) : null,
977
+ u.imageLink ? /* @__PURE__ */ e.jsx("img", { className: "msj__imagePickerImg", src: u.imageLink, alt: u.text ?? r }) : null,
978
978
  u.text ? /* @__PURE__ */ e.jsx("span", { className: "msj__imagePickerLabel", children: u.text }) : null
979
979
  ]
980
980
  },
981
- l
981
+ r
982
982
  );
983
983
  }) }),
984
- /* @__PURE__ */ e.jsx(P, { errors: i, opts: t })
984
+ /* @__PURE__ */ e.jsx(L, { errors: i, opts: t })
985
985
  ] });
986
986
  }
987
- function Nt({ question: n, opts: t }) {
988
- const a = n, r = R(n, t), i = t.validationSeq > 0 ? A(n) : [], o = a.visibleChoices ?? [], c = n.value == null ? "" : String(n.value), m = `msj-btnGroup-bg-${n.id}`;
989
- return /* @__PURE__ */ e.jsxs(T, { element: n, opts: t, children: [
987
+ function Et({ question: n, opts: t }) {
988
+ const a = n, s = E(n, t), i = t.validationSeq > 0 ? M(n) : [], o = a.visibleChoices ?? [], c = n.value == null ? "" : String(n.value), m = `msj-btnGroup-bg-${n.id}`;
989
+ return /* @__PURE__ */ e.jsxs(C, { element: n, opts: t, children: [
990
990
  /* @__PURE__ */ e.jsxs("div", { className: "msj__label", children: [
991
- r,
991
+ s,
992
992
  n.isRequired ? /* @__PURE__ */ e.jsx("span", { "aria-hidden": !0, children: " *" }) : null
993
993
  ] }),
994
994
  /* @__PURE__ */ e.jsx("div", { className: "msj__buttonGroup", children: o.map((d) => {
995
- const u = String(d.value), l = c === u;
995
+ const u = String(d.value), r = c === u;
996
996
  return /* @__PURE__ */ e.jsxs(
997
- y.button,
997
+ v.button,
998
998
  {
999
999
  type: "button",
1000
- className: l ? "msj__buttonGroupItem msj__buttonGroupItem--active" : "msj__buttonGroupItem",
1001
- onClick: () => S(n, d.value),
1000
+ className: r ? "msj__buttonGroupItem msj__buttonGroupItem--active" : "msj__buttonGroupItem",
1001
+ onClick: () => T(n, d.value),
1002
1002
  layout: !0,
1003
1003
  transition: { duration: t.duration },
1004
1004
  children: [
1005
- l ? /* @__PURE__ */ e.jsx(
1006
- y.span,
1005
+ r ? /* @__PURE__ */ e.jsx(
1006
+ v.span,
1007
1007
  {
1008
1008
  className: "msj__buttonGroupItemBg",
1009
1009
  layoutId: m,
@@ -1016,35 +1016,35 @@ function Nt({ question: n, opts: t }) {
1016
1016
  u
1017
1017
  );
1018
1018
  }) }),
1019
- /* @__PURE__ */ e.jsx(P, { errors: i, opts: t })
1019
+ /* @__PURE__ */ e.jsx(L, { errors: i, opts: t })
1020
1020
  ] });
1021
1021
  }
1022
- function kt({ question: n, opts: t }) {
1023
- const a = n, r = R(n, t), i = t.validationSeq > 0 ? A(n) : [], o = a.visibleChoices ?? [], c = new Set(Array.isArray(n.value) ? n.value : []);
1024
- return /* @__PURE__ */ e.jsxs(T, { element: n, opts: t, children: [
1022
+ function It({ question: n, opts: t }) {
1023
+ const a = n, s = E(n, t), i = t.validationSeq > 0 ? M(n) : [], o = a.visibleChoices ?? [], c = new Set(Array.isArray(n.value) ? n.value : []);
1024
+ return /* @__PURE__ */ e.jsxs(C, { element: n, opts: t, children: [
1025
1025
  /* @__PURE__ */ e.jsxs("div", { className: "msj__label", children: [
1026
- r,
1026
+ s,
1027
1027
  n.isRequired ? /* @__PURE__ */ e.jsx("span", { "aria-hidden": !0, children: " *" }) : null
1028
1028
  ] }),
1029
1029
  /* @__PURE__ */ e.jsx("div", { className: "msj__tagbox", children: o.map((m) => {
1030
- const d = m.value, u = String(d), l = c.has(d);
1030
+ const d = m.value, u = String(d), r = c.has(d);
1031
1031
  return /* @__PURE__ */ e.jsxs(
1032
- y.button,
1032
+ v.button,
1033
1033
  {
1034
1034
  type: "button",
1035
- className: l ? "msj__tag msj__tag--active" : "msj__tag",
1035
+ className: r ? "msj__tag msj__tag--active" : "msj__tag",
1036
1036
  onClick: () => {
1037
1037
  const x = new Set(Array.isArray(n.value) ? n.value : []);
1038
- x.has(d) ? x.delete(d) : x.add(d), S(n, Array.from(x));
1038
+ x.has(d) ? x.delete(d) : x.add(d), T(n, Array.from(x));
1039
1039
  },
1040
1040
  initial: !1,
1041
- animate: l ? { scale: 1.02 } : { scale: 1 },
1041
+ animate: r ? { scale: 1.02 } : { scale: 1 },
1042
1042
  whileHover: { scale: 1.04 },
1043
1043
  whileTap: { scale: 0.97 },
1044
1044
  transition: { type: "spring", stiffness: 500, damping: 30 },
1045
1045
  children: [
1046
- l ? /* @__PURE__ */ e.jsx(
1047
- y.span,
1046
+ r ? /* @__PURE__ */ e.jsx(
1047
+ v.span,
1048
1048
  {
1049
1049
  className: "msj__tagBg",
1050
1050
  initial: { opacity: 0, scale: 0.8 },
@@ -1058,14 +1058,14 @@ function kt({ question: n, opts: t }) {
1058
1058
  u
1059
1059
  );
1060
1060
  }) }),
1061
- /* @__PURE__ */ e.jsx(P, { errors: i, opts: t })
1061
+ /* @__PURE__ */ e.jsx(L, { errors: i, opts: t })
1062
1062
  ] });
1063
1063
  }
1064
- const he = ({
1064
+ const _e = ({
1065
1065
  value: n,
1066
1066
  text: t,
1067
1067
  index: a,
1068
- total: r,
1068
+ total: s,
1069
1069
  onClick: i,
1070
1070
  onMoveUp: o,
1071
1071
  onMoveDown: c,
@@ -1073,18 +1073,18 @@ const he = ({
1073
1073
  longTap: d,
1074
1074
  enableDrag: u = !0
1075
1075
  }) => {
1076
- const l = Pe(), x = oe(null), h = (b) => {
1076
+ const r = Fe(), x = he(null), h = (b) => {
1077
1077
  d && !i ? (x.current && clearTimeout(x.current), x.current = setTimeout(() => {
1078
- l.start(b), navigator.vibrate && navigator.vibrate(50);
1079
- }, 500)) : i || l.start(b);
1078
+ r.start(b), navigator.vibrate && navigator.vibrate(50);
1079
+ }, 500)) : i || r.start(b);
1080
1080
  }, j = () => {
1081
1081
  x.current && (clearTimeout(x.current), x.current = null);
1082
- }, p = (b) => {
1082
+ }, f = (b) => {
1083
1083
  i && (b.key === "Enter" || b.key === " ") && (b.preventDefault(), i());
1084
- }, v = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1084
+ }, p = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1085
1085
  /* @__PURE__ */ e.jsx("span", { className: "msj__rankingLabel", style: { flex: 1 }, children: t }),
1086
1086
  /* @__PURE__ */ e.jsxs("span", { className: "msj__rankingControls", style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
1087
- i && (m ? /* @__PURE__ */ e.jsx(ft, { size: 16 }) : /* @__PURE__ */ e.jsx(dt, { size: 16 })),
1087
+ i && (m ? /* @__PURE__ */ e.jsx(kt, { size: 16 }) : /* @__PURE__ */ e.jsx(pt, { size: 16 })),
1088
1088
  !i && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1089
1089
  o && a !== void 0 && a > 0 && /* @__PURE__ */ e.jsx(
1090
1090
  "button",
@@ -1095,10 +1095,10 @@ const he = ({
1095
1095
  b.stopPropagation(), o();
1096
1096
  },
1097
1097
  "aria-label": "Move up",
1098
- children: /* @__PURE__ */ e.jsx(tt, { size: 16 })
1098
+ children: /* @__PURE__ */ e.jsx(ot, { size: 16 })
1099
1099
  }
1100
1100
  ),
1101
- c && a !== void 0 && r !== void 0 && a < r - 1 && /* @__PURE__ */ e.jsx(
1101
+ c && a !== void 0 && s !== void 0 && a < s - 1 && /* @__PURE__ */ e.jsx(
1102
1102
  "button",
1103
1103
  {
1104
1104
  type: "button",
@@ -1107,7 +1107,7 @@ const he = ({
1107
1107
  b.stopPropagation(), c();
1108
1108
  },
1109
1109
  "aria-label": "Move down",
1110
- children: /* @__PURE__ */ e.jsx(Ze, { size: 16 })
1110
+ children: /* @__PURE__ */ e.jsx(lt, { size: 16 })
1111
1111
  }
1112
1112
  ),
1113
1113
  /* @__PURE__ */ e.jsx(
@@ -1123,21 +1123,21 @@ const he = ({
1123
1123
  alignItems: "center",
1124
1124
  padding: "4px"
1125
1125
  },
1126
- children: /* @__PURE__ */ e.jsx(rt, { size: 16, className: "msj__muted" })
1126
+ children: /* @__PURE__ */ e.jsx(mt, { size: 16, className: "msj__muted" })
1127
1127
  }
1128
1128
  )
1129
1129
  ] })
1130
1130
  ] })
1131
1131
  ] });
1132
1132
  return u ? /* @__PURE__ */ e.jsx(
1133
- _e.Item,
1133
+ ge.Item,
1134
1134
  {
1135
1135
  value: n,
1136
1136
  className: "msj__rankingItem",
1137
1137
  dragListener: !1,
1138
- dragControls: l,
1138
+ dragControls: r,
1139
1139
  onClick: i,
1140
- onKeyDown: p,
1140
+ onKeyDown: f,
1141
1141
  tabIndex: i ? 0 : void 0,
1142
1142
  role: i ? "button" : void 0,
1143
1143
  "aria-label": i ? `${m ? "Remove" : "Add"} ${t}` : void 0,
@@ -1146,14 +1146,14 @@ const he = ({
1146
1146
  touchAction: "none"
1147
1147
  // Important for drag to work reliably on mobile
1148
1148
  },
1149
- children: v
1149
+ children: p
1150
1150
  }
1151
1151
  ) : /* @__PURE__ */ e.jsx(
1152
1152
  "li",
1153
1153
  {
1154
1154
  className: "msj__rankingItem",
1155
1155
  onClick: i,
1156
- onKeyDown: p,
1156
+ onKeyDown: f,
1157
1157
  tabIndex: i ? 0 : void 0,
1158
1158
  role: i ? "button" : void 0,
1159
1159
  "aria-label": i ? `${m ? "Remove" : "Add"} ${t}` : void 0,
@@ -1161,37 +1161,37 @@ const he = ({
1161
1161
  cursor: i ? "pointer" : "default",
1162
1162
  touchAction: "none"
1163
1163
  },
1164
- children: v
1164
+ children: p
1165
1165
  }
1166
1166
  );
1167
1167
  };
1168
- function wt({ question: n, opts: t }) {
1169
- const a = n, r = R(n, t), i = t.validationSeq > 0 ? A(n) : [], o = a.visibleChoices ?? [], c = Array.isArray(n.value) ? n.value : [], m = a.selectToRankEnabled === !0, d = a.selectToRankAreasLayout || "horizontal", u = a.selectToRankEmptyRankedAreaText || "Drag items here to rank them", l = a.selectToRankEmptyUnrankedAreaText || "All items ranked", x = a.longTap === !0, h = m ? c : [.../* @__PURE__ */ new Set([...c, ...o.map((g) => g.value)])], j = m ? o.filter((g) => !c.includes(g.value)).map((g) => g.value) : [], p = (g) => {
1170
- S(n, g);
1171
- }, v = (g) => {
1168
+ function Pt({ question: n, opts: t }) {
1169
+ const a = n, s = E(n, t), i = t.validationSeq > 0 ? M(n) : [], o = a.visibleChoices ?? [], c = Array.isArray(n.value) ? n.value : [], m = a.selectToRankEnabled === !0, d = a.selectToRankAreasLayout || "horizontal", u = a.selectToRankEmptyRankedAreaText || "Drag items here to rank them", r = a.selectToRankEmptyUnrankedAreaText || "All items ranked", x = a.longTap === !0, h = m ? c : [.../* @__PURE__ */ new Set([...c, ...o.map((g) => g.value)])], j = m ? o.filter((g) => !c.includes(g.value)).map((g) => g.value) : [], f = (g) => {
1170
+ T(n, g);
1171
+ }, p = (g) => {
1172
1172
  const k = [...c, g];
1173
- S(n, k);
1173
+ T(n, k);
1174
1174
  }, b = (g) => {
1175
- const k = c.filter((E) => E !== g);
1176
- S(n, k);
1175
+ const k = c.filter((I) => I !== g);
1176
+ T(n, k);
1177
1177
  };
1178
- return /* @__PURE__ */ e.jsxs(T, { element: n, opts: t, children: [
1178
+ return /* @__PURE__ */ e.jsxs(C, { element: n, opts: t, children: [
1179
1179
  /* @__PURE__ */ e.jsxs("div", { className: "msj__label", children: [
1180
- r,
1180
+ s,
1181
1181
  n.isRequired ? /* @__PURE__ */ e.jsx("span", { "aria-hidden": !0, children: " *" }) : null
1182
1182
  ] }),
1183
1183
  m ? /* @__PURE__ */ e.jsxs("div", { className: `msj__rankingContainer msj__rankingContainer--${d}`, children: [
1184
1184
  /* @__PURE__ */ e.jsxs("div", { className: "msj__rankingArea", children: [
1185
1185
  /* @__PURE__ */ e.jsx("div", { className: "msj__rankingAreaTitle", children: "Choices" }),
1186
- j.length === 0 && /* @__PURE__ */ e.jsx("div", { className: "msj__rankingEmpty", children: l }),
1187
- /* @__PURE__ */ e.jsx(y.ul, { className: "msj__ranking", layout: !0, children: /* @__PURE__ */ e.jsx(D, { initial: !1, children: j.map((g) => {
1188
- const k = String(g), E = o.find((C) => C.value === g)?.text ?? k;
1189
- return /* @__PURE__ */ e.jsx(y.div, { layout: !0, initial: { opacity: 0, scale: 0.8 }, animate: { opacity: 1, scale: 1 }, exit: { opacity: 0, scale: 0.8 }, children: /* @__PURE__ */ e.jsx(
1190
- he,
1186
+ j.length === 0 && /* @__PURE__ */ e.jsx("div", { className: "msj__rankingEmpty", children: r }),
1187
+ /* @__PURE__ */ e.jsx(v.ul, { className: "msj__ranking", layout: !0, children: /* @__PURE__ */ e.jsx(V, { initial: !1, children: j.map((g) => {
1188
+ const k = String(g), I = o.find(($) => $.value === g)?.text ?? k;
1189
+ return /* @__PURE__ */ e.jsx(v.div, { layout: !0, initial: { opacity: 0, scale: 0.8 }, animate: { opacity: 1, scale: 1 }, exit: { opacity: 0, scale: 0.8 }, children: /* @__PURE__ */ e.jsx(
1190
+ _e,
1191
1191
  {
1192
1192
  value: g,
1193
- text: E,
1194
- onClick: () => v(g),
1193
+ text: I,
1194
+ onClick: () => p(g),
1195
1195
  isRanked: !1,
1196
1196
  longTap: x,
1197
1197
  enableDrag: !1
@@ -1202,13 +1202,13 @@ function wt({ question: n, opts: t }) {
1202
1202
  /* @__PURE__ */ e.jsxs("div", { className: "msj__rankingArea", children: [
1203
1203
  /* @__PURE__ */ e.jsx("div", { className: "msj__rankingAreaTitle", children: "Ranked" }),
1204
1204
  h.length === 0 && /* @__PURE__ */ e.jsx("div", { className: "msj__rankingEmpty", children: u }),
1205
- /* @__PURE__ */ e.jsx(_e.Group, { axis: "y", values: h, onReorder: p, className: "msj__ranking", children: /* @__PURE__ */ e.jsx(D, { initial: !1, children: h.map((g) => {
1206
- const k = String(g), E = o.find((C) => C.value === g)?.text ?? k;
1205
+ /* @__PURE__ */ e.jsx(ge.Group, { axis: "y", values: h, onReorder: f, className: "msj__ranking", children: /* @__PURE__ */ e.jsx(V, { initial: !1, children: h.map((g) => {
1206
+ const k = String(g), I = o.find(($) => $.value === g)?.text ?? k;
1207
1207
  return /* @__PURE__ */ e.jsx(
1208
- he,
1208
+ _e,
1209
1209
  {
1210
1210
  value: g,
1211
- text: E,
1211
+ text: I,
1212
1212
  onClick: () => b(g),
1213
1213
  isRanked: !0,
1214
1214
  longTap: x
@@ -1217,54 +1217,54 @@ function wt({ question: n, opts: t }) {
1217
1217
  );
1218
1218
  }) }) })
1219
1219
  ] })
1220
- ] }) : /* @__PURE__ */ e.jsx(_e.Group, { axis: "y", values: h, onReorder: p, className: "msj__ranking", children: h.map((g, k) => {
1221
- const E = String(g), C = o.find((I) => I.value === g)?.text ?? E, B = () => {
1220
+ ] }) : /* @__PURE__ */ e.jsx(ge.Group, { axis: "y", values: h, onReorder: f, className: "msj__ranking", children: h.map((g, k) => {
1221
+ const I = String(g), $ = o.find((P) => P.value === g)?.text ?? I, Q = () => {
1222
1222
  if (k > 0) {
1223
- const I = [...h], F = I[k];
1224
- I[k] = I[k - 1], I[k - 1] = F, p(I);
1223
+ const P = [...h], Y = P[k];
1224
+ P[k] = P[k - 1], P[k - 1] = Y, f(P);
1225
1225
  }
1226
- }, z = () => {
1226
+ }, K = () => {
1227
1227
  if (k < h.length - 1) {
1228
- const I = [...h], F = I[k];
1229
- I[k] = I[k + 1], I[k + 1] = F, p(I);
1228
+ const P = [...h], Y = P[k];
1229
+ P[k] = P[k + 1], P[k + 1] = Y, f(P);
1230
1230
  }
1231
1231
  };
1232
1232
  return /* @__PURE__ */ e.jsx(
1233
- he,
1233
+ _e,
1234
1234
  {
1235
1235
  value: g,
1236
- text: C,
1236
+ text: $,
1237
1237
  index: k,
1238
1238
  total: h.length,
1239
- onMoveUp: B,
1240
- onMoveDown: z,
1239
+ onMoveUp: Q,
1240
+ onMoveDown: K,
1241
1241
  longTap: x
1242
1242
  },
1243
- E
1243
+ I
1244
1244
  );
1245
1245
  }) }),
1246
- /* @__PURE__ */ e.jsx(P, { errors: i, opts: t })
1246
+ /* @__PURE__ */ e.jsx(L, { errors: i, opts: t })
1247
1247
  ] });
1248
1248
  }
1249
- async function St(n) {
1249
+ async function At(n) {
1250
1250
  const t = await new Promise((a) => {
1251
- const r = new FileReader();
1252
- r.onload = () => a(String(r.result ?? "")), r.readAsDataURL(n);
1251
+ const s = new FileReader();
1252
+ s.onload = () => a(String(s.result ?? "")), s.readAsDataURL(n);
1253
1253
  });
1254
1254
  return { name: n.name, type: n.type, content: t };
1255
1255
  }
1256
- function Tt({ question: n, opts: t }) {
1257
- const a = n, r = R(n, t), i = t.validationSeq > 0 ? A(n) : [], [o, c] = G(!1), m = async (d) => {
1258
- const u = await Promise.all(d.map(St));
1259
- S(n, a.allowMultiple === !0 ? u : u[0] ?? void 0);
1256
+ function Lt({ question: n, opts: t }) {
1257
+ const a = n, s = E(n, t), i = t.validationSeq > 0 ? M(n) : [], [o, c] = J(!1), m = async (d) => {
1258
+ const u = await Promise.all(d.map(At));
1259
+ T(n, a.allowMultiple === !0 ? u : u[0] ?? void 0);
1260
1260
  };
1261
- return /* @__PURE__ */ e.jsxs(T, { element: n, opts: t, children: [
1261
+ return /* @__PURE__ */ e.jsxs(C, { element: n, opts: t, children: [
1262
1262
  /* @__PURE__ */ e.jsxs("div", { className: "msj__label", children: [
1263
- r,
1263
+ s,
1264
1264
  n.isRequired ? /* @__PURE__ */ e.jsx("span", { "aria-hidden": !0, children: " *" }) : null
1265
1265
  ] }),
1266
1266
  /* @__PURE__ */ e.jsxs(
1267
- y.div,
1267
+ v.div,
1268
1268
  {
1269
1269
  className: "msj__fileDropZone",
1270
1270
  initial: !1,
@@ -1296,12 +1296,12 @@ function Tt({ question: n, opts: t }) {
1296
1296
  ]
1297
1297
  }
1298
1298
  ),
1299
- /* @__PURE__ */ e.jsx(P, { errors: i, opts: t })
1299
+ /* @__PURE__ */ e.jsx(L, { errors: i, opts: t })
1300
1300
  ] });
1301
1301
  }
1302
- function Ct({ question: n, opts: t }) {
1303
- const a = R(n, t), r = t.validationSeq > 0 ? A(n) : [], i = oe(null), o = oe(!1), [c, m] = G(0);
1304
- return ie(() => {
1302
+ function $t({ question: n, opts: t }) {
1303
+ const a = E(n, t), s = t.validationSeq > 0 ? M(n) : [], i = he(null), o = he(!1), [c, m] = J(0);
1304
+ return me(() => {
1305
1305
  const d = i.current;
1306
1306
  if (!d) return;
1307
1307
  let u = null;
@@ -1312,29 +1312,29 @@ function Ct({ question: n, opts: t }) {
1312
1312
  }
1313
1313
  if (!u) return;
1314
1314
  u.lineWidth = 2, u.lineCap = "round", u.strokeStyle = "rgba(15, 23, 42, 0.9)";
1315
- const l = (p) => {
1316
- const v = d.getBoundingClientRect(), b = d.width / v.width, g = d.height / v.height;
1315
+ const r = (f) => {
1316
+ const p = d.getBoundingClientRect(), b = d.width / p.width, g = d.height / p.height;
1317
1317
  return {
1318
- x: (p.clientX - v.left) * b,
1319
- y: (p.clientY - v.top) * g
1318
+ x: (f.clientX - p.left) * b,
1319
+ y: (f.clientY - p.top) * g
1320
1320
  };
1321
- }, x = (p) => {
1321
+ }, x = (f) => {
1322
1322
  o.current = !0;
1323
1323
  try {
1324
- d.setPointerCapture(p.pointerId);
1324
+ d.setPointerCapture(f.pointerId);
1325
1325
  } catch {
1326
1326
  }
1327
- const v = l(p);
1328
- u.beginPath(), u.moveTo(v.x, v.y);
1329
- }, h = (p) => {
1327
+ const p = r(f);
1328
+ u.beginPath(), u.moveTo(p.x, p.y);
1329
+ }, h = (f) => {
1330
1330
  if (!o.current) return;
1331
- const v = l(p);
1332
- u.lineTo(v.x, v.y), u.stroke();
1331
+ const p = r(f);
1332
+ u.lineTo(p.x, p.y), u.stroke();
1333
1333
  }, j = () => {
1334
1334
  if (o.current) {
1335
1335
  o.current = !1;
1336
1336
  try {
1337
- S(n, d.toDataURL("image/png"));
1337
+ T(n, d.toDataURL("image/png"));
1338
1338
  } catch {
1339
1339
  }
1340
1340
  }
@@ -1342,14 +1342,14 @@ function Ct({ question: n, opts: t }) {
1342
1342
  return d.addEventListener("pointerdown", x), d.addEventListener("pointermove", h), window.addEventListener("pointerup", j), () => {
1343
1343
  d.removeEventListener("pointerdown", x), d.removeEventListener("pointermove", h), window.removeEventListener("pointerup", j);
1344
1344
  };
1345
- }, [n, c]), /* @__PURE__ */ e.jsxs(T, { element: n, opts: t, children: [
1345
+ }, [n, c]), /* @__PURE__ */ e.jsxs(C, { element: n, opts: t, children: [
1346
1346
  /* @__PURE__ */ e.jsxs("div", { className: "msj__label", children: [
1347
1347
  a,
1348
1348
  n.isRequired ? /* @__PURE__ */ e.jsx("span", { "aria-hidden": !0, children: " *" }) : null
1349
1349
  ] }),
1350
1350
  /* @__PURE__ */ e.jsxs("div", { className: "msj__signaturePadWrap", children: [
1351
1351
  /* @__PURE__ */ e.jsx(
1352
- y.canvas,
1352
+ v.canvas,
1353
1353
  {
1354
1354
  ref: i,
1355
1355
  className: "msj__signaturePad",
@@ -1362,33 +1362,33 @@ function Ct({ question: n, opts: t }) {
1362
1362
  c
1363
1363
  ),
1364
1364
  /* @__PURE__ */ e.jsx(
1365
- y.button,
1365
+ v.button,
1366
1366
  {
1367
1367
  type: "button",
1368
1368
  className: "msj__miniButton",
1369
1369
  whileHover: { scale: 1.05 },
1370
1370
  whileTap: { scale: 0.95 },
1371
1371
  onClick: () => {
1372
- m((d) => d + 1), S(n, void 0);
1372
+ m((d) => d + 1), T(n, void 0);
1373
1373
  },
1374
1374
  children: "Clear"
1375
1375
  }
1376
1376
  )
1377
1377
  ] }),
1378
- /* @__PURE__ */ e.jsx(P, { errors: r, opts: t })
1378
+ /* @__PURE__ */ e.jsx(L, { errors: s, opts: t })
1379
1379
  ] });
1380
1380
  }
1381
- function Rt({
1381
+ function Mt({
1382
1382
  question: n,
1383
1383
  opts: t,
1384
1384
  render: a
1385
1385
  }) {
1386
- const r = n, i = R(n, t), o = r.panels ?? [];
1387
- return /* @__PURE__ */ e.jsxs(T, { element: n, opts: t, children: [
1386
+ const s = n, i = E(n, t), o = s.panels ?? [];
1387
+ return /* @__PURE__ */ e.jsxs(C, { element: n, opts: t, children: [
1388
1388
  /* @__PURE__ */ e.jsx("div", { className: "msj__label", children: i }),
1389
1389
  /* @__PURE__ */ e.jsxs("div", { className: "msj__panelDynamic", children: [
1390
- /* @__PURE__ */ e.jsx(D, { mode: "popLayout", children: o.map((c, m) => /* @__PURE__ */ e.jsxs(
1391
- y.div,
1390
+ /* @__PURE__ */ e.jsx(V, { mode: "popLayout", children: o.map((c, m) => /* @__PURE__ */ e.jsxs(
1391
+ v.div,
1392
1392
  {
1393
1393
  className: "msj__panelDynamicItem",
1394
1394
  initial: { opacity: 0, y: -10, scale: 0.98 },
@@ -1401,12 +1401,12 @@ function Rt({
1401
1401
  "Item ",
1402
1402
  m + 1
1403
1403
  ] }),
1404
- r.removePanel ? /* @__PURE__ */ e.jsx(
1405
- y.button,
1404
+ s.removePanel ? /* @__PURE__ */ e.jsx(
1405
+ v.button,
1406
1406
  {
1407
1407
  type: "button",
1408
1408
  className: "msj__miniButton",
1409
- onClick: () => r.removePanel?.(c),
1409
+ onClick: () => s.removePanel?.(c),
1410
1410
  whileHover: { scale: 1.05 },
1411
1411
  whileTap: { scale: 0.95 },
1412
1412
  children: "Remove"
@@ -1418,12 +1418,12 @@ function Rt({
1418
1418
  },
1419
1419
  c.name ?? m
1420
1420
  )) }),
1421
- r.addPanel ? /* @__PURE__ */ e.jsx(
1422
- y.button,
1421
+ s.addPanel ? /* @__PURE__ */ e.jsx(
1422
+ v.button,
1423
1423
  {
1424
1424
  type: "button",
1425
1425
  className: "msj__button",
1426
- onClick: () => r.addPanel?.(),
1426
+ onClick: () => s.addPanel?.(),
1427
1427
  whileHover: { scale: 1.02 },
1428
1428
  whileTap: { scale: 0.98 },
1429
1429
  transition: { type: "spring", stiffness: 400, damping: 25 },
@@ -1433,77 +1433,77 @@ function Rt({
1433
1433
  ] })
1434
1434
  ] });
1435
1435
  }
1436
- function Et({ question: n, opts: t }) {
1437
- const a = n, r = R(n, t), i = t.validationSeq > 0 ? A(n) : [], o = a.rows ?? a.visibleRows ?? [], c = a.columns ?? a.visibleColumns ?? [], m = n.value ?? {}, d = a.cellType === "checkbox";
1438
- return /* @__PURE__ */ e.jsxs(T, { element: n, opts: t, children: [
1436
+ function Ot({ question: n, opts: t }) {
1437
+ const a = n, s = E(n, t), i = t.validationSeq > 0 ? M(n) : [], o = a.rows ?? a.visibleRows ?? [], c = a.columns ?? a.visibleColumns ?? [], m = n.value ?? {}, d = a.cellType === "checkbox";
1438
+ return /* @__PURE__ */ e.jsxs(C, { element: n, opts: t, children: [
1439
1439
  /* @__PURE__ */ e.jsxs("div", { className: "msj__label", children: [
1440
- r,
1440
+ s,
1441
1441
  n.isRequired ? /* @__PURE__ */ e.jsx("span", { "aria-hidden": !0, children: " *" }) : null
1442
1442
  ] }),
1443
1443
  /* @__PURE__ */ e.jsxs("div", { className: "msj__matrix", style: { "--msj-matrix-cols": String(c.length) }, children: [
1444
1444
  /* @__PURE__ */ e.jsxs("div", { className: "msj__matrixHeader", "aria-hidden": !0, children: [
1445
1445
  /* @__PURE__ */ e.jsx("div", { className: "msj__matrixHeaderCell msj__matrixCorner" }),
1446
1446
  c.map((u) => {
1447
- const l = String(u.value);
1448
- return /* @__PURE__ */ e.jsx("div", { className: "msj__matrixHeaderCell", children: u.text ?? l }, l);
1447
+ const r = String(u.value);
1448
+ return /* @__PURE__ */ e.jsx("div", { className: "msj__matrixHeaderCell", children: u.text ?? r }, r);
1449
1449
  })
1450
1450
  ] }),
1451
1451
  o.map((u) => {
1452
- const l = String(u.value), x = u.text ?? l;
1452
+ const r = String(u.value), x = u.text ?? r;
1453
1453
  return /* @__PURE__ */ e.jsxs("div", { className: "msj__matrixRow", children: [
1454
1454
  /* @__PURE__ */ e.jsx("div", { className: "msj__matrixRowTitle", children: x }),
1455
1455
  d ? /* @__PURE__ */ e.jsx("div", { className: "msj__matrixRowChoices", children: c.map((h) => {
1456
- const j = String(h.value), p = Array.isArray(m[l]) ? m[l] : [], v = p.includes(h.value);
1457
- return /* @__PURE__ */ e.jsx("label", { className: "msj__matrixCell", "data-state": v ? "checked" : "unchecked", children: /* @__PURE__ */ e.jsx(
1458
- ce.Root,
1456
+ const j = String(h.value), f = Array.isArray(m[r]) ? m[r] : [], p = f.includes(h.value);
1457
+ return /* @__PURE__ */ e.jsx("label", { className: "msj__matrixCell", "data-state": p ? "checked" : "unchecked", children: /* @__PURE__ */ e.jsx(
1458
+ xe.Root,
1459
1459
  {
1460
1460
  className: "msj__checkbox",
1461
- checked: v,
1461
+ checked: p,
1462
1462
  onCheckedChange: (b) => {
1463
- const g = new Set(p);
1464
- b === !0 ? g.add(h.value) : g.delete(h.value), S(n, { ...m, [l]: Array.from(g) });
1463
+ const g = new Set(f);
1464
+ b === !0 ? g.add(h.value) : g.delete(h.value), T(n, { ...m, [r]: Array.from(g) });
1465
1465
  },
1466
- children: /* @__PURE__ */ e.jsx(ce.Indicator, { forceMount: !0, asChild: !0, children: /* @__PURE__ */ e.jsx(
1467
- y.span,
1466
+ children: /* @__PURE__ */ e.jsx(xe.Indicator, { forceMount: !0, asChild: !0, children: /* @__PURE__ */ e.jsx(
1467
+ v.span,
1468
1468
  {
1469
1469
  className: "msj__checkboxIndicator",
1470
1470
  initial: !1,
1471
- animate: v ? { opacity: 1, scale: 1 } : { opacity: 0, scale: 0.9 },
1471
+ animate: p ? { opacity: 1, scale: 1 } : { opacity: 0, scale: 0.9 },
1472
1472
  transition: { duration: Math.max(0.12, t.duration * 0.5) },
1473
- children: /* @__PURE__ */ e.jsx(Te, { active: v, duration: Math.max(0.22, t.duration * 1.2) })
1473
+ children: /* @__PURE__ */ e.jsx(Ie, { active: p, duration: Math.max(0.22, t.duration * 1.2) })
1474
1474
  }
1475
1475
  ) })
1476
1476
  }
1477
1477
  ) }, j);
1478
1478
  }) }) : /* @__PURE__ */ e.jsx(
1479
- V.Root,
1479
+ H.Root,
1480
1480
  {
1481
1481
  className: "msj__matrixRowChoices",
1482
- value: m[l] == null ? "" : String(m[l]),
1482
+ value: m[r] == null ? "" : String(m[r]),
1483
1483
  onValueChange: (h) => {
1484
- S(n, { ...m, [l]: h });
1484
+ T(n, { ...m, [r]: h });
1485
1485
  },
1486
1486
  children: c.map((h) => {
1487
- const j = String(h.value), p = h.text ?? j, v = String(m[l] ?? "") === j;
1488
- return /* @__PURE__ */ e.jsx(V.Item, { value: j, asChild: !0, children: /* @__PURE__ */ e.jsx(
1487
+ const j = String(h.value), f = h.text ?? j, p = String(m[r] ?? "") === j;
1488
+ return /* @__PURE__ */ e.jsx(H.Item, { value: j, asChild: !0, children: /* @__PURE__ */ e.jsx(
1489
1489
  "button",
1490
1490
  {
1491
1491
  type: "button",
1492
1492
  className: "msj__matrixCell",
1493
- "aria-label": `${x}: ${p}`,
1494
- "data-state": v ? "checked" : "unchecked",
1493
+ "aria-label": `${x}: ${f}`,
1494
+ "data-state": p ? "checked" : "unchecked",
1495
1495
  children: /* @__PURE__ */ e.jsxs("span", { className: "msj__radioItem", "aria-hidden": !0, children: [
1496
- /* @__PURE__ */ e.jsx(V.Indicator, { forceMount: !0, asChild: !0, children: /* @__PURE__ */ e.jsx(
1497
- y.span,
1496
+ /* @__PURE__ */ e.jsx(H.Indicator, { forceMount: !0, asChild: !0, children: /* @__PURE__ */ e.jsx(
1497
+ v.span,
1498
1498
  {
1499
1499
  className: "msj__radioIndicator",
1500
1500
  initial: !1,
1501
- animate: v ? { scale: 1, opacity: 1 } : { scale: 0, opacity: 0 },
1502
- transition: v ? { type: "spring", stiffness: 900, damping: 45 } : { duration: Math.max(0.12, t.duration * 0.4) }
1501
+ animate: p ? { scale: 1, opacity: 1 } : { scale: 0, opacity: 0 },
1502
+ transition: p ? { type: "spring", stiffness: 900, damping: 45 } : { duration: Math.max(0.12, t.duration * 0.4) }
1503
1503
  }
1504
1504
  ) }),
1505
- v ? /* @__PURE__ */ e.jsx(
1506
- y.span,
1505
+ p ? /* @__PURE__ */ e.jsx(
1506
+ v.span,
1507
1507
  {
1508
1508
  className: "msj__radioPulse",
1509
1509
  initial: { scale: 0.8, opacity: 0.28 },
@@ -1513,143 +1513,163 @@ function Et({ question: n, opts: t }) {
1513
1513
  ) : null
1514
1514
  ] })
1515
1515
  }
1516
- ) }, `${l}:${j}`);
1516
+ ) }, `${r}:${j}`);
1517
1517
  })
1518
1518
  }
1519
1519
  )
1520
- ] }, l);
1520
+ ] }, r);
1521
1521
  })
1522
1522
  ] }),
1523
- /* @__PURE__ */ e.jsx(P, { errors: i, opts: t })
1523
+ /* @__PURE__ */ e.jsx(L, { errors: i, opts: t })
1524
1524
  ] });
1525
1525
  }
1526
- function It({ question: n, opts: t }) {
1527
- const a = R(n, t);
1528
- return /* @__PURE__ */ e.jsxs(T, { element: n, opts: t, children: [
1526
+ function Dt({ question: n, opts: t }) {
1527
+ const a = E(n, t);
1528
+ return /* @__PURE__ */ e.jsxs(C, { element: n, opts: t, children: [
1529
1529
  /* @__PURE__ */ e.jsx("div", { className: "msj__label", children: a }),
1530
1530
  /* @__PURE__ */ e.jsx("div", { className: "msj__unsupported", children: "Matrix Dropdown is not yet fully supported." })
1531
1531
  ] });
1532
1532
  }
1533
- function Pt({ question: n, opts: t }) {
1534
- const a = R(n, t);
1535
- return /* @__PURE__ */ e.jsxs(T, { element: n, opts: t, children: [
1533
+ function Ft({ question: n, opts: t }) {
1534
+ const a = E(n, t);
1535
+ return /* @__PURE__ */ e.jsxs(C, { element: n, opts: t, children: [
1536
1536
  /* @__PURE__ */ e.jsx("div", { className: "msj__label", children: a }),
1537
1537
  /* @__PURE__ */ e.jsx("div", { className: "msj__unsupported", children: "Matrix Dynamic is not yet fully supported." })
1538
1538
  ] });
1539
1539
  }
1540
- function xe({
1540
+ function fe({
1541
1541
  element: n,
1542
1542
  opts: t,
1543
1543
  render: a
1544
1544
  }) {
1545
- const r = n, i = r.elements ?? [];
1546
- return /* @__PURE__ */ e.jsxs(T, { element: n, opts: t, children: [
1547
- r.title ? /* @__PURE__ */ e.jsx("div", { className: "msj__label", children: r.title }) : null,
1545
+ const s = n, i = s.elements ?? [];
1546
+ return /* @__PURE__ */ e.jsxs(C, { element: n, opts: t, children: [
1547
+ s.title ? /* @__PURE__ */ e.jsx("div", { className: "msj__label", children: s.title }) : null,
1548
1548
  /* @__PURE__ */ e.jsx("div", { className: "msj__panel", children: i.map((o, c) => {
1549
1549
  const m = typeof o.getType == "function" ? o.getType() : "unknown", d = o.name ?? `${m}-${c}`;
1550
1550
  return /* @__PURE__ */ e.jsx("div", { children: a(o, t) }, d);
1551
1551
  }) })
1552
1552
  ] });
1553
1553
  }
1554
- function Z(n, t) {
1554
+ function re(n, t) {
1555
1555
  const a = typeof n.getType == "function" ? n.getType() : "unknown";
1556
- if (!(n instanceof ue))
1556
+ if (!(n instanceof je))
1557
1557
  switch (a) {
1558
1558
  case "flowpanel":
1559
- return /* @__PURE__ */ e.jsx(xe, { element: n, opts: t, render: Z });
1559
+ return /* @__PURE__ */ e.jsx(fe, { element: n, opts: t, render: re });
1560
1560
  case "page":
1561
- return /* @__PURE__ */ e.jsx(xe, { element: n, opts: t, render: Z });
1561
+ return /* @__PURE__ */ e.jsx(fe, { element: n, opts: t, render: re });
1562
1562
  default:
1563
- return /* @__PURE__ */ e.jsx(xe, { element: n, opts: t, render: Z });
1563
+ return /* @__PURE__ */ e.jsx(fe, { element: n, opts: t, render: re });
1564
1564
  }
1565
- const r = n;
1565
+ const s = n;
1566
1566
  switch (a) {
1567
1567
  case "comment":
1568
- return /* @__PURE__ */ e.jsx(De, { question: r, opts: t });
1568
+ return /* @__PURE__ */ e.jsx(We, { question: s, opts: t });
1569
1569
  case "boolean":
1570
- return /* @__PURE__ */ e.jsx(Ve, { question: r, opts: t });
1570
+ return /* @__PURE__ */ e.jsx(Ue, { question: s, opts: t });
1571
1571
  case "radiogroup":
1572
- return /* @__PURE__ */ e.jsx(Ne, { question: r, isMulti: !1, opts: t });
1572
+ return /* @__PURE__ */ e.jsx(Se, { question: s, isMulti: !1, opts: t });
1573
1573
  case "checkbox":
1574
- return /* @__PURE__ */ e.jsx(Ne, { question: r, isMulti: !0, opts: t });
1574
+ return /* @__PURE__ */ e.jsx(Se, { question: s, isMulti: !0, opts: t });
1575
1575
  case "dropdown":
1576
- return /* @__PURE__ */ e.jsx(Be, { question: r, opts: t });
1576
+ return /* @__PURE__ */ e.jsx(ze, { question: s, opts: t });
1577
1577
  case "tagbox":
1578
- return /* @__PURE__ */ e.jsx(kt, { question: r, opts: t });
1578
+ return /* @__PURE__ */ e.jsx(It, { question: s, opts: t });
1579
1579
  case "buttongroup":
1580
- return /* @__PURE__ */ e.jsx(Nt, { question: r, opts: t });
1580
+ return /* @__PURE__ */ e.jsx(Et, { question: s, opts: t });
1581
1581
  case "ranking":
1582
- return /* @__PURE__ */ e.jsx(wt, { question: r, opts: t });
1582
+ return /* @__PURE__ */ e.jsx(Pt, { question: s, opts: t });
1583
1583
  case "imagepicker":
1584
- return /* @__PURE__ */ e.jsx(bt, { question: r, opts: t });
1584
+ return /* @__PURE__ */ e.jsx(Rt, { question: s, opts: t });
1585
1585
  case "file":
1586
- return /* @__PURE__ */ e.jsx(Tt, { question: r, opts: t });
1586
+ return /* @__PURE__ */ e.jsx(Lt, { question: s, opts: t });
1587
1587
  case "signaturepad":
1588
- return /* @__PURE__ */ e.jsx(Ct, { question: r, opts: t });
1588
+ return /* @__PURE__ */ e.jsx($t, { question: s, opts: t });
1589
1589
  case "paneldynamic":
1590
- return /* @__PURE__ */ e.jsx(Rt, { question: r, opts: t, render: Z });
1590
+ return /* @__PURE__ */ e.jsx(Mt, { question: s, opts: t, render: re });
1591
1591
  case "matrix":
1592
- return /* @__PURE__ */ e.jsx(Et, { question: r, opts: t });
1592
+ return /* @__PURE__ */ e.jsx(Ot, { question: s, opts: t });
1593
1593
  case "matrixdropdown":
1594
- return /* @__PURE__ */ e.jsx(It, { question: r, opts: t });
1594
+ return /* @__PURE__ */ e.jsx(Dt, { question: s, opts: t });
1595
1595
  case "matrixdynamic":
1596
- return /* @__PURE__ */ e.jsx(Pt, { question: r, opts: t });
1596
+ return /* @__PURE__ */ e.jsx(Ft, { question: s, opts: t });
1597
1597
  case "html":
1598
- return /* @__PURE__ */ e.jsx(Fe, { question: r, opts: t });
1598
+ return /* @__PURE__ */ e.jsx(Ge, { question: s, opts: t });
1599
1599
  case "image":
1600
- return /* @__PURE__ */ e.jsx(Qe, { question: r, opts: t });
1600
+ return /* @__PURE__ */ e.jsx(Xe, { question: s, opts: t });
1601
1601
  case "expression":
1602
- return /* @__PURE__ */ e.jsx(Ye, { question: r, opts: t });
1602
+ return /* @__PURE__ */ e.jsx(Je, { question: s, opts: t });
1603
1603
  case "empty":
1604
- return /* @__PURE__ */ e.jsx(He, { question: r, opts: t });
1604
+ return /* @__PURE__ */ e.jsx(Ke, { question: s, opts: t });
1605
1605
  case "rating":
1606
- return /* @__PURE__ */ e.jsx(gt, { question: r, opts: t });
1606
+ return /* @__PURE__ */ e.jsx(Tt, { question: s, opts: t });
1607
1607
  case "multipletext":
1608
- return /* @__PURE__ */ e.jsx(yt, { question: r, opts: t });
1608
+ return /* @__PURE__ */ e.jsx(Ct, { question: s, opts: t });
1609
1609
  case "text":
1610
1610
  default:
1611
- return /* @__PURE__ */ e.jsx(Oe, { question: r, opts: t });
1611
+ return /* @__PURE__ */ e.jsx(Ye, { question: s, opts: t });
1612
1612
  }
1613
1613
  }
1614
- const At = "Previous", Lt = "Next", $t = "Complete", Mt = "Thanks!", Ot = "Your responses have been recorded.", Dt = "Select…", Vt = "{count}/{max} words", Bt = "Page {current} of {total}", Ft = {
1615
- back: At,
1616
- next: Lt,
1617
- complete: $t,
1618
- thanksTitle: Mt,
1619
- thanksHint: Ot,
1620
- selectPlaceholder: Dt,
1621
- wordCount: Vt,
1622
- pageXofY: Bt
1623
- }, Qt = "Previous", Yt = "Next", Ht = "Complete", Ut = "Thanks!", Wt = "Your responses have been recorded.", Gt = "Select…", zt = "{count}/{max} words", Xt = "Page {current} of {total}", Jt = {
1624
- back: Qt,
1625
- next: Yt,
1614
+ function Ce({ survey: n }) {
1615
+ const t = n.logo;
1616
+ if (!t) return null;
1617
+ const a = n.logoWidth, s = n.logoHeight, i = n.logoFit ?? "contain", o = n.logoPosition ?? "left";
1618
+ if (o === "none") return null;
1619
+ const c = {
1620
+ objectFit: i,
1621
+ width: a ? typeof a == "number" ? `${a}px` : a : void 0,
1622
+ height: s ? typeof s == "number" ? `${s}px` : s : void 0
1623
+ };
1624
+ return /* @__PURE__ */ e.jsx(
1625
+ "img",
1626
+ {
1627
+ src: t,
1628
+ alt: "Survey Logo",
1629
+ className: `msj__logo msj__logo--${o}`,
1630
+ style: c
1631
+ }
1632
+ );
1633
+ }
1634
+ const Bt = "Previous", Vt = "Next", Ht = "Complete", Qt = "Thanks!", Yt = "Your responses have been recorded.", Wt = "Select…", Ut = "{count}/{max} words", zt = "Page {current} of {total}", Gt = {
1635
+ back: Bt,
1636
+ next: Vt,
1626
1637
  complete: Ht,
1627
- thanksTitle: Ut,
1628
- thanksHint: Wt,
1629
- selectPlaceholder: Gt,
1630
- wordCount: zt,
1631
- pageXofY: Xt
1632
- }, we = {
1633
- "en-US": Jt,
1634
- "en-GB": Ft
1638
+ thanksTitle: Qt,
1639
+ thanksHint: Yt,
1640
+ selectPlaceholder: Wt,
1641
+ wordCount: Ut,
1642
+ pageXofY: zt
1643
+ }, Xt = "Previous", Jt = "Next", Kt = "Complete", qt = "Thanks!", Zt = "Your responses have been recorded.", en = "Select…", tn = "{count}/{max} words", nn = "Page {current} of {total}", an = {
1644
+ back: Xt,
1645
+ next: Jt,
1646
+ complete: Kt,
1647
+ thanksTitle: qt,
1648
+ thanksHint: Zt,
1649
+ selectPlaceholder: en,
1650
+ wordCount: tn,
1651
+ pageXofY: nn
1652
+ }, Re = {
1653
+ "en-US": an,
1654
+ "en-GB": Gt
1635
1655
  };
1636
- function Kt(n) {
1637
- return we[n ?? "en-US"] ?? we["en-US"];
1656
+ function sn(n) {
1657
+ return Re[n ?? "en-US"] ?? Re["en-US"];
1638
1658
  }
1639
- function qt({
1659
+ function rn({
1640
1660
  locale: n,
1641
1661
  messages: t
1642
1662
  }) {
1643
- const r = { ...Kt(n), ...t ?? {} };
1663
+ const s = { ...sn(n), ...t ?? {} };
1644
1664
  return (i, o) => {
1645
- let c = r[i] ?? i;
1665
+ let c = s[i] ?? i;
1646
1666
  if (o)
1647
1667
  for (const [m, d] of Object.entries(o))
1648
1668
  c = c.replaceAll(`{${m}}`, String(d));
1649
1669
  return c;
1650
1670
  };
1651
1671
  }
1652
- function Zt() {
1672
+ function ln() {
1653
1673
  return /* @__PURE__ */ e.jsx(
1654
1674
  "svg",
1655
1675
  {
@@ -1673,7 +1693,7 @@ function Zt() {
1673
1693
  }
1674
1694
  );
1675
1695
  }
1676
- function en() {
1696
+ function on() {
1677
1697
  return /* @__PURE__ */ e.jsx(
1678
1698
  "svg",
1679
1699
  {
@@ -1697,11 +1717,11 @@ function en() {
1697
1717
  }
1698
1718
  );
1699
1719
  }
1700
- function sn({
1720
+ function mn({
1701
1721
  json: n,
1702
1722
  model: t,
1703
1723
  data: a,
1704
- onComplete: r,
1724
+ onComplete: s,
1705
1725
  animate: i = !0,
1706
1726
  animationDurationMs: o = 180,
1707
1727
  theme: c = "modern",
@@ -1709,93 +1729,107 @@ function sn({
1709
1729
  messages: d,
1710
1730
  className: u
1711
1731
  }) {
1712
- const l = pe(() => {
1732
+ const r = ye(() => {
1713
1733
  if (t) return t;
1714
- const s = n ?? {}, _ = s.showQuestionNumbers === void 0 ? { ...s, showQuestionNumbers: "onPage" } : s, f = new Ee(_);
1715
- return a && (f.data = a), f;
1716
- }, [t, n, a]), [, x] = ve((s) => s + 1, 0), [h, j] = ve(
1717
- (s, _) => _.type === "setPage" ? { pageName: _.pageName, seq: 0 } : s.pageName !== _.pageName ? { pageName: _.pageName, seq: 1 } : { pageName: s.pageName, seq: s.seq + 1 },
1734
+ const _ = n ?? {}, S = _.showQuestionNumbers === void 0 ? { ..._, showQuestionNumbers: "onPage" } : _, N = new Oe(S);
1735
+ return a && (N.data = a), N;
1736
+ }, [t, n, a]), [, x] = be((_) => _ + 1, 0), [h, j] = be(
1737
+ (_, S) => S.type === "setPage" ? { pageName: S.pageName, seq: 0 } : _.pageName !== S.pageName ? { pageName: S.pageName, seq: 1 } : { pageName: _.pageName, seq: _.seq + 1 },
1718
1738
  { pageName: null, seq: 0 }
1719
- ), p = oe(null), v = o / 1e3, b = pe(() => qt({ locale: m, messages: d }), [m, d]), [g, k] = G(null), E = [
1739
+ ), f = he(null), p = o / 1e3, b = ye(() => rn({ locale: m, messages: d }), [m, d]), [g, k] = J(null), I = [
1720
1740
  "msj",
1721
1741
  c ? `msj--theme-${c}` : null,
1722
1742
  u
1723
- ].filter(Boolean).join(" ");
1724
- if (ie(() => {
1725
- const s = () => x(), _ = () => {
1726
- j({ type: "setPage", pageName: l.currentPage?.name ?? null }), s();
1727
- }, f = () => {
1728
- r?.(l.data, l), s();
1743
+ ].filter(Boolean).join(" "), $ = r.logoPosition ?? "left", Q = r.backgroundImage, K = r.backgroundImageFit ?? "auto", P = r.backgroundImageAttachment ?? "scroll", Y = r.backgroundOpacity ?? 1, U = Q ? {
1744
+ backgroundImage: `url(${Q})`,
1745
+ backgroundSize: K,
1746
+ backgroundAttachment: P,
1747
+ opacity: Y
1748
+ } : void 0;
1749
+ if (me(() => {
1750
+ const _ = () => x(), S = () => {
1751
+ j({ type: "setPage", pageName: r.currentPage?.name ?? null }), _();
1752
+ }, N = () => {
1753
+ s?.(r.data, r), _();
1729
1754
  };
1730
- return l.onValueChanged.add(s), l.onCurrentPageChanged.add(_), l.onComplete.add(f), () => {
1731
- l.onValueChanged.remove(s), l.onCurrentPageChanged.remove(_), l.onComplete.remove(f);
1755
+ return r.onValueChanged.add(_), r.onCurrentPageChanged.add(S), r.onComplete.add(N), () => {
1756
+ r.onValueChanged.remove(_), r.onCurrentPageChanged.remove(S), r.onComplete.remove(N);
1732
1757
  };
1733
- }, [l, r]), ie(() => {
1734
- const s = p.current;
1735
- if (!s) return;
1736
- p.current = null;
1737
- const _ = typeof window < "u" && window.CSS && typeof window.CSS.escape == "function" ? window.CSS.escape : (L) => L.replaceAll('"', '\\"'), f = document.querySelector(`[data-msj-question="${_(s)}"]`);
1738
- if (!f) return;
1739
- const N = f.querySelector(
1758
+ }, [r, s]), me(() => {
1759
+ const _ = f.current;
1760
+ if (!_) return;
1761
+ f.current = null;
1762
+ const S = typeof window < "u" && window.CSS && typeof window.CSS.escape == "function" ? window.CSS.escape : (W) => W.replaceAll('"', '\\"'), N = document.querySelector(`[data-msj-question="${S(_)}"]`);
1763
+ if (!N) return;
1764
+ const A = N.querySelector(
1740
1765
  'input, textarea, select, button, [tabindex]:not([tabindex="-1"])'
1741
1766
  );
1742
1767
  try {
1743
- f.scrollIntoView({ behavior: "smooth", block: "center" });
1768
+ N.scrollIntoView({ behavior: "smooth", block: "center" });
1744
1769
  } catch {
1745
- f.scrollIntoView();
1770
+ N.scrollIntoView();
1746
1771
  }
1747
- N?.focus({ preventScroll: !0 });
1748
- }), l.state === "completed")
1749
- return /* @__PURE__ */ e.jsx("div", { className: E, children: /* @__PURE__ */ e.jsxs("div", { className: "msj__card", children: [
1750
- /* @__PURE__ */ e.jsx("h2", { className: "msj__title", children: b("thanksTitle") }),
1751
- /* @__PURE__ */ e.jsx("div", { className: "msj__hint", children: b("thanksHint") })
1772
+ A?.focus({ preventScroll: !0 });
1773
+ }), r.state === "loading") {
1774
+ const _ = r.loadingHtml;
1775
+ return /* @__PURE__ */ e.jsx("div", { className: I, children: /* @__PURE__ */ e.jsx("div", { className: "msj__card", children: _ ? /* @__PURE__ */ e.jsx("div", { dangerouslySetInnerHTML: { __html: _ } }) : /* @__PURE__ */ e.jsx("div", { className: "msj__hint", children: "Loading..." }) }) });
1776
+ }
1777
+ if (r.state === "completed") {
1778
+ const _ = r.completedHtml, S = r.completedBeforeHtml;
1779
+ return /* @__PURE__ */ e.jsx("div", { className: I, children: /* @__PURE__ */ e.jsxs("div", { className: "msj__card", children: [
1780
+ S ? /* @__PURE__ */ e.jsx("div", { dangerouslySetInnerHTML: { __html: S } }) : null,
1781
+ _ ? /* @__PURE__ */ e.jsx("div", { dangerouslySetInnerHTML: { __html: _ } }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1782
+ /* @__PURE__ */ e.jsx("h2", { className: "msj__title", children: b("thanksTitle") }),
1783
+ /* @__PURE__ */ e.jsx("div", { className: "msj__hint", children: b("thanksHint") })
1784
+ ] })
1752
1785
  ] }) });
1753
- const C = l.currentPage, B = C?.questions ?? [], z = C?.elements ?? B, I = h.pageName === (C?.name ?? null) ? h.seq : 0, F = l.showPageTitles !== !1, U = l.showPageNumbers === !0, Q = l.showQuestionNumbers, de = Q === !0 ? "on" : Q === !1 ? "off" : Q === "off" || Q === "on" || Q === "onPage" ? Q : "onPage", W = l.navigationButtonsLocation ?? "bottom", ee = l.showNavigationButtons !== !1, te = C?.navigationButtonsVisibility ?? "inherit", H = te === "hide" ? !1 : te === "show" ? !0 : ee, ne = l.showPrevButton !== !1, ae = H && ne && !l.isFirstPage, se = H && !l.isLastPage, re = H && l.isLastPage, X = (s) => W === "topBottom" || W === s ? /* @__PURE__ */ e.jsxs("div", { className: s === "top" ? "msj__nav msj__nav--top" : "msj__nav", children: [
1754
- /* @__PURE__ */ e.jsx("div", { className: "msj__navSlot msj__navSlot--left", children: /* @__PURE__ */ e.jsx(D, { initial: !1, children: ae ? /* @__PURE__ */ e.jsxs(
1755
- y.button,
1786
+ }
1787
+ const O = r.currentPage, q = O?.questions ?? [], Z = O?.elements ?? q, le = h.pageName === (O?.name ?? null) ? h.seq : 0, ie = r.showPageTitles !== !1, z = r.showPageNumbers === !0, B = r.showQuestionNumbers, oe = B === !0 ? "on" : B === !1 ? "off" : B === "off" || B === "on" || B === "onPage" ? B : "onPage", ee = r.navigationButtonsLocation ?? "bottom", ce = r.showNavigationButtons !== !1, te = O?.navigationButtonsVisibility ?? "inherit", l = te === "hide" ? !1 : te === "show" ? !0 : ce, y = r.showPrevButton !== !1, w = l && y && !r.isFirstPage, R = l && !r.isLastPage, G = l && r.isLastPage, X = (_) => ee === "topBottom" || ee === _ ? /* @__PURE__ */ e.jsxs("div", { className: _ === "top" ? "msj__nav msj__nav--top" : "msj__nav", children: [
1788
+ /* @__PURE__ */ e.jsx("div", { className: "msj__navSlot msj__navSlot--left", children: /* @__PURE__ */ e.jsx(V, { initial: !1, children: w ? /* @__PURE__ */ e.jsxs(
1789
+ v.button,
1756
1790
  {
1757
1791
  type: "button",
1758
1792
  className: "msj__button msj__button--nav",
1759
1793
  onClick: () => {
1760
- l.prevPage(), x();
1794
+ r.prevPage(), x();
1761
1795
  },
1762
1796
  initial: i ? { opacity: 0, x: -6 } : !1,
1763
1797
  animate: i ? { opacity: 1, x: 0 } : void 0,
1764
1798
  exit: i ? { opacity: 0, x: -6 } : void 0,
1765
- transition: { duration: v },
1799
+ transition: { duration: p },
1766
1800
  whileHover: i ? { x: -2 } : void 0,
1767
1801
  whileTap: i ? { scale: 0.98 } : void 0,
1768
1802
  children: [
1769
- /* @__PURE__ */ e.jsx(Zt, {}),
1803
+ /* @__PURE__ */ e.jsx(ln, {}),
1770
1804
  b("back")
1771
1805
  ]
1772
1806
  },
1773
1807
  "prev"
1774
1808
  ) : null }) }),
1775
- /* @__PURE__ */ e.jsx("div", { className: "msj__navSlot msj__navSlot--center", children: /* @__PURE__ */ e.jsx(D, { initial: !1, children: re ? /* @__PURE__ */ e.jsx(
1776
- y.button,
1809
+ /* @__PURE__ */ e.jsx("div", { className: "msj__navSlot msj__navSlot--center", children: /* @__PURE__ */ e.jsx(V, { initial: !1, children: G ? /* @__PURE__ */ e.jsx(
1810
+ v.button,
1777
1811
  {
1778
1812
  type: "button",
1779
1813
  className: "msj__button msj__button--primary msj__button--complete",
1780
1814
  onClick: () => {
1781
- let f = !1;
1815
+ let N = !1;
1782
1816
  try {
1783
- f = l.validateCurrentPage();
1817
+ N = r.validateCurrentPage();
1784
1818
  } catch {
1785
- f = !1;
1819
+ N = !1;
1786
1820
  }
1787
- if (!f) {
1788
- const N = B.find((L) => L.hasErrors());
1789
- p.current = N?.name ?? null, j({ type: "bump", pageName: C?.name ?? null }), x();
1821
+ if (!N) {
1822
+ const A = q.find((W) => W.hasErrors());
1823
+ f.current = A?.name ?? null, j({ type: "bump", pageName: O?.name ?? null }), x();
1790
1824
  return;
1791
1825
  }
1792
- l.tryComplete(), x();
1826
+ r.tryComplete(), x();
1793
1827
  },
1794
1828
  initial: i ? { opacity: 0, y: 6, scale: 0.98 } : !1,
1795
1829
  animate: i ? { opacity: 1, y: 0, scale: 1 } : void 0,
1796
1830
  exit: i ? { opacity: 0, y: 6, scale: 0.98 } : void 0,
1797
1831
  transition: {
1798
- duration: v,
1832
+ duration: p,
1799
1833
  x: { type: "tween", duration: 0.32, ease: "easeInOut" },
1800
1834
  rotate: { type: "tween", duration: 0.32, ease: "easeInOut" }
1801
1835
  },
@@ -1808,98 +1842,103 @@ function sn({
1808
1842
  },
1809
1843
  "complete"
1810
1844
  ) : null }) }),
1811
- /* @__PURE__ */ e.jsx("div", { className: "msj__navSlot msj__navSlot--right", children: /* @__PURE__ */ e.jsx(D, { initial: !1, children: se ? /* @__PURE__ */ e.jsxs(
1812
- y.button,
1845
+ /* @__PURE__ */ e.jsx("div", { className: "msj__navSlot msj__navSlot--right", children: /* @__PURE__ */ e.jsx(V, { initial: !1, children: R ? /* @__PURE__ */ e.jsxs(
1846
+ v.button,
1813
1847
  {
1814
1848
  type: "button",
1815
1849
  className: "msj__button msj__button--primary msj__button--navPrimary",
1816
1850
  onClick: () => {
1817
- let f = !1;
1851
+ let N = !1;
1818
1852
  try {
1819
- f = l.validateCurrentPage();
1853
+ N = r.validateCurrentPage();
1820
1854
  } catch {
1821
- f = !1;
1855
+ N = !1;
1822
1856
  }
1823
- if (!f) {
1824
- const N = B.find((L) => L.hasErrors());
1825
- p.current = N?.name ?? null, j({ type: "bump", pageName: C?.name ?? null }), x();
1857
+ if (!N) {
1858
+ const A = q.find((W) => W.hasErrors());
1859
+ f.current = A?.name ?? null, j({ type: "bump", pageName: O?.name ?? null }), x();
1826
1860
  return;
1827
1861
  }
1828
- l.nextPage(), x();
1862
+ r.nextPage(), x();
1829
1863
  },
1830
1864
  initial: i ? { opacity: 0, x: 6 } : !1,
1831
1865
  animate: i ? { opacity: 1, x: 0 } : void 0,
1832
1866
  exit: i ? { opacity: 0, x: 6 } : void 0,
1833
- transition: { duration: v },
1867
+ transition: { duration: p },
1834
1868
  whileHover: i ? { x: 2 } : void 0,
1835
1869
  whileTap: i ? { scale: 0.98 } : void 0,
1836
1870
  children: [
1837
1871
  b("next"),
1838
- /* @__PURE__ */ e.jsx(en, {})
1872
+ /* @__PURE__ */ e.jsx(on, {})
1839
1873
  ]
1840
1874
  },
1841
1875
  "next"
1842
1876
  ) : null }) })
1843
1877
  ] }) : null;
1844
- return /* @__PURE__ */ e.jsx("div", { className: E, ref: k, children: /* @__PURE__ */ e.jsxs("div", { className: "msj__card", children: [
1845
- l.title ? /* @__PURE__ */ e.jsx("h2", { className: "msj__title", children: l.title }) : null,
1846
- X("top"),
1847
- /* @__PURE__ */ e.jsx(D, { mode: "wait", initial: !1, children: /* @__PURE__ */ e.jsxs(
1848
- y.div,
1849
- {
1850
- initial: i ? { opacity: 0, y: 8 } : !1,
1851
- animate: i ? { opacity: 1, y: 0 } : void 0,
1852
- exit: i ? { opacity: 0, y: -8 } : void 0,
1853
- transition: { duration: v },
1854
- children: [
1855
- F || U ? /* @__PURE__ */ e.jsxs("div", { className: "msj__pageHeader", children: [
1856
- F && C?.title ? /* @__PURE__ */ e.jsx("div", { className: "msj__pageTitle", children: C.title }) : null,
1857
- U ? /* @__PURE__ */ e.jsx("div", { className: "msj__pageNumber", children: b("pageXofY", {
1858
- current: (l.currentPageNo ?? 0) + 1,
1859
- total: l.pages?.length ?? 0
1860
- }) }) : null
1861
- ] }) : null,
1862
- (() => {
1863
- const s = (l.pages ?? []).slice(0, l.currentPageNo ?? 0).reduce((f, N) => f + (N.questions ?? []).length, 0);
1864
- return z.reduce(
1865
- (f, N, L) => {
1866
- const O = typeof N.getType == "function" ? N.getType() : "unknown", w = N instanceof ue && O !== "html" && O !== "image" && O !== "expression" && O !== "empty", Y = w ? f.pageQuestionIndex : -1, J = w ? f.globalQuestionIndex : -1, me = N.name ?? `${O}-${L}`;
1867
- return {
1868
- items: [
1869
- ...f.items,
1870
- /* @__PURE__ */ e.jsx("div", { children: Z(
1871
- N,
1872
- {
1873
- animate: i,
1874
- duration: v,
1875
- t: b,
1876
- validationSeq: I,
1877
- questionIndex: Y,
1878
- globalQuestionIndex: J,
1879
- showQuestionNumbers: de,
1880
- portalContainer: g
1881
- }
1882
- ) }, me)
1883
- ],
1884
- pageQuestionIndex: w ? f.pageQuestionIndex + 1 : f.pageQuestionIndex,
1885
- globalQuestionIndex: w ? f.globalQuestionIndex + 1 : f.globalQuestionIndex
1886
- };
1887
- },
1888
- {
1889
- items: [],
1890
- pageQuestionIndex: 0,
1891
- globalQuestionIndex: s
1892
- }
1893
- ).items;
1894
- })()
1895
- ]
1896
- },
1897
- C?.name ?? "page"
1898
- ) }),
1899
- X("bottom")
1900
- ] }) });
1878
+ return /* @__PURE__ */ e.jsxs("div", { className: I, ref: k, children: [
1879
+ U ? /* @__PURE__ */ e.jsx("div", { className: "msj__background", style: U }) : null,
1880
+ /* @__PURE__ */ e.jsxs("div", { className: "msj__card", children: [
1881
+ $ !== "bottom" ? /* @__PURE__ */ e.jsx(Ce, { survey: r }) : null,
1882
+ r.title ? /* @__PURE__ */ e.jsx("h2", { className: "msj__title", children: r.title }) : null,
1883
+ X("top"),
1884
+ /* @__PURE__ */ e.jsx(V, { mode: "wait", initial: !1, children: /* @__PURE__ */ e.jsxs(
1885
+ v.div,
1886
+ {
1887
+ initial: i ? { opacity: 0, y: 8 } : !1,
1888
+ animate: i ? { opacity: 1, y: 0 } : void 0,
1889
+ exit: i ? { opacity: 0, y: -8 } : void 0,
1890
+ transition: { duration: p },
1891
+ children: [
1892
+ ie || z ? /* @__PURE__ */ e.jsxs("div", { className: "msj__pageHeader", children: [
1893
+ ie && O?.title ? /* @__PURE__ */ e.jsx("div", { className: "msj__pageTitle", children: O.title }) : null,
1894
+ z ? /* @__PURE__ */ e.jsx("div", { className: "msj__pageNumber", children: b("pageXofY", {
1895
+ current: (r.currentPageNo ?? 0) + 1,
1896
+ total: r.pages?.length ?? 0
1897
+ }) }) : null
1898
+ ] }) : null,
1899
+ (() => {
1900
+ const _ = (r.pages ?? []).slice(0, r.currentPageNo ?? 0).reduce((N, A) => N + (A.questions ?? []).length, 0);
1901
+ return Z.reduce(
1902
+ (N, A, W) => {
1903
+ const ne = typeof A.getType == "function" ? A.getType() : "unknown", ue = A instanceof je && ne !== "html" && ne !== "image" && ne !== "expression" && ne !== "empty", Ae = ue ? N.pageQuestionIndex : -1, Le = ue ? N.globalQuestionIndex : -1, $e = A.name ?? `${ne}-${W}`;
1904
+ return {
1905
+ items: [
1906
+ ...N.items,
1907
+ /* @__PURE__ */ e.jsx("div", { children: re(
1908
+ A,
1909
+ {
1910
+ animate: i,
1911
+ duration: p,
1912
+ t: b,
1913
+ validationSeq: le,
1914
+ questionIndex: Ae,
1915
+ globalQuestionIndex: Le,
1916
+ showQuestionNumbers: oe,
1917
+ portalContainer: g
1918
+ }
1919
+ ) }, $e)
1920
+ ],
1921
+ pageQuestionIndex: ue ? N.pageQuestionIndex + 1 : N.pageQuestionIndex,
1922
+ globalQuestionIndex: ue ? N.globalQuestionIndex + 1 : N.globalQuestionIndex
1923
+ };
1924
+ },
1925
+ {
1926
+ items: [],
1927
+ pageQuestionIndex: 0,
1928
+ globalQuestionIndex: _
1929
+ }
1930
+ ).items;
1931
+ })()
1932
+ ]
1933
+ },
1934
+ O?.name ?? "page"
1935
+ ) }),
1936
+ X("bottom"),
1937
+ $ === "bottom" ? /* @__PURE__ */ e.jsx(Ce, { survey: r }) : null
1938
+ ] })
1939
+ ] });
1901
1940
  }
1902
1941
  export {
1903
- sn as MotionSurvey
1942
+ mn as MotionSurvey
1904
1943
  };
1905
1944
  //# sourceMappingURL=index.js.map