@inploi/plugin-chatbot 14.17.0 → 14.17.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.
@@ -1,9 +1,9 @@
1
- var Ss = Object.defineProperty;
2
- var As = (e, r, t) => r in e ? Ss(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t;
3
- var Y = (e, r, t) => (As(e, typeof r != "symbol" ? r + "" : r, t), t);
4
- import { p as $r, f as vt, L as Tt, m as Ge, v as Br, O as Pr, l as Is, I as Es, C as Fs, j as qr, P as Vs, u as Ms, y as Ls, w as Rs, F as Ns, V as sr, W as nr, A as Ds, k as ar, b as Ts, x as Os, h as Ur, E as js, S as $s, R as Bs, Q as Ps, J as Wr, Z as qs, _ as Us, s as q, a as re, o as l, c as Qe, d as xt, e as ke, g as ye, i as Oe, n as Le, q as be, r as Ut, t as Ws, z as zr, B as Hr, D as zs, G as Hs, H as et, K as ir, M as ae, N as ce, T as Ks, U as Gs, X as Js, Y as Zs, $ as Xs, a0 as Kr, a1 as Ys } from "./index-eeb96c22.js";
5
- import { saveClosedRoleJobAlerts as Qs } from "@inploi/sdk";
6
- var en = "9.12.0", Gr = `https://sdk.inploi.com/@inploi/flows@${en}/cdn/captcha/index.html`, tn = new URL(Gr).origin, or = 3e4, rn = 5 * 6e4, sn = (e) => typeof e == "object" && e !== null && e.source === "inploi-captcha", Ft = /* @__PURE__ */ new WeakMap(), nn = (e) => {
1
+ var As = Object.defineProperty;
2
+ var Is = (e, r, t) => r in e ? As(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t;
3
+ var Y = (e, r, t) => (Is(e, typeof r != "symbol" ? r + "" : r, t), t);
4
+ import { p as Br, f as vt, L as Dt, m as Ge, v as Pr, O as qr, l as Es, I as Fs, C as Vs, j as Ur, P as Ms, u as Ls, y as Ns, w as Rs, F as Ts, V as sr, W as nr, A as Ds, k as ar, b as Os, x as js, h as Wr, E as $s, S as Bs, R as Ps, Q as qs, J as zr, Z as Us, _ as Ws, s as q, a as re, o as l, c as Qe, d as xt, e as ke, g as ye, i as Oe, n as Le, q as be, r as Ut, t as zs, z as Hr, B as Kr, D as Hs, G as Ks, H as et, K as ir, M as ae, N as ce, T as Gs, U as Js, X as Zs, Y as Xs, $ as Ys, a0 as Qs, a1 as Gr, a2 as en } from "./index-41fceabc.js";
5
+ import { saveClosedRoleJobAlerts as tn } from "@inploi/sdk";
6
+ var rn = "9.12.0", Jr = `https://sdk.inploi.com/@inploi/flows@${rn}/cdn/captcha/index.html`, sn = new URL(Jr).origin, or = 3e4, nn = 5 * 6e4, an = (e) => typeof e == "object" && e !== null && e.source === "inploi-captcha", Ft = /* @__PURE__ */ new WeakMap(), on = (e) => {
7
7
  let r = Ft.get(e);
8
8
  return r || (r = e.fetch("/flow/captcha").then((t) => {
9
9
  let s = t == null ? void 0 : t.site_key;
@@ -11,35 +11,35 @@ var en = "9.12.0", Gr = `https://sdk.inploi.com/@inploi/flows@${en}/cdn/captcha/
11
11
  }).catch((t) => {
12
12
  throw Ft.delete(e), t;
13
13
  }), Ft.set(e, r)), r;
14
- }, an = (e, r = {}) => new Promise((t, s) => {
15
- let { signal: n, container: i = null, theme: a, onInteractive: o } = r instanceof AbortSignal ? { signal: r } : r, u = !1, f = () => {
16
- }, h = (w) => {
17
- u || (u = !0, clearTimeout(b), n == null || n.removeEventListener("abort", m), f(), w());
18
- }, g = (w) => h(() => s(new Error(w))), m = () => g("Captcha aborted"), b, k = (w) => {
14
+ }, ln = (e, r = {}) => new Promise((t, s) => {
15
+ let { signal: n, container: i = null, theme: a, onInteractive: o } = r instanceof AbortSignal ? { signal: r } : r, c = !1, f = () => {
16
+ }, p = (w) => {
17
+ c || (c = !0, clearTimeout(b), n == null || n.removeEventListener("abort", m), f(), w());
18
+ }, g = (w) => p(() => s(new Error(w))), m = () => g("Captcha aborted"), b, k = (w) => {
19
19
  clearTimeout(b), b = setTimeout(() => g("Captcha timed out"), w);
20
20
  };
21
21
  if (k(or), n == null ? void 0 : n.aborted)
22
22
  return m();
23
23
  n == null || n.addEventListener("abort", m), (async () => {
24
- let w = await nn(e);
24
+ let w = await on(e);
25
25
  if (w === void 0)
26
- return h(() => t(void 0));
27
- if (u)
26
+ return p(() => t(void 0));
27
+ if (c)
28
28
  return;
29
29
  let C = document.createElement("iframe");
30
- C.src = `${Gr}?${new URLSearchParams({ sitekey: w, origin: window.location.origin, ...a && { theme: a } }).toString()}`, C.title = "Cloudflare security check", C.style.cssText = `display:block;border:0;width:${i ? "100%" : "300px"};height:0;color-scheme:normal`, i ? i.appendChild(C) : (C.style.cssText += ";position:fixed;bottom:16px;right:16px;z-index:2147483647", document.body.appendChild(C));
31
- let A = !1, v = (R) => {
32
- if (!C.contentWindow || R.source !== C.contentWindow || R.origin !== tn || !sn(R.data))
30
+ C.src = `${Jr}?${new URLSearchParams({ sitekey: w, origin: window.location.origin, ...a && { theme: a } }).toString()}`, C.title = "Cloudflare security check", C.style.cssText = `display:block;border:0;width:${i ? "100%" : "300px"};height:0;color-scheme:normal`, i ? i.appendChild(C) : (C.style.cssText += ";position:fixed;bottom:16px;right:16px;z-index:2147483647", document.body.appendChild(C));
31
+ let A = !1, v = (N) => {
32
+ if (!C.contentWindow || N.source !== C.contentWindow || N.origin !== sn || !an(N.data))
33
33
  return;
34
- let V = R.data;
34
+ let V = N.data;
35
35
  switch (V.type) {
36
36
  case "token":
37
- return h(() => t(V.token));
37
+ return p(() => t(V.token));
38
38
  case "resize":
39
39
  C.style.height = `${Math.max(0, Math.ceil(V.height))}px`;
40
40
  return;
41
41
  case "before-interactive":
42
- return A = !0, k(rn), o == null ? void 0 : o();
42
+ return A = !0, k(nn), o == null ? void 0 : o();
43
43
  case "after-interactive":
44
44
  return A = !1, k(or);
45
45
  case "error":
@@ -54,17 +54,17 @@ var en = "9.12.0", Gr = `https://sdk.inploi.com/@inploi/flows@${en}/cdn/captcha/
54
54
  window.addEventListener("message", v), f = () => {
55
55
  window.removeEventListener("message", v), C.remove();
56
56
  };
57
- })().catch((w) => h(() => s(w)));
57
+ })().catch((w) => p(() => s(w)));
58
58
  }), lr = ({ condition: e, context: r, submissions: t, ifBlock: s }) => {
59
59
  let [n, ...i] = e.compareKey.split(".");
60
60
  if (!n)
61
61
  return !1;
62
- let a = $r({ context: r, key: n, path: i, submissions: t });
62
+ let a = Br({ context: r, key: n, path: i, submissions: t });
63
63
  if (!a)
64
64
  return !1;
65
65
  switch (a.type) {
66
66
  case "address": {
67
- let o = Tt(a.value, i);
67
+ let o = Dt(a.value, i);
68
68
  switch (e.compare) {
69
69
  case "equals":
70
70
  return o === e.compareValue;
@@ -80,16 +80,16 @@ var en = "9.12.0", Gr = `https://sdk.inploi.com/@inploi/flows@${en}/cdn/captcha/
80
80
  case "integration": {
81
81
  if (typeof a.value != "object" || Array.isArray(a.value))
82
82
  return !1;
83
- let o = Tt(a.value, i), u = { ...s, data: { compareKey: "_temp", compare: e.compare, compareValue: e.compareValue } };
83
+ let o = Dt(a.value, i), c = { ...s, data: { compareKey: "_temp", compare: e.compare, compareValue: e.compareValue } };
84
84
  switch (typeof o) {
85
85
  case "boolean":
86
- return lt(u, { submissions: { _temp: { value: o, type: "boolean" } }, context: r });
86
+ return lt(c, { submissions: { _temp: { value: o, type: "boolean" } }, context: r });
87
87
  case "string":
88
- return lt(u, { submissions: { _temp: { value: o, type: "string" } }, context: r });
88
+ return lt(c, { submissions: { _temp: { value: o, type: "string" } }, context: r });
89
89
  case "number":
90
- return lt(u, { submissions: { _temp: { value: o, type: "number" } }, context: r });
90
+ return lt(c, { submissions: { _temp: { value: o, type: "number" } }, context: r });
91
91
  case "object":
92
- return Array.isArray(o) && o.every((f) => typeof f == "string") ? lt(u, { submissions: { _temp: { value: o, type: "enum" } }, context: r }) : !1;
92
+ return Array.isArray(o) && o.every((f) => typeof f == "string") ? lt(c, { submissions: { _temp: { value: o, type: "enum" } }, context: r }) : !1;
93
93
  }
94
94
  break;
95
95
  }
@@ -166,28 +166,28 @@ var en = "9.12.0", Gr = `https://sdk.inploi.com/@inploi/flows@${en}/cdn/captcha/
166
166
  return !1;
167
167
  return !0;
168
168
  }
169
- }, on = /{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g, ln = (e, { context: r, submissions: t }) => e.replace(on, (s, n, i = "") => {
170
- let [a, ...o] = n.trim().split("."), u = $r({ key: a, path: o, submissions: t, context: r });
171
- if (!u)
169
+ }, cn = /{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g, un = (e, { context: r, submissions: t }) => e.replace(cn, (s, n, i = "") => {
170
+ let [a, ...o] = n.trim().split("."), c = Br({ key: a, path: o, submissions: t, context: r });
171
+ if (!c)
172
172
  return i;
173
- switch (u.type) {
173
+ switch (c.type) {
174
174
  case "boolean":
175
- return u.value === !0 ? "true" : "false";
175
+ return c.value === !0 ? "true" : "false";
176
176
  case "file":
177
- return u.value.map((f) => `${f.name} (${Ge(f.sizeKb)})`).join(", ");
177
+ return c.value.map((f) => `${f.name} (${Ge(f.sizeKb)})`).join(", ");
178
178
  case "enum":
179
- return u.value.join(", ");
179
+ return c.value.join(", ");
180
180
  case "address":
181
- return Object.values(u.value).filter((f) => f && f.trim().length > 0).join(", ");
181
+ return Object.values(c.value).filter((f) => f && f.trim().length > 0).join(", ");
182
182
  case "number":
183
183
  case "string":
184
- return u.value ? u.value.toString() : i;
184
+ return c.value ? c.value.toString() : i;
185
185
  case "phone":
186
- return vt(u.value);
186
+ return vt(c.value);
187
187
  case "integration": {
188
- if (typeof u.value != "object" || Array.isArray(u.value))
188
+ if (typeof c.value != "object" || Array.isArray(c.value))
189
189
  break;
190
- let f = Tt(u.value, o);
190
+ let f = Dt(c.value, o);
191
191
  switch (typeof f) {
192
192
  case "boolean":
193
193
  return f === !0 ? "true" : "false";
@@ -196,7 +196,7 @@ var en = "9.12.0", Gr = `https://sdk.inploi.com/@inploi/flows@${en}/cdn/captcha/
196
196
  case "number":
197
197
  return f.toString();
198
198
  case "object":
199
- if (Array.isArray(f) && f.every((h) => typeof h == "string"))
199
+ if (Array.isArray(f) && f.every((p) => typeof p == "string"))
200
200
  return f.join(", ");
201
201
  }
202
202
  break;
@@ -205,14 +205,14 @@ var en = "9.12.0", Gr = `https://sdk.inploi.com/@inploi/flows@${en}/cdn/captcha/
205
205
  return i;
206
206
  });
207
207
  /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
208
- function cn(e) {
208
+ function dn(e) {
209
209
  return e instanceof Uint8Array || ArrayBuffer.isView(e) && e.constructor.name === "Uint8Array";
210
210
  }
211
211
  function Wt(e, r, t = "") {
212
- const s = cn(e), n = e == null ? void 0 : e.length, i = r !== void 0;
212
+ const s = dn(e), n = e == null ? void 0 : e.length, i = r !== void 0;
213
213
  if (!s || i && n !== r) {
214
- const a = t && `"${t}" `, o = i ? ` of length ${r}` : "", u = s ? `length=${n}` : `type=${typeof e}`;
215
- throw new Error(a + "expected Uint8Array" + o + ", got " + u);
214
+ const a = t && `"${t}" `, o = i ? ` of length ${r}` : "", c = s ? `length=${n}` : `type=${typeof e}`;
215
+ throw new Error(a + "expected Uint8Array" + o + ", got " + c);
216
216
  }
217
217
  return e;
218
218
  }
@@ -222,7 +222,7 @@ function cr(e, r = !0) {
222
222
  if (r && e.finished)
223
223
  throw new Error("Hash#digest() has already been called");
224
224
  }
225
- function un(e, r) {
225
+ function fn(e, r) {
226
226
  Wt(e, void 0, "digestInto() output");
227
227
  const t = r.outputLen;
228
228
  if (e.length < t)
@@ -238,32 +238,32 @@ function Vt(e) {
238
238
  function pe(e, r) {
239
239
  return e << 32 - r | e >>> r;
240
240
  }
241
- const dn = /* @__PURE__ */ (() => (
241
+ const hn = /* @__PURE__ */ (() => (
242
242
  // @ts-ignore
243
243
  typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function"
244
- ))(), fn = /* @__PURE__ */ Array.from({ length: 256 }, (e, r) => r.toString(16).padStart(2, "0"));
245
- function hn(e) {
246
- if (Wt(e), dn)
244
+ ))(), pn = /* @__PURE__ */ Array.from({ length: 256 }, (e, r) => r.toString(16).padStart(2, "0"));
245
+ function mn(e) {
246
+ if (Wt(e), hn)
247
247
  return e.toHex();
248
248
  let r = "";
249
249
  for (let t = 0; t < e.length; t++)
250
- r += fn[e[t]];
250
+ r += pn[e[t]];
251
251
  return r;
252
252
  }
253
- function pn(e, r = {}) {
253
+ function yn(e, r = {}) {
254
254
  const t = (n, i) => e(i).update(n).digest(), s = e(void 0);
255
255
  return t.outputLen = s.outputLen, t.blockLen = s.blockLen, t.create = (n) => e(n), Object.assign(t, r), Object.freeze(t);
256
256
  }
257
- const mn = (e) => ({
257
+ const bn = (e) => ({
258
258
  oid: Uint8Array.from([6, 9, 96, 134, 72, 1, 101, 3, 4, 2, e])
259
259
  });
260
- function yn(e, r, t) {
260
+ function gn(e, r, t) {
261
261
  return e & r ^ ~e & t;
262
262
  }
263
- function bn(e, r, t) {
263
+ function vn(e, r, t) {
264
264
  return e & r ^ e & t ^ r & t;
265
265
  }
266
- class gn {
266
+ class xn {
267
267
  constructor(r, t, s, n) {
268
268
  Y(this, "blockLen");
269
269
  Y(this, "outputLen");
@@ -284,9 +284,9 @@ class gn {
284
284
  for (let a = 0; a < i; ) {
285
285
  const o = Math.min(n - this.pos, i - a);
286
286
  if (o === n) {
287
- const u = Vt(r);
287
+ const c = Vt(r);
288
288
  for (; n <= i - a; a += n)
289
- this.process(u, a);
289
+ this.process(c, a);
290
290
  continue;
291
291
  }
292
292
  s.set(r.subarray(a, a + o), this.pos), this.pos += o, a += o, this.pos === n && (this.process(t, 0), this.pos = 0);
@@ -294,21 +294,21 @@ class gn {
294
294
  return this.length += r.length, this.roundClean(), this;
295
295
  }
296
296
  digestInto(r) {
297
- cr(this), un(r, this), this.finished = !0;
297
+ cr(this), fn(r, this), this.finished = !0;
298
298
  const { buffer: t, view: s, blockLen: n, isLE: i } = this;
299
299
  let { pos: a } = this;
300
300
  t[a++] = 128, Ot(this.buffer.subarray(a)), this.padOffset > n - a && (this.process(s, 0), a = 0);
301
301
  for (let g = a; g < n; g++)
302
302
  t[g] = 0;
303
303
  s.setBigUint64(n - 8, BigInt(this.length * 8), i), this.process(s, 0);
304
- const o = Vt(r), u = this.outputLen;
305
- if (u % 4)
304
+ const o = Vt(r), c = this.outputLen;
305
+ if (c % 4)
306
306
  throw new Error("_sha2: outputLen must be aligned to 32bit");
307
- const f = u / 4, h = this.get();
308
- if (f > h.length)
307
+ const f = c / 4, p = this.get();
308
+ if (f > p.length)
309
309
  throw new Error("_sha2: outputLen bigger than state");
310
310
  for (let g = 0; g < f; g++)
311
- o.setUint32(4 * g, h[g], i);
311
+ o.setUint32(4 * g, p[g], i);
312
312
  }
313
313
  digest() {
314
314
  const { buffer: r, outputLen: t } = this;
@@ -334,7 +334,7 @@ const Ee = /* @__PURE__ */ Uint32Array.from([
334
334
  2600822924,
335
335
  528734635,
336
336
  1541459225
337
- ]), vn = /* @__PURE__ */ Uint32Array.from([
337
+ ]), wn = /* @__PURE__ */ Uint32Array.from([
338
338
  1116352408,
339
339
  1899447441,
340
340
  3049323471,
@@ -400,17 +400,17 @@ const Ee = /* @__PURE__ */ Uint32Array.from([
400
400
  3204031479,
401
401
  3329325298
402
402
  ]), Fe = /* @__PURE__ */ new Uint32Array(64);
403
- class xn extends gn {
403
+ class _n extends xn {
404
404
  constructor(r) {
405
405
  super(64, r, 8, !1);
406
406
  }
407
407
  get() {
408
- const { A: r, B: t, C: s, D: n, E: i, F: a, G: o, H: u } = this;
409
- return [r, t, s, n, i, a, o, u];
408
+ const { A: r, B: t, C: s, D: n, E: i, F: a, G: o, H: c } = this;
409
+ return [r, t, s, n, i, a, o, c];
410
410
  }
411
411
  // prettier-ignore
412
- set(r, t, s, n, i, a, o, u) {
413
- this.A = r | 0, this.B = t | 0, this.C = s | 0, this.D = n | 0, this.E = i | 0, this.F = a | 0, this.G = o | 0, this.H = u | 0;
412
+ set(r, t, s, n, i, a, o, c) {
413
+ this.A = r | 0, this.B = t | 0, this.C = s | 0, this.D = n | 0, this.E = i | 0, this.F = a | 0, this.G = o | 0, this.H = c | 0;
414
414
  }
415
415
  process(r, t) {
416
416
  for (let g = 0; g < 16; g++, t += 4)
@@ -419,12 +419,12 @@ class xn extends gn {
419
419
  const m = Fe[g - 15], b = Fe[g - 2], k = pe(m, 7) ^ pe(m, 18) ^ m >>> 3, w = pe(b, 17) ^ pe(b, 19) ^ b >>> 10;
420
420
  Fe[g] = w + Fe[g - 7] + k + Fe[g - 16] | 0;
421
421
  }
422
- let { A: s, B: n, C: i, D: a, E: o, F: u, G: f, H: h } = this;
422
+ let { A: s, B: n, C: i, D: a, E: o, F: c, G: f, H: p } = this;
423
423
  for (let g = 0; g < 64; g++) {
424
- const m = pe(o, 6) ^ pe(o, 11) ^ pe(o, 25), b = h + m + yn(o, u, f) + vn[g] + Fe[g] | 0, w = (pe(s, 2) ^ pe(s, 13) ^ pe(s, 22)) + bn(s, n, i) | 0;
425
- h = f, f = u, u = o, o = a + b | 0, a = i, i = n, n = s, s = b + w | 0;
424
+ const m = pe(o, 6) ^ pe(o, 11) ^ pe(o, 25), b = p + m + gn(o, c, f) + wn[g] + Fe[g] | 0, w = (pe(s, 2) ^ pe(s, 13) ^ pe(s, 22)) + vn(s, n, i) | 0;
425
+ p = f, f = c, c = o, o = a + b | 0, a = i, i = n, n = s, s = b + w | 0;
426
426
  }
427
- s = s + this.A | 0, n = n + this.B | 0, i = i + this.C | 0, a = a + this.D | 0, o = o + this.E | 0, u = u + this.F | 0, f = f + this.G | 0, h = h + this.H | 0, this.set(s, n, i, a, o, u, f, h);
427
+ s = s + this.A | 0, n = n + this.B | 0, i = i + this.C | 0, a = a + this.D | 0, o = o + this.E | 0, c = c + this.F | 0, f = f + this.G | 0, p = p + this.H | 0, this.set(s, n, i, a, o, c, f, p);
428
428
  }
429
429
  roundClean() {
430
430
  Ot(Fe);
@@ -433,7 +433,7 @@ class xn extends gn {
433
433
  this.set(0, 0, 0, 0, 0, 0, 0, 0), Ot(this.buffer);
434
434
  }
435
435
  }
436
- class wn extends xn {
436
+ class kn extends _n {
437
437
  constructor() {
438
438
  super(32);
439
439
  // We cannot use array here since array allows indexing by variable
@@ -448,11 +448,11 @@ class wn extends xn {
448
448
  Y(this, "H", Ee[7] | 0);
449
449
  }
450
450
  }
451
- const _n = /* @__PURE__ */ pn(
452
- () => new wn(),
453
- /* @__PURE__ */ mn(1)
451
+ const Cn = /* @__PURE__ */ yn(
452
+ () => new kn(),
453
+ /* @__PURE__ */ bn(1)
454
454
  );
455
- var Jr = (e) => {
455
+ var Zr = (e) => {
456
456
  let r = e.find((t) => t.isHead);
457
457
  if (!r)
458
458
  throw new Error("No head node found");
@@ -461,226 +461,226 @@ var Jr = (e) => {
461
461
  var r, t;
462
462
  if (!(e.data.isFinished || (r = e.data.startedWriteNodeIds) != null && r.length))
463
463
  return (t = [...e.data.messages].reverse().find((s) => s.groupId && e.nodes.some((n) => n.id === s.groupId && n.type.startsWith("question-")) && (s.type === "system" || "author" in s && s.author === "user"))) == null ? void 0 : t.groupId;
464
- }, jt = (e) => Array.isArray(e) ? e.map(jt) : e !== null && typeof e == "object" ? Object.fromEntries(Object.entries(e).sort(([r], [t]) => r.localeCompare(t)).map(([r, t]) => [r, jt(t)])) : typeof e == "function" ? void 0 : e, kn = (e) => hn(_n(new TextEncoder().encode(JSON.stringify(jt(e)))));
465
- function Cn(e, r, t, s) {
464
+ }, jt = (e) => Array.isArray(e) ? e.map(jt) : e !== null && typeof e == "object" ? Object.fromEntries(Object.entries(e).sort(([r], [t]) => r.localeCompare(t)).map(([r, t]) => [r, jt(t)])) : typeof e == "function" ? void 0 : e, Sn = (e) => mn(Cn(new TextEncoder().encode(JSON.stringify(jt(e)))));
465
+ function An(e, r, t, s) {
466
466
  var n;
467
467
  if (s != null && s.aborted)
468
468
  return;
469
- let i = kn(t), a = (n = e.data).preApplyFingerprints ?? (n.preApplyFingerprints = []);
469
+ let i = Sn(t), a = (n = e.data).preApplyFingerprints ?? (n.preApplyFingerprints = []);
470
470
  if (a.includes(i))
471
471
  return;
472
472
  a.push(i);
473
- let o = new AbortController(), u = setTimeout(() => o.abort(), 5e3);
473
+ let o = new AbortController(), c = setTimeout(() => o.abort(), 5e3);
474
474
  r.fetch("/flow/pre-apply", { method: "POST", signal: o.signal, body: JSON.stringify(t) }).catch(() => {
475
475
  let f = a.indexOf(i);
476
476
  f !== -1 && a.splice(f, 1);
477
477
  }).finally(() => {
478
- clearTimeout(u);
478
+ clearTimeout(c);
479
479
  });
480
480
  }
481
- var Zr = ({ context: e, submissions: r }) => ({ context: e, submissions: r ?? {} }), he = (e, r) => ln(e, Zr(r)), Sn = (e, r) => lt(e, Zr(r)), Xr = ({ node: e, nodes: r, stopWhen: t }) => {
481
+ var Xr = ({ context: e, submissions: r }) => ({ context: e, submissions: r ?? {} }), he = (e, r) => un(e, Xr(r)), In = (e, r) => lt(e, Xr(r)), Yr = ({ node: e, nodes: r, stopWhen: t }) => {
482
482
  if ((t == null ? void 0 : t(e)) === !0)
483
483
  return e;
484
484
  let s = e.nextId ? r.find((n) => n.id === e.nextId) : void 0;
485
485
  if (s)
486
- return Xr({ node: s, nodes: r, stopWhen: t });
487
- }, An = ({ childNode: e, nodes: r }) => {
486
+ return Yr({ node: s, nodes: r, stopWhen: t });
487
+ }, En = ({ childNode: e, nodes: r }) => {
488
488
  let t = r.filter((s) => s.type === "if-block").find((s) => {
489
489
  if (!s.branchId)
490
490
  return !1;
491
491
  let n = r.find((a) => a.id === s.branchId);
492
492
  if (!n)
493
493
  return !1;
494
- let i = Xr({ node: n, nodes: r, stopWhen: (a) => a.id === e.id });
494
+ let i = Yr({ node: n, nodes: r, stopWhen: (a) => a.id === e.id });
495
495
  return !(!i || i.id !== e.id);
496
496
  });
497
497
  if (t != null && t.nextId)
498
498
  return r.find((s) => s.id === t.nextId);
499
- }, In = 3, En = ({ flow: e, analytics: r, logger: t, talentBankClient: s, context: n, apiClient: i, getSubmissions: a, getApplicationRecovery: o, setApplicationRecovery: u, chatService: f, persistWriteBarrier: h, onSubmitNetworkError: g, closedRoleBehaviour: m, settledOutcomes: b = m, dateEchoLocale: k, onFlowEnd: w, onInterpret: C, forceSubmitConfirmation: A, flowType: v, t: R }) => {
499
+ }, Fn = 3, Vn = ({ flow: e, analytics: r, logger: t, talentBankClient: s, context: n, apiClient: i, getSubmissions: a, getApplicationRecovery: o, setApplicationRecovery: c, chatService: f, persistWriteBarrier: p, onSubmitNetworkError: g, closedRoleBehaviour: m, settledOutcomes: b = m, dateEchoLocale: k, onFlowEnd: w, onInterpret: C, forceSubmitConfirmation: A, flowType: v, t: N }) => {
500
500
  var V;
501
501
  let M = new AbortController(), ee = { submitAccepted: !1 };
502
- (V = e.data).startedWriteNodeIds ?? (V.startedWriteNodeIds = e.nodes.flatMap((N) => {
502
+ (V = e.data).startedWriteNodeIds ?? (V.startedWriteNodeIds = e.nodes.flatMap((R) => {
503
503
  var j, E;
504
- if (N.type !== "integration-application-submit" || !e.data.nodeHistory.includes(N.id))
504
+ if (R.type !== "integration-application-submit" || !e.data.nodeHistory.includes(R.id))
505
505
  return [];
506
- let D = N.data.key ? (j = a()) == null ? void 0 : j[N.data.key] : void 0;
507
- return (D == null ? void 0 : D.type) === "integration" && ((E = Br(D.value)) == null ? void 0 : E.verdict) === "not_submitted" ? [] : [N.id];
506
+ let T = R.data.key ? (j = a()) == null ? void 0 : j[R.data.key] : void 0;
507
+ return (T == null ? void 0 : T.type) === "integration" && ((E = Pr(T.value)) == null ? void 0 : E.verdict) === "not_submitted" ? [] : [R.id];
508
508
  }));
509
- let K = { ...r.service, log: (N) => r.service.log({ ...N, customProperties: { ...N.customProperties, ...r.customProperties } }) }, T = async (N, D) => {
509
+ let K = { ...r.service, log: (R) => r.service.log({ ...R, customProperties: { ...R.customProperties, ...r.customProperties } }) }, D = async (R, T) => {
510
510
  let j = M.signal;
511
511
  if (j.aborted)
512
512
  return;
513
- let E = a(), F = o(), B = (F == null ? void 0 : F.submitNodeId) === N.id ? e.nodes.find((L) => {
513
+ let E = a(), F = o(), B = (F == null ? void 0 : F.submitNodeId) === R.id ? e.nodes.find((L) => {
514
514
  var W;
515
515
  return L.id === F.fileQuestionNodeId && L.type === "question-file" && ((W = E == null ? void 0 : E[L.data.key]) == null ? void 0 : W.type) !== "file";
516
516
  }) : void 0;
517
517
  if (B)
518
- return T(B, D);
519
- C == null || C(N, D);
518
+ return D(B, T);
519
+ C == null || C(R, T);
520
520
  try {
521
- await Fn({ flow: e, analytics: K, logger: t, talentBankClient: s, apiClient: i, context: n, node: N, submissions: E, applicationRecovery: F, setApplicationRecovery: async (L) => {
521
+ await Mn({ flow: e, analytics: K, logger: t, talentBankClient: s, apiClient: i, context: n, node: R, submissions: E, applicationRecovery: F, setApplicationRecovery: async (L) => {
522
522
  if (!j.aborted)
523
523
  try {
524
- await u(L);
524
+ await c(L);
525
525
  } catch (W) {
526
526
  t.error("Failed to persist application recovery", W);
527
527
  }
528
- }, forceSubmitConfirmation: A || (F == null ? void 0 : F.submitNodeId) === N.id, run: ee, persistWriteBarrier: h, onSubmitNetworkError: g, settledOutcomes: b, dateEchoLocale: k, flowType: v, signal: j, t: R, chat: { sendMessage: async (L) => f.send({ groupId: N.id, message: L, signal: j }), userInput: async (L) => f.input({ input: L, signal: j }), setSubmission: (L, W) => {
528
+ }, forceSubmitConfirmation: A || (F == null ? void 0 : F.submitNodeId) === R.id, run: ee, persistWriteBarrier: p, onSubmitNetworkError: g, settledOutcomes: b, dateEchoLocale: k, flowType: v, signal: j, t: N, chat: { sendMessage: async (L) => f.send({ groupId: R.id, message: L, signal: j }), userInput: async (L) => f.input({ input: L, signal: j }), setSubmission: (L, W) => {
529
529
  j.aborted || f.setSubmission(L, W);
530
530
  }, captcha: f.captcha }, next: (L) => {
531
531
  if (j.aborted)
532
532
  return;
533
- let W = (F == null ? void 0 : F.fileQuestionNodeId) === N.id ? F.submitNodeId : L, U = W ? e.nodes.find((te) => te.id === W) : An({ childNode: N, nodes: e.nodes });
534
- return U ? T(U, N) : w == null ? void 0 : w(N);
533
+ let W = (F == null ? void 0 : F.fileQuestionNodeId) === R.id ? F.submitNodeId : L, U = W ? e.nodes.find((te) => te.id === W) : En({ childNode: R, nodes: e.nodes });
534
+ return U ? D(U, R) : w == null ? void 0 : w(R);
535
535
  }, end: () => {
536
- j.aborted || (w == null || w(N));
536
+ j.aborted || (w == null || w(R));
537
537
  } });
538
538
  } catch (L) {
539
- if (L instanceof Pr)
539
+ if (L instanceof qr)
540
540
  return;
541
541
  throw L;
542
542
  }
543
543
  };
544
- return { interpret: async (N) => {
545
- let D = e.nodes.find((j) => j.id === N) ?? Jr(e.nodes);
546
- return T(D);
547
- }, undo: (N) => {
544
+ return { interpret: async (R) => {
545
+ let T = e.nodes.find((j) => j.id === R) ?? Zr(e.nodes);
546
+ return D(T);
547
+ }, undo: (R) => {
548
548
  var W;
549
549
  if (delete e.data.reviewReplay, ((W = e.data.startedWriteNodeIds) == null ? void 0 : W.length) || e.data.isFinished)
550
550
  return { removed: 0 };
551
- let D = zt(e), j = D ? N.lastIndexOf(D) : -1, E = e.nodes.find((U) => U.id === D);
551
+ let T = zt(e), j = T ? R.lastIndexOf(T) : -1, E = e.nodes.find((U) => U.id === T);
552
552
  if (j === -1 || !E)
553
553
  return { removed: 0 };
554
- let F = e.nodes.find((U) => U.id === N[N.length - 1]);
554
+ let F = e.nodes.find((U) => U.id === R[R.length - 1]);
555
555
  M.abort();
556
- let B = N.splice(j);
556
+ let B = R.splice(j);
557
557
  e.data.messages = e.data.messages.filter((U) => !U.groupId || !B.includes(U.groupId)), e.data.currentInput = null;
558
558
  let L = a();
559
559
  for (let U of B.slice(1)) {
560
560
  let te = e.nodes.find((X) => X.id === U);
561
- if (!(!te || !L || te.id === D) && ("key" in te.data && te.data.key && delete L[te.data.key], "keys" in te.data))
561
+ if (!(!te || !L || te.id === T) && ("key" in te.data && te.data.key && delete L[te.data.key], "keys" in te.data))
562
562
  for (let X of Object.values(te.data.keys))
563
563
  typeof X == "string" && delete L[X];
564
564
  }
565
- return M = new AbortController(), T(E, F), { removed: B.length };
565
+ return M = new AbortController(), D(E, F), { removed: B.length };
566
566
  }, abort: () => {
567
567
  M.abort();
568
568
  } };
569
569
  };
570
- async function Fn(e) {
570
+ async function Mn(e) {
571
571
  let r = e.node;
572
572
  switch (r.type) {
573
573
  case "flow-section":
574
574
  return await e.chat.sendMessage({ type: "system", variant: "info", text: r.data.title }), e.next(r.nextId);
575
575
  case "pre-apply-result":
576
- return ea({ ...e, node: r });
576
+ return ra({ ...e, node: r });
577
577
  case "text":
578
- return Wn({ ...e, node: r });
578
+ return Hn({ ...e, node: r });
579
579
  case "image":
580
- return zn({ ...e, node: r });
580
+ return Kn({ ...e, node: r });
581
581
  case "question-text":
582
- return Hn({ ...e, node: r });
582
+ return Gn({ ...e, node: r });
583
583
  case "question-enum":
584
- return Jn({ ...e, node: r });
584
+ return Xn({ ...e, node: r });
585
585
  case "question-number":
586
- return Kn({ ...e, node: r });
586
+ return Jn({ ...e, node: r });
587
587
  case "question-phone":
588
- return Gn({ ...e, node: r });
589
- case "question-boolean":
590
588
  return Zn({ ...e, node: r });
591
- case "question-file":
589
+ case "question-boolean":
592
590
  return Yn({ ...e, node: r });
591
+ case "question-file":
592
+ return ea({ ...e, node: r });
593
593
  case "question-address":
594
- return Xn({ ...e, node: r });
595
- case "end-flow":
596
594
  return Qn({ ...e, node: r });
595
+ case "end-flow":
596
+ return ta({ ...e, node: r });
597
597
  case "if-block":
598
- return Un({ ...e, node: r });
598
+ return zn({ ...e, node: r });
599
599
  case "jump":
600
- return Ln({ ...e, node: r });
600
+ return Rn({ ...e, node: r });
601
601
  case "link":
602
- return qn({ ...e, node: r });
602
+ return Wn({ ...e, node: r });
603
603
  case "integration-application-submit":
604
- return $n({ ...e, node: r });
604
+ return Pn({ ...e, node: r });
605
605
  case "add-submission":
606
- return Rn({ ...e, node: r });
606
+ return Tn({ ...e, node: r });
607
607
  case "integration-workflow-get":
608
608
  throw Error("Workflow should be unreachable");
609
609
  case "check-duplicate":
610
- return Mn({ ...e, node: r });
610
+ return Nn({ ...e, node: r });
611
611
  case "feedback":
612
- return Vn({ ...e, node: r });
612
+ return Ln({ ...e, node: r });
613
613
  default:
614
614
  throw new Error(`Unknown node: ${JSON.stringify(r)}`);
615
615
  }
616
616
  }
617
- async function Vn({ next: e, node: r }) {
617
+ async function Ln({ next: e, node: r }) {
618
618
  e(r.nextId);
619
619
  }
620
- async function Mn({ next: e, node: r, talentBankClient: t, submissions: s, flow: n, logger: i, chat: a }) {
621
- var u;
620
+ async function Nn({ next: e, node: r, talentBankClient: t, submissions: s, flow: n, logger: i, chat: a }) {
621
+ var c;
622
622
  let o = { isDuplicate: !1 };
623
623
  if (s && t) {
624
- let f = r.data.scope === "job" ? (u = n.job) == null ? void 0 : u.id : void 0;
624
+ let f = r.data.scope === "job" ? (c = n.job) == null ? void 0 : c.id : void 0;
625
625
  if (r.data.scope === "company" || f != null)
626
626
  try {
627
- o = await t.checkDuplicate({ email: Is({ key: r.data.email, submissions: s }).toString(), jobId: f, scope: r.data.scope });
628
- } catch (h) {
629
- i.error("[check-duplicate]", h);
627
+ o = await t.checkDuplicate({ email: Es({ key: r.data.email, submissions: s }).toString(), jobId: f, scope: r.data.scope });
628
+ } catch (p) {
629
+ i.error("[check-duplicate]", p);
630
630
  }
631
631
  }
632
632
  a.setSubmission(r.data.key, { type: "integration", value: o }), e(r.nextId);
633
633
  }
634
- async function Ln({ next: e, node: r }) {
634
+ async function Rn({ next: e, node: r }) {
635
635
  e(r.data.targetId);
636
636
  }
637
- async function Rn({ next: e, node: r, logger: t, submissions: s, context: n }) {
637
+ async function Tn({ next: e, node: r, logger: t, submissions: s, context: n }) {
638
638
  if (!s) {
639
639
  t.error("Submissions not found");
640
640
  return;
641
641
  }
642
642
  s[r.data.key] = { type: "string", value: he(r.data.value, { submissions: s, context: n }) }, e(r.nextId);
643
643
  }
644
- var Nn = 5e3, Dn = (e, r) => r ? `${e}@${r.id_type}:${r.id}` : e, Tn = (e, r = Date.now()) => Math.min(e.until, r + (e.maintenance ? Ps : e.throttles ? Wr : qs)), On = (e, r, t) => {
645
- let { waitMs: s, throttles: n, maintenance: i } = Us(r == null ? void 0 : r.throttles, t);
644
+ var Dn = 5e3, On = (e, r) => r ? `${e}@${r.id_type}:${r.id}` : e, jn = (e, r = Date.now()) => Math.min(e.until, r + (e.maintenance ? qs : e.throttles ? zr : Us)), $n = (e, r, t) => {
645
+ let { waitMs: s, throttles: n, maintenance: i } = Ws(r == null ? void 0 : r.throttles, t);
646
646
  return { key: e, until: Date.now() + s, ...n !== void 0 && { throttles: n }, ...i && { maintenance: i } };
647
- }, jn = ["ApiError", "NotFoundError", "UnauthorisedError", "SchemaValidationError", "ParsingError"], $t = (e) => e instanceof Error && jn.includes(e.name) ? e : void 0, ur = (e) => {
647
+ }, Bn = ["ApiError", "NotFoundError", "UnauthorisedError", "SchemaValidationError", "ParsingError"], $t = (e) => e instanceof Error && Bn.includes(e.name) ? e : void 0, ur = (e) => {
648
648
  let r = $t(e);
649
649
  return (r == null ? void 0 : r.name) === "ApiError" ? r : void 0;
650
650
  };
651
- async function $n({ chat: e, next: r, end: t, node: s, logger: n, apiClient: i, submissions: a, analytics: o, flow: u, applicationRecovery: f, setApplicationRecovery: h, forceSubmitConfirmation: g, flowType: m, run: b, persistWriteBarrier: k, signal: w, onSubmitNetworkError: C, settledOutcomes: A, t: v }) {
652
- var T, N;
653
- let R = async ({ redirect_url: D, message: j, button_text: E }) => {
651
+ async function Pn({ chat: e, next: r, end: t, node: s, logger: n, apiClient: i, submissions: a, analytics: o, flow: c, applicationRecovery: f, setApplicationRecovery: p, forceSubmitConfirmation: g, flowType: m, run: b, persistWriteBarrier: k, signal: w, onSubmitNetworkError: C, settledOutcomes: A, t: v }) {
652
+ var D, R;
653
+ let N = async ({ redirect_url: T, message: j, button_text: E }) => {
654
654
  let { anonymous_id: F, session_id: B } = o.getSessionInfo();
655
655
  await e.sendMessage({ type: "text", author: "bot", text: j ?? v("submission_redirect_message") });
656
656
  try {
657
- let L = new URL(D);
657
+ let L = new URL(T);
658
658
  F && !L.searchParams.has("anonymous_id") && L.searchParams.set("anonymous_id", F), await e.sendMessage({ type: "link", href: L.toString(), text: E ?? v("complete_submission"), onClick: () => {
659
659
  if (!B) {
660
660
  n.error("session_id not set, cannot log FLOW_REDIRECT event");
661
661
  return;
662
662
  }
663
- o.log({ event: "FLOW_REDIRECT", properties: { flow_build: u.build, flow_id: u.id, flow_session_id: B, flow_version: u.version, href: L.toString(), job: u.job } });
663
+ o.log({ event: "FLOW_REDIRECT", properties: { flow_build: c.build, flow_id: c.id, flow_session_id: B, flow_version: c.version, href: L.toString(), job: c.job } });
664
664
  } });
665
665
  } catch (L) {
666
- n.error(`Invalid redirect URL: ${D}`, L), e.sendMessage({ type: "system", variant: "error", text: v("redirect_url_error") });
666
+ n.error(`Invalid redirect URL: ${T}`, L), e.sendMessage({ type: "system", variant: "error", text: v("redirect_url_error") });
667
667
  }
668
668
  };
669
- if ((T = u.data.startedWriteNodeIds) != null && T.includes(s.id) && (f == null ? void 0 : f.submitNodeId) !== s.id) {
670
- let D = (N = u.data.submitRedirects) == null ? void 0 : N[s.id];
671
- return D ? (await R(D), r(s.nextId)) : (await e.sendMessage({ type: "system", variant: "warning", text: v("submission_unknown") }), t());
669
+ if ((D = c.data.startedWriteNodeIds) != null && D.includes(s.id) && (f == null ? void 0 : f.submitNodeId) !== s.id) {
670
+ let T = (R = c.data.submitRedirects) == null ? void 0 : R[s.id];
671
+ return T ? (await N(T), r(s.nextId)) : (await e.sendMessage({ type: "system", variant: "warning", text: v("submission_unknown") }), t());
672
672
  }
673
- let V = Dn(s.id, u.job), M = 0, ee = b.submitAccepted && s.data.skipConfirmation === !0 && (f == null ? void 0 : f.submitNodeId) !== s.id, K = async (D) => {
674
- var nt, pt, mt, At, at, c, d, p, _;
675
- let j = ((nt = u.data.submitCooldown) == null ? void 0 : nt.key) === V ? u.data.submitCooldown : void 0;
676
- j && (j.until = Tn(j));
673
+ let V = On(s.id, c.job), M = 0, ee = b.submitAccepted && s.data.skipConfirmation === !0 && (f == null ? void 0 : f.submitNodeId) !== s.id, K = async (T) => {
674
+ var nt, pt, mt, At, at, u, d, h, _;
675
+ let j = ((nt = c.data.submitCooldown) == null ? void 0 : nt.key) === V ? c.data.submitCooldown : void 0;
676
+ j && (j.until = jn(j));
677
677
  let E = j == null ? void 0 : j.until;
678
- (u.data.reviewRequiresSend === !0 && !ee || D !== !0 || E !== void 0 && E > Date.now()) && await e.userInput({ type: "submit", key: void 0, config: { label: s.data.submitLabel, ...E !== void 0 && { availableAt: E } } }), ee = !1;
678
+ (c.data.reviewRequiresSend === !0 && !ee || T !== !0 || E !== void 0 && E > Date.now()) && await e.userInput({ type: "submit", key: void 0, config: { label: s.data.submitLabel, ...E !== void 0 && { availableAt: E } } }), ee = !1;
679
679
  let F;
680
680
  if (s.data.captcha) {
681
681
  let y = e.captcha, x = !0;
682
682
  try {
683
- F = await an(i, { signal: w, container: (y == null ? void 0 : y.container()) ?? null, theme: y == null ? void 0 : y.theme, onInteractive: () => {
683
+ F = await ln(i, { signal: w, container: (y == null ? void 0 : y.container()) ?? null, theme: y == null ? void 0 : y.theme, onInteractive: () => {
684
684
  e.sendMessage({ type: "text", author: "bot", text: v("captcha_check") }).catch(() => {
685
685
  }).then(() => {
686
686
  x && (y == null || y.reveal(!0));
@@ -697,12 +697,12 @@ async function $n({ chat: e, next: r, end: t, node: s, logger: n, apiClient: i,
697
697
  let { anonymous_id: B, session_id: L } = o.getSessionInfo();
698
698
  if (w.aborted)
699
699
  return;
700
- let W = ((pt = u.data.startedWriteNodeIds) == null ? void 0 : pt.includes(s.id)) === !0;
701
- if ((f == null ? void 0 : f.submitNodeId) === s.id && await h(void 0), W || (u.data.startedWriteNodeIds = [...u.data.startedWriteNodeIds ?? [], s.id]), await k().catch((y) => n.error("Failed to persist application write barrier", y)), w.aborted)
700
+ let W = ((pt = c.data.startedWriteNodeIds) == null ? void 0 : pt.includes(s.id)) === !0;
701
+ if ((f == null ? void 0 : f.submitNodeId) === s.id && await p(void 0), W || (c.data.startedWriteNodeIds = [...c.data.startedWriteNodeIds ?? [], s.id]), await k().catch((y) => n.error("Failed to persist application write barrier", y)), w.aborted)
702
702
  return;
703
703
  let U, te = setTimeout(() => {
704
704
  U = e.sendMessage({ type: "loading", semantic: "submission-still-working", text: v("submission_still_working") }).catch((y) => n.error("Failed to send submission progress message", y));
705
- }, Nn), X, z = await i.fetch("/flow/submit", { method: "POST", body: JSON.stringify({ log_submit: !1, integration_id: s.data.integrationId, anonymous_id: B, session_id: L, job: u.job, flow_build: u.build, ...F !== void 0 && { captcha_token: F }, submissions: Vs(u.nodes, Ms(a || {}, s.data.submitKeys)), pre_apply: qr(u.nodes, a || {}, u.data.flowSessionId) }) }).catch((y) => {
705
+ }, Dn), X, z = await i.fetch("/flow/submit", { method: "POST", body: JSON.stringify({ log_submit: !1, integration_id: s.data.integrationId, anonymous_id: B, session_id: L, job: c.job, flow_build: c.build, ...F !== void 0 && { captcha_token: F }, submissions: Ms(c.nodes, Ls(a || {}, s.data.submitKeys)), pre_apply: Ur(c.nodes, a || {}, c.data.flowSessionId) }) }).catch((y) => {
706
706
  X = y;
707
707
  let x = ur(y);
708
708
  return (x == null ? void 0 : x.data) !== void 0 ? x.data : y;
@@ -711,38 +711,38 @@ async function $n({ chat: e, next: r, end: t, node: s, logger: n, apiClient: i,
711
711
  return;
712
712
  if (X !== void 0 && !$t(X) && C)
713
713
  return await C(X, w), K(!0);
714
- u.data.stagingDestination = Ls(z), s.data.key && e.setSubmission(s.data.key, { type: "integration", value: z });
715
- let rt = (mt = ur(X)) == null ? void 0 : mt.status, $e = typeof rt == "number" ? rt : void 0, O = Br(z, $e), Be = O === void 0 && $e === 429, Pe = A === "terminal" && ((O == null ? void 0 : O.outcome) === "closed" || (O == null ? void 0 : O.outcome) === "duplicate"), Ae = u.data.failedAttemptAt, Re = Ae == null ? void 0 : Ae[V];
716
- Ae && Re !== void 0 && Re > Date.now() && (Re = Ae[V] = Date.now());
717
- let qe = Re !== void 0 && Date.now() - Re < Rs || ((At = u.data.unconfirmedAttemptKeys) == null ? void 0 : At.includes(V)) === !0, st = (at = $t(X)) == null ? void 0 : at.status, ve = Ns(z, typeof st == "number" ? st : void 0);
718
- ve && o.log({ event: "FLOW_SUBMIT", properties: { flow_id: u.id, flow_version: u.version, flow_session_id: u.data.flowSessionId, flow_build: u.build, service: ve.service, response: ve.response, captured: (z == null ? void 0 : z.captured) === !0, flow_type: (m == null ? void 0 : m()) ?? "CHATBOT_DRAWER", job: u.job, ...(O == null ? void 0 : O.outcome) === "duplicate" && { outcome: qe ? "duplicate_after_own_attempt" : "duplicate" }, ...ve.outcome && { outcome: ve.outcome } } });
714
+ c.data.stagingDestination = Ns(z), s.data.key && e.setSubmission(s.data.key, { type: "integration", value: z });
715
+ let rt = (mt = ur(X)) == null ? void 0 : mt.status, $e = typeof rt == "number" ? rt : void 0, O = Pr(z, $e), Be = O === void 0 && $e === 429, Pe = A === "terminal" && ((O == null ? void 0 : O.outcome) === "closed" || (O == null ? void 0 : O.outcome) === "duplicate"), Ae = c.data.failedAttemptAt, Ne = Ae == null ? void 0 : Ae[V];
716
+ Ae && Ne !== void 0 && Ne > Date.now() && (Ne = Ae[V] = Date.now());
717
+ let qe = Ne !== void 0 && Date.now() - Ne < Rs || ((At = c.data.unconfirmedAttemptKeys) == null ? void 0 : At.includes(V)) === !0, st = (at = $t(X)) == null ? void 0 : at.status, ve = Ts(z, typeof st == "number" ? st : void 0);
718
+ ve && o.log({ event: "FLOW_SUBMIT", properties: { flow_id: c.id, flow_version: c.version, flow_session_id: c.data.flowSessionId, flow_build: c.build, service: ve.service, response: ve.response, captured: (z == null ? void 0 : z.captured) === !0, flow_type: (m == null ? void 0 : m()) ?? "CHATBOT_DRAWER", job: c.job, ...(O == null ? void 0 : O.outcome) === "duplicate" && { outcome: qe ? "duplicate_after_own_attempt" : "duplicate" }, ...ve.outcome && { outcome: ve.outcome } } });
719
719
  let Ue = sr(z) || (z == null ? void 0 : z.success) === !0;
720
- if ((Ue || nr(z)) && (b.submitAccepted = !0), Ue && ((c = u.data.submitCooldown) == null ? void 0 : c.throttles) !== void 0 && (delete u.data.submitCooldown.throttles, await k().catch((y) => n.error("Failed to persist submit cooldown reset", y))), sr(z)) {
720
+ if ((Ue || nr(z)) && (b.submitAccepted = !0), Ue && ((u = c.data.submitCooldown) == null ? void 0 : u.throttles) !== void 0 && (delete c.data.submitCooldown.throttles, await k().catch((y) => n.error("Failed to persist submit cooldown reset", y))), sr(z)) {
721
721
  let { redirect_url: y, message: x, button_text: I } = z.integration_response.data, $ = { redirect_url: y, message: x, button_text: I };
722
- return w.aborted ? void 0 : (u.data.submitRedirects = { ...u.data.submitRedirects, [s.id]: $ }, await k().catch((P) => n.error("Failed to persist submit redirect", P)), await R($), r(s.nextId));
722
+ return w.aborted ? void 0 : (c.data.submitRedirects = { ...c.data.submitRedirects, [s.id]: $ }, await k().catch((P) => n.error("Failed to persist submit redirect", P)), await N($), r(s.nextId));
723
723
  }
724
724
  let ht = nr(z);
725
725
  if (ht)
726
726
  return await e.sendMessage({ type: "system", variant: "success", text: ht.message ?? v("submission_pending") }), r(s.nextId);
727
727
  if ((z == null ? void 0 : z.success) === !0)
728
728
  return s.data.skipConfirmation !== !0 && await e.sendMessage({ type: "system", variant: "success", text: v("submission_completed") }), r(s.nextId);
729
- let We = Ds(O), ze = We !== void 0 && ((d = a == null ? void 0 : a[We]) == null ? void 0 : d.type) === "file" ? We : void 0, Ne = ze === void 0 ? void 0 : u.nodes.find((y) => y.type === "question-file" && y.data.key === ze);
730
- if (!Ne && !Pe && !ar(O) && (u.data.submitCooldown = On(V, j, O)), (O == null ? void 0 : O.outcome) !== "duplicate" && !Be && (u.data.failedAttemptAt = { ...u.data.failedAttemptAt, [V]: Date.now() }, (p = u.data.unconfirmedAttemptKeys) != null && p.includes(V) && (u.data.unconfirmedAttemptKeys = u.data.unconfirmedAttemptKeys.filter((y) => y !== V))), (O == null ? void 0 : O.verdict) === "not_submitted" || (O == null ? void 0 : O.outcome) === "duplicate" || (O == null ? void 0 : O.outcome) === "closed" || Be || Ts(z, $e) ? (W || (u.data.startedWriteNodeIds = (_ = u.data.startedWriteNodeIds) == null ? void 0 : _.filter((y) => y !== s.id)), (f == null ? void 0 : f.submitNodeId) === s.id && await h(f), await k().catch((y) => n.error("Failed to persist application write barrier release", y))) : await k().catch((y) => n.error("Failed to persist submit cooldown", y)), O) {
731
- if (n.error(X ?? O.message), Ne && ze !== void 0)
732
- return e.setSubmission(ze, null), await h({ fileQuestionNodeId: Ne.id, submitNodeId: s.id }), await e.sendMessage({ type: "system", variant: "error", text: v("submission_unreadable_document") }), r(Ne.id);
729
+ let We = Ds(O), ze = We !== void 0 && ((d = a == null ? void 0 : a[We]) == null ? void 0 : d.type) === "file" ? We : void 0, Re = ze === void 0 ? void 0 : c.nodes.find((y) => y.type === "question-file" && y.data.key === ze);
730
+ if (!Re && !Pe && !ar(O) && (c.data.submitCooldown = $n(V, j, O)), (O == null ? void 0 : O.outcome) !== "duplicate" && !Be && (c.data.failedAttemptAt = { ...c.data.failedAttemptAt, [V]: Date.now() }, (h = c.data.unconfirmedAttemptKeys) != null && h.includes(V) && (c.data.unconfirmedAttemptKeys = c.data.unconfirmedAttemptKeys.filter((y) => y !== V))), (O == null ? void 0 : O.verdict) === "not_submitted" || (O == null ? void 0 : O.outcome) === "duplicate" || (O == null ? void 0 : O.outcome) === "closed" || Be || Os(z, $e) ? (W || (c.data.startedWriteNodeIds = (_ = c.data.startedWriteNodeIds) == null ? void 0 : _.filter((y) => y !== s.id)), (f == null ? void 0 : f.submitNodeId) === s.id && await p(f), await k().catch((y) => n.error("Failed to persist application write barrier release", y))) : await k().catch((y) => n.error("Failed to persist submit cooldown", y)), O) {
731
+ if (n.error(X ?? O.message), Re && ze !== void 0)
732
+ return e.setSubmission(ze, null), await p({ fileQuestionNodeId: Re.id, submitNodeId: s.id }), await e.sendMessage({ type: "system", variant: "error", text: v("submission_unreadable_document") }), r(Re.id);
733
733
  if (O.outcome === "duplicate")
734
- return await e.sendMessage({ type: "system", variant: Pe ? "success" : "info", semantic: "submission-duplicate", text: v(qe ? "submission_duplicate_earlier_attempt" : "submission_duplicate") }), Pe ? (delete u.data.submitCooldown, t()) : K(!1);
734
+ return await e.sendMessage({ type: "system", variant: Pe ? "success" : "info", semantic: "submission-duplicate", text: v(qe ? "submission_duplicate_earlier_attempt" : "submission_duplicate") }), Pe ? (delete c.data.submitCooldown, t()) : K(!1);
735
735
  if (O.outcome === "closed")
736
- return await e.sendMessage({ type: "system", variant: "info", semantic: "submission-closed", text: v("submission_closed") }), Pe ? (delete u.data.submitCooldown, t()) : K(!1);
737
- let y = Os(O);
738
- return y ? (await e.sendMessage({ type: "system", variant: "warning", text: y.until === void 0 ? v("submission_provider_maintenance_later") : v("submission_provider_maintenance", { time: Ur(y.until, void 0) }) }), K(!1)) : O.outcome === "unknown" ? (await e.sendMessage({ type: "system", variant: "warning", text: v(js(O) ? "submission_unknown_do_not_resubmit" : "submission_unknown") }), K(!1)) : ar(O) ? $s(z) ? (await e.sendMessage({ type: "text", author: "bot", text: O.message }), K(!1)) : (M === 0 && await e.sendMessage({ type: "system", variant: "warning", text: v("captcha_failed") }), M++, K(M <= In)) : Bs(O) ? (await e.sendMessage({ type: "system", variant: "error", text: v("submission_retryable") }), K(!1)) : (await e.sendMessage({ type: "system", variant: "error", text: v("submission_failed") }), t());
736
+ return await e.sendMessage({ type: "system", variant: "info", semantic: "submission-closed", text: v("submission_closed") }), Pe ? (delete c.data.submitCooldown, t()) : K(!1);
737
+ let y = js(O);
738
+ return y ? (await e.sendMessage({ type: "system", variant: "warning", text: y.until === void 0 ? v("submission_provider_maintenance_later") : v("submission_provider_maintenance", { time: Wr(y.until, void 0) }) }), K(!1)) : O.outcome === "unknown" ? (await e.sendMessage({ type: "system", variant: "warning", text: v($s(O) ? "submission_unknown_do_not_resubmit" : "submission_unknown") }), K(!1)) : ar(O) ? Bs(z) ? (await e.sendMessage({ type: "text", author: "bot", text: O.message }), K(!1)) : (M === 0 && await e.sendMessage({ type: "system", variant: "warning", text: v("captcha_failed") }), M++, K(M <= Fn)) : Ps(O) ? (await e.sendMessage({ type: "system", variant: "error", text: v("submission_retryable") }), K(!1)) : (await e.sendMessage({ type: "system", variant: "error", text: v("submission_failed") }), t());
739
739
  }
740
740
  return n.error(X ?? z), Be ? (await e.sendMessage({ type: "system", variant: "error", text: v("submission_retryable") }), K(!1)) : (await e.sendMessage({ type: "system", variant: "error", text: v("submission_failed") }), t());
741
741
  };
742
742
  await K(g === !0 && !ee ? !1 : s.data.skipConfirmation);
743
743
  }
744
- var Bn = /{{\s*\$context\.job\.apply_url\s*(?:\|[^}]*)?}}/, Pn = (e, r) => {
745
- if (!Bn.test(e))
744
+ var qn = /{{\s*\$context\.job\.apply_url\s*(?:\|[^}]*)?}}/, Un = (e, r) => {
745
+ if (!qn.test(e))
746
746
  return !1;
747
747
  try {
748
748
  let { protocol: t } = new URL(r);
@@ -751,47 +751,47 @@ var Bn = /{{\s*\$context\.job\.apply_url\s*(?:\|[^}]*)?}}/, Pn = (e, r) => {
751
751
  return !1;
752
752
  }
753
753
  };
754
- async function qn({ chat: e, next: r, node: t, submissions: s, context: n, analytics: i, flow: a }) {
755
- let o = he(t.data.href, { submissions: s, context: n }), { flowSessionId: u } = a.data;
756
- await e.sendMessage({ type: "link", href: o, text: he(t.data.cta, { submissions: s, context: n }), ...Pn(t.data.href, o) && { onClick: () => {
757
- i.log({ event: "FLOW_REDIRECT", properties: { flow_build: a.build, flow_id: a.id, flow_session_id: u, flow_version: a.version, href: o, job: a.job } });
754
+ async function Wn({ chat: e, next: r, node: t, submissions: s, context: n, analytics: i, flow: a }) {
755
+ let o = he(t.data.href, { submissions: s, context: n }), { flowSessionId: c } = a.data;
756
+ await e.sendMessage({ type: "link", href: o, text: he(t.data.cta, { submissions: s, context: n }), ...Un(t.data.href, o) && { onClick: () => {
757
+ i.log({ event: "FLOW_REDIRECT", properties: { flow_build: a.build, flow_id: a.id, flow_session_id: c, flow_version: a.version, href: o, job: a.job } });
758
758
  } } }), r(t.nextId);
759
759
  }
760
- async function Un({ submissions: e, next: r, node: t, context: s }) {
761
- r(Sn(t, { submissions: e, context: s }) ? t.branchId : t.nextId);
760
+ async function zn({ submissions: e, next: r, node: t, context: s }) {
761
+ r(In(t, { submissions: e, context: s }) ? t.branchId : t.nextId);
762
762
  }
763
- async function Wn({ chat: e, next: r, node: t, submissions: s, context: n }) {
763
+ async function Hn({ chat: e, next: r, node: t, submissions: s, context: n }) {
764
764
  await e.sendMessage({ author: "bot", type: "text", text: he(t.data.text, { submissions: s, context: n }) }), r(t.nextId);
765
765
  }
766
- async function zn({ chat: e, next: r, node: t }) {
766
+ async function Kn({ chat: e, next: r, node: t }) {
767
767
  await e.sendMessage({ author: "bot", type: "image", url: t.data.url, height: t.data.height, width: t.data.width }), r(t.nextId);
768
768
  }
769
- async function Hn({ chat: e, next: r, node: t, submissions: s, context: n, t: i, dateEchoLocale: a }) {
769
+ async function Gn({ chat: e, next: r, node: t, submissions: s, context: n, t: i, dateEchoLocale: a }) {
770
770
  await e.sendMessage({ author: "bot", type: "text", text: he(t.data.question, { submissions: s, context: n }) });
771
771
  let o = t.data.format === "phone" ? await e.userInput({ key: t.data.key, type: "phone", config: { optional: t.data.optional, placeholder: t.data.placeholder, minChars: t.data.minChars, maxChars: t.data.maxChars, submissionFormat: "text", defaultValue: {} } }) : await e.userInput({ key: t.data.key, type: "text", config: { optional: t.data.optional, placeholder: t.data.placeholder, format: t.data.format, maxChars: t.data.maxChars, minChars: t.data.minChars, multiline: t.data.format === "text" && t.data.multiline === !0 } });
772
- o === null ? await e.sendMessage({ type: "system", variant: "info", semantic: "question-skipped", text: i("skipped") }) : await e.sendMessage({ author: "user", type: "text", text: o.type === "phone" ? vt(o.value) : t.data.format === "date" && a !== void 0 ? Es(o.value, a) : o.value }), r(t.nextId);
772
+ o === null ? await e.sendMessage({ type: "system", variant: "info", semantic: "question-skipped", text: i("skipped") }) : await e.sendMessage({ author: "user", type: "text", text: o.type === "phone" ? vt(o.value) : t.data.format === "date" && a !== void 0 ? Fs(o.value, a) : o.value }), r(t.nextId);
773
773
  }
774
- async function Kn({ chat: e, next: r, node: t, submissions: s, context: n, t: i }) {
774
+ async function Jn({ chat: e, next: r, node: t, submissions: s, context: n, t: i }) {
775
775
  await e.sendMessage({ author: "bot", type: "text", text: he(t.data.question, { submissions: s, context: n }) });
776
776
  let a = await e.userInput({ key: t.data.key, type: "number", config: { max: t.data.max, min: t.data.min, optional: t.data.optional, placeholder: t.data.placeholder, decimalCases: t.data.decimalCases } });
777
777
  a === null ? await e.sendMessage({ type: "system", variant: "info", semantic: "question-skipped", text: i("skipped") }) : await e.sendMessage({ author: "user", type: "text", text: a.value.toString() }), r(t.nextId);
778
778
  }
779
- async function Gn({ chat: e, next: r, node: t, submissions: s, context: n, t: i }) {
779
+ async function Zn({ chat: e, next: r, node: t, submissions: s, context: n, t: i }) {
780
780
  await e.sendMessage({ author: "bot", type: "text", text: he(t.data.question, { submissions: s, context: n }) });
781
781
  let a = await e.userInput({ key: t.data.key, type: "phone", config: { minChars: t.data.minChars, defaultValue: { countryCode: t.data.defaultCountryCode }, placeholder: t.data.placeholder, submissionFormat: "phone", optional: t.data.optional } });
782
782
  a === null ? await e.sendMessage({ type: "system", variant: "info", semantic: "question-skipped", text: i("skipped") }) : await e.sendMessage({ author: "user", type: "text", text: a.type === "phone" ? vt(a.value) : a.value }), r(t.nextId);
783
783
  }
784
- async function Jn({ chat: e, next: r, node: t, submissions: s, context: n, t: i }) {
784
+ async function Xn({ chat: e, next: r, node: t, submissions: s, context: n, t: i }) {
785
785
  await e.sendMessage({ author: "bot", type: "text", text: he(t.data.question, { submissions: s, context: n }) });
786
786
  let a = await e.userInput({ key: t.data.key, type: "multiple-choice", config: t.data });
787
787
  a.value.length === 0 ? await e.sendMessage({ type: "system", variant: "info", semantic: "question-skipped", text: i("skipped") }) : await e.sendMessage({ author: "user", type: "text", text: t.data.options.filter((o) => a.value.includes(o.value)).map((o) => o.label).join(", ") }), r(t.nextId);
788
788
  }
789
- async function Zn({ chat: e, next: r, node: t, submissions: s, context: n, t: i }) {
789
+ async function Yn({ chat: e, next: r, node: t, submissions: s, context: n, t: i }) {
790
790
  await e.sendMessage({ author: "bot", type: "text", text: he(t.data.question, { submissions: s, context: n }) });
791
791
  let a = await e.userInput({ key: t.data.key, type: "boolean", config: { optional: t.data.optional, labels: { true: t.data.trueLabel, false: t.data.falseLabel } } });
792
792
  a === null ? await e.sendMessage({ type: "system", variant: "info", semantic: "question-skipped", text: i("skipped") }) : await e.sendMessage({ author: "user", type: "text", text: a.value === !0 ? t.data.trueLabel : t.data.falseLabel }), r(t.nextId);
793
793
  }
794
- async function Xn({ chat: e, next: r, node: t, t: s }) {
794
+ async function Qn({ chat: e, next: r, node: t, t: s }) {
795
795
  await e.sendMessage({ author: "bot", type: "text", text: t.data.question });
796
796
  let n = await e.userInput({ type: "address", key: t.data.key, config: { optional: t.data.optional, keys: t.data.keys, line2Required: t.data.line2Required, placeholder: t.data.placeholder } });
797
797
  if (n === null)
@@ -802,7 +802,7 @@ async function Xn({ chat: e, next: r, node: t, t: s }) {
802
802
  }
803
803
  return r(t.nextId);
804
804
  }
805
- async function Yn({ node: e, chat: r, next: t, submissions: s, context: n, t: i }) {
805
+ async function ea({ node: e, chat: r, next: t, submissions: s, context: n, t: i }) {
806
806
  await r.sendMessage({ author: "bot", type: "text", text: he(e.data.question, { submissions: s, context: n }) });
807
807
  let a = await r.userInput({ key: e.data.key, type: "file", config: { optional: e.data.optional, extensions: e.data.extensions, fileSizeLimitKib: e.data.maxSizeKb ?? 10 * 1024, allowMultiple: e.data.multiple === !0 } });
808
808
  if (a === null)
@@ -812,22 +812,22 @@ async function Yn({ node: e, chat: r, next: t, submissions: s, context: n, t: i
812
812
  await r.sendMessage({ author: "user", type: "file", fileName: o.name, fileSizeKb: o.sizeKb });
813
813
  return t(e.nextId);
814
814
  }
815
- async function Qn({ chat: e, end: r, node: t }) {
815
+ async function ta({ chat: e, end: r, node: t }) {
816
816
  await e.sendMessage({ type: "system", variant: "info", text: t.data.systemMessage }), r();
817
817
  }
818
- async function ea({ node: e, flow: r, submissions: t, chat: s, next: n, apiClient: i, analytics: a, signal: o, context: u }) {
819
- let f = Fs(r.nodes, t || {}), { answers: h, ...g } = f;
820
- if (s.setSubmission(e.data.key, { type: "integration", value: g }), Cn(r, i, { ...a.getSessionInfo(), job: r.job, flow_build: r.build, pre_apply: qr(r.nodes, t || {}, r.data.flowSessionId) }, o), f.status !== "skipped") {
818
+ async function ra({ node: e, flow: r, submissions: t, chat: s, next: n, apiClient: i, analytics: a, signal: o, context: c }) {
819
+ let f = Vs(r.nodes, t || {}), { answers: p, ...g } = f;
820
+ if (s.setSubmission(e.data.key, { type: "integration", value: g }), An(r, i, { ...a.getSessionInfo(), job: r.job, flow_build: r.build, pre_apply: Ur(r.nodes, t || {}, r.data.flowSessionId) }, o), f.status !== "skipped") {
821
821
  let m = [f.status === "unavailable" ? "We could not prepare your pre-apply summary. You can still continue to your application." : f.hasHardConcerns ? e.data.messages.hard : f.hasAdvisoryConcerns ? e.data.messages.advisory : e.data.messages.matched];
822
822
  for (let b of ["hard", "advisory"]) {
823
- let k = h.filter((w) => !w.matched && w.severity === b);
823
+ let k = p.filter((w) => !w.matched && w.severity === b);
824
824
  k.length && m.push((b === "hard" ? "Role requirements" : "Other things to consider") + `
825
825
  ` + k.map((w) => `• ${w.message}`).join(`
826
826
  `));
827
827
  }
828
828
  await s.sendMessage({ type: "text", author: "bot", text: m.join(`
829
829
 
830
- `) }), f.hasHardConcerns && e.data.alternativeLink && await s.sendMessage({ type: "link", href: e.data.alternativeLink.href, text: e.data.alternativeLink.label }), await s.userInput({ type: "submit", key: void 0, config: { label: he(e.data.continueLabel, { submissions: t, context: u }) } });
830
+ `) }), f.hasHardConcerns && e.data.alternativeLink && await s.sendMessage({ type: "link", href: e.data.alternativeLink.href, text: e.data.alternativeLink.label }), await s.userInput({ type: "submit", key: void 0, config: { label: he(e.data.continueLabel, { submissions: t, context: c }) } });
831
831
  }
832
832
  return n(e.nextId);
833
833
  }
@@ -845,7 +845,7 @@ const dr = (e, r, t) => {
845
845
  },
846
846
  customProperties: (s = r.analytics) == null ? void 0 : s.customProperties
847
847
  });
848
- }, Bt = "resume-prompt", ta = async ({
848
+ }, Bt = "resume-prompt", sa = async ({
849
849
  chatService: e,
850
850
  t: r,
851
851
  signal: t
@@ -916,19 +916,19 @@ function wt(e) {
916
916
  }
917
917
  var Mt;
918
918
  // @__NO_SIDE_EFFECTS__
919
- function ra(e) {
919
+ function na(e) {
920
920
  return Mt == null ? void 0 : Mt.get(e);
921
921
  }
922
922
  var Lt;
923
923
  // @__NO_SIDE_EFFECTS__
924
- function sa(e) {
924
+ function aa(e) {
925
925
  return Lt == null ? void 0 : Lt.get(e);
926
926
  }
927
- var Rt;
927
+ var Nt;
928
928
  // @__NO_SIDE_EFFECTS__
929
- function na(e, r) {
929
+ function ia(e, r) {
930
930
  var t;
931
- return (t = Rt == null ? void 0 : Rt.get(e)) == null ? void 0 : t.get(r);
931
+ return (t = Nt == null ? void 0 : Nt.get(e)) == null ? void 0 : t.get(r);
932
932
  }
933
933
  // @__NO_SIDE_EFFECTS__
934
934
  function Xe(e) {
@@ -937,7 +937,7 @@ function Xe(e) {
937
937
  return r === "string" ? `"${e}"` : r === "number" || r === "bigint" || r === "boolean" ? `${e}` : r === "object" || r === "function" ? (e && ((s = (t = Object.getPrototypeOf(e)) == null ? void 0 : t.constructor) == null ? void 0 : s.name)) ?? "null" : r;
938
938
  }
939
939
  function se(e, r, t, s, n) {
940
- const i = n && "input" in n ? n.input : t.value, a = (n == null ? void 0 : n.expected) ?? e.expects ?? null, o = (n == null ? void 0 : n.received) ?? /* @__PURE__ */ Xe(i), u = {
940
+ const i = n && "input" in n ? n.input : t.value, a = (n == null ? void 0 : n.expected) ?? e.expects ?? null, o = (n == null ? void 0 : n.received) ?? /* @__PURE__ */ Xe(i), c = {
941
941
  kind: e.kind,
942
942
  type: e.type,
943
943
  input: i,
@@ -950,11 +950,11 @@ function se(e, r, t, s, n) {
950
950
  lang: s.lang,
951
951
  abortEarly: s.abortEarly,
952
952
  abortPipeEarly: s.abortPipeEarly
953
- }, f = e.kind === "schema", h = (n == null ? void 0 : n.message) ?? e.message ?? /* @__PURE__ */ na(e.reference, u.lang) ?? (f ? /* @__PURE__ */ sa(u.lang) : null) ?? s.message ?? /* @__PURE__ */ ra(u.lang);
954
- h !== void 0 && (u.message = typeof h == "function" ? (
953
+ }, f = e.kind === "schema", p = (n == null ? void 0 : n.message) ?? e.message ?? /* @__PURE__ */ ia(e.reference, c.lang) ?? (f ? /* @__PURE__ */ aa(c.lang) : null) ?? s.message ?? /* @__PURE__ */ na(c.lang);
954
+ p !== void 0 && (c.message = typeof p == "function" ? (
955
955
  // @ts-expect-error
956
- h(u)
957
- ) : h), f && (t.typed = !1), t.issues ? t.issues.push(u) : t.issues = [u];
956
+ p(c)
957
+ ) : p), f && (t.typed = !1), t.issues ? t.issues.push(c) : t.issues = [c];
958
958
  }
959
959
  // @__NO_SIDE_EFFECTS__
960
960
  function ge(e) {
@@ -967,16 +967,16 @@ function ge(e) {
967
967
  };
968
968
  }
969
969
  // @__NO_SIDE_EFFECTS__
970
- function aa(e, r) {
970
+ function oa(e, r) {
971
971
  return Object.hasOwn(e, r) && r !== "__proto__" && r !== "prototype" && r !== "constructor";
972
972
  }
973
973
  // @__NO_SIDE_EFFECTS__
974
- function ia(e, r) {
974
+ function la(e, r) {
975
975
  const t = [...new Set(e)];
976
976
  return t.length > 1 ? `(${t.join(` ${r} `)})` : t[0] ?? "never";
977
977
  }
978
978
  // @__NO_SIDE_EFFECTS__
979
- function oa(e) {
979
+ function ca(e) {
980
980
  if (e.path) {
981
981
  let r = "";
982
982
  for (const t of e.path)
@@ -988,7 +988,7 @@ function oa(e) {
988
988
  }
989
989
  return null;
990
990
  }
991
- var la = class extends Error {
991
+ var ua = class extends Error {
992
992
  /**
993
993
  * Creates a Valibot error with useful information.
994
994
  *
@@ -997,13 +997,13 @@ var la = class extends Error {
997
997
  constructor(e) {
998
998
  super(e[0].message), this.name = "ValiError", this.issues = e;
999
999
  }
1000
- }, ca = /^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;
1000
+ }, da = /^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;
1001
1001
  // @__NO_SIDE_EFFECTS__
1002
- function Yr(e, r) {
1002
+ function Qr(e, r) {
1003
1003
  return {
1004
1004
  kind: "validation",
1005
1005
  type: "check",
1006
- reference: Yr,
1006
+ reference: Qr,
1007
1007
  async: !1,
1008
1008
  expects: null,
1009
1009
  requirement: e,
@@ -1014,14 +1014,14 @@ function Yr(e, r) {
1014
1014
  };
1015
1015
  }
1016
1016
  // @__NO_SIDE_EFFECTS__
1017
- function Qr(e) {
1017
+ function es(e) {
1018
1018
  return {
1019
1019
  kind: "validation",
1020
1020
  type: "email",
1021
- reference: Qr,
1021
+ reference: es,
1022
1022
  expects: null,
1023
1023
  async: !1,
1024
- requirement: ca,
1024
+ requirement: da,
1025
1025
  message: e,
1026
1026
  "~run"(r, t) {
1027
1027
  return r.typed && !this.requirement.test(r.value) && se(this, "email", r, t), r;
@@ -1046,11 +1046,11 @@ function ct(e, r) {
1046
1046
  };
1047
1047
  }
1048
1048
  // @__NO_SIDE_EFFECTS__
1049
- function es(e, r) {
1049
+ function ts(e, r) {
1050
1050
  return {
1051
1051
  kind: "validation",
1052
1052
  type: "max_value",
1053
- reference: es,
1053
+ reference: ts,
1054
1054
  async: !1,
1055
1055
  expects: `<=${e instanceof Date ? e.toJSON() : /* @__PURE__ */ Xe(e)}`,
1056
1056
  requirement: e,
@@ -1080,11 +1080,11 @@ function Ze(e, r) {
1080
1080
  };
1081
1081
  }
1082
1082
  // @__NO_SIDE_EFFECTS__
1083
- function ts(e, r) {
1083
+ function rs(e, r) {
1084
1084
  return {
1085
1085
  kind: "validation",
1086
1086
  type: "min_value",
1087
- reference: ts,
1087
+ reference: rs,
1088
1088
  async: !1,
1089
1089
  expects: `>=${e instanceof Date ? e.toJSON() : /* @__PURE__ */ Xe(e)}`,
1090
1090
  requirement: e,
@@ -1125,11 +1125,11 @@ function Kt(e) {
1125
1125
  };
1126
1126
  }
1127
1127
  // @__NO_SIDE_EFFECTS__
1128
- function rs(e) {
1128
+ function ss(e) {
1129
1129
  return {
1130
1130
  kind: "validation",
1131
1131
  type: "url",
1132
- reference: rs,
1132
+ reference: ss,
1133
1133
  async: !1,
1134
1134
  expects: null,
1135
1135
  requirement(r) {
@@ -1146,7 +1146,7 @@ function rs(e) {
1146
1146
  };
1147
1147
  }
1148
1148
  // @__NO_SIDE_EFFECTS__
1149
- function ua(e, r, t) {
1149
+ function fa(e, r, t) {
1150
1150
  return typeof e.fallback == "function" ? (
1151
1151
  // @ts-expect-error
1152
1152
  e.fallback(r, t)
@@ -1156,7 +1156,7 @@ function ua(e, r, t) {
1156
1156
  );
1157
1157
  }
1158
1158
  // @__NO_SIDE_EFFECTS__
1159
- function ss(e, r, t) {
1159
+ function ns(e, r, t) {
1160
1160
  return typeof e.default == "function" ? (
1161
1161
  // @ts-expect-error
1162
1162
  e.default(r, t)
@@ -1166,11 +1166,11 @@ function ss(e, r, t) {
1166
1166
  );
1167
1167
  }
1168
1168
  // @__NO_SIDE_EFFECTS__
1169
- function ns(e, r) {
1169
+ function as(e, r) {
1170
1170
  return {
1171
1171
  kind: "schema",
1172
1172
  type: "array",
1173
- reference: ns,
1173
+ reference: as,
1174
1174
  expects: "Array",
1175
1175
  async: !1,
1176
1176
  item: e,
@@ -1184,8 +1184,8 @@ function ns(e, r) {
1184
1184
  if (Array.isArray(n)) {
1185
1185
  t.typed = !0, t.value = [];
1186
1186
  for (let a = 0; a < n.length; a++) {
1187
- const o = n[a], u = this.item["~run"]({ value: o }, s);
1188
- if (u.issues) {
1187
+ const o = n[a], c = this.item["~run"]({ value: o }, s);
1188
+ if (c.issues) {
1189
1189
  const f = {
1190
1190
  type: "array",
1191
1191
  origin: "value",
@@ -1193,14 +1193,14 @@ function ns(e, r) {
1193
1193
  key: a,
1194
1194
  value: o
1195
1195
  };
1196
- for (const h of u.issues)
1197
- h.path ? h.path.unshift(f) : h.path = [f], (i = t.issues) == null || i.push(h);
1198
- if (t.issues || (t.issues = u.issues), s.abortEarly) {
1196
+ for (const p of c.issues)
1197
+ p.path ? p.path.unshift(f) : p.path = [f], (i = t.issues) == null || i.push(p);
1198
+ if (t.issues || (t.issues = c.issues), s.abortEarly) {
1199
1199
  t.typed = !1;
1200
1200
  break;
1201
1201
  }
1202
1202
  }
1203
- u.typed || (t.typed = !1), t.value.push(u.value);
1203
+ c.typed || (t.typed = !1), t.value.push(c.value);
1204
1204
  }
1205
1205
  } else
1206
1206
  se(this, "type", t, s);
@@ -1209,11 +1209,11 @@ function ns(e, r) {
1209
1209
  };
1210
1210
  }
1211
1211
  // @__NO_SIDE_EFFECTS__
1212
- function as(e) {
1212
+ function is(e) {
1213
1213
  return {
1214
1214
  kind: "schema",
1215
1215
  type: "boolean",
1216
- reference: as,
1216
+ reference: is,
1217
1217
  expects: "boolean",
1218
1218
  async: !1,
1219
1219
  message: e,
@@ -1226,11 +1226,11 @@ function as(e) {
1226
1226
  };
1227
1227
  }
1228
1228
  // @__NO_SIDE_EFFECTS__
1229
- function is(e) {
1229
+ function os(e) {
1230
1230
  return {
1231
1231
  kind: "schema",
1232
1232
  type: "number",
1233
- reference: is,
1233
+ reference: os,
1234
1234
  expects: "number",
1235
1235
  async: !1,
1236
1236
  message: e,
@@ -1264,20 +1264,20 @@ function Ce(e, r) {
1264
1264
  const o = this.entries[a];
1265
1265
  if (a in n || (o.type === "exact_optional" || o.type === "optional" || o.type === "nullish") && // @ts-expect-error
1266
1266
  o.default !== void 0) {
1267
- const u = a in n ? (
1267
+ const c = a in n ? (
1268
1268
  // @ts-expect-error
1269
1269
  n[a]
1270
- ) : /* @__PURE__ */ ss(o), f = o["~run"]({ value: u }, s);
1270
+ ) : /* @__PURE__ */ ns(o), f = o["~run"]({ value: c }, s);
1271
1271
  if (f.issues) {
1272
- const h = {
1272
+ const p = {
1273
1273
  type: "object",
1274
1274
  origin: "value",
1275
1275
  input: n,
1276
1276
  key: a,
1277
- value: u
1277
+ value: c
1278
1278
  };
1279
1279
  for (const g of f.issues)
1280
- g.path ? g.path.unshift(h) : g.path = [h], (i = t.issues) == null || i.push(g);
1280
+ g.path ? g.path.unshift(p) : g.path = [p], (i = t.issues) == null || i.push(g);
1281
1281
  if (t.issues || (t.issues = f.issues), s.abortEarly) {
1282
1282
  t.typed = !1;
1283
1283
  break;
@@ -1285,7 +1285,7 @@ function Ce(e, r) {
1285
1285
  }
1286
1286
  f.typed || (t.typed = !1), t.value[a] = f.value;
1287
1287
  } else if (o.fallback !== void 0)
1288
- t.value[a] = /* @__PURE__ */ ua(o);
1288
+ t.value[a] = /* @__PURE__ */ fa(o);
1289
1289
  else if (o.type !== "exact_optional" && o.type !== "optional" && o.type !== "nullish" && (se(this, "key", t, s, {
1290
1290
  input: void 0,
1291
1291
  expected: `"${a}"`,
@@ -1322,17 +1322,17 @@ function Je(e, r) {
1322
1322
  return /* @__PURE__ */ ge(this);
1323
1323
  },
1324
1324
  "~run"(t, s) {
1325
- return t.value === void 0 && (this.default !== void 0 && (t.value = /* @__PURE__ */ ss(this, t, s)), t.value === void 0) ? (t.typed = !0, t) : this.wrapped["~run"](t, s);
1325
+ return t.value === void 0 && (this.default !== void 0 && (t.value = /* @__PURE__ */ ns(this, t, s)), t.value === void 0) ? (t.typed = !0, t) : this.wrapped["~run"](t, s);
1326
1326
  }
1327
1327
  };
1328
1328
  }
1329
1329
  // @__NO_SIDE_EFFECTS__
1330
- function os(e, r) {
1330
+ function ls(e, r) {
1331
1331
  return {
1332
1332
  kind: "schema",
1333
1333
  type: "picklist",
1334
- reference: os,
1335
- expects: /* @__PURE__ */ ia(e.map(Xe), "|"),
1334
+ reference: ls,
1335
+ expects: /* @__PURE__ */ la(e.map(Xe), "|"),
1336
1336
  async: !1,
1337
1337
  options: e,
1338
1338
  message: r,
@@ -1345,11 +1345,11 @@ function os(e, r) {
1345
1345
  };
1346
1346
  }
1347
1347
  // @__NO_SIDE_EFFECTS__
1348
- function ls(e, r, t) {
1348
+ function cs(e, r, t) {
1349
1349
  return {
1350
1350
  kind: "schema",
1351
1351
  type: "record",
1352
- reference: ls,
1352
+ reference: cs,
1353
1353
  expects: "Object",
1354
1354
  async: !1,
1355
1355
  key: e,
@@ -1363,20 +1363,20 @@ function ls(e, r, t) {
1363
1363
  const i = s.value;
1364
1364
  if (i && typeof i == "object") {
1365
1365
  s.typed = !0, s.value = {};
1366
- for (const u in i)
1367
- if (/* @__PURE__ */ aa(i, u)) {
1368
- const f = i[u], h = this.key["~run"]({ value: u }, n);
1369
- if (h.issues) {
1366
+ for (const c in i)
1367
+ if (/* @__PURE__ */ oa(i, c)) {
1368
+ const f = i[c], p = this.key["~run"]({ value: c }, n);
1369
+ if (p.issues) {
1370
1370
  const m = {
1371
1371
  type: "object",
1372
1372
  origin: "key",
1373
1373
  input: i,
1374
- key: u,
1374
+ key: c,
1375
1375
  value: f
1376
1376
  };
1377
- for (const b of h.issues)
1377
+ for (const b of p.issues)
1378
1378
  b.path = [m], (a = s.issues) == null || a.push(b);
1379
- if (s.issues || (s.issues = h.issues), n.abortEarly) {
1379
+ if (s.issues || (s.issues = p.issues), n.abortEarly) {
1380
1380
  s.typed = !1;
1381
1381
  break;
1382
1382
  }
@@ -1390,7 +1390,7 @@ function ls(e, r, t) {
1390
1390
  type: "object",
1391
1391
  origin: "value",
1392
1392
  input: i,
1393
- key: u,
1393
+ key: c,
1394
1394
  value: f
1395
1395
  };
1396
1396
  for (const b of g.issues)
@@ -1400,7 +1400,7 @@ function ls(e, r, t) {
1400
1400
  break;
1401
1401
  }
1402
1402
  }
1403
- (!h.typed || !g.typed) && (s.typed = !1), h.typed && (s.value[h.value] = g.value);
1403
+ (!p.typed || !g.typed) && (s.typed = !1), p.typed && (s.value[p.value] = g.value);
1404
1404
  }
1405
1405
  } else
1406
1406
  se(this, "type", s, n);
@@ -1425,14 +1425,14 @@ function le(e) {
1425
1425
  }
1426
1426
  };
1427
1427
  }
1428
- function da(e, r, t) {
1428
+ function ha(e, r, t) {
1429
1429
  const s = e["~run"]({ value: r }, /* @__PURE__ */ wt(t));
1430
1430
  if (s.issues)
1431
- throw new la(s.issues);
1431
+ throw new ua(s.issues);
1432
1432
  return s.value;
1433
1433
  }
1434
1434
  // @__NO_SIDE_EFFECTS__
1435
- function fa(e, r) {
1435
+ function pa(e, r) {
1436
1436
  const t = {};
1437
1437
  for (const s in e.entries)
1438
1438
  t[s] = !r || r.includes(s) ? /* @__PURE__ */ Je(e.entries[s]) : e.entries[s];
@@ -1466,7 +1466,7 @@ function Me(...e) {
1466
1466
  };
1467
1467
  }
1468
1468
  // @__NO_SIDE_EFFECTS__
1469
- function ha(e, r, t) {
1469
+ function ma(e, r, t) {
1470
1470
  const s = e["~run"]({ value: r }, /* @__PURE__ */ wt(t));
1471
1471
  return {
1472
1472
  typed: s.typed,
@@ -1476,7 +1476,7 @@ function ha(e, r, t) {
1476
1476
  };
1477
1477
  }
1478
1478
  // @__NO_SIDE_EFFECTS__
1479
- async function pa(e, r, t) {
1479
+ async function ya(e, r, t) {
1480
1480
  const s = await e["~run"](
1481
1481
  { value: r },
1482
1482
  /* @__PURE__ */ wt(t)
@@ -1552,7 +1552,7 @@ const tt = ({
1552
1552
  }), t("skip")]
1553
1553
  });
1554
1554
  };
1555
- var Gt = { Afghanistan: "93", Albania: "355", Algeria: "213", "American Samoa": "1 684", Andorra: "376", Angola: "244", Anguilla: "1 264", Antarctica: "672", "Antigua and Barbuda": "1 268", Argentina: "54", Armenia: "374", Aruba: "297", Australia: "61", Austria: "43", Azerbaijan: "994", Bahrain: "973", Bangladesh: "880", Barbados: "1 246", Belarus: "375", Belgium: "32", Belize: "501", Benin: "229", Bermuda: "1 441", Bhutan: "975", Bolivia: "591", "Bosnia and Herzegovina": "387", Botswana: "267", "Bouvet Island": "47", Brazil: "55", "British Indian Ocean Territory": "246", "British Virgin Islands": "1 284", Brunei: "673", Bulgaria: "359", "Burkina Faso": "226", Burundi: "257", "Cabo Verde": "238", Cambodia: "855", Cameroon: "237", Canada: "1", "Caribbean Netherlands": "599", "Cayman Islands": "1 345", "Central African Republic": "236", Chad: "235", Chile: "56", China: "86", "Christmas Island": "61", "Cocos (Keeling) Islands": "61", Colombia: "57", Comoros: "269", "Cook Islands": "682", "Costa Rica": "506", Croatia: "385", Cuba: "53", Curaçao: "599", Cyprus: "357", Czechia: "420", "Côte d'Ivoire": "225", "Democratic Republic of the Congo": "243", Denmark: "45", Djibouti: "253", "Dominican Republic": "1 809", Ecuador: "593", Egypt: "20", "El Salvador": "503", "Equatorial Guinea": "240", Eritrea: "291", Estonia: "372", Eswatini: "268", Ethiopia: "251", "Falkland Islands (Islas Malvinas)": "500", "Faroe Islands": "298", Fiji: "679", Finland: "358", France: "33", "French Guiana": "594", "French Polynesia": "689", "French Southern and Antarctic Lands": "262", Gabon: "241", Georgia: "995", Germany: "49", Ghana: "233", Gibraltar: "350", Greece: "30", Greenland: "299", Grenada: "1 473", Guadeloupe: "590", Guam: "1 671", Guatemala: "502", Guernsey: "44", Guinea: "224", "Guinea-Bissau": "245", Guyana: "592", Haiti: "509", Honduras: "504", "Hong Kong": "852", Hungary: "36", Iceland: "354", India: "91", Indonesia: "62", Iran: "98", Iraq: "964", Ireland: "353", "Isle of Man": "44", Israel: "972", Italy: "39", Jamaica: "1 876", Japan: "81", Jersey: "44", Jordan: "962", Kazakhstan: "7", Kenya: "254", Kiribati: "686", Kosovo: "383", Kuwait: "965", Kyrgyzstan: "996", Laos: "856", Latvia: "371", Lebanon: "961", Lesotho: "266", Liberia: "231", Libya: "218", Liechtenstein: "423", Lithuania: "370", Luxembourg: "352", Macao: "853", Madagascar: "261", Malawi: "265", Malaysia: "60", Maldives: "960", Mali: "223", Malta: "356", "Marshall Islands": "692", Martinique: "596", Mauritania: "222", Mauritius: "230", Mayotte: "262", Mexico: "52", Micronesia: "691", Moldova: "373", Monaco: "377", Mongolia: "976", Montenegro: "382", Montserrat: "1 664", Morocco: "212", Mozambique: "258", "Myanmar (Burma)": "95", Namibia: "264", Nauru: "674", Nepal: "977", Netherlands: "31", "New Caledonia": "687", "New Zealand": "64", Nicaragua: "505", Niger: "227", Nigeria: "234", Niue: "683", "Norfolk Island": "672", "North Korea": "850", "North Macedonia": "389", "Northern Mariana Islands": "1 670", Norway: "47", Oman: "968", Pakistan: "92", Palau: "680", Palestine: "970", Panama: "507", "Papua New Guinea": "675", Paraguay: "595", Peru: "51", Philippines: "63", "Pitcairn Islands": "64", Poland: "48", Portugal: "351", "Puerto Rico": "1 787", Qatar: "974", Romania: "40", Russia: "7", Rwanda: "250", Réunion: "262", "Saint Barthélemy": "590", "Saint Helena, Ascension and Tristan da Cunha": "290", "Saint Kitts and Nevis": "1 869", "Saint Lucia": "1 758", "Saint Martin": "590", "Saint Pierre and Miquelon": "508", "Saint Vincent and the Grenadines": "1 784", Samoa: "685", "San Marino": "378", "Saudi Arabia": "966", Senegal: "221", Serbia: "381", Seychelles: "248", "Sierra Leone": "232", Singapore: "65", "Sint Maarten": "1 721", Slovakia: "421", Slovenia: "386", "Solomon Islands": "677", Somalia: "252", "South Africa": "27", "South Georgia and the South Sandwich Islands": "500", "South Korea": "82", "South Sudan": "211", Spain: "34", "Sri Lanka": "94", Sudan: "249", Suriname: "597", "Svalbard and Jan Mayen": "47", Sweden: "46", Switzerland: "41", Syria: "963", "São Tomé and Príncipe": "239", Taiwan: "886", Tajikistan: "992", Tanzania: "255", Thailand: "66", "The Bahamas": "1 242", "The Gambia": "220", "Timor-Leste": "670", Togo: "228", Tokelau: "690", Tonga: "676", "Trinidad and Tobago": "1 868", Tunisia: "216", Turkmenistan: "993", "Turks and Caicos Islands": "1 649", Tuvalu: "688", Türkiye: "90", "U.S. Virgin Islands": "1 340", Uganda: "256", Ukraine: "380", "United Arab Emirates": "971", "United Kingdom": "44", "United States": "1", "United States Minor Outlying Islands": "1", Uruguay: "598", Uzbekistan: "998", Vanuatu: "678", "Vatican City": "379", Venezuela: "58", Vietnam: "84", "Wallis and Futuna": "681", "Western Sahara": "212", Yemen: "967", Zambia: "260", Zimbabwe: "263", "Åland Islands": "358" }, ma = (e) => {
1555
+ var Gt = { Afghanistan: "93", Albania: "355", Algeria: "213", "American Samoa": "1 684", Andorra: "376", Angola: "244", Anguilla: "1 264", Antarctica: "672", "Antigua and Barbuda": "1 268", Argentina: "54", Armenia: "374", Aruba: "297", Australia: "61", Austria: "43", Azerbaijan: "994", Bahrain: "973", Bangladesh: "880", Barbados: "1 246", Belarus: "375", Belgium: "32", Belize: "501", Benin: "229", Bermuda: "1 441", Bhutan: "975", Bolivia: "591", "Bosnia and Herzegovina": "387", Botswana: "267", "Bouvet Island": "47", Brazil: "55", "British Indian Ocean Territory": "246", "British Virgin Islands": "1 284", Brunei: "673", Bulgaria: "359", "Burkina Faso": "226", Burundi: "257", "Cabo Verde": "238", Cambodia: "855", Cameroon: "237", Canada: "1", "Caribbean Netherlands": "599", "Cayman Islands": "1 345", "Central African Republic": "236", Chad: "235", Chile: "56", China: "86", "Christmas Island": "61", "Cocos (Keeling) Islands": "61", Colombia: "57", Comoros: "269", "Cook Islands": "682", "Costa Rica": "506", Croatia: "385", Cuba: "53", Curaçao: "599", Cyprus: "357", Czechia: "420", "Côte d'Ivoire": "225", "Democratic Republic of the Congo": "243", Denmark: "45", Djibouti: "253", "Dominican Republic": "1 809", Ecuador: "593", Egypt: "20", "El Salvador": "503", "Equatorial Guinea": "240", Eritrea: "291", Estonia: "372", Eswatini: "268", Ethiopia: "251", "Falkland Islands (Islas Malvinas)": "500", "Faroe Islands": "298", Fiji: "679", Finland: "358", France: "33", "French Guiana": "594", "French Polynesia": "689", "French Southern and Antarctic Lands": "262", Gabon: "241", Georgia: "995", Germany: "49", Ghana: "233", Gibraltar: "350", Greece: "30", Greenland: "299", Grenada: "1 473", Guadeloupe: "590", Guam: "1 671", Guatemala: "502", Guernsey: "44", Guinea: "224", "Guinea-Bissau": "245", Guyana: "592", Haiti: "509", Honduras: "504", "Hong Kong": "852", Hungary: "36", Iceland: "354", India: "91", Indonesia: "62", Iran: "98", Iraq: "964", Ireland: "353", "Isle of Man": "44", Israel: "972", Italy: "39", Jamaica: "1 876", Japan: "81", Jersey: "44", Jordan: "962", Kazakhstan: "7", Kenya: "254", Kiribati: "686", Kosovo: "383", Kuwait: "965", Kyrgyzstan: "996", Laos: "856", Latvia: "371", Lebanon: "961", Lesotho: "266", Liberia: "231", Libya: "218", Liechtenstein: "423", Lithuania: "370", Luxembourg: "352", Macao: "853", Madagascar: "261", Malawi: "265", Malaysia: "60", Maldives: "960", Mali: "223", Malta: "356", "Marshall Islands": "692", Martinique: "596", Mauritania: "222", Mauritius: "230", Mayotte: "262", Mexico: "52", Micronesia: "691", Moldova: "373", Monaco: "377", Mongolia: "976", Montenegro: "382", Montserrat: "1 664", Morocco: "212", Mozambique: "258", "Myanmar (Burma)": "95", Namibia: "264", Nauru: "674", Nepal: "977", Netherlands: "31", "New Caledonia": "687", "New Zealand": "64", Nicaragua: "505", Niger: "227", Nigeria: "234", Niue: "683", "Norfolk Island": "672", "North Korea": "850", "North Macedonia": "389", "Northern Mariana Islands": "1 670", Norway: "47", Oman: "968", Pakistan: "92", Palau: "680", Palestine: "970", Panama: "507", "Papua New Guinea": "675", Paraguay: "595", Peru: "51", Philippines: "63", "Pitcairn Islands": "64", Poland: "48", Portugal: "351", "Puerto Rico": "1 787", Qatar: "974", Romania: "40", Russia: "7", Rwanda: "250", Réunion: "262", "Saint Barthélemy": "590", "Saint Helena, Ascension and Tristan da Cunha": "290", "Saint Kitts and Nevis": "1 869", "Saint Lucia": "1 758", "Saint Martin": "590", "Saint Pierre and Miquelon": "508", "Saint Vincent and the Grenadines": "1 784", Samoa: "685", "San Marino": "378", "Saudi Arabia": "966", Senegal: "221", Serbia: "381", Seychelles: "248", "Sierra Leone": "232", Singapore: "65", "Sint Maarten": "1 721", Slovakia: "421", Slovenia: "386", "Solomon Islands": "677", Somalia: "252", "South Africa": "27", "South Georgia and the South Sandwich Islands": "500", "South Korea": "82", "South Sudan": "211", Spain: "34", "Sri Lanka": "94", Sudan: "249", Suriname: "597", "Svalbard and Jan Mayen": "47", Sweden: "46", Switzerland: "41", Syria: "963", "São Tomé and Príncipe": "239", Taiwan: "886", Tajikistan: "992", Tanzania: "255", Thailand: "66", "The Bahamas": "1 242", "The Gambia": "220", "Timor-Leste": "670", Togo: "228", Tokelau: "690", Tonga: "676", "Trinidad and Tobago": "1 868", Tunisia: "216", Turkmenistan: "993", "Turks and Caicos Islands": "1 649", Tuvalu: "688", Türkiye: "90", "U.S. Virgin Islands": "1 340", Uganda: "256", Ukraine: "380", "United Arab Emirates": "971", "United Kingdom": "44", "United States": "1", "United States Minor Outlying Islands": "1", Uruguay: "598", Uzbekistan: "998", Vanuatu: "678", "Vatican City": "379", Venezuela: "58", Vietnam: "84", "Wallis and Futuna": "681", "Western Sahara": "212", Yemen: "967", Zambia: "260", Zimbabwe: "263", "Åland Islands": "358" }, ba = (e) => {
1556
1556
  if (e === "")
1557
1557
  return { countryCode: "", phoneNumber: "" };
1558
1558
  let r = Object.values(Gt).find((s) => e.startsWith(s)) ?? "", t = e.replace(r, "");
@@ -1568,16 +1568,16 @@ const Ye = xt("outline-divider ease-expo-out placeholder:text-neutral-10 text-ne
1568
1568
  defaultVariants: {
1569
1569
  optional: !1
1570
1570
  }
1571
- }), ya = "https://api.mapbox.com/search/searchbox/v1/suggest", ba = "ZzRDWFU0dTZ3SF9aWk9RNGl6QzZaWS5RZmlFak13a0hPbGxXZXlNSGN5RUhObUJ6TXpSV08yUW5OdE5tSTZJU1lpd2lJb1JYYXRObmJ2Tm5iaGhHZWx4V1lpb2pJMUp5ZS5rcA==", ga = (e) => atob(e).split("").reverse().join(""), we = /* @__PURE__ */ Ce({
1571
+ }), ga = "https://api.mapbox.com/search/searchbox/v1/suggest", va = "ZzRDWFU0dTZ3SF9aWk9RNGl6QzZaWS5RZmlFak13a0hPbGxXZXlNSGN5RUhObUJ6TXpSV08yUW5OdE5tSTZJU1lpd2lJb1JYYXRObmJ2Tm5iaGhHZWx4V1lpb2pJMUp5ZS5rcA==", xa = (e) => atob(e).split("").reverse().join(""), we = /* @__PURE__ */ Ce({
1572
1572
  name: /* @__PURE__ */ le()
1573
- }), va = /* @__PURE__ */ Ce({
1574
- suggestions: /* @__PURE__ */ ns(/* @__PURE__ */ Ce({
1573
+ }), wa = /* @__PURE__ */ Ce({
1574
+ suggestions: /* @__PURE__ */ as(/* @__PURE__ */ Ce({
1575
1575
  feature_type: /* @__PURE__ */ Je(/* @__PURE__ */ le()),
1576
1576
  full_address: /* @__PURE__ */ Je(/* @__PURE__ */ le()),
1577
1577
  place_formatted: /* @__PURE__ */ Je(/* @__PURE__ */ le()),
1578
1578
  name: /* @__PURE__ */ Je(/* @__PURE__ */ le()),
1579
1579
  mapbox_id: /* @__PURE__ */ le(),
1580
- context: /* @__PURE__ */ fa(/* @__PURE__ */ Ce({
1580
+ context: /* @__PURE__ */ pa(/* @__PURE__ */ Ce({
1581
1581
  address: we,
1582
1582
  street: we,
1583
1583
  neighborhood: we,
@@ -1589,39 +1589,39 @@ const Ye = xt("outline-divider ease-expo-out placeholder:text-neutral-10 text-ne
1589
1589
  country: we
1590
1590
  }))
1591
1591
  }))
1592
- }), xa = ({
1592
+ }), _a = ({
1593
1593
  logger: e,
1594
1594
  t: r
1595
- }) => Ws(() => {
1595
+ }) => zs(() => {
1596
1596
  var s;
1597
1597
  const t = (s = q.current$.peek().flow) == null ? void 0 : s.data.flowSessionId;
1598
1598
  return t ? {
1599
1599
  enabled: !0,
1600
1600
  getPredictions: async (n) => {
1601
1601
  var g;
1602
- const i = new URL(ya);
1602
+ const i = new URL(ga);
1603
1603
  i.searchParams.set("q", n), i.searchParams.set("session_token", t);
1604
1604
  const a = (g = q.current$.peek().flow) == null ? void 0 : g.locationOrigin;
1605
- a && a.lat !== void 0 && a.lng !== void 0 && a.lat >= -90 && a.lat <= 90 && a.lng >= -180 && a.lng <= 180 && i.searchParams.set("proximity", `${a.lng},${a.lat}`), i.searchParams.set("access_token", ga(ba));
1606
- const u = await fetch(i);
1607
- if (!u.ok)
1608
- return e.error("Failed to get address details", u), {
1605
+ a && a.lat !== void 0 && a.lng !== void 0 && a.lat >= -90 && a.lat <= 90 && a.lng >= -180 && a.lng <= 180 && i.searchParams.set("proximity", `${a.lng},${a.lat}`), i.searchParams.set("access_token", xa(va));
1606
+ const c = await fetch(i);
1607
+ if (!c.ok)
1608
+ return e.error("Failed to get address details", c), {
1609
1609
  ok: !1,
1610
1610
  error: r("address_error")
1611
1611
  };
1612
- const f = /* @__PURE__ */ ha(va, await u.json());
1612
+ const f = /* @__PURE__ */ ma(wa, await c.json());
1613
1613
  if (f.success === !1)
1614
1614
  return e.error("Failed to parse address details", f.issues), {
1615
1615
  ok: !1,
1616
1616
  error: r("address_error")
1617
1617
  };
1618
1618
  const {
1619
- suggestions: h
1619
+ suggestions: p
1620
1620
  } = f.output;
1621
1621
  return {
1622
1622
  ok: !0,
1623
- data: h.map((m) => {
1624
- var b, k, w, C, A, v, R, V, M;
1623
+ data: p.map((m) => {
1624
+ var b, k, w, C, A, v, N, V, M;
1625
1625
  return {
1626
1626
  // A postcode result has no full address and is named by the postcode itself (PROD-7311).
1627
1627
  label: m.full_address ?? ([m.name, m.place_formatted].filter(Boolean).join(", ") || m.mapbox_id),
@@ -1631,7 +1631,7 @@ const Ye = xt("outline-divider ease-expo-out placeholder:text-neutral-10 text-ne
1631
1631
  line2: void 0,
1632
1632
  line3: ((w = m.context.neighborhood) == null ? void 0 : w.name) ?? ((C = m.context.locality) == null ? void 0 : C.name),
1633
1633
  city: ((A = m.context.place) == null ? void 0 : A.name) ?? ((v = m.context.district) == null ? void 0 : v.name),
1634
- state: (R = m.context.region) == null ? void 0 : R.name,
1634
+ state: (N = m.context.region) == null ? void 0 : N.name,
1635
1635
  postcode: ((V = m.context.postcode) == null ? void 0 : V.name) ?? (m.feature_type === "postcode" ? m.name : void 0),
1636
1636
  country: (M = m.context.country) == null ? void 0 : M.name
1637
1637
  }
@@ -1665,7 +1665,7 @@ const Ye = xt("outline-divider ease-expo-out placeholder:text-neutral-10 text-ne
1665
1665
  children: r("back")
1666
1666
  })]
1667
1667
  });
1668
- }, wa = ({
1668
+ }, ka = ({
1669
1669
  input: e,
1670
1670
  onSubmitSuccess: r,
1671
1671
  logger: t
@@ -1675,10 +1675,10 @@ const Ye = xt("outline-divider ease-expo-out placeholder:text-neutral-10 text-ne
1675
1675
  } = re(), [n, i] = ke(), {
1676
1676
  enabled: a,
1677
1677
  getPredictions: o
1678
- } = xa({
1678
+ } = _a({
1679
1679
  logger: t,
1680
1680
  t: s
1681
- }), [u, f] = ke(a ? "query" : "manual"), [h, g] = ke(""), [m, b] = ke(), k = ye(), w = ye(), C = (v) => {
1681
+ }), [c, f] = ke(a ? "query" : "manual"), [p, g] = ke(""), [m, b] = ke(), k = ye(), w = ye(), C = (v) => {
1682
1682
  var V;
1683
1683
  if (Oe(a, "Query state should not be enabled"), v = v.trim(), v === ((V = k.current) == null ? void 0 : V.query) || v === (m == null ? void 0 : m.query) && m.status === "done")
1684
1684
  return;
@@ -1686,14 +1686,14 @@ const Ye = xt("outline-divider ease-expo-out placeholder:text-neutral-10 text-ne
1686
1686
  k.current = void 0, b(void 0);
1687
1687
  return;
1688
1688
  }
1689
- const R = k.current = {
1689
+ const N = k.current = {
1690
1690
  query: v
1691
1691
  };
1692
1692
  b({
1693
1693
  query: v,
1694
1694
  status: "pending"
1695
1695
  }), o(v).then((M) => {
1696
- k.current === R && (k.current = void 0, b(M.ok ? {
1696
+ k.current === N && (k.current = void 0, b(M.ok ? {
1697
1697
  query: v,
1698
1698
  status: "done",
1699
1699
  items: M.data
@@ -1703,21 +1703,21 @@ const Ye = xt("outline-divider ease-expo-out placeholder:text-neutral-10 text-ne
1703
1703
  error: M.error
1704
1704
  }));
1705
1705
  }, (M) => {
1706
- k.current === R && (k.current = void 0, t.error("Failed to get address details", M), b({
1706
+ k.current === N && (k.current = void 0, t.error("Failed to get address details", M), b({
1707
1707
  query: v,
1708
1708
  status: "failed",
1709
1709
  error: s("address_error")
1710
1710
  }));
1711
1711
  });
1712
- }, A = (v, R) => {
1712
+ }, A = (v, N) => {
1713
1713
  i((V) => ({
1714
1714
  ...V,
1715
- [v]: R
1715
+ [v]: N
1716
1716
  }));
1717
1717
  };
1718
- switch (u) {
1718
+ switch (c) {
1719
1719
  case "query":
1720
- return Oe(a, "Query state should not be enabled"), l(_a, {
1720
+ return Oe(a, "Query state should not be enabled"), l(Ca, {
1721
1721
  input: e,
1722
1722
  onSkip: () => r(null),
1723
1723
  onAddressSelect: (v) => {
@@ -1725,12 +1725,12 @@ const Ye = xt("outline-divider ease-expo-out placeholder:text-neutral-10 text-ne
1725
1725
  k.current && (k.current = void 0, b(void 0)), f("manual");
1726
1726
  return;
1727
1727
  }
1728
- const R = (m == null ? void 0 : m.status) === "done" ? m.items.find((V) => V.id === v) : void 0;
1729
- R && (w.current !== v && i(R.address), w.current = v, f("details"));
1728
+ const N = (m == null ? void 0 : m.status) === "done" ? m.items.find((V) => V.id === v) : void 0;
1729
+ N && (w.current !== v && i(N.address), w.current = v, f("details"));
1730
1730
  },
1731
1731
  onAddressSearch: C,
1732
1732
  lookup: m,
1733
- query: h
1733
+ query: p
1734
1734
  });
1735
1735
  case "details":
1736
1736
  return Oe(n !== void 0), l(hr, {
@@ -1764,7 +1764,7 @@ const Ye = xt("outline-divider ease-expo-out placeholder:text-neutral-10 text-ne
1764
1764
  ) : void 0
1765
1765
  });
1766
1766
  }
1767
- }, _a = ({
1767
+ }, Ca = ({
1768
1768
  input: e,
1769
1769
  onSkip: r,
1770
1770
  lookup: t,
@@ -1780,10 +1780,10 @@ const Ye = xt("outline-divider ease-expo-out placeholder:text-neutral-10 text-ne
1780
1780
  }, []), l(be, {
1781
1781
  children: [l("form", {
1782
1782
  noValidate: !0,
1783
- onSubmit: (u) => {
1784
- u.preventDefault();
1785
- const h = new FormData(u.currentTarget).get("address");
1786
- typeof h == "string" && i(h);
1783
+ onSubmit: (c) => {
1784
+ c.preventDefault();
1785
+ const p = new FormData(c.currentTarget).get("address");
1786
+ typeof p == "string" && i(p);
1787
1787
  },
1788
1788
  class: "flex gap-2 p-2.5",
1789
1789
  children: [l("div", {
@@ -1847,15 +1847,15 @@ const Ye = xt("outline-divider ease-expo-out placeholder:text-neutral-10 text-ne
1847
1847
  }), a("address_searching")]
1848
1848
  }) : (t == null ? void 0 : t.status) === "done" && t.items.length === 0 ? a("address_no_results") : null
1849
1849
  }), l("ul", {
1850
- children: [((t == null ? void 0 : t.status) === "done" ? t.items : []).map((u) => l("li", {
1850
+ children: [((t == null ? void 0 : t.status) === "done" ? t.items : []).map((c) => l("li", {
1851
1851
  children: l("button", {
1852
1852
  class: "text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",
1853
1853
  onClick: () => {
1854
- s(u.id);
1854
+ s(c.id);
1855
1855
  },
1856
1856
  children: [l("span", {
1857
1857
  class: "flex-grow",
1858
- children: u.label
1858
+ children: c.label
1859
1859
  }), l("svg", {
1860
1860
  class: "flex-none",
1861
1861
  width: "16",
@@ -1870,7 +1870,7 @@ const Ye = xt("outline-divider ease-expo-out placeholder:text-neutral-10 text-ne
1870
1870
  })
1871
1871
  })]
1872
1872
  })
1873
- }, u.id)), l("li", {
1873
+ }, c.id)), l("li", {
1874
1874
  children: l("button", {
1875
1875
  class: "text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",
1876
1876
  onClick: () => {
@@ -1884,7 +1884,7 @@ const Ye = xt("outline-divider ease-expo-out placeholder:text-neutral-10 text-ne
1884
1884
  }, "")]
1885
1885
  })]
1886
1886
  });
1887
- }, Nt = ["line1", "line2", "line3", "city", "state", "postcode", "country"], hr = ({
1887
+ }, Rt = ["line1", "line2", "line3", "city", "state", "postcode", "country"], hr = ({
1888
1888
  addressFields: e,
1889
1889
  onFieldChange: r,
1890
1890
  onSubmitSuccess: t,
@@ -1894,8 +1894,8 @@ const Ye = xt("outline-divider ease-expo-out placeholder:text-neutral-10 text-ne
1894
1894
  const i = ye(null);
1895
1895
  Le(() => {
1896
1896
  if (i.current) {
1897
- const u = i.current.querySelector("input");
1898
- u && (u.focus(), u.select());
1897
+ const c = i.current.querySelector("input");
1898
+ c && (c.focus(), c.select());
1899
1899
  }
1900
1900
  }, []);
1901
1901
  const a = Object.keys(Gt), {
@@ -1903,15 +1903,15 @@ const Ye = xt("outline-divider ease-expo-out placeholder:text-neutral-10 text-ne
1903
1903
  } = re();
1904
1904
  return l("form", {
1905
1905
  class: "flex flex-col px-2 pt-2",
1906
- onSubmit: (u) => {
1907
- u.preventDefault();
1908
- const f = u.currentTarget, h = [...f.querySelectorAll("input")].filter((b) => b.value !== "" && !b.value.trim());
1909
- for (const b of h) {
1906
+ onSubmit: (c) => {
1907
+ c.preventDefault();
1908
+ const f = c.currentTarget, p = [...f.querySelectorAll("input")].filter((b) => b.value !== "" && !b.value.trim());
1909
+ for (const b of p) {
1910
1910
  b.value = "";
1911
- const k = Nt.find((w) => n.config.keys[w] === b.name);
1911
+ const k = Rt.find((w) => n.config.keys[w] === b.name);
1912
1912
  k && r(k, "");
1913
1913
  }
1914
- if (h.length > 0 && !f.checkValidity()) {
1914
+ if (p.length > 0 && !f.checkValidity()) {
1915
1915
  f.reportValidity();
1916
1916
  return;
1917
1917
  }
@@ -1924,27 +1924,27 @@ const Ye = xt("outline-divider ease-expo-out placeholder:text-neutral-10 text-ne
1924
1924
  children: [l("div", {
1925
1925
  class: "bg-neutral-3 border-neutral-5 grid items-center gap-1.5 rounded-2xl border pb-2 pl-4 pr-3 pt-3 [grid-template-columns:min-content_1fr]",
1926
1926
  ref: i,
1927
- children: Nt.map((u, f) => {
1928
- const h = `isdk_${u}`, g = n.config.keys[u];
1927
+ children: Rt.map((c, f) => {
1928
+ const p = `isdk_${c}`, g = n.config.keys[c];
1929
1929
  return g ? l(be, {
1930
1930
  children: [l("label", {
1931
- for: h,
1931
+ for: p,
1932
1932
  class: "text-neutral-11 [&:has(+*>input:focus)]:text-neutral-12 w-24 pb-2 text-xs uppercase leading-3 tracking-widest transition-colors",
1933
- children: o(u)
1933
+ children: o(c)
1934
1934
  }), l("div", {
1935
1935
  class: "flex flex-col items-stretch gap-1.5",
1936
- children: [u === "country" ? l("div", {
1936
+ children: [c === "country" ? l("div", {
1937
1937
  class: "relative",
1938
1938
  children: [l("select", {
1939
1939
  class: "text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 w-full flex-1 appearance-none rounded-lg border-solid bg-transparent bg-none px-3 py-1.5 text-base transition-colors focus:outline-none",
1940
1940
  name: g,
1941
- id: h,
1942
- defaultValue: e[u],
1943
- onChange: (m) => r(u, m.currentTarget.value),
1941
+ id: p,
1942
+ defaultValue: e[c],
1943
+ onChange: (m) => r(c, m.currentTarget.value),
1944
1944
  required: !0,
1945
1945
  children: [e.country && !a.includes(e.country) ? l("option", {
1946
- value: e[u],
1947
- children: e[u]
1946
+ value: e[c],
1947
+ children: e[c]
1948
1948
  }) : l("option", {
1949
1949
  value: "",
1950
1950
  children: o("select_country")
@@ -1971,11 +1971,11 @@ const Ye = xt("outline-divider ease-expo-out placeholder:text-neutral-10 text-ne
1971
1971
  autoFocus: f === 0 ? !0 : void 0,
1972
1972
  class: "text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 flex-1 rounded-lg border-solid bg-transparent px-3 py-1.5 text-base transition-colors autofill:shadow-[inset_0_0_0_1000px_hsl(210_16.7%_97.6%)] focus:outline-none",
1973
1973
  name: g,
1974
- id: h,
1975
- defaultValue: e[u],
1976
- onInput: (m) => r(u, m.currentTarget.value),
1977
- required: u === "line2" ? n.config.line2Required === !0 : u !== "line3"
1978
- }), f === Nt.length - 1 ? l("hr", {
1974
+ id: p,
1975
+ defaultValue: e[c],
1976
+ onInput: (m) => r(c, m.currentTarget.value),
1977
+ required: c === "line2" ? n.config.line2Required === !0 : c !== "line3"
1978
+ }), f === Rt.length - 1 ? l("hr", {
1979
1979
  class: "m-0 w-full border-b border-b-transparent"
1980
1980
  }) : l("hr", {
1981
1981
  class: "border-b-neutral-5 m-0 w-full border-b border-solid"
@@ -1992,11 +1992,11 @@ const Ye = xt("outline-divider ease-expo-out placeholder:text-neutral-10 text-ne
1992
1992
  });
1993
1993
  }, Jt = () => {
1994
1994
  const e = ye(null);
1995
- return zr(() => {
1995
+ return Hr(() => {
1996
1996
  var r;
1997
1997
  (r = e.current) == null || r.focus();
1998
1998
  }, []), e;
1999
- }, cs = ["true", "false"], ka = /* @__PURE__ */ os(cs), Ca = "answer", us = "flex items-center flex-wrap gap-2 p-2.5", ds = "min-w-0 max-w-full flex-auto", fs = Hr(({
1999
+ }, us = ["true", "false"], Sa = /* @__PURE__ */ ls(us), Aa = "answer", ds = "flex items-center flex-wrap gap-2 p-2.5", fs = "min-w-0 max-w-full flex-auto", hs = Kr(({
2000
2000
  label: e,
2001
2001
  ...r
2002
2002
  }, t) => l("button", {
@@ -2007,7 +2007,7 @@ const Ye = xt("outline-divider ease-expo-out placeholder:text-neutral-10 text-ne
2007
2007
  class: "text-center text-base",
2008
2008
  children: e
2009
2009
  })
2010
- })), Sa = ({
2010
+ })), Ia = ({
2011
2011
  input: e,
2012
2012
  onSubmitSuccess: r
2013
2013
  }) => {
@@ -2017,20 +2017,20 @@ const Ye = xt("outline-divider ease-expo-out placeholder:text-neutral-10 text-ne
2017
2017
  class: "",
2018
2018
  onSubmit: (s) => {
2019
2019
  s.preventDefault();
2020
- const n = zs(s).value, i = da(ka, n);
2020
+ const n = Hs(s).value, i = ha(Sa, n);
2021
2021
  r({
2022
2022
  type: "boolean",
2023
2023
  value: i === "true"
2024
2024
  });
2025
2025
  },
2026
2026
  children: [l("ul", {
2027
- class: us,
2028
- children: cs.map((s, n) => l("li", {
2029
- class: ds,
2030
- children: l(fs, {
2027
+ class: ds,
2028
+ children: us.map((s, n) => l("li", {
2029
+ class: fs,
2030
+ children: l(hs, {
2031
2031
  ref: n === 0 ? t : null,
2032
2032
  type: "submit",
2033
- name: Ca,
2033
+ name: Aa,
2034
2034
  value: s,
2035
2035
  label: e.config.labels[s]
2036
2036
  }, s)
@@ -2044,10 +2044,10 @@ const Ye = xt("outline-divider ease-expo-out placeholder:text-neutral-10 text-ne
2044
2044
  })
2045
2045
  })]
2046
2046
  });
2047
- }, pr = (e) => e.reduce((r, t) => r + t.sizeKb, 0), Aa = et("file"), mr = 3, _t = (e) => {
2047
+ }, pr = (e) => e.reduce((r, t) => r + t.sizeKb, 0), Ea = et("file"), mr = 3, _t = (e) => {
2048
2048
  const r = e.lastIndexOf(".");
2049
2049
  return r === -1 ? [e, ""] : [e.slice(0, r), e.slice(r)];
2050
- }, Ia = ({
2050
+ }, Fa = ({
2051
2051
  file: e,
2052
2052
  class: r,
2053
2053
  ...t
@@ -2083,27 +2083,27 @@ const Ye = xt("outline-divider ease-expo-out placeholder:text-neutral-10 text-ne
2083
2083
  }) => l("li", {
2084
2084
  class: Qe("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1", e),
2085
2085
  ...r
2086
- }), Ea = (e, r) => {
2086
+ }), Va = (e, r) => {
2087
2087
  const [t, s] = _t(e);
2088
2088
  return `${t.slice(0, r)}${s}`;
2089
2089
  }, br = (e) => ({
2090
- name: Ea(e.name, 42),
2090
+ name: Va(e.name, 42),
2091
2091
  sizeKb: e.size / 1e3
2092
- }), Fa = [".heic", ".heif", ".jpg", ".jpeg", ".png", ".gif", ".webp", ".txt", ".rtf", ".odt", ".pages", ".zip"], Va = (e, r, t) => {
2093
- const s = _t(r.name)[1].toLowerCase(), n = [...t.map((a) => a.toLowerCase()), ...Fa], i = s === "" ? "none" : n.includes(s) ? s : "other";
2092
+ }), Ma = [".heic", ".heif", ".jpg", ".jpeg", ".png", ".gif", ".webp", ".txt", ".rtf", ".odt", ".pages", ".zip"], La = (e, r, t) => {
2093
+ const s = _t(r.name)[1].toLowerCase(), n = [...t.map((a) => a.toLowerCase()), ...Ma], i = s === "" ? "none" : n.includes(s) ? s : "other";
2094
2094
  return `chatbot-file-refused:${e}:${i}`;
2095
- }, Ma = ({
2095
+ }, Na = ({
2096
2096
  input: e,
2097
2097
  onSubmitSuccess: r,
2098
2098
  analytics: t
2099
2099
  }) => {
2100
2100
  var C;
2101
- const s = (C = q.current$.value.flow) == null ? void 0 : C.data.submissions[e.key], [n, i] = ke(Aa(s) && s.value.length ? {
2101
+ const s = (C = q.current$.value.flow) == null ? void 0 : C.data.submissions[e.key], [n, i] = ke(Ea(s) && s.value.length ? {
2102
2102
  status: "ready",
2103
2103
  files: s.value
2104
2104
  } : {
2105
2105
  status: "empty"
2106
- }), a = ye(0), o = n.status === "ready" ? n.files : [], u = n.status === "ready" || n.status === "pending" ? n.files : [], f = n.status === "error" ? n.error : void 0, h = u.length - mr, g = pr(u), m = Jt(), {
2106
+ }), a = ye(0), o = n.status === "ready" ? n.files : [], c = n.status === "ready" || n.status === "pending" ? n.files : [], f = n.status === "error" ? n.error : void 0, p = c.length - mr, g = pr(c), m = Jt(), {
2107
2107
  t: b
2108
2108
  } = re(), k = (A) => {
2109
2109
  if (!A.length)
@@ -2155,13 +2155,13 @@ const Ye = xt("outline-divider ease-expo-out placeholder:text-neutral-10 text-ne
2155
2155
  }
2156
2156
  };
2157
2157
  }, w = (A, v) => {
2158
- var R, V;
2158
+ var N, V;
2159
2159
  return t.log({
2160
2160
  event: "INTERACTION",
2161
2161
  properties: {
2162
- tag: Va(A, v, e.config.extensions)
2162
+ tag: La(A, v, e.config.extensions)
2163
2163
  },
2164
- customProperties: (V = (R = q.current$.peek().flow) == null ? void 0 : R.analytics) == null ? void 0 : V.customProperties
2164
+ customProperties: (V = (N = q.current$.peek().flow) == null ? void 0 : N.analytics) == null ? void 0 : V.customProperties
2165
2165
  });
2166
2166
  };
2167
2167
  return l("form", {
@@ -2184,22 +2184,22 @@ const Ye = xt("outline-divider ease-expo-out placeholder:text-neutral-10 text-ne
2184
2184
  ref: m,
2185
2185
  for: "dropzone-file",
2186
2186
  class: "border-neutral-8 bg-neutral-2 flex h-48 w-full cursor-pointer flex-col items-center justify-center overflow-hidden rounded-2xl border border-dashed p-4",
2187
- children: [u.length > 0 ? l("ul", {
2187
+ children: [c.length > 0 ? l("ul", {
2188
2188
  class: "flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",
2189
- children: [u.slice(0, mr).map((A) => {
2190
- const [v, R] = _t(A.name);
2189
+ children: [c.slice(0, mr).map((A) => {
2190
+ const [v, N] = _t(A.name);
2191
2191
  return l(yr, {
2192
2192
  class: "flex overflow-hidden",
2193
2193
  children: [l("span", {
2194
2194
  class: "block truncate",
2195
2195
  children: v
2196
2196
  }), l("span", {
2197
- children: R
2197
+ children: N
2198
2198
  })]
2199
2199
  });
2200
- }), h > 0 ? l(yr, {
2200
+ }), p > 0 ? l(yr, {
2201
2201
  children: b("file_more", {
2202
- count: h
2202
+ count: p
2203
2203
  })
2204
2204
  }) : null]
2205
2205
  }) : l("div", {
@@ -2247,13 +2247,13 @@ const Ye = xt("outline-divider ease-expo-out placeholder:text-neutral-10 text-ne
2247
2247
  })]
2248
2248
  }), l("p", {
2249
2249
  role: "status",
2250
- class: Qe("text-neutral-11 flex items-center gap-1.5 text-xs", u.length === 0 && "sr-only"),
2250
+ class: Qe("text-neutral-11 flex items-center gap-1.5 text-xs", c.length === 0 && "sr-only"),
2251
2251
  children: n.status === "pending" ? l(be, {
2252
2252
  children: [l(Ut, {
2253
2253
  "aria-hidden": "true",
2254
2254
  class: "h-4 w-4"
2255
2255
  }), b("file_preparing", {
2256
- count: u.length
2256
+ count: c.length
2257
2257
  })]
2258
2258
  }) : n.status === "ready" ? l(be, {
2259
2259
  children: [o.length > 1 ? b("file_total_size", {
@@ -2274,12 +2274,12 @@ const Ye = xt("outline-divider ease-expo-out placeholder:text-neutral-10 text-ne
2274
2274
  Oe(A.target instanceof HTMLInputElement);
2275
2275
  const v = A.target.files ? Array.from(A.target.files) : [];
2276
2276
  A.target.value = "";
2277
- const [R] = v;
2278
- if (!R)
2277
+ const [N] = v;
2278
+ if (!N)
2279
2279
  return;
2280
2280
  const V = ++a.current, M = n.status === "ready", ee = v.map(br), K = k(ee);
2281
2281
  if (K)
2282
- return w(K.reason, K.file ?? R), i({
2282
+ return w(K.reason, K.file ?? N), i({
2283
2283
  status: "error",
2284
2284
  error: K.error
2285
2285
  });
@@ -2287,26 +2287,26 @@ const Ye = xt("outline-divider ease-expo-out placeholder:text-neutral-10 text-ne
2287
2287
  status: "pending",
2288
2288
  files: ee
2289
2289
  });
2290
- let T;
2290
+ let D;
2291
2291
  try {
2292
- const N = await Promise.all(v.map(async (D) => {
2292
+ const R = await Promise.all(v.map(async (T) => {
2293
2293
  try {
2294
2294
  return {
2295
- ...br(D),
2296
- data: await Hs(D)
2295
+ ...br(T),
2296
+ data: await Ks(T)
2297
2297
  };
2298
2298
  } catch (j) {
2299
- throw T ?? (T = D), j;
2299
+ throw D ?? (D = T), j;
2300
2300
  }
2301
2301
  }));
2302
2302
  a.current === V && i({
2303
2303
  status: "ready",
2304
- files: N
2304
+ files: R
2305
2305
  });
2306
2306
  } catch {
2307
2307
  if (a.current !== V)
2308
2308
  return;
2309
- w("unreadable", T ?? R), i({
2309
+ w("unreadable", D ?? N), i({
2310
2310
  status: "error",
2311
2311
  error: {
2312
2312
  type: "invalid",
@@ -2334,9 +2334,9 @@ const Ye = xt("outline-divider ease-expo-out placeholder:text-neutral-10 text-ne
2334
2334
  })]
2335
2335
  });
2336
2336
  };
2337
- var ft = (e) => e.type === "checkbox", Te = (e) => e instanceof Date, oe = (e) => e == null;
2338
- const hs = (e) => typeof e == "object";
2339
- var Z = (e) => !oe(e) && !Array.isArray(e) && hs(e) && !Te(e), La = (e) => Z(e) && e.target ? ft(e.target) ? e.target.checked : e.target.value : e, Ra = (e) => e.substring(0, e.search(/\.\d+(\.|$)/)) || e, Na = (e, r) => e.has(Ra(r)), Da = (e) => {
2337
+ var ft = (e) => e.type === "checkbox", De = (e) => e instanceof Date, oe = (e) => e == null;
2338
+ const ps = (e) => typeof e == "object";
2339
+ var Z = (e) => !oe(e) && !Array.isArray(e) && ps(e) && !De(e), Ra = (e) => Z(e) && e.target ? ft(e.target) ? e.target.checked : e.target.value : e, Ta = (e) => e.substring(0, e.search(/\.\d+(\.|$)/)) || e, Da = (e, r) => e.has(Ta(r)), Oa = (e) => {
2340
2340
  const r = e.constructor && e.constructor.prototype;
2341
2341
  return Z(r) && r.hasOwnProperty("isPrototypeOf");
2342
2342
  }, Zt = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u";
@@ -2347,7 +2347,7 @@ function Q(e) {
2347
2347
  if (Zt && (e instanceof Blob || r))
2348
2348
  return e;
2349
2349
  const t = Array.isArray(e);
2350
- if (!t && !(Z(e) && Da(e)))
2350
+ if (!t && !(Z(e) && Oa(e)))
2351
2351
  return e;
2352
2352
  const s = t ? [] : Object.create(Object.getPrototypeOf(e));
2353
2353
  for (const n in e)
@@ -2364,14 +2364,14 @@ var kt = (e) => /^\w*$/.test(e), G = (e) => e === void 0, Xt = (e) => Array.isAr
2364
2364
  const n = kt(r) ? [r] : Yt(r), i = n.length, a = i - 1;
2365
2365
  for (; ++s < i; ) {
2366
2366
  const o = n[s];
2367
- let u = t;
2367
+ let c = t;
2368
2368
  if (s !== a) {
2369
2369
  const f = e[o];
2370
- u = Z(f) || Array.isArray(f) ? f : isNaN(+n[s + 1]) ? {} : [];
2370
+ c = Z(f) || Array.isArray(f) ? f : isNaN(+n[s + 1]) ? {} : [];
2371
2371
  }
2372
2372
  if (o === "__proto__" || o === "constructor" || o === "prototype")
2373
2373
  return;
2374
- e[o] = u, e = e[o];
2374
+ e[o] = c, e = e[o];
2375
2375
  }
2376
2376
  };
2377
2377
  const gr = {
@@ -2392,9 +2392,9 @@ const gr = {
2392
2392
  pattern: "pattern",
2393
2393
  required: "required",
2394
2394
  validate: "validate"
2395
- }, Ta = ae.createContext(null);
2396
- Ta.displayName = "HookFormControlContext";
2397
- var Oa = (e, r, t, s = !0) => {
2395
+ }, ja = ae.createContext(null);
2396
+ ja.displayName = "HookFormControlContext";
2397
+ var $a = (e, r, t, s = !0) => {
2398
2398
  const n = {
2399
2399
  defaultValues: r._defaultValues
2400
2400
  };
@@ -2407,12 +2407,12 @@ var Oa = (e, r, t, s = !0) => {
2407
2407
  });
2408
2408
  return n;
2409
2409
  };
2410
- const ja = typeof window < "u" ? ae.useLayoutEffect : ae.useEffect;
2411
- var ue = (e) => typeof e == "string", $a = (e, r, t, s, n) => ue(e) ? (s && r.watch.add(e), S(t, e, n)) : Array.isArray(e) ? e.map((i) => (s && r.watch.add(i), S(t, i))) : (s && (r.watchAll = !0), t), Pt = (e) => oe(e) || !hs(e);
2410
+ const Ba = typeof window < "u" ? ae.useLayoutEffect : ae.useEffect;
2411
+ var ue = (e) => typeof e == "string", Pa = (e, r, t, s, n) => ue(e) ? (s && r.watch.add(e), S(t, e, n)) : Array.isArray(e) ? e.map((i) => (s && r.watch.add(i), S(t, i))) : (s && (r.watchAll = !0), t), Pt = (e) => oe(e) || !ps(e);
2412
2412
  function Ve(e, r, t = /* @__PURE__ */ new WeakSet()) {
2413
2413
  if (Pt(e) || Pt(r))
2414
2414
  return Object.is(e, r);
2415
- if (Te(e) && Te(r))
2415
+ if (De(e) && De(r))
2416
2416
  return Object.is(e.getTime(), r.getTime());
2417
2417
  const s = Object.keys(e), n = Object.keys(r);
2418
2418
  if (s.length !== n.length)
@@ -2426,15 +2426,15 @@ function Ve(e, r, t = /* @__PURE__ */ new WeakSet()) {
2426
2426
  return !1;
2427
2427
  if (i !== "ref") {
2428
2428
  const o = r[i];
2429
- if (Te(a) && Te(o) || Z(a) && Z(o) || Array.isArray(a) && Array.isArray(o) ? !Ve(a, o, t) : !Object.is(a, o))
2429
+ if (De(a) && De(o) || Z(a) && Z(o) || Array.isArray(a) && Array.isArray(o) ? !Ve(a, o, t) : !Object.is(a, o))
2430
2430
  return !1;
2431
2431
  }
2432
2432
  }
2433
2433
  return !0;
2434
2434
  }
2435
- const Ba = ae.createContext(null);
2436
- Ba.displayName = "HookFormContext";
2437
- var ps = (e, r, t, s, n) => r ? {
2435
+ const qa = ae.createContext(null);
2436
+ qa.displayName = "HookFormContext";
2437
+ var ms = (e, r, t, s, n) => r ? {
2438
2438
  ...t[e],
2439
2439
  types: {
2440
2440
  ...t[e] && t[e].types ? t[e].types : {},
@@ -2460,13 +2460,13 @@ var ps = (e, r, t, s, n) => r ? {
2460
2460
  }
2461
2461
  };
2462
2462
  };
2463
- function ms(e, r) {
2463
+ function ys(e, r) {
2464
2464
  const t = {};
2465
2465
  for (const s in e)
2466
2466
  if (e.hasOwnProperty(s)) {
2467
2467
  const n = e[s], i = r[s];
2468
2468
  if (n && Z(n) && i) {
2469
- const a = ms(n, i);
2469
+ const a = ys(n, i);
2470
2470
  Z(a) && (t[s] = a);
2471
2471
  } else
2472
2472
  e[s] && (t[s] = i);
@@ -2478,37 +2478,37 @@ var ie = (e) => Z(e) && !Object.keys(e).length, Qt = (e) => e.type === "file", b
2478
2478
  return !1;
2479
2479
  const r = e ? e.ownerDocument : 0;
2480
2480
  return e instanceof (r && r.defaultView ? r.defaultView.HTMLElement : HTMLElement);
2481
- }, ys = (e) => e.type === "select-multiple", er = (e) => e.type === "radio", Pa = (e) => er(e) || ft(e), Dt = (e) => bt(e) && e.isConnected;
2482
- function qa(e, r) {
2481
+ }, bs = (e) => e.type === "select-multiple", er = (e) => e.type === "radio", Ua = (e) => er(e) || ft(e), Tt = (e) => bt(e) && e.isConnected;
2482
+ function Wa(e, r) {
2483
2483
  const t = r.slice(0, -1).length;
2484
2484
  let s = 0;
2485
2485
  for (; s < t; )
2486
2486
  e = G(e) ? s++ : e[r[s++]];
2487
2487
  return e;
2488
2488
  }
2489
- function Ua(e) {
2489
+ function za(e) {
2490
2490
  for (const r in e)
2491
2491
  if (e.hasOwnProperty(r) && !G(e[r]))
2492
2492
  return !1;
2493
2493
  return !0;
2494
2494
  }
2495
2495
  function J(e, r) {
2496
- const t = Array.isArray(r) ? r : kt(r) ? [r] : Yt(r), s = t.length === 1 ? e : qa(e, t), n = t.length - 1, i = t[n];
2497
- return s && delete s[i], n !== 0 && (Z(s) && ie(s) || Array.isArray(s) && Ua(s)) && J(e, t.slice(0, -1)), e;
2496
+ const t = Array.isArray(r) ? r : kt(r) ? [r] : Yt(r), s = t.length === 1 ? e : Wa(e, t), n = t.length - 1, i = t[n];
2497
+ return s && delete s[i], n !== 0 && (Z(s) && ie(s) || Array.isArray(s) && za(s)) && J(e, t.slice(0, -1)), e;
2498
2498
  }
2499
- var Wa = (e) => {
2499
+ var Ha = (e) => {
2500
2500
  for (const r in e)
2501
2501
  if (de(e[r]))
2502
2502
  return !0;
2503
2503
  return !1;
2504
2504
  };
2505
- function bs(e) {
2506
- return Array.isArray(e) || Z(e) && !Wa(e);
2505
+ function gs(e) {
2506
+ return Array.isArray(e) || Z(e) && !Ha(e);
2507
2507
  }
2508
2508
  function qt(e, r = {}) {
2509
2509
  for (const t in e) {
2510
2510
  const s = e[t];
2511
- bs(s) ? (r[t] = Array.isArray(s) ? [] : {}, qt(s, r[t])) : G(s) || (r[t] = !0);
2511
+ gs(s) ? (r[t] = Array.isArray(s) ? [] : {}, qt(s, r[t])) : G(s) || (r[t] = !0);
2512
2512
  }
2513
2513
  return r;
2514
2514
  }
@@ -2516,7 +2516,7 @@ function Ke(e, r, t) {
2516
2516
  t || (t = qt(r));
2517
2517
  for (const s in e) {
2518
2518
  const n = e[s];
2519
- if (bs(n))
2519
+ if (gs(n))
2520
2520
  G(r) || Pt(t[s]) ? t[s] = qt(n, Array.isArray(n) ? [] : {}) : Ke(n, oe(r) ? {} : r[s], t[s]);
2521
2521
  else {
2522
2522
  const i = r[s];
@@ -2529,7 +2529,7 @@ const xr = {
2529
2529
  value: !1,
2530
2530
  isValid: !1
2531
2531
  }, wr = { value: !0, isValid: !0 };
2532
- var gs = (e) => {
2532
+ var vs = (e) => {
2533
2533
  if (Array.isArray(e)) {
2534
2534
  if (e.length > 1) {
2535
2535
  const r = e.filter((t) => t && t.checked && !t.disabled).map((t) => t.value);
@@ -2541,20 +2541,20 @@ var gs = (e) => {
2541
2541
  ) : xr;
2542
2542
  }
2543
2543
  return xr;
2544
- }, vs = (e, { valueAsNumber: r, valueAsDate: t, setValueAs: s }) => G(e) ? e : r ? e === "" ? NaN : e && +e : t && ue(e) ? new Date(e) : s ? s(e) : e;
2544
+ }, xs = (e, { valueAsNumber: r, valueAsDate: t, setValueAs: s }) => G(e) ? e : r ? e === "" ? NaN : e && +e : t && ue(e) ? new Date(e) : s ? s(e) : e;
2545
2545
  const _r = {
2546
2546
  isValid: !1,
2547
2547
  value: null
2548
2548
  };
2549
- var xs = (e) => Array.isArray(e) ? e.reduce((r, t) => t && t.checked && !t.disabled ? {
2549
+ var ws = (e) => Array.isArray(e) ? e.reduce((r, t) => t && t.checked && !t.disabled ? {
2550
2550
  isValid: !0,
2551
2551
  value: t.value
2552
2552
  } : r, _r) : _r;
2553
2553
  function kr(e) {
2554
2554
  const r = e.ref;
2555
- return Qt(r) ? r.files : er(r) ? xs(e.refs).value : ys(r) ? [...r.selectedOptions].map(({ value: t }) => t) : ft(r) ? gs(e.refs).value : vs(G(r.value) ? e.ref.value : r.value, e);
2555
+ return Qt(r) ? r.files : er(r) ? ws(e.refs).value : bs(r) ? [...r.selectedOptions].map(({ value: t }) => t) : ft(r) ? vs(e.refs).value : xs(G(r.value) ? e.ref.value : r.value, e);
2556
2556
  }
2557
- var za = (e, r, t, s) => {
2557
+ var Ka = (e, r, t, s) => {
2558
2558
  const n = {};
2559
2559
  for (const i of e) {
2560
2560
  const a = S(r, i);
@@ -2574,7 +2574,7 @@ var za = (e, r, t, s) => {
2574
2574
  isOnTouch: e === fe.onTouched
2575
2575
  });
2576
2576
  const Sr = "AsyncFunction";
2577
- var Ha = (e) => !!e && !!e.validate && !!(de(e.validate) && e.validate.constructor.name === Sr || Z(e.validate) && Object.values(e.validate).find((r) => r.constructor.name === Sr)), Ka = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate), Ar = (e, r, t) => !t && (r.watchAll || r.watch.has(e) || [...r.watch].some((s) => e.startsWith(s) && /^\.\w+/.test(e.slice(s.length))));
2577
+ var Ga = (e) => !!e && !!e.validate && !!(de(e.validate) && e.validate.constructor.name === Sr || Z(e.validate) && Object.values(e.validate).find((r) => r.constructor.name === Sr)), Ja = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate), Ar = (e, r, t) => !t && (r.watchAll || r.watch.has(e) || [...r.watch].some((s) => e.startsWith(s) && /^\.\w+/.test(e.slice(s.length))));
2578
2578
  const dt = (e, r, t, s) => {
2579
2579
  for (const n of t || Object.keys(e)) {
2580
2580
  const i = S(e, n);
@@ -2620,11 +2620,11 @@ function Ir(e, r, t) {
2620
2620
  name: t
2621
2621
  };
2622
2622
  }
2623
- var Ga = (e, r, t, s) => {
2623
+ var Za = (e, r, t, s) => {
2624
2624
  t(e);
2625
2625
  const { name: n, ...i } = e;
2626
2626
  return ie(i) || Object.keys(i).length >= Object.keys(r).length || Object.keys(i).find((a) => r[a] === (!s || fe.all));
2627
- }, Ja = (e, r, t) => !e || !r || e === r || ut(e).some((s) => s && (t ? s === r : s.startsWith(r) || r.startsWith(s))), Za = (e, r, t, s, n) => n.isOnAll ? !1 : !t && n.isOnTouch ? !(r || e) : (t ? s.isOnBlur : n.isOnBlur) ? !e : (t ? s.isOnChange : n.isOnChange) ? e : !0, Xa = (e, r) => !Xt(S(e, r)).length && J(e, r), Ya = (e, r, t) => {
2627
+ }, Xa = (e, r, t) => !e || !r || e === r || ut(e).some((s) => s && (t ? s === r : s.startsWith(r) || r.startsWith(s))), Ya = (e, r, t, s, n) => n.isOnAll ? !1 : !t && n.isOnTouch ? !(r || e) : (t ? s.isOnBlur : n.isOnBlur) ? !e : (t ? s.isOnChange : n.isOnChange) ? e : !0, Qa = (e, r) => !Xt(S(e, r)).length && J(e, r), ei = (e, r, t) => {
2628
2628
  const s = ut(S(e, t));
2629
2629
  return H(s, "root", r[t]), H(e, t, s), e;
2630
2630
  };
@@ -2640,31 +2640,31 @@ var He = (e) => Z(e) && !gt(e) ? e : {
2640
2640
  value: e,
2641
2641
  message: ""
2642
2642
  }, Fr = async (e, r, t, s, n, i) => {
2643
- const { ref: a, refs: o, required: u, maxLength: f, minLength: h, min: g, max: m, pattern: b, validate: k, name: w, valueAsNumber: C, mount: A } = e._f, v = S(t, w);
2643
+ const { ref: a, refs: o, required: c, maxLength: f, minLength: p, min: g, max: m, pattern: b, validate: k, name: w, valueAsNumber: C, mount: A } = e._f, v = S(t, w);
2644
2644
  if (!A || r.has(w))
2645
2645
  return {};
2646
- const R = o ? o[0] : a, V = (E) => {
2647
- n && R.reportValidity && (R.setCustomValidity(me(E) ? "" : E || ""), R.reportValidity());
2648
- }, M = {}, ee = er(a), K = ft(a), T = ee || K, N = (C || Qt(a)) && G(a.value) && G(v) || bt(a) && a.value === "" || v === "" || Array.isArray(v) && !v.length, D = ps.bind(null, w, s, M), j = (E, F, B, L = _e.maxLength, W = _e.minLength) => {
2646
+ const N = o ? o[0] : a, V = (E) => {
2647
+ n && N.reportValidity && (N.setCustomValidity(me(E) ? "" : E || ""), N.reportValidity());
2648
+ }, M = {}, ee = er(a), K = ft(a), D = ee || K, R = (C || Qt(a)) && G(a.value) && G(v) || bt(a) && a.value === "" || v === "" || Array.isArray(v) && !v.length, T = ms.bind(null, w, s, M), j = (E, F, B, L = _e.maxLength, W = _e.minLength) => {
2649
2649
  const U = E ? F : B;
2650
2650
  M[w] = {
2651
2651
  type: E ? L : W,
2652
2652
  message: U,
2653
2653
  ref: a,
2654
- ...D(E ? L : W, U)
2654
+ ...T(E ? L : W, U)
2655
2655
  };
2656
2656
  };
2657
- if (i ? !Array.isArray(v) || !v.length : u && (!T && (N || oe(v)) || me(v) && !v || K && !gs(o).isValid || ee && !xs(o).isValid)) {
2658
- const { value: E, message: F } = ue(u) ? { value: !!u, message: u } : He(u);
2657
+ if (i ? !Array.isArray(v) || !v.length : c && (!D && (R || oe(v)) || me(v) && !v || K && !vs(o).isValid || ee && !ws(o).isValid)) {
2658
+ const { value: E, message: F } = ue(c) ? { value: !!c, message: c } : He(c);
2659
2659
  if (E && (M[w] = {
2660
2660
  type: _e.required,
2661
2661
  message: F,
2662
- ref: R,
2663
- ...D(_e.required, F)
2662
+ ref: N,
2663
+ ...T(_e.required, F)
2664
2664
  }, !s))
2665
2665
  return V(F), M;
2666
2666
  }
2667
- if (!N && (!oe(g) || !oe(m))) {
2667
+ if (!R && (!oe(g) || !oe(m))) {
2668
2668
  let E, F;
2669
2669
  const B = He(m), L = He(g);
2670
2670
  if (!oe(v) && !isNaN(v)) {
@@ -2677,27 +2677,27 @@ var He = (e) => Z(e) && !gt(e) ? e : {
2677
2677
  if ((E || F) && (j(!!E, B.message, L.message, _e.max, _e.min), !s))
2678
2678
  return V(M[w].message), M;
2679
2679
  }
2680
- if ((f || h) && !N && (ue(v) || i && Array.isArray(v))) {
2681
- const E = He(f), F = He(h), B = !oe(E.value) && v.length > +E.value, L = !oe(F.value) && v.length < +F.value;
2680
+ if ((f || p) && !R && (ue(v) || i && Array.isArray(v))) {
2681
+ const E = He(f), F = He(p), B = !oe(E.value) && v.length > +E.value, L = !oe(F.value) && v.length < +F.value;
2682
2682
  if ((B || L) && (j(B, E.message, F.message), !s))
2683
2683
  return V(M[w].message), M;
2684
2684
  }
2685
- if (b && !N && ue(v)) {
2685
+ if (b && !R && ue(v)) {
2686
2686
  const { value: E, message: F } = He(b);
2687
2687
  if (gt(E) && !v.match(E) && (M[w] = {
2688
2688
  type: _e.pattern,
2689
2689
  message: F,
2690
2690
  ref: a,
2691
- ...D(_e.pattern, F)
2691
+ ...T(_e.pattern, F)
2692
2692
  }, !s))
2693
2693
  return V(F), M;
2694
2694
  }
2695
2695
  if (k) {
2696
2696
  if (de(k)) {
2697
- const E = await k(v, t), F = Er(E, R);
2697
+ const E = await k(v, t), F = Er(E, N);
2698
2698
  if (F && (M[w] = {
2699
2699
  ...F,
2700
- ...D(_e.validate, F.message)
2700
+ ...T(_e.validate, F.message)
2701
2701
  }, !s))
2702
2702
  return V(F.message), M;
2703
2703
  } else if (Z(k)) {
@@ -2705,14 +2705,14 @@ var He = (e) => Z(e) && !gt(e) ? e : {
2705
2705
  for (const F in k) {
2706
2706
  if (!ie(E) && !s)
2707
2707
  break;
2708
- const B = Er(await k[F](v, t), R, F);
2708
+ const B = Er(await k[F](v, t), N, F);
2709
2709
  B && (E = {
2710
2710
  ...B,
2711
- ...D(F, B.message)
2711
+ ...T(F, B.message)
2712
2712
  }, V(B.message), s && (M[w] = E));
2713
2713
  }
2714
2714
  if (!ie(E) && (M[w] = {
2715
- ref: R,
2715
+ ref: N,
2716
2716
  ...E
2717
2717
  }, !s))
2718
2718
  return M;
@@ -2720,14 +2720,14 @@ var He = (e) => Z(e) && !gt(e) ? e : {
2720
2720
  }
2721
2721
  return V(!0), M;
2722
2722
  };
2723
- const Qa = {
2723
+ const ti = {
2724
2724
  mode: fe.onSubmit,
2725
2725
  reValidateMode: fe.onChange,
2726
2726
  shouldFocusError: !0
2727
2727
  };
2728
- function ei(e = {}) {
2728
+ function ri(e = {}) {
2729
2729
  let r = {
2730
- ...Qa,
2730
+ ...ti,
2731
2731
  ...e
2732
2732
  }, t = {
2733
2733
  submitCount: 0,
@@ -2755,8 +2755,8 @@ function ei(e = {}) {
2755
2755
  unMount: /* @__PURE__ */ new Set(),
2756
2756
  array: /* @__PURE__ */ new Set(),
2757
2757
  watch: /* @__PURE__ */ new Set()
2758
- }, u, f = 0;
2759
- const h = {
2758
+ }, c, f = 0;
2759
+ const p = {
2760
2760
  isDirty: !1,
2761
2761
  dirtyFields: !1,
2762
2762
  validatingFields: !1,
@@ -2765,7 +2765,7 @@ function ei(e = {}) {
2765
2765
  isValid: !1,
2766
2766
  errors: !1
2767
2767
  }, g = {
2768
- ...h
2768
+ ...p
2769
2769
  };
2770
2770
  let m = {
2771
2771
  ...g
@@ -2773,294 +2773,294 @@ function ei(e = {}) {
2773
2773
  const b = {
2774
2774
  array: vr(),
2775
2775
  state: vr()
2776
- }, k = r.criteriaMode === fe.all, w = (c) => (d) => {
2777
- clearTimeout(f), f = setTimeout(c, d);
2778
- }, C = async (c) => {
2779
- if (!a.keepIsValid && !r.disabled && (g.isValid || m.isValid || c)) {
2776
+ }, k = r.criteriaMode === fe.all, w = (u) => (d) => {
2777
+ clearTimeout(f), f = setTimeout(u, d);
2778
+ }, C = async (u) => {
2779
+ if (!a.keepIsValid && !r.disabled && (g.isValid || m.isValid || u)) {
2780
2780
  let d;
2781
- r.resolver ? (d = ie((await T()).errors), A()) : d = await D(s, !0), d !== t.isValid && b.state.next({
2781
+ r.resolver ? (d = ie((await D()).errors), A()) : d = await T(s, !0), d !== t.isValid && b.state.next({
2782
2782
  isValid: d
2783
2783
  });
2784
2784
  }
2785
- }, A = (c, d) => {
2786
- !r.disabled && (g.isValidating || g.validatingFields || m.isValidating || m.validatingFields) && ((c || Array.from(o.mount)).forEach((p) => {
2787
- p && (d ? H(t.validatingFields, p, d) : J(t.validatingFields, p));
2785
+ }, A = (u, d) => {
2786
+ !r.disabled && (g.isValidating || g.validatingFields || m.isValidating || m.validatingFields) && ((u || Array.from(o.mount)).forEach((h) => {
2787
+ h && (d ? H(t.validatingFields, h, d) : J(t.validatingFields, h));
2788
2788
  }), b.state.next({
2789
2789
  validatingFields: t.validatingFields,
2790
2790
  isValidating: !ie(t.validatingFields)
2791
2791
  }));
2792
- }, v = (c, d = [], p, _, y = !0, x = !0) => {
2793
- if (_ && p && !r.disabled) {
2794
- if (a.action = !0, x && Array.isArray(S(s, c))) {
2795
- const I = p(S(s, c), _.argA, _.argB);
2796
- y && H(s, c, I);
2792
+ }, v = (u, d = [], h, _, y = !0, x = !0) => {
2793
+ if (_ && h && !r.disabled) {
2794
+ if (a.action = !0, x && Array.isArray(S(s, u))) {
2795
+ const I = h(S(s, u), _.argA, _.argB);
2796
+ y && H(s, u, I);
2797
2797
  }
2798
- if (x && Array.isArray(S(t.errors, c))) {
2799
- const I = p(S(t.errors, c), _.argA, _.argB);
2800
- y && H(t.errors, c, I), Xa(t.errors, c);
2798
+ if (x && Array.isArray(S(t.errors, u))) {
2799
+ const I = h(S(t.errors, u), _.argA, _.argB);
2800
+ y && H(t.errors, u, I), Qa(t.errors, u);
2801
2801
  }
2802
- if ((g.touchedFields || m.touchedFields) && x && Array.isArray(S(t.touchedFields, c))) {
2803
- const I = p(S(t.touchedFields, c), _.argA, _.argB);
2804
- y && H(t.touchedFields, c, I);
2802
+ if ((g.touchedFields || m.touchedFields) && x && Array.isArray(S(t.touchedFields, u))) {
2803
+ const I = h(S(t.touchedFields, u), _.argA, _.argB);
2804
+ y && H(t.touchedFields, u, I);
2805
2805
  }
2806
2806
  (g.dirtyFields || m.dirtyFields) && (t.dirtyFields = Ke(n, i)), b.state.next({
2807
- name: c,
2808
- isDirty: E(c, d),
2807
+ name: u,
2808
+ isDirty: E(u, d),
2809
2809
  dirtyFields: t.dirtyFields,
2810
2810
  errors: t.errors,
2811
2811
  isValid: t.isValid
2812
2812
  });
2813
2813
  } else
2814
- H(i, c, d);
2815
- }, R = (c, d) => {
2816
- H(t.errors, c, d), b.state.next({
2814
+ H(i, u, d);
2815
+ }, N = (u, d) => {
2816
+ H(t.errors, u, d), b.state.next({
2817
2817
  errors: t.errors
2818
2818
  });
2819
- }, V = (c) => {
2820
- t.errors = c, b.state.next({
2819
+ }, V = (u) => {
2820
+ t.errors = u, b.state.next({
2821
2821
  errors: t.errors,
2822
2822
  isValid: !1
2823
2823
  });
2824
- }, M = (c, d, p, _) => {
2825
- const y = S(s, c);
2824
+ }, M = (u, d, h, _) => {
2825
+ const y = S(s, u);
2826
2826
  if (y) {
2827
- const x = S(i, c, G(p) ? S(n, c) : p);
2828
- G(x) || _ && _.defaultChecked || d ? H(i, c, d ? x : kr(y._f)) : L(c, x), a.mount && !a.action && C();
2827
+ const x = S(i, u, G(h) ? S(n, u) : h);
2828
+ G(x) || _ && _.defaultChecked || d ? H(i, u, d ? x : kr(y._f)) : L(u, x), a.mount && !a.action && C();
2829
2829
  }
2830
- }, ee = (c, d, p, _, y) => {
2830
+ }, ee = (u, d, h, _, y) => {
2831
2831
  let x = !1, I = !1;
2832
2832
  const $ = {
2833
- name: c
2833
+ name: u
2834
2834
  };
2835
2835
  if (!r.disabled) {
2836
- if (!p || _) {
2836
+ if (!h || _) {
2837
2837
  (g.isDirty || m.isDirty) && (I = t.isDirty, t.isDirty = $.isDirty = E(), x = I !== $.isDirty);
2838
- const P = Ve(S(n, c), d);
2839
- I = !!S(t.dirtyFields, c), P ? J(t.dirtyFields, c) : H(t.dirtyFields, c, !0), $.dirtyFields = t.dirtyFields, x = x || (g.dirtyFields || m.dirtyFields) && I !== !P;
2838
+ const P = Ve(S(n, u), d);
2839
+ I = !!S(t.dirtyFields, u), P ? J(t.dirtyFields, u) : H(t.dirtyFields, u, !0), $.dirtyFields = t.dirtyFields, x = x || (g.dirtyFields || m.dirtyFields) && I !== !P;
2840
2840
  }
2841
- if (p) {
2842
- const P = S(t.touchedFields, c);
2843
- P || (H(t.touchedFields, c, p), $.touchedFields = t.touchedFields, x = x || (g.touchedFields || m.touchedFields) && P !== p);
2841
+ if (h) {
2842
+ const P = S(t.touchedFields, u);
2843
+ P || (H(t.touchedFields, u, h), $.touchedFields = t.touchedFields, x = x || (g.touchedFields || m.touchedFields) && P !== h);
2844
2844
  }
2845
2845
  x && y && b.state.next($);
2846
2846
  }
2847
2847
  return x ? $ : {};
2848
- }, K = (c, d, p, _) => {
2849
- const y = S(t.errors, c), x = (g.isValid || m.isValid) && me(d) && t.isValid !== d;
2850
- if (r.delayError && p ? (u = w(() => R(c, p)), u(r.delayError)) : (clearTimeout(f), u = null, p ? H(t.errors, c, p) : J(t.errors, c)), (p ? !Ve(y, p) : y) || !ie(_) || x) {
2848
+ }, K = (u, d, h, _) => {
2849
+ const y = S(t.errors, u), x = (g.isValid || m.isValid) && me(d) && t.isValid !== d;
2850
+ if (r.delayError && h ? (c = w(() => N(u, h)), c(r.delayError)) : (clearTimeout(f), c = null, h ? H(t.errors, u, h) : J(t.errors, u)), (h ? !Ve(y, h) : y) || !ie(_) || x) {
2851
2851
  const I = {
2852
2852
  ..._,
2853
2853
  ...x && me(d) ? { isValid: d } : {},
2854
2854
  errors: t.errors,
2855
- name: c
2855
+ name: u
2856
2856
  };
2857
2857
  t = {
2858
2858
  ...t,
2859
2859
  ...I
2860
2860
  }, b.state.next(I);
2861
2861
  }
2862
- }, T = async (c) => (A(c, !0), await r.resolver(i, r.context, za(c || o.mount, s, r.criteriaMode, r.shouldUseNativeValidation))), N = async (c) => {
2863
- const { errors: d } = await T(c);
2864
- if (A(c), c)
2865
- for (const p of c) {
2866
- const _ = S(d, p);
2867
- _ ? H(t.errors, p, _) : J(t.errors, p);
2862
+ }, D = async (u) => (A(u, !0), await r.resolver(i, r.context, Ka(u || o.mount, s, r.criteriaMode, r.shouldUseNativeValidation))), R = async (u) => {
2863
+ const { errors: d } = await D(u);
2864
+ if (A(u), u)
2865
+ for (const h of u) {
2866
+ const _ = S(d, h);
2867
+ _ ? H(t.errors, h, _) : J(t.errors, h);
2868
2868
  }
2869
2869
  else
2870
2870
  t.errors = d;
2871
2871
  return d;
2872
- }, D = async (c, d, p = {
2872
+ }, T = async (u, d, h = {
2873
2873
  valid: !0
2874
2874
  }) => {
2875
- for (const _ in c) {
2876
- const y = c[_];
2875
+ for (const _ in u) {
2876
+ const y = u[_];
2877
2877
  if (y) {
2878
2878
  const { _f: x, ...I } = y;
2879
2879
  if (x) {
2880
- const $ = o.array.has(x.name), P = y._f && Ha(y._f);
2880
+ const $ = o.array.has(x.name), P = y._f && Ga(y._f);
2881
2881
  P && g.validatingFields && A([x.name], !0);
2882
2882
  const ne = await Fr(y, o.disabled, i, k, r.shouldUseNativeValidation && !d, $);
2883
- if (P && g.validatingFields && A([x.name]), ne[x.name] && (p.valid = !1, d || e.shouldUseNativeValidation))
2883
+ if (P && g.validatingFields && A([x.name]), ne[x.name] && (h.valid = !1, d || e.shouldUseNativeValidation))
2884
2884
  break;
2885
- !d && (S(ne, x.name) ? $ ? Ya(t.errors, ne, x.name) : H(t.errors, x.name, ne[x.name]) : J(t.errors, x.name));
2885
+ !d && (S(ne, x.name) ? $ ? ei(t.errors, ne, x.name) : H(t.errors, x.name, ne[x.name]) : J(t.errors, x.name));
2886
2886
  }
2887
- !ie(I) && await D(I, d, p);
2887
+ !ie(I) && await T(I, d, h);
2888
2888
  }
2889
2889
  }
2890
- return p.valid;
2890
+ return h.valid;
2891
2891
  }, j = () => {
2892
- for (const c of o.unMount) {
2893
- const d = S(s, c);
2894
- d && (d._f.refs ? d._f.refs.every((p) => !Dt(p)) : !Dt(d._f.ref)) && qe(c);
2892
+ for (const u of o.unMount) {
2893
+ const d = S(s, u);
2894
+ d && (d._f.refs ? d._f.refs.every((h) => !Tt(h)) : !Tt(d._f.ref)) && qe(u);
2895
2895
  }
2896
2896
  o.unMount = /* @__PURE__ */ new Set();
2897
- }, E = (c, d) => !r.disabled && (c && d && H(i, c, d), !Ve(rt(), n)), F = (c, d, p) => $a(c, o, {
2898
- ...a.mount ? i : G(d) ? n : ue(c) ? { [c]: d } : d
2899
- }, p, d), B = (c) => Xt(S(a.mount ? i : n, c, r.shouldUnregister ? S(n, c, []) : [])), L = (c, d, p = {}) => {
2900
- const _ = S(s, c);
2897
+ }, E = (u, d) => !r.disabled && (u && d && H(i, u, d), !Ve(rt(), n)), F = (u, d, h) => Pa(u, o, {
2898
+ ...a.mount ? i : G(d) ? n : ue(u) ? { [u]: d } : d
2899
+ }, h, d), B = (u) => Xt(S(a.mount ? i : n, u, r.shouldUnregister ? S(n, u, []) : [])), L = (u, d, h = {}) => {
2900
+ const _ = S(s, u);
2901
2901
  let y = d;
2902
2902
  if (_) {
2903
2903
  const x = _._f;
2904
- x && (!x.disabled && H(i, c, vs(d, x)), y = bt(x.ref) && oe(d) ? "" : d, ys(x.ref) ? [...x.ref.options].forEach((I) => I.selected = y.includes(I.value)) : x.refs ? ft(x.ref) ? x.refs.forEach((I) => {
2904
+ x && (!x.disabled && H(i, u, xs(d, x)), y = bt(x.ref) && oe(d) ? "" : d, bs(x.ref) ? [...x.ref.options].forEach((I) => I.selected = y.includes(I.value)) : x.refs ? ft(x.ref) ? x.refs.forEach((I) => {
2905
2905
  (!I.defaultChecked || !I.disabled) && (Array.isArray(y) ? I.checked = !!y.find(($) => $ === I.value) : I.checked = y === I.value || !!y);
2906
2906
  }) : x.refs.forEach((I) => I.checked = I.value === y) : Qt(x.ref) ? x.ref.value = "" : (x.ref.value = y, x.ref.type || b.state.next({
2907
- name: c,
2907
+ name: u,
2908
2908
  values: Q(i)
2909
2909
  })));
2910
2910
  }
2911
- (p.shouldDirty || p.shouldTouch) && ee(c, y, p.shouldTouch, p.shouldDirty, !0), p.shouldValidate && z(c);
2912
- }, W = (c, d, p) => {
2911
+ (h.shouldDirty || h.shouldTouch) && ee(u, y, h.shouldTouch, h.shouldDirty, !0), h.shouldValidate && z(u);
2912
+ }, W = (u, d, h) => {
2913
2913
  for (const _ in d) {
2914
2914
  if (!d.hasOwnProperty(_))
2915
2915
  return;
2916
- const y = d[_], x = c + "." + _, I = S(s, x);
2917
- (o.array.has(c) || Z(y) || I && !I._f) && !Te(y) ? W(x, y, p) : L(x, y, p);
2916
+ const y = d[_], x = u + "." + _, I = S(s, x);
2917
+ (o.array.has(u) || Z(y) || I && !I._f) && !De(y) ? W(x, y, h) : L(x, y, h);
2918
2918
  }
2919
- }, U = (c, d, p = {}) => {
2920
- const _ = S(s, c), y = o.array.has(c), x = Q(d);
2921
- H(i, c, x), y ? (b.array.next({
2922
- name: c,
2919
+ }, U = (u, d, h = {}) => {
2920
+ const _ = S(s, u), y = o.array.has(u), x = Q(d);
2921
+ H(i, u, x), y ? (b.array.next({
2922
+ name: u,
2923
2923
  values: Q(i)
2924
- }), (g.isDirty || g.dirtyFields || m.isDirty || m.dirtyFields) && p.shouldDirty && b.state.next({
2925
- name: c,
2924
+ }), (g.isDirty || g.dirtyFields || m.isDirty || m.dirtyFields) && h.shouldDirty && b.state.next({
2925
+ name: u,
2926
2926
  dirtyFields: Ke(n, i),
2927
- isDirty: E(c, x)
2928
- })) : _ && !_._f && !oe(x) ? W(c, x, p) : L(c, x, p), Ar(c, o) ? b.state.next({
2927
+ isDirty: E(u, x)
2928
+ })) : _ && !_._f && !oe(x) ? W(u, x, h) : L(u, x, h), Ar(u, o) ? b.state.next({
2929
2929
  ...t,
2930
- name: c,
2930
+ name: u,
2931
2931
  values: Q(i)
2932
2932
  }) : b.state.next({
2933
- name: a.mount ? c : void 0,
2933
+ name: a.mount ? u : void 0,
2934
2934
  values: Q(i)
2935
2935
  });
2936
- }, te = async (c) => {
2936
+ }, te = async (u) => {
2937
2937
  a.mount = !0;
2938
- const d = c.target;
2939
- let p = d.name, _ = !0;
2940
- const y = S(s, p), x = (P) => {
2941
- _ = Number.isNaN(P) || Te(P) && isNaN(P.getTime()) || Ve(P, S(i, p, P));
2938
+ const d = u.target;
2939
+ let h = d.name, _ = !0;
2940
+ const y = S(s, h), x = (P) => {
2941
+ _ = Number.isNaN(P) || De(P) && isNaN(P.getTime()) || Ve(P, S(i, h, P));
2942
2942
  }, I = Cr(r.mode), $ = Cr(r.reValidateMode);
2943
2943
  if (y) {
2944
2944
  let P, ne;
2945
- const De = d.type ? kr(y._f) : La(c), Ie = c.type === gr.BLUR || c.type === gr.FOCUS_OUT, _s = !Ka(y._f) && !r.resolver && !S(t.errors, p) && !y._f.deps || Za(Ie, S(t.touchedFields, p), t.isSubmitted, $, I), It = Ar(p, o, Ie);
2946
- H(i, p, De), Ie ? (!d || !d.readOnly) && (y._f.onBlur && y._f.onBlur(c), u && u(0)) : y._f.onChange && y._f.onChange(c);
2947
- const Et = ee(p, De, Ie), ks = !ie(Et) || It;
2945
+ const Te = d.type ? kr(y._f) : Ra(u), Ie = u.type === gr.BLUR || u.type === gr.FOCUS_OUT, ks = !Ja(y._f) && !r.resolver && !S(t.errors, h) && !y._f.deps || Ya(Ie, S(t.touchedFields, h), t.isSubmitted, $, I), It = Ar(h, o, Ie);
2946
+ H(i, h, Te), Ie ? (!d || !d.readOnly) && (y._f.onBlur && y._f.onBlur(u), c && c(0)) : y._f.onChange && y._f.onChange(u);
2947
+ const Et = ee(h, Te, Ie), Cs = !ie(Et) || It;
2948
2948
  if (!Ie && b.state.next({
2949
- name: p,
2950
- type: c.type,
2949
+ name: h,
2950
+ type: u.type,
2951
2951
  values: Q(i)
2952
- }), _s)
2953
- return (g.isValid || m.isValid) && (r.mode === "onBlur" ? Ie && C() : Ie || C()), ks && b.state.next({ name: p, ...It ? {} : Et });
2952
+ }), ks)
2953
+ return (g.isValid || m.isValid) && (r.mode === "onBlur" ? Ie && C() : Ie || C()), Cs && b.state.next({ name: h, ...It ? {} : Et });
2954
2954
  if (!Ie && It && b.state.next({ ...t }), r.resolver) {
2955
- const { errors: tr } = await T([p]);
2956
- if (A([p]), x(De), _) {
2957
- const Cs = Ir(t.errors, s, p), rr = Ir(tr, s, Cs.name || p);
2958
- P = rr.error, p = rr.name, ne = ie(tr);
2955
+ const { errors: tr } = await D([h]);
2956
+ if (A([h]), x(Te), _) {
2957
+ const Ss = Ir(t.errors, s, h), rr = Ir(tr, s, Ss.name || h);
2958
+ P = rr.error, h = rr.name, ne = ie(tr);
2959
2959
  }
2960
2960
  } else
2961
- A([p], !0), P = (await Fr(y, o.disabled, i, k, r.shouldUseNativeValidation))[p], A([p]), x(De), _ && (P ? ne = !1 : (g.isValid || m.isValid) && (ne = await D(s, !0)));
2962
- _ && (y._f.deps && (!Array.isArray(y._f.deps) || y._f.deps.length > 0) && z(y._f.deps), K(p, ne, P, Et));
2961
+ A([h], !0), P = (await Fr(y, o.disabled, i, k, r.shouldUseNativeValidation))[h], A([h]), x(Te), _ && (P ? ne = !1 : (g.isValid || m.isValid) && (ne = await T(s, !0)));
2962
+ _ && (y._f.deps && (!Array.isArray(y._f.deps) || y._f.deps.length > 0) && z(y._f.deps), K(h, ne, P, Et));
2963
2963
  }
2964
- }, X = (c, d) => {
2965
- if (S(t.errors, d) && c.focus)
2966
- return c.focus(), 1;
2967
- }, z = async (c, d = {}) => {
2968
- let p, _;
2969
- const y = ut(c);
2964
+ }, X = (u, d) => {
2965
+ if (S(t.errors, d) && u.focus)
2966
+ return u.focus(), 1;
2967
+ }, z = async (u, d = {}) => {
2968
+ let h, _;
2969
+ const y = ut(u);
2970
2970
  if (r.resolver) {
2971
- const x = await N(G(c) ? c : y);
2972
- p = ie(x), _ = c ? !y.some((I) => S(x, I)) : p;
2971
+ const x = await R(G(u) ? u : y);
2972
+ h = ie(x), _ = u ? !y.some((I) => S(x, I)) : h;
2973
2973
  } else
2974
- c ? (_ = (await Promise.all(y.map(async (x) => {
2974
+ u ? (_ = (await Promise.all(y.map(async (x) => {
2975
2975
  const I = S(s, x);
2976
- return await D(I && I._f ? { [x]: I } : I);
2977
- }))).every(Boolean), !(!_ && !t.isValid) && C()) : _ = p = await D(s);
2976
+ return await T(I && I._f ? { [x]: I } : I);
2977
+ }))).every(Boolean), !(!_ && !t.isValid) && C()) : _ = h = await T(s);
2978
2978
  return b.state.next({
2979
- ...!ue(c) || (g.isValid || m.isValid) && p !== t.isValid ? {} : { name: c },
2980
- ...r.resolver || !c ? { isValid: p } : {},
2979
+ ...!ue(u) || (g.isValid || m.isValid) && h !== t.isValid ? {} : { name: u },
2980
+ ...r.resolver || !u ? { isValid: h } : {},
2981
2981
  errors: t.errors
2982
- }), d.shouldFocus && !_ && dt(s, X, c ? y : o.mount), _;
2983
- }, rt = (c, d) => {
2984
- let p = {
2982
+ }), d.shouldFocus && !_ && dt(s, X, u ? y : o.mount), _;
2983
+ }, rt = (u, d) => {
2984
+ let h = {
2985
2985
  ...a.mount ? i : n
2986
2986
  };
2987
- return d && (p = ms(d.dirtyFields ? t.dirtyFields : t.touchedFields, p)), G(c) ? p : ue(c) ? S(p, c) : c.map((_) => S(p, _));
2988
- }, $e = (c, d) => ({
2989
- invalid: !!S((d || t).errors, c),
2990
- isDirty: !!S((d || t).dirtyFields, c),
2991
- error: S((d || t).errors, c),
2992
- isValidating: !!S(t.validatingFields, c),
2993
- isTouched: !!S((d || t).touchedFields, c)
2994
- }), O = (c) => {
2995
- const d = c ? ut(c) : void 0;
2996
- d == null || d.forEach((p) => J(t.errors, p)), d ? d.forEach((p) => {
2987
+ return d && (h = ys(d.dirtyFields ? t.dirtyFields : t.touchedFields, h)), G(u) ? h : ue(u) ? S(h, u) : u.map((_) => S(h, _));
2988
+ }, $e = (u, d) => ({
2989
+ invalid: !!S((d || t).errors, u),
2990
+ isDirty: !!S((d || t).dirtyFields, u),
2991
+ error: S((d || t).errors, u),
2992
+ isValidating: !!S(t.validatingFields, u),
2993
+ isTouched: !!S((d || t).touchedFields, u)
2994
+ }), O = (u) => {
2995
+ const d = u ? ut(u) : void 0;
2996
+ d == null || d.forEach((h) => J(t.errors, h)), d ? d.forEach((h) => {
2997
2997
  b.state.next({
2998
- name: p,
2998
+ name: h,
2999
2999
  errors: t.errors
3000
3000
  });
3001
3001
  }) : b.state.next({
3002
3002
  errors: {}
3003
3003
  });
3004
- }, Be = (c, d, p) => {
3005
- const _ = (S(s, c, { _f: {} })._f || {}).ref, y = S(t.errors, c) || {}, { ref: x, message: I, type: $, ...P } = y;
3006
- H(t.errors, c, {
3004
+ }, Be = (u, d, h) => {
3005
+ const _ = (S(s, u, { _f: {} })._f || {}).ref, y = S(t.errors, u) || {}, { ref: x, message: I, type: $, ...P } = y;
3006
+ H(t.errors, u, {
3007
3007
  ...P,
3008
3008
  ...d,
3009
3009
  ref: _
3010
3010
  }), b.state.next({
3011
- name: c,
3011
+ name: u,
3012
3012
  errors: t.errors,
3013
3013
  isValid: !1
3014
- }), p && p.shouldFocus && _ && _.focus && _.focus();
3015
- }, Pe = (c, d) => de(c) ? b.state.subscribe({
3016
- next: (p) => "values" in p && c(F(void 0, d), p)
3017
- }) : F(c, d, !0), Ae = (c) => b.state.subscribe({
3014
+ }), h && h.shouldFocus && _ && _.focus && _.focus();
3015
+ }, Pe = (u, d) => de(u) ? b.state.subscribe({
3016
+ next: (h) => "values" in h && u(F(void 0, d), h)
3017
+ }) : F(u, d, !0), Ae = (u) => b.state.subscribe({
3018
3018
  next: (d) => {
3019
- Ja(c.name, d.name, c.exact) && Ga(d, c.formState || g, mt, c.reRenderRoot) && c.callback({
3019
+ Xa(u.name, d.name, u.exact) && Za(d, u.formState || g, mt, u.reRenderRoot) && u.callback({
3020
3020
  values: { ...i },
3021
3021
  ...t,
3022
3022
  ...d,
3023
3023
  defaultValues: n
3024
3024
  });
3025
3025
  }
3026
- }).unsubscribe, Re = (c) => (a.mount = !0, m = {
3026
+ }).unsubscribe, Ne = (u) => (a.mount = !0, m = {
3027
3027
  ...m,
3028
- ...c.formState
3028
+ ...u.formState
3029
3029
  }, Ae({
3030
- ...c,
3030
+ ...u,
3031
3031
  formState: {
3032
- ...h,
3033
- ...c.formState
3032
+ ...p,
3033
+ ...u.formState
3034
3034
  }
3035
- })), qe = (c, d = {}) => {
3036
- for (const p of c ? ut(c) : o.mount)
3037
- o.mount.delete(p), o.array.delete(p), d.keepValue || (J(s, p), J(i, p)), !d.keepError && J(t.errors, p), !d.keepDirty && J(t.dirtyFields, p), !d.keepTouched && J(t.touchedFields, p), !d.keepIsValidating && J(t.validatingFields, p), !r.shouldUnregister && !d.keepDefaultValue && J(n, p);
3035
+ })), qe = (u, d = {}) => {
3036
+ for (const h of u ? ut(u) : o.mount)
3037
+ o.mount.delete(h), o.array.delete(h), d.keepValue || (J(s, h), J(i, h)), !d.keepError && J(t.errors, h), !d.keepDirty && J(t.dirtyFields, h), !d.keepTouched && J(t.touchedFields, h), !d.keepIsValidating && J(t.validatingFields, h), !r.shouldUnregister && !d.keepDefaultValue && J(n, h);
3038
3038
  b.state.next({
3039
3039
  values: Q(i)
3040
3040
  }), b.state.next({
3041
3041
  ...t,
3042
3042
  ...d.keepDirty ? { isDirty: E() } : {}
3043
3043
  }), !d.keepIsValid && C();
3044
- }, st = ({ disabled: c, name: d }) => {
3045
- if (me(c) && a.mount || c || o.disabled.has(d)) {
3046
- const y = o.disabled.has(d) !== !!c;
3047
- c ? o.disabled.add(d) : o.disabled.delete(d), y && a.mount && !a.action && C();
3044
+ }, st = ({ disabled: u, name: d }) => {
3045
+ if (me(u) && a.mount || u || o.disabled.has(d)) {
3046
+ const y = o.disabled.has(d) !== !!u;
3047
+ u ? o.disabled.add(d) : o.disabled.delete(d), y && a.mount && !a.action && C();
3048
3048
  }
3049
- }, ve = (c, d = {}) => {
3050
- let p = S(s, c);
3049
+ }, ve = (u, d = {}) => {
3050
+ let h = S(s, u);
3051
3051
  const _ = me(d.disabled) || me(r.disabled);
3052
- return H(s, c, {
3053
- ...p || {},
3052
+ return H(s, u, {
3053
+ ...h || {},
3054
3054
  _f: {
3055
- ...p && p._f ? p._f : { ref: { name: c } },
3056
- name: c,
3055
+ ...h && h._f ? h._f : { ref: { name: u } },
3056
+ name: u,
3057
3057
  mount: !0,
3058
3058
  ...d
3059
3059
  }
3060
- }), o.mount.add(c), p ? st({
3060
+ }), o.mount.add(u), h ? st({
3061
3061
  disabled: me(d.disabled) ? d.disabled : r.disabled,
3062
- name: c
3063
- }) : M(c, !0, d.value), {
3062
+ name: u
3063
+ }) : M(u, !0, d.value), {
3064
3064
  ..._ ? { disabled: d.disabled || r.disabled } : {},
3065
3065
  ...r.progressive ? {
3066
3066
  required: !!d.required,
@@ -3070,50 +3070,50 @@ function ei(e = {}) {
3070
3070
  maxLength: it(d.maxLength),
3071
3071
  pattern: it(d.pattern)
3072
3072
  } : {},
3073
- name: c,
3073
+ name: u,
3074
3074
  onChange: te,
3075
3075
  onBlur: te,
3076
3076
  ref: (y) => {
3077
3077
  if (y) {
3078
- ve(c, d), p = S(s, c);
3079
- const x = G(y.value) && y.querySelectorAll && y.querySelectorAll("input,select,textarea")[0] || y, I = Pa(x), $ = p._f.refs || [];
3080
- if (I ? $.find((P) => P === x) : x === p._f.ref)
3078
+ ve(u, d), h = S(s, u);
3079
+ const x = G(y.value) && y.querySelectorAll && y.querySelectorAll("input,select,textarea")[0] || y, I = Ua(x), $ = h._f.refs || [];
3080
+ if (I ? $.find((P) => P === x) : x === h._f.ref)
3081
3081
  return;
3082
- H(s, c, {
3082
+ H(s, u, {
3083
3083
  _f: {
3084
- ...p._f,
3084
+ ...h._f,
3085
3085
  ...I ? {
3086
3086
  refs: [
3087
- ...$.filter(Dt),
3087
+ ...$.filter(Tt),
3088
3088
  x,
3089
- ...Array.isArray(S(n, c)) ? [{}] : []
3089
+ ...Array.isArray(S(n, u)) ? [{}] : []
3090
3090
  ],
3091
- ref: { type: x.type, name: c }
3091
+ ref: { type: x.type, name: u }
3092
3092
  } : { ref: x }
3093
3093
  }
3094
- }), M(c, !1, void 0, x);
3094
+ }), M(u, !1, void 0, x);
3095
3095
  } else
3096
- p = S(s, c, {}), p._f && (p._f.mount = !1), (r.shouldUnregister || d.shouldUnregister) && !(Na(o.array, c) && a.action) && o.unMount.add(c);
3096
+ h = S(s, u, {}), h._f && (h._f.mount = !1), (r.shouldUnregister || d.shouldUnregister) && !(Da(o.array, u) && a.action) && o.unMount.add(u);
3097
3097
  }
3098
3098
  };
3099
- }, Ue = () => r.shouldFocusError && dt(s, X, o.mount), ht = (c) => {
3100
- me(c) && (b.state.next({ disabled: c }), dt(s, (d, p) => {
3101
- const _ = S(s, p);
3102
- _ && (d.disabled = _._f.disabled || c, Array.isArray(_._f.refs) && _._f.refs.forEach((y) => {
3103
- y.disabled = _._f.disabled || c;
3099
+ }, Ue = () => r.shouldFocusError && dt(s, X, o.mount), ht = (u) => {
3100
+ me(u) && (b.state.next({ disabled: u }), dt(s, (d, h) => {
3101
+ const _ = S(s, h);
3102
+ _ && (d.disabled = _._f.disabled || u, Array.isArray(_._f.refs) && _._f.refs.forEach((y) => {
3103
+ y.disabled = _._f.disabled || u;
3104
3104
  }));
3105
3105
  }, 0, !1));
3106
- }, We = (c, d) => async (p) => {
3106
+ }, We = (u, d) => async (h) => {
3107
3107
  let _;
3108
- p && (p.preventDefault && p.preventDefault(), p.persist && p.persist());
3108
+ h && (h.preventDefault && h.preventDefault(), h.persist && h.persist());
3109
3109
  let y = Q(i);
3110
3110
  if (b.state.next({
3111
3111
  isSubmitting: !0
3112
3112
  }), r.resolver) {
3113
- const { errors: x, values: I } = await T();
3113
+ const { errors: x, values: I } = await D();
3114
3114
  A(), t.errors = x, y = Q(I);
3115
3115
  } else
3116
- await D(s);
3116
+ await T(s);
3117
3117
  if (o.disabled.size)
3118
3118
  for (const x of o.disabled)
3119
3119
  J(y, x);
@@ -3122,12 +3122,12 @@ function ei(e = {}) {
3122
3122
  errors: {}
3123
3123
  });
3124
3124
  try {
3125
- await c(y, p);
3125
+ await u(y, h);
3126
3126
  } catch (x) {
3127
3127
  _ = x;
3128
3128
  }
3129
3129
  } else
3130
- d && await d({ ...t.errors }, p), Ue(), setTimeout(Ue);
3130
+ d && await d({ ...t.errors }, h), Ue(), setTimeout(Ue);
3131
3131
  if (b.state.next({
3132
3132
  isSubmitted: !0,
3133
3133
  isSubmitting: !1,
@@ -3136,22 +3136,22 @@ function ei(e = {}) {
3136
3136
  errors: t.errors
3137
3137
  }), _)
3138
3138
  throw _;
3139
- }, ze = (c, d = {}) => {
3140
- S(s, c) && (G(d.defaultValue) ? U(c, Q(S(n, c))) : (U(c, d.defaultValue), H(n, c, Q(d.defaultValue))), d.keepTouched || J(t.touchedFields, c), d.keepDirty || (J(t.dirtyFields, c), t.isDirty = d.defaultValue ? E(c, Q(S(n, c))) : E()), d.keepError || (J(t.errors, c), g.isValid && C()), b.state.next({ ...t }));
3141
- }, Ne = (c, d = {}) => {
3142
- const p = c ? Q(c) : n, _ = Q(p), y = ie(c), x = y ? n : _;
3143
- if (d.keepDefaultValues || (n = p), !d.keepValues) {
3139
+ }, ze = (u, d = {}) => {
3140
+ S(s, u) && (G(d.defaultValue) ? U(u, Q(S(n, u))) : (U(u, d.defaultValue), H(n, u, Q(d.defaultValue))), d.keepTouched || J(t.touchedFields, u), d.keepDirty || (J(t.dirtyFields, u), t.isDirty = d.defaultValue ? E(u, Q(S(n, u))) : E()), d.keepError || (J(t.errors, u), g.isValid && C()), b.state.next({ ...t }));
3141
+ }, Re = (u, d = {}) => {
3142
+ const h = u ? Q(u) : n, _ = Q(h), y = ie(u), x = y ? n : _;
3143
+ if (d.keepDefaultValues || (n = h), !d.keepValues) {
3144
3144
  if (d.keepDirtyValues) {
3145
3145
  const I = /* @__PURE__ */ new Set([
3146
3146
  ...o.mount,
3147
3147
  ...Object.keys(Ke(n, i))
3148
3148
  ]);
3149
3149
  for (const $ of Array.from(I)) {
3150
- const P = S(t.dirtyFields, $), ne = S(i, $), De = S(x, $);
3151
- P && !G(ne) ? H(x, $, ne) : !P && !G(De) && U($, De);
3150
+ const P = S(t.dirtyFields, $), ne = S(i, $), Te = S(x, $);
3151
+ P && !G(ne) ? H(x, $, ne) : !P && !G(Te) && U($, Te);
3152
3152
  }
3153
3153
  } else {
3154
- if (Zt && G(c))
3154
+ if (Zt && G(u))
3155
3155
  for (const I of o.mount) {
3156
3156
  const $ = S(s, I);
3157
3157
  if ($ && $._f) {
@@ -3187,27 +3187,27 @@ function ei(e = {}) {
3187
3187
  focus: ""
3188
3188
  }, a.mount = !g.isValid || !!d.keepIsValid || !!d.keepDirtyValues || !r.shouldUnregister && !ie(x), a.watch = !!r.shouldUnregister, a.keepIsValid = !!d.keepIsValid, a.action = !1, d.keepErrors || (t.errors = {}), b.state.next({
3189
3189
  submitCount: d.keepSubmitCount ? t.submitCount : 0,
3190
- isDirty: y ? !1 : d.keepDirty ? t.isDirty : !!(d.keepDefaultValues && !Ve(c, n)),
3190
+ isDirty: y ? !1 : d.keepDirty ? t.isDirty : !!(d.keepDefaultValues && !Ve(u, n)),
3191
3191
  isSubmitted: d.keepIsSubmitted ? t.isSubmitted : !1,
3192
- dirtyFields: y ? {} : d.keepDirtyValues ? d.keepDefaultValues && i ? Ke(n, i) : t.dirtyFields : d.keepDefaultValues && c ? Ke(n, c) : d.keepDirty ? t.dirtyFields : {},
3192
+ dirtyFields: y ? {} : d.keepDirtyValues ? d.keepDefaultValues && i ? Ke(n, i) : t.dirtyFields : d.keepDefaultValues && u ? Ke(n, u) : d.keepDirty ? t.dirtyFields : {},
3193
3193
  touchedFields: d.keepTouched ? t.touchedFields : {},
3194
3194
  errors: d.keepErrors ? t.errors : {},
3195
3195
  isSubmitSuccessful: d.keepIsSubmitSuccessful ? t.isSubmitSuccessful : !1,
3196
3196
  isSubmitting: !1,
3197
3197
  defaultValues: n
3198
3198
  });
3199
- }, nt = (c, d) => Ne(de(c) ? c(i) : c, { ...r.resetOptions, ...d }), pt = (c, d = {}) => {
3200
- const p = S(s, c), _ = p && p._f;
3199
+ }, nt = (u, d) => Re(de(u) ? u(i) : u, { ...r.resetOptions, ...d }), pt = (u, d = {}) => {
3200
+ const h = S(s, u), _ = h && h._f;
3201
3201
  if (_) {
3202
3202
  const y = _.refs ? _.refs[0] : _.ref;
3203
3203
  y.focus && setTimeout(() => {
3204
3204
  y.focus(), d.shouldSelect && de(y.select) && y.select();
3205
3205
  });
3206
3206
  }
3207
- }, mt = (c) => {
3207
+ }, mt = (u) => {
3208
3208
  t = {
3209
3209
  ...t,
3210
- ...c
3210
+ ...u
3211
3211
  };
3212
3212
  }, at = {
3213
3213
  control: {
@@ -3217,7 +3217,7 @@ function ei(e = {}) {
3217
3217
  handleSubmit: We,
3218
3218
  setError: Be,
3219
3219
  _subscribe: Ae,
3220
- _runSchema: T,
3220
+ _runSchema: D,
3221
3221
  _updateIsValidating: A,
3222
3222
  _focusError: Ue,
3223
3223
  _getWatch: F,
@@ -3227,9 +3227,9 @@ function ei(e = {}) {
3227
3227
  _setDisabledField: st,
3228
3228
  _setErrors: V,
3229
3229
  _getFieldArray: B,
3230
- _reset: Ne,
3231
- _resetDefaultValues: () => de(r.defaultValues) && r.defaultValues().then((c) => {
3232
- nt(c, r.resetOptions), b.state.next({
3230
+ _reset: Re,
3231
+ _resetDefaultValues: () => de(r.defaultValues) && r.defaultValues().then((u) => {
3232
+ nt(u, r.resetOptions), b.state.next({
3233
3233
  isLoading: !1
3234
3234
  });
3235
3235
  }),
@@ -3246,8 +3246,8 @@ function ei(e = {}) {
3246
3246
  get _state() {
3247
3247
  return a;
3248
3248
  },
3249
- set _state(c) {
3250
- a = c;
3249
+ set _state(u) {
3250
+ a = u;
3251
3251
  },
3252
3252
  get _defaultValues() {
3253
3253
  return n;
@@ -3255,8 +3255,8 @@ function ei(e = {}) {
3255
3255
  get _names() {
3256
3256
  return o;
3257
3257
  },
3258
- set _names(c) {
3259
- o = c;
3258
+ set _names(u) {
3259
+ o = u;
3260
3260
  },
3261
3261
  get _formState() {
3262
3262
  return t;
@@ -3264,14 +3264,14 @@ function ei(e = {}) {
3264
3264
  get _options() {
3265
3265
  return r;
3266
3266
  },
3267
- set _options(c) {
3267
+ set _options(u) {
3268
3268
  r = {
3269
3269
  ...r,
3270
- ...c
3270
+ ...u
3271
3271
  };
3272
3272
  }
3273
3273
  },
3274
- subscribe: Re,
3274
+ subscribe: Ne,
3275
3275
  trigger: z,
3276
3276
  register: ve,
3277
3277
  handleSubmit: We,
@@ -3316,14 +3316,14 @@ function Ct(e = {}) {
3316
3316
  formState: s
3317
3317
  }, e.defaultValues && !de(e.defaultValues) && e.formControl.reset(e.defaultValues, e.resetOptions);
3318
3318
  else {
3319
- const { formControl: a, ...o } = ei(e);
3319
+ const { formControl: a, ...o } = ri(e);
3320
3320
  r.current = {
3321
3321
  ...o,
3322
3322
  formState: s
3323
3323
  };
3324
3324
  }
3325
3325
  const i = r.current.control;
3326
- return i._options = e, ja(() => {
3326
+ return i._options = e, Ba(() => {
3327
3327
  const a = i._subscribe({
3328
3328
  formState: i._proxyFormState,
3329
3329
  callback: () => n({ ...i._formState }),
@@ -3356,46 +3356,46 @@ function Ct(e = {}) {
3356
3356
  }), !((a = i._options.resetOptions) === null || a === void 0) && a.keepIsValid || i._setValid(), t.current = e.values, n((o) => ({ ...o }))) : i._resetDefaultValues();
3357
3357
  }, [i, e.values]), ae.useEffect(() => {
3358
3358
  i._state.mount || (i._setValid(), i._state.mount = !0), i._state.watch && (i._state.watch = !1, i._subjects.state.next({ ...i._formState })), i._removeUnmounted();
3359
- }), r.current.formState = ae.useMemo(() => Oa(s, i), [i, s]), r.current;
3359
+ }), r.current.formState = ae.useMemo(() => $a(s, i), [i, s]), r.current;
3360
3360
  }
3361
3361
  const Vr = (e, r, t) => {
3362
3362
  if (e && "reportValidity" in e) {
3363
3363
  const s = S(t, r);
3364
3364
  e.setCustomValidity(s && s.message || ""), e.reportValidity();
3365
3365
  }
3366
- }, ti = (e, r) => {
3366
+ }, si = (e, r) => {
3367
3367
  for (const t in r.fields) {
3368
3368
  const s = r.fields[t];
3369
3369
  s && s.ref && "reportValidity" in s.ref ? Vr(s.ref, t, e) : s.refs && s.refs.forEach((n) => Vr(n, t, e));
3370
3370
  }
3371
- }, ri = (e, r) => {
3372
- r.shouldUseNativeValidation && ti(e, r);
3371
+ }, ni = (e, r) => {
3372
+ r.shouldUseNativeValidation && si(e, r);
3373
3373
  const t = {};
3374
3374
  for (const s in e) {
3375
3375
  const n = S(r.fields, s), i = Object.assign(e[s] || {}, { ref: n && n.ref });
3376
- if (si(r.names || Object.keys(e), s)) {
3376
+ if (ai(r.names || Object.keys(e), s)) {
3377
3377
  const a = Object.assign({}, S(t, s));
3378
3378
  H(a, "root", i), H(t, s, a);
3379
3379
  } else
3380
3380
  H(t, s, i);
3381
3381
  }
3382
3382
  return t;
3383
- }, si = (e, r) => e.some((t) => t.startsWith(r + "."));
3383
+ }, ai = (e, r) => e.some((t) => t.startsWith(r + "."));
3384
3384
  var St = function(e, r, t) {
3385
3385
  return t === void 0 && (t = {}), function(s, n, i) {
3386
3386
  try {
3387
3387
  var a = !i.shouldUseNativeValidation && i.criteriaMode === "all";
3388
- return Promise.resolve(/* @__PURE__ */ pa(e, s, Object.assign({}, r, { abortPipeEarly: !a }))).then(function(o) {
3388
+ return Promise.resolve(/* @__PURE__ */ ya(e, s, Object.assign({}, r, { abortPipeEarly: !a }))).then(function(o) {
3389
3389
  if (o.issues) {
3390
- for (var u = {}; o.issues.length; ) {
3391
- var f = o.issues[0], h = /* @__PURE__ */ oa(f);
3392
- if (h && (u[h] || (u[h] = { message: f.message, type: f.type }), a)) {
3393
- var g = u[h].types, m = g && g[f.type];
3394
- u[h] = ps(h, a, u, f.type, m ? [].concat(m, f.message) : f.message);
3390
+ for (var c = {}; o.issues.length; ) {
3391
+ var f = o.issues[0], p = /* @__PURE__ */ ca(f);
3392
+ if (p && (c[p] || (c[p] = { message: f.message, type: f.type }), a)) {
3393
+ var g = c[p].types, m = g && g[f.type];
3394
+ c[p] = ms(p, a, c, f.type, m ? [].concat(m, f.message) : f.message);
3395
3395
  }
3396
3396
  o.issues.shift();
3397
3397
  }
3398
- return { values: {}, errors: ri(u, i) };
3398
+ return { values: {}, errors: ni(c, i) };
3399
3399
  }
3400
3400
  return { values: t.raw ? s : o.output, errors: {} };
3401
3401
  });
@@ -3404,19 +3404,19 @@ var St = function(e, r, t) {
3404
3404
  }
3405
3405
  };
3406
3406
  };
3407
- const Mr = 27, Lr = 12, Rr = 10, ni = et("enum"), ai = (e, r) => {
3407
+ const Mr = 27, Lr = 12, Nr = 10, ii = et("enum"), oi = (e, r) => {
3408
3408
  const t = {
3409
3409
  min: e.minSelected ?? 0,
3410
3410
  max: e.maxSelected ?? e.options.length
3411
3411
  };
3412
3412
  return St(/* @__PURE__ */ Ce({
3413
- checked: /* @__PURE__ */ Me(/* @__PURE__ */ ls(/* @__PURE__ */ le(), /* @__PURE__ */ as()), /* @__PURE__ */ Kt((s) => Object.entries(s).filter(([n, i]) => i).map(([n, i]) => n)), /* @__PURE__ */ ct(t.max, r("validation_multiple_choice_max", {
3413
+ checked: /* @__PURE__ */ Me(/* @__PURE__ */ cs(/* @__PURE__ */ le(), /* @__PURE__ */ is()), /* @__PURE__ */ Kt((s) => Object.entries(s).filter(([n, i]) => i).map(([n, i]) => n)), /* @__PURE__ */ ct(t.max, r("validation_multiple_choice_max", {
3414
3414
  count: t.max
3415
3415
  })), /* @__PURE__ */ Ze(t.min, r("validation_multiple_choice_min", {
3416
3416
  count: t.min
3417
3417
  })))
3418
3418
  }));
3419
- }, ii = Hr(({
3419
+ }, li = Kr(({
3420
3420
  option: e,
3421
3421
  ...r
3422
3422
  }, t) => l(be, {
@@ -3430,45 +3430,45 @@ const Mr = 27, Lr = 12, Rr = 10, ni = et("enum"), ai = (e, r) => {
3430
3430
  htmlFor: r.id,
3431
3431
  children: e.label
3432
3432
  })]
3433
- })), Nr = xt("gutter-stable flex w-full flex-1 flex-wrap gap-2 overflow-y-auto rounded-xl p-2.5 pr-4", {
3433
+ })), Rr = xt("gutter-stable flex w-full flex-1 flex-wrap gap-2 overflow-y-auto rounded-xl p-2.5 pr-4", {
3434
3434
  variants: {
3435
3435
  variant: {
3436
3436
  // In cases where there is only one option, we want to center it
3437
3437
  singleOption: "justify-center",
3438
3438
  // Two choices, one answer
3439
- booleanLike: us
3439
+ booleanLike: ds
3440
3440
  }
3441
3441
  }
3442
- }), oi = ({
3442
+ }), ci = ({
3443
3443
  input: e,
3444
3444
  onSubmitSuccess: r
3445
3445
  }) => {
3446
- var h, g;
3447
- const t = e.key ? (h = q.current$.value.flow) == null ? void 0 : h.data.submissions[e.key] : void 0, s = e.config.maxSelected === 1, n = s && e.config.options.length === 2, {
3446
+ var p, g;
3447
+ const t = e.key ? (p = q.current$.value.flow) == null ? void 0 : p.data.submissions[e.key] : void 0, s = e.config.maxSelected === 1, n = s && e.config.options.length === 2, {
3448
3448
  t: i
3449
3449
  } = re(), {
3450
3450
  register: a,
3451
3451
  handleSubmit: o,
3452
3452
  formState: {
3453
- errors: u
3453
+ errors: c
3454
3454
  }
3455
3455
  } = Ct({
3456
3456
  defaultValues: {
3457
- checked: s ? {} : ni(t) ? Object.fromEntries(t.value.map((m) => [m, !0])) : {}
3457
+ checked: s ? {} : ii(t) ? Object.fromEntries(t.value.map((m) => [m, !0])) : {}
3458
3458
  },
3459
- resolver: ai(e.config, i)
3459
+ resolver: oi(e.config, i)
3460
3460
  }), f = Jt();
3461
3461
  return n ? l(be, {
3462
3462
  children: [l("ul", {
3463
3463
  style: {
3464
- maxHeight: 6.5 * Mr + 5 * Lr + 2 * Rr
3464
+ maxHeight: 6.5 * Mr + 5 * Lr + 2 * Nr
3465
3465
  },
3466
- class: Nr({
3466
+ class: Rr({
3467
3467
  variant: "booleanLike"
3468
3468
  }),
3469
3469
  children: e.config.options.map((m, b) => l("li", {
3470
- class: ds,
3471
- children: l(fs, {
3470
+ class: fs,
3471
+ children: l(hs, {
3472
3472
  type: "submit",
3473
3473
  ref: (k) => {
3474
3474
  k && b === 0 && (f.current = k);
@@ -3505,9 +3505,9 @@ const Mr = 27, Lr = 12, Rr = 10, ni = et("enum"), ai = (e, r) => {
3505
3505
  class: "flex items-center gap-1",
3506
3506
  children: [l("ul", {
3507
3507
  style: {
3508
- maxHeight: 6.5 * Mr + 5 * Lr + 2 * Rr
3508
+ maxHeight: 6.5 * Mr + 5 * Lr + 2 * Nr
3509
3509
  },
3510
- class: Nr({
3510
+ class: Rr({
3511
3511
  variant: e.config.options.length === 1 ? "singleOption" : void 0
3512
3512
  }),
3513
3513
  children: e.config.options.map((m, b) => {
@@ -3517,7 +3517,7 @@ const Mr = 27, Lr = 12, Rr = 10, ni = et("enum"), ai = (e, r) => {
3517
3517
  } = a(k);
3518
3518
  return l("li", {
3519
3519
  class: "relative",
3520
- children: l(ii, {
3520
+ children: l(li, {
3521
3521
  option: m,
3522
3522
  autoFocus: b === 0,
3523
3523
  ref: (A) => {
@@ -3546,22 +3546,22 @@ const Mr = 27, Lr = 12, Rr = 10, ni = et("enum"), ai = (e, r) => {
3546
3546
  }), l("div", {
3547
3547
  class: "px-1",
3548
3548
  children: l(tt, {
3549
- error: (g = u.checked) == null ? void 0 : g.root
3549
+ error: (g = c.checked) == null ? void 0 : g.root
3550
3550
  })
3551
3551
  })]
3552
3552
  });
3553
- }, li = et("number"), ci = (e, r) => {
3553
+ }, ui = et("number"), di = (e, r) => {
3554
3554
  const t = e.min ?? Number.MIN_SAFE_INTEGER, s = e.max ?? Number.MAX_SAFE_INTEGER, n = e.decimalCases ?? 0;
3555
3555
  return St(/* @__PURE__ */ Ce({
3556
- number: /* @__PURE__ */ Me(/* @__PURE__ */ is(r("validation_number")), /* @__PURE__ */ ts(t, r("validation_number_min", {
3556
+ number: /* @__PURE__ */ Me(/* @__PURE__ */ os(r("validation_number")), /* @__PURE__ */ rs(t, r("validation_number_min", {
3557
3557
  min: t
3558
- })), /* @__PURE__ */ es(s, r("validation_number_max", {
3558
+ })), /* @__PURE__ */ ts(s, r("validation_number_max", {
3559
3559
  max: s
3560
- })), /* @__PURE__ */ Yr((i) => i === Number(i.toFixed(n)), r("validation_number_decimal_cases", {
3560
+ })), /* @__PURE__ */ Qr((i) => i === Number(i.toFixed(n)), r("validation_number_decimal_cases", {
3561
3561
  count: n
3562
3562
  })))
3563
3563
  }));
3564
- }, ui = ({
3564
+ }, fi = ({
3565
3565
  input: e,
3566
3566
  onSubmitSuccess: r
3567
3567
  }) => {
@@ -3576,18 +3576,18 @@ const Mr = 27, Lr = 12, Rr = 10, ni = et("enum"), ai = (e, r) => {
3576
3576
  }
3577
3577
  } = Ct({
3578
3578
  defaultValues: {
3579
- number: li(s) ? s.value : t ? Number(t) : void 0
3579
+ number: ui(s) ? s.value : t ? Number(t) : void 0
3580
3580
  },
3581
- resolver: ci(e.config, n)
3581
+ resolver: di(e.config, n)
3582
3582
  }), {
3583
- ref: u,
3583
+ ref: c,
3584
3584
  ...f
3585
3585
  } = i("number", {
3586
3586
  required: !e.config.optional,
3587
3587
  valueAsNumber: !0
3588
- }), h = ye();
3588
+ }), p = ye();
3589
3589
  return Le(() => {
3590
- h.current && (h.current.focus(), h.current.select());
3590
+ p.current && (p.current.focus(), p.current.select());
3591
3591
  }, []), l("form", {
3592
3592
  class: "flex flex-col gap-1 p-2.5",
3593
3593
  onSubmit: a((m) => {
@@ -3608,7 +3608,7 @@ const Mr = 27, Lr = 12, Rr = 10, ni = et("enum"), ai = (e, r) => {
3608
3608
  autoCorrect: "off",
3609
3609
  autoFocus: !0,
3610
3610
  ref: (m) => {
3611
- m && (h.current = m), u(m);
3611
+ m && (p.current = m), c(m);
3612
3612
  },
3613
3613
  type: "text",
3614
3614
  min: e.config.min,
@@ -3627,50 +3627,50 @@ const Mr = 27, Lr = 12, Rr = 10, ni = et("enum"), ai = (e, r) => {
3627
3627
  error: o.number
3628
3628
  })]
3629
3629
  });
3630
- }, di = "44", fi = /^[0-9 ]+$/, hi = et("string"), pi = et("phone"), mi = (e) => {
3631
- const r = /* @__PURE__ */ Me(/* @__PURE__ */ le(e("validation_country_code")), /* @__PURE__ */ Ht(fi, e("validation_country_code"))), t = /* @__PURE__ */ Me(/* @__PURE__ */ le(e("validation_phone")), /* @__PURE__ */ Ze(1, e("validation_phone")), /* @__PURE__ */ Kt((s) => s.replace(/[^0-9]/g, "")));
3630
+ }, hi = "44", pi = /^[0-9 ]+$/, mi = et("string"), yi = et("phone"), bi = (e) => {
3631
+ const r = /* @__PURE__ */ Me(/* @__PURE__ */ le(e("validation_country_code")), /* @__PURE__ */ Ht(pi, e("validation_country_code"))), t = /* @__PURE__ */ Me(/* @__PURE__ */ le(e("validation_phone")), /* @__PURE__ */ Ze(1, e("validation_phone")), /* @__PURE__ */ Kt((s) => s.replace(/[^0-9]/g, "")));
3632
3632
  return St(/* @__PURE__ */ Ce({
3633
3633
  countryCode: r,
3634
3634
  phoneNumber: t
3635
3635
  }));
3636
- }, yi = ({
3636
+ }, gi = ({
3637
3637
  input: e,
3638
3638
  onSubmitSuccess: r
3639
3639
  }) => {
3640
3640
  var w;
3641
3641
  const t = e.key ? (w = q.current$.value.flow) == null ? void 0 : w.data.submissions[e.key] : void 0, {
3642
3642
  t: s
3643
- } = re(), [n, i] = ke(), a = hi(t) ? ma(t.value) : pi(t) ? t.value : void 0, {
3643
+ } = re(), [n, i] = ke(), a = mi(t) ? ba(t.value) : yi(t) ? t.value : void 0, {
3644
3644
  register: o,
3645
- handleSubmit: u,
3645
+ handleSubmit: c,
3646
3646
  formState: {
3647
3647
  errors: f
3648
3648
  },
3649
- watch: h
3649
+ watch: p
3650
3650
  } = Ct({
3651
3651
  defaultValues: {
3652
- countryCode: (a == null ? void 0 : a.countryCode) ?? e.config.defaultValue.countryCode ?? di,
3652
+ countryCode: (a == null ? void 0 : a.countryCode) ?? e.config.defaultValue.countryCode ?? hi,
3653
3653
  phoneNumber: (a == null ? void 0 : a.phoneNumber) ?? e.config.defaultValue.phoneNumber ?? ""
3654
3654
  },
3655
- resolver: mi(s)
3655
+ resolver: bi(s)
3656
3656
  }), {
3657
3657
  ref: g,
3658
3658
  ...m
3659
3659
  } = o("phoneNumber", {
3660
3660
  required: !e.config.optional
3661
- }), b = ye(), k = h("countryCode");
3661
+ }), b = ye(), k = p("countryCode");
3662
3662
  return Le(() => {
3663
3663
  b.current && (b.current.focus(), b.current.select());
3664
3664
  }, []), l("form", {
3665
3665
  noValidate: !0,
3666
3666
  class: "flex flex-col gap-1 p-2.5",
3667
- onSubmit: u((C) => {
3667
+ onSubmit: c((C) => {
3668
3668
  const A = C.phoneNumber.replace(/[^0-9]/g, ""), v = C.countryCode.replace(/[^0-9]/g, "");
3669
3669
  i(void 0);
3670
- const R = e.config.minChars ?? 7, V = A.length + v.length;
3671
- if (V < R)
3670
+ const N = e.config.minChars ?? 7, V = A.length + v.length;
3671
+ if (V < N)
3672
3672
  return i(s("validation_phone_min_chars", {
3673
- count: R
3673
+ count: N
3674
3674
  }));
3675
3675
  const M = e.config.maxChars;
3676
3676
  if (M != null && V > M)
@@ -3734,14 +3734,14 @@ const Mr = 27, Lr = 12, Rr = 10, ni = et("enum"), ai = (e, r) => {
3734
3734
  }
3735
3735
  })]
3736
3736
  });
3737
- }, yt = (e) => e === void 0 ? 0 : Math.max(0, Math.ceil((e - Date.now()) / 1e3)), Dr = (e, r, t, s) => t !== void 0 && s * 1e3 > Wr ? e("submission_available_at", {
3738
- time: Ur(t, r)
3737
+ }, yt = (e) => e === void 0 ? 0 : Math.max(0, Math.ceil((e - Date.now()) / 1e3)), Tr = (e, r, t, s) => t !== void 0 && s * 1e3 > zr ? e("submission_available_at", {
3738
+ time: Wr(t, r)
3739
3739
  }) : e("submission_cooldown", {
3740
3740
  count: s
3741
- }), bi = (e, r) => {
3741
+ }), vi = (e, r) => {
3742
3742
  const t = e == null ? void 0 : e.trim();
3743
3743
  return t && t !== "Submit" ? t : r("submit");
3744
- }, gi = ({
3744
+ }, xi = ({
3745
3745
  input: e,
3746
3746
  onSubmitSuccess: r
3747
3747
  }) => {
@@ -3750,15 +3750,15 @@ const Mr = 27, Lr = 12, Rr = 10, ni = et("enum"), ai = (e, r) => {
3750
3750
  locale: s
3751
3751
  } = re(), {
3752
3752
  availableAt: n
3753
- } = e.config, [i, a] = ke(() => yt(n)), [o, u] = ke("");
3754
- zr(() => {
3755
- const h = yt(n);
3756
- if (a(h), h === 0)
3753
+ } = e.config, [i, a] = ke(() => yt(n)), [o, c] = ke("");
3754
+ Hr(() => {
3755
+ const p = yt(n);
3756
+ if (a(p), p === 0)
3757
3757
  return;
3758
- u(Dr(t, s, n, h));
3758
+ c(Tr(t, s, n, p));
3759
3759
  const g = setInterval(() => {
3760
3760
  const m = yt(n);
3761
- a(m), !(m > 0) && (clearInterval(g), u(t("submission_cooldown_ready")));
3761
+ a(m), !(m > 0) && (clearInterval(g), c(t("submission_cooldown_ready")));
3762
3762
  }, 250);
3763
3763
  return () => clearInterval(g);
3764
3764
  }, [n, s, t]);
@@ -3777,7 +3777,7 @@ const Mr = 27, Lr = 12, Rr = 10, ni = et("enum"), ai = (e, r) => {
3777
3777
  class: "flex items-center gap-1.5",
3778
3778
  children: [l("span", {
3779
3779
  class: "inline-flex items-center text-sm font-medium",
3780
- children: bi(e.config.label, t)
3780
+ children: vi(e.config.label, t)
3781
3781
  }), l("svg", {
3782
3782
  stroke: "currentColor",
3783
3783
  "stroke-width": "1.5",
@@ -3797,16 +3797,16 @@ const Mr = 27, Lr = 12, Rr = 10, ni = et("enum"), ai = (e, r) => {
3797
3797
  id: "submit-cooldown",
3798
3798
  "aria-hidden": "true",
3799
3799
  class: "text-neutral-11 text-xs",
3800
- children: Dr(t, s, n, i)
3800
+ children: Tr(t, s, n, i)
3801
3801
  }), l("p", {
3802
3802
  role: "status",
3803
3803
  class: "sr-only",
3804
3804
  children: o
3805
3805
  })]
3806
3806
  });
3807
- }, vi = 160, Tr = (e) => {
3808
- e.style.height = "auto", e.style.height = `${Math.min(e.scrollHeight, vi)}px`;
3809
- }, xi = {
3807
+ }, wi = 160, Dr = (e) => {
3808
+ e.style.height = "auto", e.style.height = `${Math.min(e.scrollHeight, wi)}px`;
3809
+ }, _i = {
3810
3810
  date: {
3811
3811
  type: "date",
3812
3812
  inputMode: "text"
@@ -3825,7 +3825,7 @@ const Mr = 27, Lr = 12, Rr = 10, ni = et("enum"), ai = (e, r) => {
3825
3825
  inputMode: "url",
3826
3826
  formNoValidate: !0
3827
3827
  }
3828
- }, wi = et("string"), _i = (e, r) => {
3828
+ }, ki = et("string"), Ci = (e, r) => {
3829
3829
  const t = {
3830
3830
  maxLength: r("validation_max_chars", {
3831
3831
  count: e.maxChars ?? 999
@@ -3837,12 +3837,12 @@ const Mr = 27, Lr = 12, Rr = 10, ni = et("enum"), ai = (e, r) => {
3837
3837
  return St(/* @__PURE__ */ Ce({
3838
3838
  text: {
3839
3839
  date: /* @__PURE__ */ Me(/* @__PURE__ */ le(r("validation_date")), /* @__PURE__ */ Ht(/^\d{4}-\d{2}-\d{2}$/, r("validation_date"))),
3840
- email: /* @__PURE__ */ Me(/* @__PURE__ */ le(r("validation_email")), /* @__PURE__ */ Qr(r("validation_email")), /* @__PURE__ */ Ze(e.minChars ?? 1, t.minLength), /* @__PURE__ */ ct(e.maxChars ?? 1 / 0, t.maxLength)),
3840
+ email: /* @__PURE__ */ Me(/* @__PURE__ */ le(r("validation_email")), /* @__PURE__ */ es(r("validation_email")), /* @__PURE__ */ Ze(e.minChars ?? 1, t.minLength), /* @__PURE__ */ ct(e.maxChars ?? 1 / 0, t.maxLength)),
3841
3841
  text: /* @__PURE__ */ Me(/* @__PURE__ */ le(), /* @__PURE__ */ Ze(e.minChars ?? 1, t.minLength), /* @__PURE__ */ ct(e.maxChars ?? 1 / 0, t.maxLength)),
3842
- url: /* @__PURE__ */ Me(/* @__PURE__ */ le(r("validation_url")), /* @__PURE__ */ rs(r("validation_url")), /* @__PURE__ */ Ze(e.minChars ?? 1, t.minLength), /* @__PURE__ */ ct(e.maxChars ?? 1 / 0, t.maxLength))
3842
+ url: /* @__PURE__ */ Me(/* @__PURE__ */ le(r("validation_url")), /* @__PURE__ */ ss(r("validation_url")), /* @__PURE__ */ Ze(e.minChars ?? 1, t.minLength), /* @__PURE__ */ ct(e.maxChars ?? 1 / 0, t.maxLength))
3843
3843
  }[e.format]
3844
3844
  }));
3845
- }, ki = ({
3845
+ }, Si = ({
3846
3846
  input: e,
3847
3847
  onSubmitSuccess: r
3848
3848
  }) => {
@@ -3852,25 +3852,25 @@ const Mr = 27, Lr = 12, Rr = 10, ni = et("enum"), ai = (e, r) => {
3852
3852
  } = re(), s = e.key ? (w = q.current$.value.flow) == null ? void 0 : w.data.submissions[e.key] : void 0, n = e.config.defaultValue, i = e.config.multiline === !0 && e.config.format === "text", {
3853
3853
  register: a,
3854
3854
  handleSubmit: o,
3855
- watch: u,
3855
+ watch: c,
3856
3856
  formState: {
3857
3857
  errors: f
3858
3858
  }
3859
3859
  } = Ct({
3860
3860
  defaultValues: {
3861
- text: wi(s) ? s.value : n ?? ""
3861
+ text: ki(s) ? s.value : n ?? ""
3862
3862
  },
3863
- resolver: _i(e.config, t)
3863
+ resolver: Ci(e.config, t)
3864
3864
  }), {
3865
- ref: h,
3865
+ ref: p,
3866
3866
  ...g
3867
3867
  } = a("text", {
3868
3868
  required: !e.config.optional
3869
3869
  }), m = ye();
3870
3870
  Le(() => {
3871
- m.current && (m.current instanceof HTMLTextAreaElement && Tr(m.current), m.current.focus(), m.current.select());
3871
+ m.current && (m.current instanceof HTMLTextAreaElement && Dr(m.current), m.current.focus(), m.current.select());
3872
3872
  }, []);
3873
- const b = e.config.maxChars, k = i && b !== void 0 ? u("text").length : void 0;
3873
+ const b = e.config.maxChars, k = i && b !== void 0 ? c("text").length : void 0;
3874
3874
  return l("form", {
3875
3875
  noValidate: !0,
3876
3876
  class: "flex flex-col gap-1 p-2.5",
@@ -3891,13 +3891,13 @@ const Mr = 27, Lr = 12, Rr = 10, ni = et("enum"), ai = (e, r) => {
3891
3891
  maxLength: b,
3892
3892
  autoFocus: !0,
3893
3893
  "aria-describedby": k !== void 0 ? "chat-input-count" : void 0,
3894
- onInput: (C) => Tr(C.currentTarget),
3894
+ onInput: (C) => Dr(C.currentTarget),
3895
3895
  onKeyDown: (C) => {
3896
3896
  var A;
3897
3897
  C.key === "Enter" && (C.ctrlKey || C.metaKey) && (C.preventDefault(), (A = C.currentTarget.form) == null || A.requestSubmit());
3898
3898
  },
3899
3899
  ref: (C) => {
3900
- C && (m.current = C), h(C);
3900
+ C && (m.current = C), p(C);
3901
3901
  },
3902
3902
  placeholder: e.config.placeholder,
3903
3903
  class: Ye({
@@ -3907,13 +3907,13 @@ const Mr = 27, Lr = 12, Rr = 10, ni = et("enum"), ai = (e, r) => {
3907
3907
  }) : l("input", {
3908
3908
  id: "chat-input",
3909
3909
  ...g,
3910
- ...xi[e.config.format],
3910
+ ..._i[e.config.format],
3911
3911
  autocomplete: "off",
3912
3912
  autoCapitalize: "off",
3913
3913
  autoCorrect: "off",
3914
3914
  autoFocus: !0,
3915
3915
  ref: (C) => {
3916
- C && (m.current = C), h(C);
3916
+ C && (m.current = C), p(C);
3917
3917
  },
3918
3918
  placeholder: e.config.placeholder,
3919
3919
  class: Ye({
@@ -3936,16 +3936,16 @@ const Mr = 27, Lr = 12, Rr = 10, ni = et("enum"), ai = (e, r) => {
3936
3936
  error: f.text
3937
3937
  })]
3938
3938
  });
3939
- }, Ci = {
3940
- text: ki,
3941
- phone: yi,
3942
- "multiple-choice": oi,
3943
- boolean: Sa,
3944
- file: Ma,
3945
- submit: gi,
3946
- address: wa,
3947
- number: ui
3948
- }, Si = ({
3939
+ }, Ai = {
3940
+ text: Si,
3941
+ phone: gi,
3942
+ "multiple-choice": ci,
3943
+ boolean: Ia,
3944
+ file: Na,
3945
+ submit: xi,
3946
+ address: ka,
3947
+ number: fi
3948
+ }, Ii = ({
3949
3949
  logger: e,
3950
3950
  analytics: r
3951
3951
  }) => {
@@ -3964,7 +3964,7 @@ const Mr = 27, Lr = 12, Rr = 10, ni = et("enum"), ai = (e, r) => {
3964
3964
  onPointerDownCapture: t ? n : void 0,
3965
3965
  onKeyDownCapture: t ? n : void 0,
3966
3966
  children: t ? (() => {
3967
- const a = Ci[t.type];
3967
+ const a = Ai[t.type];
3968
3968
  return l(a, {
3969
3969
  logger: e,
3970
3970
  analytics: r,
@@ -3990,31 +3990,31 @@ const Mr = 27, Lr = 12, Rr = 10, ni = et("enum"), ai = (e, r) => {
3990
3990
  })
3991
3991
  });
3992
3992
  };
3993
- function Ai(e) {
3993
+ function Ei(e) {
3994
3994
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
3995
3995
  }
3996
- var Ii = function(e) {
3996
+ var Fi = function(e) {
3997
3997
  return e instanceof RegExp;
3998
- }, Ei = function(r) {
3998
+ }, Vi = function(r) {
3999
3999
  var t = /[\\^$.*+?()[\]{}|]/g, s = RegExp(t.source);
4000
4000
  return r && s.test(r) ? r.replace(t, "\\$&") : r;
4001
- }, ws = function(e) {
4001
+ }, _s = function(e) {
4002
4002
  return typeof e == "string";
4003
- }, Fi = function(e) {
4003
+ }, Mi = function(e) {
4004
4004
  var r = [];
4005
4005
  return e.forEach(function(t) {
4006
4006
  Array.isArray(t) ? r = r.concat(t) : r.push(t);
4007
4007
  }), r;
4008
4008
  };
4009
- function Vi(e, r, t) {
4009
+ function Li(e, r, t) {
4010
4010
  var s = 0, n = 0;
4011
4011
  if (e === "")
4012
4012
  return e;
4013
- if (!e || !ws(e))
4013
+ if (!e || !_s(e))
4014
4014
  throw new TypeError("First argument to react-string-replace#replaceString must be a string");
4015
4015
  var i = r;
4016
- Ii(i) || (i = new RegExp("(" + Ei(i) + ")", "gi"));
4017
- for (var a = e.split(i), o = 1, u = a.length; o < u; o += 2) {
4016
+ Fi(i) || (i = new RegExp("(" + Vi(i) + ")", "gi"));
4017
+ for (var a = e.split(i), o = 1, c = a.length; o < c; o += 2) {
4018
4018
  if (a[o] === void 0 || a[o - 1] === void 0) {
4019
4019
  console.warn("reactStringReplace: Encountered undefined value during string replacement. Your RegExp may not be working the way you expect.");
4020
4020
  continue;
@@ -4023,33 +4023,33 @@ function Vi(e, r, t) {
4023
4023
  }
4024
4024
  return a;
4025
4025
  }
4026
- var Mi = function(r, t, s) {
4027
- return Array.isArray(r) || (r = [r]), Fi(r.map(function(n) {
4028
- return ws(n) ? Vi(n, t, s) : n;
4026
+ var Ni = function(r, t, s) {
4027
+ return Array.isArray(r) || (r = [r]), Mi(r.map(function(n) {
4028
+ return _s(n) ? Li(n, t, s) : n;
4029
4029
  }));
4030
4030
  };
4031
- const ot = /* @__PURE__ */ Ai(Mi), Li = /(\[[^\]]+\]\([^)]+\))/g, Ri = /\[([^\]]+)\]\(([^)]+)\)/, Ni = /(https?:\/\/[^\s]+)/g, Di = /_(.*?)_/g, Ti = /\*\*(.*?)\*\*/g, Oi = /(\\n|\n)/g, Or = "text-accent-10 hover:text-accent-11 no-underline underline-offset-2 hover:underline", ji = (e) => {
4032
- const r = ot(e, Li, (o, u) => {
4033
- const [, f, h] = o.match(Ri) ?? [];
4034
- return h ? l("a", {
4031
+ const ot = /* @__PURE__ */ Ei(Ni), Ri = /(\[[^\]]+\]\([^)]+\))/g, Ti = /\[([^\]]+)\]\(([^)]+)\)/, Di = /(https?:\/\/[^\s]+)/g, Oi = /_(.*?)_/g, ji = /\*\*(.*?)\*\*/g, $i = /(\\n|\n)/g, Or = "text-accent-10 hover:text-accent-11 no-underline underline-offset-2 hover:underline", Bi = (e) => {
4032
+ const r = ot(e, Ri, (o, c) => {
4033
+ const [, f, p] = o.match(Ti) ?? [];
4034
+ return p ? l("a", {
4035
4035
  class: Or,
4036
- href: h,
4037
- children: f ?? h
4038
- }, h + u) : l("span", {
4036
+ href: p,
4037
+ children: f ?? p
4038
+ }, p + c) : l("span", {
4039
4039
  children: "INVALID LINK"
4040
4040
  });
4041
- }), t = ot(r, Ni, (o, u) => l("a", {
4041
+ }), t = ot(r, Di, (o, c) => l("a", {
4042
4042
  class: Or,
4043
4043
  href: o,
4044
4044
  children: o
4045
- }, o + u)), s = ot(t, Di, (o, u) => l("em", {
4045
+ }, o + c)), s = ot(t, Oi, (o, c) => l("em", {
4046
4046
  children: o
4047
- }, o + u)), n = ot(s, Ti, (o, u) => l("strong", {
4047
+ }, o + c)), n = ot(s, ji, (o, c) => l("strong", {
4048
4048
  children: o
4049
- }, o + u));
4049
+ }, o + c));
4050
4050
  let i = 0;
4051
- return ot(n, Oi, () => l("br", {}, `br-${i++}`));
4052
- }, $i = xt("select-text max-w-[min(100%,24rem)] [text-wrap:pretty] leading-snug flex-shrink min-w-[2rem] py-2 px-3 rounded-[18px] min-h-[36px] break-words relative", {
4051
+ return ot(n, $i, () => l("br", {}, `br-${i++}`));
4052
+ }, Pi = xt("select-text max-w-[min(100%,24rem)] [text-wrap:pretty] leading-snug flex-shrink min-w-[2rem] py-2 px-3 rounded-[18px] min-h-[36px] break-words relative", {
4053
4053
  variants: {
4054
4054
  side: {
4055
4055
  left: "bg-bubble-weak-bg text-neutral-12 shadow-surface-sm outline outline-1 outline-bubble-weak rounded-bl-md",
@@ -4063,7 +4063,7 @@ const ot = /* @__PURE__ */ Ai(Mi), Li = /(\[[^\]]+\]\([^)]+\))/g, Ri = /\[([^\]]
4063
4063
  defaultVariants: {
4064
4064
  side: "left"
4065
4065
  }
4066
- }), Bi = ({
4066
+ }), qi = ({
4067
4067
  children: e,
4068
4068
  className: r,
4069
4069
  animate: t,
@@ -4073,26 +4073,38 @@ const ot = /* @__PURE__ */ Ai(Mi), Li = /(\[[^\]]+\]\([^)]+\))/g, Ri = /\[([^\]]
4073
4073
  style: {
4074
4074
  transformOrigin: s === "left" ? "0% 50%" : "100% 50%"
4075
4075
  },
4076
- class: $i({
4076
+ class: Pi({
4077
4077
  className: r,
4078
4078
  side: s,
4079
4079
  animate: t
4080
4080
  }),
4081
4081
  ...n,
4082
4082
  children: e
4083
- }), jr = /* @__PURE__ */ new Map(), Pi = ({
4083
+ }), jr = /* @__PURE__ */ new Map(), $r = Gs({
4084
+ overrides: {},
4085
+ locale: void 0
4086
+ }), Ui = (e, r) => {
4087
+ const t = r == null ? void 0 : r.trim();
4088
+ if (!t)
4089
+ return e("job_alerts_privacy");
4090
+ const s = e("job_alerts_privacy_sender", {
4091
+ employer: t
4092
+ });
4093
+ return e("job_alerts_privacy") !== $r("job_alerts_privacy") && s === $r("job_alerts_privacy_sender", {
4094
+ employer: t
4095
+ }) ? e("job_alerts_privacy") : s;
4096
+ }, Wi = ({
4084
4097
  flow: e,
4085
4098
  rpcClient: r
4086
4099
  }) => {
4087
- var u;
4088
4100
  const {
4089
4101
  t
4090
- } = re(), s = e.data.flowSessionId, n = jr.get(s) ?? Ks("offer");
4102
+ } = re(), s = e.data.flowSessionId, n = jr.get(s) ?? Js("offer");
4091
4103
  jr.set(s, n);
4092
- const i = (f) => {
4093
- const h = e.data.submissions[f];
4094
- return (h == null ? void 0 : h.type) === "string" ? h.value.trim() : void 0;
4095
- }, a = i("email") || e.nodes.flatMap((f) => f.type === "question-text" && f.data.format === "email" ? [i(f.data.key)] : []).find((f) => !!f);
4104
+ const i = (c) => {
4105
+ const f = e.data.submissions[c];
4106
+ return (f == null ? void 0 : f.type) === "string" ? f.value.trim() : void 0;
4107
+ }, a = i("email") || e.nodes.flatMap((c) => c.type === "question-text" && c.data.format === "email" ? [i(c.data.key)] : []).find((c) => !!c);
4096
4108
  if (!a || n.value === "declined")
4097
4109
  return null;
4098
4110
  if (n.value === "success")
@@ -4104,7 +4116,7 @@ const ot = /* @__PURE__ */ Ai(Mi), Li = /(\[[^\]]+\]\([^)]+\))/g, Ri = /\[([^\]]
4104
4116
  if (!(n.value !== "offer" && n.value !== "error")) {
4105
4117
  n.value = "saving";
4106
4118
  try {
4107
- await Qs(r, {
4119
+ await tn(r, {
4108
4120
  contact: {
4109
4121
  email: a,
4110
4122
  first_name: i("first_name"),
@@ -4145,12 +4157,10 @@ const ot = /* @__PURE__ */ Ai(Mi), Li = /(\[[^\]]+\]\([^)]+\))/g, Ri = /\[([^\]]
4145
4157
  })]
4146
4158
  }), l("p", {
4147
4159
  class: "text-xs",
4148
- children: (u = e.employer) != null && u.trim() ? t("job_alerts_privacy_sender", {
4149
- employer: e.employer.trim()
4150
- }) : t("job_alerts_privacy")
4160
+ children: Ui(t, e.employer)
4151
4161
  })]
4152
4162
  });
4153
- }, qi = ({
4163
+ }, zi = ({
4154
4164
  message: e
4155
4165
  }) => l("div", {
4156
4166
  class: "bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl px-2 py-2",
@@ -4174,7 +4184,7 @@ const ot = /* @__PURE__ */ Ai(Mi), Li = /(\[[^\]]+\]\([^)]+\))/g, Ri = /\[([^\]]
4174
4184
  })
4175
4185
  })]
4176
4186
  })
4177
- }), Ui = ({
4187
+ }), Hi = ({
4178
4188
  className: e,
4179
4189
  ...r
4180
4190
  }) => l("div", {
@@ -4192,10 +4202,10 @@ const ot = /* @__PURE__ */ Ai(Mi), Li = /(\[[^\]]+\]\([^)]+\))/g, Ri = /\[([^\]]
4192
4202
  }
4193
4203
  }))
4194
4204
  }) : void 0
4195
- }), Wi = {
4205
+ }), Ki = {
4196
4206
  bot: "left",
4197
4207
  user: "right"
4198
- }, zi = xt("w-full select-none py-2 text-wrap-balance text-center text-[10px] uppercase tracking-widest drop-shadow-[0_1.5px_var(--i-color-n-1)]", {
4208
+ }, Gi = xt("w-full select-none py-2 text-wrap-balance text-center text-[10px] uppercase tracking-widest drop-shadow-[0_1.5px_var(--i-color-n-1)]", {
4199
4209
  variants: {
4200
4210
  variant: {
4201
4211
  info: "text-neutral-11",
@@ -4204,79 +4214,79 @@ const ot = /* @__PURE__ */ Ai(Mi), Li = /(\[[^\]]+\]\([^)]+\))/g, Ri = /\[([^\]]
4204
4214
  success: "text-system-success"
4205
4215
  }
4206
4216
  }
4207
- }), Hi = ({
4217
+ }), Ji = ({
4208
4218
  env: e,
4209
4219
  lastSentMessageFooter: r,
4210
4220
  rpcClient: t
4211
4221
  }) => {
4212
4222
  const {
4213
4223
  t: s
4214
- } = re(), n = q.current$.value.flow, i = (n == null ? void 0 : n.data.messages) ?? [], a = i.findIndex((u) => u.type === "system" && u.semantic === "submission-closed"), o = n ? zt(n) : void 0;
4224
+ } = re(), n = q.current$.value.flow, i = (n == null ? void 0 : n.data.messages) ?? [], a = i.findIndex((c) => c.type === "system" && c.semantic === "submission-closed"), o = n ? zt(n) : void 0;
4215
4225
  return l("ol", {
4216
4226
  "aria-label": s("chat_messages"),
4217
4227
  "aria-live": "polite",
4218
4228
  class: "mt-auto flex flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",
4219
- children: [i.map((u, f) => l(be, {
4229
+ children: [i.map((c, f) => l(be, {
4220
4230
  children: [l("li", {
4221
4231
  class: "flex",
4222
4232
  tabIndex: f === i.length - 1 ? -1 : void 0,
4223
- children: [o && u.groupId === o && !i.slice(f + 1).some((h) => h.groupId === o) ? r : null, Gs(u).with({
4233
+ children: [o && c.groupId === o && !i.slice(f + 1).some((p) => p.groupId === o) ? r : null, Zs(c).with({
4224
4234
  type: "system"
4225
- }, (h) => l("p", {
4226
- class: zi({
4227
- variant: h.variant
4235
+ }, (p) => l("p", {
4236
+ class: Gi({
4237
+ variant: p.variant
4228
4238
  }),
4229
- children: h.text
4239
+ children: p.text
4230
4240
  })).with({
4231
4241
  type: "text",
4232
- author: Js.union("bot", "user")
4233
- }, (h) => {
4234
- const g = f === i.length - 1, m = h.author === "bot" ? ji(h.text) : h.text;
4242
+ author: Xs.union("bot", "user")
4243
+ }, (p) => {
4244
+ const g = f === i.length - 1, m = p.author === "bot" ? Bi(p.text) : p.text;
4235
4245
  return l(be, {
4236
- children: l(Bi, {
4246
+ children: l(qi, {
4237
4247
  animate: g,
4238
- side: Wi[h.author],
4248
+ side: Ki[p.author],
4239
4249
  children: m
4240
4250
  }, f)
4241
4251
  });
4242
4252
  }).with({
4243
4253
  type: "link"
4244
- }, (h) => l(qi, {
4245
- message: h
4254
+ }, (p) => l(zi, {
4255
+ message: p
4246
4256
  })).with({
4247
4257
  type: "image"
4248
- }, (h) => l("img", {
4258
+ }, (p) => l("img", {
4249
4259
  class: "shadow-surface-md w-full max-w-[min(100%,24rem)] rounded-2xl",
4250
- src: h.url,
4260
+ src: p.url,
4251
4261
  style: {
4252
- aspectRatio: h.width / h.height
4262
+ aspectRatio: p.width / p.height
4253
4263
  }
4254
4264
  })).with({
4255
4265
  type: "file"
4256
- }, (h) => l(Ia, {
4257
- class: h.author === "bot" ? void 0 : "ml-auto",
4266
+ }, (p) => l(Fa, {
4267
+ class: p.author === "bot" ? void 0 : "ml-auto",
4258
4268
  file: {
4259
- name: h.fileName,
4260
- sizeKb: h.fileSizeKb
4269
+ name: p.fileName,
4270
+ sizeKb: p.fileSizeKb
4261
4271
  }
4262
4272
  })).with({
4263
4273
  type: "loading"
4264
- }, (h) => {
4274
+ }, (p) => {
4265
4275
  const g = i[i.length - 1];
4266
- return !(h === g) || ce.isBotTyping$.value || n != null && n.data.isFinished ? null : l("div", {
4276
+ return !(p === g) || ce.isBotTyping$.value || n != null && n.data.isFinished ? null : l("div", {
4267
4277
  class: "flex flex-grow flex-col items-center justify-center gap-2",
4268
4278
  children: [l(Ut, {
4269
- "aria-hidden": h.text ? "true" : void 0,
4279
+ "aria-hidden": p.text ? "true" : void 0,
4270
4280
  class: "text-neutral-6 h-8 w-8"
4271
- }), h.text ? l("p", {
4281
+ }), p.text ? l("p", {
4272
4282
  role: "status",
4273
4283
  class: "text-neutral-11 text-sm",
4274
- children: h.text
4284
+ children: p.text
4275
4285
  }) : null]
4276
4286
  });
4277
4287
  }).exhaustive()]
4278
4288
  }), f === a && (n != null && n.jobAlerts) && t ? l("li", {
4279
- children: l(Pi, {
4289
+ children: l(Wi, {
4280
4290
  flow: n,
4281
4291
  rpcClient: t
4282
4292
  }, n.data.flowSessionId)
@@ -4293,9 +4303,9 @@ const ot = /* @__PURE__ */ Ai(Mi), Li = /(\[[^\]]+\]\([^)]+\))/g, Ri = /\[([^\]]
4293
4303
  "aria-label": s("captcha_check"),
4294
4304
  class: "w-full max-w-[min(100%,24rem)] rounded-md"
4295
4305
  })
4296
- }, "captcha"), l(Ui, {}, "typing")]
4306
+ }, "captcha"), l(Hi, {}, "typing")]
4297
4307
  });
4298
- }, Xi = ({
4308
+ }, eo = ({
4299
4309
  logger: e,
4300
4310
  apiClient: r,
4301
4311
  rpcClient: t,
@@ -4308,10 +4318,10 @@ const ot = /* @__PURE__ */ Ai(Mi), Li = /(\[[^\]]+\]\([^)]+\))/g, Ri = /\[([^\]]
4308
4318
  } = q.current$.value;
4309
4319
  Oe(a, "Flow is required to exist to show chatbot body");
4310
4320
  const o = q.viewState$.value, {
4311
- chatRef: u,
4321
+ chatRef: c,
4312
4322
  chatService: f
4313
- } = Zs(), {
4314
- t: h
4323
+ } = Ys(), {
4324
+ t: p
4315
4325
  } = re(), [g, m] = ke();
4316
4326
  return Le(() => {
4317
4327
  o === "maximised" && ce.scrollToEnd();
@@ -4322,20 +4332,20 @@ const ot = /* @__PURE__ */ Ai(Mi), Li = /(\[[^\]]+\]\([^)]+\))/g, Ri = /\[([^\]]
4322
4332
  flow: k
4323
4333
  } = q.current$.peek();
4324
4334
  if (b !== "loaded")
4325
- throw new Error(h("invalid_state"));
4335
+ throw new Error(p("invalid_state"));
4326
4336
  let w = k.data.nodeHistory.at(-1);
4327
4337
  if (ce.scrollToEnd(), q.setInput(void 0), k.data.isFinished)
4328
4338
  return;
4329
4339
  const C = () => {
4330
- const T = q.current$.peek().flow;
4331
- !T || T.data.hasInteracted || (q.markAsInteracted(), dr(s, T, "FLOW_INTERACT"));
4340
+ const D = q.current$.peek().flow;
4341
+ !D || D.data.hasInteracted || (q.markAsInteracted(), dr(s, D, "FLOW_INTERACT"));
4332
4342
  };
4333
- ce.onInteractionFn$.value = C, w === void 0 ? (w = Jr(a.nodes).id, q.setCurrentNodeId(w), dr(s, k, "FLOW_START")) : q.removeMessagesSentByNodeIds([w, Bt]);
4343
+ ce.onInteractionFn$.value = C, w === void 0 ? (w = Zr(a.nodes).id, q.setCurrentNodeId(w), dr(s, k, "FLOW_START")) : q.removeMessagesSentByNodeIds([w, Bt]);
4334
4344
  const {
4335
4345
  interpret: A,
4336
4346
  abort: v,
4337
- undo: R
4338
- } = En({
4347
+ undo: N
4348
+ } = Vn({
4339
4349
  context: a.context,
4340
4350
  analytics: {
4341
4351
  service: s,
@@ -4346,87 +4356,87 @@ const ot = /* @__PURE__ */ Ai(Mi), Li = /(\[[^\]]+\]\([^)]+\))/g, Ri = /\[([^\]]
4346
4356
  talentBankClient: n,
4347
4357
  flow: a,
4348
4358
  chatService: f,
4349
- t: h,
4359
+ t: p,
4350
4360
  getApplicationRecovery: () => {
4351
- var T;
4352
- return (T = q.current$.peek().flow) == null ? void 0 : T.data.applicationRecovery;
4361
+ var D;
4362
+ return (D = q.current$.peek().flow) == null ? void 0 : D.data.applicationRecovery;
4353
4363
  },
4354
4364
  setApplicationRecovery: q.setApplicationRecovery,
4355
4365
  persistWriteBarrier: () => q.persistWriteBarrier(k),
4356
4366
  // We need to get fresh submissions, that’s why we call `peek` here.
4357
4367
  getSubmissions: () => {
4358
- var T;
4359
- return (T = q.current$.peek().flow) == null ? void 0 : T.data.submissions;
4368
+ var D;
4369
+ return (D = q.current$.peek().flow) == null ? void 0 : D.data.submissions;
4360
4370
  },
4361
- onInterpret: (T) => q.setCurrentNodeId(T.id),
4371
+ onInterpret: (D) => q.setCurrentNodeId(D.id),
4362
4372
  onFlowEnd: async () => {
4363
- var N;
4373
+ var R;
4364
4374
  q.markAsFinished();
4365
- const T = q.current$.peek().flow;
4366
- Oe(T), s.log({
4375
+ const D = q.current$.peek().flow;
4376
+ Oe(D), s.log({
4367
4377
  event: "FLOW_END",
4368
4378
  properties: {
4369
4379
  flow_id: a.id,
4370
4380
  flow_version: a.version,
4371
- flow_session_id: T.data.flowSessionId,
4381
+ flow_session_id: D.data.flowSessionId,
4372
4382
  flow_build: a.build,
4373
4383
  job: a.job
4374
4384
  },
4375
- customProperties: (N = a.analytics) == null ? void 0 : N.customProperties
4385
+ customProperties: (R = a.analytics) == null ? void 0 : R.customProperties
4376
4386
  });
4377
4387
  }
4378
4388
  }), V = w, M = () => {
4379
- m(() => R), A(V);
4389
+ m(() => N), A(V);
4380
4390
  }, ee = new AbortController();
4381
- return k.offerResume ? ta({
4391
+ return k.offerResume ? sa({
4382
4392
  chatService: f,
4383
- t: h,
4393
+ t: p,
4384
4394
  signal: ee.signal
4385
- }).then((T) => (q.settleResume(k), T ? M() : (q.restart(), Xs.flushStateData()))).catch((T) => {
4386
- T instanceof Pr || e.error("Resume prompt failed", T);
4395
+ }).then((D) => (q.settleResume(k), D ? M() : (q.restart(), Qs.flushStateData()))).catch((D) => {
4396
+ D instanceof qr || e.error("Resume prompt failed", D);
4387
4397
  }) : M(), () => {
4388
4398
  ee.abort(), ce.onInteractionFn$.value === C && (ce.onInteractionFn$.value = () => {
4389
4399
  }), v();
4390
4400
  };
4391
- }, [s, r, f, e, a, n, h]), l(be, {
4401
+ }, [s, r, f, e, a, n, p]), l(be, {
4392
4402
  children: [l("div", {
4393
4403
  class: "relative flex min-h-0 w-full max-w-full flex-grow flex-col",
4394
4404
  children: [l("div", {
4395
- ref: u,
4405
+ ref: c,
4396
4406
  role: "region",
4397
- "aria-label": h("conversation_history"),
4407
+ "aria-label": p("conversation_history"),
4398
4408
  tabIndex: 0,
4399
4409
  className: "hide-scrollbars fr flex min-h-0 w-full max-w-full flex-grow flex-col overflow-y-auto ring-inset",
4400
4410
  style: {
4401
4411
  WebkitOverflowScrolling: "touch"
4402
4412
  },
4403
- children: l(Hi, {
4413
+ children: l(Ji, {
4404
4414
  env: i,
4405
4415
  rpcClient: t,
4406
- lastSentMessageFooter: !zt(a) || !g ? null : l(Ki, {
4416
+ lastSentMessageFooter: !zt(a) || !g ? null : l(Zi, {
4407
4417
  undoFn: g
4408
4418
  })
4409
4419
  })
4410
4420
  }), ce.isReadingHistory$.value && !a.data.isFinished && !ce.isBotTyping$.value && l("div", {
4411
4421
  class: "absolute bottom-2 left-1/2 -translate-x-1/2",
4412
- children: l(Kr, {
4422
+ children: l(Gr, {
4413
4423
  class: "bg-neutral-1 ring-divider shadow-surface-md ring-1",
4414
- "aria-label": h("jump_to_current"),
4424
+ "aria-label": p("jump_to_current"),
4415
4425
  onClick: () => {
4416
4426
  var k, w;
4417
- ce.scrollToEnd(), (w = ((k = u.current) == null ? void 0 : k.querySelector('li[tabindex="-1"]')) ?? u.current) == null || w.focus({
4427
+ ce.scrollToEnd(), (w = ((k = c.current) == null ? void 0 : k.querySelector('li[tabindex="-1"]')) ?? c.current) == null || w.focus({
4418
4428
  preventScroll: !0
4419
4429
  });
4420
4430
  },
4421
- children: l(Ys, {})
4431
+ children: l(en, {})
4422
4432
  })
4423
4433
  })]
4424
- }), l(Si, {
4434
+ }), l(Ii, {
4425
4435
  logger: e,
4426
4436
  analytics: s
4427
4437
  })]
4428
4438
  });
4429
- }, Ki = ({
4439
+ }, Zi = ({
4430
4440
  undoFn: e
4431
4441
  }) => {
4432
4442
  const {
@@ -4434,7 +4444,7 @@ const ot = /* @__PURE__ */ Ai(Mi), Li = /(\[[^\]]+\]\([^)]+\))/g, Ri = /\[([^\]]
4434
4444
  } = re();
4435
4445
  return l("div", {
4436
4446
  class: "flex flex-1 items-center justify-end px-1",
4437
- children: l(Kr, {
4447
+ children: l(Gr, {
4438
4448
  "aria-label": r("undo"),
4439
4449
  onClick: async () => {
4440
4450
  const {
@@ -4449,5 +4459,5 @@ const ot = /* @__PURE__ */ Ai(Mi), Li = /(\[[^\]]+\]\([^)]+\))/g, Ri = /\[([^\]]
4449
4459
  });
4450
4460
  };
4451
4461
  export {
4452
- Xi as ChatbotBody
4462
+ eo as ChatbotBody
4453
4463
  };